addCourse.vue 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading"
  3. :element-loading-text="lang.xiaokeloading">
  4. <!-- ai引导模式 -->
  5. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">{{ lang.stop }}
  6. </div>
  7. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken"
  8. @click="cancelAjax('teacherTask')">{{ lang.stop }}</div>
  9. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  10. <div class="courseTop" :style="{width: !gotype ? '100%' :'100px'}">
  11. <div class="stepsNav" v-if="!gotype">
  12. <el-breadcrumb separator-class="el-icon-arrow-right">
  13. <el-breadcrumb-item :to="{
  14. path:
  15. '/course?userid=' +
  16. userid +
  17. '&oid=' +
  18. oid +
  19. '&org=' +
  20. org +
  21. '&role=' +
  22. role,
  23. }">{{ lang.ssCourseMgmt }}</el-breadcrumb-item>
  24. <el-breadcrumb-item>
  25. <span style="color: rgb(15, 126, 255)">{{ lang.AddCourse }}</span>
  26. </el-breadcrumb-item>
  27. </el-breadcrumb>
  28. </div>
  29. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">{{ lang.return }}</div>
  30. </div>
  31. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;"
  32. :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  33. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  34. <!-- @mouseenter="stepDisplay(true)"
  35. @mouseleave="stepDisplay(false)" -->
  36. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  37. <div class="stepBg" v-if="false">
  38. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  39. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  40. <div>
  41. <img src="../../../assets/icon/first.png" alt />
  42. </div>
  43. <div>{{ lang.Fillinbasicinformation }}</div>
  44. </div>
  45. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  46. <div>
  47. <img src="../../../assets/icon/firstNo.png" alt />
  48. </div>
  49. <div>{{ lang.Fillinbasicinformation }}</div>
  50. </div>
  51. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  52. </div>
  53. <!-- <div
  54. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  55. class="second"
  56. @click="navSteps(2)"
  57. >
  58. <div style="margin: 5px 10px 0 0; width: 2rem">
  59. <img src="../../../assets/icon/second.png" alt />
  60. </div>
  61. <div>选择课程模板</div>
  62. </div>
  63. <div
  64. v-else-if="cidType === 0 && isStepDisplay"
  65. class="secondNo"
  66. @click="navSteps(2)"
  67. >
  68. <div>
  69. <img src="../../../assets/icon/secondNo.png" alt />
  70. </div>
  71. <div>选择课程模板</div>
  72. </div> -->
  73. <!-- <div
  74. v-if="isStepDisplay"
  75. class="stepBorder"
  76. :class="{ 'border-active': steps > 2 }"
  77. ></div> -->
  78. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  79. <div>
  80. <img src="../../../assets/icon/third.png" alt />
  81. </div>
  82. <div>{{ lang.ssUploadCont }}</div>
  83. </div>
  84. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  85. <div>
  86. <img src="../../../assets/icon/thirdNo.png" alt />
  87. </div>
  88. <div>{{ lang.ssUploadCont }}</div>
  89. </div>
  90. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  91. <div v-if="steps > 3 && isStepDisplay" class="four">
  92. <div>
  93. <img src="../../../assets/icon/four.png" alt />
  94. </div>
  95. <div>{{ lang.ssUploadOk }}</div>
  96. </div>
  97. <div v-else-if="isStepDisplay" class="fourNo">
  98. <div>
  99. <img src="../../../assets/icon/fourNo.png" alt />
  100. </div>
  101. <div>{{ lang.ssUploadOk }}</div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  106. style="padding: 0" :style="{
  107. height:
  108. !isStepDisplay && !isBtnDisplay
  109. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  110. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  111. }">
  112. <!-- <div class="updateMask" :style="{
  113. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  114. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  115. <div class="whiteBg" style="background: unset; padding: 0">
  116. <div>
  117. <div class="basic_box" style="padding: 0">
  118. <div class="big_box">
  119. <div class="left_first">
  120. <div :class="{
  121. updateTips:
  122. cid && userid != courseUserid && role != '1',
  123. }">
  124. <div style="width: 100%">
  125. <div class="course_input_box2">
  126. <div class="course_input_box">
  127. <div class="bb_courseIcon">
  128. <img src="../../../assets/icon/new/course.png" />
  129. </div>
  130. <input type="text" :placeholder="lang.ssEnterName" class="binfo_input" v-model="courseName"
  131. @change="setCover" />
  132. </div>
  133. <div style=" margin-bottom: 15px; display:flex;">
  134. <el-switch v-model="isTeacherSee" :active-text="lang.ssPublish"
  135. style="justify-content: center; min-width: 150px;"></el-switch>
  136. <el-switch v-model="isFileSearch" :active-text="lang.ssIntell"
  137. style="justify-content: center; min-width: 175px;white-space: nowrap;"></el-switch>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  143. <span>{{ lang.type }}</span>
  144. <!-- 学科+ 主题+ 未来+ -->
  145. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  146. style="display: flex; align-items: center">
  147. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  148. :key="index">
  149. <el-radio :label="item.name">{{
  150. item.name
  151. }}</el-radio>
  152. </div>
  153. </el-radio-group>
  154. </div>
  155. <div class="both">
  156. <div class="choose" v-if="oid != '91796dfb-8791-11ef-9b30-005056b86db5'">
  157. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  158. <span v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">{{ item.name }}:</span>
  164. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  165. CourseTypeJson[item.id].length > 0 &&
  166. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  167. ? pTypeCheck.indexOf(item.id) != -1
  168. : true)
  169. ">
  170. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  171. item1.name }}</el-checkbox>
  172. </el-checkbox-group>
  173. <!-- <div
  174. v-else
  175. style="font-size: 14px; margin-left: -8px"
  176. >
  177. 暂无
  178. </div> -->
  179. </div>
  180. </div>
  181. </div>
  182. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  183. <div class="info_box_t_box">
  184. <span>{{ lang.OutputLanguage }}:</span>
  185. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center"
  186. @change="changeLang">
  187. <div class="all_choose info_radio">
  188. <el-radio :label="0">{{ lang.SimplifiedChinese }}</el-radio>
  189. </div>
  190. <div class="all_choose info_radio" style="margin-left: 10px">
  191. <el-radio :label="1">{{ lang.traditionalChinese }}</el-radio>
  192. </div>
  193. <div class="all_choose info_radio" style="margin-left: 10px">
  194. <el-radio :label="2">English</el-radio>
  195. </div>
  196. </el-radio-group>
  197. </div>
  198. </div>
  199. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  200. <div class="info_box_t_box">
  201. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  202. style="justify-content: center; min-width: 175px"></el-switch> -->
  203. <span>{{ lang.ssGenMode }}</span>
  204. <el-radio-group v-model="isuseT" style="display: flex; align-items: center"
  205. @change="changeIsuseT">
  206. <div class="all_choose info_radio">
  207. <el-radio :label="false">{{ lang.ssFromZero }}</el-radio>
  208. </div>
  209. <div class="all_choose info_radio" style="margin-left: 10px">
  210. <el-radio :label="true">{{ lang.ssFromExist }}</el-radio>
  211. </div>
  212. <div class="all_choose info_radio" style="margin-left: 10px">
  213. <el-radio :label="1">{{ lang.ssDialogGen }}</el-radio>
  214. </div>
  215. <div class="all_choose info_radio" style="margin-left: 10px">
  216. <el-radio :label="2">{{ lang.ssBrainGen }}</el-radio>
  217. </div>
  218. </el-radio-group>
  219. </div>
  220. </div>
  221. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  222. <div class="info_box_t_box">
  223. <span>{{ lang.ssGenStyle }}</span>
  224. <div class="mode_box">
  225. <span :class="{active: mode == 1}" @click="mode = 1">{{ lang.ssPrecise }}</span>
  226. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  227. <span :class="{active: mode == 3}" @click="mode = 3">{{ lang.ssCreative }}</span>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  232. <div class="info_box_t_box">
  233. <span>课程节数:</span>
  234. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  235. <span>节</span>
  236. </div>
  237. <div class="info_box_t_box">
  238. <span>课程时长:</span>
  239. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  240. <span>min</span>
  241. </div>
  242. </div> -->
  243. </div>
  244. <div class="right_first" v-loading="imageloading2">
  245. <!-- <div class="ai_box">
  246. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  247. </div> -->
  248. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  249. {{ lang.UploadCover }}
  250. </div>
  251. <div style="width: 100%">
  252. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  253. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  254. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  255. <div v-if="cover.length == 0">{{ lang.AddCoverimage }}</div>
  256. <div class="cover_mask">
  257. <img src="../../../assets/icon/new/cover_update.png" /><span
  258. style="margin-top: 5px">{{ lang.UpdateCover }}</span>
  259. </div>
  260. </div>
  261. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  262. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  263. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  264. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  265. <i class="el-icon-plus"></i>
  266. </el-upload> -->
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  274. <div class="whiteBg" style="border-radius: 0">
  275. <div class="c_info_title">
  276. {{ lang.CourseAccessSettings }}
  277. </div>
  278. <div class="wb_j_box">
  279. <div class="wb_j_box_content">
  280. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  281. (dialogVisibleClass = true),
  282. (classSearch = ''),
  283. (gradeId = ''),
  284. getClass()
  285. ">添加班级</button>
  286. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  287. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  288. getClassC(tc) }}</span>
  289. </div> -->
  290. <div class="wb_j_box_btn" @click="
  291. (dialogVisibleClass = true),
  292. (classSearch = ''),
  293. (gradeId = ''),
  294. getClass()
  295. ">
  296. <div class="wb_j_box_title">{{ lang.TeachingClass }}</div>
  297. <div class="wb_j_box_btn_c">
  298. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  299. v-if="checkboxList2.length" popper-class="text_tooltip2">
  300. <div class="wb_j_box_span">
  301. {{ getListClassC(checkboxList2) }}
  302. </div>
  303. </el-tooltip>
  304. <div v-else class="wb_j_box_span">{{ lang.SelectTeachingClass }}</div>
  305. <div class="wb_j_box_arrow"></div>
  306. </div>
  307. </div>
  308. </div>
  309. <div class="wb_j_box_content">
  310. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  311. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  312. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  313. checkBoolean
  314. ? checkboxList3
  315. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  316. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  317. </div> -->
  318. <div class="wb_j_box_btn" @click="openMember">
  319. <div class="wb_j_box_title">{{ lang.Collaborator }}</div>
  320. <div class="wb_j_box_btn_c">
  321. <!-- <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  322. v-if="checkboxList3.length" popper-class="text_tooltip2"> -->
  323. <div class="wb_j_box_span" v-if="checkboxList3.length">
  324. {{ getListMan2(checkboxList3) }}
  325. </div>
  326. <!-- </el-tooltip> -->
  327. <div v-else class="wb_j_box_span">{{ lang.Psac }}</div>
  328. <div class="wb_j_box_arrow"></div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  335. <div class="c_info_title">{{ lang.ObjectivesManagement }}</div>
  336. <div style="margin: 0 auto; padding: 0 20px">
  337. <div style="
  338. width: 95%;
  339. min-height: 200px;
  340. border: 1px solid #cad1dc;
  341. border-radius: 4px;
  342. position: relative;
  343. ">
  344. <div class="e_add_top">
  345. <div class="e_add_title">
  346. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  347. {{ lang.DeleteL }}
  348. </button>
  349. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  350. {{ lang.ssAdd }}
  351. </button>
  352. <!-- <span>当前使用目标管理</span>
  353. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  354. <img
  355. src="../../../assets/line.png"
  356. class="cru_line"
  357. style="
  358. width: 125px;
  359. height: 20px;
  360. bottom: -10px;
  361. left: 155px;
  362. "
  363. /> -->
  364. </div>
  365. <div style="
  366. display: flex;
  367. flex-direction: row;
  368. align-items: center;
  369. ">
  370. <!-- <el-button
  371. type="primary"
  372. size="small"
  373. @click="dialogVisiblemb = true"
  374. >添加目标管理</el-button
  375. >
  376. <el-button
  377. type="primary"
  378. size="small"
  379. @click="deleteEva()"
  380. >清除内容</el-button
  381. > -->
  382. <!-- <div class="e_add_delete" @click="deleteEva()">
  383. <img src="../../../assets/icon/delete.png" alt="" />
  384. </div> -->
  385. </div>
  386. </div>
  387. <div v-if="evalua == ''">
  388. <div class="noneBox">
  389. <img src="../../../assets/icon/new/eva_none.png" />
  390. <span>{{ lang.enterObjectiveManagement }}</span>
  391. </div>
  392. </div>
  393. <div class="e_add_content" v-else>
  394. <div class="e_add_list_pbox">
  395. <div class="e_add_list_pbox_title">
  396. <span class="type_title">{{ lang.SwitchMode }}</span>
  397. <div class="type_content">
  398. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">{{ lang.TreeView }}</span>
  399. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">{{ lang.CompassView }}</span>
  400. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">{{ lang.BoardView }}</span> -->
  401. </div>
  402. </div>
  403. <div class="e_add_list_pbox_content">
  404. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  405. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  406. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  407. v-if="typeMode == 3">
  408. </SeeBoard>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. </div>
  416. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  417. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  418. <div style="position: relative;
  419. background: #fff;
  420. box-sizing: border-box;
  421. padding: 1px 20px 10px;
  422. width: 100%;
  423. border-radius: 10px;">
  424. <div style="
  425. display: flex;
  426. flex-direction: row;
  427. justify-content: space-between;
  428. align-items: center;
  429. " :style="{
  430. margin: true
  431. ? '20px 0 10px'
  432. : '20px 0 0',
  433. }">
  434. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  435. {{ lang.ssExistPlan }}
  436. <div class="add_info_box" style="margin: 0 0 0 auto">
  437. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  438. {{ lang.ssUploadPlan }}
  439. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  440. style="display: none" v-if="inputShow" @change="
  441. beforeUploadInfo2(
  442. $event,
  443. 14
  444. )
  445. " />
  446. </button>
  447. <button class="c_pub_button_add" @click="clickGenTT"
  448. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  449. {{ lang.ssOneKeyGenLessonPlan }}
  450. </button>
  451. </div>
  452. </div>
  453. </div>
  454. <div>
  455. <div class="add_chapters_box add_c_none" v-if="
  456. teacherInfoData &&
  457. teacherInfoData.length == 0
  458. ">
  459. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  460. <span>{{ lang.ssNoContentL }}</span>
  461. </div>
  462. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  463. <div @dragstart="
  464. dragStart(item1, index1, 0)
  465. " @dragover.prevent="
  466. dragOver(index1, 0)
  467. " @dragend="dragEnd()" :draggable="isdrag ==
  468. 'chapter-' + 0 + '-' + index1
  469. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  470. getChapterData(
  471. $event,
  472. index1,
  473. item1.type
  474. )
  475. " :class="{
  476. dragOverTop2:
  477. newIndex === index1 &&
  478. typeIndex ==
  479. 'chapter-' +
  480. 0 +
  481. '-' +
  482. index1 &&
  483. oldIndex > index1 &&
  484. dragType == 'drag',
  485. dragOverBottom2:
  486. newIndex === index1 &&
  487. typeIndex ==
  488. 'chapter-' +
  489. 0 +
  490. '-' +
  491. index1 &&
  492. oldIndex < index1 &&
  493. dragType == 'drag',
  494. }">
  495. <div class="chapter_upload_o" style="
  496. position: relative;
  497. display: flex;
  498. align-items: center;
  499. ">
  500. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  501. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  502. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  503. </div>
  504. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  505. </div>
  506. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  507. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  508. </div>
  509. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  510. </div>
  511. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  512. </div>
  513. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  514. </div>
  515. </div>
  516. <div class="chapter_upload_n">
  517. <input readonly="true" v-if="
  518. item1.type == 2 ||
  519. item1.type == 3 ||
  520. item1.type == 12 ||
  521. item1.type == 13 ||
  522. item1.type == 7
  523. " :placeholder="item1.name" style="
  524. border: none;
  525. outline: none;
  526. width: 80%;
  527. minwidth: 215px;
  528. z-index: 99;
  529. font-size: 14px;
  530. white-space: nowrap;
  531. overflow: hidden;
  532. text-overflow: ellipsis;
  533. " />
  534. </div>
  535. <div class="chapter_upload_ic">
  536. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  537. <div class="chapter_upload_ic_r" @click.stop="
  538. deleteTeacherInfoData(
  539. $event,
  540. index1
  541. )
  542. ">
  543. <div></div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. </div>
  550. <div v-if="
  551. teacherinfoproVisible
  552. " class="mask">
  553. <div class="progressBox">
  554. <div class="lbox">
  555. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  556. </div>
  557. <div style="margin-bottom: 10px">
  558. <span>{{
  559. teacherinfoisFinishSize
  560. }}</span>
  561. /
  562. <span>{{
  563. teacherinfoisAllSize
  564. }}</span>
  565. </div>
  566. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  567. ? teacherinfoprogress
  568. : 0
  569. " style="width: 80%"></el-progress> -->
  570. </div>
  571. </div>
  572. </div>
  573. </div>
  574. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}"
  575. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative"
  576. v-loading="teacherTextLoading" :element-loading-text="lang.xiaokeloading"
  577. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  578. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken"
  579. @click="cancelAjax('teacherText')">{{ lang.stop }}</div>
  580. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  581. <div class="c_info_title">
  582. {{ lang.ssPlanSummary }}
  583. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  584. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  585. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  586. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">{{ lang.ssExtract }}</button>
  587. </el-tooltip>
  588. </div>
  589. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  590. <div style="width: calc(100%);" class='op_task_box'>
  591. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  592. v-model="teacherCourseText" :placeholder="lang.ssEnterSum" v-if="teacherCourseTextB"></textarea>
  593. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText"
  594. v-else-if="teacherTextLoading"></div>
  595. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  596. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  597. <div class="op_remark">{{ lang.ssOptTip }}</div>
  598. <div class="op_box_right">
  599. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  600. <div class="r_pub_button_op"
  601. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  602. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">
  603. {{ lang.ssIntOpt }}</div>
  604. </el-tooltip>
  605. <div class="r_pub_button_edit" style="margin-left:10px"
  606. @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">
  607. {{ teacherCourseTextB ? lang.Confirm : lang.edit }}</div>
  608. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" :active-text="lang.ssQuote"
  609. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  610. @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. </div>
  616. </div>
  617. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}"
  618. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading"
  619. :element-loading-text="lang.xiaokeloading"
  620. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  621. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1"
  622. @click="cancelAjax('target1')">{{ lang.stop }}</div>
  623. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  624. <div class="c_info_title">
  625. {{ lang.ssCourseObj }}
  626. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  627. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  628. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  629. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">{{ lang.ssExtractObj }}</button>
  630. </el-tooltip>
  631. </div>
  632. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  633. <div style="width: calc(100%);" class='op_task_box'>
  634. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  635. v-model="targetCourseText" :placeholder="lang.ssEnterObj" v-if="targetCourseTextB"></textarea>
  636. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText"
  637. v-else-if="targetTextLoading"></div>
  638. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  639. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  640. <div class="op_remark">{{ lang.ssOptTip }}</div>
  641. <div class="op_box_right">
  642. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  643. <div class="r_pub_button_op"
  644. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  645. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  646. {{ lang.ssIntOpt }}</div>
  647. </el-tooltip>
  648. <div class="r_pub_button_edit" style="margin-left:10px"
  649. @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  650. {{ targetCourseTextB ? lang.Confirm : lang.edit }}</div>
  651. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" :active-text="lang.ssQuote"
  652. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  653. @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. </div>
  659. </div>
  660. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  661. <div style="position: relative;
  662. background: #fff;
  663. box-sizing: border-box;
  664. padding: 1px 20px 10px;
  665. width: 100%;
  666. border-radius: 10px;">
  667. <div style="
  668. display: flex;
  669. flex-direction: row;
  670. justify-content: space-between;
  671. align-items: center;
  672. " :style="{
  673. margin: true
  674. ? '20px 0 10px'
  675. : '20px 0 0',
  676. }">
  677. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  678. {{ lang.ssSysRef }}
  679. <div class="add_info_box" style="margin: 0 0 0 auto">
  680. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  681. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  682. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  683. @click="openAiDialog(2, 'aiSearchFile')">{{ lang.ssIntSearch }}</button>
  684. </el-tooltip>
  685. </div>
  686. </div>
  687. </div>
  688. <div v-loading="fileSLoading" :element-loading-text="lang.xiaokeloading">
  689. <div class="add_chapters_box add_c_none" v-if="
  690. cankaoInfoData &&
  691. cankaoInfoData.length == 0
  692. ">
  693. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  694. <span>{{ lang.ssNoContentL }}</span>
  695. </div>
  696. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  697. <div @dragstart="
  698. dragStart(item1, index1, 0)
  699. " @dragover.prevent="
  700. dragOver(index1, 0)
  701. " @dragend="dragEnd()" :draggable="isdrag ==
  702. 'chapter-' + 0 + '-' + index1
  703. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  704. getChapterData(
  705. $event,
  706. index1,
  707. item1.type
  708. )
  709. " :class="{
  710. dragOverTop2:
  711. newIndex === index1 &&
  712. typeIndex ==
  713. 'chapter-' +
  714. 0 +
  715. '-' +
  716. index1 &&
  717. oldIndex > index1 &&
  718. dragType == 'drag',
  719. dragOverBottom2:
  720. newIndex === index1 &&
  721. typeIndex ==
  722. 'chapter-' +
  723. 0 +
  724. '-' +
  725. index1 &&
  726. oldIndex < index1 &&
  727. dragType == 'drag',
  728. }">
  729. <div class="chapter_upload_o" style="
  730. position: relative;
  731. display: flex;
  732. align-items: center;
  733. ">
  734. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  735. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  736. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  737. </div>
  738. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  739. </div>
  740. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  741. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  742. </div>
  743. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  744. </div>
  745. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  746. </div>
  747. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  748. </div>
  749. </div>
  750. <div class="chapter_upload_n">
  751. <input readonly="true" v-if="
  752. item1.type == 2 ||
  753. item1.type == 3 ||
  754. item1.type == 12 ||
  755. item1.type == 13 ||
  756. item1.type == 7
  757. " :placeholder="item1.name" style="
  758. border: none;
  759. outline: none;
  760. width: 80%;
  761. minwidth: 215px;
  762. z-index: 99;
  763. font-size: 14px;
  764. white-space: nowrap;
  765. overflow: hidden;
  766. text-overflow: ellipsis;
  767. " />
  768. </div>
  769. <div class="chapter_upload_ic">
  770. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  771. <div class="chapter_upload_ic_r" @click.stop="
  772. deleteCankaoInfoData(
  773. $event,
  774. index1
  775. )
  776. ">
  777. <div></div>
  778. </div>
  779. </div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. </div>
  786. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  787. v-if="(!yiKeTemplateArray.includes(templateid))">
  788. <div style="position: relative;
  789. background: #fff;
  790. box-sizing: border-box;
  791. padding: 1px 20px 10px;
  792. width: 100%;
  793. border-radius: 10px;">
  794. <div style="
  795. display: flex;
  796. flex-direction: row;
  797. justify-content: space-between;
  798. align-items: center;
  799. " :style="{
  800. margin: true
  801. ? '20px 0 10px'
  802. : '20px 0 0',
  803. }">
  804. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  805. {{ lang.ssRefStd }}
  806. <div class="add_info_box" style="margin: 0 0 0 auto">
  807. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  808. {{ lang.ssUploadStd }}
  809. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  810. style="display: none" v-if="inputShow" @change="
  811. beforeUploadInfo2(
  812. $event,
  813. 19
  814. )
  815. " />
  816. </button>
  817. </div>
  818. </div>
  819. </div>
  820. <div>
  821. <div class="add_chapters_box add_c_none" v-if="
  822. knowInfoData &&
  823. knowInfoData.length == 0
  824. ">
  825. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  826. <span>{{ lang.ssNoContentL }}</span>
  827. </div>
  828. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  829. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  830. getChapterData(
  831. $event,
  832. index1,
  833. item1.type
  834. )
  835. ">
  836. <div class="chapter_upload_o" style="
  837. position: relative;
  838. display: flex;
  839. align-items: center;
  840. ">
  841. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }"
  842. @click="checkKnowInfoData(item1.fileid)"></div>
  843. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  844. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  845. <div v-if="item1.type == 3 || item1.type == 16" class="chapter_upload_l_i3" style="margin-left: 1px">
  846. </div>
  847. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  848. </div>
  849. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  850. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  851. </div>
  852. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  853. </div>
  854. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  855. </div>
  856. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  857. </div>
  858. </div>
  859. <div class="chapter_upload_n">
  860. <input readonly="true" v-if="
  861. item1.type == 2 ||
  862. item1.type == 3 ||
  863. item1.type == 12 ||
  864. item1.type == 13 ||
  865. item1.type == 7
  866. " :placeholder="item1.name" @click.stop="
  867. checkChpater3($event, index1, item1)
  868. " style="
  869. border: none;
  870. outline: none;
  871. width: 80%;
  872. minwidth: 215px;
  873. z-index: 99;
  874. font-size: 14px;
  875. white-space: nowrap;
  876. overflow: hidden;
  877. text-overflow: ellipsis;
  878. " />
  879. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  880. border: none;
  881. outline: none;
  882. width: 80%;
  883. white-space: nowrap;
  884. overflow: hidden;
  885. text-overflow: ellipsis;
  886. " readonly="true" @click="
  887. selectAttText(index1)
  888. " />
  889. <input :placeholder="item1.title ? item1.title : lang.Links
  890. " v-if="item1.type == 8" style="
  891. border: none;
  892. outline: none;
  893. width: 80%;
  894. white-space: nowrap;
  895. overflow: hidden;
  896. text-overflow: ellipsis;
  897. " readonly="true" @click="selectLine(index1)" />
  898. <input :placeholder="item1.title ? item1.title : lang.Links
  899. " v-if="item1.type == 14" style="
  900. border: none;
  901. outline: none;
  902. width: 80%;
  903. white-space: nowrap;
  904. overflow: hidden;
  905. text-overflow: ellipsis;
  906. " readonly="true" @click="
  907. openUpdateSource(index1)
  908. " />
  909. </div>
  910. <div class="chapter_upload_ic">
  911. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  912. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  913. checkChpater3($event, index1, item1)
  914. ">
  915. <div></div>
  916. </div>
  917. <div class="chapter_upload_ic_r" @click.stop="
  918. deleteKnowInfoData(
  919. $event,
  920. index1
  921. )
  922. ">
  923. <div></div>
  924. </div>
  925. </div>
  926. </div>
  927. </div>
  928. </div>
  929. </div>
  930. <div v-if="
  931. knowinfoproVisible
  932. " class="mask">
  933. <div class="progressBox">
  934. <div class="lbox">
  935. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  936. </div>
  937. <div style="margin-bottom: 10px">
  938. <span>{{
  939. knowinfoisFinishSize
  940. }}</span>
  941. /
  942. <span>{{
  943. knowinfoisAllSize
  944. }}</span>
  945. </div>
  946. </div>
  947. </div>
  948. </div>
  949. </div>
  950. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;"
  951. v-if="(!yiKeTemplateArray.includes(templateid))" :style="{padding: interFindPan ? '0 0 15px' : '0 0 0'}">
  952. <div style="position: relative;
  953. background: #fff;
  954. box-sizing: border-box;
  955. width: 100%;
  956. border-radius: 10px;" :style="{padding: interFindPan ? '1px 20px 10px' : '1px 20px 1px'}">
  957. <div style="
  958. display: flex;
  959. flex-direction: row;
  960. justify-content: space-between;
  961. align-items: center;
  962. " :style="{
  963. margin: true
  964. ? '20px 0 10px'
  965. : '20px 0 0',
  966. }">
  967. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  968. {{ lang.ssSearchMat }}
  969. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  970. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  971. @click="interFindPan = !interFindPan,forceUpdate2()">{{ interFindPan ? lang.fold : lang.expand }}</button>
  972. </div>
  973. </div>
  974. </div>
  975. <div class="know_serach" v-show="interFindPan">
  976. <div class="know_serach_box" v-if="getTypeC(2).length || getTypeC(1).length">
  977. <span>{{ lang.ssSearchItem }}</span>
  978. <el-select v-if="getTypeC(2).length" v-model="typeC1" :placeholder="lang.ssSelectGrade" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  979. <el-option v-for="(e, eIndex) in getTypeC(2)" :key="eIndex" :label="e" :value="e">
  980. </el-option>
  981. </el-select>
  982. <el-select v-if="getTypeC(1).length" v-model="typeC2" :placeholder="lang.ssSelectSubj" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  983. <el-option v-for="(e, eIndex) in getTypeC(1)" :key="eIndex" :label="e" :value="e">
  984. </el-option>
  985. </el-select>
  986. </div>
  987. <div class="know_serach_box">
  988. <span>{{ lang.ssSearchKey }}</span>
  989. <input type="text" :placeholder="lang.ssEnterKey" class="binfo_input" v-model="searchFileName"
  990. style="width: 100%;margin: 0 5px 0 0;min-height: 36px;box-sizing: border-box;height: 36px;" />
  991. <button class="c_pub_button_add" @click="startFindMatchingContents">{{ lang.ssClickSearch }}</button>
  992. </div>
  993. <!-- <div class="know_serach_box" v-if="getTypeC(2)">
  994. <span>筛选年级:</span>
  995. <div>{{getTypeC(2)}}</div>
  996. </div>
  997. <div class="know_serach_box" v-if="getTypeC(1)">
  998. <span>筛选学科:</span>
  999. <div>{{getTypeC(1)}}</div>
  1000. </div> -->
  1001. <div class="know_serach_box" v-if="this.knowInfoData3.length">
  1002. <span>{{ lang.ssFilterItem }}</span>
  1003. <el-select v-model="knowFileType1" :placeholder="lang.ssSelectVol" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1004. <el-option v-for="(e, eIndex) in knowFileTypeArray1" :key="eIndex" :label="e" :value="e">
  1005. </el-option>
  1006. </el-select>
  1007. <el-select v-model="knowFileType2" :placeholder="lang.ssSelectUnit" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1008. <el-option v-for="(e, eIndex) in 10" :key="eIndex" :label="lang.ssUnit.replace(/\*/g, e)" :value="e">
  1009. </el-option>
  1010. </el-select>
  1011. <el-select v-model="knowFileType" :placeholder="lang.ssSelectType" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1012. <el-option v-for="(e, eIndex) in getKnowType()" :key="eIndex" :label="e" :value="e">
  1013. </el-option>
  1014. </el-select>
  1015. <button class="c_pub_button_confirm" style="margin: 0 10px 0 0px;" @click="knowFileType1 = '',knowFileType2 = '',knowFileType = ''">{{ lang.reset }}</button>
  1016. <button v-loading="isfindMatchingContents" class="c_pub_button_confirm" style="margin: 0 0 0 0px;" @click="panFind" v-if="findMatchingContentsPage != 1">{{ lang.ssNextPage }}</button>
  1017. <button class="c_pub_button_stopeped" style="margin: 0 0 0 10px;" @click="cancelAjax('findMatchingContents')" v-if="isfindMatchingContents">{{ lang.stop }}</button>
  1018. </div>
  1019. </div>
  1020. <div style="display: flex; align-items: center;" v-show="interFindPan">
  1021. <div v-loading="knowInfoDataLoading" :element-loading-text="lang.xiaokeloading"
  1022. style="height: 400px; width:calc(50% - 50px);">
  1023. <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents"
  1024. @click="cancelAjax('findMatchingContents')">{{ lang.stop }}</div>
  1025. <div class="add_chapters_check_box" v-if="allknowInfoData3() && allknowInfoData3().length">
  1026. <div class="add_chapters_check" @click="checkAllKnowInfoData3()">
  1027. <div class="chapter_upload_check" :class="{ checked: panknowInfoData3CheckAll() }"></div>
  1028. <div style="margin-left: 5px">{{ lang.SelectAll }}</div>
  1029. </div>
  1030. </div>
  1031. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1032. allknowInfoData3() &&
  1033. allknowInfoData3().length == 0
  1034. ">
  1035. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1036. <span>{{ lang.ssNoSearch }}</span>
  1037. </div>
  1038. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;">
  1039. <div class="chapter_upload">
  1040. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1041. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">{{ lang.ssSelected }}</div>
  1042. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1043. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1044. </div>
  1045. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1046. <div class="chapter_upload_box" style="color: #000">{{ lang.ssFileName }}</div>
  1047. </div>
  1048. <div class="chapter_upload_type">{{ lang.ssFileType }}</div>
  1049. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">{{ lang.Action }}</div>
  1050. </div>
  1051. </div>
  1052. <!-- @scroll="panFind" -->
  1053. <div class="chapter_upload_box_file">
  1054. <div class="chapter_upload" v-for="(item1, index1) in allknowInfoData3()" :key="item1.id" @click="
  1055. getChapterData(
  1056. $event,
  1057. index1,
  1058. item1.type
  1059. )
  1060. ">
  1061. <div class="chapter_upload_o" style="
  1062. position: relative;
  1063. display: flex;
  1064. align-items: center;
  1065. padding: 0 10px;
  1066. box-sizing: border-box;
  1067. ">
  1068. <div class="chapter_upload_check file-loading-class"
  1069. :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }"
  1070. @click="checkKnowInfoData3(item1.url)" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1071. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1072. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1073. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1074. </div>
  1075. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1076. </div>
  1077. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1078. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1079. </div>
  1080. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1081. </div>
  1082. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1083. </div>
  1084. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1085. </div>
  1086. </div>
  1087. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1088. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1089. <!-- content to trigger tooltip here -->
  1090. <div v-if="
  1091. item1.type == 2 ||
  1092. item1.type == 3 ||
  1093. item1.type == 12 ||
  1094. item1.type == 13 ||
  1095. item1.type == 7
  1096. " @click.stop="
  1097. checkChpater3($event, index1, item1)
  1098. " class="chapter_upload_box" >{{ item1.name }}</div>
  1099. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1100. selectAttText(index1)
  1101. " >{{ item1.name }}</div>
  1102. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)" >{{ item1.title ? item1.title : lang.Links }}</div>
  1103. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1104. openUpdateSource(index1)
  1105. " >{{ item1.title ? item1.title : lang.Links }}</div>
  1106. </el-tooltip>
  1107. </div>
  1108. <div class="chapter_upload_type">
  1109. {{ item1.file_type }}
  1110. </div>
  1111. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1112. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1113. <div class="chapter_upload_ic_check" style="margin: 0" v-if="item1.type == 3" @click.stop="
  1114. checkChpater3($event, index1, item1)
  1115. ">
  1116. <div></div>
  1117. </div>
  1118. <!-- <div class="chapter_upload_ic_r" @click.stop="
  1119. deleteKnowInfoData3(
  1120. $event,
  1121. index1
  1122. )
  1123. ">
  1124. <div></div>
  1125. </div> -->
  1126. </div>
  1127. </div>
  1128. </div>
  1129. </div>
  1130. </div>
  1131. </div>
  1132. <div style="margin: 0 5px; min-width: fit-content">
  1133. <button class="c_pub_button_confirm" @click="useUrl">
  1134. {{ lang.Use }}
  1135. <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1"
  1136. xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128">
  1137. <path
  1138. 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"
  1139. p-id="1466" fill="#ffffff"></path>
  1140. </svg>
  1141. </button>
  1142. </div>
  1143. <div style="height: 400px; width:calc(50% - 50px);position: relative;">
  1144. <div class="add_chapters_check_box" v-if="knowInfoData2 && knowInfoData2.length">
  1145. <div class="add_chapters_check" @click="checkAllKnowInfoData2()" v-if="knowInfoData2 && knowInfoData2.length">
  1146. <div class="chapter_upload_check" :class="{ checked: knowFileids2.length == knowInfoData2.length }"></div>
  1147. <div style="margin-left: 5px">{{ lang.SelectAll }}</div>
  1148. </div>
  1149. <button v-if="knowFileids2.length" class="c_pub_button_confirm" style="margin: 0 0 0 10px;" @click="deleteCheckAllKnowInfoData2()">{{ lang.Delete }}</button>
  1150. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)" style="margin: 0 0 0 auto;">
  1151. {{ lang.ssUploadKB }}
  1152. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1153. style="display: none" v-if="inputShow" @change="beforeUploadInfo2($event, 20)" />
  1154. </button>
  1155. </div>
  1156. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1157. knowInfoData2 &&
  1158. knowInfoData2.length == 0
  1159. ">
  1160. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1161. <span>{{ lang.ssNoContentL }}</span>
  1162. </div>
  1163. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;" ref="rightKnow">
  1164. <div class="chapter_upload">
  1165. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1166. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">{{ lang.ssSelected }}</div>
  1167. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1168. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1169. </div>
  1170. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1171. <div class="chapter_upload_box" style="color: #000">{{ lang.ssFileName }}</div>
  1172. </div>
  1173. <div class="chapter_upload_type">{{ lang.ssFileType }}</div>
  1174. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">{{ lang.Action }}</div>
  1175. </div>
  1176. </div>
  1177. <div class="chapter_upload_box_file">
  1178. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  1179. getChapterData(
  1180. $event,
  1181. index1,
  1182. item1.type
  1183. )
  1184. ">
  1185. <div class="chapter_upload_o" style="
  1186. position: relative;
  1187. display: flex;
  1188. align-items: center;
  1189. padding: 0 10px;
  1190. box-sizing: border-box;
  1191. ">
  1192. <div class="chapter_upload_check file-loading-class"
  1193. :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }"
  1194. @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1195. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1196. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1197. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1198. </div>
  1199. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1200. </div>
  1201. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1202. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1203. </div>
  1204. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1205. </div>
  1206. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1207. </div>
  1208. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1209. </div>
  1210. </div>
  1211. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1212. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1213. <!-- content to trigger tooltip here -->
  1214. <div v-if="
  1215. item1.type == 2 ||
  1216. item1.type == 3 ||
  1217. item1.type == 12 ||
  1218. item1.type == 13 ||
  1219. item1.type == 7
  1220. " @click.stop="
  1221. checkChpater3($event, index1, item1)
  1222. " class="chapter_upload_box">{{ item1.name }}</div>
  1223. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1224. selectAttText(index1)
  1225. ">{{ item1.name }}</div>
  1226. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)">{{ item1.title ? item1.title : lang.Links }}</div>
  1227. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1228. openUpdateSource(index1)
  1229. ">{{ item1.title ? item1.title : lang.Links }}</div>
  1230. </el-tooltip>
  1231. </div>
  1232. <div class="chapter_upload_type">
  1233. {{ item1.file_type ? item1.file_type : lang.ssNone }}
  1234. </div>
  1235. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1236. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1237. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1238. checkChpater3($event, index1, item1)
  1239. ">
  1240. <div></div>
  1241. </div>
  1242. <div class="chapter_upload_ic_r" @click.stop="
  1243. deleteKnowInfoData2(
  1244. $event,
  1245. index1
  1246. )
  1247. ">
  1248. <div></div>
  1249. </div>
  1250. </div>
  1251. </div>
  1252. </div>
  1253. </div>
  1254. </div>
  1255. <div v-if="
  1256. knowinfoproVisible2
  1257. " class="mask">
  1258. <div class="progressBox">
  1259. <div class="lbox">
  1260. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  1261. </div>
  1262. <div style="margin-bottom: 10px">
  1263. <span>{{
  1264. knowinfoisFinishSize2
  1265. }}</span>
  1266. /
  1267. <span>{{
  1268. knowinfoisAllSize2
  1269. }}</span>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. </div>
  1274. </div>
  1275. <!-- <div v-if="
  1276. knowinfoproVisible2
  1277. " class="mask">
  1278. <div class="progressBox">
  1279. <div class="lbox">
  1280. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  1281. </div>
  1282. <div style="margin-bottom: 10px">
  1283. <span>{{
  1284. knowinfoisFinishSize2
  1285. }}</span>
  1286. /
  1287. <span>{{
  1288. knowinfoisAllSize2
  1289. }}</span>
  1290. </div>
  1291. </div>
  1292. </div> -->
  1293. </div>
  1294. </div>
  1295. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1296. v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1297. <div style="position: relative;
  1298. background: #fff;
  1299. box-sizing: border-box;
  1300. padding: 1px 20px 10px;
  1301. width: 100%;
  1302. border-radius: 10px;">
  1303. <div style="
  1304. display: flex;
  1305. flex-direction: row;
  1306. justify-content: space-between;
  1307. align-items: center;
  1308. " :style="{
  1309. margin: true
  1310. ? '20px 0 10px'
  1311. : '20px 0 0',
  1312. }">
  1313. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1314. {{ lang.ssKnowBase }}
  1315. <div class="add_info_box" style="margin: 0 0 0 auto">
  1316. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1317. {{ lang.ssUploadSup }}
  1318. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1319. style="display: none" v-if="inputShow" @change="
  1320. beforeUploadInfo2(
  1321. $event,
  1322. 15
  1323. )
  1324. " />
  1325. </button>
  1326. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1327. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1328. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1329. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1330. </el-tooltip> -->
  1331. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1332. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">{{ lang.ssIntSearch }}</button>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. <div v-loading="fileSLoading" :element-loading-text="lang.xiaokeloading"
  1337. :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1338. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken"
  1339. @click="cancelAjax('file')">{{ lang.stop }}</div>
  1340. <div class="add_chapters_box add_c_none" v-if="
  1341. infoData2 &&
  1342. infoData2.length == 0
  1343. ">
  1344. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1345. <span>{{ lang.ssNoContentL }}</span>
  1346. </div>
  1347. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1348. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1349. getChapterData(
  1350. $event,
  1351. index1,
  1352. item1.type
  1353. )
  1354. ">
  1355. <div class="chapter_upload_o" style="
  1356. position: relative;
  1357. display: flex;
  1358. align-items: center;
  1359. ">
  1360. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }"
  1361. @click="checkInfoData(item1.fileid, item1)"></div>
  1362. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1363. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1364. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1365. </div>
  1366. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1367. </div>
  1368. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1369. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1370. </div>
  1371. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1372. </div>
  1373. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1374. </div>
  1375. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1376. </div>
  1377. </div>
  1378. <div class="chapter_upload_n">
  1379. <input readonly="true" v-if="
  1380. item1.type == 2 ||
  1381. item1.type == 3 ||
  1382. item1.type == 12 ||
  1383. item1.type == 13 ||
  1384. item1.type == 7
  1385. " :placeholder="item1.name" @click.stop="
  1386. checkChpater2($event, index1 )
  1387. " style="
  1388. border: none;
  1389. outline: none;
  1390. width: 80%;
  1391. minwidth: 215px;
  1392. z-index: 99;
  1393. font-size: 14px;
  1394. white-space: nowrap;
  1395. overflow: hidden;
  1396. text-overflow: ellipsis;
  1397. " />
  1398. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1399. border: none;
  1400. outline: none;
  1401. width: 80%;
  1402. white-space: nowrap;
  1403. overflow: hidden;
  1404. text-overflow: ellipsis;
  1405. " readonly="true" @click="
  1406. selectAttText(index1)
  1407. " />
  1408. <input :placeholder="item1.title ? item1.title : lang.Links
  1409. " v-if="item1.type == 8" style="
  1410. border: none;
  1411. outline: none;
  1412. width: 80%;
  1413. white-space: nowrap;
  1414. overflow: hidden;
  1415. text-overflow: ellipsis;
  1416. " readonly="true" @click="selectLine(index1)" />
  1417. <input :placeholder="item1.title ? item1.title : lang.Links
  1418. " v-if="item1.type == 14" style="
  1419. border: none;
  1420. outline: none;
  1421. width: 80%;
  1422. white-space: nowrap;
  1423. overflow: hidden;
  1424. text-overflow: ellipsis;
  1425. " readonly="true" @click="
  1426. openUpdateSource(index1)
  1427. " />
  1428. </div>
  1429. <div class="chapter_upload_ic">
  1430. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1431. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1432. checkChpater2($event, index1 )
  1433. ">
  1434. <div></div>
  1435. </div>
  1436. <div class="chapter_upload_ic_r" @click.stop="
  1437. deleteInfoData2(
  1438. $event,
  1439. index1
  1440. )
  1441. ">
  1442. <div></div>
  1443. </div>
  1444. </div>
  1445. </div>
  1446. </div>
  1447. </div>
  1448. </div>
  1449. <div v-if="
  1450. infoproVisible
  1451. " class="mask">
  1452. <div class="progressBox">
  1453. <div class="lbox">
  1454. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  1455. </div>
  1456. <div style="margin-bottom: 10px">
  1457. <span>{{
  1458. infoisFinishSize
  1459. }}</span>
  1460. /
  1461. <span>{{
  1462. infoisAllSize
  1463. }}</span>
  1464. </div>
  1465. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1466. ? infoprogress
  1467. : 0
  1468. " style="width: 80%"></el-progress> -->
  1469. </div>
  1470. </div>
  1471. </div>
  1472. </div>
  1473. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="(isuseT === 2)">
  1474. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1475. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1476. {{ lang.ssCourseOver }}<span class="inter_setting" @click="openInterPanSetting2" v-if="istemplate == 1"></span>
  1477. <div class="inter_setting_panel" v-show="interSetting">
  1478. <div class="panel_title">{{ lang.ssConfigWF }}</div>
  1479. <div class="panel_tips">{{ lang.ssWorkflowTip }}</div>
  1480. <div class="panel_input">
  1481. <input type="text" :placeholder="lang.ssEnterAid" class="binfo_input" v-model="r_agentid" />
  1482. <div class="panel_input_record">
  1483. <span>{{ lang.ssAgendaQ }}</span>
  1484. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordstart"
  1485. :placeholder="lang.ssAgendaQ"></textarea>
  1486. </div>
  1487. <div class="panel_input_record">
  1488. <span>{{ lang.ssViewProg }}</span>
  1489. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCheckJindu"
  1490. :placeholder="lang.ssViewProg"></textarea>
  1491. </div>
  1492. <div class="panel_input_record">
  1493. <span>{{ lang.ssSumCourse }}</span>
  1494. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCourseD"
  1495. :placeholder="lang.ssSumCourse"></textarea>
  1496. </div>
  1497. </div>
  1498. <div class="panel_button" style="justify-content: flex-end;">
  1499. <button class="c_pub_button_confirm" @click="setAgentid2" style="margin-right: 10px;">{{ lang.Confirm }}</button>
  1500. <button class="c_pub_button_return" @click="cancelInterSetting2">{{ lang.Cancel }}</button>
  1501. </div>
  1502. </div>
  1503. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1504. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? lang.fold : lang.expand }}</button>
  1505. </div>
  1506. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1507. <div style="width: calc(100%);height: 100%" class='op_task_box inter_voiceBox'>
  1508. <recordV :videoText2.sync="recordVideoText" :audioUrl2.sync="recordAudioUrl"></recordV>
  1509. </div>
  1510. <div class="inter_box" v-show="interPan" style="margin: 0 0 0 10px;max-width: 50%;max-height:500px;">
  1511. <aiBoxCourseDetail v-if="aiJson.recordAgentid && chatid" :languageSetting="languageSetting"
  1512. :courseId="chatid" :courseText2.sync="courseText" :viedoText="recordVideoText"
  1513. :agentid="aiJson.recordAgentid" :recordstart="aiJson.recordstart"
  1514. :recordCheckJindu="aiJson.recordCheckJindu" :recordCourseD="aiJson.recordCourseD"
  1515. :courseInfo="course_info" :fileids='[...knowFileids, ...knowFileids2]'></aiBoxCourseDetail>
  1516. </div>
  1517. </div>
  1518. </div>
  1519. </div>
  1520. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}"
  1521. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1522. :element-loading-text="lang.xiaokeloading"
  1523. v-if="(!(isuseT === true) && !(isuseT === 1) && !(isuseT === 2) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid)) || (isuseT === 2 && courseText)">
  1524. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken"
  1525. @click="cancelAjax('text')">{{ lang.stop }}</div>
  1526. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1527. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1528. {{ lang.CourseDescription }}
  1529. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  1530. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1531. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1532. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">{{ lang.ssAIOpt }}</button>
  1533. </el-tooltip>
  1534. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;"
  1535. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">{{ lang.ssGenOver }}</button>
  1536. </div>
  1537. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1538. <div style="width: calc(100%);" class='op_task_box'>
  1539. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1540. :placeholder="lang.EnterCourseDescription" v-if="courseTextB" @change="textAreaChange('courseText')"></textarea>
  1541. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1542. v-else-if="textLoading"></div>
  1543. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1544. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1545. <div class="op_remark">{{ lang.ssOptTip }}</div>
  1546. <div class="op_box_right">
  1547. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  1548. <div class="r_pub_button_op"
  1549. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1550. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">
  1551. {{ lang.ssIntOpt }}</div>
  1552. </el-tooltip>
  1553. <div class="r_pub_button_edit" style="margin-left:10px"
  1554. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">
  1555. {{ courseTextB ? lang.Confirm : lang.edit }}</div>
  1556. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" :active-text="lang.ssQuote"
  1557. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1558. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1559. </div>
  1560. </div>
  1561. </div>
  1562. </div>
  1563. </div>
  1564. </div>
  1565. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1566. :element-loading-text="lang.xiaokeloading" v-if="(isuseT === 1)">
  1567. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1568. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1569. {{ lang.ssCourseOver }}<span class="inter_setting" @click="openInterPanSetting"></span>
  1570. <div class="inter_setting_panel" v-show="interSetting">
  1571. <div class="panel_title">{{ lang.ssConfigWF }}</div>
  1572. <div class="panel_tips">{{ lang.ssWorkflowTip }}</div>
  1573. <div class="panel_input">
  1574. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : lang.ssEnterAid"
  1575. class="binfo_input" v-model="agentid" />
  1576. </div>
  1577. <div class="panel_button">
  1578. <button class="c_pub_button_confirm" @click="setAgentid">{{ lang.Confirm }}</button>
  1579. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">{{ lang.ssRestore }}</button>
  1580. <button class="c_pub_button_return" @click="cancelInterSetting">{{ lang.Cancel }}</button>
  1581. </div>
  1582. </div>
  1583. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1584. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? lang.fold : lang.expand }}</button>
  1585. </div>
  1586. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1587. <div class="inter_box" v-show="interPan">
  1588. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl"
  1589. frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1590. </div>
  1591. <div style="width: calc(100%);height: 100%" class='op_task_box'
  1592. :class="{inter_Detailbox: !courseTextB && interPan}">
  1593. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1594. :placeholder="lang.EnterCourseDescription" v-if="courseTextB && interPan"
  1595. @change="textAreaChange('courseText')"></textarea>
  1596. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1597. :placeholder="lang.EnterCourseDescription" v-else-if="courseTextB && !interPan"
  1598. @change="textAreaChange('courseText')"></textarea>
  1599. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1600. :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1601. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}"
  1602. v-html="MarkdownT(courseText)" v-else></div>
  1603. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1604. <div class="op_remark"></div>
  1605. <div class="op_box_right">
  1606. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1607. <div class="r_pub_button_op"
  1608. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1609. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1610. </el-tooltip> -->
  1611. <div class="r_pub_button_edit" style="margin-left:10px"
  1612. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">
  1613. {{ courseTextB ? lang.Confirm : lang.edit }}</div>
  1614. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" :active-text="lang.ssQuote"
  1615. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1616. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1617. </div>
  1618. </div>
  1619. </div>
  1620. </div>
  1621. </div>
  1622. </div>
  1623. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}"
  1624. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2"
  1625. :element-loading-text="lang.xiaokeloading"
  1626. 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'">
  1627. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2"
  1628. @click="cancelAjax('target2')">{{ lang.stop }}</div>
  1629. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1630. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1631. {{ lang.ssCourseObj }}
  1632. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1633. {{ lang.ssUploadSup }}
  1634. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1635. style="display: none" v-if="inputShow" @change="
  1636. beforeUploadInfo2(
  1637. $event,
  1638. 16
  1639. )
  1640. " />
  1641. </button>
  1642. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom" v-show="false">
  1643. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1644. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1645. @click="openAiDialog(2, 'aitargetTextDetail2',1)">{{ lang.ssGenObj2 }}</button>
  1646. </el-tooltip>
  1647. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  1648. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1649. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1650. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')"
  1651. ref="aitargetTextDetail3">{{ lang.ssGenObj }}</button>
  1652. </el-tooltip>
  1653. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1654. <div class="add_chapters_box add_c_none" v-if="
  1655. mubiaoInfoData &&
  1656. mubiaoInfoData.length == 0
  1657. ">
  1658. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1659. <span>{{ lang.ssNoContentL }}</span>
  1660. </div>
  1661. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1662. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1663. getChapterData(
  1664. $event,
  1665. index1,
  1666. item1.type
  1667. )
  1668. ">
  1669. <div class="chapter_upload_o" style="
  1670. position: relative;
  1671. display: flex;
  1672. align-items: center;
  1673. ">
  1674. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1675. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1676. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1677. </div>
  1678. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1679. </div>
  1680. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1681. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1682. </div>
  1683. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1684. </div>
  1685. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1686. </div>
  1687. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1688. </div>
  1689. </div>
  1690. <div class="chapter_upload_n">
  1691. <input readonly="true" v-if="
  1692. item1.type == 2 ||
  1693. item1.type == 3 ||
  1694. item1.type == 12 ||
  1695. item1.type == 13 ||
  1696. item1.type == 7
  1697. " :placeholder="item1.name" @click.stop="
  1698. checkChpater3($event, index1, item1)
  1699. " style="
  1700. border: none;
  1701. outline: none;
  1702. width: 80%;
  1703. minwidth: 215px;
  1704. z-index: 99;
  1705. font-size: 14px;
  1706. white-space: nowrap;
  1707. overflow: hidden;
  1708. text-overflow: ellipsis;
  1709. " />
  1710. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1711. border: none;
  1712. outline: none;
  1713. width: 80%;
  1714. white-space: nowrap;
  1715. overflow: hidden;
  1716. text-overflow: ellipsis;
  1717. " readonly="true" @click="
  1718. selectAttText(index1)
  1719. " />
  1720. <input :placeholder="item1.title ? item1.title : lang.Links
  1721. " v-if="item1.type == 8" style="
  1722. border: none;
  1723. outline: none;
  1724. width: 80%;
  1725. white-space: nowrap;
  1726. overflow: hidden;
  1727. text-overflow: ellipsis;
  1728. " readonly="true" @click="selectLine(index1)" />
  1729. <input :placeholder="item1.title ? item1.title : lang.Links
  1730. " v-if="item1.type == 14" style="
  1731. border: none;
  1732. outline: none;
  1733. width: 80%;
  1734. white-space: nowrap;
  1735. overflow: hidden;
  1736. text-overflow: ellipsis;
  1737. " readonly="true" @click="
  1738. openUpdateSource(index1)
  1739. " />
  1740. </div>
  1741. <div class="chapter_upload_ic">
  1742. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1743. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1744. checkChpater3($event, index1, item1)
  1745. ">
  1746. <div></div>
  1747. </div>
  1748. <div class="chapter_upload_ic_r" @click.stop="
  1749. deletemubiaoInfoData(
  1750. $event,
  1751. index1
  1752. )
  1753. ">
  1754. <div></div>
  1755. </div>
  1756. </div>
  1757. </div>
  1758. </div>
  1759. </div>
  1760. </div>
  1761. <div v-if="
  1762. mubiaoinfoproVisible
  1763. " class="mask">
  1764. <div class="progressBox">
  1765. <div class="lbox">
  1766. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  1767. </div>
  1768. <div style="margin-bottom: 10px">
  1769. <span>{{
  1770. mubiaoinfoisFinishSize
  1771. }}</span>
  1772. /
  1773. <span>{{
  1774. mubiaoinfoisAllSize
  1775. }}</span>
  1776. </div>
  1777. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1778. ? mubiaoinfoprogress
  1779. : 0
  1780. " style="width: 80%"></el-progress> -->
  1781. </div>
  1782. </div>
  1783. </div>
  1784. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1785. <div style="width: calc(100%);" class='op_task_box'>
  1786. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  1787. v-model="targetCourseText2" :placeholder="lang.ssEnterObj" v-if="targetCourseText2B"
  1788. @change="textAreaChange('targetCourseText2')"></textarea>
  1789. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2"
  1790. v-else-if="targetTextLoading2"></div>
  1791. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1792. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1793. <div class="op_remark">{{ lang.ssOptTip }}</div>
  1794. <div class="op_box_right">
  1795. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  1796. <div class="r_pub_button_op"
  1797. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1798. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  1799. {{ lang.ssIntOpt }}</div>
  1800. </el-tooltip>
  1801. <div class="r_pub_button_edit" style="margin-left:10px"
  1802. @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  1803. {{ targetCourseText2B ? lang.Confirm : lang.edit }}</div>
  1804. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" :active-text="lang.ssQuote"
  1805. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1806. @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1807. </div>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. </div>
  1812. </div>
  1813. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1814. v-if="yiKeTemplateArray.includes(templateid)">
  1815. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1816. <div class="c_info_title">
  1817. 补充资料
  1818. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1819. </div>
  1820. <div class="buchong_box">
  1821. <span>暂时还没有内容,快去添加吧~</span>
  1822. </div>
  1823. </div> -->
  1824. <div style="position: relative;
  1825. background: #fff;
  1826. box-sizing: border-box;
  1827. padding: 1px 20px 10px;
  1828. width: 100%;
  1829. border-radius: 10px;">
  1830. <div style="
  1831. display: flex;
  1832. flex-direction: row;
  1833. justify-content: space-between;
  1834. align-items: center;
  1835. " :style="{
  1836. margin: true
  1837. ? '20px 0 10px'
  1838. : '20px 0 0',
  1839. }">
  1840. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1841. {{ lang.ssSupMat }}
  1842. <div class="add_info_box" style="margin: 0 0 0 auto">
  1843. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1844. {{ lang.ssUploadSup }}
  1845. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1846. style="display: none" v-if="inputShow" @change="
  1847. beforeUploadInfo2(
  1848. $event,
  1849. 13
  1850. )
  1851. " />
  1852. </button>
  1853. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1854. 图文
  1855. </button>
  1856. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1857. 链接
  1858. </button>
  1859. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1860. 代码
  1861. </button>
  1862. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1863. 资源
  1864. </button> -->
  1865. </div>
  1866. </div>
  1867. </div>
  1868. <div>
  1869. <div class="add_chapters_box add_c_none" v-if="
  1870. infoData &&
  1871. infoData.length == 0
  1872. ">
  1873. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1874. <span>{{ lang.ssNoContentL }}</span>
  1875. </div>
  1876. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1877. <div @dragstart="
  1878. dragStart(item1, index1, 0)
  1879. " @dragover.prevent="
  1880. dragOver(index1, 0)
  1881. " @dragend="dragEnd()" :draggable="isdrag ==
  1882. 'chapter-' + 0 + '-' + index1
  1883. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1884. getChapterData(
  1885. $event,
  1886. index1,
  1887. item1.type
  1888. )
  1889. " :class="{
  1890. dragOverTop2:
  1891. newIndex === index1 &&
  1892. typeIndex ==
  1893. 'chapter-' +
  1894. 0 +
  1895. '-' +
  1896. index1 &&
  1897. oldIndex > index1 &&
  1898. dragType == 'drag',
  1899. dragOverBottom2:
  1900. newIndex === index1 &&
  1901. typeIndex ==
  1902. 'chapter-' +
  1903. 0 +
  1904. '-' +
  1905. index1 &&
  1906. oldIndex < index1 &&
  1907. dragType == 'drag',
  1908. }">
  1909. <!-- <div @mousedown="
  1910. isdrag =
  1911. 'chapter-' + 0 + '-' + index1
  1912. " @mouseup="isdrag = ''" @touchstart="
  1913. isdrag =
  1914. 'chapter-' + 0 + '-' + index1
  1915. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1916. <div class="chapter_upload_o" style="
  1917. position: relative;
  1918. display: flex;
  1919. align-items: center;
  1920. ">
  1921. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1922. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1923. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1924. </div>
  1925. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1926. </div>
  1927. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1928. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1929. </div>
  1930. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1931. </div>
  1932. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1933. </div>
  1934. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1935. </div>
  1936. </div>
  1937. <div class="chapter_upload_n">
  1938. <input readonly="true" v-if="
  1939. item1.type == 2 ||
  1940. item1.type == 3 ||
  1941. item1.type == 12 ||
  1942. item1.type == 13 ||
  1943. item1.type == 7
  1944. " :placeholder="item1.name" @click="
  1945. updataVideoT(
  1946. $event,
  1947. index1
  1948. )
  1949. " style="
  1950. border: none;
  1951. outline: none;
  1952. width: 80%;
  1953. minwidth: 215px;
  1954. z-index: 99;
  1955. font-size: 14px;
  1956. white-space: nowrap;
  1957. overflow: hidden;
  1958. text-overflow: ellipsis;
  1959. " />
  1960. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1961. border: none;
  1962. outline: none;
  1963. width: 80%;
  1964. white-space: nowrap;
  1965. overflow: hidden;
  1966. text-overflow: ellipsis;
  1967. " readonly="true" @click="
  1968. selectAttText(index1)
  1969. " />
  1970. <input :placeholder="item1.title ? item1.title : lang.Links
  1971. " v-if="item1.type == 8" style="
  1972. border: none;
  1973. outline: none;
  1974. width: 80%;
  1975. white-space: nowrap;
  1976. overflow: hidden;
  1977. text-overflow: ellipsis;
  1978. " readonly="true" @click="selectLine(index1)" />
  1979. <input :placeholder="item1.title ? item1.title : lang.Links
  1980. " v-if="item1.type == 14" style="
  1981. border: none;
  1982. outline: none;
  1983. width: 80%;
  1984. white-space: nowrap;
  1985. overflow: hidden;
  1986. text-overflow: ellipsis;
  1987. " readonly="true" @click="
  1988. openUpdateSource(index1)
  1989. " />
  1990. </div>
  1991. <div class="chapter_upload_ic">
  1992. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1993. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1994. <div class="chapter_upload_up" @click="
  1995. upCd(
  1996. $event,
  1997. index1
  1998. )
  1999. "></div>
  2000. <div class="chapter_upload_down" @click="
  2001. downCd(
  2002. $event,
  2003. index1
  2004. )
  2005. "></div>
  2006. </div>
  2007. <div class="chapter_upload_ic_edit" v-if="
  2008. item1.type == 2 ||
  2009. item1.type == 3 ||
  2010. item1.type == 12 ||
  2011. item1.type == 13 ||
  2012. item1.type == 7
  2013. " @click.stop="
  2014. updataVideoT(
  2015. $event,
  2016. index1
  2017. )
  2018. ">
  2019. <div></div>
  2020. </div>
  2021. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2022. selectAttText(index1)
  2023. ">
  2024. <div></div>
  2025. </div>
  2026. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2027. @click="selectLine(index1)">
  2028. <div></div>
  2029. </div>
  2030. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2031. openUpdateSource(index1)
  2032. ">
  2033. <div></div>
  2034. </div> -->
  2035. <div class="chapter_upload_ic_r" @click.stop="
  2036. deleteInfoData(
  2037. $event,
  2038. index1
  2039. )
  2040. ">
  2041. <div></div>
  2042. </div>
  2043. </div>
  2044. </div>
  2045. </div>
  2046. </div>
  2047. </div>
  2048. <div v-if="
  2049. infoproVisible
  2050. " class="mask">
  2051. <div class="progressBox">
  2052. <!-- <div id="closePro" class="closeCss">
  2053. <img src="../../../../assets/icon/close.png" alt />
  2054. </div> -->
  2055. <div class="lbox">
  2056. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  2057. </div>
  2058. <div style="margin-bottom: 10px">
  2059. <span>{{
  2060. infoisFinishSize
  2061. }}M</span>
  2062. /
  2063. <span>{{
  2064. infoisAllSize
  2065. }}M</span>
  2066. </div>
  2067. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  2068. ? infoprogress
  2069. : 0
  2070. " style="width: 80%"></el-progress>
  2071. </div>
  2072. </div>
  2073. </div>
  2074. </div>
  2075. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  2076. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2077. <div class="c_info_title">
  2078. {{ lang.ssSupDesc }}
  2079. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2080. </div>
  2081. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  2082. <div style="width: calc(100%)">
  2083. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  2084. :placeholder="lang.ssEnterSupDesc"></textarea>
  2085. </div>
  2086. </div>
  2087. </div>
  2088. </div>
  2089. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2090. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  2091. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2092. <div class="c_info_title">
  2093. {{ lang.ssCourseOut }}
  2094. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom" v-if="istemplate == 1">
  2095. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2096. @contextmenu.prevent="openAiDialog(1, 'aiOutline')" @click="openAiDialog(2, 'aiOutline')"
  2097. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">{{ lang.ssGenOut }}</button>
  2098. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2099. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')" @click="openAiDialog(2, 'aiOutline2')"
  2100. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">{{ lang.ssGenOut }}</button>
  2101. </el-tooltip>
  2102. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2103. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2104. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">{{panOutline() > 0 ?
  2105. lang.ssRegenOut : lang.ssGenOut}}</button>
  2106. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2107. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2108. v-if="(templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">{{panOutline() > 0
  2109. ? lang.ssRegenOut : lang.ssGenOut}}</button>
  2110. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2111. </div>
  2112. <div class="task_outline">
  2113. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2114. <div class="outline_task">
  2115. <div class="title">{{ lang.ssTask }}{{ index + 1 }}</div>
  2116. <input type="text" :placeholder="lang.EnterTaskName" class="binfo_input" style="border-radius: 4px"
  2117. v-model="item.task" />
  2118. <div class="outline_btn">
  2119. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2120. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2121. @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)"
  2122. @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{
  2123. item.taskDetail2 ? lang.ssRegenTask : lang.ssGenTask}}</button>
  2124. </el-tooltip>
  2125. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2126. @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">{{ lang.ssAddTaskUp }}</button>
  2127. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2128. @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">{{ lang.ssAddTaskDown }}</button>
  2129. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2130. @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)"
  2131. v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">{{ lang.Delete }}</button>
  2132. </div>
  2133. </div>
  2134. <div class="outline_detail"
  2135. :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2136. v-loading="taskDetailLoading.indexOf('task-' + index) !== -1"
  2137. :element-loading-text="lang.xiaokeloading">
  2138. <div div class="c_pub_button_confirm stopBtn"
  2139. v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]"
  2140. @click="cancelAjax('outlineTask', index)">{{ lang.stop }}</div>
  2141. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2142. :placeholder="lang.entertaskdescription" v-model="item.taskDetail2" v-if="item.isTask2"
  2143. @change="textAreaChange('taskDetail2', index)"></textarea>
  2144. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2"
  2145. v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  2146. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  2147. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  2148. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2149. <div class="op_box_right">
  2150. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2151. <div class="r_pub_button_op"
  2152. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  2153. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">
  2154. {{ lang.ssIntOpt }}</div>
  2155. </el-tooltip>
  2156. <div class="r_pub_button_edit" style="margin-left:10px"
  2157. @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">
  2158. {{
  2159. item.isTask2 ? lang.Confirm : lang.edit }}</div>
  2160. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" :active-text="lang.ssQuote"
  2161. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2162. @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  2163. </div>
  2164. </div>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. </div>
  2169. </div>
  2170. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2171. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  2172. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2173. <div class="c_info_title">
  2174. {{ lang.ssCpoteGrp }}
  2175. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2176. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1
  2177. ? lang.ssRegenCpote : lang.ssGenCpote}}</button>
  2178. </div>
  2179. <div class="task_outline">
  2180. <div class="outline_detail" v-loading="cpoteLoading.cpote1" :element-loading-text="lang.xiaokeloading">
  2181. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols :placeholder="lang.ssEnterCpote"
  2182. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  2183. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1"
  2184. v-else-if="cpotetLoading.cpote1"></div>
  2185. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  2186. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  2187. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2188. <div class="op_box_right">
  2189. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2190. <div class="r_pub_button_op"
  2191. @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  2192. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">
  2193. {{ lang.ssIntOpt }}</div>
  2194. </el-tooltip>
  2195. <div class="r_pub_button_edit" style="margin-left:10px"
  2196. @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  2197. cpote.cpote1s ? lang.Confirm : lang.edit }}</div>
  2198. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" :active-text="lang.ssQuote"
  2199. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2200. @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  2201. </div>
  2202. </div>
  2203. </div>
  2204. </div>
  2205. </div>
  2206. </div>
  2207. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2208. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  2209. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2210. <div class="c_info_title">
  2211. {{ lang.ssQChain }}
  2212. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2213. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2
  2214. ? lang.ssRegenQChain : lang.ssGenQChain}}</button>
  2215. </div>
  2216. <div class="task_outline">
  2217. <div class="outline_detail" v-loading="cpoteLoading.cpote2" :element-loading-text="lang.xiaokeloading">
  2218. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols :placeholder="lang.ssEnterQChain"
  2219. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  2220. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2"
  2221. v-else-if="cpotetLoading.cpote2"></div>
  2222. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  2223. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  2224. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2225. <div class="op_box_right">
  2226. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2227. <div class="r_pub_button_op"
  2228. @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  2229. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">
  2230. {{ lang.ssIntOpt }}</div>
  2231. </el-tooltip>
  2232. <div class="r_pub_button_edit" style="margin-left:10px"
  2233. @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  2234. cpote.cpote2s ? lang.Confirm : lang.edit }}</div>
  2235. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" :active-text="lang.ssQuote"
  2236. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2237. @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  2238. </div>
  2239. </div>
  2240. </div>
  2241. </div>
  2242. </div>
  2243. </div>
  2244. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2245. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  2246. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2247. <div class="c_info_title">
  2248. {{ lang.ssTargetLay }}
  2249. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2250. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3
  2251. ? lang.ssRegenTargetLay : lang.ssGenTargetLay}}</button>
  2252. </div>
  2253. <div class="task_outline">
  2254. <div class="outline_detail" v-loading="cpoteLoading.cpote3" :element-loading-text="lang.xiaokeloading">
  2255. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols :placeholder="lang.ssEnterTargetLay"
  2256. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  2257. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3"
  2258. v-else-if="cpotetLoading.cpote3"></div>
  2259. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  2260. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  2261. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2262. <div class="op_box_right">
  2263. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2264. <div class="r_pub_button_op"
  2265. @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  2266. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">
  2267. {{ lang.ssIntOpt }}</div>
  2268. </el-tooltip>
  2269. <div class="r_pub_button_edit" style="margin-left:10px"
  2270. @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  2271. cpote.cpote3s ? lang.Confirm : lang.edit }}</div>
  2272. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" :active-text="lang.ssQuote"
  2273. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2274. @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  2275. </div>
  2276. </div>
  2277. </div>
  2278. </div>
  2279. </div>
  2280. </div>
  2281. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2282. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  2283. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2284. <div class="c_info_title">
  2285. {{ lang.ssTaskClus }}
  2286. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2287. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4
  2288. ? lang.ssRegenTaskClus : lang.ssGenTaskClus}}</button>
  2289. </div>
  2290. <div class="task_outline">
  2291. <div class="outline_detail" v-loading="cpoteLoading.cpote4" :element-loading-text="lang.xiaokeloading">
  2292. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols :placeholder="lang.ssEnterTaskClus"
  2293. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  2294. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4"
  2295. v-else-if="cpotetLoading.cpote4"></div>
  2296. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  2297. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  2298. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2299. <div class="op_box_right">
  2300. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2301. <div class="r_pub_button_op"
  2302. @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  2303. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">
  2304. {{ lang.ssIntOpt }}</div>
  2305. </el-tooltip>
  2306. <div class="r_pub_button_edit" style="margin-left:10px"
  2307. @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  2308. cpote.cpote4s ? lang.Confirm : lang.edit }}</div>
  2309. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" :active-text="lang.ssQuote"
  2310. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2311. @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  2312. </div>
  2313. </div>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. </div>
  2318. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  2319. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2320. <div class="c_info_title">
  2321. {{ lang.ssLessonPlan }}
  2322. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom"
  2323. v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  2324. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2325. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  2326. @click="openAiDialog(2, 'aiTeacher2')">{{ lang.ssGenLessonPlan }}</button>
  2327. </el-tooltip>
  2328. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2329. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)"
  2330. v-if="istemplate != 1">{{ lang.ssRegenLessonPlan }}</button>
  2331. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom"
  2332. v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  2333. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2334. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  2335. @click="openAiDialog(2, 'aiTeacher3')">{{ lang.ssGenLessonPlan }}</button>
  2336. </el-tooltip>
  2337. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2338. </div>
  2339. <div class="task_outline">
  2340. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2341. <div class="outline_task">
  2342. <div class="title">{{ lang.ssTask }}{{ index + 1 }}</div>
  2343. <input type="text" :placeholder="lang.EnterTaskName" class="binfo_input" style="border-radius: 4px"
  2344. v-model="item.task" />
  2345. </div>
  2346. <div class="outline_detail"
  2347. :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2348. v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2349. :element-loading-text="lang.xiaokeloading">
  2350. <div div class="c_pub_button_confirm stopBtn"
  2351. v-if="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2352. @click="cancelAjax('teacherDetail2', index)">{{ lang.stop }}</div>
  2353. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols :placeholder="lang.ssEnterLessonPlan"
  2354. v-model="item.taskDetail3" v-if="item.isTask3"
  2355. @change="textAreaChange('taskDetail3', index)"></textarea>
  2356. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3"
  2357. v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  2358. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  2359. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  2360. <div class="op_remark">{{ lang.ssOptTip }}</div>
  2361. <div class="op_box_right">
  2362. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2363. <div class="r_pub_button_op"
  2364. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  2365. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">
  2366. {{ lang.ssIntOpt }}</div>
  2367. </el-tooltip>
  2368. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  2369. item.isTask3 ? lang.Confirm : lang.edit }}</div>
  2370. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]"
  2371. :active-text="lang.ssQuote" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2372. @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  2373. </div>
  2374. </div>
  2375. </div>
  2376. </div>
  2377. </div>
  2378. </div>
  2379. </div>
  2380. <div class="info_btnBox3" v-if="istemplate != 1">
  2381. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2382. goTo(
  2383. '/course?userid=' +
  2384. userid +
  2385. '&oid=' +
  2386. oid +
  2387. '&org=' +
  2388. org +
  2389. '&role=' +
  2390. role
  2391. )
  2392. ">
  2393. {{ lang.BacktoCourse }}
  2394. </button>
  2395. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2396. {{ steps == 4 ? lang.BacktoCourse : lang.BackL }}
  2397. </button>
  2398. <button class="c_pub_button_confirm"
  2399. v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2400. @click="clickGenTT2">
  2401. {{isuseT === true ? lang.ssRegenOverAndTarget : lang.ssGenOver}}
  2402. </button>
  2403. <button class="c_pub_button_confirm"
  2404. v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))"
  2405. @click="clickGenTT2">
  2406. {{isuseT === true ? lang.ssRegenOver : lang.ssGenOverOnly}}
  2407. </button>
  2408. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2409. {{ lang.ssExportPlan }}
  2410. </button>
  2411. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2412. <el-tooltip effect="light" :content="lang.ssRightClick" placement="top" v-if="steps < 4">
  2413. <button class="c_pub_button_confirm" @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2414. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2415. :class="{
  2416. pub_btn_next_img: steps != 3,
  2417. pub_btn_finish_img: steps == 3,
  2418. }">
  2419. {{ steps == 3 ? lang.ConfirmUpload : !isOutline ? lang.ssGenOut : !isOutline2 ? lang.ssGenLessonPlan : lang.Next }}
  2420. </button>
  2421. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2422. :class="{
  2423. pub_btn_next_img: steps != 3,
  2424. pub_btn_finish_img: steps == 3,
  2425. }">
  2426. {{ steps == 3 ? lang.ConfirmUpload : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid ==
  2427. "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ? cpoteType < 3 ? cpoteType < 2 ? cpoteType
  2428. < 1 ? lang.ssGenCpote : lang.ssGenQChain : lang.ssGenTargetLay : lang.ssGenTaskClus : !isOutline2 ? lang.ssGenLessonPlan : lang.Next }} </button>
  2429. </el-tooltip>
  2430. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2431. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2432. pub_btn_next_img: steps != 3,
  2433. pub_btn_finish_img: steps == 3,
  2434. }">下一步2</button>
  2435. </el-tooltip> -->
  2436. </div>
  2437. </div>
  2438. <div class="rightBox" v-if="steps == 2" :style="{
  2439. height:
  2440. !isStepDisplay && !isBtnDisplay
  2441. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2442. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2443. }">
  2444. <div class="basic_box" style="
  2445. padding: 20px 30px 0px !important;
  2446. box-sizing: border-box;
  2447. height: calc(100% - 80px);
  2448. overflow: auto;
  2449. background: #fff;
  2450. ">
  2451. <!-- <div
  2452. style="
  2453. color: #b8b8b8;
  2454. background: #fff;
  2455. width: 26%;
  2456. height: 40px;
  2457. border-radius: 15px;
  2458. padding-left: 20px;
  2459. line-height: 40px;
  2460. font-size: 17px;
  2461. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2462. "
  2463. >-->
  2464. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2465. {{ lang.choosecoursetemplate }}
  2466. </div>
  2467. <div class="wordbox">
  2468. <div class="wordTeacher" @click="checkTemplate2()">
  2469. <div class="wordPic">
  2470. <img src="../../../assets/icon/new/template_none.png" alt />
  2471. </div>
  2472. <div style="
  2473. margin-top: 10px;
  2474. line-height: 19px;
  2475. overflow: hidden;
  2476. text-overflow: ellipsis;
  2477. white-space: nowrap;
  2478. padding: 0 20px;
  2479. ">
  2480. {{ lang.BlankTemplate }}
  2481. </div>
  2482. </div>
  2483. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2484. <div class="wordPic">
  2485. <img src="../../../assets/icon/new/template.png" alt />
  2486. </div>
  2487. <div style="
  2488. margin-top: 10px;
  2489. line-height: 19px;
  2490. overflow: hidden;
  2491. text-overflow: ellipsis;
  2492. white-space: nowrap;
  2493. padding: 0 20px;
  2494. ">
  2495. {{ aa.title }}
  2496. </div>
  2497. </div>
  2498. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2499. <div class="wordPic">
  2500. <img src="../../../assets/icon/new/template.png" alt />
  2501. </div>
  2502. <div style="
  2503. margin-top: 10px;
  2504. line-height: 19px;
  2505. overflow: hidden;
  2506. text-overflow: ellipsis;
  2507. white-space: nowrap;
  2508. padding: 0 20px;
  2509. ">
  2510. {{ lang.SimpleTemplate }}
  2511. </div>
  2512. </div>
  2513. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2514. <div class="wordPic">
  2515. <img src="../../../assets/icon/new/template.png" alt />
  2516. </div>
  2517. <div style="
  2518. margin-top: 10px;
  2519. line-height: 19px;
  2520. overflow: hidden;
  2521. text-overflow: ellipsis;
  2522. white-space: nowrap;
  2523. padding: 0 20px;
  2524. ">
  2525. {{ lang.IntelligentPasteMode }}
  2526. </div>
  2527. </div>
  2528. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2529. <div class="wordPic">
  2530. <img src="../../../assets/icon/wordMub.png" alt />
  2531. </div>
  2532. <div style="
  2533. margin-top: 10px;
  2534. line-height: 19px;
  2535. overflow: hidden;
  2536. text-overflow: ellipsis;
  2537. white-space: nowrap;
  2538. padding: 0 20px;
  2539. ">
  2540. 未来小学课程设计
  2541. </div>
  2542. </div> -->
  2543. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2544. <div class="wordPic">
  2545. <img src="../../../assets/icon/wordMub.png" alt />
  2546. </div>
  2547. <div style="
  2548. margin-top: 10px;
  2549. line-height: 19px;
  2550. overflow: hidden;
  2551. text-overflow: ellipsis;
  2552. white-space: nowrap;
  2553. padding: 0 20px;
  2554. ">
  2555. 我的课程
  2556. </div>
  2557. </div> -->
  2558. </div>
  2559. </div>
  2560. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2561. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2562. goTo(
  2563. '/course?userid=' +
  2564. userid +
  2565. '&oid=' +
  2566. oid +
  2567. '&org=' +
  2568. org +
  2569. '&role=' +
  2570. role
  2571. )
  2572. ">
  2573. {{ lang.BacktoCourse }}
  2574. </button>
  2575. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2576. {{ steps == 4 ? lang.BacktoCourse : lang.BackL }}
  2577. </button>
  2578. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2579. pub_btn_next_img: steps != 3,
  2580. pub_btn_finish_img: steps == 3,
  2581. }">
  2582. {{ steps == 3 ? lang.ConfirmUpload : !isOutline ? lang.ssGenOut : lang.Next }}
  2583. </button>
  2584. </div>
  2585. </div>
  2586. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2587. height:
  2588. !isStepDisplay && !isBtnDisplay
  2589. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2590. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2591. }">
  2592. <div class="rb_c_box">
  2593. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1"
  2594. :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
  2595. <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''"
  2596. style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
  2597. <img src="../../../assets/icon/course/arrow.svg">
  2598. </div>
  2599. <div class="rb_c_nav">
  2600. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow"
  2601. style="margin-left: auto">{{ lang.ssCatalog }}</span>
  2602. <!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
  2603. <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
  2604. </div>
  2605. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2606. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2607. position: istemplate == 1 ? 'sticky' : 'unset',
  2608. top: istemplate == 1 ? '0' : 'unset'
  2609. }">
  2610. <!-- <div class="navTop">辅助导航</div> -->
  2611. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2612. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2613. <div class="nt_taskBox" style="width: 100%;">
  2614. <div class="nt_taskTitle"
  2615. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2616. unitIndex + 1 }}</div>
  2617. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2618. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2619. <span>{{ unitJson[unitIndex].dyName }}</span>
  2620. </el-tooltip>
  2621. </div>
  2622. </div>
  2623. </div> -->
  2624. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2625. .taskJson" :key="tIndex" :class="{
  2626. dragOverTop:
  2627. newIndex === tIndex &&
  2628. typeIndex == 'task-' + tIndex &&
  2629. oldIndex > tIndex &&
  2630. dragType == 'task',
  2631. dragOverBottom:
  2632. newIndex === tIndex &&
  2633. typeIndex == 'task-' + tIndex &&
  2634. oldIndex < tIndex &&
  2635. dragType == 'task',
  2636. }">
  2637. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2638. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2639. class="navTask" :class="{
  2640. isNavTask:
  2641. isClickColor > 0 && isClickColor == tIndex + 1,
  2642. isNavOpen: t.toolOpen,
  2643. }">
  2644. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2645. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2646. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2647. class="chapter_upload_drag"></div>
  2648. <div class="nt_taskBox">
  2649. <div class="nt_taskTitle">{{ lang.ssTask }}{{ tIndex + 1 }}:</div>
  2650. <div class="nt_taskName">
  2651. <el-tooltip effect="light" :content="t.task ? t.task : lang.UntitledTask" placement="top">
  2652. <span>{{ t.task ? t.task : lang.UntitledTask }}</span>
  2653. </el-tooltip>
  2654. </div>
  2655. </div>
  2656. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2657. 1
  2658. ">
  2659. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2660. @click.stop="taskMove(1, tIndex)"></div>
  2661. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2662. @click.stop="taskMove(2, tIndex)"></div>
  2663. </div> -->
  2664. </div>
  2665. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2666. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2667. @click="jumpGj(tIndex, toolIndex2)">
  2668. <div class="gjCss" :class="{
  2669. isGjCss:
  2670. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2671. }">
  2672. <div>{{ lang.ssToolC }}{{ toolIndex2 + 1 }}:</div>
  2673. <div>
  2674. {{
  2675. toolsData[tool.tool[0]] &&
  2676. toolsData[tool.tool[0]].name
  2677. }}
  2678. </div>
  2679. </div>
  2680. </div>
  2681. </div>
  2682. </div>
  2683. <div>
  2684. <div @click="goToTask(unitJson[unitIndex].chapterInfo[0].taskJson.length)"
  2685. class="navTask" :class="{ isNavTask: isClickColor == unitJson[unitIndex].chapterInfo[0].taskJson.length + 1 }">
  2686. <div class="nt_taskBox" style="padding: 0 0 0 45px;">
  2687. <div class="nt_taskTitle">{{ lang.ssAttachArea }}</div>
  2688. </div>
  2689. </div>
  2690. </div>
  2691. </div>
  2692. <div class="navBottom" v-if="courseState == 1">
  2693. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2694. dragOverTop:
  2695. newIndex === stageIndex &&
  2696. typeIndex == 'Unit-' + stageIndex &&
  2697. oldIndex > stageIndex &&
  2698. dragType == 'Unit',
  2699. dragOverBottom:
  2700. newIndex === stageIndex &&
  2701. typeIndex == 'Unit-' + stageIndex &&
  2702. oldIndex < stageIndex &&
  2703. dragType == 'Unit',
  2704. }">
  2705. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2706. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2707. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2708. isNavStage: stageIndex == unitIndex,
  2709. isNavStageOpen: stage.toolOpen,
  2710. }">
  2711. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2712. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2713. class="chapter_upload_drag"></div>
  2714. <div class="nt_taskBox">
  2715. <div class="nt_taskTitle">
  2716. {{ lang.Stage.replace(/\*/g, stageIndex + 1) }}:
  2717. </div>
  2718. <div class="nt_taskName">
  2719. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : lang.Unnamedstage
  2720. " placement="top">
  2721. <span>{{
  2722. stage.dyName ? stage.dyName : lang.Unnamedstage
  2723. }}</span>
  2724. </el-tooltip>
  2725. </div>
  2726. </div>
  2727. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2728. </div>
  2729. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2730. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2731. dragOverTop:
  2732. newIndex === tIndex &&
  2733. typeIndex == 'task-' + tIndex &&
  2734. ((oldIndex > tIndex &&
  2735. stageIndex == checkUnitIndex) ||
  2736. (oldIndex == tIndex &&
  2737. stageIndex == checkUnitIndex &&
  2738. checkUnitIndex != oldUnitIndex)) &&
  2739. dragType == 'task',
  2740. dragOverBottom:
  2741. newIndex === tIndex &&
  2742. typeIndex == 'task-' + tIndex &&
  2743. oldIndex < tIndex &&
  2744. stageIndex == checkUnitIndex &&
  2745. dragType == 'task',
  2746. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2747. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2748. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2749. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2750. isNavTask:
  2751. isClickColor > 0 &&
  2752. isClickColor == tIndex + 1 &&
  2753. stageIndex == unitIndex,
  2754. isNavOpen: t.toolOpen,
  2755. }">
  2756. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2757. <div @mousedown="
  2758. isdrag = 'task-' + stageIndex + '-' + tIndex
  2759. " @mouseup="isdrag = ''" @touchstart="
  2760. isdrag = 'task-' + stageIndex + '-' + tIndex
  2761. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2762. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2763. <div class="nt_taskTitle">
  2764. {{ lang.TaskL.replace(/\*/g, tIndex + 1) }}:
  2765. </div>
  2766. <div class="nt_taskName">
  2767. <el-tooltip effect="light" :content="t.task ? t.task : lang.UntitledTask" placement="top">
  2768. <span>{{
  2769. t.task ? t.task : lang.UntitledTask
  2770. }}</span>
  2771. </el-tooltip>
  2772. </div>
  2773. </div>
  2774. </div>
  2775. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2776. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2777. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2778. <div class="gjCss" :class="{
  2779. isGjCss:
  2780. toolIndexType ==
  2781. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2782. }">
  2783. <div>{{ lang.ssToolC }}{{ toolIndex2 + 1 }}:</div>
  2784. <div>
  2785. {{
  2786. toolsData[tool.tool[0]] &&
  2787. toolsData[tool.tool[0]].name
  2788. }}
  2789. </div>
  2790. </div>
  2791. </div>
  2792. </div>
  2793. </div>
  2794. </div>
  2795. </div>
  2796. </div>
  2797. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2798. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2799. </div>
  2800. </div>
  2801. <div class="rb_c_box_right">
  2802. <div class="rb_c_box_btn" style="justify-content: flex-end">
  2803. <span class="title">{{ courseName }}</span>
  2804. <!-- <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button> -->
  2805. <button class="c_pub_button_return" v-if="steps > 1 && steps != 5 && istemplate != 1"
  2806. @click="lastSteps" style="margin-left: auto;border: none;">
  2807. {{ steps == 4 ? lang.BacktoCourse : lang.BackL }}
  2808. </button>
  2809. <button class="c_pub_button_confirm3 buttonBoxB">
  2810. <span>{{ lang.ssOneKeyGen }}</span>
  2811. <div class="buttonBox">
  2812. <div
  2813. @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">
  2814. {{ lang.ssRegenAllTask }}</div>
  2815. <div
  2816. @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2817. v-if="panTool() == 0">{{ lang.ssGenAllTool }}</div>
  2818. <div
  2819. @click="openAiDialog2(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2820. v-if="panTool() > 0">{{ lang.ssRegenAllTool }}</div>
  2821. <div @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)"
  2822. v-if="panTool() > 0">{{panTaskElist() == 0 && panEvaCont() == 0 ? lang.ssGenAllEva : lang.ssRegenAllEva}}
  2823. </div>
  2824. <!-- <div @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案
  2825. </div> -->
  2826. </div>
  2827. </button>
  2828. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button> -->
  2829. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button> -->
  2830. <!-- <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> -->
  2831. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button> -->
  2832. <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1"
  2833. @click="nextSteps">
  2834. {{ steps == 3 ? lang.ConfirmUpload : lang.Next }}
  2835. </button>
  2836. </div>
  2837. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2838. <div v-if="false" style="
  2839. display: flex;
  2840. flex-direction: row;
  2841. align-items: center;
  2842. position: sticky;
  2843. top: 0;
  2844. z-index: 99;
  2845. width: 100%;
  2846. padding: 0 20px 0 20px;
  2847. box-sizing: border-box;
  2848. background: #fff;
  2849. border-radius: 8px;
  2850. ">
  2851. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2852. <div class="cru_selectBox" :style="{
  2853. maxWidth: isPasteTask
  2854. ? 'calc(100% - 335px)'
  2855. : 'calc(100% - 190px)',
  2856. }" v-if="courseState == 1">
  2857. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2858. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2859. <!-- item.dyName ? item.dyName : -->
  2860. <span v-if="
  2861. unitJson[unitJson.length - 1].easy == 4 ||
  2862. unitJson[unitJson.length - 1].easy == 6
  2863. ">{{
  2864. item.dyName
  2865. ? item.dyName
  2866. : lang.Stage.replace(/\*/g, index + 1)
  2867. }}</span>
  2868. <span v-else>{{ lang.Stage.replace(/\*/g, index + 1) }}</span>
  2869. </div>
  2870. <div class="cru_line" :style="{
  2871. left: offsetLetfPx + 'px',
  2872. }"></div>
  2873. </div>
  2874. <div class="addStageImg" @click="addunit()" v-if="
  2875. !(unitJson[unitJson.length - 1].easy == 4) &&
  2876. !(unitJson[unitJson.length - 1].easy == 6) &&
  2877. courseState == 1
  2878. ">
  2879. <img src="../../../assets/icon/new/addStage.png" alt />
  2880. </div>
  2881. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2882. v-if="courseState == 2" style="margin: 15px 0">
  2883. {{ lang.NewStage }}
  2884. </button>
  2885. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2886. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2887. {{ lang.Stagesequence }}
  2888. </button>
  2889. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2890. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2891. {{ lang.SMARTPaste }}
  2892. </button>
  2893. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2894. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2895. }" style="padding: 0 12px">
  2896. {{ lang.SelectCourseTemplate }}
  2897. </button>
  2898. </div>
  2899. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2900. :key="index">
  2901. <div v-loading="anLoading[0]" v-if="courseState == 4" style="position: relative;
  2902. background: #fff;
  2903. box-sizing: border-box;
  2904. padding: 1px 20px 10px;
  2905. width: 100%;
  2906. border-radius: 10px;">
  2907. <div style="
  2908. display: flex;
  2909. flex-direction: row;
  2910. justify-content: space-between;
  2911. align-items: center;
  2912. " :style="{
  2913. margin: !item.taskJson[0].isFoldchapter
  2914. ? '20px 0 10px'
  2915. : '20px 0 0',
  2916. }">
  2917. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2918. {{ lang.LearningContent }}
  2919. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  2920. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2921. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2922. @click="openAiDialog2(2, 'aiTask2','all')">{{ lang.ssRegenTask }}</button>
  2923. </el-tooltip>
  2924. </div>
  2925. </div>
  2926. <div>
  2927. <div class="add_chapters_box add_c_none" v-if="
  2928. item.taskJson[0].chapterData &&
  2929. item.taskJson[0].chapterData.length == 0
  2930. ">
  2931. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2932. <span>{{ lang.AddLearningContent }}</span>
  2933. </div>
  2934. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2935. <div @dragstart="
  2936. dragStart(item1, index1, 0)
  2937. " @dragover.prevent="
  2938. dragOver(index1, 0)
  2939. " @dragend="dragEnd()" :draggable="isdrag ==
  2940. 'chapter-' + 0 + '-' + index1
  2941. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2942. :key="item1.id" @click="
  2943. getChapterData(
  2944. $event,
  2945. unitIndex,
  2946. index,
  2947. index1,
  2948. item1.type
  2949. )
  2950. " :class="{
  2951. dragOverTop2:
  2952. newIndex === index1 &&
  2953. typeIndex ==
  2954. 'chapter-' +
  2955. 0 +
  2956. '-' +
  2957. index1 &&
  2958. oldIndex > index1 &&
  2959. dragType == 'drag',
  2960. dragOverBottom2:
  2961. newIndex === index1 &&
  2962. typeIndex ==
  2963. 'chapter-' +
  2964. 0 +
  2965. '-' +
  2966. index1 &&
  2967. oldIndex < index1 &&
  2968. dragType == 'drag',
  2969. }">
  2970. <div @mousedown="
  2971. isdrag =
  2972. 'chapter-' + 0 + '-' + index1
  2973. " @mouseup="isdrag = ''" @touchstart="
  2974. isdrag =
  2975. 'chapter-' + 0 + '-' + index1
  2976. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2977. <div class="chapter_upload_o" style="
  2978. position: relative;
  2979. display: flex;
  2980. align-items: center;
  2981. ">
  2982. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2983. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2984. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2985. </div>
  2986. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2987. </div>
  2988. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2989. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2990. </div>
  2991. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2992. </div>
  2993. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2994. </div>
  2995. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2996. </div>
  2997. </div>
  2998. <div class="chapter_upload_n">
  2999. <input readonly="true" v-if="
  3000. item1.type == 2 ||
  3001. item1.type == 3 ||
  3002. item1.type == 12 ||
  3003. item1.type == 13 ||
  3004. item1.type == 7
  3005. " :placeholder="item1.name" @click="
  3006. updataVideoT(
  3007. $event,
  3008. unitIndex,
  3009. 0,
  3010. index1
  3011. )
  3012. " style="
  3013. border: none;
  3014. outline: none;
  3015. width: 80%;
  3016. minwidth: 215px;
  3017. z-index: 99;
  3018. font-size: 14px;
  3019. white-space: nowrap;
  3020. overflow: hidden;
  3021. text-overflow: ellipsis;
  3022. " />
  3023. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3024. border: none;
  3025. outline: none;
  3026. width: 80%;
  3027. white-space: nowrap;
  3028. overflow: hidden;
  3029. text-overflow: ellipsis;
  3030. " readonly="true" @click="
  3031. selectAttText(0, index1)
  3032. " />
  3033. <input :placeholder="item1.title ? item1.title : lang.Links
  3034. " v-if="item1.type == 8" style="
  3035. border: none;
  3036. outline: none;
  3037. width: 80%;
  3038. white-space: nowrap;
  3039. overflow: hidden;
  3040. text-overflow: ellipsis;
  3041. " readonly="true" @click="selectLine(0, index1)" />
  3042. <input :placeholder="item1.title ? item1.title : lang.Links
  3043. " v-if="item1.type == 14" style="
  3044. border: none;
  3045. outline: none;
  3046. width: 80%;
  3047. white-space: nowrap;
  3048. overflow: hidden;
  3049. text-overflow: ellipsis;
  3050. " readonly="true" @click="
  3051. openUpdateSource(0, index1)
  3052. " />
  3053. </div>
  3054. <div class="chapter_upload_ic">
  3055. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3056. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3057. checkChpater( $event, unitIndex, 0, index1 )
  3058. ">
  3059. <div></div>
  3060. </div>
  3061. <div class="chapter_upload_ud" style="z-index: 99">
  3062. <div class="chapter_upload_up" @click="
  3063. upCd(
  3064. $event,
  3065. unitIndex,
  3066. index,
  3067. 0,
  3068. index1
  3069. )
  3070. "></div>
  3071. <div class="chapter_upload_down" @click="
  3072. downCd(
  3073. $event,
  3074. unitIndex,
  3075. index,
  3076. 0,
  3077. index1
  3078. )
  3079. "></div>
  3080. </div>
  3081. <div class="chapter_upload_ic_edit" v-if="
  3082. item1.type == 2 ||
  3083. item1.type == 3 ||
  3084. item1.type == 12 ||
  3085. item1.type == 13 ||
  3086. item1.type == 7
  3087. " @click.stop="
  3088. updataVideoT(
  3089. $event,
  3090. unitIndex,
  3091. 0,
  3092. index1
  3093. )
  3094. ">
  3095. <div></div>
  3096. </div>
  3097. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3098. selectAttText(0, index1)
  3099. ">
  3100. <div></div>
  3101. </div>
  3102. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3103. @click="selectLine(0, index1)">
  3104. <div></div>
  3105. </div>
  3106. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3107. openUpdateSource(0, index1)
  3108. ">
  3109. <div></div>
  3110. </div>
  3111. <div class="chapter_upload_ic_r" @click.stop="
  3112. deleteChapterData(
  3113. $event,
  3114. unitIndex,
  3115. index,
  3116. index1,
  3117. 0
  3118. )
  3119. ">
  3120. <div></div>
  3121. </div>
  3122. </div>
  3123. </div>
  3124. </div>
  3125. </div>
  3126. </div>
  3127. <div class="add_info_box" style="margin: 10px 0 0">
  3128. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3129. {{ lang.Files }}
  3130. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple"
  3131. @change="
  3132. beforeUpload2(
  3133. $event,
  3134. unitIndex,
  3135. 13,
  3136. 0
  3137. )
  3138. " />
  3139. </button>
  3140. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  3141. {{ lang.TextImages }}
  3142. </button>
  3143. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  3144. {{ lang.Links }}
  3145. </button>
  3146. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  3147. {{ lang.Code }}
  3148. </button>
  3149. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  3150. {{ lang.resource }}
  3151. </button>
  3152. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  3153. {{ lang.ssAIGenPPT }}
  3154. </button>
  3155. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  3156. {{ lang.ssGenLessonPlan }}
  3157. </button>
  3158. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  3159. {{ lang.ssIntSearchV }}
  3160. </button>
  3161. </div>
  3162. <div v-if="
  3163. unitJson[unitIndex].chapterInfo[0].taskJson[
  3164. 0
  3165. ].proVisible
  3166. " class="mask">
  3167. <div class="progressBox">
  3168. <!-- <div id="closePro" class="closeCss">
  3169. <img src="../../../../assets/icon/close.png" alt />
  3170. </div> -->
  3171. <div class="lbox">
  3172. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  3173. </div>
  3174. <div style="margin-bottom: 10px">
  3175. <span>{{
  3176. unitJson[unitIndex].chapterInfo[0].taskJson[
  3177. 0
  3178. ].isFinishSize
  3179. }}</span>
  3180. /
  3181. <span>{{
  3182. unitJson[unitIndex].chapterInfo[0].taskJson[
  3183. 0
  3184. ].isAllSize
  3185. }}</span>
  3186. </div>
  3187. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3188. 0
  3189. ].progress
  3190. ? unitJson[unitIndex].chapterInfo[0]
  3191. .taskJson[0].progress
  3192. : 0
  3193. " style="width: 80%"></el-progress> -->
  3194. </div>
  3195. </div>
  3196. </div>
  3197. <div class="chapter_box" v-if="courseState == 1">
  3198. <div class="chapter_contentbox">
  3199. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  3200. <div class="cc_input">
  3201. <input ref="dyInput" type="text" :placeholder="lang.enterstagetitle" class="binfo_input"
  3202. v-model="unitJson[unitIndex].dyName" />
  3203. </div>
  3204. <div class="remove" v-if="
  3205. (unitJson.length > 1 || courseState != 2) &&
  3206. !(unitJson[unitJson.length - 1].easy == 4) &&
  3207. !(unitJson[unitJson.length - 1].easy == 6)
  3208. " @click="deleteUnit(unitIndex)"></div>
  3209. </div>
  3210. </div>
  3211. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  3212. margin: 50px 0px 10px;
  3213. font-size: 1.5em;
  3214. font-weight: 700;
  3215. color: #0f7eff;
  3216. ">
  3217. 添加任务
  3218. </div> -->
  3219. <div class="taskBorder" :style="{
  3220. minHeight: unitJson[unitIndex].easy && 'unset',
  3221. borderRadius: itemTaskIndex == 0 ? '0px 0px 10px 10px' : '10px',
  3222. marginTop: itemTaskIndex == 0 ? '0' : '10px',
  3223. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  3224. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex"
  3225. v-loading="taskLoading[itemTaskIndex]" :element-loading-text="lang.xiaokeloading">
  3226. <div style="background: #fff; border-radius: 5px"
  3227. v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3228. :element-loading-text="lang.xiaokeloading">
  3229. <div class="c_pub_button_confirm stopBtn"
  3230. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3231. @click="cancelAjax('aiTaskGL1', itemTaskIndex)">{{ lang.stop }}</div>
  3232. <div class="taskTitle">
  3233. <div style="display: flex;width: 100%;justify-content: space-between;">
  3234. <span>{{ lang.ssTask }}{{ itemTaskIndex + 1 }}</span>
  3235. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3236. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  3237. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  3238. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  3239. </el-tooltip> -->
  3240. <div style="display: flex">
  3241. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  3242. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3243. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  3244. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">{{ lang.ssRegenTask }}</button>
  3245. </el-tooltip>
  3246. </div>
  3247. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3248. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3249. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  3250. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  3251. </el-tooltip> -->
  3252. </div>
  3253. </div>
  3254. <!-- padding: 20px; -->
  3255. <div v-if="unitJson[unitIndex].easy != 1">
  3256. <div :style="{
  3257. marginBottom:
  3258. unitJson[unitIndex].easy == 3 ||
  3259. (unitJson[unitIndex].easy == 5 &&
  3260. itemTask.taskType == 1)
  3261. ? '75px'
  3262. : '0',
  3263. }">
  3264. <div style="
  3265. display: flex;
  3266. margin: 0px 0 20px;
  3267. flex-direction: row;
  3268. justify-content: flex-start;
  3269. align-items: center;
  3270. ">
  3271. <div class="lineTitle">{{ lang.TaskOverview }}</div>
  3272. </div>
  3273. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  3274. flex-direction: row;
  3275. justify-content: flex-start;
  3276. align-items: center;
  3277. margin: 0;
  3278. ">
  3279. <!-- <div class="cc_title">
  3280. 任务{{ itemTaskIndex + 1 }}
  3281. </div> -->
  3282. <div class="cc_input">
  3283. <input type="text" :placeholder="lang.EnterTaskName" class="binfo_input" style="border-radius: 4px"
  3284. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3285. itemTaskIndex
  3286. ].task
  3287. " />
  3288. </div>
  3289. <div class="remove" v-if="
  3290. item.taskJson.length > 1 &&
  3291. (!unitJson[unitIndex].easy ||
  3292. unitJson[unitIndex].easy == 6)
  3293. " @click="deleteTask(itemTaskIndex)"></div>
  3294. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  3295. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  3296. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  3297. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  3298. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  3299. </div> -->
  3300. </div>
  3301. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  3302. display: flex;
  3303. margin: 20px 0;
  3304. flex-direction: row;
  3305. justify-content: flex-start;
  3306. align-items: center;
  3307. ">
  3308. <div class="lineTitle">任务描述</div>
  3309. </div> && !itemTask.isFold2-->
  3310. <div v-if="
  3311. easyArray.indexOf(unitJson[unitIndex].easy) ==
  3312. -1
  3313. " style="margin-top: 20px" class="op_task_box"
  3314. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1"
  3315. :element-loading-text="lang.xiaokeloading">
  3316. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3317. itemTaskIndex
  3318. ].taskDetail
  3319. " @change="change"></editor-bar> -->
  3320. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  3321. :placeholder="lang.entertaskdescription" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3322. itemTaskIndex
  3323. ].taskDetail
  3324. "></textarea>
  3325. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  3326. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3327. itemTaskIndex
  3328. ].taskDetail
  3329. "></textarea> -->
  3330. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  3331. <div class="op_remark">{{ lang.ssOptTip }}</div>
  3332. <div class="op_box_right">
  3333. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  3334. <div class="r_pub_button_op"
  3335. @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3336. itemTaskIndex
  3337. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)"
  3338. @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3339. itemTaskIndex
  3340. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">{{ lang.ssIntOpt }}</div>
  3341. </el-tooltip>
  3342. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]"
  3343. :active-text="lang.ssQuote" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  3344. @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  3345. </div>
  3346. </div>
  3347. </div>
  3348. </div>
  3349. </div>
  3350. <div v-loading="anLoading[itemTaskIndex]" style="position: relative" v-if="courseState == 5">
  3351. <div style="
  3352. display: flex;
  3353. flex-direction: row;
  3354. justify-content: space-between;
  3355. align-items: center;
  3356. " :style="{
  3357. margin: !itemTask.isFoldchapter
  3358. ? '20px 0 10px'
  3359. : '20px 0 0',
  3360. }">
  3361. <div style="margin-bottom: 10px" class="lineTitle clineTitle">
  3362. {{ lang.LearningContent }}
  3363. </div>
  3364. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  3365. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  3366. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  3367. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  3368. <!-- <div class="line"></div> -->
  3369. </div>
  3370. <!-- v-if="!itemTask.isFoldchapter" -->
  3371. <div>
  3372. <div class="add_chapters_box add_c_none" v-if="
  3373. itemTask.chapterData &&
  3374. itemTask.chapterData.length == 0
  3375. ">
  3376. <!-- <img
  3377. src="../../../assets/icon/new/c_none.png"
  3378. alt
  3379. /> -->
  3380. <span>{{ lang.AddLearningContent }}</span>
  3381. </div>
  3382. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3383. <div @dragstart="
  3384. dragStart(item1, index1, itemTaskIndex)
  3385. " @dragover.prevent="
  3386. dragOver(index1, itemTaskIndex)
  3387. " @dragend="dragEnd()" :draggable="
  3388. isdrag ==
  3389. 'chapter-' + itemTaskIndex + '-' + index1
  3390. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3391. :key="item1.id" @click="
  3392. getChapterData(
  3393. $event,
  3394. unitIndex,
  3395. index,
  3396. index1,
  3397. item1.type
  3398. )
  3399. " :class="{
  3400. dragOverTop2:
  3401. newIndex === index1 &&
  3402. typeIndex ==
  3403. 'chapter-' +
  3404. itemTaskIndex +
  3405. '-' +
  3406. index1 &&
  3407. oldIndex > index1 &&
  3408. dragType == 'drag',
  3409. dragOverBottom2:
  3410. newIndex === index1 &&
  3411. typeIndex ==
  3412. 'chapter-' +
  3413. itemTaskIndex +
  3414. '-' +
  3415. index1 &&
  3416. oldIndex < index1 &&
  3417. dragType == 'drag',
  3418. }">
  3419. <div @mousedown="
  3420. isdrag =
  3421. 'chapter-' + itemTaskIndex + '-' + index1
  3422. " @mouseup="isdrag = ''" @touchstart="
  3423. isdrag =
  3424. 'chapter-' + itemTaskIndex + '-' + index1
  3425. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3426. <div class="chapter_upload_o" style="
  3427. position: relative;
  3428. display: flex;
  3429. align-items: center;
  3430. ">
  3431. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3432. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3433. <div v-if="item1.type == 3 || item1.type == 16" class="chapter_upload_l_i3" style="margin-left: 1px">
  3434. </div>
  3435. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3436. </div>
  3437. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3438. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3439. </div>
  3440. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3441. </div>
  3442. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3443. </div>
  3444. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3445. </div>
  3446. <div
  3447. v-if="item1.type == 15"
  3448. class="chapter_upload_l_i15"
  3449. style="margin-left: 1px"
  3450. ></div>
  3451. <div
  3452. v-if="item1.type == 17"
  3453. class="chapter_upload_l_i8"
  3454. style="margin-left: 1px"
  3455. ></div>
  3456. </div>
  3457. <div class="chapter_upload_n">
  3458. <input
  3459. readonly="true"
  3460. v-if="
  3461. item1.type == 16
  3462. "
  3463. :placeholder="item1.name"
  3464. @click="
  3465. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3466. "
  3467. style="
  3468. border: none;
  3469. outline: none;
  3470. width: 80%;
  3471. minwidth: 215px;
  3472. z-index: 99;
  3473. font-size: 14px;
  3474. white-space: nowrap;
  3475. overflow: hidden;
  3476. text-overflow: ellipsis;
  3477. "
  3478. />
  3479. <input readonly="true" v-if="
  3480. item1.type == 2 ||
  3481. item1.type == 3 ||
  3482. item1.type == 12 ||
  3483. item1.type == 13 ||
  3484. item1.type == 7
  3485. " :placeholder="item1.name" @click="
  3486. updataVideoT(
  3487. $event,
  3488. unitIndex,
  3489. itemTaskIndex,
  3490. index1
  3491. )
  3492. " style="
  3493. border: none;
  3494. outline: none;
  3495. width: 80%;
  3496. minwidth: 215px;
  3497. z-index: 99;
  3498. font-size: 14px;
  3499. white-space: nowrap;
  3500. overflow: hidden;
  3501. text-overflow: ellipsis;
  3502. " />
  3503. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3504. border: none;
  3505. outline: none;
  3506. width: 80%;
  3507. white-space: nowrap;
  3508. overflow: hidden;
  3509. text-overflow: ellipsis;
  3510. " readonly="true" @click="
  3511. selectAttText(itemTaskIndex, index1)
  3512. " />
  3513. <input :placeholder="
  3514. item1.title ? item1.title : lang.Links
  3515. " v-if="item1.type == 8" style="
  3516. border: none;
  3517. outline: none;
  3518. width: 80%;
  3519. white-space: nowrap;
  3520. overflow: hidden;
  3521. text-overflow: ellipsis;
  3522. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3523. <input
  3524. :placeholder="
  3525. item1.title ? item1.title : lang.Codeupload
  3526. "
  3527. v-if="item1.type == 17"
  3528. style="
  3529. border: none;
  3530. outline: none;
  3531. width: 80%;
  3532. white-space: nowrap;
  3533. overflow: hidden;
  3534. text-overflow: ellipsis;
  3535. "
  3536. readonly="true"
  3537. @click="changeHTmlPage(itemTaskIndex, index1)"
  3538. />
  3539. <input :placeholder="
  3540. item1.title ? item1.title : lang.Links
  3541. " v-if="item1.type == 14" style="
  3542. border: none;
  3543. outline: none;
  3544. width: 80%;
  3545. white-space: nowrap;
  3546. overflow: hidden;
  3547. text-overflow: ellipsis;
  3548. " readonly="true" @click="
  3549. openUpdateSource(itemTaskIndex, index1)
  3550. " />
  3551. <input
  3552. :placeholder="
  3553. item1.title ? item1.title : lang.ssAiApp
  3554. "
  3555. v-if="item1.type == 15"
  3556. style="
  3557. border: none;
  3558. outline: none;
  3559. width: 80%;
  3560. white-space: nowrap;
  3561. overflow: hidden;
  3562. text-overflow: ellipsis;
  3563. "
  3564. readonly="true"
  3565. @click="selectLine(0, index1)"
  3566. />
  3567. </div>
  3568. <div class="chapter_upload_ic">
  3569. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3570. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3571. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3572. ">
  3573. <div></div>
  3574. </div>
  3575. <div class="chapter_upload_ud" style="z-index: 99">
  3576. <div class="chapter_upload_up" @click="
  3577. upCd(
  3578. $event,
  3579. unitIndex,
  3580. index,
  3581. itemTaskIndex,
  3582. index1
  3583. )
  3584. "></div>
  3585. <div class="chapter_upload_down" @click="
  3586. downCd(
  3587. $event,
  3588. unitIndex,
  3589. index,
  3590. itemTaskIndex,
  3591. index1
  3592. )
  3593. "></div>
  3594. </div>
  3595. <div class="chapter_upload_ic_edit" v-if="
  3596. item1.type == 2 ||
  3597. item1.type == 3 ||
  3598. item1.type == 12 ||
  3599. item1.type == 13 ||
  3600. item1.type == 7
  3601. " @click.stop="
  3602. updataVideoT(
  3603. $event,
  3604. unitIndex,
  3605. itemTaskIndex,
  3606. index1
  3607. )
  3608. ">
  3609. <div></div>
  3610. </div>
  3611. <div
  3612. class="chapter_upload_ic_edit"
  3613. v-if="
  3614. item1.type == 16
  3615. "
  3616. @click.stop="
  3617. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3618. "
  3619. >
  3620. <div></div>
  3621. </div>
  3622. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3623. selectAttText(itemTaskIndex, index1)
  3624. ">
  3625. <div></div>
  3626. </div>
  3627. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type==15"
  3628. @click="selectLine(itemTaskIndex, index1)">
  3629. <div></div>
  3630. </div>
  3631. <div
  3632. class="chapter_upload_ic_edit"
  3633. v-if="item1.type == 17"
  3634. @click="changeHTmlPage(itemTaskIndex, index1)"
  3635. >
  3636. <div></div>
  3637. </div>
  3638. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3639. openUpdateSource(itemTaskIndex, index1)
  3640. ">
  3641. <div></div>
  3642. </div>
  3643. <div class="chapter_upload_ic_r" @click.stop="
  3644. deleteChapterData(
  3645. $event,
  3646. unitIndex,
  3647. index,
  3648. index1,
  3649. itemTaskIndex
  3650. )
  3651. ">
  3652. <div></div>
  3653. </div>
  3654. </div>
  3655. </div>
  3656. </div>
  3657. </div>
  3658. </div>
  3659. <!-- v-if="!itemTask.isFoldchapter" -->
  3660. <div class="add_info_box" style="margin: 10px 0 0">
  3661. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3662. {{ lang.Files }}
  3663. <input type="file" accept="*" style="display: none" multiple="multiple" v-if="inputShow"
  3664. @change="
  3665. beforeUpload2(
  3666. $event,
  3667. unitIndex,
  3668. 13,
  3669. itemTaskIndex
  3670. )
  3671. " />
  3672. </button>
  3673. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(itemTaskIndex)">
  3674. {{ lang.TextImages }}
  3675. </button>
  3676. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(itemTaskIndex)">
  3677. {{ lang.Links }}
  3678. </button>
  3679. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(itemTaskIndex)">
  3680. {{ lang.Code }}
  3681. </button>
  3682. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(itemTaskIndex)">
  3683. {{ lang.resource }}
  3684. </button>
  3685. <button class="c_pub_button_add pub_btn_add_img"
  3686. @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3687. {{ lang.ssAIGenPPT }}
  3688. </button>
  3689. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3690. AI生成教案
  3691. </button> -->
  3692. <button class="c_pub_button_add pub_btn_add_img"
  3693. @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3694. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? lang.ssStopGenPlanL :
  3695. lang.ssAIGenPlan}}
  3696. </button>
  3697. <button class="c_pub_button_add pub_btn_add_img"
  3698. @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3699. {{ lang.ssIntSearchV }}
  3700. </button>
  3701. <button
  3702. class="c_pub_button_add pub_btn_add_img"
  3703. @click="openAddApp(itemTaskIndex)"
  3704. >
  3705. {{ lang.Intelligentapplication }}
  3706. </button>
  3707. <button
  3708. class="c_pub_button_add pub_btn_add_img"
  3709. @click="openCodeEditor(0,'',unitIndex,itemTaskIndex ,'')"
  3710. >
  3711. {{ lang.CodeEditor }}
  3712. </button>
  3713. <button
  3714. class="c_pub_button_add pub_btn_add_img"
  3715. @click="uploadZIPFile(itemTaskIndex)"
  3716. >
  3717. {{ lang.Codeupload }}
  3718. </button>
  3719. </div>
  3720. <div v-if="
  3721. unitJson[unitIndex].chapterInfo[0].taskJson[
  3722. itemTaskIndex
  3723. ].proVisible
  3724. " class="mask">
  3725. <div class="progressBox">
  3726. <!-- <div id="closePro" class="closeCss">
  3727. <img src="../../../../assets/icon/close.png" alt />
  3728. </div> -->
  3729. <div class="lbox">
  3730. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  3731. </div>
  3732. <div style="margin-bottom: 10px">
  3733. <span>{{
  3734. unitJson[unitIndex].chapterInfo[0].taskJson[
  3735. itemTaskIndex
  3736. ].isFinishSize
  3737. }}</span>
  3738. /
  3739. <span>{{
  3740. unitJson[unitIndex].chapterInfo[0].taskJson[
  3741. itemTaskIndex
  3742. ].isAllSize
  3743. }}</span>
  3744. </div>
  3745. <!-- <el-progress
  3746. :text-inside="true"
  3747. :stroke-width="20"
  3748. :percentage="
  3749. unitJson[unitIndex].chapterInfo[0].taskJson[
  3750. itemTaskIndex
  3751. ].progress
  3752. ? unitJson[unitIndex].chapterInfo[0]
  3753. .taskJson[itemTaskIndex].progress
  3754. : 0
  3755. "
  3756. style="width: 80%"
  3757. ></el-progress> -->
  3758. </div>
  3759. </div>
  3760. </div>
  3761. <div v-if="
  3762. unitJson[unitIndex].easy == 1 ||
  3763. (unitJson[unitIndex].easy == 5 &&
  3764. itemTask.taskType == 2)
  3765. ">
  3766. <div>
  3767. <div class="add_chapters_box add_c_none" v-if="
  3768. itemTask.chapterData &&
  3769. itemTask.chapterData.length == 0
  3770. ">
  3771. <img src="../../../assets/icon/new/c_none.png" alt />
  3772. </div>
  3773. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3774. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3775. dragOver(index1, itemTaskIndex)
  3776. " @dragend="dragEnd()" :draggable="isdrag ==
  3777. 'chapter-' + itemTaskIndex + '-' + index1
  3778. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3779. :key="item1.id" @click="
  3780. getChapterData(
  3781. $event,
  3782. unitIndex,
  3783. index,
  3784. index1,
  3785. item1.type
  3786. )
  3787. " :class="{
  3788. dragOverTop2:
  3789. newIndex === index1 &&
  3790. typeIndex ==
  3791. 'chapter-' +
  3792. itemTaskIndex +
  3793. '-' +
  3794. index1 &&
  3795. oldIndex > index1,
  3796. dragOverBottom2:
  3797. newIndex === index1 &&
  3798. typeIndex ==
  3799. 'chapter-' +
  3800. itemTaskIndex +
  3801. '-' +
  3802. index1 &&
  3803. oldIndex < index1,
  3804. }">
  3805. <div @mousedown="
  3806. isdrag =
  3807. 'chapter-' + itemTaskIndex + '-' + index1
  3808. " @mouseup="isdrag = ''" @touchstart="
  3809. isdrag =
  3810. 'chapter-' + itemTaskIndex + '-' + index1
  3811. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3812. <div class="chapter_upload_t" style="width: 100%"></div>
  3813. <div class="chapter_upload_o" style="
  3814. position: relative;
  3815. display: flex;
  3816. align-items: center;
  3817. ">
  3818. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3819. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3820. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3821. </div>
  3822. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3823. </div>
  3824. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3825. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3826. </div>
  3827. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3828. </div>
  3829. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3830. </div>
  3831. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3832. </div>
  3833. <div
  3834. v-if="item1.type == 15"
  3835. class="chapter_upload_l_i15"
  3836. style="margin-left: 1px"
  3837. ></div>
  3838. <div
  3839. v-if="item1.type == 17"
  3840. class="chapter_upload_l_i8"
  3841. style="margin-left: 1px"
  3842. ></div>
  3843. </div>
  3844. <div class="chapter_upload_n">
  3845. <span style="
  3846. font-size: 14px;
  3847. color: rgb(109, 109, 109);
  3848. height: 14px;
  3849. line-height: 14px;
  3850. " v-if="
  3851. item1.type == 2 ||
  3852. item1.type == 3 ||
  3853. item1.type == 7
  3854. ">{{ item1.text }}-</span>
  3855. <input readonly="true" v-if="
  3856. item1.type == 2 ||
  3857. item1.type == 3 ||
  3858. item1.type == 7
  3859. " :placeholder="item1.name" @click="
  3860. updataVideoT(
  3861. $event,
  3862. unitIndex,
  3863. itemTaskIndex,
  3864. index1
  3865. )
  3866. " style="
  3867. border: none;
  3868. outline: none;
  3869. width: 80%;
  3870. minwidth: 215px;
  3871. z-index: 99;
  3872. font-size: 14px;
  3873. white-space: nowrap;
  3874. overflow: hidden;
  3875. text-overflow: ellipsis;
  3876. " />
  3877. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3878. border: none;
  3879. outline: none;
  3880. width: 80%;
  3881. white-space: nowrap;
  3882. overflow: hidden;
  3883. text-overflow: ellipsis;
  3884. " readonly="true" @click="
  3885. selectAttText(itemTaskIndex, index1)
  3886. " />
  3887. <input :placeholder="item1.title ? item1.title : lang.Links
  3888. " v-if="item1.type == 8 || item1.type == 14" style="
  3889. border: none;
  3890. outline: none;
  3891. width: 80%;
  3892. white-space: nowrap;
  3893. overflow: hidden;
  3894. text-overflow: ellipsis;
  3895. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3896. <input
  3897. :placeholder="
  3898. item1.title ? item1.title : lang.Codeupload
  3899. "
  3900. v-if="item1.type == 17"
  3901. style="
  3902. border: none;
  3903. outline: none;
  3904. width: 80%;
  3905. white-space: nowrap;
  3906. overflow: hidden;
  3907. text-overflow: ellipsis;
  3908. "
  3909. readonly="true"
  3910. @click="changeHTmlPage(itemTaskIndex, index1)"
  3911. />
  3912. <input
  3913. :placeholder="
  3914. item1.title ? item1.title : lang.ssAiApp
  3915. "
  3916. v-if="item1.type == 15"
  3917. style="
  3918. border: none;
  3919. outline: none;
  3920. width: 80%;
  3921. white-space: nowrap;
  3922. overflow: hidden;
  3923. text-overflow: ellipsis;
  3924. "
  3925. readonly="true"
  3926. @click="selectLine(0, index1)"
  3927. />
  3928. </div>
  3929. <div class="chapter_upload_ic">
  3930. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3931. <div class="chapter_upload_ud" style="z-index: 99">
  3932. <div class="chapter_upload_up" @click="
  3933. upCd(
  3934. $event,
  3935. unitIndex,
  3936. index,
  3937. itemTaskIndex,
  3938. index1
  3939. )
  3940. "></div>
  3941. <div class="chapter_upload_down" @click="
  3942. downCd(
  3943. $event,
  3944. unitIndex,
  3945. index,
  3946. itemTaskIndex,
  3947. index1
  3948. )
  3949. "></div>
  3950. </div>
  3951. <div class="chapter_upload_ic_edit" v-if="
  3952. item1.type == 2 ||
  3953. item1.type == 3 ||
  3954. item1.type == 12 ||
  3955. item1.type == 13 ||
  3956. item1.type == 7
  3957. " @click.stop="
  3958. updataVideoT(
  3959. $event,
  3960. unitIndex,
  3961. itemTaskIndex,
  3962. index1
  3963. )
  3964. ">
  3965. <div></div>
  3966. </div>
  3967. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3968. selectAttText(itemTaskIndex, index1)
  3969. ">
  3970. <div></div>
  3971. </div>
  3972. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type == 15"
  3973. @click="selectLine(itemTaskIndex, index1)">
  3974. <div></div>
  3975. </div>
  3976. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3977. openUpdateSource(itemTaskIndex, index1)
  3978. ">
  3979. <div></div>
  3980. </div>
  3981. <div class="chapter_upload_ic_r" @click.stop="
  3982. deleteChapterData(
  3983. $event,
  3984. unitIndex,
  3985. index,
  3986. index1,
  3987. itemTaskIndex
  3988. )
  3989. ">
  3990. <div></div>
  3991. </div>
  3992. </div>
  3993. </div>
  3994. </div>
  3995. </div>
  3996. </div>
  3997. <div class="add_info_box" style="margin: 10px 0 0">
  3998. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3999. <span style="color: red">*</span>
  4000. {{ lang.instructionaldesign }}
  4001. <input type="file"
  4002. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4003. style="display: none" v-if="inputShow" @change="
  4004. beforeUpload3(
  4005. $event,
  4006. unitIndex,
  4007. 3,
  4008. itemTaskIndex,
  4009. lang.instructionaldesign
  4010. )
  4011. " />
  4012. </button>
  4013. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4014. <span style="color: red">*</span>
  4015. {{ lang.Teachingcourseware }}
  4016. <input type="file"
  4017. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4018. style="display: none" v-if="inputShow" @change="
  4019. beforeUpload3(
  4020. $event,
  4021. unitIndex,
  4022. 3,
  4023. itemTaskIndex,
  4024. lang.Teachingcourseware
  4025. )
  4026. " />
  4027. </button>
  4028. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4029. {{ lang.Teachingvideos }}
  4030. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  4031. style="display: none" v-if="inputShow" @change="
  4032. beforeUpload3(
  4033. $event,
  4034. unitIndex,
  4035. 2,
  4036. itemTaskIndex,
  4037. lang.Teachingvideos
  4038. )
  4039. " />
  4040. </button>
  4041. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4042. {{ lang.Teachingaudio }}
  4043. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  4044. beforeUpload3(
  4045. $event,
  4046. unitIndex,
  4047. 2,
  4048. itemTaskIndex,
  4049. lang.Teachingaudio
  4050. )
  4051. " />
  4052. </button>
  4053. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4054. {{ lang.worksheet }}
  4055. <input type="file"
  4056. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4057. style="display: none" v-if="inputShow" @change="
  4058. beforeUpload3(
  4059. $event,
  4060. unitIndex,
  4061. 3,
  4062. itemTaskIndex,
  4063. lang.worksheet
  4064. )
  4065. " />
  4066. </button>
  4067. </div>
  4068. <div v-if="
  4069. unitJson[unitIndex].chapterInfo[0].taskJson[
  4070. itemTaskIndex
  4071. ].proVisible
  4072. " class="mask">
  4073. <div class="progressBox">
  4074. <!-- <div id="closePro" class="closeCss">
  4075. <img src="../../../../assets/icon/close.png" alt />
  4076. </div> -->
  4077. <div class="lbox">
  4078. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  4079. </div>
  4080. <div style="margin-bottom: 10px">
  4081. <span>{{
  4082. unitJson[unitIndex].chapterInfo[0].taskJson[
  4083. itemTaskIndex
  4084. ].isFinishSize
  4085. }}M</span>
  4086. /
  4087. <span>{{
  4088. unitJson[unitIndex].chapterInfo[0].taskJson[
  4089. itemTaskIndex
  4090. ].isAllSize
  4091. }}M</span>
  4092. </div>
  4093. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  4094. itemTaskIndex
  4095. ].progress
  4096. ? unitJson[unitIndex].chapterInfo[0]
  4097. .taskJson[itemTaskIndex].progress
  4098. : 0
  4099. " style="width: 80%"></el-progress>
  4100. </div>
  4101. </div>
  4102. </div>
  4103. </div>
  4104. <!-- padding: 20px; -->
  4105. <div style="
  4106. background: #fff;
  4107. border-radius: 5px;
  4108. margin-top: 15px;
  4109. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  4110. <div v-if="
  4111. unitJson[unitIndex].easy == 6 ||
  4112. !unitJson[unitIndex].easy
  4113. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4114. :element-loading-text="lang.xiaokeloading">
  4115. <div class="c_pub_button_confirm stopBtn"
  4116. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4117. @click="cancelAjax('aiTaskGL2', itemTaskIndex)">{{ lang.stop }}</div>
  4118. <div style="width: 100%">
  4119. <div style="
  4120. display: flex;
  4121. flex-direction: row;
  4122. align-items: center;
  4123. margin: 5px 0 20px;
  4124. width: 100%
  4125. ">
  4126. <div class="lineTitle clineTitle" style="width: 100%">
  4127. <span>{{ lang.Practicecontent }}</span>
  4128. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  4129. <div class="r_pub_button_op" style="margin-left:auto;"
  4130. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  4131. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ?
  4132. lang.ssRegenTool : lang.ssGenTool }}</div>
  4133. </el-tooltip>
  4134. <div class="r_pub_button_op" style="margin-left:10px;" @click="allEvaCan2(itemTaskIndex)" v-if="panDanTool(itemTask) > 0">{{ panDanToolEva(itemTask) > 0 ?
  4135. lang.ssRegenToolEva : lang.ssGenToolEva }}</div>
  4136. </div>
  4137. <!-- <div class="line" style="width: 90%"></div> -->
  4138. </div>
  4139. </div>
  4140. <div class="tools">
  4141. <div class="leftTools" style="width: 100%" v-for="(
  4142. itemTool, toolIndex
  4143. ) in itemTask.toolChoose" :key="toolIndex">
  4144. <div style="
  4145. display: flex;
  4146. flex-direction: row;
  4147. align-items: baseline;
  4148. flex-wrap: nowrap;
  4149. justify-content: flex-start;
  4150. position: relative;
  4151. ">
  4152. <div style="margin-right: 20px; font-weight: bold"
  4153. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4154. {{ lang.ToolL.replace(/\*/g, toolIndex + 1) }} :
  4155. </div>
  4156. <div class="chooseWho">
  4157. <div :class="itemTool.toolType == 0
  4158. ? 'isChooseActive'
  4159. : ''
  4160. " @click="
  4161. (itemTool.toolType = 0),
  4162. (itemTool.isFold3 = false),
  4163. $forceUpdate()
  4164. ">
  4165. {{ lang.Interactive }}
  4166. </div>
  4167. <div :class="itemTool.toolType == 1
  4168. ? 'isChooseActive'
  4169. : ''
  4170. " @click="
  4171. (itemTool.toolType = 1),
  4172. (itemTool.isFold3 = false),
  4173. $forceUpdate()
  4174. ">
  4175. {{ lang.Cognitive }}
  4176. </div>
  4177. <div :class="itemTool.toolType == 6
  4178. ? 'isChooseActive'
  4179. : ''
  4180. " @click="
  4181. (itemTool.toolType = 6),
  4182. (itemTool.isFold3 = false),
  4183. $forceUpdate()
  4184. ">
  4185. {{ lang.Collaborative }}
  4186. </div>
  4187. <div :class="itemTool.toolType == 2
  4188. ? 'isChooseActive'
  4189. : ''
  4190. " @click="
  4191. (itemTool.toolType = 2),
  4192. (itemTool.isFold3 = false),
  4193. $forceUpdate()
  4194. ">
  4195. {{ lang.Assessment }}
  4196. </div>
  4197. <div :class="itemTool.toolType == 7
  4198. ? 'isChooseActive'
  4199. : ''
  4200. " @click="
  4201. (itemTool.toolType = 7),
  4202. (itemTool.isFold3 = false),
  4203. $forceUpdate()
  4204. ">
  4205. {{ lang.Evaluation }}
  4206. </div>
  4207. <div :class="itemTool.toolType == 3
  4208. ? 'isChooseActive'
  4209. : ''
  4210. " @click="
  4211. (itemTool.toolType = 3),
  4212. (itemTool.isFold3 = false),
  4213. $forceUpdate()
  4214. ">
  4215. {{ lang.Programming }}
  4216. </div>
  4217. <div :class="itemTool.toolType == 5
  4218. ? 'isChooseActive'
  4219. : ''
  4220. " @click="
  4221. (itemTool.toolType = 5),
  4222. (itemTool.isFold3 = false),
  4223. $forceUpdate()
  4224. ">
  4225. {{ lang.SubjectSpecific }}
  4226. </div>
  4227. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  4228. " @click="(itemTool.toolType = 4), $forceUpdate()">
  4229. 其他
  4230. </div> -->
  4231. </div>
  4232. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  4233. margin:
  4234. itemTask.toolChoose.length > 1
  4235. ? '0px 35px 0px auto'
  4236. : '0 0 0 auto',
  4237. }" v-if="itemTask.toolChoose.length > 1">
  4238. <div class="chapter_upload_up2" @click.stop="
  4239. upTool(
  4240. $event,
  4241. unitIndex,
  4242. itemTaskIndex,
  4243. toolIndex
  4244. )
  4245. ">
  4246. {{ lang.Moveup }}
  4247. </div>
  4248. <div class="chapter_upload_down2" @click.stop="
  4249. downTool(
  4250. $event,
  4251. unitIndex,
  4252. itemTaskIndex,
  4253. toolIndex
  4254. )
  4255. ">
  4256. {{ lang.Movedown }}
  4257. </div>
  4258. </div>
  4259. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4260. @click="fold3(itemTaskIndex, toolIndex)"
  4261. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4262. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4263. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4264. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4265. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4266. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4267. v-if="itemTask.toolChoose.length > 1" style="
  4268. position: absolute;
  4269. right: 0;
  4270. top: -5px;
  4271. "></div>
  4272. </div>
  4273. <!-- v-show="!itemTool.isFold3" -->
  4274. <div style="min-height: 163px">
  4275. <div class="toolSort" v-if="itemTool.toolType == 0">
  4276. <!-- <div class="tool">
  4277. <div
  4278. class="whiteBIcon"
  4279. @click="addTools(8, itemTaskIndex, toolIndex)"
  4280. >
  4281. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4282. <div style="margin: 5px 0">素材库</div>
  4283. </div>
  4284. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4285. <img
  4286. src="../../../assets/icon/checkNo.png"
  4287. alt
  4288. v-if="itemTool.tool.indexOf(8) == -1"
  4289. />
  4290. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4291. alt /><span>已选择</span></div>
  4292. </div>
  4293. </div>-->
  4294. <!-- <div class="tool">
  4295. <div
  4296. class="whiteBIcon"
  4297. @click="addTools(17, itemTaskIndex, toolIndex)"
  4298. >
  4299. <img
  4300. src="../../../assets/icon/secondToolList/library.png"
  4301. alt
  4302. />
  4303. <div style="margin: 5px 0">学习资料</div>
  4304. </div>
  4305. <div
  4306. class="check"
  4307. @click="addTools(17, itemTaskIndex, toolIndex)"
  4308. >
  4309. <img
  4310. src="../../../assets/icon/checkNo.png"
  4311. alt
  4312. v-if="itemTool.tool.indexOf(17) == -1"
  4313. />
  4314. <img
  4315. src="../../../assets/icon/checkedIs.png"
  4316. alt
  4317. v-else
  4318. />
  4319. </div>10
  4320. </div> -->
  4321. <div class="tool" :class="{
  4322. isToolChoose:
  4323. itemTool.tool.indexOf(10) != -1,
  4324. }" @click="
  4325. addTools(10, itemTaskIndex, toolIndex)
  4326. ">
  4327. <div class="whiteBIcon" @click.stop="
  4328. openTools(itemTaskIndex, 10, toolIndex)
  4329. ">
  4330. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4331. <div style="margin: 5px 0">{{ lang.ssCountdown }}</div>
  4332. </div>
  4333. <div class="noCTool">
  4334. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4335. </div>
  4336. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4337. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4338. </div>
  4339. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4340. <img src="../../../assets/icon/checkNo.png" alt
  4341. v-if="itemTool.tool.indexOf(10) == -1" />
  4342. <div class="checkDiv" v-else>
  4343. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4344. </div>
  4345. </div> -->
  4346. </div>
  4347. <div class="tool" :class="{
  4348. isToolChoose:
  4349. itemTool.tool.indexOf(65) != -1,
  4350. }" @click="
  4351. addTools(65, itemTaskIndex, toolIndex)
  4352. ">
  4353. <div class="whiteBIcon" @click.stop="
  4354. addTools(65, itemTaskIndex, toolIndex)
  4355. ">
  4356. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4357. <div style="margin: 5px 0">{{ lang.ssPickPeople }}</div>
  4358. </div>
  4359. <div class="noCTool">
  4360. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4361. </div>
  4362. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4363. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4364. </div>
  4365. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4366. <img src="../../../assets/icon/checkNo.png" alt
  4367. v-if="itemTool.tool.indexOf(65) == -1" />
  4368. <div class="checkDiv" v-else>
  4369. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4370. </div>
  4371. </div> -->
  4372. </div>
  4373. <!-- <div class="tool">
  4374. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4375. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4376. <div style="margin: 5px 0">学生分组</div>
  4377. </div>
  4378. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4379. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4380. <div class="checkDiv" v-else>
  4381. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4382. </div>
  4383. </div>
  4384. </div> -->
  4385. <!-- <div class="tool">
  4386. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4387. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4388. <div style="margin: 5px 0">交互视频</div>
  4389. </div>
  4390. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4391. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4392. <div class="checkDiv" v-else>
  4393. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4394. </div>
  4395. </div>
  4396. </div> -->
  4397. <div class="tool" :class="{
  4398. isToolChoose:
  4399. itemTool.tool.indexOf(72) != -1,
  4400. }" @click="
  4401. addTools(72, itemTaskIndex, toolIndex)
  4402. ">
  4403. <div class="whiteBIcon" @click.stop="
  4404. openTools(itemTaskIndex, 72, toolIndex)
  4405. ">
  4406. <img
  4407. style="object-fit: cover;height: 60px;"
  4408. :src="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson ?
  4409. unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.json.icon :
  4410. require('../../../assets/icon/firstToolList/appStore.png')"
  4411. alt />
  4412. <div style="margin: 5px 0" >
  4413. <div
  4414. v-if="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson"
  4415. >
  4416. <el-tooltip class="item" effect="dark"
  4417. :content="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name"
  4418. placement="top">
  4419. <div class="Ovh">
  4420. {{unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name}}
  4421. </div>
  4422. </el-tooltip>
  4423. </div>
  4424. <span v-else>
  4425. {{ lang.ssAppCenter }}
  4426. </span>
  4427. </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(72) != -1">
  4433. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4434. </div>
  4435. </div>
  4436. </div>
  4437. <div class="toolSort" v-if="itemTool.toolType == 1">
  4438. <div class="tool" :class="{
  4439. isToolChoose:
  4440. itemTool.tool.indexOf(7) != -1,
  4441. }" @click="
  4442. addTools(7, itemTaskIndex, toolIndex)
  4443. ">
  4444. <div class="whiteBIcon" @click.stop="
  4445. addTools(7, itemTaskIndex, toolIndex)
  4446. ">
  4447. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4448. <div style="margin: 5px 0">{{ lang.ssMindGrid }}</div>
  4449. </div>
  4450. <div class="noCTool">
  4451. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4452. </div>
  4453. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4454. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4455. </div>
  4456. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4457. <img src="../../../assets/icon/checkNo.png" alt
  4458. v-if="itemTool.tool.indexOf(7) == -1" />
  4459. <div class="checkDiv" v-else>
  4460. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4461. </div>
  4462. </div> -->
  4463. </div>
  4464. <div class="tool" :class="{
  4465. isToolChoose:
  4466. itemTool.tool.indexOf(1) != -1,
  4467. }" @click="
  4468. addTools(1, itemTaskIndex, toolIndex)
  4469. ">
  4470. <div class="whiteBIcon" @click.stop="
  4471. openTools(itemTaskIndex, 1, toolIndex)
  4472. ">
  4473. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4474. <div style="margin: 5px 0">{{ lang.ssEWhite }}</div>
  4475. </div>
  4476. <div class="noCTool">
  4477. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4478. </div>
  4479. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4480. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4481. </div>
  4482. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4483. <img src="../../../assets/icon/checkNo.png" alt
  4484. v-if="itemTool.tool.indexOf(1) == -1" />
  4485. <div class="checkDiv" v-else>
  4486. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4487. </div>
  4488. </div> -->
  4489. </div>
  4490. <!-- <div class="tool">
  4491. <div
  4492. class="whiteBIcon"
  4493. @click="addTools(2, itemTaskIndex, toolIndex)"
  4494. >
  4495. <img
  4496. src="../../../assets/icon/secondToolList/note.png"
  4497. alt
  4498. />
  4499. <div style="margin: 5px 0">便签</div>
  4500. </div>
  4501. <div
  4502. class="check"
  4503. @click="addTools(2, itemTaskIndex, toolIndex)"
  4504. >
  4505. <img
  4506. src="../../../assets/icon/checkNo.png"
  4507. alt
  4508. v-if="itemTool.tool.indexOf(2) == -1"
  4509. />
  4510. <div class="checkDiv" v-else>
  4511. <img
  4512. src="../../../assets/icon/checkedIs.png"
  4513. alt
  4514. /><span>已选择</span>
  4515. </div>
  4516. </div>
  4517. </div> -->
  4518. <!-- <div class="tool">
  4519. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4520. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4521. <div style="margin: 5px 0">协同文档</div>
  4522. </div>
  4523. <div
  4524. class="check"
  4525. @click="addTools(6, itemTaskIndex, toolIndex)"
  4526. >
  4527. <img
  4528. src="../../../assets/icon/checkNo.png"
  4529. alt
  4530. v-if="itemTool.tool.indexOf(6) == -1"
  4531. />
  4532. <div class="checkDiv" v-else>
  4533. <img
  4534. src="../../../assets/icon/checkedIs.png"
  4535. alt
  4536. /><span>已选择</span>
  4537. </div>
  4538. </div>
  4539. </div> -->
  4540. <div class="tool" :class="{
  4541. isToolChoose:
  4542. itemTool.tool.indexOf(52) != -1,
  4543. }" @click="
  4544. addTools(52, itemTaskIndex, toolIndex)
  4545. ">
  4546. <div class="whiteBIcon" @click.stop="
  4547. openTools(itemTaskIndex, 52, toolIndex)
  4548. ">
  4549. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4550. <div style="margin: 5px 0">{{ lang.ssDocument }}</div>
  4551. </div>
  4552. <div class="noCTool">
  4553. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4554. </div>
  4555. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4556. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4557. </div>
  4558. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4559. <img src="../../../assets/icon/checkNo.png" alt
  4560. v-if="itemTool.tool.indexOf(52) == -1" />
  4561. <div class="checkDiv" v-else>
  4562. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4563. </div>
  4564. </div> -->
  4565. </div>
  4566. <div class="tool" :class="{
  4567. isToolChoose:
  4568. itemTool.tool.indexOf(3) != -1,
  4569. }" @click="
  4570. addTools(3, itemTaskIndex, toolIndex)
  4571. ">
  4572. <div class="whiteBIcon" @click.stop="
  4573. openTools(itemTaskIndex, 3, toolIndex)
  4574. ">
  4575. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4576. <div style="margin: 5px 0">{{ lang.ssMindMap }}</div>
  4577. </div>
  4578. <div class="noCTool">
  4579. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4580. </div>
  4581. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4582. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4583. </div>
  4584. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4585. <img src="../../../assets/icon/checkNo.png" alt
  4586. v-if="itemTool.tool.indexOf(3) == -1" />
  4587. <div class="checkDiv" v-else>
  4588. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4589. </div>
  4590. </div> -->
  4591. </div>
  4592. <div class="tool" :class="{
  4593. isToolChoose:
  4594. itemTool.tool.indexOf(48) != -1,
  4595. }" @click="
  4596. addTools(48, itemTaskIndex, toolIndex)
  4597. ">
  4598. <div class="whiteBIcon" @click.stop="
  4599. openTools(itemTaskIndex, 48, toolIndex)
  4600. ">
  4601. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4602. <div style="margin: 5px 0">{{ lang.ssTable }}</div>
  4603. </div>
  4604. <div class="noCTool">
  4605. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4606. </div>
  4607. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4608. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4609. </div>
  4610. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4611. <img src="../../../assets/icon/checkNo.png" alt
  4612. v-if="itemTool.tool.indexOf(48) == -1" />
  4613. <div class="checkDiv" v-else>
  4614. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4615. </div>
  4616. </div> -->
  4617. </div>
  4618. </div>
  4619. <div class="toolSort" v-if="itemTool.toolType == 6">
  4620. <div class="tool" :class="{
  4621. isToolChoose:
  4622. itemTool.tool.indexOf(49) != -1,
  4623. }" @click="
  4624. addTools(49, itemTaskIndex, toolIndex)
  4625. ">
  4626. <div class="whiteBIcon" @click.stop="
  4627. openTools(itemTaskIndex, 49, toolIndex)
  4628. ">
  4629. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4630. <div style="margin: 5px 0">{{ lang.ssStuGroup }}</div>
  4631. </div>
  4632. <div class="noCTool">
  4633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4634. </div>
  4635. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4636. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4637. </div>
  4638. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4639. <img src="../../../assets/icon/checkNo.png" alt
  4640. v-if="itemTool.tool.indexOf(49) == -1" />
  4641. <div class="checkDiv" v-else>
  4642. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4643. </div>
  4644. </div> -->
  4645. </div>
  4646. </div>
  4647. <div class="toolSort" v-if="itemTool.toolType == 2">
  4648. <!-- <div class="tool">
  4649. <div
  4650. class="whiteBIcon"
  4651. @click="addTools(5, itemTaskIndex, toolIndex)"
  4652. >
  4653. <img
  4654. src="../../../assets/icon/thirdToolList/score.png"
  4655. alt
  4656. />
  4657. <div style="margin: 5px 0">量规评分</div>
  4658. </div>
  4659. <div
  4660. class="check"
  4661. @click="addTools(5, itemTaskIndex, toolIndex)"
  4662. >
  4663. <img
  4664. src="../../../assets/icon/checkNo.png"
  4665. alt
  4666. v-if="itemTool.tool.indexOf(5) == -1"
  4667. />
  4668. <img
  4669. src="../../../assets/icon/checkedIs.png"
  4670. alt
  4671. v-else
  4672. />
  4673. </div>
  4674. </div>-->
  4675. <div class="tool" :class="{
  4676. isToolChoose:
  4677. itemTool.tool.indexOf(4) != -1,
  4678. }" @click="
  4679. addTools(4, itemTaskIndex, toolIndex)
  4680. ">
  4681. <div class="whiteBIcon" @click.stop="
  4682. openTools(itemTaskIndex, 4, toolIndex)
  4683. ">
  4684. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4685. <div style="margin: 5px 0">{{ lang.ssQuest }}</div>
  4686. </div>
  4687. <div class="noCTool">
  4688. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4689. </div>
  4690. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4691. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4692. </div>
  4693. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4694. <img src="../../../assets/icon/checkNo.png" alt
  4695. v-if="itemTool.tool.indexOf(4) == -1" />
  4696. <div class="checkDiv" v-else>
  4697. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4698. </div>
  4699. </div> -->
  4700. </div>
  4701. <div class="tool" :class="{
  4702. isToolChoose:
  4703. itemTool.tool.indexOf(45) != -1,
  4704. }" @click="
  4705. addTools(45, itemTaskIndex, toolIndex)
  4706. ">
  4707. <div class="whiteBIcon" @click="
  4708. openTools(itemTaskIndex, 45, toolIndex)
  4709. ">
  4710. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4711. <div style="margin: 5px 0">{{ lang.ssChoice }}</div>
  4712. </div>
  4713. <div class="noCTool">
  4714. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4715. </div>
  4716. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4717. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4718. </div>
  4719. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4720. <img src="../../../assets/icon/checkNo.png" alt
  4721. v-if="itemTool.tool.indexOf(45) == -1" />
  4722. <div class="checkDiv" v-else>
  4723. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4724. </div>
  4725. </div> -->
  4726. </div>
  4727. <div class="tool" :class="{
  4728. isToolChoose:
  4729. itemTool.tool.indexOf(15) != -1,
  4730. }" @click="
  4731. addTools(15, itemTaskIndex, toolIndex)
  4732. ">
  4733. <div class="whiteBIcon" @click.stop="
  4734. openTools(itemTaskIndex, 15, toolIndex)
  4735. ">
  4736. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4737. <div style="margin: 5px 0">{{ lang.ssQA }}</div>
  4738. </div>
  4739. <div class="noCTool">
  4740. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4741. </div>
  4742. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4743. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4744. </div>
  4745. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4746. <img src="../../../assets/icon/checkNo.png" alt
  4747. v-if="itemTool.tool.indexOf(15) == -1" />
  4748. <div class="checkDiv" v-else>
  4749. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4750. </div>
  4751. </div> -->
  4752. </div>
  4753. <div class="tool" :class="{
  4754. isToolChoose:
  4755. itemTool.tool.indexOf(16) != -1,
  4756. }" @click="
  4757. addTools(16, itemTaskIndex, toolIndex)
  4758. ">
  4759. <div class="whiteBIcon" @click.stop="
  4760. addTools(16, itemTaskIndex, toolIndex)
  4761. ">
  4762. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4763. <div style="margin: 5px 0">{{ lang.ssHomework }}</div>
  4764. </div>
  4765. <div class="noCTool">
  4766. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4767. </div>
  4768. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4769. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4770. </div>
  4771. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4772. <img src="../../../assets/icon/checkNo.png" alt
  4773. v-if="itemTool.tool.indexOf(16) == -1" />
  4774. <div class="checkDiv" v-else>
  4775. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4776. </div>
  4777. </div> -->
  4778. </div>
  4779. <div class="tool" :class="{
  4780. isToolChoose:
  4781. itemTool.tool.indexOf(50) != -1,
  4782. }" @click="
  4783. addTools(50, itemTaskIndex, toolIndex)
  4784. ">
  4785. <div class="whiteBIcon" @click.stop="
  4786. addTools(50, itemTaskIndex, toolIndex)
  4787. ">
  4788. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4789. <div style="margin: 5px 0">{{ lang.ssBatchUp }}</div>
  4790. </div>
  4791. <div class="noCTool">
  4792. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4793. </div>
  4794. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4795. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4796. </div>
  4797. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4798. <img src="../../../assets/icon/checkNo.png" alt
  4799. v-if="itemTool.tool.indexOf(50) == -1" />
  4800. <div class="checkDiv" v-else>
  4801. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4802. </div>
  4803. </div> -->
  4804. </div>
  4805. <!-- <div class="tool">
  4806. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4807. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4808. <div style="margin: 5px 0">个人评价</div>
  4809. </div>
  4810. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4811. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4812. <div class="checkDiv" v-else>
  4813. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4814. </div>
  4815. </div>
  4816. </div> -->
  4817. <div class="tool" :class="{
  4818. isToolChoose:
  4819. itemTool.tool.indexOf(41) != -1,
  4820. }" @click="
  4821. addTools(41, itemTaskIndex, toolIndex)
  4822. ">
  4823. <div class="whiteBIcon" @click.stop="
  4824. openTools(itemTaskIndex, 41, toolIndex)
  4825. ">
  4826. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4827. <div style="margin: 5px 0">{{ lang.ssSelMatch }}</div>
  4828. </div>
  4829. <div class="noCTool">
  4830. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4831. </div>
  4832. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4833. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4834. </div>
  4835. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4836. <img src="../../../assets/icon/checkNo.png" alt
  4837. v-if="itemTool.tool.indexOf(41) == -1" />
  4838. <div class="checkDiv" v-else>
  4839. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4840. </div>
  4841. </div> -->
  4842. </div>
  4843. <div class="tool" :class="{
  4844. isToolChoose:
  4845. itemTool.tool.indexOf(47) != -1,
  4846. }" @click="
  4847. addTools(47, itemTaskIndex, toolIndex)
  4848. ">
  4849. <div class="whiteBIcon" @click.stop="
  4850. openTools(itemTaskIndex, 47, toolIndex)
  4851. ">
  4852. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4853. <div style="margin: 5px 0">{{ lang.ssSort }}</div>
  4854. </div>
  4855. <div class="noCTool">
  4856. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4857. </div>
  4858. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4859. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4860. </div>
  4861. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4862. <img src="../../../assets/icon/checkNo.png" alt
  4863. v-if="itemTool.tool.indexOf(47) == -1" />
  4864. <div class="checkDiv" v-else>
  4865. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4866. </div>
  4867. </div> -->
  4868. </div>
  4869. <!-- <div class="tool">
  4870. <div
  4871. class="whiteBIcon"
  4872. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4873. >
  4874. <img
  4875. src="../../../assets/icon/thirdToolList/mp3.png"
  4876. alt
  4877. />
  4878. <div style="margin: 5px 0">上传音频</div>
  4879. </div>
  4880. <div
  4881. class="check"
  4882. @click="addTools(42, itemTaskIndex, toolIndex)"
  4883. >
  4884. <img
  4885. src="../../../assets/icon/checkNo.png"
  4886. alt
  4887. v-if="itemTool.tool.indexOf(42) == -1"
  4888. />
  4889. <img
  4890. src="../../../assets/icon/checkedIs.png"
  4891. alt
  4892. v-else
  4893. />
  4894. </div>
  4895. </div> -->
  4896. </div>
  4897. <div class="toolSort" v-if="itemTool.toolType == 3">
  4898. <div class="tool" :class="{
  4899. isToolChoose:
  4900. itemTool.tool.indexOf(18) != -1,
  4901. }" @click="
  4902. addTools(18, itemTaskIndex, toolIndex)
  4903. ">
  4904. <div class="whiteBIcon" @click.stop="
  4905. addTools(18, itemTaskIndex, toolIndex)
  4906. ">
  4907. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4908. <div style="margin: 5px 0">{{ lang.ssTrainPlat }}</div>
  4909. </div>
  4910. <div class="noCTool">
  4911. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4912. </div>
  4913. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4914. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4915. </div>
  4916. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4917. <img src="../../../assets/icon/checkNo.png" alt
  4918. v-if="itemTool.tool.indexOf(18) == -1" />
  4919. <div class="checkDiv" v-else>
  4920. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4921. </div>
  4922. </div> -->
  4923. </div>
  4924. <div class="tool" :class="{
  4925. isToolChoose:
  4926. itemTool.tool.indexOf(21) != -1,
  4927. }" @click="
  4928. addTools(21, itemTaskIndex, toolIndex)
  4929. ">
  4930. <div class="whiteBIcon" @click.stop="
  4931. addTools(21, itemTaskIndex, toolIndex)
  4932. ">
  4933. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4934. <div style="margin: 5px 0">
  4935. AIoT Blockly
  4936. </div>
  4937. </div>
  4938. <div class="noCTool">
  4939. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4940. </div>
  4941. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4942. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4943. </div>
  4944. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4945. <img src="../../../assets/icon/checkNo.png" alt
  4946. v-if="itemTool.tool.indexOf(21) == -1" />
  4947. <div class="checkDiv" v-else>
  4948. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4949. </div>
  4950. </div> -->
  4951. </div>
  4952. <!-- <div class="tool">
  4953. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4954. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4955. <div style="margin: 5px 0">AI体验</div>
  4956. </div>
  4957. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4958. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4959. <div class="checkDiv" v-else>
  4960. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4961. </div>
  4962. </div>
  4963. </div> -->
  4964. <div class="tool" :class="{
  4965. isToolChoose:
  4966. itemTool.tool.indexOf(23) != -1,
  4967. }" @click="
  4968. addTools(23, itemTaskIndex, toolIndex)
  4969. ">
  4970. <div class="whiteBIcon" @click.stop="
  4971. addTools(23, itemTaskIndex, toolIndex)
  4972. ">
  4973. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4974. <div style="margin: 5px 0">AI Python</div>
  4975. </div>
  4976. <div class="noCTool">
  4977. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4978. </div>
  4979. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4980. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4981. </div>
  4982. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4983. <img src="../../../assets/icon/checkNo.png" alt
  4984. v-if="itemTool.tool.indexOf(23) == -1" />
  4985. <div class="checkDiv" v-else>
  4986. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4987. </div>
  4988. </div> -->
  4989. </div>
  4990. <div class="tool" :class="{
  4991. isToolChoose:
  4992. itemTool.tool.indexOf(24) != -1,
  4993. }" @click="
  4994. addTools(24, itemTaskIndex, toolIndex)
  4995. ">
  4996. <div class="whiteBIcon" @click.stop="
  4997. addTools(24, itemTaskIndex, toolIndex)
  4998. ">
  4999. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  5000. <div style="margin: 5px 0">
  5001. AI Blockly
  5002. </div>
  5003. </div>
  5004. <div class="noCTool">
  5005. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5006. </div>
  5007. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  5008. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5009. </div>
  5010. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  5011. <img src="../../../assets/icon/checkNo.png" alt
  5012. v-if="itemTool.tool.indexOf(24) == -1" />
  5013. <div class="checkDiv" v-else>
  5014. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5015. </div>
  5016. </div> -->
  5017. </div>
  5018. <div class="tool" :class="{
  5019. isToolChoose:
  5020. itemTool.tool.indexOf(32) != -1,
  5021. }" @click="
  5022. addTools(32, itemTaskIndex, toolIndex)
  5023. ">
  5024. <div class="whiteBIcon" @click.stop="
  5025. addTools(32, itemTaskIndex, toolIndex)
  5026. ">
  5027. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  5028. <div style="margin: 5px 0">{{ lang.ssCodeEdit }}</div>
  5029. </div>
  5030. <div class="noCTool">
  5031. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5032. </div>
  5033. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  5034. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5035. </div>
  5036. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  5037. <img src="../../../assets/icon/checkNo.png" alt
  5038. v-if="itemTool.tool.indexOf(32) == -1" />
  5039. <div class="checkDiv" v-else>
  5040. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5041. </div>
  5042. </div> -->
  5043. </div>
  5044. <div class="tool" :class="{
  5045. isToolChoose:
  5046. itemTool.tool.indexOf(57) != -1,
  5047. }" @click="
  5048. addTools(57, itemTaskIndex, toolIndex)
  5049. ">
  5050. <div class="whiteBIcon" @click.stop="
  5051. openTools(itemTaskIndex, 57, toolIndex)
  5052. ">
  5053. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  5054. <div style="margin: 5px 0">CocoPi</div>
  5055. </div>
  5056. <div class="noCTool">
  5057. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5058. </div>
  5059. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  5060. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5061. </div>
  5062. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  5063. <img src="../../../assets/icon/checkNo.png" alt
  5064. v-if="itemTool.tool.indexOf(57) == -1" />
  5065. <div class="checkDiv" v-else>
  5066. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5067. </div>
  5068. </div> -->
  5069. </div>
  5070. <div class="tool" :class="{
  5071. isToolChoose:
  5072. itemTool.tool.indexOf(63) != -1,
  5073. }" @click="
  5074. addTools(63, itemTaskIndex, toolIndex)
  5075. ">
  5076. <div class="whiteBIcon" @click.stop="
  5077. addTools(63, itemTaskIndex, toolIndex)
  5078. ">
  5079. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  5080. <div style="margin: 5px 0">{{ lang.ssTurtle }}</div>
  5081. </div>
  5082. <div class="noCTool">
  5083. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5084. </div>
  5085. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  5086. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5087. </div>
  5088. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  5089. <img src="../../../assets/icon/checkNo.png" alt
  5090. v-if="itemTool.tool.indexOf(63) == -1" />
  5091. <div class="checkDiv" v-else>
  5092. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5093. </div>
  5094. </div> -->
  5095. </div>
  5096. <!-- <div class="tool" :class="{
  5097. isToolChoose:
  5098. itemTool.tool.indexOf(71) != -1,
  5099. }" @click="
  5100. addTools(71, itemTaskIndex, toolIndex)
  5101. ">
  5102. <div class="whiteBIcon" @click.stop="
  5103. addTools(71, itemTaskIndex, toolIndex)
  5104. ">
  5105. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  5106. <div style="margin: 5px 0">AI智能体</div>
  5107. </div>
  5108. <div class="noCTool">
  5109. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5110. </div>
  5111. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  5112. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5113. </div>
  5114. </div> -->
  5115. </div>
  5116. <div class="toolSort" v-if="itemTool.toolType == 7">
  5117. <div class="tool" :class="{
  5118. isToolChoose:
  5119. itemTool.tool.indexOf(40) != -1,
  5120. }" @click.stop="
  5121. addTools(40, itemTaskIndex, toolIndex)
  5122. ">
  5123. <div class="whiteBIcon" @click.stop="
  5124. openTools(itemTaskIndex, 40, toolIndex)
  5125. ">
  5126. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  5127. <div style="margin: 5px 0">{{ lang.ssPersonalL }}</div>
  5128. </div>
  5129. <div class="noCTool">
  5130. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5131. </div>
  5132. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  5133. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5134. </div>
  5135. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  5136. <img src="../../../assets/icon/checkNo.png" alt
  5137. v-if="itemTool.tool.indexOf(40) == -1" />
  5138. <div class="checkDiv" v-else>
  5139. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5140. </div>
  5141. </div> -->
  5142. </div>
  5143. </div>
  5144. <div class="toolSort" v-if="itemTool.toolType == 5">
  5145. <div class="tool" :class="{
  5146. isToolChoose:
  5147. itemTool.tool.indexOf(28) != -1,
  5148. }" @click="
  5149. addTools(28, itemTaskIndex, toolIndex)
  5150. ">
  5151. <div class="whiteBIcon" @click.stop="
  5152. addTools(28, itemTaskIndex, toolIndex)
  5153. ">
  5154. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5155. <div style="margin: 5px 0">{{ lang.ssTranslate }}</div>
  5156. </div>
  5157. <div class="noCTool">
  5158. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5159. </div>
  5160. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  5161. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5162. </div>
  5163. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5164. <img src="../../../assets/icon/checkNo.png" alt
  5165. v-if="itemTool.tool.indexOf(28) == -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" :class="{
  5172. isToolChoose:
  5173. itemTool.tool.indexOf(31) != -1,
  5174. }" @click="
  5175. addTools(31, itemTaskIndex, toolIndex)
  5176. ">
  5177. <div class="whiteBIcon" @click.stop="
  5178. addTools(31, itemTaskIndex, toolIndex)
  5179. ">
  5180. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5181. <div style="margin: 5px 0">{{ lang.ssDigital }}</div>
  5182. </div>
  5183. <div class="noCTool">
  5184. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5185. </div>
  5186. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  5187. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5188. </div>
  5189. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5190. <img src="../../../assets/icon/checkNo.png" alt
  5191. v-if="itemTool.tool.indexOf(31) == -1" />
  5192. <div class="checkDiv" v-else>
  5193. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5194. </div>
  5195. </div> -->
  5196. </div>
  5197. <div class="tool" :class="{
  5198. isToolChoose:
  5199. itemTool.tool.indexOf(39) != -1,
  5200. }" @click="
  5201. addTools(39, itemTaskIndex, toolIndex)
  5202. ">
  5203. <div class="whiteBIcon" @click.stop="
  5204. addTools(39, itemTaskIndex, toolIndex)
  5205. ">
  5206. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5207. <div style="margin: 5px 0">GeoGebra</div>
  5208. </div>
  5209. <div class="noCTool">
  5210. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5211. </div>
  5212. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  5213. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5214. </div>
  5215. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5216. <img src="../../../assets/icon/checkNo.png" alt
  5217. v-if="itemTool.tool.indexOf(39) == -1" />
  5218. <div class="checkDiv" v-else>
  5219. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5220. </div>
  5221. </div> -->
  5222. </div>
  5223. <div class="tool" :class="{
  5224. isToolChoose:
  5225. itemTool.tool.indexOf(66) != -1,
  5226. }" @click="
  5227. addTools(66, itemTaskIndex, toolIndex)
  5228. ">
  5229. <div class="whiteBIcon" @click.stop="
  5230. addTools(66, itemTaskIndex, toolIndex)
  5231. ">
  5232. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  5233. <div style="margin: 5px 0">{{ lang.ssFormula }}</div>
  5234. </div>
  5235. <div class="noCTool">
  5236. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5237. </div>
  5238. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  5239. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5240. </div>
  5241. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  5242. <img src="../../../assets/icon/checkNo.png" alt
  5243. v-if="itemTool.tool.indexOf(66) == -1" />
  5244. <div class="checkDiv" v-else>
  5245. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5246. </div>
  5247. </div> -->
  5248. </div>
  5249. <!-- <div class="tool">
  5250. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  5251. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  5252. <div style="margin: 5px 0">分子结构</div>
  5253. </div>
  5254. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  5255. <img src="../../../assets/icon/checkNo.png" alt
  5256. v-if="itemTool.tool.indexOf(67) == -1" />
  5257. <div class="checkDiv" v-else>
  5258. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5259. </div>
  5260. </div>
  5261. </div> -->
  5262. <!-- <div class="tool" :class="{
  5263. isToolChoose:
  5264. itemTool.tool.indexOf(68) != -1,
  5265. }" @click="
  5266. addTools(68, itemTaskIndex, toolIndex)
  5267. ">
  5268. <div class="whiteBIcon" @click.stop="
  5269. addTools(68, itemTaskIndex, toolIndex)
  5270. ">
  5271. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  5272. <div style="margin: 5px 0">时间轴</div>
  5273. </div>
  5274. <div class="noCTool">
  5275. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5276. </div>
  5277. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  5278. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5279. </div> -->
  5280. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  5281. <img src="../../../assets/icon/checkNo.png" alt
  5282. v-if="itemTool.tool.indexOf(68) == -1" />
  5283. <div class="checkDiv" v-else>
  5284. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5285. </div>
  5286. </div> -->
  5287. <!-- </div> -->
  5288. <div class="tool" :class="{
  5289. isToolChoose:
  5290. itemTool.tool.indexOf(69) != -1,
  5291. }" @click="
  5292. addTools(69, itemTaskIndex, toolIndex)
  5293. ">
  5294. <div class="whiteBIcon" @click.stop="
  5295. openTools(itemTaskIndex, 69, toolIndex)
  5296. ">
  5297. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5298. <div style="margin: 5px 0">{{ lang.ssEngWrite }}</div>
  5299. </div>
  5300. <div class="noCTool">
  5301. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5302. </div>
  5303. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5304. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5305. </div>
  5306. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5307. <img src="../../../assets/icon/checkNo.png" alt
  5308. v-if="itemTool.tool.indexOf(4) == -1" />
  5309. <div class="checkDiv" v-else>
  5310. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5311. </div>
  5312. </div> -->
  5313. </div>
  5314. <div class="tool" :class="{
  5315. isToolChoose:
  5316. itemTool.tool.indexOf(70) != -1,
  5317. }" @click="
  5318. addTools(70, itemTaskIndex, toolIndex)
  5319. ">
  5320. <div class="whiteBIcon" @click.stop="
  5321. openTools(itemTaskIndex, 70, toolIndex)
  5322. ">
  5323. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5324. <div style="margin: 5px 0">{{ lang.ssEngSpeak }}</div>
  5325. </div>
  5326. <div class="noCTool">
  5327. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5328. </div>
  5329. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5330. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5331. </div>
  5332. </div>
  5333. <!-- <div class="tool">
  5334. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5335. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5336. <div style="margin: 5px 0">翻译</div>
  5337. </div>
  5338. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5339. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5340. <div class="checkDiv" v-else>
  5341. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5342. </div>
  5343. </div>
  5344. </div>
  5345. <div class="tool">
  5346. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5347. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5348. <div style="margin: 5px 0">魔盒识字</div>
  5349. </div>
  5350. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5351. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5352. <div class="checkDiv" v-else>
  5353. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5354. </div>
  5355. </div>
  5356. </div>
  5357. <div class="tool">
  5358. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5359. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5360. <div style="margin: 5px 0">24点</div>
  5361. </div>
  5362. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5363. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5364. <div class="checkDiv" v-else>
  5365. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5366. </div>
  5367. </div>
  5368. </div>
  5369. <div class="tool">
  5370. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5371. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5372. <div style="margin: 5px 0">数学画板</div>
  5373. </div>
  5374. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5375. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5376. <div class="checkDiv" v-else>
  5377. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5378. </div>
  5379. </div>
  5380. </div>
  5381. <div class="tool">
  5382. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5383. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5384. <div style="margin: 5px 0">GeoGebra</div>
  5385. </div>
  5386. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5387. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5388. <div class="checkDiv" v-else>
  5389. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5390. </div>
  5391. </div>
  5392. </div>
  5393. <div class="tool">
  5394. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5395. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5396. <div style="margin: 5px 0">模拟驾驶</div>
  5397. </div>
  5398. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5399. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5400. <div class="checkDiv" v-else>
  5401. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5402. </div>
  5403. </div>
  5404. </div>
  5405. <div class="tool">
  5406. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5407. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5408. <div style="margin: 5px 0">路径搜索</div>
  5409. </div>
  5410. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5411. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5412. <div class="checkDiv" v-else>
  5413. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5414. </div>
  5415. </div>
  5416. </div>
  5417. <div class="tool">
  5418. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5419. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5420. <div style="margin: 5px 0">深度学习</div>
  5421. </div>
  5422. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5423. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5424. <div class="checkDiv" v-else>
  5425. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5426. </div>
  5427. </div>
  5428. </div>
  5429. <div class="tool">
  5430. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5431. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5432. <div style="margin: 5px 0">全历史</div>
  5433. </div>
  5434. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5435. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5436. <div class="checkDiv" v-else>
  5437. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5438. </div>
  5439. </div>
  5440. </div>
  5441. </div>
  5442. <div class="toolSort" v-if="itemTool.toolType == 4">
  5443. <div class="tool">
  5444. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5445. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5446. <div style="margin: 5px 0">课程设计</div>
  5447. </div>
  5448. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5449. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5450. <div class="checkDiv" v-else>
  5451. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5452. </div>
  5453. </div>
  5454. </div>
  5455. <div class="tool">
  5456. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5457. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5458. <div style="margin: 5px 0">目标管理</div>
  5459. </div>
  5460. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5461. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5462. <div class="checkDiv" v-else>
  5463. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5464. </div>
  5465. </div>
  5466. </div> -->
  5467. <!-- <div class="tool">
  5468. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5469. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5470. <div style="margin: 5px 0">汉字宫</div>
  5471. </div>
  5472. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5473. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5474. <div class="checkDiv" v-else>
  5475. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5476. </div>
  5477. </div>
  5478. </div> -->
  5479. </div>
  5480. </div>
  5481. <!-- v-show="!itemTool.isFold3" -->
  5482. <div class="op_tool_box"
  5483. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1"
  5484. :element-loading-text="lang.xiaokeloading">
  5485. <textarea rows="2" v-autoHeight="70" type="text" :placeholder="lang.AddToolDescription"
  5486. class="binfo_input" style="
  5487. margin: 0 0 20px 0;
  5488. width: 100% !important;
  5489. " v-model="itemTool.toolDetail"></textarea>
  5490. <div class="op_box"
  5491. :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5492. <div class="op_remark">{{ lang.ssOptTip }}</div>
  5493. <div class="op_box_right">
  5494. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  5495. <div class="r_pub_button_op"
  5496. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5497. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5498. {{ lang.ssIntOpt }}</div>
  5499. </el-tooltip>
  5500. <el-switch style="margin-left: 10px"
  5501. v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" :active-text="lang.ssQuote"
  5502. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  5503. @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5504. </div>
  5505. </div>
  5506. </div>
  5507. <evaList :toolsData="toolsData" :unitJson="unitJson" :itemTaskIndex="itemTaskIndex"
  5508. :toolIndex="toolIndex" :knowFileids="knowFileids" :languageSetting="languageSetting"
  5509. :userid="userid" :aiJson="aiJson" @addAppendixEva="addAppendixEva"
  5510. @setEvaList="setEvaList" @addCourseBehavior="addCourseBehavior"
  5511. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5512. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5513. </div>
  5514. <button class="c_pub_button_add pub_btn_tool_img"
  5515. @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)"
  5516. style="
  5517. margin: 0 auto;
  5518. padding: 0 30px;
  5519. height: 45px;
  5520. ">
  5521. {{ lang.AddTool }}
  5522. </button>
  5523. </div>
  5524. </div>
  5525. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5526. <div class="elist_title">
  5527. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5528. <div class="lineTitle clineTitle" style="width: auto">{{ lang.ssTaskEvaSys }}</div>
  5529. </div>
  5530. <div>
  5531. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%"
  5532. :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "
  5533. :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5534. </div>
  5535. </div>
  5536. </div>
  5537. <div class="elist_css" v-if="panTaskElist() > 0"
  5538. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])"
  5539. :element-loading-text="lang.xiaokeloading">
  5540. <div class="elist_title">
  5541. <div style="
  5542. display: flex;
  5543. flex-direction: row;
  5544. align-items: center;
  5545. margin: 20px 0;
  5546. ">
  5547. <div class="lineTitle clineTitle">{{ lang.AssessmentSettings }}</div>
  5548. <div style="margin-left:auto;display: flex;">
  5549. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom"
  5550. v-if="itemTask.eList && itemTask.eList.length">
  5551. <div class="r_pub_button_op"
  5552. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5553. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">{{ lang.ssOneKeyEvaRule }}</div>
  5554. </el-tooltip>
  5555. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom"
  5556. v-if="itemTask.eList && itemTask.eList.length">
  5557. <div class="r_pub_button_op" style="margin-left:10px;"
  5558. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5559. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">{{ lang.ssIntOpt }}</div>
  5560. </el-tooltip>
  5561. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  5562. <div class="r_pub_button_op" style="margin-left:10px;"
  5563. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5564. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList &&
  5565. itemTask.eList.length) ? lang.ssRegenEva : lang.ssGenEva }}</div>
  5566. </el-tooltip>
  5567. </div>
  5568. <!-- <div class="line" style="width: 90%"></div> -->
  5569. </div>
  5570. </div>
  5571. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5572. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5573. {{ lang.ssUploadSup }}
  5574. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  5575. style="display: none" v-if="inputShow" @change="
  5576. beforeUploadInfo2(
  5577. $event,
  5578. 18,
  5579. itemTaskIndex
  5580. )
  5581. " />
  5582. </button>
  5583. <div style="margin-top: 10px;width:100%"
  5584. v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5585. <div class="add_chapters_box add_c_none" v-if="
  5586. pingjiaInfoData[itemTaskIndex] &&
  5587. pingjiaInfoData[itemTaskIndex].length == 0
  5588. ">
  5589. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5590. <span>{{ lang.ssNoContentL }}</span>
  5591. </div>
  5592. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5593. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]"
  5594. :key="item1.id" @click="
  5595. getChapterData(
  5596. $event,
  5597. index1,
  5598. item1.type
  5599. )
  5600. ">
  5601. <div class="chapter_upload_o" style="
  5602. position: relative;
  5603. display: flex;
  5604. align-items: center;
  5605. ">
  5606. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5607. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5608. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5609. </div>
  5610. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5611. </div>
  5612. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5613. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5614. </div>
  5615. <div v-if="item1.type == 14" class="chapter_upload_l_i14"
  5616. style="margin-left: 1px">
  5617. </div>
  5618. <div v-if="item1.type == 12" class="chapter_upload_l_i12"
  5619. style="margin-left: 1px">
  5620. </div>
  5621. <div v-if="item1.type == 13" class="chapter_upload_l_i13"
  5622. style="margin-left: 1px">
  5623. </div>
  5624. </div>
  5625. <div class="chapter_upload_n">
  5626. <input readonly="true" v-if="
  5627. item1.type == 2 ||
  5628. item1.type == 3 ||
  5629. item1.type == 12 ||
  5630. item1.type == 13 ||
  5631. item1.type == 7
  5632. " :placeholder="item1.name" @click.stop="
  5633. checkChpater3($event, index1, item1)
  5634. " style="
  5635. border: none;
  5636. outline: none;
  5637. width: 80%;
  5638. minwidth: 215px;
  5639. z-index: 99;
  5640. font-size: 14px;
  5641. white-space: nowrap;
  5642. overflow: hidden;
  5643. text-overflow: ellipsis;
  5644. " />
  5645. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5646. border: none;
  5647. outline: none;
  5648. width: 80%;
  5649. white-space: nowrap;
  5650. overflow: hidden;
  5651. text-overflow: ellipsis;
  5652. " readonly="true" @click="
  5653. selectAttText(index1)
  5654. " />
  5655. <input :placeholder="item1.title ? item1.title : lang.Links
  5656. " v-if="item1.type == 8" style="
  5657. border: none;
  5658. outline: none;
  5659. width: 80%;
  5660. white-space: nowrap;
  5661. overflow: hidden;
  5662. text-overflow: ellipsis;
  5663. " readonly="true" @click="selectLine(index1)" />
  5664. <input :placeholder="item1.title ? item1.title : lang.Links
  5665. " v-if="item1.type == 14" style="
  5666. border: none;
  5667. outline: none;
  5668. width: 80%;
  5669. white-space: nowrap;
  5670. overflow: hidden;
  5671. text-overflow: ellipsis;
  5672. " readonly="true" @click="
  5673. openUpdateSource(index1)
  5674. " />
  5675. </div>
  5676. <div class="chapter_upload_ic">
  5677. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5678. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5679. checkChpater3($event, index1, item1)
  5680. ">
  5681. <div></div>
  5682. </div>
  5683. <div class="chapter_upload_ic_r" @click.stop="
  5684. deletepingjiaInfoData(
  5685. $event,
  5686. index1,
  5687. itemTaskIndex
  5688. )
  5689. ">
  5690. <div></div>
  5691. </div>
  5692. </div>
  5693. </div>
  5694. </div>
  5695. </div>
  5696. </div>
  5697. <div v-if="
  5698. pingjiainfoproVisible[itemTaskIndex]
  5699. " class="mask">
  5700. <div class="progressBox">
  5701. <div class="lbox">
  5702. <img src="../../../assets/loading.gif" />{{ lang.pleasewait }}
  5703. </div>
  5704. <div style="margin-bottom: 10px">
  5705. <span>{{
  5706. pingjiainfoisFinishSize[itemTaskIndex]
  5707. }}</span>
  5708. /
  5709. <span>{{
  5710. pingjiainfoisAllSize[itemTaskIndex]
  5711. }}</span>
  5712. </div>
  5713. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5714. ? pingjiainfoprogress[itemTaskIndex]
  5715. : 0
  5716. " style="width: 80%"></el-progress> -->
  5717. </div>
  5718. </div>
  5719. </div>
  5720. <div class="mbCss">
  5721. <div class="pjCss" :style="{
  5722. width: itemTask.isEvaFold
  5723. ? 'calc(100% - 55%)'
  5724. : 'calc(100% - 120px)',
  5725. }">
  5726. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5727. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5728. <div class="elist_inptu_text">
  5729. <span>{{ lang.ssTargetColon }}</span>
  5730. <!-- <span>核心素养:</span> -->
  5731. <input type="input" v-model="itemTask.eList[eIndex].target" :placeholder="lang.ssFillTarget"
  5732. style="width: calc(100% - 280px);" />
  5733. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  5734. v-model="itemTask.eList[eIndex].isai" active-color="#0061FF" :active-text="lang.ssAIScore"
  5735. inactive-text="" active-value="1" inactive-value="2">
  5736. </el-switch>
  5737. </div>
  5738. <div class="elist_inptu_text" v-show="false">
  5739. <!-- <span>评价维度:</span> -->
  5740. <span>{{ lang.ssAbilityColon }}</span>
  5741. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5742. <input type="input" v-model="itemTask.eList[eIndex].value" :placeholder="lang.ssFillAbility" />
  5743. <!-- </el-tooltip> -->
  5744. <!-- <span>评星等级:</span>
  5745. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5746. disabled></el-rate> -->
  5747. <div class="remove" @click="
  5748. deletEList(
  5749. unitIndex,
  5750. itemTaskIndex,
  5751. eIndex
  5752. )
  5753. "></div>
  5754. </div>
  5755. <div class="elist_inptu_text">
  5756. <!-- <span>维度描述:</span> -->
  5757. <span>{{ lang.ssEvaStdColon }}</span>
  5758. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5759. <input type="input" v-model="itemTask.eList[eIndex].detail" :placeholder="lang.ssFillEvaStd" />
  5760. <div class="remove" @click="
  5761. deletEList(
  5762. unitIndex,
  5763. itemTaskIndex,
  5764. eIndex
  5765. )
  5766. "></div>
  5767. <!-- </el-tooltip> -->
  5768. </div>
  5769. <div class="elist_inptu_text" v-if="evalua">
  5770. <span>{{ lang.ssTargetColon }}</span>
  5771. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5772. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5773. @change="forceUpdate()">
  5774. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5775. :value="e.name">
  5776. </el-option>
  5777. </el-select> -->
  5778. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5779. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5780. </div>
  5781. <div class="elist_inptu_text" style="align-items: flex-start;"
  5782. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  5783. :element-loading-text="lang.xiaokeloading">
  5784. <span>{{ lang.ssEvaRuleColon }}</span>
  5785. <div style="width: calc(100%);">
  5786. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn"
  5787. v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? lang.ssFoldRule :
  5788. lang.ssExpandRule}}</div>
  5789. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom" v-else>
  5790. <div class="ruleBtn"
  5791. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5792. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{ lang.ssGenRule }}</div>
  5793. </el-tooltip>
  5794. <div style="width: calc(100%);" class='op_task_box'
  5795. v-if="itemTask.eList[eIndex].isrule">
  5796. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  5797. v-model="itemTask.eList[eIndex].rule" :placeholder="lang.ssEnterEvaRule"></textarea>
  5798. <div class="op_box">
  5799. <div class="op_remark"></div>
  5800. <div class="op_box_right">
  5801. <el-tooltip effect="light" :content="lang.ssRightClick" placement="bottom">
  5802. <div class="r_pub_button_op"
  5803. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5804. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">
  5805. {{itemTask.eList[eIndex].rule ? lang.ssRegenRule : lang.ssGenRule}}</div>
  5806. </el-tooltip>
  5807. </div>
  5808. </div>
  5809. </div>
  5810. </div>
  5811. </div>
  5812. </div>
  5813. </div>
  5814. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5815. style="margin: 35px 35px 0 0">
  5816. <div class="addToolImg">
  5817. <img src="../../../assets/icon/add.png" alt />
  5818. </div>
  5819. <div>添加</div>
  5820. </div> -->
  5821. <div class="eva_btn_box">
  5822. <div class="eva_btn_left_box">
  5823. <button class="c_pub_button_add pub_btn_eval_img"
  5824. @click="addEList(unitIndex, itemTaskIndex)">
  5825. {{ lang.ssAdd }}
  5826. </button>
  5827. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5828. @click="openEList(unitIndex, itemTaskIndex)">
  5829. 资源
  5830. </button> -->
  5831. </div>
  5832. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5833. v-if="itemTask.eList && itemTask.eList.length">
  5834. {{ lang.AddResourceTemplate || lang.Addresourcetemplate }}
  5835. </button>
  5836. </div>
  5837. </div>
  5838. <div v-if="evalua" style="
  5839. border: 1px solid #e5e5e5;
  5840. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5841. " :style="{
  5842. width: itemTask.isEvaFold ? '55%' : '116px',
  5843. }" class="evaCss">
  5844. <!-- <div class="e_add_top">
  5845. <div class="e_add_title">
  5846. <span>当前使用目标管理</span>
  5847. <span>{{ eTitle }}</span>
  5848. <img src="../../../assets/line.png" class="cru_line" style="
  5849. width: 125px;
  5850. height: 20px;
  5851. bottom: -10px;
  5852. left: 155px;
  5853. " />
  5854. </div>
  5855. </div> -->
  5856. <div class="e_add_content" style="width: 100%">
  5857. <div class="e_add_list_pbox" style="width: 100%">
  5858. <div class="e_add_list_pbox_title">
  5859. <span class="type_title" v-if="itemTask.isEvaFold">{{ lang.ssSwitchMode }}</span>
  5860. <div class="type_content" v-if="itemTask.isEvaFold">
  5861. <span :class="{ active: typeMode == 1 }"
  5862. @click="OtherMb(1, itemTaskIndex)">{{ lang.ssTreeView }}</span>
  5863. <span :class="{ active: typeMode == 2 }"
  5864. @click="OtherMb(2, itemTaskIndex)">{{ lang.ssCompass }}</span>
  5865. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5866. </div>
  5867. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5868. @click="foldEva(itemTaskIndex)">
  5869. <img src="../../../assets/icon/new/icon-slide.png" />{{ lang.ssFoldGoal }}
  5870. </div>
  5871. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5872. @click="foldEva(itemTaskIndex)">
  5873. <img src="../../../assets/icon/new/icon-slide.png" />{{ lang.ssExpandGoal }}
  5874. </div>
  5875. </div>
  5876. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5877. style="min-height: 200px">
  5878. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5879. " v-if="typeMode == 1"></Mind>
  5880. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5881. </Sunburst>
  5882. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5883. v-if="typeMode == 3"></SeeBoard>
  5884. </div>
  5885. </div>
  5886. </div>
  5887. </div>
  5888. </div>
  5889. </div>
  5890. <div class="funBlock" style="padding: 0">
  5891. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5892. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5893. <div>
  5894. {{
  5895. itemTask.isFold === 1 ? lang.ssExpandTask : lang.ssFoldTask
  5896. }}
  5897. </div>
  5898. </div>
  5899. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5900. <div>展开</div>
  5901. <div class="arrow">
  5902. <img src="../../../assets/icon/expand.png" alt />
  5903. </div>
  5904. </div> -->
  5905. </div>
  5906. </div>
  5907. </div>
  5908. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5909. <!-- <div>
  5910. <img src="../../../../assets/icon/new/addStage.png" alt />
  5911. <span>添加任务</span>
  5912. </div> -->
  5913. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5914. {{ lang.ssAddTask }}
  5915. </button>
  5916. </div>
  5917. <div class="appendixBox whiteBg taskBorder" style="background: #fff; margin: 10px 0 10px;"
  5918. :style="{ paddingBottom: appendixPan ? '10px' : '0px', minHeight: appendixPan ? '670px' : 'unset' }" v-if="(appendixTaskCheck != 'all' || appendixTypeCheck != 'all') || allFile().length" v-loading="appendixLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5919. <div class="whiteBg" style="border-radius: 0; ">
  5920. <div class="appendix_info_title" style="margin: 0 20px 0 20px;position:relative; padding: 0 0 15px;">
  5921. <span>{{ lang.ssAttachment }}</span>
  5922. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  5923. @click="appendixPan = !appendixPan">{{ appendixPan ? lang.ssFold : lang.ssExpand }}</button>
  5924. </div>
  5925. <div style="width: 100%; box-sizing: border-box;"
  5926. v-show="appendixPan">
  5927. <div class="appendix_check_box">
  5928. <div class="appendix_check_task">
  5929. <span>{{ lang.ssTaskColon }}</span>
  5930. <div class="checkButton" :class="{ checked: appendixTaskCheck == 'all' }" @click="appendixTaskCheck = 'all'">{{ lang.ssAll }}</div>
  5931. <div class="checkButton" :class="{ checked: appendixTaskCheck == (tIndex+1) }" @click="appendixTaskCheck = (tIndex+1)" v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="tIndex">{{ lang.ssTaskNum.replace(/\*/g, tIndex+1) }}</div>
  5932. </div>
  5933. <div class="appendix_check_type">
  5934. <span>{{ lang.ssFileTypeC }}</span>
  5935. <div class="checkButton" :class="{ checked: appendixTypeCheck == 'all' }" @click="appendixTypeCheck = 'all'">{{ lang.ssAll }}</div>
  5936. <div class="checkButton" :class="{ checked: appendixTypeCheck == tIndex }" @click="appendixTypeCheck = t.value" v-for="(t, tIndex) in appendixType" :key="tIndex">{{ t.label }}</div>
  5937. </div>
  5938. <div class="appendix_check_all_box">
  5939. <div class="appendix_check_all" v-if="allFile().length" @click="checkAllappendixFile()">
  5940. <div class="chapter_upload_check" :class="{ checked: panAppendixCheckAll() }"></div>
  5941. <div class="appendix_check_all_text">{{ lang.ssSelectAll }}</div>
  5942. </div>
  5943. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="exportAppendixFiles">{{ lang.ssBatchDown }}</button>
  5944. </div>
  5945. </div>
  5946. <div class="appendix_file_box">
  5947. <div class="add_chapters_box" style="display: flex; flex-direction: column">
  5948. <div style="height: 50px; display: flex ; align-items: center; justify-content: center;" v-if="allFile().length == 0 ">
  5949. <span>{{ lang.ssNoContentL }}</span>
  5950. </div>
  5951. <div class="chapter_upload" v-for="(item1, index1) in allFile()" :key="item1.id">
  5952. <div class="chapter_upload_o"
  5953. style=" position: relative; display: flex; align-items: center; ">
  5954. <div class="chapter_upload_check"
  5955. :class="{ checked: appendixFiles.indexOf(item1.url) != -1 }"
  5956. @click="checkAppendixFile(item1.url)"></div>
  5957. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5958. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5959. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5960. </div>
  5961. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5962. </div>
  5963. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5964. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5965. </div>
  5966. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5967. </div>
  5968. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5969. </div>
  5970. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5971. </div>
  5972. </div>
  5973. <div class="chapter_upload_n" style="width: 100%;">
  5974. <div @click.stop="
  5975. checkChpater3($event, index1, item1)
  5976. " v-if="
  5977. item1.type == 2 ||
  5978. item1.type == 3 ||
  5979. item1.type == 12 ||
  5980. item1.type == 13 ||
  5981. item1.type == 7
  5982. " class="chapter_upload_box">{{ item1.name }}</div>
  5983. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  5984. selectAttText(0, index1)
  5985. ">{{ item1.name }}</div>
  5986. <div v-if="item1.type == 8" class="chapter_upload_box"
  5987. @click="selectLine(0, index1)">{{ item1.title ? item1.title : lang.ssLink }}</div>
  5988. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  5989. openUpdateSource(0, index1)
  5990. ">{{ item1.title ? item1.title : lang.ssLink }}</div>
  5991. </div>
  5992. <div class="chapter_upload_ic">
  5993. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5994. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5995. checkChpater3($event, index1, item1)
  5996. ">
  5997. <div></div>
  5998. </div>
  5999. <div class="chapter_upload_ic_download" @click.stop="downloadFile(item1)">
  6000. <div></div>
  6001. </div>
  6002. </div>
  6003. </div>
  6004. </div>
  6005. </div>
  6006. </div>
  6007. </div>
  6008. </div>
  6009. </div>
  6010. </div>
  6011. <div class="info_btnBox3" v-show="istemplate == 1">
  6012. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  6013. goTo(
  6014. '/course?userid=' +
  6015. userid +
  6016. '&oid=' +
  6017. oid +
  6018. '&org=' +
  6019. org +
  6020. '&role=' +
  6021. role
  6022. )
  6023. ">
  6024. {{ lang.ssBackCourse }}
  6025. </button>
  6026. <button class="c_pub_button_return pub_btn_last_img"
  6027. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  6028. {{ steps == 4 ? lang.ssBackCourse : lang.ssLastStep }}
  6029. </button>
  6030. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  6031. pub_btn_next_img: steps != 3,
  6032. pub_btn_finish_img: steps == 3,
  6033. }">
  6034. {{ steps == 3 ? lang.ssConfirmUp : lang.ssNextStep }}
  6035. </button>
  6036. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  6037. lang.ssModifyTemp : lang.ssSaveTemp }}</button>
  6038. </div>
  6039. </div>
  6040. </div>
  6041. </div>
  6042. </div>
  6043. <div style="
  6044. width: calc(100% - 20px);
  6045. background: rgb(255, 255, 255);
  6046. border-radius: 10px;
  6047. " v-if="steps == 4">
  6048. <div class="basic_box_success">
  6049. <div class="right_img">
  6050. <img src="../../../assets/icon/right.png" alt />
  6051. </div>
  6052. <div style="font-weight: bold">{{ lang.ssSuccess }}</div>
  6053. <!-- <div>您的课程编号</div>
  6054. <div class="number">{{ number }}</div>-->
  6055. <!-- <div class="success_button">
  6056. <div class="look_course" @click="isNoFinsh">
  6057. 邀请老师协同编辑
  6058. </div>
  6059. <div class="attend_others" @click="goCourse">预览课程</div>
  6060. </div> -->
  6061. </div>
  6062. </div>
  6063. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  6064. @mouseleave="btnDisplay(false)" v-if="false">
  6065. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  6066. goTo(
  6067. '/course?userid=' +
  6068. userid +
  6069. '&oid=' +
  6070. oid +
  6071. '&org=' +
  6072. org +
  6073. '&role=' +
  6074. role
  6075. )
  6076. ">
  6077. {{ lang.ssBackCourse }}
  6078. </button>
  6079. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  6080. @click="lastSteps">
  6081. {{ steps == 4 ? lang.ssBackCourse : lang.ssLastStep }}
  6082. </button>
  6083. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  6084. pub_btn_next_img: steps != 3,
  6085. pub_btn_finish_img: steps == 3,
  6086. }">
  6087. {{ steps == 3 ? lang.ssConfirmUp : lang.ssNextStep }}
  6088. </button>
  6089. </div>
  6090. </div>
  6091. </div>
  6092. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  6093. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssExtract" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson"
  6094. v-if="!yiKeTemplateArray.includes(templateid)" />
  6095. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssExtractObj" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson"
  6096. v-if="!yiKeTemplateArray.includes(templateid)" />
  6097. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssIntSearch" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson"
  6098. v-if="!yiKeTemplateArray.includes(templateid)" />
  6099. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssCourseOpt" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  6100. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssTargetGet" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson"
  6101. v-if="!yiKeTemplateArray.includes(templateid)" />
  6102. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssGenObj" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson"
  6103. v-if="!yiKeTemplateArray.includes(templateid)" />
  6104. <aiTips :ttitle="lang.ssBasicData" :title="lang.ssGenOutBtn" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"
  6105. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6106. <aiTips :ttitle="lang.ssCourseOut" :title="lang.ssOutTaskGen" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson"
  6107. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'" />
  6108. <aiTips :ttitle="lang.ssCourseOut" :title="lang.ssOutDescGen" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2"
  6109. @setAiJson="setAiJson" />
  6110. <aiTips :ttitle="lang.ssCourseOut" :title="lang.ssOutDescOpt" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"
  6111. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6112. <aiTips ttitle="cpote" :title="lang.ssCpoteGrp" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson"
  6113. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6114. <aiTips ttitle="cpote" :title="lang.ssQChain" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson"
  6115. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6116. <aiTips ttitle="cpote" :title="lang.ssTargetLay" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson"
  6117. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6118. <aiTips ttitle="cpote" :title="lang.ssTaskClus" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson"
  6119. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6120. <aiTips ttitle="cpote" :title="lang.ssGenTask" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson"
  6121. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6122. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  6123. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  6124. @setAiJson="setAiJson" /> -->
  6125. <aiTips :ttitle="lang.ssGenLessonPlan" :title="lang.ssPlanDescOpt" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  6126. @setAiJson="setAiJson" />
  6127. <aiTips :ttitle="lang.ssGenLessonPlan" :title="lang.ssGenTaskBtn" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  6128. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssTaskDesc" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  6129. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssToolList" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  6130. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssEvaExtract" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  6131. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssTaskDescOpt" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  6132. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssToolOpt" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  6133. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssTaskEvaOpt" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  6134. <aiTips :ttitle="lang.ssTaskDetail" :title="lang.ssOneKeyEvaRule" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson" />
  6135. </div>
  6136. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;"
  6137. v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  6138. <div class="resizer"></div>
  6139. <aiBoxRight :languageSetting="languageSetting" :courseId="chatid" :unitJson="unitJson" :quoteArray="isQuote"
  6140. :teacherCourseText="teacherCourseText" :targetCourseText="targetCourseText" :courseText2="courseText"
  6141. :targetCourseText2="targetCourseText2" :cpote="cpote" @addCourseBehavior="addCourseBehavior"
  6142. :fileids='[...knowFileids, ...knowFileids2]' @setIsQuote="setIsQuote" @addChatAppendixFile="addChatAppendixFile"></aiBoxRight>
  6143. </div>
  6144. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"
  6145. v-show="istemplate != 1 && isDialog == 1 && chatid">
  6146. <img src="../../../assets/icon/course/arrow.svg">
  6147. </div>
  6148. </div>
  6149. <el-dialog :title="lang.ssTip" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  6150. class="dialog_diy2 customWidth">
  6151. <div>{{ lang.ssCopyLink }}</div>
  6152. <div>http://www.boomyon.com/index-zhang.com</div>
  6153. <span slot="footer" class="dialog-footer">
  6154. <el-button type="primary">{{ lang.ssCopyShare }}</el-button>
  6155. <el-button @click="dialogVisible = false">{{ lang.ssCancel }}</el-button>
  6156. </span>
  6157. </el-dialog>
  6158. <el-dialog :title="updateBoolean2 ? lang.ssViewDoc : lang.ssAddDoc" :visible.sync="dialogVisible1" :append-to-body="true"
  6159. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  6160. <el-form>
  6161. <el-form-item :label="lang.ssDocTitle">
  6162. <el-input v-model="tTitle" auto-complete="off" :placeholder="lang.ssEnterDocT"></el-input>
  6163. </el-form-item>
  6164. <div>{{ lang.ssDocIntro }}</div>
  6165. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  6166. </el-form>
  6167. <span slot="footer" class="dialog-footer">
  6168. <el-button @click="dialogVisible1 = false">{{ lang.ssCancel }}</el-button>
  6169. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">{{ lang.ssAdd }}</el-button>
  6170. <el-button type="primary" @click="upWord" v-else>{{ lang.ssEdit }}</el-button>
  6171. </span>
  6172. </el-dialog>
  6173. <el-dialog :title="lang.ssAddDoc" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  6174. :before-close="handleClose" class="dialog_diy">
  6175. <el-form>
  6176. <el-form-item :label="lang.ssDocTitle">
  6177. <el-input v-model="templateC.title" auto-complete="off" :placeholder="lang.ssEnterDocT"></el-input>
  6178. </el-form-item>
  6179. <div>{{ lang.ssDocContent }}</div>
  6180. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  6181. </el-form>
  6182. <span slot="footer" class="dialog-footer">
  6183. <el-button @click="clearChoose">{{ lang.ssCancel }}</el-button>
  6184. <el-button type="primary" @click="wordNext()">{{ lang.ssConfirm }}</el-button>
  6185. </span>
  6186. </el-dialog>
  6187. <el-dialog :title="lang.ssAddText" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  6188. :before-close="handleClose" class="dialog_diy">
  6189. <el-form>
  6190. <el-form-item :label="lang.ssTextTitle">
  6191. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  6192. :placeholder="lang.ssEnterTextT"></el-input>
  6193. </el-form-item>
  6194. <!-- <div>富文本内容</div> -->
  6195. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  6196. </el-form>
  6197. <span slot="footer" class="dialog-footer">
  6198. <el-button @click="clearAttText">{{ lang.ssCancel }}</el-button>
  6199. <el-button type="primary" @click="isAddOrUpdateAttText">{{ lang.ssConfirm }}</el-button>
  6200. </span>
  6201. </el-dialog>
  6202. <el-dialog :title="lang.ssAddLink" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  6203. :before-close="handleClose" class="dialog_diy lineCss">
  6204. <el-form>
  6205. <el-form-item :label="lang.ssTitle" :label-width="formLabelWidth">
  6206. <span>
  6207. <el-input :placeholder="lang.ssEnterLinkT" clearable v-model="lineTitle" class="add_input"></el-input>
  6208. </span>
  6209. </el-form-item>
  6210. <el-form-item :label="lang.ssLink" :label-width="formLabelWidth">
  6211. <span>
  6212. <el-input :placeholder="lang.ssEnterLink" clearable v-model="line" class="add_input"></el-input>
  6213. </span>
  6214. </el-form-item>
  6215. </el-form>
  6216. <span slot="footer" class="dialog-footer">
  6217. <el-button @click="clearLine">{{ lang.ssCancel }}</el-button>
  6218. <el-button type="primary" @click="isAddOrUpdateLine">{{ lang.ssConfirm }}</el-button>
  6219. </span>
  6220. </el-dialog>
  6221. <el-dialog :title="updateSourcePan ? lang.ssModifyRes : lang.ssAddRes" :visible.sync="dialogVisibleSource" :append-to-body="true"
  6222. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  6223. <div>
  6224. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  6225. </div>
  6226. <span slot="footer" class="dialog-footer">
  6227. <el-button @click="dialogVisibleSource = false">{{ lang.ssCancel }}</el-button>
  6228. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">{{ lang.ssConfirm }}</el-button>
  6229. <el-button type="primary" @click="updateSource" v-else>{{ lang.ssConfirm }}</el-button>
  6230. </span>
  6231. </el-dialog>
  6232. <el-dialog :title="lang.ssAddCourseM" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  6233. :before-close="handleClose" class="addNewPP customWidth">
  6234. <div class="people">
  6235. <div class="people_top">
  6236. <div class="people_nav">{{ lang.ssSelectMem }}</div>
  6237. <div class="people_top_right">
  6238. <div class="people_search">
  6239. <el-input style="height: 100%" :placeholder="lang.ssSearchMem" v-model="searchPeople"></el-input>
  6240. <div class="search_img" @click="searchStudent">
  6241. <img src="../../../assets/icon/search.png" alt />
  6242. </div>
  6243. </div>
  6244. </div>
  6245. </div>
  6246. <el-checkbox-group v-model="checkboxList" class="people_name">
  6247. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  6248. lang.ssNoStuAvail }}</el-checkbox>
  6249. </el-checkbox-group>
  6250. </div>
  6251. <span slot="footer" class="dialog-footer">
  6252. <el-button @click="dialogVisible3 = false">{{ lang.ssCancel }}</el-button>
  6253. <el-button type="primary" @click="isAddPP">{{ lang.ssConfirm }}</el-button>
  6254. </span>
  6255. </el-dialog>
  6256. <el-dialog :title="lang.ssSelectTeac" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  6257. :before-close="handleClose" class="addNewPP2">
  6258. <div class="check_classBox">
  6259. <div class="check_class_right">
  6260. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  6261. {{ lang.ssAll }}
  6262. </div>
  6263. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  6264. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  6265. {{ item.name }}
  6266. </div>
  6267. </el-tooltip>
  6268. </div>
  6269. <div class="check_class_left">
  6270. <div class="check_class_all_box">
  6271. <div class="check_class_left_title">{{ lang.ssSelectClass }}</div>
  6272. <div style="display: flex; align-items: center; margin-left: auto">
  6273. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">{{ lang.ssSelectAll }}</el-checkbox>
  6274. </div>
  6275. </div>
  6276. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  6277. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  6278. </div> -->
  6279. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  6280. v-if="grade2.length">
  6281. <div v-for="item in grade2" :key="item.id" class="class_item">
  6282. <el-checkbox :label="item.id">
  6283. {{ item.name }}
  6284. </el-checkbox>
  6285. </div>
  6286. </el-checkbox-group>
  6287. <div v-if="!grade2.length">{{ lang.ssNoData }}</div>
  6288. </div>
  6289. </div>
  6290. <span slot="footer" class="dialog-footer">
  6291. <el-button @click="dialogVisibleClass = false">{{ lang.ssCancel }}</el-button>
  6292. <el-button type="primary" @click="isAddClass">{{ lang.ssConfirm }}</el-button>
  6293. </span>
  6294. </el-dialog>
  6295. <el-dialog :title="lang.ssAddMember" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  6296. :before-close="handleClose" class="addNewPP customWidth">
  6297. <div style="display: flex;justify-content: space-between;">
  6298. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  6299. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  6300. {{ lang.ssAll }}
  6301. </div>
  6302. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  6303. v-for="(i) in CollaborativeTeaList" :key="i.id">
  6304. <el-tooltip placement="top" :content="i.name">
  6305. <span>{{i.name}}</span>
  6306. </el-tooltip>
  6307. </div>
  6308. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  6309. {{ lang.ssOther }}
  6310. </div>
  6311. </div>
  6312. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  6313. <div class="people">
  6314. <div class="people_top">
  6315. <div class="people_top_right">
  6316. <div class="people_search">
  6317. <el-input :placeholder="lang.ssSearchMem" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  6318. <div class="search_img" @click="getTeacher(collid)">
  6319. <img src="../../../assets/icon/search.png" alt />
  6320. </div>
  6321. </div>
  6322. </div>
  6323. <div class="people_nav" style="display: flex; align-items: center">
  6324. <div class="check_class_left_title">{{ lang.ssSelectMem }}</div>
  6325. <div style="display: flex; align-items: center; margin-left: auto">
  6326. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">{{ lang.ssSelectAll }}</el-checkbox>
  6327. </div>
  6328. </div>
  6329. </div>
  6330. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  6331. @change="InviteChange2">
  6332. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  6333. <div class="t_j_box">
  6334. <el-tooltip placement="top" :content="item.name ? item.name : lang.ssNoName">
  6335. <span>{{ item.name ? item.name : lang.ssNoName }}</span>
  6336. </el-tooltip>
  6337. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  6338. <span>{{ item.username.split('@')[0] }}</span>
  6339. </el-tooltip>
  6340. <el-tooltip placement="top" :content="item.school">
  6341. <span>{{ item.school }}</span>
  6342. </el-tooltip>
  6343. </div>
  6344. </el-checkbox>
  6345. </el-checkbox-group>
  6346. <div style="text-align: center; margin-top: 10px" v-else>{{ lang.ssNoData }}</div>
  6347. </div>
  6348. </div>
  6349. </div>
  6350. <span slot="footer" class="dialog-footer">
  6351. <el-button @click="dialogVisibleMember = false">{{ lang.ssCancel }}</el-button>
  6352. <el-button type="primary" @click="isAddPPTeacher">{{ lang.ssConfirm }}</el-button>
  6353. </span>
  6354. </el-dialog>
  6355. <el-dialog :title="lang.ssCreateQues" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  6356. closePan(4);
  6357. }
  6358. " class="dialog_diy fullStyle">
  6359. <div style="height: 100%">
  6360. <div class="a_add_title" style="
  6361. display: flex;
  6362. flex-direction: row;
  6363. align-items: center;
  6364. justify-content: center;
  6365. ">
  6366. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  6367. <el-input v-model="askJson.askTitle" :placeholder="lang.ssEnterTitle" style="width: 400px"></el-input>
  6368. </div>
  6369. <div class="a_addBox" style="height: calc(100% - 50px)">
  6370. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  6371. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  6372. <div class="a_add_checkType">
  6373. <span :class="{
  6374. active:
  6375. askJson.askJson[index1].type == '1' ||
  6376. !askJson.askJson[index1].type,
  6377. }" @click="checkAskType('1', askJson.askJson[index1])">{{ lang.ssSingleCh }}</span>
  6378. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  6379. @click="checkAskType('2', askJson.askJson[index1])">{{ lang.ssMultipleCh }}</span>
  6380. </div>
  6381. <div class="a_add_head">
  6382. <div style="
  6383. display: flex;
  6384. align-items: center;
  6385. width: 100%;
  6386. margin-right: 20px;
  6387. ">
  6388. <span style="min-width: fit-content">{{
  6389. index1 + 1 + "、"
  6390. }}</span>
  6391. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6392. v-model="askJson.askJson[index1].askstitle" :placeholder="lang.ssEnterQues" @change="() => {
  6393. $forceUpdate();
  6394. }
  6395. "></textarea>
  6396. </div>
  6397. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6398. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6399. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6400. </div>
  6401. <div class="a_add_head_div">
  6402. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">{{ lang.ssDelete }}
  6403. </el-button>
  6404. <el-button type="primary" size="small" @click="addAskList(index1)">{{ lang.ssAdd }}</el-button>
  6405. </div>
  6406. </div>
  6407. <div class="a_add_body">
  6408. <div class="a_add_input" style="flex-direction: column">
  6409. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6410. margin: 20px 10px 0 0;
  6411. display: flex;
  6412. align-items: center;
  6413. position: relative;
  6414. ">
  6415. <div style="margin-right: 10px">{{ optionTypeList[checkIndex] }}.</div>
  6416. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6417. v-model="askJson.askJson[index1].checkList[checkIndex]" :placeholder="lang.ssEnterOpt" style="width: 300px"
  6418. @change="() => {
  6419. $forceUpdate();
  6420. }
  6421. "></textarea>
  6422. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6423. v-if="askJson.askJson[index1].askItem != 1">
  6424. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6425. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6426. </div>
  6427. <div class="a_add_body_div">
  6428. <el-button type="primary" size="small"
  6429. @click="addcheckList(askJson.askJson[index1], checkIndex)">{{ lang.ssAdd }}</el-button>
  6430. <el-button type="primary" size="small" @click="
  6431. deletecheckList(askJson.askJson[index1], checkIndex)
  6432. " v-if="askJson.askJson[index1].askItem != 1">{{ lang.ssDelete }}
  6433. </el-button>
  6434. </div>
  6435. </div>
  6436. </div>
  6437. <!-- <div class="a_add_body_div">
  6438. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6439. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6440. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6441. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6442. </el-button>
  6443. </div> -->
  6444. </div>
  6445. </div>
  6446. </div>
  6447. </div>
  6448. <span slot="footer" class="dialog-footer">
  6449. <el-button @click="closePan(4)">{{ lang.ssCancel }}</el-button>
  6450. <el-button type="primary" @click="addAsk">{{ lang.ssConfirm }}</el-button>
  6451. </span>
  6452. </el-dialog>
  6453. <el-dialog :title="lang.ssCreateChoice" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6454. closePan(45);
  6455. }
  6456. " class="dialog_diy fullStyle">
  6457. <div style="height: 100%" v-loading="choiceLoading" :element-loading-text="lang.ssGenWaitPls">
  6458. <!-- <div class="a_add_title" style="
  6459. display: flex;
  6460. flex-direction: row;
  6461. align-items: center;
  6462. justify-content: center;
  6463. ">
  6464. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6465. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6466. </div> -->
  6467. <div class="a_addBox" style="height: 100%">
  6468. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6469. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6470. {{ lang.ssUploadSup }}
  6471. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none"
  6472. v-if="inputShow" @change="
  6473. beforeUploadInfo2(
  6474. $event,
  6475. 17
  6476. )
  6477. " />
  6478. </button>
  6479. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6480. <div class="add_chapters_box add_c_none" v-if="
  6481. xuanzeInfoData &&
  6482. xuanzeInfoData.length == 0
  6483. ">
  6484. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6485. <span>{{ lang.ssNoContentL }}</span>
  6486. </div>
  6487. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6488. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6489. getChapterData(
  6490. $event,
  6491. index1,
  6492. item1.type
  6493. )
  6494. ">
  6495. <div class="chapter_upload_o" style="
  6496. position: relative;
  6497. display: flex;
  6498. align-items: center;
  6499. ">
  6500. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6501. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6502. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6503. </div>
  6504. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6505. </div>
  6506. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6507. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6508. </div>
  6509. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6510. </div>
  6511. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6512. </div>
  6513. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6514. </div>
  6515. </div>
  6516. <div class="chapter_upload_n">
  6517. <input readonly="true" v-if="
  6518. item1.type == 2 ||
  6519. item1.type == 3 ||
  6520. item1.type == 12 ||
  6521. item1.type == 13 ||
  6522. item1.type == 7
  6523. " :placeholder="item1.name" @click.stop="
  6524. checkChpater3($event, index1, item1)
  6525. " style="
  6526. border: none;
  6527. outline: none;
  6528. width: 80%;
  6529. minwidth: 215px;
  6530. z-index: 99;
  6531. font-size: 14px;
  6532. white-space: nowrap;
  6533. overflow: hidden;
  6534. text-overflow: ellipsis;
  6535. " />
  6536. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6537. border: none;
  6538. outline: none;
  6539. width: 80%;
  6540. white-space: nowrap;
  6541. overflow: hidden;
  6542. text-overflow: ellipsis;
  6543. " readonly="true" @click="
  6544. selectAttText(index1)
  6545. " />
  6546. <input :placeholder="item1.title ? item1.title : lang.ssLink
  6547. " v-if="item1.type == 8" style="
  6548. border: none;
  6549. outline: none;
  6550. width: 80%;
  6551. white-space: nowrap;
  6552. overflow: hidden;
  6553. text-overflow: ellipsis;
  6554. " readonly="true" @click="selectLine(index1)" />
  6555. <input :placeholder="item1.title ? item1.title : lang.ssLink
  6556. " v-if="item1.type == 14" style="
  6557. border: none;
  6558. outline: none;
  6559. width: 80%;
  6560. white-space: nowrap;
  6561. overflow: hidden;
  6562. text-overflow: ellipsis;
  6563. " readonly="true" @click="
  6564. openUpdateSource(index1)
  6565. " />
  6566. </div>
  6567. <div class="chapter_upload_ic">
  6568. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6569. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6570. checkChpater3($event, index1, item1)
  6571. ">
  6572. <div></div>
  6573. </div>
  6574. <div class="chapter_upload_ic_r" @click.stop="
  6575. deletexuanzeInfoData(
  6576. $event,
  6577. index1
  6578. )
  6579. ">
  6580. <div></div>
  6581. </div>
  6582. </div>
  6583. </div>
  6584. </div>
  6585. </div>
  6586. </div>
  6587. <div v-if="
  6588. xuanzeinfoproVisible
  6589. " class="mask">
  6590. <div class="progressBox">
  6591. <div class="lbox">
  6592. <img src="../../../assets/loading.gif" />{{ lang.ssUploadWait }}
  6593. </div>
  6594. <div style="margin-bottom: 10px">
  6595. <span>{{
  6596. xuanzeinfoisFinishSize
  6597. }}</span>
  6598. /
  6599. <span>{{
  6600. xuanzeinfoisAllSize
  6601. }}</span>
  6602. </div>
  6603. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6604. ? xuanzeinfoprogress
  6605. : 0
  6606. " style="width: 80%"></el-progress> -->
  6607. </div>
  6608. </div>
  6609. </div>
  6610. <div style="
  6611. font-size: 16px;
  6612. color: #c7c7c7;
  6613. display: flex;
  6614. align-items: center;
  6615. justify-content: flex-end;
  6616. ">
  6617. <!-- 请输入题目内容 -->
  6618. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6619. {{ lang.ssIntGen }}
  6620. </button>
  6621. <!-- 请输入题目内容 -->
  6622. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6623. v-if="isPasteChoice">
  6624. {{ lang.ssSmartPaste }}
  6625. </button>
  6626. </div>
  6627. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6628. <div class="a_add_checkType">
  6629. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6630. @click="checkTestType('1', testJson.testJson[index1])">{{ lang.ssSingleCh }}</span>
  6631. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6632. @click="checkTestType('2', testJson.testJson[index1])">{{ lang.ssMultipleCh }}</span>
  6633. </div>
  6634. <div class="a_add_head">
  6635. <div class="timuUpImg">
  6636. <div style="display: flex; align-items: center">
  6637. <span style="min-width: fit-content">{{
  6638. index1 + 1 + "、"
  6639. }}</span>
  6640. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6641. placeholder="请输入题目">
  6642. </el-input> -->
  6643. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6644. v-model="testJson.testJson[index1].teststitle" :placeholder="lang.ssEnterQues" @change="() => {
  6645. $forceUpdate();
  6646. }
  6647. "></textarea>
  6648. </div>
  6649. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6650. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6651. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6652. </div>
  6653. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6654. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6655. <input type="file" accept="image/*" style="display: none"
  6656. @change="beforeUploadTiMu($event, index1)" />
  6657. </div>
  6658. </div>
  6659. <div class="a_add_head_div">
  6660. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">{{ lang.ssDelete }}
  6661. </el-button>
  6662. <el-button type="primary" size="small" @click="addTestList(index1)">{{ lang.ssAdd }}</el-button>
  6663. </div>
  6664. </div>
  6665. <div class="timuImgBox" v-if="
  6666. testJson.testJson[index1].timuList &&
  6667. testJson.testJson[index1].timuList.length
  6668. ">
  6669. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6670. @click.stop="previewImg(timg.src)">
  6671. <img :src="timg.src" alt="" />
  6672. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6673. <img src="../../../assets/icon/delete.png" alt="" />
  6674. </div>
  6675. </div>
  6676. </div>
  6677. <div class="a_add_body">
  6678. <div class="a_add_input a_add_input_choice">
  6679. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6680. @change="() => {
  6681. $forceUpdate();
  6682. }
  6683. ">
  6684. <div class="radioBox">
  6685. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6686. .testItem" :key="checkIndex" :label="checkIndex">
  6687. <div style="margin-right: 10px">
  6688. {{ optionTypeList[checkIndex] }}.
  6689. </div>
  6690. <div style="margin-right: 10px; width: 300px" v-if="
  6691. testJson.testJson[index1].checkList[checkIndex] &&
  6692. testJson.testJson[index1].checkList[checkIndex]
  6693. .imgType &&
  6694. testJson.testJson[index1].checkList[checkIndex]
  6695. .imgType == 1
  6696. ">
  6697. <div class="inImg" @click.stop="
  6698. previewImg(
  6699. testJson.testJson[index1].checkList[checkIndex]
  6700. .src
  6701. )
  6702. ">
  6703. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6704. .src
  6705. " lazy />
  6706. <!-- <img :src="
  6707. testJson.testJson[index1].checkList[checkIndex]
  6708. .src
  6709. " alt="" /> -->
  6710. </div>
  6711. </div>
  6712. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6713. " :placeholder="lang.ssEnterOpt" style="width: 300px; margin-right: 10px" @change="() => {
  6714. $forceUpdate();
  6715. }
  6716. "></textarea>
  6717. <div class="xzUpImg" @click.stop="addImg($event)">
  6718. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6719. <input type="file" accept="image/*" style="display: none"
  6720. @change="beforeUploadTi($event, index1, checkIndex)" />
  6721. </div>
  6722. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6723. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6724. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6725. </div>
  6726. <div class="a_add_body_div">
  6727. <el-button type="primary" size="small" @click.stop="
  6728. addTcheckList(testJson.testJson[index1], checkIndex)
  6729. ">{{ lang.ssAdd }}</el-button>
  6730. <el-button type="primary" size="small" @click.stop="
  6731. deleteTcheckList(
  6732. testJson.testJson[index1],
  6733. checkIndex
  6734. )
  6735. " v-if="testJson.testJson[index1].testItem != 1">{{ lang.ssDelete }}
  6736. </el-button>
  6737. </div>
  6738. </el-radio>
  6739. </div>
  6740. </el-radio-group>
  6741. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6742. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6743. $forceUpdate();
  6744. }
  6745. ">
  6746. <div class="radioBox">
  6747. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6748. .testItem" :key="checkIndex1" :label="checkIndex1">
  6749. <div style="margin-right: 10px">
  6750. {{ optionTypeList[checkIndex1] }}.
  6751. </div>
  6752. <div style="margin-right: 10px; width: 300px" v-if="
  6753. testJson.testJson[index1].checkList[checkIndex1] &&
  6754. testJson.testJson[index1].checkList[checkIndex1]
  6755. .imgType &&
  6756. testJson.testJson[index1].checkList[checkIndex1]
  6757. .imgType == 1
  6758. ">
  6759. <div class="inImg" @click.stop="
  6760. previewImg(
  6761. testJson.testJson[index1].checkList[checkIndex1]
  6762. .src
  6763. )
  6764. ">
  6765. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6766. .src
  6767. " lazy />
  6768. <!-- <img :src="
  6769. testJson.testJson[index1].checkList[checkIndex1]
  6770. .src
  6771. " alt="" /> -->
  6772. </div>
  6773. </div>
  6774. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6775. " :placeholder="lang.ssEnterOption" style="width: 300px; margin-right: 10px" @change="() => {
  6776. $forceUpdate();
  6777. }
  6778. "></textarea>
  6779. <div class="xzUpImg" @click.stop="addImg($event)">
  6780. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6781. <input type="file" accept="image/*" style="display: none"
  6782. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6783. </div>
  6784. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6785. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6786. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6787. </div>
  6788. <div class="a_add_body_div">
  6789. <el-button type="primary" size="small" @click.stop="
  6790. addTcheckList(
  6791. testJson.testJson[index1],
  6792. checkIndex1
  6793. )
  6794. ">{{ lang.ssAdd }}</el-button>
  6795. <el-button type="primary" size="small" @click.stop="
  6796. deleteTcheckList(
  6797. testJson.testJson[index1],
  6798. checkIndex1
  6799. )
  6800. " v-if="testJson.testJson[index1].testItem != 1">{{ lang.ssDelete }}
  6801. </el-button>
  6802. </div>
  6803. </el-checkbox>
  6804. </div>
  6805. </el-checkbox-group>
  6806. </div>
  6807. <!-- <div class="a_add_body_div">
  6808. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6809. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6810. v-if="testJson.testJson[index1].testItem != 1">删除
  6811. </el-button>
  6812. </div> -->
  6813. </div>
  6814. </div>
  6815. </div>
  6816. </div>
  6817. <span slot="footer" class="dialog-footer">
  6818. <el-button @click="closePan(45)">{{ lang.ssCancel }}</el-button>
  6819. <el-button type="primary" @click="addTest">{{ lang.ssConfirm }}</el-button>
  6820. </span>
  6821. </el-dialog>
  6822. <el-dialog :title="lang.ssAddTool" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6823. :before-close="handleClose" class="dialog_diy addToolsDia">
  6824. <div class="toolChoose">
  6825. <div class="tools">
  6826. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6827. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6828. <div style="
  6829. display: flex;
  6830. flex-direction: row;
  6831. align-items: baseline;
  6832. flex-wrap: nowrap;
  6833. justify-content: flex-start;
  6834. position: relative;
  6835. ">
  6836. <div class="chooseWho">
  6837. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6838. {{ lang.ssInteract }}
  6839. </div>
  6840. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6841. {{ lang.ssCognitive }}
  6842. </div>
  6843. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6844. {{ lang.ssEval }}
  6845. </div>
  6846. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6847. {{ lang.ssOther }}
  6848. </div>
  6849. </div>
  6850. </div>
  6851. <div style="min-height: 163px">
  6852. <div class="toolSort" v-if="chapToolsType == 0">
  6853. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6854. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6855. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6856. <div style="margin: 5px 0">{{ lang.ssMaterial }}</div>
  6857. </div>
  6858. <div class="noCTool">
  6859. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6860. </div>
  6861. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6862. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6863. </div>
  6864. <!-- <div class="check" @click="chapAddTools(8)">
  6865. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6866. <div class="checkDiv" v-else>
  6867. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6868. </div>
  6869. </div> -->
  6870. </div>
  6871. </div>
  6872. <div class="toolSort" v-if="chapToolsType == 1">
  6873. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6874. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6875. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6876. <div style="margin: 5px 0">{{ lang.ssMindGrid }}</div>
  6877. </div>
  6878. <div class="noCTool">
  6879. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6880. </div>
  6881. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6882. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6883. </div>
  6884. <!-- <div class="check" @click="chapAddTools(7)">
  6885. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6886. <div class="checkDiv" v-else>
  6887. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6888. </div>
  6889. </div> -->
  6890. </div>
  6891. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6892. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6893. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6894. <div style="margin: 5px 0">{{ lang.ssEWhite }}</div>
  6895. </div>
  6896. <div class="noCTool">
  6897. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6898. </div>
  6899. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6900. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6901. </div>
  6902. <!-- <div class="check" @click="chapAddTools(1)">
  6903. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6904. <div class="checkDiv" v-else>
  6905. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6906. </div>
  6907. </div> -->
  6908. </div>
  6909. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6910. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6911. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6912. <div style="margin: 5px 0">{{ lang.ssNote }}</div>
  6913. </div>
  6914. <div class="noCTool">
  6915. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6916. </div>
  6917. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6918. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6919. </div>
  6920. <!-- <div class="check" @click="chapAddTools(2)">
  6921. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6922. <div class="checkDiv" v-else>
  6923. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6924. </div>
  6925. </div> -->
  6926. </div>
  6927. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6928. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6929. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6930. <div style="margin: 5px 0">{{ lang.ssCollDoc }}</div>
  6931. </div>
  6932. <div class="noCTool">
  6933. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6934. </div>
  6935. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6936. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6937. </div>
  6938. <!-- <div class="check" @click="chapAddTools(6)">
  6939. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6940. <div class="checkDiv" v-else>
  6941. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6942. </div>
  6943. </div> -->
  6944. </div>
  6945. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6946. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6947. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6948. <div style="margin: 5px 0">{{ lang.ssMindMap }}</div>
  6949. </div>
  6950. <div class="noCTool">
  6951. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6952. </div>
  6953. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6954. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6955. </div>
  6956. <!-- <div class="check" @click="chapAddTools(3)">
  6957. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6958. <div class="checkDiv" v-else>
  6959. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6960. </div>
  6961. </div> -->
  6962. </div>
  6963. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6964. @click="chapAddTools(31)">
  6965. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6966. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6967. <div style="margin: 5px 0">{{ lang.ssMathBoard }}</div>
  6968. </div>
  6969. <div class="noCTool">
  6970. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6971. </div>
  6972. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6973. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6974. </div>
  6975. <!-- <div class="check" @click="chapAddTools(31)">
  6976. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6977. <div class="checkDiv" v-else>
  6978. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6979. </div>
  6980. </div> -->
  6981. </div>
  6982. </div>
  6983. <div class="toolSort" v-if="chapToolsType == 2">
  6984. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6985. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6986. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6987. <div style="margin: 5px 0">{{ lang.ssGaugeRate }}</div>
  6988. </div>
  6989. <div class="noCTool">
  6990. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6991. </div>
  6992. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6993. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6994. </div>
  6995. <!-- <div class="check" @click="chapAddTools(5)">
  6996. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6997. <div class="checkDiv" v-else>
  6998. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6999. </div>
  7000. </div> -->
  7001. </div>
  7002. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  7003. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  7004. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  7005. <div style="margin: 5px 0">{{ lang.ssQuest }}</div>
  7006. </div>
  7007. <div class="noCTool">
  7008. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  7009. </div>
  7010. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  7011. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  7012. </div>
  7013. <!-- <div class="check" @click="chapAddTools(4)">
  7014. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  7015. <div class="checkDiv" v-else>
  7016. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  7017. </div>
  7018. </div> -->
  7019. </div>
  7020. </div>
  7021. </div>
  7022. <div>
  7023. <input type="text" :placeholder="lang.ssToolDesc" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  7024. v-model="itemTools.toolDetail" />
  7025. </div>
  7026. </div>
  7027. </div>
  7028. </div>
  7029. <span slot="footer" class="dialog-footer">
  7030. <el-button @click="dialogVisible4 = false">{{ lang.ssCancel }}</el-button>
  7031. <el-button type="primary" @click="addChaptersDataTools">{{ lang.ssConfirm }}</el-button>
  7032. </span>
  7033. </el-dialog>
  7034. <el-dialog :title="lang.ssAddQA" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  7035. closePan(15);
  7036. }
  7037. " class="dialog_diy">
  7038. <div>
  7039. <div class="a_add_title" style="
  7040. display: flex;
  7041. flex-direction: column;
  7042. align-items: flex-start;
  7043. justify-content: center;
  7044. ">
  7045. <div style="margin-bottom: 20px; font-size: 20px">{{ lang.ssQuestion }}</div>
  7046. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  7047. <textarea rows="1" v-autoHeight="40" type="text" :placeholder="lang.ssEnterQues2" class="binfo_input"
  7048. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  7049. </div>
  7050. </div>
  7051. <span slot="footer" class="dialog-footer">
  7052. <el-button @click="closePan(15)">{{ lang.ssCancel }}</el-button>
  7053. <el-button type="primary" @click="addAnswer">{{ lang.ssConfirm }}</el-button>
  7054. </span>
  7055. </el-dialog>
  7056. <el-dialog :title="lang.ssAddQues" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  7057. :before-close="handleClose" class="dialog_diy">
  7058. <div>
  7059. <div class="a_add_title" style="
  7060. display: flex;
  7061. flex-direction: column;
  7062. align-items: flex-start;
  7063. justify-content: center;
  7064. ">
  7065. <div style="margin-bottom: 20px; font-size: 20px">{{ lang.ssQuestion }}</div>
  7066. <el-input v-model="answerQ" :placeholder="lang.ssEnterWant"></el-input>
  7067. </div>
  7068. </div>
  7069. <span slot="footer" class="dialog-footer">
  7070. <el-button @click="dialogVisibleMp3 = false">{{ lang.ssCancel }}</el-button>
  7071. <el-button type="primary" @click="addMp3Answer">{{ lang.ssConfirm }}</el-button>
  7072. </span>
  7073. </el-dialog>
  7074. <el-dialog :title="lang.ssUploadPic" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  7075. :before-close="handleClose" class="dialog_diy">
  7076. <div>
  7077. <div class="fileCss" style="padding-top: 20px">
  7078. <div>
  7079. <button class="info_btn" @click="addImg($event)">
  7080. {{ lang.ssSelectLocal }}
  7081. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  7082. </button>
  7083. <div class="spanName">{{ lang.ssSelectLocal }}</div>
  7084. </div>
  7085. <!-- <div>
  7086. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  7087. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  7088. <img :src="cover[0].url" alt="" />
  7089. <div class="deletePic" @click="deleteSysPic">
  7090. <img src="../../../assets/icon/delete.png" alt="" />
  7091. </div>
  7092. </div>
  7093. <div class="spanName">选择系统文件</div>
  7094. </div> -->
  7095. <div>
  7096. <el-button @click="(searchImageValue = courseName), resetImage()"
  7097. v-if="isSysPic2 == false">{{ lang.ssSelectNet }}</el-button>
  7098. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  7099. <img :src="cover[0].url" alt="" />
  7100. <div class="deletePic" @click="deleteSysPic">
  7101. <img src="../../../assets/icon/delete.png" alt="" />
  7102. </div>
  7103. </div>
  7104. <div class="spanName">{{ lang.ssSelectNet }}</div>
  7105. </div>
  7106. </div>
  7107. <!-- <div class="fileCss">
  7108. </div> -->
  7109. </div>
  7110. <span slot="footer" class="dialog-footer">
  7111. <el-button @click="choosePicVisible = false">{{ lang.ssCancel }}</el-button>
  7112. <el-button type="primary" @click="choosePicVisible = false">{{ lang.ssConfirm }}</el-button>
  7113. </span>
  7114. </el-dialog>
  7115. <el-dialog :title="lang.ssSelectSys" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  7116. :before-close="handleClose" class="dialog_diy">
  7117. <div class="cru_selectBox" style="margin: 0">
  7118. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  7119. {{ lang.ssPainting }}
  7120. </div>
  7121. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  7122. {{ lang.ssScience }}
  7123. </div>
  7124. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  7125. {{ lang.ssHumanity }}
  7126. </div>
  7127. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  7128. {{ lang.ssArt }}
  7129. </div>
  7130. </div>
  7131. <div class="sysPicBox">
  7132. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  7133. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  7134. </div>
  7135. </div>
  7136. </el-dialog>
  7137. <el-dialog :title="lang.ssSelectNet" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  7138. :before-close="handleClose" class="dialog_diy">
  7139. <div>
  7140. <div class="people_top_right" style="display: flex; align-items: center">
  7141. <div style="position: relative; width: 100%">
  7142. <el-input style="height: 100%" :placeholder="lang.ssSearchImg" v-model="searchImageValue"
  7143. @keyup.enter.native="resetImage()"></el-input>
  7144. <div class="search_img" @click="resetImage" style="right: 10px">
  7145. <img src="../../../assets/icon/search.png" alt />
  7146. </div>
  7147. </div>
  7148. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">{{ lang.ssChangeGrp }}</el-button>
  7149. </div>
  7150. <div class="sysPicBox" v-loading="imageloading">
  7151. <div class="picNone" v-if="!imageList.length">
  7152. {{ lang.ssEnterKeyImg }}
  7153. </div>
  7154. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  7155. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  7156. </div>
  7157. </div>
  7158. </div>
  7159. </el-dialog>
  7160. <el-dialog :title="lang.ssSelMatch" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  7161. closePan(41);
  7162. }
  7163. " class="dialog_diy dialog_diy3 fullStyle">
  7164. <div v-if="selectJson" style="height: 100%">
  7165. <div class="select_box1" v-if="selectSteps == 1">
  7166. <div class="select_box1_img">
  7167. <div class="select_box1_title">
  7168. <span>{{ lang.ssUploadQuesImg }}</span><span>{{ lang.ssTipUpload }}</span>
  7169. </div>
  7170. <div class="select_box1_add_img">
  7171. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  7172. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  7173. <img src="../../../assets/icon/addPoster.png" alt="" />
  7174. </div>
  7175. <div class="isSysPic" v-else>
  7176. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7177. <div class="deletePic" @click="deleteSelectPic">
  7178. <img src="../../../assets/icon/delete.png" alt="" />
  7179. </div>
  7180. </div>
  7181. </div>
  7182. </div>
  7183. <div class="select_box1_select">
  7184. <div class="select_box1_title">
  7185. <span>{{ lang.ssAddOpt }}</span><span>{{ lang.ssTipEnterOpt }}</span>
  7186. </div>
  7187. <div class="select_box1_select_box">
  7188. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  7189. v-model="selectJson.select[checkIndex]" :placeholder="lang.ssEnterOpt"
  7190. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  7191. <div class="select_box1_select_box_add">
  7192. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  7193. {{ lang.ssAdd }}</el-button>
  7194. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  7195. v-if="selectJson.select && selectJson.select.length > 0">{{ lang.ssDelete }}</el-button>
  7196. </div>
  7197. </div>
  7198. </div>
  7199. </div>
  7200. <div v-if="selectSteps == 2" style="height: 100%">
  7201. <div class="select_box2">
  7202. <div class="select_box2_title">{{ lang.ssSetCorrect }}</div>
  7203. <div class="select_box2_box">
  7204. <div class="select_box2_img">
  7205. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7206. </div>
  7207. <div class="select_box2_answer">
  7208. <div class="select_answer_title">{{ lang.ssSelectAns }}</div>
  7209. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  7210. <span>{{ checkIndex + 1 }}、</span>
  7211. <el-select v-model="selectJson.answer[checkIndex]" :placeholder="lang.ssSelectCorrect">
  7212. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  7213. </el-option>
  7214. </el-select>
  7215. </div>
  7216. </div>
  7217. </div>
  7218. </div>
  7219. </div>
  7220. </div>
  7221. <span slot="footer" class="dialog-footer">
  7222. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">{{ lang.ssNextStep }}</el-button>
  7223. <el-button @click="selectSteps--" v-if="selectSteps == 2">{{ lang.ssLastStep }}</el-button>
  7224. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">{{ lang.ssConfirm }}</el-button>
  7225. </span>
  7226. </el-dialog>
  7227. <el-dialog :title="lang.ssAddEva" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  7228. :before-close="handleClose" class="dialog_diy">
  7229. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  7230. <div style="font-size: 18px; color: #a9a9a9">{{ lang.ssEnterEva }}</div>
  7231. <div class="pjCss" style="width: 100%">
  7232. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  7233. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  7234. <span style="min-width: 100px; text-align: right">{{ lang.ssEvaCriteria }}</span>
  7235. <input type="input" v-model="eItem.value" :placeholder="lang.ssFillEvaDim" />
  7236. <div class="remove" @click="deletRateList(eIndex)"></div>
  7237. <div style="width: 100%; display: flex">
  7238. <span style="min-width: 100px; text-align: right">{{ lang.ssRatingLevel }}</span>
  7239. <el-rate v-model="eItem.score" disabled></el-rate>
  7240. </div>
  7241. <div class="elist_inptu_text" style="align-items: flex-start">
  7242. <span style="min-width: 100px; text-align: right">{{ lang.ssDesc }}</span>
  7243. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" :placeholder="lang.ssFillDimDesc"></textarea>
  7244. </div>
  7245. </div>
  7246. </div>
  7247. <div class="addToolFun" @click="addRateList()">
  7248. <div class="addToolImg">
  7249. <img src="../../../assets/icon/add.png" alt />
  7250. </div>
  7251. <div>{{ lang.ssAdd }}</div>
  7252. </div>
  7253. </div>
  7254. </div>
  7255. <span slot="footer" class="dialog-footer">
  7256. <el-button @click="dialogVisibleRate = false">{{ lang.ssCancel }}</el-button>
  7257. <el-button type="primary" @click="addRateAnswer">{{ lang.ssConfirm }}</el-button>
  7258. </span>
  7259. </el-dialog>
  7260. <el-dialog :title="lang.ssSortSet" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7261. closePan(47);
  7262. }
  7263. " class="dialog_diy dialog_diy3 fullStyle">
  7264. <div style="height: 100%">
  7265. <div class="sentenBox" style="height: 100%">
  7266. <div class="addSen" @click="addSt">{{ lang.ssAddQues2 }}</div>
  7267. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7268. <div class="sentenTopBox">
  7269. <div class="sentenTop" :index="stIndex + 1">
  7270. <div>{{ lang.ssQuesSet }}</div>
  7271. <div>
  7272. <el-input :placeholder="lang.ssEnterCard" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7273. </div>
  7274. <div @click="addSen(stIndex)">{{ lang.ssAdd }}</div>
  7275. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7276. </div>
  7277. </div>
  7278. <div class="cardList">
  7279. <div v-if="st.addSentence.length > 0" class="cardBox">
  7280. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7281. @click="setRightAnswer(s, stIndex, sIndex)">
  7282. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7283. <div>{{ s }}</div>
  7284. </el-tooltip>
  7285. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7286. <img src="../../../assets/icon/delete.png" alt="" />
  7287. </div>
  7288. </div>
  7289. </div>
  7290. <div class="card">
  7291. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7292. </div>
  7293. </div>
  7294. <div class="rightCardBox">
  7295. <div>{{ lang.ssCorrectOrder }}</div>
  7296. <div class="rightCardList">
  7297. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7298. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7299. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7300. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7301. <div>{{ r }}</div>
  7302. </el-tooltip>
  7303. </div>
  7304. <div>{{ rIndex + 1 }}</div>
  7305. </div>
  7306. </div>
  7307. <div class="card" v-if="st.rightAnswer.length == 0">
  7308. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7309. </div>
  7310. <div class="card" v-else>
  7311. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7312. </div>
  7313. </div>
  7314. </div>
  7315. </div>
  7316. </div>
  7317. </div>
  7318. <span slot="footer" class="dialog-footer">
  7319. <el-button @click="closePan(47)">{{ lang.ssCancel }}</el-button>
  7320. <el-button type="primary" @click="addSentenceTool">{{ lang.ssConfirm }}</el-button>
  7321. </span>
  7322. </el-dialog>
  7323. <el-dialog :title="lang.ssAddTable" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7324. :before-close="handleClose" class="dialog_diy">
  7325. <el-form>
  7326. <!-- <el-form-item label="文本标题">
  7327. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7328. </el-form-item> -->
  7329. <div>{{ lang.ssTableContent }}</div>
  7330. <Table v-model="tableJson.text" @change="change"></Table>
  7331. </el-form>
  7332. <span slot="footer" class="dialog-footer">
  7333. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7334. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7335. <el-button type="primary" @click="addTableJson">{{ lang.ssUploadTemp }}</el-button>
  7336. </span>
  7337. </el-dialog>
  7338. <el-dialog :title="lang.ssAddDoc" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7339. :before-close="handleClose" class="dialog_diy">
  7340. <el-form>
  7341. <!-- <el-form-item label="文本标题">
  7342. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7343. </el-form-item> -->
  7344. <div>{{ lang.ssDocContent }}</div>
  7345. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7346. </el-form>
  7347. <span slot="footer" class="dialog-footer">
  7348. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7349. <el-button type="primary" @click="addWordJson">{{ lang.ssUploadTemp }}</el-button>
  7350. </span>
  7351. </el-dialog>
  7352. <el-dialog :title="lang.ssAddClass" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7353. :before-close="handleClose" class="dialog_diy">
  7354. <div style="
  7355. width: 100%;
  7356. display: flex;
  7357. flex-direction: row;
  7358. flex-wrap: nowrap;
  7359. align-items: center;
  7360. justify-content: center;
  7361. ">
  7362. <div>{{ lang.ssClassColon }}</div>
  7363. <el-select multiple v-model="uploadJson" :placeholder="lang.ssSelect">
  7364. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7365. </el-option>
  7366. </el-select>
  7367. </div>
  7368. <span slot="footer" class="dialog-footer">
  7369. <el-button @click="dialogVisibleMoreUpload = false">{{ lang.ssCancel }}</el-button>
  7370. <el-button type="primary" @click="addMoreUpload">{{ lang.ssConfirm }}</el-button>
  7371. </span>
  7372. </el-dialog>
  7373. <el-dialog :title="lang.ssSetRandom" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7374. :before-close="handleClose" class="dialog_diy">
  7375. <div style="
  7376. width: 100%;
  7377. display: flex;
  7378. flex-direction: row;
  7379. flex-wrap: nowrap;
  7380. align-items: center;
  7381. justify-content: center;
  7382. ">
  7383. <div>{{ lang.ssRandomColon }}</div>
  7384. <el-input v-model="icode" style="width: 240px" :placeholder="lang.ssEnterRandom"></el-input>
  7385. </div>
  7386. <span slot="footer" class="dialog-footer">
  7387. <el-button @click="dialogVisibleInvite = false">{{ lang.ssCancel }}</el-button>
  7388. <el-button type="primary" @click="addInvite">{{ lang.ssConfirm }}</el-button>
  7389. </span>
  7390. </el-dialog>
  7391. <el-dialog :title="lang.ssAddPreTime" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7392. :before-close="handleClose" class="dialog_diy">
  7393. <div>
  7394. <div style="margin-bottom: 20px; color: #999">
  7395. {{ lang.ssTipClick }}
  7396. </div>
  7397. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7398. </div>
  7399. <span slot="footer" class="dialog-footer">
  7400. <el-button @click="dialogVisiblePreTime = false">{{ lang.ssCancel }}</el-button>
  7401. <el-button type="primary" @click="addPreTime">{{ lang.ssConfirm }}</el-button>
  7402. </span>
  7403. </el-dialog>
  7404. <el-dialog :title="lang.ssImportTarget" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7405. :before-close="handleClose" class="dialog_diy">
  7406. <div>
  7407. <div style="
  7408. width: 100%;
  7409. display: flex;
  7410. flex-direction: row;
  7411. flex-wrap: nowrap;
  7412. align-content: center;
  7413. align-items: center;
  7414. justify-content: space-between;
  7415. ">
  7416. <div style="
  7417. display: flex;
  7418. flex-flow: row nowrap;
  7419. align-items: flex-start;
  7420. width: 100%;
  7421. flex-direction: column;
  7422. flex-wrap: nowrap;
  7423. position: relative;
  7424. ">
  7425. <div class="e_box">
  7426. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7427. <div class="e_card_picture">
  7428. <img src="../../../assets/e_picture.png" />
  7429. </div>
  7430. <div class="e_card_name">
  7431. <span>{{ item.title }}</span>
  7432. </div>
  7433. <div class="e_card_btn">
  7434. <span @click="checkEva(item.id, 2)">导入</span>
  7435. </div>
  7436. </div> -->
  7437. <!-- <div class="addEva" @click="openT">
  7438. <img src="../../../assets/icon/addEva.png" alt="" />
  7439. </div> -->
  7440. <div style="
  7441. display: flex;
  7442. justify-content: flex-end;
  7443. margin-bottom: 10px;
  7444. ">
  7445. <el-button @click="openT" type="primary" size="small">{{ lang.ssAddTarget }}</el-button>
  7446. </div>
  7447. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7448. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7449. <el-table-column :label="lang.ssTargetName" min-width="15" align="center" prop="title">
  7450. </el-table-column>
  7451. <el-table-column prop="username" :label="lang.ssOwner" min-width="15" align="center">
  7452. </el-table-column>
  7453. <el-table-column :label="lang.ssAction" width="250px">
  7454. <template slot-scope="scope">
  7455. <div class="btnBox">
  7456. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">{{ lang.ssImport }}</el-button>
  7457. </div>
  7458. </template>
  7459. </el-table-column>
  7460. </el-table>
  7461. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7462. {{ lang.ssNoData }}
  7463. </div>
  7464. </div>
  7465. </div>
  7466. </div>
  7467. </div>
  7468. <span slot="footer" class="dialog-footer">
  7469. <el-button @click="dialogVisiblemb = false">{{ lang.ssCancel }}</el-button>
  7470. </span>
  7471. </el-dialog>
  7472. <el-dialog :title="lang.ssGroupSet" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7473. :before-close="handleClose" class="dialog_diy">
  7474. <div class="groupBox">
  7475. <div v-if="groupJson.group" class="groupContent">
  7476. <div class="groupTitle">{{ lang.ssSetGroupNum }}</div>
  7477. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7478. <span class="groupn">{{ lang.ssGroupName.replace(/\*/g, index + 1) }}</span>
  7479. <el-input v-model="item.name" :placeholder="lang.ssEnterName2" style="width: 250px"></el-input>
  7480. <div class="groupBtn">
  7481. <el-button type="primary" size="small" @click="addGroup(index)"
  7482. v-if="groupJson.group.length - 1 == index">
  7483. {{ lang.ssAdd }}</el-button>
  7484. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7485. v-if="groupJson.group && groupJson.group.length > 1">{{ lang.ssDelete }}</el-button>
  7486. </div>
  7487. </div>
  7488. </div>
  7489. <div class="groupContent">
  7490. <div class="groupTitle">{{ lang.ssSetGroupPer }}</div>
  7491. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7492. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7493. <el-input v-model="groupJson.number" style="width: 150px" :placeholder="lang.ssEnterNum"
  7494. @change="numberPan"></el-input>
  7495. </div>
  7496. </div>
  7497. <span slot="footer" class="dialog-footer">
  7498. <el-button @click="dialogVisibleGroup = false">{{ lang.ssCancel }}</el-button>
  7499. <el-button type="primary" @click="addGroupJson">{{ lang.ssConfirm }}</el-button>
  7500. </span>
  7501. </el-dialog>
  7502. <el-dialog :title="lang.ssModifyName" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7503. :before-close="handleClose" class="dialog_diy">
  7504. <div style="
  7505. width: 100%;
  7506. display: flex;
  7507. flex-direction: row;
  7508. flex-wrap: nowrap;
  7509. align-items: center;
  7510. justify-content: center;
  7511. ">
  7512. <div style="min-width: fit-content">{{ lang.ssFileNameColon }}</div>
  7513. <el-input v-model="line" :placeholder="lang.ssEnterModify"></el-input>
  7514. </div>
  7515. <span slot="footer" class="dialog-footer">
  7516. <el-button @click="dialogVisibleupdataVideoT = false">{{ lang.ssCancel }}</el-button>
  7517. <el-button type="primary" @click="updataVideoC">{{ lang.ssConfirm }}</el-button>
  7518. </span>
  7519. </el-dialog>
  7520. <el-dialog :title="lang.ssCreateEssay" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7521. closePan(69);
  7522. }
  7523. " class="dialog_diy fullStyle fullStyle1">
  7524. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7525. <span slot="footer" class="dialog-footer">
  7526. <el-button @click="englishDialogVisible = false">{{ lang.ssCancel }}</el-button>
  7527. <el-button type="primary" @click="addEnglish">{{ lang.ssConfirm }}</el-button>
  7528. </span>
  7529. </el-dialog>
  7530. <el-dialog :title="lang.ssSelectTemp" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7531. :before-close="handleClose" class="dialog_diy">
  7532. <div class="template_box">
  7533. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7534. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7535. <div class="wordPic">
  7536. <img src="../../../assets/icon/new/course_template.png" alt />
  7537. </div>
  7538. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7539. <div style="
  7540. margin-top: 10px;
  7541. line-height: 19px;
  7542. overflow: hidden;
  7543. text-overflow: ellipsis;
  7544. white-space: nowrap;
  7545. padding: 0 10px;
  7546. box-sizing: border-box;
  7547. width: 100%;
  7548. ">
  7549. {{ aa.title }}
  7550. </div>
  7551. </el-tooltip>
  7552. </div>
  7553. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7554. :class="{ wordTeacherA: ctJson.id == 1 }">
  7555. <div class="wordPic">
  7556. <img src="../../../assets/icon/new/course_template.png" alt />
  7557. </div>
  7558. <div style="
  7559. margin-top: 10px;
  7560. line-height: 19px;
  7561. overflow: hidden;
  7562. text-overflow: ellipsis;
  7563. white-space: nowrap;
  7564. padding: 0 20px;
  7565. ">
  7566. {{ lang.ssSimpleTemp }}
  7567. </div>
  7568. </div>
  7569. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7570. :class="{ wordTeacherA: ctJson.id == 2 }">
  7571. <div class="wordPic">
  7572. <img src="../../../assets/icon/new/course_template.png" alt />
  7573. </div>
  7574. <div style="
  7575. margin-top: 10px;
  7576. line-height: 19px;
  7577. overflow: hidden;
  7578. text-overflow: ellipsis;
  7579. white-space: nowrap;
  7580. padding: 0 20px;
  7581. ">
  7582. {{ lang.ssSmartPaste }}
  7583. </div>
  7584. </div>
  7585. </div>
  7586. <span slot="footer" class="dialog-footer">
  7587. <el-button @click="templateDialog = false">{{ lang.ssCancel }}</el-button>
  7588. <el-button type="primary" @click="addTemplate(ctJson)">{{ lang.ssConfirm }}</el-button>
  7589. </span>
  7590. </el-dialog>
  7591. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7592. <el-dialog :title="lang.ssChangeStage" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7593. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7594. <div class="change_stageBox">
  7595. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7596. <div class="nt_taskBox">
  7597. <div class="nt_taskTitle">{{ lang.ssStageNum.replace(/\*/g, tIndex + 1) }}</div>
  7598. <div class="nt_taskName">
  7599. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7600. <span>{{ t.dyName }}</span>
  7601. </el-tooltip>
  7602. </div>
  7603. </div>
  7604. <div class="moveBtn" v-if="unitJson3.length > 1">
  7605. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7606. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7607. </div>
  7608. </div>
  7609. </div>
  7610. <span slot="footer" class="dialog-footer">
  7611. <el-button @click="dialogVisibleStageChange = false">{{ lang.ssCancel }}</el-button>
  7612. <el-button type="primary" @click="updateChange">{{ lang.ssConfirm }}</el-button>
  7613. </span>
  7614. </el-dialog>
  7615. <el-dialog :title="lang.ssAddResTemp" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7616. :before-close="handleClose" class="dialog_diy">
  7617. <div class="addTypeChoose" style="justify-content: center">
  7618. <div style="min-width: 100px">{{ lang.ssTempName }}</div>
  7619. <el-input v-model="templateName" style="width: 200px"></el-input>
  7620. </div>
  7621. <div class="addTypeBox">
  7622. <div class="addTypeChoose">
  7623. <div style="min-width: 100px">{{ lang.ssSelectOne }}</div>
  7624. <el-select v-model="setTypeJson.one" :placeholder="lang.ssSelect" @change="getTwoType(setTypeJson.one)"
  7625. style="width: 200px">
  7626. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7627. </el-option>
  7628. </el-select>
  7629. </div>
  7630. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7631. <div style="min-width: 100px">{{ lang.ssSelectTwo }}</div>
  7632. <el-select v-model="setTypeJson.two" :placeholder="lang.ssSelect" style="width: 200px">
  7633. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7634. </el-option>
  7635. </el-select>
  7636. </div>
  7637. </div>
  7638. <span slot="footer" class="dialog-footer">
  7639. <el-button type="primary" @click="addCETemplate()">{{ lang.ssConfirm2 }}</el-button>
  7640. <el-button @click="close()">{{ lang.ssClose }}</el-button>
  7641. </span>
  7642. </el-dialog>
  7643. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7644. </evaBox>
  7645. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7646. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7647. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7648. @aiConfirm="aiConfirm" :clickType="clickType">
  7649. </aiDialog>
  7650. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7651. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7652. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7653. <div class="box" v-show="pptBoxDialog">
  7654. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7655. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7656. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7657. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7658. :unitJson="unitJson" :ref="'ppt'+index"
  7659. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7660. </div>
  7661. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7662. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7663. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? lang.ssFold : lang.ssExpand }}</span>
  7664. </div>
  7665. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7666. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7667. </aiCreateVideoDialog>
  7668. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7669. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7670. <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
  7671. <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
  7672. <selectHtmlPageDialog ref="selectHtmlPageDialogRef" @success="selectHtmlPageSuccess"/>
  7673. </div>
  7674. </template>
  7675. <script>
  7676. import "../../../common/aws-sdk-2.235.1.min.js";
  7677. import { tools as toolsData } from "../../../common/tools.js";
  7678. // import "../../../common/aws-sdk-2.99.0.min.js";
  7679. import $ from "jquery";
  7680. import EditorBar from "../../../components/tools/wangEnduit";
  7681. import Table from "../../../components/tools/table";
  7682. import Mind from "../../tools/jsmind2";
  7683. import Time from "../../tools/time.vue";
  7684. import Sunburst from "../../tools/sunburst";
  7685. import SeeBoard from "../../tools/seeBoard";
  7686. import weilaiData from "../components/weilai.js";
  7687. import sourceDialog from "../teacherSource/dialog.vue";
  7688. import interVideo from "../interVideo/index.vue";
  7689. import englishRight from "../components/englishRight.vue";
  7690. import evaBox from "../evaBox/index.vue";
  7691. import EnglishVoice from "../EnglishVoice/index.vue";
  7692. import aiBox from './aiBox.vue'
  7693. import aiBoxRight from './aiBoxRight.vue'
  7694. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7695. import recordV from './record.vue'
  7696. import aiDialog from './aiDialog'
  7697. import aiTips from './aiTips.vue'
  7698. import tipsDialog from './tipsDialog.vue'
  7699. import { v4 as uuidv4 } from "uuid";
  7700. import MarkdownIt from "markdown-it";
  7701. import aiCreateDialog from './aiCreateDialog.vue'
  7702. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7703. import wpdf from "../test/file/wPdf2.vue";
  7704. import wOffice from "../test/file/wOffice.vue";
  7705. import htmlDocx from "html-docx-js/dist/html-docx";
  7706. import TurndownService from 'turndown';
  7707. import JSZip from "jszip";
  7708. import evaList from "./evaList.vue";
  7709. import MindTask from "./jsmind2";
  7710. import ConvertApi from 'convertapi-js'
  7711. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7712. import appDialog from '../components/appDialog.vue'
  7713. import { myMixin } from "@/mixins/mixin.js"
  7714. import CodeEditor from "../components/CodeEditor";
  7715. import { uploadFileMixin } from "../../tools/uploadFileMixin.js";
  7716. var OpenCC = require("opencc-js");
  7717. let converter = OpenCC.Converter({
  7718. from:'hk',
  7719. to:'cn'
  7720. })
  7721. let converter2 = OpenCC.Converter({
  7722. from:'cn',
  7723. to:'hk'
  7724. })
  7725. import selectHtmlPageDialog from '../dialog/selectHtmlPageDialog.vue'
  7726. const getFile = (url) => {
  7727. return new Promise((resolve, reject) => {
  7728. var credentials = {
  7729. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7730. secretAccessKey: "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",
  7731. }; //秘钥形式的登录上传
  7732. window.AWS.config.update(credentials);
  7733. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7734. let url2 = url;
  7735. let _url2 = "";
  7736. if (
  7737. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7738. ) {
  7739. _url2 = url2.split(
  7740. "https://view.officeapps.live.com/op/view.aspx?src="
  7741. )[1];
  7742. } else {
  7743. _url2 = url2;
  7744. }
  7745. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7746. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7747. var params = {
  7748. Bucket: "ccrb",
  7749. Key: name
  7750. };
  7751. s3.getObject(params, function (err, data) {
  7752. if (err) {
  7753. console.log(err, err.stack)
  7754. resolve({ data: 1 });
  7755. }else {
  7756. resolve({ data: data.Body });
  7757. console.log(data);
  7758. } // sxuccessful response
  7759. });
  7760. });
  7761. };
  7762. export default {
  7763. mixins: [ myMixin,uploadFileMixin ],
  7764. components: {
  7765. CodeEditor,
  7766. EditorBar,
  7767. Mind,
  7768. Time,
  7769. Sunburst,
  7770. SeeBoard,
  7771. Table,
  7772. sourceDialog,
  7773. interVideo,
  7774. englishRight,
  7775. evaBox,
  7776. EnglishVoice,
  7777. aiBox,
  7778. aiBoxRight,
  7779. aiBoxCourseDetail,
  7780. aiDialog,
  7781. aiTips,
  7782. tipsDialog,
  7783. aiCreateDialog,
  7784. aiCreateVideoDialog,
  7785. wpdf,
  7786. wOffice,
  7787. evaList,
  7788. MindTask,
  7789. recordV,
  7790. appDialog,
  7791. selectHtmlPageDialog
  7792. },
  7793. data() {
  7794. return {
  7795. gotype: (window.topU && window.topU.gotype) ? window.topU.gotype : '',
  7796. checkAll: false,
  7797. checkAll2: false,
  7798. chooseType: 1,
  7799. checkedCities: [],
  7800. isIndeterminate: true,
  7801. isIndeterminate2: true,
  7802. isSysPic: false,
  7803. isSysPic2: false,
  7804. steps: 1,
  7805. stepsNav: 1,
  7806. nbOrder: 0,
  7807. courseId: "",
  7808. chapToolsType: 0,
  7809. chapTools: [
  7810. {
  7811. tools: [],
  7812. toolDetail: "",
  7813. },
  7814. ],
  7815. line: "",
  7816. lineTitle: "",
  7817. sysPic: [],
  7818. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7819. sentenceList2: [],
  7820. isPushTitleList: [],
  7821. lineCount: 0,
  7822. lineType: 0,
  7823. chapCount: 0,
  7824. courseName: "",
  7825. isTeacherSee: false,
  7826. courseText: "",
  7827. textLoading: false,
  7828. ttextLoading: false,
  7829. courseText2: "",
  7830. preTime: 0,
  7831. formLabelWidth: "100px",
  7832. choosePicVisible: false,
  7833. sysPicVisible: false,
  7834. sysPicVisible2: false,
  7835. uploadLoading1: false,
  7836. noneBtnImg: false,
  7837. updateBoolean2: false,
  7838. unitIndex: 0,
  7839. taskCount: 0,
  7840. dialogVisible: false,
  7841. dialogVisible1: false,
  7842. dialogVisible2: false,
  7843. dialogVisible3: false,
  7844. dialogVisible4: false,
  7845. dialogVisible5: false,
  7846. dialogVisible6: false,
  7847. dialogVisible7: false,
  7848. dialogVisible8: false,
  7849. dialogVisible9: false,
  7850. dialogVisibleClass: false,
  7851. dialogVisibleMember: false,
  7852. dialogVisibleMp3: false,
  7853. dialogVisibleSelect: false,
  7854. dialogVisibleSentence: false,
  7855. dialogVisibleRate: false,
  7856. dialogVisibleChoice: false,
  7857. dialogVisiblemb: false,
  7858. dialogVisibleInvite: false,
  7859. dialogVisibleSource: false,
  7860. dialogVisibleVideo: false,
  7861. dialogVisibleStageChange: false,
  7862. dialogVisibleupdataVideoT: false,
  7863. englishDialogVisible: false,
  7864. templateDialog: false,
  7865. ctJson: {},
  7866. isClickColor: 1,
  7867. toolIndexType: "",
  7868. publicTool: 0,
  7869. searchPeople: "",
  7870. searchTN: "",
  7871. collid: '',
  7872. CollLoading: false,
  7873. userid: this.$route.query.userid,
  7874. oid: this.$route.query.oid,
  7875. org: this.$route.query.org,
  7876. role: this.$route.query.role,
  7877. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7878. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7879. dialogVisibleTable: false,
  7880. dialogVisibleWord: false,
  7881. tableJson: { text: "" },
  7882. wordJson: { text: "" },
  7883. dialogVisibleMoreUpload: false,
  7884. dialogVisiblePreTime: false,
  7885. uploadJson: [],
  7886. classJuri: [],
  7887. gradeList: [],
  7888. cover: [], //课程封面
  7889. myWord: [],
  7890. evaJuri: [],
  7891. evalua: "",
  7892. targetArray: [],
  7893. eTitle: "",
  7894. eJson: {},
  7895. fid: "", //一级
  7896. sid: "", //二级
  7897. tid: "", //二级
  7898. typeMode: 3,
  7899. eJSONNum: 0,
  7900. data: {
  7901. meta: {
  7902. name: "example",
  7903. author: "dd@163.com",
  7904. version: "0.2",
  7905. },
  7906. format: "node_array",
  7907. data: [{ id: "root", isroot: true, topic: "" }],
  7908. },
  7909. askJson: {
  7910. askCount: 1,
  7911. askTitle: "",
  7912. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7913. },
  7914. askJson2: {},
  7915. testJson: {},
  7916. testJson2: {},
  7917. selectJson: {},
  7918. selectJson2: {},
  7919. rateJson: [],
  7920. unitJson2: [],
  7921. unitJson3: [],
  7922. unitJson: [
  7923. {
  7924. dyName: "", //单元标题
  7925. chapterInfo: [
  7926. {
  7927. isread: false,
  7928. chapterid: this.guid(),
  7929. title: "",
  7930. courseName: "",
  7931. taskJson: [
  7932. {
  7933. task: "",
  7934. taskDetail: "",
  7935. chapterData: [],
  7936. toolText: "",
  7937. toolChoose: [
  7938. {
  7939. tool: [],
  7940. toolDetail: "",
  7941. toolType: 0,
  7942. askCount: 1,
  7943. askTitle: "",
  7944. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7945. },
  7946. ],
  7947. isShowTools: false,
  7948. askCount: 1,
  7949. isFold: 1,
  7950. askTitle: "",
  7951. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7952. checkJson: [{ checkCount: [], checkPerent: [] }],
  7953. homeworkList: [],
  7954. },
  7955. ],
  7956. itemCount: 1,
  7957. fileList1: [],
  7958. video: [],
  7959. testData: [],
  7960. pData: [],
  7961. templateArray: [],
  7962. },
  7963. ],
  7964. },
  7965. ],
  7966. templateArray: [],
  7967. studentJuri: [],
  7968. teacherJuri: [],
  7969. CollaborativeTeaList: [],
  7970. checkboxList: [],
  7971. checkboxList2: [],
  7972. checkboxList3: [],
  7973. classSearch: "",
  7974. gradeId: "",
  7975. number: "",
  7976. tTitle: "",
  7977. tdetail: "",
  7978. templateC: {},
  7979. AttText: {},
  7980. AttTextType: 0,
  7981. AttTextIndex: 0,
  7982. cTemplate: "",
  7983. CourseType: [],
  7984. CourseType1: [],
  7985. CourseType2: [],
  7986. CourseTypeJson: {},
  7987. CourseTypeJson1: {},
  7988. courseTypeId: [],
  7989. courseTypeId1: [],
  7990. courseTypeSon: [],
  7991. clearArray: [],
  7992. pTypeCheck: [],
  7993. pTypeCheckName: [],
  7994. loading: false,
  7995. toolType: 0,
  7996. inputShow: true,
  7997. inputShow2: true,
  7998. toolIndex: 0,
  7999. cidType: 0,
  8000. answerQ: "",
  8001. answerQ2: "",
  8002. grade: [],
  8003. grade2: [],
  8004. courseUserid: "",
  8005. timer: null,
  8006. timer2: null,
  8007. pasteTimer: null,
  8008. checkId: "",
  8009. isDelete: 1,
  8010. addindex: 0,
  8011. selectSteps: 1,
  8012. groupJson: {},
  8013. dialogVisibleGroup: false,
  8014. rightBoxHeight: 0,
  8015. ManAarray: [],
  8016. checkBoolean: false,
  8017. inviteCode: [],
  8018. inviteId: "",
  8019. icode: "",
  8020. easyArray: [2, 4],
  8021. sourceData: {},
  8022. updateSourcePan: false,
  8023. videoJson: {},
  8024. isBtnDisplay: false,
  8025. isStepDisplay: false,
  8026. isPasteStage: false,
  8027. isPasteTask: false,
  8028. isPasteChoice: false,
  8029. imageList: [],
  8030. imageloading: false,
  8031. imageloading2: false,
  8032. searchImageValue: "",
  8033. ppage: 1,
  8034. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  8035. oldIndex: 0,
  8036. dragType: "",
  8037. oldUnitIndex: 0,
  8038. oldData: null,
  8039. newIndex: "",
  8040. englishList: {},
  8041. typeIndex: "",
  8042. courseState: 5,
  8043. taskJSONa: [
  8044. {
  8045. task: "",
  8046. taskDetail: "",
  8047. chapterData: [],
  8048. toolText: "",
  8049. toolChoose: [
  8050. {
  8051. tool: [],
  8052. toolDetail: "",
  8053. toolType: 0,
  8054. askCount: 1,
  8055. askTitle: "",
  8056. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8057. },
  8058. ],
  8059. isShowTools: false,
  8060. askCount: 1,
  8061. isFold: 1,
  8062. askTitle: "",
  8063. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8064. checkJson: [{ checkCount: [], checkPerent: [] }],
  8065. homeworkList: [],
  8066. },
  8067. ],
  8068. checkUnitIndex: 0,
  8069. isdrag: "",
  8070. evaIndex: "",
  8071. evatIndex: "",
  8072. evaBoxDialog: false,
  8073. EnglishVoiceDialog: false,
  8074. englishVoiceJson: {},
  8075. cetIndex: "",
  8076. cettIndex: "",
  8077. cetBoxDialog: false,
  8078. templateName: "",
  8079. setTypeJson: {
  8080. one: "",
  8081. two: "",
  8082. },
  8083. twoJson: [],
  8084. oneJson: [],
  8085. updateKey: 1,
  8086. isOutline: false,
  8087. isOutline2: false,
  8088. infoData: [],
  8089. infoproVisible: false,
  8090. infoisFinishSize: 0,
  8091. infoisAllSize: 0,
  8092. infoprogress: 0,
  8093. taskDetailLoading: [],
  8094. ttaskDetailLoading: [],
  8095. taskDetailLoading2: [],
  8096. ttaskDetailLoading2: [],
  8097. taskDetailLoading3: [],
  8098. ttaskDetailLoading3: [],
  8099. taskDetailLoading4: [],
  8100. taskDetailLoading5: [],
  8101. ttaskDetailLoading5: [],
  8102. dArray: [],
  8103. dialogVisibleAiD: false,
  8104. aitype: "",
  8105. aiJson: {
  8106. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  8107. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  8108. "aiTask": "请根据<教学任务教案>。",
  8109. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  8110. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  8111. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  8112. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  8113. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  8114. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  8115. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  8116. },
  8117. aiText: "",
  8118. aiText2: "",
  8119. aiText3: "",
  8120. aiCallBack: "",
  8121. aiIndex: "",
  8122. clickType: 1,
  8123. promptShow: false,
  8124. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  8125. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  8126. dialogVisibleTips: false,
  8127. tipsJson: {},
  8128. cpote:{
  8129. cpote1: '',
  8130. cpote2: '',
  8131. cpote3: '',
  8132. cpote4: '',
  8133. },
  8134. cpoteLoading:{
  8135. cpote1: false,
  8136. cpote2: false,
  8137. cpote3: false,
  8138. cpote4: false,
  8139. },
  8140. cpotetLoading:{
  8141. cpote1: false,
  8142. cpote2: false,
  8143. cpote3: false,
  8144. cpote4: false,
  8145. },
  8146. cpoteType: 0,
  8147. dialogVisibleAiCreate: false,
  8148. dialogVisibleAiCreate2: [],
  8149. pptBoxDialog: true,
  8150. pptCount: [],
  8151. dialogVisibleAiCreateVideo: false,
  8152. teacherText: [],
  8153. isFileSearch: true,
  8154. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  8155. 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'],
  8156. courseJie:1,
  8157. courseTime:45,
  8158. allTextArray: [],
  8159. dialogVisiblePdf: false,
  8160. dialogVisibleOffice: false,
  8161. wurl: "",
  8162. choiceLoading: false,
  8163. teacherInfoData: [],
  8164. teacherinfoproVisible: false,
  8165. teacherinfoisFinishSize: 0,
  8166. teacherinfoisAllSize: 0,
  8167. teacherinfoprogress: 0,
  8168. teacherCourseText: "",
  8169. teacherTextLoading: false,
  8170. tteacherTextLoading: false,
  8171. targetCourseText: "",
  8172. targetTextLoading: false,
  8173. ttargetTextLoading: false,
  8174. cankaoInfoData: [],
  8175. fileSLoading: false,
  8176. infoData2: [],
  8177. isuseT: false,
  8178. mode: 1,
  8179. targetCourseText2: "",
  8180. targetTextLoading2: false,
  8181. ttargetTextLoading2: false,
  8182. courseTextBool: false,
  8183. teacherCourseTextB: true,
  8184. targetCourseTextB: true,
  8185. courseTextB: true,
  8186. targetCourseText2B: true,
  8187. // 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'],
  8188. yiKeTemplateArray:[],
  8189. taskLoading: [],
  8190. ruleLoading: [],
  8191. mubiaoInfoData: [],
  8192. mubiaoinfoproVisible: false,
  8193. mubiaoinfoisFinishSize: 0,
  8194. mubiaoinfoisAllSize: 0,
  8195. mubiaoinfoprogress: 0,
  8196. xuanzeInfoData: [],
  8197. xuanzeinfoproVisible: false,
  8198. xuanzeinfoisFinishSize: 0,
  8199. xuanzeinfoisAllSize: 0,
  8200. xuanzeinfoprogress: 0,
  8201. pingjiaInfoData: [],
  8202. pingjiainfoproVisible: [],
  8203. pingjiainfoisFinishSize: [],
  8204. pingjiainfoisAllSize: [],
  8205. pingjiainfoprogress: [],
  8206. taskGLoading: [],
  8207. ttaskGLoading: [],
  8208. isOutlineCancelToken: null,
  8209. isFileCancelToken: null,
  8210. isTargetCancelToken1: null,
  8211. isTargetCancelToken2: null,
  8212. isTextCancelToken: null,
  8213. isTeacherTextCancelToken: null,
  8214. isTeacherTaskCancelToken: null,
  8215. isOutlineTaskCancelToken: [],
  8216. isTeacherTaskCancelToken2: [],
  8217. isTeacherTaskCancelSource: [],
  8218. isTextCancelSource: null,
  8219. isOutlineTaskCancelSource: [],
  8220. isTeacherTextCancelSource: null,
  8221. isTargetCancelSource1: null,
  8222. isTargetCancelSource2: null,
  8223. fileidArray: [],
  8224. interPan: true,
  8225. interFlash: true,
  8226. agentid: "",
  8227. interSetting: false,
  8228. chatid: "",
  8229. languageSetting: 0, //0中文 1繁体 2英文
  8230. isQuote: {},
  8231. knowFileArray: [],
  8232. knowInfoData: [],
  8233. knowinfoproVisible: false,
  8234. knowinfoisFinishSize: 0,
  8235. knowinfoisAllSize: 0,
  8236. knowinfoprogress: 0,
  8237. knowFileids: [],
  8238. searchFileName: "",
  8239. knowInfoDataLoading: false,
  8240. isfindMatchingContents: null,
  8241. findMatchingContentsPage: 1,
  8242. findMatchingContentsFinish: false,
  8243. knowInfoData2: [],
  8244. knowinfoproVisible2: false,
  8245. knowinfoisFinishSize2: 0,
  8246. knowinfoisAllSize2: 0,
  8247. knowinfoprogress2: 0,
  8248. knowFileids2: [],
  8249. knowInfoData3: [],
  8250. knowFileids3: [],
  8251. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8252. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41, 72],
  8253. taskAnLoading: [],
  8254. taskAnCancelToken: [],
  8255. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8256. taskCancelToken1: [],
  8257. isTaskCancelSource1: [],
  8258. taskCancelToken2: [],
  8259. isDisplay: false,
  8260. isDialog: 0,
  8261. recordVideoText: "",
  8262. recordAudioUrl: "",
  8263. r_agentid: "",
  8264. course_info: "",
  8265. stepShow: true,
  8266. anLoading: [],
  8267. appendixFile: [],
  8268. appendixPan: true,
  8269. appendixFiles: [],
  8270. appendixTypeCheck: 'all',
  8271. appendixTaskCheck: 'all',
  8272. appendixType: [],
  8273. appendixLoading: false,
  8274. interFindPan: true,
  8275. typeC1: [],
  8276. typeC2: [],
  8277. knowFileType1: "",
  8278. knowFileType2: "",
  8279. knowFileType: "",
  8280. knowFileTypeArray1: [],
  8281. knowFileTypeArray: [],
  8282. optionTypeList:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
  8283. changeId:"",
  8284. };
  8285. },
  8286. directives: {
  8287. autoHeight: {
  8288. update(el, binding) {
  8289. const { value } = binding;
  8290. if (value && typeof value === "number") {
  8291. el.style.height = `${value}px`;
  8292. } else {
  8293. el.style.height = "auto";
  8294. }
  8295. },
  8296. componentUpdated(el) {
  8297. el.style.height = `${el.scrollHeight + 25}px`;
  8298. },
  8299. },
  8300. },
  8301. computed: {
  8302. // rightBoxHeight: function () {
  8303. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8304. // },
  8305. offsetLetfPx: function () {
  8306. //addnum可以直接在模板语法里面用,相当于data内的值
  8307. return (
  8308. $(".cru_select")[this.unitIndex] &&
  8309. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8310. );
  8311. },
  8312. getMan2() {
  8313. return function (people) {
  8314. let _people = people;
  8315. let _people2 = "";
  8316. if (this.ManAarray.length) {
  8317. for (var i = 0; i < this.ManAarray.length; i++) {
  8318. if (this.ManAarray[i].userid == people) {
  8319. _people2 = this.ManAarray[i].name;
  8320. break;
  8321. }
  8322. }
  8323. }
  8324. if (people == this.courseUserid) {
  8325. return "";
  8326. }
  8327. return this.ManAarray.length ? _people2 : "";
  8328. };
  8329. },
  8330. getListMan2() {
  8331. return function (list) {
  8332. console.log('getListMan2',list);
  8333. let _people2 = [];
  8334. if (this.ManAarray.length) {
  8335. list.slice(0, 10).forEach(people => {
  8336. let name = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid).name || "";
  8337. if (name) {
  8338. _people2.push(name);
  8339. }
  8340. });
  8341. }
  8342. return _people2.join("、");
  8343. };
  8344. },
  8345. isInvite() {
  8346. return function (cid) {
  8347. let array = [];
  8348. for (var i = 0; i < this.inviteCode.length; i++) {
  8349. array.push(this.inviteCode[i].cid);
  8350. }
  8351. return array.indexOf(cid) != -1;
  8352. };
  8353. },
  8354. getInviteCodeC() {
  8355. return function (cid) {
  8356. let array = [];
  8357. for (var i = 0; i < this.inviteCode.length; i++) {
  8358. array.push(this.inviteCode[i].cid);
  8359. }
  8360. return this.inviteCode[array.indexOf(cid)].ic;
  8361. };
  8362. },
  8363. getClassC() {
  8364. return function (c) {
  8365. let _c2 = "";
  8366. if (this.grade.length) {
  8367. for (var i = 0; i < this.grade.length; i++) {
  8368. if (this.grade[i].id == c) {
  8369. _c2 = this.grade[i].name;
  8370. break;
  8371. }
  8372. }
  8373. }
  8374. return this.grade.length ? _c2 : "";
  8375. };
  8376. },
  8377. getListClassC() {
  8378. return function (list) {
  8379. let _c2 = [];
  8380. if (this.grade.length) {
  8381. for (var j = 0; j < list.length; j++) {
  8382. let c = list[j];
  8383. for (var i = 0; i < this.grade.length; i++) {
  8384. if (this.grade[i].id == c) {
  8385. _c2.push(this.grade[i].name);
  8386. break;
  8387. }
  8388. }
  8389. }
  8390. }
  8391. return this.grade.length ? _c2.join("、") : "";
  8392. };
  8393. },
  8394. MarkdownT() {
  8395. return function (c) {
  8396. let md = new MarkdownIt();
  8397. return c
  8398. ? md.render(c) : "";
  8399. };
  8400. },
  8401. panOutline(){
  8402. return function () {
  8403. let count = 0;
  8404. for(var i = 0; i < this.unitJson.length; i++){
  8405. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8406. for(var j = 0; j < _task.length; j++){
  8407. if(_task[j].taskDetail2){
  8408. count++
  8409. }
  8410. }
  8411. }
  8412. return count;
  8413. };
  8414. },
  8415. panTeacher(){
  8416. return function () {
  8417. let count = 0;
  8418. for(var i = 0; i < this.unitJson.length; i++){
  8419. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8420. for(var j = 0; j < _task.length; j++){
  8421. if(_task[j].taskDetail3){
  8422. count++
  8423. }
  8424. }
  8425. }
  8426. return count;
  8427. };
  8428. },
  8429. panTask(){
  8430. return function () {
  8431. let count = 0;
  8432. for(var i = 0; i < this.unitJson.length; i++){
  8433. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8434. for(var j = 0; j < _task.length; j++){
  8435. if(_task[j].taskDetail){
  8436. count++
  8437. }
  8438. }
  8439. }
  8440. return count;
  8441. };
  8442. },
  8443. panElist(){
  8444. return function (array) {
  8445. let count = 0;
  8446. for(var i = 0; i < array.toolChoose.length; i++){
  8447. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8448. count++
  8449. }
  8450. }
  8451. return count;
  8452. };
  8453. },
  8454. panTaskElist(){
  8455. return function () {
  8456. let count = 0;
  8457. for(var i = 0; i < this.unitJson.length; i++){
  8458. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8459. for(var j = 0; j < _task.length; j++){
  8460. if(_task[j].eList && _task[j].eList.length){
  8461. count++
  8462. }
  8463. }
  8464. }
  8465. return count;
  8466. };
  8467. },
  8468. panEvaCont(){
  8469. return function () {
  8470. let count = 0;
  8471. for(var i = 0; i < this.unitJson.length; i++){
  8472. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8473. for(var j = 0; j < _task.length; j++){
  8474. let tool = _task[j].toolChoose
  8475. for(var k = 0; k < tool.length; k++){
  8476. if(tool[k].eList && tool[k].eList.length){
  8477. count++
  8478. }
  8479. }
  8480. }
  8481. }
  8482. return count;
  8483. };
  8484. },
  8485. dataCheckPan(){
  8486. return function (fileid) {
  8487. for(let i = 0; i < this.infoData.length; i++){
  8488. if(this.infoData[i].fileid == fileid){
  8489. return true
  8490. }
  8491. }
  8492. return false;
  8493. };
  8494. },
  8495. interUrl: function () {
  8496. let agentid = this.aiJson.agentid
  8497. let sagentid = this.aiJson.sagentid
  8498. let url = ''
  8499. if(sagentid){
  8500. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8501. }else{
  8502. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8503. }
  8504. return url;
  8505. },
  8506. panPptCount(){
  8507. return function () {
  8508. let ppts = 0
  8509. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8510. let ppt = this.$refs['ppt'+i]
  8511. if(ppt && ppt[0].tanDialog){
  8512. ppts++
  8513. }
  8514. }
  8515. if(!this.pptCount.length){
  8516. this.pptBoxDialog = false
  8517. }
  8518. return ppts;
  8519. };
  8520. },
  8521. panDanTool(){
  8522. return function (array) {
  8523. let count = 0;
  8524. for(var i = 0; i < array.toolChoose.length; i++){
  8525. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8526. count++
  8527. }
  8528. }
  8529. return count;
  8530. };
  8531. },
  8532. panDanToolEva(){
  8533. return function (array) {
  8534. let count = 0;
  8535. let tool = array.toolChoose
  8536. for(var k = 0; k < tool.length; k++){
  8537. if(tool[k].eList && tool[k].eList.length){
  8538. count++
  8539. }
  8540. }
  8541. return count;
  8542. };
  8543. },
  8544. panTool(){
  8545. return function () {
  8546. let count = 0;
  8547. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8548. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8549. for(var i = 0; i < array.toolChoose.length; i++){
  8550. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8551. count++
  8552. }
  8553. }
  8554. }
  8555. return count;
  8556. };
  8557. },
  8558. allFile(){
  8559. return function (type) {
  8560. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8561. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8562. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8563. for(var j = 0; j < _task.chapterData.length; j++){
  8564. if(_task.chapterData[j].type == 3){
  8565. file.push({..._task.chapterData[j], tool:j, task:i});
  8566. }
  8567. }
  8568. }
  8569. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8570. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8571. if(this.appendixTaskCheck != 'all' && type != '2'){
  8572. uniqueFile = uniqueFile.filter(file => file.task+1 == this.appendixTaskCheck || file.name.includes(this.lang.ssTask+this.appendixTaskCheck) || file.name.includes(this.lang.ssTask+this.numberToChinese(this.appendixTaskCheck)));
  8573. }
  8574. if(this.appendixTypeCheck != 'all' && type != '2'){
  8575. if(this.appendixTypeCheck == 0){
  8576. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssLessonPlan));
  8577. }else if(this.appendixTypeCheck == 1){
  8578. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8579. }else if(this.appendixTypeCheck == 2){
  8580. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssStudyPlan));
  8581. }else if(this.appendixTypeCheck == 3){
  8582. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssEvalSuffix));
  8583. }else if(this.appendixTypeCheck == 4){
  8584. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8585. }
  8586. }
  8587. return uniqueFile;
  8588. };
  8589. },
  8590. panAppendixCheckAll(){
  8591. return function(){
  8592. let files = this.allFile();
  8593. let count = 0
  8594. for(var i = 0; i < files.length; i++){
  8595. if(this.appendixFiles.includes(files[i].url)){
  8596. count++
  8597. }
  8598. }
  8599. if (count == files.length) {
  8600. return true
  8601. }else {
  8602. false
  8603. }
  8604. }
  8605. },
  8606. getTypeC(){
  8607. return function(index){
  8608. let sub = []
  8609. let grade = []
  8610. if (this.courseTypeId.length) {
  8611. for (var i = 0; i < this.courseTypeId.length; i++) {
  8612. let _sid = this.courseTypeId[i]
  8613. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8614. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8615. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8616. }
  8617. }
  8618. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8619. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8620. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8621. }
  8622. }
  8623. }
  8624. }
  8625. if(index == 1){
  8626. return sub
  8627. }else if(index == 2){
  8628. return grade
  8629. }
  8630. }
  8631. },
  8632. getFileType(){
  8633. return function (name) {
  8634. let fileType = this.getKnowType();
  8635. for (let type of fileType) {
  8636. if (converter(name).includes(type)) {
  8637. return type; // 判断name中是否包含对应的文件类型
  8638. }
  8639. }
  8640. return this.lang.ssOther;
  8641. };
  8642. },
  8643. allknowInfoData3(){
  8644. return function () {
  8645. let knowInfoData = this.knowInfoData3;
  8646. if(this.knowFileType){
  8647. // if(converter(this.knowFileType) == '其他'){
  8648. // let fileType = this.getKnowType().filter(item => item != '其他');
  8649. // knowInfoData = knowInfoData.filter(item => {
  8650. // return !fileType.some(type => converter(item.name).includes(type));
  8651. // });
  8652. // }else{
  8653. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8654. // }
  8655. }
  8656. if(this.knowFileType1){
  8657. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8658. }
  8659. if(this.knowFileType2){
  8660. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(converter(this.lang.ssUnit.replace(/\*/g, this.knowFileType2))) || converter(item.name).includes(converter(this.lang.ssUnit.replace(/\*/g, this.numberToChinese(this.knowFileType2)))))
  8661. }
  8662. return knowInfoData;
  8663. };
  8664. },
  8665. getKnowType(){
  8666. return function () {
  8667. let knowInfoData = this.knowInfoData3;
  8668. let array = []
  8669. for(var i = 0; i < knowInfoData.length; i++){
  8670. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8671. array.push(knowInfoData[i].file_type)
  8672. }
  8673. }
  8674. return array;
  8675. };
  8676. },
  8677. panknowInfoData3CheckAll(){
  8678. return function(){
  8679. let files = this.allknowInfoData3();
  8680. let count = 0
  8681. for(var i = 0; i < files.length; i++){
  8682. if(this.knowFileids3.includes(files[i].url)){
  8683. count++
  8684. }
  8685. }
  8686. if (count == files.length) {
  8687. return true
  8688. }else {
  8689. false
  8690. }
  8691. }
  8692. },
  8693. },
  8694. watch: {
  8695. unitIndex(newValue, oldValue) {
  8696. // return;
  8697. if (this.isDelete == 2) {
  8698. this.isDelete = 1;
  8699. return;
  8700. }
  8701. if (this.cid != "") {
  8702. let _unitIndex = oldValue;
  8703. if (
  8704. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8705. JSON.stringify(this.unitJson[_unitIndex])
  8706. ) {
  8707. this.$refs.rightboxR.scrollTop = 0;
  8708. return;
  8709. }
  8710. let cPan = 1;
  8711. for (
  8712. var j = 0;
  8713. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8714. j++
  8715. ) {
  8716. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8717. j
  8718. ].proVisible = false;
  8719. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8720. j
  8721. ].proVisible2 = false;
  8722. if (
  8723. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8724. .length > 1
  8725. ) {
  8726. for (
  8727. var z = 0;
  8728. z <
  8729. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8730. .length;
  8731. z++
  8732. ) {
  8733. if (
  8734. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8735. .toolChoose[z].tool.length
  8736. ) {
  8737. this.$message.error(this.lang.ssAddToolFull);
  8738. cPan = 2;
  8739. break;
  8740. }
  8741. }
  8742. }
  8743. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8744. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8745. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8746. (ele) => {
  8747. return ele.value != "" || ele.detail != "" || ele.target != "";
  8748. }
  8749. );
  8750. }
  8751. }
  8752. if (cPan == 2) {
  8753. this.unitIndex = oldValue;
  8754. return;
  8755. }
  8756. for (var i = 0; i < this.unitJson.length; i++) {
  8757. if (this.addindex != i) {
  8758. delete this.unitJson[i].isUpdate;
  8759. }
  8760. }
  8761. this.$refs.rightboxR.scrollTop = 0;
  8762. this.addindex = -1;
  8763. let params = [
  8764. {
  8765. cid: this.cid,
  8766. chapters: JSON.stringify(this.unitJson),
  8767. uid: this.userid,
  8768. unitIndex: _unitIndex,
  8769. },
  8770. ];
  8771. this.ajax
  8772. .post(this.$store.state.api + "updateWorkNew4", params)
  8773. .then((res) => {
  8774. // this.$message({
  8775. // message: this.lang.UpdateSuccessful,
  8776. // type: "success",
  8777. // });
  8778. // this.courseId = this.cid;
  8779. this.addtips()
  8780. })
  8781. .catch((err) => {
  8782. this.$message.error(this.lang.ssNetPoor);
  8783. console.error(err);
  8784. });
  8785. }
  8786. },
  8787. steps(newValue, old) {
  8788. if(newValue == 2){
  8789. this.steps = old
  8790. }
  8791. if (newValue == 4) {
  8792. let cPan = 1;
  8793. for (var i = 0; i < this.unitJson.length; i++) {
  8794. for (
  8795. var j = 0;
  8796. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8797. j++
  8798. ) {
  8799. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8800. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8801. if (
  8802. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8803. ) {
  8804. for (
  8805. var z = 0;
  8806. z <
  8807. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8808. z++
  8809. ) {
  8810. if (
  8811. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8812. .tool.length
  8813. ) {
  8814. this.$message.error(this.lang.ssAddToolFull);
  8815. cPan = 2;
  8816. break;
  8817. }
  8818. }
  8819. }
  8820. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8821. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8822. i
  8823. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8824. return ele.value != "" || ele.detail != "" || ele.target != "";
  8825. });
  8826. }
  8827. }
  8828. }
  8829. this.inputShow = true;
  8830. if (cPan == 2) {
  8831. this.steps = old;
  8832. return;
  8833. }
  8834. this.goTo(
  8835. "/course?userid=" +
  8836. this.userid +
  8837. "&oid=" +
  8838. this.oid +
  8839. "&org=" +
  8840. this.org +
  8841. "&role=" +
  8842. this.role
  8843. );
  8844. }
  8845. },
  8846. courseName(newVal, oldVal) {
  8847. this.setCourseInfo();
  8848. },
  8849. courseTypeId: {
  8850. immediate: true,
  8851. deep: true,
  8852. handler(newValue, oldValue) {
  8853. this.setCourseInfo();
  8854. }
  8855. },
  8856. knowFileids(newVal, oldVal) {
  8857. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8858. },
  8859. knowFileids2(newVal, oldVal) {
  8860. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8861. },
  8862. },
  8863. methods: {
  8864. tableRowClassName({ row, rowIndex }) {
  8865. if ((rowIndex + 1) % 2 === 0) {
  8866. return "even_row";
  8867. } else {
  8868. return "";
  8869. }
  8870. },
  8871. close() {
  8872. this.cetIndex = "";
  8873. this.cettIndex = "";
  8874. this.templateName = "";
  8875. this.cetBoxDialog = false;
  8876. },
  8877. openAI() {
  8878. window.topU.postMessage({ tools: "64" }, "*");
  8879. },
  8880. setMan() {
  8881. // let teacherJuri = this.teacherJuri2;
  8882. this.ManAarray = [];
  8883. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8884. if (_user.indexOf(this.userid) == -1) {
  8885. _user.push(this.userid);
  8886. }
  8887. if (_user.indexOf(this.courseUserid) == -1) {
  8888. _user.push(this.courseUserid);
  8889. }
  8890. let params = [{
  8891. uid: _user.join(","),
  8892. }];
  8893. this.ajax
  8894. .post(this.$store.state.api + "getAllUserByIdP", params)
  8895. .then((res) => {
  8896. let teacherJuri = res.data[0];
  8897. this.ManAarray = teacherJuri;
  8898. })
  8899. .catch((err) => {
  8900. console.error(err);
  8901. });
  8902. },
  8903. previewImg(url) {
  8904. this.$hevueImgPreview(url);
  8905. },
  8906. btnDisplay(bool) {
  8907. this.isBtnDisplay = bool;
  8908. },
  8909. stepDisplay(bool) {
  8910. this.isStepDisplay = bool;
  8911. },
  8912. scrollChange() {
  8913. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8914. },
  8915. addHw(e) {
  8916. var el = e.currentTarget;
  8917. el.getElementsByTagName("input")[0].click();
  8918. },
  8919. change(val) {
  8920. if (this.dialogVisible1) {
  8921. this.tdetail = val;
  8922. } else if (this.dialogVisible6) {
  8923. this.AttText.text = val;
  8924. } else if (this.dialogVisible2) {
  8925. this.cTemplate = val;
  8926. } else if (this.dialogVisibleTable) {
  8927. this.tableJson.text = val;
  8928. }
  8929. this.$forceUpdate();
  8930. console.log(val);
  8931. },
  8932. change2(val) {
  8933. console.log(val);
  8934. this.$forceUpdate();
  8935. },
  8936. handleClose(done) {
  8937. done();
  8938. },
  8939. closePan(tool) {
  8940. if (tool == 15) {
  8941. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8942. this.dialogVisible8 = false;
  8943. } else {
  8944. this.closeConfirm(tool);
  8945. }
  8946. } else if (tool == 4) {
  8947. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8948. this.dialogVisible5 = false;
  8949. } else {
  8950. this.closeConfirm(tool);
  8951. }
  8952. } else if (tool == 45) {
  8953. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8954. this.dialogVisibleChoice = false;
  8955. } else {
  8956. this.closeConfirm(tool);
  8957. }
  8958. } else if (tool == 41) {
  8959. if (
  8960. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8961. ) {
  8962. this.dialogVisibleSelect = false;
  8963. } else {
  8964. this.closeConfirm(tool);
  8965. }
  8966. } else if (tool == 47) {
  8967. if (
  8968. JSON.stringify(this.sentenceList) ==
  8969. JSON.stringify(this.sentenceList2)
  8970. ) {
  8971. this.dialogVisibleSentence = false;
  8972. } else {
  8973. this.closeConfirm(tool);
  8974. }
  8975. } else if (tool == 69) {
  8976. if (
  8977. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8978. ) {
  8979. this.englishDialogVisible = false;
  8980. } else {
  8981. this.closeConfirm(tool);
  8982. }
  8983. }
  8984. },
  8985. closeConfirm(tool) {
  8986. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  8987. confirmButtonText: this.lang.ssSave,
  8988. cancelButtonText: this.lang.ssNotSave,
  8989. type: "warning",
  8990. })
  8991. .then(() => {
  8992. if (tool == 15) {
  8993. this.addAnswer();
  8994. } else if (tool == 4) {
  8995. this.addAsk();
  8996. } else if (tool == 45) {
  8997. this.addTest();
  8998. } else if (tool == 41) {
  8999. this.addSelectAnswer();
  9000. } else if (tool == 47) {
  9001. this.addSentenceTool();
  9002. } else if (tool == 69) {
  9003. this.addEnglish();
  9004. }
  9005. })
  9006. .catch(() => {
  9007. if (tool == 15) {
  9008. this.dialogVisible8 = false;
  9009. } else if (tool == 4) {
  9010. this.dialogVisible5 = false;
  9011. } else if (tool == 45) {
  9012. this.dialogVisibleChoice = false;
  9013. } else if (tool == 41) {
  9014. this.dialogVisibleSelect = false;
  9015. } else if (tool == 47) {
  9016. this.dialogVisibleSentence = false;
  9017. } else if (tool == 69) {
  9018. this.englishDialogVisible = false;
  9019. }
  9020. });
  9021. },
  9022. addEnglish(jsonType) {
  9023. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  9024. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  9025. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  9026. if (
  9027. this.englishList.engTitle == "" ||
  9028. this.englishList.englishText == ""
  9029. ) {
  9030. this.$message.error(this.lang.ssFillComplete);
  9031. return;
  9032. }
  9033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9034. this.taskCount
  9035. ].toolChoose[this.toolIndex].englishList = this.englishList;
  9036. this.englishList = {};
  9037. if (jsonType && jsonType == 1) {
  9038. this.englishDialogVisible = true;
  9039. } else {
  9040. this.englishDialogVisible = false;
  9041. }
  9042. if (
  9043. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9044. .toolChoose[this.toolIndex].tool != 69
  9045. ) {
  9046. this.addTools(69, this.taskCount, this.toolIndex);
  9047. }
  9048. },
  9049. imgChange2(i, j) {
  9050. var _tmp = this.testJson.testJson[i].checkList[j];
  9051. this.noneBtnImg = _tmp.length >= 1;
  9052. },
  9053. imgChange3(i) {
  9054. var _tmp = this.testJson.testJson[i];
  9055. this.noneBtnImg = _tmp.length >= 1;
  9056. },
  9057. imgChange1(file, fileList, type, itemTaskIndex) {
  9058. if (type == 1) {
  9059. var _tmp = this.cover;
  9060. } else if (
  9061. type == 2 ||
  9062. type == 3 ||
  9063. type == 6 ||
  9064. type == 7 ||
  9065. type == 8
  9066. ) {
  9067. var _tmp =
  9068. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9069. .chapterData;
  9070. } else if (type == 4) {
  9071. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  9072. } else {
  9073. var _tmp =
  9074. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9075. .homeworkList;
  9076. }
  9077. this.noneBtnImg = _tmp.length >= 1;
  9078. },
  9079. goTo(path) {
  9080. this.$router.push(path);
  9081. },
  9082. guid() {
  9083. var _num,
  9084. i,
  9085. _guid = "";
  9086. for (i = 0; i < 32; i++) {
  9087. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  9088. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  9089. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  9090. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  9091. _guid += "-";
  9092. }
  9093. }
  9094. return _guid;
  9095. },
  9096. retrunCourse() {
  9097. if(this.istemplate == 1){
  9098. this.goTo(
  9099. "/course?userid=" +
  9100. this.userid +
  9101. "&oid=" +
  9102. this.oid +
  9103. "&org=" +
  9104. this.org +
  9105. "&role=" +
  9106. this.role
  9107. );
  9108. return
  9109. }
  9110. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  9111. confirmButtonText: this.lang.ssSave,
  9112. cancelButtonText: this.lang.ssNotSave,
  9113. distinguishCancelAndClose: true,
  9114. type: "warning",
  9115. customClass: 'custom-confirm-box'
  9116. })
  9117. .then(() => {
  9118. if (this.taskLoading.length) {
  9119. let _pan = 1
  9120. for(var k = 0; k < this.taskLoading.length; k++){
  9121. if(this.taskLoading[k]){
  9122. this.$message({
  9123. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9124. type: "warning"
  9125. });
  9126. _pan = 2
  9127. }
  9128. }
  9129. if(_pan == 2){
  9130. return
  9131. }
  9132. }
  9133. if(this.taskGLoading.length){
  9134. let _pan = 1
  9135. for(var k = 0; k < this.taskGLoading.length; k++){
  9136. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9137. this.$message({
  9138. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9139. type: "warning"
  9140. });
  9141. _pan = 2
  9142. }
  9143. }
  9144. if(_pan == 2){
  9145. return
  9146. }
  9147. }
  9148. let pan2 = 1
  9149. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9150. for(var index = 0; index < taskJson.length; index++){
  9151. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9152. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9153. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9154. this.$message({
  9155. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9156. type: "warning"
  9157. });
  9158. pan2 = 2
  9159. }
  9160. }
  9161. }
  9162. }
  9163. if(pan2 == 2){
  9164. return
  9165. }
  9166. if (this.cid == "" || this.cid == undefined) {
  9167. if (this.courseName == "") {
  9168. this.$message.error(this.lang.ssFillCourseName);
  9169. return;
  9170. } else {
  9171. this.addWork();
  9172. }
  9173. this.steps = 4;
  9174. } else {
  9175. if (this.courseName == "") {
  9176. this.$message.error(this.lang.ssFillCourseName);
  9177. return;
  9178. } else {
  9179. if (this.userid != this.courseUserid && this.role != "1") {
  9180. this.updateWork2();
  9181. } else {
  9182. this.updateWork();
  9183. }
  9184. this.steps = 4;
  9185. }
  9186. }
  9187. })
  9188. .catch((v) => {
  9189. console.log(v);
  9190. if (v == "cancel") {
  9191. this.goTo(
  9192. "/course?userid=" +
  9193. this.userid +
  9194. "&oid=" +
  9195. this.oid +
  9196. "&org=" +
  9197. this.org +
  9198. "&role=" +
  9199. this.role
  9200. );
  9201. }
  9202. });
  9203. setTimeout(() => {
  9204. this.setTipsIndex()
  9205. }, 500)
  9206. },
  9207. lastSteps() {
  9208. if (this.steps == 4) {
  9209. this.goTo(
  9210. "/course?userid=" +
  9211. this.userid +
  9212. "&oid=" +
  9213. this.oid +
  9214. "&org=" +
  9215. this.org +
  9216. "&role=" +
  9217. this.role
  9218. );
  9219. } else {
  9220. // if (this.cidType == 0) {
  9221. // this.steps--;
  9222. // if (this.steps == 1) {
  9223. // setTimeout(() => {
  9224. // this.checkEva(this.checkId);
  9225. // setTimeout(() => {
  9226. // this.checkEva(this.checkId);
  9227. // }, 100);
  9228. // }, 100);
  9229. // }
  9230. // } else {
  9231. if (this.steps == 3) {
  9232. this.steps = 1;
  9233. setTimeout(() => {
  9234. this.checkEva(this.checkId);
  9235. setTimeout(() => {
  9236. this.checkEva(this.checkId);
  9237. }, 100);
  9238. }, 100);
  9239. }
  9240. // }
  9241. }
  9242. },
  9243. navSteps(s) {
  9244. if (this.courseName == "") {
  9245. this.$message.error(this.lang.ssFillCourseName);
  9246. return;
  9247. }
  9248. if (this.cidType == 0) {
  9249. if (this.steps == 1) {
  9250. if (this.cid == "" || this.cid == undefined) {
  9251. this.addWork();
  9252. } else {
  9253. if (this.userid != this.courseUserid && this.role != "1") {
  9254. this.updateWork2();
  9255. } else {
  9256. this.updateWork();
  9257. }
  9258. }
  9259. }
  9260. if (s == 1) {
  9261. this.steps = 1;
  9262. setTimeout(() => {
  9263. this.checkEva(this.checkId);
  9264. setTimeout(() => {
  9265. this.checkEva(this.checkId);
  9266. }, 100);
  9267. }, 100);
  9268. }
  9269. if (s == 2) {
  9270. this.steps = 2;
  9271. }
  9272. if (s == 3) {
  9273. this.cTemplate = this.templateC.content;
  9274. this.dialogVisible2 = false;
  9275. this.steps = 3;
  9276. this.isClickColor = 1;
  9277. this.unitJson[
  9278. this.unitIndex
  9279. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9280. this.$forceUpdate();
  9281. setTimeout(() => {
  9282. this.checkEva(this.checkId);
  9283. setTimeout(() => {
  9284. this.checkEva(this.checkId);
  9285. }, 100);
  9286. }, 1000);
  9287. }
  9288. } else {
  9289. if (this.steps == 1) {
  9290. if (this.cid == "" || this.cid == undefined) {
  9291. this.addWork();
  9292. } else {
  9293. if (this.userid != this.courseUserid && this.role != "1") {
  9294. this.updateWork2();
  9295. } else {
  9296. this.updateWork();
  9297. }
  9298. }
  9299. }
  9300. if (s == 1) {
  9301. this.steps = 1;
  9302. setTimeout(() => {
  9303. this.checkEva(this.checkId);
  9304. setTimeout(() => {
  9305. this.checkEva(this.checkId);
  9306. }, 100);
  9307. }, 100);
  9308. }
  9309. if (s == 3) {
  9310. this.cTemplate = this.templateC.content;
  9311. this.dialogVisible2 = false;
  9312. this.steps = 3;
  9313. this.isClickColor = 1;
  9314. this.unitJson[
  9315. this.unitIndex
  9316. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9317. this.$forceUpdate();
  9318. setTimeout(() => {
  9319. this.checkEva(this.checkId);
  9320. setTimeout(() => {
  9321. this.checkEva(this.checkId);
  9322. }, 100);
  9323. }, 1000);
  9324. }
  9325. }
  9326. this.$refs.stepBox.scrollTop = 0;
  9327. },
  9328. setTipsIndex(){
  9329. // 使用 setTimeout 确保对话框已经渲染完成
  9330. this.$nextTick(() => {
  9331. const dialog = document.querySelector('.custom-confirm-box');
  9332. if (dialog) {
  9333. const parent = dialog.parentElement;
  9334. if (parent) {
  9335. parent.style.zIndex = 9999999;
  9336. const adjacentElement = parent.nextElementSibling;
  9337. if (adjacentElement) {
  9338. adjacentElement.style.zIndex = 9999998;
  9339. }
  9340. }
  9341. }
  9342. });
  9343. },
  9344. nextSteps(clickType, ttype) {
  9345. if(!this.time()){
  9346. return
  9347. }
  9348. // if (this.cidType == 1) {
  9349. if (this.steps == 1) {
  9350. if (this.courseName != "") {
  9351. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9352. // this.$message({
  9353. // message: "请回答完毕后再次发送",
  9354. // type: "warning"
  9355. // });
  9356. if(this.ttaskDetailLoading.length){
  9357. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9358. this.$message({
  9359. message: this.lang.ssGenOutTaskDesc.replace(/\*/g, num),
  9360. type: "warning"
  9361. });
  9362. }
  9363. if(this.cpotetLoading.cpote1){
  9364. this.$message({
  9365. message: this.lang.ssCpoteNotGen,
  9366. type: "warning"
  9367. });
  9368. }
  9369. if(this.cpotetLoading.cpote2){
  9370. this.$message({
  9371. message: this.lang.ssQChainNotGen,
  9372. type: "warning"
  9373. });
  9374. }
  9375. if(this.cpotetLoading.cpote3){
  9376. this.$message({
  9377. message: this.lang.ssTargetNotGen,
  9378. type: "warning"
  9379. });
  9380. }
  9381. if(this.cpotetLoading.cpote4){
  9382. this.$message({
  9383. message: this.lang.ssTaskClusNotGen,
  9384. type: "warning"
  9385. });
  9386. }
  9387. return;
  9388. }
  9389. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9390. if(!this.courseText && !this.teacherCourseText){
  9391. this.$message.error(this.lang.ssGenDescFirst);
  9392. return;
  9393. }
  9394. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9395. this.openAiDialog(clickType, 'aiOutline2')
  9396. if(clickType == 1){
  9397. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9398. }else {
  9399. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9400. }
  9401. }else {
  9402. this.openAiDialog(clickType, 'aiOutline')
  9403. if(clickType == 1){
  9404. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9405. }else {
  9406. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9407. }
  9408. }
  9409. return;
  9410. }
  9411. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9412. let _type = ''
  9413. if(this.cpoteType == 0){
  9414. _type = 'aiCpote1'
  9415. if(clickType == 1){
  9416. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9417. }else {
  9418. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9419. }
  9420. }else if(this.cpoteType == 1){
  9421. _type = 'aiCpote2'
  9422. if(clickType == 1){
  9423. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9424. }else {
  9425. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9426. }
  9427. }else if(this.cpoteType == 2){
  9428. _type = 'aiCpote3'
  9429. if(clickType == 1){
  9430. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9431. }else {
  9432. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9433. }
  9434. }else if(this.cpoteType == 3){
  9435. _type = 'aiCpote4'
  9436. if(clickType == 1){
  9437. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9438. }else {
  9439. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9440. }
  9441. }
  9442. this.cpoteType++
  9443. this.openAiDialog(clickType, _type)
  9444. return;
  9445. }
  9446. // if (!this.isOutline2) {
  9447. // this.openAiDialog(clickType, 'aiTeacher')
  9448. // return;
  9449. // }
  9450. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9451. this.openAiDialog(clickType, 'aiTeacher3')
  9452. if(clickType == 1){
  9453. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9454. }else {
  9455. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9456. }
  9457. return;
  9458. }
  9459. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9460. this.openAiDialog(clickType, 'aiTeacher2')
  9461. if(clickType == 1){
  9462. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9463. }else {
  9464. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9465. }
  9466. return;
  9467. }
  9468. let _pan2 = 1
  9469. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9470. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9471. _pan2 = 2
  9472. this.$message.error(this.lang.ssPerfectOut.replace(/\*/g, k+1))
  9473. break;
  9474. }
  9475. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9476. _pan2 = 2
  9477. this.$message.error(this.lang.ssPerfectPlan.replace(/\*/g, k+1))
  9478. break;
  9479. }
  9480. }
  9481. if(_pan2 == 2){
  9482. return;
  9483. }
  9484. const functionA = () => {
  9485. setTimeout(() => {
  9486. this.loading = false
  9487. this.steps = 3;
  9488. }, 0)
  9489. this.isClickColor = 1;
  9490. this.unitJson[
  9491. this.unitIndex
  9492. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9493. this.$forceUpdate();
  9494. setTimeout(() => {
  9495. this.checkEva(this.checkId);
  9496. setTimeout(() => {
  9497. this.checkEva(this.checkId);
  9498. }, 100);
  9499. }, 1000);
  9500. if (this.cid == "" || this.cid == undefined) {
  9501. this.addWork();
  9502. } else {
  9503. if (this.userid != this.courseUserid && this.role != "1") {
  9504. this.updateWork2();
  9505. } else {
  9506. this.updateWork();
  9507. }
  9508. }
  9509. }
  9510. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9511. if(this.ttaskDetailLoading5.length){
  9512. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9513. // this.$message({
  9514. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9515. // type: "warning"
  9516. // });
  9517. this.$confirm(this.lang.ssPlanNotGen, this.lang.ssTip, {
  9518. confirmButtonText: this.lang.ssConfirm,
  9519. cancelButtonText: this.lang.ssCancel,
  9520. distinguishCancelAndClose: true,
  9521. type: "warning",
  9522. customClass: 'custom-confirm-box'
  9523. })
  9524. .then(() => {
  9525. if(this.isTeacherTaskCancelToken2){
  9526. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9527. if(this.isTeacherTaskCancelToken2[i]){
  9528. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9529. this.isTeacherTaskCancelToken2[i] = null;
  9530. }
  9531. }
  9532. }
  9533. this.taskDetailLoading5 = []
  9534. this.ttaskDetailLoading5 = []
  9535. if(this.isTeacherTaskCancelSource){
  9536. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9537. if(this.isTeacherTaskCancelSource[i]){
  9538. this.isTeacherTaskCancelSource[i].close()
  9539. this.isTeacherTaskCancelSource[i] = null
  9540. }
  9541. }
  9542. }
  9543. if (this.cid) {
  9544. this.loading = true
  9545. functionA()
  9546. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9547. } else {
  9548. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9549. if(clickType == 1){
  9550. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9551. }else {
  9552. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9553. }
  9554. }
  9555. }).catch((v) => {
  9556. console.log(v);
  9557. })
  9558. setTimeout(() => {
  9559. this.setTipsIndex()
  9560. }, 500)
  9561. }
  9562. return;
  9563. }
  9564. if (this.cid && this.panTask() > 0) {
  9565. this.loading = true
  9566. functionA()
  9567. } else {
  9568. // if(ttype == 2){
  9569. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9570. // }else {
  9571. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9572. // }
  9573. }
  9574. } else {
  9575. this.$message.error(this.lang.ssFillCourseName);
  9576. return;
  9577. }
  9578. } else if (this.steps == 3) {
  9579. if (this.taskLoading.length) {
  9580. let _pan = 1
  9581. for(var k = 0; k < this.taskLoading.length; k++){
  9582. if(this.taskLoading[k]){
  9583. this.$message({
  9584. message: this.lang.ssWaitTaskUp.replace(/\*/g, k+1),
  9585. type: "warning"
  9586. });
  9587. _pan = 2
  9588. }
  9589. }
  9590. if(_pan == 2){
  9591. return
  9592. }
  9593. }
  9594. if(this.taskGLoading.length){
  9595. let _pan = 1
  9596. for(var k = 0; k < this.taskGLoading.length; k++){
  9597. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9598. this.$message({
  9599. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9600. type: "warning"
  9601. });
  9602. _pan = 2
  9603. }
  9604. }
  9605. if(_pan == 2){
  9606. return
  9607. }
  9608. }
  9609. let pan2 = 1
  9610. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9611. for(var index = 0; index < taskJson.length; index++){
  9612. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9613. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9614. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9615. this.$message({
  9616. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9617. type: "warning"
  9618. });
  9619. pan2 = 2
  9620. }
  9621. }
  9622. }
  9623. }
  9624. if(pan2 == 2){
  9625. return
  9626. }
  9627. if (this.cid == "" || this.cid == undefined) {
  9628. if (this.courseName == "") {
  9629. this.$message.error(this.lang.ssFillCourseName);
  9630. return;
  9631. } else {
  9632. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9633. this.addWork();
  9634. this.steps++;
  9635. }
  9636. } else {
  9637. if (this.courseName == "") {
  9638. this.$message.error(this.lang.ssFillCourseName);
  9639. return;
  9640. } else {
  9641. if (this.userid != this.courseUserid && this.role != "1") {
  9642. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9643. this.updateWork2();
  9644. } else {
  9645. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9646. this.updateWork();
  9647. }
  9648. this.steps++;
  9649. }
  9650. }
  9651. }
  9652. // } else {
  9653. // if (this.steps == 1) {
  9654. // if (this.courseName != "") {
  9655. // if (this.cid == "" || this.cid == undefined) {
  9656. // this.addWork();
  9657. // } else {
  9658. // if (this.userid != this.courseUserid && this.role != "1") {
  9659. // // this.updateWork2();
  9660. // } else {
  9661. // this.updateWork();
  9662. // }
  9663. // }
  9664. // this.steps++;
  9665. // } else {
  9666. // this.$message.error("请补充填写课程名称");
  9667. // return;
  9668. // }
  9669. // } else if (this.steps == 2) {
  9670. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9671. // this.cTemplate = this.templateC.content;
  9672. // }
  9673. // this.dialogVisible2 = false;
  9674. // this.steps++;
  9675. // setTimeout(() => {
  9676. // this.checkEva(this.checkId);
  9677. // setTimeout(() => {
  9678. // this.checkEva(this.checkId);
  9679. // }, 100);
  9680. // }, 1000);
  9681. // } else if (this.steps == 3) {
  9682. // if (this.cid == "" || this.cid == undefined) {
  9683. // if (this.courseName == "") {
  9684. // this.$message.error("请补充填写课程名称");
  9685. // return;
  9686. // } else {
  9687. // this.addWork();
  9688. // this.steps++;
  9689. // }
  9690. // } else {
  9691. // if (this.courseName == "") {
  9692. // this.$message.error("请补充填写课程名称");
  9693. // return;
  9694. // } else {
  9695. // if (this.userid != this.courseUserid && this.role != "1") {
  9696. // this.updateWork2();
  9697. // } else {
  9698. // this.updateWork();
  9699. // }
  9700. // this.steps++;
  9701. // }
  9702. // }
  9703. // }
  9704. // }
  9705. this.$refs.stepBox.scrollTop = 0;
  9706. },
  9707. unitSet(i) {
  9708. if (this.unitIndex == i) {
  9709. return;
  9710. }
  9711. this.unitIndex = i;
  9712. this.isClickColor = 1;
  9713. // this.$refs.rightboxR.scrollTop = 0;
  9714. this.$refs.unitBox.scrollTop = 0;
  9715. },
  9716. panUnitJson() {
  9717. let _unitIndex = this.unitIndex;
  9718. let cPan = 1;
  9719. for (
  9720. var j = 0;
  9721. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9722. j++
  9723. ) {
  9724. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9725. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9726. j
  9727. ].proVisible2 = false;
  9728. if (
  9729. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9730. .length > 1
  9731. ) {
  9732. for (
  9733. var z = 0;
  9734. z <
  9735. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9736. .length;
  9737. z++
  9738. ) {
  9739. if (
  9740. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9741. z
  9742. ].tool.length
  9743. ) {
  9744. this.$message.error(this.lang.ssAddToolFull);
  9745. cPan = 2;
  9746. break;
  9747. }
  9748. }
  9749. }
  9750. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9751. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9752. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9753. (ele) => {
  9754. return ele.value != "" || ele.detail != "" || ele.target != "";
  9755. }
  9756. );
  9757. }
  9758. }
  9759. return cPan;
  9760. },
  9761. unitOpen(i) {
  9762. if (this.unitJson[i].toolOpen) {
  9763. this.unitJson[i].toolOpen = false;
  9764. } else {
  9765. this.unitJson[i].toolOpen = true;
  9766. }
  9767. this.updateWork();
  9768. this.$forceUpdate();
  9769. },
  9770. unitSet2(i) {
  9771. if (this.panUnitJson() == 2) {
  9772. return;
  9773. }
  9774. // if(this.unitJson[i].toolOpen){
  9775. // this.unitJson[i].toolOpen = false
  9776. // this.updateWork()
  9777. // this.$forceUpdate()
  9778. // return
  9779. // }else {
  9780. this.unitJson[i].toolOpen = true;
  9781. // }
  9782. this.$forceUpdate();
  9783. if (this.unitIndex == i) {
  9784. return;
  9785. }
  9786. this.unitIndex = i;
  9787. this.isClickColor = 1;
  9788. // this.$refs.rightboxR.scrollTop = 0;
  9789. this.$refs.unitBox.scrollTop = 0;
  9790. },
  9791. updateCourseState(i) {
  9792. let params = [
  9793. {
  9794. cid: this.cid,
  9795. state: i,
  9796. },
  9797. ];
  9798. this.ajax
  9799. .post(this.$store.state.api + "updateCourseMode", params)
  9800. .then((res) => {
  9801. this.courseState = i;
  9802. })
  9803. .catch((err) => {
  9804. this.$message.error(this.lang.ssNetPoor);
  9805. console.error(err);
  9806. });
  9807. },
  9808. addtips(){
  9809. let params = [
  9810. {
  9811. cid: this.cid,
  9812. tips: JSON.stringify(this.aiJson),
  9813. tid: this.templateid
  9814. },
  9815. ];
  9816. this.ajax
  9817. .post(this.$store.state.api + "addTips", params)
  9818. .then((res) => {
  9819. })
  9820. .catch((err) => {
  9821. this.$message.error(this.lang.ssNetPoor);
  9822. console.error(err);
  9823. });
  9824. },
  9825. openSaveTips(){
  9826. this.dialogVisibleTips = true
  9827. },
  9828. time() {
  9829. if (!this.now) {
  9830. this.now = new Date().getTime();
  9831. return true;
  9832. } else {
  9833. let time = new Date().getTime();
  9834. if (time - this.now > 1000) {
  9835. this.now = time;
  9836. return true;
  9837. } else {
  9838. return false;
  9839. }
  9840. }
  9841. },
  9842. deleteUnit(i) {
  9843. var _this = this;
  9844. if (i == 0 && _this.unitJson.length == 1) {
  9845. _this
  9846. .$confirm(_this.lang.ssSwitchTask, _this.lang.ssTip, {
  9847. confirmButtonText: _this.lang.ssConfirm,
  9848. cancelButtonText: _this.lang.ssCancel,
  9849. type: "warning",
  9850. })
  9851. .then(() => {
  9852. _this.unitJson[i].dyName = "";
  9853. // _this.updateCourseState(2);
  9854. })
  9855. .catch(() => {
  9856. return;
  9857. });
  9858. } else {
  9859. _this
  9860. .$confirm(_this.lang.ssDeleteStage, _this.lang.ssTip, {
  9861. confirmButtonText: _this.lang.ssConfirm,
  9862. cancelButtonText: _this.lang.ssCancel,
  9863. type: "warning",
  9864. })
  9865. .then(() => {
  9866. _this.isDelete = 2;
  9867. // _this.unitIndex = _this.unitIndex - 1;
  9868. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9869. // _this.$message.success("删除成功");
  9870. })
  9871. .catch(() => {
  9872. return;
  9873. });
  9874. }
  9875. },
  9876. deleteWork(chapid) {
  9877. let params = [
  9878. {
  9879. cid: this.cid,
  9880. chapters: JSON.stringify(this.unitJson),
  9881. uid: this.userid,
  9882. chapid: chapid,
  9883. },
  9884. ];
  9885. this.ajax
  9886. .post(this.$store.state.api + "deleteWork", params)
  9887. .then((res) => {
  9888. this.$message({
  9889. message: this.lang.ssDeleteSucc,
  9890. type: "success",
  9891. });
  9892. let task = JSON.parse(
  9893. JSON.stringify(
  9894. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9895. )
  9896. );
  9897. this.unitJson.splice(this.unitIndex, 1);
  9898. if (this.unitIndex == 0) {
  9899. this.unitIndex = 0;
  9900. } else {
  9901. this.unitIndex = this.unitIndex - 1;
  9902. }
  9903. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9904. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9905. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9906. ...task,
  9907. ];
  9908. }
  9909. })
  9910. .catch((err) => {
  9911. this.$message.error(this.lang.ssNetPoor);
  9912. console.error(err);
  9913. });
  9914. },
  9915. deleteTool(itemTaskIndex, i) {
  9916. var _this = this;
  9917. if (_this.time()) {
  9918. _this
  9919. .$confirm(_this.lang.ssDeleteTool, _this.lang.ssTip, {
  9920. confirmButtonText: _this.lang.ssConfirm,
  9921. cancelButtonText: _this.lang.ssCancel,
  9922. type: "warning",
  9923. })
  9924. .then(() => {
  9925. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9926. itemTaskIndex
  9927. ].toolChoose.splice(i, 1);
  9928. _this.$message.success(_this.lang.ssDeleteSucc);
  9929. })
  9930. .catch(() => {
  9931. return;
  9932. });
  9933. }
  9934. },
  9935. deleteSentence(i) {
  9936. var _this = this;
  9937. _this
  9938. .$confirm(_this.lang.ssDeleteQues, _this.lang.ssTip, {
  9939. confirmButtonText: _this.lang.ssConfirm,
  9940. cancelButtonText: _this.lang.ssCancel,
  9941. type: "warning",
  9942. })
  9943. .then(() => {
  9944. _this.sentenceList.splice(i, 1);
  9945. _this.$message.success(_this.lang.ssDeleteSucc);
  9946. })
  9947. .catch(() => {
  9948. return;
  9949. });
  9950. },
  9951. deleteS(s, i, j) {
  9952. this.sentenceList[i].addSentence.splice(j, 1);
  9953. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9954. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9955. this.sentenceList[i].rightAnswer.splice(a, 1);
  9956. }
  9957. },
  9958. openT() {
  9959. window.topU.postMessage({ tools: "25" }, "*");
  9960. },
  9961. deleteTask(i) {
  9962. var _this = this;
  9963. if (_this.time()) {
  9964. _this
  9965. .$confirm(
  9966. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9967. 1 ==
  9968. i
  9969. ? _this.lang.ssDeleteTask
  9970. : _this.lang.ssSwitchTaskDel,
  9971. _this.lang.ssTip,
  9972. {
  9973. confirmButtonText: _this.lang.ssConfirm,
  9974. cancelButtonText: _this.lang.ssCancel,
  9975. type: "warning",
  9976. }
  9977. )
  9978. .then(() => {
  9979. if (i == 0 && _this.courseState == 4) {
  9980. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9981. i + 1
  9982. ].chapterData = JSON.parse(
  9983. JSON.stringify(
  9984. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9985. .chapterData
  9986. )
  9987. );
  9988. }
  9989. _this.$forceUpdate();
  9990. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9991. i,
  9992. 1
  9993. );
  9994. _this.$message.success(_this.lang.ssDeleteSucc);
  9995. })
  9996. .catch(() => {
  9997. return;
  9998. });
  9999. }
  10000. },
  10001. deleteTask2(i) {
  10002. var _this = this;
  10003. if (_this.time()) {
  10004. _this
  10005. .$confirm(
  10006. _this.lang.ssDeleteTask,
  10007. _this.lang.ssTip,
  10008. {
  10009. confirmButtonText: _this.lang.ssConfirm,
  10010. cancelButtonText: _this.lang.ssCancel,
  10011. type: "warning",
  10012. }
  10013. )
  10014. .then(() => {
  10015. if (i == 0 && _this.courseState == 4) {
  10016. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10017. i + 1
  10018. ].chapterData = JSON.parse(
  10019. JSON.stringify(
  10020. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10021. .chapterData
  10022. )
  10023. );
  10024. }
  10025. _this.$forceUpdate();
  10026. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10027. i,
  10028. 1
  10029. );
  10030. _this.$message.success(_this.lang.ssDeleteSucc);
  10031. })
  10032. .catch(() => {
  10033. return;
  10034. });
  10035. }
  10036. },
  10037. handlePictureCardPreview(file) {
  10038. this.dialogImageUrl = file.url;
  10039. },
  10040. clean(i, c) {
  10041. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  10042. },
  10043. handle_remove1(file, fileList, type) {
  10044. var _tmp = this.cover;
  10045. // for (var i = 0, len = _tmp.length; i < len; i++) {
  10046. // if (_tmp[i].uid == file.uid) {
  10047. // _tmp.splice(i, 1);
  10048. // break;
  10049. // }
  10050. // this.cover = _tmp;
  10051. // }
  10052. this.cover = [];
  10053. this.noneBtnImg = this.cover.length >= 1;
  10054. this.isSysPic = false;
  10055. this.isSysPic2 = false;
  10056. this.$forceUpdate();
  10057. },
  10058. addImg(e) {
  10059. var el = e.currentTarget;
  10060. el.getElementsByTagName("input")[0].click();
  10061. e.target.value = "";
  10062. },
  10063. addChaptersTools(i) {
  10064. this.chapTools = [
  10065. {
  10066. tools: [],
  10067. toolDetail: "",
  10068. },
  10069. ];
  10070. this.chapCount = i;
  10071. this.dialogVisible4 = true;
  10072. },
  10073. isNoFinsh() {
  10074. this.$message.warning(this.lang.ssInDev);
  10075. },
  10076. addAttText(i) {
  10077. this.AttText = {
  10078. title: "",
  10079. text: "",
  10080. };
  10081. this.taskCount = i;
  10082. this.AttTextType = 0;
  10083. this.$forceUpdate();
  10084. this.dialogVisible6 = true;
  10085. setTimeout(() => {
  10086. this.$refs["fuInput"].focus();
  10087. }, 100);
  10088. },
  10089. openLine(i) {
  10090. this.line = "";
  10091. this.lineCount = i;
  10092. this.lineType = 0;
  10093. this.$forceUpdate();
  10094. this.dialogVisible7 = true;
  10095. },
  10096. pasteLine(i) {
  10097. navigator.clipboard
  10098. .readText()
  10099. .then((v) => {
  10100. console.log("获取剪贴板成功:", v);
  10101. const html = v;
  10102. const regex = /src="(.*?)"/g;
  10103. const match = regex.exec(html);
  10104. if (match && match[1]) {
  10105. console.log(match[1]);
  10106. this.$message.success(this.lang.ssPasteSucc);
  10107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10108. i
  10109. ].chapterData.unshift({
  10110. name: this.lang.ssLink,
  10111. title: this.lang.ssEmbedCode,
  10112. url: match[1],
  10113. type: 8,
  10114. });
  10115. } else {
  10116. // console.log("未找到包含 src 属性的 iframe");
  10117. this.$message.error(
  10118. this.lang.ssNoPasteObj
  10119. );
  10120. }
  10121. })
  10122. .catch((v) => {
  10123. console.log("获取剪贴板失败: ", v);
  10124. });
  10125. },
  10126. openSource(i) {
  10127. this.lineCount = i;
  10128. this.sourceData = {};
  10129. this.dialogVisibleSource = true;
  10130. this.updateSourcePan = false;
  10131. },
  10132. openAiCreate(i){
  10133. // this.lineCount = i;
  10134. // this.dialogVisibleAiCreate = true;
  10135. if(!this.pptCount.includes(i)){
  10136. this.pptCount.push(i)
  10137. this.dialogVisibleAiCreate2.push(i);
  10138. }else{
  10139. this.$refs['ppt'+i][0].tanDialog = false
  10140. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  10141. }
  10142. this.pptBoxDialog = true
  10143. },
  10144. createAiPpt(json, i){
  10145. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10146. // this.dialogVisibleAiCreate = false;
  10147. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10148. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10149. },
  10150. closeAiPpt(i){
  10151. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10152. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10153. },
  10154. openAiCreateVideo(i){
  10155. this.lineCount = i;
  10156. this.dialogVisibleAiCreateVideo = true;
  10157. },
  10158. createAiVideo(json){
  10159. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10160. // this.dialogVisibleAiCreateVideo = false;
  10161. },
  10162. async createTeacherAn(index, type){
  10163. // this.lineCount = index;
  10164. let md = new MarkdownIt();
  10165. if(this.courseState == 4){
  10166. this.anLoading[0] = true
  10167. // if(index == 0 || index){
  10168. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10169. // let name = _task.task+'-教案'
  10170. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10171. // await this.generate(name, _html, 0)
  10172. // }else {
  10173. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10174. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10175. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10176. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10177. await this.generate(name, _html, 0)
  10178. }
  10179. // }
  10180. }else if(this.courseState == 5){
  10181. if(type != 2){
  10182. this.anLoading[index] = true
  10183. }
  10184. if(index == 0 || index){
  10185. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10186. let name = this.lang.ssTaskNum.replace(/\*/g, index+1)+_task.task+'-'+this.lang.ssLessonPlan
  10187. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10188. await this.generate(name, _html, index,"", type)
  10189. }else {
  10190. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10191. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10192. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10193. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10194. await this.generate(name, _html, i)
  10195. }
  10196. }
  10197. }
  10198. },
  10199. async createTaskAn(index){
  10200. // this.lineCount = index;
  10201. if(this.taskAnLoading[index]){
  10202. // this.$message.error('请等待当前学历案生成完成')
  10203. this.cancelAjax('taskAn', index)
  10204. return
  10205. }
  10206. this.taskAnLoading[index] = true
  10207. this.$forceUpdate()
  10208. let _this = this
  10209. let md = new MarkdownIt();
  10210. let messages = ""
  10211. messages = `NOTICE
  10212. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10213. Language: ${this.getLang()}
  10214. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10215. ## 任务教案
  10216. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10217. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10218. let parm = {
  10219. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10220. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10221. session_name: uuidv4(),
  10222. userId: this.userid,
  10223. file_ids: [],
  10224. model: 'gpt-4o-2024-11-20',
  10225. temperature: this.mode == 3 ? 0.5 : 0.1,
  10226. }
  10227. this.ajax
  10228. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10229. .then(async (response) => {
  10230. console.log(response);
  10231. let data = response.data.FunctionResponse
  10232. if (data.message) {
  10233. console.log(data.message);
  10234. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10235. let name = _task.task+'-'+_this.lang.ssStudyPlan
  10236. let _html = md.render(data.message).replace(/[\r\n]+/g, '').replace(/<hr>/g, '').replace(/<ol[^>]*>/g, '').replace(/<\/ol>/g, '').replace(/<li[^>]*>(.*?)<\/li>/g, (match, content) => {
  10237. // 去除内容为空的<li>标签
  10238. if (!content.trim()) {
  10239. return ''; // 如果<li>标签内容为空,删除该标签
  10240. }
  10241. // 去掉<li>中的标签,保留纯文本内容
  10242. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10243. }); // 去掉 <ol> 和 </ol> 标签
  10244. console.log(_html)
  10245. await _this.generate(name, _html, index, ()=>{
  10246. _this.taskAnLoading[index] = false
  10247. _this.taskAnCancelToken[index] = null
  10248. })
  10249. }else{
  10250. _this.taskAnLoading[index] = false
  10251. _this.taskAnCancelToken[index] = null
  10252. }
  10253. }).catch((error) => {
  10254. console.log(error);
  10255. _this.taskAnLoading[index] = false
  10256. _this.taskAnCancelToken[index] = null
  10257. });
  10258. },
  10259. async generate(a, html, index, callback, type) {
  10260. // <html lang="en">
  10261. // 将html文件中需要用到的数据挂载到store上
  10262. const content = `<!DOCTYPE html>
  10263. <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'>
  10264. <head>
  10265. <!--[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]-->
  10266. <meta charset="UTF-8">
  10267. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10268. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10269. <title>${a}</title>
  10270. <style>
  10271. table {
  10272. border-collapse: collapse; /* 折叠边框 */
  10273. width: 100%;
  10274. }
  10275. th, td {
  10276. border: 1px solid black; /* 线条样式 */
  10277. padding: 8px;
  10278. text-align: left;
  10279. }
  10280. </style>
  10281. </head>
  10282. <body>
  10283. ${html}
  10284. </body>
  10285. </html>`;
  10286. // debugger
  10287. const blob = htmlDocx.asBlob(content)
  10288. // debugger
  10289. let dname = a + ".docx";
  10290. // 创建文件流
  10291. // 创建bolb实例时,内容一定要放在[]中
  10292. // const blob = new Blob([content], {
  10293. // type: "text/plain;charset='utf-8'",
  10294. // });
  10295. // const file = new File([blob], dname, { type: 'application/msword' });
  10296. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10297. // let params = convertApi.createParams()
  10298. // params.add('file', file)
  10299. // try {
  10300. // let result = await convertApi.convert('docx', 'docx', params)
  10301. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10302. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10303. // });
  10304. // await this.beforeUploadHtml(file, index, callback)
  10305. // } catch (error) {
  10306. // console.log('=================','报错')
  10307. // await this.beforeUploadHtml(file, index, callback)
  10308. // return
  10309. // }
  10310. await this.beforeUploadHtml(file, index, callback, type)
  10311. },
  10312. async generateExport(a, html, index) {
  10313. // <html lang="en">
  10314. // 将html文件中需要用到的数据挂载到store上
  10315. const content = `<!DOCTYPE html>
  10316. <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'>
  10317. <head>
  10318. <!--[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]-->
  10319. <meta charset="UTF-8">
  10320. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10321. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10322. <title>${a}</title>
  10323. <style>
  10324. table {
  10325. border-collapse: collapse; /* 折叠边框 */
  10326. width: 100%;
  10327. }
  10328. th, td {
  10329. border: 1px solid black; /* 线条样式 */
  10330. padding: 8px;
  10331. text-align: left;
  10332. }
  10333. </style>
  10334. </head>
  10335. <body>
  10336. ${html}
  10337. </body>
  10338. </html>`;
  10339. // debugger
  10340. const blob = htmlDocx.asBlob(content)
  10341. // debugger
  10342. const dname = `${a}.docx`;
  10343. // 创建文件流
  10344. // const file = new File([blob], dname, { type: 'application/msword' });
  10345. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10346. // let params = convertApi.createParams()
  10347. // params.add('file', file)
  10348. // try {
  10349. // let result = await convertApi.convert('docx', 'docx', params)
  10350. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10351. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10352. // });
  10353. // // 执行下载
  10354. // saveAs(file, dname);
  10355. // } catch (error) {
  10356. // saveAs(file, dname);
  10357. // // this.$message.error('导出失败')
  10358. // }
  10359. saveAs(file, dname);
  10360. // return file
  10361. },
  10362. async generateExport2(a, html, index) {
  10363. return new Promise(async (resolve) => {
  10364. // <html lang="en">
  10365. // 将html文件中需要用到的数据挂载到store上
  10366. const content = `<!DOCTYPE html>
  10367. <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'>
  10368. <head>
  10369. <!--[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]-->
  10370. <meta charset="UTF-8">
  10371. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10372. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10373. <title>${a}</title>
  10374. <style>
  10375. table {
  10376. border-collapse: collapse; /* 折叠边框 */
  10377. width: 100%;
  10378. }
  10379. th, td {
  10380. border: 1px solid black; /* 线条样式 */
  10381. padding: 8px;
  10382. text-align: left;
  10383. }
  10384. </style>
  10385. </head>
  10386. <body>
  10387. ${html}
  10388. </body>
  10389. </html>`;
  10390. // debugger
  10391. const blob = htmlDocx.asBlob(content)
  10392. // debugger
  10393. const dname = `${a}`;
  10394. // 创建文件流
  10395. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10396. let params = convertApi.createParams()
  10397. params.add('file', file)
  10398. resolve(file); // 通过 Promise 返回 File 对象
  10399. // try {
  10400. // let result = await convertApi.convert('docx', 'docx', params)
  10401. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10402. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10403. // });
  10404. // resolve(file); // 通过 Promise 返回 File 对象
  10405. // } catch (error) {
  10406. // resolve(''); // 通过 Promise 返回 File 对象
  10407. // }
  10408. });
  10409. },
  10410. async addChatAppendixFile(name, html){
  10411. await this.generate(name, html, 0,"", 3)
  10412. },
  10413. beforeUploadHtml(event, index, callback, type) {
  10414. var file = event;
  10415. var credentials = {
  10416. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10417. secretAccessKey: "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",
  10418. }; //秘钥形式的登录上传
  10419. window.AWS.config.update(credentials);
  10420. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10421. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10422. var _this = this;
  10423. if (file) {
  10424. var params = {
  10425. Key:
  10426. file.name.split(".")[0] +
  10427. new Date().getTime() +
  10428. "." +
  10429. file.name.split(".")[file.name.split(".").length - 1],
  10430. ContentType: file.type,
  10431. Body: file,
  10432. "Access-Control-Allow-Credentials": "*",
  10433. ACL: "public-read",
  10434. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10435. var options = {
  10436. partSize: 2048 * 1024 * 1024,
  10437. queueSize: 2,
  10438. leavePartsOnError: true,
  10439. };
  10440. bucket
  10441. .upload(params, options)
  10442. .on("httpUploadProgress", function (evt) {
  10443. //这里可以写进度条
  10444. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10445. })
  10446. .send(function (err, data) {
  10447. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10448. _this.anLoading[0] = false
  10449. }
  10450. if(_this.courseState == 5){
  10451. _this.anLoading[index] = false
  10452. }
  10453. callback ? callback() : ''
  10454. _this.$forceUpdate();
  10455. if (err) {
  10456. _this.$message.error(_this.lang.ssUploadFail);
  10457. } else {
  10458. let _index = 0
  10459. // if(_this.lineCount == 0 || _this.lineCount){
  10460. // _index = _this.lineCount
  10461. // }else {
  10462. _index = index
  10463. // }
  10464. if(type != 2 && type != 3){
  10465. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10466. name: file.name,
  10467. url: data.Location,
  10468. type: 3,
  10469. })
  10470. }else{
  10471. let fileName = file.name;
  10472. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10473. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10474. let count = 1;
  10475. // 检查文件名是否已存在
  10476. while (_this.appendixFile.some(item => item.name === fileName)) {
  10477. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10478. count++;
  10479. }
  10480. if(type == 3){
  10481. _this.$message.success(_this.lang.ssSaveAttach)
  10482. _this.appendixFile.unshift({
  10483. name: fileName,
  10484. url: data.Location,
  10485. type: 3,
  10486. task: 'dialog'
  10487. })
  10488. }else{
  10489. _this.appendixFile.unshift({
  10490. name: fileName,
  10491. url: data.Location,
  10492. type: 3,
  10493. })
  10494. }
  10495. }
  10496. console.log(data.Location);
  10497. }
  10498. });
  10499. }
  10500. },
  10501. async generate2(a, html, index, callback) {
  10502. // 将html文件中需要用到的数据挂载到store上
  10503. const content = `<!DOCTYPE html>
  10504. <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'>
  10505. <head>
  10506. <!--[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]-->
  10507. <meta charset="UTF-8">
  10508. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10509. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10510. <title>${a}</title>
  10511. <style>
  10512. table {
  10513. border-collapse: collapse; /* 折叠边框 */
  10514. width: 100%;
  10515. }
  10516. th, td {
  10517. border: 1px solid black; /* 线条样式 */
  10518. padding: 8px;
  10519. text-align: left;
  10520. }
  10521. </style>
  10522. </head>
  10523. <body>
  10524. ${html}
  10525. </body>
  10526. </html>`;
  10527. const blob = htmlDocx.asBlob(content)
  10528. // debugger
  10529. let dname = a + ".docx";
  10530. // 创建文件流
  10531. // 创建bolb实例时,内容一定要放在[]中
  10532. // const blob = new Blob([content], {
  10533. // type: "text/plain;charset='utf-8'",
  10534. // });
  10535. // const file = new File([blob], dname, { type: 'application/msword' });
  10536. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10537. // let params = convertApi.createParams()
  10538. // params.add('file', file)
  10539. // try {
  10540. // let result = await convertApi.convert('docx', 'docx', params)
  10541. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10542. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10543. // });
  10544. // await this.beforeUploadHtml2(file, index, callback)
  10545. // } catch (error) {
  10546. // await this.beforeUploadHtml2(file, index, callback)
  10547. // return;
  10548. // }
  10549. await this.beforeUploadHtml2(file, index, callback)
  10550. },
  10551. beforeUploadHtml2(event, index, callback) {
  10552. var file = event;
  10553. var credentials = {
  10554. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10555. secretAccessKey: "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",
  10556. }; //秘钥形式的登录上传
  10557. window.AWS.config.update(credentials);
  10558. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10559. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10560. var _this = this;
  10561. if (file) {
  10562. var params = {
  10563. Key:
  10564. file.name.split(".")[0] +
  10565. new Date().getTime() +
  10566. "." +
  10567. file.name.split(".")[file.name.split(".").length - 1],
  10568. ContentType: file.type,
  10569. Body: file,
  10570. "Access-Control-Allow-Credentials": "*",
  10571. ACL: "public-read",
  10572. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10573. var options = {
  10574. partSize: 2048 * 1024 * 1024,
  10575. queueSize: 2,
  10576. leavePartsOnError: true,
  10577. };
  10578. bucket
  10579. .upload(params, options)
  10580. .on("httpUploadProgress", function (evt) {
  10581. //这里可以写进度条
  10582. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10583. })
  10584. .send(async function (err, data) {
  10585. if(_this.courseState == 5){
  10586. _this.loading = false
  10587. }
  10588. if (err) {
  10589. callback ? callback() : ''
  10590. _this.$message.error(_this.lang.ssUploadFail);
  10591. } else {
  10592. let fileid = await _this.createFileid(data.Location)
  10593. // _this.cankaoInfoData.push({
  10594. //                   name: file.name,
  10595. //                   url: data.Location,
  10596. //                   type: 3,
  10597. // fileid: fileid,
  10598. //   })
  10599. _this.infoData2.push({
  10600. name: file.name,
  10601. url: data.Location,
  10602. type: 3,
  10603. fileid: fileid == 1 ? '' : fileid,
  10604. })
  10605. _this.infoData.push({
  10606. name: file.name,
  10607. url: data.Location,
  10608. type: 3,
  10609. fileid: fileid == 1 ? '' : fileid,
  10610. });
  10611. console.log(data.Location);
  10612. callback ? callback() : ''
  10613. }
  10614. });
  10615. }
  10616. },
  10617. addSource() {
  10618. if (!Object.keys(this.sourceData).length) {
  10619. this.$message.error(this.lang.ssSelectResUp);
  10620. return;
  10621. }
  10622. let keys = Object.keys(this.sourceData);
  10623. for (var i = 0; i < keys.length; i++) {
  10624. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10625. this.lineCount
  10626. ].chapterData.unshift({
  10627. name: this.lang.ssLink,
  10628. title: this.sourceData[keys[i]].name,
  10629. url: this.sourceData[keys[i]].url,
  10630. type: 14,
  10631. id: keys[i],
  10632. });
  10633. }
  10634. this.$forceUpdate();
  10635. this.dialogVisibleSource = false;
  10636. },
  10637. updateSource() {
  10638. if (!Object.keys(this.sourceData).length) {
  10639. this.$message.error(this.lang.ssSelectResUp);
  10640. return;
  10641. }
  10642. let keys = Object.keys(this.sourceData);
  10643. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10644. this.taskCount
  10645. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10646. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10647. this.taskCount
  10648. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10649. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10650. this.taskCount
  10651. ].chapterData[this.lineCount].id = keys[0];
  10652. this.updateSourcePan = false;
  10653. this.$forceUpdate();
  10654. this.dialogVisibleSource = false;
  10655. },
  10656. deleteM(i, j) {
  10657. this.testJson.testJson[i].timuList.splice(j, 1);
  10658. },
  10659. beforeUploadTiMu(event, i) {
  10660. const loading = this.openLoading();
  10661. var file = event.target.files[0];
  10662. var credentials = {
  10663. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10664. secretAccessKey: "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",
  10665. }; //秘钥形式的登录上传
  10666. window.AWS.config.update(credentials);
  10667. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10668. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10669. var _this = this;
  10670. if (file) {
  10671. var params = {
  10672. Key:
  10673. file.name.split(".")[0] +
  10674. new Date().getTime() +
  10675. "." +
  10676. file.name.split(".")[file.name.split(".").length - 1],
  10677. ContentType: file.type,
  10678. Body: file,
  10679. "Access-Control-Allow-Credentials": "*",
  10680. ACL: "public-read",
  10681. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10682. var options = {
  10683. partSize: 2048 * 1024 * 1024,
  10684. queueSize: 2,
  10685. leavePartsOnError: true,
  10686. };
  10687. bucket
  10688. .upload(params, options)
  10689. .on("httpUploadProgress", function (evt) {
  10690. //这里可以写进度条
  10691. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10692. })
  10693. .send(function (err, data) {
  10694. loading.close();
  10695. if (err) {
  10696. _this.$message.error(_this.lang.ssUploadFail);
  10697. } else {
  10698. if (_this.testJson.testJson[i].timuList) {
  10699. _this.testJson.testJson[i].timuList.push({
  10700. src: data.Location,
  10701. });
  10702. } else {
  10703. _this.testJson.testJson[i].timuList = [];
  10704. _this.testJson.testJson[i].timuList.push({
  10705. src: data.Location,
  10706. });
  10707. }
  10708. _this.imgChange3(i);
  10709. _this.$forceUpdate();
  10710. }
  10711. });
  10712. }
  10713. },
  10714. beforeUploadTi(event, i, j) {
  10715. const loading = this.openLoading();
  10716. var file = event.target.files[0];
  10717. var credentials = {
  10718. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10719. secretAccessKey: "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",
  10720. }; //秘钥形式的登录上传
  10721. window.AWS.config.update(credentials);
  10722. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10723. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10724. var _this = this;
  10725. if (file) {
  10726. var params = {
  10727. Key:
  10728. file.name.split(".")[0] +
  10729. new Date().getTime() +
  10730. "." +
  10731. file.name.split(".")[file.name.split(".").length - 1],
  10732. ContentType: file.type,
  10733. Body: file,
  10734. "Access-Control-Allow-Credentials": "*",
  10735. ACL: "public-read",
  10736. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10737. var options = {
  10738. partSize: 2048 * 1024 * 1024,
  10739. queueSize: 2,
  10740. leavePartsOnError: true,
  10741. };
  10742. bucket
  10743. .upload(params, options)
  10744. .on("httpUploadProgress", function (evt) {
  10745. //这里可以写进度条
  10746. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10747. })
  10748. .send(function (err, data) {
  10749. loading.close();
  10750. if (err) {
  10751. _this.$message.error(_this.lang.ssUploadFail);
  10752. } else {
  10753. _this.testJson.testJson[i].checkList[j] = {};
  10754. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10755. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10756. _this.imgChange2(i, j);
  10757. _this.$forceUpdate();
  10758. }
  10759. });
  10760. }
  10761. },
  10762. beforeUpload1(event, type) {
  10763. // const loading = this.openLoading();
  10764. var file = event.target.files[0];
  10765. var credentials = {
  10766. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10767. secretAccessKey: "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",
  10768. }; //秘钥形式的登录上传
  10769. window.AWS.config.update(credentials);
  10770. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10771. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10772. var _this = this;
  10773. if (file) {
  10774. var params = {
  10775. Key:
  10776. file.name.split(".")[0] +
  10777. new Date().getTime() +
  10778. "." +
  10779. file.name.split(".")[file.name.split(".").length - 1],
  10780. ContentType: file.type,
  10781. Body: file,
  10782. "Access-Control-Allow-Credentials": "*",
  10783. ACL: "public-read",
  10784. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10785. var options = {
  10786. partSize: 2048 * 1024 * 1024,
  10787. queueSize: 2,
  10788. leavePartsOnError: true,
  10789. };
  10790. bucket
  10791. .upload(params, options)
  10792. .on("httpUploadProgress", function (evt) {
  10793. //这里可以写进度条
  10794. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10795. })
  10796. .send(function (err, data) {
  10797. // loading.close();
  10798. if (err) {
  10799. // var a = _this.$refs.upload1.uploadFiles;
  10800. // a.splice(a.length - 1, a.length);
  10801. _this.$message.error(_this.lang.ssUploadFail);
  10802. } else {
  10803. // _this.cover.push({
  10804. // name: file.name,
  10805. // url: data.Location,
  10806. // uid: file.uid,
  10807. // });
  10808. _this.cover = [
  10809. {
  10810. name: file.name,
  10811. url: data.Location,
  10812. uid: file.uid,
  10813. },
  10814. ];
  10815. _this.imgChange1(null, null, 1, null);
  10816. _this.choosePicVisible = false;
  10817. console.log(data.Location);
  10818. }
  10819. });
  10820. }
  10821. },
  10822. beforeUploadSelect(event, type) {
  10823. // const loading = this.openLoading();
  10824. var file = event.target.files[0];
  10825. var credentials = {
  10826. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10827. secretAccessKey: "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",
  10828. }; //秘钥形式的登录上传
  10829. window.AWS.config.update(credentials);
  10830. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10831. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10832. var _this = this;
  10833. if (file) {
  10834. var params = {
  10835. Key:
  10836. file.name.split(".")[0] +
  10837. new Date().getTime() +
  10838. "." +
  10839. file.name.split(".")[file.name.split(".").length - 1],
  10840. ContentType: file.type,
  10841. Body: file,
  10842. "Access-Control-Allow-Credentials": "*",
  10843. ACL: "public-read",
  10844. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10845. var options = {
  10846. partSize: 2048 * 1024 * 1024,
  10847. queueSize: 2,
  10848. leavePartsOnError: true,
  10849. };
  10850. bucket
  10851. .upload(params, options)
  10852. .on("httpUploadProgress", function (evt) {
  10853. //这里可以写进度条
  10854. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10855. })
  10856. .send(function (err, data) {
  10857. // loading.close();
  10858. if (err) {
  10859. _this.$message.error(_this.lang.ssUploadFail);
  10860. } else {
  10861. _this.selectJson.url = data.Location;
  10862. console.log(data.Location);
  10863. }
  10864. });
  10865. }
  10866. },
  10867. chooseSysPic(p) {
  10868. this.cover = [];
  10869. setTimeout(() => {
  10870. this.cover[0] = {
  10871. name: this.lang.ssSystemPic,
  10872. url: p,
  10873. };
  10874. this.imgChange1(null, null, 1, null);
  10875. this.$forceUpdate();
  10876. }, 0);
  10877. this.isSysPic = true;
  10878. this.isSysPic2 = false;
  10879. this.sysPicVisible = false;
  10880. this.$forceUpdate();
  10881. },
  10882. chooseSysPic2(p) {
  10883. this.cover = [];
  10884. setTimeout(() => {
  10885. this.cover[0] = {
  10886. name: this.lang.ssNetworkPic,
  10887. url: p,
  10888. };
  10889. this.imgChange1(null, null, 1, null);
  10890. this.$forceUpdate();
  10891. }, 0);
  10892. this.isSysPic2 = true;
  10893. this.isSysPic = false;
  10894. this.sysPicVisible2 = false;
  10895. this.$forceUpdate();
  10896. },
  10897. beforeUpload(data) {
  10898. this.$refs.upload1.uploadFiles;
  10899. this.uploadLoading1 = true;
  10900. var file = data.file;
  10901. var credentials = {
  10902. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10903. secretAccessKey: "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",
  10904. }; //秘钥形式的登录上传
  10905. window.AWS.config.update(credentials);
  10906. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10907. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10908. var _this = this;
  10909. if (file) {
  10910. var params = {
  10911. Key:
  10912. file.name.split(".")[0] +
  10913. new Date().getTime() +
  10914. "." +
  10915. file.name.split(".")[file.name.split(".").length - 1],
  10916. ContentType: file.type,
  10917. Body: file,
  10918. "Access-Control-Allow-Credentials": "*",
  10919. ACL: "public-read",
  10920. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10921. var options = {
  10922. partSize: 2048 * 1024 * 1024,
  10923. queueSize: 2,
  10924. leavePartsOnError: true,
  10925. };
  10926. bucket
  10927. .upload(params, options)
  10928. .on("httpUploadProgress", function (evt) {
  10929. //这里可以写进度条
  10930. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10931. })
  10932. .send(function (err, data) {
  10933. _this.uploadLoading1 = false;
  10934. if (err) {
  10935. // var a = _this.$refs.upload1.uploadFiles;
  10936. // a.splice(a.length - 1, a.length);
  10937. _this.$message.error(_this.lang.ssUploadFail);
  10938. } else {
  10939. //上传成功处理
  10940. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10941. name: file.name,
  10942. url: data.Location,
  10943. uid: file.uid,
  10944. });
  10945. _this.imgChange();
  10946. console.log(data.Location);
  10947. }
  10948. });
  10949. }
  10950. },
  10951. onExceed() {
  10952. this.$message.error(this.lang.ssCoverOneUp);
  10953. },
  10954. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10955. let file = "";
  10956. let cfindex2 = 0;
  10957. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10958. // var file = event.target.files[0];
  10959. file = event.target.files[cfindex];
  10960. let fileName = file.name
  10961. let fileUid = file.uid
  10962. // const loading = this.openLoading();
  10963. // var file = event.target.files[0];
  10964. var credentials = {
  10965. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10966. secretAccessKey: "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",
  10967. }; //秘钥形式的登录上传
  10968. window.AWS.config.update(credentials);
  10969. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10970. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10971. var _this = this;
  10972. if (type == 3) {
  10973. var b = [
  10974. "DOC",
  10975. "DOCX",
  10976. "DOCM",
  10977. "DOTM",
  10978. "DOTX",
  10979. "PPTX",
  10980. "PPSX",
  10981. "PPT",
  10982. "PPS",
  10983. "PPTM",
  10984. "POTM",
  10985. "PPAM",
  10986. "POTX",
  10987. "PPSM",
  10988. ];
  10989. if (
  10990. b.indexOf(
  10991. file.name
  10992. .split(".")
  10993. [file.name.split(".").length - 1].toLocaleUpperCase()
  10994. ) != -1
  10995. ) {
  10996. if (file.size / 1024 / 1024 > 80) {
  10997. this.$message.error(this.lang.ssFileOver80MB);
  10998. this.inputShow = true;
  10999. // var a = _this.$refs.upload1.uploadFiles;
  11000. // a.splice(a.length - 1, a.length);
  11001. // loading.close();
  11002. return;
  11003. }
  11004. } else if (
  11005. file.name
  11006. .split(".")
  11007. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11008. ) {
  11009. if (file.size / 1024 / 1024 > 80) {
  11010. this.$message.error(this.lang.ssAddFileOver80);
  11011. this.inputShow = true;
  11012. // var a = _this.$refs.upload1.uploadFiles;
  11013. // a.splice(a.length - 1, a.length);
  11014. // loading.close();
  11015. return;
  11016. }
  11017. }
  11018. }
  11019. this.inputShow = false;
  11020. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11021. // itemTaskIndex
  11022. // ].progress = 0;
  11023. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11024. itemTaskIndex
  11025. ].proVisible = true;
  11026. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11027. itemTaskIndex
  11028. ].isFinishSize = 0;
  11029. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11030. itemTaskIndex
  11031. ].isAllSize = event.target.files.length;
  11032. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11033. // itemTaskIndex
  11034. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11035. _this.$forceUpdate();
  11036. if (file) {
  11037. var params = {
  11038. Key:
  11039. file.name.split(".")[0] +
  11040. new Date().getTime() +
  11041. "." +
  11042. file.name.split(".")[file.name.split(".").length - 1],
  11043. ContentType: file.type,
  11044. Body: file,
  11045. "Access-Control-Allow-Credentials": "*",
  11046. ACL: "public-read",
  11047. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11048. var options = {
  11049. partSize: 2048 * 1024 * 1024,
  11050. queueSize: 2,
  11051. leavePartsOnError: true,
  11052. };
  11053. bucket
  11054. .upload(params, options)
  11055. .on("httpUploadProgress", function (evt) {
  11056. //这里可以写进度条
  11057. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11058. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11059. // itemTaskIndex
  11060. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  11061. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11062. // itemTaskIndex
  11063. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11064. // _this.$forceUpdate();
  11065. })
  11066. .send(function (err, data) {
  11067. cfindex2++
  11068. // loading.close();
  11069. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11070. // itemTaskIndex
  11071. // ].progress = 100;
  11072. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11073. itemTaskIndex
  11074. ].isFinishSize = cfindex2
  11075. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11076. // itemTaskIndex
  11077. // ].isAllSize;
  11078. _this.$forceUpdate();
  11079. setTimeout(() => {
  11080. if (
  11081. cfindex2 == event.target.files.length ||
  11082. cfindex2 > event.target.files.length
  11083. ) {
  11084. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11085. itemTaskIndex
  11086. ].proVisible = false;
  11087. }
  11088. _this.$forceUpdate();
  11089. }, 1000);
  11090. _this.inputShow = true;
  11091. if (err) {
  11092. // var a = _this.$refs.upload1.uploadFiles;
  11093. // a.splice(a.length - 1, a.length);
  11094. _this.$message.error(_this.lang.ssUploadFail);
  11095. } else {
  11096. if (type == 13) {
  11097. let _type = 2;
  11098. var imgA = [
  11099. "png",
  11100. "jpg",
  11101. "jpeg",
  11102. "bmp",
  11103. "gif",
  11104. "webp",
  11105. "psd",
  11106. "svg",
  11107. "tiff",
  11108. ];
  11109. var fileA = [
  11110. "PDF",
  11111. "DOC",
  11112. "DOCX",
  11113. "DOCM",
  11114. "DOTM",
  11115. "DOTX",
  11116. "PPTX",
  11117. "PPSX",
  11118. "PPT",
  11119. "PPS",
  11120. "PPTM",
  11121. "POTM",
  11122. "PPAM",
  11123. "POTX",
  11124. "PPSM",
  11125. "XLSX",
  11126. "XLS",
  11127. ];
  11128. var videoA = [
  11129. "AVI",
  11130. "NAVI",
  11131. "MPEG",
  11132. "ASF",
  11133. "MOV",
  11134. "WMV",
  11135. "3GP",
  11136. "RM",
  11137. "RMVB",
  11138. "FLV",
  11139. "F4V",
  11140. "H.264",
  11141. "H.265",
  11142. "REAL VIDEO",
  11143. "MKV",
  11144. "WebM",
  11145. "HDDVD",
  11146. "MP4",
  11147. "MPG",
  11148. "M4V",
  11149. "MGV",
  11150. "OGV",
  11151. "QTM",
  11152. "STR",
  11153. "AMC",
  11154. "DVX",
  11155. "EVO",
  11156. "DAT",
  11157. "OGG",
  11158. "OGM",
  11159. ];
  11160. if (
  11161. fileA.indexOf(
  11162. data.Location.split(".")[
  11163. data.Location.split(".").length - 1
  11164. ].toLocaleUpperCase()
  11165. ) != -1
  11166. ) {
  11167. _type = 3;
  11168. } else if (
  11169. videoA.indexOf(
  11170. data.Location.split(".")[
  11171. data.Location.split(".").length - 1
  11172. ].toLocaleUpperCase()
  11173. ) != -1
  11174. ) {
  11175. _type = 2;
  11176. } else if (
  11177. imgA.indexOf(
  11178. data.Location.split(".")[
  11179. data.Location.split(".").length - 1
  11180. ].toLocaleLowerCase()
  11181. ) != -1
  11182. ) {
  11183. _type = 13;
  11184. } else {
  11185. _type = 12;
  11186. }
  11187. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11188. itemTaskIndex
  11189. ].chapterData.unshift({
  11190. name: fileName,
  11191. url: data.Location,
  11192. uid: fileUid,
  11193. type: _type,
  11194. });
  11195. _this.imgChange1(null, null, _type, itemTaskIndex);
  11196. } else if (type == 2 || type == 3 || type == 12) {
  11197. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11198. itemTaskIndex
  11199. ].chapterData.unshift({
  11200. name: fileName,
  11201. url: data.Location,
  11202. uid: fileUid,
  11203. type: type,
  11204. });
  11205. _this.imgChange1(null, null, type, itemTaskIndex);
  11206. } else if (type == 4) {
  11207. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11208. itemTaskIndex
  11209. ].fileList1.push({
  11210. name: fileName,
  11211. url: data.Location,
  11212. uid: fileUid,
  11213. });
  11214. _this.imgChange1(null, null, type, itemTaskIndex);
  11215. } else if (type == 5) {
  11216. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11217. itemTaskIndex
  11218. ].homeworkList.push({
  11219. name: fileName,
  11220. url: data.Location,
  11221. uid: fileUid,
  11222. });
  11223. _this.imgChange1(null, null, type, itemTaskIndex);
  11224. }
  11225. console.log(data.Location);
  11226. }
  11227. });
  11228. }
  11229. }
  11230. },
  11231. async beforeUploadInfo2(event, type, tindex) {
  11232. // const loading = this.openLoading();
  11233. let file = "";
  11234. let cfindex2 = 0;
  11235. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11236. // var file = event.target.files[0];
  11237. file = event.target.files[cfindex];
  11238. let fileName = file.name
  11239. let fileUid = file.uid
  11240. var credentials = {
  11241. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11242. secretAccessKey: "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",
  11243. }; //秘钥形式的登录上传
  11244. window.AWS.config.update(credentials);
  11245. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11246. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11247. var _this = this;
  11248. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11249. if (
  11250. xianObj.indexOf(
  11251. file.name
  11252. .split(".")
  11253. [file.name.split(".").length - 1].toLocaleUpperCase()
  11254. ) == -1
  11255. ) {
  11256. this.$message.error(this.lang.ssUploadDocPptFiles);
  11257. this.inputShow = true;
  11258. // var a = _this.$refs.upload1.uploadFiles;
  11259. // a.splice(a.length - 1, a.length);
  11260. // loading.close();
  11261. return;
  11262. }
  11263. // if (
  11264. // ['DOC'].indexOf(
  11265. // file.name
  11266. // .split(".")
  11267. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11268. // ) !== -1
  11269. // ) {
  11270. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11271. // this.inputShow = true;
  11272. // return;
  11273. // }
  11274. if (type == 3) {
  11275. var b = [
  11276. "DOC",
  11277. "DOCX",
  11278. "DOCM",
  11279. "DOTM",
  11280. "DOTX",
  11281. "PPTX",
  11282. "PPSX",
  11283. "PPT",
  11284. "PPS",
  11285. "PPTM",
  11286. "POTM",
  11287. "PPAM",
  11288. "POTX",
  11289. "PPSM",
  11290. ];
  11291. if (
  11292. b.indexOf(
  11293. file.name
  11294. .split(".")
  11295. [file.name.split(".").length - 1].toLocaleUpperCase()
  11296. ) != -1
  11297. ) {
  11298. if (file.size / 1024 / 1024 > 80) {
  11299. this.$message.error(this.lang.ssFileOver80MB);
  11300. this.inputShow = true;
  11301. // var a = _this.$refs.upload1.uploadFiles;
  11302. // a.splice(a.length - 1, a.length);
  11303. // loading.close();
  11304. return;
  11305. }
  11306. } else if (
  11307. file.name
  11308. .split(".")
  11309. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11310. ) {
  11311. if (file.size / 1024 / 1024 > 80) {
  11312. this.$message.error(this.lang.ssAddFileOver80);
  11313. this.inputShow = true;
  11314. // var a = _this.$refs.upload1.uploadFiles;
  11315. // a.splice(a.length - 1, a.length);
  11316. // loading.close();
  11317. return;
  11318. }
  11319. }
  11320. }
  11321. this.inputShow = false;
  11322. if(type == 14){
  11323. // _this.teacherinfoprogress = 0;
  11324. _this.teacherinfoproVisible = true;
  11325. _this.teacherinfoisFinishSize = 0;
  11326. _this.teacherinfoisAllSize = event.target.files.length;
  11327. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11328. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11329. }else if(type == 16){
  11330. _this.mubiaoinfoprogress = 0;
  11331. _this.mubiaoinfoproVisible = true;
  11332. _this.mubiaoinfoisFinishSize = 0;
  11333. _this.mubiaoinfoisAllSize = event.target.files.length;
  11334. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11335. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11336. }else if(type == 17){
  11337. _this.xuanzeinfoprogress = 0;
  11338. _this.xuanzeinfoproVisible = true;
  11339. _this.xuanzeinfoisFinishSize = 0;
  11340. _this.xuanzeinfoisAllSize = event.target.files.length;
  11341. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11342. }else if(type == 18){
  11343. _this.pingjiainfoprogress[tindex] = 0;
  11344. _this.pingjiainfoproVisible[tindex] = true;
  11345. _this.pingjiainfoisFinishSize[tindex] = 0;
  11346. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11347. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11348. }else if(type == 19){
  11349. _this.knowinfoprogress = 0;
  11350. _this.knowinfoproVisible = true;
  11351. _this.knowinfoisFinishSize = 0;
  11352. _this.knowinfoisAllSize = event.target.files.length;
  11353. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11354. }else if(type == 20){
  11355. _this.knowinfoprogress2 = 0;
  11356. _this.knowinfoproVisible2 = true;
  11357. _this.knowinfoisFinishSize2 = 0;
  11358. _this.knowinfoisAllSize2 = event.target.files.length;
  11359. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11360. }else{
  11361. _this.infoprogress = 0;
  11362. _this.infoproVisible = true;
  11363. _this.infoisFinishSize = 0;
  11364. _this.infoisAllSize = event.target.files.length;
  11365. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11366. }
  11367. // if (
  11368. // ['DOC'].indexOf(
  11369. // file.name
  11370. // .split(".")
  11371. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11372. // ) !== -1
  11373. // ) {
  11374. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11375. // // this.inputShow = true;
  11376. // let params = convertApi.createParams()
  11377. // params.add('file', file)
  11378. // try {
  11379. // let result = await convertApi.convert('doc', 'docx', params);
  11380. // // Get result file URL
  11381. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11382. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11383. // });
  11384. // console.log(result)
  11385. // console.log(file)
  11386. // } catch (error) {
  11387. // cfindex2++;
  11388. // if(type == 14){
  11389. // _this.teacherinfoisFinishSize = cfindex2;
  11390. // }else if(type == 16){
  11391. // _this.mubiaoinfoisFinishSize = cfindex2;
  11392. // }else if(type == 17){
  11393. // _this.xuanzeinfoisFinishSize = cfindex2;
  11394. // }else if(type == 18){
  11395. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11396. // }else if(type == 19){
  11397. // _this.knowinfoisFinishSize = cfindex2;
  11398. // }else if(type == 20){
  11399. // _this.knowinfoisFinishSize2 = cfindex2;
  11400. // }else {
  11401. // _this.infoisFinishSize = cfindex2;
  11402. // }
  11403. // setTimeout(() => {
  11404. // if (
  11405. // cfindex2 == event.target.files.length ||
  11406. // cfindex2 > event.target.files.length
  11407. // ) {
  11408. // if(type == 14){
  11409. // _this.teacherinfoproVisible = false;
  11410. // }else if(type == 16){
  11411. // _this.mubiaoinfoproVisible = false;
  11412. // }else if(type == 17){
  11413. // _this.xuanzeinfoproVisible = false;
  11414. // }else if(type == 18){
  11415. // _this.pingjiainfoproVisible[tindex] = false;
  11416. // }else if(type == 19){
  11417. // _this.knowinfoproVisible = false;
  11418. // }else if(type == 20){
  11419. // _this.knowinfoproVisible2 = false;
  11420. // }else{
  11421. // _this.infoproVisible = false;
  11422. // }
  11423. // }
  11424. // _this.$forceUpdate();
  11425. // }, 1000);
  11426. // _this.inputShow = true;
  11427. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11428. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11429. // return; // 直接返回,不继续执行后续代码
  11430. // }
  11431. // // return;
  11432. // }
  11433. _this.$forceUpdate();
  11434. if (file) {
  11435. var params = {
  11436. Key:
  11437. file.name.split(".")[0] +
  11438. new Date().getTime() +
  11439. "." +
  11440. file.name.split(".")[file.name.split(".").length - 1],
  11441. ContentType: file.type,
  11442. Body: file,
  11443. "Access-Control-Allow-Credentials": "*",
  11444. ACL: "public-read",
  11445. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11446. var options = {
  11447. partSize: 2048 * 1024 * 1024,
  11448. queueSize: 2,
  11449. leavePartsOnError: true,
  11450. };
  11451. bucket
  11452. .upload(params, options)
  11453. .on("httpUploadProgress", function (evt) {
  11454. //这里可以写进度条
  11455. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11456. // if(type == 14){
  11457. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11458. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11459. // }else if(type == 16){
  11460. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11461. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11462. // }else if(type == 17){
  11463. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11464. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11465. // }else if(type == 18){
  11466. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11467. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11468. // }else {
  11469. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11470. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11471. // }
  11472. _this.$forceUpdate();
  11473. })
  11474. .send(async function (err, data) {
  11475. // loading.close();
  11476. // if(type == 14){
  11477. // _this.teacherinfoprogress = 100;
  11478. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11479. // }else if(type == 16){
  11480. // _this.mubiaoinfoprogress = 100;
  11481. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11482. // }else if(type == 17){
  11483. // _this.xuanzeinfoprogress = 100;
  11484. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11485. // }else if(type == 18){
  11486. // _this.pingjiainfoprogress[tindex] = 100;
  11487. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11488. // }else {
  11489. // _this.infoprogress = 100;
  11490. // _this.infoisFinishSize = _this.infoisAllSize;
  11491. // }
  11492. _this.$forceUpdate();
  11493. _this.inputShow = true;
  11494. if (err) {
  11495. cfindex2++;
  11496. if(type == 14){
  11497. _this.teacherinfoisFinishSize = cfindex2;
  11498. }else if(type == 16){
  11499. _this.mubiaoinfoisFinishSize = cfindex2;
  11500. }else if(type == 17){
  11501. _this.xuanzeinfoisFinishSize = cfindex2;
  11502. }else if(type == 18){
  11503. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11504. }else if(type == 19){
  11505. _this.knowinfoisFinishSize = cfindex2;
  11506. }else if(type == 20){
  11507. _this.knowinfoisFinishSize2 = cfindex2;
  11508. }else {
  11509. _this.infoisFinishSize = cfindex2;
  11510. }
  11511. setTimeout(() => {
  11512. if (
  11513. cfindex2 == event.target.files.length ||
  11514. cfindex2 > event.target.files.length
  11515. ) {
  11516. if(type == 14){
  11517. _this.teacherinfoproVisible = false;
  11518. }else if(type == 16){
  11519. _this.mubiaoinfoproVisible = false;
  11520. }else if(type == 17){
  11521. _this.xuanzeinfoproVisible = false;
  11522. }else if(type == 18){
  11523. _this.pingjiainfoproVisible[tindex] = false;
  11524. }else if(type == 19){
  11525. _this.knowinfoproVisible = false;
  11526. }else if(type == 20){
  11527. _this.knowinfoproVisible2 = false;
  11528. }else{
  11529. _this.infoproVisible = false;
  11530. }
  11531. }
  11532. _this.$forceUpdate();
  11533. }, 1000);
  11534. // var a = _this.$refs.upload1.uploadFiles;
  11535. // a.splice(a.length - 1, a.length);
  11536. _this.$message.error(_this.lang.ssUploadFail);
  11537. } else {
  11538. let fileid = await _this.createFileid(data.Location)
  11539. if(fileid){
  11540. cfindex2++;
  11541. if(type == 14){
  11542. _this.teacherinfoisFinishSize = cfindex2;
  11543. }else if(type == 16){
  11544. _this.mubiaoinfoisFinishSize = cfindex2;
  11545. }else if(type == 17){
  11546. _this.xuanzeinfoisFinishSize = cfindex2;
  11547. }else if(type == 18){
  11548. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11549. }else if(type == 19){
  11550. _this.knowinfoisFinishSize = cfindex2;
  11551. }else if(type == 20){
  11552. _this.knowinfoisFinishSize2 = cfindex2;
  11553. }else {
  11554. _this.infoisFinishSize = cfindex2;
  11555. }
  11556. if (
  11557. cfindex2 == event.target.files.length ||
  11558. cfindex2 > event.target.files.length
  11559. ) {
  11560. if(type == 14){
  11561. _this.teacherinfoproVisible = false;
  11562. }else if(type == 16){
  11563. _this.mubiaoinfoproVisible = false;
  11564. }else if(type == 17){
  11565. _this.xuanzeinfoproVisible = false;
  11566. }else if(type == 18){
  11567. _this.pingjiainfoproVisible[tindex] = false;
  11568. }else if(type == 19){
  11569. _this.knowinfoproVisible = false;
  11570. }else if(type == 20){
  11571. _this.knowinfoproVisible2 = false;
  11572. }else{
  11573. _this.infoproVisible = false;
  11574. }
  11575. }
  11576. _this.$forceUpdate();
  11577. }
  11578. if(fileid == 1){
  11579. _this.$message.error(_this.lang.ssFileIdError);
  11580. return;
  11581. }
  11582. var imgA = [
  11583. "png",
  11584. "jpg",
  11585. "jpeg",
  11586. "bmp",
  11587. "gif",
  11588. "webp",
  11589. "psd",
  11590. "svg",
  11591. "tiff",
  11592. ];
  11593. var fileA = [
  11594. "PDF",
  11595. "DOC",
  11596. "DOCX",
  11597. "DOCM",
  11598. "DOTM",
  11599. "DOTX",
  11600. "PPTX",
  11601. "PPSX",
  11602. "PPT",
  11603. "PPS",
  11604. "PPTM",
  11605. "POTM",
  11606. "PPAM",
  11607. "POTX",
  11608. "PPSM",
  11609. "XLSX",
  11610. "XLS",
  11611. ];
  11612. var videoA = [
  11613. "AVI",
  11614. "NAVI",
  11615. "MPEG",
  11616. "ASF",
  11617. "MOV",
  11618. "WMV",
  11619. "3GP",
  11620. "RM",
  11621. "RMVB",
  11622. "FLV",
  11623. "F4V",
  11624. "H.264",
  11625. "H.265",
  11626. "REAL VIDEO",
  11627. "MKV",
  11628. "WebM",
  11629. "HDDVD",
  11630. "MP4",
  11631. "MPG",
  11632. "M4V",
  11633. "MGV",
  11634. "OGV",
  11635. "QTM",
  11636. "STR",
  11637. "AMC",
  11638. "DVX",
  11639. "EVO",
  11640. "DAT",
  11641. "OGG",
  11642. "OGM",
  11643. ];
  11644. let _type = 2;
  11645. if (
  11646. fileA.indexOf(
  11647. data.Location.split(".")[
  11648. data.Location.split(".").length - 1
  11649. ].toLocaleUpperCase()
  11650. ) != -1
  11651. ) {
  11652. _type = 3;
  11653. } else if (
  11654. videoA.indexOf(
  11655. data.Location.split(".")[
  11656. data.Location.split(".").length - 1
  11657. ].toLocaleUpperCase()
  11658. ) != -1
  11659. ) {
  11660. _type = 2;
  11661. } else if (
  11662. imgA.indexOf(
  11663. data.Location.split(".")[
  11664. data.Location.split(".").length - 1
  11665. ].toLocaleLowerCase()
  11666. ) != -1
  11667. ) {
  11668. _type = 13;
  11669. } else {
  11670. _type = 12;
  11671. }
  11672. if (type == 13) {
  11673. _this.infoData.push({
  11674. name: fileName,
  11675. url: data.Location,
  11676. uid: fileUid,
  11677. type: _type,
  11678. fileid: fileid == 1 ? '' : fileid,
  11679. });
  11680. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11681. name: fileName,
  11682. url: data.Location,
  11683. uid: fileUid,
  11684. type: _type,
  11685. fileid: fileid == 1 ? '' : fileid,
  11686. })
  11687. }else if (type == 14) {
  11688. _this.teacherInfoData.push({
  11689. name: fileName,
  11690. url: data.Location,
  11691. uid: fileUid,
  11692. type: _type,
  11693. fileid: fileid == 1 ? '' : fileid,
  11694. });
  11695. _this.infoData2.push({
  11696. name: fileName,
  11697. url: data.Location,
  11698. uid: fileUid,
  11699. type: _type,
  11700. fileid: fileid == 1 ? '' : fileid,
  11701. });
  11702. _this.infoData.push({
  11703. name: fileName,
  11704. url: data.Location,
  11705. uid: fileUid,
  11706. type: _type,
  11707. fileid: fileid == 1 ? '' : fileid,
  11708. });
  11709. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11710. name: fileName,
  11711. url: data.Location,
  11712. uid: fileUid,
  11713. type: _type,
  11714. fileid: fileid == 1 ? '' : fileid,
  11715. })
  11716. }else if (type == 15) {
  11717. _this.infoData2.push({
  11718. name: fileName,
  11719. url: data.Location,
  11720. uid: fileUid,
  11721. type: _type,
  11722. fileid: fileid == 1 ? '' : fileid,
  11723. });
  11724. _this.infoData.push({
  11725. name: fileName,
  11726. url: data.Location,
  11727. uid: fileUid,
  11728. type: _type,
  11729. fileid: fileid == 1 ? '' : fileid,
  11730. });
  11731. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11732. name: fileName,
  11733. url: data.Location,
  11734. uid: fileUid,
  11735. type: _type,
  11736. fileid: fileid == 1 ? '' : fileid,
  11737. })
  11738. }else if (type == 16) {
  11739. _this.mubiaoInfoData.push({
  11740. name: fileName,
  11741. url: data.Location,
  11742. uid: fileUid,
  11743. type: _type,
  11744. fileid: fileid == 1 ? '' : fileid,
  11745. });
  11746. }else if (type == 17) {
  11747. _this.xuanzeInfoData.push({
  11748. name: fileName,
  11749. url: data.Location,
  11750. uid: fileUid,
  11751. type: _type,
  11752. fileid: fileid == 1 ? '' : fileid,
  11753. });
  11754. }else if (type == 18) {
  11755. if(!_this.pingjiaInfoData[tindex]){
  11756. _this.pingjiaInfoData[tindex] = []
  11757. }
  11758. _this.pingjiaInfoData[tindex].push({
  11759. name: fileName,
  11760. url: data.Location,
  11761. uid: fileUid,
  11762. type: _type,
  11763. fileid: fileid == 1 ? '' : fileid,
  11764. });
  11765. }else if (type == 19) {
  11766. _this.knowInfoData.push({
  11767. name: fileName,
  11768. url: data.Location,
  11769. uid: fileUid,
  11770. type: _type,
  11771. fileid: fileid == 1 ? '' : fileid,
  11772. });
  11773. if(fileid != 1){
  11774. _this.knowFileids.push(fileid)
  11775. }
  11776. }else if (type == 20) {
  11777. _this.knowInfoData2.push({
  11778. name: fileName,
  11779. url: data.Location,
  11780. uid: fileUid,
  11781. type: _type,
  11782. fileid: fileid == 1 ? '' : fileid,
  11783. });
  11784. if(fileid != 1){
  11785. _this.knowFileids2.push(fileid)
  11786. }
  11787. }
  11788. console.log(data.Location);
  11789. console.log(fileName,'----------',fileid);
  11790. }
  11791. });
  11792. }
  11793. }
  11794. },
  11795. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11796. // const loading = this.openLoading();
  11797. var file = event.target.files[0];
  11798. var credentials = {
  11799. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11800. secretAccessKey: "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",
  11801. }; //秘钥形式的登录上传
  11802. window.AWS.config.update(credentials);
  11803. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11804. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11805. var _this = this;
  11806. if (type == 3) {
  11807. var b = [
  11808. "DOC",
  11809. "DOCX",
  11810. "DOCM",
  11811. "DOTM",
  11812. "DOTX",
  11813. "PPTX",
  11814. "PPSX",
  11815. "PPT",
  11816. "PPS",
  11817. "PPTM",
  11818. "POTM",
  11819. "PPAM",
  11820. "POTX",
  11821. "PPSM",
  11822. ];
  11823. if (
  11824. b.indexOf(
  11825. file.name
  11826. .split(".")
  11827. [file.name.split(".").length - 1].toLocaleUpperCase()
  11828. ) != -1
  11829. ) {
  11830. if (file.size / 1024 / 1024 > 80) {
  11831. this.$message.error(this.lang.ssFileOver80MB);
  11832. this.inputShow = true;
  11833. // var a = _this.$refs.upload1.uploadFiles;
  11834. // a.splice(a.length - 1, a.length);
  11835. // loading.close();
  11836. return;
  11837. }
  11838. } else if (
  11839. file.name
  11840. .split(".")
  11841. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11842. ) {
  11843. if (file.size / 1024 / 1024 > 80) {
  11844. this.$message.error(this.lang.ssAddFileOver80);
  11845. this.inputShow = true;
  11846. // var a = _this.$refs.upload1.uploadFiles;
  11847. // a.splice(a.length - 1, a.length);
  11848. // loading.close();
  11849. return;
  11850. }
  11851. }
  11852. }
  11853. this.inputShow = false;
  11854. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11855. itemTaskIndex
  11856. ].progress = 0;
  11857. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11858. itemTaskIndex
  11859. ].proVisible = true;
  11860. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11861. itemTaskIndex
  11862. ].isFinishSize = 0;
  11863. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11864. itemTaskIndex
  11865. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11866. _this.$forceUpdate();
  11867. if (file) {
  11868. var params = {
  11869. Key:
  11870. file.name.split(".")[0] +
  11871. new Date().getTime() +
  11872. "." +
  11873. file.name.split(".")[file.name.split(".").length - 1],
  11874. ContentType: file.type,
  11875. Body: file,
  11876. "Access-Control-Allow-Credentials": "*",
  11877. ACL: "public-read",
  11878. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11879. var options = {
  11880. partSize: 2048 * 1024 * 1024,
  11881. queueSize: 2,
  11882. leavePartsOnError: true,
  11883. };
  11884. bucket
  11885. .upload(params, options)
  11886. .on("httpUploadProgress", function (evt) {
  11887. //这里可以写进度条
  11888. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11889. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11890. itemTaskIndex
  11891. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11892. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11893. itemTaskIndex
  11894. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11895. _this.$forceUpdate();
  11896. })
  11897. .send(function (err, data) {
  11898. // loading.close();
  11899. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11900. itemTaskIndex
  11901. ].progress = 100;
  11902. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11903. itemTaskIndex
  11904. ].isFinishSize =
  11905. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11906. itemTaskIndex
  11907. ].isAllSize;
  11908. _this.$forceUpdate();
  11909. setTimeout(() => {
  11910. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11911. itemTaskIndex
  11912. ].proVisible = false;
  11913. _this.$forceUpdate();
  11914. }, 1000);
  11915. _this.inputShow = true;
  11916. if (err) {
  11917. // var a = _this.$refs.upload1.uploadFiles;
  11918. // a.splice(a.length - 1, a.length);
  11919. _this.$message.error(_this.lang.ssUploadFail);
  11920. } else {
  11921. if (type == 2 || type == 3) {
  11922. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11923. itemTaskIndex
  11924. ].chapterData.unshift({
  11925. name: file.name,
  11926. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11927. // itemTaskIndex
  11928. // ].chapterData.length+1),
  11929. url: data.Location,
  11930. uid: file.uid,
  11931. type: type,
  11932. text: string,
  11933. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11934. // itemTaskIndex
  11935. // ].chapterData.length + 1),
  11936. });
  11937. _this.imgChange1(null, null, type, itemTaskIndex);
  11938. } else if (type == 4) {
  11939. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11940. itemTaskIndex
  11941. ].fileList1.push({
  11942. name: file.name,
  11943. url: data.Location,
  11944. uid: file.uid,
  11945. });
  11946. _this.imgChange1(null, null, type, itemTaskIndex);
  11947. } else if (type == 5) {
  11948. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11949. itemTaskIndex
  11950. ].homeworkList.push({
  11951. name: file.name,
  11952. url: data.Location,
  11953. uid: file.uid,
  11954. });
  11955. _this.imgChange1(null, null, type, itemTaskIndex);
  11956. }
  11957. console.log(data.Location);
  11958. }
  11959. });
  11960. }
  11961. },
  11962. addunit() {
  11963. this.unitJson.push({
  11964. dyName: "", //单元标题
  11965. isUpdate: 1,
  11966. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11967. chapterInfo: [
  11968. {
  11969. isread: false,
  11970. chapterid: this.guid(),
  11971. title: "",
  11972. courseName: "",
  11973. taskJson: [
  11974. {
  11975. task: "",
  11976. taskDetail: "",
  11977. chapterData: [],
  11978. toolText: "",
  11979. toolChoose: [
  11980. {
  11981. tool: [],
  11982. toolDetail: "",
  11983. toolType: 0,
  11984. askCount: 1,
  11985. askTitle: "",
  11986. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11987. },
  11988. ],
  11989. isShowTools: false,
  11990. askCount: 1,
  11991. isFold: 1,
  11992. askTitle: "",
  11993. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11994. checkJson: [{ checkCount: [], checkPerent: [] }],
  11995. homeworkList: [],
  11996. },
  11997. ],
  11998. itemCount: 1,
  11999. fileList1: [],
  12000. video: [],
  12001. testData: [],
  12002. pData: [],
  12003. templateArray: [],
  12004. },
  12005. ],
  12006. });
  12007. this.addindex = this.unitJson.length - 1;
  12008. setTimeout(() => {
  12009. this.unitIndex = this.unitJson.length - 1;
  12010. setTimeout(() => {
  12011. console.log(this.$refs.dyInput);
  12012. this.$refs.dyInput[0].focus();
  12013. }, 100);
  12014. this.unitSet(this.unitIndex);
  12015. }, 0);
  12016. },
  12017. addToolFun(itemTaskIndex) {
  12018. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12019. itemTaskIndex
  12020. ].toolChoose.push({
  12021. tool: [],
  12022. toolDetail: "",
  12023. toolType: 0,
  12024. askCount: 1,
  12025. askTitle: "",
  12026. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12027. });
  12028. },
  12029. addTaskBorder() {
  12030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  12031. task: "",
  12032. taskDetail: "",
  12033. chapterData: [],
  12034. toolText: "",
  12035. toolChoose: [
  12036. {
  12037. tool: [],
  12038. toolDetail: "",
  12039. toolType: 0,
  12040. askCount: 1,
  12041. askTitle: "",
  12042. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12043. },
  12044. ],
  12045. isShowTools: false,
  12046. askCount: 1,
  12047. isFold: 1, //任务收起状态
  12048. askTitle: "",
  12049. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12050. checkJson: [{ checkCount: [], checkPerent: [] }],
  12051. homeworkList: [],
  12052. });
  12053. setTimeout(() => {
  12054. this.checkEva(this.checkId);
  12055. setTimeout(() => {
  12056. this.checkEva(this.checkId);
  12057. }, 100);
  12058. }, 100);
  12059. },
  12060. addTaskBorder2(type, index) {
  12061. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  12062. this.$message({
  12063. message: this.lang.ssOutGenWait,
  12064. type: "warning"
  12065. });
  12066. return;
  12067. }
  12068. if(type == 1){
  12069. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  12070. task: "",
  12071. isTask2: true,
  12072. isTask3: true,
  12073. taskDetail: "",
  12074. chapterData: [],
  12075. toolText: "",
  12076. toolChoose: [
  12077. {
  12078. tool: [],
  12079. toolDetail: "",
  12080. toolType: 0,
  12081. askCount: 1,
  12082. askTitle: "",
  12083. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12084. },
  12085. ],
  12086. isShowTools: false,
  12087. askCount: 1,
  12088. isFold: 0, //任务收起状态
  12089. askTitle: "",
  12090. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12091. checkJson: [{ checkCount: [], checkPerent: [] }],
  12092. homeworkList: [],
  12093. })
  12094. }else if(type == 2){
  12095. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  12096. task: "",
  12097. isTask2: true,
  12098. isTask3: true,
  12099. taskDetail: "",
  12100. chapterData: [],
  12101. toolText: "",
  12102. toolChoose: [
  12103. {
  12104. tool: [],
  12105. toolDetail: "",
  12106. toolType: 0,
  12107. askCount: 1,
  12108. askTitle: "",
  12109. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12110. },
  12111. ],
  12112. isShowTools: false,
  12113. askCount: 1,
  12114. isFold: 0, //任务收起状态
  12115. askTitle: "",
  12116. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12117. checkJson: [{ checkCount: [], checkPerent: [] }],
  12118. homeworkList: [],
  12119. })
  12120. }
  12121. setTimeout(() => {
  12122. this.checkEva(this.checkId);
  12123. setTimeout(() => {
  12124. this.checkEva(this.checkId);
  12125. }, 100);
  12126. }, 100);
  12127. },
  12128. add(e, i) {
  12129. var el = e.currentTarget;
  12130. el.getElementsByTagName("input")[0].click();
  12131. },
  12132. fold(i, e) {
  12133. if (
  12134. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  12135. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  12136. ) {
  12137. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  12138. } else {
  12139. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12140. }
  12141. },
  12142. fold2(i) {
  12143. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  12144. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12145. i
  12146. ].isFold2 = false;
  12147. } else {
  12148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12149. }
  12150. this.$forceUpdate();
  12151. },
  12152. foldEva(i) {
  12153. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12155. i
  12156. ].isEvaFold = false;
  12157. } else {
  12158. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12159. i
  12160. ].isEvaFold = true;
  12161. setTimeout(() => {
  12162. this.checkEva(this.checkId);
  12163. setTimeout(() => {
  12164. this.checkEva(this.checkId);
  12165. }, 500);
  12166. }, 0);
  12167. }
  12168. this.$forceUpdate();
  12169. },
  12170. foldC(i) {
  12171. if (
  12172. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12173. ) {
  12174. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12175. i
  12176. ].isFoldchapter = false;
  12177. } else {
  12178. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12179. i
  12180. ].isFoldchapter = true;
  12181. }
  12182. this.$forceUpdate();
  12183. },
  12184. fold3(i, ti) {
  12185. if (
  12186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12187. .isFold3
  12188. ) {
  12189. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12190. ti
  12191. ].isFold3 = false;
  12192. } else {
  12193. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12194. ti
  12195. ].isFold3 = true;
  12196. }
  12197. this.$forceUpdate();
  12198. },
  12199. deleteHomeworkBox(unitIndex, index, i) {
  12200. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12201. this.taskCount
  12202. ].homeworkList.splice(i, 1);
  12203. },
  12204. getStudent() {
  12205. let params = {
  12206. oid: this.oid,
  12207. cu: "",
  12208. cn: this.searchPeople,
  12209. };
  12210. this.ajax
  12211. .get(this.$store.state.api + "selectStudentAdd", params)
  12212. .then((res) => {
  12213. this.studentJuri = res.data[0];
  12214. })
  12215. .catch((err) => {
  12216. this.isLoading = false;
  12217. console.error(err);
  12218. });
  12219. },
  12220. // 添加协同成员其他选项按钮
  12221. getTeacherCopy(){
  12222. this.CollLoading=true
  12223. this.collid = ''
  12224. this.collid = '1xpz'
  12225. let params = {
  12226. oid:
  12227. this.org && this.org != "undefined" && this.org != "null"
  12228. ? this.org
  12229. : this.oid,
  12230. cu: "",
  12231. cn: this.searchTN,
  12232. coll: ''
  12233. };
  12234. this.ajax
  12235. .get(
  12236. this.$store.state.api +
  12237. (this.org && this.org != "undefined" && this.org != "null"
  12238. ? "selectCollaborativeMembersOrg"
  12239. : "selectCollaborativeMembers"),
  12240. params
  12241. )
  12242. .then((res) => {
  12243. let teacherJuri = res.data[0];
  12244. this.CollaborativeTeaList = res.data[1];
  12245. for (var i = 0; i < teacherJuri.length; i++) {
  12246. if (teacherJuri[i].userid == this.userid) {
  12247. teacherJuri.splice(i, 1);
  12248. break;
  12249. }
  12250. }
  12251. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12252. return (i.cclassid == '' || i.cclassid == null)
  12253. })
  12254. console.log(' this.teacherJuri', this.teacherJuri);
  12255. let _check = [];
  12256. let _check2 = [];
  12257. for (var i = 0; i < this.teacherJuri.length; i++) {
  12258. var gid = this.teacherJuri[i].userid;
  12259. _check.push(gid);
  12260. }
  12261. for (var i = 0; i < this.checkboxList3.length; i++) {
  12262. var _id = this.checkboxList3[i];
  12263. if (_check.indexOf(_id) !== -1) {
  12264. _check2.push(_id);
  12265. }
  12266. }
  12267. if (_check2.length==0 && _check.length==0) {
  12268. }else{
  12269. this.checkAll2 = _check2.length === _check.length;
  12270. }
  12271. this.CollLoading=false
  12272. })
  12273. .catch((err) => {
  12274. console.error(err);
  12275. this.CollLoading=false
  12276. });
  12277. },
  12278. getTeacher(val) {
  12279. this.CollLoading=true
  12280. this.collid = ''
  12281. this.collid = !val ? '' : val
  12282. let params = {
  12283. oid:
  12284. this.org && this.org != "undefined" && this.org != "null"
  12285. ? this.org
  12286. : this.oid,
  12287. cu: "",
  12288. cn: this.searchTN,
  12289. coll: this.collid
  12290. };
  12291. this.ajax
  12292. .get(
  12293. this.$store.state.api +
  12294. (this.org && this.org != "undefined" && this.org != "null"
  12295. ? "selectCollaborativeMembersOrg"
  12296. : "selectCollaborativeMembers"),
  12297. params
  12298. )
  12299. .then((res) => {
  12300. let teacherJuri = res.data[0];
  12301. this.CollaborativeTeaList = res.data[1];
  12302. for (var i = 0; i < teacherJuri.length; i++) {
  12303. if (teacherJuri[i].userid == this.userid) {
  12304. teacherJuri.splice(i, 1);
  12305. break;
  12306. }
  12307. }
  12308. this.teacherJuri = teacherJuri;
  12309. let _check = [];
  12310. let _check2 = [];
  12311. for (var i = 0; i < this.teacherJuri.length; i++) {
  12312. var gid = this.teacherJuri[i].userid;
  12313. _check.push(gid);
  12314. }
  12315. for (var i = 0; i < this.checkboxList3.length; i++) {
  12316. var _id = this.checkboxList3[i];
  12317. if (_check.indexOf(_id) !== -1) {
  12318. _check2.push(_id);
  12319. }
  12320. }
  12321. if (_check2.length==0 && _check.length==0) {
  12322. }else{
  12323. this.checkAll2 = _check2.length === _check.length;
  12324. }
  12325. this.CollLoading=false
  12326. })
  12327. .catch((err) => {
  12328. console.error(err);
  12329. this.CollLoading=false
  12330. });
  12331. },
  12332. searchStudent() {
  12333. this.getStudent();
  12334. },
  12335. selectGrage() {
  12336. let params = {
  12337. oid: this.oid,
  12338. };
  12339. this.ajax
  12340. .get(this.$store.state.api + "selectGrageBySchool", params)
  12341. .then((res) => {
  12342. this.gradeList = res.data[0];
  12343. })
  12344. .catch((err) => {
  12345. this.isLoading = false;
  12346. console.error(err);
  12347. });
  12348. },
  12349. //获取班级列表
  12350. getClass() {
  12351. let params = {
  12352. oid: this.oid,
  12353. gid: this.gradeId,
  12354. cn: this.classSearch,
  12355. };
  12356. this.ajax
  12357. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12358. .then((res) => {
  12359. if (!this.grade.length) {
  12360. this.grade = res.data[0];
  12361. }
  12362. this.grade2 = res.data[0];
  12363. this.classJuri = res.data[0];
  12364. let _check = [];
  12365. let _check2 = [];
  12366. for (var i = 0; i < this.grade2.length; i++) {
  12367. var gid = this.grade2[i].id;
  12368. _check.push(gid);
  12369. }
  12370. for (var i = 0; i < this.checkboxList2.length; i++) {
  12371. var _id = this.checkboxList2[i];
  12372. if (_check.indexOf(_id) !== -1) {
  12373. _check2.push(_id);
  12374. }
  12375. }
  12376. this.checkAll = _check2.length === _check.length;
  12377. })
  12378. .catch((err) => {
  12379. this.isLoading = false;
  12380. console.error(err);
  12381. });
  12382. },
  12383. CourseType2Change(val) {
  12384. this.pTypeCheck = [];
  12385. for (var i = 0; i < this.CourseType2.length; i++) {
  12386. let typeA = this.CourseType2[i];
  12387. if (val.indexOf(typeA.name) != -1) {
  12388. this.pTypeCheck.push(...typeA.id);
  12389. }
  12390. }
  12391. },
  12392. arrayToArray(arrayo, arrayt) {
  12393. let array1 = arrayo;
  12394. let array2 = arrayt;
  12395. let commonElements = [];
  12396. for (let i = 0; i < array1.length; i++) {
  12397. for (let j = 0; j < array2.length; j++) {
  12398. if (array1[i] === array2[j]) {
  12399. commonElements.push(array1[i]);
  12400. }
  12401. }
  12402. }
  12403. return commonElements;
  12404. },
  12405. typeChange(){
  12406. let courseInfo = ``
  12407. let sub = []
  12408. let mclass = []
  12409. let theme = []
  12410. if (this.courseTypeId.length) {
  12411. for (var i = 0; i < this.courseTypeId.length; i++) {
  12412. let _sid = this.courseTypeId[i]
  12413. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12414. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12415. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12416. }
  12417. }
  12418. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12419. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12420. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12421. }
  12422. }
  12423. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12424. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12425. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12426. }
  12427. }
  12428. }
  12429. }
  12430. sub = JSON.parse(converter(JSON.stringify(sub)))
  12431. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12432. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12433. let _file = this.knowFileArray[fi]
  12434. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12435. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12436. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12437. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12438. let fileids = this.knowInfoData.map((item) => item.fileid)
  12439. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12440. this.knowInfoData.push({
  12441. name: _file.filename,
  12442. url: _file.url,
  12443. uid: '',
  12444. type: 3,
  12445. fileid: _file.fileid,
  12446. });
  12447. this.knowFileids.push(_file.fileid)
  12448. }
  12449. fileids = this.knowInfoData.map((item) => item.fileid)
  12450. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12451. this.knowInfoData.push({
  12452. name: _file.filename,
  12453. url: _file.url,
  12454. uid: '',
  12455. type: 3,
  12456. fileid: _file.fileid,
  12457. });
  12458. this.knowFileids.push(_file.fileid)
  12459. }
  12460. fileids = this.knowInfoData.map((item) => item.fileid)
  12461. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12462. this.knowInfoData.push({
  12463. name: _file.filename,
  12464. url: _file.url,
  12465. uid: '',
  12466. type: 3,
  12467. fileid: _file.fileid,
  12468. });
  12469. this.knowFileids.push(_file.fileid)
  12470. }
  12471. fileids = this.knowInfoData.map((item) => item.fileid)
  12472. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12473. this.knowInfoData.push({
  12474. name: _file.filename,
  12475. url: _file.url,
  12476. uid: '',
  12477. type: 3,
  12478. fileid: _file.fileid,
  12479. });
  12480. this.knowFileids.push(_file.fileid)
  12481. }
  12482. fileids = this.knowInfoData.map((item) => item.fileid)
  12483. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12484. this.knowInfoData.push({
  12485. name: _file.filename,
  12486. url: _file.url,
  12487. uid: '',
  12488. type: 3,
  12489. fileid: _file.fileid,
  12490. });
  12491. this.knowFileids.push(_file.fileid)
  12492. }
  12493. }
  12494. if(mclass.length){
  12495. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  12496. }
  12497. if(sub.length){
  12498. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  12499. }
  12500. if(theme.length){
  12501. courseInfo += `${this.lang.ssThemeColon}${theme.join(',')} `
  12502. }
  12503. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12504. this.typeC1 = this.getTypeC(2)
  12505. this.typeC2 = this.getTypeC(1)
  12506. },
  12507. getChapterData(e, i, j, ic, type) {
  12508. e.stopPropagation();
  12509. this.updataC = true;
  12510. this.icc = ic;
  12511. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12512. console.log(this.lang.ssCantDown);
  12513. }
  12514. },
  12515. deleteChapterData(e, i, j, ic, taskI) {
  12516. e.stopPropagation();
  12517. let _this = this;
  12518. _this
  12519. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12520. confirmButtonText: this.lang.ssConfirm,
  12521. cancelButtonText: this.lang.ssCancel,
  12522. type: "warning",
  12523. })
  12524. .then(() => {
  12525. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12526. ic,
  12527. 1
  12528. );
  12529. })
  12530. .catch(() => {
  12531. return;
  12532. });
  12533. },
  12534. checkInfoData(fileid, file){
  12535. let type = 1
  12536. let index = 0
  12537. for(let i = 0; i < this.infoData.length; i++){
  12538. if(this.infoData[i].fileid == fileid){
  12539. type = 2
  12540. index = i
  12541. }
  12542. }
  12543. if(type == 2){
  12544. this.infoData.splice(index, 1)
  12545. }else {
  12546. this.infoData.push({...file})
  12547. }
  12548. },
  12549. checkKnowInfoData(fileid){
  12550. if(this.knowFileids.indexOf(fileid) == -1){
  12551. this.knowFileids.push(fileid)
  12552. }else {
  12553. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12554. }
  12555. },
  12556. checkKnowInfoData2(fileid){
  12557. if(!fileid){
  12558. return
  12559. }
  12560. if(this.knowFileids2.indexOf(fileid) == -1){
  12561. this.knowFileids2.push(fileid)
  12562. }else {
  12563. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12564. }
  12565. },
  12566. checkKnowInfoData3(fileid){
  12567. if(this.knowFileids3.indexOf(fileid) == -1){
  12568. this.knowFileids3.push(fileid)
  12569. }else {
  12570. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12571. }
  12572. },
  12573. checkAllKnowInfoData3(){
  12574. // let array = this.knowInfoData3;
  12575. // if(this.knowFileids3.length === array.length){
  12576. // this.knowFileids3 = []; // 取消全选
  12577. // } else {
  12578. // this.knowFileids3 = array.map(item => item.url); // 全选
  12579. // }
  12580. let files = this.allknowInfoData3();
  12581. let count = 0
  12582. for(var i = 0; i < files.length; i++){
  12583. if(this.knowFileids3.includes(files[i].url)){
  12584. count++
  12585. }
  12586. }
  12587. if (count == files.length) {
  12588. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12589. } else {
  12590. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12591. }
  12592. },
  12593. checkAllKnowInfoData2(){
  12594. let array = this.knowInfoData2;
  12595. if(this.knowFileids2.length === array.length){
  12596. this.knowFileids2 = []; // 取消全选
  12597. } else {
  12598. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12599. }
  12600. },
  12601. deleteCheckAllKnowInfoData2(){
  12602. let _this = this;
  12603. _this
  12604. .$confirm(this.lang.ssDelSelFile, this.lang.ssTip, {
  12605. confirmButtonText: this.lang.ssConfirm,
  12606. cancelButtonText: this.lang.ssCancel,
  12607. type: "warning",
  12608. })
  12609. .then(() => {
  12610. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12611. _this.knowFileids2 = []
  12612. _this.$forceUpdate()
  12613. })
  12614. .catch(() => {
  12615. return;
  12616. });
  12617. },
  12618. checkAppendixFile(url){
  12619. if(this.appendixFiles.indexOf(url) == -1){
  12620. this.appendixFiles.push(url)
  12621. }else {
  12622. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12623. }
  12624. },
  12625. checkAllappendixFile(){
  12626. let files = this.allFile();
  12627. let count = 0
  12628. for(var i = 0; i < files.length; i++){
  12629. if(this.appendixFiles.includes(files[i].url)){
  12630. count++
  12631. }
  12632. }
  12633. if (count == files.length) {
  12634. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12635. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12636. this.appendixFiles = []
  12637. }
  12638. } else {
  12639. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12640. }
  12641. },
  12642. async exportAppendixFiles(){
  12643. let files = this.allFile(2);
  12644. let uploadFile = []
  12645. for(var i = 0; i < files.length; i++){
  12646. if(this.appendixFiles.includes(files[i].url)){
  12647. uploadFile.push(files[i])
  12648. }
  12649. }
  12650. if(!uploadFile.length){
  12651. this.$message.error(this.lang.ssSelAttach)
  12652. return
  12653. }
  12654. this.appendixLoading = true
  12655. const zip = new JSZip();
  12656. for(var j = 0; j < uploadFile.length; j++){
  12657. let fileZ = uploadFile[j]
  12658. let name = fileZ.name
  12659. let file = await getFile(fileZ.url)
  12660. const file_name = fileZ.name; // 获取文件名
  12661. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12662. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12663. // 判断是否有重复的文件名字
  12664. if (!zip.file(file_name)) {
  12665. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12666. } else {
  12667. // 如果有重复的文件名,则在文件名后添加序号
  12668. let count = 1;
  12669. let newFileName = fileNameWithoutExt;
  12670. while (zip.file(`${newFileName}.${fileExt}`)) {
  12671. newFileName = `${fileNameWithoutExt}(${count})`;
  12672. count++;
  12673. }
  12674. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12675. }
  12676. // zip.file(`${name}`, file.data, { binary: true })
  12677. }
  12678. zip.generateAsync({ type: "blob" }).then((content) => {
  12679. // 生成二进制流
  12680. saveAs(
  12681. content,
  12682. this.courseName + "-" + this.lang.ssAttachZip
  12683. ); // 利用file-saver保存文件 自定义文件名
  12684. setTimeout(() => {
  12685. this.appendixLoading = false
  12686. }, 2000);
  12687. });
  12688. },
  12689. deleteInfoData(e, ic) {
  12690. e.stopPropagation();
  12691. let _this = this;
  12692. _this
  12693. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12694. confirmButtonText: this.lang.ssConfirm,
  12695. cancelButtonText: this.lang.ssCancel,
  12696. type: "warning",
  12697. })
  12698. .then(() => {
  12699. _this.infoData.splice(
  12700. ic,
  12701. 1
  12702. );
  12703. })
  12704. .catch(() => {
  12705. return;
  12706. });
  12707. },
  12708. deleteInfoData2(e, ic) {
  12709. e.stopPropagation();
  12710. let _this = this;
  12711. _this
  12712. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12713. confirmButtonText: this.lang.ssConfirm,
  12714. cancelButtonText: this.lang.ssCancel,
  12715. type: "warning",
  12716. })
  12717. .then(() => {
  12718. let fileid = _this.infoData2[ic].fileid;
  12719. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12720. _this.infoData2.splice(
  12721. ic,
  12722. 1
  12723. );
  12724. })
  12725. .catch(() => {
  12726. return;
  12727. });
  12728. },
  12729. deleteKnowInfoData(e, ic) {
  12730. e.stopPropagation();
  12731. let _this = this;
  12732. _this
  12733. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12734. confirmButtonText: this.lang.ssConfirm,
  12735. cancelButtonText: this.lang.ssCancel,
  12736. type: "warning",
  12737. })
  12738. .then(() => {
  12739. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12740. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12741. }
  12742. _this.knowInfoData.splice(
  12743. ic,
  12744. 1
  12745. );
  12746. })
  12747. .catch(() => {
  12748. return;
  12749. });
  12750. },
  12751. deleteKnowInfoData2(e, ic) {
  12752. e.stopPropagation();
  12753. let _this = this;
  12754. _this
  12755. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12756. confirmButtonText: this.lang.ssConfirm,
  12757. cancelButtonText: this.lang.ssCancel,
  12758. type: "warning",
  12759. })
  12760. .then(() => {
  12761. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12762. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12763. }
  12764. _this.knowInfoData2.splice(
  12765. ic,
  12766. 1
  12767. );
  12768. })
  12769. .catch(() => {
  12770. return;
  12771. });
  12772. },
  12773. deletemubiaoInfoData(e, ic) {
  12774. e.stopPropagation();
  12775. let _this = this;
  12776. _this
  12777. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12778. confirmButtonText: this.lang.ssConfirm,
  12779. cancelButtonText: this.lang.ssCancel,
  12780. type: "warning",
  12781. })
  12782. .then(() => {
  12783. _this.mubiaoInfoData.splice(
  12784. ic,
  12785. 1
  12786. );
  12787. })
  12788. .catch(() => {
  12789. return;
  12790. });
  12791. },
  12792. deletexuanzeInfoData(e, ic) {
  12793. e.stopPropagation();
  12794. let _this = this;
  12795. _this
  12796. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12797. confirmButtonText: this.lang.ssConfirm,
  12798. cancelButtonText: this.lang.ssCancel,
  12799. type: "warning",
  12800. })
  12801. .then(() => {
  12802. _this.xuanzeInfoData.splice(
  12803. ic,
  12804. 1
  12805. );
  12806. })
  12807. .catch(() => {
  12808. return;
  12809. });
  12810. },
  12811. deletepingjiaInfoData(e, ic, tindex) {
  12812. e.stopPropagation();
  12813. let _this = this;
  12814. _this
  12815. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12816. confirmButtonText: this.lang.ssConfirm,
  12817. cancelButtonText: this.lang.ssCancel,
  12818. type: "warning",
  12819. })
  12820. .then(() => {
  12821. _this.pingjiaInfoData[tindex].splice(
  12822. ic,
  12823. 1
  12824. );
  12825. })
  12826. .catch(() => {
  12827. return;
  12828. });
  12829. },
  12830. deleteCankaoInfoData(e, ic) {
  12831. e.stopPropagation();
  12832. let _this = this;
  12833. _this
  12834. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12835. confirmButtonText: this.lang.ssConfirm,
  12836. cancelButtonText: this.lang.ssCancel,
  12837. type: "warning",
  12838. })
  12839. .then(() => {
  12840. _this.cankaoInfoData.splice(
  12841. ic,
  12842. 1
  12843. );
  12844. })
  12845. .catch(() => {
  12846. return;
  12847. });
  12848. },
  12849. deleteTeacherInfoData(e, ic) {
  12850. e.stopPropagation();
  12851. let _this = this;
  12852. _this
  12853. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12854. confirmButtonText: this.lang.ssConfirm,
  12855. cancelButtonText: this.lang.ssCancel,
  12856. type: "warning",
  12857. })
  12858. .then(() => {
  12859. _this.teacherInfoData.splice(
  12860. ic,
  12861. 1
  12862. );
  12863. })
  12864. .catch(() => {
  12865. return;
  12866. });
  12867. },
  12868. updataVideoT(e, i, j, ic) {
  12869. // e.stopPropagation();
  12870. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12871. // ic
  12872. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12873. this.line =
  12874. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12875. this.taskCount = j;
  12876. this.lineCount = ic;
  12877. this.dialogVisibleupdataVideoT = true;
  12878. this.$forceUpdate();
  12879. },
  12880. checkChpater(e, i, j, ic){
  12881. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12882. if(type == 3){
  12883. var fileA = [
  12884. "DOC",
  12885. "DOCX",
  12886. "DOCM",
  12887. "DOTM",
  12888. "DOTX",
  12889. "PPTX",
  12890. "PPSX",
  12891. "PPT",
  12892. "PPS",
  12893. "PPTM",
  12894. "POTM",
  12895. "PPAM",
  12896. "POTX",
  12897. "PPSM",
  12898. "XLSX",
  12899. "XLS"
  12900. ];
  12901. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12902. if (
  12903. fileA.indexOf(
  12904. url.split(".")[
  12905. url.split(".").length - 1
  12906. ].toLocaleUpperCase()
  12907. ) != -1
  12908. ) {
  12909. this.dialogVisibleOffice = true
  12910. this.wurl = url
  12911. } else if (
  12912. "pdf".indexOf(
  12913. url.split(".")[
  12914. url.split(".").length - 1
  12915. ].toLocaleLowerCase()
  12916. ) != -1
  12917. ) {
  12918. this.dialogVisiblePdf = true
  12919. this.wurl = url
  12920. }
  12921. }
  12922. },
  12923. checkChpater2(e, ic){
  12924. let type = this.infoData2[ic].type
  12925. if(type == 3){
  12926. var fileA = [
  12927. "DOC",
  12928. "DOCX",
  12929. "DOCM",
  12930. "DOTM",
  12931. "DOTX",
  12932. "PPTX",
  12933. "PPSX",
  12934. "PPT",
  12935. "PPS",
  12936. "PPTM",
  12937. "POTM",
  12938. "PPAM",
  12939. "POTX",
  12940. "PPSM",
  12941. "XLSX",
  12942. "XLS"
  12943. ];
  12944. let url = this.infoData2[ic].url
  12945. if (
  12946. fileA.indexOf(
  12947. url.split(".")[
  12948. url.split(".").length - 1
  12949. ].toLocaleUpperCase()
  12950. ) != -1
  12951. ) {
  12952. this.dialogVisibleOffice = true
  12953. this.wurl = url
  12954. } else if (
  12955. "pdf".indexOf(
  12956. url.split(".")[
  12957. url.split(".").length - 1
  12958. ].toLocaleLowerCase()
  12959. ) != -1
  12960. ) {
  12961. this.dialogVisiblePdf = true
  12962. this.wurl = url
  12963. }
  12964. }
  12965. },
  12966. checkChpater3(e, ic, item){
  12967. let type = item.type
  12968. if(type == 3){
  12969. var fileA = [
  12970. "DOC",
  12971. "DOCX",
  12972. "DOCM",
  12973. "DOTM",
  12974. "DOTX",
  12975. "PPTX",
  12976. "PPSX",
  12977. "PPT",
  12978. "PPS",
  12979. "PPTM",
  12980. "POTM",
  12981. "PPAM",
  12982. "POTX",
  12983. "PPSM",
  12984. "XLSX",
  12985. "XLS"
  12986. ];
  12987. let url = item.url
  12988. if (
  12989. fileA.indexOf(
  12990. url.split(".")[
  12991. url.split(".").length - 1
  12992. ].toLocaleUpperCase()
  12993. ) != -1
  12994. ) {
  12995. this.dialogVisibleOffice = true
  12996. this.wurl = url
  12997. } else if (
  12998. "pdf".indexOf(
  12999. url.split(".")[
  13000. url.split(".").length - 1
  13001. ].toLocaleLowerCase()
  13002. ) != -1
  13003. ) {
  13004. this.dialogVisiblePdf = true
  13005. this.wurl = url
  13006. }
  13007. }
  13008. },
  13009. updataVideoC() {
  13010. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13011. this.taskCount
  13012. ].chapterData[this.lineCount].name = JSON.parse(
  13013. JSON.stringify(this.line)
  13014. );
  13015. this.dialogVisibleupdataVideoT = false;
  13016. this.$forceUpdate();
  13017. },
  13018. upCd(e, i, j, taskCount, ic) {
  13019. e.stopPropagation();
  13020. if (ic == 0) {
  13021. return;
  13022. }
  13023. var a = JSON.parse(
  13024. JSON.stringify(
  13025. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13026. ic - 1
  13027. ]
  13028. )
  13029. );
  13030. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  13031. JSON.parse(
  13032. JSON.stringify(
  13033. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13034. )
  13035. );
  13036. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13037. this.$forceUpdate();
  13038. },
  13039. downCd(e, i, j, taskCount, ic) {
  13040. e.stopPropagation();
  13041. if (
  13042. ic ==
  13043. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  13044. 1
  13045. ) {
  13046. return;
  13047. }
  13048. var a = JSON.parse(
  13049. JSON.stringify(
  13050. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13051. ic + 1
  13052. ]
  13053. )
  13054. );
  13055. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  13056. JSON.parse(
  13057. JSON.stringify(
  13058. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13059. )
  13060. );
  13061. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13062. this.$forceUpdate();
  13063. },
  13064. async upTool(e, i, j, tooli) {
  13065. e.stopPropagation();
  13066. if (tooli == 0) {
  13067. return;
  13068. }
  13069. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  13070. let count2 = await this.getWorksCount(3, i, j, tooli);
  13071. if (count1 > 0 || count2 > 0) {
  13072. this.$confirm(
  13073. this.lang.ssSwitchMove,
  13074. this.lang.ssTip,
  13075. {
  13076. confirmButtonText: this.lang.ssConfirm,
  13077. cancelButtonText: this.lang.ssCancel,
  13078. type: "warning",
  13079. }
  13080. )
  13081. .then(() => {
  13082. var a = JSON.parse(
  13083. JSON.stringify(
  13084. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13085. tooli - 1
  13086. ]
  13087. )
  13088. );
  13089. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13090. JSON.parse(
  13091. JSON.stringify(
  13092. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13093. )
  13094. );
  13095. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13096. this.$forceUpdate();
  13097. this.moveWork(3, i, j, tooli - 1, i, j, tooli);
  13098. this.updateWork();
  13099. })
  13100. .catch(() => {
  13101. return;
  13102. });
  13103. } else {
  13104. var a = JSON.parse(
  13105. JSON.stringify(
  13106. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  13107. )
  13108. );
  13109. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13110. JSON.parse(
  13111. JSON.stringify(
  13112. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13113. )
  13114. );
  13115. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13116. this.$forceUpdate();
  13117. }
  13118. },
  13119. async downTool(e, i, j, tooli) {
  13120. e.stopPropagation();
  13121. if (
  13122. tooli ==
  13123. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  13124. ) {
  13125. return;
  13126. }
  13127. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  13128. let count2 = await this.getWorksCount(3, i, j, tooli);
  13129. if (count1 > 0 || count2 > 0) {
  13130. this.$confirm(
  13131. this.lang.ssSwitchMove,
  13132. this.lang.ssTip,
  13133. {
  13134. confirmButtonText: this.lang.ssConfirm,
  13135. cancelButtonText: this.lang.ssCancel,
  13136. type: "warning",
  13137. }
  13138. )
  13139. .then(() => {
  13140. var a = JSON.parse(
  13141. JSON.stringify(
  13142. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13143. tooli + 1
  13144. ]
  13145. )
  13146. );
  13147. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13148. JSON.parse(
  13149. JSON.stringify(
  13150. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13151. )
  13152. );
  13153. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13154. this.$forceUpdate();
  13155. this.moveWork(3, i, j, tooli + 1, i, j, tooli);
  13156. this.updateWork();
  13157. })
  13158. .catch(() => {
  13159. return;
  13160. });
  13161. } else {
  13162. var a = JSON.parse(
  13163. JSON.stringify(
  13164. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13165. )
  13166. );
  13167. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13168. JSON.parse(
  13169. JSON.stringify(
  13170. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13171. )
  13172. );
  13173. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13174. this.$forceUpdate();
  13175. }
  13176. },
  13177. addWork(type) {
  13178. if(type == 2 && this.courseName == "") {
  13179. this.$message.error(this.lang.ssFillCourseName);
  13180. return;
  13181. }
  13182. let cPan = 1;
  13183. for (var i = 0; i < this.unitJson.length; i++) {
  13184. for (
  13185. var j = 0;
  13186. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13187. j++
  13188. ) {
  13189. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13190. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13191. if (
  13192. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13193. ) {
  13194. for (
  13195. var z = 0;
  13196. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13197. z++
  13198. ) {
  13199. if (
  13200. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13201. .length
  13202. ) {
  13203. this.$message.error(this.lang.ssAddToolFull);
  13204. cPan = 2;
  13205. break;
  13206. }
  13207. }
  13208. }
  13209. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13210. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13211. i
  13212. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13213. return ele.value != "" || ele.detail != "" || ele.target != "";
  13214. });
  13215. }
  13216. }
  13217. }
  13218. this.inputShow = true;
  13219. if (cPan == 2) {
  13220. this.steps--;
  13221. return;
  13222. }
  13223. for (var i = 0; i < this.unitJson.length; i++) {
  13224. delete this.unitJson[i].isUpdate;
  13225. }
  13226. if(!this.targetCourseText2){
  13227. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13228. }
  13229. let params = [
  13230. {
  13231. uid: this.userid,
  13232. title: this.courseName,
  13233. brief: this.courseText,
  13234. cover:
  13235. this.cover.length > 0
  13236. ? JSON.stringify(this.cover)
  13237. : JSON.stringify([
  13238. {
  13239. name: "noBanner.jpg",
  13240. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13241. uid: 1656409780264,
  13242. status: "success",
  13243. },
  13244. ]),
  13245. evaId: this.evalua,
  13246. astudent:
  13247. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13248. see: this.isTeacherSee == true ? 1 : 0,
  13249. chapters: JSON.stringify(this.unitJson),
  13250. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13251. courseType: JSON.stringify(this.courseTypeId),
  13252. ateacher:
  13253. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13254. inviteCode: JSON.stringify(this.inviteCode),
  13255. refile: JSON.stringify(this.infoData),
  13256. reBrief: this.courseText2,
  13257. cpote: JSON.stringify(this.cpote),
  13258. setting: JSON.stringify({
  13259. courseJie: this.courseJie,
  13260. courseTime: this.courseTime,
  13261. teacherInfoData: this.teacherInfoData,
  13262. teacherCourseText: this.teacherCourseText,
  13263. targetCourseText: this.targetCourseText,
  13264. cankaoInfoData: this.cankaoInfoData,
  13265. mubiaoInfoData: this.mubiaoInfoData,
  13266. xuanzeInfoData: this.xuanzeInfoData,
  13267. pingjiaInfoData: this.pingjiaInfoData,
  13268. infoData2: this.infoData2,
  13269. isuseT: this.isuseT,
  13270. mode: this.mode,
  13271. targetCourseText2: this.targetCourseText2,
  13272. chatid: this.chatid,
  13273. languageSetting: this.languageSetting,
  13274. knowInfoData: this.knowInfoData,
  13275. knowFileids: this.knowFileids,
  13276. knowInfoData2: this.knowInfoData2,
  13277. knowFileids2: this.knowFileids2,
  13278. recordVideoText: this.recordVideoText,
  13279. recordAudioUrl: this.recordAudioUrl,
  13280. appendixFile: this.appendixFile,
  13281. }),
  13282. iresearch: this.isFileSearch ? 1 : 2,
  13283. },
  13284. ];
  13285. this.ajax
  13286. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13287. .then((res) => {
  13288. console.log(this.steps);
  13289. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13290. this.$message({
  13291. message: this.lang.ssAddSucc,
  13292. type: "success",
  13293. });
  13294. }
  13295. this.number = res.data.ordernumber;
  13296. this.courseId = res.data.courseId;
  13297. this.cid = res.data.courseId;
  13298. this.courseUserid = this.userid;
  13299. this.islogin = true;
  13300. // this.updateCourseState(4);
  13301. this.updateCourseState(5);
  13302. this.addtips()
  13303. if(type == 2){
  13304. this.retrunCourse()
  13305. }
  13306. if(type == 3){
  13307. this.steps = 4
  13308. }
  13309. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13310. })
  13311. .catch((err) => {
  13312. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13313. this.$message.error(this.lang.ssNetPoor);
  13314. console.error(err);
  13315. });
  13316. },
  13317. goCourse() {
  13318. window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
  13319. },
  13320. updateWork2() {
  13321. let _unitIndex = this.unitIndex;
  13322. let cPan = 1;
  13323. for (
  13324. var j = 0;
  13325. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13326. j++
  13327. ) {
  13328. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13329. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13330. j
  13331. ].proVisible2 = false;
  13332. if (
  13333. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13334. .length > 1
  13335. ) {
  13336. for (
  13337. var z = 0;
  13338. z <
  13339. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13340. .length;
  13341. z++
  13342. ) {
  13343. if (
  13344. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13345. z
  13346. ].tool.length
  13347. ) {
  13348. this.$message.error(this.lang.ssAddToolFull);
  13349. cPan = 2;
  13350. break;
  13351. }
  13352. }
  13353. }
  13354. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13355. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13356. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13357. (ele) => {
  13358. return ele.value != "" || ele.detail != "" || ele.target != "";
  13359. }
  13360. );
  13361. }
  13362. }
  13363. this.inputShow = true;
  13364. if (cPan == 2) {
  13365. this.steps--;
  13366. return;
  13367. }
  13368. let params = [
  13369. {
  13370. cid: this.cid,
  13371. chapters: JSON.stringify(this.unitJson),
  13372. uid: this.userid,
  13373. unitIndex: _unitIndex,
  13374. },
  13375. ];
  13376. this.ajax
  13377. .post(this.$store.state.api + "updateWorkNew4", params)
  13378. .then((res) => {
  13379. this.$message({
  13380. message: this.lang.UpdateSuccessful,
  13381. type: "success",
  13382. });
  13383. this.courseId = this.cid;
  13384. this.addtips();
  13385. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13386. })
  13387. .catch((err) => {
  13388. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13389. this.$message.error(this.lang.ssNetPoor);
  13390. console.error(err);
  13391. });
  13392. },
  13393. updateWork3(unitIndex) {
  13394. let _unitIndex = unitIndex;
  13395. let cPan = 1;
  13396. for (
  13397. var j = 0;
  13398. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13399. j++
  13400. ) {
  13401. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13402. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13403. j
  13404. ].proVisible2 = false;
  13405. if (
  13406. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13407. .length > 1
  13408. ) {
  13409. for (
  13410. var z = 0;
  13411. z <
  13412. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13413. .length;
  13414. z++
  13415. ) {
  13416. if (
  13417. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13418. z
  13419. ].tool.length
  13420. ) {
  13421. this.$message.error(this.lang.ssAddToolFull);
  13422. cPan = 2;
  13423. break;
  13424. }
  13425. }
  13426. }
  13427. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13428. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13429. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13430. (ele) => {
  13431. return ele.value != "" || ele.detail != "" || ele.target != "";
  13432. }
  13433. );
  13434. }
  13435. }
  13436. this.inputShow = true;
  13437. if (cPan == 2) {
  13438. this.steps--;
  13439. return;
  13440. }
  13441. let params = [
  13442. {
  13443. cid: this.cid,
  13444. chapters: JSON.stringify(this.unitJson),
  13445. uid: this.userid,
  13446. unitIndex: _unitIndex,
  13447. },
  13448. ];
  13449. this.ajax
  13450. .post(this.$store.state.api + "updateWorkNew4", params)
  13451. .then((res) => {
  13452. // this.$message({
  13453. // message: this.lang.UpdateSuccessful,
  13454. // type: "success",
  13455. // });
  13456. this.courseId = this.cid;
  13457. this.addtips()
  13458. })
  13459. .catch((err) => {
  13460. this.$message.error(this.lang.ssNetPoor);
  13461. console.error(err);
  13462. });
  13463. },
  13464. updateWork() {
  13465. let cPan = 1;
  13466. for (var i = 0; i < this.unitJson.length; i++) {
  13467. for (
  13468. var j = 0;
  13469. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13470. j++
  13471. ) {
  13472. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13473. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13474. if (
  13475. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13476. ) {
  13477. for (
  13478. var z = 0;
  13479. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13480. z++
  13481. ) {
  13482. if (
  13483. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13484. .length
  13485. ) {
  13486. this.$message.error(this.lang.ssAddToolFull);
  13487. cPan = 2;
  13488. break;
  13489. }
  13490. }
  13491. }
  13492. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13493. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13494. i
  13495. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13496. return ele.value != "" || ele.detail != "" || ele.target != "";
  13497. });
  13498. }
  13499. }
  13500. }
  13501. this.inputShow = true;
  13502. if (cPan == 2) {
  13503. this.steps--;
  13504. return;
  13505. }
  13506. for (var i = 0; i < this.unitJson.length; i++) {
  13507. delete this.unitJson[i].isUpdate;
  13508. }
  13509. if(!this.targetCourseText2){
  13510. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13511. }
  13512. let params = [
  13513. {
  13514. cid: this.cid,
  13515. title: this.courseName,
  13516. brief: this.courseText,
  13517. cover:
  13518. this.cover.length > 0
  13519. ? JSON.stringify(this.cover)
  13520. : JSON.stringify([
  13521. {
  13522. name: "noBanner.jpg",
  13523. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13524. uid: 1656409780264,
  13525. status: "success",
  13526. },
  13527. ]),
  13528. evaId: this.evalua,
  13529. astudent:
  13530. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13531. see: this.isTeacherSee == true ? 1 : 0,
  13532. chapters: JSON.stringify(this.unitJson),
  13533. template: this.myWord != "undefined" ? this.myWord : [],
  13534. uid: this.userid,
  13535. courseType: JSON.stringify(this.courseTypeId),
  13536. ateacher:
  13537. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13538. inviteCode: JSON.stringify(this.inviteCode),
  13539. refile: JSON.stringify(this.infoData),
  13540. reBrief: this.courseText2,
  13541. cpote: JSON.stringify(this.cpote),
  13542. setting: JSON.stringify({
  13543. courseJie: this.courseJie,
  13544. courseTime: this.courseTime,
  13545. teacherInfoData: this.teacherInfoData,
  13546. teacherCourseText: this.teacherCourseText,
  13547. targetCourseText: this.targetCourseText,
  13548. cankaoInfoData: this.cankaoInfoData,
  13549. mubiaoInfoData: this.mubiaoInfoData,
  13550. xuanzeInfoData: this.xuanzeInfoData,
  13551. pingjiaInfoData: this.pingjiaInfoData,
  13552. infoData2: this.infoData2,
  13553. isuseT: this.isuseT,
  13554. mode: this.mode,
  13555. targetCourseText2: this.targetCourseText2,
  13556. chatid: this.chatid,
  13557. languageSetting: this.languageSetting,
  13558. knowInfoData: this.knowInfoData,
  13559. knowFileids: this.knowFileids,
  13560. knowInfoData2: this.knowInfoData2,
  13561. knowFileids2: this.knowFileids2,
  13562. recordVideoText: this.recordVideoText,
  13563. recordAudioUrl: this.recordAudioUrl,
  13564. appendixFile: this.appendixFile,
  13565. }),
  13566. iresearch: this.isFileSearch ? 1 : 2,
  13567. },
  13568. ];
  13569. this.ajax
  13570. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13571. .then((res) => {
  13572. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13573. if (this.cidType == 1) {
  13574. this.$message({
  13575. message: this.lang.UpdateSuccessful,
  13576. type: "success",
  13577. });
  13578. } else {
  13579. this.$message({
  13580. message: this.lang.ssAddSucc,
  13581. type: "success",
  13582. });
  13583. }
  13584. }
  13585. this.number = this.nbOrder;
  13586. this.courseId = this.cid;
  13587. this.addtips()
  13588. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13589. })
  13590. .catch((err) => {
  13591. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13592. this.$message.error(this.lang.ssNetPoor);
  13593. console.error(err);
  13594. });
  13595. },
  13596. insertWord() {
  13597. this.dialogVisible1 = true;
  13598. this.updateBoolean2 = false;
  13599. this.tTitle = "";
  13600. this.tdetail = "";
  13601. },
  13602. addWord() {
  13603. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13604. name: this.tTitle,
  13605. content: this.tdetail,
  13606. uid: this.guid(),
  13607. });
  13608. this.dialogVisible1 = false;
  13609. },
  13610. upWord() { },
  13611. selectWord(uid, i, c) {
  13612. this.dialogVisible1 = true;
  13613. this.updateBoolean2 = true;
  13614. if (
  13615. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13616. ) {
  13617. this.tTitle =
  13618. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13619. this.tdetail =
  13620. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13621. }
  13622. },
  13623. isAddPP() {
  13624. if (this.checkboxList.length > 0) {
  13625. this.$message({
  13626. message: this.lang.ssAddOk,
  13627. type: "success",
  13628. });
  13629. this.dialogVisible3 = false;
  13630. } else {
  13631. this.$message({
  13632. message: this.lang.ssPlsAddCM,
  13633. type: "error",
  13634. });
  13635. }
  13636. },
  13637. isAddClass() {
  13638. this.dialogVisibleClass = false;
  13639. },
  13640. isAddPPTeacher() {
  13641. this.dialogVisibleMember = false;
  13642. this.setMan();
  13643. },
  13644. getTipsTemplate(){
  13645. if(this.templateid){
  13646. let params = {
  13647. id: this.templateid
  13648. }
  13649. this.ajax
  13650. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13651. .then((res) => {
  13652. if(res.data[0].length){
  13653. this.tipsJson = res.data[0][0]
  13654. this.aiJson = JSON.parse(res.data[0][0].tips)
  13655. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13656. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13657. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13658. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13659. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13660. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13661. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13662. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13663. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13664. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13665. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13666. }
  13667. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13668. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13669. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13670. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13671. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13672. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13673. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13674. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13675. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13676. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13677. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13678. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13679. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13680. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13681. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13682. 问题:<议程和问题引导>中的问题
  13683. 讨论:<转文本内容>`
  13684. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13685. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13686. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13687. // }
  13688. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13689. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13690. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13691. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13692. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13693. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13694. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13695. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13696. // }
  13697. this.$forceUpdate();
  13698. this.isDialog = res.data[0][0].isDialog
  13699. }
  13700. })
  13701. .catch((err) => { });
  13702. }
  13703. },
  13704. getTipsTemplateIsDialog(){
  13705. if(this.templateid){
  13706. let params = {
  13707. id: this.templateid
  13708. }
  13709. this.ajax
  13710. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13711. .then((res) => {
  13712. if(res.data[0].length){
  13713. this.isDialog = res.data[0][0].isDialog
  13714. }
  13715. })
  13716. .catch((err) => { });
  13717. }
  13718. },
  13719. getTemplate() {
  13720. this.ajax
  13721. .get(this.$store.state.api + "getCourseTemplateT", "")
  13722. .then((res) => {
  13723. this.templateArray = res.data[0];
  13724. this.getTemplateOid();
  13725. this.$forceUpdate();
  13726. })
  13727. .catch((err) => { });
  13728. },
  13729. getTemplateOid() {
  13730. let params = {
  13731. oid: this.oid,
  13732. };
  13733. this.ajax
  13734. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13735. .then((res) => {
  13736. if (res.data[0].length) {
  13737. this.templateArray = [...res.data[0], ...this.templateArray];
  13738. }
  13739. this.getTemplateOrg();
  13740. this.$forceUpdate();
  13741. })
  13742. .catch((err) => { });
  13743. },
  13744. getTemplateOrg() {
  13745. let params = {
  13746. oid: this.org,
  13747. };
  13748. this.ajax
  13749. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13750. .then((res) => {
  13751. if (res.data[0].length) {
  13752. this.templateArray = [...res.data[0], ...this.templateArray];
  13753. }
  13754. this.$forceUpdate();
  13755. })
  13756. .catch((err) => { });
  13757. },
  13758. clearChoose() {
  13759. this.clearArray.splice(this.templateC.id, 1);
  13760. this.dialogVisible2 = false;
  13761. },
  13762. clearAttText() {
  13763. this.AttText = {
  13764. title: "",
  13765. text: "",
  13766. };
  13767. this.dialogVisible6 = false;
  13768. },
  13769. clearLine() {
  13770. this.line = "";
  13771. this.dialogVisible7 = false;
  13772. },
  13773. openTemplate() {
  13774. this.ctJson = {};
  13775. this.templateDialog = true;
  13776. },
  13777. checkctJson(json) {
  13778. if (this.ctJson.id == json.id) {
  13779. this.ctJson = {};
  13780. } else {
  13781. this.ctJson = json;
  13782. }
  13783. },
  13784. addTemplate(res) {
  13785. let _this = this;
  13786. let _res = [];
  13787. if (res.id == 1) {
  13788. _res = [
  13789. {
  13790. dyName: "", //单元标题
  13791. easy: 1,
  13792. chapterInfo: [
  13793. {
  13794. isread: false,
  13795. chapterid: this.guid(),
  13796. title: "",
  13797. courseName: "",
  13798. taskJson: [
  13799. {
  13800. task: "",
  13801. taskDetail: "",
  13802. chapterData: [],
  13803. toolText: "",
  13804. toolChoose: [
  13805. {
  13806. tool: [],
  13807. toolDetail: "",
  13808. toolType: 0,
  13809. askCount: 1,
  13810. askTitle: "",
  13811. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13812. },
  13813. ],
  13814. isShowTools: false,
  13815. askCount: 1,
  13816. isFold: 1,
  13817. askTitle: "",
  13818. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13819. checkJson: [{ checkCount: [], checkPerent: [] }],
  13820. homeworkList: [],
  13821. },
  13822. ],
  13823. itemCount: 1,
  13824. fileList1: [],
  13825. video: [],
  13826. testData: [],
  13827. pData: [],
  13828. templateArray: [],
  13829. },
  13830. ],
  13831. },
  13832. ];
  13833. this.updateCourseState(1);
  13834. } else if (res.id == 2) {
  13835. let stageData = [];
  13836. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  13837. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  13838. if (!iframe && !iframe2) {
  13839. this.$message.error(this.lang.ssUseAI);
  13840. return;
  13841. }
  13842. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13843. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13844. if (
  13845. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13846. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13847. ) {
  13848. this.$message.error(this.lang.ssUseAI);
  13849. return;
  13850. }
  13851. stageData = copyData
  13852. ? copyData.stageData
  13853. : copyData2
  13854. ? copyData2.stageData
  13855. : [""];
  13856. for (var i = 0; i < stageData.length; i++) {
  13857. _res.push({
  13858. dyName: stageData[i], //单元标题
  13859. chapterInfo: [
  13860. {
  13861. isread: false,
  13862. chapterid: this.guid(),
  13863. title: "",
  13864. courseName: "",
  13865. taskJson: [
  13866. {
  13867. task: "",
  13868. taskDetail: "",
  13869. chapterData: [],
  13870. toolText: "",
  13871. toolChoose: [
  13872. {
  13873. tool: [],
  13874. toolDetail: "",
  13875. toolType: 0,
  13876. askCount: 1,
  13877. askTitle: "",
  13878. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13879. },
  13880. ],
  13881. isShowTools: false,
  13882. askCount: 1,
  13883. isFold: 1,
  13884. askTitle: "",
  13885. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13886. checkJson: [{ checkCount: [], checkPerent: [] }],
  13887. homeworkList: [],
  13888. },
  13889. ],
  13890. itemCount: 1,
  13891. fileList1: [],
  13892. video: [],
  13893. testData: [],
  13894. pData: [],
  13895. templateArray: [],
  13896. },
  13897. ],
  13898. });
  13899. }
  13900. this.updateCourseState(1);
  13901. } else if (!Object.keys(res).length) {
  13902. this.$message.error(this.lang.ssSelectTemplatePls);
  13903. retrun;
  13904. } else {
  13905. _res = JSON.parse(res.chapters);
  13906. this.updateCourseState(parseInt(res.state));
  13907. }
  13908. _this
  13909. .$confirm(
  13910. this.lang.ssConfirmTemp,
  13911. this.lang.ssTip,
  13912. {
  13913. confirmButtonText: this.lang.ssConfirm,
  13914. cancelButtonText: this.lang.ssCancel,
  13915. type: "warning",
  13916. }
  13917. )
  13918. .then(() => {
  13919. _this.unitJson = _res;
  13920. _this.updateWork();
  13921. // _this.steps++;
  13922. _this.templateDialog = false;
  13923. setTimeout(() => {
  13924. this.checkEva(this.checkId);
  13925. setTimeout(() => {
  13926. this.checkEva(this.checkId);
  13927. }, 100);
  13928. }, 1000);
  13929. })
  13930. .catch(() => {
  13931. return;
  13932. });
  13933. },
  13934. checkTemplate(res) {
  13935. let _this = this;
  13936. _this
  13937. .$confirm(
  13938. this.lang.ssConfirmTemp,
  13939. this.lang.ssTip,
  13940. {
  13941. confirmButtonText: this.lang.ssConfirm,
  13942. cancelButtonText: this.lang.ssCancel,
  13943. type: "warning",
  13944. }
  13945. )
  13946. .then(() => {
  13947. _this.unitJson = JSON.parse(res.chapters);
  13948. _this.steps++;
  13949. setTimeout(() => {
  13950. this.checkEva(this.checkId);
  13951. setTimeout(() => {
  13952. this.checkEva(this.checkId);
  13953. }, 100);
  13954. }, 1000);
  13955. })
  13956. .catch(() => {
  13957. return;
  13958. });
  13959. },
  13960. checkTemplate1(w) {
  13961. this.steps++;
  13962. },
  13963. checkTemplate2() {
  13964. let _this = this;
  13965. _this
  13966. .$confirm(this.lang.ssChooseEmpty, this.lang.ssTip, {
  13967. confirmButtonText: this.lang.ssConfirm,
  13968. cancelButtonText: this.lang.ssCancel,
  13969. type: "warning",
  13970. })
  13971. .then(() => {
  13972. _this.unitIndex = 0;
  13973. _this.unitJson = [
  13974. {
  13975. dyName: "", //单元标题
  13976. chapterInfo: [
  13977. {
  13978. isread: false,
  13979. chapterid: this.guid(),
  13980. title: "",
  13981. courseName: "",
  13982. taskJson: [
  13983. {
  13984. task: "",
  13985. taskDetail: "",
  13986. chapterData: [],
  13987. toolText: "",
  13988. toolChoose: [
  13989. {
  13990. tool: [],
  13991. toolDetail: "",
  13992. toolType: 0,
  13993. askCount: 1,
  13994. askTitle: "",
  13995. askJson: [
  13996. { askstitle: "", askItem: 1, checkList: [] },
  13997. ],
  13998. },
  13999. ],
  14000. isShowTools: false,
  14001. askCount: 1,
  14002. isFold: 1,
  14003. askTitle: "",
  14004. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14005. checkJson: [{ checkCount: [], checkPerent: [] }],
  14006. homeworkList: [],
  14007. },
  14008. ],
  14009. itemCount: 1,
  14010. fileList1: [],
  14011. video: [],
  14012. testData: [],
  14013. pData: [],
  14014. templateArray: [],
  14015. },
  14016. ],
  14017. },
  14018. ];
  14019. this.steps++;
  14020. setTimeout(() => {
  14021. this.checkEva(this.checkId);
  14022. setTimeout(() => {
  14023. this.checkEva(this.checkId);
  14024. }, 100);
  14025. }, 1000);
  14026. this.updateWork();
  14027. })
  14028. .catch(() => {
  14029. return;
  14030. });
  14031. },
  14032. checkTemplate3() {
  14033. let _this = this;
  14034. _this
  14035. .$confirm(this.lang.ssChooseSimple, this.lang.ssTip, {
  14036. confirmButtonText: this.lang.ssConfirm,
  14037. cancelButtonText: this.lang.ssCancel,
  14038. type: "warning",
  14039. })
  14040. .then(() => {
  14041. _this.unitIndex = 0;
  14042. _this.unitJson = [
  14043. {
  14044. dyName: "", //单元标题
  14045. easy: 1,
  14046. chapterInfo: [
  14047. {
  14048. isread: false,
  14049. chapterid: this.guid(),
  14050. title: "",
  14051. courseName: "",
  14052. taskJson: [
  14053. {
  14054. task: "",
  14055. taskDetail: "",
  14056. chapterData: [],
  14057. toolText: "",
  14058. toolChoose: [
  14059. {
  14060. tool: [],
  14061. toolDetail: "",
  14062. toolType: 0,
  14063. askCount: 1,
  14064. askTitle: "",
  14065. askJson: [
  14066. { askstitle: "", askItem: 1, checkList: [] },
  14067. ],
  14068. },
  14069. ],
  14070. isShowTools: false,
  14071. askCount: 1,
  14072. isFold: 1,
  14073. askTitle: "",
  14074. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14075. checkJson: [{ checkCount: [], checkPerent: [] }],
  14076. homeworkList: [],
  14077. },
  14078. ],
  14079. itemCount: 1,
  14080. fileList1: [],
  14081. video: [],
  14082. testData: [],
  14083. pData: [],
  14084. templateArray: [],
  14085. },
  14086. ],
  14087. },
  14088. ];
  14089. // this.steps++;
  14090. this.updateWork();
  14091. })
  14092. .catch(() => {
  14093. return;
  14094. });
  14095. },
  14096. checkTemplate4() {
  14097. let _this = this;
  14098. _this
  14099. .$confirm(this.lang.ssChooseFuture, this.lang.ssTip, {
  14100. confirmButtonText: this.lang.ssConfirm,
  14101. cancelButtonText: this.lang.ssCancel,
  14102. type: "warning",
  14103. })
  14104. .then(() => {
  14105. _this.unitIndex = 0;
  14106. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  14107. this.steps++;
  14108. this.updateWork();
  14109. })
  14110. .catch(() => {
  14111. return;
  14112. });
  14113. },
  14114. wordNext() {
  14115. this.dialogVisible2 = false;
  14116. },
  14117. isAddOrUpdateAttText() {
  14118. if (this.AttTextType == 0) {
  14119. this.addAttTextMessage();
  14120. } else {
  14121. this.updateAttText();
  14122. }
  14123. },
  14124. isAddOrUpdateLine() {
  14125. if (!this.lineTitle) {
  14126. this.$message.error(this.lang.ssLinkTitle);
  14127. return;
  14128. }
  14129. if (this.lineType == 0) {
  14130. this.addLine();
  14131. } else {
  14132. this.updateLine();
  14133. }
  14134. },
  14135. addAttTextMessage() {
  14136. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14137. this.taskCount
  14138. ].chapterData.unshift({
  14139. name: this.AttText.title,
  14140. url: this.AttText.text,
  14141. type: 6,
  14142. });
  14143. this.imgChange1(null, null, 6, this.taskCount);
  14144. this.dialogVisible6 = false;
  14145. },
  14146. selectAttText(itemTaskIndex, i) {
  14147. this.AttText.title =
  14148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14149. itemTaskIndex
  14150. ].chapterData[i].name;
  14151. this.AttText.text =
  14152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14153. itemTaskIndex
  14154. ].chapterData[i].url;
  14155. this.taskCount = itemTaskIndex;
  14156. this.AttTextIndex = i;
  14157. this.AttTextType = 1;
  14158. this.dialogVisible6 = true;
  14159. },
  14160. updateAttText() {
  14161. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14162. this.taskCount
  14163. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14165. this.taskCount
  14166. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14167. this.dialogVisible6 = false;
  14168. },
  14169. addLine() {
  14170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14171. this.lineCount
  14172. ].chapterData.unshift({
  14173. name: this.lang.ssLink,
  14174. title: this.lineTitle,
  14175. url: this.line,
  14176. type: 8,
  14177. });
  14178. this.imgChange1(null, null, 8, this.lineCount);
  14179. this.dialogVisible7 = false;
  14180. },
  14181. selectLine(itemTaskIndex, i) {
  14182. this.line =
  14183. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14184. itemTaskIndex
  14185. ].chapterData[i].url;
  14186. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14187. itemTaskIndex
  14188. ].chapterData[i].title
  14189. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14190. .chapterData[i].title
  14191. : "";
  14192. this.taskCount = itemTaskIndex;
  14193. this.lineCount = i;
  14194. this.lineType = 1;
  14195. this.dialogVisible7 = true;
  14196. },
  14197. openUpdateSource(itemTaskIndex, i) {
  14198. this.sourceData = {};
  14199. let source =
  14200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14201. .chapterData[i];
  14202. this.sourceData[source.id] = {};
  14203. this.sourceData[source.id].name = source.title;
  14204. this.sourceData[source.id].url = source.url;
  14205. this.dialogVisibleSource = true;
  14206. this.updateSourcePan = true;
  14207. this.taskCount = itemTaskIndex;
  14208. this.lineCount = i;
  14209. },
  14210. updateLine() {
  14211. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14212. this.taskCount
  14213. ].chapterData[this.lineCount].url = this.line;
  14214. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14215. this.taskCount
  14216. ].chapterData[this.lineCount].title = this.lineTitle;
  14217. this.dialogVisible7 = false;
  14218. },
  14219. addPP() {
  14220. this.dialogVisible3 = true;
  14221. },
  14222. goTo(path) {
  14223. this.$router.push(path);
  14224. },
  14225. openTools(itemTaskIndex, i, toolIndex) {
  14226. this.toolIndex = toolIndex;
  14227. this.taskCount = itemTaskIndex;
  14228. if (i == 4) {
  14229. if (toolIndex == null) {
  14230. var a =
  14231. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14232. .chapterData;
  14233. for (var i = 0; i < a.length; i++) {
  14234. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14235. this.askJson =
  14236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14237. itemTaskIndex
  14238. ].chapterData[i].askJson;
  14239. }
  14240. }
  14241. } else {
  14242. this.askJson = JSON.parse(
  14243. JSON.stringify(
  14244. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14245. itemTaskIndex
  14246. ].toolChoose[toolIndex]
  14247. )
  14248. );
  14249. }
  14250. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14251. this.dialogVisible5 = true;
  14252. } else if (i == 45) {
  14253. if (
  14254. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14255. .toolChoose[toolIndex].testJson
  14256. ) {
  14257. this.testJson = JSON.parse(
  14258. JSON.stringify(
  14259. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14260. itemTaskIndex
  14261. ].toolChoose[toolIndex].testJson
  14262. )
  14263. );
  14264. } else {
  14265. var testJson = {
  14266. testCount: 1,
  14267. testTitle: "",
  14268. testJson: [
  14269. {
  14270. teststitle: "",
  14271. testItem: 1,
  14272. checkList: [],
  14273. timuList: [],
  14274. answer: [],
  14275. type: "1",
  14276. },
  14277. ],
  14278. };
  14279. this.testJson = testJson;
  14280. }
  14281. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14282. this.dialogVisibleChoice = true;
  14283. } else if (i == 47) {
  14284. if (
  14285. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14286. .toolChoose[toolIndex].sentenceList
  14287. ) {
  14288. this.sentenceList = JSON.parse(
  14289. JSON.stringify(
  14290. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14291. itemTaskIndex
  14292. ].toolChoose[toolIndex].sentenceList
  14293. )
  14294. );
  14295. } else {
  14296. var sentenceList = [
  14297. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14298. ];
  14299. this.sentenceList = sentenceList;
  14300. }
  14301. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14302. this.dialogVisibleSentence = true;
  14303. } else if (i == 48) {
  14304. if (
  14305. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14306. .toolChoose[toolIndex].tableJson
  14307. ) {
  14308. this.tableJson = JSON.parse(
  14309. JSON.stringify(
  14310. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14311. itemTaskIndex
  14312. ].toolChoose[toolIndex].tableJson
  14313. )
  14314. );
  14315. } else {
  14316. var tableJson = { text: "" };
  14317. this.tableJson = tableJson;
  14318. }
  14319. this.dialogVisibleTable = true;
  14320. } else if (i == 52) {
  14321. if (
  14322. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14323. .toolChoose[toolIndex].wordJson
  14324. ) {
  14325. this.wordJson = JSON.parse(
  14326. JSON.stringify(
  14327. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14328. itemTaskIndex
  14329. ].toolChoose[toolIndex].wordJson
  14330. )
  14331. );
  14332. } else {
  14333. var wordJson = { text: "" };
  14334. this.wordJson = wordJson;
  14335. }
  14336. this.dialogVisibleWord = true;
  14337. // else if (i == 50) {
  14338. // if (
  14339. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14340. // .toolChoose[toolIndex].uploadJson
  14341. // ) {
  14342. // this.uploadJson = JSON.parse(
  14343. // JSON.stringify(
  14344. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14345. // itemTaskIndex
  14346. // ].toolChoose[toolIndex].uploadJson
  14347. // )
  14348. // );
  14349. // } else {
  14350. // var uploadJson = [];
  14351. // this.uploadJson = uploadJson;
  14352. // }
  14353. // this.dialogVisibleMoreUpload = true;
  14354. // }
  14355. } else if (i == 10) {
  14356. if (
  14357. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14358. .toolChoose[toolIndex].preTime
  14359. ) {
  14360. this.preTime = JSON.parse(
  14361. JSON.stringify(
  14362. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14363. itemTaskIndex
  14364. ].toolChoose[toolIndex].preTime
  14365. )
  14366. );
  14367. } else {
  14368. var preTime = 0;
  14369. this.preTime = preTime;
  14370. }
  14371. this.dialogVisiblePreTime = true;
  14372. } else if (i == 49) {
  14373. if (
  14374. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14375. .toolChoose[toolIndex].groupJson
  14376. ) {
  14377. this.groupJson = JSON.parse(
  14378. JSON.stringify(
  14379. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14380. itemTaskIndex
  14381. ].toolChoose[toolIndex].groupJson
  14382. )
  14383. );
  14384. } else {
  14385. var groupJson = {
  14386. group: [{ name: this.lang.ssGroup.replace(/\*/g, '1') }],
  14387. number: undefined,
  14388. islock: 1,
  14389. };
  14390. this.groupJson = groupJson;
  14391. }
  14392. this.dialogVisibleGroup = true;
  14393. } else if (i == 62) {
  14394. if (
  14395. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14396. .toolChoose[toolIndex].videoJson
  14397. ) {
  14398. this.videoJson = JSON.parse(
  14399. JSON.stringify(
  14400. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14401. itemTaskIndex
  14402. ].toolChoose[toolIndex].videoJson
  14403. )
  14404. );
  14405. } else {
  14406. var videoJson = {
  14407. video: "",
  14408. setting: [],
  14409. };
  14410. this.videoJson = videoJson;
  14411. }
  14412. this.dialogVisibleVideo = true;
  14413. } else if (i == 15) {
  14414. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14415. itemTaskIndex
  14416. ].toolChoose[toolIndex].answerQ
  14417. ? JSON.parse(
  14418. JSON.stringify(
  14419. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14420. itemTaskIndex
  14421. ].toolChoose[toolIndex].answerQ
  14422. )
  14423. )
  14424. : "";
  14425. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14426. this.dialogVisible8 = true;
  14427. } else if (i == 40) {
  14428. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14429. itemTaskIndex
  14430. ].toolChoose[toolIndex].rateJson
  14431. ? JSON.parse(
  14432. JSON.stringify(
  14433. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14434. itemTaskIndex
  14435. ].toolChoose[toolIndex].rateJson
  14436. )
  14437. )
  14438. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14439. this.selectSteps = 1;
  14440. this.dialogVisibleRate = true;
  14441. } else if (i == 42) {
  14442. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14443. itemTaskIndex
  14444. ].toolChoose[toolIndex].answerQ
  14445. ? JSON.parse(
  14446. JSON.stringify(
  14447. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14448. itemTaskIndex
  14449. ].toolChoose[toolIndex].answerQ
  14450. )
  14451. )
  14452. : "";
  14453. this.dialogVisibleMp3 = true;
  14454. } else if (i == 41) {
  14455. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14456. itemTaskIndex
  14457. ].toolChoose[toolIndex].selectJson
  14458. ? JSON.parse(
  14459. JSON.stringify(
  14460. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14461. itemTaskIndex
  14462. ].toolChoose[toolIndex].selectJson
  14463. )
  14464. )
  14465. : { url: "", select: [], answer: [] };
  14466. this.selectSteps = 1;
  14467. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14468. this.dialogVisibleSelect = true;
  14469. } else if (i == 3) {
  14470. window.topU.postMessage(
  14471. {
  14472. tools: "3y",
  14473. cid: this.cid,
  14474. stage: this.unitIndex,
  14475. task: itemTaskIndex,
  14476. tool: toolIndex,
  14477. },
  14478. "*"
  14479. );
  14480. } else if (i == 1) {
  14481. window.topU.postMessage(
  14482. {
  14483. tools: "1y",
  14484. cid: this.cid,
  14485. stage: this.unitIndex,
  14486. task: itemTaskIndex,
  14487. tool: toolIndex,
  14488. },
  14489. "*"
  14490. );
  14491. } else if (i == 57) {
  14492. window.topU.postMessage(
  14493. {
  14494. tools: "57y",
  14495. cid: this.cid,
  14496. stage: this.unitIndex,
  14497. task: itemTaskIndex,
  14498. tool: toolIndex,
  14499. },
  14500. "*"
  14501. );
  14502. } else if (i == 69) {
  14503. this.englishList = {};
  14504. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14505. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14506. ? JSON.parse(
  14507. JSON.stringify(
  14508. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14509. itemTaskIndex
  14510. ].toolChoose[toolIndex].englishList
  14511. )
  14512. )
  14513. : {};
  14514. this.$forceUpdate();
  14515. this.englishDialogVisible = true;
  14516. } else if (i == 70) {
  14517. this.englishVoiceJson = {};
  14518. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14519. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14520. ? JSON.parse(
  14521. JSON.stringify(
  14522. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14523. itemTaskIndex
  14524. ].toolChoose[toolIndex].englishVoiceJson
  14525. )
  14526. )
  14527. : {
  14528. title: '',
  14529. detail: '',
  14530. array: []
  14531. };
  14532. // {
  14533. // time: "",
  14534. // class: "",
  14535. // difficulty: 0,
  14536. // topic: "",
  14537. // isShow: false,
  14538. // eva: 0,
  14539. // aiEva: {
  14540. // isAiEva: false,
  14541. // aiEvaChoose: [],
  14542. // },
  14543. // allfType: [],
  14544. // englishJson: {},
  14545. // };
  14546. this.$forceUpdate();
  14547. this.EnglishVoiceDialog = true;
  14548. }else if(i == 72){
  14549. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14550. itemTaskIndex
  14551. ].toolChoose[toolIndex].appJson
  14552. ? JSON.parse(
  14553. JSON.stringify(
  14554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14555. itemTaskIndex
  14556. ].toolChoose[toolIndex].appJson
  14557. )
  14558. )
  14559. : {
  14560. url:'',
  14561. };
  14562. this.$forceUpdate();
  14563. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14564. }
  14565. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14566. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14568. }
  14569. },
  14570. setEnglishVoiceJson(val) {
  14571. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14572. this.taskCount
  14573. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14574. JSON.stringify(val)
  14575. );
  14576. this.$forceUpdate();
  14577. if (
  14578. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14579. .toolChoose[this.toolIndex].tool != 70
  14580. ) {
  14581. this.addTools(70, this.taskCount, this.toolIndex);
  14582. }
  14583. },
  14584. chapAddTools(i) {
  14585. if (this.chapTools[0].tools.length == 0) {
  14586. this.chapTools[0].tools.push(i);
  14587. } else {
  14588. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14589. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14590. } else {
  14591. this.chapTools[0].tools.push(i);
  14592. }
  14593. }
  14594. this.$forceUpdate();
  14595. },
  14596. addChaptersDataTools() {
  14597. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14598. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14599. this.chapCount
  14600. ].chapterData.unshift({
  14601. name: this.chapTools[0].toolDetail,
  14602. url: this.chapTools[0].tools,
  14603. type: 7,
  14604. askJson: this.askJson,
  14605. });
  14606. } else {
  14607. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14608. this.chapCount
  14609. ].chapterData.unshift({
  14610. name: this.chapTools[0].toolDetail,
  14611. url: this.chapTools[0].tools,
  14612. type: 7,
  14613. });
  14614. }
  14615. this.imgChange1(null, null, 7, this.chapCount);
  14616. this.dialogVisible4 = false;
  14617. },
  14618. addTools(i, itemTaskIndex, toolIndex) {
  14619. // if (
  14620. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14621. // .toolChoose[toolIndex].tool.length == 0
  14622. // ) {
  14623. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14624. // itemTaskIndex
  14625. // ].toolChoose[toolIndex].tool.push(i);
  14626. // } else {
  14627. // if (
  14628. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14629. // itemTaskIndex
  14630. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14631. // ) {
  14632. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14633. // itemTaskIndex
  14634. // ].toolChoose[toolIndex].tool.splice(
  14635. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14636. // itemTaskIndex
  14637. // ].toolChoose[toolIndex].tool.indexOf(i),
  14638. // 1
  14639. // );
  14640. // } else {
  14641. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14642. // itemTaskIndex
  14643. // ].toolChoose[toolIndex].tool.push(i);
  14644. // }
  14645. // console.log(
  14646. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14647. // .toolChoose[toolIndex].tool
  14648. // );
  14649. // }
  14650. if (i == 4) {
  14651. if (
  14652. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14653. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14654. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14655. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14656. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14657. .toolChoose[toolIndex].askJson[0].checkList < 2
  14658. ) {
  14659. this.openTools(itemTaskIndex, 4, toolIndex);
  14660. // this.$message({
  14661. // message: "请填写完整问卷内容",
  14662. // type: "error",
  14663. // });
  14664. return;
  14665. }
  14666. }
  14667. if (i == 45) {
  14668. if (
  14669. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14670. .toolChoose[toolIndex].testJson ||
  14671. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14672. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14673. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14674. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14675. ) {
  14676. this.openTools(itemTaskIndex, 45, toolIndex);
  14677. // this.$message({
  14678. // message: "请填写完整问卷内容",
  14679. // type: "error",
  14680. // });
  14681. return;
  14682. }
  14683. }
  14684. if (i == 47) {
  14685. if (
  14686. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14687. .toolChoose[toolIndex].sentenceList ||
  14688. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14689. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14690. ) {
  14691. this.openTools(itemTaskIndex, 47, toolIndex);
  14692. return;
  14693. }
  14694. }
  14695. if (i == 69) {
  14696. if (
  14697. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14698. .toolChoose[toolIndex].englishList
  14699. ) {
  14700. this.openTools(itemTaskIndex, 69, toolIndex);
  14701. return;
  14702. }
  14703. }
  14704. if (i == 70) {
  14705. if (
  14706. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14707. .toolChoose[toolIndex].englishVoiceJson
  14708. ) {
  14709. this.openTools(itemTaskIndex, 70, toolIndex);
  14710. return;
  14711. }
  14712. }
  14713. if(i == 72){
  14714. if (
  14715. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14716. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14717. .toolChoose[toolIndex].appJson).length == 0
  14718. ) {
  14719. this.openTools(itemTaskIndex, 72, toolIndex);
  14720. return;
  14721. }
  14722. }
  14723. // if (i == 48) {
  14724. // if (
  14725. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14726. // .toolChoose[toolIndex].tableJson
  14727. // ) {
  14728. // this.openTools(itemTaskIndex, 48, toolIndex);
  14729. // return;
  14730. // }
  14731. // }
  14732. // if (i == 50) {
  14733. // if (
  14734. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14735. // .toolChoose[toolIndex].uploadJson
  14736. // ) {
  14737. // this.openTools(itemTaskIndex, 50, toolIndex);
  14738. // return;
  14739. // }
  14740. // }
  14741. if (i == 49) {
  14742. if (
  14743. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14744. .toolChoose[toolIndex].groupJson
  14745. ) {
  14746. this.openTools(itemTaskIndex, 49, toolIndex);
  14747. return;
  14748. }
  14749. }
  14750. if (i == 62) {
  14751. if (
  14752. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14753. .toolChoose[toolIndex].videoJson
  14754. ) {
  14755. this.openTools(itemTaskIndex, 62, toolIndex);
  14756. return;
  14757. }
  14758. }
  14759. if (i == 15) {
  14760. if (
  14761. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14762. .toolChoose[toolIndex].answerQ ||
  14763. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14764. .toolChoose[toolIndex].answerQ == ""
  14765. ) {
  14766. this.openTools(itemTaskIndex, 15, toolIndex);
  14767. // this.$message({
  14768. // message: "请填写问答内容",
  14769. // type: "error",
  14770. // });
  14771. return;
  14772. }
  14773. }
  14774. if (i == 40) {
  14775. if (
  14776. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14777. .toolChoose[toolIndex].rateJson ||
  14778. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14779. .toolChoose[toolIndex].rateJson.length
  14780. ) {
  14781. this.openTools(itemTaskIndex, 40, toolIndex);
  14782. return;
  14783. }
  14784. }
  14785. if (i == 41) {
  14786. if (
  14787. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14788. .toolChoose[toolIndex].selectJson ||
  14789. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14790. .toolChoose[toolIndex].selectJson.url == "" ||
  14791. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14792. .toolChoose[toolIndex].selectJson.select.length ||
  14793. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14794. .toolChoose[toolIndex].selectJson.answer.length
  14795. ) {
  14796. this.openTools(itemTaskIndex, 41, toolIndex);
  14797. return;
  14798. }
  14799. }
  14800. if (i == 42) {
  14801. if (
  14802. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14803. .toolChoose[toolIndex].answerQ ||
  14804. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14805. .toolChoose[toolIndex].answerQ == ""
  14806. ) {
  14807. this.openTools(itemTaskIndex, 42, toolIndex);
  14808. return;
  14809. }
  14810. }
  14811. if (
  14812. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14813. .toolChoose[toolIndex].tool.length > 0
  14814. ) {
  14815. if (
  14816. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14817. itemTaskIndex
  14818. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14819. ) {
  14820. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14821. itemTaskIndex
  14822. ].toolChoose[toolIndex].tool.splice(
  14823. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14824. itemTaskIndex
  14825. ].toolChoose[toolIndex].tool.indexOf(i),
  14826. 1
  14827. );
  14828. } else {
  14829. // this.$message({
  14830. // message: "每个工具只能添加一个",
  14831. // type: "error",
  14832. // });
  14833. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14834. itemTaskIndex
  14835. ].toolChoose[toolIndex].tool = [];
  14836. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14837. itemTaskIndex
  14838. ].toolChoose[toolIndex].tool.push(i);
  14839. }
  14840. } else {
  14841. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14842. itemTaskIndex
  14843. ].toolChoose[toolIndex].tool.push(i);
  14844. }
  14845. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14846. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14847. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14848. }
  14849. this.$forceUpdate();
  14850. },
  14851. addAskList(index) {
  14852. this.askJson.askJson.splice(index + 1, 0, {
  14853. askstitle: "",
  14854. askItem: 1,
  14855. checkList: [],
  14856. });
  14857. this.askJson.askCount++;
  14858. },
  14859. addTestList(index) {
  14860. this.testJson.testJson.splice(index + 1, 0, {
  14861. teststitle: "",
  14862. testItem: 1,
  14863. checkList: [],
  14864. timuList: [],
  14865. answer: [],
  14866. type: "1",
  14867. });
  14868. this.testJson.testCount++;
  14869. },
  14870. deleteAskList(index) {
  14871. if (
  14872. !this.askJson.askJson[index].askstitle &&
  14873. this.askJson.askJson[index].askItem == 1 &&
  14874. !this.askJson.askJson[index].checkList[0]
  14875. ) {
  14876. this.askJson.askJson.splice(index, 1);
  14877. this.askJson.askCount--;
  14878. } else {
  14879. let _this = this;
  14880. _this
  14881. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14882. confirmButtonText: this.lang.ssConfirm,
  14883. cancelButtonText: this.lang.ssCancel,
  14884. type: "warning",
  14885. })
  14886. .then(() => {
  14887. _this.askJson.askJson.splice(index, 1);
  14888. _this.askJson.askCount--;
  14889. })
  14890. .catch(() => {
  14891. return;
  14892. });
  14893. }
  14894. },
  14895. deleteTestList(index) {
  14896. if (
  14897. !this.testJson.testJson[index].teststitle &&
  14898. this.testJson.testJson[index].testItem == 1 &&
  14899. !this.testJson.testJson[index].checkList[0]
  14900. ) {
  14901. this.testJson.testJson.splice(index, 1);
  14902. this.testJson.testCount--;
  14903. } else {
  14904. let _this = this;
  14905. _this
  14906. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14907. confirmButtonText: this.lang.ssConfirm,
  14908. cancelButtonText: this.lang.ssCancel,
  14909. type: "warning",
  14910. })
  14911. .then(() => {
  14912. _this.testJson.testJson.splice(index, 1);
  14913. _this.testJson.testCount--;
  14914. })
  14915. .catch(() => {
  14916. return;
  14917. });
  14918. }
  14919. },
  14920. askMove(type, index) {
  14921. if (type == 1) {
  14922. if (index > 0) {
  14923. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14924. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14925. this.askJson.askJson[index - 1] = b;
  14926. this.askJson.askJson[index] = a;
  14927. }
  14928. } else {
  14929. if (index < this.askJson.askJson.length - 1) {
  14930. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14931. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14932. this.askJson.askJson[index + 1] = b;
  14933. this.askJson.askJson[index] = a;
  14934. }
  14935. }
  14936. this.$forceUpdate();
  14937. },
  14938. checkMove(type, index, checkIndex) {
  14939. if (type == 1) {
  14940. if (checkIndex > 0) {
  14941. let a = JSON.parse(
  14942. JSON.stringify(
  14943. this.askJson.askJson[index].checkList[checkIndex - 1]
  14944. )
  14945. );
  14946. let b = JSON.parse(
  14947. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14948. );
  14949. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14950. this.askJson.askJson[index].checkList[checkIndex] = a;
  14951. }
  14952. } else {
  14953. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14954. let a = JSON.parse(
  14955. JSON.stringify(
  14956. this.askJson.askJson[index].checkList[checkIndex + 1]
  14957. )
  14958. );
  14959. let b = JSON.parse(
  14960. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14961. );
  14962. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14963. this.askJson.askJson[index].checkList[checkIndex] = a;
  14964. }
  14965. }
  14966. this.$forceUpdate();
  14967. },
  14968. testMove(type, index) {
  14969. if (type == 1) {
  14970. if (index > 0) {
  14971. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14972. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14973. this.testJson.testJson[index - 1] = b;
  14974. this.testJson.testJson[index] = a;
  14975. }
  14976. } else {
  14977. if (index < this.testJson.testJson.length - 1) {
  14978. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14979. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14980. this.testJson.testJson[index + 1] = b;
  14981. this.testJson.testJson[index] = a;
  14982. }
  14983. }
  14984. this.$forceUpdate();
  14985. },
  14986. tcheckMove(type, index, checkIndex) {
  14987. if (type == 1) {
  14988. if (checkIndex > 0) {
  14989. let a = JSON.parse(
  14990. JSON.stringify(
  14991. this.testJson.testJson[index].checkList[checkIndex - 1]
  14992. )
  14993. );
  14994. let b = JSON.parse(
  14995. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14996. );
  14997. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14998. this.testJson.testJson[index].checkList[checkIndex] = a;
  14999. }
  15000. } else {
  15001. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  15002. let a = JSON.parse(
  15003. JSON.stringify(
  15004. this.testJson.testJson[index].checkList[checkIndex + 1]
  15005. )
  15006. );
  15007. let b = JSON.parse(
  15008. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15009. );
  15010. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  15011. this.testJson.testJson[index].checkList[checkIndex] = a;
  15012. }
  15013. }
  15014. this.$forceUpdate();
  15015. },
  15016. addcheckList(json, index) {
  15017. // json.checkList.length++;
  15018. json.checkList.splice(index + 1, 0, "");
  15019. json.askItem++;
  15020. this.$forceUpdate();
  15021. },
  15022. deletecheckList(json, index) {
  15023. // json.checkList.length--;
  15024. json.checkList.splice(index, 1);
  15025. json.askItem--;
  15026. this.$forceUpdate();
  15027. },
  15028. addTcheckList(json, index) {
  15029. // json.checkList.length++;
  15030. json.checkList.splice(index + 1, 0, "");
  15031. json.testItem++;
  15032. this.$forceUpdate();
  15033. },
  15034. deleteTcheckList(json, index) {
  15035. // json.checkList.length--;
  15036. json.checkList.splice(index, 1);
  15037. json.testItem--;
  15038. this.$forceUpdate();
  15039. },
  15040. checkTestType(type, json) {
  15041. json.type = type;
  15042. setTimeout(() => {
  15043. json.answer = [];
  15044. }, 100);
  15045. },
  15046. checkAskType(type, json) {
  15047. json.type = type;
  15048. // json.checkList = [];
  15049. this.$forceUpdate();
  15050. },
  15051. addSelectList(json) {
  15052. json.select.push("");
  15053. json.answer.push("");
  15054. },
  15055. deleteSelectList(json) {
  15056. // json.select.length--;
  15057. // json.answer.length--;
  15058. json.select.splice(json.select.length - 1, 1);
  15059. json.answer.splice(json.answer.length - 1, 1);
  15060. },
  15061. addAsk() {
  15062. if (this.askJson.askTitle === "") {
  15063. this.$message.error(this.lang.ssTitleEmpty);
  15064. return;
  15065. }
  15066. var aj = this.askJson.askJson;
  15067. var b = 1;
  15068. for (var i = 0; i < aj.length; i++) {
  15069. if (aj[i].askstitle === "") {
  15070. var a = 1;
  15071. for (let index = 0; index < aj[i].askItem; index++) {
  15072. const element = aj[i].checkList[index]
  15073. ? aj[i].checkList[index]
  15074. : "";
  15075. if (element != "") {
  15076. b++;
  15077. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15078. return;
  15079. } else {
  15080. a++;
  15081. }
  15082. }
  15083. if (b == 1) {
  15084. this.$message.error(this.lang.ssOneQues);
  15085. return;
  15086. }
  15087. } else if (aj[i].askstitle != "") {
  15088. for (let index = 0; index < aj[i].askItem; index++) {
  15089. const element = aj[i].checkList[index]
  15090. ? aj[i].checkList[index]
  15091. : "";
  15092. var index = 0;
  15093. for (var z = 0; z < aj[i].checkList.length; z++) {
  15094. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15095. if (checkC != "") {
  15096. index++;
  15097. } else {
  15098. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15099. return;
  15100. }
  15101. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15102. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15103. if (checkC == checkC2) {
  15104. this.$message.error(
  15105. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15106. );
  15107. return;
  15108. }
  15109. }
  15110. }
  15111. b++;
  15112. if (index < 2) {
  15113. this.$message.error(this.lang.ssEachQues);
  15114. return;
  15115. }
  15116. }
  15117. }
  15118. }
  15119. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  15120. var elc = el.checkList.filter((element) => {
  15121. return element != "";
  15122. });
  15123. return el.askstitle != "" && elc.length != 0;
  15124. });
  15125. if (!this.dialogVisible4) {
  15126. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15127. this.taskCount
  15128. ].toolChoose[this.toolIndex] = this.askJson;
  15129. }
  15130. this.dialogVisible5 = false;
  15131. if (
  15132. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15133. .toolChoose[this.toolIndex].tool != 4
  15134. ) {
  15135. this.addTools(4, this.taskCount, this.toolIndex);
  15136. }
  15137. },
  15138. addTest() {
  15139. // if (this.testJson.testTitle === "") {
  15140. // this.$message.error("标题不能为空!");
  15141. // return;
  15142. // }
  15143. var aj = this.testJson.testJson;
  15144. var b = 1;
  15145. for (var i = 0; i < aj.length; i++) {
  15146. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  15147. var a = 1;
  15148. for (let index = 0; index < aj[i].testItem; index++) {
  15149. const element = aj[i].checkList[index]
  15150. ? aj[i].checkList[index]
  15151. : "";
  15152. if (element != "") {
  15153. b++;
  15154. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15155. return;
  15156. } else {
  15157. a++;
  15158. }
  15159. }
  15160. if (b == 1) {
  15161. this.$message.error(this.lang.ssOneQues);
  15162. return;
  15163. }
  15164. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15165. for (let index = 0; index < aj[i].testItem; index++) {
  15166. const element = aj[i].checkList[index]
  15167. ? aj[i].checkList[index]
  15168. : "";
  15169. var index = 0;
  15170. for (var z = 0; z < aj[i].checkList.length; z++) {
  15171. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15172. if (checkC != "") {
  15173. index++;
  15174. } else {
  15175. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15176. return;
  15177. }
  15178. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15179. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15180. if (checkC == checkC2) {
  15181. this.$message.error(
  15182. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15183. );
  15184. return;
  15185. }
  15186. }
  15187. }
  15188. b++;
  15189. if (index < 2) {
  15190. this.$message.error(this.lang.ssEachQues);
  15191. return;
  15192. }
  15193. if (
  15194. (aj[i].type == "2" && !aj[i].answer.length) ||
  15195. (aj[i].type == "1" &&
  15196. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15197. (aj[i].answer !== 0 && !aj[i].answer)))
  15198. ) {
  15199. this.$message.error(this.lang.ssCorrectOpt.replace(/\*/g, i + 1));
  15200. return;
  15201. }
  15202. }
  15203. }
  15204. }
  15205. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15206. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15207. var elc = el.checkList.filter((element) => {
  15208. return element != "";
  15209. });
  15210. return (
  15211. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15212. );
  15213. });
  15214. isTestJson.testCount = isTestJson.testJson.length;
  15215. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15216. this.taskCount
  15217. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15218. this.dialogVisibleChoice = false;
  15219. if (
  15220. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15221. .toolChoose[this.toolIndex].tool != 45
  15222. ) {
  15223. this.addTools(45, this.taskCount, this.toolIndex);
  15224. }
  15225. },
  15226. addVideoJson(videoJson) {
  15227. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15228. this.taskCount
  15229. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15230. this.dialogVisibleVideo = false;
  15231. if (
  15232. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15233. .toolChoose[this.toolIndex].tool != 62
  15234. ) {
  15235. this.addTools(62, this.taskCount, this.toolIndex);
  15236. }
  15237. },
  15238. //自动获取剪贴板
  15239. pasteOption() {
  15240. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15241. if (!iframe) {
  15242. this.$message.error(this.lang.ssUseAIQues);
  15243. return;
  15244. }
  15245. let copyData = iframe.contentWindow.copyData;
  15246. if (!copyData || !copyData.selectData.length) {
  15247. this.$message.error(this.lang.ssUseAIQues);
  15248. return;
  15249. }
  15250. let selectData = copyData.selectData;
  15251. for (var i = 0; i < selectData.length; i++) {
  15252. let answer = 0;
  15253. switch (selectData[i].answer[0]) {
  15254. case "A":
  15255. answer = 0;
  15256. break;
  15257. case "B":
  15258. answer = 1;
  15259. break;
  15260. case "C":
  15261. answer = 2;
  15262. break;
  15263. case "D":
  15264. answer = 3;
  15265. break;
  15266. case "E":
  15267. answer = 4;
  15268. break;
  15269. default:
  15270. break;
  15271. }
  15272. this.testJson.testJson.push({
  15273. teststitle: selectData[i].subject,
  15274. testItem: selectData[i].options.length,
  15275. checkList: selectData[i].options,
  15276. timuList: [],
  15277. answer: answer,
  15278. type: "1",
  15279. });
  15280. this.testJson.testCount++;
  15281. }
  15282. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15283. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15284. var elc = el.checkList.filter((element) => {
  15285. return element != "";
  15286. });
  15287. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15288. });
  15289. isTestJson.testCount = isTestJson.testJson.length;
  15290. if (!isTestJson.testCount) {
  15291. return;
  15292. }
  15293. this.testJson = isTestJson;
  15294. this.$forceUpdate();
  15295. },
  15296. pasteTask(taskJson) {
  15297. let stageTasksData = [];
  15298. if (taskJson) {
  15299. stageTasksData = taskJson;
  15300. } else {
  15301. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15302. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15303. if (!iframe && !iframe2) {
  15304. this.$message.error(this.lang.ssUseAI);
  15305. return;
  15306. }
  15307. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15308. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15309. if (
  15310. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15311. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15312. ) {
  15313. this.$message.error(this.lang.ssUseAI);
  15314. return;
  15315. }
  15316. stageTasksData = copyData
  15317. ? copyData.tasksData
  15318. : copyData2
  15319. ? copyData2.tasksData
  15320. : [{ taskName: "", taskDecs: "" }];
  15321. }
  15322. let taskA = [];
  15323. let tasks = stageTasksData;
  15324. for (var j = 0; j < tasks.length; j++) {
  15325. taskA.push({
  15326. task: tasks[j].taskName,
  15327. taskDetail: tasks[j].taskDecs,
  15328. chapterData: [],
  15329. toolText: "",
  15330. toolChoose: [
  15331. {
  15332. tool: [],
  15333. toolDetail: "",
  15334. toolType: 0,
  15335. askCount: 1,
  15336. askTitle: "",
  15337. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15338. },
  15339. ],
  15340. isShowTools: false,
  15341. askCount: 1,
  15342. isFold: 1,
  15343. askTitle: "",
  15344. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15345. checkJson: [{ checkCount: [], checkPerent: [] }],
  15346. homeworkList: [],
  15347. });
  15348. }
  15349. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15350. this.$forceUpdate();
  15351. },
  15352. pasteStage(stageJson) {
  15353. let stageData = [];
  15354. if (stageJson) {
  15355. stageData = stageJson;
  15356. } else {
  15357. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15358. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15359. if (!iframe && !iframe2) {
  15360. this.$message.error(this.lang.ssUseAI);
  15361. return;
  15362. }
  15363. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15364. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15365. if (
  15366. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15367. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15368. ) {
  15369. this.$message.error(this.lang.ssUseAI);
  15370. return;
  15371. }
  15372. stageData = copyData
  15373. ? copyData.stageData
  15374. : copyData2
  15375. ? copyData2.stageData
  15376. : [""];
  15377. }
  15378. let stage = [];
  15379. for (var i = 0; i < stageData.length; i++) {
  15380. stage.push({
  15381. dyName: stageData[i], //单元标题
  15382. chapterInfo: [
  15383. {
  15384. isread: false,
  15385. chapterid: this.guid(),
  15386. title: "",
  15387. courseName: "",
  15388. taskJson: [
  15389. {
  15390. task: "",
  15391. taskDetail: "",
  15392. chapterData: [],
  15393. toolText: "",
  15394. toolChoose: [
  15395. {
  15396. tool: [],
  15397. toolDetail: "",
  15398. toolType: 0,
  15399. askCount: 1,
  15400. askTitle: "",
  15401. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15402. },
  15403. ],
  15404. isShowTools: false,
  15405. askCount: 1,
  15406. isFold: 1,
  15407. askTitle: "",
  15408. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15409. checkJson: [{ checkCount: [], checkPerent: [] }],
  15410. homeworkList: [],
  15411. },
  15412. ],
  15413. itemCount: 1,
  15414. fileList1: [],
  15415. video: [],
  15416. testData: [],
  15417. pData: [],
  15418. templateArray: [],
  15419. },
  15420. ],
  15421. });
  15422. }
  15423. let _this = this;
  15424. if (stageJson) {
  15425. if (!_this.cid) {
  15426. _this.unitJson = stage;
  15427. } else {
  15428. _this.unitIndex = 0;
  15429. _this.unitJson = stage;
  15430. _this.updateWork();
  15431. }
  15432. } else {
  15433. _this
  15434. .$confirm(
  15435. this.lang.ssSmartPasteTemp,
  15436. this.lang.ssTip,
  15437. {
  15438. confirmButtonText: this.lang.ssConfirm,
  15439. cancelButtonText: this.lang.ssCancel,
  15440. type: "warning",
  15441. }
  15442. )
  15443. .then(() => {
  15444. _this.unitIndex = 0;
  15445. _this.unitJson = stage;
  15446. // _this.steps++;
  15447. _this.updateWork();
  15448. })
  15449. .catch(() => {
  15450. return;
  15451. });
  15452. }
  15453. },
  15454. openStageBox() {
  15455. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15456. this.dialogVisibleStageChange = true;
  15457. },
  15458. updateChange() {
  15459. this.$confirm(
  15460. this.lang.ssStageSeqDel,
  15461. this.lang.ssTip,
  15462. {
  15463. confirmButtonText: this.lang.ssConfirm,
  15464. cancelButtonText: this.lang.ssCancel,
  15465. type: "warning",
  15466. }
  15467. )
  15468. .then(() => {
  15469. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15470. this.updateWork();
  15471. this.dialogVisibleStageChange = false;
  15472. })
  15473. .catch(() => {
  15474. return;
  15475. });
  15476. },
  15477. addAnswer() {
  15478. if (this.answerQ == "") {
  15479. this.$message.error(this.lang.ssEnterQuesL);
  15480. return;
  15481. }
  15482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15483. this.taskCount
  15484. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15485. this.dialogVisible8 = false;
  15486. if (
  15487. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15488. .toolChoose[this.toolIndex].tool != 15
  15489. ) {
  15490. this.addTools(15, this.taskCount, this.toolIndex);
  15491. }
  15492. },
  15493. addMp3Answer() {
  15494. if (this.answerQ == "") {
  15495. this.$message.error(this.lang.ssEnterWant);
  15496. return;
  15497. }
  15498. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15499. this.taskCount
  15500. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15501. this.dialogVisibleMp3 = false;
  15502. },
  15503. addRateAnswer() {
  15504. var a = 1;
  15505. for (var i = 0; i < this.rateJson.length; i++) {
  15506. if (this.rateJson[i].value == "") {
  15507. a = 2;
  15508. break;
  15509. }
  15510. }
  15511. if (a == 2) {
  15512. this.$message.error(this.lang.ssFillEvaInfo);
  15513. return;
  15514. }
  15515. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15516. this.taskCount
  15517. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15518. this.dialogVisibleRate = false;
  15519. if (
  15520. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15521. .toolChoose[this.toolIndex].tool != 40
  15522. ) {
  15523. this.addTools(40, this.taskCount, this.toolIndex);
  15524. }
  15525. },
  15526. addSelectAnswer() {
  15527. if (this.selectJson.url == "") {
  15528. this.$message.error(this.lang.ssUploadQues);
  15529. return;
  15530. }
  15531. if (!this.selectJson.select.length) {
  15532. this.$message.error(this.lang.ssAddOpt);
  15533. return;
  15534. }
  15535. if (!this.selectJson.answer.length) {
  15536. this.$message.error(this.lang.ssSetAns);
  15537. return;
  15538. }
  15539. var a = 1;
  15540. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15541. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15542. a = 2;
  15543. }
  15544. }
  15545. if (a == 2) {
  15546. this.$message.error(this.lang.ssSetAns);
  15547. return;
  15548. }
  15549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15550. this.taskCount
  15551. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15552. this.dialogVisibleSelect = false;
  15553. if (
  15554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15555. .toolChoose[this.toolIndex].tool != 41
  15556. ) {
  15557. this.addTools(41, this.taskCount, this.toolIndex);
  15558. }
  15559. },
  15560. nextSelectSteps() {
  15561. if (this.selectJson.url == "") {
  15562. this.$message.error(this.lang.ssUploadQues);
  15563. return;
  15564. }
  15565. if (!this.selectJson.select.length) {
  15566. this.$message.error(this.lang.ssAddOpt);
  15567. return;
  15568. } else {
  15569. for (var z = 0; z < this.selectJson.select.length; z++) {
  15570. let checkC = this.selectJson.select[z];
  15571. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15572. let checkC2 = this.selectJson.select[z2];
  15573. if (checkC == checkC2) {
  15574. this.$message.error(
  15575. this.lang.ssOptDup2.replace(/\*/g, z + 1).replace(/\$/g, z2 + 1)
  15576. );
  15577. return;
  15578. }
  15579. }
  15580. }
  15581. }
  15582. var a = 1;
  15583. for (var i = 0; i < this.selectJson.select.length; i++) {
  15584. if (!this.selectJson.select[i]) {
  15585. a = 2;
  15586. }
  15587. }
  15588. if (a == 2) {
  15589. this.$message.error(this.lang.ssOptEmpty2);
  15590. return;
  15591. }
  15592. this.selectSteps++;
  15593. },
  15594. selectCourseDetail() {
  15595. if (this.cid == "" || this.cid == undefined) {
  15596. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15597. this.isTeacherSee = true;
  15598. }
  15599. console.log(this.lang.ssNewCourse);
  15600. this.selectAllType();
  15601. this.chatid = uuidv4();
  15602. // this.courseTextB = false
  15603. } else {
  15604. this.isOutline = true
  15605. this.isOutline2 = true
  15606. this.cpoteType = 4
  15607. this.cidType = 1;
  15608. let params = {
  15609. cid: this.cid,
  15610. };
  15611. this.ajax
  15612. .get(this.$store.state.api + "select_course_detail", params)
  15613. .then((res) => {
  15614. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15615. this.courseState = res.data[0][0].state;
  15616. for (var j = 0; j < this.unitJson.length; j++) {
  15617. for (
  15618. var k = 0;
  15619. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15620. k++
  15621. ) {
  15622. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15623. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15624. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15625. : [];
  15626. let _chapterData = [];
  15627. for (
  15628. var c = 0;
  15629. c <
  15630. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15631. .length;
  15632. c++
  15633. ) {
  15634. if (
  15635. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15636. ) {
  15637. _chapterData.push(
  15638. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15639. );
  15640. }
  15641. }
  15642. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15643. _chapterData;
  15644. }
  15645. }
  15646. this.$forceUpdate();
  15647. this.courseName = res.data[0][0].title;
  15648. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15649. this.courseText = res.data[0][0].brief;
  15650. this.courseText2 = res.data[0][0].reBrief;
  15651. this.evalua = res.data[0][0].evaId;
  15652. this.cover = JSON.parse(res.data[0][0].cover);
  15653. this.noneBtnImg = this.cover.length >= 1;
  15654. if (res.data[0][0].refile) {
  15655. this.infoData = JSON.parse(res.data[0][0].refile)
  15656. }
  15657. // this.checkboxList =
  15658. // res.data[0][0].course_student.length > 0
  15659. // ? JSON.parse(res.data[0][0].course_student)
  15660. // : [];
  15661. this.checkboxList2 = res.data[0][0].juri
  15662. ? res.data[0][0].juri.split(",")
  15663. : [];
  15664. this.inviteCode = [];
  15665. for (var i = 0; i < res.data[2].length; i++) {
  15666. this.inviteCode.push({
  15667. cid: res.data[2][i].classid,
  15668. ic: res.data[2][i].code,
  15669. });
  15670. }
  15671. this.checkboxList3 = res.data[0][0].course_teacher
  15672. ? res.data[0][0].course_teacher.split(",")
  15673. : [];
  15674. // this.isTeacherSee =
  15675. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15676. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15677. this.myWord = res.data[0][0].template;
  15678. this.templateC.id = "123";
  15679. this.courseUserid = res.data[0][0].userid;
  15680. // if(this.courseUserid == this.userid){
  15681. // this.InviteChange(this.checkboxList2)
  15682. // }
  15683. this.nbOrder = res.data[0][0].ordernumber;
  15684. this.courseTypeId = [];
  15685. for (var i = 0; i < res.data[1].length; i++) {
  15686. this.courseTypeId.push(res.data[1][i].typeid);
  15687. }
  15688. console.log(this.courseTypeId);
  15689. // if (this.timer) clearInterval(this.timer);
  15690. if (this.timer) clearTimeout(this.timer);
  15691. this.timer = null;
  15692. // this.timer = setInterval(() => {
  15693. if(res.data[3].length){
  15694. try {
  15695. this.aiJson = JSON.parse(res.data[3][0].tips);
  15696. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15697. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15698. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15699. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15700. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15701. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15702. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15703. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15704. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15705. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15706. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15707. }
  15708. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15709. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15710. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15711. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15712. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15713. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15714. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15715. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15716. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15717. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15718. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15719. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15720. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15721. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15722. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15723. 讨论:<转文本内容>`
  15724. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15725. this.templateid = res.data[3][0].template;
  15726. this.getTipsTemplateIsDialog()
  15727. }catch(error){
  15728. console.error(error)
  15729. }
  15730. }
  15731. if(res.data[0][0].cpote){
  15732. try {
  15733. this.cpote = JSON.parse(res.data[0][0].cpote);
  15734. }catch(error){
  15735. console.error(error)
  15736. }
  15737. }
  15738. if(res.data[0][0].setting){
  15739. try {
  15740. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15741. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15742. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15743. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15744. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15745. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15746. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15747. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15748. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15749. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15750. 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;
  15751. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15752. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15753. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15754. 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;
  15755. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15756. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15757. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15758. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15759. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15760. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15761. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15762. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15763. this.courseTextBool = true
  15764. }
  15765. // if(!this.teacherCourseText && !this.targetCourseText2){
  15766. // this.isuseT = 1
  15767. // }
  15768. }catch(error){
  15769. console.error(error)
  15770. }
  15771. }
  15772. if(this.courseText){
  15773. this.courseTextB = false
  15774. }
  15775. if(this.teacherCourseText){
  15776. this.teacherCourseTextB = false
  15777. }
  15778. if(this.targetCourseText){
  15779. this.targetCourseTextB = false
  15780. }
  15781. if(this.targetCourseText2){
  15782. this.targetCourseText2B = false
  15783. }
  15784. this.isFileSearch = res.data[0][0].iresearch == 1
  15785. // this.seleteCourseUpdate();
  15786. this.setMan();
  15787. this.selectAllType();
  15788. this.unitJson[
  15789. this.unitIndex
  15790. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15791. // }, 5000);
  15792. this.$forceUpdate();
  15793. setTimeout(() => {
  15794. this.checkEva(this.evalua);
  15795. setTimeout(() => {
  15796. this.checkEva(this.evalua);
  15797. }, 100);
  15798. }, 100);
  15799. })
  15800. .catch((err) => {
  15801. console.error(err);
  15802. });
  15803. }
  15804. if(this.aiId){
  15805. let params = {
  15806. cid: this.aiId,
  15807. };
  15808. this.ajax
  15809. .get(this.$store.state.api + "select_course_detail", params)
  15810. .then((res) => {
  15811. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15812. let fileInfo = []
  15813. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15814. for(var i = 0; i < _unitJson.length; i++){
  15815. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15816. for(var j = 0; j < tasks.length; j++){
  15817. let _infoData = tasks[j].chapterData.filter(el => {
  15818. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15819. })
  15820. if(_infoData.length){
  15821. fileInfo = [...fileInfo, ..._infoData]
  15822. }
  15823. }
  15824. }
  15825. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15826. this.$forceUpdate();
  15827. this.courseName = res.data[0][0].title;
  15828. this.courseText = res.data[0][0].brief;
  15829. this.courseText2 = res.data[0][0].reBrief;
  15830. this.cover = JSON.parse(res.data[0][0].cover);
  15831. this.noneBtnImg = this.cover.length >= 1;
  15832. this.checkboxList2 = res.data[0][0].juri
  15833. ? res.data[0][0].juri.split(",")
  15834. : [];
  15835. this.inviteCode = [];
  15836. for (var i = 0; i < res.data[2].length; i++) {
  15837. this.inviteCode.push({
  15838. cid: res.data[2][i].classid,
  15839. ic: res.data[2][i].code,
  15840. });
  15841. }
  15842. this.checkboxList3 = res.data[0][0].course_teacher
  15843. ? res.data[0][0].course_teacher.split(",")
  15844. : [];
  15845. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15846. this.myWord = res.data[0][0].template;
  15847. this.templateC.id = "123";
  15848. this.courseTypeId = [];
  15849. for (var i = 0; i < res.data[1].length; i++) {
  15850. this.courseTypeId.push(res.data[1][i].typeid);
  15851. }
  15852. console.log(this.courseTypeId);
  15853. if(res.data[3].length){
  15854. try {
  15855. this.aiJson = JSON.parse(res.data[3][0].tips);
  15856. this.templateid = res.data[3][0].template;
  15857. this.getTipsTemplateIsDialog()
  15858. }catch(error){
  15859. console.error(error)
  15860. }
  15861. }
  15862. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15863. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15864. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15865. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15866. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15867. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15868. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15869. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15870. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15871. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15872. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15873. }
  15874. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15875. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15876. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15877. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15878. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15879. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15880. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15881. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15882. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15883. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15884. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15885. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15886. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15887. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15888. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15889. 讨论:<转文本内容>`
  15890. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15891. if(res.data[0][0].cpote){
  15892. try {
  15893. this.cpote = JSON.parse(res.data[0][0].cpote);
  15894. }catch(error){
  15895. console.error(error)
  15896. }
  15897. }
  15898. if(res.data[0][0].setting){
  15899. try {
  15900. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15901. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15902. 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];
  15903. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15904. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15905. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15906. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15907. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15908. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15909. 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];
  15910. 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;
  15911. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15912. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15913. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15914. 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;
  15915. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15916. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15917. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15918. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15919. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15920. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15921. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15922. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15923. this.courseTextBool = true
  15924. }
  15925. // if(!this.teacherCourseText && !this.targetCourseText2){
  15926. // this.isuseT = 1
  15927. // }
  15928. }catch(error){
  15929. console.error(error)
  15930. }
  15931. }
  15932. if(this.teacherInfoData.length){
  15933. this.isuseT = true
  15934. }
  15935. if(this.courseText){
  15936. this.courseTextB = false
  15937. }
  15938. if(this.teacherCourseText){
  15939. this.teacherCourseTextB = false
  15940. }
  15941. if(this.targetCourseText){
  15942. this.targetCourseTextB = false
  15943. }
  15944. if(this.targetCourseText2){
  15945. this.targetCourseText2B = false
  15946. }
  15947. this.setMan();
  15948. this.unitJson[
  15949. this.unitIndex
  15950. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15951. this.$forceUpdate();
  15952. setTimeout(() => {
  15953. this.checkEva(this.evalua);
  15954. setTimeout(() => {
  15955. this.checkEva(this.evalua);
  15956. }, 100);
  15957. }, 100);
  15958. })
  15959. .catch((err) => {
  15960. console.error(err);
  15961. });
  15962. }
  15963. // if(this.cidType != 1 && this.templateid == ''){
  15964. // this.promptShow = true
  15965. // }
  15966. },
  15967. seleteCourseUpdate() {
  15968. let params = {
  15969. cid: this.cid,
  15970. };
  15971. this.ajax
  15972. .get(this.$store.state.api + "select_course_detail", params)
  15973. .then((res) => {
  15974. // console.log(this.unitJson);
  15975. let unitJson = JSON.parse(res.data[0][0].chapters);
  15976. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15977. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15978. let _unitJson = [];
  15979. let _chapAarry = [];
  15980. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15981. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15982. let index = 1;
  15983. let chapindex;
  15984. if (_unitJson2.length > unitJson.length) {
  15985. for (let c = 0; c < _unitJson2.length; c++) {
  15986. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15987. }
  15988. for (let j = 0; j < unitJson.length; j++) {
  15989. let count = 0;
  15990. for (let k = 0; k < _unitJson2.length; k++) {
  15991. if (
  15992. unitJson[j].chapterInfo[0].chapterid ==
  15993. _unitJson2[k].chapterInfo[0].chapterid
  15994. ) {
  15995. count++;
  15996. _chapAarry.splice(
  15997. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15998. 1
  15999. );
  16000. _unitJson.push(unitJson[j]);
  16001. break;
  16002. }
  16003. }
  16004. // if(count === 0){
  16005. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16006. // }
  16007. }
  16008. for (let k = 0; k < _unitJson2.length; k++) {
  16009. if (_unitJson2[k].isUpdate == 1) {
  16010. _chapAarry.splice(
  16011. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16012. 1
  16013. );
  16014. _unitJson.push(_unitJson2[k]);
  16015. }
  16016. }
  16017. console.log(_chapAarry);
  16018. for (let d = 0; d < _unitJson2.length; d++) {
  16019. if (
  16020. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  16021. ) {
  16022. if (_unitIndex == d) {
  16023. index = 2;
  16024. }
  16025. chapindex = d;
  16026. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16027. }
  16028. }
  16029. } else {
  16030. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  16031. }
  16032. for (let i = 0; i < unitJson.length; i++) {
  16033. if (
  16034. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  16035. _unitJson[i].chapterInfo[0].chapterid !=
  16036. unitJson[i].chapterInfo[0].chapterid
  16037. ) {
  16038. if (i == _unitJson.length - 1) {
  16039. // this.unitIndex++
  16040. _unitIndex2++;
  16041. }
  16042. _unitJson.splice(i, 0, unitJson[i]);
  16043. } else if (i > _unitJson.length - 1) {
  16044. _unitJson.push(unitJson[i]);
  16045. } else if (
  16046. _unitJson[i].chapterInfo[0].chapterid ==
  16047. unitJson[i].chapterInfo[0].chapterid
  16048. ) {
  16049. _unitJson[i] = unitJson[i];
  16050. }
  16051. // if (i == _unitIndex) {
  16052. // continue;
  16053. // } else
  16054. }
  16055. if (_chapAarry.length && index != 2) {
  16056. if (chapindex < _unitIndex) {
  16057. this.isDelete = 2;
  16058. // this.unitIndex--;
  16059. _unitIndex2--;
  16060. } else if (
  16061. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  16062. _unitJson[_unitIndex].chapterInfo[0].chapterid
  16063. ) {
  16064. this.isDelete = 2;
  16065. for (let n = 0; n < _unitJson.length; n++) {
  16066. if (
  16067. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  16068. _unitJson[n].chapterInfo[0].chapterid
  16069. ) {
  16070. // this.unitIndex = n;
  16071. _unitIndex2 = n;
  16072. _unitJson[n] = _unitJson2[_unitIndex];
  16073. break;
  16074. }
  16075. }
  16076. }
  16077. } else if (index != 2) {
  16078. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  16079. _unitJson2[_unitIndex];
  16080. for (
  16081. var ci = 0;
  16082. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  16083. ci++
  16084. ) {
  16085. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  16086. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  16087. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16088. .toolChoose
  16089. : [];
  16090. let _chapterData = [];
  16091. for (
  16092. var c = 0;
  16093. c <
  16094. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  16095. .length;
  16096. c++
  16097. ) {
  16098. if (
  16099. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16100. .chapterData[c]
  16101. ) {
  16102. _chapterData.push(
  16103. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16104. .chapterData[c]
  16105. );
  16106. }
  16107. }
  16108. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  16109. _chapterData;
  16110. }
  16111. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  16112. }
  16113. if (index == 1) {
  16114. this.unitJson = _unitJson;
  16115. this.$forceUpdate();
  16116. setTimeout(() => {
  16117. if (this.unitIndex != _unitIndex2) {
  16118. this.isDelete = 2;
  16119. this.unitIndex = _unitIndex2;
  16120. }
  16121. }, 0);
  16122. this.timer = setTimeout(() => {
  16123. this.seleteCourseUpdate();
  16124. }, 5000);
  16125. } else if (index == 2) {
  16126. let _this = this;
  16127. _this
  16128. .$confirm(
  16129. _this.lang.ssStageDeletedRestore,
  16130. _this.lang.ssTip,
  16131. {
  16132. confirmButtonText: _this.lang.ssNeed,
  16133. cancelButtonText: _this.lang.ssCancel,
  16134. type: "warning",
  16135. }
  16136. )
  16137. .then(() => {
  16138. if (_this.time()) {
  16139. _this.restoreWork(
  16140. _chapAarry[0],
  16141. _unitJson,
  16142. chapindex,
  16143. _unitJson2,
  16144. _unitIndex2
  16145. );
  16146. }
  16147. })
  16148. .catch(() => {
  16149. _this.unitJson = _unitJson;
  16150. _this.$forceUpdate();
  16151. setTimeout(() => {
  16152. if (this.unitIndex != _unitIndex2) {
  16153. this.isDelete = 2;
  16154. this.unitIndex = _unitIndex2;
  16155. }
  16156. }, 0);
  16157. _this.timer = setTimeout(() => {
  16158. _this.seleteCourseUpdate();
  16159. }, 5000);
  16160. });
  16161. }
  16162. // 在复制操作之前记录滚动位置
  16163. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16164. // 执行复制操作
  16165. // 复制操作完成后恢复滚动位置
  16166. this.$nextTick(() => {
  16167. if (this.$refs.scrollContainer) {
  16168. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16169. }
  16170. });
  16171. })
  16172. .catch((err) => {
  16173. console.error(err);
  16174. });
  16175. },
  16176. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16177. let params = [
  16178. {
  16179. cid: this.cid,
  16180. chapters: JSON.stringify(this.unitJson),
  16181. uid: this.userid,
  16182. chapid: chapid,
  16183. },
  16184. ];
  16185. this.ajax
  16186. .post(this.$store.state.api + "restoreWork", params)
  16187. .then((res) => {
  16188. this.$message({
  16189. message: "恢复成功",
  16190. type: "success",
  16191. });
  16192. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16193. this.unitJson = unitJson;
  16194. this.$forceUpdate();
  16195. setTimeout(() => {
  16196. if (this.unitIndex != unitIndex2) {
  16197. this.isDelete = 2;
  16198. this.unitIndex = unitIndex2;
  16199. }
  16200. }, 0);
  16201. this.timer = setTimeout(() => {
  16202. this.seleteCourseUpdate();
  16203. }, 5000);
  16204. })
  16205. .catch((err) => {
  16206. this.$message.error(this.lang.ssNetPoor);
  16207. console.error(err);
  16208. });
  16209. },
  16210. getTypeName() {
  16211. console.log(this.courseTypeId);
  16212. this.$forceUpdate();
  16213. },
  16214. selectAllType() {
  16215. let params = {
  16216. org: this.org && this.org != "" ? this.org : "",
  16217. oid: this.oid && this.oid != "" ? this.oid : "",
  16218. stand: this.lang.lang
  16219. };
  16220. this.ajax
  16221. .get(this.$store.state.api + "selectAllTypeStand", params)
  16222. .then((res) => {
  16223. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16224. res.data[0] = [...res.data[0], ...res.data[4]];
  16225. }
  16226. this.CourseType = res.data;
  16227. this.CourseType2 = [
  16228. { name: this.lang.ssZhijian, id: [] },
  16229. { name: this.lang.ssZhixing, id: [] },
  16230. { name: this.lang.ssIntelli, id: [] },
  16231. ];
  16232. for (var cti = 0; cti < res.data[0].length; cti++) {
  16233. if (
  16234. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16235. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16236. ) {
  16237. this.CourseType2[0].id.push(res.data[0][cti].id);
  16238. } else if (
  16239. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16240. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16241. ) {
  16242. this.CourseType2[1].id.push(res.data[0][cti].id);
  16243. } else if (
  16244. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16245. ) {
  16246. this.CourseType2[2].id.push(res.data[0][cti].id);
  16247. }
  16248. if (
  16249. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16250. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16251. ) {
  16252. res.data[0][cti].name = this.lang.ssGradeType;
  16253. } else if (
  16254. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16255. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16256. ) {
  16257. res.data[0][cti].name = this.lang.ssSubjectCategory;
  16258. } else if (
  16259. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16260. ) {
  16261. res.data[0][cti].name = this.lang.ssThemeType;
  16262. }
  16263. }
  16264. let _courseTypeId = [];
  16265. for (var i = 0; i < res.data[0].length; i++) {
  16266. if (!this.cid) {
  16267. this.courseTypeId[res.data[0][i].id] = [];
  16268. }
  16269. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16270. // }
  16271. this.CourseTypeJson[res.data[0][i].id] = [];
  16272. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16273. if (res.data[0][i].name == this.lang.ssColumn) {
  16274. this.CourseType[0][i].name = this.lang.ssThemeType;
  16275. }
  16276. }
  16277. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16278. for (var j = 0; j < res.data[1].length; j++) {
  16279. if (
  16280. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16281. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16282. ) {
  16283. _courseTypeId.push(res.data[1][j].id);
  16284. }
  16285. if (res.data[0][i].id == res.data[1][j].pid) {
  16286. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16287. }
  16288. }
  16289. } else {
  16290. if (res.data[2].length > 0) {
  16291. for (var j = 0; j < res.data[2].length; j++) {
  16292. if (
  16293. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16294. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16295. ) {
  16296. _courseTypeId.push(res.data[2][j].id);
  16297. }
  16298. if (res.data[0][i].id == res.data[2][j].pid) {
  16299. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16300. }
  16301. }
  16302. }
  16303. if (res.data[3].length > 0) {
  16304. for (var j = 0; j < res.data[3].length; j++) {
  16305. if (
  16306. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16307. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16308. ) {
  16309. _courseTypeId.push(res.data[3][j].id);
  16310. }
  16311. if (res.data[0][i].id == res.data[3][j].pid) {
  16312. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16313. }
  16314. }
  16315. }
  16316. }
  16317. }
  16318. if (this.CourseType[0] && this.CourseType[0].length && this.lang.lang == 'com') {
  16319. this.CourseType[0] = this.CourseType[0].filter(item => item.id != '34629bcc-d02f-11ec-8c78-005056b86db5');
  16320. }
  16321. this.courseTypeId = _courseTypeId;
  16322. this.typeC1 = this.getTypeC(2)
  16323. this.typeC2 = this.getTypeC(1)
  16324. })
  16325. .catch((err) => {
  16326. console.error(err);
  16327. });
  16328. },
  16329. selectType() {
  16330. this.ajax
  16331. .get(this.$store.state.api + "selectType")
  16332. .then((res) => {
  16333. this.CourseType = res.data;
  16334. for (var i = 0; i < res.data[0].length; i++) {
  16335. if (!this.cid) {
  16336. this.courseTypeId[res.data[0][i].id] = "";
  16337. }
  16338. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16339. if (res.data[0][i].name == this.lang.ssColumn) {
  16340. this.CourseType[0][i].name = this.lang.ssThemeType;
  16341. }
  16342. }
  16343. for (var j = 0; j < res.data[1].length; j++) {
  16344. if (res.data[0][i].id == res.data[1][j].pid) {
  16345. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16346. this.CourseTypeJson[res.data[0][i].id] = [];
  16347. }
  16348. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16349. }
  16350. }
  16351. }
  16352. this.selectTypeByOid();
  16353. this.selectTypeByOrg();
  16354. })
  16355. .catch((err) => {
  16356. console.error(err);
  16357. });
  16358. },
  16359. selectTypeByOid() {
  16360. let params = {
  16361. oid: this.oid,
  16362. };
  16363. this.ajax
  16364. .get(this.$store.state.api + "selectTypeByOid", params)
  16365. .then((res) => {
  16366. for (var i = 0; i < res.data[0].length; i++) {
  16367. for (var j = 0; j < res.data[1].length; j++) {
  16368. if (res.data[0][i].id == res.data[1][j].pid) {
  16369. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16370. this.CourseTypeJson[res.data[0][i].id] = [];
  16371. }
  16372. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16373. }
  16374. }
  16375. }
  16376. })
  16377. .catch((err) => {
  16378. console.error(err);
  16379. });
  16380. },
  16381. selectTypeByOrg() {
  16382. let params = {
  16383. oid: this.org,
  16384. };
  16385. this.ajax
  16386. .get(this.$store.state.api + "selectTypeByOrg", params)
  16387. .then((res) => {
  16388. for (var i = 0; i < res.data[0].length; i++) {
  16389. for (var j = 0; j < res.data[1].length; j++) {
  16390. if (res.data[0][i].id == res.data[1][j].pid) {
  16391. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16392. this.CourseTypeJson[res.data[0][i].id] = [];
  16393. }
  16394. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16395. }
  16396. }
  16397. }
  16398. this.$forceUpdate();
  16399. })
  16400. .catch((err) => {
  16401. console.error(err);
  16402. });
  16403. },
  16404. OtherMb(type, task) {
  16405. if (task === 0 || task) {
  16406. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16407. task
  16408. ].isEvaFold = true;
  16409. }
  16410. this.typeMode = type;
  16411. setTimeout(() => {
  16412. this.checkEva(this.checkId);
  16413. setTimeout(() => {
  16414. this.checkEva(this.checkId);
  16415. }, 100);
  16416. }, 100);
  16417. },
  16418. openMember() {
  16419. this.searchTN = "";
  16420. this.getTeacher();
  16421. this.dialogVisibleMember = true;
  16422. },
  16423. checkEva(id, type) {
  16424. this.dialogVisiblemb = false;
  16425. this.selectEva();
  16426. if (this.evalua != id && type == 2) {
  16427. this.$message.success(this.lang.ssImportOk);
  16428. setTimeout(() => {
  16429. this.checkEva(id);
  16430. }, 100);
  16431. }
  16432. this.evalua = id;
  16433. this.checkId = id;
  16434. if (this.evalua != "") {
  16435. for (var i = 0; i < this.evaJuri.length; i++) {
  16436. if (this.evalua == this.evaJuri[i].id) {
  16437. this.eTitle = this.evaJuri[i].title;
  16438. this.eJson = JSON.parse(this.evaJuri[i].content);
  16439. }
  16440. }
  16441. this.data.data = [];
  16442. this.$forceUpdate();
  16443. setTimeout(() => {
  16444. this.setMindData();
  16445. }, 1000);
  16446. }
  16447. },
  16448. deleteEva() {
  16449. let _this = this;
  16450. if (_this.evalua == "") {
  16451. this.$message.warning(this.lang.ssClearAgain);
  16452. return;
  16453. }
  16454. _this
  16455. .$confirm(this.lang.ssDelTarget, this.lang.ssTip, {
  16456. confirmButtonText: this.lang.ssConfirm,
  16457. cancelButtonText: this.lang.ssCancel,
  16458. type: "warning",
  16459. })
  16460. .then(() => {
  16461. _this.evalua = "";
  16462. _this.checkId = "";
  16463. _this.eTitle = "";
  16464. let _unitJson = _this.unitJson;
  16465. for (var i = 0; i < _unitJson.length; i++) {
  16466. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16467. for (var j = 0; j < _task.length; j++) {
  16468. let _eList = _task[j].eList;
  16469. for (var k = 0; k < _eList.length; k++) {
  16470. delete _eList[k].target;
  16471. }
  16472. }
  16473. }
  16474. _this.$forceUpdate();
  16475. if (_this.cid) {
  16476. _this.updateWork();
  16477. }
  16478. })
  16479. .catch(() => {
  16480. return;
  16481. });
  16482. },
  16483. selectEva() {
  16484. let params = {
  16485. oid: this.oid,
  16486. };
  16487. this.ajax
  16488. .get(this.$store.state.api + "selectAllEvaluation", params)
  16489. .then((res) => {
  16490. this.evaJuri = res.data[0];
  16491. // 在复制操作之前记录滚动位置
  16492. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16493. // 执行复制操作
  16494. // 复制操作完成后恢复滚动位置
  16495. this.$nextTick(() => {
  16496. if (this.$refs.scrollContainer) {
  16497. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16498. }
  16499. });
  16500. })
  16501. .catch((err) => {
  16502. console.error(err);
  16503. });
  16504. },
  16505. setMindData() {
  16506. let targetArray = [];
  16507. this.data.data = [];
  16508. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16509. let _eJson = Object.keys(this.eJson);
  16510. let _e = this.eJson;
  16511. for (let i = 0; i < _eJson.length; i++) {
  16512. let element = _e[_eJson[i]];
  16513. this.data.data.push({
  16514. id: element.id,
  16515. parentid: "root",
  16516. topic: element.name,
  16517. });
  16518. // targetArray.push({
  16519. // id: element.id,
  16520. // parentid: "root",
  16521. // name: element.name,
  16522. // });
  16523. targetArray.push({
  16524. value: element.name,
  16525. label: element.name,
  16526. children: [],
  16527. });
  16528. let _eJsonc = Object.keys(element.child);
  16529. let _e2 = element.child;
  16530. for (let j = 0; j < _eJsonc.length; j++) {
  16531. let _ec = _e2[_eJsonc[j]];
  16532. this.data.data.push({
  16533. id: _ec.id,
  16534. parentid: element.id,
  16535. topic: _ec.name,
  16536. });
  16537. // targetArray.push({
  16538. // id: _ec.id,
  16539. // parentid: element.id,
  16540. // name: _ec.name,
  16541. // });
  16542. targetArray[i].children.push({
  16543. value: _ec.name,
  16544. label: _ec.name,
  16545. children: [],
  16546. });
  16547. let _eJsonz = Object.keys(_ec.child);
  16548. let _e3 = _ec.child;
  16549. for (let z = 0; z < _eJsonz.length; z++) {
  16550. let _ez = _e3[_eJsonz[z]];
  16551. this.data.data.push({
  16552. id: _ez.id,
  16553. parentid: _ec.id,
  16554. topic: _ez.name,
  16555. });
  16556. // targetArray.push({
  16557. // id: _ez.id,
  16558. // parentid: _ec.id,
  16559. // name: _ez.name,
  16560. // });
  16561. targetArray[i].children[j].children.push({
  16562. value: _ez.name,
  16563. label: _ez.name,
  16564. });
  16565. }
  16566. }
  16567. }
  16568. this.targetArray = targetArray;
  16569. this.$forceUpdate();
  16570. },
  16571. /*添加评价 */
  16572. addEList(index, tIndex) {
  16573. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16574. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16575. value: "",
  16576. detail: "",
  16577. score: 5,
  16578. isai: "1",
  16579. })
  16580. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16581. { value: "", detail: "", score: 5,isai: "1", },
  16582. ]);
  16583. this.$forceUpdate();
  16584. },
  16585. openEList(index, tIndex) {
  16586. this.evaIndex = index;
  16587. this.evatIndex = tIndex;
  16588. this.evaBoxDialog = true;
  16589. },
  16590. addCET(index, tIndex) {
  16591. this.cetIndex = index;
  16592. this.cettIndex = tIndex;
  16593. this.selectAllType1();
  16594. },
  16595. addCETemplate() {
  16596. var array =
  16597. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16598. .eList;
  16599. let params = [
  16600. {
  16601. uid: this.userid,
  16602. n: this.templateName,
  16603. json: JSON.stringify(array),
  16604. t: 1,
  16605. oid: this.oid,
  16606. },
  16607. ];
  16608. this.ajax
  16609. .post(this.$store.state.api + "addCETShare", params)
  16610. .then((res) => {
  16611. this.addTypeByCET(res.data[0][0].id);
  16612. })
  16613. .catch((err) => {
  16614. this.$message.error(this.lang.ssNetPoor);
  16615. console.error(err);
  16616. });
  16617. },
  16618. addTypeByCET(id) {
  16619. if (this.setTypeJson.two == "") {
  16620. this.$message.warning(this.lang.ssSelSecAdd);
  16621. return;
  16622. }
  16623. let params = {
  16624. cid: id,
  16625. };
  16626. this.ajax
  16627. .get(this.$store.state.api + "deleteCETLabel", params)
  16628. .then((res) => {
  16629. for (var i = 0; i < 2; i++) {
  16630. let tid = "";
  16631. if (i == 0) {
  16632. tid = this.setTypeJson.one;
  16633. } else {
  16634. tid = this.setTypeJson.two;
  16635. }
  16636. let params = [
  16637. {
  16638. cid: id,
  16639. tid: tid,
  16640. uid: this.userid,
  16641. },
  16642. ];
  16643. this.ajax
  16644. .post(this.$store.state.api + "addCETLabel", params)
  16645. .then((res) => {
  16646. this.$message({
  16647. message: this.lang.ssAddOk,
  16648. type: "success",
  16649. });
  16650. this.close();
  16651. })
  16652. .catch((err) => {
  16653. this.$message.error(this.lang.ssNetPoor);
  16654. console.error(err);
  16655. });
  16656. }
  16657. })
  16658. .catch((err) => {
  16659. this.$message.error(this.lang.ssNetPoor);
  16660. console.error(err);
  16661. });
  16662. },
  16663. updateEvaJson(array) {
  16664. array = array.filter((item) => {
  16665. item.isai = "1"
  16666. return item;
  16667. });
  16668. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16669. this.evatIndex
  16670. ].eList = array;
  16671. },
  16672. forceUpdate() {
  16673. this.$forceUpdate();
  16674. },
  16675. forceUpdate2() {
  16676. setTimeout(() => {
  16677. this.courseText += "*0*%*";
  16678. setTimeout(() => {
  16679. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16680. }, 0);
  16681. }, 100);
  16682. this.$forceUpdate();
  16683. },
  16684. deletEList(index, tIndex, eIndex) {
  16685. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16686. eIndex,
  16687. 1
  16688. );
  16689. this.$forceUpdate();
  16690. },
  16691. getChoosePic(t) {
  16692. this.chooseType = t;
  16693. this.getAllBanner();
  16694. },
  16695. getAllBanner() {
  16696. this.sysPicVisible = true;
  16697. let params = {
  16698. t: this.chooseType,
  16699. };
  16700. this.ajax
  16701. .get(this.$store.state.api + "selectAllBanner", params)
  16702. .then((res) => {
  16703. this.sysPic = res.data[0];
  16704. })
  16705. .catch((err) => {
  16706. console.error(err);
  16707. });
  16708. },
  16709. // getClass() {
  16710. // let params = {
  16711. // oid: this.oid,
  16712. // };
  16713. // this.ajax
  16714. // .get(this.$store.state.api + "selectClassBySchool", params)
  16715. // .then((res) => {
  16716. // this.classJuri = res.data[0];
  16717. // })
  16718. // .catch((err) => {
  16719. // console.error(err);
  16720. // });
  16721. // },
  16722. deleteSysPic() {
  16723. this.cover = [];
  16724. this.isSysPic = false;
  16725. this.isSysPic2 = false;
  16726. },
  16727. deleteSelectPic() {
  16728. this.selectJson.url = "";
  16729. },
  16730. setEListStar() {
  16731. this.$forceUpdate();
  16732. },
  16733. deletRateList(i) {
  16734. this.rateJson.splice(i, 1);
  16735. },
  16736. addRateList() {
  16737. this.rateJson.push({ detail: "", score: 5, value: "" });
  16738. },
  16739. addSt() {
  16740. this.sentenceList.push({
  16741. sentenceTitle: "",
  16742. addSentence: [],
  16743. rightAnswer: [],
  16744. });
  16745. },
  16746. addSen(i) {
  16747. if (!this.sentenceList[i].sentenceTitle) {
  16748. this.$message.error(this.lang.ssFillCard);
  16749. return;
  16750. }
  16751. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16752. this.$message.error(this.lang.ssCardOver10);
  16753. return;
  16754. }
  16755. if (
  16756. this.sentenceList[i].addSentence.indexOf(
  16757. this.sentenceList[i].sentenceTitle
  16758. ) !== -1
  16759. ) {
  16760. this.$message.error(this.lang.ssNoDupCard);
  16761. return;
  16762. }
  16763. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16764. // this.isPushTitleList.push(this.sentenceTitle);
  16765. this.sentenceList[i].sentenceTitle = "";
  16766. },
  16767. setRightAnswer(s, i, j) {
  16768. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16769. this.sentenceList[i].rightAnswer.push(s);
  16770. }
  16771. },
  16772. returnCard(r, i, j) {
  16773. this.sentenceList[i].rightAnswer.splice(j, 1);
  16774. },
  16775. addSentenceTool() {
  16776. for (var i = 0; i < this.sentenceList.length; i++) {
  16777. if (this.sentenceList[i].rightAnswer.length == 0) {
  16778. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16779. return;
  16780. }
  16781. if (
  16782. this.sentenceList[i].addSentence.length !=
  16783. this.sentenceList[i].rightAnswer.length
  16784. ) {
  16785. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16786. return;
  16787. }
  16788. }
  16789. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16790. this.taskCount
  16791. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16792. this.sentenceList = [
  16793. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16794. ];
  16795. this.dialogVisibleSentence = false;
  16796. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16797. // itemTaskIndex
  16798. // ].toolChoose[toolIndex].tool = [];
  16799. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16800. // itemTaskIndex
  16801. // ].toolChoose[toolIndex].tool.push(i);
  16802. if (
  16803. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16804. .toolChoose[this.toolIndex].tool != 47
  16805. ) {
  16806. this.addTools(47, this.taskCount, this.toolIndex);
  16807. }
  16808. },
  16809. addTableJson() {
  16810. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16811. // this.$message.error("请将信息填写完整!");
  16812. // return;
  16813. // }
  16814. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16815. this.taskCount
  16816. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16817. // this.tableJson = [{ text: "" }];
  16818. // this.dialogVisibleTable = false;
  16819. this.$message.success(this.lang.ssUploadSucc);
  16820. if (
  16821. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16822. .toolChoose[this.toolIndex].tool != 48
  16823. ) {
  16824. this.addTools(48, this.taskCount, this.toolIndex);
  16825. }
  16826. },
  16827. addWordJson() {
  16828. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16829. this.taskCount
  16830. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16831. // this.wordJson = [{ text: "" }];
  16832. // this.dialogVisibleWord = false;
  16833. this.$message.success(this.lang.ssUploadSucc);
  16834. if (
  16835. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16836. .toolChoose[this.toolIndex].tool != 52
  16837. ) {
  16838. this.addTools(52, this.taskCount, this.toolIndex);
  16839. }
  16840. },
  16841. addMoreUpload() {
  16842. if (this.uploadJson.length == 0) {
  16843. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16844. this.taskCount
  16845. ].toolChoose[this.toolIndex].uploadJson = [];
  16846. } else {
  16847. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16848. this.taskCount
  16849. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16850. }
  16851. this.uploadJson = [];
  16852. this.dialogVisibleMoreUpload = false;
  16853. if (
  16854. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16855. .toolChoose[this.toolIndex].tool != 50
  16856. ) {
  16857. this.addTools(50, this.taskCount, this.toolIndex);
  16858. }
  16859. },
  16860. addPreTime() {
  16861. if (this.preTime == 0) {
  16862. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16863. this.taskCount
  16864. ].toolChoose[this.toolIndex].preTime = 0;
  16865. } else {
  16866. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16867. this.taskCount
  16868. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16869. }
  16870. this.preTime = 0;
  16871. this.dialogVisiblePreTime = false;
  16872. if (
  16873. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16874. .toolChoose[this.toolIndex].tool != 10
  16875. ) {
  16876. this.addTools(10, this.taskCount, this.toolIndex);
  16877. }
  16878. },
  16879. goToTask(i) {
  16880. this.toolIndexType = "";
  16881. if (this.isClickColor == i + 1) {
  16882. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16883. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16884. // } else {
  16885. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16886. i
  16887. ].toolOpen = true;
  16888. // }
  16889. this.$forceUpdate();
  16890. return;
  16891. }
  16892. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16893. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16894. // } else {
  16895. document.querySelectorAll(".basic_box")[0].scrollTop =
  16896. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16897. this.isClickColor = i + 1;
  16898. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16899. // }
  16900. this.$forceUpdate();
  16901. },
  16902. taskScroll(){
  16903. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16904. const sections = document.querySelectorAll('.taskBorder');
  16905. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16906. sections.forEach((section, index) => {
  16907. const offsetTop = section.offsetTop;
  16908. const offsetHeight = section.offsetHeight;
  16909. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16910. this.isClickColor = index +1;
  16911. }
  16912. });
  16913. },
  16914. taskOpen(i, stageIndex) {
  16915. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16916. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16917. } else {
  16918. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16919. }
  16920. this.updateWork3(stageIndex);
  16921. this.$forceUpdate();
  16922. },
  16923. goToTask2(i, stage) {
  16924. this.toolIndexType = "";
  16925. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16926. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16927. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16928. // } else {
  16929. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16930. i
  16931. ].toolOpen = true;
  16932. // }
  16933. this.$forceUpdate();
  16934. return;
  16935. }
  16936. if (this.unitIndex != stage) {
  16937. if (this.panUnitJson() == 2) {
  16938. return;
  16939. }
  16940. this.unitSet(stage);
  16941. }
  16942. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16943. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16944. // } else {
  16945. document.querySelectorAll(".basic_box")[0].scrollTop =
  16946. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16947. this.isClickColor = i + 1;
  16948. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16949. // }
  16950. this.$forceUpdate();
  16951. },
  16952. taskMove(type, index) {
  16953. this.$confirm(
  16954. this.lang.ssSwitchTaskDel,
  16955. this.lang.ssTip,
  16956. {
  16957. confirmButtonText: this.lang.ssConfirm,
  16958. cancelButtonText: this.lang.ssCancel,
  16959. type: "warning",
  16960. }
  16961. )
  16962. .then(() => {
  16963. if (type == 1) {
  16964. if (index > 0) {
  16965. let a = JSON.parse(
  16966. JSON.stringify(
  16967. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16968. index - 1
  16969. ]
  16970. )
  16971. );
  16972. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16973. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16974. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16975. }
  16976. } else {
  16977. if (
  16978. index <
  16979. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16980. ) {
  16981. let a = JSON.parse(
  16982. JSON.stringify(
  16983. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16984. index + 1
  16985. ]
  16986. )
  16987. );
  16988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16989. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16990. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16991. }
  16992. }
  16993. this.$forceUpdate();
  16994. })
  16995. .catch(() => {
  16996. return;
  16997. });
  16998. },
  16999. stageMove(type, index) {
  17000. if (type == 1) {
  17001. if (index > 0) {
  17002. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  17003. let acid = JSON.parse(
  17004. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  17005. );
  17006. let bcid = JSON.parse(
  17007. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17008. );
  17009. this.unitJson3[index - 1] = this.unitJson3[index];
  17010. this.unitJson3[index] = a;
  17011. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  17012. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17013. }
  17014. } else {
  17015. if (index < this.unitJson3.length - 1) {
  17016. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  17017. let acid = JSON.parse(
  17018. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  17019. );
  17020. let bcid = JSON.parse(
  17021. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17022. );
  17023. this.unitJson3[index + 1] = this.unitJson3[index];
  17024. this.unitJson3[index] = a;
  17025. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  17026. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17027. }
  17028. }
  17029. this.$forceUpdate();
  17030. },
  17031. addGroup(i) {
  17032. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  17033. this.groupJson.group.push({
  17034. name: this.lang.ssGroup.replace(/\*/g, this.groupJson.group.length + 1),
  17035. });
  17036. },
  17037. deleteGroup(i) {
  17038. this.groupJson.group.splice(i, 1);
  17039. },
  17040. numberPan() {
  17041. if (
  17042. /[^\d]/.test(this.groupJson.number) ||
  17043. this.groupJson.number < 2 ||
  17044. this.groupJson.number > 10
  17045. ) {
  17046. this.$message.error(this.lang.ssEnterNum);
  17047. this.groupJson.number = "";
  17048. }
  17049. },
  17050. numberPanJie() {
  17051. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  17052. this.$message.error(this.lang.ssInputNum1)
  17053. this.courseJie = 1
  17054. }
  17055. },
  17056. numberPanTime() {
  17057. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  17058. this.$message.error(this.lang.ssInputNum1)
  17059. this.courseTime = 1
  17060. }
  17061. },
  17062. addGroupJson() {
  17063. for (var i = 0; i < this.groupJson.group.length; i++) {
  17064. if (!this.groupJson.group[i].name) {
  17065. this.$message.error(this.lang.ssFillInfo);
  17066. return;
  17067. }
  17068. }
  17069. if (!this.groupJson.number) {
  17070. this.$message.error(this.lang.ssFillInfo);
  17071. return;
  17072. }
  17073. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17074. this.taskCount
  17075. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  17076. JSON.stringify(this.groupJson)
  17077. );
  17078. this.dialogVisibleGroup = false;
  17079. this.groupJson = {};
  17080. if (
  17081. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17082. .toolChoose[this.toolIndex].tool != 49
  17083. ) {
  17084. this.addTools(49, this.taskCount, this.toolIndex);
  17085. }
  17086. },
  17087. updateTime(preTime) {
  17088. this.preTime = preTime;
  17089. },
  17090. InviteChange(val) {
  17091. console.log(val);
  17092. let _check = [];
  17093. let _check2 = [];
  17094. for (var i = 0; i < this.grade2.length; i++) {
  17095. var gid = this.grade2[i].id;
  17096. _check.push(gid);
  17097. }
  17098. for (var i = 0; i < this.checkboxList2.length; i++) {
  17099. var _id = this.checkboxList2[i];
  17100. if (_check.indexOf(_id) !== -1) {
  17101. _check2.push(_id);
  17102. }
  17103. }
  17104. this.checkAll = _check2.length === _check.length;
  17105. return;
  17106. // let array = JSON.parse(JSON.stringify(val));
  17107. // this.inviteCode = this.inviteCode.filter((el) => {
  17108. // if (val.indexOf(el.cid) != -1) {
  17109. // array.splice(array.indexOf(el.cid), 1);
  17110. // return el;
  17111. // }
  17112. // });
  17113. // for (var i = 0; i < array.length; i++) {
  17114. // this.getInviteCode(array[i]);
  17115. // }
  17116. },
  17117. InviteChange2(val) {
  17118. console.log(val);
  17119. let _check = [];
  17120. let _check2 = [];
  17121. for (var i = 0; i < this.teacherJuri.length; i++) {
  17122. var gid = this.teacherJuri[i].userid;
  17123. _check.push(gid);
  17124. }
  17125. for (var i = 0; i < this.checkboxList3.length; i++) {
  17126. var _id = this.checkboxList3[i];
  17127. if (_check.indexOf(_id) !== -1) {
  17128. _check2.push(_id);
  17129. }
  17130. }
  17131. this.checkAll2 = _check2.length === _check.length;
  17132. this.setMan();
  17133. return;
  17134. // let array = JSON.parse(JSON.stringify(val));
  17135. // this.inviteCode = this.inviteCode.filter((el) => {
  17136. // if (val.indexOf(el.cid) != -1) {
  17137. // array.splice(array.indexOf(el.cid), 1);
  17138. // return el;
  17139. // }
  17140. // });
  17141. // for (var i = 0; i < array.length; i++) {
  17142. // this.getInviteCode(array[i]);
  17143. // }
  17144. },
  17145. handleCheckAllChange(val) {
  17146. if (val) {
  17147. for (var i = 0; i < this.grade2.length; i++) {
  17148. var gid = this.grade2[i].id;
  17149. if (this.checkboxList2.indexOf(gid) === -1) {
  17150. this.checkboxList2.push(gid);
  17151. }
  17152. }
  17153. } else {
  17154. let _check = [];
  17155. let _check2 = [];
  17156. for (var i = 0; i < this.grade2.length; i++) {
  17157. var gid = this.grade2[i].id;
  17158. _check.push(gid);
  17159. }
  17160. for (var i = 0; i < this.checkboxList2.length; i++) {
  17161. var _id = this.checkboxList2[i];
  17162. if (_check.indexOf(_id) === -1) {
  17163. _check2.push(_id);
  17164. }
  17165. }
  17166. this.checkboxList2 = _check2;
  17167. }
  17168. this.isIndeterminate = false;
  17169. },
  17170. handleCheckAllChange2(val) {
  17171. if (val) {
  17172. for (var i = 0; i < this.teacherJuri.length; i++) {
  17173. var gid = this.teacherJuri[i].userid;
  17174. if (this.checkboxList3.indexOf(gid) === -1) {
  17175. this.checkboxList3.push(gid);
  17176. }
  17177. }
  17178. } else {
  17179. let _check = [];
  17180. let _check2 = [];
  17181. for (var i = 0; i < this.teacherJuri.length; i++) {
  17182. var gid = this.teacherJuri[i].userid;
  17183. _check.push(gid);
  17184. }
  17185. for (var i = 0; i < this.checkboxList3.length; i++) {
  17186. var _id = this.checkboxList3[i];
  17187. if (_check.indexOf(_id) === -1) {
  17188. _check2.push(_id);
  17189. }
  17190. }
  17191. this.checkboxList3 = _check2;
  17192. }
  17193. this.isIndeterminate2 = false;
  17194. },
  17195. async getInviteCode(cid) {
  17196. let code = this.randomNumber();
  17197. let params = {
  17198. code: code,
  17199. oid: this.oid,
  17200. };
  17201. let type = 1;
  17202. for (var i = 0; i < this.inviteCode.length; i++) {
  17203. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17204. type = 2;
  17205. }
  17206. }
  17207. if (type == 2) {
  17208. this.getInviteCode(cid);
  17209. return;
  17210. }
  17211. const res = await this.ajax.get(
  17212. this.$store.state.api + "selectInviteCode2",
  17213. params
  17214. );
  17215. if (
  17216. res.data.length &&
  17217. res.data[0].length &&
  17218. res.data[0][0].courseId != this.cid
  17219. ) {
  17220. this.getInviteCode(cid);
  17221. return;
  17222. }
  17223. let array = [];
  17224. for (var i = 0; i < this.inviteCode.length; i++) {
  17225. array.push(this.inviteCode[i].cid);
  17226. }
  17227. if (array.indexOf(cid) != -1) {
  17228. this.inviteCode[array.indexOf(cid)].ic = code;
  17229. } else {
  17230. this.inviteCode.push({ cid: cid, ic: code });
  17231. }
  17232. },
  17233. OpenInviteD(cid) {
  17234. let array = [];
  17235. this.icode = "";
  17236. for (var i = 0; i < this.inviteCode.length; i++) {
  17237. array.push(this.inviteCode[i].cid);
  17238. }
  17239. if (array.indexOf(cid) != -1) {
  17240. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17241. }
  17242. this.inviteId = cid;
  17243. this.dialogVisibleInvite = true;
  17244. },
  17245. addInvite() {
  17246. let reg = /^[A-Za-z0-9]{4,}$/;
  17247. if (!reg.test(this.icode)) {
  17248. this.$message.error(this.lang.ssInputCode);
  17249. return;
  17250. }
  17251. let type = 1;
  17252. for (var i = 0; i < this.inviteCode.length; i++) {
  17253. if (
  17254. this.inviteCode[i].cid != this.inviteId &&
  17255. this.icode == this.inviteCode[i].ic
  17256. ) {
  17257. type = 2;
  17258. }
  17259. }
  17260. if (type == 2) {
  17261. this.$message.error(this.lang.ssCodeDup);
  17262. return;
  17263. }
  17264. let params = {
  17265. code: this.icode,
  17266. oid: this.oid,
  17267. };
  17268. this.ajax
  17269. .get(this.$store.state.api + "selectInviteCode", params)
  17270. .then((res) => {
  17271. if (
  17272. res.data.length &&
  17273. res.data[0].length &&
  17274. res.data[0][0].courseId != this.cid
  17275. ) {
  17276. this.$message.error(this.lang.ssCodeDup);
  17277. return;
  17278. }
  17279. let array = [];
  17280. for (var i = 0; i < this.inviteCode.length; i++) {
  17281. array.push(this.inviteCode[i].cid);
  17282. }
  17283. if (array.indexOf(this.inviteId) != -1) {
  17284. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17285. } else {
  17286. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17287. }
  17288. this.icode = "";
  17289. this.dialogVisibleInvite = false;
  17290. })
  17291. .catch((err) => {
  17292. console.error(err);
  17293. });
  17294. },
  17295. randomNumber() {
  17296. // 随机生成两位数
  17297. // let num = Math.floor(Math.random() * 900) + 100;
  17298. // 生成 0 到 99 之间的随机整数
  17299. const randomNumber = Math.floor(Math.random() * 100);
  17300. // 如果随机数小于 10,补上前导零
  17301. const num =
  17302. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17303. // 随机生成两个大写字母
  17304. let letters = "";
  17305. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17306. for (let i = 0; i < 3; i++) {
  17307. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17308. }
  17309. // 随机生成两位数字和字母的组合
  17310. let mix = "";
  17311. let chars =
  17312. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17313. for (let i = 0; i < 3; i++) {
  17314. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17315. mix += char;
  17316. }
  17317. // 随机选择一种类型
  17318. let type = Math.floor(Math.random() * 3);
  17319. return num;
  17320. // 根据类型输出结果
  17321. switch (type) {
  17322. case 0:
  17323. console.log(num); // 输出两位数
  17324. return num;
  17325. case 1:
  17326. console.log(letters); // 输出两个大写字母
  17327. return letters;
  17328. case 2:
  17329. console.log(mix); // 输出两位数字和字母的组合
  17330. return mix;
  17331. }
  17332. },
  17333. getPaste() {
  17334. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  17335. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  17336. if (!iframe && !iframe2) {
  17337. return;
  17338. }
  17339. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17340. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17341. if (copyData && copyData.stageData && copyData.stageData.length) {
  17342. this.isPasteStage = true;
  17343. }
  17344. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17345. this.isPasteStage = true;
  17346. }
  17347. if (copyData && copyData.selectData.length) {
  17348. this.isPasteChoice = true;
  17349. }
  17350. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17351. this.isPasteTask = true;
  17352. }
  17353. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17354. this.isPasteTask = true;
  17355. }
  17356. },
  17357. getPaste2() {
  17358. let iframe = document.querySelectorAll(".interIframe")[0];
  17359. const turndownService = new TurndownService();
  17360. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17361. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17362. if(confirm_next_step){
  17363. this.courseText += turndownService.turndown(confirm_next_step)
  17364. iframe.contentWindow.confirm_next_step = ''
  17365. }
  17366. if(work_area_text && work_area_text.aiContent){
  17367. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17368. iframe.contentWindow.work_area_text = ''
  17369. }
  17370. },
  17371. textAreaChange(type, index){
  17372. if(type == 'courseText'){
  17373. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17374. }
  17375. if(type == 'targetCourseText2'){
  17376. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17377. }
  17378. if(type == 'taskDetail2'){
  17379. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17380. }
  17381. if(type == 'taskDetail3'){
  17382. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17383. }
  17384. },
  17385. setCourseInfo(type){
  17386. let courseInfo = ''
  17387. let sub = []
  17388. let mclass = []
  17389. if (this.courseTypeId.length) {
  17390. for (var i = 0; i < this.courseTypeId.length; i++) {
  17391. let _sid = this.courseTypeId[i]
  17392. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17393. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17394. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17395. }
  17396. }
  17397. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17398. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17399. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17400. }
  17401. }
  17402. }
  17403. }
  17404. if(this.courseName){
  17405. courseInfo = `${this.lang.ssCourseColon}${this.courseName} `
  17406. }
  17407. if(mclass.length){
  17408. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  17409. }
  17410. if(sub.length){
  17411. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  17412. }
  17413. console.log(courseInfo)
  17414. window.course_info = courseInfo
  17415. this.course_info = courseInfo
  17416. window.course_lang = this.languageSetting
  17417. },
  17418. saveCourse(){
  17419. if (this.cid == "" || this.cid == undefined) {
  17420. this.addWork();
  17421. } else {
  17422. if (this.userid != this.courseUserid && this.role != "1") {
  17423. this.updateWork2();
  17424. } else {
  17425. this.updateWork();
  17426. }
  17427. }
  17428. },
  17429. setCover($event, attempts = 0) {
  17430. var _this = this;
  17431. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17432. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17433. if (_this.cover.length || attempts >= 3) {
  17434. return;
  17435. }
  17436. _this.findMatchingContents()
  17437. _this.imageloading2 = true;
  17438. _this.ajax
  17439. .post("https://gpt.cocorobo.cn/search_image", {
  17440. page: _this.ppage,
  17441. pagesize: 9,
  17442. query: _this.courseName,
  17443. })
  17444. .then(function (response) {
  17445. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17446. if(data){
  17447. _this.cover = [];
  17448. setTimeout(() => {
  17449. _this.cover[0] = {
  17450. name: _this.lang.ssNetImgPng,
  17451. url: data[0].thumbnail,
  17452. };
  17453. _this.imgChange1(null, null, 1, null);
  17454. _this.$forceUpdate();
  17455. _this.saveCourse()
  17456. }, 0);
  17457. _this.imageloading2 = false;
  17458. }else {
  17459. _this.imageloading2 = false;
  17460. _this.setCover($event, attempts + 1);
  17461. }
  17462. })
  17463. .catch(function (error) {
  17464. _this.imageloading2 = false;
  17465. _this.setCover($event, attempts + 1);
  17466. console.log(error);
  17467. });
  17468. },
  17469. searchImage() {
  17470. var _this = this;
  17471. _this.imageList = [];
  17472. if (!_this.searchImageValue) {
  17473. _this.sysPicVisible2 = true;
  17474. return;
  17475. }
  17476. _this.imageloading = true;
  17477. _this.ajax
  17478. .post("https://gpt.cocorobo.cn/search_image", {
  17479. page: _this.ppage,
  17480. pagesize: 9,
  17481. query: _this.searchImageValue,
  17482. })
  17483. .then(function (response) {
  17484. // console.log(response.data.data);
  17485. var data = response.data.FunctionResponse.result;
  17486. for (var i = 0; i < data.length; i++) {
  17487. _this.imageList.push({ url: data[i].thumbnail });
  17488. }
  17489. _this.imageloading = false;
  17490. })
  17491. .catch(function (error) {
  17492. console.log(error);
  17493. });
  17494. _this.sysPicVisible2 = true;
  17495. },
  17496. changePicture() {
  17497. this.ppage++;
  17498. this.searchImage();
  17499. },
  17500. resetImage() {
  17501. this.ppage = 1;
  17502. this.searchImage();
  17503. },
  17504. jumpGj(i, j) {
  17505. if (i + 1 != this.isClickColor) {
  17506. this.isClickColor = i + 1;
  17507. }
  17508. var a = document.scrollingElement;
  17509. this.toolIndexType = `gj${i}${j}`;
  17510. let target = document.querySelector(`#gj${i}${j}`);
  17511. if (target) {
  17512. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17513. setTimeout(() => {
  17514. target.scrollIntoView(true);
  17515. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17516. j
  17517. ].isFold3 = false;
  17518. setTimeout(() => {
  17519. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17520. }, 0);
  17521. }, 0);
  17522. }
  17523. },
  17524. jumpGj2(i, j, k) {
  17525. if (this.unitIndex != k) {
  17526. if (this.panUnitJson() == 2) {
  17527. return;
  17528. }
  17529. this.unitSet(k);
  17530. }
  17531. setTimeout(() => {
  17532. if (i + 1 != this.isClickColor) {
  17533. this.isClickColor = i + 1;
  17534. }
  17535. var a = document.scrollingElement;
  17536. this.toolIndexType = `gj${i}${j}${k}`;
  17537. let target = document.querySelector(`#gj${i}${j}`);
  17538. if (target) {
  17539. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17540. setTimeout(() => {
  17541. target.scrollIntoView(true);
  17542. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17543. j
  17544. ].isFold3 = false;
  17545. setTimeout(() => {
  17546. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17547. }, 0);
  17548. }, 0);
  17549. }
  17550. }, 0);
  17551. },
  17552. dragStart(val, i, j) {
  17553. console.log(this.taskCount);
  17554. this.dragType = "drag";
  17555. this.taskCount = j;
  17556. this.oldIndex = i;
  17557. this.oldData = val;
  17558. },
  17559. dragOver(i, j) {
  17560. this.typeIndex = "chapter-" + j + "-" + i;
  17561. this.newIndex = i;
  17562. },
  17563. dragEnd() {
  17564. if (this.dragType != "drag") {
  17565. this.typeIndex = "";
  17566. this.newIndex = "";
  17567. this.dragType = "";
  17568. this.isdrag = "";
  17569. return;
  17570. }
  17571. console.log(this.taskCount);
  17572. let newItems = [
  17573. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17574. .chapterData,
  17575. ];
  17576. // 删除老的节点
  17577. newItems.splice(this.oldIndex, 1);
  17578. // 在列表中目标位置增加新的节点
  17579. newItems.splice(this.newIndex, 0, this.oldData);
  17580. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17581. this.taskCount
  17582. ].chapterData = [...newItems];
  17583. this.typeIndex = "";
  17584. this.newIndex = "";
  17585. this.dragType = "";
  17586. this.isdrag = "";
  17587. this.$forceUpdate();
  17588. },
  17589. dragTaskStart(val, i, j) {
  17590. this.dragType = "task";
  17591. this.oldIndex = i;
  17592. this.oldData = val;
  17593. this.oldUnitIndex = j;
  17594. },
  17595. dragTaskOver(i, j) {
  17596. this.typeIndex = "task-" + i;
  17597. this.newIndex = i;
  17598. this.checkUnitIndex = j;
  17599. },
  17600. async dragTaskEnd() {
  17601. if (this.dragType != "task") {
  17602. this.newIndex = "";
  17603. this.dragType = "";
  17604. this.typeIndex = "";
  17605. this.checkUnitIndex = "";
  17606. this.isdrag = "";
  17607. return;
  17608. }
  17609. if (
  17610. this.newIndex == this.oldIndex &&
  17611. this.oldUnitIndex == this.checkUnitIndex
  17612. ) {
  17613. this.newIndex = "";
  17614. this.dragType = "";
  17615. this.typeIndex = "";
  17616. this.checkUnitIndex = "";
  17617. this.isdrag = "";
  17618. return;
  17619. }
  17620. let count1 = await this.getWorksCount(
  17621. 2,
  17622. this.checkUnitIndex,
  17623. this.newIndex,
  17624. 0
  17625. );
  17626. let count2 = await this.getWorksCount(
  17627. 2,
  17628. this.oldUnitIndex,
  17629. this.oldIndex,
  17630. 0
  17631. );
  17632. if (count1 > 0 || count2 > 0) {
  17633. this.$confirm(
  17634. this.lang.ssTaskMoveAll,
  17635. this.lang.ssTip,
  17636. {
  17637. confirmButtonText: this.lang.ssConfirm,
  17638. cancelButtonText: this.lang.ssCancel,
  17639. type: "warning",
  17640. }
  17641. )
  17642. .then(() => {
  17643. if (this.oldUnitIndex != this.checkUnitIndex) {
  17644. let newItems = [
  17645. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17646. ];
  17647. // 删除老的节点
  17648. newItems.splice(this.oldIndex, 1);
  17649. // 在列表中目标位置增加新的节点
  17650. let newItems2 = [
  17651. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17652. ];
  17653. newItems2.splice(this.newIndex, 0, this.oldData);
  17654. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17655. ...newItems,
  17656. ];
  17657. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17658. ...newItems2,
  17659. ];
  17660. } else {
  17661. let newItems = [
  17662. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17663. ];
  17664. let chapterData = []
  17665. if (this.oldIndex == 0) {
  17666. chapterData = newItems[this.oldIndex].chapterData
  17667. newItems[this.oldIndex].chapterData = []
  17668. } else if (this.newIndex == 0) {
  17669. chapterData = newItems[this.newIndex].chapterData
  17670. newItems[this.oldIndex].chapterData = []
  17671. }
  17672. // 删除老的节点
  17673. newItems.splice(this.oldIndex, 1);
  17674. // 在列表中目标位置增加新的节点
  17675. newItems.splice(this.newIndex, 0, this.oldData);
  17676. if (this.oldIndex == 0 || this.newIndex == 0) {
  17677. newItems[0].chapterData = chapterData
  17678. }
  17679. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17680. ...newItems,
  17681. ];
  17682. }
  17683. this.moveWork(2, this.checkUnitIndex, this.newIndex, 0, this.oldUnitIndex, this.oldIndex, 0);
  17684. this.typeIndex = "";
  17685. this.newIndex = "";
  17686. this.dragType = "";
  17687. this.checkUnitIndex = "";
  17688. this.isdrag = "";
  17689. this.updateWork();
  17690. this.$forceUpdate();
  17691. })
  17692. .catch(() => {
  17693. this.newIndex = "";
  17694. this.dragType = "";
  17695. this.typeIndex = "";
  17696. this.checkUnitIndex = "";
  17697. this.isdrag = "";
  17698. return;
  17699. });
  17700. } else {
  17701. if (this.oldUnitIndex != this.checkUnitIndex) {
  17702. let newItems = [
  17703. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17704. ];
  17705. // 删除老的节点
  17706. newItems.splice(this.oldIndex, 1);
  17707. // 在列表中目标位置增加新的节点
  17708. let newItems2 = [
  17709. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17710. ];
  17711. newItems2.splice(this.newIndex, 0, this.oldData);
  17712. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17713. ...newItems,
  17714. ];
  17715. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17716. ...newItems2,
  17717. ];
  17718. } else {
  17719. let newItems = [
  17720. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17721. ];
  17722. let chapterData = []
  17723. if (this.oldIndex == 0) {
  17724. chapterData = newItems[this.oldIndex].chapterData
  17725. newItems[this.oldIndex].chapterData = []
  17726. } else if (this.newIndex == 0) {
  17727. chapterData = newItems[this.newIndex].chapterData
  17728. newItems[this.oldIndex].chapterData = []
  17729. }
  17730. // 删除老的节点
  17731. newItems.splice(this.oldIndex, 1);
  17732. // 在列表中目标位置增加新的节点
  17733. newItems.splice(this.newIndex, 0, this.oldData);
  17734. if (this.oldIndex == 0 || this.newIndex == 0) {
  17735. newItems[0].chapterData = chapterData
  17736. }
  17737. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17738. ...newItems,
  17739. ];
  17740. }
  17741. this.typeIndex = "";
  17742. this.newIndex = "";
  17743. this.dragType = "";
  17744. this.checkUnitIndex = "";
  17745. this.isdrag = "";
  17746. this.updateWork();
  17747. this.$forceUpdate();
  17748. }
  17749. },
  17750. dragUnitStart(val, i) {
  17751. this.dragType = "Unit";
  17752. this.oldIndex = i;
  17753. this.oldData = val;
  17754. },
  17755. dragUnitOver(i) {
  17756. this.typeIndex = "Unit-" + i;
  17757. this.newIndex = i;
  17758. console.log(i, this.unitJson[i].toolOpen);
  17759. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17760. this.unitJson[i].toolOpen = true;
  17761. this.updateWork();
  17762. this.$forceUpdate();
  17763. }
  17764. },
  17765. async dragUnitEnd() {
  17766. if (this.dragType != "Unit") {
  17767. this.newIndex = "";
  17768. this.dragType = "";
  17769. this.typeIndex = "";
  17770. this.isdrag = "";
  17771. return;
  17772. }
  17773. if (this.newIndex == this.oldIndex) {
  17774. this.newIndex = "";
  17775. this.dragType = "";
  17776. this.typeIndex = "";
  17777. this.isdrag = "";
  17778. return;
  17779. }
  17780. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17781. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17782. console.log(count1, count2);
  17783. if (count1 > 0 || count2 > 0) {
  17784. this.$confirm(
  17785. this.lang.ssStageMove,
  17786. this.lang.ssTip,
  17787. {
  17788. confirmButtonText: this.lang.ssConfirm,
  17789. cancelButtonText: this.lang.ssCancel,
  17790. type: "warning",
  17791. }
  17792. )
  17793. .then(() => {
  17794. let newItems = [...this.unitJson];
  17795. // 删除老的节点
  17796. newItems.splice(this.oldIndex, 1);
  17797. // 在列表中目标位置增加新的节点
  17798. newItems.splice(this.newIndex, 0, this.oldData);
  17799. this.unitJson = [...newItems];
  17800. this.moveWork(1, this.newIndex, 0, 0, this.oldIndex, 0, 0);
  17801. this.typeIndex = "";
  17802. this.newIndex = "";
  17803. this.dragType = "";
  17804. this.isdrag = "";
  17805. this.updateWork();
  17806. this.$forceUpdate();
  17807. })
  17808. .catch(() => {
  17809. this.newIndex = "";
  17810. this.dragType = "";
  17811. this.typeIndex = "";
  17812. this.isdrag = "";
  17813. return;
  17814. });
  17815. } else {
  17816. let newItems = [...this.unitJson];
  17817. // 删除老的节点
  17818. newItems.splice(this.oldIndex, 1);
  17819. // 在列表中目标位置增加新的节点
  17820. newItems.splice(this.newIndex, 0, this.oldData);
  17821. this.unitJson = [...newItems];
  17822. this.typeIndex = "";
  17823. this.newIndex = "";
  17824. this.dragType = "";
  17825. this.isdrag = "";
  17826. this.updateWork();
  17827. this.$forceUpdate();
  17828. }
  17829. },
  17830. getWorksCount(type, stage, task, tool) {
  17831. return new Promise((resolve, reject) => {
  17832. let params = [
  17833. {
  17834. cid: this.cid,
  17835. stage: stage,
  17836. task: task,
  17837. tool: tool,
  17838. type: type,
  17839. },
  17840. ];
  17841. this.ajax
  17842. .post(this.$store.state.api + "getCourseWorkCount", params)
  17843. .then((res) => {
  17844. let count = res.data[0][0].count;
  17845. resolve(count);
  17846. })
  17847. .catch((err) => {
  17848. resolve(0);
  17849. this.$message.error(this.lang.ssNetPoor);
  17850. console.error(err);
  17851. });
  17852. });
  17853. },
  17854. moveWork(type, nstage, ntask, ntool, ostage, otask, otool) {
  17855. // type: int 类型
  17856. // nstage, ntask, ntool: 新目标位置(目标单元/任务/工具)
  17857. // ostage, otask, otool: 原始位置
  17858. // this.cid 课程id
  17859. let params = [
  17860. {
  17861. cid: this.cid,
  17862. nstage: nstage,
  17863. ntask: ntask,
  17864. ntool: ntool,
  17865. type: type,
  17866. ostage: ostage,
  17867. otask: otask,
  17868. otool: otool
  17869. }
  17870. ];
  17871. return this.ajax
  17872. .post(this.$store.state.api + "moveCourseWork", params)
  17873. .then(res => {
  17874. console.log(res);
  17875. })
  17876. .catch(err => {
  17877. console.error(this.lang.ssMoveFail);
  17878. console.error(err);
  17879. throw err;
  17880. });
  17881. },
  17882. getTwoType(id) {
  17883. this.twoJson = [];
  17884. var array = this.CourseTypeJson1[
  17885. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17886. ].filter((e) => {
  17887. return e.ppid == id;
  17888. });
  17889. this.twoJson = array;
  17890. this.$forceUpdate();
  17891. },
  17892. ctype() {
  17893. this.oneJson =
  17894. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17895. },
  17896. selectAllType1() {
  17897. this.CourseType1 = [];
  17898. this.CourseTypeJson1 = {};
  17899. this.courseTypeId1 = {};
  17900. this.$forceUpdate();
  17901. let params = {
  17902. org: this.org && this.org != "" ? this.org : "",
  17903. oid: this.oid && this.oid != "" ? this.oid : "",
  17904. };
  17905. this.ajax
  17906. .get(this.$store.state.api + "selectAllEvaType", params)
  17907. .then((res) => {
  17908. this.CourseType1 = res.data;
  17909. for (var i = 0; i < res.data[0].length; i++) {
  17910. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17911. res.data[0][i].name = this.lang.ssLevel1;
  17912. } else if (
  17913. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17914. ) {
  17915. res.data[0][i].name = this.lang.ssLevel2;
  17916. }
  17917. if (!this.cid) {
  17918. this.courseTypeId1[res.data[0][i].id] = [];
  17919. }
  17920. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17921. this.CourseTypeJson1[res.data[0][i].id] = [];
  17922. }
  17923. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17924. for (var j = 0; j < res.data[1].length; j++) {
  17925. if (res.data[0][i].id == res.data[1][j].pid) {
  17926. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17927. }
  17928. }
  17929. // } else {
  17930. if (res.data[2].length > 0) {
  17931. for (var j = 0; j < res.data[2].length; j++) {
  17932. if (res.data[0][i].id == res.data[2][j].pid) {
  17933. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17934. }
  17935. }
  17936. }
  17937. if (res.data[3].length > 0) {
  17938. for (var j = 0; j < res.data[3].length; j++) {
  17939. if (res.data[0][i].id == res.data[3][j].pid) {
  17940. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17941. }
  17942. }
  17943. }
  17944. // }
  17945. }
  17946. this.ctype();
  17947. this.cetBoxDialog = true;
  17948. })
  17949. .catch((err) => {
  17950. console.error(err);
  17951. });
  17952. },
  17953. allEvaCan() {
  17954. if (this.taskLoading.length) {
  17955. let _pan = 1
  17956. for (var k = 0; k < this.taskLoading.length; k++) {
  17957. if (this.taskLoading[k]) {
  17958. this.$message({
  17959. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  17960. type: "warning"
  17961. });
  17962. _pan = 2
  17963. }
  17964. }
  17965. if (_pan == 2) {
  17966. return
  17967. }
  17968. }
  17969. if (this.taskGLoading.length) {
  17970. let _pan = 1
  17971. for (var k = 0; k < this.taskGLoading.length; k++) {
  17972. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17973. this.$message({
  17974. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  17975. type: "warning"
  17976. });
  17977. _pan = 2
  17978. }
  17979. }
  17980. if (_pan == 2) {
  17981. return
  17982. }
  17983. }
  17984. this.$confirm(this.lang.ssGenAllEvaSet, this.lang.ssTip, {
  17985. confirmButtonText: this.lang.ssConfirm,
  17986. cancelButtonText: this.lang.ssCancel,
  17987. type: "warning",
  17988. customClass: 'custom-confirm-box'
  17989. })
  17990. .then(() => {
  17991. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17992. for (var index = 0; index < taskJson.length; index++) {
  17993. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17994. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17995. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17996. }
  17997. }
  17998. }
  17999. })
  18000. .catch(() => {
  18001. });
  18002. setTimeout(() => {
  18003. this.setTipsIndex()
  18004. }, 500)
  18005. },
  18006. allEvaCan2(index) {
  18007. if (this.taskLoading.length) {
  18008. let _pan = 1
  18009. for (var k = 0; k < this.taskLoading.length; k++) {
  18010. if (this.taskLoading[k]) {
  18011. this.$message({
  18012. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18013. type: "warning"
  18014. });
  18015. _pan = 2
  18016. }
  18017. }
  18018. if (_pan == 2) {
  18019. return
  18020. }
  18021. }
  18022. if (this.taskGLoading.length) {
  18023. let _pan = 1
  18024. for (var k = 0; k < this.taskGLoading.length; k++) {
  18025. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  18026. this.$message({
  18027. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18028. type: "warning"
  18029. });
  18030. _pan = 2
  18031. }
  18032. }
  18033. if (_pan == 2) {
  18034. return
  18035. }
  18036. }
  18037. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18038. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18039. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18040. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18041. }
  18042. }
  18043. this.$message({
  18044. message: this.lang.ssExecSucc,
  18045. type: "success"
  18046. });
  18047. },
  18048. setAiJson(pan,string,string2,string3){
  18049. if(pan == 'aiTeacher2'){
  18050. this.aiJson['teacherDetail2'] = string
  18051. }else if(pan == 'aiRateRuleA'){
  18052. this.aiJson['aiRateRule'] = string
  18053. }else if(pan == 'aiOutline2'){
  18054. this.aiJson['aiOutlineTask'] = string
  18055. this.aiJson['aiOutlineDetail'] = string2
  18056. }else if(pan == 'aiTeacher3'){
  18057. this.aiJson['aiCpoteTask'] = string
  18058. this.aiJson['teacherDetail2'] = string2
  18059. }else if(pan == 'aiTask2'){
  18060. this.aiJson['aiTask'] = string
  18061. }else if(pan == 'aiTask3'){
  18062. this.aiJson['aiTaskG1'] = string
  18063. this.aiJson['aiTaskG2'] = string2
  18064. this.aiJson['aiTaskG3'] = string3
  18065. }else if(pan == 'aiteacherTextDetail'){
  18066. this.aiJson['aiAbstract'] = string
  18067. }else if(pan == 'aitargetTextDetail'){
  18068. this.aiJson['aiTarget'] = string
  18069. }else if(pan == 'aitargetTextDetail2'){
  18070. this.aiJson['aiTarget2'] = string
  18071. }else if(pan == 'aitargetTextDetail3'){
  18072. this.aiJson['aiTargetGet'] = string
  18073. this.aiJson['aiTarget2'] = string2
  18074. }else {
  18075. this.aiJson[pan] = string
  18076. }
  18077. this.aiText2 = ''
  18078. this.aiText3 = ''
  18079. this.$forceUpdate();
  18080. },
  18081. editTask3(index){
  18082. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  18083. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  18084. }else {
  18085. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  18086. }
  18087. setTimeout(() => {
  18088. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  18089. setTimeout(() => {
  18090. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  18091. }, 0);
  18092. }, 100);
  18093. this.$forceUpdate();
  18094. },
  18095. editTask2(index){
  18096. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  18097. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  18098. }else {
  18099. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  18100. }
  18101. setTimeout(() => {
  18102. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  18103. setTimeout(() => {
  18104. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  18105. }, 0);
  18106. }, 100);
  18107. this.$forceUpdate();
  18108. },
  18109. openRule(i, k){
  18110. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  18111. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  18112. }else {
  18113. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  18114. }
  18115. setTimeout(() => {
  18116. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  18117. setTimeout(() => {
  18118. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  18119. }, 0);
  18120. }, 200);
  18121. this.$forceUpdate();
  18122. },
  18123. editCpote(index){
  18124. if(this.cpote[index]){
  18125. this.cpote[index] = false
  18126. }else {
  18127. this.cpote[index] = true
  18128. }
  18129. setTimeout(() => {
  18130. this.cpote[index.replace('s','')] += "*0*%*";
  18131. setTimeout(() => {
  18132. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  18133. }, 0);
  18134. }, 100);
  18135. this.$forceUpdate();
  18136. },
  18137. clickGenTT(){
  18138. if(!this.teacherInfoData.length){
  18139. this.$message.error(this.lang.ssPlsUpPlan);
  18140. return;
  18141. }
  18142. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  18143. this.openAiDialog(2, 'aiteacherTextDetail',1)
  18144. setTimeout(() => {
  18145. this.openAiDialog(2, 'aitargetTextDetail',1)
  18146. }, 500);
  18147. },
  18148. async getUserName() {
  18149. let params = { uid: this.userid };
  18150. try {
  18151. let res = await this.ajax.get(
  18152. this.$store.state.api + "getUser",
  18153. params
  18154. );
  18155. return res.data[0][0].name;
  18156. } catch (err) {
  18157. console.error(err);
  18158. }
  18159. },
  18160. getCGN(type){
  18161. let sub = [] //学科
  18162. let mclass = [] //年纪
  18163. let theme = []
  18164. if (this.courseTypeId.length) {
  18165. for (var i = 0; i < this.courseTypeId.length; i++) {
  18166. let _sid = this.courseTypeId[i]
  18167. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18168. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18169. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18170. }
  18171. }
  18172. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18173. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18174. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18175. }
  18176. }
  18177. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18178. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  18179. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  18180. }
  18181. }
  18182. }
  18183. if(type == 1){
  18184. return sub.join(",")
  18185. }else if(type == 2){
  18186. return mclass.join(",")
  18187. }else if(type == 3){
  18188. return theme.join(",")
  18189. }
  18190. }
  18191. },
  18192. async exportTeachPlan(){
  18193. this.loading = true
  18194. const zip = new JSZip();
  18195. let md = new MarkdownIt();
  18196. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18197. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18198. let String = ''
  18199. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18200. String += `<h2>${this.lang.ssCourseBasic}</h2>`
  18201. String += `<div><strong>${this.lang.ssDesigner}</strong><span>${await this.getUserName()}</span></div>`
  18202. String += `<div><strong>${this.lang.ssGradeColon}</strong><span></span>${this.getCGN(2)}</div>`
  18203. String += `<div><strong>${this.lang.ssThemeColon}</strong><span></span>${this.getCGN(3)}</div>`
  18204. String += `<div><strong>${this.lang.ssSubjColon}</strong><span></span>${this.getCGN(1)}</div>`
  18205. if(courseText){
  18206. String += `<h2>${this.lang.ssCourseOver}</h2>`
  18207. String += md.render(courseText)
  18208. }
  18209. if(target){
  18210. String += `<h2>${this.lang.ssCourseObj}</h2>`
  18211. String += md.render(target)
  18212. }
  18213. String += `<h2>${this.lang.ssCoursePlan}</h2>`
  18214. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18215. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18216. // let name = _task.task+'-教案'
  18217. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18218. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18219. await this.generate(name, _html, i)
  18220. }
  18221. String += `<h3>${this.lang.ssTaskNum.replace(/\*/g, i+1)}</h3>`
  18222. String += `<h4>${_task.task}</h4>`
  18223. String += _html
  18224. // let file = await this.generateExport(name, _html, i)
  18225. // zip.file(`${name}.docx`, file, { binary: true })
  18226. }
  18227. await this.generateExport(this.courseName, String, i)
  18228. setTimeout(() => {
  18229. this.loading = false
  18230. }, 2000);
  18231. // zip.generateAsync({ type: "blob" }).then((content) => {
  18232. // // 生成二进制流
  18233. // saveAs(
  18234. // content,
  18235. // this.courseName + "-" + "教案.zip"
  18236. // ); // 利用file-saver保存文件 自定义文件名
  18237. // setTimeout(() => {
  18238. // this.loading = false
  18239. // // if(!this.cid){
  18240. // // this.addWork(3)
  18241. // // }else{
  18242. // // this.updateWork();
  18243. // // this.steps = 4;
  18244. // // }
  18245. // }, 2000);
  18246. // });
  18247. },
  18248. async exportTaskEA(){
  18249. this.loading = true
  18250. const zip = new JSZip();
  18251. let md = new MarkdownIt();
  18252. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18253. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18254. for(var j = 0; j < _task.chapterData.length; j++){
  18255. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18256. let file = await getFile(_task.chapterData[j].url)
  18257. if (file.data != 1) {
  18258. // 下载文件, 并存成ArrayBuffer对象
  18259. const file_name = _task.chapterData[j].name; // 获取文件名
  18260. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18261. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18262. // 判断是否有重复的文件名字
  18263. if (!zip.file(file_name)) {
  18264. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18265. } else {
  18266. // 如果有重复的文件名,则在文件名后添加序号
  18267. let count = 1;
  18268. let newFileName = fileNameWithoutExt;
  18269. while (zip.file(`${newFileName}.${fileExt}`)) {
  18270. newFileName = `${fileNameWithoutExt}(${count})`;
  18271. count++;
  18272. }
  18273. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18274. }
  18275. }
  18276. }
  18277. }
  18278. for(var j = 0; j < _task.toolChoose.length; j++){
  18279. let tool = _task.toolChoose[j]
  18280. if(tool.eList && tool.eList.length){
  18281. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18282. tool.eList.forEach(item => {
  18283. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18284. });
  18285. let html = md.render(tableContent);
  18286. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18287. let file = await this.generateExport2(name, html, i)
  18288. zip.file(`${name}`, file, { binary: true })
  18289. }
  18290. }
  18291. // let file = await this.generateExport(name, _html, i)
  18292. // zip.file(`${name}.docx`, file, { binary: true })
  18293. }
  18294. zip.generateAsync({ type: "blob" }).then((content) => {
  18295. // 生成二进制流
  18296. saveAs(
  18297. content,
  18298. this.courseName + "-" + this.lang.ssEvaDegreeZip
  18299. ); // 利用file-saver保存文件 自定义文件名
  18300. setTimeout(() => {
  18301. this.loading = false
  18302. }, 2000);
  18303. });
  18304. },
  18305. async downloadFile(item){
  18306. let data = await getFile(item.url)
  18307. let file = new File([data.data], item.name);
  18308. saveAs(file, item.name);
  18309. },
  18310. async addAppendixEva(i, j){
  18311. let md = new MarkdownIt();
  18312. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18313. if(tool.eList && tool.eList.length){
  18314. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18315. tool.eList.forEach(item => {
  18316. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18317. });
  18318. let html = md.render(tableContent);
  18319. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18320. let file = await this.generateExport2(name, html, i)
  18321. this.beforeUploadHtml(file, 0, "", 2)
  18322. }
  18323. },
  18324. clickGenTT2(){
  18325. if (this.courseName == "") {
  18326. this.$message.error(this.lang.ssFillCourseName);
  18327. return;
  18328. }
  18329. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18330. let functionA = ''
  18331. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18332. // setTimeout(() => {
  18333. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18334. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18335. // }, 500);
  18336. functionA = ()=>{
  18337. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18338. }
  18339. }
  18340. this.openAiDialog(2, 'aiDetail',1, functionA)
  18341. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18342. // setTimeout(() => {
  18343. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18344. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18345. // }, 500);
  18346. }
  18347. this.courseTextBool = true
  18348. },
  18349. changeIsuseT(){
  18350. if(this.isuseT == 1){
  18351. this.courseTextB = false
  18352. }else if(this.isuseT == 2){
  18353. navigator.mediaDevices.getUserMedia({ audio: true })
  18354. .then(stream => {
  18355. console.log('获取录音权限成功');
  18356. })
  18357. .catch(err => {
  18358. this.$message.error(this.lang.ssRecordFail)
  18359. console.error('获取录音权限失败:', err);
  18360. });
  18361. }else{
  18362. if(this.courseText){
  18363. this.courseTextB = false
  18364. }else{
  18365. this.courseTextB = true
  18366. }
  18367. }
  18368. this.interSetting = false
  18369. this.interPan = true
  18370. },
  18371. changeLang(){
  18372. window.course_lang = this.languageSetting
  18373. },
  18374. openInterPanSetting(){
  18375. this.interSetting = !this.interSetting
  18376. if(this.interSetting){
  18377. if(this.istemplate == 1){
  18378. this.agentid = this.aiJson.agentid
  18379. }else {
  18380. this.agentid = this.aiJson.sagentid
  18381. }
  18382. }else {
  18383. this.agentid = ''
  18384. }
  18385. },
  18386. openInterPanSetting2(){
  18387. this.interSetting = !this.interSetting
  18388. if(this.interSetting){
  18389. this.r_agentid = this.aiJson.recordAgentid
  18390. }else {
  18391. this.r_agentid = ''
  18392. }
  18393. },
  18394. setAgentid(){
  18395. if(!this.agentid.trim()){
  18396. this.$message.error(this.lang.ssPlsWorkflow)
  18397. return;
  18398. }
  18399. if(this.istemplate == 1){
  18400. this.aiJson.agentid = this.agentid.trim()
  18401. }else {
  18402. this.aiJson.sagentid = this.agentid.trim()
  18403. }
  18404. this.interFlash = false
  18405. setTimeout(() => {
  18406. this.interFlash = true
  18407. }, 100);
  18408. this.interSetting = false
  18409. },
  18410. setAgentid2(){
  18411. if(!this.r_agentid.trim()){
  18412. this.$message.error(this.lang.ssPlsWorkflow)
  18413. return;
  18414. }
  18415. this.aiJson.recordAgentid = this.r_agentid.trim()
  18416. this.interSetting = false
  18417. },
  18418. rebuildAgentid(){
  18419. this.aiJson.sagentid = ''
  18420. this.interFlash = false
  18421. setTimeout(() => {
  18422. this.interFlash = true
  18423. }, 100);
  18424. this.interSetting = false
  18425. },
  18426. cancelInterSetting(){
  18427. this.agentid = ''
  18428. this.interSetting = false
  18429. },
  18430. cancelInterSetting2(){
  18431. this.r_agentid = ''
  18432. this.interSetting = false
  18433. },
  18434. openAiDialog2(clickType, type, callback, index, tindex){
  18435. if (this.taskLoading.length) {
  18436. let _pan = 1
  18437. for(var k = 0; k < this.taskLoading.length; k++){
  18438. if(this.taskLoading[k]){
  18439. this.$message({
  18440. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18441. type: "warning"
  18442. });
  18443. _pan = 2
  18444. }
  18445. }
  18446. if(_pan == 2){
  18447. return
  18448. }
  18449. }
  18450. if(this.taskGLoading.length){
  18451. let _pan = 1
  18452. for(var k = 0; k < this.taskGLoading.length; k++){
  18453. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18454. this.$message({
  18455. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18456. type: "warning"
  18457. });
  18458. _pan = 2
  18459. }
  18460. }
  18461. if(_pan == 2){
  18462. return
  18463. }
  18464. }
  18465. let pan2 = 1
  18466. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18467. for(var _index = 0; _index < taskJson.length; _index++){
  18468. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18469. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18470. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18471. this.$message({
  18472. message: this.lang.ssWaitTaskCont.replace(/\*/g, _index+1),
  18473. type: "warning"
  18474. });
  18475. pan2 = 2
  18476. }
  18477. }
  18478. }
  18479. }
  18480. if(pan2 == 2){
  18481. return
  18482. }
  18483. this.$confirm(this.lang.ssRegenAffect, this.lang.ssTip, {
  18484. confirmButtonText: this.lang.ssConfirm,
  18485. cancelButtonText: this.lang.ssCancel,
  18486. type: "warning",
  18487. customClass: 'custom-confirm-box'
  18488. })
  18489. .then(() => {
  18490. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18491. // this.openAiDialog(clickType, 'aiTeacher')
  18492. // }else {
  18493. this.openAiDialog(clickType, type, callback, index, tindex)
  18494. // }
  18495. })
  18496. .catch(() => {
  18497. });
  18498. setTimeout(() => {
  18499. this.setTipsIndex()
  18500. }, 500)
  18501. },
  18502. async openAiDialog(clickType, type, callback, index, tindex) {
  18503. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18504. fileid = [...fileid]
  18505. if (this.infoData.length) {
  18506. for (var i = 0; i < this.infoData.length; i++) {
  18507. if(this.infoData[i].fileid){
  18508. fileid.push(this.infoData[i].fileid)
  18509. }else {
  18510. let _fileid = await this.createFileid(this.infoData[i].url)
  18511. if(_fileid){
  18512. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18513. this.$forceUpdate();
  18514. if(_fileid != 1){
  18515. fileid.push(_fileid)
  18516. }
  18517. }
  18518. }
  18519. }
  18520. }
  18521. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18522. if(fileid.length > 30){
  18523. this.$message.error(this.lang.ssFileLimit30)
  18524. return;
  18525. }
  18526. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18527. this.$message.error(this.lang.ssNoPermTip);
  18528. return;
  18529. }
  18530. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18531. this.$message.error(this.lang.ssPlsUpPlan);
  18532. return;
  18533. }
  18534. if (this.courseName == "") {
  18535. this.$message.error(this.lang.ssFillCourseName);
  18536. return;
  18537. }
  18538. this.aiText2 = ''
  18539. this.clickType = clickType
  18540. let sub = []
  18541. if (this.courseTypeId.length) {
  18542. for (var i = 0; i < this.courseTypeId.length; i++) {
  18543. let _sid = this.courseTypeId[i]
  18544. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18545. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18546. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18547. }
  18548. }
  18549. }
  18550. }
  18551. let mclass = []
  18552. if (this.courseTypeId.length) {
  18553. for (var i = 0; i < this.courseTypeId.length; i++) {
  18554. let _sid = this.courseTypeId[i]
  18555. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18556. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18557. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18558. }
  18559. }
  18560. }
  18561. }
  18562. if (type == "aiDetail") {
  18563. if (this.ttextLoading) {
  18564. this.$message({
  18565. message: this.lang.ssPlsAnswer,
  18566. type: "warning"
  18567. });
  18568. return;
  18569. }
  18570. this.aitype = "aiDetail"
  18571. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18572. this.aiText = this.aiJson.aiDetail
  18573. this.aiCallBack = [callback, index]
  18574. } else if (type == "aiOutline") {
  18575. this.aitype = "aiOutline"
  18576. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18577. this.aiText = this.aiJson.aiOutline
  18578. } else if (type == "aiOutline2") {
  18579. this.aitype = "aiOutline2"
  18580. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18581. this.aiText = this.aiJson.aiOutlineTask
  18582. this.aiText2 = this.aiJson.aiOutlineDetail
  18583. } else if (type == "aiOutlineDetail2") {
  18584. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18585. this.$message({
  18586. message: this.lang.ssPlsAnswer,
  18587. type: "warning"
  18588. });
  18589. return;
  18590. }
  18591. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18592. this.$message.error(this.lang.ssEnterTask)
  18593. return;
  18594. }
  18595. this.aitype = type
  18596. this.aiCallBack = callback
  18597. this.aiText = this.aiJson.aiOutlineDetail2
  18598. } else if (type == "aiTask") {
  18599. this.aitype = "aiTask"
  18600. var _text = ""
  18601. for (var i = 0; i < this.teacherText.length; i++) {
  18602. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18603. }
  18604. // this.aiText = `请根据${_text}。`
  18605. this.aiText = this.aiJson.aiTask
  18606. this.aiCallBack = callback
  18607. } else if (type == "aiTask2") {
  18608. if (this.taskLoading[callback]) {
  18609. this.$message({
  18610. message: this.lang.ssPlsAnswer,
  18611. type: "warning"
  18612. });
  18613. return;
  18614. }
  18615. this.aitype = "aiTask2"
  18616. this.aiText = this.aiJson.aiTask
  18617. this.aiCallBack = [callback, index]
  18618. } else if (type == "aiTask3") {
  18619. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18620. this.$message({
  18621. message: this.lang.ssPlsAnswer,
  18622. type: "warning"
  18623. });
  18624. return;
  18625. }
  18626. this.aitype = type
  18627. this.aiText = this.aiJson.aiTaskG1
  18628. this.aiText2 = this.aiJson.aiTaskG2
  18629. this.aiText3 = this.aiJson.aiTaskG3
  18630. this.aiCallBack = [callback, index]
  18631. } else if (type == "aiTaskG3") {
  18632. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][2])) {
  18633. this.$message({
  18634. message: this.lang.ssPlsAnswer,
  18635. type: "warning"
  18636. });
  18637. return;
  18638. }
  18639. this.aitype = type
  18640. this.aiText = this.aiJson.aiTaskG3
  18641. this.aiCallBack = callback
  18642. } else if (type == "aiTaskG2") {
  18643. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][1])) {
  18644. this.$message({
  18645. message: this.lang.ssPlsAnswer,
  18646. type: "warning"
  18647. });
  18648. return;
  18649. }
  18650. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18651. this.$message({
  18652. message: this.lang.ssGenTaskPlan.replace(/\*/g, callback),
  18653. type: "warning"
  18654. });
  18655. return;
  18656. }
  18657. this.aitype = type
  18658. this.aiText = this.aiJson.aiTaskG2
  18659. this.aiCallBack = callback
  18660. } else if (type == "aiDetail1") {
  18661. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18662. this.$message({
  18663. message: this.lang.ssPlsAnswer,
  18664. type: "warning"
  18665. });
  18666. return;
  18667. }
  18668. this.aitype = "aiDetail1"
  18669. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18670. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18671. this.aiText = this.aiJson.aiDetail1
  18672. this.aiCallBack = callback
  18673. this.aiIndex = index
  18674. } else if (type == "aiDetail2") {
  18675. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18676. this.$message({
  18677. message: this.lang.ssPlsAnswer,
  18678. type: "warning"
  18679. });
  18680. return;
  18681. }
  18682. this.aitype = "aiDetail2"
  18683. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18684. this.aiText = this.aiJson.aiDetail2
  18685. this.aiCallBack = callback
  18686. this.aiIndex = index
  18687. } else if (type == "aiDetail3") {
  18688. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18689. this.$message({
  18690. message: this.lang.ssPlsAnswer,
  18691. type: "warning"
  18692. });
  18693. return;
  18694. }
  18695. this.aitype = "aiDetail3"
  18696. this.aiText = this.aiJson.aiDetail3
  18697. this.aiIndex = index + '-' + tindex
  18698. } else if (type == "aiDetail4") {
  18699. var _text = ""
  18700. if(callback && callback.length){
  18701. for (var i = 0; i < callback.length; i++) {
  18702. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18703. }
  18704. }
  18705. this.aitype = "aiDetail4"
  18706. this.aiText = this.aiJson.aiDetail4
  18707. this.aiIndex = index
  18708. } else if (type == "aiTeacher") {
  18709. this.aitype = "aiTeacher"
  18710. var _text = ""
  18711. for (var i = 0; i < this.dArray.length; i++) {
  18712. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18713. }
  18714. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18715. this.aiText = this.aiJson.aiTeacher
  18716. this.aiCallBack = callback
  18717. } else if (type == "aiTeacher2") {
  18718. if(this.ttaskDetailLoading5.length){
  18719. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18720. this.$message({
  18721. message: this.lang.ssPlanTaskNotGen.replace(/\*/g, num),
  18722. type: "warning"
  18723. });
  18724. return
  18725. }
  18726. this.aitype = "aiTeacher2"
  18727. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18728. } else if (type == "aiTeacher3") {
  18729. this.aitype = type
  18730. this.aiText = this.aiJson.aiCpoteTask
  18731. this.aiText2 = this.aiJson.teacherDetail2
  18732. } else if (type == "teacherDetail") {
  18733. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18734. this.$message({
  18735. message: this.lang.ssPlsAnswer,
  18736. type: "warning"
  18737. });
  18738. return;
  18739. }
  18740. this.aitype = "teacherDetail"
  18741. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18742. this.aiText = this.aiJson.teacherDetail
  18743. this.aiCallBack = callback
  18744. this.aiIndex = index
  18745. } else if (type == "teacherDetail2") {
  18746. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18747. this.$message.error(this.lang.ssEnterTask)
  18748. return;
  18749. }
  18750. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18751. // this.$message({
  18752. // message: "请回答完毕后再次发送",
  18753. // type: "warning"
  18754. // });
  18755. // return;
  18756. this.$confirm(this.lang.ssNotGenRegen, this.lang.ssTip, {
  18757. confirmButtonText: this.lang.ssConfirmRegen,
  18758. cancelButtonText: this.lang.ssCancel,
  18759. distinguishCancelAndClose: true,
  18760. type: "warning",
  18761. customClass: 'custom-confirm-box'
  18762. })
  18763. .then(() => {
  18764. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18765. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18766. this.isTeacherTaskCancelToken2[index] = null;
  18767. }
  18768. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18769. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18770. if(this.isTeacherTaskCancelSource[index]){
  18771. this.isTeacherTaskCancelSource[index].close()
  18772. this.isTeacherTaskCancelSource[index] = null
  18773. }
  18774. this.aitype = "teacherDetail2"
  18775. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18776. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18777. this.aiCallBack = callback
  18778. this.aiIndex = index
  18779. this.dialogVisibleAiD = true
  18780. }).catch((v) => {
  18781. console.log(v);
  18782. })
  18783. setTimeout(() => {
  18784. this.setTipsIndex()
  18785. }, 500)
  18786. return;
  18787. }else {
  18788. this.aitype = "teacherDetail2"
  18789. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18790. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18791. this.aiCallBack = callback
  18792. this.aiIndex = index
  18793. this.dialogVisibleAiD = true
  18794. }
  18795. } else if (type == "aiCpote1") {
  18796. if (this.cpotetLoading.cpote1) {
  18797. this.$message({
  18798. message: this.lang.ssPlsAnswer,
  18799. type: "warning"
  18800. });
  18801. return;
  18802. }
  18803. this.aitype = "aiCpote1"
  18804. this.aiText = this.aiJson.cpote1
  18805. this.aiCallBack = callback
  18806. } else if (type == "aiCpote2") {
  18807. if (this.cpotetLoading.cpote2) {
  18808. this.$message({
  18809. message: this.lang.ssPlsAnswer,
  18810. type: "warning"
  18811. });
  18812. return;
  18813. }
  18814. this.aitype = "aiCpote2"
  18815. this.aiText = this.aiJson.cpote2
  18816. this.aiCallBack = callback
  18817. } else if (type == "aiCpote3") {
  18818. if (this.cpotetLoading.cpote3) {
  18819. this.$message({
  18820. message: this.lang.ssPlsAnswer,
  18821. type: "warning"
  18822. });
  18823. return;
  18824. }
  18825. this.aitype = "aiCpote3"
  18826. this.aiText = this.aiJson.cpote3
  18827. this.aiCallBack = callback
  18828. } else if (type == "aiCpote4") {
  18829. if (this.cpotetLoading.cpote4) {
  18830. this.$message({
  18831. message: this.lang.ssPlsAnswer,
  18832. type: "warning"
  18833. });
  18834. return;
  18835. }
  18836. this.aitype = "aiCpote4"
  18837. this.aiText = this.aiJson.cpote4
  18838. this.aiCallBack = callback
  18839. } else if (type == 'aiteacherTextDetail'){
  18840. if (this.tteacherTextLoading) {
  18841. this.$message({
  18842. message: this.lang.ssPlsAnswer,
  18843. type: "warning"
  18844. });
  18845. return;
  18846. }
  18847. this.aitype = type
  18848. this.aiText = this.aiJson.aiAbstract
  18849. this.aiCallBack = callback
  18850. } else if (type == 'aitargetTextDetail'){
  18851. if (this.ttargetTextLoading) {
  18852. this.$message({
  18853. message: this.lang.ssPlsAnswer,
  18854. type: "warning"
  18855. });
  18856. return;
  18857. }
  18858. this.aitype = type
  18859. this.aiText = this.aiJson.aiTarget
  18860. this.aiCallBack = callback
  18861. } else if (type == 'aitargetTextDetail2'){
  18862. if (this.ttargetTextLoading2) {
  18863. this.$message({
  18864. message: this.lang.ssPlsAnswer,
  18865. type: "warning"
  18866. });
  18867. return;
  18868. }
  18869. this.aitype = type
  18870. this.aiText = this.aiJson.aiTarget2
  18871. this.aiCallBack = callback
  18872. } else if (type == 'aitargetTextDetail3'){
  18873. if (this.ttargetTextLoading2) {
  18874. this.$message({
  18875. message: this.lang.ssPlsAnswer,
  18876. type: "warning"
  18877. });
  18878. return;
  18879. }
  18880. if(!this.courseText){
  18881. this.$message.error(this.lang.ssGenDescTarget);
  18882. return;
  18883. }
  18884. this.$nextTick(() => {
  18885. const targetDiv = this.$refs.aitargetTextDetail3;
  18886. if (targetDiv) {
  18887. targetDiv.scrollIntoView();
  18888. }
  18889. });
  18890. this.aitype = type
  18891. this.aiText = this.aiJson.aiTargetGet
  18892. this.aiText2 = this.aiJson.aiTarget2
  18893. this.aiCallBack= callback
  18894. } else if (type == 'aiSearchFile'){
  18895. if(this.fileSLoading) {
  18896. this.$message({
  18897. message: this.lang.ssPlsAnswer,
  18898. type: "warning"
  18899. });
  18900. return;
  18901. }
  18902. this.aitype = type
  18903. this.aiText = this.aiJson.aiSearchFile
  18904. } else if (type == 'aiSearchFile2'){
  18905. if(this.fileSLoading) {
  18906. this.$message({
  18907. message: this.lang.ssPlsAnswer,
  18908. type: "warning"
  18909. });
  18910. return;
  18911. }
  18912. this.aitype = type
  18913. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18914. #输出样例
  18915. <学科1>:关键词
  18916. - 匹配到的内容1
  18917. - 匹配到的内容2
  18918. - 匹配到的内容3
  18919. - 匹配到的内容4
  18920. - 匹配到的内容5
  18921. <学科2>:关键词
  18922. - 匹配到的内容1
  18923. - 匹配到的内容2
  18924. - 匹配到的内容3
  18925. - 匹配到的内容4
  18926. - 匹配到的内容5
  18927. ...
  18928. <学科n>:关键词
  18929. - 匹配到的内容1
  18930. - 匹配到的内容2
  18931. - 匹配到的内容3
  18932. - 匹配到的内容4
  18933. - 匹配到的内容5
  18934. `
  18935. } else if (type == 'aiRateRule'){
  18936. this.aitype = type
  18937. this.aiText = this.aiJson.aiRateRule
  18938. this.aiCallBack = [callback, index]
  18939. } else if (type == 'aiRateRuleA'){
  18940. this.$confirm(this.lang.ssGenAllDim, this.lang.ssTip, {
  18941. confirmButtonText: this.lang.ssGenAll,
  18942. cancelButtonText: this.lang.ssGenThisTask,
  18943. distinguishCancelAndClose: true,
  18944. type: "warning",
  18945. })
  18946. .then(() => {
  18947. this.aitype = type
  18948. this.aiText = this.aiJson.aiRateRule
  18949. this.aiCallBack = [1,callback]
  18950. this.dialogVisibleAiD = true
  18951. }).catch((v) => {
  18952. console.log(v);
  18953. if (v == "cancel") {
  18954. this.aitype = type
  18955. this.aiText = this.aiJson.aiRateRule
  18956. this.aiCallBack = [2,callback]
  18957. this.dialogVisibleAiD = true
  18958. }
  18959. })
  18960. }
  18961. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18962. this.dialogVisibleAiD = true
  18963. }
  18964. },
  18965. async aiConfirm(msg,msg2,msg3) {
  18966. let sub = []
  18967. if (this.courseTypeId.length) {
  18968. for (var i = 0; i < this.courseTypeId.length; i++) {
  18969. let _sid = this.courseTypeId[i]
  18970. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18971. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18972. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18973. }
  18974. }
  18975. }
  18976. }
  18977. let mclass = []
  18978. if (this.courseTypeId.length) {
  18979. for (var i = 0; i < this.courseTypeId.length; i++) {
  18980. let _sid = this.courseTypeId[i]
  18981. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18982. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18983. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18984. }
  18985. }
  18986. }
  18987. }
  18988. let url = []
  18989. if (this.infoData.length) {
  18990. for (var i = 0; i < this.infoData.length; i++) {
  18991. url.push(this.infoData[i].url)
  18992. }
  18993. }
  18994. if (this.aitype == "aiDetail") {
  18995. this.detailYou(msg)
  18996. } else if (this.aitype == "aiOutline") {
  18997. this.loading = true
  18998. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18999. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19000. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  19001. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19002. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19003. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19004. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19005. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19006. if(this.languageSetting == 2){
  19007. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19008. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19009. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19010. }
  19011. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  19012. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19013. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19014. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19015. let message = `NOTICE
  19016. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19017. Output: Provide your output in json format.
  19018. Language: ${this.getLang()}
  19019. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19020. Instruction: Based on the context, follow "Format example", write content.
  19021. # Context
  19022. ## 要求
  19023. ${msg} 以及##参考资料
  19024. ## 参考资料
  19025. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19026. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19027. detail至少输出300tokens,markdown格式输出。
  19028. detail包含子教学目标、过程性成果、子评价标准
  19029. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19030. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19031. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19032. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  19033. # Format example`
  19034. message = message.replaceAll('\n', ' ')
  19035. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  19036. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  19037. // detail输出不要输出成json,文本或者markdown都可以
  19038. this.aiGet2(message, () => {
  19039. this.loading = false
  19040. this.isOutline = true
  19041. })
  19042. } else if (this.aitype == "aiOutline2") {
  19043. this.loading = true
  19044. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19045. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19046. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19047. let message = `NOTICE
  19048. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19049. Language: ${this.getLang()}
  19050. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19051. Instruction: Based on the context, follow "Format example", write content.
  19052. # Context
  19053. ## 要求
  19054. ${msg} 以及##参考资料
  19055. ## 参考资料
  19056. 课程名字:${this.courseName}
  19057. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  19058. ${sub.length ? '学科:' + sub.join(",") : ''}
  19059. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19060. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19061. # Format example
  19062. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  19063. this.aiGetTask2(message, () => {
  19064. this.loading = false
  19065. this.isOutline = true
  19066. })
  19067. } else if (this.aitype == "aiOutlineDetail2") {
  19068. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  19069. } else if (this.aitype == "aiTask") {
  19070. var _text = ""
  19071. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19072. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19073. }
  19074. let message = `NOTICE
  19075. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19076. Language: ${this.getLang()}
  19077. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19078. Instruction: Based on the context, follow "Format example", write content.
  19079. # Context
  19080. ## 要求
  19081. ${msg} 为**每个教学任务分别输出**以下内容。
  19082.  
  19083. ${(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','') : ''}
  19084. ## 参考资料
  19085. 教学任务教案:${_text}
  19086. ## 格式要求
  19087. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  19088. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19089. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19090. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19091. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19092. 出现选择题和问答题的概率提高
  19093. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  19094.  
  19095. # Format example
  19096. [{"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":"工具描述"}]}]`
  19097. this.loading = true
  19098. this.aiGet3(message, this.aiCallBack)
  19099. } else if (this.aitype == "aiTask2") {
  19100. if(this.aiCallBack[0] == 'all'){
  19101. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19102. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19103. let message = `NOTICE
  19104. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19105. Language: ${this.getLang()}
  19106. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19107. Instruction: Based on the context, follow "Format example", write content.
  19108. # Context
  19109. ## 要求
  19110. ${msg} 为教学任务分别输出以下内容。
  19111.  
  19112. ${(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','') : ''}
  19113. ## 参考资料
  19114. 教学任务教案:${_text}
  19115. ## 格式要求
  19116. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19117. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19118. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19119. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19120. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19121.  
  19122. # Format example
  19123. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19124. this.taskLoading[_task] = true
  19125. this.aiGet32(message, _task)
  19126. }
  19127. }else{
  19128. 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`
  19129. let message = `NOTICE
  19130. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19131. Language: ${this.getLang()}
  19132. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19133. Instruction: Based on the context, follow "Format example", write content.
  19134. # Context
  19135. ## 要求
  19136. ${msg} 为教学任务分别输出以下内容。
  19137.  
  19138. ${(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','') : ''}
  19139. ## 参考资料
  19140. 教学任务教案:${_text}
  19141. ## 格式要求
  19142. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19143. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19144. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19145. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19146. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19147.  
  19148. # Format example
  19149. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19150. this.taskLoading[this.aiCallBack[0]] = true
  19151. this.aiGet32(message, this.aiCallBack[0])
  19152. }
  19153. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19154. } else if (this.aitype == "aiTask3") {
  19155. if(this.aiCallBack[0] == 'all'){
  19156. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19157. if(!this.taskGLoading[_task]){
  19158. this.taskGLoading[_task] = []
  19159. this.ttaskGLoading[_task] = []
  19160. }
  19161. this.taskGLoading[_task][0] = true
  19162. this.ttaskGLoading[_task][0] = true
  19163. // this.taskGLoading[_task][1] = true
  19164. // this.taskGLoading[_task][2] = true
  19165. // this.aiGetG323(message3, _task)
  19166. }
  19167. let ij = 0;
  19168. let _this = this
  19169. function processNext() {
  19170. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19171. if(!_this.taskGLoading[ij][0]){
  19172. ij++;
  19173. processNext();
  19174. return;
  19175. }
  19176. let message1 = `NOTICE
  19177. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19178. Language: ${_this.getLang()}
  19179. # Context
  19180. ## 要求
  19181. ${msg}
  19182. ## 参考资料
  19183. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19184. # 输出格式与要求
  19185. 任务描述(告诉学生他们需要做什么):
  19186. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19187. # 范例
  19188. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19189. _this.aiGetG321L(message1, ij, (callback2) => {
  19190. // _this.aiGetG322(message2, ij, callback2);
  19191. callback2 ? callback2() : ''
  19192. }, () => {
  19193. // 回调函数,当前任务完成后执行
  19194. ij++;
  19195. processNext(); // 处理下一个任务
  19196. });
  19197. }
  19198. }
  19199. processNext(); // 启动处理
  19200. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19201. }else{
  19202. let message1 = `NOTICE
  19203. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19204. Language: ${this.getLang()}
  19205. # Context
  19206. ## 要求
  19207. ${msg}
  19208. ## 参考资料
  19209. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19210. # 输出格式与要求
  19211. 任务描述(告诉学生他们需要做什么):
  19212. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19213. # 范例
  19214. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19215. if(!this.taskGLoading[this.aiCallBack[0]]){
  19216. this.taskGLoading[this.aiCallBack[0]] = []
  19217. this.ttaskGLoading[this.aiCallBack[0]] = []
  19218. }
  19219. this.taskGLoading[this.aiCallBack[0]][0] = true
  19220. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19221. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19222. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19223. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19224. // this.aiGetG322(message2, this.aiCallBack[0])
  19225. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19226. })
  19227. // this.aiGetG323(message3, this.aiCallBack[0])
  19228. }
  19229. } else if (this.aitype == "aiTaskG3") {
  19230. let message3 = `NOTICE
  19231. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19232. Language: ${this.getLang()}
  19233. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19234. Instruction: Based on the context, follow "Format example", write content.
  19235. # Context
  19236. ## 要求
  19237. ${msg3}
  19238. ## 参考资料
  19239. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19240. # 输出格式与要求
  19241. 核心素养:从教案中提取
  19242. 目标:从教案中提取
  19243. 评价标准:从教案中提取评价标准
  19244. # Format example
  19245. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19246. if(!this.taskGLoading[this.aiCallBack]){
  19247. this.taskGLoading[this.aiCallBack] = []
  19248. }
  19249. this.taskGLoading[this.aiCallBack][2] = true
  19250. this.aiGetG323(message3, this.aiCallBack)
  19251. } else if (this.aitype == "aiTaskG2") {
  19252. if(this.aiCallBack == 'all'){
  19253. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19254. if(!this.taskGLoading[_task]){
  19255. this.taskGLoading[_task] = []
  19256. }
  19257. this.taskGLoading[_task][1] = true
  19258. }
  19259. let ij = 0;
  19260. let _this = this
  19261. function processNext() {
  19262. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19263. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19264. _this.taskGLoading[ij][1] = false
  19265. ij++;
  19266. processNext();
  19267. return;
  19268. }
  19269. let message2 = `NOTICE
  19270. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19271. Language: ${_this.getLang()}
  19272. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19273. Instruction: Based on the context, follow "Format example", write content.
  19274. # Context
  19275. ## 要求
  19276. ${msg2}
  19277. ## 参考资料
  19278. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19279. # 输出格式与要求
  19280. 互动工具列表
  19281. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19282. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19283. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19284. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19285. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19286. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19287. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19288. # Format example
  19289. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19290. _this.aiGetG322(message2, ij, () => {
  19291. // 回调函数,当前任务完成后执行
  19292. ij++;
  19293. processNext(); // 处理下一个任务
  19294. });
  19295. }
  19296. }
  19297. processNext(); // 启动处理
  19298. }else{
  19299. let message2 = `NOTICE
  19300. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19301. Language: ${this.getLang()}
  19302. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19303. Instruction: Based on the context, follow "Format example", write content.
  19304. # Context
  19305. ## 要求
  19306. ${msg2}
  19307. ## 参考资料
  19308. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19309. # 输出格式与要求
  19310. 互动工具列表
  19311. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19312. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19313. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19314. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19315. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19316. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19317. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19318. # Format example
  19319. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19320. if(!this.taskGLoading[this.aiCallBack]){
  19321. this.taskGLoading[this.aiCallBack] = []
  19322. }
  19323. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19324. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19325. this.taskGLoading[this.aiCallBack][1] = true
  19326. this.aiGetG322(message2, this.aiCallBack)
  19327. }
  19328. } else if (this.aitype == "aiDetail1") {
  19329. this.aiDetail(msg, this.aiIndex)
  19330. } else if (this.aitype == "aiDetail2") {
  19331. this.aiDetail2(msg, this.aiIndex)
  19332. } else if (this.aitype == "aiDetail3") {
  19333. let _index = this.aiIndex.split('-')
  19334. this.aiDetail3(msg, _index[0], _index[1])
  19335. } else if (this.aitype == "aiDetail4") {
  19336. this.aiDetail4(msg, this.aiIndex)
  19337. } else if (this.aitype == "teacherDetail") {
  19338. this.aiDetail5(msg, this.aiIndex)
  19339. } else if (this.aitype == "teacherDetail2") {
  19340. this.aiDetail52(msg, this.aiIndex)
  19341. } else if (this.aitype == "aiCpote1") {
  19342. this.aiCpote(msg, this.aiCallBack)
  19343. } else if (this.aitype == "aiCpote2") {
  19344. this.aiCpote(msg, this.aiCallBack)
  19345. } else if (this.aitype == "aiCpote3") {
  19346. this.aiCpote(msg, this.aiCallBack)
  19347. } else if (this.aitype == "aiCpote4") {
  19348. this.aiCpote(msg, this.aiCallBack)
  19349. } else if (this.aitype == "aiTeacher") {
  19350. this.loading = true
  19351. var _text = ""
  19352. for (var i = 0; i < this.dArray.length; i++) {
  19353. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19354. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19355. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19356. let message = ` NOTICE
  19357. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19358. Language: ${this.getLang()}
  19359. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19360. Instruction: Based on the context, follow "Format example", write content.
  19361. # Context
  19362. ## 要求
  19363. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19364. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19365. ${(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','') : ''}
  19366. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19367. ## Format example
  19368. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19369. this.aiGet4(message, () => {
  19370. this.loading = false
  19371. this.isOutline2 = true
  19372. })
  19373. } else if (this.aitype == "aiTeacher2"){
  19374. this.isOutline2 = true
  19375. let _this = this
  19376. setTimeout(()=>{
  19377. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19378. const _tindex = 'task-' + i;
  19379. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19380. _this.taskDetailLoading5.push(_tindex)
  19381. }
  19382. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19383. _this.ttaskDetailLoading5.push(_tindex)
  19384. }
  19385. // this.aiDetail52(msg, i)
  19386. }
  19387. let ij = 0;
  19388. function processNext() {
  19389. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19390. const _tindex = 'task-' + ij;
  19391. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19392. ij++;
  19393. processNext();
  19394. return;
  19395. }
  19396. // 处理当前任务
  19397. _this.aiDetail52(msg, ij, function () {
  19398. // 回调函数,当前任务完成后执行
  19399. ij++;
  19400. processNext(); // 处理下一个任务
  19401. });
  19402. }
  19403. }
  19404. processNext(); // 启动处理
  19405. }, 0)
  19406. } else if (this.aitype == "aiTeacher3"){
  19407. this.loading = true
  19408. let message = `NOTICE
  19409. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19410. Language: ${this.getLang()}
  19411. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19412. Instruction: Based on the context, follow "Format example", write content.
  19413. # Context
  19414. ## 要求
  19415. ${msg} 以及##参考资料
  19416. ## 参考资料
  19417. 任务簇:${this.cpote.cpote4}
  19418. # Format example
  19419. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19420. this.aiGetTask3(message, () => {
  19421. this.loading = false
  19422. this.isOutline2 = true
  19423. })
  19424. } else if (this.aitype == "aiteacherTextDetail") {
  19425. this.aiteacherTextDetail(msg)
  19426. } else if (this.aitype == "aitargetTextDetail") {
  19427. this.aitargetTextDetail(msg)
  19428. } else if (this.aitype == "aitargetTextDetail2") {
  19429. this.aitargetTextDetail2(msg)
  19430. } else if (this.aitype == "aitargetTextDetail3") {
  19431. this.aitargetTextDetail3(msg)
  19432. } else if (this.aitype == 'aiSearchFile'){
  19433. let messages = `NOTICE
  19434. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19435. Language: ${this.getLang()}
  19436. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19437. Instruction: Based on the context, follow "Format example", write content.
  19438. ## 参考资料
  19439. 关键词:${this.courseName}
  19440. # Context
  19441. ## 要求
  19442. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19443. # Format example
  19444. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19445. this.fileSLoading = true
  19446. this.aiSearchFile(messages,()=>{
  19447. this.fileSLoading = false
  19448. })
  19449. } else if (this.aitype == 'aiSearchFile2'){
  19450. let messages = `${msg}
  19451. 课程名字:${this.courseName}
  19452. ${sub.length ? '学科:' + sub.join(",") : ''}
  19453. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19454. this.fileSLoading = true
  19455. this.aiSearchFile2(messages,()=>{
  19456. this.fileSLoading = false
  19457. })
  19458. } else if (this.aitype == 'aiRateRule'){
  19459. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19460. } else if (this.aitype == 'aiRateRuleA'){
  19461. if(this.aiCallBack[0] == 1){
  19462. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19463. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19464. for(var k = 0; k < task.eList.length; k++){
  19465. if(!task.eList[k].rule){
  19466. this.againEva(msg, i, k)
  19467. }
  19468. }
  19469. }
  19470. }else if(this.aiCallBack[0] == 2){
  19471. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19472. for(var k = 0; k < task.eList.length; k++){
  19473. if(!task.eList[k].rule){
  19474. this.againEva(msg, this.aiCallBack[1], k)
  19475. }
  19476. }
  19477. }
  19478. }
  19479. this.setAiJson(this.aitype, msg, msg2, msg3)
  19480. },
  19481. getLang(){
  19482. let lang = ''
  19483. if(this.languageSetting == 0){
  19484. lang = 'Chinese.'
  19485. }else if(this.languageSetting == 1){
  19486. lang = 'Traditional Chinese.'
  19487. }else if(this.languageSetting == 2){
  19488. lang = 'English.'
  19489. }
  19490. return lang
  19491. },
  19492. detailYou(message) {
  19493. this.textLoading = true
  19494. this.ttextLoading = true
  19495. let sub = []
  19496. if (this.courseTypeId.length) {
  19497. for (var i = 0; i < this.courseTypeId.length; i++) {
  19498. let _sid = this.courseTypeId[i]
  19499. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19500. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19501. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19502. }
  19503. }
  19504. }
  19505. }
  19506. let mclass = []
  19507. if (this.courseTypeId.length) {
  19508. for (var i = 0; i < this.courseTypeId.length; i++) {
  19509. let _sid = this.courseTypeId[i]
  19510. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19511. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19512. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19513. }
  19514. }
  19515. }
  19516. }
  19517. let url = []
  19518. if (this.infoData.length) {
  19519. for (var i = 0; i < this.infoData.length; i++) {
  19520. url.push(this.infoData[i].url)
  19521. }
  19522. }
  19523. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19524. // --------
  19525. // ## 补充参考资料
  19526. // 补充资料:${url.join(",")}
  19527. // 补充描述:${this.courseText2} ##补充参考资料和
  19528. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19529. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19530. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19531. let msg = `NOTICE
  19532. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19533. Language: ${this.getLang()}
  19534. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19535. Instruction: Based on the context, follow "Format example", write content.
  19536. #Context
  19537. ## 参考资料
  19538. 课程名字:${this.courseName}
  19539. ${sub.length ? '学科:' + sub.join(",") : ''}
  19540. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19541. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19542. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19543. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19544. ## 要求
  19545. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19546. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19547. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19548. this.aiGet(msg)
  19549. },
  19550. setUnitJson() {
  19551. 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 }] }
  19552. this.$forceUpdate()
  19553. },
  19554. async aiGet(messages) {
  19555. let _this = this
  19556. let fileid = []
  19557. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19558. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19559. if(_this.cankaoInfoData[i].fileid){
  19560. fileid.push(_this.cankaoInfoData[i].fileid)
  19561. }else {
  19562. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19563. if(_fileid){
  19564. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19565. _this.$forceUpdate();
  19566. if(_fileid != 1){
  19567. fileid.push(_fileid)
  19568. }
  19569. }
  19570. }
  19571. }
  19572. if(this.mode == 1){
  19573. for (var i = 0; i < _this.infoData.length; i++) {
  19574. if(_this.infoData[i].fileid){
  19575. fileid.push(_this.infoData[i].fileid)
  19576. }else {
  19577. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19578. if(_fileid){
  19579. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19580. _this.$forceUpdate();
  19581. if(_fileid != 1){
  19582. fileid.push(_fileid)
  19583. }
  19584. }
  19585. }
  19586. }
  19587. }
  19588. } else {
  19589. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19590. fileid = [...fileid]
  19591. if (_this.infoData.length) {
  19592. for (var i = 0; i < _this.infoData.length; i++) {
  19593. if(_this.infoData[i].fileid){
  19594. fileid.push(_this.infoData[i].fileid)
  19595. }else {
  19596. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19597. if(_fileid){
  19598. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19599. _this.$forceUpdate();
  19600. if(_fileid != 1){
  19601. fileid.push(_fileid)
  19602. }
  19603. }
  19604. }
  19605. }
  19606. }
  19607. }
  19608. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19609. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19610. let _uuid = uuidv4();
  19611. // let params = JSON.stringify({
  19612. // // "model": "Chat",
  19613. // model: 'gpt-3.5-turbo',
  19614. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19615. // max_tokens: 4096,
  19616. // top_p: 1,
  19617. // frequency_penalty: 0,
  19618. // presence_penalty: 0,
  19619. // messages: [{
  19620. // content: messages,
  19621. // role: 'user'
  19622. // }],
  19623. // uid: _uuid,
  19624. // mind_map_question: "",
  19625. // })
  19626. let params = {
  19627. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19628. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19629. session_name: _uuid,
  19630. userId: _this.userid,
  19631. uid: _uuid,
  19632. file_ids: fileid.length ? [...fileid] : '',
  19633. model: 'gpt-4o-2024-11-20',
  19634. temperature: this.mode == 3 ? 0.5 : 0.1,
  19635. }
  19636. // let params = JSON.stringify({
  19637. // message: {
  19638. // anthropic_version: "bedrock-2023-05-31",
  19639. // max_tokens: 4096,
  19640. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19641. // top_p: 1,
  19642. // messages: [{
  19643. // "role": "user",
  19644. // "content": messages
  19645. // }] ,
  19646. // },
  19647. // uid: _uuid,
  19648. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19649. // });
  19650. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19651. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19652. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19653. console.log(response);
  19654. // let data = response.data.FunctionResponse
  19655. // if (data.choices && data.choices.length && data.choices[0].message) {
  19656. // _this.courseText = data.choices[0].message.content
  19657. // }
  19658. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19659. } else {
  19660. _this.$message.warning(response.data.FunctionResponse.result);
  19661. }
  19662. _this.isTextCancelToken = null
  19663. }).catch(function (error) {
  19664. _this.textLoading = false
  19665. _this.ttextLoading = false
  19666. _this.isTextCancelToken = null
  19667. if(error && error.message != 'Request canceled by the user.'){
  19668. _this.$message.error(_this.lang.ssTooManyReq)
  19669. }
  19670. console.log(error);
  19671. });
  19672. await _this.aiGetgetAiContent(_uuid)
  19673. },
  19674. aiGetgetAiContent(_uid) {
  19675. try {
  19676. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19677. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19678. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19679. } catch(error){
  19680. console.log('EventSource error:', error);
  19681. this.$message.error(this.lang.ssTooManyReq)
  19682. this.textLoading = false
  19683. this.ttextLoading = false
  19684. this.isTextCancelToken = null
  19685. return;
  19686. }
  19687. let _allText = "";
  19688. let _mdText = "";
  19689. let _iindex = 0
  19690. this.isTextCancelSource.onmessage = _e => {
  19691. let _eData = JSON.parse(_e.data).content;
  19692. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19693. //对话已经完成
  19694. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19695. this.isTextCancelSource.close();
  19696. this.isTextCancelSource = null;
  19697. this.courseText = _mdText;
  19698. this.textLoading = false
  19699. this.ttextLoading = false
  19700. this.courseTextB = false
  19701. this.isTextCancelToken = null
  19702. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19703. this.saveCourse()
  19704. return;
  19705. } else {
  19706. _iindex++
  19707. //对话还在继续
  19708. let _text = "";
  19709. _text = _eData.replaceAll("'", "");
  19710. if (_allText == "") {
  19711. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19712. } else {
  19713. _allText += _text;
  19714. }
  19715. _mdText = _allText + "_";
  19716. _mdText = _mdText.replace(/\\n/g, "\n");
  19717. _mdText = _mdText.replace(/\\/g, "");
  19718. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19719. //转化返回的回复流数据
  19720. if(_iindex == 10){
  19721. this.courseText = _mdText;
  19722. _iindex = 0
  19723. }
  19724. this.textLoading = false
  19725. // 处理流数据
  19726. }
  19727. // this.$forceUpdate();
  19728. };
  19729. let _this = this
  19730. this.isTextCancelSource.onerror = function(event) {
  19731. // 处理错误,可以尝试重新连接
  19732. console.log('EventSource error:', event);
  19733. _this.$message.error(_this.lang.ssTooManyReq)
  19734. _this.textLoading = false
  19735. _this.ttextLoading = false
  19736. _this.isTextCancelToken = null
  19737. _this.isTextCancelSource.close();
  19738. _this.isTextCancelSource = null;
  19739. };
  19740. },
  19741. numberToChinese(number) {
  19742. const chineseNum = [this.lang.ssZero, this.lang.ssOne, this.lang.ssTwo, this.lang.ssThree, this.lang.ssFour, this.lang.ssFive, this.lang.ssSix, this.lang.ssSeven, this.lang.ssEight, this.lang.ssNine];
  19743. const chineseUnit = ['', this.lang.ssTen, this.lang.ssHundred, this.lang.ssThousand, this.lang.ssTenThousand, this.lang.ssTen, this.lang.ssHundred, this.lang.ssThousand, this.lang.ssHundredMillion, this.lang.ssTen, this.lang.ssHundred, this.lang.ssThousand];
  19744. let result = '';
  19745. let num = parseInt(number, 10);
  19746. let i = 0;
  19747. while (num > 0) {
  19748. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19749. num = Math.floor(num / 10);
  19750. i++;
  19751. }
  19752. // 去除连续的零,保留一个零
  19753. result = result.replace(new RegExp(this.lang.ssZero + '+', 'g'), this.lang.ssZero);
  19754. return result;
  19755. },
  19756. async aiGet2(messages, callback) {
  19757. let _this = this
  19758. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19759. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19760. if (_this.infoData.length) {
  19761. for (var i = 0; i < _this.infoData.length; i++) {
  19762. if(_this.infoData[i].fileid){
  19763. fileid.push(_this.infoData[i].fileid)
  19764. }else {
  19765. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19766. if(_fileid){
  19767. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19768. _this.$forceUpdate();
  19769. if(_fileid != 1){
  19770. fileid.push(_fileid)
  19771. }
  19772. }
  19773. }
  19774. }
  19775. }
  19776. console.log('fileid=========',fileid)
  19777. // let params = JSON.stringify({
  19778. // // "model": "Chat",
  19779. // model: 'gpt-3.5-turbo',
  19780. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19781. // max_tokens: 4096,
  19782. // top_p: 1,
  19783. // frequency_penalty: 0,
  19784. // presence_penalty: 0,
  19785. // messages: [{
  19786. // content: messages,
  19787. // role: 'user'
  19788. // }],
  19789. // stream: false,
  19790. // uid: this.userid,
  19791. // mind_map_question: "",
  19792. // })
  19793. // // let params = JSON.stringify({
  19794. // // message: {
  19795. // // anthropic_version: "bedrock-2023-05-31",
  19796. // // max_tokens: 4096,
  19797. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19798. // // top_p: 1,
  19799. // // messages: [{
  19800. // // content: messages,
  19801. // // role: 'user'
  19802. // // }], //
  19803. // // },
  19804. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19805. // // });
  19806. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19807. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19808. // console.log(response);
  19809. // let data = response.data.FunctionResponse
  19810. // if (data.choices && data.choices.length && data.choices[0].message) {
  19811. // console.log(data.choices[0].message.content);
  19812. // let dArray = JSON.parse(data.choices[0].message.content)
  19813. // _this.dArray = dArray
  19814. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19815. // for (var i = 0; i < dArray.length; i++) {
  19816. // let _task = dArray[i]
  19817. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19818. // task: _task.task,
  19819. // taskDetail: "",
  19820. // taskDetail2: _task.detail,
  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. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19844. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19845. // _this.$forceUpdate();
  19846. // }
  19847. // // if (data.result) {
  19848. // // console.log(data.result);
  19849. // // let dArray = JSON.parse(data.result)
  19850. // // _this.dArray = dArray
  19851. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19852. // // for (var i = 0; i < dArray.length; i++) {
  19853. // // let _task = dArray[i]
  19854. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19855. // // task: _task.task,
  19856. // // taskDetail: "",
  19857. // // taskDetail2: _task.detail,
  19858. // // taskDetail3: "",
  19859. // // chapterData: [],
  19860. // // toolText: "",
  19861. // // toolChoose: [
  19862. // // {
  19863. // // tool: [],
  19864. // // toolDetail: "",
  19865. // // toolType: 0,
  19866. // // askCount: 1,
  19867. // // askTitle: "",
  19868. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19869. // // },
  19870. // // ],
  19871. // // isShowTools: false,
  19872. // // askCount: 1,
  19873. // // isFold: 1,
  19874. // // askTitle: "",
  19875. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19876. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19877. // // homeworkList: [],
  19878. // // })
  19879. // // }
  19880. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19881. // // _this.$forceUpdate();
  19882. // // }
  19883. // callback ? callback() : ''
  19884. // }).catch(function (error) {
  19885. // _this.loading = false
  19886. // console.log(error);
  19887. // });
  19888. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19889. let parm = {
  19890. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19891. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19892. session_name: uuidv4(),
  19893. userId: this.userid,
  19894. file_ids: fileid.length ? [...fileid] : '',
  19895. model: 'gpt-4o-2024-11-20',
  19896. temperature: this.mode == 3 ? 0.5 : 0.1,
  19897. }
  19898. this.ajax
  19899. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19900. .then((response) => {
  19901. console.log(response);
  19902. let data = response.data.FunctionResponse
  19903. if (data.message) {
  19904. console.log(data.message);
  19905. let dArray = {}
  19906. try {
  19907. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19908. } catch (error) {
  19909. console.log("error_________________" + error);
  19910. try {
  19911. let regex = new RegExp(/```json([\s\S]*?)```/);
  19912. let match = data.message.match(regex);
  19913. dArray = JSON.parse(match[1]);
  19914. // var message = data.message;
  19915. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19916. // var jsonEnd = message.indexOf("```", jsonStart);
  19917. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19918. // dArray = JSON.parse(jsonString);
  19919. } catch (error) {
  19920. try {
  19921. let regex = new RegExp(/```json([\s\S]*?)```/);
  19922. let match = data.message.match(regex);
  19923. // eval("var aaa = " + match[0])
  19924. if(match && match[1]){
  19925. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19926. }else {
  19927. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19928. }
  19929. } catch (error) {
  19930. _this.$message.error(_this.lang.ssJsonFormat)
  19931. // +data.message
  19932. // _this.aiGet2(messages, callback);
  19933. _this.loading = false
  19934. _this.isOutlineCancelToken = null
  19935. console.log("error_________________" + error);
  19936. return;
  19937. }
  19938. console.log("error_________________" + error);
  19939. }
  19940. }
  19941. _this.dArray = dArray
  19942. console.log(dArray)
  19943. if(_this.panOutline() > 0){
  19944. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19945. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19946. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19947. }
  19948. for (var i = 0; i < dArray.length; i++) {
  19949. let _task = dArray[i]
  19950. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19951. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')+(_task.task2 ? _this.lang.ssColon+_task.task2 : "")
  19952. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19953. }else {
  19954. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19955. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')+(_task.task2 ? _this.lang.ssColon+_task.task2 : ""),
  19956. taskDetail: "",
  19957. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19958. taskDetail3: "",
  19959. chapterData: [],
  19960. toolText: "",
  19961. toolChoose: [
  19962. {
  19963. tool: [],
  19964. toolDetail: "",
  19965. toolType: 0,
  19966. askCount: 1,
  19967. askTitle: "",
  19968. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19969. },
  19970. ],
  19971. isShowTools: false,
  19972. askCount: 1,
  19973. isFold: 0,
  19974. askTitle: "",
  19975. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19976. checkJson: [{ checkCount: [], checkPerent: [] }],
  19977. homeworkList: [],
  19978. })
  19979. }
  19980. }
  19981. }else {
  19982. _this.unitJson[0].chapterInfo[0].taskJson = []
  19983. for (var i = 0; i < dArray.length; i++) {
  19984. let _task = dArray[i]
  19985. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19986. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')+(_task.task2 ? _this.lang.ssColon+_task.task2 : ""),
  19987. taskDetail: "",
  19988. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19989. taskDetail3: "",
  19990. chapterData: [],
  19991. toolText: "",
  19992. toolChoose: [
  19993. {
  19994. tool: [],
  19995. toolDetail: "",
  19996. toolType: 0,
  19997. askCount: 1,
  19998. askTitle: "",
  19999. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20000. },
  20001. ],
  20002. isShowTools: false,
  20003. askCount: 1,
  20004. isFold: 0,
  20005. askTitle: "",
  20006. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20007. checkJson: [{ checkCount: [], checkPerent: [] }],
  20008. homeworkList: [],
  20009. })
  20010. }
  20011. }
  20012. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20013. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20014. _this.$forceUpdate();
  20015. _this.saveCourse()
  20016. }
  20017. callback ? callback() : ''
  20018. _this.isOutlineCancelToken = null
  20019. })
  20020. .catch((error) => {
  20021. _this.loading = false
  20022. _this.isOutlineCancelToken = null
  20023. console.log(error);
  20024. });
  20025. },
  20026. cancelAjax(type, index){
  20027. if (this.isOutlineCancelToken && type == 'outline') {
  20028. this.$message.success(this.lang.ssStopOutline)
  20029. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  20030. this.isOutlineCancelToken = null;
  20031. this.loading = false
  20032. }
  20033. if (this.isFileCancelToken && type == 'file') {
  20034. this.$message.success(this.lang.ssStopFileGen)
  20035. this.isFileCancelToken.cancel('Request canceled by the user.');
  20036. this.isFileCancelToken = null;
  20037. this.fileSLoading = false
  20038. }
  20039. if(this.isTextCancelToken && type == 'text'){
  20040. this.$message.success(this.lang.ssStopAIOpt)
  20041. this.isTextCancelToken.cancel('Request canceled by the user.');
  20042. this.isTextCancelToken = null;
  20043. this.textLoading = false
  20044. this.ttextLoading = true
  20045. if(this.isTextCancelSource){
  20046. this.isTextCancelSource.close()
  20047. this.isTextCancelSource = null
  20048. }
  20049. }
  20050. if(this.isTargetCancelToken2 && type == 'target2'){
  20051. this.$message.success(this.lang.ssStopGenTarget)
  20052. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  20053. this.isTargetCancelToken2 = null;
  20054. this.targetTextLoading2 = false
  20055. this.ttargetTextLoading2 = false
  20056. if(this.isTargetCancelSource2){
  20057. this.isTargetCancelSource2.close()
  20058. this.isTargetCancelSource2 = null
  20059. }
  20060. this.$nextTick(() => {
  20061. const targetDiv = this.$refs.aitargetTextDetail3;
  20062. if (targetDiv) {
  20063. targetDiv.scrollIntoView();
  20064. }
  20065. });
  20066. }
  20067. if(this.isTargetCancelToken1 && type == 'target1'){
  20068. this.$message.success(this.lang.ssStopGenTarget)
  20069. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  20070. this.isTargetCancelToken1 = null;
  20071. this.targetTextLoading = false
  20072. this.ttargetTextLoading = false
  20073. if(this.isTargetCancelSource1){
  20074. this.isTargetCancelSource1.close()
  20075. this.isTargetCancelSource1 = null
  20076. }
  20077. }
  20078. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  20079. this.$message.success(this.lang.ssStopExtract)
  20080. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  20081. this.isTeacherTextCancelToken = null;
  20082. this.teacherTextLoading = false
  20083. this.tteacherTextLoading = false
  20084. if(this.isTeacherTextCancelSource){
  20085. this.isTeacherTextCancelSource.close()
  20086. this.isTeacherTextCancelSource = null
  20087. }
  20088. }
  20089. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  20090. this.$message.success(this.lang.ssStopGenPlan)
  20091. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  20092. this.isTeacherTaskCancelToken = null;
  20093. this.loading = false
  20094. }
  20095. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  20096. this.$message.success(this.lang.ssStopGenOut)
  20097. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  20098. this.isOutlineTaskCancelToken[index] = null;
  20099. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  20100. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  20101. if(this.isOutlineTaskCancelSource[index]){
  20102. this.isOutlineTaskCancelSource[index].close()
  20103. this.isOutlineTaskCancelSource[index] = null
  20104. }
  20105. }
  20106. if(type == 'teacherDetail2'){
  20107. this.$message.success(this.lang.ssStopGenPlan)
  20108. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  20109. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  20110. this.isTeacherTaskCancelToken2[index] = null;
  20111. }
  20112. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  20113. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  20114. }
  20115. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  20116. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  20117. }
  20118. if(this.isTeacherTaskCancelSource[index]){
  20119. this.isTeacherTaskCancelSource[index].close()
  20120. this.isTeacherTaskCancelSource[index] = null
  20121. }
  20122. }
  20123. if(type == 'aiTaskGL1'){
  20124. this.$message.success(this.lang.ssStopTaskOver)
  20125. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  20126. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  20127. this.taskCancelToken1[index] = null;
  20128. }
  20129. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  20130. this.taskGLoading[index][0] = false
  20131. }
  20132. if(this.isTaskCancelSource1[index]){
  20133. this.isTaskCancelSource1[index].close()
  20134. this.isTaskCancelSource1[index] = null
  20135. }
  20136. setTimeout(() => {
  20137. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  20138. this.cancelAjax('aiTaskGL2', index)
  20139. }
  20140. }, 1000)
  20141. this.$forceUpdate()
  20142. }
  20143. if(type == 'aiTaskGL2'){
  20144. this.$message.success(this.lang.ssStopTaskTool)
  20145. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  20146. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  20147. this.taskCancelToken2[index] = null;
  20148. }
  20149. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  20150. this.taskGLoading[index][1] = false
  20151. }
  20152. this.$forceUpdate()
  20153. }
  20154. if(type == 'taskAn'){
  20155. this.$message.success(this.lang.ssStopTaskOver)
  20156. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  20157. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  20158. this.taskAnCancelToken[index] = null;
  20159. }
  20160. if(this.taskAnLoading[index]){
  20161. this.taskAnLoading[index] = false
  20162. }
  20163. this.$forceUpdate()
  20164. }
  20165. if(type == 'findMatchingContents'){
  20166. this.$message.success(this.lang.ssStopSearch)
  20167. if(this.isfindMatchingContents){
  20168. this.isfindMatchingContents.cancel('Request canceled by the user.');
  20169. this.isfindMatchingContents = null;
  20170. }
  20171. if(this.knowInfoDataLoading){
  20172. this.knowInfoDataLoading = false
  20173. }
  20174. if(this.findMatchingContentsPage > 1){
  20175. this.findMatchingContentsPage --
  20176. }
  20177. this.$forceUpdate()
  20178. }
  20179. },
  20180. async aiGetTask2(messages, callback) {
  20181. let _this = this
  20182. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20183. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20184. if (_this.infoData.length) {
  20185. for (var i = 0; i < _this.infoData.length; i++) {
  20186. if(_this.infoData[i].fileid){
  20187. fileid.push(_this.infoData[i].fileid)
  20188. }else {
  20189. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20190. if(_fileid){
  20191. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20192. _this.$forceUpdate();
  20193. if(_fileid != 1){
  20194. fileid.push(_fileid)
  20195. }
  20196. }
  20197. }
  20198. }
  20199. }
  20200. console.log('fileid=========',fileid)
  20201. // let params = JSON.stringify({
  20202. // // "model": "Chat",
  20203. // model: 'gpt-3.5-turbo',
  20204. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20205. // max_tokens: 4096,
  20206. // top_p: 1,
  20207. // frequency_penalty: 0,
  20208. // presence_penalty: 0,
  20209. // messages: [{
  20210. // content: messages,
  20211. // role: 'user'
  20212. // }],
  20213. // stream: false,
  20214. // uid: this.userid,
  20215. // mind_map_question: "",
  20216. // })
  20217. // // let params = JSON.stringify({
  20218. // // message: {
  20219. // // anthropic_version: "bedrock-2023-05-31",
  20220. // // max_tokens: 4096,
  20221. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20222. // // top_p: 1,
  20223. // // messages: [{
  20224. // // content: messages,
  20225. // // role: 'user'
  20226. // // }], //
  20227. // // },
  20228. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20229. // // });
  20230. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20231. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20232. // console.log(response);
  20233. // let data = response.data.FunctionResponse
  20234. // if (data.choices && data.choices.length && data.choices[0].message) {
  20235. // console.log(data.choices[0].message.content);
  20236. // let dArray = JSON.parse(data.choices[0].message.content)
  20237. // _this.dArray = dArray
  20238. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20239. // for (var i = 0; i < dArray.length; i++) {
  20240. // let _task = dArray[i]
  20241. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20242. // task: _task.task,
  20243. // taskDetail: "",
  20244. // taskDetail2: _task.detail,
  20245. // taskDetail3: "",
  20246. // chapterData: [],
  20247. // toolText: "",
  20248. // toolChoose: [
  20249. // {
  20250. // tool: [],
  20251. // toolDetail: "",
  20252. // toolType: 0,
  20253. // askCount: 1,
  20254. // askTitle: "",
  20255. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20256. // },
  20257. // ],
  20258. // isShowTools: false,
  20259. // askCount: 1,
  20260. // isFold: 0,
  20261. // askTitle: "",
  20262. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20263. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20264. // homeworkList: [],
  20265. // })
  20266. // }
  20267. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20268. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20269. // _this.$forceUpdate();
  20270. // }
  20271. // // if (data.result) {
  20272. // // console.log(data.result);
  20273. // // let dArray = JSON.parse(data.result)
  20274. // // _this.dArray = dArray
  20275. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20276. // // for (var i = 0; i < dArray.length; i++) {
  20277. // // let _task = dArray[i]
  20278. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20279. // // task: _task.task,
  20280. // // taskDetail: "",
  20281. // // taskDetail2: _task.detail,
  20282. // // taskDetail3: "",
  20283. // // chapterData: [],
  20284. // // toolText: "",
  20285. // // toolChoose: [
  20286. // // {
  20287. // // tool: [],
  20288. // // toolDetail: "",
  20289. // // toolType: 0,
  20290. // // askCount: 1,
  20291. // // askTitle: "",
  20292. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20293. // // },
  20294. // // ],
  20295. // // isShowTools: false,
  20296. // // askCount: 1,
  20297. // // isFold: 1,
  20298. // // askTitle: "",
  20299. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20300. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20301. // // homeworkList: [],
  20302. // // })
  20303. // // }
  20304. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20305. // // _this.$forceUpdate();
  20306. // // }
  20307. // callback ? callback() : ''
  20308. // }).catch(function (error) {
  20309. // _this.loading = false
  20310. // console.log(error);
  20311. // });
  20312. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20313. let parm = {
  20314. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20315. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20316. session_name: uuidv4(),
  20317. userId: this.userid,
  20318. file_ids: fileid.length ? [...fileid] : '',
  20319. model: 'gpt-4o-2024-11-20',
  20320. temperature: this.mode == 3 ? 0.5 : 0.1,
  20321. }
  20322. this.ajax
  20323. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20324. .then((response) => {
  20325. console.log(response);
  20326. let data = response.data.FunctionResponse
  20327. if (data.message) {
  20328. console.log(data.message);
  20329. let dArray = {}
  20330. try {
  20331. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20332. } catch (error) {
  20333. console.log("error_________________" + error);
  20334. try {
  20335. let regex = new RegExp(/```json([\s\S]*?)```/);
  20336. let match = data.message.match(regex);
  20337. dArray = JSON.parse(match[1]);
  20338. // var message = data.message;
  20339. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20340. // var jsonEnd = message.indexOf("```", jsonStart);
  20341. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20342. // dArray = JSON.parse(jsonString);
  20343. } catch (error) {
  20344. try {
  20345. let regex = new RegExp(/```json([\s\S]*?)```/);
  20346. let match = data.message.match(regex);
  20347. // eval("var aaa = " + match[0])
  20348. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20349. } catch (error) {
  20350. console.log("error_________________" + error);
  20351. }
  20352. console.log("error_________________" + error);
  20353. }
  20354. }
  20355. _this.dArray = dArray
  20356. if(_this.panOutline() > 0){
  20357. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20358. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20359. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20360. }
  20361. for (var i = 0; i < dArray.length; i++) {
  20362. let _task = dArray[i]
  20363. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20364. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')
  20365. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20366. }else {
  20367. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20368. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20369. taskDetail: "",
  20370. taskDetail2: "",
  20371. taskDetail3: "",
  20372. chapterData: [],
  20373. toolText: "",
  20374. toolChoose: [
  20375. {
  20376. tool: [],
  20377. toolDetail: "",
  20378. toolType: 0,
  20379. askCount: 1,
  20380. askTitle: "",
  20381. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20382. },
  20383. ],
  20384. isShowTools: false,
  20385. askCount: 1,
  20386. isFold: 0,
  20387. askTitle: "",
  20388. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20389. checkJson: [{ checkCount: [], checkPerent: [] }],
  20390. homeworkList: [],
  20391. })
  20392. }
  20393. }
  20394. }else {
  20395. _this.unitJson[0].chapterInfo[0].taskJson = []
  20396. for (var i = 0; i < dArray.length; i++) {
  20397. let _task = dArray[i]
  20398. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20399. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20400. taskDetail: "",
  20401. taskDetail2: "",
  20402. taskDetail3: "",
  20403. chapterData: [],
  20404. toolText: "",
  20405. toolChoose: [
  20406. {
  20407. tool: [],
  20408. toolDetail: "",
  20409. toolType: 0,
  20410. askCount: 1,
  20411. askTitle: "",
  20412. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20413. },
  20414. ],
  20415. isShowTools: false,
  20416. askCount: 1,
  20417. isFold: 0,
  20418. askTitle: "",
  20419. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20420. checkJson: [{ checkCount: [], checkPerent: [] }],
  20421. homeworkList: [],
  20422. })
  20423. }
  20424. }
  20425. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20426. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20427. _this.$forceUpdate();
  20428. _this.saveCourse()
  20429. setTimeout(()=>{
  20430. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20431. this.aiOutlineDetail('', i)
  20432. }
  20433. }, 0)
  20434. }
  20435. callback ? callback() : ''
  20436. _this.isOutlineCancelToken = null
  20437. })
  20438. .catch((error) => {
  20439. _this.loading = false
  20440. _this.isOutlineCancelToken = null
  20441. console.log(error);
  20442. });
  20443. },
  20444. async aiGetTask3(messages, callback) {
  20445. let _this = this
  20446. // let params = JSON.stringify({
  20447. // // "model": "Chat",
  20448. // model: 'gpt-3.5-turbo',
  20449. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20450. // max_tokens: 4096,
  20451. // top_p: 1,
  20452. // frequency_penalty: 0,
  20453. // presence_penalty: 0,
  20454. // messages: [{
  20455. // content: messages,
  20456. // role: 'user'
  20457. // }],
  20458. // stream: false,
  20459. // uid: this.userid,
  20460. // mind_map_question: "",
  20461. // })
  20462. // // let params = JSON.stringify({
  20463. // // message: {
  20464. // // anthropic_version: "bedrock-2023-05-31",
  20465. // // max_tokens: 4096,
  20466. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20467. // // top_p: 1,
  20468. // // messages: [{
  20469. // // content: messages,
  20470. // // role: 'user'
  20471. // // }], //
  20472. // // },
  20473. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20474. // // });
  20475. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20476. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20477. // console.log(response);
  20478. // let data = response.data.FunctionResponse
  20479. // if (data.choices && data.choices.length && data.choices[0].message) {
  20480. // console.log(data.choices[0].message.content);
  20481. // let dArray = JSON.parse(data.choices[0].message.content)
  20482. // _this.dArray = dArray
  20483. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20484. // for (var i = 0; i < dArray.length; i++) {
  20485. // let _task = dArray[i]
  20486. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20487. // task: _task.task,
  20488. // taskDetail: "",
  20489. // taskDetail2: _task.detail,
  20490. // taskDetail3: "",
  20491. // chapterData: [],
  20492. // toolText: "",
  20493. // toolChoose: [
  20494. // {
  20495. // tool: [],
  20496. // toolDetail: "",
  20497. // toolType: 0,
  20498. // askCount: 1,
  20499. // askTitle: "",
  20500. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20501. // },
  20502. // ],
  20503. // isShowTools: false,
  20504. // askCount: 1,
  20505. // isFold: 0,
  20506. // askTitle: "",
  20507. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20508. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20509. // homeworkList: [],
  20510. // })
  20511. // }
  20512. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20513. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20514. // _this.$forceUpdate();
  20515. // }
  20516. // // if (data.result) {
  20517. // // console.log(data.result);
  20518. // // let dArray = JSON.parse(data.result)
  20519. // // _this.dArray = dArray
  20520. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20521. // // for (var i = 0; i < dArray.length; i++) {
  20522. // // let _task = dArray[i]
  20523. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20524. // // task: _task.task,
  20525. // // taskDetail: "",
  20526. // // taskDetail2: _task.detail,
  20527. // // taskDetail3: "",
  20528. // // chapterData: [],
  20529. // // toolText: "",
  20530. // // toolChoose: [
  20531. // // {
  20532. // // tool: [],
  20533. // // toolDetail: "",
  20534. // // toolType: 0,
  20535. // // askCount: 1,
  20536. // // askTitle: "",
  20537. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20538. // // },
  20539. // // ],
  20540. // // isShowTools: false,
  20541. // // askCount: 1,
  20542. // // isFold: 1,
  20543. // // askTitle: "",
  20544. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20545. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20546. // // homeworkList: [],
  20547. // // })
  20548. // // }
  20549. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20550. // // _this.$forceUpdate();
  20551. // // }
  20552. // callback ? callback() : ''
  20553. // }).catch(function (error) {
  20554. // _this.loading = false
  20555. // console.log(error);
  20556. // });
  20557. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20558. let parm = {
  20559. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20560. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20561. session_name: uuidv4(),
  20562. userId: this.userid,
  20563. file_ids: '',
  20564. model: 'gpt-4o-2024-11-20',
  20565. temperature: this.mode == 3 ? 0.5 : 0.1,
  20566. }
  20567. this.ajax
  20568. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20569. .then((response) => {
  20570. console.log(response);
  20571. let data = response.data.FunctionResponse
  20572. if (data.message) {
  20573. console.log(data.message);
  20574. let dArray = {}
  20575. try {
  20576. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20577. } catch (error) {
  20578. console.log("error_________________" + error);
  20579. try {
  20580. let regex = new RegExp(/```json([\s\S]*?)```/);
  20581. let match = data.message.match(regex);
  20582. dArray = JSON.parse(match[1]);
  20583. // var message = data.message;
  20584. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20585. // var jsonEnd = message.indexOf("```", jsonStart);
  20586. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20587. // dArray = JSON.parse(jsonString);
  20588. } catch (error) {
  20589. try {
  20590. let regex = new RegExp(/```json([\s\S]*?)```/);
  20591. let match = data.message.match(regex);
  20592. // eval("var aaa = " + match[0])
  20593. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20594. } catch (error) {
  20595. console.log("error_________________" + error);
  20596. }
  20597. console.log("error_________________" + error);
  20598. }
  20599. }
  20600. _this.dArray = dArray
  20601. if(_this.panOutline() > 0){
  20602. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20603. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20604. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20605. }
  20606. for (var i = 0; i < dArray.length; i++) {
  20607. let _task = dArray[i]
  20608. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20609. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')
  20610. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20611. }else {
  20612. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20613. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20614. taskDetail: "",
  20615. taskDetail2: "",
  20616. taskDetail3: "",
  20617. chapterData: [],
  20618. toolText: "",
  20619. toolChoose: [
  20620. {
  20621. tool: [],
  20622. toolDetail: "",
  20623. toolType: 0,
  20624. askCount: 1,
  20625. askTitle: "",
  20626. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20627. },
  20628. ],
  20629. isShowTools: false,
  20630. askCount: 1,
  20631. isFold: 0,
  20632. askTitle: "",
  20633. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20634. checkJson: [{ checkCount: [], checkPerent: [] }],
  20635. homeworkList: [],
  20636. })
  20637. }
  20638. }
  20639. }else {
  20640. _this.unitJson[0].chapterInfo[0].taskJson = []
  20641. for (var i = 0; i < dArray.length; i++) {
  20642. let _task = dArray[i]
  20643. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20644. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20645. taskDetail: "",
  20646. taskDetail2: "",
  20647. taskDetail3: "",
  20648. chapterData: [],
  20649. toolText: "",
  20650. toolChoose: [
  20651. {
  20652. tool: [],
  20653. toolDetail: "",
  20654. toolType: 0,
  20655. askCount: 1,
  20656. askTitle: "",
  20657. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20658. },
  20659. ],
  20660. isShowTools: false,
  20661. askCount: 1,
  20662. isFold: 0,
  20663. askTitle: "",
  20664. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20665. checkJson: [{ checkCount: [], checkPerent: [] }],
  20666. homeworkList: [],
  20667. })
  20668. }
  20669. }
  20670. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20671. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20672. _this.$forceUpdate();
  20673. _this.saveCourse()
  20674. // setTimeout(()=>{
  20675. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20676. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20677. // }
  20678. // }, 0)
  20679. setTimeout(()=>{
  20680. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20681. const _tindex = 'task-' + i;
  20682. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20683. _this.taskDetailLoading5.push(_tindex)
  20684. }
  20685. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20686. _this.ttaskDetailLoading5.push(_tindex)
  20687. }
  20688. }
  20689. let ij = 0;
  20690. function processNext() {
  20691. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20692. const _tindex = 'task-' + ij;
  20693. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20694. ij++;
  20695. processNext();
  20696. return;
  20697. }
  20698. // 处理当前任务
  20699. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20700. // 回调函数,当前任务完成后执行
  20701. ij++;
  20702. processNext(); // 处理下一个任务
  20703. });
  20704. }
  20705. }
  20706. processNext(); // 启动处理
  20707. }, 0)
  20708. }
  20709. callback ? callback() : ''
  20710. _this.isTeacherTaskCancelToken = null
  20711. })
  20712. .catch((error) => {
  20713. _this.loading = false
  20714. _this.isTeacherTaskCancelToken = null
  20715. console.log(error);
  20716. });
  20717. },
  20718. async aiGet3(messages, callback) {
  20719. let _this = this
  20720. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20721. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20722. if (_this.infoData.length) {
  20723. for (var i = 0; i < _this.infoData.length; i++) {
  20724. if(_this.infoData[i].fileid){
  20725. fileid.push(_this.infoData[i].fileid)
  20726. }else {
  20727. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20728. if(_fileid){
  20729. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20730. _this.$forceUpdate();
  20731. if(_fileid != 1){
  20732. fileid.push(_fileid)
  20733. }
  20734. }
  20735. }
  20736. }
  20737. }
  20738. // let params = JSON.stringify({
  20739. // // "model": "Chat",
  20740. // model: 'gpt-3.5-turbo',
  20741. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20742. // max_tokens: 4096,
  20743. // top_p: 1,
  20744. // frequency_penalty: 0,
  20745. // presence_penalty: 0,
  20746. // messages: [{
  20747. // content: messages,
  20748. // role: 'user'
  20749. // }],
  20750. // stream: false,
  20751. // uid: this.userid,
  20752. // mind_map_question: "",
  20753. // })
  20754. // // let params = JSON.stringify({
  20755. // // message: {
  20756. // // anthropic_version: "bedrock-2023-05-31",
  20757. // // max_tokens: 4096,
  20758. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20759. // // top_p: 1,
  20760. // // messages: [{
  20761. // // content: messages,
  20762. // // role: 'user'
  20763. // // }], //
  20764. // // },
  20765. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20766. // // });
  20767. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20768. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20769. // console.log(response);
  20770. // let data = response.data.FunctionResponse
  20771. // if (data.choices && data.choices.length && data.choices[0].message) {
  20772. // console.log(data.choices[0].message.content);
  20773. // let tArray = JSON.parse(data.choices[0].message.content)
  20774. // // _this.unitJson[0].chapterInfo[0].task = []
  20775. // let toolsJson = {
  20776. // "电子白板": { tool: 1, type: 1 },
  20777. // "文档": { tool: 52, type: 1 },
  20778. // "思维导图": { tool: 3, type: 1 },
  20779. // "表格": { tool: 48, type: 1 },
  20780. // "作业提交": { tool: 16, type: 2 }
  20781. // }
  20782. // for (var i = 0; i < tArray.length; i++) {
  20783. // let _task = tArray[i]
  20784. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20785. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20786. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20787. // if (_task.toolChoose.length) {
  20788. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20789. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20790. // {
  20791. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20792. // toolDetail: _task.toolChoose[j].detail,
  20793. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20794. // askCount: 1,
  20795. // askTitle: "",
  20796. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20797. // },
  20798. // )
  20799. // }
  20800. // } else {
  20801. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20802. // {
  20803. // tool: [],
  20804. // toolDetail: "",
  20805. // toolType: 0,
  20806. // askCount: 1,
  20807. // askTitle: "",
  20808. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20809. // },
  20810. // )
  20811. // }
  20812. // }
  20813. // // if (_this.infoData.length) {
  20814. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20815. // // }
  20816. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20817. // _this.$forceUpdate();
  20818. // }
  20819. // // if (data.result) {
  20820. // // console.log(data.result);
  20821. // // let tArray = JSON.parse(data.result)
  20822. // // // _this.unitJson[0].chapterInfo[0].task = []
  20823. // // let toolsJson = {
  20824. // // "电子白板": { tool: 1, type: 1 },
  20825. // // "文档": { tool: 52, type: 1 },
  20826. // // "思维导图": { tool: 3, type: 1 },
  20827. // // "表格": { tool: 48, type: 1 },
  20828. // // "作业提交": { tool: 16, type: 2 }
  20829. // // }
  20830. // // for (var i = 0; i < tArray.length; i++) {
  20831. // // let _task = tArray[i]
  20832. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20833. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20834. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20835. // // if (_task.toolChoose.length) {
  20836. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20837. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20838. // // {
  20839. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20840. // // toolDetail: _task.toolChoose[j].detail,
  20841. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20842. // // askCount: 1,
  20843. // // askTitle: "",
  20844. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20845. // // },
  20846. // // )
  20847. // // }
  20848. // // } else {
  20849. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20850. // // {
  20851. // // tool: [],
  20852. // // toolDetail: "",
  20853. // // toolType: 0,
  20854. // // askCount: 1,
  20855. // // askTitle: "",
  20856. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20857. // // },
  20858. // // )
  20859. // // }
  20860. // // }
  20861. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20862. // // _this.$forceUpdate();
  20863. // // }
  20864. // callback ? callback() : ''
  20865. // }).catch(function (error) {
  20866. // _this.loading = false
  20867. // console.log(error);
  20868. // });
  20869. let parm = {
  20870. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20871. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20872. session_name: uuidv4(),
  20873. userId: this.userid,
  20874. file_ids: fileid.length ? [...fileid] : '',
  20875. model: 'gpt-4o-2024-11-20',
  20876. temperature: this.mode == 3 ? 0.5 : 0.1,
  20877. }
  20878. this.ajax
  20879. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20880. .then(async (response) => {
  20881. console.log(response);
  20882. let data = response.data.FunctionResponse
  20883. if (data.message) {
  20884. console.log(data.message);
  20885. let tArray = {}
  20886. try {
  20887. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20888. } catch (error) {
  20889. console.log("error_________________" + error);
  20890. try {
  20891. let regex = new RegExp(/```json([\s\S]*?)```/);
  20892. let match = data.message.match(regex);
  20893. tArray = JSON.parse(match[1]);
  20894. // var message = data.message;
  20895. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20896. // var jsonEnd = message.indexOf("```", jsonStart);
  20897. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20898. // tArray = JSON.parse(jsonString);
  20899. } catch (error) {
  20900. try {
  20901. let regex = new RegExp(/```json([\s\S]*?)```/);
  20902. let match = data.message.match(regex);
  20903. // eval("var aaa = " + match[0])
  20904. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20905. } catch (error) {
  20906. console.log("error_________________" + error);
  20907. }
  20908. console.log("error_________________" + error);
  20909. }
  20910. }
  20911. let toolsJson = {
  20912. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  20913. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  20914. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  20915. [_this.lang.ssTable]: { tool: 48, type: 1 },
  20916. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  20917. [_this.lang.ssQA]: { tool: 15, type: 2 },
  20918. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  20919. }
  20920. // answerQ:"sssssssssssssss"
  20921. for (var i = 0; i < tArray.length; i++) {
  20922. let _task = tArray[i]
  20923. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20924. _task.elist = _task.elist.filter(el=>{
  20925. el.isai = "1"
  20926. return el
  20927. })
  20928. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20929. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20930. if (_task.toolChoose.length) {
  20931. for (var j = 0; j < _task.toolChoose.length; j++) {
  20932. let _json = {
  20933. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20934. toolDetail: _task.toolChoose[j].detail,
  20935. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20936. askCount: 1,
  20937. askTitle: "",
  20938. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20939. }
  20940. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  20941. let answerQ = await _this.aiCreateQuestion(15, i)
  20942. _json.answerQ = answerQ.answerQ
  20943. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  20944. let testJson = await _this.aiCreateQuestion(45, i)
  20945. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20946. }
  20947. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20948. }
  20949. } else {
  20950. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20951. {
  20952. tool: [],
  20953. toolDetail: "",
  20954. toolType: 0,
  20955. askCount: 1,
  20956. askTitle: "",
  20957. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20958. },
  20959. )
  20960. }
  20961. }
  20962. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20963. _this.$forceUpdate();
  20964. _this.createTeacherAn();
  20965. }
  20966. callback ? callback() : ''
  20967. })
  20968. .catch((error) => {
  20969. _this.loading = false
  20970. console.log(error);
  20971. });
  20972. },
  20973. async aiGet32(messages, index) {
  20974. let _this = this
  20975. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20976. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20977. if (_this.infoData.length) {
  20978. for (var i = 0; i < _this.infoData.length; i++) {
  20979. if(_this.infoData[i].fileid){
  20980. fileid.push(_this.infoData[i].fileid)
  20981. }else {
  20982. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20983. if(_fileid){
  20984. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20985. _this.$forceUpdate();
  20986. if(_fileid != 1){
  20987. fileid.push(_fileid)
  20988. }
  20989. }
  20990. }
  20991. }
  20992. }
  20993. // let params = JSON.stringify({
  20994. // // "model": "Chat",
  20995. // model: 'gpt-3.5-turbo',
  20996. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20997. // max_tokens: 4096,
  20998. // top_p: 1,
  20999. // frequency_penalty: 0,
  21000. // presence_penalty: 0,
  21001. // messages: [{
  21002. // content: messages,
  21003. // role: 'user'
  21004. // }],
  21005. // stream: false,
  21006. // uid: this.userid,
  21007. // mind_map_question: "",
  21008. // })
  21009. // // let params = JSON.stringify({
  21010. // // message: {
  21011. // // anthropic_version: "bedrock-2023-05-31",
  21012. // // max_tokens: 4096,
  21013. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21014. // // top_p: 1,
  21015. // // messages: [{
  21016. // // content: messages,
  21017. // // role: 'user'
  21018. // // }], //
  21019. // // },
  21020. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21021. // // });
  21022. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21023. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21024. // console.log(response);
  21025. // let data = response.data.FunctionResponse
  21026. // if (data.choices && data.choices.length && data.choices[0].message) {
  21027. // console.log(data.choices[0].message.content);
  21028. // let tArray = JSON.parse(data.choices[0].message.content)
  21029. // // _this.unitJson[0].chapterInfo[0].task = []
  21030. // let toolsJson = {
  21031. // "电子白板": { tool: 1, type: 1 },
  21032. // "文档": { tool: 52, type: 1 },
  21033. // "思维导图": { tool: 3, type: 1 },
  21034. // "表格": { tool: 48, type: 1 },
  21035. // "作业提交": { tool: 16, type: 2 }
  21036. // }
  21037. // for (var i = 0; i < tArray.length; i++) {
  21038. // let _task = tArray[i]
  21039. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21040. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21041. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21042. // if (_task.toolChoose.length) {
  21043. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21044. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21045. // {
  21046. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21047. // toolDetail: _task.toolChoose[j].detail,
  21048. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21049. // askCount: 1,
  21050. // askTitle: "",
  21051. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21052. // },
  21053. // )
  21054. // }
  21055. // } else {
  21056. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21057. // {
  21058. // tool: [],
  21059. // toolDetail: "",
  21060. // toolType: 0,
  21061. // askCount: 1,
  21062. // askTitle: "",
  21063. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21064. // },
  21065. // )
  21066. // }
  21067. // }
  21068. // // if (_this.infoData.length) {
  21069. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21070. // // }
  21071. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21072. // _this.$forceUpdate();
  21073. // }
  21074. // // if (data.result) {
  21075. // // console.log(data.result);
  21076. // // let tArray = JSON.parse(data.result)
  21077. // // // _this.unitJson[0].chapterInfo[0].task = []
  21078. // // let toolsJson = {
  21079. // // "电子白板": { tool: 1, type: 1 },
  21080. // // "文档": { tool: 52, type: 1 },
  21081. // // "思维导图": { tool: 3, type: 1 },
  21082. // // "表格": { tool: 48, type: 1 },
  21083. // // "作业提交": { tool: 16, type: 2 }
  21084. // // }
  21085. // // for (var i = 0; i < tArray.length; i++) {
  21086. // // let _task = tArray[i]
  21087. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21088. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21089. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21090. // // if (_task.toolChoose.length) {
  21091. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  21092. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21093. // // {
  21094. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21095. // // toolDetail: _task.toolChoose[j].detail,
  21096. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21097. // // askCount: 1,
  21098. // // askTitle: "",
  21099. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21100. // // },
  21101. // // )
  21102. // // }
  21103. // // } else {
  21104. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21105. // // {
  21106. // // tool: [],
  21107. // // toolDetail: "",
  21108. // // toolType: 0,
  21109. // // askCount: 1,
  21110. // // askTitle: "",
  21111. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21112. // // },
  21113. // // )
  21114. // // }
  21115. // // }
  21116. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21117. // // _this.$forceUpdate();
  21118. // // }
  21119. // callback ? callback() : ''
  21120. // }).catch(function (error) {
  21121. // _this.loading = false
  21122. // console.log(error);
  21123. // });
  21124. let parm = {
  21125. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21126. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21127. session_name: uuidv4(),
  21128. userId: this.userid,
  21129. file_ids: fileid.length ? [...fileid] : '',
  21130. model: 'gpt-4o-2024-11-20',
  21131. temperature: this.mode == 3 ? 0.5 : 0.1,
  21132. }
  21133. this.ajax
  21134. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21135. .then(async (response) => {
  21136. console.log(response);
  21137. let data = response.data.FunctionResponse
  21138. if (data.message) {
  21139. console.log(data.message);
  21140. let tArray = {}
  21141. try {
  21142. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21143. } catch (error) {
  21144. console.log("error_________________" + error);
  21145. try {
  21146. let regex = new RegExp(/```json([\s\S]*?)```/);
  21147. let match = data.message.match(regex);
  21148. tArray = JSON.parse(match[1]);
  21149. // var message = data.message;
  21150. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21151. // var jsonEnd = message.indexOf("```", jsonStart);
  21152. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21153. // tArray = JSON.parse(jsonString);
  21154. } catch (error) {
  21155. try {
  21156. let regex = new RegExp(/```json([\s\S]*?)```/);
  21157. let match = data.message.match(regex);
  21158. // eval("var aaa = " + match[0])
  21159. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21160. } catch (error) {
  21161. console.log("error_________________" + error);
  21162. }
  21163. console.log("error_________________" + error);
  21164. }
  21165. }
  21166. let toolsJson = {
  21167. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21168. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21169. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21170. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21171. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21172. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21173. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21174. }
  21175. // answerQ:"sssssssssssssss"
  21176. // for (var i = 0; i < tArray.length; i++) {
  21177. let _task = tArray
  21178. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  21179. _task.elist = _task.elist.filter(el=>{
  21180. el.isai = 1
  21181. return el
  21182. })
  21183. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21184. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21185. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  21186. console.log("error_________________JSON不对重新生成");
  21187. _this.$message.error(_this.lang.ssNetWave)
  21188. _this.aiGet32(messages, index)
  21189. return;
  21190. }
  21191. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21192. if (_task.toolChoose && _task.toolChoose.length) {
  21193. for (var j = 0; j < _task.toolChoose.length; j++) {
  21194. let _json = {
  21195. tool: [],
  21196. toolDetail: _task.toolChoose[j].detail,
  21197. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21198. askCount: 1,
  21199. askTitle: "",
  21200. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21201. }
  21202. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21203. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  21204. let answerQ = await _this.aiCreateQuestion(15, index)
  21205. // _json.answerQ = answerQ.answerQ
  21206. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21207. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  21208. let testJson = await _this.aiCreateQuestion(45, index)
  21209. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21210. _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}
  21211. }
  21212. _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]
  21213. _this.$forceUpdate();
  21214. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21215. }
  21216. } else {
  21217. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21218. {
  21219. tool: [],
  21220. toolDetail: "",
  21221. toolType: 0,
  21222. askCount: 1,
  21223. askTitle: "",
  21224. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21225. },
  21226. )
  21227. }
  21228. // }
  21229. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21230. _this.$forceUpdate();
  21231. _this.createTeacherAn(index);
  21232. }
  21233. // callback ? callback() : ''
  21234. _this.taskLoading[index] = false
  21235. })
  21236. .catch((error) => {
  21237. // _this.loading = false
  21238. _this.taskLoading[index] = false
  21239. console.log(error);
  21240. });
  21241. },
  21242. async aiGetG321(messages, index, callback, callback2) {
  21243. let _this = this
  21244. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21245. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21246. if (_this.infoData.length) {
  21247. for (var i = 0; i < _this.infoData.length; i++) {
  21248. if(_this.infoData[i].fileid){
  21249. fileid.push(_this.infoData[i].fileid)
  21250. }else {
  21251. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21252. if(_fileid){
  21253. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21254. _this.$forceUpdate();
  21255. if(_fileid != 1){
  21256. fileid.push(_fileid)
  21257. }
  21258. }
  21259. }
  21260. }
  21261. }
  21262. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21263. let parm = {
  21264. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21265. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21266. session_name: uuidv4(),
  21267. userId: this.userid,
  21268. file_ids: fileid.length ? [...fileid] : '',
  21269. model: 'gpt-4o-2024-11-20',
  21270. temperature: this.mode == 3 ? 0.5 : 0.1,
  21271. }
  21272. this.ajax
  21273. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21274. .then(async (response) => {
  21275. console.log(response);
  21276. let data = response.data.FunctionResponse
  21277. if (data.message) {
  21278. let tArray = {}
  21279. try {
  21280. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21281. } catch (error) {
  21282. console.log("error_________________" + error);
  21283. try {
  21284. let regex = new RegExp(/```json([\s\S]*?)```/);
  21285. let match = data.message.match(regex);
  21286. tArray = JSON.parse(match[1]);
  21287. } catch (error) {
  21288. try {
  21289. let regex = new RegExp(/```json([\s\S]*?)```/);
  21290. let match = data.message.match(regex);
  21291. // eval("var aaa = " + match[0])
  21292. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21293. } catch (error) {
  21294. console.log("error_________________" + error);
  21295. }
  21296. console.log("error_________________" + error);
  21297. }
  21298. }
  21299. console.log(data.message);
  21300. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21301. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21302. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21303. _this.$forceUpdate();
  21304. _this.createTeacherAn(index);
  21305. }
  21306. callback ? callback(callback2) : ''
  21307. _this.taskGLoading[index][0] = false
  21308. _this.taskCancelToken1[index] = null
  21309. _this.$forceUpdate();
  21310. })
  21311. .catch((error) => {
  21312. // _this.loading = false
  21313. callback ? callback(callback2) : ''
  21314. _this.taskGLoading[index][0] = false
  21315. _this.taskCancelToken1[index] = null
  21316. _this.$forceUpdate();
  21317. console.log(error);
  21318. });
  21319. },
  21320. async aiGetG321L(messages, index, callback, callback2) {
  21321. let _this = this
  21322. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21323. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21324. if (_this.infoData.length) {
  21325. for (var i = 0; i < _this.infoData.length; i++) {
  21326. if(_this.infoData[i].fileid){
  21327. fileid.push(_this.infoData[i].fileid)
  21328. }else {
  21329. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21330. if(_fileid){
  21331. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21332. _this.$forceUpdate();
  21333. if(_fileid != 1){
  21334. fileid.push(_fileid)
  21335. }
  21336. }
  21337. }
  21338. }
  21339. }
  21340. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21341. let _uuid = uuidv4();
  21342. let parm = {
  21343. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21344. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21345. session_name: uuidv4(),
  21346. userId: this.userid,
  21347. file_ids: fileid.length ? [...fileid] : '',
  21348. uid: _uuid,
  21349. // model: 'gpt-4o-2024-11-20',
  21350. model: 'gpt-4o-mini',
  21351. temperature: this.mode == 3 ? 0.5 : 0.1,
  21352. }
  21353. this.ajax
  21354. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21355. .then(async (response) => {
  21356. console.log(response);
  21357. // }
  21358. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21359. } else {
  21360. _this.$message.warning(response.data.FunctionResponse.result);
  21361. callback ? callback(callback2) : ''
  21362. _this.taskGLoading[index][0] = false
  21363. _this.ttaskGLoading[index][0] = false
  21364. _this.taskCancelToken1[index] = null
  21365. }
  21366. _this.taskCancelToken1[index] = null
  21367. _this.$forceUpdate();
  21368. })
  21369. .catch((error) => {
  21370. // _this.loading = false
  21371. callback ? callback(callback2) : ''
  21372. _this.taskGLoading[index][0] = false
  21373. _this.ttaskGLoading[index][0] = false
  21374. _this.taskCancelToken1[index] = null
  21375. _this.$forceUpdate();
  21376. console.log(error);
  21377. });
  21378. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21379. },
  21380. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21381. try {
  21382. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21383. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21384. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21385. } catch(error){
  21386. console.log('EventSource error:', error);
  21387. this.$message.error(this.lang.ssTooManyReq)
  21388. callback ? callback(callback2) : ''
  21389. this.taskGLoading[index][0] = false
  21390. this.ttaskGLoading[index][0] = false
  21391. this.taskCancelToken1[index][0] = null
  21392. return;
  21393. }
  21394. let _allText = "";
  21395. let _mdText = "";
  21396. let _iindex = 0
  21397. this.isTaskCancelSource1[index].onmessage = _e => {
  21398. let _eData = JSON.parse(_e.data).content;
  21399. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21400. //对话已经完成
  21401. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21402. callback ? callback(callback2) : ''
  21403. this.isTaskCancelSource1[index].close();
  21404. this.isTaskCancelSource1[index] = null;
  21405. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21406. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21407. this.createTeacherAn(index);
  21408. this.taskGLoading[index][0] = false
  21409. this.ttaskGLoading[index][0] = false
  21410. this.taskCancelToken1[index][0] = null
  21411. return;
  21412. } else {
  21413. _iindex++
  21414. //对话还在继续
  21415. let _text = "";
  21416. _text = _eData.replaceAll("'", "");
  21417. if (_allText == "") {
  21418. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21419. } else {
  21420. _allText += _text;
  21421. }
  21422. _mdText = _allText + "_";
  21423. _mdText = _mdText.replace(/\\n/g, "\n");
  21424. _mdText = _mdText.replace(/\\/g, "");
  21425. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21426. //转化返回的回复流数据.
  21427. if(_iindex == 10){
  21428. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21429. _iindex = 0
  21430. }
  21431. this.taskGLoading[index][0] = false
  21432. // 处理流数据
  21433. }
  21434. // this.$forceUpdate();
  21435. };
  21436. let _this = this
  21437. this.isTaskCancelSource1[index].onerror = function(event) {
  21438. // 处理错误,可以尝试重新连接
  21439. console.log('EventSource error:', event);
  21440. _this.$message.error(this.lang.ssTooManyReq)
  21441. callback ? callback(callback2) : ''
  21442. _this.taskGLoading[index][0] = false
  21443. _this.ttaskGLoading[index][0] = false
  21444. _this.isTaskCancelSource1[index].close();
  21445. _this.isTaskCancelSource1[index] = null;
  21446. _this.taskCancelToken1[index][0] = null
  21447. };
  21448. },
  21449. async aiGetG322(messages, index, callback) {
  21450. let _this = this
  21451. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21452. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21453. if (_this.infoData.length) {
  21454. for (var i = 0; i < _this.infoData.length; i++) {
  21455. if(_this.infoData[i].fileid){
  21456. fileid.push(_this.infoData[i].fileid)
  21457. }else {
  21458. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21459. if(_fileid){
  21460. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21461. _this.$forceUpdate();
  21462. if(_fileid != 1){
  21463. fileid.push(_fileid)
  21464. }
  21465. }
  21466. }
  21467. }
  21468. }
  21469. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21470. let parm = {
  21471. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21472. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21473. session_name: uuidv4(),
  21474. userId: this.userid,
  21475. file_ids: fileid.length ? [...fileid] : '',
  21476. model: 'gpt-4o-2024-11-20',
  21477. temperature: this.mode == 3 ? 0.5 : 0.1,
  21478. }
  21479. this.ajax
  21480. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21481. .then(async (response) => {
  21482. console.log(response);
  21483. let data = response.data.FunctionResponse
  21484. if (data.message) {
  21485. console.log(data.message);
  21486. let tArray = {}
  21487. try {
  21488. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21489. } catch (error) {
  21490. console.log("error_________________" + error);
  21491. try {
  21492. let regex = new RegExp(/```json([\s\S]*?)```/);
  21493. let match = data.message.match(regex);
  21494. tArray = JSON.parse(match[1]);
  21495. } catch (error) {
  21496. try {
  21497. let regex = new RegExp(/```json([\s\S]*?)```/);
  21498. let match = data.message.match(regex);
  21499. // eval("var aaa = " + match[0])
  21500. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21501. } catch (error) {
  21502. console.log("error_________________" + error);
  21503. }
  21504. console.log("error_________________" + error);
  21505. }
  21506. }
  21507. let toolsJson = {
  21508. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21509. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21510. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21511. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21512. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21513. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21514. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21515. }
  21516. if(_this.languageSetting == 1){
  21517. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21518. }else if(_this.languageSetting == 2){
  21519. toolsJson = {
  21520. "Mind Map Tool": { tool: 1, type: 1 },
  21521. "Document tool": { tool: 52, type: 1 },
  21522. "Diagram Tool": { tool: 3, type: 1 },
  21523. "Spreadsheet tool": { tool: 48, type: 1 },
  21524. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21525. "Q&A Tool": { tool: 15, type: 2 },
  21526. "Choice tool": { tool: 45, type: 2 },
  21527. }
  21528. }
  21529. let _task = tArray
  21530. if(!_task.toolChoose){
  21531. console.log("error_________________JSON不对重新生成");
  21532. _this.$message.error(_this.lang.ssNetWave)
  21533. _this.aiGetG322(messages, index)
  21534. return;
  21535. }
  21536. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21537. if (_task.toolChoose && _task.toolChoose.length) {
  21538. for (var j = 0; j < _task.toolChoose.length; j++) {
  21539. let _json = {
  21540. tool: [],
  21541. toolDetail: _task.toolChoose[j].detail,
  21542. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21543. askCount: 1,
  21544. askTitle: "",
  21545. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21546. }
  21547. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21548. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA) || _task.toolChoose[j].tool == 'Q&A Tool'){
  21549. let answerQ = await _this.aiCreateQuestion(15, index)
  21550. // _json.answerQ = answerQ.answerQ
  21551. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21552. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice) || _task.toolChoose[j].tool == 'Choice tool'){
  21553. let testJson = await _this.aiCreateQuestion(45, index)
  21554. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21555. _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}
  21556. }
  21557. _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]
  21558. _this.$forceUpdate();
  21559. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21560. }
  21561. } else {
  21562. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21563. {
  21564. tool: [],
  21565. toolDetail: "",
  21566. toolType: 0,
  21567. askCount: 1,
  21568. askTitle: "",
  21569. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21570. },
  21571. )
  21572. }
  21573. //
  21574. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21575. _this.$forceUpdate();
  21576. // _this.$nextTick(()=>{
  21577. // setTimeout(() => {
  21578. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21579. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21580. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21581. // }
  21582. // }
  21583. // }, 2000);
  21584. // })
  21585. }
  21586. callback ? callback() : ''
  21587. _this.taskGLoading[index][1] = false
  21588. _this.taskCancelToken2[index] = null
  21589. _this.$forceUpdate();
  21590. })
  21591. .catch((error) => {
  21592. // _this.loading = false
  21593. callback ? callback() : ''
  21594. _this.taskGLoading[index][1] = false
  21595. _this.taskCancelToken2[index] = null
  21596. _this.$forceUpdate();
  21597. console.log(error);
  21598. });
  21599. },
  21600. async aiGetG323(messages, index) {
  21601. let _this = this
  21602. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21603. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21604. if (_this.infoData.length) {
  21605. for (var i = 0; i < _this.infoData.length; i++) {
  21606. if(_this.infoData[i].fileid){
  21607. fileid.push(_this.infoData[i].fileid)
  21608. }else {
  21609. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21610. if(_fileid){
  21611. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21612. _this.$forceUpdate();
  21613. if(_fileid != 1){
  21614. fileid.push(_fileid)
  21615. }
  21616. }
  21617. }
  21618. }
  21619. }
  21620. let parm = {
  21621. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21622. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21623. session_name: uuidv4(),
  21624. userId: this.userid,
  21625. file_ids: fileid.length ? [...fileid] : '',
  21626. model: 'gpt-4o-2024-11-20',
  21627. temperature: this.mode == 3 ? 0.5 : 0.1,
  21628. }
  21629. this.ajax
  21630. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21631. .then(async (response) => {
  21632. console.log(response);
  21633. let data = response.data.FunctionResponse
  21634. if (data.message) {
  21635. console.log(data.message);
  21636. let tArray = {}
  21637. try {
  21638. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21639. } catch (error) {
  21640. console.log("error_________________" + error);
  21641. try {
  21642. let regex = new RegExp(/```json([\s\S]*?)```/);
  21643. let match = data.message.match(regex);
  21644. tArray = JSON.parse(match[1]);
  21645. } catch (error) {
  21646. try {
  21647. let regex = new RegExp(/```json([\s\S]*?)```/);
  21648. let match = data.message.match(regex);
  21649. // eval("var aaa = " + match[0])
  21650. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21651. } catch (error) {
  21652. console.log("error_________________" + error);
  21653. }
  21654. console.log("error_________________" + error);
  21655. }
  21656. }
  21657. let _task = tArray
  21658. if(!_task.elist){
  21659. console.log("error_________________JSON不对重新生成");
  21660. _this.$message.error(this.lang.ssNetWave)
  21661. _this.aiGetG322(messages, index)
  21662. return;
  21663. }
  21664. _task.elist = _task.elist.filter(el=>{
  21665. el.isai = "1"
  21666. return el
  21667. })
  21668. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21669. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21670. _this.$forceUpdate();
  21671. }
  21672. // callback ? callback() : ''
  21673. _this.taskGLoading[index][2] = false
  21674. })
  21675. .catch((error) => {
  21676. // _this.loading = false
  21677. _this.taskGLoading[index][2] = false
  21678. console.log(error);
  21679. });
  21680. },
  21681. async aiCreateQuestion(type, task) {
  21682. let _this = this
  21683. return new Promise((resolve, reject) => {
  21684. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21685. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21686. if (_this.infoData.length) {
  21687. for (var i = 0; i < _this.infoData.length; i++) {
  21688. if(_this.infoData[i].fileid){
  21689. fileid.push(_this.infoData[i].fileid)
  21690. }
  21691. }
  21692. }
  21693. let sub = []
  21694. let mclass = []
  21695. if (this.courseTypeId.length) {
  21696. for (var i = 0; i < this.courseTypeId.length; i++) {
  21697. let _sid = this.courseTypeId[i]
  21698. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21699. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21700. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21701. }
  21702. }
  21703. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21704. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21705. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21706. }
  21707. }
  21708. }
  21709. }
  21710. let messages = ""
  21711. if(type == 15){
  21712. messages = `NOTICE
  21713. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21714. Language: ${this.getLang()}
  21715. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21716. Instruction: Based on the context, follow "Format example", write content.
  21717. # Context
  21718. ## 任务
  21719. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21720. ## 限制
  21721. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21722. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21723. ## 课程简介
  21724. 课程名字:${_this.courseName}
  21725. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21726. ${sub.length ? '学科:' + sub.join(",") : ''}
  21727. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21728. ## 教案
  21729. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21730. # Format example
  21731. {"answerQ":"问题"}
  21732. `
  21733. }else if(type == 45){
  21734. messages = `NOTICE
  21735. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21736. Language: ${this.getLang()}
  21737. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21738. Instruction: Based on the context, follow "Format example", write content.
  21739. # Context
  21740. ## 任务
  21741. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21742. ## 限制
  21743. - 生成题目禁止重复。
  21744. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21745. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21746. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21747. ## 课程简介
  21748. 课程名字:${_this.courseName}
  21749. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21750. ${sub.length ? '学科:' + sub.join(",") : ''}
  21751. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21752. ## 教案
  21753. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21754. # Format example
  21755. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21756. `
  21757. }
  21758. let parm = {
  21759. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21760. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21761. session_name: uuidv4(),
  21762. userId: this.userid,
  21763. file_ids: fileid.length ? [...fileid] : '',
  21764. model: 'gpt-4o-2024-11-20',
  21765. temperature: this.mode == 3 ? 0.5 : 0.1,
  21766. }
  21767. this.ajax
  21768. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21769. .then((response) => {
  21770. console.log(response);
  21771. let data = response.data.FunctionResponse
  21772. if (data.message) {
  21773. console.log(data.message);
  21774. try {
  21775. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21776. let tArray = {}
  21777. try {
  21778. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21779. } catch (error) {
  21780. console.log("error_________________" + error);
  21781. try {
  21782. let regex = new RegExp(/```json([\s\S]*?)```/);
  21783. let match = data.message.match(regex);
  21784. tArray = JSON.parse(match[1]);
  21785. // var message = data.message;
  21786. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21787. // var jsonEnd = message.indexOf("```", jsonStart);
  21788. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21789. // tArray = JSON.parse(jsonString);
  21790. } catch (error) {
  21791. try {
  21792. let regex = new RegExp(/```json([\s\S]*?)```/);
  21793. let match = data.message.match(regex);
  21794. // eval("var aaa = " + match[0])
  21795. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21796. } catch (error) {
  21797. try {
  21798. let regex = new RegExp(/```json([\s\S]*?)```/);
  21799. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21800. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21801. // eval("var aaa = " + match[0])
  21802. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21803. } catch (error) {
  21804. console.log("error_________________" + error);
  21805. }
  21806. console.log("error_________________" + error);
  21807. }
  21808. console.log("error_________________" + error);
  21809. }
  21810. }
  21811. resolve(tArray)
  21812. } catch (error) {
  21813. if(type == 15){
  21814. resolve({answerQ: _this.lang.ssTopic})
  21815. }else if(type == 45){
  21816. resolve([{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}])
  21817. }
  21818. }
  21819. }else if(type == 15){
  21820. resolve({answerQ: _this.lang.ssTopic})
  21821. }else if(type == 45){
  21822. resolve([{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}])
  21823. }
  21824. })
  21825. .catch((error) => {
  21826. if(type == 15){
  21827. resolve({answerQ: _this.lang.ssTopic})
  21828. }else if(type == 45){
  21829. resolve([{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}])
  21830. }
  21831. console.log(error);
  21832. });
  21833. });
  21834. },
  21835. async aiChoice(type){
  21836. if(type == 45){
  21837. this.choiceLoading = true
  21838. }
  21839. let _this = this
  21840. let fileid = []
  21841. if (_this.xuanzeInfoData.length) {
  21842. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21843. if(_this.xuanzeInfoData[i].fileid){
  21844. fileid.push(_this.xuanzeInfoData[i].fileid)
  21845. }
  21846. }
  21847. }else{
  21848. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21849. if (_this.infoData.length) {
  21850. for (var i = 0; i < _this.infoData.length; i++) {
  21851. if(_this.infoData[i].fileid){
  21852. fileid.push(_this.infoData[i].fileid)
  21853. }
  21854. }
  21855. }
  21856. }
  21857. let sub = []
  21858. let mclass = []
  21859. if (this.courseTypeId.length) {
  21860. for (var i = 0; i < this.courseTypeId.length; i++) {
  21861. let _sid = this.courseTypeId[i]
  21862. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21863. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21864. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21865. }
  21866. }
  21867. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21868. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21869. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21870. }
  21871. }
  21872. }
  21873. }
  21874. let messages = ""
  21875. if(type == 15){
  21876. messages = `NOTICE
  21877. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21878. Language: ${this.getLang()}
  21879. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21880. Instruction: Based on the context, follow "Format example", write content.
  21881. # Context
  21882. ## 任务
  21883. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21884. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21885. ## 限制
  21886. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21887. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21888. ## 课程简介
  21889. 课程名字:${_this.courseName}
  21890. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21891. ${sub.length ? '学科:' + sub.join(",") : ''}
  21892. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21893. ## 教案
  21894. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21895. # Format example
  21896. {"answerQ":"问题"}
  21897. `
  21898. }else if(type == 45){
  21899. messages = `NOTICE
  21900. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21901. Language: ${this.getLang()}
  21902. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21903. Instruction: Based on the context, follow "Format example", write content.
  21904. # Context
  21905. ## 任务
  21906. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21907. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21908. ## 限制
  21909. - 生成题目禁止重复。
  21910. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21911. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21912. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21913. ## 课程简介
  21914. 课程名字:${_this.courseName}
  21915. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21916. ${sub.length ? '学科:' + sub.join(",") : ''}
  21917. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21918. ## 教案
  21919. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21920. # Format example
  21921. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21922. `
  21923. }
  21924. let parm = {
  21925. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21926. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21927. session_name: uuidv4(),
  21928. userId: this.userid,
  21929. file_ids: fileid.length ? [...fileid] : '',
  21930. model: 'gpt-4o-2024-11-20',
  21931. temperature: this.mode == 3 ? 0.5 : 0.1,
  21932. }
  21933. this.ajax
  21934. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21935. .then((response) => {
  21936. console.log(response);
  21937. let data = response.data.FunctionResponse
  21938. if (data.message) {
  21939. console.log(data.message);
  21940. try {
  21941. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21942. let tArray = {}
  21943. try {
  21944. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21945. } catch (error) {
  21946. console.log("error_________________" + error);
  21947. try {
  21948. let regex = new RegExp(/```json([\s\S]*?)```/);
  21949. let match = data.message.match(regex);
  21950. tArray = JSON.parse(match[1]);
  21951. // var message = data.message;
  21952. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21953. // var jsonEnd = message.indexOf("```", jsonStart);
  21954. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21955. // tArray = JSON.parse(jsonString);
  21956. } catch (error) {
  21957. try {
  21958. let regex = new RegExp(/```json([\s\S]*?)```/);
  21959. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21960. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21961. // eval("var aaa = " + match[0])
  21962. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21963. } catch (error) {
  21964. console.log("error_________________" + error);
  21965. }
  21966. console.log("error_________________" + error);
  21967. }
  21968. }
  21969. if(type == 45){
  21970. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21971. }
  21972. } catch (error) {
  21973. if(type == 15){
  21974. {answerQ: _this.lang.ssTopic}
  21975. }else if(type == 45){
  21976. let _test = [{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}]
  21977. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21978. }
  21979. _this.choiceLoading = false
  21980. }
  21981. }else if(type == 15){
  21982. {answerQ: _this.lang.ssTopic}
  21983. }else if(type == 45){
  21984. let _test = [{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}]
  21985. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21986. }
  21987. _this.choiceLoading = false
  21988. }).catch((error) => {
  21989. if(type == 15){
  21990. {answerQ: _this.lang.ssTopic}
  21991. }else if(type == 45){
  21992. let _test = [{"teststitle":_this.lang.ssTopic + "1","testItem":4,"checkList":[_this.lang.ssOption + "1",_this.lang.ssOption + "2",_this.lang.ssOption + "3",_this.lang.ssOption + "4"],"timuList":[],"answer":0,"type":"1"}]
  21993. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21994. }
  21995. console.log(error);
  21996. _this.choiceLoading = false
  21997. });
  21998. },
  21999. async aiGet4(messages, callback, clickType) {
  22000. let _this = this
  22001. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22002. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22003. if (_this.infoData.length) {
  22004. for (var i = 0; i < _this.infoData.length; i++) {
  22005. if(_this.infoData[i].fileid){
  22006. fileid.push(_this.infoData[i].fileid)
  22007. }else {
  22008. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22009. if(_fileid){
  22010. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22011. _this.$forceUpdate();
  22012. if(_fileid != 1){
  22013. fileid.push(_fileid)
  22014. }
  22015. }
  22016. }
  22017. }
  22018. }
  22019. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  22020. if(_this.cankaoInfoData[i].fileid){
  22021. fileid.push(_this.cankaoInfoData[i].fileid)
  22022. }else {
  22023. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  22024. if(_fileid){
  22025. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22026. _this.$forceUpdate();
  22027. if(_fileid != 1){
  22028. fileid.push(_fileid)
  22029. }
  22030. }
  22031. }
  22032. }
  22033. // let params = JSON.stringify({
  22034. // // "model": "Chat",
  22035. // model: 'gpt-3.5-turbo',
  22036. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22037. // max_tokens: 4096,
  22038. // top_p: 1,
  22039. // frequency_penalty: 0,
  22040. // presence_penalty: 0,
  22041. // messages: [{
  22042. // content: messages,
  22043. // role: 'user'
  22044. // }],
  22045. // stream: false,
  22046. // uid: this.userid,
  22047. // mind_map_question: "",
  22048. // })
  22049. // // let params = JSON.stringify({
  22050. // // message: {
  22051. // // anthropic_version: "bedrock-2023-05-31",
  22052. // // max_tokens: 4096,
  22053. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  22054. // // top_p: 1,
  22055. // // messages: [{
  22056. // // content: messages,
  22057. // // role: 'user'
  22058. // // }], //
  22059. // // },
  22060. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22061. // // });
  22062. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22063. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22064. // console.log(response);
  22065. // let data = response.data.FunctionResponse
  22066. // if (data.choices && data.choices.length && data.choices[0].message) {
  22067. // console.log(data.choices[0].message.content);
  22068. // let dArray = JSON.parse(data.choices[0].message.content)
  22069. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  22070. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  22071. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22072. // for (var i = 0; i < dArray.length; i++) {
  22073. // let _task = dArray[i]
  22074. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22075. // task: _task.task,
  22076. // taskDetail: "",
  22077. // taskDetail2: "",
  22078. // taskDetail3: _task.detail,
  22079. // chapterData: [],
  22080. // toolText: "",
  22081. // toolChoose: [
  22082. // {
  22083. // tool: [],
  22084. // toolDetail: "",
  22085. // toolType: 0,
  22086. // askCount: 1,
  22087. // askTitle: "",
  22088. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22089. // },
  22090. // ],
  22091. // isShowTools: false,
  22092. // askCount: 1,
  22093. // isFold: 0,
  22094. // askTitle: "",
  22095. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22096. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22097. // homeworkList: [],
  22098. // })
  22099. // }
  22100. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22101. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22102. // _this.$forceUpdate();
  22103. // } else {
  22104. // for (var i = 0; i < dArray.length; i++) {
  22105. // let _task = dArray[i]
  22106. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22107. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22108. // }else {
  22109. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22110. // task: _task.task,
  22111. // taskDetail: "",
  22112. // taskDetail2: "",
  22113. // taskDetail3: _task.detail,
  22114. // chapterData: [],
  22115. // toolText: "",
  22116. // toolChoose: [
  22117. // {
  22118. // tool: [],
  22119. // toolDetail: "",
  22120. // toolType: 0,
  22121. // askCount: 1,
  22122. // askTitle: "",
  22123. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22124. // },
  22125. // ],
  22126. // isShowTools: false,
  22127. // askCount: 1,
  22128. // isFold: 0,
  22129. // askTitle: "",
  22130. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22131. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22132. // homeworkList: [],
  22133. // }
  22134. // }
  22135. // }
  22136. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22137. // _this.$forceUpdate();
  22138. // }
  22139. // }
  22140. // // if (data.result) {
  22141. // // console.log(data.result);
  22142. // // let dArray = JSON.parse(data.result)
  22143. // // _this.teacherText = JSON.parse(data.result)
  22144. // // for (var i = 0; i < dArray.length; i++) {
  22145. // // let _task = dArray[i]
  22146. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22147. // // }
  22148. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22149. // // _this.$forceUpdate();
  22150. // // }
  22151. // callback ? callback() : ''
  22152. // _this.loading = false
  22153. // }).catch(function (error) {
  22154. // _this.loading = false
  22155. // console.log(error);
  22156. // });
  22157. let parm = {
  22158. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22159. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22160. session_name: uuidv4(),
  22161. userId: this.userid,
  22162. file_ids: fileid.length ? [...fileid] : '',
  22163. model: 'gpt-4o-2024-11-20',
  22164. temperature: this.mode == 3 ? 0.5 : 0.1,
  22165. }
  22166. this.ajax
  22167. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22168. .then((response) => {
  22169. console.log(response);
  22170. let data = response.data.FunctionResponse
  22171. if (data.message) {
  22172. console.log(data.message);
  22173. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22174. let dArray = []
  22175. try {
  22176. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22177. } catch (error) {
  22178. console.log("error_________________" + error);
  22179. try {
  22180. let regex = new RegExp(/```json([\s\S]*?)```/);
  22181. let match = data.message.match(regex);
  22182. dArray = JSON.parse(match[1]);
  22183. // var message = data.message;
  22184. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22185. // var jsonEnd = message.indexOf("```", jsonStart);
  22186. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  22187. // dArray = JSON.parse(jsonString);
  22188. } catch (error) {
  22189. _this.aiGet4(messages, callback)
  22190. _this.$message.error(this.lang.ssNetWave)
  22191. console.log("error_________________" + error);
  22192. return;
  22193. console.log("error_________________" + error);
  22194. _this.loading = false
  22195. }
  22196. }
  22197. try {
  22198. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22199. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22200. if(_this.panTeacher() > 0){
  22201. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22202. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22203. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22204. }
  22205. for (var i = 0; i < dArray.length; i++) {
  22206. let _task = dArray[i]
  22207. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22208. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':','')
  22209. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22210. }else {
  22211. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22212. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22213. taskDetail: "",
  22214. taskDetail2: "",
  22215. taskDetail3: _task.detail,
  22216. chapterData: [],
  22217. toolText: "",
  22218. toolChoose: [
  22219. {
  22220. tool: [],
  22221. toolDetail: "",
  22222. toolType: 0,
  22223. askCount: 1,
  22224. askTitle: "",
  22225. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22226. },
  22227. ],
  22228. isShowTools: false,
  22229. askCount: 1,
  22230. isFold: 0,
  22231. askTitle: "",
  22232. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22233. checkJson: [{ checkCount: [], checkPerent: [] }],
  22234. homeworkList: [],
  22235. })
  22236. }
  22237. }
  22238. }else {
  22239. _this.unitJson[0].chapterInfo[0].taskJson = []
  22240. for (var i = 0; i < dArray.length; i++) {
  22241. let _task = dArray[i]
  22242. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22243. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22244. taskDetail: "",
  22245. taskDetail2: "",
  22246. taskDetail3: _task.detail,
  22247. chapterData: [],
  22248. toolText: "",
  22249. toolChoose: [
  22250. {
  22251. tool: [],
  22252. toolDetail: "",
  22253. toolType: 0,
  22254. askCount: 1,
  22255. askTitle: "",
  22256. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22257. },
  22258. ],
  22259. isShowTools: false,
  22260. askCount: 1,
  22261. isFold: 0,
  22262. askTitle: "",
  22263. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22264. checkJson: [{ checkCount: [], checkPerent: [] }],
  22265. homeworkList: [],
  22266. })
  22267. }
  22268. }
  22269. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22270. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22271. _this.$forceUpdate();
  22272. } else {
  22273. for (var i = 0; i < dArray.length; i++) {
  22274. let _task = dArray[i]
  22275. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22276. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22277. }else {
  22278. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22279. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22280. taskDetail: "",
  22281. taskDetail2: "",
  22282. taskDetail3: _task.detail,
  22283. chapterData: [],
  22284. toolText: "",
  22285. toolChoose: [
  22286. {
  22287. tool: [],
  22288. toolDetail: "",
  22289. toolType: 0,
  22290. askCount: 1,
  22291. askTitle: "",
  22292. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22293. },
  22294. ],
  22295. isShowTools: false,
  22296. askCount: 1,
  22297. isFold: 0,
  22298. askTitle: "",
  22299. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22300. checkJson: [{ checkCount: [], checkPerent: [] }],
  22301. homeworkList: [],
  22302. }
  22303. }
  22304. }
  22305. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22306. _this.$forceUpdate();
  22307. }
  22308. } catch (error) {
  22309. _this.$message.error(this.lang.ssNetWave)
  22310. _this.aiGet4(messages, callback)
  22311. console.log("error_________________" + error);
  22312. return;
  22313. // _this.loading = false
  22314. }
  22315. }
  22316. callback ? callback() : ''
  22317. })
  22318. .catch((error) => {
  22319. _this.loading = false
  22320. console.log(error);
  22321. });
  22322. },
  22323. async aiDetail(msg, index) {
  22324. let _this = this
  22325. const _tindex = 'task-' + index
  22326. const _tindex2 = index
  22327. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22328. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22329. if (_this.infoData.length) {
  22330. for (var i = 0; i < _this.infoData.length; i++) {
  22331. if(_this.infoData[i].fileid){
  22332. fileid.push(_this.infoData[i].fileid)
  22333. }else {
  22334. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22335. if(_fileid){
  22336. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22337. _this.$forceUpdate();
  22338. if(_fileid != 1){
  22339. fileid.push(_fileid)
  22340. }
  22341. }
  22342. }
  22343. }
  22344. }
  22345. let url = []
  22346. if (this.infoData.length) {
  22347. for (var i = 0; i < this.infoData.length; i++) {
  22348. url.push(this.infoData[i].url)
  22349. }
  22350. }
  22351. let messages = `NOTICE
  22352. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22353. Language: ${this.getLang()}
  22354. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22355. Instruction: Based on the context, follow "Format example", write content.
  22356. #Context
  22357. ## 要求
  22358. ${msg}
  22359. ## 参考信息
  22360. 任务名称:${_this.aiCallBack.task}
  22361. ## 优化内容
  22362. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22363. // -------- #补充参考资料和
  22364. // ## 补充参考资料
  22365. // - 补充资料:${url.join(",")}
  22366. // - 补充描述:${_this.courseText2}
  22367. _this.taskDetailLoading.push(_tindex)
  22368. _this.ttaskDetailLoading.push(_tindex)
  22369. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22370. let _uuid = uuidv4();
  22371. // let params = JSON.stringify({
  22372. // // "model": "Chat",
  22373. // model: 'gpt-3.5-turbo',
  22374. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22375. // max_tokens: 4096,
  22376. // top_p: 1,
  22377. // frequency_penalty: 0,
  22378. // presence_penalty: 0,
  22379. // messages: [{
  22380. // content: messages,
  22381. // role: 'user'
  22382. // }],
  22383. // uid: _uuid,
  22384. // mind_map_question: "",
  22385. // })
  22386. let params = {
  22387. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22388. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22389. session_name: _uuid,
  22390. userId: _this.userid,
  22391. uid: _uuid,
  22392. file_ids: fileid.length ? [...fileid] : '',
  22393. model: 'gpt-4o-2024-11-20',
  22394. temperature: this.mode == 3 ? 0.5 : 0.1,
  22395. }
  22396. // let params = JSON.stringify({
  22397. // message: {
  22398. // anthropic_version: "bedrock-2023-05-31",
  22399. // max_tokens: 4096,
  22400. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22401. // top_p: 1,
  22402. // messages: [{
  22403. // "role": "user",
  22404. // "content": messages
  22405. // }] ,
  22406. // },
  22407. // uid: _uuid,
  22408. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22409. // });
  22410. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22411. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22412. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22413. console.log(response);
  22414. // let data = response.data.FunctionResponse
  22415. // if (data.choices && data.choices.length && data.choices[0].message) {
  22416. // console.log(data.choices[0].message.content);
  22417. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22418. // _this.$forceUpdate()
  22419. // }
  22420. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22421. } else {
  22422. _this.$message.warning(response.data.FunctionResponse.result);
  22423. }
  22424. _this.isOutlineTaskCancelToken[index] = null
  22425. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22426. }).catch(function (error) {
  22427. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22428. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22429. _this.isOutlineTaskCancelToken[index] = null
  22430. if(error && error.message != 'Request canceled by the user.'){
  22431. _this.$message.error(this.lang.ssTooManyReq)
  22432. }
  22433. console.log(error);
  22434. });
  22435. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22436. },
  22437. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22438. try {
  22439. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22440. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22441. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22442. } catch(error){
  22443. console.log('EventSource error:', error);
  22444. this.$message.error(this.lang.ssTooManyReq)
  22445. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22446. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22447. this.isOutlineTaskCancelToken[_tindex2] = null
  22448. return;
  22449. }
  22450. let _allText = "";
  22451. let _mdText = "";
  22452. let _iindex = 0
  22453. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22454. let _eData = JSON.parse(_e.data).content;
  22455. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22456. //对话已经完成
  22457. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22458. this.isOutlineTaskCancelSource[_tindex2].close();
  22459. this.isOutlineTaskCancelSource[_tindex2] = null;
  22460. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22461. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22462. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22463. this.isOutlineTaskCancelToken[_tindex2] = null
  22464. return;
  22465. } else {
  22466. _iindex++
  22467. //对话还在继续
  22468. let _text = "";
  22469. _text = _eData.replaceAll("'", "");
  22470. if (_allText == "") {
  22471. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22472. } else {
  22473. _allText += _text;
  22474. }
  22475. _mdText = _allText + "_";
  22476. _mdText = _mdText.replace(/\\n/g, "\n");
  22477. _mdText = _mdText.replace(/\\/g, "");
  22478. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22479. //转化返回的回复流数据.
  22480. if(_iindex == 10){
  22481. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22482. _iindex = 0
  22483. }
  22484. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22485. // 处理流数据
  22486. }
  22487. // this.$forceUpdate();
  22488. };
  22489. let _this = this
  22490. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22491. // 处理错误,可以尝试重新连接
  22492. console.log('EventSource error:', event);
  22493. _this.$message.error(this.lang.ssTooManyReq)
  22494. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22495. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22496. _this.isOutlineTaskCancelToken[_tindex2] = null
  22497. _this.isOutlineTaskCancelSource[_tindex2].close();
  22498. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22499. };
  22500. },
  22501. async aiOutlineDetail(msg, index) {
  22502. let _this = this
  22503. const _tindex = 'task-' + index
  22504. const _tindex2 = index
  22505. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22506. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22507. if (_this.infoData.length) {
  22508. for (var i = 0; i < _this.infoData.length; i++) {
  22509. if(_this.infoData[i].fileid){
  22510. fileid.push(_this.infoData[i].fileid)
  22511. }else {
  22512. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22513. if(_fileid){
  22514. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22515. _this.$forceUpdate();
  22516. if(_fileid != 1){
  22517. fileid.push(_fileid)
  22518. }
  22519. }
  22520. }
  22521. }
  22522. }
  22523. let url = []
  22524. if (this.infoData.length) {
  22525. for (var i = 0; i < this.infoData.length; i++) {
  22526. url.push(this.infoData[i].url)
  22527. }
  22528. }
  22529. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22530. let messages = `NOTICE
  22531. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22532. Language: ${this.getLang()}
  22533. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22534. Instruction: Based on the context, follow "Format example", write content.
  22535. #Context
  22536. ## 要求
  22537. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22538. ## 参考信息
  22539. 课程名字:${_this.courseName}
  22540. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22541. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22542. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22543. # Format example
  22544. 子任务名称:名称应该总结了该任务是在做什么,
  22545. 子任务设计:任务设计。
  22546. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22547. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22548. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22549. `
  22550. // 教学目标:教学目标。
  22551. // 任务设计:任务设计。
  22552. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22553. // -------- #补充参考资料和
  22554. // ## 补充参考资料
  22555. // - 补充资料:${url.join(",")}
  22556. // - 补充描述:${_this.courseText2}
  22557. _this.taskDetailLoading.push(_tindex)
  22558. _this.ttaskDetailLoading.push(_tindex)
  22559. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22560. let _uuid = uuidv4();
  22561. // let params = JSON.stringify({
  22562. // // "model": "Chat",
  22563. // model: 'gpt-3.5-turbo',
  22564. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22565. // max_tokens: 4096,
  22566. // top_p: 1,
  22567. // frequency_penalty: 0,
  22568. // presence_penalty: 0,
  22569. // messages: [{
  22570. // content: messages,
  22571. // role: 'user'
  22572. // }],
  22573. // uid: _uuid,
  22574. // mind_map_question: "",
  22575. // })
  22576. let params = {
  22577. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22578. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22579. session_name: _uuid,
  22580. userId: _this.userid,
  22581. uid: _uuid,
  22582. file_ids: fileid.length ? [...fileid] : '',
  22583. model: 'gpt-4o-2024-11-20',
  22584. temperature: this.mode == 3 ? 0.5 : 0.1,
  22585. }
  22586. // let params = JSON.stringify({
  22587. // message: {
  22588. // anthropic_version: "bedrock-2023-05-31",
  22589. // max_tokens: 4096,
  22590. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22591. // top_p: 1,
  22592. // messages: [{
  22593. // "role": "user",
  22594. // "content": messages
  22595. // }] ,
  22596. // },
  22597. // uid: _uuid,
  22598. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22599. // });
  22600. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22601. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22602. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22603. console.log(response);
  22604. // let data = response.data.FunctionResponse
  22605. // if (data.choices && data.choices.length && data.choices[0].message) {
  22606. // console.log(data.choices[0].message.content);
  22607. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22608. // _this.$forceUpdate()
  22609. // }
  22610. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22611. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22612. } else {
  22613. _this.$message.warning(response.data.FunctionResponse.result);
  22614. }
  22615. _this.isOutlineTaskCancelToken[index] = null
  22616. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22617. }).catch(function (error) {
  22618. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22619. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22620. _this.isOutlineTaskCancelToken[index] = null
  22621. if(error && error.message != 'Request canceled by the user.'){
  22622. _this.$message.error(this.lang.ssTooManyReq)
  22623. }
  22624. console.log(error);
  22625. });
  22626. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22627. },
  22628. async aiOutlineDetail2(msg, index) {
  22629. let _this = this
  22630. const _tindex = 'task-' + index
  22631. const _tindex2 = index
  22632. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22633. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22634. if (_this.infoData.length) {
  22635. for (var i = 0; i < _this.infoData.length; i++) {
  22636. if(_this.infoData[i].fileid){
  22637. fileid.push(_this.infoData[i].fileid)
  22638. }else {
  22639. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22640. if(_fileid){
  22641. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22642. _this.$forceUpdate();
  22643. if(_fileid != 1){
  22644. fileid.push(_fileid)
  22645. }
  22646. }
  22647. }
  22648. }
  22649. }
  22650. let url = []
  22651. if (this.infoData.length) {
  22652. for (var i = 0; i < this.infoData.length; i++) {
  22653. url.push(this.infoData[i].url)
  22654. }
  22655. }
  22656. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22657. let taskArray = []
  22658. let taskArrayD = []
  22659. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22660. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22661. if(k != index){
  22662. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22663. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22664. }
  22665. }
  22666. let messages = `NOTICE
  22667. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22668. Language: ${this.getLang()}
  22669. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22670. Instruction: Based on the context, follow "Format example", write content.
  22671. #Context
  22672. ## 要求
  22673. ${msg}
  22674. ## 参考信息
  22675. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22676. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22677. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22678. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22679. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22680. # Format example
  22681. **子任务标题**:环节+子任务名称
  22682. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22683. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22684. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22685. `
  22686. // 教学目标:教学目标。
  22687. // 任务设计:任务设计。
  22688. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22689. // -------- #补充参考资料和
  22690. // ## 补充参考资料
  22691. // - 补充资料:${url.join(",")}
  22692. // - 补充描述:${_this.courseText2}
  22693. _this.taskDetailLoading.push(_tindex)
  22694. _this.ttaskDetailLoading.push(_tindex)
  22695. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22696. let _uuid = uuidv4();
  22697. // let params = JSON.stringify({
  22698. // // "model": "Chat",
  22699. // model: 'gpt-3.5-turbo',
  22700. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22701. // max_tokens: 4096,
  22702. // top_p: 1,
  22703. // frequency_penalty: 0,
  22704. // presence_penalty: 0,
  22705. // messages: [{
  22706. // content: messages,
  22707. // role: 'user'
  22708. // }],
  22709. // uid: _uuid,
  22710. // mind_map_question: "",
  22711. // })
  22712. let params = {
  22713. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22714. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22715. session_name: _uuid,
  22716. userId: _this.userid,
  22717. uid: _uuid,
  22718. file_ids: fileid.length ? [...fileid] : '',
  22719. model: 'gpt-4o-2024-11-20',
  22720. temperature: this.mode == 3 ? 0.5 : 0.1,
  22721. }
  22722. // let params = JSON.stringify({
  22723. // message: {
  22724. // anthropic_version: "bedrock-2023-05-31",
  22725. // max_tokens: 4096,
  22726. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22727. // top_p: 1,
  22728. // messages: [{
  22729. // "role": "user",
  22730. // "content": messages
  22731. // }] ,
  22732. // },
  22733. // uid: _uuid,
  22734. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22735. // });
  22736. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22737. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22738. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22739. console.log(response);
  22740. // let data = response.data.FunctionResponse
  22741. // if (data.choices && data.choices.length && data.choices[0].message) {
  22742. // console.log(data.choices[0].message.content);
  22743. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22744. // _this.$forceUpdate()
  22745. // }
  22746. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22747. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22748. } else {
  22749. _this.$message.warning(response.data.FunctionResponse.result);
  22750. }
  22751. _this.isOutlineTaskCancelToken[index] = null
  22752. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22753. }).catch(function (error) {
  22754. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22755. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22756. _this.isOutlineTaskCancelToken[index] = null
  22757. if(error && error.message != 'Request canceled by the user.'){
  22758. _this.$message.error(this.lang.ssTooManyReq)
  22759. }
  22760. console.log(error);
  22761. });
  22762. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22763. },
  22764. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22765. try {
  22766. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22767. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22768. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22769. } catch(error) {
  22770. console.log('EventSource error:', error);
  22771. this.$message.error(this.lang.ssTooManyReq)
  22772. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22773. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22774. this.isOutlineTaskCancelToken[_tindex2] = null
  22775. return;
  22776. }
  22777. let _allText = "";
  22778. let _mdText = "";
  22779. let _iindex = 0
  22780. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22781. let _eData = JSON.parse(_e.data).content;
  22782. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22783. //对话已经完成
  22784. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22785. this.isOutlineTaskCancelSource[_tindex2].close();
  22786. this.isOutlineTaskCancelSource[_tindex2] = null;
  22787. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22788. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22789. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22790. }
  22791. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22792. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22793. this.isOutlineTaskCancelToken[_tindex2] = null
  22794. return;
  22795. } else {
  22796. _iindex++
  22797. //对话还在继续
  22798. let _text = "";
  22799. _text = _eData.replaceAll("'", "");
  22800. if (_allText == "") {
  22801. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22802. } else {
  22803. _allText += _text;
  22804. }
  22805. _mdText = _allText + "_";
  22806. _mdText = _mdText.replace(/\\n/g, "\n");
  22807. _mdText = _mdText.replace(/\\/g, "");
  22808. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22809. //转化返回的回复流数据.
  22810. if(_iindex == 10){
  22811. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22812. _iindex = 0
  22813. }
  22814. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22815. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22816. }
  22817. // 处理流数据
  22818. }
  22819. // this.$forceUpdate();
  22820. };
  22821. let _this = this
  22822. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22823. // 处理错误,可以尝试重新连接
  22824. console.log('EventSource error:', event);
  22825. _this.$message.error(this.lang.ssTooManyReq)
  22826. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22827. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22828. _this.isOutlineTaskCancelToken[_tindex2] = null
  22829. _this.isOutlineTaskCancelSource[_tindex2].close();
  22830. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22831. };
  22832. },
  22833. async aiDetail2(msg, index) {
  22834. let _this = this
  22835. const _tindex = 'task-' + index
  22836. const _tindex2 = index
  22837. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22838. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22839. if (_this.infoData.length) {
  22840. for (var i = 0; i < _this.infoData.length; i++) {
  22841. if(_this.infoData[i].fileid){
  22842. fileid.push(_this.infoData[i].fileid)
  22843. }else {
  22844. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22845. if(_fileid){
  22846. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22847. _this.$forceUpdate();
  22848. if(_fileid != 1){
  22849. fileid.push(_fileid)
  22850. }
  22851. }
  22852. }
  22853. }
  22854. }
  22855. let messages = `NOTICE
  22856. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22857. Language: ${this.getLang()}
  22858. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22859. Instruction: Based on the context, follow "Format example", write content.
  22860. #Context
  22861. ## 要求
  22862. ${msg}
  22863. ## 参考资料
  22864. 任务名字: ${_this.aiCallBack.task}
  22865. ## 优化信息
  22866. ${_this.aiCallBack.taskDetail}
  22867. # Format example
  22868. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22869. _this.taskDetailLoading2.push(_tindex)
  22870. _this.ttaskDetailLoading2.push(_tindex)
  22871. let _uuid = uuidv4();
  22872. // let params = JSON.stringify({
  22873. // // "model": "Chat",
  22874. // model: 'gpt-3.5-turbo',
  22875. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22876. // max_tokens: 4096,
  22877. // top_p: 1,
  22878. // frequency_penalty: 0,
  22879. // presence_penalty: 0,
  22880. // messages: [{
  22881. // content: messages,
  22882. // role: 'user'
  22883. // }],
  22884. // uid: _uuid,
  22885. // mind_map_question: "",
  22886. // })
  22887. let params = {
  22888. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22889. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22890. session_name: _uuid,
  22891. userId: _this.userid,
  22892. uid: _uuid,
  22893. file_ids: fileid.length ? [...fileid] : '',
  22894. model: 'gpt-4o-2024-11-20',
  22895. temperature: this.mode == 3 ? 0.5 : 0.1,
  22896. }
  22897. // let params = JSON.stringify({
  22898. // message: {
  22899. // anthropic_version: "bedrock-2023-05-31",
  22900. // max_tokens: 4096,
  22901. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22902. // top_p: 1,
  22903. // messages: [{
  22904. // "role": "user",
  22905. // "content": messages
  22906. // }] ,
  22907. // },
  22908. // uid: _uuid,
  22909. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22910. // });
  22911. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22912. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22913. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22914. console.log(response);
  22915. // let data = response.data.FunctionResponse
  22916. // if (data.choices && data.choices.length && data.choices[0].message) {
  22917. // console.log(data.choices[0].message.content);
  22918. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22919. // _this.$forceUpdate()
  22920. // }
  22921. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22922. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22923. } else {
  22924. _this.$message.warning(response.data.FunctionResponse.result);
  22925. }
  22926. }).catch(function (error) {
  22927. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22928. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22929. if(error && error.message != 'Request canceled by the user.'){
  22930. _this.$message.error(this.lang.ssTooManyReq)
  22931. }
  22932. console.log(error);
  22933. });
  22934. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22935. },
  22936. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22937. let _source;
  22938. try {
  22939. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22940. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22941. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22942. } catch(error) {
  22943. console.log('EventSource error:', error);
  22944. this.$message.error(this.lang.ssTooManyReq)
  22945. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22946. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22947. return;
  22948. }
  22949. let _allText = "";
  22950. let _mdText = "";
  22951. let _iindex = 0
  22952. _source.onmessage = _e => {
  22953. let _eData = JSON.parse(_e.data).content;
  22954. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22955. //对话已经完成
  22956. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22957. _source.close();
  22958. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22959. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22960. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22961. return;
  22962. } else {
  22963. _iindex++
  22964. //对话还在继续
  22965. let _text = "";
  22966. _text = _eData.replaceAll("'", "");
  22967. if (_allText == "") {
  22968. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22969. } else {
  22970. _allText += _text;
  22971. }
  22972. _mdText = _allText + "_";
  22973. _mdText = _mdText.replace(/\\n/g, "\n");
  22974. _mdText = _mdText.replace(/\\/g, "");
  22975. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22976. //转化返回的回复流数据
  22977. if(_iindex == 10){
  22978. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22979. _iindex = 0
  22980. }
  22981. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22982. // 处理流数据
  22983. }
  22984. // this.$forceUpdate();
  22985. };
  22986. let _this = this
  22987. _source.onerror = function(event) {
  22988. // 处理错误,可以尝试重新连接
  22989. console.log('EventSource error:', event);
  22990. _this.$message.error(this.lang.ssTooManyReq)
  22991. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22992. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22993. _source.close();
  22994. };
  22995. },
  22996. async aiDetail3(msg, index, tindex) {
  22997. let _this = this
  22998. const _tindex = 'task-' + index + tindex
  22999. const _tindex2 = index
  23000. const _tindex3 = tindex
  23001. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23002. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23003. if (_this.infoData.length) {
  23004. for (var i = 0; i < _this.infoData.length; i++) {
  23005. if(_this.infoData[i].fileid){
  23006. fileid.push(_this.infoData[i].fileid)
  23007. }else {
  23008. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23009. if(_fileid){
  23010. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23011. _this.$forceUpdate();
  23012. if(_fileid != 1){
  23013. fileid.push(_fileid)
  23014. }
  23015. }
  23016. }
  23017. }
  23018. }
  23019. let tool = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]
  23020. let appJson = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].appJson
  23021. // **重点考虑该任务及工具名和工具内容的情况下*
  23022. let messages = `NOTICE
  23023. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  23024. Language: ${this.getLang()}
  23025. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23026. Instruction: Based on the context, follow "Format example", write content.
  23027. #Context
  23028. ## 参考内容
  23029. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23030. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23031. 工具名称:${_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 : '无'}
  23032. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  23033. ${tool == 72 && appJson && appJson.name && `应用名称:${appJson.name}`}
  23034. ${tool == 72 && appJson && appJson.detail && `应用描述:${appJson.detail}`}
  23035. ## 要求
  23036. ${msg} 输出格式和内容要求参考#格式与要求
  23037. # Format example
  23038. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  23039. _this.taskDetailLoading3.push(_tindex)
  23040. _this.ttaskDetailLoading3.push(_tindex)
  23041. let _uuid = uuidv4();
  23042. // let params = JSON.stringify({
  23043. // // "model": "Chat",
  23044. // model: 'gpt-3.5-turbo',
  23045. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23046. // max_tokens: 4096,
  23047. // top_p: 1,
  23048. // frequency_penalty: 0,
  23049. // presence_penalty: 0,
  23050. // messages: [{
  23051. // content: messages,
  23052. // role: 'user'
  23053. // }],
  23054. // uid: _uuid,
  23055. // mind_map_question: "",
  23056. // })
  23057. let params = {
  23058. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23059. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23060. session_name: _uuid,
  23061. userId: _this.userid,
  23062. uid: _uuid,
  23063. file_ids: fileid.length ? [...fileid] : '',
  23064. model: 'gpt-4o-2024-11-20',
  23065. temperature: this.mode == 3 ? 0.5 : 0.1,
  23066. }
  23067. // let params = JSON.stringify({
  23068. // message: {
  23069. // anthropic_version: "bedrock-2023-05-31",
  23070. // max_tokens: 4096,
  23071. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23072. // top_p: 1,
  23073. // messages: [{
  23074. // "role": "user",
  23075. // "content": messages
  23076. // }] ,
  23077. // },
  23078. // uid: _uuid,
  23079. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23080. // });
  23081. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23082. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23083. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23084. console.log(response);
  23085. let data = response.data.FunctionResponse
  23086. // if (data.choices && data.choices.length && data.choices[0].message) {
  23087. // console.log(data.choices[0].message.content);
  23088. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  23089. // _this.$forceUpdate()
  23090. // }
  23091. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23092. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23093. } else {
  23094. _this.$message.warning(response.data.FunctionResponse.result);
  23095. }
  23096. }).catch(function (error) {
  23097. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23098. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  23099. if(error && error.message != 'Request canceled by the user.'){
  23100. _this.$message.error(this.lang.ssTooManyReq)
  23101. }
  23102. console.log(error);
  23103. });
  23104. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  23105. },
  23106. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  23107. let _source;
  23108. try {
  23109. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23110. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23111. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23112. } catch(error) {
  23113. console.log('EventSource error:', event);
  23114. this.$message.error(this.lang.ssTooManyReq)
  23115. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23116. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23117. return;
  23118. }
  23119. let _allText = "";
  23120. let _mdText = "";
  23121. let _iindex = 0
  23122. _source.onmessage = _e => {
  23123. let _eData = JSON.parse(_e.data).content;
  23124. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23125. //对话已经完成
  23126. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23127. _source.close();
  23128. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23129. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23130. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23131. return;
  23132. } else {
  23133. _iindex++
  23134. //对话还在继续
  23135. let _text = "";
  23136. _text = _eData.replaceAll("'", "");
  23137. if (_allText == "") {
  23138. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23139. } else {
  23140. _allText += _text;
  23141. }
  23142. _mdText = _allText + "_";
  23143. _mdText = _mdText.replace(/\\n/g, "\n");
  23144. _mdText = _mdText.replace(/\\/g, "");
  23145. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23146. //转化返回的回复流数据
  23147. if(_iindex == 10){
  23148. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23149. _iindex = 0
  23150. }
  23151. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23152. // 处理流数据
  23153. }
  23154. // this.$forceUpdate();
  23155. };
  23156. let _this = this
  23157. _source.onerror = function(event) {
  23158. // 处理错误,可以尝试重新连接
  23159. console.log('EventSource error:', event);
  23160. _this.$message.error(this.lang.ssTooManyReq)
  23161. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  23162. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  23163. _source.close();
  23164. };
  23165. },
  23166. async aiDetail4(msg, index) {
  23167. if (!msg.length) {
  23168. this.$message.error(this.lang.ssAddEvaOpt)
  23169. return
  23170. }
  23171. let _this = this
  23172. const _tindex = 'task-' + index
  23173. const _tindex2 = index
  23174. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23175. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23176. if (_this.infoData.length) {
  23177. for (var i = 0; i < _this.infoData.length; i++) {
  23178. if(_this.infoData[i].fileid){
  23179. fileid.push(_this.infoData[i].fileid)
  23180. }else {
  23181. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23182. if(_fileid){
  23183. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23184. _this.$forceUpdate();
  23185. if(_fileid != 1){
  23186. fileid.push(_fileid)
  23187. }
  23188. }
  23189. }
  23190. }
  23191. }
  23192. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  23193. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  23194. if(_this.pingjiaInfoData[index][i].fileid){
  23195. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  23196. }
  23197. }
  23198. }
  23199. var _text = ""
  23200. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23201. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23202. // _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 : ''} `
  23203. _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 : ''} `
  23204. }
  23205. }
  23206. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23207. // **重点考虑该任务详情**
  23208. // let messages = `
  23209. // Language: ${this.getLang()}
  23210. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23211. // #Context
  23212. // ## 参考内容
  23213. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23214. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23215. // 评价设计:${_text}
  23216. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23217. // ## 要求
  23218. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23219. // # 格式与要求
  23220. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23221. // # Format example
  23222. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23223. let messages = `
  23224. Language: ${this.getLang()}
  23225. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23226. #Context
  23227. ## 参考内容
  23228. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23229. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23230. ${_text ? '评价设计:'+_text : ''}
  23231. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23232. ## 要求
  23233. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23234. # 格式与要求
  23235. 核心素养:从教案中提取
  23236. 目标:从教案中提取
  23237. 评价标准:从教案中提取评价标准
  23238. # Format example
  23239. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23240. _this.taskDetailLoading4.push(_tindex)
  23241. // let params = JSON.stringify({
  23242. // // "model": "Chat",
  23243. // model: 'gpt-3.5-turbo',
  23244. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23245. // max_tokens: 4096,
  23246. // top_p: 1,
  23247. // frequency_penalty: 0,
  23248. // presence_penalty: 0,
  23249. // messages: [{
  23250. // content: messages,
  23251. // role: 'user'
  23252. // }],
  23253. // stream: false,
  23254. // uid: this.userid,
  23255. // mind_map_question: "",
  23256. // })
  23257. let params = {
  23258. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23259. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23260. session_name: uuidv4(),
  23261. userId: _this.userid,
  23262. file_ids: fileid.length ? [...fileid] : '',
  23263. model: 'gpt-4o-2024-11-20',
  23264. temperature: this.mode == 3 ? 0.5 : 0.1,
  23265. }
  23266. // let params = JSON.stringify({
  23267. // message: {
  23268. // anthropic_version: "bedrock-2023-05-31",
  23269. // max_tokens: 4096,
  23270. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23271. // top_p: 1,
  23272. // messages: [{
  23273. // content: messages,
  23274. // role: 'user'
  23275. // }], //
  23276. // },
  23277. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23278. // });
  23279. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23280. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23281. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23282. console.log(response);
  23283. let data = response.data.FunctionResponse
  23284. // if (data.choices && data.choices.length && data.choices[0].message) {
  23285. // console.log(data.choices[0].message.content);
  23286. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23287. // _this.$forceUpdate()
  23288. // }
  23289. if (data.message) {
  23290. console.log(data.message);
  23291. try {
  23292. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23293. } catch (e) {
  23294. console.log("error_________________" + e);
  23295. // _this.$message.error(data.message)
  23296. try {
  23297. let regex = new RegExp(/```json([\s\S]*?)```/);
  23298. let match = data.message.match(regex);
  23299. let elist = JSON.parse(match[1])
  23300. elist = elist.filter(el=>{
  23301. el.isai = 1
  23302. return el
  23303. })
  23304. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23305. // var message = data.message;
  23306. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23307. // var jsonEnd = message.indexOf("```", jsonStart);
  23308. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23309. // var jsonString = message
  23310. // .substring(jsonStart, jsonEnd)
  23311. // .trim();
  23312. // var _data2 = JSON.parse(jsonString);
  23313. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23314. // }
  23315. } catch (error) {
  23316. }
  23317. }
  23318. _this.$forceUpdate()
  23319. }
  23320. // if (data.result) {
  23321. // console.log(data.result);
  23322. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23323. // _this.$forceUpdate()
  23324. // }
  23325. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23326. }).catch(function (error) {
  23327. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23328. if(error && error.message != 'Request canceled by the user.'){
  23329. _this.$message.error(this.lang.ssTooManyReq)
  23330. }
  23331. console.log(error);
  23332. });
  23333. },
  23334. async aiDetail5(msg, index) {
  23335. let _this = this
  23336. const _tindex = 'task-' + index
  23337. const _tindex2 = index
  23338. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23339. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23340. if (_this.infoData.length) {
  23341. for (var i = 0; i < _this.infoData.length; i++) {
  23342. if(_this.infoData[i].fileid){
  23343. fileid.push(_this.infoData[i].fileid)
  23344. }else {
  23345. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23346. if(_fileid){
  23347. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23348. _this.$forceUpdate();
  23349. if(_fileid != 1){
  23350. fileid.push(_fileid)
  23351. }
  23352. }
  23353. }
  23354. }
  23355. }
  23356. let url = []
  23357. if (this.infoData.length) {
  23358. for (var i = 0; i < this.infoData.length; i++) {
  23359. url.push(this.infoData[i].url)
  23360. }
  23361. }
  23362. var _text = ""
  23363. var _text2 = ""
  23364. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23365. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23366. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23367. }
  23368. let messages = `
  23369. Language: ${this.getLang()}
  23370. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23371. --------
  23372. ## 要求
  23373. ${msg}
  23374. -------
  23375. ## 本教案描述
  23376. ${_this.aiCallBack}
  23377. -------
  23378. ## 课程大纲
  23379. ${_text}
  23380. -------
  23381. ## 其他教学任务教案
  23382. ${_text2}`
  23383. // ## 补充参考资料
  23384. // - 补充资料:${url.join(",")}
  23385. // - 补充描述:${this.courseText2}
  23386. _this.taskDetailLoading5.push(_tindex)
  23387. _this.ttaskDetailLoading5.push(_tindex)
  23388. let _uuid = uuidv4();
  23389. // let params = JSON.stringify({
  23390. // // "model": "Chat",
  23391. // model: 'gpt-3.5-turbo',
  23392. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23393. // max_tokens: 4096,
  23394. // top_p: 1,
  23395. // frequency_penalty: 0,
  23396. // presence_penalty: 0,
  23397. // messages: [{
  23398. // content: messages,
  23399. // role: 'user'
  23400. // }],
  23401. // uid: _uuid,
  23402. // mind_map_question: "",
  23403. // })
  23404. let params = {
  23405. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23406. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23407. session_name: _uuid,
  23408. userId: _this.userid,
  23409. uid: _uuid,
  23410. file_ids: fileid.length ? [...fileid] : '',
  23411. model: 'gpt-4o-2024-11-20',
  23412. temperature: this.mode == 3 ? 0.5 : 0.1,
  23413. }
  23414. // let params = JSON.stringify({
  23415. // message: {
  23416. // anthropic_version: "bedrock-2023-05-31",
  23417. // max_tokens: 4096,
  23418. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23419. // top_p: 1,
  23420. // messages: [{
  23421. // "role": "user",
  23422. // "content": messages
  23423. // }] ,
  23424. // },
  23425. // uid: _uuid,
  23426. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23427. // });
  23428. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23429. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23430. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23431. console.log(response);
  23432. // let data = response.data.FunctionResponse
  23433. // if (data.choices && data.choices.length && data.choices[0].message) {
  23434. // console.log(data.choices[0].message.content);
  23435. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23436. // _this.$forceUpdate()
  23437. // }
  23438. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23439. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23440. } else {
  23441. _this.$message.warning(response.data.FunctionResponse.result);
  23442. }
  23443. }).catch(function (error) {
  23444. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23445. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23446. }
  23447. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23448. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23449. }
  23450. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23451. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23452. if(error && error.message != 'Request canceled by the user.'){
  23453. _this.$message.error(this.lang.ssTooManyReq)
  23454. }
  23455. console.log(error);
  23456. });
  23457. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23458. },
  23459. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23460. let _source;
  23461. try {
  23462. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23463. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23464. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23465. } catch(error){
  23466. console.log('EventSource error:', error);
  23467. this.$message.error(this.lang.ssTooManyReq)
  23468. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23469. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23470. }
  23471. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23472. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23473. }
  23474. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23475. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23476. return;
  23477. }
  23478. let _allText = "";
  23479. let _mdText = "";
  23480. let _iindex = 0
  23481. _source.onmessage = _e => {
  23482. let _eData = JSON.parse(_e.data).content;
  23483. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23484. //对话已经完成
  23485. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23486. _source.close();
  23487. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23488. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23489. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23490. }
  23491. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23492. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23493. }
  23494. return;
  23495. } else {
  23496. _iindex++
  23497. //对话还在继续
  23498. let _text = "";
  23499. _text = _eData.replaceAll("'", "");
  23500. if (_allText == "") {
  23501. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23502. } else {
  23503. _allText += _text;
  23504. }
  23505. _mdText = _allText + "_";
  23506. _mdText = _mdText.replace(/\\n/g, "\n");
  23507. _mdText = _mdText.replace(/\\/g, "");
  23508. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23509. //转化返回的回复流数据
  23510. if(_iindex == 10){
  23511. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23512. _iindex = 0
  23513. }
  23514. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23515. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23516. }
  23517. // 处理流数据
  23518. }
  23519. // this.$forceUpdate();
  23520. };
  23521. let _this = this
  23522. _source.onerror = function(event) {
  23523. // 处理错误,可以尝试重新连接
  23524. console.log('EventSource error:', event);
  23525. _this.$message.error(this.lang.ssTooManyReq)
  23526. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23527. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23528. }
  23529. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23530. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23531. }
  23532. _source.close();
  23533. };
  23534. },
  23535. async aiDetail52(msg, index, callback) {
  23536. let _this = this
  23537. const _tindex = 'task-' + index
  23538. const _tindex2 = index
  23539. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23540. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23541. if (_this.infoData.length) {
  23542. for (var i = 0; i < _this.infoData.length; i++) {
  23543. if(_this.infoData[i].fileid){
  23544. fileid.push(_this.infoData[i].fileid)
  23545. }else {
  23546. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23547. if(_fileid){
  23548. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23549. _this.$forceUpdate();
  23550. if(_fileid != 1){
  23551. fileid.push(_fileid)
  23552. }
  23553. }
  23554. }
  23555. }
  23556. }
  23557. let url = []
  23558. if (this.infoData.length) {
  23559. for (var i = 0; i < this.infoData.length; i++) {
  23560. url.push(this.infoData[i].url)
  23561. }
  23562. }
  23563. let taskN = []
  23564. let taskD = []
  23565. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23566. if(_tindex2 != ti){
  23567. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23568. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23569. }
  23570. }
  23571. let messages = `NOTICE
  23572. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23573. Language: ${this.getLang()}
  23574. ATTENTION: follow "Language"
  23575. #Context
  23576. ## 要求
  23577. ${msg}
  23578. ## 补充描述
  23579. 课程简要描述:${_this.courseText}
  23580. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23581. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23582. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23583. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23584. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23585. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23586. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23587. `
  23588. // ## 补充参考资料
  23589. // - 补充资料:${url.join(",")}
  23590. // - 补充描述:${this.courseText2}
  23591. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23592. _this.taskDetailLoading5.push(_tindex)
  23593. }
  23594. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23595. _this.ttaskDetailLoading5.push(_tindex)
  23596. }
  23597. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23598. let _uuid = uuidv4();
  23599. // let params = JSON.stringify({
  23600. // // "model": "Chat",
  23601. // model: 'gpt-3.5-turbo',
  23602. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23603. // max_tokens: 4096,
  23604. // top_p: 1,
  23605. // frequency_penalty: 0,
  23606. // presence_penalty: 0,
  23607. // messages: [{
  23608. // content: messages,
  23609. // role: 'user'
  23610. // }],
  23611. // uid: _uuid,
  23612. // mind_map_question: "",
  23613. // })
  23614. let params = {
  23615. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23616. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23617. session_name: _uuid,
  23618. userId: _this.userid,
  23619. uid: _uuid,
  23620. file_ids: fileid.length ? [...fileid] : '',
  23621. model: 'gpt-4o-2024-11-20',
  23622. temperature: this.mode == 3 ? 0.5 : 0.1,
  23623. }
  23624. // let params = JSON.stringify({
  23625. // message: {
  23626. // anthropic_version: "bedrock-2023-05-31",
  23627. // max_tokens: 4096,
  23628. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23629. // top_p: 1,
  23630. // messages: [{
  23631. // "role": "user",
  23632. // "content": messages
  23633. // }] ,
  23634. // },
  23635. // uid: _uuid,
  23636. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23637. // });
  23638. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23639. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23640. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23641. console.log(response);
  23642. // let data = response.data.FunctionResponse
  23643. // if (data.choices && data.choices.length && data.choices[0].message) {
  23644. // console.log(data.choices[0].message.content);
  23645. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23646. // _this.$forceUpdate()
  23647. // }
  23648. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23649. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23650. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23651. } else {
  23652. _this.$message.warning(response.data.FunctionResponse.result);
  23653. }
  23654. _this.isTeacherTaskCancelToken2[index] = null
  23655. }).catch(function (error) {
  23656. if(error && error.message != 'Request canceled by the user.'){
  23657. _this.isTeacherTaskCancelToken2[index] = null
  23658. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23659. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23660. }
  23661. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23662. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23663. }
  23664. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23665. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23666. _this.$message.error(this.lang.ssTooManyReq)
  23667. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23668. confirmButtonText: _this.lang.ssConfirm,
  23669. cancelButtonText: _this.lang.ssCancel,
  23670. distinguishCancelAndClose: true,
  23671. type: "warning",
  23672. customClass: 'custom-confirm-box'
  23673. })
  23674. .then(() => {
  23675. _this.aiDetail52(msg, index, callback)
  23676. }).catch((v) => {
  23677. console.log(v);
  23678. callback ? callback() : ''
  23679. })
  23680. setTimeout(() => {
  23681. _this.setTipsIndex()
  23682. }, 500)
  23683. }
  23684. console.log(error);
  23685. });
  23686. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23687. },
  23688. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23689. try {
  23690. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23691. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23692. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23693. } catch(error) {
  23694. console.log('EventSource error:', error);
  23695. this.$message.error(this.lang.ssTooManyReq)
  23696. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23697. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23698. }
  23699. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23700. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23701. }
  23702. this.isTeacherTaskCancelToken2[_tindex2] = null
  23703. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23704. confirmButtonText: _this.lang.ssConfirm,
  23705. cancelButtonText: _this.lang.ssCancel,
  23706. distinguishCancelAndClose: true,
  23707. type: "warning",
  23708. customClass: 'custom-confirm-box'
  23709. })
  23710. .then(() => {
  23711. _this.aiDetail52(msg, _tindex2, callback)
  23712. }).catch((v) => {
  23713. console.log(v);
  23714. callback ? callback() : ''
  23715. })
  23716. setTimeout(() => {
  23717. _this.setTipsIndex()
  23718. }, 500)
  23719. return;
  23720. }
  23721. let _allText = "";
  23722. let _mdText = "";
  23723. this.allTextArray[_tindex2] = ""
  23724. let _iindex = 0
  23725. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23726. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23727. let _eData = JSON.parse(_e.data).content;
  23728. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23729. //对话已经完成
  23730. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23731. this.isTeacherTaskCancelSource[_tindex2].close();
  23732. this.isTeacherTaskCancelSource[_tindex2] = null;
  23733. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23734. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23735. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23736. }
  23737. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23738. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23739. }
  23740. this.isTeacherTaskCancelToken2[_tindex2] = null
  23741. callback ? callback() : ''
  23742. // this.createTeacherAn(_tindex2, 2);
  23743. this.saveCourse()
  23744. return;
  23745. } else {
  23746. _iindex++
  23747. //对话还在继续
  23748. let _text = "";
  23749. _text = _eData.replaceAll("'", "");
  23750. if (_allText == "") {
  23751. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23752. } else {
  23753. _allText += _text;
  23754. }
  23755. _mdText = _allText + "_";
  23756. _mdText = _mdText.replace(/\\n/g, "\n");
  23757. _mdText = _mdText.replace(/\\/g, "");
  23758. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23759. //转化返回的回复流数据
  23760. if(_iindex == 10){
  23761. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23762. _iindex = 0
  23763. }
  23764. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23765. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23766. }
  23767. // 处理流数据
  23768. }
  23769. };
  23770. let _this = this
  23771. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23772. // 处理错误,可以尝试重新连接
  23773. console.log('EventSource error:', event);
  23774. _this.$message.error(this.lang.ssTooManyReq)
  23775. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23776. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23777. }
  23778. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23779. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23780. }
  23781. _this.isTeacherTaskCancelSource[_tindex2].close();
  23782. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23783. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23784. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23785. confirmButtonText: _this.lang.ssConfirm,
  23786. cancelButtonText: _this.lang.ssCancel,
  23787. distinguishCancelAndClose: true,
  23788. type: "warning",
  23789. customClass: 'custom-confirm-box'
  23790. })
  23791. .then(() => {
  23792. _this.aiDetail52(msg, _tindex2, callback)
  23793. }).catch((v) => {
  23794. console.log(v);
  23795. callback ? callback() : ''
  23796. })
  23797. setTimeout(() => {
  23798. _this.setTipsIndex()
  23799. }, 500)
  23800. };
  23801. },
  23802. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23803. let _mdText = "";
  23804. let _eData = JSON.parse(_e.data).content;
  23805. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23806. //对话已经完成
  23807. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23808. _source.close();
  23809. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23810. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23811. return;
  23812. } else {
  23813. //对话还在继续
  23814. let _text = "";
  23815. _text = _eData.replaceAll("'", "");
  23816. if (this.allTextArray[_tindex2] == "") {
  23817. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23818. } else {
  23819. this.allTextArray[_tindex2] += _text;
  23820. }
  23821. _mdText = this.allTextArray[_tindex2] + "_";
  23822. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23823. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23824. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23825. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23826. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23827. // 处理流数据
  23828. }
  23829. },
  23830. async aiCpote(msg, callback) {
  23831. let _this = this
  23832. let _index = _this.aitype.replace("aiC","c")
  23833. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23834. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23835. if (_this.infoData.length) {
  23836. for (var i = 0; i < _this.infoData.length; i++) {
  23837. if(_this.infoData[i].fileid){
  23838. fileid.push(_this.infoData[i].fileid)
  23839. }else {
  23840. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23841. if(_fileid){
  23842. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23843. _this.$forceUpdate();
  23844. if(_fileid != 1){
  23845. fileid.push(_fileid)
  23846. }
  23847. }
  23848. }
  23849. }
  23850. }
  23851. let sub = []
  23852. if (this.courseTypeId.length) {
  23853. for (var i = 0; i < this.courseTypeId.length; i++) {
  23854. let _sid = this.courseTypeId[i]
  23855. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23856. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23857. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23858. }
  23859. }
  23860. }
  23861. }
  23862. let mclass = []
  23863. if (this.courseTypeId.length) {
  23864. for (var i = 0; i < this.courseTypeId.length; i++) {
  23865. let _sid = this.courseTypeId[i]
  23866. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23867. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23868. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23869. }
  23870. }
  23871. }
  23872. }
  23873. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23874. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23875. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23876. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23877. let messages = `NOTICE
  23878. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23879. Language: ${this.getLang()}
  23880. ATTENTION: follow "Language"
  23881. ${msg}
  23882. ## 课程简介
  23883. 课程名字:${this.courseName}
  23884. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23885. ${sub.length ? '学科:' + sub.join(",") : ''}
  23886. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23887. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23888. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23889. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23890. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23891. _this.cpoteLoading[_index] = true
  23892. _this.cpotetLoading[_index] = true
  23893. let _uuid = uuidv4();
  23894. // let params = JSON.stringify({
  23895. // // "model": "Chat",
  23896. // model: 'gpt-3.5-turbo',
  23897. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23898. // max_tokens: 4096,
  23899. // top_p: 1,
  23900. // frequency_penalty: 0,
  23901. // presence_penalty: 0,
  23902. // messages: [{
  23903. // content: messages,
  23904. // role: 'user'
  23905. // }],
  23906. // uid: _uuid,
  23907. // mind_map_question: "",
  23908. // })
  23909. let params = {
  23910. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23911. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23912. session_name: _uuid,
  23913. userId: _this.userid,
  23914. uid: _uuid,
  23915. file_ids: fileid.length ? [...fileid] : '',
  23916. model: 'gpt-4o-2024-11-20',
  23917. temperature: this.mode == 3 ? 0.5 : 0.1,
  23918. }
  23919. // let params = JSON.stringify({
  23920. // message: {
  23921. // anthropic_version: "bedrock-2023-05-31",
  23922. // max_tokens: 4096,
  23923. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23924. // top_p: 1,
  23925. // messages: [{
  23926. // "role": "user",
  23927. // "content": messages
  23928. // }] ,
  23929. // },
  23930. // uid: _uuid,
  23931. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23932. // });
  23933. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23934. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23935. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23936. console.log(response);
  23937. // let data = response.data.FunctionResponse
  23938. // if (data.choices && data.choices.length && data.choices[0].message) {
  23939. // console.log(data.choices[0].message.content);
  23940. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23941. // _this.$forceUpdate()
  23942. // }
  23943. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23944. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23945. } else {
  23946. _this.$message.warning(response.data.FunctionResponse.result);
  23947. }
  23948. }).catch(function (error) {
  23949. _this.cpoteLoading[_index] = false
  23950. _this.cpotetLoading[_index] = false
  23951. callback ? callback() : ''
  23952. if(error && error.message != 'Request canceled by the user.'){
  23953. _this.$message.error(this.lang.ssTooManyReq)
  23954. }
  23955. console.log(error);
  23956. });
  23957. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23958. },
  23959. aiCpotegetAiContent(_uid, loading, callback) {
  23960. let _source;
  23961. try {
  23962. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23963. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23964. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23965. } catch(error){
  23966. console.log('EventSource error:', error);
  23967. this.$message.error(this.lang.ssTooManyReq)
  23968. this.cpoteLoading[loading] = false
  23969. this.cpotetLoading[loading] = false
  23970. return;
  23971. }
  23972. let _allText = "";
  23973. let _mdText = "";
  23974. let _iindex = 0
  23975. _source.onmessage = _e => {
  23976. let _eData = JSON.parse(_e.data).content;
  23977. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23978. //对话已经完成
  23979. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23980. _source.close();
  23981. this.cpote[loading] = _mdText;
  23982. this.cpoteLoading[loading] = false
  23983. this.cpotetLoading[loading] = false
  23984. callback ? callback() : ''
  23985. this.saveCourse()
  23986. return;
  23987. } else {
  23988. _iindex++
  23989. //对话还在继续
  23990. let _text = "";
  23991. _text = _eData.replaceAll("'", "");
  23992. if (_allText == "") {
  23993. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23994. } else {
  23995. _allText += _text;
  23996. }
  23997. _mdText = _allText + "_";
  23998. _mdText = _mdText.replace(/\\n/g, "\n");
  23999. _mdText = _mdText.replace(/\\/g, "");
  24000. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24001. //转化返回的回复流数据
  24002. if(_iindex == 10){
  24003. this.cpote[loading] = _mdText;
  24004. _iindex = 0
  24005. }
  24006. this.cpoteLoading[loading] = false
  24007. // 处理流数据
  24008. }
  24009. // this.$forceUpdate();
  24010. };
  24011. let _this = this
  24012. _source.onerror = function(event) {
  24013. // 处理错误,可以尝试重新连接
  24014. console.log('EventSource error:', event);
  24015. _this.$message.error(this.lang.ssTooManyReq)
  24016. _this.cpoteLoading[loading] = false
  24017. _this.cpotetLoading[loading] = false
  24018. _source.close();
  24019. };
  24020. },
  24021. async aiteacherTextDetail(msg) {
  24022. let _this = this
  24023. let fileid = []
  24024. if (_this.teacherInfoData.length) {
  24025. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24026. if(_this.teacherInfoData[i].fileid){
  24027. fileid.push(_this.teacherInfoData[i].fileid)
  24028. }else {
  24029. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24030. if(_fileid){
  24031. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24032. _this.$forceUpdate();
  24033. if(_fileid != 1){
  24034. fileid.push(_fileid)
  24035. }
  24036. }
  24037. }
  24038. }
  24039. }
  24040. _this.teacherTextLoading = true
  24041. _this.tteacherTextLoading = true
  24042. let sub = []
  24043. if (_this.courseTypeId.length) {
  24044. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24045. let _sid = _this.courseTypeId[i]
  24046. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24047. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24048. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24049. }
  24050. }
  24051. }
  24052. }
  24053. let mclass = []
  24054. if (_this.courseTypeId.length) {
  24055. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24056. let _sid = _this.courseTypeId[i]
  24057. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24058. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24059. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24060. }
  24061. }
  24062. }
  24063. }
  24064. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24065. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24066. let messages = `NOTICE
  24067. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24068. Language: ${this.getLang()}
  24069. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24070. Instruction: Based on the context, follow "Format example", write content.
  24071. #Context
  24072. ## 参考资料
  24073. 课程名字:${this.courseName}
  24074. ${sub.length ? '学科:' + sub.join(",") : ''}
  24075. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24076. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  24077. ## 要求
  24078. ${msg}
  24079. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24080. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  24081. let _uuid = uuidv4();
  24082. // let params = JSON.stringify({
  24083. // // "model": "Chat",
  24084. // model: 'gpt-3.5-turbo',
  24085. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24086. // max_tokens: 4096,
  24087. // top_p: 1,
  24088. // frequency_penalty: 0,
  24089. // presence_penalty: 0,
  24090. // messages: [{
  24091. // content: messages,
  24092. // role: 'user'
  24093. // }],
  24094. // uid: _uuid,
  24095. // mind_map_question: "",
  24096. // })
  24097. let params = {
  24098. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24099. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24100. session_name: _uuid,
  24101. userId: _this.userid,
  24102. uid: _uuid,
  24103. file_ids: fileid.length ? [...fileid] : '',
  24104. model: 'gpt-4o-2024-11-20',
  24105. temperature: this.mode == 3 ? 0.5 : 0.1,
  24106. }
  24107. // let params = JSON.stringify({
  24108. // message: {
  24109. // anthropic_version: "bedrock-2023-05-31",
  24110. // max_tokens: 4096,
  24111. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24112. // top_p: 1,
  24113. // messages: [{
  24114. // "role": "user",
  24115. // "content": messages
  24116. // }] ,
  24117. // },
  24118. // uid: _uuid,
  24119. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24120. // });
  24121. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24122. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  24123. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24124. console.log(response);
  24125. // let data = response.data.FunctionResponse
  24126. // if (data.choices && data.choices.length && data.choices[0].message) {
  24127. // _this.courseText = data.choices[0].message.content
  24128. // }
  24129. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24130. } else {
  24131. _this.$message.warning(response.data.FunctionResponse.result);
  24132. }
  24133. _this.isTeacherTextCancelToken = null
  24134. }).catch(function (error) {
  24135. _this.teacherTextLoading = false
  24136. _this.tteacherTextLoading = false
  24137. _this.isTeacherTextCancelToken = null
  24138. if(error && error.message != 'Request canceled by the user.'){
  24139. _this.$message.error(this.lang.ssTooManyReq)
  24140. }
  24141. console.log(error);
  24142. });
  24143. await _this.aiteacherTextDetailgetAiContent(_uuid)
  24144. },
  24145. aiteacherTextDetailgetAiContent(_uid) {
  24146. try {
  24147. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24148. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24149. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24150. } catch(error) {
  24151. console.log('EventSource error:', event);
  24152. this.$message.error(this.lang.ssTooManyReq)
  24153. this.teacherTextLoading = false
  24154. this.tteacherTextLoading = false
  24155. this.isTeacherTextCancelToken = null
  24156. return;
  24157. }
  24158. let _allText = "";
  24159. let _mdText = "";
  24160. let _iindex = 0
  24161. this.isTeacherTextCancelSource.onmessage = _e => {
  24162. let _eData = JSON.parse(_e.data).content;
  24163. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24164. //对话已经完成
  24165. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24166. this.isTeacherTextCancelSource.close();
  24167. this.isTeacherTextCancelSource = null;
  24168. this.teacherCourseText = _mdText;
  24169. this.teacherTextLoading = false
  24170. this.tteacherTextLoading = false
  24171. this.teacherCourseTextB = false
  24172. this.isTeacherTextCancelToken = null
  24173. return;
  24174. } else {
  24175. _iindex++
  24176. //对话还在继续
  24177. let _text = "";
  24178. _text = _eData.replaceAll("'", "");
  24179. if (_allText == "") {
  24180. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24181. } else {
  24182. _allText += _text;
  24183. }
  24184. _mdText = _allText + "_";
  24185. _mdText = _mdText.replace(/\\n/g, "\n");
  24186. _mdText = _mdText.replace(/\\/g, "");
  24187. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24188. //转化返回的回复流数据
  24189. if(_iindex == 10){
  24190. this.teacherCourseText = _mdText;
  24191. _iindex = 0
  24192. }
  24193. if(this.teacherTextLoading){
  24194. this.teacherTextLoading = false
  24195. }
  24196. // 处理流数据
  24197. }
  24198. // this.$forceUpdate();
  24199. };
  24200. let _this = this
  24201. this.isTeacherTextCancelSource.onerror = function(event) {
  24202. // 处理错误,可以尝试重新连接
  24203. console.log('EventSource error:', event);
  24204. _this.$message.error(this.lang.ssTooManyReq)
  24205. _this.teacherTextLoading = false
  24206. _this.tteacherTextLoading = false
  24207. _this.isTeacherTextCancelToken = null
  24208. _this.isTeacherTextCancelSource.close();
  24209. _this.isTeacherTextCancelSource = null;
  24210. };
  24211. },
  24212. async aitargetTextDetail(msg) {
  24213. let _this = this
  24214. let fileid = []
  24215. if (_this.teacherInfoData.length) {
  24216. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24217. if(_this.teacherInfoData[i].fileid){
  24218. fileid.push(_this.teacherInfoData[i].fileid)
  24219. }else {
  24220. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24221. if(_fileid){
  24222. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24223. _this.$forceUpdate();
  24224. if(_fileid != 1){
  24225. fileid.push(_fileid)
  24226. }
  24227. }
  24228. }
  24229. }
  24230. }
  24231. _this.targetTextLoading = true
  24232. _this.ttargetTextLoading = true
  24233. let sub = []
  24234. if (_this.courseTypeId.length) {
  24235. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24236. let _sid = _this.courseTypeId[i]
  24237. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24238. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24239. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24240. }
  24241. }
  24242. }
  24243. }
  24244. let mclass = []
  24245. if (_this.courseTypeId.length) {
  24246. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24247. let _sid = _this.courseTypeId[i]
  24248. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24249. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24250. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24251. }
  24252. }
  24253. }
  24254. }
  24255. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24256. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24257. let messages = `NOTICE
  24258. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24259. Language: ${this.getLang()}
  24260. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24261. Instruction: Based on the context, follow "Format example", write content.
  24262. #Context
  24263. ## 参考资料
  24264. 课程名字:${this.courseName}
  24265. ${sub.length ? '学科:' + sub.join(",") : ''}
  24266. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24267. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24268. ## 要求
  24269. ${msg}
  24270. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24271. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24272. let _uuid = uuidv4();
  24273. // let params = JSON.stringify({
  24274. // // "model": "Chat",
  24275. // model: 'gpt-3.5-turbo',
  24276. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24277. // max_tokens: 4096,
  24278. // top_p: 1,
  24279. // frequency_penalty: 0,
  24280. // presence_penalty: 0,
  24281. // messages: [{
  24282. // content: messages,
  24283. // role: 'user'
  24284. // }],
  24285. // uid: _uuid,
  24286. // mind_map_question: "",
  24287. // })
  24288. let params = {
  24289. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24290. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24291. session_name: _uuid,
  24292. userId: _this.userid,
  24293. uid: _uuid,
  24294. file_ids: fileid.length ? [...fileid] : '',
  24295. model: 'gpt-4o-2024-11-20',
  24296. temperature: this.mode == 3 ? 0.5 : 0.1,
  24297. }
  24298. // let params = JSON.stringify({
  24299. // message: {
  24300. // anthropic_version: "bedrock-2023-05-31",
  24301. // max_tokens: 4096,
  24302. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24303. // top_p: 1,
  24304. // messages: [{
  24305. // "role": "user",
  24306. // "content": messages
  24307. // }] ,
  24308. // },
  24309. // uid: _uuid,
  24310. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24311. // });
  24312. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24313. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24314. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24315. console.log(response);
  24316. // let data = response.data.FunctionResponse
  24317. // if (data.choices && data.choices.length && data.choices[0].message) {
  24318. // _this.courseText = data.choices[0].message.content
  24319. // }
  24320. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24321. } else {
  24322. _this.$message.warning(response.data.FunctionResponse.result);
  24323. }
  24324. _this.isTargetCancelToken1 = null
  24325. }).catch(function (error) {
  24326. _this.targetTextLoading = false
  24327. _this.ttargetTextLoading = false
  24328. _this.isTargetCancelToken1 = null
  24329. if(error && error.message != 'Request canceled by the user.'){
  24330. _this.$message.error(this.lang.ssTooManyReq)
  24331. }
  24332. console.log(error);
  24333. });
  24334. await _this.aitargetTextDetailgetAiContent(_uuid)
  24335. },
  24336. aitargetTextDetailgetAiContent(_uid) {
  24337. try {
  24338. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24339. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24340. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24341. } catch (error) {
  24342. console.log('EventSource error:', error);
  24343. this.$message.error(this.lang.ssTooManyReq)
  24344. this.targetTextLoading = false
  24345. this.ttargetTextLoading = false
  24346. this.isTargetCancelToken1 = null
  24347. return;
  24348. }
  24349. let _allText = "";
  24350. let _mdText = "";
  24351. let _iindex = 0
  24352. this.isTargetCancelSource1.onmessage = _e => {
  24353. let _eData = JSON.parse(_e.data).content;
  24354. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24355. //对话已经完成
  24356. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24357. this.isTargetCancelSource1.close();
  24358. this.isTargetCancelSource1 = null;
  24359. this.targetCourseText = _mdText;
  24360. this.targetTextLoading = false
  24361. this.ttargetTextLoading = false
  24362. this.targetCourseTextB = false
  24363. this.isTargetCancelToken1 = null
  24364. return;
  24365. } else {
  24366. _iindex++
  24367. //对话还在继续
  24368. let _text = "";
  24369. _text = _eData.replaceAll("'", "");
  24370. if (_allText == "") {
  24371. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24372. } else {
  24373. _allText += _text;
  24374. }
  24375. _mdText = _allText + "_";
  24376. _mdText = _mdText.replace(/\\n/g, "\n");
  24377. _mdText = _mdText.replace(/\\/g, "");
  24378. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24379. //转化返回的回复流数据
  24380. if(_iindex == 10){
  24381. this.targetCourseText = _mdText;
  24382. _iindex = 0
  24383. }
  24384. if(this.targetTextLoading){
  24385. this.targetTextLoading = false
  24386. }
  24387. // 处理流数据
  24388. }
  24389. // this.$forceUpdate();
  24390. };
  24391. let _this = this
  24392. this.isTargetCancelSource1.onerror = function(event) {
  24393. // 处理错误,可以尝试重新连接
  24394. console.log('EventSource error:', event);
  24395. _this.$message.error(this.lang.ssTooManyReq)
  24396. _this.targetTextLoading = false
  24397. _this.ttargetTextLoading = false
  24398. _this.isTargetCancelToken1 = null
  24399. _this.isTargetCancelSource1.close();
  24400. _this.isTargetCancelSource1 = null;
  24401. };
  24402. },
  24403. async aitargetTextDetail2(msg) {
  24404. let _this = this
  24405. let fileid = []
  24406. if(_this.mubiaoInfoData.length){
  24407. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24408. if(_this.mubiaoInfoData[i].fileid){
  24409. fileid.push(_this.mubiaoInfoData[i].fileid)
  24410. }else {
  24411. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24412. if(_fileid){
  24413. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24414. _this.$forceUpdate();
  24415. if(_fileid != 1){
  24416. fileid.push(_fileid)
  24417. }
  24418. }
  24419. }
  24420. }
  24421. }
  24422. _this.targetTextLoading2 = true
  24423. _this.ttargetTextLoading2 = true
  24424. let sub = []
  24425. if (_this.courseTypeId.length) {
  24426. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24427. let _sid = _this.courseTypeId[i]
  24428. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24429. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24430. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24431. }
  24432. }
  24433. }
  24434. }
  24435. let mclass = []
  24436. if (_this.courseTypeId.length) {
  24437. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24438. let _sid = _this.courseTypeId[i]
  24439. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24440. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24441. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24442. }
  24443. }
  24444. }
  24445. }
  24446. if(sub.length){
  24447. let _fileid = _this.importFileid(sub)
  24448. fileid = [...fileid, ..._fileid]
  24449. }
  24450. let messages = `NOTICE
  24451. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24452. Language: ${this.getLang()}
  24453. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24454. Instruction: Based on the context, follow "Format example", write content.
  24455. #Context
  24456. ## 参考资料
  24457. 课程标题:${this.courseName}
  24458. ${sub.length ? '学科:' + sub.join(",") : ''}
  24459. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24460. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24461. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24462. ## 要求
  24463. ${msg}
  24464. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24465. let _uuid = uuidv4();
  24466. // let params = JSON.stringify({
  24467. // // "model": "Chat",
  24468. // model: 'gpt-3.5-turbo',
  24469. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24470. // max_tokens: 4096,
  24471. // top_p: 1,
  24472. // frequency_penalty: 0,
  24473. // presence_penalty: 0,
  24474. // messages: [{
  24475. // content: messages,
  24476. // role: 'user'
  24477. // }],
  24478. // uid: _uuid,
  24479. // mind_map_question: "",
  24480. // })
  24481. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24482. let params = {
  24483. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24484. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24485. session_name: _uuid,
  24486. userId: _this.userid,
  24487. uid: _uuid,
  24488. file_ids: fileid.length ? [...fileid] : '',
  24489. model: 'gpt-4o-2024-11-20',
  24490. temperature: this.mode == 3 ? 0.5 : 0.1,
  24491. }
  24492. // let params = JSON.stringify({
  24493. // message: {
  24494. // anthropic_version: "bedrock-2023-05-31",
  24495. // max_tokens: 4096,
  24496. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24497. // top_p: 1,
  24498. // messages: [{
  24499. // "role": "user",
  24500. // "content": messages
  24501. // }] ,
  24502. // },
  24503. // uid: _uuid,
  24504. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24505. // });
  24506. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24507. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24508. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24509. console.log(response);
  24510. // let data = response.data.FunctionResponse
  24511. // if (data.choices && data.choices.length && data.choices[0].message) {
  24512. // _this.courseText = data.choices[0].message.content
  24513. // }
  24514. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24515. } else {
  24516. _this.$message.warning(response.data.FunctionResponse.result);
  24517. }
  24518. _this.isTargetCancelToken2 = null
  24519. }).catch(function (error) {
  24520. _this.targetTextLoading2 = false
  24521. _this.ttargetTextLoading2 = false
  24522. _this.isTargetCancelToken2 = null
  24523. if(error && error.message != 'Request canceled by the user.'){
  24524. _this.$message.error(this.lang.ssTooManyReq)
  24525. }
  24526. console.log(error);
  24527. });
  24528. await _this.aitargetTextDetail2getAiContent(_uuid)
  24529. },
  24530. importFileid(sub){
  24531. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24532. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24533. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24534. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24535. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24536. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24537. let _sub = converter(sub.join(","))
  24538. let fileid = []
  24539. for(var i = 0; i < this.fileidArray.length; i++){
  24540. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24541. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24542. fileid.push(this.fileidArray[i].fileid)
  24543. }
  24544. }
  24545. }
  24546. return fileid
  24547. },
  24548. selectFileid(){
  24549. let params = {
  24550. oid: this.oid,
  24551. };
  24552. this.ajax
  24553. .get(this.$store.state.api + "selectFileid", params)
  24554. .then((res) => {
  24555. this.fileidArray = res.data[0]
  24556. if(res.data[1].length){
  24557. this.fileidArray = res.data[1]
  24558. }
  24559. if(res.data[2].length){
  24560. this.fileidArray = res.data[2]
  24561. }
  24562. })
  24563. .catch((err) => {
  24564. console.error(err);
  24565. });
  24566. },
  24567. selectAiFileid(){
  24568. let params = {
  24569. oid: this.oid,
  24570. };
  24571. this.ajax
  24572. .get(this.$store.state.api + "selectAiFileid", params)
  24573. .then((res) => {
  24574. let fileIds = []
  24575. for(var i = 0; i < res.data[0].length; i++){
  24576. fileIds.push(res.data[0][i].fileid)
  24577. }
  24578. this.fileIds = fileIds
  24579. if(res.data[1].length){
  24580. fileIds = []
  24581. for(var i = 0; i < res.data[1].length; i++){
  24582. fileIds.push(res.data[0][i].fileid)
  24583. }
  24584. this.fileIds = fileIds
  24585. }
  24586. if(res.data[2].length){
  24587. fileIds = []
  24588. for(var i = 0; i < res.data[2].length; i++){
  24589. fileIds.push(res.data[0][i].fileid)
  24590. }
  24591. this.fileIds = fileIds
  24592. }
  24593. })
  24594. .catch((err) => {
  24595. console.error(err);
  24596. });
  24597. },
  24598. selectKnowFileid(){
  24599. let params = {
  24600. oid: this.oid,
  24601. sta: 'cn'
  24602. };
  24603. this.ajax
  24604. .get(this.$store.state.api + "selectKnowFileid", params)
  24605. .then((res) => {
  24606. this.knowFileArray = res.data[0]
  24607. if(res.data[1].length){
  24608. this.knowFileArray = res.data[1]
  24609. }
  24610. if(res.data[2].length){
  24611. this.knowFileArray = res.data[2]
  24612. }
  24613. })
  24614. .catch((err) => {
  24615. console.error(err);
  24616. });
  24617. },
  24618. async aitargetTextDetail22(msg,msg2) {
  24619. let _this = this
  24620. let fileid = []
  24621. _this.targetTextLoading2 = true
  24622. _this.ttargetTextLoading2 = true
  24623. let sub = []
  24624. if (_this.courseTypeId.length) {
  24625. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24626. let _sid = _this.courseTypeId[i]
  24627. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24628. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24629. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24630. }
  24631. }
  24632. }
  24633. }
  24634. let mclass = []
  24635. if (_this.courseTypeId.length) {
  24636. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24637. let _sid = _this.courseTypeId[i]
  24638. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24639. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24640. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24641. }
  24642. }
  24643. }
  24644. }
  24645. if(!msg2 && sub.length){
  24646. // let _fileid = _this.importFileid(sub)
  24647. // fileid = [...fileid, ..._fileid]
  24648. }
  24649. let messages = `NOTICE
  24650. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24651. Language: ${this.getLang()}
  24652. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24653. Instruction: Based on the context, follow "Format example", write content.
  24654. #Context
  24655. ## 参考资料
  24656. 课程标题:${this.courseName}
  24657. ${sub.length ? '学科:' + sub.join(",") : ''}
  24658. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24659. 课程目标:${msg2}
  24660. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24661. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24662. ## 要求
  24663. ${msg}
  24664. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24665. let _uuid = uuidv4();
  24666. // let params = JSON.stringify({
  24667. // // "model": "Chat",
  24668. // model: 'gpt-3.5-turbo',
  24669. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24670. // max_tokens: 4096,
  24671. // top_p: 1,
  24672. // frequency_penalty: 0,
  24673. // presence_penalty: 0,
  24674. // messages: [{
  24675. // content: messages,
  24676. // role: 'user'
  24677. // }],
  24678. // uid: _uuid,
  24679. // mind_map_question: "",
  24680. // })
  24681. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24682. let params = {
  24683. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24684. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24685. session_name: _uuid,
  24686. userId: _this.userid,
  24687. uid: _uuid,
  24688. file_ids: fileid.length ? [...fileid] : '',
  24689. model: 'gpt-4o-2024-11-20',
  24690. temperature: this.mode == 3 ? 0.5 : 0.1,
  24691. }
  24692. // let params = JSON.stringify({
  24693. // message: {
  24694. // anthropic_version: "bedrock-2023-05-31",
  24695. // max_tokens: 4096,
  24696. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24697. // top_p: 1,
  24698. // messages: [{
  24699. // "role": "user",
  24700. // "content": messages
  24701. // }] ,
  24702. // },
  24703. // uid: _uuid,
  24704. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24705. // });
  24706. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24707. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24708. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24709. console.log(response);
  24710. // let data = response.data.FunctionResponse
  24711. // if (data.choices && data.choices.length && data.choices[0].message) {
  24712. // _this.courseText = data.choices[0].message.content
  24713. // }
  24714. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24715. } else {
  24716. _this.$message.warning(response.data.FunctionResponse.result);
  24717. }
  24718. _this.isTargetCancelToken2 = null
  24719. }).catch(function (error) {
  24720. _this.targetTextLoading2 = false
  24721. _this.ttargetTextLoading2 = false
  24722. _this.isTargetCancelToken2 = null
  24723. if(error && error.message != 'Request canceled by the user.'){
  24724. _this.$message.error(this.lang.ssTooManyReq)
  24725. }
  24726. console.log(error);
  24727. });
  24728. await _this.aitargetTextDetail2getAiContent(_uuid)
  24729. },
  24730. aitargetTextDetail2getAiContent(_uid) {
  24731. try {
  24732. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24733. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24734. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24735. } catch(error) {
  24736. console.log('EventSource error:', error);
  24737. this.$message.error(this.lang.ssTooManyReq)
  24738. this.targetTextLoading2 = false
  24739. this.ttargetTextLoading2 = false
  24740. this.isTargetCancelToken2 = null
  24741. return;
  24742. }
  24743. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24744. let _allText = "";
  24745. let _mdText = "";
  24746. let _iindex = 0
  24747. this.isTargetCancelSource2.onmessage = _e => {
  24748. let _eData = JSON.parse(_e.data).content;
  24749. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24750. //对话已经完成
  24751. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24752. this.isTargetCancelSource2.close();
  24753. this.isTargetCancelSource2 = null;
  24754. this.targetCourseText2 = text1+' \n '+_mdText;
  24755. this.targetTextLoading2 = false
  24756. this.ttargetTextLoading2 = false
  24757. this.targetCourseText2B = false
  24758. this.isTargetCancelToken2 = null
  24759. this.saveCourse()
  24760. return;
  24761. } else {
  24762. _iindex++
  24763. //对话还在继续
  24764. let _text = "";
  24765. _text = _eData.replaceAll("'", "");
  24766. if (_allText == "") {
  24767. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24768. } else {
  24769. _allText += _text;
  24770. }
  24771. _mdText = _allText + "_";
  24772. _mdText = _mdText.replace(/\\n/g, "\n");
  24773. _mdText = _mdText.replace(/\\/g, "");
  24774. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24775. //转化返回的回复流数据
  24776. if(_iindex == 10){
  24777. this.targetCourseText2 = text1+' \n '+_mdText;
  24778. _iindex = 0
  24779. }
  24780. if(this.targetTextLoading2){
  24781. this.targetTextLoading2 = false
  24782. }
  24783. // 处理流数据
  24784. }
  24785. // this.$forceUpdate();
  24786. };
  24787. let _this = this
  24788. this.isTargetCancelSource2.onerror = function(event) {
  24789. // 处理错误,可以尝试重新连接
  24790. console.log('EventSource error:', event);
  24791. _this.$message.error(this.lang.ssTooManyReq)
  24792. _this.targetTextLoading2 = false
  24793. _this.ttargetTextLoading2 = false
  24794. _this.isTargetCancelToken2 = null
  24795. _this.isTargetCancelSource2.close();
  24796. _this.isTargetCancelSource2 = null;
  24797. };
  24798. },
  24799. async aitargetTextDetail3(msg) {
  24800. let _this = this
  24801. let fileid = []
  24802. if(_this.mubiaoInfoData.length){
  24803. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24804. if(_this.mubiaoInfoData[i].fileid){
  24805. fileid.push(_this.mubiaoInfoData[i].fileid)
  24806. }else {
  24807. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24808. if(_fileid){
  24809. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24810. _this.$forceUpdate();
  24811. if(_fileid != 1){
  24812. fileid.push(_fileid)
  24813. }
  24814. }
  24815. }
  24816. }
  24817. }
  24818. _this.targetTextLoading2 = true
  24819. _this.ttargetTextLoading2 = true
  24820. let sub = []
  24821. if (_this.courseTypeId.length) {
  24822. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24823. let _sid = _this.courseTypeId[i]
  24824. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24825. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24826. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24827. }
  24828. }
  24829. }
  24830. }
  24831. let mclass = []
  24832. if (_this.courseTypeId.length) {
  24833. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24834. let _sid = _this.courseTypeId[i]
  24835. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24836. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24837. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24838. }
  24839. }
  24840. }
  24841. }
  24842. // if(sub.length){
  24843. // let _fileid = _this.importFileid(sub)
  24844. // fileid = [...fileid, ..._fileid]
  24845. // }
  24846. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24847. if (_this.infoData.length) {
  24848. for (var i = 0; i < _this.infoData.length; i++) {
  24849. if(_this.infoData[i].fileid){
  24850. fileid.push(_this.infoData[i].fileid)
  24851. }else {
  24852. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24853. if(_fileid){
  24854. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24855. _this.$forceUpdate();
  24856. if(_fileid != 1){
  24857. fileid.push(_fileid)
  24858. }
  24859. }
  24860. }
  24861. }
  24862. }
  24863. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24864. let messages = `Language: ${this.getLang()}
  24865. ${msg}
  24866. ## 课程信息
  24867. 课程名字:${this.courseName}
  24868. 课程概况:${this.courseText}
  24869. ${sub.length ? '学科:' + sub.join(",") : ''}
  24870. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24871. let _uuid = uuidv4();
  24872. // let params = JSON.stringify({
  24873. // // "model": "Chat",
  24874. // model: 'gpt-3.5-turbo',
  24875. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24876. // max_tokens: 4096,
  24877. // top_p: 1,
  24878. // frequency_penalty: 0,
  24879. // presence_penalty: 0,
  24880. // messages: [{
  24881. // content: messages,
  24882. // role: 'user'
  24883. // }],
  24884. // uid: _uuid,
  24885. // mind_map_question: "",
  24886. // })
  24887. let params = {
  24888. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24889. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24890. session_name: _uuid,
  24891. userId: _this.userid,
  24892. uid: _uuid,
  24893. file_ids: fileid.length ? [...fileid] : '',
  24894. model: 'gpt-4o-2024-11-20',
  24895. temperature: this.mode == 3 ? 0.5 : 0.1,
  24896. }
  24897. // let params = JSON.stringify({
  24898. // message: {
  24899. // anthropic_version: "bedrock-2023-05-31",
  24900. // max_tokens: 4096,
  24901. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24902. // top_p: 1,
  24903. // messages: [{
  24904. // "role": "user",
  24905. // "content": messages
  24906. // }] ,
  24907. // },
  24908. // uid: _uuid,
  24909. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24910. // });
  24911. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24912. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24913. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24914. console.log(response);
  24915. // let data = response.data.FunctionResponse
  24916. // if (data.choices && data.choices.length && data.choices[0].message) {
  24917. // _this.courseText = data.choices[0].message.content
  24918. // }
  24919. console.log(response);
  24920. let data = response.data.FunctionResponse
  24921. // if (data.choices && data.choices.length && data.choices[0].message) {
  24922. // console.log(data.choices[0].message.content);
  24923. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24924. // _this.$forceUpdate()
  24925. // }
  24926. if (data.message) {
  24927. console.log('返回回来的目标:',data.message);
  24928. _this.targetCourseText2 = data.message
  24929. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24930. }
  24931. _this.isTargetCancelToken2 = null
  24932. }).catch(function (error) {
  24933. _this.targetTextLoading2 = false
  24934. _this.ttargetTextLoading2 = false
  24935. _this.isTargetCancelToken2 = null
  24936. if(error && error.message != 'Request canceled by the user.'){
  24937. _this.$message.error(this.lang.ssTooManyReq)
  24938. }
  24939. console.log(error);
  24940. });
  24941. },
  24942. againEva(msg, i, k) {
  24943. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24944. this.$message.error(this.lang.ssEvaCompleteInfo.replace(/\*/g, i+1).replace(/\$/g, k+1))
  24945. return;
  24946. }
  24947. if (this.ruleLoading[i]) {
  24948. this.ruleLoading[i][k] = true
  24949. } else {
  24950. this.ruleLoading[i] = []
  24951. this.ruleLoading[i][k] = true
  24952. }
  24953. let message = `NOTICE
  24954. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24955. Language: ${this.getLang()}
  24956. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24957. Instruction: Based on the context, follow "Format example", write content.
  24958. #Context
  24959. ##要求
  24960. ${msg}
  24961. ##制定标准资料
  24962. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24963. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24964. # Format example
  24965. ==
  24966. 0 星,作业内容与作业要求无关;
  24967. 1 星,没有识别问题和需求;
  24968. 2 星,问题或需求没有被清晰理解或准确识别;
  24969. 3 星,问题或需求的一部分被识别;
  24970. 4 星,问题或需求的大部分被识别;
  24971. 5 星,问题或需求都被识别。
  24972. ==
  24973. `
  24974. // let params = {
  24975. // // "model": "Chat",
  24976. // model: 'gpt-4o-2024-11-20',
  24977. // // model: "gpt-4o",
  24978. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24979. // max_tokens: 4096,
  24980. // top_p: 1,
  24981. // frequency_penalty: 0,
  24982. // presence_penalty: 0,
  24983. // messages: [
  24984. // {
  24985. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24986. // role: "user"
  24987. // }
  24988. // ],
  24989. // stream: false,
  24990. // uid: this.userid,
  24991. // mind_map_question: ""
  24992. // };
  24993. // this.ajax
  24994. // .post("https://gpt4.cocorobo.cn/chat", params)
  24995. // .then(response => {
  24996. // let data = response.data.FunctionResponse;
  24997. // console.log("data", data);
  24998. // if (data.choices && data.choices.length && data.choices[0].message) {
  24999. // let content = data.choices[0].message.content;
  25000. // var regex = new RegExp('==([^=]+)==');
  25001. // let match = content.match(regex);
  25002. // if (match) {
  25003. // content = match[1].trim().replaceAll(' ', '');
  25004. // // 获取匹配到的内容并去除两端空格
  25005. // console.log('contentInsideDoubleEquals', content);
  25006. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  25007. // console.log("未有星级。");
  25008. // this.againEva(msg, i, k)
  25009. // return
  25010. // }
  25011. // //  return
  25012. // } else {
  25013. // console.log("未找到匹配的内容。");
  25014. // this.againEva(msg, i, k)
  25015. // return
  25016. // }
  25017. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25018. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25019. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25020. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25021. // this.$forceUpdate();
  25022. // this.ruleLoading[i][k] = false
  25023. // }else{
  25024. // this.ruleLoading[i][k] = false
  25025. // }
  25026. // })
  25027. // .catch(error => {
  25028. // console.log(error);
  25029. // this.ruleLoading[i][k] = false
  25030. // });
  25031. let parm = {
  25032. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25033. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  25034. session_name: uuidv4(),
  25035. userId: this.userid,
  25036. file_ids: [],
  25037. model: 'gpt-4o-2024-11-20',
  25038. temperature: this.mode == 3 ? 0.5 : 0.1,
  25039. }
  25040. this.ajax
  25041. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  25042. .then(async (response) => {
  25043. console.log(response);
  25044. let data = response.data.FunctionResponse
  25045. if (data.message) {
  25046. console.log(data.message);
  25047. let content = data.message;
  25048. var regex = new RegExp('==([^=]+)==');
  25049. let match = content.match(regex);
  25050. if (match) {
  25051. content = match[1].trim().replaceAll(' ', '');
  25052. // 获取匹配到的内容并去除两端空格
  25053. console.log('contentInsideDoubleEquals', content);
  25054. if (content.indexOf(this.lang.ssStar0) == -1 || content.indexOf(this.lang.ssStar2) == -1 || content.indexOf(this.lang.ssStar3) == -1 || content.indexOf(this.lang.ssStar4) == -1 || content.indexOf(this.lang.ssStar5) == -1) {
  25055. console.log(this.lang.ssNoStarLevel);
  25056. this.againEva(msg, i, k)
  25057. return
  25058. }
  25059. // return
  25060. } else {
  25061. console.log(this.lang.ssNoMatch);
  25062. this.againEva(msg, i, k)
  25063. return
  25064. }
  25065. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25066. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25067. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25068. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25069. this.$forceUpdate();
  25070. this.ruleLoading[i][k] = false
  25071. this.$message.success(this.lang.ssEvaRuleSucc.replace(/\*/g, i+1).replace(/\$/g, k+1))
  25072. }else {
  25073. this.ruleLoading[i][k] = false
  25074. }
  25075. })
  25076. .catch((error) => {
  25077. this.ruleLoading[i][k] = false
  25078. console.log(error);
  25079. });
  25080. },
  25081. async aiSearchFile(messages, callback) {
  25082. let _this = this
  25083. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  25084. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  25085. console.log('fileid=========',fileid)
  25086. // let params = JSON.stringify({
  25087. // // "model": "Chat",
  25088. // model: 'gpt-3.5-turbo',
  25089. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25090. // max_tokens: 4096,
  25091. // top_p: 1,
  25092. // frequency_penalty: 0,
  25093. // presence_penalty: 0,
  25094. // messages: [{
  25095. // content: messages,
  25096. // role: 'user'
  25097. // }],
  25098. // stream: false,
  25099. // uid: this.userid,
  25100. // mind_map_question: "",
  25101. // })
  25102. // // let params = JSON.stringify({
  25103. // // message: {
  25104. // // anthropic_version: "bedrock-2023-05-31",
  25105. // // max_tokens: 4096,
  25106. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  25107. // // top_p: 1,
  25108. // // messages: [{
  25109. // // content: messages,
  25110. // // role: 'user'
  25111. // // }], //
  25112. // // },
  25113. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  25114. // // });
  25115. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  25116. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  25117. // console.log(response);
  25118. // let data = response.data.FunctionResponse
  25119. // if (data.choices && data.choices.length && data.choices[0].message) {
  25120. // console.log(data.choices[0].message.content);
  25121. // let dArray = JSON.parse(data.choices[0].message.content)
  25122. // _this.dArray = dArray
  25123. // _this.unitJson[0].chapterInfo[0].taskJson = []
  25124. // for (var i = 0; i < dArray.length; i++) {
  25125. // let _task = dArray[i]
  25126. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25127. // task: _task.task,
  25128. // taskDetail: "",
  25129. // taskDetail2: _task.detail,
  25130. // taskDetail3: "",
  25131. // chapterData: [],
  25132. // toolText: "",
  25133. // toolChoose: [
  25134. // {
  25135. // tool: [],
  25136. // toolDetail: "",
  25137. // toolType: 0,
  25138. // askCount: 1,
  25139. // askTitle: "",
  25140. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25141. // },
  25142. // ],
  25143. // isShowTools: false,
  25144. // askCount: 1,
  25145. // isFold: 0,
  25146. // askTitle: "",
  25147. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25148. // checkJson: [{ checkCount: [], checkPerent: [] }],
  25149. // homeworkList: [],
  25150. // })
  25151. // }
  25152. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  25153. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25154. // _this.$forceUpdate();
  25155. // }
  25156. // // if (data.result) {
  25157. // // console.log(data.result);
  25158. // // let dArray = JSON.parse(data.result)
  25159. // // _this.dArray = dArray
  25160. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  25161. // // for (var i = 0; i < dArray.length; i++) {
  25162. // // let _task = dArray[i]
  25163. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25164. // // task: _task.task,
  25165. // // taskDetail: "",
  25166. // // taskDetail2: _task.detail,
  25167. // // taskDetail3: "",
  25168. // // chapterData: [],
  25169. // // toolText: "",
  25170. // // toolChoose: [
  25171. // // {
  25172. // // tool: [],
  25173. // // toolDetail: "",
  25174. // // toolType: 0,
  25175. // // askCount: 1,
  25176. // // askTitle: "",
  25177. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25178. // // },
  25179. // // ],
  25180. // // isShowTools: false,
  25181. // // askCount: 1,
  25182. // // isFold: 1,
  25183. // // askTitle: "",
  25184. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25185. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  25186. // // homeworkList: [],
  25187. // // })
  25188. // // }
  25189. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25190. // // _this.$forceUpdate();
  25191. // // }
  25192. // callback ? callback() : ''
  25193. // }).catch(function (error) {
  25194. // _this.loading = false
  25195. // console.log(error);
  25196. // });
  25197. this.isFileCancelToken = this.ajax.setCancelSource();
  25198. let parm = {
  25199. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25200. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25201. session_name: uuidv4(),
  25202. userId: this.userid,
  25203. file_ids: fileid.length ? [...fileid] : '',
  25204. model: 'gpt-4o-2024-11-20',
  25205. temperature: this.mode == 3 ? 0.5 : 0.1,
  25206. }
  25207. this.ajax
  25208. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25209. .then((response) => {
  25210. console.log(response);
  25211. let data = response.data.FunctionResponse
  25212. if (data.message) {
  25213. console.log(data.message);
  25214. let dArray = []
  25215. try {
  25216. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25217. let regex3 = new RegExp('(?<!")content(?!")','g')
  25218. //
  25219. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25220. } catch (error) {
  25221. // callback ? callback() : ''
  25222. console.log("error_________________" + error);
  25223. try {
  25224. let regex = new RegExp(/```json([\s\S]*?)```/);
  25225. let match = data.message.match(regex);
  25226. dArray = JSON.parse(match[1]);
  25227. } catch (error) {
  25228. // callback ? callback() : ''
  25229. _this.$message.error(_this.lang.ssFormatErr)
  25230. console.log("error_________________" + error);
  25231. _this.isFileCancelToken = null;
  25232. _this.aiSearchFile(messages, callback)
  25233. return
  25234. }
  25235. }
  25236. for(let i = 0; i < dArray.length; i++){
  25237. let content = dArray[i].content
  25238. let name = _this.lang.ssRefMat+(i+1)
  25239. let md = new MarkdownIt();
  25240. let _html = content ? md.render(content) : ''
  25241. setTimeout(()=>{
  25242. if(i == (dArray.length - 1)){
  25243. _this.generate2(name, _html, i, callback)
  25244. }else {
  25245. _this.generate2(name, _html, i)
  25246. }
  25247. }, 500 * i)
  25248. }
  25249. _this.isFileCancelToken = null
  25250. _this.$forceUpdate();
  25251. }
  25252. })
  25253. .catch((error) => {
  25254. callback ? callback() : ''
  25255. _this.isFileCancelToken = null
  25256. console.log(error);
  25257. });
  25258. },
  25259. async aiSearchFile2(messages, callback) {
  25260. let _this = this
  25261. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25262. console.log('fileid=========',fileid)
  25263. this.isFileCancelToken = this.ajax.setCancelSource();
  25264. let parm = {
  25265. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25266. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25267. session_name: uuidv4(),
  25268. userId: this.userid,
  25269. file_ids: fileid.length ? [...fileid] : '',
  25270. model: 'gpt-4o-2024-11-20',
  25271. temperature: this.mode == 3 ? 0.5 : 0.1,
  25272. }
  25273. this.ajax
  25274. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25275. .then((response) => {
  25276. console.log(response);
  25277. let data = response.data.FunctionResponse
  25278. if (data.message) {
  25279. console.log(data.message);
  25280. let content = data.message
  25281. let name = _this.lang.ssRefMat
  25282. let md = new MarkdownIt();
  25283. let _html = content ? md.render(content) : ''
  25284. _this.generate2(name, _html, 0, callback)
  25285. _this.isFileCancelToken = null
  25286. _this.$forceUpdate();
  25287. }
  25288. })
  25289. .catch((error) => {
  25290. callback ? callback() : ''
  25291. _this.isFileCancelToken = null
  25292. console.log(error);
  25293. });
  25294. },
  25295. createFileid(url) {
  25296. let _this = this
  25297. return new Promise((resolve, reject) => {
  25298. try {
  25299. _this.ajax
  25300. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25301. url: url,
  25302. })
  25303. .then((res) => {
  25304. let _data = res.data.FunctionResponse;
  25305. if (_data.result && _data.result.id) {
  25306. resolve(_data.result.id)
  25307. }else {
  25308. resolve(1)
  25309. }
  25310. }).catch(function (error) {
  25311. resolve(1)
  25312. });
  25313. }catch (e){
  25314. resolve(1)
  25315. }
  25316. });
  25317. },
  25318. handleSwitchChange(string){
  25319. // let area = ''
  25320. // let text = ''
  25321. // if(string == 'aiteacherTextDetail'){
  25322. // area = '已有教案摘要'
  25323. // text = this.teacherCourseText
  25324. // }else if(string == 'aitargetTextDetail'){
  25325. // area = '课程目标'
  25326. // text = this.targetCourseText
  25327. // }else if(string == 'aiDetail'){
  25328. // area = '课程简要描述'
  25329. // text = this.courseText
  25330. // }else if(string == 'aitargetTextDetail2'){
  25331. // area = '课程目标'
  25332. // text = this.targetCourseText2
  25333. // }else if(string.indexOf('aiDetail1') != -1){
  25334. // let index = parseInt(string.split('aiDetail1-')[1])
  25335. // area = `任务${index+1}课程大纲`
  25336. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25337. // }else if(string == 'aiCpote1'){
  25338. // area = '概念群'
  25339. // text = this.cpote.cpote1
  25340. // }else if(string == 'aiCpote2'){
  25341. // area = '问题链'
  25342. // text = this.cpote.cpote2
  25343. // }else if(string == 'aiCpote3'){
  25344. // area = '目标层'
  25345. // text = this.cpote.cpote3
  25346. // }else if(string == 'aiCpote4'){
  25347. // area = '任务簇'
  25348. // text = this.cpote.cpote4
  25349. // }else if(string.indexOf('teacherDetail2') != -1){
  25350. // let index = parseInt(string.split('teacherDetail2-')[1])
  25351. // area = `任务${index+1}教案`
  25352. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25353. // }else if(string.indexOf('aiDetail2') != -1){
  25354. // let index = parseInt(string.split('aiDetail2-')[1])
  25355. // area = `任务${index+1}任务描述`
  25356. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25357. // }else if(string.indexOf('aiDetail3') != -1){
  25358. // let index = parseInt(string.split('-')[1])
  25359. // let index2 = parseInt(string.split('-')[2])
  25360. // area = `任务${index+1}工具${index2+1}的工具描述`
  25361. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25362. // }
  25363. // if(this.isQuote[string] && text){
  25364. // this.quoteArray.push({
  25365. // string,
  25366. // area,
  25367. // value: text
  25368. // })
  25369. // }
  25370. console.log(this.isQuote)
  25371. },
  25372. setIsQuote(string){
  25373. this.isQuote[string] = false
  25374. },
  25375. setEvaList(task, tool, elist){
  25376. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25377. this.$forceUpdate()
  25378. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25379. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25380. }
  25381. },
  25382. closeRight(){
  25383. this.isDisplay = !this.isDisplay;
  25384. },
  25385. addCourseBehavior(type, _html) { // 保存行为操作
  25386. let params = [{
  25387. uid: this.userid,
  25388. courseId: '',
  25389. type: type,
  25390. content: _html,
  25391. }];
  25392. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25393. if (res.data == 1) {
  25394. console.log('保存操作成功');
  25395. } else {
  25396. console.log('保存操作失败');
  25397. }
  25398. }).catch(e => {
  25399. console.log('保存操作失败');
  25400. console.log(e);
  25401. });
  25402. },
  25403. async useUrl(){
  25404. if(!this.knowFileids3.length){
  25405. this.$message.error(this.lang.ssSelectMat)
  25406. return
  25407. }
  25408. let array = []
  25409. for(var i = 0; i < this.knowFileids3.length; i++){
  25410. let item = this.knowFileids3[i]
  25411. for(var j = 0; j < this.knowInfoData3.length; j++){
  25412. if(item == this.knowInfoData3[j].url){
  25413. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25414. if (!isExist) {
  25415. this.knowInfoData2.push(this.knowInfoData3[j]);
  25416. }
  25417. }
  25418. }
  25419. }
  25420. this.$nextTick(() => {
  25421. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25422. });
  25423. this.knowFileids3 = []
  25424. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25425. if (!this.knowInfoData2[i].fileid) {
  25426. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25427. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25428. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25429. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25430. this.knowFileids2.push(fileid)
  25431. }
  25432. }
  25433. }
  25434. },
  25435. panFind(event) {
  25436. // if(!this.findMatchingContentsFinish){
  25437. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25438. // // 判断是否触底
  25439. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25440. // this.findMatchingContentsPage++
  25441. // this.findMatchingContents(); // 调用下拉刷新方法
  25442. // }
  25443. // }
  25444. if(!this.findMatchingContentsFinish){
  25445. this.findMatchingContentsPage++
  25446. this.findMatchingContents(); // 调用下拉刷新方法
  25447. }else{
  25448. this.$message.error(this.lang.ssGetAllData)
  25449. }
  25450. },
  25451. startFindMatchingContents(){
  25452. if(!this.searchFileName){
  25453. this.$message.error(this.lang.ssEnterKey)
  25454. return
  25455. }
  25456. if(this.knowInfoDataLoading){
  25457. this.$message.error(this.lang.ssSearchWait)
  25458. return
  25459. }
  25460. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25461. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25462. this.isfindMatchingContents = null;
  25463. }else if(this.isfindMatchingContents){
  25464. this.$message.error(this.lang.ssSearchWait)
  25465. return
  25466. }
  25467. this.findMatchingContentsFinish = false
  25468. this.findMatchingContentsPage = 1
  25469. this.knowInfoData3 = []
  25470. this.knowFileType1 = ''
  25471. this.knowFileType2 = ''
  25472. this.knowFileType = ''
  25473. this.findMatchingContents(); // 调用下拉刷新方法
  25474. },
  25475. findMatchingContents(){
  25476. if(!this.searchFileName){
  25477. this.$message.error(this.lang.ssEnterKey)
  25478. return
  25479. }
  25480. if(this.isfindMatchingContents){
  25481. this.$message.error(this.lang.ssSearchWait)
  25482. return
  25483. }
  25484. let sub = []
  25485. let grade = []
  25486. if (this.courseTypeId.length) {
  25487. for (var i = 0; i < this.courseTypeId.length; i++) {
  25488. let _sid = this.courseTypeId[i]
  25489. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25490. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25491. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25492. }
  25493. }
  25494. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25495. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25496. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25497. }
  25498. }
  25499. }
  25500. }
  25501. if(this.findMatchingContentsPage < 2){
  25502. this.knowInfoDataLoading = true
  25503. }
  25504. let params = {
  25505. type: this.typeC2.join(","),
  25506. string: this.searchFileName,
  25507. grade: this.typeC1.join(","),
  25508. page: this.findMatchingContentsPage
  25509. };
  25510. let md = new MarkdownIt();
  25511. this.isfindMatchingContents = this.ajax.setCancelSource()
  25512. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25513. console.log(res)
  25514. this.isfindMatchingContents = null
  25515. this.knowInfoDataLoading = false
  25516. if(res.data.length){
  25517. let files = []
  25518. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25519. for (var i = 0; i < res.data.length; i++) {
  25520. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25521. let el = res.data[i];
  25522. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25523. let extension = url.split('.').pop().toLowerCase();
  25524. let _type = 2; // 默认类型为2
  25525. // 定义文件类型数组
  25526. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25527. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25528. 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"];
  25529. // 根据文件扩展名判断文件类型
  25530. if (fileA.includes(extension.toUpperCase())) {
  25531. _type = 3;
  25532. } else if (videoA.includes(extension.toUpperCase())) {
  25533. _type = 2;
  25534. } else if (imgA.includes(extension)) {
  25535. _type = 13;
  25536. } else {
  25537. _type = 12;
  25538. }
  25539. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25540. if (!isExist) {
  25541. // let fileid = await this.createFileid(url)
  25542. this.knowInfoData3.push({
  25543. name: el.title,
  25544. url: url,
  25545. uid: '',
  25546. type: _type,
  25547. fileid: '',
  25548. file_type: el.file_type
  25549. // fileid == 1 ? '' : fileid
  25550. });
  25551. // if(fileid != 1){
  25552. // this.knowFileids2.push(fileid)
  25553. // }
  25554. }
  25555. }
  25556. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25557. // if (!this.knowInfoData2[i].fileid) {
  25558. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25559. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25560. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25561. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25562. // this.knowFileids2.push(fileid)
  25563. // }
  25564. // }
  25565. // }
  25566. // let data = {
  25567. // target:{
  25568. // files: files
  25569. // }
  25570. // }
  25571. // console.log(data)
  25572. // this.beforeUploadInfo2(data, 20)
  25573. if(this.findMatchingContentsPage < 10){
  25574. this.panFind()
  25575. }
  25576. }else{
  25577. if(this.findMatchingContentsPage == 1){
  25578. this.$message.error(this.lang.ssNoSearchRes)
  25579. }else {
  25580. this.findMatchingContentsFinish = true
  25581. }
  25582. }
  25583. }).catch(e => {
  25584. console.log(this.lang.ssQueryFail);
  25585. this.isfindMatchingContents = null
  25586. this.knowInfoDataLoading = false
  25587. console.log(e);
  25588. });
  25589. },
  25590. openCodeEditor(type,val, unitIndex,itemTaskIndex,index1){
  25591. console.log('openCodeEditor',type,val,unitIndex,itemTaskIndex,index1);
  25592. this.$refs.CodeEditorRef.open(type,val, unitIndex,itemTaskIndex, index1)
  25593. },
  25594. addHtmlSuccess({Tname,url,type,unitIndex,itemTaskIndex,index1}){
  25595. console.log('addHtmlSuccess',Tname,url,'type:',type,'unitIndex',unitIndex,'itemTaskIndex',itemTaskIndex,'index1',index1);
  25596. if (type == 1) {
  25597. this.unitJson[unitIndex].chapterInfo[0].taskJson[
  25598. itemTaskIndex
  25599. ].chapterData.splice(index1,1,{
  25600. name: Tname,
  25601. url: url,
  25602. type: 16
  25603. })
  25604. }else{
  25605. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25606. itemTaskIndex
  25607. ].chapterData.push({
  25608. name: Tname,
  25609. url: url,
  25610. type: 16
  25611. });
  25612. }
  25613. },
  25614. openAddApp(i) {
  25615. this.lineCount = i;
  25616. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25617. this.lineCount
  25618. ].chapterData.findIndex(i => i.type == 15);
  25619. let _obj = {}
  25620. if (_index != -1) {
  25621. _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25622. this.lineCount
  25623. ].chapterData[_index]
  25624. }
  25625. this.$refs.appDialog.openG(_obj, "", "", "", 2);
  25626. },
  25627. selectAppSuccess({ data, type }) {
  25628. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25629. this.lineCount
  25630. ].chapterData.findIndex(i => i.type == 15);
  25631. if (_index != -1) {
  25632. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25633. this.lineCount
  25634. ].chapterData.splice(_index, 1);
  25635. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25636. this.lineCount
  25637. ].chapterData.push({
  25638. name: data.name,
  25639. title: data.name,
  25640. id:data.id,
  25641. url: data.url,
  25642. type: 15
  25643. });
  25644. } else {
  25645. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25646. this.lineCount
  25647. ].chapterData.push({
  25648. name: data.name,
  25649. title: data.name,
  25650. id:data.id,
  25651. url: data.url,
  25652. type: 15
  25653. });
  25654. }
  25655. this.imgChange1(null, null, 8, this.lineCount);
  25656. this.dialogVisible7 = false;
  25657. },
  25658. // zip压缩文件上传
  25659. uploadZIPFile(i){
  25660. this.lineCount = i;
  25661. // 只支持上传zip文件
  25662. let input = document.createElement('input');
  25663. input.type = 'file';
  25664. input.accept = '.zip';
  25665. input.style.display = 'none';
  25666. // 只允许上传一个文件
  25667. input.multiple = false;
  25668. input.onchange = async (e) => {
  25669. let file = e.target.files[0];
  25670. if (!file) return;
  25671. if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
  25672. this.$message.error(this.lang.ssOnlyZip);
  25673. return;
  25674. }
  25675. try{
  25676. const zip = new JSZip();
  25677. const content = await zip.loadAsync(file);
  25678. let _fileStructure = this.buildFileStructure(file,content);
  25679. let _time = new Date().getTime();
  25680. let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
  25681. this.changeId = "";
  25682. this.$refs.selectHtmlPageDialogRef.open(_resultList);
  25683. }catch(e){
  25684. console.log(e)
  25685. this.$message.error(this.lang.ssZipFail)
  25686. }
  25687. };
  25688. document.body.appendChild(input);
  25689. input.click();
  25690. setTimeout(() => {
  25691. document.body.removeChild(input);
  25692. }, 1000);
  25693. },
  25694. // 构建文件结构树
  25695. buildFileStructure(file,zip) {
  25696. const root = {
  25697. folderName: file.name.replace(/\.[^/.]+$/, ""), // 移除扩展名
  25698. files: []
  25699. };
  25700. // 遍历ZIP文件中的所有文件/文件夹
  25701. zip.forEach((relativePath, file) => {
  25702. if (file.dir) return; // 跳过目录
  25703. const parts = relativePath.split('/');
  25704. let currentLevel = root.files;
  25705. for (let i = 0; i < parts.length; i++) {
  25706. const part = parts[i];
  25707. const isLast = i === parts.length - 1;
  25708. if (isLast) {
  25709. // 添加文件
  25710. currentLevel.push({fileName:part,file:file});
  25711. } else {
  25712. // 查找或创建文件夹
  25713. let folder = currentLevel.find(item =>
  25714. typeof item === 'object' && item.folderName === part
  25715. );
  25716. if (!folder) {
  25717. folder = {
  25718. folderName: part,
  25719. files: []
  25720. };
  25721. currentLevel.push(folder);
  25722. }
  25723. currentLevel = folder.files;
  25724. }
  25725. }
  25726. });
  25727. return root;
  25728. },
  25729. //按路径上传文件
  25730. async uploadZipFileFn(fileList,path){
  25731. return new Promise(async (resolve)=>{
  25732. let _copyFileList = fileList;
  25733. let promise = [];
  25734. for(let i = 0; i < _copyFileList.length; i++){
  25735. if(_copyFileList[i].folderName){
  25736. let _path = `${path}/${_copyFileList[i].folderName}`;
  25737. promise.push(this.uploadZipFileFn(_copyFileList[i].files,_path).then(res=>{
  25738. _copyFileList[i].files = res;
  25739. }))
  25740. }else if(_copyFileList[i].fileName){
  25741. // 将 ZIP 条目转换为文件对象
  25742. const blob = await _copyFileList[i].file.async('blob');
  25743. // 根据文件名设置type
  25744. let type = 'text/html';
  25745. if (_copyFileList[i].fileName.endsWith('.js')) {
  25746. type = 'application/javascript';
  25747. } else if (_copyFileList[i].fileName.endsWith('.css')) {
  25748. type = 'text/css';
  25749. } else if (_copyFileList[i].fileName.endsWith('.json')) {
  25750. type = 'application/json';
  25751. } else if (_copyFileList[i].fileName.endsWith('.png')) {
  25752. type = 'image/png';
  25753. } else if (_copyFileList[i].fileName.endsWith('.jpg') || _copyFileList[i].fileName.endsWith('.jpeg')) {
  25754. type = 'image/jpeg';
  25755. } else if (_copyFileList[i].fileName.endsWith('.gif')) {
  25756. type = 'image/gif';
  25757. } else if (_copyFileList[i].fileName.endsWith('.svg')) {
  25758. type = 'image/svg+xml';
  25759. } else if (_copyFileList[i].fileName.endsWith('.html') || _copyFileList[i].fileName.endsWith('.htm')) {
  25760. type = 'text/html';
  25761. } else if (_copyFileList[i].fileName.endsWith('.txt')) {
  25762. type = 'text/plain';
  25763. } else if (_copyFileList[i].fileName.endsWith('.pdf')) {
  25764. type = 'application/pdf';
  25765. } else if (_copyFileList[i].fileName.endsWith('.mp3')) {
  25766. type = 'audio/mpeg';
  25767. } else if (_copyFileList[i].fileName.endsWith('.mp4')) {
  25768. type = 'video/mp4';
  25769. } else if (_copyFileList[i].fileName.endsWith('.zip')) {
  25770. type = 'application/zip';
  25771. } else if (_copyFileList[i].fileName.endsWith('.xml')) {
  25772. type = 'application/xml';
  25773. } else if (_copyFileList[i].fileName.endsWith('.csv')) {
  25774. type = 'text/csv';
  25775. } else if (_copyFileList[i].fileName.endsWith('.md')) {
  25776. type = 'text/markdown';
  25777. }
  25778. let _file = new File([blob], _copyFileList[i].fileName, {type: type, lastModified: new Date().getTime()});
  25779. promise.push(this.awsupload({file:_file,path:`${path}/${_copyFileList[i].fileName}`}).then(res=>{
  25780. delete _copyFileList[i].file;
  25781. _copyFileList[i].url = decodeURIComponent(res.Location);
  25782. }))
  25783. }
  25784. }
  25785. Promise.all(promise).then(res=>{
  25786. resolve(_copyFileList);
  25787. })
  25788. })
  25789. },
  25790. selectHtmlPageSuccess(data){
  25791. let _selectFile = data.find(i=>i.isSelect==="1");
  25792. if(!_selectFile){
  25793. this.changeId = "";
  25794. return this.$message.info(this.lang.ssNoPageSel)
  25795. }
  25796. console.log("_selectFile",_selectFile)
  25797. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25798. this.lineCount
  25799. ].chapterData.findIndex(i => i.type == 17 && i.id == this.changeId);
  25800. if (_index != -1) {
  25801. console.log("_index",_index)
  25802. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25803. this.lineCount
  25804. ].chapterData[_index] = {
  25805. name: _selectFile.fileName,
  25806. title: _selectFile.fileName,
  25807. id:this.changeId,
  25808. url: _selectFile.url,
  25809. fileList:data,
  25810. type: 17
  25811. };
  25812. } else {
  25813. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25814. this.lineCount
  25815. ].chapterData.push({
  25816. name: _selectFile.fileName,
  25817. title: _selectFile.fileName,
  25818. id:new Date().getTime(),
  25819. url: _selectFile.url,
  25820. fileList:data,
  25821. type: 17
  25822. });
  25823. }
  25824. this.changeId = "";
  25825. this.$forceUpdate();
  25826. this.$refs.selectHtmlPageDialogRef.close();
  25827. },
  25828. changeHTmlPage(itemTaskIndex,i){
  25829. let _data = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25830. itemTaskIndex
  25831. ].chapterData[i];
  25832. this.lineCount = itemTaskIndex;
  25833. this.changeId = _data.id;
  25834. this.$refs.selectHtmlPageDialogRef.open(_data.fileList);
  25835. }
  25836. },
  25837. beforeDestroy() {
  25838. // clearTimeout(this.timer);
  25839. // this.timer = null;
  25840. // clearInterval(this.timer2);
  25841. // this.timer2 = null;
  25842. clearInterval(this.pasteTimer);
  25843. this.pasteTimer = null;
  25844. },
  25845. beforeRouteLeave(to, from, next) {
  25846. // clearTimeout(this.timer);
  25847. // this.timer = null;
  25848. // clearInterval(this.timer2);
  25849. // this.timer2 = null;
  25850. clearInterval(this.pasteTimer);
  25851. this.pasteTimer = null;
  25852. next();
  25853. },
  25854. mounted(){
  25855. // 初始化需要从 lang 获取的数组
  25856. this.appendixType = [
  25857. {
  25858. label: this.lang.ssLessonPlan,
  25859. value: 0,
  25860. },
  25861. {
  25862. label: "PPT",
  25863. value: 1,
  25864. },
  25865. {
  25866. label: this.lang.ssEduCase,
  25867. value: 2,
  25868. },
  25869. {
  25870. label: this.lang.ssRubric,
  25871. value: 3,
  25872. },
  25873. {
  25874. label: this.lang.ssChatRecord,
  25875. value: 4,
  25876. },
  25877. ];
  25878. this.knowFileTypeArray1 = [this.lang.ssFirstVol, this.lang.ssSecondVol];
  25879. this.knowFileTypeArray = [this.lang.ssHomeworkOnly, this.lang.ssLessonPlan, this.lang.ssOther];
  25880. let _this = this
  25881. // 监听浏览器后退或者刷新等离开页面的操作
  25882. window.onbeforeunload = function(event) {
  25883. // 检查是否有未保存的更改
  25884. const message = _this.lang.ssUnsavedChanges;
  25885. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25886. event.returnValue = message; // 兼容大部分浏览器
  25887. console.log(message)
  25888. return message; // 兼容部分浏览器
  25889. };
  25890. const resizable = this.$el.querySelector('.resizable');
  25891. const resizer = this.$el.querySelector('.resizer');
  25892. const maxWidth = document.body.offsetWidth / 2;
  25893. const maxWidth2 = window.innerWidth / 2;
  25894. let startX, startWidth;
  25895. const mouseMoveHandler = (e) => {
  25896. e.preventDefault(); // 添加此行以防止选中其他文本
  25897. const dx = startX - e.clientX;
  25898. const newWidth = startWidth + dx;
  25899. if (newWidth >= 350 && newWidth <= maxWidth) {
  25900. resizable.style.minWidth = `${newWidth}px`;
  25901. }
  25902. };
  25903. const mouseUpHandler = () => {
  25904. document.removeEventListener('mousemove', mouseMoveHandler);
  25905. document.removeEventListener('mouseup', mouseUpHandler);
  25906. document.body.style.cursor = 'default';
  25907. };
  25908. const mouseDownHandler = (e) => {
  25909. e.preventDefault(); // 添加此行以防止选中其他文本
  25910. startX = e.clientX;
  25911. startWidth = resizable.getBoundingClientRect().width;
  25912. document.addEventListener('mousemove', mouseMoveHandler);
  25913. document.addEventListener('mouseup', mouseUpHandler);
  25914. document.body.style.cursor = 'ew-resize';
  25915. };
  25916. resizer.addEventListener('mousedown', mouseDownHandler);
  25917. const touchMoveHandler = (e) => {
  25918. e.preventDefault(); // 添加此行以防止选中其他文本
  25919. const dx = startX - e.touches[0].clientX;
  25920. const newWidth = startWidth + dx;
  25921. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25922. resizable.style.minWidth = `${newWidth}px`;
  25923. }
  25924. };
  25925. const touchEndHandler = () => {
  25926. document.removeEventListener('touchmove', touchMoveHandler);
  25927. document.removeEventListener('touchend', touchEndHandler);
  25928. document.body.style.cursor = 'default';
  25929. };
  25930. const touchStartHandler = (e) => {
  25931. e.preventDefault(); // 添加此行以防止选中其他文本
  25932. startX = e.touches[0].clientX;
  25933. startWidth = resizable.getBoundingClientRect().width;
  25934. document.addEventListener('touchmove', touchMoveHandler);
  25935. document.addEventListener('touchend', touchEndHandler);
  25936. document.body.style.cursor = 'ew-resize';
  25937. };
  25938. resizer.addEventListener('touchstart', touchStartHandler);
  25939. },
  25940. created() {
  25941. this.selectFileid();
  25942. // this.selectAiFileid();
  25943. this.selectKnowFileid();
  25944. this.getStudent();
  25945. this.getTeacher();
  25946. this.getClass();
  25947. this.selectGrage();
  25948. this.getTemplate();
  25949. this.getTipsTemplate();
  25950. // this.selectType();
  25951. this.selectEva();
  25952. if(this.istemplate == 1){
  25953. this.isOutline = true
  25954. this.isOutline2 = true
  25955. this.courseTextBool = true
  25956. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25957. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25958. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25959. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25960. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  25961. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25962. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  25963. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  25964. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  25965. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  25966. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  25967. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  25968. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  25969. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  25970. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  25971. - 我们的课程主题可以如何与学生的实际生活联系起来?
  25972. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  25973. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  25974. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  25975. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  25976. - 学生个人最终要完成什么?学生小组最终要完成什么?
  25977. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  25978. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  25979. 讨论:<转文本内容>`
  25980. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  25981. }
  25982. this.loading = false;
  25983. // this.timer2 = setInterval(() => {
  25984. // this.selectEva();
  25985. // }, 5000);
  25986. // this.pasteTimer = setInterval(() => {
  25987. // this.getPaste();
  25988. // }, 1000);
  25989. this.pasteTimer = setInterval(() => {
  25990. this.getPaste2();
  25991. }, 500);
  25992. setTimeout(() => {
  25993. // this.selectAllType();
  25994. this.selectCourseDetail();
  25995. }, 500);
  25996. let _this = this;
  25997. window.pasteStage = function (json) {
  25998. _this.pasteStage(json);
  25999. };
  26000. window.pasteTask = function (json) {
  26001. _this.pasteTask(json);
  26002. };
  26003. },
  26004. };
  26005. </script>
  26006. <style scoped>
  26007. @media screen and (max-width: 1280px) {
  26008. .mbCss {
  26009. flex-direction: column !important;
  26010. }
  26011. .pjCss {
  26012. width: 100% !important;
  26013. }
  26014. .evaCss {
  26015. width: 100% !important;
  26016. margin-top: 10px;
  26017. }
  26018. }
  26019. .el-table>>>.even_row {
  26020. background-color: #f1f1f1 !important;
  26021. }
  26022. .dialog_diy>>>.el-dialog__header {
  26023. background: #3c3c3c !important;
  26024. padding: 15px 20px;
  26025. }
  26026. .dialog_diy>>>.el-dialog__title {
  26027. color: #fff;
  26028. }
  26029. .dialog_diy>>>.el-dialog__headerbtn {
  26030. top: 19px;
  26031. }
  26032. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  26033. color: #fff;
  26034. }
  26035. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  26036. color: #fff;
  26037. }
  26038. .dialog_diy>>>.el-dialog__body,
  26039. .dialog_diy>>>.el-dialog__footer {
  26040. background: #fafafa;
  26041. }
  26042. .dialog_diy3>>>.el-dialog__body,
  26043. .dialog_diy3>>>.el-dialog__footer {
  26044. background: #eee !important;
  26045. }
  26046. .dialog_diy3>>>.el-dialog__body {
  26047. padding: 20px 20px;
  26048. }
  26049. .dialog_diyStage>>>.el-dialog__body {
  26050. padding: 10px;
  26051. }
  26052. .source_diy>>>.el-dialog {
  26053. height: 100% !important;
  26054. margin: 0 auto !important;
  26055. }
  26056. .source_diy>>>.el-dialog__body {
  26057. height: calc(100% - 185px);
  26058. overflow: auto;
  26059. background: #e6eaf0;
  26060. }
  26061. .source_diy>>>.el-dialog__footer {
  26062. background: #e6eaf0 !important;
  26063. }
  26064. .left {
  26065. border-right: 1px solid rgb(60, 94, 143);
  26066. display: flex;
  26067. flex-direction: column;
  26068. align-items: center;
  26069. min-height: 600px;
  26070. width: 385px;
  26071. height: 80%;
  26072. }
  26073. .tips {
  26074. color: rgb(128, 128, 128);
  26075. font-size: 12px;
  26076. width: 270px;
  26077. margin: 40px;
  26078. }
  26079. .pb_content {
  26080. height: 100% !important;
  26081. /* margin: 0 20px 0 20px; */
  26082. }
  26083. .pb_content_body {
  26084. width: 100% !important;
  26085. height: 100%;
  26086. display: flex;
  26087. }
  26088. .info_solid {
  26089. width: 270px;
  26090. height: 30px;
  26091. border-left: 1px solid #bdbdbd;
  26092. margin: 10px 0px 10px 30px;
  26093. }
  26094. .info_steps {
  26095. width: 270px;
  26096. font-size: 0.875rem;
  26097. display: flex;
  26098. align-items: center;
  26099. }
  26100. .info_steps span:nth-child(1) {
  26101. width: 30px;
  26102. height: 30px;
  26103. background: rgba(0, 0, 0, 0.38);
  26104. display: block;
  26105. color: #fff;
  26106. border-radius: 40px;
  26107. text-align: center;
  26108. line-height: 30px;
  26109. }
  26110. .steps_active {
  26111. background: #3d67bc !important;
  26112. }
  26113. .info_steps span:nth-child(2) {
  26114. margin-left: 5px;
  26115. }
  26116. .right {
  26117. height: 100%;
  26118. width: 100%;
  26119. display: flex;
  26120. overflow: hidden;
  26121. flex-direction: column;
  26122. }
  26123. .leftBar{
  26124. width: 290px;
  26125. height: calc(100% - 50px);
  26126. overflow: auto;
  26127. border-radius: 5px;
  26128. margin: 25px auto;
  26129. box-sizing: border-box;
  26130. margin-right: 10px;
  26131. }
  26132. .leftBar2{
  26133. width: 400px;
  26134. min-width: 400px;
  26135. height: calc(100% - 50px);
  26136. overflow: auto;
  26137. border-radius: 5px;
  26138. margin: 25px auto;
  26139. box-sizing: border-box;
  26140. margin-right: 10px;
  26141. background: #fff;
  26142. padding: 5px;
  26143. border-radius: 5px;
  26144. }
  26145. .basic_box {
  26146. margin: 0 auto;
  26147. position: relative;
  26148. padding: 0 20px 0 20px;
  26149. }
  26150. .basic_box_success {
  26151. width: 100%;
  26152. min-height: 455px;
  26153. padding: 50px 0;
  26154. position: relative;
  26155. text-align: center;
  26156. border-bottom: 1px solid #bfbfbf;
  26157. box-sizing: border-box;
  26158. display: flex;
  26159. align-items: center;
  26160. flex-direction: column;
  26161. justify-content: center;
  26162. }
  26163. .info_title {
  26164. font-size: 1.5em;
  26165. margin-right: 25px;
  26166. /* margin: 20px 30px 20px 30px; */
  26167. }
  26168. .bInfo_title {
  26169. text-align: left;
  26170. margin: 10px 0;
  26171. }
  26172. .small_title {
  26173. font-size: 14px;
  26174. line-height: 40px;
  26175. }
  26176. .chapter_beizhu {
  26177. font-size: 12px;
  26178. font-weight: bold;
  26179. float: right;
  26180. color: rgb(128, 128, 128);
  26181. margin-top: 5px;
  26182. }
  26183. .chapter_uploadBox1 {
  26184. text-align: left;
  26185. background-color: rgb(242, 242, 242);
  26186. width: 100%;
  26187. height: 67px;
  26188. padding: 0px 15px;
  26189. border-radius: 8px;
  26190. overflow: hidden;
  26191. font-size: 16px;
  26192. box-sizing: border-box;
  26193. position: relative;
  26194. }
  26195. .chapter_add {
  26196. width: 100%;
  26197. height: 32px;
  26198. margin-top: 15px;
  26199. cursor: pointer;
  26200. }
  26201. .chapter_add_l {
  26202. margin-left: 5px;
  26203. width: 30px;
  26204. height: 30px;
  26205. float: left;
  26206. border: 1px solid #aaa;
  26207. color: #aaa;
  26208. border-radius: 50%;
  26209. font-size: 25px;
  26210. text-align: center;
  26211. }
  26212. .chapter_add_r {
  26213. font-size: 18px;
  26214. height: 40px;
  26215. line-height: 30px;
  26216. text-indent: 10px;
  26217. color: #aaa;
  26218. }
  26219. .chapter_add_r span {
  26220. font-size: 12px;
  26221. color: rgb(204, 204, 204);
  26222. }
  26223. .chapter_add_input {
  26224. display: none;
  26225. }
  26226. .line {
  26227. width: 85%;
  26228. margin: 0 auto;
  26229. border-top: 1px solid #e5e5e5;
  26230. margin-top: 20px;
  26231. }
  26232. .info_btnBox {
  26233. width: calc(100%);
  26234. display: flex;
  26235. justify-content: center;
  26236. height: 80px;
  26237. align-items: center;
  26238. background: #fff;
  26239. margin: 0 auto;
  26240. border-top: 2px solid rgb(228, 232, 237);
  26241. box-sizing: border-box;
  26242. }
  26243. .info_btnBox2 {
  26244. width: calc(100%);
  26245. display: flex;
  26246. justify-content: center;
  26247. height: 20px;
  26248. align-items: center;
  26249. background: #fff;
  26250. margin: 0 auto;
  26251. border-top: 2px solid rgb(228, 232, 237);
  26252. box-sizing: border-box;
  26253. overflow: hidden;
  26254. cursor: pointer;
  26255. }
  26256. .info_btnBox3 {
  26257. width: calc(100%);
  26258. display: flex;
  26259. justify-content: flex-end;
  26260. padding: 0 20px;
  26261. height: 60px;
  26262. align-items: center;
  26263. background: unset;
  26264. margin: 0 auto;
  26265. /* border-top: 1px solid rgb(228, 232, 237); */
  26266. box-sizing: border-box;
  26267. overflow: hidden;
  26268. cursor: pointer;
  26269. background: #fff;
  26270. border-radius: 10px;
  26271. }
  26272. .info_btn+.info_btn {
  26273. margin-left: 15px;
  26274. }
  26275. .info_btn,
  26276. .teacherWord {
  26277. color: #fff;
  26278. background-color: #0f7eff;
  26279. padding: 8px 24px;
  26280. font-size: 0.9375rem;
  26281. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  26282. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  26283. min-width: 64px;
  26284. font-weight: 500;
  26285. border-radius: 4px;
  26286. box-sizing: border-box;
  26287. border: none;
  26288. cursor: pointer;
  26289. }
  26290. .teacherWord {
  26291. width: 105px !important;
  26292. text-align: center !important;
  26293. line-height: 36px !important;
  26294. padding: 0 !important;
  26295. font-size: 14px !important;
  26296. margin: 10px 0 !important;
  26297. }
  26298. .template_box {
  26299. display: flex;
  26300. flex-wrap: wrap;
  26301. }
  26302. .wordTeacher {
  26303. display: flex;
  26304. flex-direction: column;
  26305. width: 100px;
  26306. height: 100px;
  26307. text-align: center;
  26308. font-size: 13px;
  26309. margin: 0 20px 20px 0;
  26310. background: #f0f4fa;
  26311. position: relative;
  26312. border-radius: 5px;
  26313. align-items: center;
  26314. justify-content: center;
  26315. border: 1px solid #cad1dc;
  26316. color: #0e1e33;
  26317. /* padding: 25px 0px; */
  26318. cursor: pointer;
  26319. }
  26320. .wordTeacher::after {
  26321. content: "";
  26322. display: block;
  26323. position: absolute;
  26324. width: 15px;
  26325. height: 15px;
  26326. right: 10px;
  26327. top: 10px;
  26328. background-image: url(../../../assets/icon/new/choose_a.png);
  26329. background-size: 100% 100%;
  26330. }
  26331. .wordTeacherA::after {
  26332. background-image: url(../../../assets/icon/new/choose_b.png);
  26333. }
  26334. .wordTeacher:nth-child(5n) {
  26335. margin-right: 0px;
  26336. }
  26337. .wordPic {
  26338. margin: 0 auto;
  26339. width: 30px;
  26340. height: 30px;
  26341. cursor: pointer;
  26342. }
  26343. .deleteWord {
  26344. width: 22px;
  26345. height: 22px;
  26346. position: absolute;
  26347. right: 5px;
  26348. top: -15px;
  26349. cursor: pointer;
  26350. display: none;
  26351. z-index: 999;
  26352. }
  26353. .wordPic>img,
  26354. .deleteWord>img,
  26355. .addToolImg>img {
  26356. width: 100%;
  26357. height: 100%;
  26358. }
  26359. .info_btn:hover {
  26360. background-color: #4f7cd5 !important;
  26361. }
  26362. .cru_selectBox {
  26363. display: flex;
  26364. margin: 15px 0;
  26365. flex-wrap: nowrap;
  26366. white-space: nowrap;
  26367. overflow: auto;
  26368. position: relative;
  26369. height: 40px;
  26370. max-width: calc(100% - 175px);
  26371. }
  26372. .cru_selectBox::-webkit-scrollbar {
  26373. /*滚动条整体样式*/
  26374. width: 6px;
  26375. /*高宽分别对应横竖滚动条的尺寸*/
  26376. height: 6px;
  26377. }
  26378. /*定义滚动条轨道 内阴影+圆角*/
  26379. .cru_selectBox::-webkit-scrollbar-track {
  26380. border-radius: 10px;
  26381. background-color: #eee;
  26382. }
  26383. /*定义滑块 内阴影+圆角*/
  26384. .cru_selectBox::-webkit-scrollbar-thumb {
  26385. border-radius: 10px;
  26386. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  26387. background-color: rgba(0, 0, 0, 0.1);
  26388. }
  26389. .cru_line {
  26390. position: absolute;
  26391. bottom: 0px;
  26392. transition: all 0.5s;
  26393. left: 0px;
  26394. width: 50px;
  26395. height: 4px;
  26396. left: 10px;
  26397. border-radius: 2px;
  26398. background: #3681fc;
  26399. }
  26400. .cru_select {
  26401. font-size: 18px;
  26402. margin-right: 20px;
  26403. margin-left: 5px;
  26404. cursor: pointer;
  26405. color: #0e1e33;
  26406. }
  26407. .cru_select:hover {
  26408. color: #3681fc !important;
  26409. }
  26410. .cru_selected {
  26411. color: #3681fc !important;
  26412. font-weight: bold;
  26413. }
  26414. .chapter_box {
  26415. margin-top: 10px;
  26416. width: 100%;
  26417. padding: 10px 20px;
  26418. background: #fff;
  26419. border-radius: 8px;
  26420. box-sizing: border-box;
  26421. }
  26422. .chapter_contentbox {
  26423. display: flex;
  26424. align-items: center;
  26425. /* margin-top: 15px; */
  26426. }
  26427. .chapter_contentbox .cc_title {
  26428. margin: 0px;
  26429. color: black;
  26430. display: block;
  26431. white-space: nowrap;
  26432. overflow: hidden;
  26433. text-overflow: ellipsis;
  26434. margin-right: 20px;
  26435. font-size: 18px;
  26436. height: 20px;
  26437. line-height: 22px;
  26438. min-width: fit-content;
  26439. display: flex;
  26440. }
  26441. .chapter_contentbox .cc_title::before {
  26442. content: "";
  26443. height: 100%;
  26444. width: 3px;
  26445. background: #3681fc;
  26446. border-radius: 3px;
  26447. opacity: 1;
  26448. display: block;
  26449. margin-right: 10px;
  26450. }
  26451. .chapter_contentbox .cc_input {
  26452. width: 100%;
  26453. display: flex;
  26454. }
  26455. .show_taskD {
  26456. min-width: fit-content;
  26457. margin-left: 10px;
  26458. display: flex;
  26459. align-items: center;
  26460. font-size: 14px;
  26461. cursor: pointer;
  26462. color: #717c8d;
  26463. }
  26464. .show_taskD>img {
  26465. width: 15px;
  26466. margin-right: 5px;
  26467. transition: 0.2s all;
  26468. transform: rotate(-90deg);
  26469. }
  26470. .show_taskD.show>img {
  26471. transform: rotate(0deg);
  26472. }
  26473. .show_toolD {
  26474. min-width: fit-content;
  26475. margin-left: 10px;
  26476. display: flex;
  26477. align-items: center;
  26478. font-size: 14px;
  26479. cursor: pointer;
  26480. color: #717c8d;
  26481. /* position: absolute;
  26482. right: 45px;
  26483. top: 5px; */
  26484. }
  26485. .show_toolD>img {
  26486. width: 15px;
  26487. margin-right: 5px;
  26488. transition: 0.2s all;
  26489. transform: rotate(-90deg);
  26490. }
  26491. .show_toolD.show>img {
  26492. transform: rotate(0deg);
  26493. }
  26494. .remove {
  26495. background-image: url("../../../assets/icon/new/delete_u.png");
  26496. cursor: pointer;
  26497. opacity: 0.5;
  26498. width: 30px;
  26499. min-width: 30px;
  26500. height: 30px;
  26501. background-size: 100% 100%;
  26502. background-repeat: no-repeat;
  26503. margin-left: 10px;
  26504. }
  26505. .remove1 {
  26506. background-image: url("../../../assets/remove1.png");
  26507. background-repeat: no-repeat;
  26508. background-position: 5px 10px;
  26509. width: 40px;
  26510. height: 50px;
  26511. cursor: pointer;
  26512. margin-left: 10px;
  26513. }
  26514. .binfo_input {
  26515. width: 100%;
  26516. margin: 0;
  26517. padding: 12px 14px;
  26518. display: block;
  26519. min-width: 0;
  26520. outline: none;
  26521. box-sizing: border-box;
  26522. background: none;
  26523. border: none;
  26524. border-radius: 4px;
  26525. background: #fff;
  26526. font-size: 16px;
  26527. resize: none;
  26528. font-family: "Microsoft YaHei";
  26529. min-height: 48px;
  26530. /* border: 1px solid #3682fc00; */
  26531. border: 1.5px solid #cad1dc;
  26532. }
  26533. .binfo_textarea {
  26534. border: 1.5px solid #cad1dc;
  26535. font-size: 16px;
  26536. resize: none;
  26537. /* background: #f6f6f6; */
  26538. font-family: "Microsoft YaHei";
  26539. }
  26540. .binfo_input:focus-visible {
  26541. border: 1.5px solid #3681fc !important;
  26542. }
  26543. .time {
  26544. display: flex;
  26545. margin: 35px 0 80px 0;
  26546. }
  26547. .chapter_btnbox {
  26548. width: 160px;
  26549. border-radius: 5px;
  26550. border: 2px dashed gray;
  26551. display: flex;
  26552. padding: 8px 50px;
  26553. align-items: center;
  26554. justify-content: center;
  26555. margin: 30px auto 0;
  26556. cursor: pointer;
  26557. }
  26558. .icon_add {
  26559. position: relative;
  26560. width: 24px;
  26561. padding-top: 20px;
  26562. border-radius: 100%;
  26563. border-width: 2px;
  26564. border-style: solid;
  26565. border-color: gray;
  26566. }
  26567. .icon_add i:nth-child(1) {
  26568. position: absolute;
  26569. left: 50%;
  26570. top: 50%;
  26571. height: 60%;
  26572. transform: translate(-50%, -50%);
  26573. border-width: 1px;
  26574. border-style: solid;
  26575. border-color: inherit;
  26576. }
  26577. .icon_add i:nth-child(2) {
  26578. position: absolute;
  26579. top: 50%;
  26580. left: 50%;
  26581. width: 60%;
  26582. transform: translate(-50%, -50%);
  26583. border-width: 1px;
  26584. border-style: solid;
  26585. border-color: inherit;
  26586. }
  26587. .chapter_btn_w {
  26588. font-size: 0.9375rem;
  26589. font-weight: bold;
  26590. color: gray;
  26591. margin-left: 20px;
  26592. }
  26593. .disUoloadSty>>>.el-icon-plus {
  26594. display: none !important;
  26595. /* 上传按钮隐藏 */
  26596. }
  26597. .imgLeft {
  26598. margin: 15px 0;
  26599. }
  26600. .add_info_box {
  26601. margin: 0 0 0 auto;
  26602. display: flex;
  26603. flex-wrap: wrap;
  26604. }
  26605. .add_info_box button {
  26606. margin: 0 5px 10px 0;
  26607. }
  26608. .add_info_box2 {
  26609. display: flex;
  26610. align-items: center;
  26611. flex-wrap: wrap;
  26612. }
  26613. .add_info_box2::after {
  26614. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26615. color: red;
  26616. font-size: 14px;
  26617. margin-bottom: 10px;
  26618. }
  26619. .add_chapters_box {
  26620. text-align: left;
  26621. background-color: #fff;
  26622. width: 100%;
  26623. border-radius: 4px;
  26624. font-size: 16px;
  26625. box-sizing: border-box;
  26626. position: relative;
  26627. padding: 0 15px;
  26628. height: auto;
  26629. overflow-y: auto;
  26630. overflow-x: hidden;
  26631. border: 1px solid #cad1dc;
  26632. }
  26633. .add_chapters_box.add_c_none {
  26634. display: flex;
  26635. justify-content: center;
  26636. align-items: center;
  26637. padding: 15px;
  26638. }
  26639. .add_c_none>img {
  26640. width: 25px;
  26641. }
  26642. .add_chapters_box.add_c_none>span {
  26643. font-size: 14px;
  26644. font-weight: 400;
  26645. margin: 0 0 5px 5px;
  26646. }
  26647. .homework_box {
  26648. display: flex;
  26649. align-items: flex-start;
  26650. flex-wrap: wrap;
  26651. margin: 15px 0 0 0;
  26652. flex-direction: column;
  26653. align-content: flex-start;
  26654. }
  26655. .course_homework {
  26656. display: flex;
  26657. justify-content: center;
  26658. flex-direction: row;
  26659. align-items: center;
  26660. margin: 0 10px 0 0;
  26661. }
  26662. .course_homework>>>.el-input__inner {
  26663. width: 140px;
  26664. margin-left: 15px;
  26665. }
  26666. .chapter_upload_move {
  26667. position: relative;
  26668. background-color: #fff;
  26669. position: absolute;
  26670. width: 100%;
  26671. top: 0px;
  26672. left: 0px;
  26673. border: 1px solid #eee;
  26674. border-radius: 5px;
  26675. transition: width 2s;
  26676. -moz-transition: width 2s;
  26677. -webkit-transition: width 2s;
  26678. -o-transition: width 2s;
  26679. }
  26680. .chapter_upload_l_i {
  26681. background-image: url("../../../assets/icon.png");
  26682. background-position: 3px -165px;
  26683. width: 30px;
  26684. height: 30px;
  26685. margin: 10px auto 0 auto;
  26686. }
  26687. .course_input_box {
  26688. display: flex;
  26689. margin-right: 20px;
  26690. min-width: 400px;
  26691. width: calc(100% - 350px);
  26692. align-items: center;
  26693. position: relative;
  26694. margin-bottom: 15px;
  26695. }
  26696. .course_input_box2 {
  26697. display: flex;
  26698. width: 100%;
  26699. align-items: center;
  26700. position: relative;
  26701. flex-wrap: nowrap;
  26702. }
  26703. .course_input_box>.binfo_input {
  26704. width: calc(100%);
  26705. margin: 0;
  26706. border: 1.5px solid rgb(202, 209, 220);
  26707. border-radius: 5px;
  26708. font-weight: 600;
  26709. padding: 12px 14px 12px 71px;
  26710. }
  26711. .bb_courseIcon {
  26712. width: 57px;
  26713. height: 45px;
  26714. background: #f0f4fa;
  26715. border-radius: 5px 0px 0px 5px;
  26716. display: flex;
  26717. align-items: center;
  26718. justify-content: center;
  26719. border-right: 1.5px solid rgb(202, 209, 220);
  26720. box-sizing: border-box;
  26721. position: absolute;
  26722. left: 1.5px;
  26723. }
  26724. .bb_courseIcon>img {
  26725. width: 25px;
  26726. height: auto;
  26727. }
  26728. .big_box {
  26729. /* margin-top: 20px; */
  26730. display: flex;
  26731. justify-content: space-between;
  26732. /* border-bottom: 1px solid #E0E2ED; */
  26733. }
  26734. .left_first {
  26735. display: flex;
  26736. flex-direction: column;
  26737. flex-wrap: nowrap;
  26738. width: calc(100% - 310px);
  26739. padding: 20px;
  26740. box-sizing: border-box;
  26741. background: #fff;
  26742. border-radius: 5px;
  26743. }
  26744. .right_first {
  26745. width: 300px;
  26746. display: flex;
  26747. align-items: center;
  26748. justify-content: center;
  26749. /* border-left: 1px solid #E0E2ED; */
  26750. box-sizing: border-box;
  26751. padding: 20px;
  26752. flex-direction: column;
  26753. background: #fff;
  26754. border-radius: 5px;
  26755. }
  26756. .ai_box {
  26757. width: 204px;
  26758. display: flex;
  26759. justify-content: flex-end;
  26760. margin-bottom: 15px;
  26761. }
  26762. .ai_content {
  26763. display: flex;
  26764. align-items: center;
  26765. font-size: 14px;
  26766. padding: 7px 20px;
  26767. box-sizing: border-box;
  26768. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26769. border-radius: 12px;
  26770. font-weight: 700;
  26771. cursor: pointer;
  26772. }
  26773. .ai_content>img {
  26774. width: 40px;
  26775. margin-right: 5px;
  26776. }
  26777. .c_info_title {
  26778. padding: 15px 0 15px 0;
  26779. font-size: 16px;
  26780. font-weight: bold;
  26781. margin: 0 0 0 20px;
  26782. box-sizing: border-box;
  26783. display: flex;
  26784. align-items: center;
  26785. line-height: 20px;
  26786. }
  26787. .c_info_title::before {
  26788. content: "";
  26789. display: block;
  26790. width: 3px;
  26791. height: 20px;
  26792. background: #0061ff;
  26793. border-radius: 3px;
  26794. margin: 0 5px 0 0;
  26795. }
  26796. .right_title {
  26797. height: 30px;
  26798. padding: 15px 0 15px 20px;
  26799. border-bottom: 1px solid #f2f2f2;
  26800. font-size: 1.5em;
  26801. font-weight: bold;
  26802. color: #0f7eff;
  26803. margin: 0 auto;
  26804. }
  26805. .people {
  26806. border: 1px solid rgb(229 229 229);
  26807. /* height: 495px; */
  26808. height: 350px;
  26809. border-radius: 5px;
  26810. width: 100%;
  26811. overflow: auto;
  26812. }
  26813. .people_top {
  26814. display: flex;
  26815. width: 100%;
  26816. /* justify-content: space-between; */
  26817. /* align-items: center; */
  26818. flex-direction: column;
  26819. padding: 10px 10px 0;
  26820. box-sizing: border-box;
  26821. }
  26822. .people_nav,
  26823. .people_top_right {
  26824. /* padding: 20px 0 0 20px; */
  26825. }
  26826. .people_top_right {
  26827. height: 40px;
  26828. margin-bottom: 10px;
  26829. }
  26830. .people_search {
  26831. display: flex;
  26832. position: relative;
  26833. }
  26834. .people_search>>>.el-input__inner {
  26835. /* height: 25px; */
  26836. width: 100%;
  26837. }
  26838. .search_img {
  26839. width: 20px;
  26840. height: 20px;
  26841. position: absolute;
  26842. right: 10px;
  26843. top: 50%;
  26844. transform: translateY(-50%);
  26845. }
  26846. .search_img>img {
  26847. width: 100%;
  26848. height: 100%;
  26849. }
  26850. .people_name {
  26851. display: flex;
  26852. justify-content: flex-start;
  26853. padding: 20px 10px;
  26854. flex-direction: column;
  26855. flex-wrap: wrap;
  26856. }
  26857. .p_box {
  26858. position: relative;
  26859. }
  26860. .people_name>>>.el-checkbox {
  26861. width: 100%;
  26862. display: flex;
  26863. align-items: center;
  26864. margin-bottom: 10px;
  26865. }
  26866. .people_name>>>.el-checkbox__label {
  26867. text-overflow: ellipsis;
  26868. overflow: hidden;
  26869. width: calc(100%);
  26870. }
  26871. .people_name2>>>.el-checkbox__label {
  26872. width: calc(100% - 130px);
  26873. }
  26874. .inviteCode {
  26875. position: absolute;
  26876. right: 30px;
  26877. color: #237ade;
  26878. top: 0;
  26879. cursor: pointer;
  26880. font-size: 13px;
  26881. }
  26882. .noneInvite {
  26883. color: #a8a8a8;
  26884. }
  26885. .inviteImg {
  26886. position: absolute;
  26887. right: 5px;
  26888. top: 0;
  26889. width: 20px;
  26890. }
  26891. .right_img {
  26892. width: 150px;
  26893. height: 150px;
  26894. margin: 0 auto;
  26895. }
  26896. .right_img>img {
  26897. width: 100%;
  26898. height: 100%;
  26899. }
  26900. .number {
  26901. margin-top: 20px;
  26902. color: #4aa6ff;
  26903. text-decoration: underline;
  26904. }
  26905. .success_button {
  26906. display: flex;
  26907. text-align: center;
  26908. margin: 5% 0 auto;
  26909. flex-direction: row;
  26910. justify-content: center;
  26911. }
  26912. .look_course {
  26913. margin-right: 40px;
  26914. background: #3d67bc;
  26915. width: 200px;
  26916. height: 35px;
  26917. line-height: 35px;
  26918. color: #fff;
  26919. text-align: center;
  26920. font-size: 14px;
  26921. border-radius: 5px;
  26922. cursor: pointer;
  26923. }
  26924. .attend_others {
  26925. width: 250px;
  26926. background: #4fb13c;
  26927. height: 35px;
  26928. line-height: 35px;
  26929. color: #fff;
  26930. text-align: center;
  26931. font-size: 14px;
  26932. border-radius: 5px;
  26933. cursor: pointer;
  26934. }
  26935. .dialog_diy2>>>.el-dialog__body {
  26936. text-align: center;
  26937. }
  26938. .write_togother {
  26939. position: absolute;
  26940. right: 45px;
  26941. display: flex;
  26942. top: 5%;
  26943. }
  26944. .write_people {
  26945. font-size: 14px;
  26946. line-height: 50px;
  26947. padding-right: 10px;
  26948. }
  26949. .end_write {
  26950. background: #3d67bc;
  26951. color: #fff;
  26952. width: 100px;
  26953. height: 35px;
  26954. line-height: 35px;
  26955. text-align: center;
  26956. font-size: 14px;
  26957. border-radius: 5px;
  26958. cursor: pointer;
  26959. }
  26960. .chapter_upload+.chapter_upload {
  26961. /* margin-top: 15px; */
  26962. border-top: 1px solid #e7ebf1;
  26963. }
  26964. .chapter_upload {
  26965. height: 45px;
  26966. position: relative;
  26967. display: flex;
  26968. align-items: center;
  26969. width: 100%;
  26970. min-height: 45px;
  26971. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  26972. /* border-radius: 4px; */
  26973. /* overflow: hidden; */
  26974. box-sizing: border-box;
  26975. }
  26976. .chapter_upload_drag {
  26977. position: absolute;
  26978. cursor: pointer;
  26979. width: 16px;
  26980. height: 16px;
  26981. left: -9px;
  26982. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  26983. background-size: 100% 100%;
  26984. z-index: 10;
  26985. display: none;
  26986. }
  26987. .isNavStage>.chapter_upload_drag {
  26988. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  26989. }
  26990. .chapter_upload_t {
  26991. background-color: #fff;
  26992. position: absolute;
  26993. height: 100%;
  26994. top: 0px;
  26995. left: 0px;
  26996. box-sizing: border-box;
  26997. }
  26998. .chapter_upload_o {
  26999. width: 100%;
  27000. height: 100%;
  27001. position: relative;
  27002. z-index: 1;
  27003. }
  27004. .chapter_upload_ic {
  27005. margin: 0 15px 0px auto;
  27006. display: flex;
  27007. align-items: center;
  27008. }
  27009. .chapter_upload_type{
  27010. width: 80px;
  27011. min-width: 80px;
  27012. text-align: center;
  27013. font-size: 14px;
  27014. }
  27015. .chapter_upload_box_file{
  27016. height: calc(100% - 45px);
  27017. overflow: auto;
  27018. border-top: 1px solid #e7ebf1;
  27019. box-sizing: border-box;
  27020. }
  27021. .chapter_upload_ic_l {
  27022. width: 50px;
  27023. height: 50px;
  27024. float: left;
  27025. }
  27026. .chapter_upload_ic_l div {
  27027. width: 30px;
  27028. height: 35px;
  27029. background: url("../../../assets/icon/icon.png");
  27030. }
  27031. .chapter_upload_ic_edit {
  27032. height: 100%;
  27033. display: flex;
  27034. align-items: center;
  27035. cursor: pointer;
  27036. margin: 0 10px 0 0;
  27037. }
  27038. .chapter_upload_ic_edit div {
  27039. width: 18px;
  27040. height: 18px;
  27041. background-image: url("../../../assets/icon/new/edit_u.png");
  27042. background-size: 100% 100%;
  27043. }
  27044. .chapter_upload_ic_download {
  27045. height: 100%;
  27046. display: flex;
  27047. align-items: center;
  27048. cursor: pointer;
  27049. margin: 0;
  27050. }
  27051. .chapter_upload_ic_download div {
  27052. width: 18px;
  27053. height: 18px;
  27054. background-image: url("../../../assets/icon/course/download.svg");
  27055. background-size: 100% 100%;
  27056. }
  27057. .chapter_upload_ic_check {
  27058. height: 100%;
  27059. display: flex;
  27060. align-items: center;
  27061. cursor: pointer;
  27062. margin: 0 10px 0 0;
  27063. }
  27064. .chapter_upload_ic_check div {
  27065. width: 18px;
  27066. height: 18px;
  27067. background-image: url("../../../assets/icon/course/lookeye.svg");
  27068. background-size: 100% 100%;
  27069. }
  27070. .chapter_upload_ic_r {
  27071. height: 100%;
  27072. display: flex;
  27073. align-items: center;
  27074. cursor: pointer;
  27075. }
  27076. .chapter_upload_ic_r div {
  27077. width: 18px;
  27078. height: 18px;
  27079. background-image: url("../../../assets/icon/new/delete_u.png");
  27080. background-size: 100% 100%;
  27081. }
  27082. .chapter_upload_n {
  27083. display: flex;
  27084. text-indent: 10px;
  27085. text-decoration: none;
  27086. text-overflow: ellipsis;
  27087. white-space: nowrap;
  27088. overflow: hidden;
  27089. width: 55%;
  27090. margin-left: 10px;
  27091. cursor: pointer;
  27092. margin-top: 2px;
  27093. align-items: center;
  27094. }
  27095. .chapter_upload_n > .chapter_upload_box{
  27096. border: none;
  27097. outline: none;
  27098. max-width: 100%;
  27099. z-index: 99;
  27100. font-size: 14px;
  27101. white-space: nowrap;
  27102. overflow: hidden;
  27103. text-overflow: ellipsis;
  27104. color: #757575;
  27105. }
  27106. .chapter_upload_l_i2,
  27107. .chapter_upload_l_i3,
  27108. .chapter_upload_l_i8,
  27109. .chapter_upload_l_i6,
  27110. .chapter_upload_l_i12,
  27111. .chapter_upload_l_i14,
  27112. .chapter_upload_l_i15 {
  27113. width: 15px;
  27114. height: 15px;
  27115. background-size: 100% 100%;
  27116. }
  27117. .chapter_upload_l_i2 {
  27118. background-image: url("../../../assets/icon/new/u_word.png");
  27119. }
  27120. .chapter_upload_l_i3 {
  27121. background-image: url("../../../assets/icon/new/u_video.png");
  27122. }
  27123. .chapter_upload_l_i8 {
  27124. background-image: url("../../../assets/icon/new/u_url.png");
  27125. }
  27126. .chapter_upload_l_i14 {
  27127. background-image: url("../../../assets/icon/new/u_source.png");
  27128. }
  27129. .chapter_upload_l_i15 {
  27130. background-image: url("../../../assets/icon/new/appStore.png");
  27131. }
  27132. .chapter_upload_l_i6 {
  27133. background-image: url("../../../assets/icon/new/u_picture.png");
  27134. }
  27135. .chapter_upload_l_i12 {
  27136. background-image: url("../../../assets/icon/new/u_word.png");
  27137. }
  27138. .chapter_upload_l_i13 {
  27139. background-image: url("../../../assets/icon/new/u_img.png");
  27140. }
  27141. .chapter_upload_noSee {
  27142. background-image: url("../../../assets/icon/new/u_noUpload.png");
  27143. width: 18px;
  27144. height: 18px;
  27145. background-size: 100% 100%;
  27146. display: block;
  27147. margin-right: 10px;
  27148. }
  27149. .chapter_upload_ud {
  27150. display: flex;
  27151. flex-direction: row;
  27152. justify-content: center;
  27153. margin: 0 10px 0 0;
  27154. }
  27155. .chapter_upload_ud>.chapter_upload_up {
  27156. margin-bottom: 0;
  27157. margin-right: 10px;
  27158. }
  27159. .chapter_upload_down,
  27160. .chapter_upload_up {
  27161. width: 20px;
  27162. height: 20px;
  27163. background: #e4eaf2;
  27164. cursor: pointer;
  27165. margin: 0 auto;
  27166. border-radius: 5px;
  27167. display: flex;
  27168. justify-content: center;
  27169. align-items: center;
  27170. }
  27171. .chapter_upload_up::after,
  27172. .chapter_upload_down::after {
  27173. content: "";
  27174. background-image: url("../../../assets/icon/new/downBtn.png");
  27175. width: 13px;
  27176. height: 13px;
  27177. background-size: 100% 100%;
  27178. display: block;
  27179. }
  27180. .chapter_upload_up::after {
  27181. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  27182. }
  27183. .chapter_upload_up {
  27184. margin-bottom: 5px;
  27185. }
  27186. .chapter_upload_ud2 {
  27187. display: flex;
  27188. flex-direction: row;
  27189. justify-content: center;
  27190. margin: 0 10px 0 0;
  27191. }
  27192. .chapter_upload_ud2>.chapter_upload_up2 {
  27193. margin-bottom: 0;
  27194. margin-right: 10px;
  27195. }
  27196. .chapter_upload_down2,
  27197. .chapter_upload_up2 {
  27198. cursor: pointer;
  27199. margin: 0 auto;
  27200. border-radius: 5px;
  27201. display: flex;
  27202. justify-content: center;
  27203. align-items: center;
  27204. color: #717c8d;
  27205. font-size: 14px;
  27206. }
  27207. .chapter_upload_up2 {
  27208. margin-right: 10px;
  27209. }
  27210. .chapter_upload_up2::before,
  27211. .chapter_upload_down2::before {
  27212. content: "";
  27213. background-image: url("../../../assets/icon/new/c_down.png");
  27214. width: 14px;
  27215. height: 14px;
  27216. background-size: 100% 100%;
  27217. display: block;
  27218. margin-right: 5px;
  27219. }
  27220. .chapter_upload_up2::before {
  27221. background-image: url("../../../assets/icon/new/c_up.png") !important;
  27222. }
  27223. .addWordStyle {
  27224. display: flex;
  27225. flex-direction: row;
  27226. justify-content: flex-start;
  27227. overflow-x: auto;
  27228. white-space: nowrap;
  27229. flex-wrap: wrap;
  27230. }
  27231. /* table 样式 */
  27232. .cont>>>table {
  27233. border-top: 1px solid #ccc;
  27234. border-left: 1px solid #ccc;
  27235. }
  27236. .cont>>>table td,
  27237. .cont>>>table th {
  27238. border-bottom: 1px solid #ccc;
  27239. border-right: 1px solid #ccc;
  27240. /* padding: 20px 5px; */
  27241. padding: 5px 10px;
  27242. max-width: 0px;
  27243. height: 30px;
  27244. vertical-align: baseline;
  27245. }
  27246. .cont>>>table th {
  27247. border-bottom: 2px solid #ccc;
  27248. text-align: center;
  27249. }
  27250. /* blockquote 样式 */
  27251. .cont>>>blockquote {
  27252. display: block;
  27253. border-left: 8px solid #d0e5f2;
  27254. padding: 5px 10px;
  27255. margin: 10px 0;
  27256. line-height: 1.4;
  27257. font-size: 100%;
  27258. background-color: #f1f1f1;
  27259. }
  27260. /* code 样式 */
  27261. .cont>>>code {
  27262. display: inline-block;
  27263. /* *display: inline; */
  27264. zoom: 1;
  27265. background-color: #f1f1f1;
  27266. border-radius: 3px;
  27267. padding: 3px 5px;
  27268. margin: 0 3px;
  27269. }
  27270. .cont>>>pre code {
  27271. display: block;
  27272. }
  27273. /* ul ol 样式 */
  27274. .cont>>>ul,
  27275. ol {
  27276. margin: 10px 0 10px 20px;
  27277. }
  27278. .wordbox {
  27279. display: flex;
  27280. flex-wrap: wrap;
  27281. cursor: pointer;
  27282. width: 100%;
  27283. }
  27284. .checkword {
  27285. width: 22px;
  27286. height: 22px;
  27287. margin: 10px auto 0;
  27288. cursor: pointer;
  27289. }
  27290. .checkword img {
  27291. width: 100%;
  27292. }
  27293. .stepBg {
  27294. display: flex;
  27295. justify-content: space-between;
  27296. align-items: center;
  27297. background: #fff;
  27298. width: calc(100%);
  27299. margin: 0 auto;
  27300. }
  27301. .stepBorder {
  27302. height: 3px !important;
  27303. background: #cad1dc;
  27304. width: 100px !important;
  27305. margin: 0 15px !important;
  27306. position: relative;
  27307. }
  27308. .border-active {
  27309. background: #3681fc !important;
  27310. }
  27311. .border-active::before,
  27312. .border-active::after {
  27313. border-color: #3681fc !important;
  27314. }
  27315. .stepBorder::before,
  27316. .stepBorder::after {
  27317. content: "";
  27318. width: 9px;
  27319. height: 9px;
  27320. background: #ffffff;
  27321. opacity: 1;
  27322. border: 2px solid #acb4bf;
  27323. display: block;
  27324. box-sizing: border-box;
  27325. border-radius: 50%;
  27326. position: absolute;
  27327. top: 50%;
  27328. transform: translateY(-50%);
  27329. }
  27330. .stepBorder::after {
  27331. right: -9px;
  27332. }
  27333. .stepTop {
  27334. width: 100%;
  27335. /* border-radius: 10px; */
  27336. display: flex;
  27337. justify-content: center;
  27338. align-items: center;
  27339. flex-wrap: nowrap;
  27340. background: #fff;
  27341. /* top: 18%; */
  27342. height: 80px;
  27343. border-bottom: 2px solid rgb(228, 232, 237);
  27344. box-sizing: border-box;
  27345. }
  27346. .stepTop2 {
  27347. width: 100%;
  27348. /* border-radius: 10px; */
  27349. display: flex;
  27350. justify-content: center;
  27351. align-items: center;
  27352. flex-wrap: nowrap;
  27353. background: #fff;
  27354. /* top: 18%; */
  27355. height: 20px;
  27356. border-bottom: 2px solid rgb(228, 232, 237);
  27357. box-sizing: border-box;
  27358. overflow: hidden;
  27359. cursor: pointer;
  27360. }
  27361. .stepTop>div img {
  27362. width: 100%;
  27363. }
  27364. .stepTop>div {
  27365. height: 50px;
  27366. width: 180px;
  27367. cursor: pointer;
  27368. margin: 10px 0;
  27369. border-radius: 10px;
  27370. }
  27371. .first,
  27372. .second,
  27373. .third,
  27374. .four {
  27375. background: #3681fc;
  27376. height: 90px;
  27377. color: #fff;
  27378. display: flex;
  27379. flex-direction: row;
  27380. align-items: center;
  27381. justify-content: center;
  27382. }
  27383. .first>div:nth-child(1),
  27384. .second>div:nth-child(1),
  27385. .third>div:nth-child(1),
  27386. .four>div:nth-child(1) {
  27387. margin: 5px 10px 0 0;
  27388. width: 2rem;
  27389. }
  27390. .firstNo,
  27391. .secondNo,
  27392. .thirdNo,
  27393. .fourNo {
  27394. background: #e7e7e7;
  27395. color: #adadad;
  27396. display: flex;
  27397. flex-direction: row;
  27398. align-items: center;
  27399. justify-content: center;
  27400. }
  27401. .firstNo>div:nth-child(1),
  27402. .secondNo>div:nth-child(1),
  27403. .thirdNo>div:nth-child(1),
  27404. .fourNo>div:nth-child(1) {
  27405. margin: 5px 10px 0 0;
  27406. width: 2rem;
  27407. }
  27408. .uploadWidth>>>.el-upload {
  27409. width: 60px;
  27410. height: 60px;
  27411. position: relative;
  27412. }
  27413. .addPeople {
  27414. background: #fa6060;
  27415. width: 150px;
  27416. height: 40px;
  27417. color: #fff;
  27418. border-radius: 5px;
  27419. text-align: center;
  27420. line-height: 40px;
  27421. font-size: 14px;
  27422. cursor: pointer;
  27423. }
  27424. .kcImg {
  27425. width: 60px;
  27426. margin-left: 10px;
  27427. }
  27428. .zyImg {
  27429. width: 55px;
  27430. margin: 0 10px;
  27431. }
  27432. .deleteZy {
  27433. width: 20px;
  27434. position: absolute;
  27435. top: 5px;
  27436. right: 5px;
  27437. cursor: pointer;
  27438. }
  27439. .kcImg>img,
  27440. .zyImg>img,
  27441. .deleteZy>img {
  27442. width: 100%;
  27443. height: 100%;
  27444. }
  27445. .zyBox {
  27446. display: flex;
  27447. flex-direction: row;
  27448. align-items: center;
  27449. background: #67d37d;
  27450. color: #fff;
  27451. width: 210px;
  27452. margin: 20px 20px 0 0;
  27453. border-radius: 10px;
  27454. height: 70px;
  27455. position: relative;
  27456. }
  27457. .upCss {
  27458. display: flex;
  27459. flex-direction: row;
  27460. justify-content: flex-start;
  27461. }
  27462. .upCss>>>.el-icon-plus {
  27463. position: none !important;
  27464. width: 200px;
  27465. height: 100px;
  27466. display: flex;
  27467. flex-wrap: nowrap;
  27468. flex-direction: column;
  27469. align-items: center;
  27470. justify-content: center;
  27471. border: 1px dashed #ccc;
  27472. min-width: 78px;
  27473. min-height: 100px;
  27474. z-index: 999;
  27475. }
  27476. .upCss>>>.el-upload-list__item-name {
  27477. width: 100px;
  27478. white-space: nowrap;
  27479. overflow: hidden;
  27480. text-overflow: ellipsis;
  27481. }
  27482. .upCss>>>.el-upload-list__item .el-icon-close {
  27483. font-size: 20px;
  27484. z-index: 9999;
  27485. }
  27486. .addStageImg {
  27487. min-width: 20px;
  27488. min-height: 20px;
  27489. width: 20px;
  27490. height: 20px;
  27491. cursor: pointer;
  27492. }
  27493. .addHW {
  27494. width: 28px;
  27495. height: 28px;
  27496. cursor: pointer;
  27497. }
  27498. .addStageImg>img,
  27499. .addHW>img {
  27500. width: 100%;
  27501. height: 100%;
  27502. }
  27503. .addNewPP>>>.el-dialog__body {
  27504. padding: 5px 20px;
  27505. }
  27506. .addNewPP>>>.el-dialog {
  27507. margin-top: 5vh !important;
  27508. }
  27509. .addNewPP2>>>.el-dialog__body {
  27510. padding: 5px 0;
  27511. }
  27512. .addNewPP2>>>.el-dialog {
  27513. margin-top: 5vh !important;
  27514. }
  27515. .isHeight {
  27516. height: 680px;
  27517. }
  27518. .toolChoose {
  27519. display: flex;
  27520. /* width: 100%; */
  27521. flex-direction: row;
  27522. flex-wrap: wrap;
  27523. }
  27524. .tool,
  27525. .isToolChoose {
  27526. display: flex;
  27527. flex-direction: column;
  27528. flex-wrap: nowrap;
  27529. width: fit-content;
  27530. margin: 10px 0 10px 0;
  27531. align-items: center;
  27532. border: 2px solid #dbdbdb00;
  27533. padding: 10px 20px;
  27534. border-radius: 5px;
  27535. cursor: pointer;
  27536. /* box-shadow: 0 0 2px 0px #dedede; */
  27537. position: relative;
  27538. box-sizing: border-box;
  27539. }
  27540. .tool:hover {
  27541. border: 2px solid #a5c7ff;
  27542. }
  27543. .tool:hover>.noCTool {
  27544. display: block;
  27545. opacity: 0.5;
  27546. }
  27547. .isToolChoose {
  27548. border: 2px solid #438aff !important;
  27549. box-shadow: 0 0 2px 0px #438aff;
  27550. opacity: 1 !important;
  27551. }
  27552. .isCTool,
  27553. .noCTool {
  27554. width: 30px;
  27555. height: 30px;
  27556. position: absolute;
  27557. top: -4px;
  27558. right: -4px;
  27559. }
  27560. .noCTool {
  27561. display: none;
  27562. }
  27563. .isCTool>img,
  27564. .noCTool>img {
  27565. width: 100%;
  27566. height: 100%;
  27567. }
  27568. .tool+.tool {
  27569. margin-right: 10px;
  27570. }
  27571. .whiteBIcon {
  27572. width: 60px;
  27573. cursor: pointer;
  27574. display: flex;
  27575. flex-direction: column;
  27576. flex-wrap: nowrap;
  27577. align-items: center;
  27578. font-size: 14px;
  27579. }
  27580. .whiteBIcon>img,
  27581. .toolIcon>img,
  27582. .arrow>img {
  27583. width: 100%;
  27584. height: 100%;
  27585. }
  27586. .check img {
  27587. width: 20px;
  27588. height: 20px;
  27589. }
  27590. .whiteBIcon>img {
  27591. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27592. border-radius: 15px;
  27593. }
  27594. .whiteBIcon>div:nth-child(2) {
  27595. height: 20px;
  27596. line-height: 20px;
  27597. text-align: center;
  27598. }
  27599. .check {
  27600. /* width: 20px;
  27601. height: 20px; */
  27602. cursor: pointer;
  27603. margin: 10px 0 0;
  27604. }
  27605. .checkDiv {
  27606. display: flex;
  27607. align-items: center;
  27608. }
  27609. .checkDiv span {
  27610. margin-left: 5px;
  27611. color: #858585;
  27612. }
  27613. .customWidth>>>.el-dialog {
  27614. min-width: 600px !important;
  27615. }
  27616. .CollaborativeCss {
  27617. width: 100%;
  27618. display: flex;
  27619. justify-content: center;
  27620. align-items: center;
  27621. box-sizing: border-box;
  27622. padding: 10px 0;
  27623. cursor: pointer;
  27624. }
  27625. .CollaborativeCss >>> .el-tooltip {
  27626. overflow: hidden;
  27627. white-space: nowrap;
  27628. text-overflow: ellipsis;
  27629. }
  27630. .CollaborativeCss2 {
  27631. background: #e0eafb;
  27632. color: #3681fc;
  27633. font-weight: 700;
  27634. border-radius: 5px;
  27635. }
  27636. .a_addBox {
  27637. margin: 10px 0;
  27638. background: #fff;
  27639. padding: 15px;
  27640. /* max-height: 600px; */
  27641. overflow: auto;
  27642. }
  27643. .a_add_box {
  27644. border-bottom: 2px solid #eee;
  27645. padding-bottom: 25px;
  27646. }
  27647. .a_add_head {
  27648. display: flex;
  27649. align-items: center;
  27650. justify-content: space-between;
  27651. margin: 10px 0 0 0;
  27652. font-size: 18px;
  27653. }
  27654. .a_add_checkType {
  27655. margin-top: 10px;
  27656. display: flex;
  27657. font-size: 14px;
  27658. align-items: center;
  27659. }
  27660. .a_add_checkType span {
  27661. box-sizing: border-box;
  27662. padding: 0 0 5px 0;
  27663. cursor: pointer;
  27664. }
  27665. .a_add_checkType span+span {
  27666. margin-left: 10px;
  27667. }
  27668. .a_add_checkType .active {
  27669. border-bottom: 2px solid #409eff;
  27670. color: #409eff;
  27671. }
  27672. .a_add_head .a_add_head_input {
  27673. /* width: 540px; */
  27674. width: 100%;
  27675. }
  27676. .a_add_head .a_add_head_div {
  27677. display: flex;
  27678. align-items: center;
  27679. justify-content: space-between;
  27680. }
  27681. .a_add_body {
  27682. display: flex;
  27683. /* align-items: center; */
  27684. align-items: flex-end;
  27685. }
  27686. .a_add_input {
  27687. display: flex;
  27688. align-items: center;
  27689. flex-wrap: wrap;
  27690. }
  27691. .a_add_input_choice {
  27692. flex-direction: column;
  27693. margin-right: 10px;
  27694. }
  27695. .a_add_input_choice>>>.el-radio {
  27696. display: flex;
  27697. align-items: center;
  27698. flex-direction: row-reverse;
  27699. margin: 30px 0 0 0;
  27700. position: relative;
  27701. }
  27702. .a_add_input_choice>>>.el-checkbox {
  27703. display: flex;
  27704. align-items: center;
  27705. flex-direction: row-reverse;
  27706. margin: 30px 0 0 0;
  27707. position: relative;
  27708. }
  27709. .width100 {
  27710. width: 100%;
  27711. }
  27712. .a_add_input .a_add_persent {
  27713. width: 100%;
  27714. }
  27715. .a_add_persent_div {
  27716. width: 100%;
  27717. display: flex;
  27718. align-items: center;
  27719. }
  27720. .a_add_persent_div span {
  27721. margin: 5px 0;
  27722. }
  27723. .a_add_persent_div span:nth-child(1) {
  27724. width: 30%;
  27725. }
  27726. .a_add_persent_div span:nth-child(2) {
  27727. width: 7%;
  27728. }
  27729. .a_add_persent_div span:nth-child(3) {
  27730. width: 40%;
  27731. }
  27732. .a_add_body_div {
  27733. display: flex;
  27734. align-items: center;
  27735. justify-content: center;
  27736. /* flex-direction: column; */
  27737. position: absolute;
  27738. right: -20px;
  27739. transform: translateX(100%);
  27740. }
  27741. .a_add_body_div>>>.el-button--primary {
  27742. background: #466b99;
  27743. border: none;
  27744. }
  27745. .all_choose {
  27746. display: flex;
  27747. flex-direction: row;
  27748. align-items: flex-start;
  27749. width: 100%;
  27750. }
  27751. .all_choose+.all_choose {
  27752. /* margin-top: 10px */
  27753. }
  27754. .all_choose>span {
  27755. min-width: fit-content;
  27756. display: block;
  27757. white-space: nowrap;
  27758. overflow: hidden;
  27759. text-overflow: ellipsis;
  27760. margin-right: 20px;
  27761. font-weight: bold;
  27762. font-size: 14px;
  27763. }
  27764. .all_choose>>>.el-checkbox-group {
  27765. display: flex;
  27766. flex-direction: row;
  27767. width: 100%;
  27768. flex-wrap: wrap;
  27769. align-content: center;
  27770. justify-content: flex-start;
  27771. align-items: center;
  27772. margin-top: 3px;
  27773. }
  27774. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27775. margin-bottom: 10px;
  27776. display: flex;
  27777. flex-direction: row;
  27778. align-items: center;
  27779. margin-right: 10px;
  27780. }
  27781. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27782. min-width: 80px;
  27783. overflow: hidden;
  27784. width: 80px;
  27785. text-overflow: ellipsis;
  27786. white-space: nowrap;
  27787. }
  27788. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27789. width: auto;
  27790. }
  27791. .choose>div:nth-child(3)>span {
  27792. /* letter-spacing: 0 !important; */
  27793. }
  27794. .choose {
  27795. display: flex;
  27796. flex-direction: column;
  27797. flex-wrap: nowrap;
  27798. height: 100%;
  27799. justify-content: space-evenly;
  27800. align-items: flex-start;
  27801. }
  27802. .both {
  27803. display: flex;
  27804. flex-direction: row;
  27805. flex-wrap: wrap;
  27806. width: 100%;
  27807. align-items: center;
  27808. justify-content: flex-start;
  27809. margin: 0 0 15px;
  27810. }
  27811. .notice>>>.el-dialog {
  27812. width: 500px !important;
  27813. text-align: center;
  27814. }
  27815. .notice>>>.el-button {
  27816. margin-top: 20px;
  27817. }
  27818. .whiteBg {
  27819. /* background: #fff; */
  27820. border-radius: 10px;
  27821. }
  27822. .wb_j_box {
  27823. display: flex;
  27824. width: 100%;
  27825. padding: 0 20px 0;
  27826. box-sizing: border-box;
  27827. }
  27828. .wb_j_box_content {
  27829. width: calc(100% - 55% - 100px);
  27830. display: flex;
  27831. align-items: center;
  27832. }
  27833. .wb_j_box_p_box {
  27834. max-width: calc(100% - 200px);
  27835. word-break: break-all;
  27836. overflow: hidden;
  27837. margin: 0 0 0 10px;
  27838. font-size: 14px;
  27839. color: #6e6e6e;
  27840. z-index: 999;
  27841. }
  27842. .chooseWho {
  27843. display: flex;
  27844. gap:15px;
  27845. /* width: 410px; */
  27846. flex-direction: row;
  27847. flex-wrap: nowrap;
  27848. justify-content: space-between;
  27849. padding-bottom: 10px;
  27850. }
  27851. .chooseWho>div {
  27852. cursor: pointer;
  27853. padding-bottom: 10px;
  27854. font-weight: bold;
  27855. }
  27856. .isChooseActive {
  27857. color: #3e88f4;
  27858. border-bottom: 2px solid #2f80f3;
  27859. }
  27860. .toolSort {
  27861. display: flex;
  27862. flex-direction: row;
  27863. flex-wrap: wrap;
  27864. justify-content: flex-start;
  27865. align-items: flex-start;
  27866. }
  27867. .toolSort>div {
  27868. margin-right: 10px;
  27869. }
  27870. .tools {
  27871. width: 100%;
  27872. display: flex;
  27873. flex-direction: column;
  27874. flex-wrap: nowrap;
  27875. align-items: flex-start;
  27876. }
  27877. .leftTools,
  27878. .rightTools {
  27879. width: 50%;
  27880. }
  27881. .leftTools+.leftTools {
  27882. border-top: 1px solid #dbdbdb;
  27883. padding-top: 30px;
  27884. }
  27885. .rightTools {
  27886. display: flex;
  27887. flex-direction: row;
  27888. flex-wrap: nowrap;
  27889. justify-content: space-around;
  27890. }
  27891. .firstToolList {
  27892. display: flex;
  27893. flex-direction: column;
  27894. flex-wrap: nowrap;
  27895. align-items: center;
  27896. }
  27897. .iconList {
  27898. display: flex;
  27899. flex-direction: row;
  27900. flex-wrap: wrap;
  27901. justify-content: flex-start;
  27902. align-items: center;
  27903. margin: 20px 0 5px 0;
  27904. width: 240px;
  27905. min-width: 240px;
  27906. }
  27907. .iconTool {
  27908. display: flex;
  27909. flex-direction: column;
  27910. flex-wrap: nowrap;
  27911. align-items: center;
  27912. justify-content: flex-start;
  27913. margin: 15px 10px;
  27914. }
  27915. .toolIcon {
  27916. width: 50px;
  27917. }
  27918. .taskBorder {
  27919. /* border: 1px solid #CAD1DC; */
  27920. border-radius: 10px;
  27921. margin-top: 10px;
  27922. min-height: 670px;
  27923. position: relative;
  27924. background: #fff;
  27925. padding: 20px;
  27926. overflow: hidden;
  27927. box-sizing: border-box;
  27928. }
  27929. .smallTaskBorder {
  27930. height: 405px;
  27931. min-height: 405px !important;
  27932. overflow: hidden;
  27933. }
  27934. /* .taskBorder>div {
  27935. padding: 30px 30px 10px;
  27936. } */
  27937. .addTaskBorder {
  27938. /* border: 2px solid #5E9AFC; */
  27939. border-radius: 8px;
  27940. margin-top: 10px;
  27941. cursor: pointer;
  27942. /* height: 50px;
  27943. line-height: 50px; */
  27944. background: #fff;
  27945. padding: 15px 0;
  27946. display: flex;
  27947. align-items: center;
  27948. justify-content: center;
  27949. }
  27950. /* .addTaskBorder>div {
  27951. margin: 0 auto;
  27952. display: flex;
  27953. align-items: center;
  27954. justify-content: center;
  27955. }
  27956. .addTaskBorder>div>img {
  27957. width: 20px;
  27958. }
  27959. .addTaskBorder>div>span {
  27960. font-size: 16px;
  27961. margin-left: 10px;
  27962. color: #5E9AFC;
  27963. } */
  27964. .funBlock {
  27965. display: flex;
  27966. padding: 15px 0;
  27967. flex-direction: row;
  27968. justify-content: center;
  27969. align-items: center;
  27970. position: absolute;
  27971. right: 0;
  27972. bottom: 0;
  27973. background: #fff;
  27974. width: 100%;
  27975. height: 60px;
  27976. z-index: 9;
  27977. }
  27978. .fold {
  27979. display: flex;
  27980. margin: 0 20px;
  27981. flex-direction: row;
  27982. align-items: center;
  27983. cursor: pointer;
  27984. color: #2b7bff;
  27985. }
  27986. .arrow {
  27987. margin-right: 8px;
  27988. width: 16px;
  27989. height: 16px;
  27990. min-width: 16px;
  27991. min-height: 16px;
  27992. background-size: 100% 100%;
  27993. display: block;
  27994. background-image: url(../../../assets/icon/new/u_up.png);
  27995. /* border-left: 7px solid transparent;
  27996. border-bottom: 7px solid #717C8D;
  27997. border-top: 0px solid transparent;
  27998. border-right: 7px solid transparent; */
  27999. /* box-sizing: border-box; */
  28000. transition: all 0.3s;
  28001. }
  28002. .arrowZ {
  28003. transform: rotate(180deg);
  28004. }
  28005. .addToolFun {
  28006. display: flex;
  28007. width: 150px;
  28008. flex-direction: row;
  28009. align-items: center;
  28010. justify-content: center;
  28011. border: 2px dashed #cad1dc;
  28012. border-radius: 5px;
  28013. height: 50px;
  28014. margin: 35px auto 0;
  28015. cursor: pointer;
  28016. }
  28017. .addToolFun2 {
  28018. display: flex;
  28019. width: 150px;
  28020. border: 2px dashed #cad1dc;
  28021. flex-direction: row;
  28022. align-items: center;
  28023. justify-content: center;
  28024. border-radius: 5px;
  28025. height: 50px;
  28026. margin: 0 auto 0;
  28027. cursor: pointer;
  28028. }
  28029. .addToolFun2>div,
  28030. .addToolFun>div {
  28031. display: flex;
  28032. line-height: 50px;
  28033. }
  28034. .addToolImg {
  28035. width: 20px;
  28036. height: 20px;
  28037. margin-right: 10px;
  28038. }
  28039. .addToolsDia>>>.el-dialog__body {
  28040. padding: 20px;
  28041. }
  28042. .addToolsDia>>>.el-dialog__body>.toolChoose {
  28043. padding: 0;
  28044. }
  28045. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  28046. padding: 0;
  28047. border-bottom: none;
  28048. margin-bottom: 0;
  28049. }
  28050. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  28051. width: 100%;
  28052. }
  28053. .lineCss>>>.el-form-item__label {
  28054. width: auto !important;
  28055. }
  28056. .lineCss>>>.el-form-item__content {
  28057. margin-left: 50px !important;
  28058. }
  28059. .newSteps {
  28060. display: flex;
  28061. width: 100% !important;
  28062. /* height: 80px; */
  28063. cursor: pointer;
  28064. margin: 10px 0;
  28065. border-radius: 10px;
  28066. flex-direction: row;
  28067. align-content: center;
  28068. justify-content: center;
  28069. align-items: center;
  28070. margin: 0 !important;
  28071. }
  28072. /* 评价样式 */
  28073. .elist_css {
  28074. padding-bottom: 75px !important;
  28075. }
  28076. .elist_title {
  28077. margin-bottom: 10px;
  28078. }
  28079. .elist_input {
  28080. width: 100%;
  28081. }
  28082. .elist_input_box {
  28083. display: flex;
  28084. align-items: center;
  28085. flex-wrap: wrap;
  28086. }
  28087. .elist_input_box+.elist_input_box {
  28088. margin-top: 30px;
  28089. }
  28090. .elist_input .elist_input_box input {
  28091. font: inherit;
  28092. color: currentColor;
  28093. width: 100%;
  28094. /* max-width: calc(100% - 385px); */
  28095. max-width: calc(100% - 150px);
  28096. padding: 8px 14px;
  28097. display: block;
  28098. min-width: 0;
  28099. outline: none;
  28100. border: 1px solid rgba(0, 0, 0, 0.23);
  28101. border-radius: 4px;
  28102. box-sizing: border-box;
  28103. background: #fff;
  28104. margin: 0 20px 0 0;
  28105. }
  28106. .elist_input .elist_input_box span {
  28107. height: 36px;
  28108. line-height: 36px;
  28109. color: rgb(82, 82, 82);
  28110. min-width: 80px;
  28111. }
  28112. .elist_input .elist_input_box .remove {
  28113. height: 20px;
  28114. width: 20px;
  28115. min-height: 20px;
  28116. min-width: 20px;
  28117. background-size: 100% 100%;
  28118. background-position: unset;
  28119. margin-left: 5px;
  28120. }
  28121. .elist_input_box>>>.el-rate {
  28122. display: flex;
  28123. height: 36px;
  28124. align-items: center;
  28125. }
  28126. .elist_input_box .elist_inptu_text {
  28127. width: 100%;
  28128. display: flex;
  28129. align-items: center;
  28130. margin-top: 10px;
  28131. }
  28132. .elist_input_box .elist_inptu_text input {
  28133. /* width: 500px; */
  28134. width: 100%;
  28135. max-width: unset;
  28136. }
  28137. .elist_input_box>>>.el-rate__icon {
  28138. font-size: 24px;
  28139. }
  28140. .elist_btn {
  28141. margin-top: 10px;
  28142. }
  28143. .lineTitle {
  28144. /* margin-top: 15px; */
  28145. /* width: 160px; */
  28146. font-size: 16px;
  28147. display: flex;
  28148. align-items: center;
  28149. line-height: 20px;
  28150. }
  28151. .lineTitle::before {
  28152. content: "";
  28153. display: block;
  28154. width: 3px;
  28155. height: 20px;
  28156. background: #0061ff;
  28157. border-radius: 3px;
  28158. margin: 0 5px 0 0;
  28159. }
  28160. .clineTitle::before {
  28161. content: "";
  28162. display: block;
  28163. min-width: 10px;
  28164. width: 10px;
  28165. height: 10px;
  28166. background: #0061ff;
  28167. border-radius: 50%;
  28168. margin: 0 5px 0 0;
  28169. }
  28170. .courseTop {
  28171. display: flex;
  28172. flex-direction: row;
  28173. justify-content: space-between;
  28174. align-items: center;
  28175. width: calc(100%);
  28176. margin: 0 auto;
  28177. padding: 10px 20px;
  28178. box-sizing: border-box;
  28179. position: absolute;
  28180. top: 0;
  28181. }
  28182. .stepsNav {
  28183. display: flex;
  28184. flex-direction: row;
  28185. justify-content: flex-start;
  28186. align-items: center;
  28187. }
  28188. .stepsWord {
  28189. font-size: 18px;
  28190. color: #fff;
  28191. font-weight: bold;
  28192. margin-left: auto;
  28193. background: rgb(15, 126, 255);
  28194. border-radius: 5px;
  28195. padding: 3px 25px;
  28196. box-sizing: border-box;
  28197. }
  28198. .stepBox {
  28199. width: calc(100% - 40px);
  28200. height: calc(100%);
  28201. overflow: hidden;
  28202. border-radius: 5px;
  28203. margin: 0 auto;
  28204. }
  28205. .rightBox {
  28206. width: calc(100%);
  28207. background: #f0f2f5;
  28208. /* border-radius: 10px; */
  28209. overflow: auto;
  28210. height: calc(100% - 150px);
  28211. margin: 0 auto;
  28212. position: relative;
  28213. box-sizing: border-box;
  28214. }
  28215. .e_add_top {
  28216. display: flex;
  28217. justify-content: space-between;
  28218. background: #fff;
  28219. position: absolute;
  28220. right: 20px;
  28221. height: 50px;
  28222. align-items: center;
  28223. }
  28224. .e_add_title2 {
  28225. display: flex;
  28226. align-items: center;
  28227. }
  28228. .e_add_title2 span {
  28229. width: 40px;
  28230. }
  28231. .e_add_title {
  28232. display: flex;
  28233. align-items: center;
  28234. color: #b8b8b8;
  28235. font-size: 18px;
  28236. position: relative;
  28237. height: 40px;
  28238. }
  28239. .e_add_title span {
  28240. margin-right: 10px;
  28241. }
  28242. .e_add_title .el_input {
  28243. width: 300px;
  28244. }
  28245. .e_add_title>>>.el-input__inner {
  28246. width: 400px;
  28247. }
  28248. .e_add_btn {}
  28249. .e_add_content {
  28250. display: flex;
  28251. width: 100%;
  28252. }
  28253. .e_add_list {
  28254. background: #fff;
  28255. height: 500px;
  28256. width: 210px;
  28257. position: relative;
  28258. margin: 15px 5px 0 0;
  28259. flex-shrink: 0;
  28260. display: flex;
  28261. flex-direction: column;
  28262. }
  28263. .e_add_list_title {
  28264. font-size: 20px;
  28265. width: 100%;
  28266. box-sizing: border-box;
  28267. padding: 15px 40px;
  28268. text-align: center;
  28269. border-bottom: 1px solid #eaeaea;
  28270. position: relative;
  28271. display: flex;
  28272. align-items: center;
  28273. justify-content: center;
  28274. height: 57px;
  28275. background: #f6f6f6;
  28276. }
  28277. .e_add_list_title span {
  28278. overflow: hidden;
  28279. white-space: nowrap;
  28280. text-overflow: ellipsis;
  28281. }
  28282. .e_add_list_title img {
  28283. position: absolute;
  28284. right: 15px;
  28285. width: 25px;
  28286. cursor: pointer;
  28287. top: 50%;
  28288. transform: translateY(-50%);
  28289. }
  28290. .e_add_list_body {
  28291. height: calc(100% - 187px);
  28292. overflow: auto;
  28293. }
  28294. .e_add_list_child {
  28295. width: 100%;
  28296. display: flex;
  28297. align-items: center;
  28298. justify-content: center;
  28299. position: relative;
  28300. box-sizing: border-box;
  28301. padding: 15px 40px;
  28302. text-align: center;
  28303. }
  28304. .e_add_list_child span {
  28305. overflow: hidden;
  28306. white-space: nowrap;
  28307. text-overflow: ellipsis;
  28308. cursor: pointer;
  28309. }
  28310. .e_add_list_child img {
  28311. position: absolute;
  28312. right: 10px;
  28313. width: 21px;
  28314. cursor: pointer;
  28315. top: 50%;
  28316. transform: translateY(-50%);
  28317. }
  28318. .e_add_list_child+.e_add_list_child {
  28319. border-top: 1px solid #eaeaea;
  28320. }
  28321. .e_add_list_child .active {
  28322. color: #409eff;
  28323. }
  28324. .e_add_list_btn {
  28325. position: absolute;
  28326. bottom: 0;
  28327. height: 50px;
  28328. background: rgb(120, 120, 254);
  28329. width: 100%;
  28330. color: #fff;
  28331. font-size: 16px;
  28332. text-align: center;
  28333. line-height: 50px;
  28334. cursor: pointer;
  28335. }
  28336. .e_add_list_detail {
  28337. position: absolute;
  28338. bottom: 0;
  28339. height: 130px;
  28340. background: rgb(120, 120, 254);
  28341. width: 100%;
  28342. color: #fff;
  28343. font-size: 16px;
  28344. display: flex;
  28345. align-items: center;
  28346. justify-content: center;
  28347. }
  28348. .e_add_list_detail textarea {
  28349. height: 90%;
  28350. width: 95%;
  28351. border: none;
  28352. resize: none;
  28353. outline: none;
  28354. padding: 5px;
  28355. box-sizing: border-box;
  28356. }
  28357. .e_add_list_pbox {
  28358. width: 100%;
  28359. }
  28360. .e_add_list_pbox_title {
  28361. height: 50px;
  28362. background: #fff;
  28363. display: flex;
  28364. align-items: center;
  28365. width: 100%;
  28366. box-sizing: border-box;
  28367. padding: 0 20px;
  28368. flex-direction: row;
  28369. flex-wrap: wrap;
  28370. }
  28371. .type_title {
  28372. font-size: 18px;
  28373. font-weight: 700;
  28374. }
  28375. .type_content {
  28376. font-size: 16px;
  28377. margin-left: 30px;
  28378. }
  28379. .type_content span+span {
  28380. margin-left: 20px;
  28381. }
  28382. .type_content span {
  28383. cursor: pointer;
  28384. padding-bottom: 5px;
  28385. box-sizing: border-box;
  28386. }
  28387. .type_content .active {
  28388. color: #409eff;
  28389. border-bottom: 2px solid #409eff;
  28390. }
  28391. .e_add_list_pbox_content {
  28392. height: calc(100% - 50px);
  28393. display: flex;
  28394. align-items: center;
  28395. width: 100%;
  28396. background: #fff;
  28397. }
  28398. .mbCss {
  28399. width: 100%;
  28400. display: flex;
  28401. flex-direction: row;
  28402. flex-wrap: nowrap;
  28403. align-content: center;
  28404. align-items: flex-start;
  28405. justify-content: flex-start;
  28406. }
  28407. .pjCss {
  28408. /* width: 42%; */
  28409. width: calc(100% - 55%);
  28410. display: flex;
  28411. flex-direction: column;
  28412. flex-wrap: nowrap;
  28413. align-items: flex-start;
  28414. }
  28415. .e_box {
  28416. /* display: flex; */
  28417. flex-wrap: wrap;
  28418. max-height: 500px;
  28419. align-items: flex-start;
  28420. overflow: auto;
  28421. width: 100%;
  28422. }
  28423. .e_card {
  28424. border: 1px solid #ccc;
  28425. background: #fff;
  28426. margin-right: 20px;
  28427. width: 270px;
  28428. display: flex;
  28429. flex-direction: column;
  28430. align-items: center;
  28431. border-radius: 5px;
  28432. margin-top: 10px;
  28433. text-align: center;
  28434. }
  28435. .e_card_picture {
  28436. margin: 10px 0;
  28437. }
  28438. .e_card_picture>img {
  28439. width: 50px;
  28440. }
  28441. .e_card_name {
  28442. width: 100%;
  28443. padding: 0 10px;
  28444. box-sizing: border-box;
  28445. margin-bottom: 10px;
  28446. overflow: hidden;
  28447. text-overflow: ellipsis;
  28448. white-space: nowrap;
  28449. }
  28450. .e_card_time {
  28451. width: 100%;
  28452. padding: 0 10px;
  28453. box-sizing: border-box;
  28454. font-size: 15px;
  28455. color: #c3c3c3;
  28456. margin-bottom: 10px;
  28457. }
  28458. .e_card_btn {
  28459. height: 40px;
  28460. display: flex;
  28461. align-items: center;
  28462. width: 100%;
  28463. background: rgb(244, 244, 244);
  28464. }
  28465. .e_card_btn:hover {
  28466. background: rgb(221 221 221);
  28467. }
  28468. .e_card_btn span {
  28469. flex: 1 1 auto;
  28470. text-align: center;
  28471. cursor: pointer;
  28472. }
  28473. .addEva {
  28474. border: 1px solid #ccc;
  28475. background: #fff;
  28476. margin-right: 20px;
  28477. width: 270px;
  28478. height: 149px;
  28479. display: flex;
  28480. flex-direction: column;
  28481. align-items: center;
  28482. border-radius: 5px;
  28483. margin-top: 10px;
  28484. text-align: center;
  28485. cursor: pointer;
  28486. justify-content: center;
  28487. }
  28488. .addEva>img {
  28489. width: 50px;
  28490. object-fit: cover;
  28491. }
  28492. .uploadFm {
  28493. border: 1px dashed #ccc;
  28494. width: 100%;
  28495. height: 140px;
  28496. position: relative;
  28497. cursor: pointer;
  28498. display: flex;
  28499. flex-direction: column;
  28500. justify-content: center;
  28501. align-items: center;
  28502. font-size: 14px;
  28503. color: #6e6e6e;
  28504. position: relative;
  28505. }
  28506. .cover_p {
  28507. width: 100% !important;
  28508. height: 100%;
  28509. object-fit: cover;
  28510. }
  28511. .uploadFm2:hover .cover_mask {
  28512. display: flex !important;
  28513. }
  28514. .cover_mask {
  28515. display: none;
  28516. width: 100%;
  28517. height: 100%;
  28518. position: absolute;
  28519. background: #00000054;
  28520. align-items: center;
  28521. justify-content: center;
  28522. flex-direction: column;
  28523. }
  28524. .cover_mask>img {
  28525. width: 30px;
  28526. }
  28527. .cover_mask>span {
  28528. color: #fff;
  28529. font-size: 12px;
  28530. }
  28531. .uploadFm>img {
  28532. width: 50px;
  28533. }
  28534. .fileCss {
  28535. width: 100%;
  28536. display: flex;
  28537. flex-direction: row;
  28538. flex-wrap: nowrap;
  28539. justify-content: space-around;
  28540. align-items: center;
  28541. padding-top: 15px;
  28542. }
  28543. .fileCss>div {
  28544. display: flex;
  28545. flex-direction: column;
  28546. align-items: center;
  28547. }
  28548. .fileCss .spanName {
  28549. margin-top: 10px;
  28550. }
  28551. .sysPicBox {
  28552. display: flex;
  28553. flex-direction: row;
  28554. flex-wrap: wrap;
  28555. align-content: flex-start;
  28556. height: 435px;
  28557. overflow: auto;
  28558. position: relative;
  28559. }
  28560. .picNone {
  28561. position: absolute;
  28562. left: 50%;
  28563. top: 45%;
  28564. transform: translate(-50%, -50%);
  28565. width: fit-content;
  28566. color: #9c9c9c;
  28567. }
  28568. .sysPic {
  28569. width: 200px;
  28570. height: 115px;
  28571. margin: 0 20px 20px 0;
  28572. cursor: pointer;
  28573. }
  28574. .sysPic>img,
  28575. .isSysPic>img,
  28576. .deletePic>img {
  28577. width: 100%;
  28578. height: 100%;
  28579. object-fit: cover;
  28580. }
  28581. .isSysPic {
  28582. width: 200px;
  28583. height: 115px;
  28584. position: relative;
  28585. }
  28586. .deletePic {
  28587. width: 20px;
  28588. height: 20px;
  28589. position: absolute;
  28590. top: 0;
  28591. right: 0;
  28592. cursor: pointer;
  28593. }
  28594. .select_box1 {
  28595. height: 100%;
  28596. }
  28597. .select_box1_img {
  28598. background: #fff;
  28599. border-radius: 5px;
  28600. padding: 15px;
  28601. box-sizing: border-box;
  28602. margin-bottom: 20px;
  28603. }
  28604. .select_box1_title {
  28605. padding: 0 0 15px 0;
  28606. border-bottom: 1px solid #eee;
  28607. margin-bottom: 15px;
  28608. }
  28609. .select_box1_title span:nth-child(1) {
  28610. font-size: 16px;
  28611. margin-right: 20px;
  28612. color: #000;
  28613. }
  28614. .select_box1_title span:nth-child(2) {
  28615. font-size: 14px;
  28616. color: rgb(112, 112, 112);
  28617. }
  28618. .select_box1_add_img {}
  28619. .select_box1_select {
  28620. background: #fff;
  28621. border-radius: 5px;
  28622. padding: 15px;
  28623. box-sizing: border-box;
  28624. height: calc(100% - 200px);
  28625. overflow: auto;
  28626. }
  28627. .select_box2 {
  28628. height: 100%;
  28629. }
  28630. .select_box2_title {
  28631. background: #fff;
  28632. border-radius: 5px;
  28633. padding: 5px 10px;
  28634. box-sizing: border-box;
  28635. margin-bottom: 10px;
  28636. }
  28637. .select_box2_box {
  28638. display: flex;
  28639. height: calc(100% - 30px);
  28640. }
  28641. .select_box2_img {
  28642. width: calc(100% - 310px);
  28643. height: 100%;
  28644. overflow: auto;
  28645. background: #fff;
  28646. border-radius: 5px;
  28647. }
  28648. .select_box2_img img {
  28649. width: 100%;
  28650. }
  28651. .select_box2_answer {
  28652. background: #fff;
  28653. margin-left: 10px;
  28654. border-radius: 5px;
  28655. width: 300px;
  28656. overflow: auto;
  28657. height: 100%;
  28658. display: flex;
  28659. flex-direction: column;
  28660. align-items: center;
  28661. padding-top: 10px;
  28662. box-sizing: border-box;
  28663. }
  28664. .select_box2_answer_box {
  28665. margin: 0 0 10px 0;
  28666. width: 85%;
  28667. }
  28668. .rate_textarea {
  28669. font: inherit;
  28670. color: currentColor;
  28671. width: 100%;
  28672. padding: 8px 14px;
  28673. display: block;
  28674. min-width: 0;
  28675. outline: none;
  28676. border: 1px solid rgba(0, 0, 0, 0.23);
  28677. border-radius: 4px;
  28678. box-sizing: border-box;
  28679. background: #fff;
  28680. margin: 0 20px 0 0;
  28681. resize: none;
  28682. }
  28683. .select_answer_title {
  28684. text-align: left;
  28685. width: 85%;
  28686. margin-bottom: 10px;
  28687. font-size: 18px;
  28688. color: #8e8e8e;
  28689. }
  28690. .mask {
  28691. background-color: rgb(0 0 0 / 30%);
  28692. /* position: fixed; */
  28693. position: absolute;
  28694. top: 0;
  28695. left: 0;
  28696. width: 100%;
  28697. height: 100%;
  28698. z-index: 90;
  28699. display: flex;
  28700. align-items: center;
  28701. justify-content: center;
  28702. }
  28703. .progressBox {
  28704. width: 300px;
  28705. height: 150px;
  28706. background: #fff;
  28707. border-radius: 10px;
  28708. box-shadow: 0 0 6px 1px #bfbfbf;
  28709. display: flex;
  28710. align-items: center;
  28711. justify-content: center;
  28712. flex-direction: column;
  28713. position: relative;
  28714. color: #6c6c6c;
  28715. }
  28716. .progressBox>>>.el-progress-bar__outer {
  28717. background-color: #d1dfff !important;
  28718. }
  28719. .progressBox .lbox {
  28720. height: 50px;
  28721. font-size: 19px;
  28722. display: flex;
  28723. align-items: center;
  28724. color: #747474;
  28725. }
  28726. .progressBox .lbox img {
  28727. width: 40px;
  28728. margin-right: 20px;
  28729. }
  28730. .closeCss {
  28731. position: absolute;
  28732. top: 8px;
  28733. right: 8px;
  28734. cursor: pointer;
  28735. width: 20px;
  28736. height: 20px;
  28737. }
  28738. .closeCss>img {
  28739. width: 100%;
  28740. height: 100%;
  28741. }
  28742. .updateTips::before {
  28743. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28744. font-size: 14px;
  28745. margin-left: 20px;
  28746. font-weight: 400;
  28747. color: #ff3a3a;
  28748. margin-bottom: 10px;
  28749. display: block;
  28750. }
  28751. .updateMask {
  28752. width: 100%;
  28753. z-index: 3;
  28754. top: 0;
  28755. position: absolute;
  28756. /* background-color: rgba(0,0,0,.3); */
  28757. }
  28758. .t_j_box {
  28759. display: flex;
  28760. }
  28761. .t_j_box span:nth-child(1) {
  28762. width: 15%;
  28763. overflow: hidden;
  28764. margin-right: 10px;
  28765. text-overflow: ellipsis;
  28766. white-space: nowrap;
  28767. }
  28768. .t_j_box span:nth-child(2) {
  28769. width: 30%;
  28770. overflow: hidden;
  28771. text-overflow: ellipsis;
  28772. margin-right: 10px;
  28773. }
  28774. .t_j_box span:nth-child(3) {
  28775. max-width: calc(55% - 20px);
  28776. overflow: hidden;
  28777. text-overflow: ellipsis;
  28778. }
  28779. .sentenBox {
  28780. background: #fff;
  28781. height: 600px;
  28782. overflow: auto;
  28783. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28784. background-position: 102%;
  28785. background-repeat: no-repeat;
  28786. background-size: 60%;
  28787. }
  28788. .sentenBox>.sentenContent {
  28789. padding-bottom: 10px;
  28790. width: 97%;
  28791. margin: 0 auto;
  28792. }
  28793. .sentenBox>.sentenContent+.sentenContent {
  28794. border-top: 1px solid #cbcbcb;
  28795. }
  28796. .addSen {
  28797. background: #409efe;
  28798. width: 90px;
  28799. color: #fff;
  28800. height: 35px;
  28801. text-align: center;
  28802. line-height: 35px;
  28803. border-radius: 5px;
  28804. float: right;
  28805. margin: 10px 20px 0 0;
  28806. cursor: pointer;
  28807. }
  28808. .sentenTop {
  28809. display: flex;
  28810. flex-direction: row;
  28811. flex-wrap: nowrap;
  28812. align-items: center;
  28813. }
  28814. .sentenTop::before {
  28815. content: attr(index);
  28816. background: #3681fc;
  28817. border-radius: 50%;
  28818. color: #fff;
  28819. width: 25px;
  28820. height: 25px;
  28821. min-width: 25px;
  28822. min-height: 25px;
  28823. text-align: center;
  28824. line-height: 25px;
  28825. margin-right: 5px;
  28826. }
  28827. .sentenTop>div:nth-child(2) {
  28828. width: 300px;
  28829. margin: 0 15px;
  28830. }
  28831. .sentenTop>div:nth-child(3) {
  28832. background: #409efe;
  28833. color: #fff;
  28834. width: 65px;
  28835. height: 35px;
  28836. text-align: center;
  28837. line-height: 35px;
  28838. border-radius: 5px;
  28839. cursor: pointer;
  28840. }
  28841. .cardList {
  28842. padding: 30px 0 20px 0;
  28843. display: flex;
  28844. flex-direction: row;
  28845. flex-wrap: wrap;
  28846. align-items: center;
  28847. box-sizing: border-box;
  28848. border-bottom: 1px solid #f4f4f4;
  28849. width: 98%;
  28850. margin: 0 auto;
  28851. }
  28852. .rightCardList {
  28853. display: flex;
  28854. flex-wrap: wrap;
  28855. }
  28856. .cardBox {
  28857. display: flex;
  28858. flex-direction: row;
  28859. flex-wrap: wrap;
  28860. align-items: center;
  28861. align-content: center;
  28862. }
  28863. .isCard,
  28864. .isCard1 {
  28865. width: auto;
  28866. padding: 0 20px;
  28867. height: 65px;
  28868. text-align: center;
  28869. line-height: 65px;
  28870. font-size: 14px;
  28871. cursor: pointer;
  28872. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28873. background-size: 100% 100%;
  28874. position: relative;
  28875. z-index: 99;
  28876. }
  28877. .isCard1 {
  28878. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28879. }
  28880. .isCard:hover .deleteWord {
  28881. display: block;
  28882. }
  28883. .isCard>div:nth-child(1),
  28884. .isCard1>div:nth-child(1) {
  28885. white-space: nowrap;
  28886. overflow: hidden;
  28887. text-overflow: ellipsis;
  28888. width: 100%;
  28889. margin: 0 auto;
  28890. }
  28891. .card {
  28892. width: 140px;
  28893. height: 65px;
  28894. }
  28895. .card>img {
  28896. width: 100%;
  28897. height: 100%;
  28898. }
  28899. .rightCardBox {
  28900. width: 98%;
  28901. margin: 10px auto 0;
  28902. }
  28903. .rightCardBox>div:nth-child(1) {
  28904. margin-bottom: 10px;
  28905. }
  28906. .cardCss {
  28907. display: flex;
  28908. flex-direction: column;
  28909. flex-wrap: nowrap;
  28910. align-items: center;
  28911. border-bottom: 3px solid #b4c3d3;
  28912. padding: 0 0 5px 0;
  28913. /* margin-right: 10px; */
  28914. }
  28915. .cardCss>div:nth-child(2) {
  28916. background: #5b7b9d;
  28917. color: #fff;
  28918. width: 20px;
  28919. height: 20px;
  28920. border-radius: 50%;
  28921. text-align: center;
  28922. line-height: 20px;
  28923. }
  28924. .sentenTopBox {
  28925. display: flex;
  28926. flex-direction: row;
  28927. flex-wrap: nowrap;
  28928. align-items: center;
  28929. justify-content: space-between;
  28930. padding: 55px 0 0 20px;
  28931. box-sizing: border-box;
  28932. width: 85%;
  28933. }
  28934. .rb_c_ai_box,
  28935. .stepsBottom {
  28936. width: 100%;
  28937. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28938. /* background: #f7f7f7; */
  28939. border-radius: 10px;
  28940. overflow: hidden;
  28941. /* height: 100%; */
  28942. height: calc(100% - 55px);
  28943. }
  28944. .navTop {
  28945. background: #53749b;
  28946. color: #fff;
  28947. height: 40px;
  28948. line-height: 40px;
  28949. padding-left: 15px;
  28950. font-size: 18px;
  28951. }
  28952. .navBottom {
  28953. /* background: #6b91b7; */
  28954. height: 100%;
  28955. overflow: auto;
  28956. padding: 10px 0;
  28957. }
  28958. .navStage {
  28959. display: flex;
  28960. flex-direction: row;
  28961. flex-wrap: nowrap;
  28962. align-items: center;
  28963. padding: 10px 10px 10px 0;
  28964. cursor: pointer;
  28965. background: #ffffff;
  28966. width: 95%;
  28967. margin: 5px auto 5px;
  28968. box-sizing: border-box;
  28969. border-radius: 5px;
  28970. flex-wrap: wrap;
  28971. position: relative;
  28972. }
  28973. .navStage:hover>.chapter_upload_drag {
  28974. display: block;
  28975. }
  28976. .navTask:hover>.chapter_upload_drag {
  28977. display: block;
  28978. }
  28979. .chapter_upload:hover>.chapter_upload_drag {
  28980. display: block;
  28981. }
  28982. .navStage::before {
  28983. content: "";
  28984. display: block;
  28985. width: 16px;
  28986. height: 16px;
  28987. background-image: url(../../../assets/icon/new/icon_stage.png);
  28988. background-size: 100%;
  28989. margin-left: 25px;
  28990. }
  28991. .navStage .chapter_unit_open {
  28992. content: "";
  28993. display: block;
  28994. width: 16px;
  28995. height: 16px;
  28996. background-image: url(../../../assets/icon/new/down.png);
  28997. transform: rotate(-90deg);
  28998. background-size: 100%;
  28999. margin-left: 10px;
  29000. transition: all 0.5s;
  29001. }
  29002. .isNavStageOpen .chapter_unit_open {
  29003. transform: rotate(0deg);
  29004. }
  29005. .isNavStage {
  29006. background: #0061ff;
  29007. }
  29008. .isNavStage::before {
  29009. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  29010. }
  29011. .isNavStage .chapter_unit_open {
  29012. background-image: url(../../../assets/icon/new/downC.png);
  29013. }
  29014. .isNavStage .nt_taskName {
  29015. font-weight: bold !important;
  29016. color: #ffffff !important;
  29017. }
  29018. .isNavStage .nt_taskTitle {
  29019. font-weight: bold !important;
  29020. color: #fff !important;
  29021. }
  29022. .navStage .nt_taskBox {
  29023. width: calc(100% - 68px);
  29024. padding: 0 0 0 5px;
  29025. box-sizing: border-box;
  29026. box-sizing: border-box;
  29027. display: flex;
  29028. flex-direction: row;
  29029. flex-wrap: nowrap;
  29030. align-items: baseline;
  29031. }
  29032. .navStage .nt_taskTitle {
  29033. color: #060e17;
  29034. line-height: 25px;
  29035. font-size: 16px;
  29036. }
  29037. .navStage .nt_taskName {
  29038. max-width: calc(100% - 82px);
  29039. white-space: nowrap;
  29040. overflow: hidden;
  29041. text-overflow: ellipsis;
  29042. font-size: 16px;
  29043. color: #060e17;
  29044. }
  29045. .navTask {
  29046. display: flex;
  29047. flex-direction: row;
  29048. flex-wrap: nowrap;
  29049. align-items: center;
  29050. padding: 10px 10px 10px 0;
  29051. cursor: pointer;
  29052. background: #ffffff;
  29053. width: 95%;
  29054. margin: 5px auto 5px;
  29055. box-sizing: border-box;
  29056. border-radius: 5px;
  29057. flex-wrap: wrap;
  29058. position: relative;
  29059. }
  29060. .navTask .chapter_upload_open {
  29061. content: "";
  29062. display: block;
  29063. width: 16px;
  29064. height: 16px;
  29065. background-image: url(../../../assets/icon/new/icon_arrow.png);
  29066. background-size: 100%;
  29067. margin-left: 23px;
  29068. }
  29069. .noImage .chapter_upload_open {
  29070. display: none;
  29071. background-image: unset !important;
  29072. }
  29073. .isNavOpen .chapter_upload_open {
  29074. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  29075. transform: rotate(90deg);
  29076. }
  29077. .isNavTask .chapter_upload_open {
  29078. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  29079. transform: rotate(-90deg);
  29080. }
  29081. .isNavTask.isNavOpen .chapter_upload_open {
  29082. transform: rotate(0deg);
  29083. }
  29084. .dragOverTop {
  29085. border-top: 2px solid #0061ff !important;
  29086. border-radius: 0 !important;
  29087. margin-top: 10px;
  29088. }
  29089. .dragOverBottom {
  29090. border-bottom: 2px solid #0061ff !important;
  29091. border-radius: 0 !important;
  29092. margin-top: 10px;
  29093. }
  29094. .dragOverTop2 {
  29095. border-top: 2px solid #0061ff !important;
  29096. border-radius: 0 !important;
  29097. }
  29098. .dragOverBottom2 {
  29099. border-bottom: 2px solid #0061ff !important;
  29100. border-radius: 0 !important;
  29101. }
  29102. .isNavTask {
  29103. /* background: #3681FC; */
  29104. background: #eef3fb;
  29105. }
  29106. .isNavTask>.chapter_upload_drag {
  29107. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  29108. }
  29109. .isNavTask .nt_taskName {
  29110. /* color: #fff !important; */
  29111. font-weight: bold !important;
  29112. color: #0061ff !important;
  29113. }
  29114. .isNavTask .nt_taskTitle {
  29115. /* color: #AECCFE !important; */
  29116. font-weight: bold !important;
  29117. color: #0061ff !important;
  29118. }
  29119. .navTask .nt_taskBox {
  29120. width: calc(100% - 40px);
  29121. padding: 0 0 0 5px;
  29122. box-sizing: border-box;
  29123. box-sizing: border-box;
  29124. display: flex;
  29125. flex-direction: row;
  29126. flex-wrap: nowrap;
  29127. align-items: baseline;
  29128. }
  29129. .navTask .nt_taskTitle {
  29130. /* color: #717C8D; */
  29131. color: #060e17;
  29132. line-height: 25px;
  29133. font-size: 16px;
  29134. /* min-width: 66px; */
  29135. }
  29136. .navTask .nt_taskName {
  29137. /* color: #fff; */
  29138. /* max-width: 130px; */
  29139. /* width: 100%; */
  29140. max-width: calc(100% - 66px);
  29141. font-size: 16px;
  29142. color: #060e17;
  29143. /* color: #0E1E33; */
  29144. }
  29145. .navTask .nt_taskName span {
  29146. width: 100%;
  29147. white-space: nowrap;
  29148. overflow: hidden;
  29149. text-overflow: ellipsis;
  29150. display: block;
  29151. }
  29152. .gjBox {
  29153. width: calc(100% - 25px);
  29154. padding: 0 0 0 0;
  29155. box-sizing: border-box;
  29156. border-left: 1px solid #cad1dc;
  29157. margin-left: 25px;
  29158. }
  29159. .gjBox>div {
  29160. display: flex;
  29161. align-items: center;
  29162. }
  29163. .gjBox>div::before {
  29164. content: "";
  29165. height: 1px;
  29166. width: 10px;
  29167. background: #cad1dc;
  29168. display: block;
  29169. margin-right: 5px;
  29170. }
  29171. .gjCss {
  29172. display: flex;
  29173. flex-direction: row;
  29174. flex-wrap: nowrap;
  29175. align-items: center;
  29176. padding: 15px 0;
  29177. box-sizing: border-box;
  29178. font-size: 14px;
  29179. cursor: pointer;
  29180. }
  29181. .isGjCss {
  29182. color: #0061ff;
  29183. }
  29184. .groupBox {}
  29185. .groupContent+.groupContent {
  29186. margin-top: 30px;
  29187. }
  29188. .groupTitle {
  29189. font-size: 24px;
  29190. color: rgb(80, 80, 80);
  29191. margin-bottom: 20px;
  29192. }
  29193. .groupName {
  29194. display: flex;
  29195. align-items: center;
  29196. }
  29197. .groupn {
  29198. font-size: 15px;
  29199. margin-right: 10px;
  29200. }
  29201. .groupName+.groupName {
  29202. margin-top: 15px;
  29203. }
  29204. .groupBtn {
  29205. margin-left: 10px;
  29206. }
  29207. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  29208. text-align: left;
  29209. }
  29210. .radioBox>div {
  29211. margin: 10px 0 0 10px;
  29212. }
  29213. .radioBox>>>.el-radio__input,
  29214. .radioBox>>>.el-checkbox__inner {
  29215. margin-left: 10px;
  29216. }
  29217. .radioBox>>>.el-radio__label,
  29218. .radioBox>>>.el-checkbox__label {
  29219. display: flex;
  29220. align-items: center;
  29221. }
  29222. .inImg {
  29223. width: 50px;
  29224. }
  29225. .inImg>img {
  29226. width: 100%;
  29227. height: 100%;
  29228. object-fit: cover;
  29229. }
  29230. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  29231. height: auto;
  29232. padding: 10px;
  29233. margin: 0;
  29234. }
  29235. .upCss>>>.el-upload-list {
  29236. width: 100%;
  29237. }
  29238. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  29239. width: 100%;
  29240. height: 120px;
  29241. object-fit: contain;
  29242. background: unset;
  29243. margin-left: 0;
  29244. }
  29245. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  29246. display: none;
  29247. }
  29248. .tcMember+.tcMember::before {
  29249. content: "、";
  29250. }
  29251. .xzUpImg {
  29252. width: 25px;
  29253. height: 25px;
  29254. min-width: 25px;
  29255. min-height: 25px;
  29256. cursor: pointer;
  29257. margin: 0 10px;
  29258. }
  29259. .xzUpImg>img {
  29260. width: 100%;
  29261. height: 100%;
  29262. }
  29263. .closeCss {
  29264. position: absolute;
  29265. top: 8px;
  29266. right: 8px;
  29267. cursor: pointer;
  29268. width: 20px;
  29269. height: 20px;
  29270. }
  29271. .closeCss>img {
  29272. width: 100%;
  29273. height: 100%;
  29274. }
  29275. .moveBtn {
  29276. display: flex;
  29277. flex-direction: row;
  29278. flex-wrap: nowrap;
  29279. align-items: center;
  29280. width: 55px;
  29281. }
  29282. .timuUpImg {
  29283. display: flex;
  29284. flex-direction: row;
  29285. align-items: center;
  29286. width: 100%;
  29287. margin-right: 10px;
  29288. }
  29289. .timuUpImg>div:nth-child(1) {
  29290. margin-right: 10px;
  29291. display: flex;
  29292. align-items: center;
  29293. width: 100%;
  29294. }
  29295. .timuImgBox {
  29296. margin: 10px 0;
  29297. display: flex;
  29298. flex-direction: column;
  29299. flex-wrap: wrap;
  29300. align-items: flex-start;
  29301. }
  29302. .timuImg {
  29303. width: 100px;
  29304. margin: 5px 0;
  29305. cursor: pointer;
  29306. position: relative;
  29307. }
  29308. .timuImg:hover .deleteWord {
  29309. display: block;
  29310. }
  29311. .deleteWord {
  29312. width: 25px;
  29313. height: 25px;
  29314. position: absolute;
  29315. right: -5px;
  29316. top: -5px;
  29317. cursor: pointer;
  29318. display: none;
  29319. }
  29320. .timuImg>img,
  29321. .deleteWord>img {
  29322. width: 100%;
  29323. height: 100%;
  29324. object-fit: cover;
  29325. }
  29326. .e_add_delete {
  29327. cursor: pointer;
  29328. margin-left: 10px;
  29329. }
  29330. .pType_box {
  29331. margin: 15px 0;
  29332. align-items: flex-end;
  29333. }
  29334. .noneBox {
  29335. height: 200px;
  29336. width: 100%;
  29337. display: flex;
  29338. align-items: center;
  29339. justify-content: center;
  29340. flex-direction: column;
  29341. /* margin-top: 150px; */
  29342. }
  29343. .noneBox>img {
  29344. width: 95px;
  29345. }
  29346. .noneBox>span {
  29347. margin-top: 10px;
  29348. color: #717c8d;
  29349. }
  29350. .rb_c_box {
  29351. width: 100%;
  29352. height: 100%;
  29353. display: flex;
  29354. /* padding: 20px; */
  29355. box-sizing: border-box;
  29356. justify-content: space-between;
  29357. }
  29358. .rb_c_box_left {
  29359. height: 100%;
  29360. background: #fff;
  29361. width: 270px;
  29362. min-width: 270px;
  29363. border-radius: 8px;
  29364. margin-right: 10px;
  29365. }
  29366. .rb_c_box_right {
  29367. height: 100%;
  29368. width: calc(100%);
  29369. overflow: hidden;
  29370. }
  29371. .rb_c_box_btn {
  29372. display: flex;
  29373. justify-content: flex-start;
  29374. height: 50px;
  29375. align-items: center;
  29376. background: #fff;
  29377. padding: 0 20px;
  29378. border-radius: 10px 10px 0px 0px;
  29379. border-bottom: 1px solid #cad1dc;
  29380. }
  29381. .rb_c_box_btn > .title{
  29382. font-size: 24px;
  29383. font-weight: bold;
  29384. display: flex;
  29385. align-items: center;
  29386. }
  29387. .rb_c_box_btn > .title:before{
  29388. content: '';
  29389. background-image: url(../../../assets/icon/course/courseName.png);
  29390. width: 24px;
  29391. height: 24px;
  29392. background-size: 100% 100%;
  29393. margin-right: 10px;
  29394. }
  29395. .rb_c_box_right>.basic_box {
  29396. /* background: #fff; */
  29397. border-radius: 0;
  29398. height: calc(100% - 50px);
  29399. overflow: auto;
  29400. padding: 0;
  29401. }
  29402. .textarea_css {
  29403. display: block;
  29404. resize: none;
  29405. padding: 10px 15px;
  29406. line-height: 1.5;
  29407. box-sizing: border-box;
  29408. width: 100%;
  29409. font-size: 14px;
  29410. color: #606266;
  29411. background-color: #fff;
  29412. background-image: none;
  29413. border: 1px solid #dcdfe6;
  29414. border-radius: 4px;
  29415. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  29416. outline: none;
  29417. overflow: hidden;
  29418. height: 46px;
  29419. font-family: "Microsoft YaHei";
  29420. }
  29421. .textarea_css::-webkit-input-placeholder {
  29422. color: #c0c4cc;
  29423. }
  29424. .textarea_css:focus {
  29425. border-color: #409eff;
  29426. outline: 0;
  29427. }
  29428. .addEditor>>>.text {
  29429. height: auto;
  29430. min-height: 100px;
  29431. }
  29432. .addEditor>>>.w-e-text-container {
  29433. min-height: 100px;
  29434. }
  29435. .moveBtn2 {
  29436. flex-direction: column;
  29437. width: fit-content;
  29438. margin: 0 10px 0 10px;
  29439. }
  29440. .moveBtn2 .chapter_upload_down,
  29441. .moveBtn2 .chapter_upload_up {
  29442. width: 16px;
  29443. height: 16px;
  29444. }
  29445. .moveBtn2 .chapter_upload_up::after,
  29446. .moveBtn2 .chapter_upload_down::after {
  29447. width: 10px;
  29448. height: 10px;
  29449. }
  29450. .fullStyle>>>.el-dialog__body {
  29451. height: calc(100% - 125px) !important;
  29452. box-sizing: border-box;
  29453. }
  29454. .fullStyle1>>>.el-dialog__body {
  29455. height: auto !important;
  29456. }
  29457. .fullStyle>>>.el-dialog {
  29458. width: 100% !important;
  29459. max-width: 100% !important;
  29460. height: 100% !important;
  29461. margin: 0 !important;
  29462. }
  29463. .fullStyle {
  29464. width: 100% !important;
  29465. max-width: 100% !important;
  29466. height: 100% !important;
  29467. margin: 0 auto !important;
  29468. }
  29469. .wb_j_box_btn {
  29470. width: calc(100% - 30px);
  29471. display: flex;
  29472. height: 40px;
  29473. border: 1.5px solid #cad1dc;
  29474. border-radius: 4px;
  29475. box-sizing: border-box;
  29476. align-items: center;
  29477. font-size: 14px;
  29478. cursor: pointer;
  29479. overflow: hidden;
  29480. }
  29481. .wb_j_box_btn:hover {
  29482. border: 1.5px solid #0061ff;
  29483. }
  29484. .wb_j_box_title {
  29485. background: #f0f4fa;
  29486. height: 100%;
  29487. line-height: 40px;
  29488. width: 105px;
  29489. text-align: center;
  29490. color: #060e17;
  29491. border-right: 1.5px solid #cad1dc;
  29492. box-sizing: border-box;
  29493. }
  29494. .wb_j_box_btn_c {
  29495. width: calc(100% - 90px);
  29496. padding: 0 35px 0 10px;
  29497. box-sizing: border-box;
  29498. position: relative;
  29499. }
  29500. .wb_j_box_span {
  29501. width: 100%;
  29502. overflow: hidden;
  29503. white-space: nowrap;
  29504. text-overflow: ellipsis;
  29505. word-wrap: break-word;
  29506. color: #717c8d;
  29507. }
  29508. .wb_j_box_arrow {
  29509. content: "";
  29510. width: 14px;
  29511. height: 14px;
  29512. background: url(../../../assets/icon/new/u_arrow.png);
  29513. background-size: 100% 100%;
  29514. position: absolute;
  29515. right: 12px;
  29516. top: 50%;
  29517. transform: translateY(-50%);
  29518. }
  29519. .check_classBox {
  29520. height: 400px;
  29521. display: flex;
  29522. border-top: 1.5px solid #e7ebf1;
  29523. border-bottom: 1.5px solid #e7ebf1;
  29524. }
  29525. .check_class_right {
  29526. width: 130px;
  29527. border-right: 1px solid #e7ebf1;
  29528. display: flex;
  29529. align-items: center;
  29530. flex-direction: column;
  29531. height: 100%;
  29532. overflow: auto;
  29533. padding: 15px 0;
  29534. box-sizing: border-box;
  29535. }
  29536. .check_class {
  29537. width: 85%;
  29538. border-radius: 5px;
  29539. height: 30px;
  29540. min-height: 30px;
  29541. line-height: 30px;
  29542. text-align: center;
  29543. padding: 0 10px;
  29544. box-sizing: border-box;
  29545. cursor: pointer;
  29546. white-space: nowrap;
  29547. overflow: hidden;
  29548. text-overflow: ellipsis;
  29549. }
  29550. .check_class.activeX {
  29551. background: #e0eafb;
  29552. color: #3681fc;
  29553. font-weight: 700;
  29554. }
  29555. .check_class+.check_class {
  29556. margin-top: 15px;
  29557. }
  29558. .check_class_left {
  29559. background: #fafafa;
  29560. width: calc(100% - 130px);
  29561. padding: 15px;
  29562. box-sizing: border-box;
  29563. }
  29564. .check_class_all_box {
  29565. display: flex;
  29566. margin-bottom: 10px;
  29567. }
  29568. .all_check {
  29569. display: flex;
  29570. align-items: center;
  29571. padding: 2px 0 0;
  29572. margin-left: 10px;
  29573. }
  29574. .all_check>>>.el-checkbox__label {
  29575. line-height: 18px;
  29576. }
  29577. .check_class_left_title {
  29578. font-size: 16px;
  29579. font-weight: 700;
  29580. }
  29581. .check_class_item {
  29582. display: flex;
  29583. flex-wrap: wrap;
  29584. height: calc(100% - 45px);
  29585. overflow: auto;
  29586. justify-content: flex-start;
  29587. align-items: flex-start;
  29588. align-content: flex-start;
  29589. }
  29590. .class_item:first-child {
  29591. /* margin: 0 15px 15px 67px; */
  29592. }
  29593. .class_item {
  29594. margin: 0 15px 15px 0;
  29595. }
  29596. .class_item:hover>>>.el-checkbox__label {
  29597. color: #409eff;
  29598. }
  29599. .class_item>>>.el-checkbox__label {
  29600. color: #0e1e33;
  29601. }
  29602. .class_item:hover>>>.el-checkbox__inner {
  29603. border-color: #409eff;
  29604. }
  29605. .class_item>>>.el-checkbox,
  29606. .class_item>>>.el-checkbox__input {
  29607. display: flex;
  29608. align-items: center;
  29609. }
  29610. .taskTitle {
  29611. font-size: 20px;
  29612. font-weight: bold;
  29613. margin-bottom: 35px;
  29614. }
  29615. .taskTitle:after {
  29616. content: "";
  29617. width: 100%;
  29618. display: block;
  29619. height: 1px;
  29620. background: #cad1dc;
  29621. position: absolute;
  29622. left: 0;
  29623. margin: 15px 0 0;
  29624. }
  29625. .eva_btn_box {
  29626. margin: 20px 0px 0 0;
  29627. display: flex;
  29628. flex-direction: row;
  29629. flex-wrap: nowrap;
  29630. align-items: center;
  29631. justify-content: space-between;
  29632. width: 100%;
  29633. }
  29634. .eva_btn_left_box {
  29635. display: flex;
  29636. flex-direction: row;
  29637. flex-wrap: nowrap;
  29638. align-items: center;
  29639. }
  29640. .addTypeChoose {
  29641. display: flex;
  29642. flex-direction: row;
  29643. flex-wrap: nowrap;
  29644. align-items: center;
  29645. margin: 15px 0;
  29646. }
  29647. .addTypeBox {
  29648. display: flex;
  29649. flex-direction: column;
  29650. flex-wrap: nowrap;
  29651. align-items: center;
  29652. }
  29653. .addTypeChoose {
  29654. display: flex;
  29655. flex-direction: row;
  29656. flex-wrap: nowrap;
  29657. align-items: center;
  29658. margin: 15px 0;
  29659. }
  29660. .buchong_box {
  29661. background: #E0EAFB66;
  29662. width: calc(100% - 20px);
  29663. min-height: 50px;
  29664. display: flex;
  29665. align-items: center;
  29666. justify-content: center;
  29667. margin: 0 auto;
  29668. }
  29669. .outline {
  29670. width: calc(100% - 40px);
  29671. margin: 0 auto;
  29672. }
  29673. .task_outline {
  29674. width: calc(100% - 40px);
  29675. margin: 0 auto;
  29676. }
  29677. .outline_box+.outline_box {
  29678. margin: 30px 0 0px;
  29679. }
  29680. .outline_task {
  29681. display: flex;
  29682. align-items: center;
  29683. margin-bottom: 10px;
  29684. }
  29685. .outline_btn{
  29686. display: flex;
  29687. align-items: center;
  29688. min-width: fit-content;
  29689. margin-left: 10px;
  29690. }
  29691. .outline_task .title {
  29692. font-size: 18px;
  29693. font-weight: bold;
  29694. min-width: 80px;
  29695. }
  29696. .op_task_box,
  29697. .op_tool_box,
  29698. .outline_detail {
  29699. position: relative;
  29700. }
  29701. .op_task_box:hover .op_box,
  29702. .op_tool_box:hover .op_box,
  29703. .outline_detail:hover .op_box {
  29704. display: flex
  29705. }
  29706. .op_box {
  29707. position: absolute;
  29708. bottom: 10px;
  29709. display: none;
  29710. align-items: center;
  29711. justify-content: space-between;
  29712. width: calc(100% - 20px);
  29713. left: 50%;
  29714. transform: translateX(-50%);
  29715. }
  29716. .op_box .op_remark {
  29717. color: #8E8E8E;
  29718. font-size: 14px;
  29719. }
  29720. .op_box_right{
  29721. display: flex;
  29722. }
  29723. .op_box_isquote{
  29724. display: flex;
  29725. }
  29726. .op_box_isquote *{
  29727. display: none;
  29728. }
  29729. .op_box_isquote .op_box_right,
  29730. .op_box_isquote .custom-switch{
  29731. display: flex;
  29732. margin-left: auto;
  29733. }
  29734. .op_task_box:hover .op_box_isquote *{
  29735. display: flex;
  29736. }
  29737. .op_task_box:hover .op_box_isquote .op_box_right,
  29738. .op_task_box:hover .op_box_isquote .custom-switch{
  29739. display: flex;
  29740. margin-left: unset;
  29741. }
  29742. .rb_c_nav {
  29743. width: calc(100% - 20px);
  29744. margin: 15px auto 0;
  29745. font-size: 18px;
  29746. display: flex;
  29747. align-items: center;
  29748. }
  29749. .rb_c_nav span {
  29750. cursor: pointer;
  29751. }
  29752. .rb_c_nav span+span {
  29753. margin-left: 10px;
  29754. }
  29755. .rb_c_nav span.active {
  29756. color: #0061FF
  29757. }
  29758. .text_panel>>>.text {
  29759. height: 400px;
  29760. }
  29761. .markBox{
  29762. padding: 20px 14px;
  29763. line-height: 29px;
  29764. font-size: 16px;
  29765. background: #f4f4f4;
  29766. border-radius: 5px;
  29767. word-break: break-word;
  29768. }
  29769. .info_box_t {
  29770. display: flex;
  29771. align-items: center;
  29772. flex-wrap: wrap;
  29773. }
  29774. .info_box_t + .info_box_t {
  29775. margin-top: 10px;
  29776. }
  29777. .info_box_t_box {
  29778. display: flex;
  29779. align-items: center;
  29780. flex-wrap: wrap;
  29781. margin-bottom: 5px;
  29782. }
  29783. .info_box_t_box + .info_box_t_box{
  29784. margin-left: 10px;
  29785. }
  29786. .info_box_t_box > span{
  29787. width: fit-content;
  29788. font-weight: bold;
  29789. font-size: 14px;
  29790. }
  29791. .info_box_t_box > input{
  29792. width: 150px !important;
  29793. margin: 0 5px 0 0;
  29794. }
  29795. .info_radio >>> .el-radio, .el-radio__input{
  29796. line-height: 18px;
  29797. height: 18px;
  29798. }
  29799. .mode_box{
  29800. display: flex;
  29801. align-items: center;
  29802. }
  29803. .mode_box > span{
  29804. padding: 0px 5px;
  29805. cursor: pointer;
  29806. }
  29807. .mode_box > span.active{
  29808. color: #409eff;
  29809. }
  29810. .chapter_upload_check {
  29811. width: 15px;
  29812. height: 15px;
  29813. min-width: 15px;
  29814. min-height: 15px;
  29815. cursor: pointer;
  29816. background-image: url('../../../assets/icon/check.png');
  29817. background-size: 100% 100%;
  29818. }
  29819. .chapter_upload_check.checked{
  29820. background-image: url('../../../assets/icon/checked.png');
  29821. }
  29822. .ruleBtn {
  29823. width: fit-content;
  29824. height: 36px;
  29825. line-height: 36px;
  29826. cursor: pointer;
  29827. color: #0061FF;
  29828. }
  29829. .stopBtn{
  29830. z-index: 999999;
  29831. position: absolute;
  29832. left: 50%;
  29833. top: calc(50% + 70px);
  29834. transform: translateX(-50%);
  29835. }
  29836. .rateSwitch >>> .el-switch__label.is-active {
  29837. color: #0061FF;
  29838. }
  29839. .rateSwitch >>> .el-switch__label--right{
  29840. display: flex;
  29841. align-items: center;
  29842. }
  29843. .rateSwitch >>> .el-switch__label--right::before{
  29844. content: "";
  29845. width: 14px;
  29846. height: 14px;
  29847. min-width: 14px;
  29848. min-height: 14px;
  29849. background-size: 100% 100%;
  29850. display: block;
  29851. margin-right: 7px;
  29852. background-image: url(../../../assets/icon/new/u_op2.png);
  29853. }
  29854. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29855. background-image: url(../../../assets/icon/new/u_op.png);
  29856. }
  29857. .inter_box{
  29858. min-width: calc(50%);
  29859. min-height: 500px;
  29860. margin-right: 10px;
  29861. border: 1px solid #c7c7c7;
  29862. border-radius: 0px 5px 5px 5px;
  29863. overflow: hidden;
  29864. position: relative;
  29865. box-sizing: border-box;
  29866. }
  29867. .inter_box::before{
  29868. content:'对话区';
  29869. position: absolute;
  29870. left: 0;
  29871. top: 0;
  29872. display: block;
  29873. padding: 8px 10px;
  29874. background: #e0eafb;
  29875. color: #98a0ac;
  29876. font-size: 14px;
  29877. border-radius: 0 15px 15px 0;
  29878. }
  29879. .inter_voiceBox,
  29880. .inter_Detailbox{
  29881. border: 1px solid #c7c7c7;
  29882. border-radius: 0px 5px 5px 5px;
  29883. overflow: hidden;
  29884. position: relative;
  29885. box-sizing: border-box;
  29886. }
  29887. .inter_Detailbox::before{
  29888. content:'编辑区';
  29889. position: absolute;
  29890. left: 0;
  29891. top: 0;
  29892. display: block;
  29893. padding: 8px 10px;
  29894. background: #e0eafb;
  29895. color: #98a0ac;
  29896. font-size: 14px;
  29897. border-radius: 0 15px 15px 0;
  29898. }
  29899. .inter_voiceBox::before{
  29900. content:'录音区';
  29901. position: absolute;
  29902. left: 0;
  29903. top: 0;
  29904. display: block;
  29905. padding: 8px 10px;
  29906. background: #e0eafb;
  29907. color: #98a0ac;
  29908. font-size: 14px;
  29909. border-radius: 0 15px 15px 0;
  29910. z-index: 999;
  29911. }
  29912. .inter_box > iframe{
  29913. width: 100%;
  29914. height: 100%;
  29915. border: none;
  29916. }
  29917. .inter_setting{
  29918. display: block;
  29919. background-image: url(../../../assets/icon/course/setting.svg);
  29920. background-size: 100% 100%;
  29921. width: 20px;
  29922. height: 20px;
  29923. cursor: pointer;
  29924. margin-left: 10px;
  29925. }
  29926. .inter_setting_panel{
  29927. position: absolute;
  29928. left: 110px;
  29929. top: 30px;
  29930. background: #fff;
  29931. border-radius: 5px;
  29932. box-shadow: 0px 0px 2px 1px #00000017;
  29933. padding: 10px;
  29934. z-index: 999;
  29935. }
  29936. .panel_title{
  29937. text-align: center;
  29938. font-size: 18px;
  29939. margin-bottom: 10px;
  29940. }
  29941. .panel_tips{
  29942. font-weight: 500;
  29943. font-size: 14px;
  29944. text-align: center;
  29945. margin-bottom: 10px;
  29946. color: #6d6d6d;
  29947. }
  29948. .panel_input{
  29949. margin-bottom: 10px;
  29950. }
  29951. .panel_button{
  29952. display: flex;
  29953. justify-content: space-between;
  29954. }
  29955. .panel_input_record {
  29956. margin-top: 10px;
  29957. }
  29958. .panel_input_record > span{
  29959. margin-bottom: 5px;
  29960. display: block;
  29961. }
  29962. .custom-switch >>> .el-switch__label.is-active {
  29963. color: #0061FF;
  29964. }
  29965. .close_btn{
  29966. position: absolute;
  29967. top: 40px;
  29968. right: 10px;
  29969. box-shadow: 0 0 4px 2px #00000033;
  29970. border-radius: 70px 0 0 70px;
  29971. display: flex;
  29972. align-items: center;
  29973. padding-left: 5px;
  29974. padding: 10px 7px 10px 12px;
  29975. background: #fff;
  29976. cursor: pointer;
  29977. }
  29978. .close_btn > img {
  29979. width: 15px;
  29980. transition: 0.3s;
  29981. transform: rotate(0deg);
  29982. }
  29983. .close_btn_voice > img{
  29984. transform: rotate(180deg);
  29985. }
  29986. .resizable {
  29987. position: relative;
  29988. min-width: 350px; /* 最小宽度 */
  29989. max-width: 50%; /* 最大宽度 */
  29990. }
  29991. .resizer {
  29992. width: 12.8px;
  29993. height: 28.8px;
  29994. /* background: #ccc; */
  29995. position: absolute;
  29996. top: 50%;
  29997. left: 0;
  29998. cursor: ew-resize;
  29999. transform: translateY(-50%);
  30000. /* border-radius: 43px; */
  30001. background-image: url(../../../assets/icon/course/course_slide.png);
  30002. background-size: 100% 100%;
  30003. }
  30004. .pptBox{
  30005. position: fixed;
  30006. bottom: 10px;
  30007. left: 20px;
  30008. padding: 10px;
  30009. }
  30010. .pptBox > .box > div + div{
  30011. margin-top: 10px;
  30012. }
  30013. .ppClass{
  30014. background: #fff;
  30015. border-radius: 5px;
  30016. box-shadow: 0 0 6px 3px #00000030;
  30017. overflow: hidden;
  30018. }
  30019. .file-loading-class >>> .el-loading-spinner{
  30020. margin-top: -10px;
  30021. }
  30022. .file-loading-class >>> .el-loading-spinner .circular{
  30023. height: 20px;
  30024. width: 20px;
  30025. }
  30026. .button-toggle {
  30027. color: #007bff; /* 文本颜色 */
  30028. cursor: pointer; /* 鼠标悬停时显示手型 */
  30029. transition: color 0.2s; /* 文字颜色过渡效果 */
  30030. font-size: 14px;
  30031. }
  30032. .button-toggle:hover {
  30033. color: #0056b3; /* 悬停时的文字颜色 */
  30034. }
  30035. .button-toggle:focus {
  30036. outline: none; /* 去掉聚焦时的边框 */
  30037. }
  30038. .right_icon{
  30039. width: 12px;
  30040. height: 12px;
  30041. margin-left: 5px;
  30042. }
  30043. .buttonBoxB{
  30044. position: relative;
  30045. margin: 0 0 0 10px;
  30046. }
  30047. .buttonBoxB::after{
  30048. content: '';
  30049. display: block;
  30050. background-image: url(../../../assets/icon/course/downArrow.svg);
  30051. background-size: 100% 100%;
  30052. width: 15px;
  30053. height: 15px;
  30054. cursor: pointer;
  30055. margin-left: 5px;
  30056. }
  30057. .buttonBoxB:hover .buttonBox{
  30058. display: block;
  30059. }
  30060. .buttonBox {
  30061. position: absolute;
  30062. bottom: -0;
  30063. left: 0;
  30064. transform: translateY(100%);
  30065. background: #fff;
  30066. border-radius: 5px;
  30067. box-shadow: 0 0 3px 1px #e3e3e3;
  30068. width: 155px;
  30069. display: none;
  30070. z-index: 99999;
  30071. }
  30072. .buttonBox>div {
  30073. height: 40px;
  30074. line-height: 40px;
  30075. width: 100%;
  30076. text-align: center;
  30077. color: #000;
  30078. box-sizing: border-box;
  30079. }
  30080. .buttonBox>div+div {
  30081. border-top: 1px solid #e0e0e0;
  30082. }
  30083. .buttonBox>div:hover {
  30084. background: #f6f8ff;
  30085. }
  30086. .appendix_info_title {
  30087. padding: 15px 0 15px 0;
  30088. font-size: 20px;
  30089. font-weight: bold;
  30090. margin: 0 0 0 20px;
  30091. box-sizing: border-box;
  30092. display: flex;
  30093. align-items: center;
  30094. line-height: 20px;
  30095. }
  30096. .appendix_file_box{
  30097. width: 100%
  30098. }
  30099. .appendix_check_box{}
  30100. .appendix_check_box > div + div{
  30101. margin-top: 10px;
  30102. }
  30103. .appendix_check_task{
  30104. display: flex;
  30105. align-items: center;
  30106. }
  30107. .appendix_check_type{
  30108. display: flex;
  30109. align-items: center;
  30110. }
  30111. .appendix_check_task > span,
  30112. .appendix_check_type > span{
  30113. width: 100px;
  30114. }
  30115. .appendix_check_task > .checkButton,
  30116. .appendix_check_type > .checkButton{
  30117. border: 1px solid #1684fc;
  30118. color: #1684fc;
  30119. padding: 5px 10px;
  30120. border-radius: 5px;
  30121. margin-right: 10px;
  30122. cursor: pointer;
  30123. }
  30124. .appendix_check_task > .checkButton.checked,
  30125. .appendix_check_type > .checkButton.checked{
  30126. background: #1684fc;
  30127. color: #fff;
  30128. }
  30129. .appendix_check_all_box{
  30130. display: flex;
  30131. align-items: center;
  30132. margin-bottom: 5px;
  30133. }
  30134. .appendix_check_all{
  30135. display: flex;
  30136. align-items: center;
  30137. cursor: pointer;
  30138. }
  30139. .appendix_check_all_text{
  30140. margin-left: 5px;
  30141. }
  30142. .know_serach_box{
  30143. margin-bottom: 20px;
  30144. display: flex;
  30145. align-items: center;
  30146. }
  30147. .know_serach_box > span{
  30148. min-width: 100px;
  30149. }
  30150. .know_serach_box > .c_pub_button_add{
  30151. min-width: fit-content;
  30152. }
  30153. .add_chapters_check_box{
  30154. display: flex;
  30155. align-items: center;
  30156. height: 50px;
  30157. }
  30158. .add_chapters_check{
  30159. display: flex;
  30160. align-items: center;
  30161. cursor: pointer;
  30162. }
  30163. .Ovh{
  30164. width: 4em;
  30165. -webkit-line-clamp: 2;
  30166. text-align: center;
  30167. display: -webkit-box;
  30168. -webkit-box-orient: vertical;
  30169. overflow: hidden;
  30170. text-overflow: ellipsis;
  30171. }
  30172. </style>