addCourse.vue 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549
  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;gap: 5px;">
  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.ssUploadCover }}
  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.ssTeachClass }}</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.ssCollaborators }}</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: 230px;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: 230px;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.ssStage.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.ssStage.replace(/\*/g, index + 1)
  2867. }}</span>
  2868. <span v-else>{{ lang.ssStage.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.ssSelectTemp }}
  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.ssTool.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.ssInteract }}
  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.ssCognitive }}
  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.ssCoopType }}
  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.ssEval }}
  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.ssProgType }}
  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.ssSubject }}
  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.SelectLocalImage }}
  7081. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  7082. </button>
  7083. <!-- <div class="spanName">{{ lang.SelectLocalImage }}</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.SelectWebImage }}</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.SelectWebImage" :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.ssStage.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": this.lang.ssAiDetail,
  8107. "aiOutline": this.lang.ssAiOutline2,
  8108. "aiTask": this.lang.ssAiTask,
  8109. "aiDetail1": this.lang.ssAiDetail1,
  8110. "aiDetail2": this.lang.ssAiDetail2Alt,//和任务名:<任务名>:<任务描述>
  8111. "aiDetail3": this.lang.ssAiDetail3,
  8112. "aiDetail4": this.lang.ssAiDetail4,
  8113. "aiTeacher": this.lang.ssAiTeacher2,
  8114. "teacherDetail": this.lang.ssTeacherDet2,
  8115. "teacherDetail2": this.lang.ssTeacherDet2Alt
  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. mergedList: [
  8286. "3823a6a5-1b6e-11f0-a66a-005056924926",
  8287. "292e34dc-1b6e-11f0-a66a-005056924926",
  8288. "21d6b367-1b6e-11f0-a66a-005056924926",
  8289. "1a1a172d-1b6e-11f0-a66a-005056924926",
  8290. "1197f86b-1b6e-11f0-a66a-005056924926",
  8291. "f235659b-1b6d-11f0-a66a-005056924926",
  8292. "d87b62d3-1b6d-11f0-a66a-005056924926",
  8293. "c25ea59b-1b6d-11f0-a66a-005056924926",
  8294. ],
  8295. };
  8296. },
  8297. directives: {
  8298. autoHeight: {
  8299. update(el, binding) {
  8300. const { value } = binding;
  8301. if (value && typeof value === "number") {
  8302. el.style.height = `${value}px`;
  8303. } else {
  8304. el.style.height = "auto";
  8305. }
  8306. },
  8307. componentUpdated(el) {
  8308. el.style.height = `${el.scrollHeight + 25}px`;
  8309. },
  8310. },
  8311. },
  8312. computed: {
  8313. // rightBoxHeight: function () {
  8314. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8315. // },
  8316. offsetLetfPx: function () {
  8317. //addnum可以直接在模板语法里面用,相当于data内的值
  8318. return (
  8319. $(".cru_select")[this.unitIndex] &&
  8320. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8321. );
  8322. },
  8323. getMan2() {
  8324. return function (people) {
  8325. let _people = people;
  8326. let _people2 = "";
  8327. if (this.ManAarray.length) {
  8328. for (var i = 0; i < this.ManAarray.length; i++) {
  8329. if (this.ManAarray[i].userid == people) {
  8330. _people2 = this.ManAarray[i].name;
  8331. break;
  8332. }
  8333. }
  8334. }
  8335. if (people == this.courseUserid) {
  8336. return "";
  8337. }
  8338. return this.ManAarray.length ? _people2 : "";
  8339. };
  8340. },
  8341. getListMan2() {
  8342. return function (list) {
  8343. console.log('getListMan2',list);
  8344. let _people2 = [];
  8345. if (this.ManAarray.length) {
  8346. list.slice(0, 10).forEach(people => {
  8347. let name = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid).name || "";
  8348. if (name) {
  8349. _people2.push(name);
  8350. }
  8351. });
  8352. }
  8353. return _people2.join("、");
  8354. };
  8355. },
  8356. isInvite() {
  8357. return function (cid) {
  8358. let array = [];
  8359. for (var i = 0; i < this.inviteCode.length; i++) {
  8360. array.push(this.inviteCode[i].cid);
  8361. }
  8362. return array.indexOf(cid) != -1;
  8363. };
  8364. },
  8365. getInviteCodeC() {
  8366. return function (cid) {
  8367. let array = [];
  8368. for (var i = 0; i < this.inviteCode.length; i++) {
  8369. array.push(this.inviteCode[i].cid);
  8370. }
  8371. return this.inviteCode[array.indexOf(cid)].ic;
  8372. };
  8373. },
  8374. getClassC() {
  8375. return function (c) {
  8376. let _c2 = "";
  8377. if (this.grade.length) {
  8378. for (var i = 0; i < this.grade.length; i++) {
  8379. if (this.grade[i].id == c) {
  8380. _c2 = this.grade[i].name;
  8381. break;
  8382. }
  8383. }
  8384. }
  8385. return this.grade.length ? _c2 : "";
  8386. };
  8387. },
  8388. getListClassC() {
  8389. return function (list) {
  8390. let _c2 = [];
  8391. if (this.grade.length) {
  8392. for (var j = 0; j < list.length; j++) {
  8393. let c = list[j];
  8394. for (var i = 0; i < this.grade.length; i++) {
  8395. if (this.grade[i].id == c) {
  8396. _c2.push(this.grade[i].name);
  8397. break;
  8398. }
  8399. }
  8400. }
  8401. }
  8402. return this.grade.length ? _c2.join("、") : "";
  8403. };
  8404. },
  8405. MarkdownT() {
  8406. return function (c) {
  8407. let md = new MarkdownIt();
  8408. return c
  8409. ? md.render(c) : "";
  8410. };
  8411. },
  8412. panOutline(){
  8413. return function () {
  8414. let count = 0;
  8415. for(var i = 0; i < this.unitJson.length; i++){
  8416. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8417. for(var j = 0; j < _task.length; j++){
  8418. if(_task[j].taskDetail2){
  8419. count++
  8420. }
  8421. }
  8422. }
  8423. return count;
  8424. };
  8425. },
  8426. panTeacher(){
  8427. return function () {
  8428. let count = 0;
  8429. for(var i = 0; i < this.unitJson.length; i++){
  8430. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8431. for(var j = 0; j < _task.length; j++){
  8432. if(_task[j].taskDetail3){
  8433. count++
  8434. }
  8435. }
  8436. }
  8437. return count;
  8438. };
  8439. },
  8440. panTask(){
  8441. return function () {
  8442. let count = 0;
  8443. for(var i = 0; i < this.unitJson.length; i++){
  8444. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8445. for(var j = 0; j < _task.length; j++){
  8446. if(_task[j].taskDetail){
  8447. count++
  8448. }
  8449. }
  8450. }
  8451. return count;
  8452. };
  8453. },
  8454. panElist(){
  8455. return function (array) {
  8456. let count = 0;
  8457. for(var i = 0; i < array.toolChoose.length; i++){
  8458. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8459. count++
  8460. }
  8461. }
  8462. return count;
  8463. };
  8464. },
  8465. panTaskElist(){
  8466. return function () {
  8467. let count = 0;
  8468. for(var i = 0; i < this.unitJson.length; i++){
  8469. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8470. for(var j = 0; j < _task.length; j++){
  8471. if(_task[j].eList && _task[j].eList.length){
  8472. count++
  8473. }
  8474. }
  8475. }
  8476. return count;
  8477. };
  8478. },
  8479. panEvaCont(){
  8480. return function () {
  8481. let count = 0;
  8482. for(var i = 0; i < this.unitJson.length; i++){
  8483. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8484. for(var j = 0; j < _task.length; j++){
  8485. let tool = _task[j].toolChoose
  8486. for(var k = 0; k < tool.length; k++){
  8487. if(tool[k].eList && tool[k].eList.length){
  8488. count++
  8489. }
  8490. }
  8491. }
  8492. }
  8493. return count;
  8494. };
  8495. },
  8496. dataCheckPan(){
  8497. return function (fileid) {
  8498. for(let i = 0; i < this.infoData.length; i++){
  8499. if(this.infoData[i].fileid == fileid){
  8500. return true
  8501. }
  8502. }
  8503. return false;
  8504. };
  8505. },
  8506. interUrl: function () {
  8507. let agentid = this.aiJson.agentid
  8508. let sagentid = this.aiJson.sagentid
  8509. let url = ''
  8510. if(sagentid){
  8511. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8512. }else{
  8513. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8514. }
  8515. return url;
  8516. },
  8517. panPptCount(){
  8518. return function () {
  8519. let ppts = 0
  8520. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8521. let ppt = this.$refs['ppt'+i]
  8522. if(ppt && ppt[0].tanDialog){
  8523. ppts++
  8524. }
  8525. }
  8526. if(!this.pptCount.length){
  8527. this.pptBoxDialog = false
  8528. }
  8529. return ppts;
  8530. };
  8531. },
  8532. panDanTool(){
  8533. return function (array) {
  8534. let count = 0;
  8535. for(var i = 0; i < array.toolChoose.length; i++){
  8536. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8537. count++
  8538. }
  8539. }
  8540. return count;
  8541. };
  8542. },
  8543. panDanToolEva(){
  8544. return function (array) {
  8545. let count = 0;
  8546. let tool = array.toolChoose
  8547. for(var k = 0; k < tool.length; k++){
  8548. if(tool[k].eList && tool[k].eList.length){
  8549. count++
  8550. }
  8551. }
  8552. return count;
  8553. };
  8554. },
  8555. panTool(){
  8556. return function () {
  8557. let count = 0;
  8558. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8559. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8560. for(var i = 0; i < array.toolChoose.length; i++){
  8561. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8562. count++
  8563. }
  8564. }
  8565. }
  8566. return count;
  8567. };
  8568. },
  8569. allFile(){
  8570. return function (type) {
  8571. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8572. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8573. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8574. for(var j = 0; j < _task.chapterData.length; j++){
  8575. if(_task.chapterData[j].type == 3){
  8576. file.push({..._task.chapterData[j], tool:j, task:i});
  8577. }
  8578. }
  8579. }
  8580. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8581. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8582. if(this.appendixTaskCheck != 'all' && type != '2'){
  8583. 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)));
  8584. }
  8585. if(this.appendixTypeCheck != 'all' && type != '2'){
  8586. if(this.appendixTypeCheck == 0){
  8587. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssLessonPlan));
  8588. }else if(this.appendixTypeCheck == 1){
  8589. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8590. }else if(this.appendixTypeCheck == 2){
  8591. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssStudyPlan));
  8592. }else if(this.appendixTypeCheck == 3){
  8593. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssEvalSuffix));
  8594. }else if(this.appendixTypeCheck == 4){
  8595. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8596. }
  8597. }
  8598. return uniqueFile;
  8599. };
  8600. },
  8601. panAppendixCheckAll(){
  8602. return function(){
  8603. let files = this.allFile();
  8604. let count = 0
  8605. for(var i = 0; i < files.length; i++){
  8606. if(this.appendixFiles.includes(files[i].url)){
  8607. count++
  8608. }
  8609. }
  8610. if (count == files.length) {
  8611. return true
  8612. }else {
  8613. false
  8614. }
  8615. }
  8616. },
  8617. getTypeC(){
  8618. return function(index){
  8619. let sub = []
  8620. let grade = []
  8621. if (this.courseTypeId.length) {
  8622. for (var i = 0; i < this.courseTypeId.length; i++) {
  8623. let _sid = this.courseTypeId[i]
  8624. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8625. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8626. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8627. }
  8628. }
  8629. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8630. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8631. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8632. }
  8633. }
  8634. }
  8635. }
  8636. if(index == 1){
  8637. return sub
  8638. }else if(index == 2){
  8639. return grade
  8640. }
  8641. }
  8642. },
  8643. getFileType(){
  8644. return function (name) {
  8645. let fileType = this.getKnowType();
  8646. for (let type of fileType) {
  8647. if (converter(name).includes(type)) {
  8648. return type; // 判断name中是否包含对应的文件类型
  8649. }
  8650. }
  8651. return this.lang.ssOther;
  8652. };
  8653. },
  8654. allknowInfoData3(){
  8655. return function () {
  8656. let knowInfoData = this.knowInfoData3;
  8657. if(this.knowFileType){
  8658. // if(converter(this.knowFileType) == '其他'){
  8659. // let fileType = this.getKnowType().filter(item => item != '其他');
  8660. // knowInfoData = knowInfoData.filter(item => {
  8661. // return !fileType.some(type => converter(item.name).includes(type));
  8662. // });
  8663. // }else{
  8664. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8665. // }
  8666. }
  8667. if(this.knowFileType1){
  8668. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8669. }
  8670. if(this.knowFileType2){
  8671. 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)))))
  8672. }
  8673. return knowInfoData;
  8674. };
  8675. },
  8676. getKnowType(){
  8677. return function () {
  8678. let knowInfoData = this.knowInfoData3;
  8679. let array = []
  8680. for(var i = 0; i < knowInfoData.length; i++){
  8681. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8682. array.push(knowInfoData[i].file_type)
  8683. }
  8684. }
  8685. return array;
  8686. };
  8687. },
  8688. panknowInfoData3CheckAll(){
  8689. return function(){
  8690. let files = this.allknowInfoData3();
  8691. let count = 0
  8692. for(var i = 0; i < files.length; i++){
  8693. if(this.knowFileids3.includes(files[i].url)){
  8694. count++
  8695. }
  8696. }
  8697. if (count == files.length) {
  8698. return true
  8699. }else {
  8700. false
  8701. }
  8702. }
  8703. },
  8704. },
  8705. watch: {
  8706. unitIndex(newValue, oldValue) {
  8707. // return;
  8708. if (this.isDelete == 2) {
  8709. this.isDelete = 1;
  8710. return;
  8711. }
  8712. if (this.cid != "") {
  8713. let _unitIndex = oldValue;
  8714. if (
  8715. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8716. JSON.stringify(this.unitJson[_unitIndex])
  8717. ) {
  8718. this.$refs.rightboxR.scrollTop = 0;
  8719. return;
  8720. }
  8721. let cPan = 1;
  8722. for (
  8723. var j = 0;
  8724. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8725. j++
  8726. ) {
  8727. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8728. j
  8729. ].proVisible = false;
  8730. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8731. j
  8732. ].proVisible2 = false;
  8733. if (
  8734. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8735. .length > 1
  8736. ) {
  8737. for (
  8738. var z = 0;
  8739. z <
  8740. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8741. .length;
  8742. z++
  8743. ) {
  8744. if (
  8745. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8746. .toolChoose[z].tool.length
  8747. ) {
  8748. this.$message.error(this.lang.ssAddToolFull);
  8749. cPan = 2;
  8750. break;
  8751. }
  8752. }
  8753. }
  8754. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8755. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8756. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8757. (ele) => {
  8758. return ele.value != "" || ele.detail != "" || ele.target != "";
  8759. }
  8760. );
  8761. }
  8762. }
  8763. if (cPan == 2) {
  8764. this.unitIndex = oldValue;
  8765. return;
  8766. }
  8767. for (var i = 0; i < this.unitJson.length; i++) {
  8768. if (this.addindex != i) {
  8769. delete this.unitJson[i].isUpdate;
  8770. }
  8771. }
  8772. this.$refs.rightboxR.scrollTop = 0;
  8773. this.addindex = -1;
  8774. let params = [
  8775. {
  8776. cid: this.cid,
  8777. chapters: JSON.stringify(this.unitJson),
  8778. uid: this.userid,
  8779. unitIndex: _unitIndex,
  8780. },
  8781. ];
  8782. this.ajax
  8783. .post(this.$store.state.api + "updateWorkNew4", params)
  8784. .then((res) => {
  8785. // this.$message({
  8786. // message: this.lang.UpdateSuccessful,
  8787. // type: "success",
  8788. // });
  8789. // this.courseId = this.cid;
  8790. this.addtips()
  8791. })
  8792. .catch((err) => {
  8793. this.$message.error(this.lang.ssNetPoor);
  8794. console.error(err);
  8795. });
  8796. }
  8797. },
  8798. steps(newValue, old) {
  8799. if(newValue == 2){
  8800. this.steps = old
  8801. }
  8802. if (newValue == 4) {
  8803. let cPan = 1;
  8804. for (var i = 0; i < this.unitJson.length; i++) {
  8805. for (
  8806. var j = 0;
  8807. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8808. j++
  8809. ) {
  8810. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8811. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8812. if (
  8813. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8814. ) {
  8815. for (
  8816. var z = 0;
  8817. z <
  8818. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8819. z++
  8820. ) {
  8821. if (
  8822. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8823. .tool.length
  8824. ) {
  8825. this.$message.error(this.lang.ssAddToolFull);
  8826. cPan = 2;
  8827. break;
  8828. }
  8829. }
  8830. }
  8831. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8832. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8833. i
  8834. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8835. return ele.value != "" || ele.detail != "" || ele.target != "";
  8836. });
  8837. }
  8838. }
  8839. }
  8840. this.inputShow = true;
  8841. if (cPan == 2) {
  8842. this.steps = old;
  8843. return;
  8844. }
  8845. this.goTo(
  8846. "/course?userid=" +
  8847. this.userid +
  8848. "&oid=" +
  8849. this.oid +
  8850. "&org=" +
  8851. this.org +
  8852. "&role=" +
  8853. this.role
  8854. );
  8855. }
  8856. },
  8857. courseName(newVal, oldVal) {
  8858. this.setCourseInfo();
  8859. },
  8860. courseTypeId: {
  8861. immediate: true,
  8862. deep: true,
  8863. handler(newValue, oldValue) {
  8864. this.setCourseInfo();
  8865. }
  8866. },
  8867. knowFileids(newVal, oldVal) {
  8868. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8869. },
  8870. knowFileids2(newVal, oldVal) {
  8871. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8872. },
  8873. },
  8874. methods: {
  8875. tableRowClassName({ row, rowIndex }) {
  8876. if ((rowIndex + 1) % 2 === 0) {
  8877. return "even_row";
  8878. } else {
  8879. return "";
  8880. }
  8881. },
  8882. close() {
  8883. this.cetIndex = "";
  8884. this.cettIndex = "";
  8885. this.templateName = "";
  8886. this.cetBoxDialog = false;
  8887. },
  8888. openAI() {
  8889. window.topU.postMessage({ tools: "64" }, "*");
  8890. },
  8891. setMan() {
  8892. // let teacherJuri = this.teacherJuri2;
  8893. this.ManAarray = [];
  8894. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8895. if (_user.indexOf(this.userid) == -1) {
  8896. _user.push(this.userid);
  8897. }
  8898. if (_user.indexOf(this.courseUserid) == -1) {
  8899. _user.push(this.courseUserid);
  8900. }
  8901. let params = [{
  8902. uid: _user.join(","),
  8903. }];
  8904. this.ajax
  8905. .post(this.$store.state.api + "getAllUserByIdP", params)
  8906. .then((res) => {
  8907. let teacherJuri = res.data[0];
  8908. this.ManAarray = teacherJuri;
  8909. })
  8910. .catch((err) => {
  8911. console.error(err);
  8912. });
  8913. },
  8914. previewImg(url) {
  8915. this.$hevueImgPreview(url);
  8916. },
  8917. btnDisplay(bool) {
  8918. this.isBtnDisplay = bool;
  8919. },
  8920. stepDisplay(bool) {
  8921. this.isStepDisplay = bool;
  8922. },
  8923. scrollChange() {
  8924. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8925. },
  8926. addHw(e) {
  8927. var el = e.currentTarget;
  8928. el.getElementsByTagName("input")[0].click();
  8929. },
  8930. change(val) {
  8931. if (this.dialogVisible1) {
  8932. this.tdetail = val;
  8933. } else if (this.dialogVisible6) {
  8934. this.AttText.text = val;
  8935. } else if (this.dialogVisible2) {
  8936. this.cTemplate = val;
  8937. } else if (this.dialogVisibleTable) {
  8938. this.tableJson.text = val;
  8939. }
  8940. this.$forceUpdate();
  8941. console.log(val);
  8942. },
  8943. change2(val) {
  8944. console.log(val);
  8945. this.$forceUpdate();
  8946. },
  8947. handleClose(done) {
  8948. done();
  8949. },
  8950. closePan(tool) {
  8951. if (tool == 15) {
  8952. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8953. this.dialogVisible8 = false;
  8954. } else {
  8955. this.closeConfirm(tool);
  8956. }
  8957. } else if (tool == 4) {
  8958. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8959. this.dialogVisible5 = false;
  8960. } else {
  8961. this.closeConfirm(tool);
  8962. }
  8963. } else if (tool == 45) {
  8964. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8965. this.dialogVisibleChoice = false;
  8966. } else {
  8967. this.closeConfirm(tool);
  8968. }
  8969. } else if (tool == 41) {
  8970. if (
  8971. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8972. ) {
  8973. this.dialogVisibleSelect = false;
  8974. } else {
  8975. this.closeConfirm(tool);
  8976. }
  8977. } else if (tool == 47) {
  8978. if (
  8979. JSON.stringify(this.sentenceList) ==
  8980. JSON.stringify(this.sentenceList2)
  8981. ) {
  8982. this.dialogVisibleSentence = false;
  8983. } else {
  8984. this.closeConfirm(tool);
  8985. }
  8986. } else if (tool == 69) {
  8987. if (
  8988. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8989. ) {
  8990. this.englishDialogVisible = false;
  8991. } else {
  8992. this.closeConfirm(tool);
  8993. }
  8994. }
  8995. },
  8996. closeConfirm(tool) {
  8997. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  8998. confirmButtonText: this.lang.ssSave,
  8999. cancelButtonText: this.lang.ssNotSave,
  9000. type: "warning",
  9001. })
  9002. .then(() => {
  9003. if (tool == 15) {
  9004. this.addAnswer();
  9005. } else if (tool == 4) {
  9006. this.addAsk();
  9007. } else if (tool == 45) {
  9008. this.addTest();
  9009. } else if (tool == 41) {
  9010. this.addSelectAnswer();
  9011. } else if (tool == 47) {
  9012. this.addSentenceTool();
  9013. } else if (tool == 69) {
  9014. this.addEnglish();
  9015. }
  9016. })
  9017. .catch(() => {
  9018. if (tool == 15) {
  9019. this.dialogVisible8 = false;
  9020. } else if (tool == 4) {
  9021. this.dialogVisible5 = false;
  9022. } else if (tool == 45) {
  9023. this.dialogVisibleChoice = false;
  9024. } else if (tool == 41) {
  9025. this.dialogVisibleSelect = false;
  9026. } else if (tool == 47) {
  9027. this.dialogVisibleSentence = false;
  9028. } else if (tool == 69) {
  9029. this.englishDialogVisible = false;
  9030. }
  9031. });
  9032. },
  9033. addEnglish(jsonType) {
  9034. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  9035. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  9036. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  9037. if (
  9038. this.englishList.engTitle == "" ||
  9039. this.englishList.englishText == ""
  9040. ) {
  9041. this.$message.error(this.lang.ssFillComplete);
  9042. return;
  9043. }
  9044. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9045. this.taskCount
  9046. ].toolChoose[this.toolIndex].englishList = this.englishList;
  9047. this.englishList = {};
  9048. if (jsonType && jsonType == 1) {
  9049. this.englishDialogVisible = true;
  9050. } else {
  9051. this.englishDialogVisible = false;
  9052. }
  9053. if (
  9054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9055. .toolChoose[this.toolIndex].tool != 69
  9056. ) {
  9057. this.addTools(69, this.taskCount, this.toolIndex);
  9058. }
  9059. },
  9060. imgChange2(i, j) {
  9061. var _tmp = this.testJson.testJson[i].checkList[j];
  9062. this.noneBtnImg = _tmp.length >= 1;
  9063. },
  9064. imgChange3(i) {
  9065. var _tmp = this.testJson.testJson[i];
  9066. this.noneBtnImg = _tmp.length >= 1;
  9067. },
  9068. imgChange1(file, fileList, type, itemTaskIndex) {
  9069. if (type == 1) {
  9070. var _tmp = this.cover;
  9071. } else if (
  9072. type == 2 ||
  9073. type == 3 ||
  9074. type == 6 ||
  9075. type == 7 ||
  9076. type == 8
  9077. ) {
  9078. var _tmp =
  9079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9080. .chapterData;
  9081. } else if (type == 4) {
  9082. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  9083. } else {
  9084. var _tmp =
  9085. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9086. .homeworkList;
  9087. }
  9088. this.noneBtnImg = _tmp.length >= 1;
  9089. },
  9090. goTo(path) {
  9091. this.$router.push(path);
  9092. },
  9093. guid() {
  9094. var _num,
  9095. i,
  9096. _guid = "";
  9097. for (i = 0; i < 32; i++) {
  9098. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  9099. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  9100. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  9101. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  9102. _guid += "-";
  9103. }
  9104. }
  9105. return _guid;
  9106. },
  9107. retrunCourse() {
  9108. if(this.istemplate == 1){
  9109. this.goTo(
  9110. "/course?userid=" +
  9111. this.userid +
  9112. "&oid=" +
  9113. this.oid +
  9114. "&org=" +
  9115. this.org +
  9116. "&role=" +
  9117. this.role
  9118. );
  9119. return
  9120. }
  9121. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  9122. confirmButtonText: this.lang.ssSave,
  9123. cancelButtonText: this.lang.ssNotSave,
  9124. distinguishCancelAndClose: true,
  9125. type: "warning",
  9126. customClass: 'custom-confirm-box'
  9127. })
  9128. .then(() => {
  9129. if (this.taskLoading.length) {
  9130. let _pan = 1
  9131. for(var k = 0; k < this.taskLoading.length; k++){
  9132. if(this.taskLoading[k]){
  9133. this.$message({
  9134. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9135. type: "warning"
  9136. });
  9137. _pan = 2
  9138. }
  9139. }
  9140. if(_pan == 2){
  9141. return
  9142. }
  9143. }
  9144. if(this.taskGLoading.length){
  9145. let _pan = 1
  9146. for(var k = 0; k < this.taskGLoading.length; k++){
  9147. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9148. this.$message({
  9149. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9150. type: "warning"
  9151. });
  9152. _pan = 2
  9153. }
  9154. }
  9155. if(_pan == 2){
  9156. return
  9157. }
  9158. }
  9159. let pan2 = 1
  9160. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9161. for(var index = 0; index < taskJson.length; index++){
  9162. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9163. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9164. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9165. this.$message({
  9166. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9167. type: "warning"
  9168. });
  9169. pan2 = 2
  9170. }
  9171. }
  9172. }
  9173. }
  9174. if(pan2 == 2){
  9175. return
  9176. }
  9177. if (this.cid == "" || this.cid == undefined) {
  9178. if (this.courseName == "") {
  9179. this.$message.error(this.lang.ssFillCourseName);
  9180. return;
  9181. } else {
  9182. this.addWork();
  9183. }
  9184. this.steps = 4;
  9185. } else {
  9186. if (this.courseName == "") {
  9187. this.$message.error(this.lang.ssFillCourseName);
  9188. return;
  9189. } else {
  9190. if (this.userid != this.courseUserid && this.role != "1") {
  9191. this.updateWork2();
  9192. } else {
  9193. this.updateWork();
  9194. }
  9195. this.steps = 4;
  9196. }
  9197. }
  9198. })
  9199. .catch((v) => {
  9200. console.log(v);
  9201. if (v == "cancel") {
  9202. this.goTo(
  9203. "/course?userid=" +
  9204. this.userid +
  9205. "&oid=" +
  9206. this.oid +
  9207. "&org=" +
  9208. this.org +
  9209. "&role=" +
  9210. this.role
  9211. );
  9212. }
  9213. });
  9214. setTimeout(() => {
  9215. this.setTipsIndex()
  9216. }, 500)
  9217. },
  9218. lastSteps() {
  9219. if (this.steps == 4) {
  9220. this.goTo(
  9221. "/course?userid=" +
  9222. this.userid +
  9223. "&oid=" +
  9224. this.oid +
  9225. "&org=" +
  9226. this.org +
  9227. "&role=" +
  9228. this.role
  9229. );
  9230. } else {
  9231. // if (this.cidType == 0) {
  9232. // this.steps--;
  9233. // if (this.steps == 1) {
  9234. // setTimeout(() => {
  9235. // this.checkEva(this.checkId);
  9236. // setTimeout(() => {
  9237. // this.checkEva(this.checkId);
  9238. // }, 100);
  9239. // }, 100);
  9240. // }
  9241. // } else {
  9242. if (this.steps == 3) {
  9243. this.steps = 1;
  9244. setTimeout(() => {
  9245. this.checkEva(this.checkId);
  9246. setTimeout(() => {
  9247. this.checkEva(this.checkId);
  9248. }, 100);
  9249. }, 100);
  9250. }
  9251. // }
  9252. }
  9253. },
  9254. navSteps(s) {
  9255. if (this.courseName == "") {
  9256. this.$message.error(this.lang.ssFillCourseName);
  9257. return;
  9258. }
  9259. if (this.cidType == 0) {
  9260. if (this.steps == 1) {
  9261. if (this.cid == "" || this.cid == undefined) {
  9262. this.addWork();
  9263. } else {
  9264. if (this.userid != this.courseUserid && this.role != "1") {
  9265. this.updateWork2();
  9266. } else {
  9267. this.updateWork();
  9268. }
  9269. }
  9270. }
  9271. if (s == 1) {
  9272. this.steps = 1;
  9273. setTimeout(() => {
  9274. this.checkEva(this.checkId);
  9275. setTimeout(() => {
  9276. this.checkEva(this.checkId);
  9277. }, 100);
  9278. }, 100);
  9279. }
  9280. if (s == 2) {
  9281. this.steps = 2;
  9282. }
  9283. if (s == 3) {
  9284. this.cTemplate = this.templateC.content;
  9285. this.dialogVisible2 = false;
  9286. this.steps = 3;
  9287. this.isClickColor = 1;
  9288. this.unitJson[
  9289. this.unitIndex
  9290. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9291. this.$forceUpdate();
  9292. setTimeout(() => {
  9293. this.checkEva(this.checkId);
  9294. setTimeout(() => {
  9295. this.checkEva(this.checkId);
  9296. }, 100);
  9297. }, 1000);
  9298. }
  9299. } else {
  9300. if (this.steps == 1) {
  9301. if (this.cid == "" || this.cid == undefined) {
  9302. this.addWork();
  9303. } else {
  9304. if (this.userid != this.courseUserid && this.role != "1") {
  9305. this.updateWork2();
  9306. } else {
  9307. this.updateWork();
  9308. }
  9309. }
  9310. }
  9311. if (s == 1) {
  9312. this.steps = 1;
  9313. setTimeout(() => {
  9314. this.checkEva(this.checkId);
  9315. setTimeout(() => {
  9316. this.checkEva(this.checkId);
  9317. }, 100);
  9318. }, 100);
  9319. }
  9320. if (s == 3) {
  9321. this.cTemplate = this.templateC.content;
  9322. this.dialogVisible2 = false;
  9323. this.steps = 3;
  9324. this.isClickColor = 1;
  9325. this.unitJson[
  9326. this.unitIndex
  9327. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9328. this.$forceUpdate();
  9329. setTimeout(() => {
  9330. this.checkEva(this.checkId);
  9331. setTimeout(() => {
  9332. this.checkEva(this.checkId);
  9333. }, 100);
  9334. }, 1000);
  9335. }
  9336. }
  9337. this.$refs.stepBox.scrollTop = 0;
  9338. },
  9339. setTipsIndex(){
  9340. // 使用 setTimeout 确保对话框已经渲染完成
  9341. this.$nextTick(() => {
  9342. const dialog = document.querySelector('.custom-confirm-box');
  9343. if (dialog) {
  9344. const parent = dialog.parentElement;
  9345. if (parent) {
  9346. parent.style.zIndex = 9999999;
  9347. const adjacentElement = parent.nextElementSibling;
  9348. if (adjacentElement) {
  9349. adjacentElement.style.zIndex = 9999998;
  9350. }
  9351. }
  9352. }
  9353. });
  9354. },
  9355. nextSteps(clickType, ttype) {
  9356. if(!this.time()){
  9357. return
  9358. }
  9359. // if (this.cidType == 1) {
  9360. if (this.steps == 1) {
  9361. if (this.courseName != "") {
  9362. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9363. // this.$message({
  9364. // message: "请回答完毕后再次发送",
  9365. // type: "warning"
  9366. // });
  9367. if(this.ttaskDetailLoading.length){
  9368. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9369. this.$message({
  9370. message: this.lang.ssGenOutTaskDesc.replace(/\*/g, num),
  9371. type: "warning"
  9372. });
  9373. }
  9374. if(this.cpotetLoading.cpote1){
  9375. this.$message({
  9376. message: this.lang.ssCpoteNotGen,
  9377. type: "warning"
  9378. });
  9379. }
  9380. if(this.cpotetLoading.cpote2){
  9381. this.$message({
  9382. message: this.lang.ssQChainNotGen,
  9383. type: "warning"
  9384. });
  9385. }
  9386. if(this.cpotetLoading.cpote3){
  9387. this.$message({
  9388. message: this.lang.ssTargetNotGen,
  9389. type: "warning"
  9390. });
  9391. }
  9392. if(this.cpotetLoading.cpote4){
  9393. this.$message({
  9394. message: this.lang.ssTaskClusNotGen,
  9395. type: "warning"
  9396. });
  9397. }
  9398. return;
  9399. }
  9400. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9401. if(!this.courseText && !this.teacherCourseText){
  9402. this.$message.error(this.lang.ssGenDescFirst);
  9403. return;
  9404. }
  9405. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9406. this.openAiDialog(clickType, 'aiOutline2')
  9407. if(clickType == 1){
  9408. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9409. }else {
  9410. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9411. }
  9412. }else {
  9413. this.openAiDialog(clickType, 'aiOutline')
  9414. if(clickType == 1){
  9415. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9416. }else {
  9417. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9418. }
  9419. }
  9420. return;
  9421. }
  9422. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9423. let _type = ''
  9424. if(this.cpoteType == 0){
  9425. _type = 'aiCpote1'
  9426. if(clickType == 1){
  9427. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9428. }else {
  9429. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9430. }
  9431. }else if(this.cpoteType == 1){
  9432. _type = 'aiCpote2'
  9433. if(clickType == 1){
  9434. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9435. }else {
  9436. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9437. }
  9438. }else if(this.cpoteType == 2){
  9439. _type = 'aiCpote3'
  9440. if(clickType == 1){
  9441. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9442. }else {
  9443. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9444. }
  9445. }else if(this.cpoteType == 3){
  9446. _type = 'aiCpote4'
  9447. if(clickType == 1){
  9448. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9449. }else {
  9450. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9451. }
  9452. }
  9453. this.cpoteType++
  9454. this.openAiDialog(clickType, _type)
  9455. return;
  9456. }
  9457. // if (!this.isOutline2) {
  9458. // this.openAiDialog(clickType, 'aiTeacher')
  9459. // return;
  9460. // }
  9461. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9462. this.openAiDialog(clickType, 'aiTeacher3')
  9463. if(clickType == 1){
  9464. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9465. }else {
  9466. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9467. }
  9468. return;
  9469. }
  9470. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9471. this.openAiDialog(clickType, 'aiTeacher2')
  9472. if(clickType == 1){
  9473. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9474. }else {
  9475. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9476. }
  9477. return;
  9478. }
  9479. let _pan2 = 1
  9480. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9481. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9482. _pan2 = 2
  9483. this.$message.error(this.lang.ssPerfectOut.replace(/\*/g, k+1))
  9484. break;
  9485. }
  9486. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9487. _pan2 = 2
  9488. this.$message.error(this.lang.ssPerfectPlan.replace(/\*/g, k+1))
  9489. break;
  9490. }
  9491. }
  9492. if(_pan2 == 2){
  9493. return;
  9494. }
  9495. const functionA = () => {
  9496. setTimeout(() => {
  9497. this.loading = false
  9498. this.steps = 3;
  9499. }, 0)
  9500. this.isClickColor = 1;
  9501. this.unitJson[
  9502. this.unitIndex
  9503. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9504. this.$forceUpdate();
  9505. setTimeout(() => {
  9506. this.checkEva(this.checkId);
  9507. setTimeout(() => {
  9508. this.checkEva(this.checkId);
  9509. }, 100);
  9510. }, 1000);
  9511. if (this.cid == "" || this.cid == undefined) {
  9512. this.addWork();
  9513. } else {
  9514. if (this.userid != this.courseUserid && this.role != "1") {
  9515. this.updateWork2();
  9516. } else {
  9517. this.updateWork();
  9518. }
  9519. }
  9520. }
  9521. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9522. if(this.ttaskDetailLoading5.length){
  9523. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9524. // this.$message({
  9525. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9526. // type: "warning"
  9527. // });
  9528. this.$confirm(this.lang.ssPlanNotGen, this.lang.ssTip, {
  9529. confirmButtonText: this.lang.ssConfirm,
  9530. cancelButtonText: this.lang.ssCancel,
  9531. distinguishCancelAndClose: true,
  9532. type: "warning",
  9533. customClass: 'custom-confirm-box'
  9534. })
  9535. .then(() => {
  9536. if(this.isTeacherTaskCancelToken2){
  9537. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9538. if(this.isTeacherTaskCancelToken2[i]){
  9539. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9540. this.isTeacherTaskCancelToken2[i] = null;
  9541. }
  9542. }
  9543. }
  9544. this.taskDetailLoading5 = []
  9545. this.ttaskDetailLoading5 = []
  9546. if(this.isTeacherTaskCancelSource){
  9547. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9548. if(this.isTeacherTaskCancelSource[i]){
  9549. this.isTeacherTaskCancelSource[i].close()
  9550. this.isTeacherTaskCancelSource[i] = null
  9551. }
  9552. }
  9553. }
  9554. if (this.cid) {
  9555. this.loading = true
  9556. functionA()
  9557. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9558. } else {
  9559. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9560. if(clickType == 1){
  9561. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9562. }else {
  9563. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9564. }
  9565. }
  9566. }).catch((v) => {
  9567. console.log(v);
  9568. })
  9569. setTimeout(() => {
  9570. this.setTipsIndex()
  9571. }, 500)
  9572. }
  9573. return;
  9574. }
  9575. if (this.cid && this.panTask() > 0) {
  9576. this.loading = true
  9577. functionA()
  9578. } else {
  9579. // if(ttype == 2){
  9580. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9581. // }else {
  9582. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9583. // }
  9584. }
  9585. } else {
  9586. this.$message.error(this.lang.ssFillCourseName);
  9587. return;
  9588. }
  9589. } else if (this.steps == 3) {
  9590. if (this.taskLoading.length) {
  9591. let _pan = 1
  9592. for(var k = 0; k < this.taskLoading.length; k++){
  9593. if(this.taskLoading[k]){
  9594. this.$message({
  9595. message: this.lang.ssWaitTaskUp.replace(/\*/g, k+1),
  9596. type: "warning"
  9597. });
  9598. _pan = 2
  9599. }
  9600. }
  9601. if(_pan == 2){
  9602. return
  9603. }
  9604. }
  9605. if(this.taskGLoading.length){
  9606. let _pan = 1
  9607. for(var k = 0; k < this.taskGLoading.length; k++){
  9608. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9609. this.$message({
  9610. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9611. type: "warning"
  9612. });
  9613. _pan = 2
  9614. }
  9615. }
  9616. if(_pan == 2){
  9617. return
  9618. }
  9619. }
  9620. let pan2 = 1
  9621. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9622. for(var index = 0; index < taskJson.length; index++){
  9623. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9624. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9625. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9626. this.$message({
  9627. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9628. type: "warning"
  9629. });
  9630. pan2 = 2
  9631. }
  9632. }
  9633. }
  9634. }
  9635. if(pan2 == 2){
  9636. return
  9637. }
  9638. if (this.cid == "" || this.cid == undefined) {
  9639. if (this.courseName == "") {
  9640. this.$message.error(this.lang.ssFillCourseName);
  9641. return;
  9642. } else {
  9643. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9644. this.addWork();
  9645. this.steps++;
  9646. }
  9647. } else {
  9648. if (this.courseName == "") {
  9649. this.$message.error(this.lang.ssFillCourseName);
  9650. return;
  9651. } else {
  9652. if (this.userid != this.courseUserid && this.role != "1") {
  9653. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9654. this.updateWork2();
  9655. } else {
  9656. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9657. this.updateWork();
  9658. }
  9659. this.steps++;
  9660. }
  9661. }
  9662. }
  9663. // } else {
  9664. // if (this.steps == 1) {
  9665. // if (this.courseName != "") {
  9666. // if (this.cid == "" || this.cid == undefined) {
  9667. // this.addWork();
  9668. // } else {
  9669. // if (this.userid != this.courseUserid && this.role != "1") {
  9670. // // this.updateWork2();
  9671. // } else {
  9672. // this.updateWork();
  9673. // }
  9674. // }
  9675. // this.steps++;
  9676. // } else {
  9677. // this.$message.error("请补充填写课程名称");
  9678. // return;
  9679. // }
  9680. // } else if (this.steps == 2) {
  9681. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9682. // this.cTemplate = this.templateC.content;
  9683. // }
  9684. // this.dialogVisible2 = false;
  9685. // this.steps++;
  9686. // setTimeout(() => {
  9687. // this.checkEva(this.checkId);
  9688. // setTimeout(() => {
  9689. // this.checkEva(this.checkId);
  9690. // }, 100);
  9691. // }, 1000);
  9692. // } else if (this.steps == 3) {
  9693. // if (this.cid == "" || this.cid == undefined) {
  9694. // if (this.courseName == "") {
  9695. // this.$message.error("请补充填写课程名称");
  9696. // return;
  9697. // } else {
  9698. // this.addWork();
  9699. // this.steps++;
  9700. // }
  9701. // } else {
  9702. // if (this.courseName == "") {
  9703. // this.$message.error("请补充填写课程名称");
  9704. // return;
  9705. // } else {
  9706. // if (this.userid != this.courseUserid && this.role != "1") {
  9707. // this.updateWork2();
  9708. // } else {
  9709. // this.updateWork();
  9710. // }
  9711. // this.steps++;
  9712. // }
  9713. // }
  9714. // }
  9715. // }
  9716. this.$refs.stepBox.scrollTop = 0;
  9717. },
  9718. unitSet(i) {
  9719. if (this.unitIndex == i) {
  9720. return;
  9721. }
  9722. this.unitIndex = i;
  9723. this.isClickColor = 1;
  9724. // this.$refs.rightboxR.scrollTop = 0;
  9725. this.$refs.unitBox.scrollTop = 0;
  9726. },
  9727. panUnitJson() {
  9728. let _unitIndex = this.unitIndex;
  9729. let cPan = 1;
  9730. for (
  9731. var j = 0;
  9732. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9733. j++
  9734. ) {
  9735. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9736. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9737. j
  9738. ].proVisible2 = false;
  9739. if (
  9740. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9741. .length > 1
  9742. ) {
  9743. for (
  9744. var z = 0;
  9745. z <
  9746. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9747. .length;
  9748. z++
  9749. ) {
  9750. if (
  9751. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9752. z
  9753. ].tool.length
  9754. ) {
  9755. this.$message.error(this.lang.ssAddToolFull);
  9756. cPan = 2;
  9757. break;
  9758. }
  9759. }
  9760. }
  9761. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9762. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9763. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9764. (ele) => {
  9765. return ele.value != "" || ele.detail != "" || ele.target != "";
  9766. }
  9767. );
  9768. }
  9769. }
  9770. return cPan;
  9771. },
  9772. unitOpen(i) {
  9773. if (this.unitJson[i].toolOpen) {
  9774. this.unitJson[i].toolOpen = false;
  9775. } else {
  9776. this.unitJson[i].toolOpen = true;
  9777. }
  9778. this.updateWork();
  9779. this.$forceUpdate();
  9780. },
  9781. unitSet2(i) {
  9782. if (this.panUnitJson() == 2) {
  9783. return;
  9784. }
  9785. // if(this.unitJson[i].toolOpen){
  9786. // this.unitJson[i].toolOpen = false
  9787. // this.updateWork()
  9788. // this.$forceUpdate()
  9789. // return
  9790. // }else {
  9791. this.unitJson[i].toolOpen = true;
  9792. // }
  9793. this.$forceUpdate();
  9794. if (this.unitIndex == i) {
  9795. return;
  9796. }
  9797. this.unitIndex = i;
  9798. this.isClickColor = 1;
  9799. // this.$refs.rightboxR.scrollTop = 0;
  9800. this.$refs.unitBox.scrollTop = 0;
  9801. },
  9802. updateCourseState(i) {
  9803. let params = [
  9804. {
  9805. cid: this.cid,
  9806. state: i,
  9807. },
  9808. ];
  9809. this.ajax
  9810. .post(this.$store.state.api + "updateCourseMode", params)
  9811. .then((res) => {
  9812. this.courseState = i;
  9813. })
  9814. .catch((err) => {
  9815. this.$message.error(this.lang.ssNetPoor);
  9816. console.error(err);
  9817. });
  9818. },
  9819. addtips(){
  9820. let params = [
  9821. {
  9822. cid: this.cid,
  9823. tips: JSON.stringify(this.aiJson),
  9824. tid: this.templateid
  9825. },
  9826. ];
  9827. this.ajax
  9828. .post(this.$store.state.api + "addTips", params)
  9829. .then((res) => {
  9830. })
  9831. .catch((err) => {
  9832. this.$message.error(this.lang.ssNetPoor);
  9833. console.error(err);
  9834. });
  9835. },
  9836. openSaveTips(){
  9837. this.dialogVisibleTips = true
  9838. },
  9839. time() {
  9840. if (!this.now) {
  9841. this.now = new Date().getTime();
  9842. return true;
  9843. } else {
  9844. let time = new Date().getTime();
  9845. if (time - this.now > 1000) {
  9846. this.now = time;
  9847. return true;
  9848. } else {
  9849. return false;
  9850. }
  9851. }
  9852. },
  9853. deleteUnit(i) {
  9854. var _this = this;
  9855. if (i == 0 && _this.unitJson.length == 1) {
  9856. _this
  9857. .$confirm(_this.lang.ssSwitchTask, _this.lang.ssTip, {
  9858. confirmButtonText: _this.lang.ssConfirm,
  9859. cancelButtonText: _this.lang.ssCancel,
  9860. type: "warning",
  9861. })
  9862. .then(() => {
  9863. _this.unitJson[i].dyName = "";
  9864. // _this.updateCourseState(2);
  9865. })
  9866. .catch(() => {
  9867. return;
  9868. });
  9869. } else {
  9870. _this
  9871. .$confirm(_this.lang.ssDeleteStage, _this.lang.ssTip, {
  9872. confirmButtonText: _this.lang.ssConfirm,
  9873. cancelButtonText: _this.lang.ssCancel,
  9874. type: "warning",
  9875. })
  9876. .then(() => {
  9877. _this.isDelete = 2;
  9878. // _this.unitIndex = _this.unitIndex - 1;
  9879. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9880. // _this.$message.success("删除成功");
  9881. })
  9882. .catch(() => {
  9883. return;
  9884. });
  9885. }
  9886. },
  9887. deleteWork(chapid) {
  9888. let params = [
  9889. {
  9890. cid: this.cid,
  9891. chapters: JSON.stringify(this.unitJson),
  9892. uid: this.userid,
  9893. chapid: chapid,
  9894. },
  9895. ];
  9896. this.ajax
  9897. .post(this.$store.state.api + "deleteWork", params)
  9898. .then((res) => {
  9899. this.$message({
  9900. message: this.lang.ssDeleteSucc,
  9901. type: "success",
  9902. });
  9903. let task = JSON.parse(
  9904. JSON.stringify(
  9905. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9906. )
  9907. );
  9908. this.unitJson.splice(this.unitIndex, 1);
  9909. if (this.unitIndex == 0) {
  9910. this.unitIndex = 0;
  9911. } else {
  9912. this.unitIndex = this.unitIndex - 1;
  9913. }
  9914. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9915. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9916. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9917. ...task,
  9918. ];
  9919. }
  9920. })
  9921. .catch((err) => {
  9922. this.$message.error(this.lang.ssNetPoor);
  9923. console.error(err);
  9924. });
  9925. },
  9926. deleteTool(itemTaskIndex, i) {
  9927. var _this = this;
  9928. if (_this.time()) {
  9929. _this
  9930. .$confirm(_this.lang.ssDeleteTool, _this.lang.ssTip, {
  9931. confirmButtonText: _this.lang.ssConfirm,
  9932. cancelButtonText: _this.lang.ssCancel,
  9933. type: "warning",
  9934. })
  9935. .then(() => {
  9936. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9937. itemTaskIndex
  9938. ].toolChoose.splice(i, 1);
  9939. _this.$message.success(_this.lang.ssDeleteSucc);
  9940. })
  9941. .catch(() => {
  9942. return;
  9943. });
  9944. }
  9945. },
  9946. deleteSentence(i) {
  9947. var _this = this;
  9948. _this
  9949. .$confirm(_this.lang.ssDeleteQues, _this.lang.ssTip, {
  9950. confirmButtonText: _this.lang.ssConfirm,
  9951. cancelButtonText: _this.lang.ssCancel,
  9952. type: "warning",
  9953. })
  9954. .then(() => {
  9955. _this.sentenceList.splice(i, 1);
  9956. _this.$message.success(_this.lang.ssDeleteSucc);
  9957. })
  9958. .catch(() => {
  9959. return;
  9960. });
  9961. },
  9962. deleteS(s, i, j) {
  9963. this.sentenceList[i].addSentence.splice(j, 1);
  9964. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9965. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9966. this.sentenceList[i].rightAnswer.splice(a, 1);
  9967. }
  9968. },
  9969. openT() {
  9970. window.topU.postMessage({ tools: "25" }, "*");
  9971. },
  9972. deleteTask(i) {
  9973. var _this = this;
  9974. if (_this.time()) {
  9975. _this
  9976. .$confirm(
  9977. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9978. 1 ==
  9979. i
  9980. ? _this.lang.ssDeleteTask
  9981. : _this.lang.ssSwitchTaskDel,
  9982. _this.lang.ssTip,
  9983. {
  9984. confirmButtonText: _this.lang.ssConfirm,
  9985. cancelButtonText: _this.lang.ssCancel,
  9986. type: "warning",
  9987. }
  9988. )
  9989. .then(() => {
  9990. if (i == 0 && _this.courseState == 4) {
  9991. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9992. i + 1
  9993. ].chapterData = JSON.parse(
  9994. JSON.stringify(
  9995. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9996. .chapterData
  9997. )
  9998. );
  9999. }
  10000. _this.$forceUpdate();
  10001. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10002. i,
  10003. 1
  10004. );
  10005. _this.$message.success(_this.lang.ssDeleteSucc);
  10006. })
  10007. .catch(() => {
  10008. return;
  10009. });
  10010. }
  10011. },
  10012. deleteTask2(i) {
  10013. var _this = this;
  10014. if (_this.time()) {
  10015. _this
  10016. .$confirm(
  10017. _this.lang.ssDeleteTask,
  10018. _this.lang.ssTip,
  10019. {
  10020. confirmButtonText: _this.lang.ssConfirm,
  10021. cancelButtonText: _this.lang.ssCancel,
  10022. type: "warning",
  10023. }
  10024. )
  10025. .then(() => {
  10026. if (i == 0 && _this.courseState == 4) {
  10027. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10028. i + 1
  10029. ].chapterData = JSON.parse(
  10030. JSON.stringify(
  10031. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10032. .chapterData
  10033. )
  10034. );
  10035. }
  10036. _this.$forceUpdate();
  10037. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10038. i,
  10039. 1
  10040. );
  10041. _this.$message.success(_this.lang.ssDeleteSucc);
  10042. })
  10043. .catch(() => {
  10044. return;
  10045. });
  10046. }
  10047. },
  10048. handlePictureCardPreview(file) {
  10049. this.dialogImageUrl = file.url;
  10050. },
  10051. clean(i, c) {
  10052. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  10053. },
  10054. handle_remove1(file, fileList, type) {
  10055. var _tmp = this.cover;
  10056. // for (var i = 0, len = _tmp.length; i < len; i++) {
  10057. // if (_tmp[i].uid == file.uid) {
  10058. // _tmp.splice(i, 1);
  10059. // break;
  10060. // }
  10061. // this.cover = _tmp;
  10062. // }
  10063. this.cover = [];
  10064. this.noneBtnImg = this.cover.length >= 1;
  10065. this.isSysPic = false;
  10066. this.isSysPic2 = false;
  10067. this.$forceUpdate();
  10068. },
  10069. addImg(e) {
  10070. var el = e.currentTarget;
  10071. el.getElementsByTagName("input")[0].click();
  10072. e.target.value = "";
  10073. },
  10074. addChaptersTools(i) {
  10075. this.chapTools = [
  10076. {
  10077. tools: [],
  10078. toolDetail: "",
  10079. },
  10080. ];
  10081. this.chapCount = i;
  10082. this.dialogVisible4 = true;
  10083. },
  10084. isNoFinsh() {
  10085. this.$message.warning(this.lang.ssInDev);
  10086. },
  10087. addAttText(i) {
  10088. this.AttText = {
  10089. title: "",
  10090. text: "",
  10091. };
  10092. this.taskCount = i;
  10093. this.AttTextType = 0;
  10094. this.$forceUpdate();
  10095. this.dialogVisible6 = true;
  10096. setTimeout(() => {
  10097. this.$refs["fuInput"].focus();
  10098. }, 100);
  10099. },
  10100. openLine(i) {
  10101. this.line = "";
  10102. this.lineCount = i;
  10103. this.lineType = 0;
  10104. this.$forceUpdate();
  10105. this.dialogVisible7 = true;
  10106. },
  10107. pasteLine(i) {
  10108. navigator.clipboard
  10109. .readText()
  10110. .then((v) => {
  10111. console.log("获取剪贴板成功:", v);
  10112. const html = v;
  10113. const regex = /src="(.*?)"/g;
  10114. const match = regex.exec(html);
  10115. if (match && match[1]) {
  10116. console.log(match[1]);
  10117. this.$message.success(this.lang.ssPasteSucc);
  10118. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10119. i
  10120. ].chapterData.unshift({
  10121. name: this.lang.ssLink,
  10122. title: this.lang.ssEmbedCode,
  10123. url: match[1],
  10124. type: 8,
  10125. });
  10126. } else {
  10127. // console.log("未找到包含 src 属性的 iframe");
  10128. this.$message.error(
  10129. this.lang.ssNoPasteObj
  10130. );
  10131. }
  10132. })
  10133. .catch((v) => {
  10134. console.log("获取剪贴板失败: ", v);
  10135. });
  10136. },
  10137. openSource(i) {
  10138. this.lineCount = i;
  10139. this.sourceData = {};
  10140. this.dialogVisibleSource = true;
  10141. this.updateSourcePan = false;
  10142. },
  10143. openAiCreate(i){
  10144. // this.lineCount = i;
  10145. // this.dialogVisibleAiCreate = true;
  10146. if(!this.pptCount.includes(i)){
  10147. this.pptCount.push(i)
  10148. this.dialogVisibleAiCreate2.push(i);
  10149. }else{
  10150. this.$refs['ppt'+i][0].tanDialog = false
  10151. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  10152. }
  10153. this.pptBoxDialog = true
  10154. },
  10155. createAiPpt(json, i){
  10156. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10157. // this.dialogVisibleAiCreate = false;
  10158. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10159. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10160. },
  10161. closeAiPpt(i){
  10162. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10163. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10164. },
  10165. openAiCreateVideo(i){
  10166. this.lineCount = i;
  10167. this.dialogVisibleAiCreateVideo = true;
  10168. },
  10169. createAiVideo(json){
  10170. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10171. // this.dialogVisibleAiCreateVideo = false;
  10172. },
  10173. async createTeacherAn(index, type){
  10174. // this.lineCount = index;
  10175. let md = new MarkdownIt();
  10176. if(this.courseState == 4){
  10177. this.anLoading[0] = true
  10178. // if(index == 0 || index){
  10179. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10180. // let name = _task.task+'-教案'
  10181. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10182. // await this.generate(name, _html, 0)
  10183. // }else {
  10184. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10185. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10186. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10187. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10188. await this.generate(name, _html, 0)
  10189. }
  10190. // }
  10191. }else if(this.courseState == 5){
  10192. if(type != 2){
  10193. this.anLoading[index] = true
  10194. }
  10195. if(index == 0 || index){
  10196. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10197. let name = this.lang.ssTaskNum.replace(/\*/g, index+1)+_task.task+'-'+this.lang.ssLessonPlan
  10198. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10199. await this.generate(name, _html, index,"", type)
  10200. }else {
  10201. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10202. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10203. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10204. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10205. await this.generate(name, _html, i)
  10206. }
  10207. }
  10208. }
  10209. },
  10210. async createTaskAn(index){
  10211. // this.lineCount = index;
  10212. if(this.taskAnLoading[index]){
  10213. // this.$message.error('请等待当前学历案生成完成')
  10214. this.cancelAjax('taskAn', index)
  10215. return
  10216. }
  10217. this.taskAnLoading[index] = true
  10218. this.$forceUpdate()
  10219. let _this = this
  10220. let md = new MarkdownIt();
  10221. let messages = ""
  10222. messages = `NOTICE
  10223. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10224. Language: ${this.getLang()}
  10225. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  10226. Instruction: Based on the context, follow "Format example", write content.
  10227. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10228. ## 任务教案
  10229. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10230. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10231. let parm = {
  10232. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10233. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10234. session_name: uuidv4(),
  10235. userId: this.userid,
  10236. file_ids: [],
  10237. model: 'gpt-4o-2024-11-20',
  10238. temperature: this.mode == 3 ? 0.5 : 0.1,
  10239. }
  10240. this.ajax
  10241. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10242. .then(async (response) => {
  10243. console.log(response);
  10244. let data = response.data.FunctionResponse
  10245. if (data.message) {
  10246. console.log(data.message);
  10247. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10248. let name = _task.task+'-'+_this.lang.ssStudyPlan
  10249. 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) => {
  10250. // 去除内容为空的<li>标签
  10251. if (!content.trim()) {
  10252. return ''; // 如果<li>标签内容为空,删除该标签
  10253. }
  10254. // 去掉<li>中的标签,保留纯文本内容
  10255. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10256. }); // 去掉 <ol> 和 </ol> 标签
  10257. console.log(_html)
  10258. await _this.generate(name, _html, index, ()=>{
  10259. _this.taskAnLoading[index] = false
  10260. _this.taskAnCancelToken[index] = null
  10261. })
  10262. }else{
  10263. _this.taskAnLoading[index] = false
  10264. _this.taskAnCancelToken[index] = null
  10265. }
  10266. }).catch((error) => {
  10267. console.log(error);
  10268. _this.taskAnLoading[index] = false
  10269. _this.taskAnCancelToken[index] = null
  10270. });
  10271. },
  10272. async generate(a, html, index, callback, type) {
  10273. // <html lang="en">
  10274. // 将html文件中需要用到的数据挂载到store上
  10275. const content = `<!DOCTYPE html>
  10276. <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'>
  10277. <head>
  10278. <!--[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]-->
  10279. <meta charset="UTF-8">
  10280. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10281. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10282. <title>${a}</title>
  10283. <style>
  10284. table {
  10285. border-collapse: collapse; /* 折叠边框 */
  10286. width: 100%;
  10287. }
  10288. th, td {
  10289. border: 1px solid black; /* 线条样式 */
  10290. padding: 8px;
  10291. text-align: left;
  10292. }
  10293. </style>
  10294. </head>
  10295. <body>
  10296. ${html}
  10297. </body>
  10298. </html>`;
  10299. // debugger
  10300. const blob = htmlDocx.asBlob(content)
  10301. // debugger
  10302. let dname = a + ".docx";
  10303. // 创建文件流
  10304. // 创建bolb实例时,内容一定要放在[]中
  10305. // const blob = new Blob([content], {
  10306. // type: "text/plain;charset='utf-8'",
  10307. // });
  10308. // const file = new File([blob], dname, { type: 'application/msword' });
  10309. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10310. // let params = convertApi.createParams()
  10311. // params.add('file', file)
  10312. // try {
  10313. // let result = await convertApi.convert('docx', 'docx', params)
  10314. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10315. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10316. // });
  10317. // await this.beforeUploadHtml(file, index, callback)
  10318. // } catch (error) {
  10319. // console.log('=================','报错')
  10320. // await this.beforeUploadHtml(file, index, callback)
  10321. // return
  10322. // }
  10323. await this.beforeUploadHtml(file, index, callback, type)
  10324. },
  10325. async generateExport(a, html, index) {
  10326. // <html lang="en">
  10327. // 将html文件中需要用到的数据挂载到store上
  10328. const content = `<!DOCTYPE html>
  10329. <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'>
  10330. <head>
  10331. <!--[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]-->
  10332. <meta charset="UTF-8">
  10333. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10334. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10335. <title>${a}</title>
  10336. <style>
  10337. table {
  10338. border-collapse: collapse; /* 折叠边框 */
  10339. width: 100%;
  10340. }
  10341. th, td {
  10342. border: 1px solid black; /* 线条样式 */
  10343. padding: 8px;
  10344. text-align: left;
  10345. }
  10346. </style>
  10347. </head>
  10348. <body>
  10349. ${html}
  10350. </body>
  10351. </html>`;
  10352. // debugger
  10353. const blob = htmlDocx.asBlob(content)
  10354. // debugger
  10355. const dname = `${a}.docx`;
  10356. // 创建文件流
  10357. // const file = new File([blob], dname, { type: 'application/msword' });
  10358. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10359. // let params = convertApi.createParams()
  10360. // params.add('file', file)
  10361. // try {
  10362. // let result = await convertApi.convert('docx', 'docx', params)
  10363. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10364. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10365. // });
  10366. // // 执行下载
  10367. // saveAs(file, dname);
  10368. // } catch (error) {
  10369. // saveAs(file, dname);
  10370. // // this.$message.error('导出失败')
  10371. // }
  10372. saveAs(file, dname);
  10373. // return file
  10374. },
  10375. async generateExport2(a, html, index) {
  10376. return new Promise(async (resolve) => {
  10377. // <html lang="en">
  10378. // 将html文件中需要用到的数据挂载到store上
  10379. const content = `<!DOCTYPE html>
  10380. <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'>
  10381. <head>
  10382. <!--[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]-->
  10383. <meta charset="UTF-8">
  10384. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10385. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10386. <title>${a}</title>
  10387. <style>
  10388. table {
  10389. border-collapse: collapse; /* 折叠边框 */
  10390. width: 100%;
  10391. }
  10392. th, td {
  10393. border: 1px solid black; /* 线条样式 */
  10394. padding: 8px;
  10395. text-align: left;
  10396. }
  10397. </style>
  10398. </head>
  10399. <body>
  10400. ${html}
  10401. </body>
  10402. </html>`;
  10403. // debugger
  10404. const blob = htmlDocx.asBlob(content)
  10405. // debugger
  10406. const dname = `${a}`;
  10407. // 创建文件流
  10408. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10409. let params = convertApi.createParams()
  10410. params.add('file', file)
  10411. resolve(file); // 通过 Promise 返回 File 对象
  10412. // try {
  10413. // let result = await convertApi.convert('docx', 'docx', params)
  10414. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10415. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10416. // });
  10417. // resolve(file); // 通过 Promise 返回 File 对象
  10418. // } catch (error) {
  10419. // resolve(''); // 通过 Promise 返回 File 对象
  10420. // }
  10421. });
  10422. },
  10423. async addChatAppendixFile(name, html){
  10424. await this.generate(name, html, 0,"", 3)
  10425. },
  10426. beforeUploadHtml(event, index, callback, type) {
  10427. var file = event;
  10428. var credentials = {
  10429. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10430. secretAccessKey: "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",
  10431. }; //秘钥形式的登录上传
  10432. window.AWS.config.update(credentials);
  10433. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10434. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10435. var _this = this;
  10436. if (file) {
  10437. var params = {
  10438. Key:
  10439. file.name.split(".")[0] +
  10440. new Date().getTime() +
  10441. "." +
  10442. file.name.split(".")[file.name.split(".").length - 1],
  10443. ContentType: file.type,
  10444. Body: file,
  10445. "Access-Control-Allow-Credentials": "*",
  10446. ACL: "public-read",
  10447. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10448. var options = {
  10449. partSize: 2048 * 1024 * 1024,
  10450. queueSize: 2,
  10451. leavePartsOnError: true,
  10452. };
  10453. bucket
  10454. .upload(params, options)
  10455. .on("httpUploadProgress", function (evt) {
  10456. //这里可以写进度条
  10457. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10458. })
  10459. .send(function (err, data) {
  10460. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10461. _this.anLoading[0] = false
  10462. }
  10463. if(_this.courseState == 5){
  10464. _this.anLoading[index] = false
  10465. }
  10466. callback ? callback() : ''
  10467. _this.$forceUpdate();
  10468. if (err) {
  10469. _this.$message.error(_this.lang.ssUploadFail);
  10470. } else {
  10471. let _index = 0
  10472. // if(_this.lineCount == 0 || _this.lineCount){
  10473. // _index = _this.lineCount
  10474. // }else {
  10475. _index = index
  10476. // }
  10477. if(type != 2 && type != 3){
  10478. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10479. name: file.name,
  10480. url: data.Location,
  10481. type: 3,
  10482. })
  10483. }else{
  10484. let fileName = file.name;
  10485. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10486. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10487. let count = 1;
  10488. // 检查文件名是否已存在
  10489. while (_this.appendixFile.some(item => item.name === fileName)) {
  10490. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10491. count++;
  10492. }
  10493. if(type == 3){
  10494. _this.$message.success(_this.lang.ssSaveAttach)
  10495. _this.appendixFile.unshift({
  10496. name: fileName,
  10497. url: data.Location,
  10498. type: 3,
  10499. task: 'dialog'
  10500. })
  10501. }else{
  10502. _this.appendixFile.unshift({
  10503. name: fileName,
  10504. url: data.Location,
  10505. type: 3,
  10506. })
  10507. }
  10508. }
  10509. console.log(data.Location);
  10510. }
  10511. });
  10512. }
  10513. },
  10514. async generate2(a, html, index, callback) {
  10515. // 将html文件中需要用到的数据挂载到store上
  10516. const content = `<!DOCTYPE html>
  10517. <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'>
  10518. <head>
  10519. <!--[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]-->
  10520. <meta charset="UTF-8">
  10521. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10522. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10523. <title>${a}</title>
  10524. <style>
  10525. table {
  10526. border-collapse: collapse; /* 折叠边框 */
  10527. width: 100%;
  10528. }
  10529. th, td {
  10530. border: 1px solid black; /* 线条样式 */
  10531. padding: 8px;
  10532. text-align: left;
  10533. }
  10534. </style>
  10535. </head>
  10536. <body>
  10537. ${html}
  10538. </body>
  10539. </html>`;
  10540. const blob = htmlDocx.asBlob(content)
  10541. // debugger
  10542. let dname = a + ".docx";
  10543. // 创建文件流
  10544. // 创建bolb实例时,内容一定要放在[]中
  10545. // const blob = new Blob([content], {
  10546. // type: "text/plain;charset='utf-8'",
  10547. // });
  10548. // const file = new File([blob], dname, { type: 'application/msword' });
  10549. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10550. // let params = convertApi.createParams()
  10551. // params.add('file', file)
  10552. // try {
  10553. // let result = await convertApi.convert('docx', 'docx', params)
  10554. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10555. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10556. // });
  10557. // await this.beforeUploadHtml2(file, index, callback)
  10558. // } catch (error) {
  10559. // await this.beforeUploadHtml2(file, index, callback)
  10560. // return;
  10561. // }
  10562. await this.beforeUploadHtml2(file, index, callback)
  10563. },
  10564. beforeUploadHtml2(event, index, callback) {
  10565. var file = event;
  10566. var credentials = {
  10567. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10568. secretAccessKey: "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",
  10569. }; //秘钥形式的登录上传
  10570. window.AWS.config.update(credentials);
  10571. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10572. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10573. var _this = this;
  10574. if (file) {
  10575. var params = {
  10576. Key:
  10577. file.name.split(".")[0] +
  10578. new Date().getTime() +
  10579. "." +
  10580. file.name.split(".")[file.name.split(".").length - 1],
  10581. ContentType: file.type,
  10582. Body: file,
  10583. "Access-Control-Allow-Credentials": "*",
  10584. ACL: "public-read",
  10585. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10586. var options = {
  10587. partSize: 2048 * 1024 * 1024,
  10588. queueSize: 2,
  10589. leavePartsOnError: true,
  10590. };
  10591. bucket
  10592. .upload(params, options)
  10593. .on("httpUploadProgress", function (evt) {
  10594. //这里可以写进度条
  10595. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10596. })
  10597. .send(async function (err, data) {
  10598. if(_this.courseState == 5){
  10599. _this.loading = false
  10600. }
  10601. if (err) {
  10602. callback ? callback() : ''
  10603. _this.$message.error(_this.lang.ssUploadFail);
  10604. } else {
  10605. let fileid = await _this.createFileid(data.Location)
  10606. // _this.cankaoInfoData.push({
  10607. //                   name: file.name,
  10608. //                   url: data.Location,
  10609. //                   type: 3,
  10610. // fileid: fileid,
  10611. //   })
  10612. _this.infoData2.push({
  10613. name: file.name,
  10614. url: data.Location,
  10615. type: 3,
  10616. fileid: fileid == 1 ? '' : fileid,
  10617. })
  10618. _this.infoData.push({
  10619. name: file.name,
  10620. url: data.Location,
  10621. type: 3,
  10622. fileid: fileid == 1 ? '' : fileid,
  10623. });
  10624. console.log(data.Location);
  10625. callback ? callback() : ''
  10626. }
  10627. });
  10628. }
  10629. },
  10630. addSource() {
  10631. if (!Object.keys(this.sourceData).length) {
  10632. this.$message.error(this.lang.ssSelectResUp);
  10633. return;
  10634. }
  10635. let keys = Object.keys(this.sourceData);
  10636. for (var i = 0; i < keys.length; i++) {
  10637. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10638. this.lineCount
  10639. ].chapterData.unshift({
  10640. name: this.lang.ssLink,
  10641. title: this.sourceData[keys[i]].name,
  10642. url: this.sourceData[keys[i]].url,
  10643. type: 14,
  10644. id: keys[i],
  10645. });
  10646. }
  10647. this.$forceUpdate();
  10648. this.dialogVisibleSource = false;
  10649. },
  10650. updateSource() {
  10651. if (!Object.keys(this.sourceData).length) {
  10652. this.$message.error(this.lang.ssSelectResUp);
  10653. return;
  10654. }
  10655. let keys = Object.keys(this.sourceData);
  10656. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10657. this.taskCount
  10658. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10659. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10660. this.taskCount
  10661. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10662. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10663. this.taskCount
  10664. ].chapterData[this.lineCount].id = keys[0];
  10665. this.updateSourcePan = false;
  10666. this.$forceUpdate();
  10667. this.dialogVisibleSource = false;
  10668. },
  10669. deleteM(i, j) {
  10670. this.testJson.testJson[i].timuList.splice(j, 1);
  10671. },
  10672. beforeUploadTiMu(event, i) {
  10673. const loading = this.openLoading();
  10674. var file = event.target.files[0];
  10675. var credentials = {
  10676. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10677. secretAccessKey: "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",
  10678. }; //秘钥形式的登录上传
  10679. window.AWS.config.update(credentials);
  10680. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10681. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10682. var _this = this;
  10683. if (file) {
  10684. var params = {
  10685. Key:
  10686. file.name.split(".")[0] +
  10687. new Date().getTime() +
  10688. "." +
  10689. file.name.split(".")[file.name.split(".").length - 1],
  10690. ContentType: file.type,
  10691. Body: file,
  10692. "Access-Control-Allow-Credentials": "*",
  10693. ACL: "public-read",
  10694. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10695. var options = {
  10696. partSize: 2048 * 1024 * 1024,
  10697. queueSize: 2,
  10698. leavePartsOnError: true,
  10699. };
  10700. bucket
  10701. .upload(params, options)
  10702. .on("httpUploadProgress", function (evt) {
  10703. //这里可以写进度条
  10704. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10705. })
  10706. .send(function (err, data) {
  10707. loading.close();
  10708. if (err) {
  10709. _this.$message.error(_this.lang.ssUploadFail);
  10710. } else {
  10711. if (_this.testJson.testJson[i].timuList) {
  10712. _this.testJson.testJson[i].timuList.push({
  10713. src: data.Location,
  10714. });
  10715. } else {
  10716. _this.testJson.testJson[i].timuList = [];
  10717. _this.testJson.testJson[i].timuList.push({
  10718. src: data.Location,
  10719. });
  10720. }
  10721. _this.imgChange3(i);
  10722. _this.$forceUpdate();
  10723. }
  10724. });
  10725. }
  10726. },
  10727. beforeUploadTi(event, i, j) {
  10728. const loading = this.openLoading();
  10729. var file = event.target.files[0];
  10730. var credentials = {
  10731. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10732. secretAccessKey: "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",
  10733. }; //秘钥形式的登录上传
  10734. window.AWS.config.update(credentials);
  10735. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10736. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10737. var _this = this;
  10738. if (file) {
  10739. var params = {
  10740. Key:
  10741. file.name.split(".")[0] +
  10742. new Date().getTime() +
  10743. "." +
  10744. file.name.split(".")[file.name.split(".").length - 1],
  10745. ContentType: file.type,
  10746. Body: file,
  10747. "Access-Control-Allow-Credentials": "*",
  10748. ACL: "public-read",
  10749. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10750. var options = {
  10751. partSize: 2048 * 1024 * 1024,
  10752. queueSize: 2,
  10753. leavePartsOnError: true,
  10754. };
  10755. bucket
  10756. .upload(params, options)
  10757. .on("httpUploadProgress", function (evt) {
  10758. //这里可以写进度条
  10759. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10760. })
  10761. .send(function (err, data) {
  10762. loading.close();
  10763. if (err) {
  10764. _this.$message.error(_this.lang.ssUploadFail);
  10765. } else {
  10766. _this.testJson.testJson[i].checkList[j] = {};
  10767. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10768. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10769. _this.imgChange2(i, j);
  10770. _this.$forceUpdate();
  10771. }
  10772. });
  10773. }
  10774. },
  10775. beforeUpload1(event, type) {
  10776. // const loading = this.openLoading();
  10777. var file = event.target.files[0];
  10778. var credentials = {
  10779. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10780. secretAccessKey: "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",
  10781. }; //秘钥形式的登录上传
  10782. window.AWS.config.update(credentials);
  10783. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10784. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10785. var _this = this;
  10786. if (file) {
  10787. var params = {
  10788. Key:
  10789. file.name.split(".")[0] +
  10790. new Date().getTime() +
  10791. "." +
  10792. file.name.split(".")[file.name.split(".").length - 1],
  10793. ContentType: file.type,
  10794. Body: file,
  10795. "Access-Control-Allow-Credentials": "*",
  10796. ACL: "public-read",
  10797. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10798. var options = {
  10799. partSize: 2048 * 1024 * 1024,
  10800. queueSize: 2,
  10801. leavePartsOnError: true,
  10802. };
  10803. bucket
  10804. .upload(params, options)
  10805. .on("httpUploadProgress", function (evt) {
  10806. //这里可以写进度条
  10807. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10808. })
  10809. .send(function (err, data) {
  10810. // loading.close();
  10811. if (err) {
  10812. // var a = _this.$refs.upload1.uploadFiles;
  10813. // a.splice(a.length - 1, a.length);
  10814. _this.$message.error(_this.lang.ssUploadFail);
  10815. } else {
  10816. // _this.cover.push({
  10817. // name: file.name,
  10818. // url: data.Location,
  10819. // uid: file.uid,
  10820. // });
  10821. _this.cover = [
  10822. {
  10823. name: file.name,
  10824. url: data.Location,
  10825. uid: file.uid,
  10826. },
  10827. ];
  10828. _this.imgChange1(null, null, 1, null);
  10829. _this.choosePicVisible = false;
  10830. console.log(data.Location);
  10831. }
  10832. });
  10833. }
  10834. },
  10835. beforeUploadSelect(event, type) {
  10836. // const loading = this.openLoading();
  10837. var file = event.target.files[0];
  10838. var credentials = {
  10839. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10840. secretAccessKey: "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",
  10841. }; //秘钥形式的登录上传
  10842. window.AWS.config.update(credentials);
  10843. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10844. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10845. var _this = this;
  10846. if (file) {
  10847. var params = {
  10848. Key:
  10849. file.name.split(".")[0] +
  10850. new Date().getTime() +
  10851. "." +
  10852. file.name.split(".")[file.name.split(".").length - 1],
  10853. ContentType: file.type,
  10854. Body: file,
  10855. "Access-Control-Allow-Credentials": "*",
  10856. ACL: "public-read",
  10857. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10858. var options = {
  10859. partSize: 2048 * 1024 * 1024,
  10860. queueSize: 2,
  10861. leavePartsOnError: true,
  10862. };
  10863. bucket
  10864. .upload(params, options)
  10865. .on("httpUploadProgress", function (evt) {
  10866. //这里可以写进度条
  10867. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10868. })
  10869. .send(function (err, data) {
  10870. // loading.close();
  10871. if (err) {
  10872. _this.$message.error(_this.lang.ssUploadFail);
  10873. } else {
  10874. _this.selectJson.url = data.Location;
  10875. console.log(data.Location);
  10876. }
  10877. });
  10878. }
  10879. },
  10880. chooseSysPic(p) {
  10881. this.cover = [];
  10882. setTimeout(() => {
  10883. this.cover[0] = {
  10884. name: this.lang.ssSystemPic,
  10885. url: p,
  10886. };
  10887. this.imgChange1(null, null, 1, null);
  10888. this.$forceUpdate();
  10889. }, 0);
  10890. this.isSysPic = true;
  10891. this.isSysPic2 = false;
  10892. this.sysPicVisible = false;
  10893. this.$forceUpdate();
  10894. },
  10895. chooseSysPic2(p) {
  10896. this.cover = [];
  10897. setTimeout(() => {
  10898. this.cover[0] = {
  10899. name: this.lang.ssNetworkPic,
  10900. url: p,
  10901. };
  10902. this.imgChange1(null, null, 1, null);
  10903. this.$forceUpdate();
  10904. }, 0);
  10905. this.isSysPic2 = true;
  10906. this.isSysPic = false;
  10907. this.sysPicVisible2 = false;
  10908. this.$forceUpdate();
  10909. },
  10910. beforeUpload(data) {
  10911. this.$refs.upload1.uploadFiles;
  10912. this.uploadLoading1 = true;
  10913. var file = data.file;
  10914. var credentials = {
  10915. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10916. secretAccessKey: "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",
  10917. }; //秘钥形式的登录上传
  10918. window.AWS.config.update(credentials);
  10919. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10920. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10921. var _this = this;
  10922. if (file) {
  10923. var params = {
  10924. Key:
  10925. file.name.split(".")[0] +
  10926. new Date().getTime() +
  10927. "." +
  10928. file.name.split(".")[file.name.split(".").length - 1],
  10929. ContentType: file.type,
  10930. Body: file,
  10931. "Access-Control-Allow-Credentials": "*",
  10932. ACL: "public-read",
  10933. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10934. var options = {
  10935. partSize: 2048 * 1024 * 1024,
  10936. queueSize: 2,
  10937. leavePartsOnError: true,
  10938. };
  10939. bucket
  10940. .upload(params, options)
  10941. .on("httpUploadProgress", function (evt) {
  10942. //这里可以写进度条
  10943. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10944. })
  10945. .send(function (err, data) {
  10946. _this.uploadLoading1 = false;
  10947. if (err) {
  10948. // var a = _this.$refs.upload1.uploadFiles;
  10949. // a.splice(a.length - 1, a.length);
  10950. _this.$message.error(_this.lang.ssUploadFail);
  10951. } else {
  10952. //上传成功处理
  10953. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10954. name: file.name,
  10955. url: data.Location,
  10956. uid: file.uid,
  10957. });
  10958. _this.imgChange();
  10959. console.log(data.Location);
  10960. }
  10961. });
  10962. }
  10963. },
  10964. onExceed() {
  10965. this.$message.error(this.lang.ssCoverOneUp);
  10966. },
  10967. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10968. let file = "";
  10969. let cfindex2 = 0;
  10970. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10971. // var file = event.target.files[0];
  10972. file = event.target.files[cfindex];
  10973. let fileName = file.name
  10974. let fileUid = file.uid
  10975. // const loading = this.openLoading();
  10976. // var file = event.target.files[0];
  10977. var credentials = {
  10978. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10979. secretAccessKey: "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",
  10980. }; //秘钥形式的登录上传
  10981. window.AWS.config.update(credentials);
  10982. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10983. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10984. var _this = this;
  10985. if (type == 3) {
  10986. var b = [
  10987. "DOC",
  10988. "DOCX",
  10989. "DOCM",
  10990. "DOTM",
  10991. "DOTX",
  10992. "PPTX",
  10993. "PPSX",
  10994. "PPT",
  10995. "PPS",
  10996. "PPTM",
  10997. "POTM",
  10998. "PPAM",
  10999. "POTX",
  11000. "PPSM",
  11001. ];
  11002. if (
  11003. b.indexOf(
  11004. file.name
  11005. .split(".")
  11006. [file.name.split(".").length - 1].toLocaleUpperCase()
  11007. ) != -1
  11008. ) {
  11009. if (file.size / 1024 / 1024 > 80) {
  11010. this.$message.error(this.lang.ssFileOver80MB);
  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. } else if (
  11018. file.name
  11019. .split(".")
  11020. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11021. ) {
  11022. if (file.size / 1024 / 1024 > 80) {
  11023. this.$message.error(this.lang.ssAddFileOver80);
  11024. this.inputShow = true;
  11025. // var a = _this.$refs.upload1.uploadFiles;
  11026. // a.splice(a.length - 1, a.length);
  11027. // loading.close();
  11028. return;
  11029. }
  11030. }
  11031. }
  11032. this.inputShow = false;
  11033. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11034. // itemTaskIndex
  11035. // ].progress = 0;
  11036. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11037. itemTaskIndex
  11038. ].proVisible = true;
  11039. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11040. itemTaskIndex
  11041. ].isFinishSize = 0;
  11042. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11043. itemTaskIndex
  11044. ].isAllSize = event.target.files.length;
  11045. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11046. // itemTaskIndex
  11047. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11048. _this.$forceUpdate();
  11049. if (file) {
  11050. var params = {
  11051. Key:
  11052. file.name.split(".")[0] +
  11053. new Date().getTime() +
  11054. "." +
  11055. file.name.split(".")[file.name.split(".").length - 1],
  11056. ContentType: file.type,
  11057. Body: file,
  11058. "Access-Control-Allow-Credentials": "*",
  11059. ACL: "public-read",
  11060. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11061. var options = {
  11062. partSize: 2048 * 1024 * 1024,
  11063. queueSize: 2,
  11064. leavePartsOnError: true,
  11065. };
  11066. bucket
  11067. .upload(params, options)
  11068. .on("httpUploadProgress", function (evt) {
  11069. //这里可以写进度条
  11070. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11071. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11072. // itemTaskIndex
  11073. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  11074. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11075. // itemTaskIndex
  11076. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11077. // _this.$forceUpdate();
  11078. })
  11079. .send(function (err, data) {
  11080. cfindex2++
  11081. // loading.close();
  11082. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11083. // itemTaskIndex
  11084. // ].progress = 100;
  11085. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11086. itemTaskIndex
  11087. ].isFinishSize = cfindex2
  11088. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11089. // itemTaskIndex
  11090. // ].isAllSize;
  11091. _this.$forceUpdate();
  11092. setTimeout(() => {
  11093. if (
  11094. cfindex2 == event.target.files.length ||
  11095. cfindex2 > event.target.files.length
  11096. ) {
  11097. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11098. itemTaskIndex
  11099. ].proVisible = false;
  11100. }
  11101. _this.$forceUpdate();
  11102. }, 1000);
  11103. _this.inputShow = true;
  11104. if (err) {
  11105. // var a = _this.$refs.upload1.uploadFiles;
  11106. // a.splice(a.length - 1, a.length);
  11107. _this.$message.error(_this.lang.ssUploadFail);
  11108. } else {
  11109. if (type == 13) {
  11110. let _type = 2;
  11111. var imgA = [
  11112. "png",
  11113. "jpg",
  11114. "jpeg",
  11115. "bmp",
  11116. "gif",
  11117. "webp",
  11118. "psd",
  11119. "svg",
  11120. "tiff",
  11121. ];
  11122. var fileA = [
  11123. "PDF",
  11124. "DOC",
  11125. "DOCX",
  11126. "DOCM",
  11127. "DOTM",
  11128. "DOTX",
  11129. "PPTX",
  11130. "PPSX",
  11131. "PPT",
  11132. "PPS",
  11133. "PPTM",
  11134. "POTM",
  11135. "PPAM",
  11136. "POTX",
  11137. "PPSM",
  11138. "XLSX",
  11139. "XLS",
  11140. ];
  11141. var videoA = [
  11142. "AVI",
  11143. "NAVI",
  11144. "MPEG",
  11145. "ASF",
  11146. "MOV",
  11147. "WMV",
  11148. "3GP",
  11149. "RM",
  11150. "RMVB",
  11151. "FLV",
  11152. "F4V",
  11153. "H.264",
  11154. "H.265",
  11155. "REAL VIDEO",
  11156. "MKV",
  11157. "WebM",
  11158. "HDDVD",
  11159. "MP4",
  11160. "MPG",
  11161. "M4V",
  11162. "MGV",
  11163. "OGV",
  11164. "QTM",
  11165. "STR",
  11166. "AMC",
  11167. "DVX",
  11168. "EVO",
  11169. "DAT",
  11170. "OGG",
  11171. "OGM",
  11172. ];
  11173. if (
  11174. fileA.indexOf(
  11175. data.Location.split(".")[
  11176. data.Location.split(".").length - 1
  11177. ].toLocaleUpperCase()
  11178. ) != -1
  11179. ) {
  11180. _type = 3;
  11181. } else if (
  11182. videoA.indexOf(
  11183. data.Location.split(".")[
  11184. data.Location.split(".").length - 1
  11185. ].toLocaleUpperCase()
  11186. ) != -1
  11187. ) {
  11188. _type = 2;
  11189. } else if (
  11190. imgA.indexOf(
  11191. data.Location.split(".")[
  11192. data.Location.split(".").length - 1
  11193. ].toLocaleLowerCase()
  11194. ) != -1
  11195. ) {
  11196. _type = 13;
  11197. } else {
  11198. _type = 12;
  11199. }
  11200. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11201. itemTaskIndex
  11202. ].chapterData.unshift({
  11203. name: fileName,
  11204. url: data.Location,
  11205. uid: fileUid,
  11206. type: _type,
  11207. });
  11208. _this.imgChange1(null, null, _type, itemTaskIndex);
  11209. } else if (type == 2 || type == 3 || type == 12) {
  11210. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11211. itemTaskIndex
  11212. ].chapterData.unshift({
  11213. name: fileName,
  11214. url: data.Location,
  11215. uid: fileUid,
  11216. type: type,
  11217. });
  11218. _this.imgChange1(null, null, type, itemTaskIndex);
  11219. } else if (type == 4) {
  11220. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11221. itemTaskIndex
  11222. ].fileList1.push({
  11223. name: fileName,
  11224. url: data.Location,
  11225. uid: fileUid,
  11226. });
  11227. _this.imgChange1(null, null, type, itemTaskIndex);
  11228. } else if (type == 5) {
  11229. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11230. itemTaskIndex
  11231. ].homeworkList.push({
  11232. name: fileName,
  11233. url: data.Location,
  11234. uid: fileUid,
  11235. });
  11236. _this.imgChange1(null, null, type, itemTaskIndex);
  11237. }
  11238. console.log(data.Location);
  11239. }
  11240. });
  11241. }
  11242. }
  11243. },
  11244. async beforeUploadInfo2(event, type, tindex) {
  11245. // const loading = this.openLoading();
  11246. let file = "";
  11247. let cfindex2 = 0;
  11248. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11249. // var file = event.target.files[0];
  11250. file = event.target.files[cfindex];
  11251. let fileName = file.name
  11252. let fileUid = file.uid
  11253. var credentials = {
  11254. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11255. secretAccessKey: "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",
  11256. }; //秘钥形式的登录上传
  11257. window.AWS.config.update(credentials);
  11258. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11259. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11260. var _this = this;
  11261. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11262. if (
  11263. xianObj.indexOf(
  11264. file.name
  11265. .split(".")
  11266. [file.name.split(".").length - 1].toLocaleUpperCase()
  11267. ) == -1
  11268. ) {
  11269. this.$message.error(this.lang.ssUploadDocPptFiles);
  11270. this.inputShow = true;
  11271. // var a = _this.$refs.upload1.uploadFiles;
  11272. // a.splice(a.length - 1, a.length);
  11273. // loading.close();
  11274. return;
  11275. }
  11276. // if (
  11277. // ['DOC'].indexOf(
  11278. // file.name
  11279. // .split(".")
  11280. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11281. // ) !== -1
  11282. // ) {
  11283. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11284. // this.inputShow = true;
  11285. // return;
  11286. // }
  11287. if (type == 3) {
  11288. var b = [
  11289. "DOC",
  11290. "DOCX",
  11291. "DOCM",
  11292. "DOTM",
  11293. "DOTX",
  11294. "PPTX",
  11295. "PPSX",
  11296. "PPT",
  11297. "PPS",
  11298. "PPTM",
  11299. "POTM",
  11300. "PPAM",
  11301. "POTX",
  11302. "PPSM",
  11303. ];
  11304. if (
  11305. b.indexOf(
  11306. file.name
  11307. .split(".")
  11308. [file.name.split(".").length - 1].toLocaleUpperCase()
  11309. ) != -1
  11310. ) {
  11311. if (file.size / 1024 / 1024 > 80) {
  11312. this.$message.error(this.lang.ssFileOver80MB);
  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. } else if (
  11320. file.name
  11321. .split(".")
  11322. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11323. ) {
  11324. if (file.size / 1024 / 1024 > 80) {
  11325. this.$message.error(this.lang.ssAddFileOver80);
  11326. this.inputShow = true;
  11327. // var a = _this.$refs.upload1.uploadFiles;
  11328. // a.splice(a.length - 1, a.length);
  11329. // loading.close();
  11330. return;
  11331. }
  11332. }
  11333. }
  11334. this.inputShow = false;
  11335. if(type == 14){
  11336. // _this.teacherinfoprogress = 0;
  11337. _this.teacherinfoproVisible = true;
  11338. _this.teacherinfoisFinishSize = 0;
  11339. _this.teacherinfoisAllSize = event.target.files.length;
  11340. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11341. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11342. }else if(type == 16){
  11343. _this.mubiaoinfoprogress = 0;
  11344. _this.mubiaoinfoproVisible = true;
  11345. _this.mubiaoinfoisFinishSize = 0;
  11346. _this.mubiaoinfoisAllSize = event.target.files.length;
  11347. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11348. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11349. }else if(type == 17){
  11350. _this.xuanzeinfoprogress = 0;
  11351. _this.xuanzeinfoproVisible = true;
  11352. _this.xuanzeinfoisFinishSize = 0;
  11353. _this.xuanzeinfoisAllSize = event.target.files.length;
  11354. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11355. }else if(type == 18){
  11356. _this.pingjiainfoprogress[tindex] = 0;
  11357. _this.pingjiainfoproVisible[tindex] = true;
  11358. _this.pingjiainfoisFinishSize[tindex] = 0;
  11359. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11360. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11361. }else if(type == 19){
  11362. _this.knowinfoprogress = 0;
  11363. _this.knowinfoproVisible = true;
  11364. _this.knowinfoisFinishSize = 0;
  11365. _this.knowinfoisAllSize = event.target.files.length;
  11366. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11367. }else if(type == 20){
  11368. _this.knowinfoprogress2 = 0;
  11369. _this.knowinfoproVisible2 = true;
  11370. _this.knowinfoisFinishSize2 = 0;
  11371. _this.knowinfoisAllSize2 = event.target.files.length;
  11372. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11373. }else{
  11374. _this.infoprogress = 0;
  11375. _this.infoproVisible = true;
  11376. _this.infoisFinishSize = 0;
  11377. _this.infoisAllSize = event.target.files.length;
  11378. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11379. }
  11380. // if (
  11381. // ['DOC'].indexOf(
  11382. // file.name
  11383. // .split(".")
  11384. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11385. // ) !== -1
  11386. // ) {
  11387. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11388. // // this.inputShow = true;
  11389. // let params = convertApi.createParams()
  11390. // params.add('file', file)
  11391. // try {
  11392. // let result = await convertApi.convert('doc', 'docx', params);
  11393. // // Get result file URL
  11394. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11395. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11396. // });
  11397. // console.log(result)
  11398. // console.log(file)
  11399. // } catch (error) {
  11400. // cfindex2++;
  11401. // if(type == 14){
  11402. // _this.teacherinfoisFinishSize = cfindex2;
  11403. // }else if(type == 16){
  11404. // _this.mubiaoinfoisFinishSize = cfindex2;
  11405. // }else if(type == 17){
  11406. // _this.xuanzeinfoisFinishSize = cfindex2;
  11407. // }else if(type == 18){
  11408. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11409. // }else if(type == 19){
  11410. // _this.knowinfoisFinishSize = cfindex2;
  11411. // }else if(type == 20){
  11412. // _this.knowinfoisFinishSize2 = cfindex2;
  11413. // }else {
  11414. // _this.infoisFinishSize = cfindex2;
  11415. // }
  11416. // setTimeout(() => {
  11417. // if (
  11418. // cfindex2 == event.target.files.length ||
  11419. // cfindex2 > event.target.files.length
  11420. // ) {
  11421. // if(type == 14){
  11422. // _this.teacherinfoproVisible = false;
  11423. // }else if(type == 16){
  11424. // _this.mubiaoinfoproVisible = false;
  11425. // }else if(type == 17){
  11426. // _this.xuanzeinfoproVisible = false;
  11427. // }else if(type == 18){
  11428. // _this.pingjiainfoproVisible[tindex] = false;
  11429. // }else if(type == 19){
  11430. // _this.knowinfoproVisible = false;
  11431. // }else if(type == 20){
  11432. // _this.knowinfoproVisible2 = false;
  11433. // }else{
  11434. // _this.infoproVisible = false;
  11435. // }
  11436. // }
  11437. // _this.$forceUpdate();
  11438. // }, 1000);
  11439. // _this.inputShow = true;
  11440. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11441. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11442. // return; // 直接返回,不继续执行后续代码
  11443. // }
  11444. // // return;
  11445. // }
  11446. _this.$forceUpdate();
  11447. if (file) {
  11448. var params = {
  11449. Key:
  11450. file.name.split(".")[0] +
  11451. new Date().getTime() +
  11452. "." +
  11453. file.name.split(".")[file.name.split(".").length - 1],
  11454. ContentType: file.type,
  11455. Body: file,
  11456. "Access-Control-Allow-Credentials": "*",
  11457. ACL: "public-read",
  11458. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11459. var options = {
  11460. partSize: 2048 * 1024 * 1024,
  11461. queueSize: 2,
  11462. leavePartsOnError: true,
  11463. };
  11464. bucket
  11465. .upload(params, options)
  11466. .on("httpUploadProgress", function (evt) {
  11467. //这里可以写进度条
  11468. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11469. // if(type == 14){
  11470. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11471. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11472. // }else if(type == 16){
  11473. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11474. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11475. // }else if(type == 17){
  11476. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11477. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11478. // }else if(type == 18){
  11479. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11480. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11481. // }else {
  11482. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11483. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11484. // }
  11485. _this.$forceUpdate();
  11486. })
  11487. .send(async function (err, data) {
  11488. // loading.close();
  11489. // if(type == 14){
  11490. // _this.teacherinfoprogress = 100;
  11491. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11492. // }else if(type == 16){
  11493. // _this.mubiaoinfoprogress = 100;
  11494. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11495. // }else if(type == 17){
  11496. // _this.xuanzeinfoprogress = 100;
  11497. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11498. // }else if(type == 18){
  11499. // _this.pingjiainfoprogress[tindex] = 100;
  11500. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11501. // }else {
  11502. // _this.infoprogress = 100;
  11503. // _this.infoisFinishSize = _this.infoisAllSize;
  11504. // }
  11505. _this.$forceUpdate();
  11506. _this.inputShow = true;
  11507. if (err) {
  11508. cfindex2++;
  11509. if(type == 14){
  11510. _this.teacherinfoisFinishSize = cfindex2;
  11511. }else if(type == 16){
  11512. _this.mubiaoinfoisFinishSize = cfindex2;
  11513. }else if(type == 17){
  11514. _this.xuanzeinfoisFinishSize = cfindex2;
  11515. }else if(type == 18){
  11516. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11517. }else if(type == 19){
  11518. _this.knowinfoisFinishSize = cfindex2;
  11519. }else if(type == 20){
  11520. _this.knowinfoisFinishSize2 = cfindex2;
  11521. }else {
  11522. _this.infoisFinishSize = cfindex2;
  11523. }
  11524. setTimeout(() => {
  11525. if (
  11526. cfindex2 == event.target.files.length ||
  11527. cfindex2 > event.target.files.length
  11528. ) {
  11529. if(type == 14){
  11530. _this.teacherinfoproVisible = false;
  11531. }else if(type == 16){
  11532. _this.mubiaoinfoproVisible = false;
  11533. }else if(type == 17){
  11534. _this.xuanzeinfoproVisible = false;
  11535. }else if(type == 18){
  11536. _this.pingjiainfoproVisible[tindex] = false;
  11537. }else if(type == 19){
  11538. _this.knowinfoproVisible = false;
  11539. }else if(type == 20){
  11540. _this.knowinfoproVisible2 = false;
  11541. }else{
  11542. _this.infoproVisible = false;
  11543. }
  11544. }
  11545. _this.$forceUpdate();
  11546. }, 1000);
  11547. // var a = _this.$refs.upload1.uploadFiles;
  11548. // a.splice(a.length - 1, a.length);
  11549. _this.$message.error(_this.lang.ssUploadFail);
  11550. } else {
  11551. let fileid = await _this.createFileid(data.Location)
  11552. if(fileid){
  11553. cfindex2++;
  11554. if(type == 14){
  11555. _this.teacherinfoisFinishSize = cfindex2;
  11556. }else if(type == 16){
  11557. _this.mubiaoinfoisFinishSize = cfindex2;
  11558. }else if(type == 17){
  11559. _this.xuanzeinfoisFinishSize = cfindex2;
  11560. }else if(type == 18){
  11561. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11562. }else if(type == 19){
  11563. _this.knowinfoisFinishSize = cfindex2;
  11564. }else if(type == 20){
  11565. _this.knowinfoisFinishSize2 = cfindex2;
  11566. }else {
  11567. _this.infoisFinishSize = cfindex2;
  11568. }
  11569. if (
  11570. cfindex2 == event.target.files.length ||
  11571. cfindex2 > event.target.files.length
  11572. ) {
  11573. if(type == 14){
  11574. _this.teacherinfoproVisible = false;
  11575. }else if(type == 16){
  11576. _this.mubiaoinfoproVisible = false;
  11577. }else if(type == 17){
  11578. _this.xuanzeinfoproVisible = false;
  11579. }else if(type == 18){
  11580. _this.pingjiainfoproVisible[tindex] = false;
  11581. }else if(type == 19){
  11582. _this.knowinfoproVisible = false;
  11583. }else if(type == 20){
  11584. _this.knowinfoproVisible2 = false;
  11585. }else{
  11586. _this.infoproVisible = false;
  11587. }
  11588. }
  11589. _this.$forceUpdate();
  11590. }
  11591. if(fileid == 1){
  11592. _this.$message.error(_this.lang.ssFileIdError);
  11593. return;
  11594. }
  11595. var imgA = [
  11596. "png",
  11597. "jpg",
  11598. "jpeg",
  11599. "bmp",
  11600. "gif",
  11601. "webp",
  11602. "psd",
  11603. "svg",
  11604. "tiff",
  11605. ];
  11606. var fileA = [
  11607. "PDF",
  11608. "DOC",
  11609. "DOCX",
  11610. "DOCM",
  11611. "DOTM",
  11612. "DOTX",
  11613. "PPTX",
  11614. "PPSX",
  11615. "PPT",
  11616. "PPS",
  11617. "PPTM",
  11618. "POTM",
  11619. "PPAM",
  11620. "POTX",
  11621. "PPSM",
  11622. "XLSX",
  11623. "XLS",
  11624. ];
  11625. var videoA = [
  11626. "AVI",
  11627. "NAVI",
  11628. "MPEG",
  11629. "ASF",
  11630. "MOV",
  11631. "WMV",
  11632. "3GP",
  11633. "RM",
  11634. "RMVB",
  11635. "FLV",
  11636. "F4V",
  11637. "H.264",
  11638. "H.265",
  11639. "REAL VIDEO",
  11640. "MKV",
  11641. "WebM",
  11642. "HDDVD",
  11643. "MP4",
  11644. "MPG",
  11645. "M4V",
  11646. "MGV",
  11647. "OGV",
  11648. "QTM",
  11649. "STR",
  11650. "AMC",
  11651. "DVX",
  11652. "EVO",
  11653. "DAT",
  11654. "OGG",
  11655. "OGM",
  11656. ];
  11657. let _type = 2;
  11658. if (
  11659. fileA.indexOf(
  11660. data.Location.split(".")[
  11661. data.Location.split(".").length - 1
  11662. ].toLocaleUpperCase()
  11663. ) != -1
  11664. ) {
  11665. _type = 3;
  11666. } else if (
  11667. videoA.indexOf(
  11668. data.Location.split(".")[
  11669. data.Location.split(".").length - 1
  11670. ].toLocaleUpperCase()
  11671. ) != -1
  11672. ) {
  11673. _type = 2;
  11674. } else if (
  11675. imgA.indexOf(
  11676. data.Location.split(".")[
  11677. data.Location.split(".").length - 1
  11678. ].toLocaleLowerCase()
  11679. ) != -1
  11680. ) {
  11681. _type = 13;
  11682. } else {
  11683. _type = 12;
  11684. }
  11685. if (type == 13) {
  11686. _this.infoData.push({
  11687. name: fileName,
  11688. url: data.Location,
  11689. uid: fileUid,
  11690. type: _type,
  11691. fileid: fileid == 1 ? '' : fileid,
  11692. });
  11693. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11694. name: fileName,
  11695. url: data.Location,
  11696. uid: fileUid,
  11697. type: _type,
  11698. fileid: fileid == 1 ? '' : fileid,
  11699. })
  11700. }else if (type == 14) {
  11701. _this.teacherInfoData.push({
  11702. name: fileName,
  11703. url: data.Location,
  11704. uid: fileUid,
  11705. type: _type,
  11706. fileid: fileid == 1 ? '' : fileid,
  11707. });
  11708. _this.infoData2.push({
  11709. name: fileName,
  11710. url: data.Location,
  11711. uid: fileUid,
  11712. type: _type,
  11713. fileid: fileid == 1 ? '' : fileid,
  11714. });
  11715. _this.infoData.push({
  11716. name: fileName,
  11717. url: data.Location,
  11718. uid: fileUid,
  11719. type: _type,
  11720. fileid: fileid == 1 ? '' : fileid,
  11721. });
  11722. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11723. name: fileName,
  11724. url: data.Location,
  11725. uid: fileUid,
  11726. type: _type,
  11727. fileid: fileid == 1 ? '' : fileid,
  11728. })
  11729. }else if (type == 15) {
  11730. _this.infoData2.push({
  11731. name: fileName,
  11732. url: data.Location,
  11733. uid: fileUid,
  11734. type: _type,
  11735. fileid: fileid == 1 ? '' : fileid,
  11736. });
  11737. _this.infoData.push({
  11738. name: fileName,
  11739. url: data.Location,
  11740. uid: fileUid,
  11741. type: _type,
  11742. fileid: fileid == 1 ? '' : fileid,
  11743. });
  11744. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11745. name: fileName,
  11746. url: data.Location,
  11747. uid: fileUid,
  11748. type: _type,
  11749. fileid: fileid == 1 ? '' : fileid,
  11750. })
  11751. }else if (type == 16) {
  11752. _this.mubiaoInfoData.push({
  11753. name: fileName,
  11754. url: data.Location,
  11755. uid: fileUid,
  11756. type: _type,
  11757. fileid: fileid == 1 ? '' : fileid,
  11758. });
  11759. }else if (type == 17) {
  11760. _this.xuanzeInfoData.push({
  11761. name: fileName,
  11762. url: data.Location,
  11763. uid: fileUid,
  11764. type: _type,
  11765. fileid: fileid == 1 ? '' : fileid,
  11766. });
  11767. }else if (type == 18) {
  11768. if(!_this.pingjiaInfoData[tindex]){
  11769. _this.pingjiaInfoData[tindex] = []
  11770. }
  11771. _this.pingjiaInfoData[tindex].push({
  11772. name: fileName,
  11773. url: data.Location,
  11774. uid: fileUid,
  11775. type: _type,
  11776. fileid: fileid == 1 ? '' : fileid,
  11777. });
  11778. }else if (type == 19) {
  11779. _this.knowInfoData.push({
  11780. name: fileName,
  11781. url: data.Location,
  11782. uid: fileUid,
  11783. type: _type,
  11784. fileid: fileid == 1 ? '' : fileid,
  11785. });
  11786. if(fileid != 1){
  11787. _this.knowFileids.push(fileid)
  11788. }
  11789. }else if (type == 20) {
  11790. _this.knowInfoData2.push({
  11791. name: fileName,
  11792. url: data.Location,
  11793. uid: fileUid,
  11794. type: _type,
  11795. fileid: fileid == 1 ? '' : fileid,
  11796. });
  11797. if(fileid != 1){
  11798. _this.knowFileids2.push(fileid)
  11799. }
  11800. }
  11801. console.log(data.Location);
  11802. console.log(fileName,'----------',fileid);
  11803. }
  11804. });
  11805. }
  11806. }
  11807. },
  11808. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11809. // const loading = this.openLoading();
  11810. var file = event.target.files[0];
  11811. var credentials = {
  11812. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11813. secretAccessKey: "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",
  11814. }; //秘钥形式的登录上传
  11815. window.AWS.config.update(credentials);
  11816. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11817. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11818. var _this = this;
  11819. if (type == 3) {
  11820. var b = [
  11821. "DOC",
  11822. "DOCX",
  11823. "DOCM",
  11824. "DOTM",
  11825. "DOTX",
  11826. "PPTX",
  11827. "PPSX",
  11828. "PPT",
  11829. "PPS",
  11830. "PPTM",
  11831. "POTM",
  11832. "PPAM",
  11833. "POTX",
  11834. "PPSM",
  11835. ];
  11836. if (
  11837. b.indexOf(
  11838. file.name
  11839. .split(".")
  11840. [file.name.split(".").length - 1].toLocaleUpperCase()
  11841. ) != -1
  11842. ) {
  11843. if (file.size / 1024 / 1024 > 80) {
  11844. this.$message.error(this.lang.ssFileOver80MB);
  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. } else if (
  11852. file.name
  11853. .split(".")
  11854. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11855. ) {
  11856. if (file.size / 1024 / 1024 > 80) {
  11857. this.$message.error(this.lang.ssAddFileOver80);
  11858. this.inputShow = true;
  11859. // var a = _this.$refs.upload1.uploadFiles;
  11860. // a.splice(a.length - 1, a.length);
  11861. // loading.close();
  11862. return;
  11863. }
  11864. }
  11865. }
  11866. this.inputShow = false;
  11867. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11868. itemTaskIndex
  11869. ].progress = 0;
  11870. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11871. itemTaskIndex
  11872. ].proVisible = true;
  11873. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11874. itemTaskIndex
  11875. ].isFinishSize = 0;
  11876. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11877. itemTaskIndex
  11878. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11879. _this.$forceUpdate();
  11880. if (file) {
  11881. var params = {
  11882. Key:
  11883. file.name.split(".")[0] +
  11884. new Date().getTime() +
  11885. "." +
  11886. file.name.split(".")[file.name.split(".").length - 1],
  11887. ContentType: file.type,
  11888. Body: file,
  11889. "Access-Control-Allow-Credentials": "*",
  11890. ACL: "public-read",
  11891. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11892. var options = {
  11893. partSize: 2048 * 1024 * 1024,
  11894. queueSize: 2,
  11895. leavePartsOnError: true,
  11896. };
  11897. bucket
  11898. .upload(params, options)
  11899. .on("httpUploadProgress", function (evt) {
  11900. //这里可以写进度条
  11901. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11902. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11903. itemTaskIndex
  11904. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11905. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11906. itemTaskIndex
  11907. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11908. _this.$forceUpdate();
  11909. })
  11910. .send(function (err, data) {
  11911. // loading.close();
  11912. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11913. itemTaskIndex
  11914. ].progress = 100;
  11915. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11916. itemTaskIndex
  11917. ].isFinishSize =
  11918. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11919. itemTaskIndex
  11920. ].isAllSize;
  11921. _this.$forceUpdate();
  11922. setTimeout(() => {
  11923. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11924. itemTaskIndex
  11925. ].proVisible = false;
  11926. _this.$forceUpdate();
  11927. }, 1000);
  11928. _this.inputShow = true;
  11929. if (err) {
  11930. // var a = _this.$refs.upload1.uploadFiles;
  11931. // a.splice(a.length - 1, a.length);
  11932. _this.$message.error(_this.lang.ssUploadFail);
  11933. } else {
  11934. if (type == 2 || type == 3) {
  11935. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11936. itemTaskIndex
  11937. ].chapterData.unshift({
  11938. name: file.name,
  11939. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11940. // itemTaskIndex
  11941. // ].chapterData.length+1),
  11942. url: data.Location,
  11943. uid: file.uid,
  11944. type: type,
  11945. text: string,
  11946. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11947. // itemTaskIndex
  11948. // ].chapterData.length + 1),
  11949. });
  11950. _this.imgChange1(null, null, type, itemTaskIndex);
  11951. } else if (type == 4) {
  11952. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11953. itemTaskIndex
  11954. ].fileList1.push({
  11955. name: file.name,
  11956. url: data.Location,
  11957. uid: file.uid,
  11958. });
  11959. _this.imgChange1(null, null, type, itemTaskIndex);
  11960. } else if (type == 5) {
  11961. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11962. itemTaskIndex
  11963. ].homeworkList.push({
  11964. name: file.name,
  11965. url: data.Location,
  11966. uid: file.uid,
  11967. });
  11968. _this.imgChange1(null, null, type, itemTaskIndex);
  11969. }
  11970. console.log(data.Location);
  11971. }
  11972. });
  11973. }
  11974. },
  11975. addunit() {
  11976. this.unitJson.push({
  11977. dyName: "", //单元标题
  11978. isUpdate: 1,
  11979. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11980. chapterInfo: [
  11981. {
  11982. isread: false,
  11983. chapterid: this.guid(),
  11984. title: "",
  11985. courseName: "",
  11986. taskJson: [
  11987. {
  11988. task: "",
  11989. taskDetail: "",
  11990. chapterData: [],
  11991. toolText: "",
  11992. toolChoose: [
  11993. {
  11994. tool: [],
  11995. toolDetail: "",
  11996. toolType: 0,
  11997. askCount: 1,
  11998. askTitle: "",
  11999. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12000. },
  12001. ],
  12002. isShowTools: false,
  12003. askCount: 1,
  12004. isFold: 1,
  12005. askTitle: "",
  12006. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12007. checkJson: [{ checkCount: [], checkPerent: [] }],
  12008. homeworkList: [],
  12009. },
  12010. ],
  12011. itemCount: 1,
  12012. fileList1: [],
  12013. video: [],
  12014. testData: [],
  12015. pData: [],
  12016. templateArray: [],
  12017. },
  12018. ],
  12019. });
  12020. this.addindex = this.unitJson.length - 1;
  12021. setTimeout(() => {
  12022. this.unitIndex = this.unitJson.length - 1;
  12023. setTimeout(() => {
  12024. console.log(this.$refs.dyInput);
  12025. this.$refs.dyInput[0].focus();
  12026. }, 100);
  12027. this.unitSet(this.unitIndex);
  12028. }, 0);
  12029. },
  12030. addToolFun(itemTaskIndex) {
  12031. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12032. itemTaskIndex
  12033. ].toolChoose.push({
  12034. tool: [],
  12035. toolDetail: "",
  12036. toolType: 0,
  12037. askCount: 1,
  12038. askTitle: "",
  12039. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12040. });
  12041. },
  12042. addTaskBorder() {
  12043. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  12044. task: "",
  12045. taskDetail: "",
  12046. chapterData: [],
  12047. toolText: "",
  12048. toolChoose: [
  12049. {
  12050. tool: [],
  12051. toolDetail: "",
  12052. toolType: 0,
  12053. askCount: 1,
  12054. askTitle: "",
  12055. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12056. },
  12057. ],
  12058. isShowTools: false,
  12059. askCount: 1,
  12060. isFold: 1, //任务收起状态
  12061. askTitle: "",
  12062. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12063. checkJson: [{ checkCount: [], checkPerent: [] }],
  12064. homeworkList: [],
  12065. });
  12066. setTimeout(() => {
  12067. this.checkEva(this.checkId);
  12068. setTimeout(() => {
  12069. this.checkEva(this.checkId);
  12070. }, 100);
  12071. }, 100);
  12072. },
  12073. addTaskBorder2(type, index) {
  12074. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  12075. this.$message({
  12076. message: this.lang.ssOutGenWait,
  12077. type: "warning"
  12078. });
  12079. return;
  12080. }
  12081. if(type == 1){
  12082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  12083. task: "",
  12084. isTask2: true,
  12085. isTask3: true,
  12086. taskDetail: "",
  12087. chapterData: [],
  12088. toolText: "",
  12089. toolChoose: [
  12090. {
  12091. tool: [],
  12092. toolDetail: "",
  12093. toolType: 0,
  12094. askCount: 1,
  12095. askTitle: "",
  12096. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12097. },
  12098. ],
  12099. isShowTools: false,
  12100. askCount: 1,
  12101. isFold: 0, //任务收起状态
  12102. askTitle: "",
  12103. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12104. checkJson: [{ checkCount: [], checkPerent: [] }],
  12105. homeworkList: [],
  12106. })
  12107. }else if(type == 2){
  12108. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  12109. task: "",
  12110. isTask2: true,
  12111. isTask3: true,
  12112. taskDetail: "",
  12113. chapterData: [],
  12114. toolText: "",
  12115. toolChoose: [
  12116. {
  12117. tool: [],
  12118. toolDetail: "",
  12119. toolType: 0,
  12120. askCount: 1,
  12121. askTitle: "",
  12122. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12123. },
  12124. ],
  12125. isShowTools: false,
  12126. askCount: 1,
  12127. isFold: 0, //任务收起状态
  12128. askTitle: "",
  12129. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12130. checkJson: [{ checkCount: [], checkPerent: [] }],
  12131. homeworkList: [],
  12132. })
  12133. }
  12134. setTimeout(() => {
  12135. this.checkEva(this.checkId);
  12136. setTimeout(() => {
  12137. this.checkEva(this.checkId);
  12138. }, 100);
  12139. }, 100);
  12140. },
  12141. add(e, i) {
  12142. var el = e.currentTarget;
  12143. el.getElementsByTagName("input")[0].click();
  12144. },
  12145. fold(i, e) {
  12146. if (
  12147. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  12148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  12149. ) {
  12150. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  12151. } else {
  12152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12153. }
  12154. },
  12155. fold2(i) {
  12156. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  12157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12158. i
  12159. ].isFold2 = false;
  12160. } else {
  12161. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12162. }
  12163. this.$forceUpdate();
  12164. },
  12165. foldEva(i) {
  12166. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12167. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12168. i
  12169. ].isEvaFold = false;
  12170. } else {
  12171. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12172. i
  12173. ].isEvaFold = true;
  12174. setTimeout(() => {
  12175. this.checkEva(this.checkId);
  12176. setTimeout(() => {
  12177. this.checkEva(this.checkId);
  12178. }, 500);
  12179. }, 0);
  12180. }
  12181. this.$forceUpdate();
  12182. },
  12183. foldC(i) {
  12184. if (
  12185. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12186. ) {
  12187. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12188. i
  12189. ].isFoldchapter = false;
  12190. } else {
  12191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12192. i
  12193. ].isFoldchapter = true;
  12194. }
  12195. this.$forceUpdate();
  12196. },
  12197. fold3(i, ti) {
  12198. if (
  12199. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12200. .isFold3
  12201. ) {
  12202. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12203. ti
  12204. ].isFold3 = false;
  12205. } else {
  12206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12207. ti
  12208. ].isFold3 = true;
  12209. }
  12210. this.$forceUpdate();
  12211. },
  12212. deleteHomeworkBox(unitIndex, index, i) {
  12213. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12214. this.taskCount
  12215. ].homeworkList.splice(i, 1);
  12216. },
  12217. getStudent() {
  12218. let params = {
  12219. oid: this.oid,
  12220. cu: "",
  12221. cn: this.searchPeople,
  12222. };
  12223. this.ajax
  12224. .get(this.$store.state.api + "selectStudentAdd", params)
  12225. .then((res) => {
  12226. this.studentJuri = res.data[0];
  12227. })
  12228. .catch((err) => {
  12229. this.isLoading = false;
  12230. console.error(err);
  12231. });
  12232. },
  12233. // 添加协同成员其他选项按钮
  12234. getTeacherCopy(){
  12235. this.CollLoading=true
  12236. this.collid = ''
  12237. this.collid = '1xpz'
  12238. let params = {
  12239. oid:
  12240. this.org && this.org != "undefined" && this.org != "null"
  12241. ? this.org
  12242. : this.oid,
  12243. cu: "",
  12244. cn: this.searchTN,
  12245. coll: ''
  12246. };
  12247. this.ajax
  12248. .get(
  12249. this.$store.state.api +
  12250. (this.org && this.org != "undefined" && this.org != "null"
  12251. ? "selectCollaborativeMembersOrg"
  12252. : "selectCollaborativeMembers"),
  12253. params
  12254. )
  12255. .then((res) => {
  12256. let teacherJuri = res.data[0];
  12257. this.CollaborativeTeaList = res.data[1];
  12258. for (var i = 0; i < teacherJuri.length; i++) {
  12259. if (teacherJuri[i].userid == this.userid) {
  12260. teacherJuri.splice(i, 1);
  12261. break;
  12262. }
  12263. }
  12264. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12265. return (i.cclassid == '' || i.cclassid == null)
  12266. })
  12267. console.log(' this.teacherJuri', this.teacherJuri);
  12268. let _check = [];
  12269. let _check2 = [];
  12270. for (var i = 0; i < this.teacherJuri.length; i++) {
  12271. var gid = this.teacherJuri[i].userid;
  12272. _check.push(gid);
  12273. }
  12274. for (var i = 0; i < this.checkboxList3.length; i++) {
  12275. var _id = this.checkboxList3[i];
  12276. if (_check.indexOf(_id) !== -1) {
  12277. _check2.push(_id);
  12278. }
  12279. }
  12280. if (_check2.length==0 && _check.length==0) {
  12281. }else{
  12282. this.checkAll2 = _check2.length === _check.length;
  12283. }
  12284. this.CollLoading=false
  12285. })
  12286. .catch((err) => {
  12287. console.error(err);
  12288. this.CollLoading=false
  12289. });
  12290. },
  12291. getTeacher(val) {
  12292. this.CollLoading=true
  12293. this.collid = ''
  12294. this.collid = !val ? '' : val
  12295. let params = {
  12296. oid:
  12297. this.org && this.org != "undefined" && this.org != "null"
  12298. ? this.org
  12299. : this.oid,
  12300. cu: "",
  12301. cn: this.searchTN,
  12302. coll: this.collid
  12303. };
  12304. this.ajax
  12305. .get(
  12306. this.$store.state.api +
  12307. (this.org && this.org != "undefined" && this.org != "null"
  12308. ? "selectCollaborativeMembersOrg"
  12309. : "selectCollaborativeMembers"),
  12310. params
  12311. )
  12312. .then((res) => {
  12313. let teacherJuri = res.data[0];
  12314. this.CollaborativeTeaList = res.data[1];
  12315. for (var i = 0; i < teacherJuri.length; i++) {
  12316. if (teacherJuri[i].userid == this.userid) {
  12317. teacherJuri.splice(i, 1);
  12318. break;
  12319. }
  12320. }
  12321. this.teacherJuri = teacherJuri;
  12322. let _check = [];
  12323. let _check2 = [];
  12324. for (var i = 0; i < this.teacherJuri.length; i++) {
  12325. var gid = this.teacherJuri[i].userid;
  12326. _check.push(gid);
  12327. }
  12328. for (var i = 0; i < this.checkboxList3.length; i++) {
  12329. var _id = this.checkboxList3[i];
  12330. if (_check.indexOf(_id) !== -1) {
  12331. _check2.push(_id);
  12332. }
  12333. }
  12334. if (_check2.length==0 && _check.length==0) {
  12335. }else{
  12336. this.checkAll2 = _check2.length === _check.length;
  12337. }
  12338. this.CollLoading=false
  12339. })
  12340. .catch((err) => {
  12341. console.error(err);
  12342. this.CollLoading=false
  12343. });
  12344. },
  12345. searchStudent() {
  12346. this.getStudent();
  12347. },
  12348. selectGrage() {
  12349. let params = {
  12350. oid: this.oid,
  12351. };
  12352. this.ajax
  12353. .get(this.$store.state.api + "selectGrageBySchool", params)
  12354. .then((res) => {
  12355. this.gradeList = res.data[0];
  12356. })
  12357. .catch((err) => {
  12358. this.isLoading = false;
  12359. console.error(err);
  12360. });
  12361. },
  12362. //获取班级列表
  12363. getClass() {
  12364. let params = {
  12365. oid: this.oid,
  12366. gid: this.gradeId,
  12367. cn: this.classSearch,
  12368. };
  12369. this.ajax
  12370. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12371. .then((res) => {
  12372. if (!this.grade.length) {
  12373. this.grade = res.data[0];
  12374. }
  12375. this.grade2 = res.data[0];
  12376. this.classJuri = res.data[0];
  12377. let _check = [];
  12378. let _check2 = [];
  12379. for (var i = 0; i < this.grade2.length; i++) {
  12380. var gid = this.grade2[i].id;
  12381. _check.push(gid);
  12382. }
  12383. for (var i = 0; i < this.checkboxList2.length; i++) {
  12384. var _id = this.checkboxList2[i];
  12385. if (_check.indexOf(_id) !== -1) {
  12386. _check2.push(_id);
  12387. }
  12388. }
  12389. this.checkAll = _check2.length === _check.length;
  12390. })
  12391. .catch((err) => {
  12392. this.isLoading = false;
  12393. console.error(err);
  12394. });
  12395. },
  12396. CourseType2Change(val) {
  12397. this.pTypeCheck = [];
  12398. for (var i = 0; i < this.CourseType2.length; i++) {
  12399. let typeA = this.CourseType2[i];
  12400. if (val.indexOf(typeA.name) != -1) {
  12401. this.pTypeCheck.push(...typeA.id);
  12402. }
  12403. }
  12404. },
  12405. arrayToArray(arrayo, arrayt) {
  12406. let array1 = arrayo;
  12407. let array2 = arrayt;
  12408. let commonElements = [];
  12409. for (let i = 0; i < array1.length; i++) {
  12410. for (let j = 0; j < array2.length; j++) {
  12411. if (array1[i] === array2[j]) {
  12412. commonElements.push(array1[i]);
  12413. }
  12414. }
  12415. }
  12416. return commonElements;
  12417. },
  12418. typeChange(){
  12419. let courseInfo = ``
  12420. let sub = []
  12421. let mclass = []
  12422. let theme = []
  12423. if (this.courseTypeId.length) {
  12424. for (var i = 0; i < this.courseTypeId.length; i++) {
  12425. let _sid = this.courseTypeId[i]
  12426. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12427. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12428. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12429. }
  12430. }
  12431. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12432. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12433. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12434. }
  12435. }
  12436. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12437. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12438. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12439. }
  12440. }
  12441. }
  12442. }
  12443. sub = JSON.parse(converter(JSON.stringify(sub)))
  12444. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12445. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12446. let _file = this.knowFileArray[fi]
  12447. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12448. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12449. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12450. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12451. let fileids = this.knowInfoData.map((item) => item.fileid)
  12452. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12453. this.knowInfoData.push({
  12454. name: _file.filename,
  12455. url: _file.url,
  12456. uid: '',
  12457. type: 3,
  12458. fileid: _file.fileid,
  12459. });
  12460. this.knowFileids.push(_file.fileid)
  12461. }
  12462. fileids = this.knowInfoData.map((item) => item.fileid)
  12463. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12464. this.knowInfoData.push({
  12465. name: _file.filename,
  12466. url: _file.url,
  12467. uid: '',
  12468. type: 3,
  12469. fileid: _file.fileid,
  12470. });
  12471. this.knowFileids.push(_file.fileid)
  12472. }
  12473. fileids = this.knowInfoData.map((item) => item.fileid)
  12474. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12475. this.knowInfoData.push({
  12476. name: _file.filename,
  12477. url: _file.url,
  12478. uid: '',
  12479. type: 3,
  12480. fileid: _file.fileid,
  12481. });
  12482. this.knowFileids.push(_file.fileid)
  12483. }
  12484. fileids = this.knowInfoData.map((item) => item.fileid)
  12485. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12486. this.knowInfoData.push({
  12487. name: _file.filename,
  12488. url: _file.url,
  12489. uid: '',
  12490. type: 3,
  12491. fileid: _file.fileid,
  12492. });
  12493. this.knowFileids.push(_file.fileid)
  12494. }
  12495. fileids = this.knowInfoData.map((item) => item.fileid)
  12496. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12497. this.knowInfoData.push({
  12498. name: _file.filename,
  12499. url: _file.url,
  12500. uid: '',
  12501. type: 3,
  12502. fileid: _file.fileid,
  12503. });
  12504. this.knowFileids.push(_file.fileid)
  12505. }
  12506. }
  12507. if(mclass.length){
  12508. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  12509. }
  12510. if(sub.length){
  12511. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  12512. }
  12513. if(theme.length){
  12514. courseInfo += `${this.lang.ssThemeColon}${theme.join(',')} `
  12515. }
  12516. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12517. this.typeC1 = this.getTypeC(2)
  12518. this.typeC2 = this.getTypeC(1)
  12519. },
  12520. getChapterData(e, i, j, ic, type) {
  12521. e.stopPropagation();
  12522. this.updataC = true;
  12523. this.icc = ic;
  12524. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12525. console.log(this.lang.ssCantDown);
  12526. }
  12527. },
  12528. deleteChapterData(e, i, j, ic, taskI) {
  12529. e.stopPropagation();
  12530. let _this = this;
  12531. _this
  12532. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12533. confirmButtonText: this.lang.ssConfirm,
  12534. cancelButtonText: this.lang.ssCancel,
  12535. type: "warning",
  12536. })
  12537. .then(() => {
  12538. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12539. ic,
  12540. 1
  12541. );
  12542. })
  12543. .catch(() => {
  12544. return;
  12545. });
  12546. },
  12547. checkInfoData(fileid, file){
  12548. let type = 1
  12549. let index = 0
  12550. for(let i = 0; i < this.infoData.length; i++){
  12551. if(this.infoData[i].fileid == fileid){
  12552. type = 2
  12553. index = i
  12554. }
  12555. }
  12556. if(type == 2){
  12557. this.infoData.splice(index, 1)
  12558. }else {
  12559. this.infoData.push({...file})
  12560. }
  12561. },
  12562. checkKnowInfoData(fileid){
  12563. if(this.knowFileids.indexOf(fileid) == -1){
  12564. this.knowFileids.push(fileid)
  12565. }else {
  12566. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12567. }
  12568. },
  12569. checkKnowInfoData2(fileid){
  12570. if(!fileid){
  12571. return
  12572. }
  12573. if(this.knowFileids2.indexOf(fileid) == -1){
  12574. this.knowFileids2.push(fileid)
  12575. }else {
  12576. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12577. }
  12578. },
  12579. checkKnowInfoData3(fileid){
  12580. if(this.knowFileids3.indexOf(fileid) == -1){
  12581. this.knowFileids3.push(fileid)
  12582. }else {
  12583. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12584. }
  12585. },
  12586. checkAllKnowInfoData3(){
  12587. // let array = this.knowInfoData3;
  12588. // if(this.knowFileids3.length === array.length){
  12589. // this.knowFileids3 = []; // 取消全选
  12590. // } else {
  12591. // this.knowFileids3 = array.map(item => item.url); // 全选
  12592. // }
  12593. let files = this.allknowInfoData3();
  12594. let count = 0
  12595. for(var i = 0; i < files.length; i++){
  12596. if(this.knowFileids3.includes(files[i].url)){
  12597. count++
  12598. }
  12599. }
  12600. if (count == files.length) {
  12601. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12602. } else {
  12603. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12604. }
  12605. },
  12606. checkAllKnowInfoData2(){
  12607. let array = this.knowInfoData2;
  12608. if(this.knowFileids2.length === array.length){
  12609. this.knowFileids2 = []; // 取消全选
  12610. } else {
  12611. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12612. }
  12613. },
  12614. deleteCheckAllKnowInfoData2(){
  12615. let _this = this;
  12616. _this
  12617. .$confirm(this.lang.ssDelSelFile, this.lang.ssTip, {
  12618. confirmButtonText: this.lang.ssConfirm,
  12619. cancelButtonText: this.lang.ssCancel,
  12620. type: "warning",
  12621. })
  12622. .then(() => {
  12623. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12624. _this.knowFileids2 = []
  12625. _this.$forceUpdate()
  12626. })
  12627. .catch(() => {
  12628. return;
  12629. });
  12630. },
  12631. checkAppendixFile(url){
  12632. if(this.appendixFiles.indexOf(url) == -1){
  12633. this.appendixFiles.push(url)
  12634. }else {
  12635. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12636. }
  12637. },
  12638. checkAllappendixFile(){
  12639. let files = this.allFile();
  12640. let count = 0
  12641. for(var i = 0; i < files.length; i++){
  12642. if(this.appendixFiles.includes(files[i].url)){
  12643. count++
  12644. }
  12645. }
  12646. if (count == files.length) {
  12647. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12648. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12649. this.appendixFiles = []
  12650. }
  12651. } else {
  12652. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12653. }
  12654. },
  12655. async exportAppendixFiles(){
  12656. let files = this.allFile(2);
  12657. let uploadFile = []
  12658. for(var i = 0; i < files.length; i++){
  12659. if(this.appendixFiles.includes(files[i].url)){
  12660. uploadFile.push(files[i])
  12661. }
  12662. }
  12663. if(!uploadFile.length){
  12664. this.$message.error(this.lang.ssSelAttach)
  12665. return
  12666. }
  12667. this.appendixLoading = true
  12668. const zip = new JSZip();
  12669. for(var j = 0; j < uploadFile.length; j++){
  12670. let fileZ = uploadFile[j]
  12671. let name = fileZ.name
  12672. let file = await getFile(fileZ.url)
  12673. const file_name = fileZ.name; // 获取文件名
  12674. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12675. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12676. // 判断是否有重复的文件名字
  12677. if (!zip.file(file_name)) {
  12678. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12679. } else {
  12680. // 如果有重复的文件名,则在文件名后添加序号
  12681. let count = 1;
  12682. let newFileName = fileNameWithoutExt;
  12683. while (zip.file(`${newFileName}.${fileExt}`)) {
  12684. newFileName = `${fileNameWithoutExt}(${count})`;
  12685. count++;
  12686. }
  12687. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12688. }
  12689. // zip.file(`${name}`, file.data, { binary: true })
  12690. }
  12691. zip.generateAsync({ type: "blob" }).then((content) => {
  12692. // 生成二进制流
  12693. saveAs(
  12694. content,
  12695. this.courseName + "-" + this.lang.ssAttachZip
  12696. ); // 利用file-saver保存文件 自定义文件名
  12697. setTimeout(() => {
  12698. this.appendixLoading = false
  12699. }, 2000);
  12700. });
  12701. },
  12702. deleteInfoData(e, ic) {
  12703. e.stopPropagation();
  12704. let _this = this;
  12705. _this
  12706. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12707. confirmButtonText: this.lang.ssConfirm,
  12708. cancelButtonText: this.lang.ssCancel,
  12709. type: "warning",
  12710. })
  12711. .then(() => {
  12712. _this.infoData.splice(
  12713. ic,
  12714. 1
  12715. );
  12716. })
  12717. .catch(() => {
  12718. return;
  12719. });
  12720. },
  12721. deleteInfoData2(e, ic) {
  12722. e.stopPropagation();
  12723. let _this = this;
  12724. _this
  12725. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12726. confirmButtonText: this.lang.ssConfirm,
  12727. cancelButtonText: this.lang.ssCancel,
  12728. type: "warning",
  12729. })
  12730. .then(() => {
  12731. let fileid = _this.infoData2[ic].fileid;
  12732. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12733. _this.infoData2.splice(
  12734. ic,
  12735. 1
  12736. );
  12737. })
  12738. .catch(() => {
  12739. return;
  12740. });
  12741. },
  12742. deleteKnowInfoData(e, ic) {
  12743. e.stopPropagation();
  12744. let _this = this;
  12745. _this
  12746. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12747. confirmButtonText: this.lang.ssConfirm,
  12748. cancelButtonText: this.lang.ssCancel,
  12749. type: "warning",
  12750. })
  12751. .then(() => {
  12752. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12753. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12754. }
  12755. _this.knowInfoData.splice(
  12756. ic,
  12757. 1
  12758. );
  12759. })
  12760. .catch(() => {
  12761. return;
  12762. });
  12763. },
  12764. deleteKnowInfoData2(e, ic) {
  12765. e.stopPropagation();
  12766. let _this = this;
  12767. _this
  12768. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12769. confirmButtonText: this.lang.ssConfirm,
  12770. cancelButtonText: this.lang.ssCancel,
  12771. type: "warning",
  12772. })
  12773. .then(() => {
  12774. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12775. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12776. }
  12777. _this.knowInfoData2.splice(
  12778. ic,
  12779. 1
  12780. );
  12781. })
  12782. .catch(() => {
  12783. return;
  12784. });
  12785. },
  12786. deletemubiaoInfoData(e, ic) {
  12787. e.stopPropagation();
  12788. let _this = this;
  12789. _this
  12790. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12791. confirmButtonText: this.lang.ssConfirm,
  12792. cancelButtonText: this.lang.ssCancel,
  12793. type: "warning",
  12794. })
  12795. .then(() => {
  12796. _this.mubiaoInfoData.splice(
  12797. ic,
  12798. 1
  12799. );
  12800. })
  12801. .catch(() => {
  12802. return;
  12803. });
  12804. },
  12805. deletexuanzeInfoData(e, ic) {
  12806. e.stopPropagation();
  12807. let _this = this;
  12808. _this
  12809. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12810. confirmButtonText: this.lang.ssConfirm,
  12811. cancelButtonText: this.lang.ssCancel,
  12812. type: "warning",
  12813. })
  12814. .then(() => {
  12815. _this.xuanzeInfoData.splice(
  12816. ic,
  12817. 1
  12818. );
  12819. })
  12820. .catch(() => {
  12821. return;
  12822. });
  12823. },
  12824. deletepingjiaInfoData(e, ic, tindex) {
  12825. e.stopPropagation();
  12826. let _this = this;
  12827. _this
  12828. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12829. confirmButtonText: this.lang.ssConfirm,
  12830. cancelButtonText: this.lang.ssCancel,
  12831. type: "warning",
  12832. })
  12833. .then(() => {
  12834. _this.pingjiaInfoData[tindex].splice(
  12835. ic,
  12836. 1
  12837. );
  12838. })
  12839. .catch(() => {
  12840. return;
  12841. });
  12842. },
  12843. deleteCankaoInfoData(e, ic) {
  12844. e.stopPropagation();
  12845. let _this = this;
  12846. _this
  12847. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12848. confirmButtonText: this.lang.ssConfirm,
  12849. cancelButtonText: this.lang.ssCancel,
  12850. type: "warning",
  12851. })
  12852. .then(() => {
  12853. _this.cankaoInfoData.splice(
  12854. ic,
  12855. 1
  12856. );
  12857. })
  12858. .catch(() => {
  12859. return;
  12860. });
  12861. },
  12862. deleteTeacherInfoData(e, ic) {
  12863. e.stopPropagation();
  12864. let _this = this;
  12865. _this
  12866. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12867. confirmButtonText: this.lang.ssConfirm,
  12868. cancelButtonText: this.lang.ssCancel,
  12869. type: "warning",
  12870. })
  12871. .then(() => {
  12872. _this.teacherInfoData.splice(
  12873. ic,
  12874. 1
  12875. );
  12876. })
  12877. .catch(() => {
  12878. return;
  12879. });
  12880. },
  12881. updataVideoT(e, i, j, ic) {
  12882. // e.stopPropagation();
  12883. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12884. // ic
  12885. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12886. this.line =
  12887. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12888. this.taskCount = j;
  12889. this.lineCount = ic;
  12890. this.dialogVisibleupdataVideoT = true;
  12891. this.$forceUpdate();
  12892. },
  12893. checkChpater(e, i, j, ic){
  12894. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12895. if(type == 3){
  12896. var fileA = [
  12897. "DOC",
  12898. "DOCX",
  12899. "DOCM",
  12900. "DOTM",
  12901. "DOTX",
  12902. "PPTX",
  12903. "PPSX",
  12904. "PPT",
  12905. "PPS",
  12906. "PPTM",
  12907. "POTM",
  12908. "PPAM",
  12909. "POTX",
  12910. "PPSM",
  12911. "XLSX",
  12912. "XLS"
  12913. ];
  12914. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12915. if (
  12916. fileA.indexOf(
  12917. url.split(".")[
  12918. url.split(".").length - 1
  12919. ].toLocaleUpperCase()
  12920. ) != -1
  12921. ) {
  12922. this.dialogVisibleOffice = true
  12923. this.wurl = url
  12924. } else if (
  12925. "pdf".indexOf(
  12926. url.split(".")[
  12927. url.split(".").length - 1
  12928. ].toLocaleLowerCase()
  12929. ) != -1
  12930. ) {
  12931. this.dialogVisiblePdf = true
  12932. this.wurl = url
  12933. }
  12934. }
  12935. },
  12936. checkChpater2(e, ic){
  12937. let type = this.infoData2[ic].type
  12938. if(type == 3){
  12939. var fileA = [
  12940. "DOC",
  12941. "DOCX",
  12942. "DOCM",
  12943. "DOTM",
  12944. "DOTX",
  12945. "PPTX",
  12946. "PPSX",
  12947. "PPT",
  12948. "PPS",
  12949. "PPTM",
  12950. "POTM",
  12951. "PPAM",
  12952. "POTX",
  12953. "PPSM",
  12954. "XLSX",
  12955. "XLS"
  12956. ];
  12957. let url = this.infoData2[ic].url
  12958. if (
  12959. fileA.indexOf(
  12960. url.split(".")[
  12961. url.split(".").length - 1
  12962. ].toLocaleUpperCase()
  12963. ) != -1
  12964. ) {
  12965. this.dialogVisibleOffice = true
  12966. this.wurl = url
  12967. } else if (
  12968. "pdf".indexOf(
  12969. url.split(".")[
  12970. url.split(".").length - 1
  12971. ].toLocaleLowerCase()
  12972. ) != -1
  12973. ) {
  12974. this.dialogVisiblePdf = true
  12975. this.wurl = url
  12976. }
  12977. }
  12978. },
  12979. checkChpater3(e, ic, item){
  12980. let type = item.type
  12981. if(type == 3){
  12982. var fileA = [
  12983. "DOC",
  12984. "DOCX",
  12985. "DOCM",
  12986. "DOTM",
  12987. "DOTX",
  12988. "PPTX",
  12989. "PPSX",
  12990. "PPT",
  12991. "PPS",
  12992. "PPTM",
  12993. "POTM",
  12994. "PPAM",
  12995. "POTX",
  12996. "PPSM",
  12997. "XLSX",
  12998. "XLS"
  12999. ];
  13000. let url = item.url
  13001. if (
  13002. fileA.indexOf(
  13003. url.split(".")[
  13004. url.split(".").length - 1
  13005. ].toLocaleUpperCase()
  13006. ) != -1
  13007. ) {
  13008. this.dialogVisibleOffice = true
  13009. this.wurl = url
  13010. } else if (
  13011. "pdf".indexOf(
  13012. url.split(".")[
  13013. url.split(".").length - 1
  13014. ].toLocaleLowerCase()
  13015. ) != -1
  13016. ) {
  13017. this.dialogVisiblePdf = true
  13018. this.wurl = url
  13019. }
  13020. }
  13021. },
  13022. updataVideoC() {
  13023. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13024. this.taskCount
  13025. ].chapterData[this.lineCount].name = JSON.parse(
  13026. JSON.stringify(this.line)
  13027. );
  13028. this.dialogVisibleupdataVideoT = false;
  13029. this.$forceUpdate();
  13030. },
  13031. upCd(e, i, j, taskCount, ic) {
  13032. e.stopPropagation();
  13033. if (ic == 0) {
  13034. return;
  13035. }
  13036. var a = JSON.parse(
  13037. JSON.stringify(
  13038. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13039. ic - 1
  13040. ]
  13041. )
  13042. );
  13043. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  13044. JSON.parse(
  13045. JSON.stringify(
  13046. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13047. )
  13048. );
  13049. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13050. this.$forceUpdate();
  13051. },
  13052. downCd(e, i, j, taskCount, ic) {
  13053. e.stopPropagation();
  13054. if (
  13055. ic ==
  13056. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  13057. 1
  13058. ) {
  13059. return;
  13060. }
  13061. var a = JSON.parse(
  13062. JSON.stringify(
  13063. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13064. ic + 1
  13065. ]
  13066. )
  13067. );
  13068. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  13069. JSON.parse(
  13070. JSON.stringify(
  13071. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13072. )
  13073. );
  13074. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13075. this.$forceUpdate();
  13076. },
  13077. async upTool(e, i, j, tooli) {
  13078. e.stopPropagation();
  13079. if (tooli == 0) {
  13080. return;
  13081. }
  13082. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  13083. let count2 = await this.getWorksCount(3, i, j, tooli);
  13084. if (count1 > 0 || count2 > 0) {
  13085. this.$confirm(
  13086. this.lang.ssSwitchMove,
  13087. this.lang.ssTip,
  13088. {
  13089. confirmButtonText: this.lang.ssConfirm,
  13090. cancelButtonText: this.lang.ssCancel,
  13091. type: "warning",
  13092. }
  13093. )
  13094. .then(() => {
  13095. var a = JSON.parse(
  13096. JSON.stringify(
  13097. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13098. tooli - 1
  13099. ]
  13100. )
  13101. );
  13102. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13103. JSON.parse(
  13104. JSON.stringify(
  13105. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13106. )
  13107. );
  13108. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13109. this.$forceUpdate();
  13110. this.moveWork(3, i, j, tooli - 1, i, j, tooli);
  13111. this.updateWork();
  13112. })
  13113. .catch(() => {
  13114. return;
  13115. });
  13116. } else {
  13117. var a = JSON.parse(
  13118. JSON.stringify(
  13119. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  13120. )
  13121. );
  13122. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13123. JSON.parse(
  13124. JSON.stringify(
  13125. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13126. )
  13127. );
  13128. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13129. this.$forceUpdate();
  13130. }
  13131. },
  13132. async downTool(e, i, j, tooli) {
  13133. e.stopPropagation();
  13134. if (
  13135. tooli ==
  13136. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  13137. ) {
  13138. return;
  13139. }
  13140. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  13141. let count2 = await this.getWorksCount(3, i, j, tooli);
  13142. if (count1 > 0 || count2 > 0) {
  13143. this.$confirm(
  13144. this.lang.ssSwitchMove,
  13145. this.lang.ssTip,
  13146. {
  13147. confirmButtonText: this.lang.ssConfirm,
  13148. cancelButtonText: this.lang.ssCancel,
  13149. type: "warning",
  13150. }
  13151. )
  13152. .then(() => {
  13153. var a = JSON.parse(
  13154. JSON.stringify(
  13155. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13156. tooli + 1
  13157. ]
  13158. )
  13159. );
  13160. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13161. JSON.parse(
  13162. JSON.stringify(
  13163. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13164. )
  13165. );
  13166. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13167. this.$forceUpdate();
  13168. this.moveWork(3, i, j, tooli + 1, i, j, tooli);
  13169. this.updateWork();
  13170. })
  13171. .catch(() => {
  13172. return;
  13173. });
  13174. } else {
  13175. var a = JSON.parse(
  13176. JSON.stringify(
  13177. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13178. )
  13179. );
  13180. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13181. JSON.parse(
  13182. JSON.stringify(
  13183. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13184. )
  13185. );
  13186. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13187. this.$forceUpdate();
  13188. }
  13189. },
  13190. addWork(type) {
  13191. if(type == 2 && this.courseName == "") {
  13192. this.$message.error(this.lang.ssFillCourseName);
  13193. return;
  13194. }
  13195. let cPan = 1;
  13196. for (var i = 0; i < this.unitJson.length; i++) {
  13197. for (
  13198. var j = 0;
  13199. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13200. j++
  13201. ) {
  13202. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13203. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13204. if (
  13205. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13206. ) {
  13207. for (
  13208. var z = 0;
  13209. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13210. z++
  13211. ) {
  13212. if (
  13213. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13214. .length
  13215. ) {
  13216. this.$message.error(this.lang.ssAddToolFull);
  13217. cPan = 2;
  13218. break;
  13219. }
  13220. }
  13221. }
  13222. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13223. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13224. i
  13225. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13226. return ele.value != "" || ele.detail != "" || ele.target != "";
  13227. });
  13228. }
  13229. }
  13230. }
  13231. this.inputShow = true;
  13232. if (cPan == 2) {
  13233. this.steps--;
  13234. return;
  13235. }
  13236. for (var i = 0; i < this.unitJson.length; i++) {
  13237. delete this.unitJson[i].isUpdate;
  13238. }
  13239. if(!this.targetCourseText2){
  13240. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13241. }
  13242. let imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png'
  13243. if (this.lang.lang == 'com') {
  13244. imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20260112142829_1081_2831768354076152.png'
  13245. }
  13246. let params = [
  13247. {
  13248. uid: this.userid,
  13249. title: this.courseName,
  13250. brief: this.courseText,
  13251. cover:
  13252. this.cover.length > 0
  13253. ? JSON.stringify(this.cover)
  13254. : JSON.stringify([
  13255. {
  13256. name: "noBanner.jpg",
  13257. url: imgUrl,
  13258. uid: 1656409780264,
  13259. status: "success",
  13260. },
  13261. ]),
  13262. evaId: this.evalua,
  13263. astudent:
  13264. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13265. see: this.isTeacherSee == true ? 1 : 0,
  13266. chapters: JSON.stringify(this.unitJson),
  13267. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13268. courseType: JSON.stringify(this.courseTypeId),
  13269. ateacher:
  13270. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13271. inviteCode: JSON.stringify(this.inviteCode),
  13272. refile: JSON.stringify(this.infoData),
  13273. reBrief: this.courseText2,
  13274. cpote: JSON.stringify(this.cpote),
  13275. setting: JSON.stringify({
  13276. courseJie: this.courseJie,
  13277. courseTime: this.courseTime,
  13278. teacherInfoData: this.teacherInfoData,
  13279. teacherCourseText: this.teacherCourseText,
  13280. targetCourseText: this.targetCourseText,
  13281. cankaoInfoData: this.cankaoInfoData,
  13282. mubiaoInfoData: this.mubiaoInfoData,
  13283. xuanzeInfoData: this.xuanzeInfoData,
  13284. pingjiaInfoData: this.pingjiaInfoData,
  13285. infoData2: this.infoData2,
  13286. isuseT: this.isuseT,
  13287. mode: this.mode,
  13288. targetCourseText2: this.targetCourseText2,
  13289. chatid: this.chatid,
  13290. languageSetting: this.languageSetting,
  13291. knowInfoData: this.knowInfoData,
  13292. knowFileids: this.knowFileids,
  13293. knowInfoData2: this.knowInfoData2,
  13294. knowFileids2: this.knowFileids2,
  13295. recordVideoText: this.recordVideoText,
  13296. recordAudioUrl: this.recordAudioUrl,
  13297. appendixFile: this.appendixFile,
  13298. }),
  13299. iresearch: this.isFileSearch ? 1 : 2,
  13300. },
  13301. ];
  13302. this.ajax
  13303. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13304. .then((res) => {
  13305. console.log(this.steps);
  13306. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13307. this.$message({
  13308. message: this.lang.ssAddSucc,
  13309. type: "success",
  13310. });
  13311. }
  13312. this.number = res.data.ordernumber;
  13313. this.courseId = res.data.courseId;
  13314. this.cid = res.data.courseId;
  13315. this.courseUserid = this.userid;
  13316. this.islogin = true;
  13317. // this.updateCourseState(4);
  13318. this.updateCourseState(5);
  13319. this.addtips()
  13320. if(type == 2){
  13321. this.retrunCourse()
  13322. }
  13323. if(type == 3){
  13324. this.steps = 4
  13325. }
  13326. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13327. })
  13328. .catch((err) => {
  13329. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13330. this.$message.error(this.lang.ssNetPoor);
  13331. console.error(err);
  13332. });
  13333. },
  13334. goCourse() {
  13335. window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
  13336. },
  13337. updateWork2() {
  13338. let _unitIndex = this.unitIndex;
  13339. let cPan = 1;
  13340. for (
  13341. var j = 0;
  13342. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13343. j++
  13344. ) {
  13345. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13346. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13347. j
  13348. ].proVisible2 = false;
  13349. if (
  13350. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13351. .length > 1
  13352. ) {
  13353. for (
  13354. var z = 0;
  13355. z <
  13356. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13357. .length;
  13358. z++
  13359. ) {
  13360. if (
  13361. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13362. z
  13363. ].tool.length
  13364. ) {
  13365. this.$message.error(this.lang.ssAddToolFull);
  13366. cPan = 2;
  13367. break;
  13368. }
  13369. }
  13370. }
  13371. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13372. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13373. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13374. (ele) => {
  13375. return ele.value != "" || ele.detail != "" || ele.target != "";
  13376. }
  13377. );
  13378. }
  13379. }
  13380. this.inputShow = true;
  13381. if (cPan == 2) {
  13382. this.steps--;
  13383. return;
  13384. }
  13385. let params = [
  13386. {
  13387. cid: this.cid,
  13388. chapters: JSON.stringify(this.unitJson),
  13389. uid: this.userid,
  13390. unitIndex: _unitIndex,
  13391. },
  13392. ];
  13393. this.ajax
  13394. .post(this.$store.state.api + "updateWorkNew4", params)
  13395. .then((res) => {
  13396. this.$message({
  13397. message: this.lang.UpdateSuccessful,
  13398. type: "success",
  13399. });
  13400. this.courseId = this.cid;
  13401. this.addtips();
  13402. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13403. })
  13404. .catch((err) => {
  13405. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13406. this.$message.error(this.lang.ssNetPoor);
  13407. console.error(err);
  13408. });
  13409. },
  13410. updateWork3(unitIndex) {
  13411. let _unitIndex = unitIndex;
  13412. let cPan = 1;
  13413. for (
  13414. var j = 0;
  13415. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13416. j++
  13417. ) {
  13418. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13419. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13420. j
  13421. ].proVisible2 = false;
  13422. if (
  13423. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13424. .length > 1
  13425. ) {
  13426. for (
  13427. var z = 0;
  13428. z <
  13429. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13430. .length;
  13431. z++
  13432. ) {
  13433. if (
  13434. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13435. z
  13436. ].tool.length
  13437. ) {
  13438. this.$message.error(this.lang.ssAddToolFull);
  13439. cPan = 2;
  13440. break;
  13441. }
  13442. }
  13443. }
  13444. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13445. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13446. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13447. (ele) => {
  13448. return ele.value != "" || ele.detail != "" || ele.target != "";
  13449. }
  13450. );
  13451. }
  13452. }
  13453. this.inputShow = true;
  13454. if (cPan == 2) {
  13455. this.steps--;
  13456. return;
  13457. }
  13458. let params = [
  13459. {
  13460. cid: this.cid,
  13461. chapters: JSON.stringify(this.unitJson),
  13462. uid: this.userid,
  13463. unitIndex: _unitIndex,
  13464. },
  13465. ];
  13466. this.ajax
  13467. .post(this.$store.state.api + "updateWorkNew4", params)
  13468. .then((res) => {
  13469. // this.$message({
  13470. // message: this.lang.UpdateSuccessful,
  13471. // type: "success",
  13472. // });
  13473. this.courseId = this.cid;
  13474. this.addtips()
  13475. })
  13476. .catch((err) => {
  13477. this.$message.error(this.lang.ssNetPoor);
  13478. console.error(err);
  13479. });
  13480. },
  13481. updateWork() {
  13482. let cPan = 1;
  13483. for (var i = 0; i < this.unitJson.length; i++) {
  13484. for (
  13485. var j = 0;
  13486. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13487. j++
  13488. ) {
  13489. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13490. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13491. if (
  13492. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13493. ) {
  13494. for (
  13495. var z = 0;
  13496. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13497. z++
  13498. ) {
  13499. if (
  13500. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13501. .length
  13502. ) {
  13503. this.$message.error(this.lang.ssAddToolFull);
  13504. cPan = 2;
  13505. break;
  13506. }
  13507. }
  13508. }
  13509. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13510. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13511. i
  13512. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13513. return ele.value != "" || ele.detail != "" || ele.target != "";
  13514. });
  13515. }
  13516. }
  13517. }
  13518. this.inputShow = true;
  13519. if (cPan == 2) {
  13520. this.steps--;
  13521. return;
  13522. }
  13523. for (var i = 0; i < this.unitJson.length; i++) {
  13524. delete this.unitJson[i].isUpdate;
  13525. }
  13526. if(!this.targetCourseText2){
  13527. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13528. }
  13529. let imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png'
  13530. if (this.lang.lang == 'com') {
  13531. imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20260112142829_1081_2831768354076152.png'
  13532. }
  13533. let params = [
  13534. {
  13535. cid: this.cid,
  13536. title: this.courseName,
  13537. brief: this.courseText,
  13538. cover:
  13539. this.cover.length > 0
  13540. ? JSON.stringify(this.cover)
  13541. : JSON.stringify([
  13542. {
  13543. name: "noBanner.jpg",
  13544. url: imgUrl,
  13545. uid: 1656409780264,
  13546. status: "success",
  13547. },
  13548. ]),
  13549. evaId: this.evalua,
  13550. astudent:
  13551. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13552. see: this.isTeacherSee == true ? 1 : 0,
  13553. chapters: JSON.stringify(this.unitJson),
  13554. template: this.myWord != "undefined" ? this.myWord : [],
  13555. uid: this.userid,
  13556. courseType: JSON.stringify(this.courseTypeId),
  13557. ateacher:
  13558. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13559. inviteCode: JSON.stringify(this.inviteCode),
  13560. refile: JSON.stringify(this.infoData),
  13561. reBrief: this.courseText2,
  13562. cpote: JSON.stringify(this.cpote),
  13563. setting: JSON.stringify({
  13564. courseJie: this.courseJie,
  13565. courseTime: this.courseTime,
  13566. teacherInfoData: this.teacherInfoData,
  13567. teacherCourseText: this.teacherCourseText,
  13568. targetCourseText: this.targetCourseText,
  13569. cankaoInfoData: this.cankaoInfoData,
  13570. mubiaoInfoData: this.mubiaoInfoData,
  13571. xuanzeInfoData: this.xuanzeInfoData,
  13572. pingjiaInfoData: this.pingjiaInfoData,
  13573. infoData2: this.infoData2,
  13574. isuseT: this.isuseT,
  13575. mode: this.mode,
  13576. targetCourseText2: this.targetCourseText2,
  13577. chatid: this.chatid,
  13578. languageSetting: this.languageSetting,
  13579. knowInfoData: this.knowInfoData,
  13580. knowFileids: this.knowFileids,
  13581. knowInfoData2: this.knowInfoData2,
  13582. knowFileids2: this.knowFileids2,
  13583. recordVideoText: this.recordVideoText,
  13584. recordAudioUrl: this.recordAudioUrl,
  13585. appendixFile: this.appendixFile,
  13586. }),
  13587. iresearch: this.isFileSearch ? 1 : 2,
  13588. },
  13589. ];
  13590. this.ajax
  13591. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13592. .then((res) => {
  13593. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13594. if (this.cidType == 1) {
  13595. this.$message({
  13596. message: this.lang.UpdateSuccessful,
  13597. type: "success",
  13598. });
  13599. } else {
  13600. this.$message({
  13601. message: this.lang.ssAddSucc,
  13602. type: "success",
  13603. });
  13604. }
  13605. }
  13606. this.number = this.nbOrder;
  13607. this.courseId = this.cid;
  13608. this.addtips()
  13609. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13610. })
  13611. .catch((err) => {
  13612. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13613. this.$message.error(this.lang.ssNetPoor);
  13614. console.error(err);
  13615. });
  13616. },
  13617. insertWord() {
  13618. this.dialogVisible1 = true;
  13619. this.updateBoolean2 = false;
  13620. this.tTitle = "";
  13621. this.tdetail = "";
  13622. },
  13623. addWord() {
  13624. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13625. name: this.tTitle,
  13626. content: this.tdetail,
  13627. uid: this.guid(),
  13628. });
  13629. this.dialogVisible1 = false;
  13630. },
  13631. upWord() { },
  13632. selectWord(uid, i, c) {
  13633. this.dialogVisible1 = true;
  13634. this.updateBoolean2 = true;
  13635. if (
  13636. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13637. ) {
  13638. this.tTitle =
  13639. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13640. this.tdetail =
  13641. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13642. }
  13643. },
  13644. isAddPP() {
  13645. if (this.checkboxList.length > 0) {
  13646. this.$message({
  13647. message: this.lang.ssAddOk,
  13648. type: "success",
  13649. });
  13650. this.dialogVisible3 = false;
  13651. } else {
  13652. this.$message({
  13653. message: this.lang.ssPlsAddCM,
  13654. type: "error",
  13655. });
  13656. }
  13657. },
  13658. isAddClass() {
  13659. this.dialogVisibleClass = false;
  13660. },
  13661. isAddPPTeacher() {
  13662. this.dialogVisibleMember = false;
  13663. this.setMan();
  13664. },
  13665. getTipsTemplate(){
  13666. if(this.templateid){
  13667. let params = {
  13668. id: this.templateid
  13669. }
  13670. this.ajax
  13671. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13672. .then((res) => {
  13673. if(res.data[0].length){
  13674. this.tipsJson = res.data[0][0]
  13675. this.aiJson = JSON.parse(res.data[0][0].tips)
  13676. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13677. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13678. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13679. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13680. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13681. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13682. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13683. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13684. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13685. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13686. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13687. }
  13688. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13689. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13690. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13691. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13692. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13693. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13694. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13695. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13696. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13697. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13698. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13699. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13700. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13701. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13702. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13703. 问题:<议程和问题引导>中的问题
  13704. 讨论:<转文本内容>`
  13705. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13706. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13707. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13708. // }
  13709. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13710. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13711. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13712. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13713. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13714. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13715. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13716. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13717. // }
  13718. this.$forceUpdate();
  13719. this.isDialog = res.data[0][0].isDialog
  13720. }
  13721. })
  13722. .catch((err) => { });
  13723. }
  13724. },
  13725. getTipsTemplateIsDialog(){
  13726. if(this.templateid){
  13727. let params = {
  13728. id: this.templateid
  13729. }
  13730. this.ajax
  13731. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13732. .then((res) => {
  13733. if(res.data[0].length){
  13734. this.isDialog = res.data[0][0].isDialog
  13735. }
  13736. })
  13737. .catch((err) => { });
  13738. }
  13739. },
  13740. getTemplate() {
  13741. this.ajax
  13742. .get(this.$store.state.api + "getCourseTemplateT", "")
  13743. .then((res) => {
  13744. this.templateArray = res.data[0];
  13745. this.getTemplateOid();
  13746. this.$forceUpdate();
  13747. })
  13748. .catch((err) => { });
  13749. },
  13750. getTemplateOid() {
  13751. let params = {
  13752. oid: this.oid,
  13753. };
  13754. this.ajax
  13755. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13756. .then((res) => {
  13757. if (res.data[0].length) {
  13758. this.templateArray = [...res.data[0], ...this.templateArray];
  13759. }
  13760. this.getTemplateOrg();
  13761. this.$forceUpdate();
  13762. })
  13763. .catch((err) => { });
  13764. },
  13765. getTemplateOrg() {
  13766. let params = {
  13767. oid: this.org,
  13768. };
  13769. this.ajax
  13770. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13771. .then((res) => {
  13772. if (res.data[0].length) {
  13773. this.templateArray = [...res.data[0], ...this.templateArray];
  13774. }
  13775. this.$forceUpdate();
  13776. })
  13777. .catch((err) => { });
  13778. },
  13779. clearChoose() {
  13780. this.clearArray.splice(this.templateC.id, 1);
  13781. this.dialogVisible2 = false;
  13782. },
  13783. clearAttText() {
  13784. this.AttText = {
  13785. title: "",
  13786. text: "",
  13787. };
  13788. this.dialogVisible6 = false;
  13789. },
  13790. clearLine() {
  13791. this.line = "";
  13792. this.dialogVisible7 = false;
  13793. },
  13794. openTemplate() {
  13795. this.ctJson = {};
  13796. this.templateDialog = true;
  13797. },
  13798. checkctJson(json) {
  13799. if (this.ctJson.id == json.id) {
  13800. this.ctJson = {};
  13801. } else {
  13802. this.ctJson = json;
  13803. }
  13804. },
  13805. addTemplate(res) {
  13806. let _this = this;
  13807. let _res = [];
  13808. if (res.id == 1) {
  13809. _res = [
  13810. {
  13811. dyName: "", //单元标题
  13812. easy: 1,
  13813. chapterInfo: [
  13814. {
  13815. isread: false,
  13816. chapterid: this.guid(),
  13817. title: "",
  13818. courseName: "",
  13819. taskJson: [
  13820. {
  13821. task: "",
  13822. taskDetail: "",
  13823. chapterData: [],
  13824. toolText: "",
  13825. toolChoose: [
  13826. {
  13827. tool: [],
  13828. toolDetail: "",
  13829. toolType: 0,
  13830. askCount: 1,
  13831. askTitle: "",
  13832. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13833. },
  13834. ],
  13835. isShowTools: false,
  13836. askCount: 1,
  13837. isFold: 1,
  13838. askTitle: "",
  13839. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13840. checkJson: [{ checkCount: [], checkPerent: [] }],
  13841. homeworkList: [],
  13842. },
  13843. ],
  13844. itemCount: 1,
  13845. fileList1: [],
  13846. video: [],
  13847. testData: [],
  13848. pData: [],
  13849. templateArray: [],
  13850. },
  13851. ],
  13852. },
  13853. ];
  13854. this.updateCourseState(1);
  13855. } else if (res.id == 2) {
  13856. let stageData = [];
  13857. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  13858. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  13859. if (!iframe && !iframe2) {
  13860. this.$message.error(this.lang.ssUseAI);
  13861. return;
  13862. }
  13863. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13864. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13865. if (
  13866. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13867. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13868. ) {
  13869. this.$message.error(this.lang.ssUseAI);
  13870. return;
  13871. }
  13872. stageData = copyData
  13873. ? copyData.stageData
  13874. : copyData2
  13875. ? copyData2.stageData
  13876. : [""];
  13877. for (var i = 0; i < stageData.length; i++) {
  13878. _res.push({
  13879. dyName: stageData[i], //单元标题
  13880. chapterInfo: [
  13881. {
  13882. isread: false,
  13883. chapterid: this.guid(),
  13884. title: "",
  13885. courseName: "",
  13886. taskJson: [
  13887. {
  13888. task: "",
  13889. taskDetail: "",
  13890. chapterData: [],
  13891. toolText: "",
  13892. toolChoose: [
  13893. {
  13894. tool: [],
  13895. toolDetail: "",
  13896. toolType: 0,
  13897. askCount: 1,
  13898. askTitle: "",
  13899. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13900. },
  13901. ],
  13902. isShowTools: false,
  13903. askCount: 1,
  13904. isFold: 1,
  13905. askTitle: "",
  13906. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13907. checkJson: [{ checkCount: [], checkPerent: [] }],
  13908. homeworkList: [],
  13909. },
  13910. ],
  13911. itemCount: 1,
  13912. fileList1: [],
  13913. video: [],
  13914. testData: [],
  13915. pData: [],
  13916. templateArray: [],
  13917. },
  13918. ],
  13919. });
  13920. }
  13921. this.updateCourseState(1);
  13922. } else if (!Object.keys(res).length) {
  13923. this.$message.error(this.lang.ssSelectTemplatePls);
  13924. retrun;
  13925. } else {
  13926. _res = JSON.parse(res.chapters);
  13927. this.updateCourseState(parseInt(res.state));
  13928. }
  13929. _this
  13930. .$confirm(
  13931. this.lang.ssConfirmTemp,
  13932. this.lang.ssTip,
  13933. {
  13934. confirmButtonText: this.lang.ssConfirm,
  13935. cancelButtonText: this.lang.ssCancel,
  13936. type: "warning",
  13937. }
  13938. )
  13939. .then(() => {
  13940. _this.unitJson = _res;
  13941. _this.updateWork();
  13942. // _this.steps++;
  13943. _this.templateDialog = false;
  13944. setTimeout(() => {
  13945. this.checkEva(this.checkId);
  13946. setTimeout(() => {
  13947. this.checkEva(this.checkId);
  13948. }, 100);
  13949. }, 1000);
  13950. })
  13951. .catch(() => {
  13952. return;
  13953. });
  13954. },
  13955. checkTemplate(res) {
  13956. let _this = this;
  13957. _this
  13958. .$confirm(
  13959. this.lang.ssConfirmTemp,
  13960. this.lang.ssTip,
  13961. {
  13962. confirmButtonText: this.lang.ssConfirm,
  13963. cancelButtonText: this.lang.ssCancel,
  13964. type: "warning",
  13965. }
  13966. )
  13967. .then(() => {
  13968. _this.unitJson = JSON.parse(res.chapters);
  13969. _this.steps++;
  13970. setTimeout(() => {
  13971. this.checkEva(this.checkId);
  13972. setTimeout(() => {
  13973. this.checkEva(this.checkId);
  13974. }, 100);
  13975. }, 1000);
  13976. })
  13977. .catch(() => {
  13978. return;
  13979. });
  13980. },
  13981. checkTemplate1(w) {
  13982. this.steps++;
  13983. },
  13984. checkTemplate2() {
  13985. let _this = this;
  13986. _this
  13987. .$confirm(this.lang.ssChooseEmpty, this.lang.ssTip, {
  13988. confirmButtonText: this.lang.ssConfirm,
  13989. cancelButtonText: this.lang.ssCancel,
  13990. type: "warning",
  13991. })
  13992. .then(() => {
  13993. _this.unitIndex = 0;
  13994. _this.unitJson = [
  13995. {
  13996. dyName: "", //单元标题
  13997. chapterInfo: [
  13998. {
  13999. isread: false,
  14000. chapterid: this.guid(),
  14001. title: "",
  14002. courseName: "",
  14003. taskJson: [
  14004. {
  14005. task: "",
  14006. taskDetail: "",
  14007. chapterData: [],
  14008. toolText: "",
  14009. toolChoose: [
  14010. {
  14011. tool: [],
  14012. toolDetail: "",
  14013. toolType: 0,
  14014. askCount: 1,
  14015. askTitle: "",
  14016. askJson: [
  14017. { askstitle: "", askItem: 1, checkList: [] },
  14018. ],
  14019. },
  14020. ],
  14021. isShowTools: false,
  14022. askCount: 1,
  14023. isFold: 1,
  14024. askTitle: "",
  14025. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14026. checkJson: [{ checkCount: [], checkPerent: [] }],
  14027. homeworkList: [],
  14028. },
  14029. ],
  14030. itemCount: 1,
  14031. fileList1: [],
  14032. video: [],
  14033. testData: [],
  14034. pData: [],
  14035. templateArray: [],
  14036. },
  14037. ],
  14038. },
  14039. ];
  14040. this.steps++;
  14041. setTimeout(() => {
  14042. this.checkEva(this.checkId);
  14043. setTimeout(() => {
  14044. this.checkEva(this.checkId);
  14045. }, 100);
  14046. }, 1000);
  14047. this.updateWork();
  14048. })
  14049. .catch(() => {
  14050. return;
  14051. });
  14052. },
  14053. checkTemplate3() {
  14054. let _this = this;
  14055. _this
  14056. .$confirm(this.lang.ssChooseSimple, this.lang.ssTip, {
  14057. confirmButtonText: this.lang.ssConfirm,
  14058. cancelButtonText: this.lang.ssCancel,
  14059. type: "warning",
  14060. })
  14061. .then(() => {
  14062. _this.unitIndex = 0;
  14063. _this.unitJson = [
  14064. {
  14065. dyName: "", //单元标题
  14066. easy: 1,
  14067. chapterInfo: [
  14068. {
  14069. isread: false,
  14070. chapterid: this.guid(),
  14071. title: "",
  14072. courseName: "",
  14073. taskJson: [
  14074. {
  14075. task: "",
  14076. taskDetail: "",
  14077. chapterData: [],
  14078. toolText: "",
  14079. toolChoose: [
  14080. {
  14081. tool: [],
  14082. toolDetail: "",
  14083. toolType: 0,
  14084. askCount: 1,
  14085. askTitle: "",
  14086. askJson: [
  14087. { askstitle: "", askItem: 1, checkList: [] },
  14088. ],
  14089. },
  14090. ],
  14091. isShowTools: false,
  14092. askCount: 1,
  14093. isFold: 1,
  14094. askTitle: "",
  14095. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14096. checkJson: [{ checkCount: [], checkPerent: [] }],
  14097. homeworkList: [],
  14098. },
  14099. ],
  14100. itemCount: 1,
  14101. fileList1: [],
  14102. video: [],
  14103. testData: [],
  14104. pData: [],
  14105. templateArray: [],
  14106. },
  14107. ],
  14108. },
  14109. ];
  14110. // this.steps++;
  14111. this.updateWork();
  14112. })
  14113. .catch(() => {
  14114. return;
  14115. });
  14116. },
  14117. checkTemplate4() {
  14118. let _this = this;
  14119. _this
  14120. .$confirm(this.lang.ssChooseFuture, this.lang.ssTip, {
  14121. confirmButtonText: this.lang.ssConfirm,
  14122. cancelButtonText: this.lang.ssCancel,
  14123. type: "warning",
  14124. })
  14125. .then(() => {
  14126. _this.unitIndex = 0;
  14127. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  14128. this.steps++;
  14129. this.updateWork();
  14130. })
  14131. .catch(() => {
  14132. return;
  14133. });
  14134. },
  14135. wordNext() {
  14136. this.dialogVisible2 = false;
  14137. },
  14138. isAddOrUpdateAttText() {
  14139. if (this.AttTextType == 0) {
  14140. this.addAttTextMessage();
  14141. } else {
  14142. this.updateAttText();
  14143. }
  14144. },
  14145. isAddOrUpdateLine() {
  14146. if (!this.lineTitle) {
  14147. this.$message.error(this.lang.ssLinkTitle);
  14148. return;
  14149. }
  14150. if (this.lineType == 0) {
  14151. this.addLine();
  14152. } else {
  14153. this.updateLine();
  14154. }
  14155. },
  14156. addAttTextMessage() {
  14157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14158. this.taskCount
  14159. ].chapterData.unshift({
  14160. name: this.AttText.title,
  14161. url: this.AttText.text,
  14162. type: 6,
  14163. });
  14164. this.imgChange1(null, null, 6, this.taskCount);
  14165. this.dialogVisible6 = false;
  14166. },
  14167. selectAttText(itemTaskIndex, i) {
  14168. this.AttText.title =
  14169. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14170. itemTaskIndex
  14171. ].chapterData[i].name;
  14172. this.AttText.text =
  14173. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14174. itemTaskIndex
  14175. ].chapterData[i].url;
  14176. this.taskCount = itemTaskIndex;
  14177. this.AttTextIndex = i;
  14178. this.AttTextType = 1;
  14179. this.dialogVisible6 = true;
  14180. },
  14181. updateAttText() {
  14182. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14183. this.taskCount
  14184. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14185. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14186. this.taskCount
  14187. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14188. this.dialogVisible6 = false;
  14189. },
  14190. addLine() {
  14191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14192. this.lineCount
  14193. ].chapterData.unshift({
  14194. name: this.lang.ssLink,
  14195. title: this.lineTitle,
  14196. url: this.line,
  14197. type: 8,
  14198. });
  14199. this.imgChange1(null, null, 8, this.lineCount);
  14200. this.dialogVisible7 = false;
  14201. },
  14202. selectLine(itemTaskIndex, i) {
  14203. this.line =
  14204. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14205. itemTaskIndex
  14206. ].chapterData[i].url;
  14207. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14208. itemTaskIndex
  14209. ].chapterData[i].title
  14210. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14211. .chapterData[i].title
  14212. : "";
  14213. this.taskCount = itemTaskIndex;
  14214. this.lineCount = i;
  14215. this.lineType = 1;
  14216. this.dialogVisible7 = true;
  14217. },
  14218. openUpdateSource(itemTaskIndex, i) {
  14219. this.sourceData = {};
  14220. let source =
  14221. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14222. .chapterData[i];
  14223. this.sourceData[source.id] = {};
  14224. this.sourceData[source.id].name = source.title;
  14225. this.sourceData[source.id].url = source.url;
  14226. this.dialogVisibleSource = true;
  14227. this.updateSourcePan = true;
  14228. this.taskCount = itemTaskIndex;
  14229. this.lineCount = i;
  14230. },
  14231. updateLine() {
  14232. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14233. this.taskCount
  14234. ].chapterData[this.lineCount].url = this.line;
  14235. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14236. this.taskCount
  14237. ].chapterData[this.lineCount].title = this.lineTitle;
  14238. this.dialogVisible7 = false;
  14239. },
  14240. addPP() {
  14241. this.dialogVisible3 = true;
  14242. },
  14243. goTo(path) {
  14244. this.$router.push(path);
  14245. },
  14246. openTools(itemTaskIndex, i, toolIndex) {
  14247. this.toolIndex = toolIndex;
  14248. this.taskCount = itemTaskIndex;
  14249. if (i == 4) {
  14250. if (toolIndex == null) {
  14251. var a =
  14252. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14253. .chapterData;
  14254. for (var i = 0; i < a.length; i++) {
  14255. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14256. this.askJson =
  14257. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14258. itemTaskIndex
  14259. ].chapterData[i].askJson;
  14260. }
  14261. }
  14262. } else {
  14263. this.askJson = JSON.parse(
  14264. JSON.stringify(
  14265. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14266. itemTaskIndex
  14267. ].toolChoose[toolIndex]
  14268. )
  14269. );
  14270. }
  14271. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14272. this.dialogVisible5 = true;
  14273. } else if (i == 45) {
  14274. if (
  14275. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14276. .toolChoose[toolIndex].testJson
  14277. ) {
  14278. this.testJson = JSON.parse(
  14279. JSON.stringify(
  14280. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14281. itemTaskIndex
  14282. ].toolChoose[toolIndex].testJson
  14283. )
  14284. );
  14285. } else {
  14286. var testJson = {
  14287. testCount: 1,
  14288. testTitle: "",
  14289. testJson: [
  14290. {
  14291. teststitle: "",
  14292. testItem: 1,
  14293. checkList: [],
  14294. timuList: [],
  14295. answer: [],
  14296. type: "1",
  14297. },
  14298. ],
  14299. };
  14300. this.testJson = testJson;
  14301. }
  14302. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14303. this.dialogVisibleChoice = true;
  14304. } else if (i == 47) {
  14305. if (
  14306. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14307. .toolChoose[toolIndex].sentenceList
  14308. ) {
  14309. this.sentenceList = JSON.parse(
  14310. JSON.stringify(
  14311. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14312. itemTaskIndex
  14313. ].toolChoose[toolIndex].sentenceList
  14314. )
  14315. );
  14316. } else {
  14317. var sentenceList = [
  14318. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14319. ];
  14320. this.sentenceList = sentenceList;
  14321. }
  14322. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14323. this.dialogVisibleSentence = true;
  14324. } else if (i == 48) {
  14325. if (
  14326. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14327. .toolChoose[toolIndex].tableJson
  14328. ) {
  14329. this.tableJson = JSON.parse(
  14330. JSON.stringify(
  14331. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14332. itemTaskIndex
  14333. ].toolChoose[toolIndex].tableJson
  14334. )
  14335. );
  14336. } else {
  14337. var tableJson = { text: "" };
  14338. this.tableJson = tableJson;
  14339. }
  14340. this.dialogVisibleTable = true;
  14341. } else if (i == 52) {
  14342. if (
  14343. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14344. .toolChoose[toolIndex].wordJson
  14345. ) {
  14346. this.wordJson = JSON.parse(
  14347. JSON.stringify(
  14348. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14349. itemTaskIndex
  14350. ].toolChoose[toolIndex].wordJson
  14351. )
  14352. );
  14353. } else {
  14354. var wordJson = { text: "" };
  14355. this.wordJson = wordJson;
  14356. }
  14357. this.dialogVisibleWord = true;
  14358. // else if (i == 50) {
  14359. // if (
  14360. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14361. // .toolChoose[toolIndex].uploadJson
  14362. // ) {
  14363. // this.uploadJson = JSON.parse(
  14364. // JSON.stringify(
  14365. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14366. // itemTaskIndex
  14367. // ].toolChoose[toolIndex].uploadJson
  14368. // )
  14369. // );
  14370. // } else {
  14371. // var uploadJson = [];
  14372. // this.uploadJson = uploadJson;
  14373. // }
  14374. // this.dialogVisibleMoreUpload = true;
  14375. // }
  14376. } else if (i == 10) {
  14377. if (
  14378. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14379. .toolChoose[toolIndex].preTime
  14380. ) {
  14381. this.preTime = JSON.parse(
  14382. JSON.stringify(
  14383. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14384. itemTaskIndex
  14385. ].toolChoose[toolIndex].preTime
  14386. )
  14387. );
  14388. } else {
  14389. var preTime = 0;
  14390. this.preTime = preTime;
  14391. }
  14392. this.dialogVisiblePreTime = true;
  14393. } else if (i == 49) {
  14394. if (
  14395. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14396. .toolChoose[toolIndex].groupJson
  14397. ) {
  14398. this.groupJson = JSON.parse(
  14399. JSON.stringify(
  14400. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14401. itemTaskIndex
  14402. ].toolChoose[toolIndex].groupJson
  14403. )
  14404. );
  14405. } else {
  14406. var groupJson = {
  14407. group: [{ name: this.lang.ssGroup.replace(/\*/g, '1') }],
  14408. number: undefined,
  14409. islock: 1,
  14410. };
  14411. this.groupJson = groupJson;
  14412. }
  14413. this.dialogVisibleGroup = true;
  14414. } else if (i == 62) {
  14415. if (
  14416. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14417. .toolChoose[toolIndex].videoJson
  14418. ) {
  14419. this.videoJson = JSON.parse(
  14420. JSON.stringify(
  14421. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14422. itemTaskIndex
  14423. ].toolChoose[toolIndex].videoJson
  14424. )
  14425. );
  14426. } else {
  14427. var videoJson = {
  14428. video: "",
  14429. setting: [],
  14430. };
  14431. this.videoJson = videoJson;
  14432. }
  14433. this.dialogVisibleVideo = true;
  14434. } else if (i == 15) {
  14435. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14436. itemTaskIndex
  14437. ].toolChoose[toolIndex].answerQ
  14438. ? JSON.parse(
  14439. JSON.stringify(
  14440. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14441. itemTaskIndex
  14442. ].toolChoose[toolIndex].answerQ
  14443. )
  14444. )
  14445. : "";
  14446. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14447. this.dialogVisible8 = true;
  14448. } else if (i == 40) {
  14449. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14450. itemTaskIndex
  14451. ].toolChoose[toolIndex].rateJson
  14452. ? JSON.parse(
  14453. JSON.stringify(
  14454. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14455. itemTaskIndex
  14456. ].toolChoose[toolIndex].rateJson
  14457. )
  14458. )
  14459. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14460. this.selectSteps = 1;
  14461. this.dialogVisibleRate = true;
  14462. } else if (i == 42) {
  14463. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14464. itemTaskIndex
  14465. ].toolChoose[toolIndex].answerQ
  14466. ? JSON.parse(
  14467. JSON.stringify(
  14468. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14469. itemTaskIndex
  14470. ].toolChoose[toolIndex].answerQ
  14471. )
  14472. )
  14473. : "";
  14474. this.dialogVisibleMp3 = true;
  14475. } else if (i == 41) {
  14476. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14477. itemTaskIndex
  14478. ].toolChoose[toolIndex].selectJson
  14479. ? JSON.parse(
  14480. JSON.stringify(
  14481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14482. itemTaskIndex
  14483. ].toolChoose[toolIndex].selectJson
  14484. )
  14485. )
  14486. : { url: "", select: [], answer: [] };
  14487. this.selectSteps = 1;
  14488. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14489. this.dialogVisibleSelect = true;
  14490. } else if (i == 3) {
  14491. window.topU.postMessage(
  14492. {
  14493. tools: "3y",
  14494. cid: this.cid,
  14495. stage: this.unitIndex,
  14496. task: itemTaskIndex,
  14497. tool: toolIndex,
  14498. },
  14499. "*"
  14500. );
  14501. } else if (i == 1) {
  14502. window.topU.postMessage(
  14503. {
  14504. tools: "1y",
  14505. cid: this.cid,
  14506. stage: this.unitIndex,
  14507. task: itemTaskIndex,
  14508. tool: toolIndex,
  14509. },
  14510. "*"
  14511. );
  14512. } else if (i == 57) {
  14513. window.topU.postMessage(
  14514. {
  14515. tools: "57y",
  14516. cid: this.cid,
  14517. stage: this.unitIndex,
  14518. task: itemTaskIndex,
  14519. tool: toolIndex,
  14520. },
  14521. "*"
  14522. );
  14523. } else if (i == 69) {
  14524. this.englishList = {};
  14525. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14526. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14527. ? JSON.parse(
  14528. JSON.stringify(
  14529. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14530. itemTaskIndex
  14531. ].toolChoose[toolIndex].englishList
  14532. )
  14533. )
  14534. : {};
  14535. this.$forceUpdate();
  14536. this.englishDialogVisible = true;
  14537. } else if (i == 70) {
  14538. this.englishVoiceJson = {};
  14539. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14540. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14541. ? JSON.parse(
  14542. JSON.stringify(
  14543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14544. itemTaskIndex
  14545. ].toolChoose[toolIndex].englishVoiceJson
  14546. )
  14547. )
  14548. : {
  14549. title: '',
  14550. detail: '',
  14551. array: []
  14552. };
  14553. // {
  14554. // time: "",
  14555. // class: "",
  14556. // difficulty: 0,
  14557. // topic: "",
  14558. // isShow: false,
  14559. // eva: 0,
  14560. // aiEva: {
  14561. // isAiEva: false,
  14562. // aiEvaChoose: [],
  14563. // },
  14564. // allfType: [],
  14565. // englishJson: {},
  14566. // };
  14567. this.$forceUpdate();
  14568. this.EnglishVoiceDialog = true;
  14569. }else if(i == 72){
  14570. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14571. itemTaskIndex
  14572. ].toolChoose[toolIndex].appJson
  14573. ? JSON.parse(
  14574. JSON.stringify(
  14575. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14576. itemTaskIndex
  14577. ].toolChoose[toolIndex].appJson
  14578. )
  14579. )
  14580. : {
  14581. url:'',
  14582. };
  14583. this.$forceUpdate();
  14584. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14585. }
  14586. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14587. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14588. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14589. }
  14590. },
  14591. setEnglishVoiceJson(val) {
  14592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14593. this.taskCount
  14594. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14595. JSON.stringify(val)
  14596. );
  14597. this.$forceUpdate();
  14598. if (
  14599. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14600. .toolChoose[this.toolIndex].tool != 70
  14601. ) {
  14602. this.addTools(70, this.taskCount, this.toolIndex);
  14603. }
  14604. },
  14605. chapAddTools(i) {
  14606. if (this.chapTools[0].tools.length == 0) {
  14607. this.chapTools[0].tools.push(i);
  14608. } else {
  14609. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14610. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14611. } else {
  14612. this.chapTools[0].tools.push(i);
  14613. }
  14614. }
  14615. this.$forceUpdate();
  14616. },
  14617. addChaptersDataTools() {
  14618. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14619. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14620. this.chapCount
  14621. ].chapterData.unshift({
  14622. name: this.chapTools[0].toolDetail,
  14623. url: this.chapTools[0].tools,
  14624. type: 7,
  14625. askJson: this.askJson,
  14626. });
  14627. } else {
  14628. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14629. this.chapCount
  14630. ].chapterData.unshift({
  14631. name: this.chapTools[0].toolDetail,
  14632. url: this.chapTools[0].tools,
  14633. type: 7,
  14634. });
  14635. }
  14636. this.imgChange1(null, null, 7, this.chapCount);
  14637. this.dialogVisible4 = false;
  14638. },
  14639. addTools(i, itemTaskIndex, toolIndex) {
  14640. // if (
  14641. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14642. // .toolChoose[toolIndex].tool.length == 0
  14643. // ) {
  14644. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14645. // itemTaskIndex
  14646. // ].toolChoose[toolIndex].tool.push(i);
  14647. // } else {
  14648. // if (
  14649. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14650. // itemTaskIndex
  14651. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14652. // ) {
  14653. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14654. // itemTaskIndex
  14655. // ].toolChoose[toolIndex].tool.splice(
  14656. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14657. // itemTaskIndex
  14658. // ].toolChoose[toolIndex].tool.indexOf(i),
  14659. // 1
  14660. // );
  14661. // } else {
  14662. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14663. // itemTaskIndex
  14664. // ].toolChoose[toolIndex].tool.push(i);
  14665. // }
  14666. // console.log(
  14667. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14668. // .toolChoose[toolIndex].tool
  14669. // );
  14670. // }
  14671. if (i == 4) {
  14672. if (
  14673. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14674. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14675. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14676. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14677. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14678. .toolChoose[toolIndex].askJson[0].checkList < 2
  14679. ) {
  14680. this.openTools(itemTaskIndex, 4, toolIndex);
  14681. // this.$message({
  14682. // message: "请填写完整问卷内容",
  14683. // type: "error",
  14684. // });
  14685. return;
  14686. }
  14687. }
  14688. if (i == 45) {
  14689. if (
  14690. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14691. .toolChoose[toolIndex].testJson ||
  14692. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14693. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14694. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14695. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14696. ) {
  14697. this.openTools(itemTaskIndex, 45, toolIndex);
  14698. // this.$message({
  14699. // message: "请填写完整问卷内容",
  14700. // type: "error",
  14701. // });
  14702. return;
  14703. }
  14704. }
  14705. if (i == 47) {
  14706. if (
  14707. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14708. .toolChoose[toolIndex].sentenceList ||
  14709. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14710. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14711. ) {
  14712. this.openTools(itemTaskIndex, 47, toolIndex);
  14713. return;
  14714. }
  14715. }
  14716. if (i == 69) {
  14717. if (
  14718. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14719. .toolChoose[toolIndex].englishList
  14720. ) {
  14721. this.openTools(itemTaskIndex, 69, toolIndex);
  14722. return;
  14723. }
  14724. }
  14725. if (i == 70) {
  14726. if (
  14727. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14728. .toolChoose[toolIndex].englishVoiceJson
  14729. ) {
  14730. this.openTools(itemTaskIndex, 70, toolIndex);
  14731. return;
  14732. }
  14733. }
  14734. if(i == 72){
  14735. if (
  14736. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14737. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14738. .toolChoose[toolIndex].appJson).length == 0
  14739. ) {
  14740. this.openTools(itemTaskIndex, 72, toolIndex);
  14741. return;
  14742. }
  14743. }
  14744. // if (i == 48) {
  14745. // if (
  14746. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14747. // .toolChoose[toolIndex].tableJson
  14748. // ) {
  14749. // this.openTools(itemTaskIndex, 48, toolIndex);
  14750. // return;
  14751. // }
  14752. // }
  14753. // if (i == 50) {
  14754. // if (
  14755. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14756. // .toolChoose[toolIndex].uploadJson
  14757. // ) {
  14758. // this.openTools(itemTaskIndex, 50, toolIndex);
  14759. // return;
  14760. // }
  14761. // }
  14762. if (i == 49) {
  14763. if (
  14764. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14765. .toolChoose[toolIndex].groupJson
  14766. ) {
  14767. this.openTools(itemTaskIndex, 49, toolIndex);
  14768. return;
  14769. }
  14770. }
  14771. if (i == 62) {
  14772. if (
  14773. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14774. .toolChoose[toolIndex].videoJson
  14775. ) {
  14776. this.openTools(itemTaskIndex, 62, toolIndex);
  14777. return;
  14778. }
  14779. }
  14780. if (i == 15) {
  14781. if (
  14782. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14783. .toolChoose[toolIndex].answerQ ||
  14784. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14785. .toolChoose[toolIndex].answerQ == ""
  14786. ) {
  14787. this.openTools(itemTaskIndex, 15, toolIndex);
  14788. // this.$message({
  14789. // message: "请填写问答内容",
  14790. // type: "error",
  14791. // });
  14792. return;
  14793. }
  14794. }
  14795. if (i == 40) {
  14796. if (
  14797. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14798. .toolChoose[toolIndex].rateJson ||
  14799. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14800. .toolChoose[toolIndex].rateJson.length
  14801. ) {
  14802. this.openTools(itemTaskIndex, 40, toolIndex);
  14803. return;
  14804. }
  14805. }
  14806. if (i == 41) {
  14807. if (
  14808. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14809. .toolChoose[toolIndex].selectJson ||
  14810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14811. .toolChoose[toolIndex].selectJson.url == "" ||
  14812. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14813. .toolChoose[toolIndex].selectJson.select.length ||
  14814. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14815. .toolChoose[toolIndex].selectJson.answer.length
  14816. ) {
  14817. this.openTools(itemTaskIndex, 41, toolIndex);
  14818. return;
  14819. }
  14820. }
  14821. if (i == 42) {
  14822. if (
  14823. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14824. .toolChoose[toolIndex].answerQ ||
  14825. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14826. .toolChoose[toolIndex].answerQ == ""
  14827. ) {
  14828. this.openTools(itemTaskIndex, 42, toolIndex);
  14829. return;
  14830. }
  14831. }
  14832. if (
  14833. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14834. .toolChoose[toolIndex].tool.length > 0
  14835. ) {
  14836. if (
  14837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14838. itemTaskIndex
  14839. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14840. ) {
  14841. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14842. itemTaskIndex
  14843. ].toolChoose[toolIndex].tool.splice(
  14844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14845. itemTaskIndex
  14846. ].toolChoose[toolIndex].tool.indexOf(i),
  14847. 1
  14848. );
  14849. } else {
  14850. // this.$message({
  14851. // message: "每个工具只能添加一个",
  14852. // type: "error",
  14853. // });
  14854. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14855. itemTaskIndex
  14856. ].toolChoose[toolIndex].tool = [];
  14857. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14858. itemTaskIndex
  14859. ].toolChoose[toolIndex].tool.push(i);
  14860. }
  14861. } else {
  14862. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14863. itemTaskIndex
  14864. ].toolChoose[toolIndex].tool.push(i);
  14865. }
  14866. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14867. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14868. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14869. }
  14870. this.$forceUpdate();
  14871. },
  14872. addAskList(index) {
  14873. this.askJson.askJson.splice(index + 1, 0, {
  14874. askstitle: "",
  14875. askItem: 1,
  14876. checkList: [],
  14877. });
  14878. this.askJson.askCount++;
  14879. },
  14880. addTestList(index) {
  14881. this.testJson.testJson.splice(index + 1, 0, {
  14882. teststitle: "",
  14883. testItem: 1,
  14884. checkList: [],
  14885. timuList: [],
  14886. answer: [],
  14887. type: "1",
  14888. });
  14889. this.testJson.testCount++;
  14890. },
  14891. deleteAskList(index) {
  14892. if (
  14893. !this.askJson.askJson[index].askstitle &&
  14894. this.askJson.askJson[index].askItem == 1 &&
  14895. !this.askJson.askJson[index].checkList[0]
  14896. ) {
  14897. this.askJson.askJson.splice(index, 1);
  14898. this.askJson.askCount--;
  14899. } else {
  14900. let _this = this;
  14901. _this
  14902. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14903. confirmButtonText: this.lang.ssConfirm,
  14904. cancelButtonText: this.lang.ssCancel,
  14905. type: "warning",
  14906. })
  14907. .then(() => {
  14908. _this.askJson.askJson.splice(index, 1);
  14909. _this.askJson.askCount--;
  14910. })
  14911. .catch(() => {
  14912. return;
  14913. });
  14914. }
  14915. },
  14916. deleteTestList(index) {
  14917. if (
  14918. !this.testJson.testJson[index].teststitle &&
  14919. this.testJson.testJson[index].testItem == 1 &&
  14920. !this.testJson.testJson[index].checkList[0]
  14921. ) {
  14922. this.testJson.testJson.splice(index, 1);
  14923. this.testJson.testCount--;
  14924. } else {
  14925. let _this = this;
  14926. _this
  14927. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14928. confirmButtonText: this.lang.ssConfirm,
  14929. cancelButtonText: this.lang.ssCancel,
  14930. type: "warning",
  14931. })
  14932. .then(() => {
  14933. _this.testJson.testJson.splice(index, 1);
  14934. _this.testJson.testCount--;
  14935. })
  14936. .catch(() => {
  14937. return;
  14938. });
  14939. }
  14940. },
  14941. askMove(type, index) {
  14942. if (type == 1) {
  14943. if (index > 0) {
  14944. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14945. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14946. this.askJson.askJson[index - 1] = b;
  14947. this.askJson.askJson[index] = a;
  14948. }
  14949. } else {
  14950. if (index < this.askJson.askJson.length - 1) {
  14951. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14952. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14953. this.askJson.askJson[index + 1] = b;
  14954. this.askJson.askJson[index] = a;
  14955. }
  14956. }
  14957. this.$forceUpdate();
  14958. },
  14959. checkMove(type, index, checkIndex) {
  14960. if (type == 1) {
  14961. if (checkIndex > 0) {
  14962. let a = JSON.parse(
  14963. JSON.stringify(
  14964. this.askJson.askJson[index].checkList[checkIndex - 1]
  14965. )
  14966. );
  14967. let b = JSON.parse(
  14968. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14969. );
  14970. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14971. this.askJson.askJson[index].checkList[checkIndex] = a;
  14972. }
  14973. } else {
  14974. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14975. let a = JSON.parse(
  14976. JSON.stringify(
  14977. this.askJson.askJson[index].checkList[checkIndex + 1]
  14978. )
  14979. );
  14980. let b = JSON.parse(
  14981. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14982. );
  14983. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14984. this.askJson.askJson[index].checkList[checkIndex] = a;
  14985. }
  14986. }
  14987. this.$forceUpdate();
  14988. },
  14989. testMove(type, index) {
  14990. if (type == 1) {
  14991. if (index > 0) {
  14992. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14993. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14994. this.testJson.testJson[index - 1] = b;
  14995. this.testJson.testJson[index] = a;
  14996. }
  14997. } else {
  14998. if (index < this.testJson.testJson.length - 1) {
  14999. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  15000. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  15001. this.testJson.testJson[index + 1] = b;
  15002. this.testJson.testJson[index] = a;
  15003. }
  15004. }
  15005. this.$forceUpdate();
  15006. },
  15007. tcheckMove(type, index, checkIndex) {
  15008. if (type == 1) {
  15009. if (checkIndex > 0) {
  15010. let a = JSON.parse(
  15011. JSON.stringify(
  15012. this.testJson.testJson[index].checkList[checkIndex - 1]
  15013. )
  15014. );
  15015. let b = JSON.parse(
  15016. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15017. );
  15018. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  15019. this.testJson.testJson[index].checkList[checkIndex] = a;
  15020. }
  15021. } else {
  15022. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  15023. let a = JSON.parse(
  15024. JSON.stringify(
  15025. this.testJson.testJson[index].checkList[checkIndex + 1]
  15026. )
  15027. );
  15028. let b = JSON.parse(
  15029. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15030. );
  15031. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  15032. this.testJson.testJson[index].checkList[checkIndex] = a;
  15033. }
  15034. }
  15035. this.$forceUpdate();
  15036. },
  15037. addcheckList(json, index) {
  15038. // json.checkList.length++;
  15039. json.checkList.splice(index + 1, 0, "");
  15040. json.askItem++;
  15041. this.$forceUpdate();
  15042. },
  15043. deletecheckList(json, index) {
  15044. // json.checkList.length--;
  15045. json.checkList.splice(index, 1);
  15046. json.askItem--;
  15047. this.$forceUpdate();
  15048. },
  15049. addTcheckList(json, index) {
  15050. // json.checkList.length++;
  15051. json.checkList.splice(index + 1, 0, "");
  15052. json.testItem++;
  15053. this.$forceUpdate();
  15054. },
  15055. deleteTcheckList(json, index) {
  15056. // json.checkList.length--;
  15057. json.checkList.splice(index, 1);
  15058. json.testItem--;
  15059. this.$forceUpdate();
  15060. },
  15061. checkTestType(type, json) {
  15062. json.type = type;
  15063. setTimeout(() => {
  15064. json.answer = [];
  15065. }, 100);
  15066. },
  15067. checkAskType(type, json) {
  15068. json.type = type;
  15069. // json.checkList = [];
  15070. this.$forceUpdate();
  15071. },
  15072. addSelectList(json) {
  15073. json.select.push("");
  15074. json.answer.push("");
  15075. },
  15076. deleteSelectList(json) {
  15077. // json.select.length--;
  15078. // json.answer.length--;
  15079. json.select.splice(json.select.length - 1, 1);
  15080. json.answer.splice(json.answer.length - 1, 1);
  15081. },
  15082. addAsk() {
  15083. if (this.askJson.askTitle === "") {
  15084. this.$message.error(this.lang.ssTitleEmpty);
  15085. return;
  15086. }
  15087. var aj = this.askJson.askJson;
  15088. var b = 1;
  15089. for (var i = 0; i < aj.length; i++) {
  15090. if (aj[i].askstitle === "") {
  15091. var a = 1;
  15092. for (let index = 0; index < aj[i].askItem; index++) {
  15093. const element = aj[i].checkList[index]
  15094. ? aj[i].checkList[index]
  15095. : "";
  15096. if (element != "") {
  15097. b++;
  15098. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15099. return;
  15100. } else {
  15101. a++;
  15102. }
  15103. }
  15104. if (b == 1) {
  15105. this.$message.error(this.lang.ssOneQues);
  15106. return;
  15107. }
  15108. } else if (aj[i].askstitle != "") {
  15109. for (let index = 0; index < aj[i].askItem; index++) {
  15110. const element = aj[i].checkList[index]
  15111. ? aj[i].checkList[index]
  15112. : "";
  15113. var index = 0;
  15114. for (var z = 0; z < aj[i].checkList.length; z++) {
  15115. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15116. if (checkC != "") {
  15117. index++;
  15118. } else {
  15119. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15120. return;
  15121. }
  15122. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15123. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15124. if (checkC == checkC2) {
  15125. this.$message.error(
  15126. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15127. );
  15128. return;
  15129. }
  15130. }
  15131. }
  15132. b++;
  15133. if (index < 2) {
  15134. this.$message.error(this.lang.ssEachQues);
  15135. return;
  15136. }
  15137. }
  15138. }
  15139. }
  15140. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  15141. var elc = el.checkList.filter((element) => {
  15142. return element != "";
  15143. });
  15144. return el.askstitle != "" && elc.length != 0;
  15145. });
  15146. if (!this.dialogVisible4) {
  15147. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15148. this.taskCount
  15149. ].toolChoose[this.toolIndex] = this.askJson;
  15150. }
  15151. this.dialogVisible5 = false;
  15152. if (
  15153. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15154. .toolChoose[this.toolIndex].tool != 4
  15155. ) {
  15156. this.addTools(4, this.taskCount, this.toolIndex);
  15157. }
  15158. },
  15159. addTest() {
  15160. // if (this.testJson.testTitle === "") {
  15161. // this.$message.error("标题不能为空!");
  15162. // return;
  15163. // }
  15164. var aj = this.testJson.testJson;
  15165. var b = 1;
  15166. for (var i = 0; i < aj.length; i++) {
  15167. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  15168. var a = 1;
  15169. for (let index = 0; index < aj[i].testItem; index++) {
  15170. const element = aj[i].checkList[index]
  15171. ? aj[i].checkList[index]
  15172. : "";
  15173. if (element != "") {
  15174. b++;
  15175. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15176. return;
  15177. } else {
  15178. a++;
  15179. }
  15180. }
  15181. if (b == 1) {
  15182. this.$message.error(this.lang.ssOneQues);
  15183. return;
  15184. }
  15185. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15186. for (let index = 0; index < aj[i].testItem; index++) {
  15187. const element = aj[i].checkList[index]
  15188. ? aj[i].checkList[index]
  15189. : "";
  15190. var index = 0;
  15191. for (var z = 0; z < aj[i].checkList.length; z++) {
  15192. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15193. if (checkC != "") {
  15194. index++;
  15195. } else {
  15196. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15197. return;
  15198. }
  15199. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15200. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15201. if (checkC == checkC2) {
  15202. this.$message.error(
  15203. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15204. );
  15205. return;
  15206. }
  15207. }
  15208. }
  15209. b++;
  15210. if (index < 2) {
  15211. this.$message.error(this.lang.ssEachQues);
  15212. return;
  15213. }
  15214. if (
  15215. (aj[i].type == "2" && !aj[i].answer.length) ||
  15216. (aj[i].type == "1" &&
  15217. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15218. (aj[i].answer !== 0 && !aj[i].answer)))
  15219. ) {
  15220. this.$message.error(this.lang.ssCorrectOpt.replace(/\*/g, i + 1));
  15221. return;
  15222. }
  15223. }
  15224. }
  15225. }
  15226. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15227. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15228. var elc = el.checkList.filter((element) => {
  15229. return element != "";
  15230. });
  15231. return (
  15232. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15233. );
  15234. });
  15235. isTestJson.testCount = isTestJson.testJson.length;
  15236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15237. this.taskCount
  15238. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15239. this.dialogVisibleChoice = false;
  15240. if (
  15241. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15242. .toolChoose[this.toolIndex].tool != 45
  15243. ) {
  15244. this.addTools(45, this.taskCount, this.toolIndex);
  15245. }
  15246. },
  15247. addVideoJson(videoJson) {
  15248. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15249. this.taskCount
  15250. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15251. this.dialogVisibleVideo = false;
  15252. if (
  15253. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15254. .toolChoose[this.toolIndex].tool != 62
  15255. ) {
  15256. this.addTools(62, this.taskCount, this.toolIndex);
  15257. }
  15258. },
  15259. //自动获取剪贴板
  15260. pasteOption() {
  15261. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15262. if (!iframe) {
  15263. this.$message.error(this.lang.ssUseAIQues);
  15264. return;
  15265. }
  15266. let copyData = iframe.contentWindow.copyData;
  15267. if (!copyData || !copyData.selectData.length) {
  15268. this.$message.error(this.lang.ssUseAIQues);
  15269. return;
  15270. }
  15271. let selectData = copyData.selectData;
  15272. for (var i = 0; i < selectData.length; i++) {
  15273. let answer = 0;
  15274. switch (selectData[i].answer[0]) {
  15275. case "A":
  15276. answer = 0;
  15277. break;
  15278. case "B":
  15279. answer = 1;
  15280. break;
  15281. case "C":
  15282. answer = 2;
  15283. break;
  15284. case "D":
  15285. answer = 3;
  15286. break;
  15287. case "E":
  15288. answer = 4;
  15289. break;
  15290. default:
  15291. break;
  15292. }
  15293. this.testJson.testJson.push({
  15294. teststitle: selectData[i].subject,
  15295. testItem: selectData[i].options.length,
  15296. checkList: selectData[i].options,
  15297. timuList: [],
  15298. answer: answer,
  15299. type: "1",
  15300. });
  15301. this.testJson.testCount++;
  15302. }
  15303. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15304. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15305. var elc = el.checkList.filter((element) => {
  15306. return element != "";
  15307. });
  15308. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15309. });
  15310. isTestJson.testCount = isTestJson.testJson.length;
  15311. if (!isTestJson.testCount) {
  15312. return;
  15313. }
  15314. this.testJson = isTestJson;
  15315. this.$forceUpdate();
  15316. },
  15317. pasteTask(taskJson) {
  15318. let stageTasksData = [];
  15319. if (taskJson) {
  15320. stageTasksData = taskJson;
  15321. } else {
  15322. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15323. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15324. if (!iframe && !iframe2) {
  15325. this.$message.error(this.lang.ssUseAI);
  15326. return;
  15327. }
  15328. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15329. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15330. if (
  15331. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15332. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15333. ) {
  15334. this.$message.error(this.lang.ssUseAI);
  15335. return;
  15336. }
  15337. stageTasksData = copyData
  15338. ? copyData.tasksData
  15339. : copyData2
  15340. ? copyData2.tasksData
  15341. : [{ taskName: "", taskDecs: "" }];
  15342. }
  15343. let taskA = [];
  15344. let tasks = stageTasksData;
  15345. for (var j = 0; j < tasks.length; j++) {
  15346. taskA.push({
  15347. task: tasks[j].taskName,
  15348. taskDetail: tasks[j].taskDecs,
  15349. chapterData: [],
  15350. toolText: "",
  15351. toolChoose: [
  15352. {
  15353. tool: [],
  15354. toolDetail: "",
  15355. toolType: 0,
  15356. askCount: 1,
  15357. askTitle: "",
  15358. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15359. },
  15360. ],
  15361. isShowTools: false,
  15362. askCount: 1,
  15363. isFold: 1,
  15364. askTitle: "",
  15365. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15366. checkJson: [{ checkCount: [], checkPerent: [] }],
  15367. homeworkList: [],
  15368. });
  15369. }
  15370. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15371. this.$forceUpdate();
  15372. },
  15373. pasteStage(stageJson) {
  15374. let stageData = [];
  15375. if (stageJson) {
  15376. stageData = stageJson;
  15377. } else {
  15378. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15379. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15380. if (!iframe && !iframe2) {
  15381. this.$message.error(this.lang.ssUseAI);
  15382. return;
  15383. }
  15384. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15385. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15386. if (
  15387. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15388. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15389. ) {
  15390. this.$message.error(this.lang.ssUseAI);
  15391. return;
  15392. }
  15393. stageData = copyData
  15394. ? copyData.stageData
  15395. : copyData2
  15396. ? copyData2.stageData
  15397. : [""];
  15398. }
  15399. let stage = [];
  15400. for (var i = 0; i < stageData.length; i++) {
  15401. stage.push({
  15402. dyName: stageData[i], //单元标题
  15403. chapterInfo: [
  15404. {
  15405. isread: false,
  15406. chapterid: this.guid(),
  15407. title: "",
  15408. courseName: "",
  15409. taskJson: [
  15410. {
  15411. task: "",
  15412. taskDetail: "",
  15413. chapterData: [],
  15414. toolText: "",
  15415. toolChoose: [
  15416. {
  15417. tool: [],
  15418. toolDetail: "",
  15419. toolType: 0,
  15420. askCount: 1,
  15421. askTitle: "",
  15422. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15423. },
  15424. ],
  15425. isShowTools: false,
  15426. askCount: 1,
  15427. isFold: 1,
  15428. askTitle: "",
  15429. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15430. checkJson: [{ checkCount: [], checkPerent: [] }],
  15431. homeworkList: [],
  15432. },
  15433. ],
  15434. itemCount: 1,
  15435. fileList1: [],
  15436. video: [],
  15437. testData: [],
  15438. pData: [],
  15439. templateArray: [],
  15440. },
  15441. ],
  15442. });
  15443. }
  15444. let _this = this;
  15445. if (stageJson) {
  15446. if (!_this.cid) {
  15447. _this.unitJson = stage;
  15448. } else {
  15449. _this.unitIndex = 0;
  15450. _this.unitJson = stage;
  15451. _this.updateWork();
  15452. }
  15453. } else {
  15454. _this
  15455. .$confirm(
  15456. this.lang.ssSmartPasteTemp,
  15457. this.lang.ssTip,
  15458. {
  15459. confirmButtonText: this.lang.ssConfirm,
  15460. cancelButtonText: this.lang.ssCancel,
  15461. type: "warning",
  15462. }
  15463. )
  15464. .then(() => {
  15465. _this.unitIndex = 0;
  15466. _this.unitJson = stage;
  15467. // _this.steps++;
  15468. _this.updateWork();
  15469. })
  15470. .catch(() => {
  15471. return;
  15472. });
  15473. }
  15474. },
  15475. openStageBox() {
  15476. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15477. this.dialogVisibleStageChange = true;
  15478. },
  15479. updateChange() {
  15480. this.$confirm(
  15481. this.lang.ssStageSeqDel,
  15482. this.lang.ssTip,
  15483. {
  15484. confirmButtonText: this.lang.ssConfirm,
  15485. cancelButtonText: this.lang.ssCancel,
  15486. type: "warning",
  15487. }
  15488. )
  15489. .then(() => {
  15490. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15491. this.updateWork();
  15492. this.dialogVisibleStageChange = false;
  15493. })
  15494. .catch(() => {
  15495. return;
  15496. });
  15497. },
  15498. addAnswer() {
  15499. if (this.answerQ == "") {
  15500. this.$message.error(this.lang.ssEnterQuesL);
  15501. return;
  15502. }
  15503. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15504. this.taskCount
  15505. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15506. this.dialogVisible8 = false;
  15507. if (
  15508. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15509. .toolChoose[this.toolIndex].tool != 15
  15510. ) {
  15511. this.addTools(15, this.taskCount, this.toolIndex);
  15512. }
  15513. },
  15514. addMp3Answer() {
  15515. if (this.answerQ == "") {
  15516. this.$message.error(this.lang.ssEnterWant);
  15517. return;
  15518. }
  15519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15520. this.taskCount
  15521. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15522. this.dialogVisibleMp3 = false;
  15523. },
  15524. addRateAnswer() {
  15525. var a = 1;
  15526. for (var i = 0; i < this.rateJson.length; i++) {
  15527. if (this.rateJson[i].value == "") {
  15528. a = 2;
  15529. break;
  15530. }
  15531. }
  15532. if (a == 2) {
  15533. this.$message.error(this.lang.ssFillEvaInfo);
  15534. return;
  15535. }
  15536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15537. this.taskCount
  15538. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15539. this.dialogVisibleRate = false;
  15540. if (
  15541. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15542. .toolChoose[this.toolIndex].tool != 40
  15543. ) {
  15544. this.addTools(40, this.taskCount, this.toolIndex);
  15545. }
  15546. },
  15547. addSelectAnswer() {
  15548. if (this.selectJson.url == "") {
  15549. this.$message.error(this.lang.ssUploadQues);
  15550. return;
  15551. }
  15552. if (!this.selectJson.select.length) {
  15553. this.$message.error(this.lang.ssAddOpt);
  15554. return;
  15555. }
  15556. if (!this.selectJson.answer.length) {
  15557. this.$message.error(this.lang.ssSetAns);
  15558. return;
  15559. }
  15560. var a = 1;
  15561. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15562. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15563. a = 2;
  15564. }
  15565. }
  15566. if (a == 2) {
  15567. this.$message.error(this.lang.ssSetAns);
  15568. return;
  15569. }
  15570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15571. this.taskCount
  15572. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15573. this.dialogVisibleSelect = false;
  15574. if (
  15575. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15576. .toolChoose[this.toolIndex].tool != 41
  15577. ) {
  15578. this.addTools(41, this.taskCount, this.toolIndex);
  15579. }
  15580. },
  15581. nextSelectSteps() {
  15582. if (this.selectJson.url == "") {
  15583. this.$message.error(this.lang.ssUploadQues);
  15584. return;
  15585. }
  15586. if (!this.selectJson.select.length) {
  15587. this.$message.error(this.lang.ssAddOpt);
  15588. return;
  15589. } else {
  15590. for (var z = 0; z < this.selectJson.select.length; z++) {
  15591. let checkC = this.selectJson.select[z];
  15592. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15593. let checkC2 = this.selectJson.select[z2];
  15594. if (checkC == checkC2) {
  15595. this.$message.error(
  15596. this.lang.ssOptDup2.replace(/\*/g, z + 1).replace(/\$/g, z2 + 1)
  15597. );
  15598. return;
  15599. }
  15600. }
  15601. }
  15602. }
  15603. var a = 1;
  15604. for (var i = 0; i < this.selectJson.select.length; i++) {
  15605. if (!this.selectJson.select[i]) {
  15606. a = 2;
  15607. }
  15608. }
  15609. if (a == 2) {
  15610. this.$message.error(this.lang.ssOptEmpty2);
  15611. return;
  15612. }
  15613. this.selectSteps++;
  15614. },
  15615. selectCourseDetail() {
  15616. if (this.cid == "" || this.cid == undefined) {
  15617. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15618. this.isTeacherSee = true;
  15619. }
  15620. console.log(this.lang.ssNewCourse);
  15621. this.selectAllType();
  15622. this.chatid = uuidv4();
  15623. // this.courseTextB = false
  15624. } else {
  15625. this.isOutline = true
  15626. this.isOutline2 = true
  15627. this.cpoteType = 4
  15628. this.cidType = 1;
  15629. let params = {
  15630. cid: this.cid,
  15631. };
  15632. this.ajax
  15633. .get(this.$store.state.api + "select_course_detail", params)
  15634. .then((res) => {
  15635. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15636. this.courseState = res.data[0][0].state;
  15637. for (var j = 0; j < this.unitJson.length; j++) {
  15638. for (
  15639. var k = 0;
  15640. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15641. k++
  15642. ) {
  15643. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15644. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15645. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15646. : [];
  15647. let _chapterData = [];
  15648. for (
  15649. var c = 0;
  15650. c <
  15651. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15652. .length;
  15653. c++
  15654. ) {
  15655. if (
  15656. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15657. ) {
  15658. _chapterData.push(
  15659. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15660. );
  15661. }
  15662. }
  15663. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15664. _chapterData;
  15665. }
  15666. }
  15667. this.$forceUpdate();
  15668. this.courseName = res.data[0][0].title;
  15669. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15670. this.courseText = res.data[0][0].brief;
  15671. this.courseText2 = res.data[0][0].reBrief;
  15672. this.evalua = res.data[0][0].evaId;
  15673. this.cover = JSON.parse(res.data[0][0].cover);
  15674. this.noneBtnImg = this.cover.length >= 1;
  15675. if (res.data[0][0].refile) {
  15676. this.infoData = JSON.parse(res.data[0][0].refile)
  15677. }
  15678. // this.checkboxList =
  15679. // res.data[0][0].course_student.length > 0
  15680. // ? JSON.parse(res.data[0][0].course_student)
  15681. // : [];
  15682. this.checkboxList2 = res.data[0][0].juri
  15683. ? res.data[0][0].juri.split(",")
  15684. : [];
  15685. this.inviteCode = [];
  15686. for (var i = 0; i < res.data[2].length; i++) {
  15687. this.inviteCode.push({
  15688. cid: res.data[2][i].classid,
  15689. ic: res.data[2][i].code,
  15690. });
  15691. }
  15692. this.checkboxList3 = res.data[0][0].course_teacher
  15693. ? res.data[0][0].course_teacher.split(",")
  15694. : [];
  15695. // this.isTeacherSee =
  15696. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15697. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15698. this.myWord = res.data[0][0].template;
  15699. this.templateC.id = "123";
  15700. this.courseUserid = res.data[0][0].userid;
  15701. // if(this.courseUserid == this.userid){
  15702. // this.InviteChange(this.checkboxList2)
  15703. // }
  15704. this.nbOrder = res.data[0][0].ordernumber;
  15705. this.courseTypeId = [];
  15706. for (var i = 0; i < res.data[1].length; i++) {
  15707. this.courseTypeId.push(res.data[1][i].typeid);
  15708. }
  15709. console.log(this.courseTypeId);
  15710. // if (this.timer) clearInterval(this.timer);
  15711. if (this.timer) clearTimeout(this.timer);
  15712. this.timer = null;
  15713. // this.timer = setInterval(() => {
  15714. if(res.data[3].length){
  15715. try {
  15716. this.aiJson = JSON.parse(res.data[3][0].tips);
  15717. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15718. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15719. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15720. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15721. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15722. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15723. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15724. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15725. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15726. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15727. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15728. }
  15729. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15730. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15731. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15732. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15733. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15734. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15735. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15736. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15737. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15738. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15739. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15740. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15741. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15742. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15743. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15744. 讨论:<转文本内容>`
  15745. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15746. this.templateid = res.data[3][0].template;
  15747. this.getTipsTemplateIsDialog()
  15748. }catch(error){
  15749. console.error(error)
  15750. }
  15751. }
  15752. if(res.data[0][0].cpote){
  15753. try {
  15754. this.cpote = JSON.parse(res.data[0][0].cpote);
  15755. }catch(error){
  15756. console.error(error)
  15757. }
  15758. }
  15759. if(res.data[0][0].setting){
  15760. try {
  15761. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15762. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15763. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15764. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15765. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15766. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15767. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15768. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15769. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15770. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15771. 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;
  15772. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15773. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15774. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15775. 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;
  15776. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15777. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15778. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15779. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15780. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15781. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15782. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15783. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15784. this.courseTextBool = true
  15785. }
  15786. // if(!this.teacherCourseText && !this.targetCourseText2){
  15787. // this.isuseT = 1
  15788. // }
  15789. }catch(error){
  15790. console.error(error)
  15791. }
  15792. }
  15793. if(this.courseText){
  15794. this.courseTextB = false
  15795. }
  15796. if(this.teacherCourseText){
  15797. this.teacherCourseTextB = false
  15798. }
  15799. if(this.targetCourseText){
  15800. this.targetCourseTextB = false
  15801. }
  15802. if(this.targetCourseText2){
  15803. this.targetCourseText2B = false
  15804. }
  15805. this.isFileSearch = res.data[0][0].iresearch == 1
  15806. // this.seleteCourseUpdate();
  15807. this.setMan();
  15808. this.selectAllType();
  15809. this.unitJson[
  15810. this.unitIndex
  15811. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15812. // }, 5000);
  15813. this.$forceUpdate();
  15814. setTimeout(() => {
  15815. this.checkEva(this.evalua);
  15816. setTimeout(() => {
  15817. this.checkEva(this.evalua);
  15818. }, 100);
  15819. }, 100);
  15820. })
  15821. .catch((err) => {
  15822. console.error(err);
  15823. });
  15824. }
  15825. if(this.aiId){
  15826. let params = {
  15827. cid: this.aiId,
  15828. };
  15829. this.ajax
  15830. .get(this.$store.state.api + "select_course_detail", params)
  15831. .then((res) => {
  15832. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15833. let fileInfo = []
  15834. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15835. for(var i = 0; i < _unitJson.length; i++){
  15836. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15837. for(var j = 0; j < tasks.length; j++){
  15838. let _infoData = tasks[j].chapterData.filter(el => {
  15839. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15840. })
  15841. if(_infoData.length){
  15842. fileInfo = [...fileInfo, ..._infoData]
  15843. }
  15844. }
  15845. }
  15846. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15847. this.$forceUpdate();
  15848. this.courseName = res.data[0][0].title;
  15849. this.courseText = res.data[0][0].brief;
  15850. this.courseText2 = res.data[0][0].reBrief;
  15851. this.cover = JSON.parse(res.data[0][0].cover);
  15852. this.noneBtnImg = this.cover.length >= 1;
  15853. this.checkboxList2 = res.data[0][0].juri
  15854. ? res.data[0][0].juri.split(",")
  15855. : [];
  15856. this.inviteCode = [];
  15857. for (var i = 0; i < res.data[2].length; i++) {
  15858. this.inviteCode.push({
  15859. cid: res.data[2][i].classid,
  15860. ic: res.data[2][i].code,
  15861. });
  15862. }
  15863. this.checkboxList3 = res.data[0][0].course_teacher
  15864. ? res.data[0][0].course_teacher.split(",")
  15865. : [];
  15866. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15867. this.myWord = res.data[0][0].template;
  15868. this.templateC.id = "123";
  15869. this.courseTypeId = [];
  15870. for (var i = 0; i < res.data[1].length; i++) {
  15871. this.courseTypeId.push(res.data[1][i].typeid);
  15872. }
  15873. console.log(this.courseTypeId);
  15874. if(res.data[3].length){
  15875. try {
  15876. this.aiJson = JSON.parse(res.data[3][0].tips);
  15877. this.templateid = res.data[3][0].template;
  15878. this.getTipsTemplateIsDialog()
  15879. }catch(error){
  15880. console.error(error)
  15881. }
  15882. }
  15883. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15884. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15885. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15886. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15887. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15888. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15889. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15890. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15891. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15892. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15893. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15894. }
  15895. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15896. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15897. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15898. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15899. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15900. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15901. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15902. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15903. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15904. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15905. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15906. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15907. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15908. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15909. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15910. 讨论:<转文本内容>`
  15911. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15912. if(res.data[0][0].cpote){
  15913. try {
  15914. this.cpote = JSON.parse(res.data[0][0].cpote);
  15915. }catch(error){
  15916. console.error(error)
  15917. }
  15918. }
  15919. if(res.data[0][0].setting){
  15920. try {
  15921. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15922. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15923. 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];
  15924. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15925. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15926. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15927. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15928. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15929. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15930. 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];
  15931. 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;
  15932. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15933. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15934. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15935. 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;
  15936. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15937. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15938. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15939. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15940. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15941. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15942. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15943. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15944. this.courseTextBool = true
  15945. }
  15946. // if(!this.teacherCourseText && !this.targetCourseText2){
  15947. // this.isuseT = 1
  15948. // }
  15949. }catch(error){
  15950. console.error(error)
  15951. }
  15952. }
  15953. if(this.teacherInfoData.length){
  15954. this.isuseT = true
  15955. }
  15956. if(this.courseText){
  15957. this.courseTextB = false
  15958. }
  15959. if(this.teacherCourseText){
  15960. this.teacherCourseTextB = false
  15961. }
  15962. if(this.targetCourseText){
  15963. this.targetCourseTextB = false
  15964. }
  15965. if(this.targetCourseText2){
  15966. this.targetCourseText2B = false
  15967. }
  15968. this.setMan();
  15969. this.unitJson[
  15970. this.unitIndex
  15971. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15972. this.$forceUpdate();
  15973. setTimeout(() => {
  15974. this.checkEva(this.evalua);
  15975. setTimeout(() => {
  15976. this.checkEva(this.evalua);
  15977. }, 100);
  15978. }, 100);
  15979. })
  15980. .catch((err) => {
  15981. console.error(err);
  15982. });
  15983. }
  15984. // if(this.cidType != 1 && this.templateid == ''){
  15985. // this.promptShow = true
  15986. // }
  15987. },
  15988. seleteCourseUpdate() {
  15989. let params = {
  15990. cid: this.cid,
  15991. };
  15992. this.ajax
  15993. .get(this.$store.state.api + "select_course_detail", params)
  15994. .then((res) => {
  15995. // console.log(this.unitJson);
  15996. let unitJson = JSON.parse(res.data[0][0].chapters);
  15997. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15998. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15999. let _unitJson = [];
  16000. let _chapAarry = [];
  16001. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  16002. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  16003. let index = 1;
  16004. let chapindex;
  16005. if (_unitJson2.length > unitJson.length) {
  16006. for (let c = 0; c < _unitJson2.length; c++) {
  16007. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  16008. }
  16009. for (let j = 0; j < unitJson.length; j++) {
  16010. let count = 0;
  16011. for (let k = 0; k < _unitJson2.length; k++) {
  16012. if (
  16013. unitJson[j].chapterInfo[0].chapterid ==
  16014. _unitJson2[k].chapterInfo[0].chapterid
  16015. ) {
  16016. count++;
  16017. _chapAarry.splice(
  16018. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16019. 1
  16020. );
  16021. _unitJson.push(unitJson[j]);
  16022. break;
  16023. }
  16024. }
  16025. // if(count === 0){
  16026. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16027. // }
  16028. }
  16029. for (let k = 0; k < _unitJson2.length; k++) {
  16030. if (_unitJson2[k].isUpdate == 1) {
  16031. _chapAarry.splice(
  16032. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16033. 1
  16034. );
  16035. _unitJson.push(_unitJson2[k]);
  16036. }
  16037. }
  16038. console.log(_chapAarry);
  16039. for (let d = 0; d < _unitJson2.length; d++) {
  16040. if (
  16041. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  16042. ) {
  16043. if (_unitIndex == d) {
  16044. index = 2;
  16045. }
  16046. chapindex = d;
  16047. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16048. }
  16049. }
  16050. } else {
  16051. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  16052. }
  16053. for (let i = 0; i < unitJson.length; i++) {
  16054. if (
  16055. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  16056. _unitJson[i].chapterInfo[0].chapterid !=
  16057. unitJson[i].chapterInfo[0].chapterid
  16058. ) {
  16059. if (i == _unitJson.length - 1) {
  16060. // this.unitIndex++
  16061. _unitIndex2++;
  16062. }
  16063. _unitJson.splice(i, 0, unitJson[i]);
  16064. } else if (i > _unitJson.length - 1) {
  16065. _unitJson.push(unitJson[i]);
  16066. } else if (
  16067. _unitJson[i].chapterInfo[0].chapterid ==
  16068. unitJson[i].chapterInfo[0].chapterid
  16069. ) {
  16070. _unitJson[i] = unitJson[i];
  16071. }
  16072. // if (i == _unitIndex) {
  16073. // continue;
  16074. // } else
  16075. }
  16076. if (_chapAarry.length && index != 2) {
  16077. if (chapindex < _unitIndex) {
  16078. this.isDelete = 2;
  16079. // this.unitIndex--;
  16080. _unitIndex2--;
  16081. } else if (
  16082. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  16083. _unitJson[_unitIndex].chapterInfo[0].chapterid
  16084. ) {
  16085. this.isDelete = 2;
  16086. for (let n = 0; n < _unitJson.length; n++) {
  16087. if (
  16088. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  16089. _unitJson[n].chapterInfo[0].chapterid
  16090. ) {
  16091. // this.unitIndex = n;
  16092. _unitIndex2 = n;
  16093. _unitJson[n] = _unitJson2[_unitIndex];
  16094. break;
  16095. }
  16096. }
  16097. }
  16098. } else if (index != 2) {
  16099. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  16100. _unitJson2[_unitIndex];
  16101. for (
  16102. var ci = 0;
  16103. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  16104. ci++
  16105. ) {
  16106. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  16107. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  16108. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16109. .toolChoose
  16110. : [];
  16111. let _chapterData = [];
  16112. for (
  16113. var c = 0;
  16114. c <
  16115. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  16116. .length;
  16117. c++
  16118. ) {
  16119. if (
  16120. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16121. .chapterData[c]
  16122. ) {
  16123. _chapterData.push(
  16124. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16125. .chapterData[c]
  16126. );
  16127. }
  16128. }
  16129. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  16130. _chapterData;
  16131. }
  16132. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  16133. }
  16134. if (index == 1) {
  16135. this.unitJson = _unitJson;
  16136. this.$forceUpdate();
  16137. setTimeout(() => {
  16138. if (this.unitIndex != _unitIndex2) {
  16139. this.isDelete = 2;
  16140. this.unitIndex = _unitIndex2;
  16141. }
  16142. }, 0);
  16143. this.timer = setTimeout(() => {
  16144. this.seleteCourseUpdate();
  16145. }, 5000);
  16146. } else if (index == 2) {
  16147. let _this = this;
  16148. _this
  16149. .$confirm(
  16150. _this.lang.ssStageDeletedRestore,
  16151. _this.lang.ssTip,
  16152. {
  16153. confirmButtonText: _this.lang.ssNeed,
  16154. cancelButtonText: _this.lang.ssCancel,
  16155. type: "warning",
  16156. }
  16157. )
  16158. .then(() => {
  16159. if (_this.time()) {
  16160. _this.restoreWork(
  16161. _chapAarry[0],
  16162. _unitJson,
  16163. chapindex,
  16164. _unitJson2,
  16165. _unitIndex2
  16166. );
  16167. }
  16168. })
  16169. .catch(() => {
  16170. _this.unitJson = _unitJson;
  16171. _this.$forceUpdate();
  16172. setTimeout(() => {
  16173. if (this.unitIndex != _unitIndex2) {
  16174. this.isDelete = 2;
  16175. this.unitIndex = _unitIndex2;
  16176. }
  16177. }, 0);
  16178. _this.timer = setTimeout(() => {
  16179. _this.seleteCourseUpdate();
  16180. }, 5000);
  16181. });
  16182. }
  16183. // 在复制操作之前记录滚动位置
  16184. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16185. // 执行复制操作
  16186. // 复制操作完成后恢复滚动位置
  16187. this.$nextTick(() => {
  16188. if (this.$refs.scrollContainer) {
  16189. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16190. }
  16191. });
  16192. })
  16193. .catch((err) => {
  16194. console.error(err);
  16195. });
  16196. },
  16197. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16198. let params = [
  16199. {
  16200. cid: this.cid,
  16201. chapters: JSON.stringify(this.unitJson),
  16202. uid: this.userid,
  16203. chapid: chapid,
  16204. },
  16205. ];
  16206. this.ajax
  16207. .post(this.$store.state.api + "restoreWork", params)
  16208. .then((res) => {
  16209. this.$message({
  16210. message: "恢复成功",
  16211. type: "success",
  16212. });
  16213. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16214. this.unitJson = unitJson;
  16215. this.$forceUpdate();
  16216. setTimeout(() => {
  16217. if (this.unitIndex != unitIndex2) {
  16218. this.isDelete = 2;
  16219. this.unitIndex = unitIndex2;
  16220. }
  16221. }, 0);
  16222. this.timer = setTimeout(() => {
  16223. this.seleteCourseUpdate();
  16224. }, 5000);
  16225. })
  16226. .catch((err) => {
  16227. this.$message.error(this.lang.ssNetPoor);
  16228. console.error(err);
  16229. });
  16230. },
  16231. getTypeName() {
  16232. console.log(this.courseTypeId);
  16233. this.$forceUpdate();
  16234. },
  16235. selectAllType() {
  16236. let params = {
  16237. org: this.org && this.org != "" ? this.org : "",
  16238. oid: this.oid && this.oid != "" ? this.oid : "",
  16239. stand: this.lang.lang
  16240. };
  16241. this.ajax
  16242. .get(this.$store.state.api + "selectAllTypeStand", params)
  16243. .then((res) => {
  16244. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16245. res.data[0] = [...res.data[0], ...res.data[4]];
  16246. }
  16247. this.CourseType = res.data;
  16248. this.CourseType2 = [
  16249. { name: this.lang.ssZhijian, id: [] },
  16250. { name: this.lang.ssZhixing, id: [] },
  16251. { name: this.lang.ssIntelli, id: [] },
  16252. ];
  16253. for (var cti = 0; cti < res.data[0].length; cti++) {
  16254. if (
  16255. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16256. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16257. ) {
  16258. this.CourseType2[0].id.push(res.data[0][cti].id);
  16259. } else if (
  16260. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16261. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16262. ) {
  16263. this.CourseType2[1].id.push(res.data[0][cti].id);
  16264. } else if (
  16265. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16266. ) {
  16267. this.CourseType2[2].id.push(res.data[0][cti].id);
  16268. }
  16269. if (
  16270. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16271. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16272. ) {
  16273. res.data[0][cti].name = this.lang.ssGradeType;
  16274. } else if (
  16275. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16276. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16277. ) {
  16278. res.data[0][cti].name = this.lang.ssSubjectCategory;
  16279. } else if (
  16280. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16281. ) {
  16282. res.data[0][cti].name = this.lang.ssThemeType;
  16283. }
  16284. }
  16285. let _courseTypeId = [];
  16286. for (var i = 0; i < res.data[0].length; i++) {
  16287. if (!this.cid) {
  16288. this.courseTypeId[res.data[0][i].id] = [];
  16289. }
  16290. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16291. // }
  16292. this.CourseTypeJson[res.data[0][i].id] = [];
  16293. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16294. if (res.data[0][i].name == this.lang.ssColumn) {
  16295. this.CourseType[0][i].name = this.lang.ssThemeType;
  16296. }
  16297. }
  16298. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16299. for (var j = 0; j < res.data[1].length; j++) {
  16300. if (
  16301. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16302. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16303. ) {
  16304. _courseTypeId.push(res.data[1][j].id);
  16305. }
  16306. if (res.data[0][i].id == res.data[1][j].pid) {
  16307. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16308. }
  16309. }
  16310. } else {
  16311. if (res.data[2].length > 0) {
  16312. for (var j = 0; j < res.data[2].length; j++) {
  16313. if (
  16314. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16315. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16316. ) {
  16317. _courseTypeId.push(res.data[2][j].id);
  16318. }
  16319. if (res.data[0][i].id == res.data[2][j].pid) {
  16320. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16321. }
  16322. }
  16323. }
  16324. if (res.data[3].length > 0) {
  16325. for (var j = 0; j < res.data[3].length; j++) {
  16326. if (
  16327. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16328. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16329. ) {
  16330. _courseTypeId.push(res.data[3][j].id);
  16331. }
  16332. if (res.data[0][i].id == res.data[3][j].pid) {
  16333. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16334. }
  16335. }
  16336. }
  16337. }
  16338. }
  16339. if (this.CourseType[0] && this.CourseType[0].length && this.lang.lang == 'com') {
  16340. this.CourseType[0] = this.CourseType[0].filter(item => item.id != '34629bcc-d02f-11ec-8c78-005056b86db5');
  16341. }
  16342. this.courseTypeId = _courseTypeId;
  16343. this.typeC1 = this.getTypeC(2)
  16344. this.typeC2 = this.getTypeC(1)
  16345. })
  16346. .catch((err) => {
  16347. console.error(err);
  16348. });
  16349. },
  16350. selectType() {
  16351. this.ajax
  16352. .get(this.$store.state.api + "selectType")
  16353. .then((res) => {
  16354. this.CourseType = res.data;
  16355. for (var i = 0; i < res.data[0].length; i++) {
  16356. if (!this.cid) {
  16357. this.courseTypeId[res.data[0][i].id] = "";
  16358. }
  16359. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16360. if (res.data[0][i].name == this.lang.ssColumn) {
  16361. this.CourseType[0][i].name = this.lang.ssThemeType;
  16362. }
  16363. }
  16364. for (var j = 0; j < res.data[1].length; j++) {
  16365. if (res.data[0][i].id == res.data[1][j].pid) {
  16366. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16367. this.CourseTypeJson[res.data[0][i].id] = [];
  16368. }
  16369. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16370. }
  16371. }
  16372. }
  16373. this.selectTypeByOid();
  16374. this.selectTypeByOrg();
  16375. })
  16376. .catch((err) => {
  16377. console.error(err);
  16378. });
  16379. },
  16380. selectTypeByOid() {
  16381. let params = {
  16382. oid: this.oid,
  16383. };
  16384. this.ajax
  16385. .get(this.$store.state.api + "selectTypeByOid", params)
  16386. .then((res) => {
  16387. for (var i = 0; i < res.data[0].length; i++) {
  16388. for (var j = 0; j < res.data[1].length; j++) {
  16389. if (res.data[0][i].id == res.data[1][j].pid) {
  16390. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16391. this.CourseTypeJson[res.data[0][i].id] = [];
  16392. }
  16393. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16394. }
  16395. }
  16396. }
  16397. })
  16398. .catch((err) => {
  16399. console.error(err);
  16400. });
  16401. },
  16402. selectTypeByOrg() {
  16403. let params = {
  16404. oid: this.org,
  16405. };
  16406. this.ajax
  16407. .get(this.$store.state.api + "selectTypeByOrg", params)
  16408. .then((res) => {
  16409. for (var i = 0; i < res.data[0].length; i++) {
  16410. for (var j = 0; j < res.data[1].length; j++) {
  16411. if (res.data[0][i].id == res.data[1][j].pid) {
  16412. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16413. this.CourseTypeJson[res.data[0][i].id] = [];
  16414. }
  16415. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16416. }
  16417. }
  16418. }
  16419. this.$forceUpdate();
  16420. })
  16421. .catch((err) => {
  16422. console.error(err);
  16423. });
  16424. },
  16425. OtherMb(type, task) {
  16426. if (task === 0 || task) {
  16427. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16428. task
  16429. ].isEvaFold = true;
  16430. }
  16431. this.typeMode = type;
  16432. setTimeout(() => {
  16433. this.checkEva(this.checkId);
  16434. setTimeout(() => {
  16435. this.checkEva(this.checkId);
  16436. }, 100);
  16437. }, 100);
  16438. },
  16439. openMember() {
  16440. this.searchTN = "";
  16441. this.getTeacher();
  16442. this.dialogVisibleMember = true;
  16443. },
  16444. checkEva(id, type) {
  16445. this.dialogVisiblemb = false;
  16446. this.selectEva();
  16447. if (this.evalua != id && type == 2) {
  16448. this.$message.success(this.lang.ssImportOk);
  16449. setTimeout(() => {
  16450. this.checkEva(id);
  16451. }, 100);
  16452. }
  16453. this.evalua = id;
  16454. this.checkId = id;
  16455. if (this.evalua != "") {
  16456. for (var i = 0; i < this.evaJuri.length; i++) {
  16457. if (this.evalua == this.evaJuri[i].id) {
  16458. this.eTitle = this.evaJuri[i].title;
  16459. this.eJson = JSON.parse(this.evaJuri[i].content);
  16460. }
  16461. }
  16462. this.data.data = [];
  16463. this.$forceUpdate();
  16464. setTimeout(() => {
  16465. this.setMindData();
  16466. }, 1000);
  16467. }
  16468. },
  16469. deleteEva() {
  16470. let _this = this;
  16471. if (_this.evalua == "") {
  16472. this.$message.warning(this.lang.ssClearAgain);
  16473. return;
  16474. }
  16475. _this
  16476. .$confirm(this.lang.ssDelTarget, this.lang.ssTip, {
  16477. confirmButtonText: this.lang.ssConfirm,
  16478. cancelButtonText: this.lang.ssCancel,
  16479. type: "warning",
  16480. })
  16481. .then(() => {
  16482. _this.evalua = "";
  16483. _this.checkId = "";
  16484. _this.eTitle = "";
  16485. let _unitJson = _this.unitJson;
  16486. for (var i = 0; i < _unitJson.length; i++) {
  16487. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16488. for (var j = 0; j < _task.length; j++) {
  16489. let _eList = _task[j].eList;
  16490. for (var k = 0; k < _eList.length; k++) {
  16491. delete _eList[k].target;
  16492. }
  16493. }
  16494. }
  16495. _this.$forceUpdate();
  16496. if (_this.cid) {
  16497. _this.updateWork();
  16498. }
  16499. })
  16500. .catch(() => {
  16501. return;
  16502. });
  16503. },
  16504. selectEva() {
  16505. let params = {
  16506. oid: this.oid,
  16507. };
  16508. this.ajax
  16509. .get(this.$store.state.api + "selectAllEvaluation", params)
  16510. .then((res) => {
  16511. this.evaJuri = res.data[0];
  16512. // 在复制操作之前记录滚动位置
  16513. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16514. // 执行复制操作
  16515. // 复制操作完成后恢复滚动位置
  16516. this.$nextTick(() => {
  16517. if (this.$refs.scrollContainer) {
  16518. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16519. }
  16520. });
  16521. })
  16522. .catch((err) => {
  16523. console.error(err);
  16524. });
  16525. },
  16526. setMindData() {
  16527. let targetArray = [];
  16528. this.data.data = [];
  16529. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16530. let _eJson = Object.keys(this.eJson);
  16531. let _e = this.eJson;
  16532. for (let i = 0; i < _eJson.length; i++) {
  16533. let element = _e[_eJson[i]];
  16534. this.data.data.push({
  16535. id: element.id,
  16536. parentid: "root",
  16537. topic: element.name,
  16538. });
  16539. // targetArray.push({
  16540. // id: element.id,
  16541. // parentid: "root",
  16542. // name: element.name,
  16543. // });
  16544. targetArray.push({
  16545. value: element.name,
  16546. label: element.name,
  16547. children: [],
  16548. });
  16549. let _eJsonc = Object.keys(element.child);
  16550. let _e2 = element.child;
  16551. for (let j = 0; j < _eJsonc.length; j++) {
  16552. let _ec = _e2[_eJsonc[j]];
  16553. this.data.data.push({
  16554. id: _ec.id,
  16555. parentid: element.id,
  16556. topic: _ec.name,
  16557. });
  16558. // targetArray.push({
  16559. // id: _ec.id,
  16560. // parentid: element.id,
  16561. // name: _ec.name,
  16562. // });
  16563. targetArray[i].children.push({
  16564. value: _ec.name,
  16565. label: _ec.name,
  16566. children: [],
  16567. });
  16568. let _eJsonz = Object.keys(_ec.child);
  16569. let _e3 = _ec.child;
  16570. for (let z = 0; z < _eJsonz.length; z++) {
  16571. let _ez = _e3[_eJsonz[z]];
  16572. this.data.data.push({
  16573. id: _ez.id,
  16574. parentid: _ec.id,
  16575. topic: _ez.name,
  16576. });
  16577. // targetArray.push({
  16578. // id: _ez.id,
  16579. // parentid: _ec.id,
  16580. // name: _ez.name,
  16581. // });
  16582. targetArray[i].children[j].children.push({
  16583. value: _ez.name,
  16584. label: _ez.name,
  16585. });
  16586. }
  16587. }
  16588. }
  16589. this.targetArray = targetArray;
  16590. this.$forceUpdate();
  16591. },
  16592. /*添加评价 */
  16593. addEList(index, tIndex) {
  16594. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16595. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16596. value: "",
  16597. detail: "",
  16598. score: 5,
  16599. isai: "1",
  16600. })
  16601. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16602. { value: "", detail: "", score: 5,isai: "1", },
  16603. ]);
  16604. this.$forceUpdate();
  16605. },
  16606. openEList(index, tIndex) {
  16607. this.evaIndex = index;
  16608. this.evatIndex = tIndex;
  16609. this.evaBoxDialog = true;
  16610. },
  16611. addCET(index, tIndex) {
  16612. this.cetIndex = index;
  16613. this.cettIndex = tIndex;
  16614. this.selectAllType1();
  16615. },
  16616. addCETemplate() {
  16617. var array =
  16618. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16619. .eList;
  16620. let params = [
  16621. {
  16622. uid: this.userid,
  16623. n: this.templateName,
  16624. json: JSON.stringify(array),
  16625. t: 1,
  16626. oid: this.oid,
  16627. },
  16628. ];
  16629. this.ajax
  16630. .post(this.$store.state.api + "addCETShare", params)
  16631. .then((res) => {
  16632. this.addTypeByCET(res.data[0][0].id);
  16633. })
  16634. .catch((err) => {
  16635. this.$message.error(this.lang.ssNetPoor);
  16636. console.error(err);
  16637. });
  16638. },
  16639. addTypeByCET(id) {
  16640. if (this.setTypeJson.two == "") {
  16641. this.$message.warning(this.lang.ssSelSecAdd);
  16642. return;
  16643. }
  16644. let params = {
  16645. cid: id,
  16646. };
  16647. this.ajax
  16648. .get(this.$store.state.api + "deleteCETLabel", params)
  16649. .then((res) => {
  16650. for (var i = 0; i < 2; i++) {
  16651. let tid = "";
  16652. if (i == 0) {
  16653. tid = this.setTypeJson.one;
  16654. } else {
  16655. tid = this.setTypeJson.two;
  16656. }
  16657. let params = [
  16658. {
  16659. cid: id,
  16660. tid: tid,
  16661. uid: this.userid,
  16662. },
  16663. ];
  16664. this.ajax
  16665. .post(this.$store.state.api + "addCETLabel", params)
  16666. .then((res) => {
  16667. this.$message({
  16668. message: this.lang.ssAddOk,
  16669. type: "success",
  16670. });
  16671. this.close();
  16672. })
  16673. .catch((err) => {
  16674. this.$message.error(this.lang.ssNetPoor);
  16675. console.error(err);
  16676. });
  16677. }
  16678. })
  16679. .catch((err) => {
  16680. this.$message.error(this.lang.ssNetPoor);
  16681. console.error(err);
  16682. });
  16683. },
  16684. updateEvaJson(array) {
  16685. array = array.filter((item) => {
  16686. item.isai = "1"
  16687. return item;
  16688. });
  16689. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16690. this.evatIndex
  16691. ].eList = array;
  16692. },
  16693. forceUpdate() {
  16694. this.$forceUpdate();
  16695. },
  16696. forceUpdate2() {
  16697. setTimeout(() => {
  16698. this.courseText += "*0*%*";
  16699. setTimeout(() => {
  16700. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16701. }, 0);
  16702. }, 100);
  16703. this.$forceUpdate();
  16704. },
  16705. deletEList(index, tIndex, eIndex) {
  16706. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16707. eIndex,
  16708. 1
  16709. );
  16710. this.$forceUpdate();
  16711. },
  16712. getChoosePic(t) {
  16713. this.chooseType = t;
  16714. this.getAllBanner();
  16715. },
  16716. getAllBanner() {
  16717. this.sysPicVisible = true;
  16718. let params = {
  16719. t: this.chooseType,
  16720. };
  16721. this.ajax
  16722. .get(this.$store.state.api + "selectAllBanner", params)
  16723. .then((res) => {
  16724. this.sysPic = res.data[0];
  16725. })
  16726. .catch((err) => {
  16727. console.error(err);
  16728. });
  16729. },
  16730. // getClass() {
  16731. // let params = {
  16732. // oid: this.oid,
  16733. // };
  16734. // this.ajax
  16735. // .get(this.$store.state.api + "selectClassBySchool", params)
  16736. // .then((res) => {
  16737. // this.classJuri = res.data[0];
  16738. // })
  16739. // .catch((err) => {
  16740. // console.error(err);
  16741. // });
  16742. // },
  16743. deleteSysPic() {
  16744. this.cover = [];
  16745. this.isSysPic = false;
  16746. this.isSysPic2 = false;
  16747. },
  16748. deleteSelectPic() {
  16749. this.selectJson.url = "";
  16750. },
  16751. setEListStar() {
  16752. this.$forceUpdate();
  16753. },
  16754. deletRateList(i) {
  16755. this.rateJson.splice(i, 1);
  16756. },
  16757. addRateList() {
  16758. this.rateJson.push({ detail: "", score: 5, value: "" });
  16759. },
  16760. addSt() {
  16761. this.sentenceList.push({
  16762. sentenceTitle: "",
  16763. addSentence: [],
  16764. rightAnswer: [],
  16765. });
  16766. },
  16767. addSen(i) {
  16768. if (!this.sentenceList[i].sentenceTitle) {
  16769. this.$message.error(this.lang.ssFillCard);
  16770. return;
  16771. }
  16772. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16773. this.$message.error(this.lang.ssCardOver10);
  16774. return;
  16775. }
  16776. if (
  16777. this.sentenceList[i].addSentence.indexOf(
  16778. this.sentenceList[i].sentenceTitle
  16779. ) !== -1
  16780. ) {
  16781. this.$message.error(this.lang.ssNoDupCard);
  16782. return;
  16783. }
  16784. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16785. // this.isPushTitleList.push(this.sentenceTitle);
  16786. this.sentenceList[i].sentenceTitle = "";
  16787. },
  16788. setRightAnswer(s, i, j) {
  16789. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16790. this.sentenceList[i].rightAnswer.push(s);
  16791. }
  16792. },
  16793. returnCard(r, i, j) {
  16794. this.sentenceList[i].rightAnswer.splice(j, 1);
  16795. },
  16796. addSentenceTool() {
  16797. for (var i = 0; i < this.sentenceList.length; i++) {
  16798. if (this.sentenceList[i].rightAnswer.length == 0) {
  16799. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16800. return;
  16801. }
  16802. if (
  16803. this.sentenceList[i].addSentence.length !=
  16804. this.sentenceList[i].rightAnswer.length
  16805. ) {
  16806. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16807. return;
  16808. }
  16809. }
  16810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16811. this.taskCount
  16812. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16813. this.sentenceList = [
  16814. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16815. ];
  16816. this.dialogVisibleSentence = false;
  16817. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16818. // itemTaskIndex
  16819. // ].toolChoose[toolIndex].tool = [];
  16820. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16821. // itemTaskIndex
  16822. // ].toolChoose[toolIndex].tool.push(i);
  16823. if (
  16824. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16825. .toolChoose[this.toolIndex].tool != 47
  16826. ) {
  16827. this.addTools(47, this.taskCount, this.toolIndex);
  16828. }
  16829. },
  16830. addTableJson() {
  16831. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16832. // this.$message.error("请将信息填写完整!");
  16833. // return;
  16834. // }
  16835. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16836. this.taskCount
  16837. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16838. // this.tableJson = [{ text: "" }];
  16839. // this.dialogVisibleTable = false;
  16840. this.$message.success(this.lang.ssUploadSucc);
  16841. if (
  16842. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16843. .toolChoose[this.toolIndex].tool != 48
  16844. ) {
  16845. this.addTools(48, this.taskCount, this.toolIndex);
  16846. }
  16847. },
  16848. addWordJson() {
  16849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16850. this.taskCount
  16851. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16852. // this.wordJson = [{ text: "" }];
  16853. // this.dialogVisibleWord = false;
  16854. this.$message.success(this.lang.ssUploadSucc);
  16855. if (
  16856. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16857. .toolChoose[this.toolIndex].tool != 52
  16858. ) {
  16859. this.addTools(52, this.taskCount, this.toolIndex);
  16860. }
  16861. },
  16862. addMoreUpload() {
  16863. if (this.uploadJson.length == 0) {
  16864. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16865. this.taskCount
  16866. ].toolChoose[this.toolIndex].uploadJson = [];
  16867. } else {
  16868. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16869. this.taskCount
  16870. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16871. }
  16872. this.uploadJson = [];
  16873. this.dialogVisibleMoreUpload = false;
  16874. if (
  16875. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16876. .toolChoose[this.toolIndex].tool != 50
  16877. ) {
  16878. this.addTools(50, this.taskCount, this.toolIndex);
  16879. }
  16880. },
  16881. addPreTime() {
  16882. if (this.preTime == 0) {
  16883. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16884. this.taskCount
  16885. ].toolChoose[this.toolIndex].preTime = 0;
  16886. } else {
  16887. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16888. this.taskCount
  16889. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16890. }
  16891. this.preTime = 0;
  16892. this.dialogVisiblePreTime = false;
  16893. if (
  16894. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16895. .toolChoose[this.toolIndex].tool != 10
  16896. ) {
  16897. this.addTools(10, this.taskCount, this.toolIndex);
  16898. }
  16899. },
  16900. goToTask(i) {
  16901. this.toolIndexType = "";
  16902. if (this.isClickColor == i + 1) {
  16903. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16904. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16905. // } else {
  16906. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16907. i
  16908. ].toolOpen = true;
  16909. // }
  16910. this.$forceUpdate();
  16911. return;
  16912. }
  16913. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16914. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16915. // } else {
  16916. document.querySelectorAll(".basic_box")[0].scrollTop =
  16917. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16918. this.isClickColor = i + 1;
  16919. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16920. // }
  16921. this.$forceUpdate();
  16922. },
  16923. taskScroll(){
  16924. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16925. const sections = document.querySelectorAll('.taskBorder');
  16926. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16927. sections.forEach((section, index) => {
  16928. const offsetTop = section.offsetTop;
  16929. const offsetHeight = section.offsetHeight;
  16930. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16931. this.isClickColor = index +1;
  16932. }
  16933. });
  16934. },
  16935. taskOpen(i, stageIndex) {
  16936. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16937. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16938. } else {
  16939. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16940. }
  16941. this.updateWork3(stageIndex);
  16942. this.$forceUpdate();
  16943. },
  16944. goToTask2(i, stage) {
  16945. this.toolIndexType = "";
  16946. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16947. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16948. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16949. // } else {
  16950. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16951. i
  16952. ].toolOpen = true;
  16953. // }
  16954. this.$forceUpdate();
  16955. return;
  16956. }
  16957. if (this.unitIndex != stage) {
  16958. if (this.panUnitJson() == 2) {
  16959. return;
  16960. }
  16961. this.unitSet(stage);
  16962. }
  16963. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16964. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16965. // } else {
  16966. document.querySelectorAll(".basic_box")[0].scrollTop =
  16967. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16968. this.isClickColor = i + 1;
  16969. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16970. // }
  16971. this.$forceUpdate();
  16972. },
  16973. taskMove(type, index) {
  16974. this.$confirm(
  16975. this.lang.ssSwitchTaskDel,
  16976. this.lang.ssTip,
  16977. {
  16978. confirmButtonText: this.lang.ssConfirm,
  16979. cancelButtonText: this.lang.ssCancel,
  16980. type: "warning",
  16981. }
  16982. )
  16983. .then(() => {
  16984. if (type == 1) {
  16985. if (index > 0) {
  16986. let a = JSON.parse(
  16987. JSON.stringify(
  16988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16989. index - 1
  16990. ]
  16991. )
  16992. );
  16993. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16994. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16995. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16996. }
  16997. } else {
  16998. if (
  16999. index <
  17000. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  17001. ) {
  17002. let a = JSON.parse(
  17003. JSON.stringify(
  17004. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17005. index + 1
  17006. ]
  17007. )
  17008. );
  17009. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  17010. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  17011. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  17012. }
  17013. }
  17014. this.$forceUpdate();
  17015. })
  17016. .catch(() => {
  17017. return;
  17018. });
  17019. },
  17020. stageMove(type, index) {
  17021. if (type == 1) {
  17022. if (index > 0) {
  17023. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  17024. let acid = JSON.parse(
  17025. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  17026. );
  17027. let bcid = JSON.parse(
  17028. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17029. );
  17030. this.unitJson3[index - 1] = this.unitJson3[index];
  17031. this.unitJson3[index] = a;
  17032. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  17033. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17034. }
  17035. } else {
  17036. if (index < this.unitJson3.length - 1) {
  17037. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  17038. let acid = JSON.parse(
  17039. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  17040. );
  17041. let bcid = JSON.parse(
  17042. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17043. );
  17044. this.unitJson3[index + 1] = this.unitJson3[index];
  17045. this.unitJson3[index] = a;
  17046. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  17047. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17048. }
  17049. }
  17050. this.$forceUpdate();
  17051. },
  17052. addGroup(i) {
  17053. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  17054. this.groupJson.group.push({
  17055. name: this.lang.ssGroup.replace(/\*/g, this.groupJson.group.length + 1),
  17056. });
  17057. },
  17058. deleteGroup(i) {
  17059. this.groupJson.group.splice(i, 1);
  17060. },
  17061. numberPan() {
  17062. if (
  17063. /[^\d]/.test(this.groupJson.number) ||
  17064. this.groupJson.number < 2 ||
  17065. this.groupJson.number > 10
  17066. ) {
  17067. this.$message.error(this.lang.ssEnterNum);
  17068. this.groupJson.number = "";
  17069. }
  17070. },
  17071. numberPanJie() {
  17072. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  17073. this.$message.error(this.lang.ssInputNum1)
  17074. this.courseJie = 1
  17075. }
  17076. },
  17077. numberPanTime() {
  17078. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  17079. this.$message.error(this.lang.ssInputNum1)
  17080. this.courseTime = 1
  17081. }
  17082. },
  17083. addGroupJson() {
  17084. for (var i = 0; i < this.groupJson.group.length; i++) {
  17085. if (!this.groupJson.group[i].name) {
  17086. this.$message.error(this.lang.ssFillInfo);
  17087. return;
  17088. }
  17089. }
  17090. if (!this.groupJson.number) {
  17091. this.$message.error(this.lang.ssFillInfo);
  17092. return;
  17093. }
  17094. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17095. this.taskCount
  17096. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  17097. JSON.stringify(this.groupJson)
  17098. );
  17099. this.dialogVisibleGroup = false;
  17100. this.groupJson = {};
  17101. if (
  17102. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17103. .toolChoose[this.toolIndex].tool != 49
  17104. ) {
  17105. this.addTools(49, this.taskCount, this.toolIndex);
  17106. }
  17107. },
  17108. updateTime(preTime) {
  17109. this.preTime = preTime;
  17110. },
  17111. InviteChange(val) {
  17112. console.log(val);
  17113. let _check = [];
  17114. let _check2 = [];
  17115. for (var i = 0; i < this.grade2.length; i++) {
  17116. var gid = this.grade2[i].id;
  17117. _check.push(gid);
  17118. }
  17119. for (var i = 0; i < this.checkboxList2.length; i++) {
  17120. var _id = this.checkboxList2[i];
  17121. if (_check.indexOf(_id) !== -1) {
  17122. _check2.push(_id);
  17123. }
  17124. }
  17125. this.checkAll = _check2.length === _check.length;
  17126. return;
  17127. // let array = JSON.parse(JSON.stringify(val));
  17128. // this.inviteCode = this.inviteCode.filter((el) => {
  17129. // if (val.indexOf(el.cid) != -1) {
  17130. // array.splice(array.indexOf(el.cid), 1);
  17131. // return el;
  17132. // }
  17133. // });
  17134. // for (var i = 0; i < array.length; i++) {
  17135. // this.getInviteCode(array[i]);
  17136. // }
  17137. },
  17138. InviteChange2(val) {
  17139. console.log(val);
  17140. let _check = [];
  17141. let _check2 = [];
  17142. for (var i = 0; i < this.teacherJuri.length; i++) {
  17143. var gid = this.teacherJuri[i].userid;
  17144. _check.push(gid);
  17145. }
  17146. for (var i = 0; i < this.checkboxList3.length; i++) {
  17147. var _id = this.checkboxList3[i];
  17148. if (_check.indexOf(_id) !== -1) {
  17149. _check2.push(_id);
  17150. }
  17151. }
  17152. this.checkAll2 = _check2.length === _check.length;
  17153. this.setMan();
  17154. return;
  17155. // let array = JSON.parse(JSON.stringify(val));
  17156. // this.inviteCode = this.inviteCode.filter((el) => {
  17157. // if (val.indexOf(el.cid) != -1) {
  17158. // array.splice(array.indexOf(el.cid), 1);
  17159. // return el;
  17160. // }
  17161. // });
  17162. // for (var i = 0; i < array.length; i++) {
  17163. // this.getInviteCode(array[i]);
  17164. // }
  17165. },
  17166. handleCheckAllChange(val) {
  17167. if (val) {
  17168. for (var i = 0; i < this.grade2.length; i++) {
  17169. var gid = this.grade2[i].id;
  17170. if (this.checkboxList2.indexOf(gid) === -1) {
  17171. this.checkboxList2.push(gid);
  17172. }
  17173. }
  17174. } else {
  17175. let _check = [];
  17176. let _check2 = [];
  17177. for (var i = 0; i < this.grade2.length; i++) {
  17178. var gid = this.grade2[i].id;
  17179. _check.push(gid);
  17180. }
  17181. for (var i = 0; i < this.checkboxList2.length; i++) {
  17182. var _id = this.checkboxList2[i];
  17183. if (_check.indexOf(_id) === -1) {
  17184. _check2.push(_id);
  17185. }
  17186. }
  17187. this.checkboxList2 = _check2;
  17188. }
  17189. this.isIndeterminate = false;
  17190. },
  17191. handleCheckAllChange2(val) {
  17192. if (val) {
  17193. for (var i = 0; i < this.teacherJuri.length; i++) {
  17194. var gid = this.teacherJuri[i].userid;
  17195. if (this.checkboxList3.indexOf(gid) === -1) {
  17196. this.checkboxList3.push(gid);
  17197. }
  17198. }
  17199. } else {
  17200. let _check = [];
  17201. let _check2 = [];
  17202. for (var i = 0; i < this.teacherJuri.length; i++) {
  17203. var gid = this.teacherJuri[i].userid;
  17204. _check.push(gid);
  17205. }
  17206. for (var i = 0; i < this.checkboxList3.length; i++) {
  17207. var _id = this.checkboxList3[i];
  17208. if (_check.indexOf(_id) === -1) {
  17209. _check2.push(_id);
  17210. }
  17211. }
  17212. this.checkboxList3 = _check2;
  17213. }
  17214. this.isIndeterminate2 = false;
  17215. },
  17216. async getInviteCode(cid) {
  17217. let code = this.randomNumber();
  17218. let params = {
  17219. code: code,
  17220. oid: this.oid,
  17221. };
  17222. let type = 1;
  17223. for (var i = 0; i < this.inviteCode.length; i++) {
  17224. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17225. type = 2;
  17226. }
  17227. }
  17228. if (type == 2) {
  17229. this.getInviteCode(cid);
  17230. return;
  17231. }
  17232. const res = await this.ajax.get(
  17233. this.$store.state.api + "selectInviteCode2",
  17234. params
  17235. );
  17236. if (
  17237. res.data.length &&
  17238. res.data[0].length &&
  17239. res.data[0][0].courseId != this.cid
  17240. ) {
  17241. this.getInviteCode(cid);
  17242. return;
  17243. }
  17244. let array = [];
  17245. for (var i = 0; i < this.inviteCode.length; i++) {
  17246. array.push(this.inviteCode[i].cid);
  17247. }
  17248. if (array.indexOf(cid) != -1) {
  17249. this.inviteCode[array.indexOf(cid)].ic = code;
  17250. } else {
  17251. this.inviteCode.push({ cid: cid, ic: code });
  17252. }
  17253. },
  17254. OpenInviteD(cid) {
  17255. let array = [];
  17256. this.icode = "";
  17257. for (var i = 0; i < this.inviteCode.length; i++) {
  17258. array.push(this.inviteCode[i].cid);
  17259. }
  17260. if (array.indexOf(cid) != -1) {
  17261. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17262. }
  17263. this.inviteId = cid;
  17264. this.dialogVisibleInvite = true;
  17265. },
  17266. addInvite() {
  17267. let reg = /^[A-Za-z0-9]{4,}$/;
  17268. if (!reg.test(this.icode)) {
  17269. this.$message.error(this.lang.ssInputCode);
  17270. return;
  17271. }
  17272. let type = 1;
  17273. for (var i = 0; i < this.inviteCode.length; i++) {
  17274. if (
  17275. this.inviteCode[i].cid != this.inviteId &&
  17276. this.icode == this.inviteCode[i].ic
  17277. ) {
  17278. type = 2;
  17279. }
  17280. }
  17281. if (type == 2) {
  17282. this.$message.error(this.lang.ssCodeDup);
  17283. return;
  17284. }
  17285. let params = {
  17286. code: this.icode,
  17287. oid: this.oid,
  17288. };
  17289. this.ajax
  17290. .get(this.$store.state.api + "selectInviteCode", params)
  17291. .then((res) => {
  17292. if (
  17293. res.data.length &&
  17294. res.data[0].length &&
  17295. res.data[0][0].courseId != this.cid
  17296. ) {
  17297. this.$message.error(this.lang.ssCodeDup);
  17298. return;
  17299. }
  17300. let array = [];
  17301. for (var i = 0; i < this.inviteCode.length; i++) {
  17302. array.push(this.inviteCode[i].cid);
  17303. }
  17304. if (array.indexOf(this.inviteId) != -1) {
  17305. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17306. } else {
  17307. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17308. }
  17309. this.icode = "";
  17310. this.dialogVisibleInvite = false;
  17311. })
  17312. .catch((err) => {
  17313. console.error(err);
  17314. });
  17315. },
  17316. randomNumber() {
  17317. // 随机生成两位数
  17318. // let num = Math.floor(Math.random() * 900) + 100;
  17319. // 生成 0 到 99 之间的随机整数
  17320. const randomNumber = Math.floor(Math.random() * 100);
  17321. // 如果随机数小于 10,补上前导零
  17322. const num =
  17323. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17324. // 随机生成两个大写字母
  17325. let letters = "";
  17326. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17327. for (let i = 0; i < 3; i++) {
  17328. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17329. }
  17330. // 随机生成两位数字和字母的组合
  17331. let mix = "";
  17332. let chars =
  17333. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17334. for (let i = 0; i < 3; i++) {
  17335. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17336. mix += char;
  17337. }
  17338. // 随机选择一种类型
  17339. let type = Math.floor(Math.random() * 3);
  17340. return num;
  17341. // 根据类型输出结果
  17342. switch (type) {
  17343. case 0:
  17344. console.log(num); // 输出两位数
  17345. return num;
  17346. case 1:
  17347. console.log(letters); // 输出两个大写字母
  17348. return letters;
  17349. case 2:
  17350. console.log(mix); // 输出两位数字和字母的组合
  17351. return mix;
  17352. }
  17353. },
  17354. getPaste() {
  17355. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  17356. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  17357. if (!iframe && !iframe2) {
  17358. return;
  17359. }
  17360. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17361. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17362. if (copyData && copyData.stageData && copyData.stageData.length) {
  17363. this.isPasteStage = true;
  17364. }
  17365. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17366. this.isPasteStage = true;
  17367. }
  17368. if (copyData && copyData.selectData.length) {
  17369. this.isPasteChoice = true;
  17370. }
  17371. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17372. this.isPasteTask = true;
  17373. }
  17374. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17375. this.isPasteTask = true;
  17376. }
  17377. },
  17378. getPaste2() {
  17379. let iframe = document.querySelectorAll(".interIframe")[0];
  17380. const turndownService = new TurndownService();
  17381. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17382. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17383. if(confirm_next_step){
  17384. this.courseText += turndownService.turndown(confirm_next_step)
  17385. iframe.contentWindow.confirm_next_step = ''
  17386. }
  17387. if(work_area_text && work_area_text.aiContent){
  17388. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17389. iframe.contentWindow.work_area_text = ''
  17390. }
  17391. },
  17392. textAreaChange(type, index){
  17393. if(type == 'courseText'){
  17394. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17395. }
  17396. if(type == 'targetCourseText2'){
  17397. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17398. }
  17399. if(type == 'taskDetail2'){
  17400. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17401. }
  17402. if(type == 'taskDetail3'){
  17403. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17404. }
  17405. },
  17406. setCourseInfo(type){
  17407. let courseInfo = ''
  17408. let sub = []
  17409. let mclass = []
  17410. if (this.courseTypeId.length) {
  17411. for (var i = 0; i < this.courseTypeId.length; i++) {
  17412. let _sid = this.courseTypeId[i]
  17413. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17414. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17415. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17416. }
  17417. }
  17418. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17419. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17420. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17421. }
  17422. }
  17423. }
  17424. }
  17425. if(this.courseName){
  17426. courseInfo = `${this.lang.ssCourseColon}${this.courseName} `
  17427. }
  17428. if(mclass.length){
  17429. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  17430. }
  17431. if(sub.length){
  17432. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  17433. }
  17434. console.log(courseInfo)
  17435. window.course_info = courseInfo
  17436. this.course_info = courseInfo
  17437. window.course_lang = this.languageSetting
  17438. },
  17439. saveCourse(){
  17440. if (this.cid == "" || this.cid == undefined) {
  17441. this.addWork();
  17442. } else {
  17443. if (this.userid != this.courseUserid && this.role != "1") {
  17444. this.updateWork2();
  17445. } else {
  17446. this.updateWork();
  17447. }
  17448. }
  17449. },
  17450. setCover($event, attempts = 0) {
  17451. var _this = this;
  17452. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17453. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17454. if (_this.cover.length || attempts >= 3) {
  17455. return;
  17456. }
  17457. _this.findMatchingContents()
  17458. _this.imageloading2 = true;
  17459. _this.ajax
  17460. .post("https://gpt.cocorobo.cn/search_image", {
  17461. page: _this.ppage,
  17462. pagesize: 9,
  17463. query: _this.courseName,
  17464. })
  17465. .then(function (response) {
  17466. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17467. if(data){
  17468. _this.cover = [];
  17469. setTimeout(() => {
  17470. _this.cover[0] = {
  17471. name: _this.lang.ssNetImgPng,
  17472. url: data[0].thumbnail,
  17473. };
  17474. _this.imgChange1(null, null, 1, null);
  17475. _this.$forceUpdate();
  17476. _this.saveCourse()
  17477. }, 0);
  17478. _this.imageloading2 = false;
  17479. }else {
  17480. _this.imageloading2 = false;
  17481. _this.setCover($event, attempts + 1);
  17482. }
  17483. })
  17484. .catch(function (error) {
  17485. _this.imageloading2 = false;
  17486. _this.setCover($event, attempts + 1);
  17487. console.log(error);
  17488. });
  17489. },
  17490. searchImage() {
  17491. var _this = this;
  17492. _this.imageList = [];
  17493. if (!_this.searchImageValue) {
  17494. _this.sysPicVisible2 = true;
  17495. return;
  17496. }
  17497. _this.imageloading = true;
  17498. _this.ajax
  17499. .post("https://gpt.cocorobo.cn/search_image", {
  17500. page: _this.ppage,
  17501. pagesize: 9,
  17502. query: _this.searchImageValue,
  17503. })
  17504. .then(function (response) {
  17505. // console.log(response.data.data);
  17506. var data = response.data.FunctionResponse.result;
  17507. for (var i = 0; i < data.length; i++) {
  17508. _this.imageList.push({ url: data[i].thumbnail });
  17509. }
  17510. _this.imageloading = false;
  17511. })
  17512. .catch(function (error) {
  17513. console.log(error);
  17514. });
  17515. _this.sysPicVisible2 = true;
  17516. },
  17517. changePicture() {
  17518. this.ppage++;
  17519. this.searchImage();
  17520. },
  17521. resetImage() {
  17522. this.ppage = 1;
  17523. this.searchImage();
  17524. },
  17525. jumpGj(i, j) {
  17526. if (i + 1 != this.isClickColor) {
  17527. this.isClickColor = i + 1;
  17528. }
  17529. var a = document.scrollingElement;
  17530. this.toolIndexType = `gj${i}${j}`;
  17531. let target = document.querySelector(`#gj${i}${j}`);
  17532. if (target) {
  17533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17534. setTimeout(() => {
  17535. target.scrollIntoView(true);
  17536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17537. j
  17538. ].isFold3 = false;
  17539. setTimeout(() => {
  17540. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17541. }, 0);
  17542. }, 0);
  17543. }
  17544. },
  17545. jumpGj2(i, j, k) {
  17546. if (this.unitIndex != k) {
  17547. if (this.panUnitJson() == 2) {
  17548. return;
  17549. }
  17550. this.unitSet(k);
  17551. }
  17552. setTimeout(() => {
  17553. if (i + 1 != this.isClickColor) {
  17554. this.isClickColor = i + 1;
  17555. }
  17556. var a = document.scrollingElement;
  17557. this.toolIndexType = `gj${i}${j}${k}`;
  17558. let target = document.querySelector(`#gj${i}${j}`);
  17559. if (target) {
  17560. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17561. setTimeout(() => {
  17562. target.scrollIntoView(true);
  17563. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17564. j
  17565. ].isFold3 = false;
  17566. setTimeout(() => {
  17567. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17568. }, 0);
  17569. }, 0);
  17570. }
  17571. }, 0);
  17572. },
  17573. dragStart(val, i, j) {
  17574. console.log(this.taskCount);
  17575. this.dragType = "drag";
  17576. this.taskCount = j;
  17577. this.oldIndex = i;
  17578. this.oldData = val;
  17579. },
  17580. dragOver(i, j) {
  17581. this.typeIndex = "chapter-" + j + "-" + i;
  17582. this.newIndex = i;
  17583. },
  17584. dragEnd() {
  17585. if (this.dragType != "drag") {
  17586. this.typeIndex = "";
  17587. this.newIndex = "";
  17588. this.dragType = "";
  17589. this.isdrag = "";
  17590. return;
  17591. }
  17592. console.log(this.taskCount);
  17593. let newItems = [
  17594. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17595. .chapterData,
  17596. ];
  17597. // 删除老的节点
  17598. newItems.splice(this.oldIndex, 1);
  17599. // 在列表中目标位置增加新的节点
  17600. newItems.splice(this.newIndex, 0, this.oldData);
  17601. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17602. this.taskCount
  17603. ].chapterData = [...newItems];
  17604. this.typeIndex = "";
  17605. this.newIndex = "";
  17606. this.dragType = "";
  17607. this.isdrag = "";
  17608. this.$forceUpdate();
  17609. },
  17610. dragTaskStart(val, i, j) {
  17611. this.dragType = "task";
  17612. this.oldIndex = i;
  17613. this.oldData = val;
  17614. this.oldUnitIndex = j;
  17615. },
  17616. dragTaskOver(i, j) {
  17617. this.typeIndex = "task-" + i;
  17618. this.newIndex = i;
  17619. this.checkUnitIndex = j;
  17620. },
  17621. async dragTaskEnd() {
  17622. if (this.dragType != "task") {
  17623. this.newIndex = "";
  17624. this.dragType = "";
  17625. this.typeIndex = "";
  17626. this.checkUnitIndex = "";
  17627. this.isdrag = "";
  17628. return;
  17629. }
  17630. if (
  17631. this.newIndex == this.oldIndex &&
  17632. this.oldUnitIndex == this.checkUnitIndex
  17633. ) {
  17634. this.newIndex = "";
  17635. this.dragType = "";
  17636. this.typeIndex = "";
  17637. this.checkUnitIndex = "";
  17638. this.isdrag = "";
  17639. return;
  17640. }
  17641. let count1 = await this.getWorksCount(
  17642. 2,
  17643. this.checkUnitIndex,
  17644. this.newIndex,
  17645. 0
  17646. );
  17647. let count2 = await this.getWorksCount(
  17648. 2,
  17649. this.oldUnitIndex,
  17650. this.oldIndex,
  17651. 0
  17652. );
  17653. if (count1 > 0 || count2 > 0) {
  17654. this.$confirm(
  17655. this.lang.ssTaskMoveAll,
  17656. this.lang.ssTip,
  17657. {
  17658. confirmButtonText: this.lang.ssConfirm,
  17659. cancelButtonText: this.lang.ssCancel,
  17660. type: "warning",
  17661. }
  17662. )
  17663. .then(() => {
  17664. if (this.oldUnitIndex != this.checkUnitIndex) {
  17665. let newItems = [
  17666. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17667. ];
  17668. // 删除老的节点
  17669. newItems.splice(this.oldIndex, 1);
  17670. // 在列表中目标位置增加新的节点
  17671. let newItems2 = [
  17672. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17673. ];
  17674. newItems2.splice(this.newIndex, 0, this.oldData);
  17675. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17676. ...newItems,
  17677. ];
  17678. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17679. ...newItems2,
  17680. ];
  17681. } else {
  17682. let newItems = [
  17683. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17684. ];
  17685. let chapterData = []
  17686. if (this.oldIndex == 0) {
  17687. chapterData = newItems[this.oldIndex].chapterData
  17688. newItems[this.oldIndex].chapterData = []
  17689. } else if (this.newIndex == 0) {
  17690. chapterData = newItems[this.newIndex].chapterData
  17691. newItems[this.oldIndex].chapterData = []
  17692. }
  17693. // 删除老的节点
  17694. newItems.splice(this.oldIndex, 1);
  17695. // 在列表中目标位置增加新的节点
  17696. newItems.splice(this.newIndex, 0, this.oldData);
  17697. if (this.oldIndex == 0 || this.newIndex == 0) {
  17698. newItems[0].chapterData = chapterData
  17699. }
  17700. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17701. ...newItems,
  17702. ];
  17703. }
  17704. this.moveWork(2, this.checkUnitIndex, this.newIndex, 0, this.oldUnitIndex, this.oldIndex, 0);
  17705. this.typeIndex = "";
  17706. this.newIndex = "";
  17707. this.dragType = "";
  17708. this.checkUnitIndex = "";
  17709. this.isdrag = "";
  17710. this.updateWork();
  17711. this.$forceUpdate();
  17712. })
  17713. .catch(() => {
  17714. this.newIndex = "";
  17715. this.dragType = "";
  17716. this.typeIndex = "";
  17717. this.checkUnitIndex = "";
  17718. this.isdrag = "";
  17719. return;
  17720. });
  17721. } else {
  17722. if (this.oldUnitIndex != this.checkUnitIndex) {
  17723. let newItems = [
  17724. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17725. ];
  17726. // 删除老的节点
  17727. newItems.splice(this.oldIndex, 1);
  17728. // 在列表中目标位置增加新的节点
  17729. let newItems2 = [
  17730. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17731. ];
  17732. newItems2.splice(this.newIndex, 0, this.oldData);
  17733. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17734. ...newItems,
  17735. ];
  17736. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17737. ...newItems2,
  17738. ];
  17739. } else {
  17740. let newItems = [
  17741. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17742. ];
  17743. let chapterData = []
  17744. if (this.oldIndex == 0) {
  17745. chapterData = newItems[this.oldIndex].chapterData
  17746. newItems[this.oldIndex].chapterData = []
  17747. } else if (this.newIndex == 0) {
  17748. chapterData = newItems[this.newIndex].chapterData
  17749. newItems[this.oldIndex].chapterData = []
  17750. }
  17751. // 删除老的节点
  17752. newItems.splice(this.oldIndex, 1);
  17753. // 在列表中目标位置增加新的节点
  17754. newItems.splice(this.newIndex, 0, this.oldData);
  17755. if (this.oldIndex == 0 || this.newIndex == 0) {
  17756. newItems[0].chapterData = chapterData
  17757. }
  17758. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17759. ...newItems,
  17760. ];
  17761. }
  17762. this.typeIndex = "";
  17763. this.newIndex = "";
  17764. this.dragType = "";
  17765. this.checkUnitIndex = "";
  17766. this.isdrag = "";
  17767. this.updateWork();
  17768. this.$forceUpdate();
  17769. }
  17770. },
  17771. dragUnitStart(val, i) {
  17772. this.dragType = "Unit";
  17773. this.oldIndex = i;
  17774. this.oldData = val;
  17775. },
  17776. dragUnitOver(i) {
  17777. this.typeIndex = "Unit-" + i;
  17778. this.newIndex = i;
  17779. console.log(i, this.unitJson[i].toolOpen);
  17780. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17781. this.unitJson[i].toolOpen = true;
  17782. this.updateWork();
  17783. this.$forceUpdate();
  17784. }
  17785. },
  17786. async dragUnitEnd() {
  17787. if (this.dragType != "Unit") {
  17788. this.newIndex = "";
  17789. this.dragType = "";
  17790. this.typeIndex = "";
  17791. this.isdrag = "";
  17792. return;
  17793. }
  17794. if (this.newIndex == this.oldIndex) {
  17795. this.newIndex = "";
  17796. this.dragType = "";
  17797. this.typeIndex = "";
  17798. this.isdrag = "";
  17799. return;
  17800. }
  17801. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17802. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17803. console.log(count1, count2);
  17804. if (count1 > 0 || count2 > 0) {
  17805. this.$confirm(
  17806. this.lang.ssStageMove,
  17807. this.lang.ssTip,
  17808. {
  17809. confirmButtonText: this.lang.ssConfirm,
  17810. cancelButtonText: this.lang.ssCancel,
  17811. type: "warning",
  17812. }
  17813. )
  17814. .then(() => {
  17815. let newItems = [...this.unitJson];
  17816. // 删除老的节点
  17817. newItems.splice(this.oldIndex, 1);
  17818. // 在列表中目标位置增加新的节点
  17819. newItems.splice(this.newIndex, 0, this.oldData);
  17820. this.unitJson = [...newItems];
  17821. this.moveWork(1, this.newIndex, 0, 0, this.oldIndex, 0, 0);
  17822. this.typeIndex = "";
  17823. this.newIndex = "";
  17824. this.dragType = "";
  17825. this.isdrag = "";
  17826. this.updateWork();
  17827. this.$forceUpdate();
  17828. })
  17829. .catch(() => {
  17830. this.newIndex = "";
  17831. this.dragType = "";
  17832. this.typeIndex = "";
  17833. this.isdrag = "";
  17834. return;
  17835. });
  17836. } else {
  17837. let newItems = [...this.unitJson];
  17838. // 删除老的节点
  17839. newItems.splice(this.oldIndex, 1);
  17840. // 在列表中目标位置增加新的节点
  17841. newItems.splice(this.newIndex, 0, this.oldData);
  17842. this.unitJson = [...newItems];
  17843. this.typeIndex = "";
  17844. this.newIndex = "";
  17845. this.dragType = "";
  17846. this.isdrag = "";
  17847. this.updateWork();
  17848. this.$forceUpdate();
  17849. }
  17850. },
  17851. getWorksCount(type, stage, task, tool) {
  17852. return new Promise((resolve, reject) => {
  17853. let params = [
  17854. {
  17855. cid: this.cid,
  17856. stage: stage,
  17857. task: task,
  17858. tool: tool,
  17859. type: type,
  17860. },
  17861. ];
  17862. this.ajax
  17863. .post(this.$store.state.api + "getCourseWorkCount", params)
  17864. .then((res) => {
  17865. let count = res.data[0][0].count;
  17866. resolve(count);
  17867. })
  17868. .catch((err) => {
  17869. resolve(0);
  17870. this.$message.error(this.lang.ssNetPoor);
  17871. console.error(err);
  17872. });
  17873. });
  17874. },
  17875. moveWork(type, nstage, ntask, ntool, ostage, otask, otool) {
  17876. // type: int 类型
  17877. // nstage, ntask, ntool: 新目标位置(目标单元/任务/工具)
  17878. // ostage, otask, otool: 原始位置
  17879. // this.cid 课程id
  17880. let params = [
  17881. {
  17882. cid: this.cid,
  17883. nstage: nstage,
  17884. ntask: ntask,
  17885. ntool: ntool,
  17886. type: type,
  17887. ostage: ostage,
  17888. otask: otask,
  17889. otool: otool
  17890. }
  17891. ];
  17892. return this.ajax
  17893. .post(this.$store.state.api + "moveCourseWork", params)
  17894. .then(res => {
  17895. console.log(res);
  17896. })
  17897. .catch(err => {
  17898. console.error(this.lang.ssMoveFail);
  17899. console.error(err);
  17900. throw err;
  17901. });
  17902. },
  17903. getTwoType(id) {
  17904. this.twoJson = [];
  17905. var array = this.CourseTypeJson1[
  17906. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17907. ].filter((e) => {
  17908. return e.ppid == id;
  17909. });
  17910. this.twoJson = array;
  17911. this.$forceUpdate();
  17912. },
  17913. ctype() {
  17914. this.oneJson =
  17915. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17916. },
  17917. selectAllType1() {
  17918. this.CourseType1 = [];
  17919. this.CourseTypeJson1 = {};
  17920. this.courseTypeId1 = {};
  17921. this.$forceUpdate();
  17922. let params = {
  17923. org: this.org && this.org != "" ? this.org : "",
  17924. oid: this.oid && this.oid != "" ? this.oid : "",
  17925. };
  17926. this.ajax
  17927. .get(this.$store.state.api + "selectAllEvaType", params)
  17928. .then((res) => {
  17929. this.CourseType1 = res.data;
  17930. for (var i = 0; i < res.data[0].length; i++) {
  17931. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17932. res.data[0][i].name = this.lang.ssLevel1;
  17933. } else if (
  17934. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17935. ) {
  17936. res.data[0][i].name = this.lang.ssLevel2;
  17937. }
  17938. if (!this.cid) {
  17939. this.courseTypeId1[res.data[0][i].id] = [];
  17940. }
  17941. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17942. this.CourseTypeJson1[res.data[0][i].id] = [];
  17943. }
  17944. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17945. for (var j = 0; j < res.data[1].length; j++) {
  17946. if (res.data[0][i].id == res.data[1][j].pid) {
  17947. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17948. }
  17949. }
  17950. // } else {
  17951. if (res.data[2].length > 0) {
  17952. for (var j = 0; j < res.data[2].length; j++) {
  17953. if (res.data[0][i].id == res.data[2][j].pid) {
  17954. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17955. }
  17956. }
  17957. }
  17958. if (res.data[3].length > 0) {
  17959. for (var j = 0; j < res.data[3].length; j++) {
  17960. if (res.data[0][i].id == res.data[3][j].pid) {
  17961. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17962. }
  17963. }
  17964. }
  17965. // }
  17966. }
  17967. this.ctype();
  17968. this.cetBoxDialog = true;
  17969. })
  17970. .catch((err) => {
  17971. console.error(err);
  17972. });
  17973. },
  17974. allEvaCan() {
  17975. if (this.taskLoading.length) {
  17976. let _pan = 1
  17977. for (var k = 0; k < this.taskLoading.length; k++) {
  17978. if (this.taskLoading[k]) {
  17979. this.$message({
  17980. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  17981. type: "warning"
  17982. });
  17983. _pan = 2
  17984. }
  17985. }
  17986. if (_pan == 2) {
  17987. return
  17988. }
  17989. }
  17990. if (this.taskGLoading.length) {
  17991. let _pan = 1
  17992. for (var k = 0; k < this.taskGLoading.length; k++) {
  17993. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17994. this.$message({
  17995. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  17996. type: "warning"
  17997. });
  17998. _pan = 2
  17999. }
  18000. }
  18001. if (_pan == 2) {
  18002. return
  18003. }
  18004. }
  18005. this.$confirm(this.lang.ssGenAllEvaSet, this.lang.ssTip, {
  18006. confirmButtonText: this.lang.ssConfirm,
  18007. cancelButtonText: this.lang.ssCancel,
  18008. type: "warning",
  18009. customClass: 'custom-confirm-box'
  18010. })
  18011. .then(() => {
  18012. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18013. for (var index = 0; index < taskJson.length; index++) {
  18014. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18015. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18016. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18017. }
  18018. }
  18019. }
  18020. })
  18021. .catch(() => {
  18022. });
  18023. setTimeout(() => {
  18024. this.setTipsIndex()
  18025. }, 500)
  18026. },
  18027. allEvaCan2(index) {
  18028. if (this.taskLoading.length) {
  18029. let _pan = 1
  18030. for (var k = 0; k < this.taskLoading.length; k++) {
  18031. if (this.taskLoading[k]) {
  18032. this.$message({
  18033. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18034. type: "warning"
  18035. });
  18036. _pan = 2
  18037. }
  18038. }
  18039. if (_pan == 2) {
  18040. return
  18041. }
  18042. }
  18043. if (this.taskGLoading.length) {
  18044. let _pan = 1
  18045. for (var k = 0; k < this.taskGLoading.length; k++) {
  18046. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  18047. this.$message({
  18048. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18049. type: "warning"
  18050. });
  18051. _pan = 2
  18052. }
  18053. }
  18054. if (_pan == 2) {
  18055. return
  18056. }
  18057. }
  18058. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18059. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18060. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18061. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18062. }
  18063. }
  18064. this.$message({
  18065. message: this.lang.ssExecSucc,
  18066. type: "success"
  18067. });
  18068. },
  18069. setAiJson(pan,string,string2,string3){
  18070. if(pan == 'aiTeacher2'){
  18071. this.aiJson['teacherDetail2'] = string
  18072. }else if(pan == 'aiRateRuleA'){
  18073. this.aiJson['aiRateRule'] = string
  18074. }else if(pan == 'aiOutline2'){
  18075. this.aiJson['aiOutlineTask'] = string
  18076. this.aiJson['aiOutlineDetail'] = string2
  18077. }else if(pan == 'aiTeacher3'){
  18078. this.aiJson['aiCpoteTask'] = string
  18079. this.aiJson['teacherDetail2'] = string2
  18080. }else if(pan == 'aiTask2'){
  18081. this.aiJson['aiTask'] = string
  18082. }else if(pan == 'aiTask3'){
  18083. this.aiJson['aiTaskG1'] = string
  18084. this.aiJson['aiTaskG2'] = string2
  18085. this.aiJson['aiTaskG3'] = string3
  18086. }else if(pan == 'aiteacherTextDetail'){
  18087. this.aiJson['aiAbstract'] = string
  18088. }else if(pan == 'aitargetTextDetail'){
  18089. this.aiJson['aiTarget'] = string
  18090. }else if(pan == 'aitargetTextDetail2'){
  18091. this.aiJson['aiTarget2'] = string
  18092. }else if(pan == 'aitargetTextDetail3'){
  18093. this.aiJson['aiTargetGet'] = string
  18094. this.aiJson['aiTarget2'] = string2
  18095. }else {
  18096. this.aiJson[pan] = string
  18097. }
  18098. this.aiText2 = ''
  18099. this.aiText3 = ''
  18100. this.$forceUpdate();
  18101. },
  18102. editTask3(index){
  18103. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  18104. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  18105. }else {
  18106. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  18107. }
  18108. setTimeout(() => {
  18109. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  18110. setTimeout(() => {
  18111. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  18112. }, 0);
  18113. }, 100);
  18114. this.$forceUpdate();
  18115. },
  18116. editTask2(index){
  18117. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  18118. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  18119. }else {
  18120. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  18121. }
  18122. setTimeout(() => {
  18123. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  18124. setTimeout(() => {
  18125. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  18126. }, 0);
  18127. }, 100);
  18128. this.$forceUpdate();
  18129. },
  18130. openRule(i, k){
  18131. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  18132. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  18133. }else {
  18134. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  18135. }
  18136. setTimeout(() => {
  18137. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  18138. setTimeout(() => {
  18139. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  18140. }, 0);
  18141. }, 200);
  18142. this.$forceUpdate();
  18143. },
  18144. editCpote(index){
  18145. if(this.cpote[index]){
  18146. this.cpote[index] = false
  18147. }else {
  18148. this.cpote[index] = true
  18149. }
  18150. setTimeout(() => {
  18151. this.cpote[index.replace('s','')] += "*0*%*";
  18152. setTimeout(() => {
  18153. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  18154. }, 0);
  18155. }, 100);
  18156. this.$forceUpdate();
  18157. },
  18158. clickGenTT(){
  18159. if(!this.teacherInfoData.length){
  18160. this.$message.error(this.lang.ssPlsUpPlan);
  18161. return;
  18162. }
  18163. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  18164. this.openAiDialog(2, 'aiteacherTextDetail',1)
  18165. setTimeout(() => {
  18166. this.openAiDialog(2, 'aitargetTextDetail',1)
  18167. }, 500);
  18168. },
  18169. async getUserName() {
  18170. let params = { uid: this.userid };
  18171. try {
  18172. let res = await this.ajax.get(
  18173. this.$store.state.api + "getUser",
  18174. params
  18175. );
  18176. return res.data[0][0].name;
  18177. } catch (err) {
  18178. console.error(err);
  18179. }
  18180. },
  18181. getCGN(type){
  18182. let sub = [] //学科
  18183. let mclass = [] //年纪
  18184. let theme = []
  18185. if (this.courseTypeId.length) {
  18186. for (var i = 0; i < this.courseTypeId.length; i++) {
  18187. let _sid = this.courseTypeId[i]
  18188. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18189. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18190. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18191. }
  18192. }
  18193. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18194. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18195. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18196. }
  18197. }
  18198. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18199. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  18200. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  18201. }
  18202. }
  18203. }
  18204. if(type == 1){
  18205. return sub.join(",")
  18206. }else if(type == 2){
  18207. return mclass.join(",")
  18208. }else if(type == 3){
  18209. return theme.join(",")
  18210. }
  18211. }
  18212. },
  18213. async exportTeachPlan(){
  18214. this.loading = true
  18215. const zip = new JSZip();
  18216. let md = new MarkdownIt();
  18217. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18218. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18219. let String = ''
  18220. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18221. String += `<h2>${this.lang.ssCourseBasic}</h2>`
  18222. String += `<div><strong>${this.lang.ssDesigner}</strong><span>${await this.getUserName()}</span></div>`
  18223. String += `<div><strong>${this.lang.ssGradeColon}</strong><span></span>${this.getCGN(2)}</div>`
  18224. String += `<div><strong>${this.lang.ssThemeColon}</strong><span></span>${this.getCGN(3)}</div>`
  18225. String += `<div><strong>${this.lang.ssSubjColon}</strong><span></span>${this.getCGN(1)}</div>`
  18226. if(courseText){
  18227. String += `<h2>${this.lang.ssCourseOver}</h2>`
  18228. String += md.render(courseText)
  18229. }
  18230. if(target){
  18231. String += `<h2>${this.lang.ssCourseObj}</h2>`
  18232. String += md.render(target)
  18233. }
  18234. String += `<h2>${this.lang.ssCoursePlan}</h2>`
  18235. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18236. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18237. // let name = _task.task+'-教案'
  18238. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18239. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18240. await this.generate(name, _html, i)
  18241. }
  18242. String += `<h3>${this.lang.ssTaskNum.replace(/\*/g, i+1)}</h3>`
  18243. String += `<h4>${_task.task}</h4>`
  18244. String += _html
  18245. // let file = await this.generateExport(name, _html, i)
  18246. // zip.file(`${name}.docx`, file, { binary: true })
  18247. }
  18248. await this.generateExport(this.courseName, String, i)
  18249. setTimeout(() => {
  18250. this.loading = false
  18251. }, 2000);
  18252. // zip.generateAsync({ type: "blob" }).then((content) => {
  18253. // // 生成二进制流
  18254. // saveAs(
  18255. // content,
  18256. // this.courseName + "-" + "教案.zip"
  18257. // ); // 利用file-saver保存文件 自定义文件名
  18258. // setTimeout(() => {
  18259. // this.loading = false
  18260. // // if(!this.cid){
  18261. // // this.addWork(3)
  18262. // // }else{
  18263. // // this.updateWork();
  18264. // // this.steps = 4;
  18265. // // }
  18266. // }, 2000);
  18267. // });
  18268. },
  18269. async exportTaskEA(){
  18270. this.loading = true
  18271. const zip = new JSZip();
  18272. let md = new MarkdownIt();
  18273. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18274. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18275. for(var j = 0; j < _task.chapterData.length; j++){
  18276. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18277. let file = await getFile(_task.chapterData[j].url)
  18278. if (file.data != 1) {
  18279. // 下载文件, 并存成ArrayBuffer对象
  18280. const file_name = _task.chapterData[j].name; // 获取文件名
  18281. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18282. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18283. // 判断是否有重复的文件名字
  18284. if (!zip.file(file_name)) {
  18285. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18286. } else {
  18287. // 如果有重复的文件名,则在文件名后添加序号
  18288. let count = 1;
  18289. let newFileName = fileNameWithoutExt;
  18290. while (zip.file(`${newFileName}.${fileExt}`)) {
  18291. newFileName = `${fileNameWithoutExt}(${count})`;
  18292. count++;
  18293. }
  18294. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18295. }
  18296. }
  18297. }
  18298. }
  18299. for(var j = 0; j < _task.toolChoose.length; j++){
  18300. let tool = _task.toolChoose[j]
  18301. if(tool.eList && tool.eList.length){
  18302. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18303. tool.eList.forEach(item => {
  18304. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18305. });
  18306. let html = md.render(tableContent);
  18307. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18308. let file = await this.generateExport2(name, html, i)
  18309. zip.file(`${name}`, file, { binary: true })
  18310. }
  18311. }
  18312. // let file = await this.generateExport(name, _html, i)
  18313. // zip.file(`${name}.docx`, file, { binary: true })
  18314. }
  18315. zip.generateAsync({ type: "blob" }).then((content) => {
  18316. // 生成二进制流
  18317. saveAs(
  18318. content,
  18319. this.courseName + "-" + this.lang.ssEvaDegreeZip
  18320. ); // 利用file-saver保存文件 自定义文件名
  18321. setTimeout(() => {
  18322. this.loading = false
  18323. }, 2000);
  18324. });
  18325. },
  18326. async downloadFile(item){
  18327. let data = await getFile(item.url)
  18328. let file = new File([data.data], item.name);
  18329. saveAs(file, item.name);
  18330. },
  18331. async addAppendixEva(i, j){
  18332. let md = new MarkdownIt();
  18333. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18334. if(tool.eList && tool.eList.length){
  18335. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18336. tool.eList.forEach(item => {
  18337. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18338. });
  18339. let html = md.render(tableContent);
  18340. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18341. let file = await this.generateExport2(name, html, i)
  18342. this.beforeUploadHtml(file, 0, "", 2)
  18343. }
  18344. },
  18345. clickGenTT2(){
  18346. if (this.courseName == "") {
  18347. this.$message.error(this.lang.ssFillCourseName);
  18348. return;
  18349. }
  18350. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18351. let functionA = ''
  18352. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18353. // setTimeout(() => {
  18354. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18355. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18356. // }, 500);
  18357. functionA = ()=>{
  18358. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18359. }
  18360. }
  18361. this.openAiDialog(2, 'aiDetail',1, functionA)
  18362. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18363. // setTimeout(() => {
  18364. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18365. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18366. // }, 500);
  18367. }
  18368. this.courseTextBool = true
  18369. },
  18370. changeIsuseT(){
  18371. if(this.isuseT == 1){
  18372. this.courseTextB = false
  18373. }else if(this.isuseT == 2){
  18374. navigator.mediaDevices.getUserMedia({ audio: true })
  18375. .then(stream => {
  18376. console.log('获取录音权限成功');
  18377. })
  18378. .catch(err => {
  18379. this.$message.error(this.lang.ssRecordFail)
  18380. console.error('获取录音权限失败:', err);
  18381. });
  18382. }else{
  18383. if(this.courseText){
  18384. this.courseTextB = false
  18385. }else{
  18386. this.courseTextB = true
  18387. }
  18388. }
  18389. this.interSetting = false
  18390. this.interPan = true
  18391. },
  18392. changeLang(){
  18393. window.course_lang = this.languageSetting
  18394. },
  18395. openInterPanSetting(){
  18396. this.interSetting = !this.interSetting
  18397. if(this.interSetting){
  18398. if(this.istemplate == 1){
  18399. this.agentid = this.aiJson.agentid
  18400. }else {
  18401. this.agentid = this.aiJson.sagentid
  18402. }
  18403. }else {
  18404. this.agentid = ''
  18405. }
  18406. },
  18407. openInterPanSetting2(){
  18408. this.interSetting = !this.interSetting
  18409. if(this.interSetting){
  18410. this.r_agentid = this.aiJson.recordAgentid
  18411. }else {
  18412. this.r_agentid = ''
  18413. }
  18414. },
  18415. setAgentid(){
  18416. if(!this.agentid.trim()){
  18417. this.$message.error(this.lang.ssPlsWorkflow)
  18418. return;
  18419. }
  18420. if(this.istemplate == 1){
  18421. this.aiJson.agentid = this.agentid.trim()
  18422. }else {
  18423. this.aiJson.sagentid = this.agentid.trim()
  18424. }
  18425. this.interFlash = false
  18426. setTimeout(() => {
  18427. this.interFlash = true
  18428. }, 100);
  18429. this.interSetting = false
  18430. },
  18431. setAgentid2(){
  18432. if(!this.r_agentid.trim()){
  18433. this.$message.error(this.lang.ssPlsWorkflow)
  18434. return;
  18435. }
  18436. this.aiJson.recordAgentid = this.r_agentid.trim()
  18437. this.interSetting = false
  18438. },
  18439. rebuildAgentid(){
  18440. this.aiJson.sagentid = ''
  18441. this.interFlash = false
  18442. setTimeout(() => {
  18443. this.interFlash = true
  18444. }, 100);
  18445. this.interSetting = false
  18446. },
  18447. cancelInterSetting(){
  18448. this.agentid = ''
  18449. this.interSetting = false
  18450. },
  18451. cancelInterSetting2(){
  18452. this.r_agentid = ''
  18453. this.interSetting = false
  18454. },
  18455. openAiDialog2(clickType, type, callback, index, tindex){
  18456. if (this.taskLoading.length) {
  18457. let _pan = 1
  18458. for(var k = 0; k < this.taskLoading.length; k++){
  18459. if(this.taskLoading[k]){
  18460. this.$message({
  18461. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18462. type: "warning"
  18463. });
  18464. _pan = 2
  18465. }
  18466. }
  18467. if(_pan == 2){
  18468. return
  18469. }
  18470. }
  18471. if(this.taskGLoading.length){
  18472. let _pan = 1
  18473. for(var k = 0; k < this.taskGLoading.length; k++){
  18474. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18475. this.$message({
  18476. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18477. type: "warning"
  18478. });
  18479. _pan = 2
  18480. }
  18481. }
  18482. if(_pan == 2){
  18483. return
  18484. }
  18485. }
  18486. let pan2 = 1
  18487. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18488. for(var _index = 0; _index < taskJson.length; _index++){
  18489. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18490. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18491. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18492. this.$message({
  18493. message: this.lang.ssWaitTaskCont.replace(/\*/g, _index+1),
  18494. type: "warning"
  18495. });
  18496. pan2 = 2
  18497. }
  18498. }
  18499. }
  18500. }
  18501. if(pan2 == 2){
  18502. return
  18503. }
  18504. this.$confirm(this.lang.ssRegenAffect, this.lang.ssTip, {
  18505. confirmButtonText: this.lang.ssConfirm,
  18506. cancelButtonText: this.lang.ssCancel,
  18507. type: "warning",
  18508. customClass: 'custom-confirm-box'
  18509. })
  18510. .then(() => {
  18511. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18512. // this.openAiDialog(clickType, 'aiTeacher')
  18513. // }else {
  18514. this.openAiDialog(clickType, type, callback, index, tindex)
  18515. // }
  18516. })
  18517. .catch(() => {
  18518. });
  18519. setTimeout(() => {
  18520. this.setTipsIndex()
  18521. }, 500)
  18522. },
  18523. async openAiDialog(clickType, type, callback, index, tindex) {
  18524. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18525. fileid = [...fileid]
  18526. if (this.infoData.length) {
  18527. for (var i = 0; i < this.infoData.length; i++) {
  18528. if(this.infoData[i].fileid){
  18529. fileid.push(this.infoData[i].fileid)
  18530. }else {
  18531. let _fileid = await this.createFileid(this.infoData[i].url)
  18532. if(_fileid){
  18533. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18534. this.$forceUpdate();
  18535. if(_fileid != 1){
  18536. fileid.push(_fileid)
  18537. }
  18538. }
  18539. }
  18540. }
  18541. }
  18542. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18543. if(fileid.length > 30){
  18544. this.$message.error(this.lang.ssFileLimit30)
  18545. return;
  18546. }
  18547. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18548. this.$message.error(this.lang.ssNoPermTip);
  18549. return;
  18550. }
  18551. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18552. this.$message.error(this.lang.ssPlsUpPlan);
  18553. return;
  18554. }
  18555. if (this.courseName == "") {
  18556. this.$message.error(this.lang.ssFillCourseName);
  18557. return;
  18558. }
  18559. this.aiText2 = ''
  18560. this.clickType = clickType
  18561. let sub = []
  18562. if (this.courseTypeId.length) {
  18563. for (var i = 0; i < this.courseTypeId.length; i++) {
  18564. let _sid = this.courseTypeId[i]
  18565. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18566. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18567. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18568. }
  18569. }
  18570. }
  18571. }
  18572. let mclass = []
  18573. if (this.courseTypeId.length) {
  18574. for (var i = 0; i < this.courseTypeId.length; i++) {
  18575. let _sid = this.courseTypeId[i]
  18576. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18577. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18578. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18579. }
  18580. }
  18581. }
  18582. }
  18583. if (type == "aiDetail") {
  18584. if (this.ttextLoading) {
  18585. this.$message({
  18586. message: this.lang.ssPlsAnswer,
  18587. type: "warning"
  18588. });
  18589. return;
  18590. }
  18591. this.aitype = "aiDetail"
  18592. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18593. this.aiText = this.aiJson.aiDetail
  18594. this.aiCallBack = [callback, index]
  18595. } else if (type == "aiOutline") {
  18596. this.aitype = "aiOutline"
  18597. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18598. this.aiText = this.aiJson.aiOutline
  18599. } else if (type == "aiOutline2") {
  18600. this.aitype = "aiOutline2"
  18601. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18602. this.aiText = this.aiJson.aiOutlineTask
  18603. this.aiText2 = this.aiJson.aiOutlineDetail
  18604. } else if (type == "aiOutlineDetail2") {
  18605. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18606. this.$message({
  18607. message: this.lang.ssPlsAnswer,
  18608. type: "warning"
  18609. });
  18610. return;
  18611. }
  18612. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18613. this.$message.error(this.lang.ssEnterTask)
  18614. return;
  18615. }
  18616. this.aitype = type
  18617. this.aiCallBack = callback
  18618. this.aiText = this.aiJson.aiOutlineDetail2
  18619. } else if (type == "aiTask") {
  18620. this.aitype = "aiTask"
  18621. var _text = ""
  18622. for (var i = 0; i < this.teacherText.length; i++) {
  18623. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18624. }
  18625. // this.aiText = `请根据${_text}。`
  18626. this.aiText = this.aiJson.aiTask
  18627. this.aiCallBack = callback
  18628. } else if (type == "aiTask2") {
  18629. if (this.taskLoading[callback]) {
  18630. this.$message({
  18631. message: this.lang.ssPlsAnswer,
  18632. type: "warning"
  18633. });
  18634. return;
  18635. }
  18636. this.aitype = "aiTask2"
  18637. this.aiText = this.aiJson.aiTask
  18638. this.aiCallBack = [callback, index]
  18639. } else if (type == "aiTask3") {
  18640. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18641. this.$message({
  18642. message: this.lang.ssPlsAnswer,
  18643. type: "warning"
  18644. });
  18645. return;
  18646. }
  18647. this.aitype = type
  18648. this.aiText = this.aiJson.aiTaskG1
  18649. this.aiText2 = this.aiJson.aiTaskG2
  18650. this.aiText3 = this.aiJson.aiTaskG3
  18651. this.aiCallBack = [callback, index]
  18652. } else if (type == "aiTaskG3") {
  18653. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][2])) {
  18654. this.$message({
  18655. message: this.lang.ssPlsAnswer,
  18656. type: "warning"
  18657. });
  18658. return;
  18659. }
  18660. this.aitype = type
  18661. this.aiText = this.aiJson.aiTaskG3
  18662. this.aiCallBack = callback
  18663. } else if (type == "aiTaskG2") {
  18664. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][1])) {
  18665. this.$message({
  18666. message: this.lang.ssPlsAnswer,
  18667. type: "warning"
  18668. });
  18669. return;
  18670. }
  18671. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18672. this.$message({
  18673. message: this.lang.ssGenTaskPlan.replace(/\*/g, callback),
  18674. type: "warning"
  18675. });
  18676. return;
  18677. }
  18678. this.aitype = type
  18679. this.aiText = this.aiJson.aiTaskG2
  18680. this.aiCallBack = callback
  18681. } else if (type == "aiDetail1") {
  18682. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18683. this.$message({
  18684. message: this.lang.ssPlsAnswer,
  18685. type: "warning"
  18686. });
  18687. return;
  18688. }
  18689. this.aitype = "aiDetail1"
  18690. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18691. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18692. this.aiText = this.aiJson.aiDetail1
  18693. this.aiCallBack = callback
  18694. this.aiIndex = index
  18695. } else if (type == "aiDetail2") {
  18696. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18697. this.$message({
  18698. message: this.lang.ssPlsAnswer,
  18699. type: "warning"
  18700. });
  18701. return;
  18702. }
  18703. this.aitype = "aiDetail2"
  18704. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18705. this.aiText = this.aiJson.aiDetail2
  18706. this.aiCallBack = callback
  18707. this.aiIndex = index
  18708. } else if (type == "aiDetail3") {
  18709. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18710. this.$message({
  18711. message: this.lang.ssPlsAnswer,
  18712. type: "warning"
  18713. });
  18714. return;
  18715. }
  18716. this.aitype = "aiDetail3"
  18717. this.aiText = this.aiJson.aiDetail3
  18718. this.aiIndex = index + '-' + tindex
  18719. } else if (type == "aiDetail4") {
  18720. var _text = ""
  18721. if(callback && callback.length){
  18722. for (var i = 0; i < callback.length; i++) {
  18723. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18724. }
  18725. }
  18726. this.aitype = "aiDetail4"
  18727. this.aiText = this.aiJson.aiDetail4
  18728. this.aiIndex = index
  18729. } else if (type == "aiTeacher") {
  18730. this.aitype = "aiTeacher"
  18731. var _text = ""
  18732. for (var i = 0; i < this.dArray.length; i++) {
  18733. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18734. }
  18735. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18736. this.aiText = this.aiJson.aiTeacher
  18737. this.aiCallBack = callback
  18738. } else if (type == "aiTeacher2") {
  18739. if(this.ttaskDetailLoading5.length){
  18740. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18741. this.$message({
  18742. message: this.lang.ssPlanTaskNotGen.replace(/\*/g, num),
  18743. type: "warning"
  18744. });
  18745. return
  18746. }
  18747. this.aitype = "aiTeacher2"
  18748. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18749. } else if (type == "aiTeacher3") {
  18750. this.aitype = type
  18751. this.aiText = this.aiJson.aiCpoteTask
  18752. this.aiText2 = this.aiJson.teacherDetail2
  18753. } else if (type == "teacherDetail") {
  18754. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18755. this.$message({
  18756. message: this.lang.ssPlsAnswer,
  18757. type: "warning"
  18758. });
  18759. return;
  18760. }
  18761. this.aitype = "teacherDetail"
  18762. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18763. this.aiText = this.aiJson.teacherDetail
  18764. this.aiCallBack = callback
  18765. this.aiIndex = index
  18766. } else if (type == "teacherDetail2") {
  18767. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18768. this.$message.error(this.lang.ssEnterTask)
  18769. return;
  18770. }
  18771. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18772. // this.$message({
  18773. // message: "请回答完毕后再次发送",
  18774. // type: "warning"
  18775. // });
  18776. // return;
  18777. this.$confirm(this.lang.ssNotGenRegen, this.lang.ssTip, {
  18778. confirmButtonText: this.lang.ssConfirmRegen,
  18779. cancelButtonText: this.lang.ssCancel,
  18780. distinguishCancelAndClose: true,
  18781. type: "warning",
  18782. customClass: 'custom-confirm-box'
  18783. })
  18784. .then(() => {
  18785. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18786. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18787. this.isTeacherTaskCancelToken2[index] = null;
  18788. }
  18789. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18790. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18791. if(this.isTeacherTaskCancelSource[index]){
  18792. this.isTeacherTaskCancelSource[index].close()
  18793. this.isTeacherTaskCancelSource[index] = null
  18794. }
  18795. this.aitype = "teacherDetail2"
  18796. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18797. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18798. this.aiCallBack = callback
  18799. this.aiIndex = index
  18800. this.dialogVisibleAiD = true
  18801. }).catch((v) => {
  18802. console.log(v);
  18803. })
  18804. setTimeout(() => {
  18805. this.setTipsIndex()
  18806. }, 500)
  18807. return;
  18808. }else {
  18809. this.aitype = "teacherDetail2"
  18810. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18811. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18812. this.aiCallBack = callback
  18813. this.aiIndex = index
  18814. this.dialogVisibleAiD = true
  18815. }
  18816. } else if (type == "aiCpote1") {
  18817. if (this.cpotetLoading.cpote1) {
  18818. this.$message({
  18819. message: this.lang.ssPlsAnswer,
  18820. type: "warning"
  18821. });
  18822. return;
  18823. }
  18824. this.aitype = "aiCpote1"
  18825. this.aiText = this.aiJson.cpote1
  18826. this.aiCallBack = callback
  18827. } else if (type == "aiCpote2") {
  18828. if (this.cpotetLoading.cpote2) {
  18829. this.$message({
  18830. message: this.lang.ssPlsAnswer,
  18831. type: "warning"
  18832. });
  18833. return;
  18834. }
  18835. this.aitype = "aiCpote2"
  18836. this.aiText = this.aiJson.cpote2
  18837. this.aiCallBack = callback
  18838. } else if (type == "aiCpote3") {
  18839. if (this.cpotetLoading.cpote3) {
  18840. this.$message({
  18841. message: this.lang.ssPlsAnswer,
  18842. type: "warning"
  18843. });
  18844. return;
  18845. }
  18846. this.aitype = "aiCpote3"
  18847. this.aiText = this.aiJson.cpote3
  18848. this.aiCallBack = callback
  18849. } else if (type == "aiCpote4") {
  18850. if (this.cpotetLoading.cpote4) {
  18851. this.$message({
  18852. message: this.lang.ssPlsAnswer,
  18853. type: "warning"
  18854. });
  18855. return;
  18856. }
  18857. this.aitype = "aiCpote4"
  18858. this.aiText = this.aiJson.cpote4
  18859. this.aiCallBack = callback
  18860. } else if (type == 'aiteacherTextDetail'){
  18861. if (this.tteacherTextLoading) {
  18862. this.$message({
  18863. message: this.lang.ssPlsAnswer,
  18864. type: "warning"
  18865. });
  18866. return;
  18867. }
  18868. this.aitype = type
  18869. this.aiText = this.aiJson.aiAbstract
  18870. this.aiCallBack = callback
  18871. } else if (type == 'aitargetTextDetail'){
  18872. if (this.ttargetTextLoading) {
  18873. this.$message({
  18874. message: this.lang.ssPlsAnswer,
  18875. type: "warning"
  18876. });
  18877. return;
  18878. }
  18879. this.aitype = type
  18880. this.aiText = this.aiJson.aiTarget
  18881. this.aiCallBack = callback
  18882. } else if (type == 'aitargetTextDetail2'){
  18883. if (this.ttargetTextLoading2) {
  18884. this.$message({
  18885. message: this.lang.ssPlsAnswer,
  18886. type: "warning"
  18887. });
  18888. return;
  18889. }
  18890. this.aitype = type
  18891. this.aiText = this.aiJson.aiTarget2
  18892. this.aiCallBack = callback
  18893. } else if (type == 'aitargetTextDetail3'){
  18894. if (this.ttargetTextLoading2) {
  18895. this.$message({
  18896. message: this.lang.ssPlsAnswer,
  18897. type: "warning"
  18898. });
  18899. return;
  18900. }
  18901. if(!this.courseText){
  18902. this.$message.error(this.lang.ssGenDescTarget);
  18903. return;
  18904. }
  18905. this.$nextTick(() => {
  18906. const targetDiv = this.$refs.aitargetTextDetail3;
  18907. if (targetDiv) {
  18908. targetDiv.scrollIntoView();
  18909. }
  18910. });
  18911. this.aitype = type
  18912. this.aiText = this.aiJson.aiTargetGet
  18913. this.aiText2 = this.aiJson.aiTarget2
  18914. this.aiCallBack= callback
  18915. } else if (type == 'aiSearchFile'){
  18916. if(this.fileSLoading) {
  18917. this.$message({
  18918. message: this.lang.ssPlsAnswer,
  18919. type: "warning"
  18920. });
  18921. return;
  18922. }
  18923. this.aitype = type
  18924. this.aiText = this.aiJson.aiSearchFile
  18925. } else if (type == 'aiSearchFile2'){
  18926. if(this.fileSLoading) {
  18927. this.$message({
  18928. message: this.lang.ssPlsAnswer,
  18929. type: "warning"
  18930. });
  18931. return;
  18932. }
  18933. this.aitype = type
  18934. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18935. #输出样例
  18936. <学科1>:关键词
  18937. - 匹配到的内容1
  18938. - 匹配到的内容2
  18939. - 匹配到的内容3
  18940. - 匹配到的内容4
  18941. - 匹配到的内容5
  18942. <学科2>:关键词
  18943. - 匹配到的内容1
  18944. - 匹配到的内容2
  18945. - 匹配到的内容3
  18946. - 匹配到的内容4
  18947. - 匹配到的内容5
  18948. ...
  18949. <学科n>:关键词
  18950. - 匹配到的内容1
  18951. - 匹配到的内容2
  18952. - 匹配到的内容3
  18953. - 匹配到的内容4
  18954. - 匹配到的内容5
  18955. `
  18956. } else if (type == 'aiRateRule'){
  18957. this.aitype = type
  18958. this.aiText = this.aiJson.aiRateRule
  18959. this.aiCallBack = [callback, index]
  18960. } else if (type == 'aiRateRuleA'){
  18961. this.$confirm(this.lang.ssGenAllDim, this.lang.ssTip, {
  18962. confirmButtonText: this.lang.ssGenAll,
  18963. cancelButtonText: this.lang.ssGenThisTask,
  18964. distinguishCancelAndClose: true,
  18965. type: "warning",
  18966. })
  18967. .then(() => {
  18968. this.aitype = type
  18969. this.aiText = this.aiJson.aiRateRule
  18970. this.aiCallBack = [1,callback]
  18971. this.dialogVisibleAiD = true
  18972. }).catch((v) => {
  18973. console.log(v);
  18974. if (v == "cancel") {
  18975. this.aitype = type
  18976. this.aiText = this.aiJson.aiRateRule
  18977. this.aiCallBack = [2,callback]
  18978. this.dialogVisibleAiD = true
  18979. }
  18980. })
  18981. }
  18982. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18983. this.dialogVisibleAiD = true
  18984. }
  18985. },
  18986. async aiConfirm(msg,msg2,msg3) {
  18987. let sub = []
  18988. if (this.courseTypeId.length) {
  18989. for (var i = 0; i < this.courseTypeId.length; i++) {
  18990. let _sid = this.courseTypeId[i]
  18991. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18992. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18993. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18994. }
  18995. }
  18996. }
  18997. }
  18998. let mclass = []
  18999. if (this.courseTypeId.length) {
  19000. for (var i = 0; i < this.courseTypeId.length; i++) {
  19001. let _sid = this.courseTypeId[i]
  19002. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19003. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19004. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19005. }
  19006. }
  19007. }
  19008. }
  19009. let url = []
  19010. if (this.infoData.length) {
  19011. for (var i = 0; i < this.infoData.length; i++) {
  19012. url.push(this.infoData[i].url)
  19013. }
  19014. }
  19015. if (this.aitype == "aiDetail") {
  19016. this.detailYou(msg)
  19017. } else if (this.aitype == "aiOutline") {
  19018. this.loading = true
  19019. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19020. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19021. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  19022. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19023. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19024. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19025. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19026. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19027. if(this.languageSetting == 2){
  19028. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19029. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19030. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19031. }
  19032. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  19033. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19034. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19035. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19036. let message = `NOTICE
  19037. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19038. Output: Provide your output in json format.
  19039. Language: ${this.getLang()}
  19040. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19041. Instruction: Based on the context, follow "Format example", write content.
  19042. # Context
  19043. ## 要求
  19044. ${msg} 以及##参考资料
  19045. ## 参考资料
  19046. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19047. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19048. detail至少输出300tokens,markdown格式输出。
  19049. detail包含子教学目标、过程性成果、子评价标准
  19050. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19051. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19052. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19053. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  19054. # Format example`
  19055. message = message.replaceAll('\n', ' ')
  19056. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  19057. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  19058. // detail输出不要输出成json,文本或者markdown都可以
  19059. this.aiGet2(message, () => {
  19060. this.loading = false
  19061. this.isOutline = true
  19062. })
  19063. } else if (this.aitype == "aiOutline2") {
  19064. this.loading = true
  19065. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19066. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19067. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19068. let message = `NOTICE
  19069. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19070. Language: ${this.getLang()}
  19071. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19072. Instruction: Based on the context, follow "Format example", write content.
  19073. # Context
  19074. ## 要求
  19075. ${msg} 以及##参考资料
  19076. ## 参考资料
  19077. 课程名字:${this.courseName}
  19078. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  19079. ${sub.length ? '学科:' + sub.join(",") : ''}
  19080. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19081. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19082. # Format example
  19083. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  19084. this.aiGetTask2(message, () => {
  19085. this.loading = false
  19086. this.isOutline = true
  19087. })
  19088. } else if (this.aitype == "aiOutlineDetail2") {
  19089. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  19090. } else if (this.aitype == "aiTask") {
  19091. var _text = ""
  19092. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19093. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19094. }
  19095. let message = `NOTICE
  19096. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19097. Language: ${this.getLang()}
  19098. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19099. Instruction: Based on the context, follow "Format example", write content.
  19100. # Context
  19101. ## 要求
  19102. ${msg} 为**每个教学任务分别输出**以下内容。
  19103.  
  19104. ${(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','') : ''}
  19105. ## 参考资料
  19106. 教学任务教案:${_text}
  19107. ## 格式要求
  19108. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  19109. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19110. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19111. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19112. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19113. 出现选择题和问答题的概率提高
  19114. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  19115.  
  19116. # Format example
  19117. [{"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":"工具描述"}]}]`
  19118. this.loading = true
  19119. this.aiGet3(message, this.aiCallBack)
  19120. } else if (this.aitype == "aiTask2") {
  19121. if(this.aiCallBack[0] == 'all'){
  19122. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19123. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19124. let message = `NOTICE
  19125. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19126. Language: ${this.getLang()}
  19127. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19128. Instruction: Based on the context, follow "Format example", write content.
  19129. # Context
  19130. ## 要求
  19131. ${msg} 为教学任务分别输出以下内容。
  19132.  
  19133. ${(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','') : ''}
  19134. ## 参考资料
  19135. 教学任务教案:${_text}
  19136. ## 格式要求
  19137. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19138. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19139. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19140. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19141. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19142.  
  19143. # Format example
  19144. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19145. this.taskLoading[_task] = true
  19146. this.aiGet32(message, _task)
  19147. }
  19148. }else{
  19149. 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`
  19150. let message = `NOTICE
  19151. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19152. Language: ${this.getLang()}
  19153. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19154. Instruction: Based on the context, follow "Format example", write content.
  19155. # Context
  19156. ## 要求
  19157. ${msg} 为教学任务分别输出以下内容。
  19158.  
  19159. ${(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','') : ''}
  19160. ## 参考资料
  19161. 教学任务教案:${_text}
  19162. ## 格式要求
  19163. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19164. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19165. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19166. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19167. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19168.  
  19169. # Format example
  19170. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19171. this.taskLoading[this.aiCallBack[0]] = true
  19172. this.aiGet32(message, this.aiCallBack[0])
  19173. }
  19174. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19175. } else if (this.aitype == "aiTask3") {
  19176. if(this.aiCallBack[0] == 'all'){
  19177. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19178. if(!this.taskGLoading[_task]){
  19179. this.taskGLoading[_task] = []
  19180. this.ttaskGLoading[_task] = []
  19181. }
  19182. this.taskGLoading[_task][0] = true
  19183. this.ttaskGLoading[_task][0] = true
  19184. // this.taskGLoading[_task][1] = true
  19185. // this.taskGLoading[_task][2] = true
  19186. // this.aiGetG323(message3, _task)
  19187. }
  19188. let ij = 0;
  19189. let _this = this
  19190. function processNext() {
  19191. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19192. if(!_this.taskGLoading[ij][0]){
  19193. ij++;
  19194. processNext();
  19195. return;
  19196. }
  19197. let message1 = `NOTICE
  19198. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19199. Language: ${_this.getLang()}
  19200. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19201. Instruction: Based on the context, follow "Format example", write content.
  19202. # Context
  19203. ## 要求
  19204. ${msg}
  19205. ## 参考资料
  19206. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19207. # 输出格式与要求
  19208. 任务描述(告诉学生他们需要做什么):
  19209. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19210. # 范例
  19211. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19212. _this.aiGetG321L(message1, ij, (callback2) => {
  19213. // _this.aiGetG322(message2, ij, callback2);
  19214. callback2 ? callback2() : ''
  19215. }, () => {
  19216. // 回调函数,当前任务完成后执行
  19217. ij++;
  19218. processNext(); // 处理下一个任务
  19219. });
  19220. }
  19221. }
  19222. processNext(); // 启动处理
  19223. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19224. }else{
  19225. let message1 = `NOTICE
  19226. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19227. Language: ${this.getLang()}
  19228. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19229. Instruction: Based on the context, follow "Format example", write content.
  19230. # Context
  19231. ## 要求
  19232. ${msg}
  19233. ## 参考资料
  19234. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19235. # 输出格式与要求
  19236. 任务描述(告诉学生他们需要做什么):
  19237. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19238. # 范例
  19239. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19240. if(!this.taskGLoading[this.aiCallBack[0]]){
  19241. this.taskGLoading[this.aiCallBack[0]] = []
  19242. this.ttaskGLoading[this.aiCallBack[0]] = []
  19243. }
  19244. this.taskGLoading[this.aiCallBack[0]][0] = true
  19245. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19246. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19247. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19248. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19249. // this.aiGetG322(message2, this.aiCallBack[0])
  19250. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19251. })
  19252. // this.aiGetG323(message3, this.aiCallBack[0])
  19253. }
  19254. } else if (this.aitype == "aiTaskG3") {
  19255. let message3 = `NOTICE
  19256. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19257. Language: ${this.getLang()}
  19258. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19259. Instruction: Based on the context, follow "Format example", write content.
  19260. # Context
  19261. ## 要求
  19262. ${msg3}
  19263. ## 参考资料
  19264. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19265. # 输出格式与要求
  19266. 核心素养:从教案中提取
  19267. 目标:从教案中提取
  19268. 评价标准:从教案中提取评价标准
  19269. # Format example
  19270. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19271. if(!this.taskGLoading[this.aiCallBack]){
  19272. this.taskGLoading[this.aiCallBack] = []
  19273. }
  19274. this.taskGLoading[this.aiCallBack][2] = true
  19275. this.aiGetG323(message3, this.aiCallBack)
  19276. } else if (this.aitype == "aiTaskG2") {
  19277. if(this.aiCallBack == 'all'){
  19278. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19279. if(!this.taskGLoading[_task]){
  19280. this.taskGLoading[_task] = []
  19281. }
  19282. this.taskGLoading[_task][1] = true
  19283. }
  19284. let ij = 0;
  19285. let _this = this
  19286. function processNext() {
  19287. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19288. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19289. _this.taskGLoading[ij][1] = false
  19290. ij++;
  19291. processNext();
  19292. return;
  19293. }
  19294. let message2 = `NOTICE
  19295. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19296. Language: ${_this.getLang()}
  19297. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19298. Instruction: Based on the context, follow "Format example", write content.
  19299. # Context
  19300. ## 要求
  19301. ${msg2}
  19302. ## 参考资料
  19303. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19304. # 输出格式与要求
  19305. 互动工具列表
  19306. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19307. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19308. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19309. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19310. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19311. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19312. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19313. # Format example
  19314. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19315. _this.aiGetG322(message2, ij, () => {
  19316. // 回调函数,当前任务完成后执行
  19317. ij++;
  19318. processNext(); // 处理下一个任务
  19319. });
  19320. }
  19321. }
  19322. processNext(); // 启动处理
  19323. }else{
  19324. let message2 = `NOTICE
  19325. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19326. Language: ${this.getLang()}
  19327. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19328. Instruction: Based on the context, follow "Format example", write content.
  19329. # Context
  19330. ## 要求
  19331. ${msg2}
  19332. ## 参考资料
  19333. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19334. # 输出格式与要求
  19335. 互动工具列表
  19336. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19337. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19338. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19339. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19340. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19341. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19342. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19343. # Format example
  19344. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19345. if(!this.taskGLoading[this.aiCallBack]){
  19346. this.taskGLoading[this.aiCallBack] = []
  19347. }
  19348. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19349. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19350. this.taskGLoading[this.aiCallBack][1] = true
  19351. this.aiGetG322(message2, this.aiCallBack)
  19352. }
  19353. } else if (this.aitype == "aiDetail1") {
  19354. this.aiDetail(msg, this.aiIndex)
  19355. } else if (this.aitype == "aiDetail2") {
  19356. this.aiDetail2(msg, this.aiIndex)
  19357. } else if (this.aitype == "aiDetail3") {
  19358. let _index = this.aiIndex.split('-')
  19359. this.aiDetail3(msg, _index[0], _index[1])
  19360. } else if (this.aitype == "aiDetail4") {
  19361. this.aiDetail4(msg, this.aiIndex)
  19362. } else if (this.aitype == "teacherDetail") {
  19363. this.aiDetail5(msg, this.aiIndex)
  19364. } else if (this.aitype == "teacherDetail2") {
  19365. this.aiDetail52(msg, this.aiIndex)
  19366. } else if (this.aitype == "aiCpote1") {
  19367. this.aiCpote(msg, this.aiCallBack)
  19368. } else if (this.aitype == "aiCpote2") {
  19369. this.aiCpote(msg, this.aiCallBack)
  19370. } else if (this.aitype == "aiCpote3") {
  19371. this.aiCpote(msg, this.aiCallBack)
  19372. } else if (this.aitype == "aiCpote4") {
  19373. this.aiCpote(msg, this.aiCallBack)
  19374. } else if (this.aitype == "aiTeacher") {
  19375. this.loading = true
  19376. var _text = ""
  19377. for (var i = 0; i < this.dArray.length; i++) {
  19378. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19379. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19380. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19381. let message = ` NOTICE
  19382. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19383. Language: ${this.getLang()}
  19384. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19385. Instruction: Based on the context, follow "Format example", write content.
  19386. # Context
  19387. ## 要求
  19388. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19389. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19390. ${(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','') : ''}
  19391. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19392. ## Format example
  19393. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19394. this.aiGet4(message, () => {
  19395. this.loading = false
  19396. this.isOutline2 = true
  19397. })
  19398. } else if (this.aitype == "aiTeacher2"){
  19399. this.isOutline2 = true
  19400. let _this = this
  19401. setTimeout(()=>{
  19402. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19403. const _tindex = 'task-' + i;
  19404. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19405. _this.taskDetailLoading5.push(_tindex)
  19406. }
  19407. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19408. _this.ttaskDetailLoading5.push(_tindex)
  19409. }
  19410. // this.aiDetail52(msg, i)
  19411. }
  19412. let ij = 0;
  19413. function processNext() {
  19414. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19415. const _tindex = 'task-' + ij;
  19416. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19417. ij++;
  19418. processNext();
  19419. return;
  19420. }
  19421. // 处理当前任务
  19422. _this.aiDetail52(msg, ij, function () {
  19423. // 回调函数,当前任务完成后执行
  19424. ij++;
  19425. processNext(); // 处理下一个任务
  19426. });
  19427. }
  19428. }
  19429. processNext(); // 启动处理
  19430. }, 0)
  19431. } else if (this.aitype == "aiTeacher3"){
  19432. this.loading = true
  19433. let message = `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. # Context
  19439. ## 要求
  19440. ${msg} 以及##参考资料
  19441. ## 参考资料
  19442. 任务簇:${this.cpote.cpote4}
  19443. # Format example
  19444. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19445. this.aiGetTask3(message, () => {
  19446. this.loading = false
  19447. this.isOutline2 = true
  19448. })
  19449. } else if (this.aitype == "aiteacherTextDetail") {
  19450. this.aiteacherTextDetail(msg)
  19451. } else if (this.aitype == "aitargetTextDetail") {
  19452. this.aitargetTextDetail(msg)
  19453. } else if (this.aitype == "aitargetTextDetail2") {
  19454. this.aitargetTextDetail2(msg)
  19455. } else if (this.aitype == "aitargetTextDetail3") {
  19456. this.aitargetTextDetail3(msg)
  19457. } else if (this.aitype == 'aiSearchFile'){
  19458. let messages = `NOTICE
  19459. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19460. Language: ${this.getLang()}
  19461. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19462. Instruction: Based on the context, follow "Format example", write content.
  19463. ## 参考资料
  19464. 关键词:${this.courseName}
  19465. # Context
  19466. ## 要求
  19467. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19468. # Format example
  19469. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19470. this.fileSLoading = true
  19471. this.aiSearchFile(messages,()=>{
  19472. this.fileSLoading = false
  19473. })
  19474. } else if (this.aitype == 'aiSearchFile2'){
  19475. let messages = `${msg}
  19476. 课程名字:${this.courseName}
  19477. ${sub.length ? '学科:' + sub.join(",") : ''}
  19478. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19479. this.fileSLoading = true
  19480. this.aiSearchFile2(messages,()=>{
  19481. this.fileSLoading = false
  19482. })
  19483. } else if (this.aitype == 'aiRateRule'){
  19484. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19485. } else if (this.aitype == 'aiRateRuleA'){
  19486. if(this.aiCallBack[0] == 1){
  19487. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19488. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19489. for(var k = 0; k < task.eList.length; k++){
  19490. if(!task.eList[k].rule){
  19491. this.againEva(msg, i, k)
  19492. }
  19493. }
  19494. }
  19495. }else if(this.aiCallBack[0] == 2){
  19496. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19497. for(var k = 0; k < task.eList.length; k++){
  19498. if(!task.eList[k].rule){
  19499. this.againEva(msg, this.aiCallBack[1], k)
  19500. }
  19501. }
  19502. }
  19503. }
  19504. this.setAiJson(this.aitype, msg, msg2, msg3)
  19505. },
  19506. getLang(){
  19507. let lang = ''
  19508. if(this.languageSetting == 0){
  19509. lang = 'Chinese.'
  19510. }else if(this.languageSetting == 1){
  19511. lang = 'Traditional Chinese.'
  19512. }else if(this.languageSetting == 2){
  19513. lang = 'English.'
  19514. }
  19515. return lang
  19516. },
  19517. detailYou(message) {
  19518. this.textLoading = true
  19519. this.ttextLoading = true
  19520. let sub = []
  19521. if (this.courseTypeId.length) {
  19522. for (var i = 0; i < this.courseTypeId.length; i++) {
  19523. let _sid = this.courseTypeId[i]
  19524. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19525. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19526. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19527. }
  19528. }
  19529. }
  19530. }
  19531. let mclass = []
  19532. if (this.courseTypeId.length) {
  19533. for (var i = 0; i < this.courseTypeId.length; i++) {
  19534. let _sid = this.courseTypeId[i]
  19535. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19536. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19537. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19538. }
  19539. }
  19540. }
  19541. }
  19542. let url = []
  19543. if (this.infoData.length) {
  19544. for (var i = 0; i < this.infoData.length; i++) {
  19545. url.push(this.infoData[i].url)
  19546. }
  19547. }
  19548. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19549. // --------
  19550. // ## 补充参考资料
  19551. // 补充资料:${url.join(",")}
  19552. // 补充描述:${this.courseText2} ##补充参考资料和
  19553. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19554. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19555. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19556. let msg = `NOTICE
  19557. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19558. Language: ${this.getLang()}
  19559. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19560. Instruction: Based on the context, follow "Format example", write content.
  19561. #Context
  19562. ## 参考资料
  19563. 课程名字:${this.courseName}
  19564. ${sub.length ? '学科:' + sub.join(",") : ''}
  19565. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19566. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19567. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19568. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19569. ## 要求
  19570. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19571. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19572. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19573. this.aiGet(msg)
  19574. },
  19575. setUnitJson() {
  19576. 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 }] }
  19577. this.$forceUpdate()
  19578. },
  19579. async aiGet(messages) {
  19580. let _this = this
  19581. let fileid = []
  19582. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19583. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19584. if(_this.cankaoInfoData[i].fileid){
  19585. fileid.push(_this.cankaoInfoData[i].fileid)
  19586. }else {
  19587. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19588. if(_fileid){
  19589. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19590. _this.$forceUpdate();
  19591. if(_fileid != 1){
  19592. fileid.push(_fileid)
  19593. }
  19594. }
  19595. }
  19596. }
  19597. if(this.mode == 1){
  19598. for (var i = 0; i < _this.infoData.length; i++) {
  19599. if(_this.infoData[i].fileid){
  19600. fileid.push(_this.infoData[i].fileid)
  19601. }else {
  19602. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19603. if(_fileid){
  19604. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19605. _this.$forceUpdate();
  19606. if(_fileid != 1){
  19607. fileid.push(_fileid)
  19608. }
  19609. }
  19610. }
  19611. }
  19612. }
  19613. } else {
  19614. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19615. fileid = [...fileid]
  19616. if (_this.infoData.length) {
  19617. for (var i = 0; i < _this.infoData.length; i++) {
  19618. if(_this.infoData[i].fileid){
  19619. fileid.push(_this.infoData[i].fileid)
  19620. }else {
  19621. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19622. if(_fileid){
  19623. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19624. _this.$forceUpdate();
  19625. if(_fileid != 1){
  19626. fileid.push(_fileid)
  19627. }
  19628. }
  19629. }
  19630. }
  19631. }
  19632. }
  19633. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19634. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19635. let _uuid = uuidv4();
  19636. // let params = JSON.stringify({
  19637. // // "model": "Chat",
  19638. // model: 'gpt-3.5-turbo',
  19639. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19640. // max_tokens: 4096,
  19641. // top_p: 1,
  19642. // frequency_penalty: 0,
  19643. // presence_penalty: 0,
  19644. // messages: [{
  19645. // content: messages,
  19646. // role: 'user'
  19647. // }],
  19648. // uid: _uuid,
  19649. // mind_map_question: "",
  19650. // })
  19651. let params = {
  19652. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19653. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19654. session_name: _uuid,
  19655. userId: _this.userid,
  19656. uid: _uuid,
  19657. file_ids: fileid.length ? [...fileid] : '',
  19658. model: 'gpt-4o-2024-11-20',
  19659. temperature: this.mode == 3 ? 0.5 : 0.1,
  19660. }
  19661. // let params = JSON.stringify({
  19662. // message: {
  19663. // anthropic_version: "bedrock-2023-05-31",
  19664. // max_tokens: 4096,
  19665. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19666. // top_p: 1,
  19667. // messages: [{
  19668. // "role": "user",
  19669. // "content": messages
  19670. // }] ,
  19671. // },
  19672. // uid: _uuid,
  19673. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19674. // });
  19675. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19676. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19677. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19678. console.log(response);
  19679. // let data = response.data.FunctionResponse
  19680. // if (data.choices && data.choices.length && data.choices[0].message) {
  19681. // _this.courseText = data.choices[0].message.content
  19682. // }
  19683. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19684. } else {
  19685. _this.$message.warning(response.data.FunctionResponse.result);
  19686. }
  19687. _this.isTextCancelToken = null
  19688. }).catch(function (error) {
  19689. _this.textLoading = false
  19690. _this.ttextLoading = false
  19691. _this.isTextCancelToken = null
  19692. if(error && error.message != 'Request canceled by the user.'){
  19693. _this.$message.error(_this.lang.ssTooManyReq)
  19694. }
  19695. console.log(error);
  19696. });
  19697. await _this.aiGetgetAiContent(_uuid)
  19698. },
  19699. aiGetgetAiContent(_uid) {
  19700. try {
  19701. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19702. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19703. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19704. } catch(error){
  19705. console.log('EventSource error:', error);
  19706. this.$message.error(this.lang.ssTooManyReq)
  19707. this.textLoading = false
  19708. this.ttextLoading = false
  19709. this.isTextCancelToken = null
  19710. return;
  19711. }
  19712. let _allText = "";
  19713. let _mdText = "";
  19714. let _iindex = 0
  19715. this.isTextCancelSource.onmessage = _e => {
  19716. let _eData = JSON.parse(_e.data).content;
  19717. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19718. //对话已经完成
  19719. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19720. this.isTextCancelSource.close();
  19721. this.isTextCancelSource = null;
  19722. this.courseText = _mdText;
  19723. this.textLoading = false
  19724. this.ttextLoading = false
  19725. this.courseTextB = false
  19726. this.isTextCancelToken = null
  19727. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19728. this.saveCourse()
  19729. return;
  19730. } else {
  19731. _iindex++
  19732. //对话还在继续
  19733. let _text = "";
  19734. _text = _eData.replaceAll("'", "");
  19735. if (_allText == "") {
  19736. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19737. } else {
  19738. _allText += _text;
  19739. }
  19740. _mdText = _allText + "_";
  19741. _mdText = _mdText.replace(/\\n/g, "\n");
  19742. _mdText = _mdText.replace(/\\/g, "");
  19743. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19744. //转化返回的回复流数据
  19745. if(_iindex == 10){
  19746. this.courseText = _mdText;
  19747. _iindex = 0
  19748. }
  19749. this.textLoading = false
  19750. // 处理流数据
  19751. }
  19752. // this.$forceUpdate();
  19753. };
  19754. let _this = this
  19755. this.isTextCancelSource.onerror = function(event) {
  19756. // 处理错误,可以尝试重新连接
  19757. console.log('EventSource error:', event);
  19758. _this.$message.error(_this.lang.ssTooManyReq)
  19759. _this.textLoading = false
  19760. _this.ttextLoading = false
  19761. _this.isTextCancelToken = null
  19762. _this.isTextCancelSource.close();
  19763. _this.isTextCancelSource = null;
  19764. };
  19765. },
  19766. numberToChinese(number) {
  19767. 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];
  19768. 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];
  19769. let result = '';
  19770. let num = parseInt(number, 10);
  19771. let i = 0;
  19772. while (num > 0) {
  19773. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19774. num = Math.floor(num / 10);
  19775. i++;
  19776. }
  19777. // 去除连续的零,保留一个零
  19778. result = result.replace(new RegExp(this.lang.ssZero + '+', 'g'), this.lang.ssZero);
  19779. return result;
  19780. },
  19781. async aiGet2(messages, callback) {
  19782. let _this = this
  19783. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19784. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19785. if (_this.infoData.length) {
  19786. for (var i = 0; i < _this.infoData.length; i++) {
  19787. if(_this.infoData[i].fileid){
  19788. fileid.push(_this.infoData[i].fileid)
  19789. }else {
  19790. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19791. if(_fileid){
  19792. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19793. _this.$forceUpdate();
  19794. if(_fileid != 1){
  19795. fileid.push(_fileid)
  19796. }
  19797. }
  19798. }
  19799. }
  19800. }
  19801. console.log('fileid=========',fileid)
  19802. // let params = JSON.stringify({
  19803. // // "model": "Chat",
  19804. // model: 'gpt-3.5-turbo',
  19805. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19806. // max_tokens: 4096,
  19807. // top_p: 1,
  19808. // frequency_penalty: 0,
  19809. // presence_penalty: 0,
  19810. // messages: [{
  19811. // content: messages,
  19812. // role: 'user'
  19813. // }],
  19814. // stream: false,
  19815. // uid: this.userid,
  19816. // mind_map_question: "",
  19817. // })
  19818. // // let params = JSON.stringify({
  19819. // // message: {
  19820. // // anthropic_version: "bedrock-2023-05-31",
  19821. // // max_tokens: 4096,
  19822. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19823. // // top_p: 1,
  19824. // // messages: [{
  19825. // // content: messages,
  19826. // // role: 'user'
  19827. // // }], //
  19828. // // },
  19829. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19830. // // });
  19831. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19832. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19833. // console.log(response);
  19834. // let data = response.data.FunctionResponse
  19835. // if (data.choices && data.choices.length && data.choices[0].message) {
  19836. // console.log(data.choices[0].message.content);
  19837. // let dArray = JSON.parse(data.choices[0].message.content)
  19838. // _this.dArray = dArray
  19839. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19840. // for (var i = 0; i < dArray.length; i++) {
  19841. // let _task = dArray[i]
  19842. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19843. // task: _task.task,
  19844. // taskDetail: "",
  19845. // taskDetail2: _task.detail,
  19846. // taskDetail3: "",
  19847. // chapterData: [],
  19848. // toolText: "",
  19849. // toolChoose: [
  19850. // {
  19851. // tool: [],
  19852. // toolDetail: "",
  19853. // toolType: 0,
  19854. // askCount: 1,
  19855. // askTitle: "",
  19856. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19857. // },
  19858. // ],
  19859. // isShowTools: false,
  19860. // askCount: 1,
  19861. // isFold: 0,
  19862. // askTitle: "",
  19863. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19864. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19865. // homeworkList: [],
  19866. // })
  19867. // }
  19868. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19869. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19870. // _this.$forceUpdate();
  19871. // }
  19872. // // if (data.result) {
  19873. // // console.log(data.result);
  19874. // // let dArray = JSON.parse(data.result)
  19875. // // _this.dArray = dArray
  19876. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19877. // // for (var i = 0; i < dArray.length; i++) {
  19878. // // let _task = dArray[i]
  19879. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19880. // // task: _task.task,
  19881. // // taskDetail: "",
  19882. // // taskDetail2: _task.detail,
  19883. // // taskDetail3: "",
  19884. // // chapterData: [],
  19885. // // toolText: "",
  19886. // // toolChoose: [
  19887. // // {
  19888. // // tool: [],
  19889. // // toolDetail: "",
  19890. // // toolType: 0,
  19891. // // askCount: 1,
  19892. // // askTitle: "",
  19893. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19894. // // },
  19895. // // ],
  19896. // // isShowTools: false,
  19897. // // askCount: 1,
  19898. // // isFold: 1,
  19899. // // askTitle: "",
  19900. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19901. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19902. // // homeworkList: [],
  19903. // // })
  19904. // // }
  19905. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19906. // // _this.$forceUpdate();
  19907. // // }
  19908. // callback ? callback() : ''
  19909. // }).catch(function (error) {
  19910. // _this.loading = false
  19911. // console.log(error);
  19912. // });
  19913. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19914. let parm = {
  19915. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19916. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19917. session_name: uuidv4(),
  19918. userId: this.userid,
  19919. file_ids: fileid.length ? [...fileid] : '',
  19920. model: 'gpt-4o-2024-11-20',
  19921. temperature: this.mode == 3 ? 0.5 : 0.1,
  19922. }
  19923. this.ajax
  19924. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19925. .then((response) => {
  19926. console.log(response);
  19927. let data = response.data.FunctionResponse
  19928. if (data.message) {
  19929. console.log(data.message);
  19930. let dArray = {}
  19931. try {
  19932. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19933. } catch (error) {
  19934. console.log("error_________________" + error);
  19935. try {
  19936. let regex = new RegExp(/```json([\s\S]*?)```/);
  19937. let match = data.message.match(regex);
  19938. dArray = JSON.parse(match[1]);
  19939. // var message = data.message;
  19940. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19941. // var jsonEnd = message.indexOf("```", jsonStart);
  19942. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19943. // dArray = JSON.parse(jsonString);
  19944. } catch (error) {
  19945. try {
  19946. let regex = new RegExp(/```json([\s\S]*?)```/);
  19947. let match = data.message.match(regex);
  19948. // eval("var aaa = " + match[0])
  19949. if(match && match[1]){
  19950. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19951. }else {
  19952. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19953. }
  19954. } catch (error) {
  19955. _this.$message.error(_this.lang.ssJsonFormat)
  19956. // +data.message
  19957. // _this.aiGet2(messages, callback);
  19958. _this.loading = false
  19959. _this.isOutlineCancelToken = null
  19960. console.log("error_________________" + error);
  19961. return;
  19962. }
  19963. console.log("error_________________" + error);
  19964. }
  19965. }
  19966. _this.dArray = dArray
  19967. console.log(dArray)
  19968. if(_this.panOutline() > 0){
  19969. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19970. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19971. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19972. }
  19973. for (var i = 0; i < dArray.length; i++) {
  19974. let _task = dArray[i]
  19975. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19976. _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 : "")
  19977. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19978. }else {
  19979. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19980. 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 : ""),
  19981. taskDetail: "",
  19982. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19983. taskDetail3: "",
  19984. chapterData: [],
  19985. toolText: "",
  19986. toolChoose: [
  19987. {
  19988. tool: [],
  19989. toolDetail: "",
  19990. toolType: 0,
  19991. askCount: 1,
  19992. askTitle: "",
  19993. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19994. },
  19995. ],
  19996. isShowTools: false,
  19997. askCount: 1,
  19998. isFold: 0,
  19999. askTitle: "",
  20000. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20001. checkJson: [{ checkCount: [], checkPerent: [] }],
  20002. homeworkList: [],
  20003. })
  20004. }
  20005. }
  20006. }else {
  20007. _this.unitJson[0].chapterInfo[0].taskJson = []
  20008. for (var i = 0; i < dArray.length; i++) {
  20009. let _task = dArray[i]
  20010. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20011. 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 : ""),
  20012. taskDetail: "",
  20013. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  20014. taskDetail3: "",
  20015. chapterData: [],
  20016. toolText: "",
  20017. toolChoose: [
  20018. {
  20019. tool: [],
  20020. toolDetail: "",
  20021. toolType: 0,
  20022. askCount: 1,
  20023. askTitle: "",
  20024. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20025. },
  20026. ],
  20027. isShowTools: false,
  20028. askCount: 1,
  20029. isFold: 0,
  20030. askTitle: "",
  20031. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20032. checkJson: [{ checkCount: [], checkPerent: [] }],
  20033. homeworkList: [],
  20034. })
  20035. }
  20036. }
  20037. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20038. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20039. _this.$forceUpdate();
  20040. _this.saveCourse()
  20041. }
  20042. callback ? callback() : ''
  20043. _this.isOutlineCancelToken = null
  20044. })
  20045. .catch((error) => {
  20046. _this.loading = false
  20047. _this.isOutlineCancelToken = null
  20048. console.log(error);
  20049. });
  20050. },
  20051. cancelAjax(type, index){
  20052. if (this.isOutlineCancelToken && type == 'outline') {
  20053. this.$message.success(this.lang.ssStopOutline)
  20054. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  20055. this.isOutlineCancelToken = null;
  20056. this.loading = false
  20057. }
  20058. if (this.isFileCancelToken && type == 'file') {
  20059. this.$message.success(this.lang.ssStopFileGen)
  20060. this.isFileCancelToken.cancel('Request canceled by the user.');
  20061. this.isFileCancelToken = null;
  20062. this.fileSLoading = false
  20063. }
  20064. if(this.isTextCancelToken && type == 'text'){
  20065. this.$message.success(this.lang.ssStopAIOpt)
  20066. this.isTextCancelToken.cancel('Request canceled by the user.');
  20067. this.isTextCancelToken = null;
  20068. this.textLoading = false
  20069. this.ttextLoading = true
  20070. if(this.isTextCancelSource){
  20071. this.isTextCancelSource.close()
  20072. this.isTextCancelSource = null
  20073. }
  20074. }
  20075. if(this.isTargetCancelToken2 && type == 'target2'){
  20076. this.$message.success(this.lang.ssStopGenTarget)
  20077. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  20078. this.isTargetCancelToken2 = null;
  20079. this.targetTextLoading2 = false
  20080. this.ttargetTextLoading2 = false
  20081. if(this.isTargetCancelSource2){
  20082. this.isTargetCancelSource2.close()
  20083. this.isTargetCancelSource2 = null
  20084. }
  20085. this.$nextTick(() => {
  20086. const targetDiv = this.$refs.aitargetTextDetail3;
  20087. if (targetDiv) {
  20088. targetDiv.scrollIntoView();
  20089. }
  20090. });
  20091. }
  20092. if(this.isTargetCancelToken1 && type == 'target1'){
  20093. this.$message.success(this.lang.ssStopGenTarget)
  20094. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  20095. this.isTargetCancelToken1 = null;
  20096. this.targetTextLoading = false
  20097. this.ttargetTextLoading = false
  20098. if(this.isTargetCancelSource1){
  20099. this.isTargetCancelSource1.close()
  20100. this.isTargetCancelSource1 = null
  20101. }
  20102. }
  20103. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  20104. this.$message.success(this.lang.ssStopExtract)
  20105. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  20106. this.isTeacherTextCancelToken = null;
  20107. this.teacherTextLoading = false
  20108. this.tteacherTextLoading = false
  20109. if(this.isTeacherTextCancelSource){
  20110. this.isTeacherTextCancelSource.close()
  20111. this.isTeacherTextCancelSource = null
  20112. }
  20113. }
  20114. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  20115. this.$message.success(this.lang.ssStopGenPlan)
  20116. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  20117. this.isTeacherTaskCancelToken = null;
  20118. this.loading = false
  20119. }
  20120. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  20121. this.$message.success(this.lang.ssStopGenOut)
  20122. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  20123. this.isOutlineTaskCancelToken[index] = null;
  20124. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  20125. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  20126. if(this.isOutlineTaskCancelSource[index]){
  20127. this.isOutlineTaskCancelSource[index].close()
  20128. this.isOutlineTaskCancelSource[index] = null
  20129. }
  20130. }
  20131. if(type == 'teacherDetail2'){
  20132. this.$message.success(this.lang.ssStopGenPlan)
  20133. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  20134. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  20135. this.isTeacherTaskCancelToken2[index] = null;
  20136. }
  20137. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  20138. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  20139. }
  20140. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  20141. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  20142. }
  20143. if(this.isTeacherTaskCancelSource[index]){
  20144. this.isTeacherTaskCancelSource[index].close()
  20145. this.isTeacherTaskCancelSource[index] = null
  20146. }
  20147. }
  20148. if(type == 'aiTaskGL1'){
  20149. this.$message.success(this.lang.ssStopTaskOver)
  20150. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  20151. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  20152. this.taskCancelToken1[index] = null;
  20153. }
  20154. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  20155. this.taskGLoading[index][0] = false
  20156. }
  20157. if(this.isTaskCancelSource1[index]){
  20158. this.isTaskCancelSource1[index].close()
  20159. this.isTaskCancelSource1[index] = null
  20160. }
  20161. setTimeout(() => {
  20162. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  20163. this.cancelAjax('aiTaskGL2', index)
  20164. }
  20165. }, 1000)
  20166. this.$forceUpdate()
  20167. }
  20168. if(type == 'aiTaskGL2'){
  20169. this.$message.success(this.lang.ssStopTaskTool)
  20170. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  20171. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  20172. this.taskCancelToken2[index] = null;
  20173. }
  20174. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  20175. this.taskGLoading[index][1] = false
  20176. }
  20177. this.$forceUpdate()
  20178. }
  20179. if(type == 'taskAn'){
  20180. this.$message.success(this.lang.ssStopTaskOver)
  20181. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  20182. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  20183. this.taskAnCancelToken[index] = null;
  20184. }
  20185. if(this.taskAnLoading[index]){
  20186. this.taskAnLoading[index] = false
  20187. }
  20188. this.$forceUpdate()
  20189. }
  20190. if(type == 'findMatchingContents'){
  20191. this.$message.success(this.lang.ssStopSearch)
  20192. if(this.isfindMatchingContents){
  20193. this.isfindMatchingContents.cancel('Request canceled by the user.');
  20194. this.isfindMatchingContents = null;
  20195. }
  20196. if(this.knowInfoDataLoading){
  20197. this.knowInfoDataLoading = false
  20198. }
  20199. if(this.findMatchingContentsPage > 1){
  20200. this.findMatchingContentsPage --
  20201. }
  20202. this.$forceUpdate()
  20203. }
  20204. },
  20205. async aiGetTask2(messages, callback) {
  20206. let _this = this
  20207. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20208. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20209. if (_this.infoData.length) {
  20210. for (var i = 0; i < _this.infoData.length; i++) {
  20211. if(_this.infoData[i].fileid){
  20212. fileid.push(_this.infoData[i].fileid)
  20213. }else {
  20214. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20215. if(_fileid){
  20216. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20217. _this.$forceUpdate();
  20218. if(_fileid != 1){
  20219. fileid.push(_fileid)
  20220. }
  20221. }
  20222. }
  20223. }
  20224. }
  20225. console.log('fileid=========',fileid)
  20226. // let params = JSON.stringify({
  20227. // // "model": "Chat",
  20228. // model: 'gpt-3.5-turbo',
  20229. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20230. // max_tokens: 4096,
  20231. // top_p: 1,
  20232. // frequency_penalty: 0,
  20233. // presence_penalty: 0,
  20234. // messages: [{
  20235. // content: messages,
  20236. // role: 'user'
  20237. // }],
  20238. // stream: false,
  20239. // uid: this.userid,
  20240. // mind_map_question: "",
  20241. // })
  20242. // // let params = JSON.stringify({
  20243. // // message: {
  20244. // // anthropic_version: "bedrock-2023-05-31",
  20245. // // max_tokens: 4096,
  20246. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20247. // // top_p: 1,
  20248. // // messages: [{
  20249. // // content: messages,
  20250. // // role: 'user'
  20251. // // }], //
  20252. // // },
  20253. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20254. // // });
  20255. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20256. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20257. // console.log(response);
  20258. // let data = response.data.FunctionResponse
  20259. // if (data.choices && data.choices.length && data.choices[0].message) {
  20260. // console.log(data.choices[0].message.content);
  20261. // let dArray = JSON.parse(data.choices[0].message.content)
  20262. // _this.dArray = dArray
  20263. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20264. // for (var i = 0; i < dArray.length; i++) {
  20265. // let _task = dArray[i]
  20266. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20267. // task: _task.task,
  20268. // taskDetail: "",
  20269. // taskDetail2: _task.detail,
  20270. // taskDetail3: "",
  20271. // chapterData: [],
  20272. // toolText: "",
  20273. // toolChoose: [
  20274. // {
  20275. // tool: [],
  20276. // toolDetail: "",
  20277. // toolType: 0,
  20278. // askCount: 1,
  20279. // askTitle: "",
  20280. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20281. // },
  20282. // ],
  20283. // isShowTools: false,
  20284. // askCount: 1,
  20285. // isFold: 0,
  20286. // askTitle: "",
  20287. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20288. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20289. // homeworkList: [],
  20290. // })
  20291. // }
  20292. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20293. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20294. // _this.$forceUpdate();
  20295. // }
  20296. // // if (data.result) {
  20297. // // console.log(data.result);
  20298. // // let dArray = JSON.parse(data.result)
  20299. // // _this.dArray = dArray
  20300. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20301. // // for (var i = 0; i < dArray.length; i++) {
  20302. // // let _task = dArray[i]
  20303. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20304. // // task: _task.task,
  20305. // // taskDetail: "",
  20306. // // taskDetail2: _task.detail,
  20307. // // taskDetail3: "",
  20308. // // chapterData: [],
  20309. // // toolText: "",
  20310. // // toolChoose: [
  20311. // // {
  20312. // // tool: [],
  20313. // // toolDetail: "",
  20314. // // toolType: 0,
  20315. // // askCount: 1,
  20316. // // askTitle: "",
  20317. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20318. // // },
  20319. // // ],
  20320. // // isShowTools: false,
  20321. // // askCount: 1,
  20322. // // isFold: 1,
  20323. // // askTitle: "",
  20324. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20325. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20326. // // homeworkList: [],
  20327. // // })
  20328. // // }
  20329. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20330. // // _this.$forceUpdate();
  20331. // // }
  20332. // callback ? callback() : ''
  20333. // }).catch(function (error) {
  20334. // _this.loading = false
  20335. // console.log(error);
  20336. // });
  20337. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20338. let parm = {
  20339. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20340. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20341. session_name: uuidv4(),
  20342. userId: this.userid,
  20343. file_ids: fileid.length ? [...fileid] : '',
  20344. model: 'gpt-4o-2024-11-20',
  20345. temperature: this.mode == 3 ? 0.5 : 0.1,
  20346. }
  20347. this.ajax
  20348. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20349. .then((response) => {
  20350. console.log(response);
  20351. let data = response.data.FunctionResponse
  20352. if (data.message) {
  20353. console.log(data.message);
  20354. let dArray = {}
  20355. try {
  20356. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20357. } catch (error) {
  20358. console.log("error_________________" + error);
  20359. try {
  20360. let regex = new RegExp(/```json([\s\S]*?)```/);
  20361. let match = data.message.match(regex);
  20362. dArray = JSON.parse(match[1]);
  20363. // var message = data.message;
  20364. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20365. // var jsonEnd = message.indexOf("```", jsonStart);
  20366. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20367. // dArray = JSON.parse(jsonString);
  20368. } catch (error) {
  20369. try {
  20370. let regex = new RegExp(/```json([\s\S]*?)```/);
  20371. let match = data.message.match(regex);
  20372. // eval("var aaa = " + match[0])
  20373. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20374. } catch (error) {
  20375. console.log("error_________________" + error);
  20376. }
  20377. console.log("error_________________" + error);
  20378. }
  20379. }
  20380. _this.dArray = dArray
  20381. if(_this.panOutline() > 0){
  20382. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20383. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20384. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20385. }
  20386. for (var i = 0; i < dArray.length; i++) {
  20387. let _task = dArray[i]
  20388. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20389. _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(':','')
  20390. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20391. }else {
  20392. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20393. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20394. taskDetail: "",
  20395. taskDetail2: "",
  20396. taskDetail3: "",
  20397. chapterData: [],
  20398. toolText: "",
  20399. toolChoose: [
  20400. {
  20401. tool: [],
  20402. toolDetail: "",
  20403. toolType: 0,
  20404. askCount: 1,
  20405. askTitle: "",
  20406. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20407. },
  20408. ],
  20409. isShowTools: false,
  20410. askCount: 1,
  20411. isFold: 0,
  20412. askTitle: "",
  20413. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20414. checkJson: [{ checkCount: [], checkPerent: [] }],
  20415. homeworkList: [],
  20416. })
  20417. }
  20418. }
  20419. }else {
  20420. _this.unitJson[0].chapterInfo[0].taskJson = []
  20421. for (var i = 0; i < dArray.length; i++) {
  20422. let _task = dArray[i]
  20423. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20424. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20425. taskDetail: "",
  20426. taskDetail2: "",
  20427. taskDetail3: "",
  20428. chapterData: [],
  20429. toolText: "",
  20430. toolChoose: [
  20431. {
  20432. tool: [],
  20433. toolDetail: "",
  20434. toolType: 0,
  20435. askCount: 1,
  20436. askTitle: "",
  20437. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20438. },
  20439. ],
  20440. isShowTools: false,
  20441. askCount: 1,
  20442. isFold: 0,
  20443. askTitle: "",
  20444. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20445. checkJson: [{ checkCount: [], checkPerent: [] }],
  20446. homeworkList: [],
  20447. })
  20448. }
  20449. }
  20450. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20451. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20452. _this.$forceUpdate();
  20453. _this.saveCourse()
  20454. setTimeout(()=>{
  20455. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20456. this.aiOutlineDetail('', i)
  20457. }
  20458. }, 0)
  20459. }
  20460. callback ? callback() : ''
  20461. _this.isOutlineCancelToken = null
  20462. })
  20463. .catch((error) => {
  20464. _this.loading = false
  20465. _this.isOutlineCancelToken = null
  20466. console.log(error);
  20467. });
  20468. },
  20469. async aiGetTask3(messages, callback) {
  20470. let _this = this
  20471. // let params = JSON.stringify({
  20472. // // "model": "Chat",
  20473. // model: 'gpt-3.5-turbo',
  20474. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20475. // max_tokens: 4096,
  20476. // top_p: 1,
  20477. // frequency_penalty: 0,
  20478. // presence_penalty: 0,
  20479. // messages: [{
  20480. // content: messages,
  20481. // role: 'user'
  20482. // }],
  20483. // stream: false,
  20484. // uid: this.userid,
  20485. // mind_map_question: "",
  20486. // })
  20487. // // let params = JSON.stringify({
  20488. // // message: {
  20489. // // anthropic_version: "bedrock-2023-05-31",
  20490. // // max_tokens: 4096,
  20491. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20492. // // top_p: 1,
  20493. // // messages: [{
  20494. // // content: messages,
  20495. // // role: 'user'
  20496. // // }], //
  20497. // // },
  20498. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20499. // // });
  20500. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20501. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20502. // console.log(response);
  20503. // let data = response.data.FunctionResponse
  20504. // if (data.choices && data.choices.length && data.choices[0].message) {
  20505. // console.log(data.choices[0].message.content);
  20506. // let dArray = JSON.parse(data.choices[0].message.content)
  20507. // _this.dArray = dArray
  20508. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20509. // for (var i = 0; i < dArray.length; i++) {
  20510. // let _task = dArray[i]
  20511. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20512. // task: _task.task,
  20513. // taskDetail: "",
  20514. // taskDetail2: _task.detail,
  20515. // taskDetail3: "",
  20516. // chapterData: [],
  20517. // toolText: "",
  20518. // toolChoose: [
  20519. // {
  20520. // tool: [],
  20521. // toolDetail: "",
  20522. // toolType: 0,
  20523. // askCount: 1,
  20524. // askTitle: "",
  20525. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20526. // },
  20527. // ],
  20528. // isShowTools: false,
  20529. // askCount: 1,
  20530. // isFold: 0,
  20531. // askTitle: "",
  20532. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20533. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20534. // homeworkList: [],
  20535. // })
  20536. // }
  20537. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20538. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20539. // _this.$forceUpdate();
  20540. // }
  20541. // // if (data.result) {
  20542. // // console.log(data.result);
  20543. // // let dArray = JSON.parse(data.result)
  20544. // // _this.dArray = dArray
  20545. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20546. // // for (var i = 0; i < dArray.length; i++) {
  20547. // // let _task = dArray[i]
  20548. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20549. // // task: _task.task,
  20550. // // taskDetail: "",
  20551. // // taskDetail2: _task.detail,
  20552. // // taskDetail3: "",
  20553. // // chapterData: [],
  20554. // // toolText: "",
  20555. // // toolChoose: [
  20556. // // {
  20557. // // tool: [],
  20558. // // toolDetail: "",
  20559. // // toolType: 0,
  20560. // // askCount: 1,
  20561. // // askTitle: "",
  20562. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20563. // // },
  20564. // // ],
  20565. // // isShowTools: false,
  20566. // // askCount: 1,
  20567. // // isFold: 1,
  20568. // // askTitle: "",
  20569. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20570. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20571. // // homeworkList: [],
  20572. // // })
  20573. // // }
  20574. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20575. // // _this.$forceUpdate();
  20576. // // }
  20577. // callback ? callback() : ''
  20578. // }).catch(function (error) {
  20579. // _this.loading = false
  20580. // console.log(error);
  20581. // });
  20582. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20583. let parm = {
  20584. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20585. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20586. session_name: uuidv4(),
  20587. userId: this.userid,
  20588. file_ids: '',
  20589. model: 'gpt-4o-2024-11-20',
  20590. temperature: this.mode == 3 ? 0.5 : 0.1,
  20591. }
  20592. this.ajax
  20593. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20594. .then((response) => {
  20595. console.log(response);
  20596. let data = response.data.FunctionResponse
  20597. if (data.message) {
  20598. console.log(data.message);
  20599. let dArray = {}
  20600. try {
  20601. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20602. } catch (error) {
  20603. console.log("error_________________" + error);
  20604. try {
  20605. let regex = new RegExp(/```json([\s\S]*?)```/);
  20606. let match = data.message.match(regex);
  20607. dArray = JSON.parse(match[1]);
  20608. // var message = data.message;
  20609. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20610. // var jsonEnd = message.indexOf("```", jsonStart);
  20611. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20612. // dArray = JSON.parse(jsonString);
  20613. } catch (error) {
  20614. try {
  20615. let regex = new RegExp(/```json([\s\S]*?)```/);
  20616. let match = data.message.match(regex);
  20617. // eval("var aaa = " + match[0])
  20618. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20619. } catch (error) {
  20620. console.log("error_________________" + error);
  20621. }
  20622. console.log("error_________________" + error);
  20623. }
  20624. }
  20625. _this.dArray = dArray
  20626. if(_this.panOutline() > 0){
  20627. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20628. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20629. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20630. }
  20631. for (var i = 0; i < dArray.length; i++) {
  20632. let _task = dArray[i]
  20633. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20634. _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(':','')
  20635. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20636. }else {
  20637. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20638. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20639. taskDetail: "",
  20640. taskDetail2: "",
  20641. taskDetail3: "",
  20642. chapterData: [],
  20643. toolText: "",
  20644. toolChoose: [
  20645. {
  20646. tool: [],
  20647. toolDetail: "",
  20648. toolType: 0,
  20649. askCount: 1,
  20650. askTitle: "",
  20651. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20652. },
  20653. ],
  20654. isShowTools: false,
  20655. askCount: 1,
  20656. isFold: 0,
  20657. askTitle: "",
  20658. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20659. checkJson: [{ checkCount: [], checkPerent: [] }],
  20660. homeworkList: [],
  20661. })
  20662. }
  20663. }
  20664. }else {
  20665. _this.unitJson[0].chapterInfo[0].taskJson = []
  20666. for (var i = 0; i < dArray.length; i++) {
  20667. let _task = dArray[i]
  20668. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20669. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20670. taskDetail: "",
  20671. taskDetail2: "",
  20672. taskDetail3: "",
  20673. chapterData: [],
  20674. toolText: "",
  20675. toolChoose: [
  20676. {
  20677. tool: [],
  20678. toolDetail: "",
  20679. toolType: 0,
  20680. askCount: 1,
  20681. askTitle: "",
  20682. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20683. },
  20684. ],
  20685. isShowTools: false,
  20686. askCount: 1,
  20687. isFold: 0,
  20688. askTitle: "",
  20689. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20690. checkJson: [{ checkCount: [], checkPerent: [] }],
  20691. homeworkList: [],
  20692. })
  20693. }
  20694. }
  20695. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20696. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20697. _this.$forceUpdate();
  20698. _this.saveCourse()
  20699. // setTimeout(()=>{
  20700. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20701. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20702. // }
  20703. // }, 0)
  20704. setTimeout(()=>{
  20705. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20706. const _tindex = 'task-' + i;
  20707. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20708. _this.taskDetailLoading5.push(_tindex)
  20709. }
  20710. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20711. _this.ttaskDetailLoading5.push(_tindex)
  20712. }
  20713. }
  20714. let ij = 0;
  20715. function processNext() {
  20716. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20717. const _tindex = 'task-' + ij;
  20718. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20719. ij++;
  20720. processNext();
  20721. return;
  20722. }
  20723. // 处理当前任务
  20724. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20725. // 回调函数,当前任务完成后执行
  20726. ij++;
  20727. processNext(); // 处理下一个任务
  20728. });
  20729. }
  20730. }
  20731. processNext(); // 启动处理
  20732. }, 0)
  20733. }
  20734. callback ? callback() : ''
  20735. _this.isTeacherTaskCancelToken = null
  20736. })
  20737. .catch((error) => {
  20738. _this.loading = false
  20739. _this.isTeacherTaskCancelToken = null
  20740. console.log(error);
  20741. });
  20742. },
  20743. async aiGet3(messages, callback) {
  20744. let _this = this
  20745. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20746. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20747. if (_this.infoData.length) {
  20748. for (var i = 0; i < _this.infoData.length; i++) {
  20749. if(_this.infoData[i].fileid){
  20750. fileid.push(_this.infoData[i].fileid)
  20751. }else {
  20752. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20753. if(_fileid){
  20754. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20755. _this.$forceUpdate();
  20756. if(_fileid != 1){
  20757. fileid.push(_fileid)
  20758. }
  20759. }
  20760. }
  20761. }
  20762. }
  20763. // let params = JSON.stringify({
  20764. // // "model": "Chat",
  20765. // model: 'gpt-3.5-turbo',
  20766. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20767. // max_tokens: 4096,
  20768. // top_p: 1,
  20769. // frequency_penalty: 0,
  20770. // presence_penalty: 0,
  20771. // messages: [{
  20772. // content: messages,
  20773. // role: 'user'
  20774. // }],
  20775. // stream: false,
  20776. // uid: this.userid,
  20777. // mind_map_question: "",
  20778. // })
  20779. // // let params = JSON.stringify({
  20780. // // message: {
  20781. // // anthropic_version: "bedrock-2023-05-31",
  20782. // // max_tokens: 4096,
  20783. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20784. // // top_p: 1,
  20785. // // messages: [{
  20786. // // content: messages,
  20787. // // role: 'user'
  20788. // // }], //
  20789. // // },
  20790. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20791. // // });
  20792. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20793. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20794. // console.log(response);
  20795. // let data = response.data.FunctionResponse
  20796. // if (data.choices && data.choices.length && data.choices[0].message) {
  20797. // console.log(data.choices[0].message.content);
  20798. // let tArray = JSON.parse(data.choices[0].message.content)
  20799. // // _this.unitJson[0].chapterInfo[0].task = []
  20800. // let toolsJson = {
  20801. // "电子白板": { tool: 1, type: 1 },
  20802. // "文档": { tool: 52, type: 1 },
  20803. // "思维导图": { tool: 3, type: 1 },
  20804. // "表格": { tool: 48, type: 1 },
  20805. // "作业提交": { tool: 16, type: 2 }
  20806. // }
  20807. // for (var i = 0; i < tArray.length; i++) {
  20808. // let _task = tArray[i]
  20809. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20810. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20811. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20812. // if (_task.toolChoose.length) {
  20813. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20814. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20815. // {
  20816. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20817. // toolDetail: _task.toolChoose[j].detail,
  20818. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20819. // askCount: 1,
  20820. // askTitle: "",
  20821. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20822. // },
  20823. // )
  20824. // }
  20825. // } else {
  20826. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20827. // {
  20828. // tool: [],
  20829. // toolDetail: "",
  20830. // toolType: 0,
  20831. // askCount: 1,
  20832. // askTitle: "",
  20833. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20834. // },
  20835. // )
  20836. // }
  20837. // }
  20838. // // if (_this.infoData.length) {
  20839. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20840. // // }
  20841. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20842. // _this.$forceUpdate();
  20843. // }
  20844. // // if (data.result) {
  20845. // // console.log(data.result);
  20846. // // let tArray = JSON.parse(data.result)
  20847. // // // _this.unitJson[0].chapterInfo[0].task = []
  20848. // // let toolsJson = {
  20849. // // "电子白板": { tool: 1, type: 1 },
  20850. // // "文档": { tool: 52, type: 1 },
  20851. // // "思维导图": { tool: 3, type: 1 },
  20852. // // "表格": { tool: 48, type: 1 },
  20853. // // "作业提交": { tool: 16, type: 2 }
  20854. // // }
  20855. // // for (var i = 0; i < tArray.length; i++) {
  20856. // // let _task = tArray[i]
  20857. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20858. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20859. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20860. // // if (_task.toolChoose.length) {
  20861. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20862. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20863. // // {
  20864. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20865. // // toolDetail: _task.toolChoose[j].detail,
  20866. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20867. // // askCount: 1,
  20868. // // askTitle: "",
  20869. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20870. // // },
  20871. // // )
  20872. // // }
  20873. // // } else {
  20874. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20875. // // {
  20876. // // tool: [],
  20877. // // toolDetail: "",
  20878. // // toolType: 0,
  20879. // // askCount: 1,
  20880. // // askTitle: "",
  20881. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20882. // // },
  20883. // // )
  20884. // // }
  20885. // // }
  20886. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20887. // // _this.$forceUpdate();
  20888. // // }
  20889. // callback ? callback() : ''
  20890. // }).catch(function (error) {
  20891. // _this.loading = false
  20892. // console.log(error);
  20893. // });
  20894. let parm = {
  20895. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20896. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20897. session_name: uuidv4(),
  20898. userId: this.userid,
  20899. file_ids: fileid.length ? [...fileid] : '',
  20900. model: 'gpt-4o-2024-11-20',
  20901. temperature: this.mode == 3 ? 0.5 : 0.1,
  20902. }
  20903. this.ajax
  20904. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20905. .then(async (response) => {
  20906. console.log(response);
  20907. let data = response.data.FunctionResponse
  20908. if (data.message) {
  20909. console.log(data.message);
  20910. let tArray = {}
  20911. try {
  20912. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20913. } catch (error) {
  20914. console.log("error_________________" + error);
  20915. try {
  20916. let regex = new RegExp(/```json([\s\S]*?)```/);
  20917. let match = data.message.match(regex);
  20918. tArray = JSON.parse(match[1]);
  20919. // var message = data.message;
  20920. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20921. // var jsonEnd = message.indexOf("```", jsonStart);
  20922. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20923. // tArray = JSON.parse(jsonString);
  20924. } catch (error) {
  20925. try {
  20926. let regex = new RegExp(/```json([\s\S]*?)```/);
  20927. let match = data.message.match(regex);
  20928. // eval("var aaa = " + match[0])
  20929. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20930. } catch (error) {
  20931. console.log("error_________________" + error);
  20932. }
  20933. console.log("error_________________" + error);
  20934. }
  20935. }
  20936. let toolsJson = {
  20937. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  20938. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  20939. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  20940. [_this.lang.ssTable]: { tool: 48, type: 1 },
  20941. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  20942. [_this.lang.ssQA]: { tool: 15, type: 2 },
  20943. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  20944. }
  20945. // answerQ:"sssssssssssssss"
  20946. for (var i = 0; i < tArray.length; i++) {
  20947. let _task = tArray[i]
  20948. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20949. _task.elist = _task.elist.filter(el=>{
  20950. el.isai = "1"
  20951. return el
  20952. })
  20953. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20954. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20955. if (_task.toolChoose.length) {
  20956. for (var j = 0; j < _task.toolChoose.length; j++) {
  20957. let _json = {
  20958. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20959. toolDetail: _task.toolChoose[j].detail,
  20960. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20961. askCount: 1,
  20962. askTitle: "",
  20963. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20964. }
  20965. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  20966. let answerQ = await _this.aiCreateQuestion(15, i)
  20967. _json.answerQ = answerQ.answerQ
  20968. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  20969. let testJson = await _this.aiCreateQuestion(45, i)
  20970. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20971. }
  20972. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20973. }
  20974. } else {
  20975. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20976. {
  20977. tool: [],
  20978. toolDetail: "",
  20979. toolType: 0,
  20980. askCount: 1,
  20981. askTitle: "",
  20982. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20983. },
  20984. )
  20985. }
  20986. }
  20987. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20988. _this.$forceUpdate();
  20989. _this.createTeacherAn();
  20990. }
  20991. callback ? callback() : ''
  20992. })
  20993. .catch((error) => {
  20994. _this.loading = false
  20995. console.log(error);
  20996. });
  20997. },
  20998. async aiGet32(messages, index) {
  20999. let _this = this
  21000. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21001. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21002. if (_this.infoData.length) {
  21003. for (var i = 0; i < _this.infoData.length; i++) {
  21004. if(_this.infoData[i].fileid){
  21005. fileid.push(_this.infoData[i].fileid)
  21006. }else {
  21007. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21008. if(_fileid){
  21009. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21010. _this.$forceUpdate();
  21011. if(_fileid != 1){
  21012. fileid.push(_fileid)
  21013. }
  21014. }
  21015. }
  21016. }
  21017. }
  21018. // let params = JSON.stringify({
  21019. // // "model": "Chat",
  21020. // model: 'gpt-3.5-turbo',
  21021. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21022. // max_tokens: 4096,
  21023. // top_p: 1,
  21024. // frequency_penalty: 0,
  21025. // presence_penalty: 0,
  21026. // messages: [{
  21027. // content: messages,
  21028. // role: 'user'
  21029. // }],
  21030. // stream: false,
  21031. // uid: this.userid,
  21032. // mind_map_question: "",
  21033. // })
  21034. // // let params = JSON.stringify({
  21035. // // message: {
  21036. // // anthropic_version: "bedrock-2023-05-31",
  21037. // // max_tokens: 4096,
  21038. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21039. // // top_p: 1,
  21040. // // messages: [{
  21041. // // content: messages,
  21042. // // role: 'user'
  21043. // // }], //
  21044. // // },
  21045. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21046. // // });
  21047. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21048. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21049. // console.log(response);
  21050. // let data = response.data.FunctionResponse
  21051. // if (data.choices && data.choices.length && data.choices[0].message) {
  21052. // console.log(data.choices[0].message.content);
  21053. // let tArray = JSON.parse(data.choices[0].message.content)
  21054. // // _this.unitJson[0].chapterInfo[0].task = []
  21055. // let toolsJson = {
  21056. // "电子白板": { tool: 1, type: 1 },
  21057. // "文档": { tool: 52, type: 1 },
  21058. // "思维导图": { tool: 3, type: 1 },
  21059. // "表格": { tool: 48, type: 1 },
  21060. // "作业提交": { tool: 16, type: 2 }
  21061. // }
  21062. // for (var i = 0; i < tArray.length; i++) {
  21063. // let _task = tArray[i]
  21064. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21065. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21066. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21067. // if (_task.toolChoose.length) {
  21068. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21069. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21070. // {
  21071. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21072. // toolDetail: _task.toolChoose[j].detail,
  21073. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21074. // askCount: 1,
  21075. // askTitle: "",
  21076. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21077. // },
  21078. // )
  21079. // }
  21080. // } else {
  21081. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21082. // {
  21083. // tool: [],
  21084. // toolDetail: "",
  21085. // toolType: 0,
  21086. // askCount: 1,
  21087. // askTitle: "",
  21088. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21089. // },
  21090. // )
  21091. // }
  21092. // }
  21093. // // if (_this.infoData.length) {
  21094. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21095. // // }
  21096. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21097. // _this.$forceUpdate();
  21098. // }
  21099. // // if (data.result) {
  21100. // // console.log(data.result);
  21101. // // let tArray = JSON.parse(data.result)
  21102. // // // _this.unitJson[0].chapterInfo[0].task = []
  21103. // // let toolsJson = {
  21104. // // "电子白板": { tool: 1, type: 1 },
  21105. // // "文档": { tool: 52, type: 1 },
  21106. // // "思维导图": { tool: 3, type: 1 },
  21107. // // "表格": { tool: 48, type: 1 },
  21108. // // "作业提交": { tool: 16, type: 2 }
  21109. // // }
  21110. // // for (var i = 0; i < tArray.length; i++) {
  21111. // // let _task = tArray[i]
  21112. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21113. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21114. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21115. // // if (_task.toolChoose.length) {
  21116. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  21117. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21118. // // {
  21119. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21120. // // toolDetail: _task.toolChoose[j].detail,
  21121. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21122. // // askCount: 1,
  21123. // // askTitle: "",
  21124. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21125. // // },
  21126. // // )
  21127. // // }
  21128. // // } else {
  21129. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21130. // // {
  21131. // // tool: [],
  21132. // // toolDetail: "",
  21133. // // toolType: 0,
  21134. // // askCount: 1,
  21135. // // askTitle: "",
  21136. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21137. // // },
  21138. // // )
  21139. // // }
  21140. // // }
  21141. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21142. // // _this.$forceUpdate();
  21143. // // }
  21144. // callback ? callback() : ''
  21145. // }).catch(function (error) {
  21146. // _this.loading = false
  21147. // console.log(error);
  21148. // });
  21149. let parm = {
  21150. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21151. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21152. session_name: uuidv4(),
  21153. userId: this.userid,
  21154. file_ids: fileid.length ? [...fileid] : '',
  21155. model: 'gpt-4o-2024-11-20',
  21156. temperature: this.mode == 3 ? 0.5 : 0.1,
  21157. }
  21158. this.ajax
  21159. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21160. .then(async (response) => {
  21161. console.log(response);
  21162. let data = response.data.FunctionResponse
  21163. if (data.message) {
  21164. console.log(data.message);
  21165. let tArray = {}
  21166. try {
  21167. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21168. } catch (error) {
  21169. console.log("error_________________" + error);
  21170. try {
  21171. let regex = new RegExp(/```json([\s\S]*?)```/);
  21172. let match = data.message.match(regex);
  21173. tArray = JSON.parse(match[1]);
  21174. // var message = data.message;
  21175. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21176. // var jsonEnd = message.indexOf("```", jsonStart);
  21177. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21178. // tArray = JSON.parse(jsonString);
  21179. } catch (error) {
  21180. try {
  21181. let regex = new RegExp(/```json([\s\S]*?)```/);
  21182. let match = data.message.match(regex);
  21183. // eval("var aaa = " + match[0])
  21184. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21185. } catch (error) {
  21186. console.log("error_________________" + error);
  21187. }
  21188. console.log("error_________________" + error);
  21189. }
  21190. }
  21191. let toolsJson = {
  21192. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21193. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21194. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21195. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21196. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21197. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21198. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21199. }
  21200. // answerQ:"sssssssssssssss"
  21201. // for (var i = 0; i < tArray.length; i++) {
  21202. let _task = tArray
  21203. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  21204. _task.elist = _task.elist.filter(el=>{
  21205. el.isai = 1
  21206. return el
  21207. })
  21208. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21209. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21210. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  21211. console.log("error_________________JSON不对重新生成");
  21212. _this.$message.error(_this.lang.ssNetWave)
  21213. _this.aiGet32(messages, index)
  21214. return;
  21215. }
  21216. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21217. if (_task.toolChoose && _task.toolChoose.length) {
  21218. for (var j = 0; j < _task.toolChoose.length; j++) {
  21219. let _json = {
  21220. tool: [],
  21221. toolDetail: _task.toolChoose[j].detail,
  21222. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21223. askCount: 1,
  21224. askTitle: "",
  21225. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21226. }
  21227. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21228. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  21229. let answerQ = await _this.aiCreateQuestion(15, index)
  21230. // _json.answerQ = answerQ.answerQ
  21231. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21232. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  21233. let testJson = await _this.aiCreateQuestion(45, index)
  21234. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21235. _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}
  21236. }
  21237. _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]
  21238. _this.$forceUpdate();
  21239. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21240. }
  21241. } else {
  21242. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21243. {
  21244. tool: [],
  21245. toolDetail: "",
  21246. toolType: 0,
  21247. askCount: 1,
  21248. askTitle: "",
  21249. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21250. },
  21251. )
  21252. }
  21253. // }
  21254. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21255. _this.$forceUpdate();
  21256. _this.createTeacherAn(index);
  21257. }
  21258. // callback ? callback() : ''
  21259. _this.taskLoading[index] = false
  21260. })
  21261. .catch((error) => {
  21262. // _this.loading = false
  21263. _this.taskLoading[index] = false
  21264. console.log(error);
  21265. });
  21266. },
  21267. async aiGetG321(messages, index, callback, callback2) {
  21268. let _this = this
  21269. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21270. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21271. if (_this.infoData.length) {
  21272. for (var i = 0; i < _this.infoData.length; i++) {
  21273. if(_this.infoData[i].fileid){
  21274. fileid.push(_this.infoData[i].fileid)
  21275. }else {
  21276. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21277. if(_fileid){
  21278. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21279. _this.$forceUpdate();
  21280. if(_fileid != 1){
  21281. fileid.push(_fileid)
  21282. }
  21283. }
  21284. }
  21285. }
  21286. }
  21287. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21288. let parm = {
  21289. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21290. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21291. session_name: uuidv4(),
  21292. userId: this.userid,
  21293. file_ids: fileid.length ? [...fileid] : '',
  21294. model: 'gpt-4o-2024-11-20',
  21295. temperature: this.mode == 3 ? 0.5 : 0.1,
  21296. }
  21297. this.ajax
  21298. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21299. .then(async (response) => {
  21300. console.log(response);
  21301. let data = response.data.FunctionResponse
  21302. if (data.message) {
  21303. let tArray = {}
  21304. try {
  21305. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21306. } catch (error) {
  21307. console.log("error_________________" + error);
  21308. try {
  21309. let regex = new RegExp(/```json([\s\S]*?)```/);
  21310. let match = data.message.match(regex);
  21311. tArray = JSON.parse(match[1]);
  21312. } catch (error) {
  21313. try {
  21314. let regex = new RegExp(/```json([\s\S]*?)```/);
  21315. let match = data.message.match(regex);
  21316. // eval("var aaa = " + match[0])
  21317. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21318. } catch (error) {
  21319. console.log("error_________________" + error);
  21320. }
  21321. console.log("error_________________" + error);
  21322. }
  21323. }
  21324. console.log(data.message);
  21325. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21326. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21327. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21328. _this.$forceUpdate();
  21329. _this.createTeacherAn(index);
  21330. }
  21331. callback ? callback(callback2) : ''
  21332. _this.taskGLoading[index][0] = false
  21333. _this.taskCancelToken1[index] = null
  21334. _this.$forceUpdate();
  21335. })
  21336. .catch((error) => {
  21337. // _this.loading = false
  21338. callback ? callback(callback2) : ''
  21339. _this.taskGLoading[index][0] = false
  21340. _this.taskCancelToken1[index] = null
  21341. _this.$forceUpdate();
  21342. console.log(error);
  21343. });
  21344. },
  21345. async aiGetG321L(messages, index, callback, callback2) {
  21346. let _this = this
  21347. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21348. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21349. if (_this.infoData.length) {
  21350. for (var i = 0; i < _this.infoData.length; i++) {
  21351. if(_this.infoData[i].fileid){
  21352. fileid.push(_this.infoData[i].fileid)
  21353. }else {
  21354. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21355. if(_fileid){
  21356. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21357. _this.$forceUpdate();
  21358. if(_fileid != 1){
  21359. fileid.push(_fileid)
  21360. }
  21361. }
  21362. }
  21363. }
  21364. }
  21365. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21366. let _uuid = uuidv4();
  21367. let parm = {
  21368. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21369. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21370. session_name: uuidv4(),
  21371. userId: this.userid,
  21372. file_ids: fileid.length ? [...fileid] : '',
  21373. uid: _uuid,
  21374. // model: 'gpt-4o-2024-11-20',
  21375. model: 'gpt-4o-mini',
  21376. temperature: this.mode == 3 ? 0.5 : 0.1,
  21377. }
  21378. this.ajax
  21379. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21380. .then(async (response) => {
  21381. console.log(response);
  21382. // }
  21383. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21384. } else {
  21385. _this.$message.warning(response.data.FunctionResponse.result);
  21386. callback ? callback(callback2) : ''
  21387. _this.taskGLoading[index][0] = false
  21388. _this.ttaskGLoading[index][0] = false
  21389. _this.taskCancelToken1[index] = null
  21390. }
  21391. _this.taskCancelToken1[index] = null
  21392. _this.$forceUpdate();
  21393. })
  21394. .catch((error) => {
  21395. // _this.loading = false
  21396. callback ? callback(callback2) : ''
  21397. _this.taskGLoading[index][0] = false
  21398. _this.ttaskGLoading[index][0] = false
  21399. _this.taskCancelToken1[index] = null
  21400. _this.$forceUpdate();
  21401. console.log(error);
  21402. });
  21403. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21404. },
  21405. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21406. try {
  21407. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21408. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21409. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21410. } catch(error){
  21411. console.log('EventSource error:', error);
  21412. this.$message.error(this.lang.ssTooManyReq)
  21413. callback ? callback(callback2) : ''
  21414. this.taskGLoading[index][0] = false
  21415. this.ttaskGLoading[index][0] = false
  21416. this.taskCancelToken1[index][0] = null
  21417. return;
  21418. }
  21419. let _allText = "";
  21420. let _mdText = "";
  21421. let _iindex = 0
  21422. this.isTaskCancelSource1[index].onmessage = _e => {
  21423. let _eData = JSON.parse(_e.data).content;
  21424. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21425. //对话已经完成
  21426. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21427. callback ? callback(callback2) : ''
  21428. this.isTaskCancelSource1[index].close();
  21429. this.isTaskCancelSource1[index] = null;
  21430. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21431. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21432. this.createTeacherAn(index);
  21433. this.taskGLoading[index][0] = false
  21434. this.ttaskGLoading[index][0] = false
  21435. this.taskCancelToken1[index][0] = null
  21436. return;
  21437. } else {
  21438. _iindex++
  21439. //对话还在继续
  21440. let _text = "";
  21441. _text = _eData.replaceAll("'", "");
  21442. if (_allText == "") {
  21443. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21444. } else {
  21445. _allText += _text;
  21446. }
  21447. _mdText = _allText + "_";
  21448. _mdText = _mdText.replace(/\\n/g, "\n");
  21449. _mdText = _mdText.replace(/\\/g, "");
  21450. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21451. //转化返回的回复流数据.
  21452. if(_iindex == 10){
  21453. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21454. _iindex = 0
  21455. }
  21456. this.taskGLoading[index][0] = false
  21457. // 处理流数据
  21458. }
  21459. // this.$forceUpdate();
  21460. };
  21461. let _this = this
  21462. this.isTaskCancelSource1[index].onerror = function(event) {
  21463. // 处理错误,可以尝试重新连接
  21464. console.log('EventSource error:', event);
  21465. _this.$message.error(this.lang.ssTooManyReq)
  21466. callback ? callback(callback2) : ''
  21467. _this.taskGLoading[index][0] = false
  21468. _this.ttaskGLoading[index][0] = false
  21469. _this.isTaskCancelSource1[index].close();
  21470. _this.isTaskCancelSource1[index] = null;
  21471. _this.taskCancelToken1[index][0] = null
  21472. };
  21473. },
  21474. async aiGetG322(messages, index, callback) {
  21475. let _this = this
  21476. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21477. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21478. if (_this.infoData.length) {
  21479. for (var i = 0; i < _this.infoData.length; i++) {
  21480. if(_this.infoData[i].fileid){
  21481. fileid.push(_this.infoData[i].fileid)
  21482. }else {
  21483. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21484. if(_fileid){
  21485. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21486. _this.$forceUpdate();
  21487. if(_fileid != 1){
  21488. fileid.push(_fileid)
  21489. }
  21490. }
  21491. }
  21492. }
  21493. }
  21494. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21495. let parm = {
  21496. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21497. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21498. session_name: uuidv4(),
  21499. userId: this.userid,
  21500. file_ids: fileid.length ? [...fileid] : '',
  21501. model: 'gpt-4o-2024-11-20',
  21502. temperature: this.mode == 3 ? 0.5 : 0.1,
  21503. }
  21504. this.ajax
  21505. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21506. .then(async (response) => {
  21507. console.log(response);
  21508. let data = response.data.FunctionResponse
  21509. if (data.message) {
  21510. console.log(data.message);
  21511. let tArray = {}
  21512. try {
  21513. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21514. } catch (error) {
  21515. console.log("error_________________" + error);
  21516. try {
  21517. let regex = new RegExp(/```json([\s\S]*?)```/);
  21518. let match = data.message.match(regex);
  21519. tArray = JSON.parse(match[1]);
  21520. } catch (error) {
  21521. try {
  21522. let regex = new RegExp(/```json([\s\S]*?)```/);
  21523. let match = data.message.match(regex);
  21524. // eval("var aaa = " + match[0])
  21525. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21526. } catch (error) {
  21527. console.log("error_________________" + error);
  21528. }
  21529. console.log("error_________________" + error);
  21530. }
  21531. }
  21532. let toolsJson = {
  21533. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21534. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21535. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21536. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21537. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21538. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21539. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21540. }
  21541. if(_this.languageSetting == 1){
  21542. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21543. }else if(_this.languageSetting == 2){
  21544. toolsJson = {
  21545. "Mind Map Tool": { tool: 1, type: 1 },
  21546. "Document tool": { tool: 52, type: 1 },
  21547. "Diagram Tool": { tool: 3, type: 1 },
  21548. "Spreadsheet tool": { tool: 48, type: 1 },
  21549. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21550. "Q&A Tool": { tool: 15, type: 2 },
  21551. "Choice tool": { tool: 45, type: 2 },
  21552. }
  21553. }
  21554. let _task = tArray
  21555. if(!_task.toolChoose){
  21556. console.log("error_________________JSON不对重新生成");
  21557. _this.$message.error(_this.lang.ssNetWave)
  21558. _this.aiGetG322(messages, index)
  21559. return;
  21560. }
  21561. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21562. if (_task.toolChoose && _task.toolChoose.length) {
  21563. for (var j = 0; j < _task.toolChoose.length; j++) {
  21564. let _json = {
  21565. tool: [],
  21566. toolDetail: _task.toolChoose[j].detail,
  21567. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21568. askCount: 1,
  21569. askTitle: "",
  21570. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21571. }
  21572. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21573. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA) || _task.toolChoose[j].tool == 'Q&A Tool'){
  21574. let answerQ = await _this.aiCreateQuestion(15, index)
  21575. // _json.answerQ = answerQ.answerQ
  21576. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21577. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice) || _task.toolChoose[j].tool == 'Choice tool'){
  21578. let testJson = await _this.aiCreateQuestion(45, index)
  21579. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21580. _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}
  21581. }
  21582. _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]
  21583. _this.$forceUpdate();
  21584. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21585. }
  21586. } else {
  21587. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21588. {
  21589. tool: [],
  21590. toolDetail: "",
  21591. toolType: 0,
  21592. askCount: 1,
  21593. askTitle: "",
  21594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21595. },
  21596. )
  21597. }
  21598. //
  21599. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21600. _this.$forceUpdate();
  21601. // _this.$nextTick(()=>{
  21602. // setTimeout(() => {
  21603. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21604. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21605. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21606. // }
  21607. // }
  21608. // }, 2000);
  21609. // })
  21610. }
  21611. callback ? callback() : ''
  21612. _this.taskGLoading[index][1] = false
  21613. _this.taskCancelToken2[index] = null
  21614. _this.$forceUpdate();
  21615. })
  21616. .catch((error) => {
  21617. // _this.loading = false
  21618. callback ? callback() : ''
  21619. _this.taskGLoading[index][1] = false
  21620. _this.taskCancelToken2[index] = null
  21621. _this.$forceUpdate();
  21622. console.log(error);
  21623. });
  21624. },
  21625. async aiGetG323(messages, index) {
  21626. let _this = this
  21627. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21628. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21629. if (_this.infoData.length) {
  21630. for (var i = 0; i < _this.infoData.length; i++) {
  21631. if(_this.infoData[i].fileid){
  21632. fileid.push(_this.infoData[i].fileid)
  21633. }else {
  21634. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21635. if(_fileid){
  21636. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21637. _this.$forceUpdate();
  21638. if(_fileid != 1){
  21639. fileid.push(_fileid)
  21640. }
  21641. }
  21642. }
  21643. }
  21644. }
  21645. let parm = {
  21646. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21647. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21648. session_name: uuidv4(),
  21649. userId: this.userid,
  21650. file_ids: fileid.length ? [...fileid] : '',
  21651. model: 'gpt-4o-2024-11-20',
  21652. temperature: this.mode == 3 ? 0.5 : 0.1,
  21653. }
  21654. this.ajax
  21655. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21656. .then(async (response) => {
  21657. console.log(response);
  21658. let data = response.data.FunctionResponse
  21659. if (data.message) {
  21660. console.log(data.message);
  21661. let tArray = {}
  21662. try {
  21663. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21664. } catch (error) {
  21665. console.log("error_________________" + error);
  21666. try {
  21667. let regex = new RegExp(/```json([\s\S]*?)```/);
  21668. let match = data.message.match(regex);
  21669. tArray = JSON.parse(match[1]);
  21670. } catch (error) {
  21671. try {
  21672. let regex = new RegExp(/```json([\s\S]*?)```/);
  21673. let match = data.message.match(regex);
  21674. // eval("var aaa = " + match[0])
  21675. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21676. } catch (error) {
  21677. console.log("error_________________" + error);
  21678. }
  21679. console.log("error_________________" + error);
  21680. }
  21681. }
  21682. let _task = tArray
  21683. if(!_task.elist){
  21684. console.log("error_________________JSON不对重新生成");
  21685. _this.$message.error(this.lang.ssNetWave)
  21686. _this.aiGetG322(messages, index)
  21687. return;
  21688. }
  21689. _task.elist = _task.elist.filter(el=>{
  21690. el.isai = "1"
  21691. return el
  21692. })
  21693. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21694. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21695. _this.$forceUpdate();
  21696. }
  21697. // callback ? callback() : ''
  21698. _this.taskGLoading[index][2] = false
  21699. })
  21700. .catch((error) => {
  21701. // _this.loading = false
  21702. _this.taskGLoading[index][2] = false
  21703. console.log(error);
  21704. });
  21705. },
  21706. async aiCreateQuestion(type, task) {
  21707. let _this = this
  21708. return new Promise((resolve, reject) => {
  21709. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21710. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21711. if (_this.infoData.length) {
  21712. for (var i = 0; i < _this.infoData.length; i++) {
  21713. if(_this.infoData[i].fileid){
  21714. fileid.push(_this.infoData[i].fileid)
  21715. }
  21716. }
  21717. }
  21718. let sub = []
  21719. let mclass = []
  21720. if (this.courseTypeId.length) {
  21721. for (var i = 0; i < this.courseTypeId.length; i++) {
  21722. let _sid = this.courseTypeId[i]
  21723. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21724. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21725. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21726. }
  21727. }
  21728. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21729. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21730. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21731. }
  21732. }
  21733. }
  21734. }
  21735. let messages = ""
  21736. if(type == 15){
  21737. messages = `NOTICE
  21738. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21739. Language: ${this.getLang()}
  21740. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21741. Instruction: Based on the context, follow "Format example", write content.
  21742. # Context
  21743. ## 任务
  21744. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21745. ## 限制
  21746. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21747. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21748. ## 课程简介
  21749. 课程名字:${_this.courseName}
  21750. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21751. ${sub.length ? '学科:' + sub.join(",") : ''}
  21752. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21753. ## 教案
  21754. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21755. # Format example
  21756. {"answerQ":"问题"}
  21757. `
  21758. }else if(type == 45){
  21759. messages = `NOTICE
  21760. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21761. Language: ${this.getLang()}
  21762. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21763. Instruction: Based on the context, follow "Format example", write content.
  21764. # Context
  21765. ## 任务
  21766. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21767. ## 限制
  21768. - 生成题目禁止重复。
  21769. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21770. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21771. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21772. ## 课程简介
  21773. 课程名字:${_this.courseName}
  21774. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21775. ${sub.length ? '学科:' + sub.join(",") : ''}
  21776. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21777. ## 教案
  21778. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21779. # Format example
  21780. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21781. `
  21782. }
  21783. let parm = {
  21784. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21785. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21786. session_name: uuidv4(),
  21787. userId: this.userid,
  21788. file_ids: fileid.length ? [...fileid] : '',
  21789. model: 'gpt-4o-2024-11-20',
  21790. temperature: this.mode == 3 ? 0.5 : 0.1,
  21791. }
  21792. this.ajax
  21793. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21794. .then((response) => {
  21795. console.log(response);
  21796. let data = response.data.FunctionResponse
  21797. if (data.message) {
  21798. console.log(data.message);
  21799. try {
  21800. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21801. let tArray = {}
  21802. try {
  21803. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21804. } catch (error) {
  21805. console.log("error_________________" + error);
  21806. try {
  21807. let regex = new RegExp(/```json([\s\S]*?)```/);
  21808. let match = data.message.match(regex);
  21809. tArray = JSON.parse(match[1]);
  21810. // var message = data.message;
  21811. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21812. // var jsonEnd = message.indexOf("```", jsonStart);
  21813. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21814. // tArray = JSON.parse(jsonString);
  21815. } catch (error) {
  21816. try {
  21817. let regex = new RegExp(/```json([\s\S]*?)```/);
  21818. let match = data.message.match(regex);
  21819. // eval("var aaa = " + match[0])
  21820. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21821. } catch (error) {
  21822. try {
  21823. let regex = new RegExp(/```json([\s\S]*?)```/);
  21824. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21825. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21826. // eval("var aaa = " + match[0])
  21827. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21828. } catch (error) {
  21829. console.log("error_________________" + error);
  21830. }
  21831. console.log("error_________________" + error);
  21832. }
  21833. console.log("error_________________" + error);
  21834. }
  21835. }
  21836. resolve(tArray)
  21837. } catch (error) {
  21838. if(type == 15){
  21839. resolve({answerQ: _this.lang.ssTopic})
  21840. }else if(type == 45){
  21841. 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"}])
  21842. }
  21843. }
  21844. }else if(type == 15){
  21845. resolve({answerQ: _this.lang.ssTopic})
  21846. }else if(type == 45){
  21847. 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"}])
  21848. }
  21849. })
  21850. .catch((error) => {
  21851. if(type == 15){
  21852. resolve({answerQ: _this.lang.ssTopic})
  21853. }else if(type == 45){
  21854. 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"}])
  21855. }
  21856. console.log(error);
  21857. });
  21858. });
  21859. },
  21860. async aiChoice(type){
  21861. if(type == 45){
  21862. this.choiceLoading = true
  21863. }
  21864. let _this = this
  21865. let fileid = []
  21866. if (_this.xuanzeInfoData.length) {
  21867. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21868. if(_this.xuanzeInfoData[i].fileid){
  21869. fileid.push(_this.xuanzeInfoData[i].fileid)
  21870. }
  21871. }
  21872. }else{
  21873. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21874. if (_this.infoData.length) {
  21875. for (var i = 0; i < _this.infoData.length; i++) {
  21876. if(_this.infoData[i].fileid){
  21877. fileid.push(_this.infoData[i].fileid)
  21878. }
  21879. }
  21880. }
  21881. }
  21882. let sub = []
  21883. let mclass = []
  21884. if (this.courseTypeId.length) {
  21885. for (var i = 0; i < this.courseTypeId.length; i++) {
  21886. let _sid = this.courseTypeId[i]
  21887. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21888. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21889. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21890. }
  21891. }
  21892. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21893. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21894. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21895. }
  21896. }
  21897. }
  21898. }
  21899. let messages = ""
  21900. if(type == 15){
  21901. messages = `NOTICE
  21902. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21903. Language: ${this.getLang()}
  21904. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21905. Instruction: Based on the context, follow "Format example", write content.
  21906. # Context
  21907. ## 任务
  21908. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21909. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  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. {"answerQ":"问题"}
  21922. `
  21923. }else if(type == 45){
  21924. messages = `NOTICE
  21925. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21926. Language: ${this.getLang()}
  21927. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21928. Instruction: Based on the context, follow "Format example", write content.
  21929. # Context
  21930. ## 任务
  21931. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21932. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21933. ## 限制
  21934. - 生成题目禁止重复。
  21935. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21936. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21937. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21938. ## 课程简介
  21939. 课程名字:${_this.courseName}
  21940. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21941. ${sub.length ? '学科:' + sub.join(",") : ''}
  21942. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21943. ## 教案
  21944. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21945. # Format example
  21946. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21947. `
  21948. }
  21949. let parm = {
  21950. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21951. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21952. session_name: uuidv4(),
  21953. userId: this.userid,
  21954. file_ids: fileid.length ? [...fileid] : '',
  21955. model: 'gpt-4o-2024-11-20',
  21956. temperature: this.mode == 3 ? 0.5 : 0.1,
  21957. }
  21958. this.ajax
  21959. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21960. .then((response) => {
  21961. console.log(response);
  21962. let data = response.data.FunctionResponse
  21963. if (data.message) {
  21964. console.log(data.message);
  21965. try {
  21966. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21967. let tArray = {}
  21968. try {
  21969. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21970. } catch (error) {
  21971. console.log("error_________________" + error);
  21972. try {
  21973. let regex = new RegExp(/```json([\s\S]*?)```/);
  21974. let match = data.message.match(regex);
  21975. tArray = JSON.parse(match[1]);
  21976. // var message = data.message;
  21977. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21978. // var jsonEnd = message.indexOf("```", jsonStart);
  21979. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21980. // tArray = JSON.parse(jsonString);
  21981. } catch (error) {
  21982. try {
  21983. let regex = new RegExp(/```json([\s\S]*?)```/);
  21984. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21985. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21986. // eval("var aaa = " + match[0])
  21987. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21988. } catch (error) {
  21989. console.log("error_________________" + error);
  21990. }
  21991. console.log("error_________________" + error);
  21992. }
  21993. }
  21994. if(type == 45){
  21995. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21996. }
  21997. } catch (error) {
  21998. if(type == 15){
  21999. {answerQ: _this.lang.ssTopic}
  22000. }else if(type == 45){
  22001. 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"}]
  22002. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22003. }
  22004. _this.choiceLoading = false
  22005. }
  22006. }else if(type == 15){
  22007. {answerQ: _this.lang.ssTopic}
  22008. }else if(type == 45){
  22009. 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"}]
  22010. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22011. }
  22012. _this.choiceLoading = false
  22013. }).catch((error) => {
  22014. if(type == 15){
  22015. {answerQ: _this.lang.ssTopic}
  22016. }else if(type == 45){
  22017. 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"}]
  22018. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22019. }
  22020. console.log(error);
  22021. _this.choiceLoading = false
  22022. });
  22023. },
  22024. async aiGet4(messages, callback, clickType) {
  22025. let _this = this
  22026. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22027. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22028. if (_this.infoData.length) {
  22029. for (var i = 0; i < _this.infoData.length; i++) {
  22030. if(_this.infoData[i].fileid){
  22031. fileid.push(_this.infoData[i].fileid)
  22032. }else {
  22033. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22034. if(_fileid){
  22035. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22036. _this.$forceUpdate();
  22037. if(_fileid != 1){
  22038. fileid.push(_fileid)
  22039. }
  22040. }
  22041. }
  22042. }
  22043. }
  22044. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  22045. if(_this.cankaoInfoData[i].fileid){
  22046. fileid.push(_this.cankaoInfoData[i].fileid)
  22047. }else {
  22048. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  22049. if(_fileid){
  22050. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22051. _this.$forceUpdate();
  22052. if(_fileid != 1){
  22053. fileid.push(_fileid)
  22054. }
  22055. }
  22056. }
  22057. }
  22058. // let params = JSON.stringify({
  22059. // // "model": "Chat",
  22060. // model: 'gpt-3.5-turbo',
  22061. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22062. // max_tokens: 4096,
  22063. // top_p: 1,
  22064. // frequency_penalty: 0,
  22065. // presence_penalty: 0,
  22066. // messages: [{
  22067. // content: messages,
  22068. // role: 'user'
  22069. // }],
  22070. // stream: false,
  22071. // uid: this.userid,
  22072. // mind_map_question: "",
  22073. // })
  22074. // // let params = JSON.stringify({
  22075. // // message: {
  22076. // // anthropic_version: "bedrock-2023-05-31",
  22077. // // max_tokens: 4096,
  22078. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  22079. // // top_p: 1,
  22080. // // messages: [{
  22081. // // content: messages,
  22082. // // role: 'user'
  22083. // // }], //
  22084. // // },
  22085. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22086. // // });
  22087. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22088. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22089. // console.log(response);
  22090. // let data = response.data.FunctionResponse
  22091. // if (data.choices && data.choices.length && data.choices[0].message) {
  22092. // console.log(data.choices[0].message.content);
  22093. // let dArray = JSON.parse(data.choices[0].message.content)
  22094. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  22095. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  22096. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22097. // for (var i = 0; i < dArray.length; i++) {
  22098. // let _task = dArray[i]
  22099. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22100. // task: _task.task,
  22101. // taskDetail: "",
  22102. // taskDetail2: "",
  22103. // taskDetail3: _task.detail,
  22104. // chapterData: [],
  22105. // toolText: "",
  22106. // toolChoose: [
  22107. // {
  22108. // tool: [],
  22109. // toolDetail: "",
  22110. // toolType: 0,
  22111. // askCount: 1,
  22112. // askTitle: "",
  22113. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22114. // },
  22115. // ],
  22116. // isShowTools: false,
  22117. // askCount: 1,
  22118. // isFold: 0,
  22119. // askTitle: "",
  22120. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22121. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22122. // homeworkList: [],
  22123. // })
  22124. // }
  22125. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22126. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22127. // _this.$forceUpdate();
  22128. // } else {
  22129. // for (var i = 0; i < dArray.length; i++) {
  22130. // let _task = dArray[i]
  22131. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22132. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22133. // }else {
  22134. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22135. // task: _task.task,
  22136. // taskDetail: "",
  22137. // taskDetail2: "",
  22138. // taskDetail3: _task.detail,
  22139. // chapterData: [],
  22140. // toolText: "",
  22141. // toolChoose: [
  22142. // {
  22143. // tool: [],
  22144. // toolDetail: "",
  22145. // toolType: 0,
  22146. // askCount: 1,
  22147. // askTitle: "",
  22148. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22149. // },
  22150. // ],
  22151. // isShowTools: false,
  22152. // askCount: 1,
  22153. // isFold: 0,
  22154. // askTitle: "",
  22155. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22156. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22157. // homeworkList: [],
  22158. // }
  22159. // }
  22160. // }
  22161. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22162. // _this.$forceUpdate();
  22163. // }
  22164. // }
  22165. // // if (data.result) {
  22166. // // console.log(data.result);
  22167. // // let dArray = JSON.parse(data.result)
  22168. // // _this.teacherText = JSON.parse(data.result)
  22169. // // for (var i = 0; i < dArray.length; i++) {
  22170. // // let _task = dArray[i]
  22171. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22172. // // }
  22173. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22174. // // _this.$forceUpdate();
  22175. // // }
  22176. // callback ? callback() : ''
  22177. // _this.loading = false
  22178. // }).catch(function (error) {
  22179. // _this.loading = false
  22180. // console.log(error);
  22181. // });
  22182. let parm = {
  22183. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22184. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22185. session_name: uuidv4(),
  22186. userId: this.userid,
  22187. file_ids: fileid.length ? [...fileid] : '',
  22188. model: 'gpt-4o-2024-11-20',
  22189. temperature: this.mode == 3 ? 0.5 : 0.1,
  22190. }
  22191. this.ajax
  22192. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22193. .then((response) => {
  22194. console.log(response);
  22195. let data = response.data.FunctionResponse
  22196. if (data.message) {
  22197. console.log(data.message);
  22198. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22199. let dArray = []
  22200. try {
  22201. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22202. } catch (error) {
  22203. console.log("error_________________" + error);
  22204. try {
  22205. let regex = new RegExp(/```json([\s\S]*?)```/);
  22206. let match = data.message.match(regex);
  22207. dArray = JSON.parse(match[1]);
  22208. // var message = data.message;
  22209. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22210. // var jsonEnd = message.indexOf("```", jsonStart);
  22211. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  22212. // dArray = JSON.parse(jsonString);
  22213. } catch (error) {
  22214. _this.aiGet4(messages, callback)
  22215. _this.$message.error(this.lang.ssNetWave)
  22216. console.log("error_________________" + error);
  22217. return;
  22218. console.log("error_________________" + error);
  22219. _this.loading = false
  22220. }
  22221. }
  22222. try {
  22223. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22224. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22225. if(_this.panTeacher() > 0){
  22226. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22227. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22228. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22229. }
  22230. for (var i = 0; i < dArray.length; i++) {
  22231. let _task = dArray[i]
  22232. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22233. _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(':','')
  22234. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22235. }else {
  22236. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22237. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22238. taskDetail: "",
  22239. taskDetail2: "",
  22240. taskDetail3: _task.detail,
  22241. chapterData: [],
  22242. toolText: "",
  22243. toolChoose: [
  22244. {
  22245. tool: [],
  22246. toolDetail: "",
  22247. toolType: 0,
  22248. askCount: 1,
  22249. askTitle: "",
  22250. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22251. },
  22252. ],
  22253. isShowTools: false,
  22254. askCount: 1,
  22255. isFold: 0,
  22256. askTitle: "",
  22257. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22258. checkJson: [{ checkCount: [], checkPerent: [] }],
  22259. homeworkList: [],
  22260. })
  22261. }
  22262. }
  22263. }else {
  22264. _this.unitJson[0].chapterInfo[0].taskJson = []
  22265. for (var i = 0; i < dArray.length; i++) {
  22266. let _task = dArray[i]
  22267. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22268. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22269. taskDetail: "",
  22270. taskDetail2: "",
  22271. taskDetail3: _task.detail,
  22272. chapterData: [],
  22273. toolText: "",
  22274. toolChoose: [
  22275. {
  22276. tool: [],
  22277. toolDetail: "",
  22278. toolType: 0,
  22279. askCount: 1,
  22280. askTitle: "",
  22281. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22282. },
  22283. ],
  22284. isShowTools: false,
  22285. askCount: 1,
  22286. isFold: 0,
  22287. askTitle: "",
  22288. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22289. checkJson: [{ checkCount: [], checkPerent: [] }],
  22290. homeworkList: [],
  22291. })
  22292. }
  22293. }
  22294. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22295. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22296. _this.$forceUpdate();
  22297. } else {
  22298. for (var i = 0; i < dArray.length; i++) {
  22299. let _task = dArray[i]
  22300. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22301. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22302. }else {
  22303. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22304. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22305. taskDetail: "",
  22306. taskDetail2: "",
  22307. taskDetail3: _task.detail,
  22308. chapterData: [],
  22309. toolText: "",
  22310. toolChoose: [
  22311. {
  22312. tool: [],
  22313. toolDetail: "",
  22314. toolType: 0,
  22315. askCount: 1,
  22316. askTitle: "",
  22317. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22318. },
  22319. ],
  22320. isShowTools: false,
  22321. askCount: 1,
  22322. isFold: 0,
  22323. askTitle: "",
  22324. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22325. checkJson: [{ checkCount: [], checkPerent: [] }],
  22326. homeworkList: [],
  22327. }
  22328. }
  22329. }
  22330. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22331. _this.$forceUpdate();
  22332. }
  22333. } catch (error) {
  22334. _this.$message.error(this.lang.ssNetWave)
  22335. _this.aiGet4(messages, callback)
  22336. console.log("error_________________" + error);
  22337. return;
  22338. // _this.loading = false
  22339. }
  22340. }
  22341. callback ? callback() : ''
  22342. })
  22343. .catch((error) => {
  22344. _this.loading = false
  22345. console.log(error);
  22346. });
  22347. },
  22348. async aiDetail(msg, index) {
  22349. let _this = this
  22350. const _tindex = 'task-' + index
  22351. const _tindex2 = index
  22352. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22353. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22354. if (_this.infoData.length) {
  22355. for (var i = 0; i < _this.infoData.length; i++) {
  22356. if(_this.infoData[i].fileid){
  22357. fileid.push(_this.infoData[i].fileid)
  22358. }else {
  22359. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22360. if(_fileid){
  22361. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22362. _this.$forceUpdate();
  22363. if(_fileid != 1){
  22364. fileid.push(_fileid)
  22365. }
  22366. }
  22367. }
  22368. }
  22369. }
  22370. let url = []
  22371. if (this.infoData.length) {
  22372. for (var i = 0; i < this.infoData.length; i++) {
  22373. url.push(this.infoData[i].url)
  22374. }
  22375. }
  22376. let messages = `NOTICE
  22377. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22378. Language: ${this.getLang()}
  22379. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22380. Instruction: Based on the context, follow "Format example", write content.
  22381. #Context
  22382. ## 要求
  22383. ${msg}
  22384. ## 参考信息
  22385. 任务名称:${_this.aiCallBack.task}
  22386. ## 优化内容
  22387. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22388. // -------- #补充参考资料和
  22389. // ## 补充参考资料
  22390. // - 补充资料:${url.join(",")}
  22391. // - 补充描述:${_this.courseText2}
  22392. _this.taskDetailLoading.push(_tindex)
  22393. _this.ttaskDetailLoading.push(_tindex)
  22394. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22395. let _uuid = uuidv4();
  22396. // let params = JSON.stringify({
  22397. // // "model": "Chat",
  22398. // model: 'gpt-3.5-turbo',
  22399. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22400. // max_tokens: 4096,
  22401. // top_p: 1,
  22402. // frequency_penalty: 0,
  22403. // presence_penalty: 0,
  22404. // messages: [{
  22405. // content: messages,
  22406. // role: 'user'
  22407. // }],
  22408. // uid: _uuid,
  22409. // mind_map_question: "",
  22410. // })
  22411. let params = {
  22412. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22413. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22414. session_name: _uuid,
  22415. userId: _this.userid,
  22416. uid: _uuid,
  22417. file_ids: fileid.length ? [...fileid] : '',
  22418. model: 'gpt-4o-2024-11-20',
  22419. temperature: this.mode == 3 ? 0.5 : 0.1,
  22420. }
  22421. // let params = JSON.stringify({
  22422. // message: {
  22423. // anthropic_version: "bedrock-2023-05-31",
  22424. // max_tokens: 4096,
  22425. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22426. // top_p: 1,
  22427. // messages: [{
  22428. // "role": "user",
  22429. // "content": messages
  22430. // }] ,
  22431. // },
  22432. // uid: _uuid,
  22433. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22434. // });
  22435. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22436. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22437. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22438. console.log(response);
  22439. // let data = response.data.FunctionResponse
  22440. // if (data.choices && data.choices.length && data.choices[0].message) {
  22441. // console.log(data.choices[0].message.content);
  22442. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22443. // _this.$forceUpdate()
  22444. // }
  22445. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22446. } else {
  22447. _this.$message.warning(response.data.FunctionResponse.result);
  22448. }
  22449. _this.isOutlineTaskCancelToken[index] = null
  22450. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22451. }).catch(function (error) {
  22452. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22453. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22454. _this.isOutlineTaskCancelToken[index] = null
  22455. if(error && error.message != 'Request canceled by the user.'){
  22456. _this.$message.error(this.lang.ssTooManyReq)
  22457. }
  22458. console.log(error);
  22459. });
  22460. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22461. },
  22462. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22463. try {
  22464. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22465. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22466. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22467. } catch(error){
  22468. console.log('EventSource error:', error);
  22469. this.$message.error(this.lang.ssTooManyReq)
  22470. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22471. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22472. this.isOutlineTaskCancelToken[_tindex2] = null
  22473. return;
  22474. }
  22475. let _allText = "";
  22476. let _mdText = "";
  22477. let _iindex = 0
  22478. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22479. let _eData = JSON.parse(_e.data).content;
  22480. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22481. //对话已经完成
  22482. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22483. this.isOutlineTaskCancelSource[_tindex2].close();
  22484. this.isOutlineTaskCancelSource[_tindex2] = null;
  22485. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22486. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22487. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22488. this.isOutlineTaskCancelToken[_tindex2] = null
  22489. return;
  22490. } else {
  22491. _iindex++
  22492. //对话还在继续
  22493. let _text = "";
  22494. _text = _eData.replaceAll("'", "");
  22495. if (_allText == "") {
  22496. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22497. } else {
  22498. _allText += _text;
  22499. }
  22500. _mdText = _allText + "_";
  22501. _mdText = _mdText.replace(/\\n/g, "\n");
  22502. _mdText = _mdText.replace(/\\/g, "");
  22503. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22504. //转化返回的回复流数据.
  22505. if(_iindex == 10){
  22506. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22507. _iindex = 0
  22508. }
  22509. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22510. // 处理流数据
  22511. }
  22512. // this.$forceUpdate();
  22513. };
  22514. let _this = this
  22515. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22516. // 处理错误,可以尝试重新连接
  22517. console.log('EventSource error:', event);
  22518. _this.$message.error(this.lang.ssTooManyReq)
  22519. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22520. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22521. _this.isOutlineTaskCancelToken[_tindex2] = null
  22522. _this.isOutlineTaskCancelSource[_tindex2].close();
  22523. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22524. };
  22525. },
  22526. async aiOutlineDetail(msg, index) {
  22527. let _this = this
  22528. const _tindex = 'task-' + index
  22529. const _tindex2 = index
  22530. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22531. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22532. if (_this.infoData.length) {
  22533. for (var i = 0; i < _this.infoData.length; i++) {
  22534. if(_this.infoData[i].fileid){
  22535. fileid.push(_this.infoData[i].fileid)
  22536. }else {
  22537. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22538. if(_fileid){
  22539. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22540. _this.$forceUpdate();
  22541. if(_fileid != 1){
  22542. fileid.push(_fileid)
  22543. }
  22544. }
  22545. }
  22546. }
  22547. }
  22548. let url = []
  22549. if (this.infoData.length) {
  22550. for (var i = 0; i < this.infoData.length; i++) {
  22551. url.push(this.infoData[i].url)
  22552. }
  22553. }
  22554. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22555. let messages = `NOTICE
  22556. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22557. Language: ${this.getLang()}
  22558. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22559. Instruction: Based on the context, follow "Format example", write content.
  22560. #Context
  22561. ## 要求
  22562. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22563. ## 参考信息
  22564. 课程名字:${_this.courseName}
  22565. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22566. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22567. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22568. # Format example
  22569. 子任务名称:名称应该总结了该任务是在做什么,
  22570. 子任务设计:任务设计。
  22571. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22572. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22573. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22574. `
  22575. // 教学目标:教学目标。
  22576. // 任务设计:任务设计。
  22577. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22578. // -------- #补充参考资料和
  22579. // ## 补充参考资料
  22580. // - 补充资料:${url.join(",")}
  22581. // - 补充描述:${_this.courseText2}
  22582. _this.taskDetailLoading.push(_tindex)
  22583. _this.ttaskDetailLoading.push(_tindex)
  22584. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22585. let _uuid = uuidv4();
  22586. // let params = JSON.stringify({
  22587. // // "model": "Chat",
  22588. // model: 'gpt-3.5-turbo',
  22589. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22590. // max_tokens: 4096,
  22591. // top_p: 1,
  22592. // frequency_penalty: 0,
  22593. // presence_penalty: 0,
  22594. // messages: [{
  22595. // content: messages,
  22596. // role: 'user'
  22597. // }],
  22598. // uid: _uuid,
  22599. // mind_map_question: "",
  22600. // })
  22601. let params = {
  22602. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22603. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22604. session_name: _uuid,
  22605. userId: _this.userid,
  22606. uid: _uuid,
  22607. file_ids: fileid.length ? [...fileid] : '',
  22608. model: 'gpt-4o-2024-11-20',
  22609. temperature: this.mode == 3 ? 0.5 : 0.1,
  22610. }
  22611. // let params = JSON.stringify({
  22612. // message: {
  22613. // anthropic_version: "bedrock-2023-05-31",
  22614. // max_tokens: 4096,
  22615. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22616. // top_p: 1,
  22617. // messages: [{
  22618. // "role": "user",
  22619. // "content": messages
  22620. // }] ,
  22621. // },
  22622. // uid: _uuid,
  22623. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22624. // });
  22625. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22626. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22627. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22628. console.log(response);
  22629. // let data = response.data.FunctionResponse
  22630. // if (data.choices && data.choices.length && data.choices[0].message) {
  22631. // console.log(data.choices[0].message.content);
  22632. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22633. // _this.$forceUpdate()
  22634. // }
  22635. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22636. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22637. } else {
  22638. _this.$message.warning(response.data.FunctionResponse.result);
  22639. }
  22640. _this.isOutlineTaskCancelToken[index] = null
  22641. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22642. }).catch(function (error) {
  22643. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22644. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22645. _this.isOutlineTaskCancelToken[index] = null
  22646. if(error && error.message != 'Request canceled by the user.'){
  22647. _this.$message.error(this.lang.ssTooManyReq)
  22648. }
  22649. console.log(error);
  22650. });
  22651. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22652. },
  22653. async aiOutlineDetail2(msg, index) {
  22654. let _this = this
  22655. const _tindex = 'task-' + index
  22656. const _tindex2 = index
  22657. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22658. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22659. if (_this.infoData.length) {
  22660. for (var i = 0; i < _this.infoData.length; i++) {
  22661. if(_this.infoData[i].fileid){
  22662. fileid.push(_this.infoData[i].fileid)
  22663. }else {
  22664. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22665. if(_fileid){
  22666. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22667. _this.$forceUpdate();
  22668. if(_fileid != 1){
  22669. fileid.push(_fileid)
  22670. }
  22671. }
  22672. }
  22673. }
  22674. }
  22675. let url = []
  22676. if (this.infoData.length) {
  22677. for (var i = 0; i < this.infoData.length; i++) {
  22678. url.push(this.infoData[i].url)
  22679. }
  22680. }
  22681. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22682. let taskArray = []
  22683. let taskArrayD = []
  22684. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22685. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22686. if(k != index){
  22687. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22688. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22689. }
  22690. }
  22691. let messages = `NOTICE
  22692. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22693. Language: ${this.getLang()}
  22694. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22695. Instruction: Based on the context, follow "Format example", write content.
  22696. #Context
  22697. ## 要求
  22698. ${msg}
  22699. ## 参考信息
  22700. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22701. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22702. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22703. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22704. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22705. # Format example
  22706. **子任务标题**:环节+子任务名称
  22707. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22708. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22709. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22710. `
  22711. // 教学目标:教学目标。
  22712. // 任务设计:任务设计。
  22713. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22714. // -------- #补充参考资料和
  22715. // ## 补充参考资料
  22716. // - 补充资料:${url.join(",")}
  22717. // - 补充描述:${_this.courseText2}
  22718. _this.taskDetailLoading.push(_tindex)
  22719. _this.ttaskDetailLoading.push(_tindex)
  22720. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22721. let _uuid = uuidv4();
  22722. // let params = JSON.stringify({
  22723. // // "model": "Chat",
  22724. // model: 'gpt-3.5-turbo',
  22725. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22726. // max_tokens: 4096,
  22727. // top_p: 1,
  22728. // frequency_penalty: 0,
  22729. // presence_penalty: 0,
  22730. // messages: [{
  22731. // content: messages,
  22732. // role: 'user'
  22733. // }],
  22734. // uid: _uuid,
  22735. // mind_map_question: "",
  22736. // })
  22737. let params = {
  22738. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22739. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22740. session_name: _uuid,
  22741. userId: _this.userid,
  22742. uid: _uuid,
  22743. file_ids: fileid.length ? [...fileid] : '',
  22744. model: 'gpt-4o-2024-11-20',
  22745. temperature: this.mode == 3 ? 0.5 : 0.1,
  22746. }
  22747. // let params = JSON.stringify({
  22748. // message: {
  22749. // anthropic_version: "bedrock-2023-05-31",
  22750. // max_tokens: 4096,
  22751. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22752. // top_p: 1,
  22753. // messages: [{
  22754. // "role": "user",
  22755. // "content": messages
  22756. // }] ,
  22757. // },
  22758. // uid: _uuid,
  22759. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22760. // });
  22761. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22762. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22763. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22764. console.log(response);
  22765. // let data = response.data.FunctionResponse
  22766. // if (data.choices && data.choices.length && data.choices[0].message) {
  22767. // console.log(data.choices[0].message.content);
  22768. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22769. // _this.$forceUpdate()
  22770. // }
  22771. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22772. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22773. } else {
  22774. _this.$message.warning(response.data.FunctionResponse.result);
  22775. }
  22776. _this.isOutlineTaskCancelToken[index] = null
  22777. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22778. }).catch(function (error) {
  22779. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22780. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22781. _this.isOutlineTaskCancelToken[index] = null
  22782. if(error && error.message != 'Request canceled by the user.'){
  22783. _this.$message.error(this.lang.ssTooManyReq)
  22784. }
  22785. console.log(error);
  22786. });
  22787. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22788. },
  22789. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22790. try {
  22791. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22792. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22793. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22794. } catch(error) {
  22795. console.log('EventSource error:', error);
  22796. this.$message.error(this.lang.ssTooManyReq)
  22797. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22798. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22799. this.isOutlineTaskCancelToken[_tindex2] = null
  22800. return;
  22801. }
  22802. let _allText = "";
  22803. let _mdText = "";
  22804. let _iindex = 0
  22805. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22806. let _eData = JSON.parse(_e.data).content;
  22807. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22808. //对话已经完成
  22809. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22810. this.isOutlineTaskCancelSource[_tindex2].close();
  22811. this.isOutlineTaskCancelSource[_tindex2] = null;
  22812. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22813. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22814. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22815. }
  22816. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22817. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22818. this.isOutlineTaskCancelToken[_tindex2] = null
  22819. return;
  22820. } else {
  22821. _iindex++
  22822. //对话还在继续
  22823. let _text = "";
  22824. _text = _eData.replaceAll("'", "");
  22825. if (_allText == "") {
  22826. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22827. } else {
  22828. _allText += _text;
  22829. }
  22830. _mdText = _allText + "_";
  22831. _mdText = _mdText.replace(/\\n/g, "\n");
  22832. _mdText = _mdText.replace(/\\/g, "");
  22833. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22834. //转化返回的回复流数据.
  22835. if(_iindex == 10){
  22836. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22837. _iindex = 0
  22838. }
  22839. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22840. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22841. }
  22842. // 处理流数据
  22843. }
  22844. // this.$forceUpdate();
  22845. };
  22846. let _this = this
  22847. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22848. // 处理错误,可以尝试重新连接
  22849. console.log('EventSource error:', event);
  22850. _this.$message.error(this.lang.ssTooManyReq)
  22851. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22852. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22853. _this.isOutlineTaskCancelToken[_tindex2] = null
  22854. _this.isOutlineTaskCancelSource[_tindex2].close();
  22855. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22856. };
  22857. },
  22858. async aiDetail2(msg, index) {
  22859. let _this = this
  22860. const _tindex = 'task-' + index
  22861. const _tindex2 = index
  22862. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22863. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22864. if (_this.infoData.length) {
  22865. for (var i = 0; i < _this.infoData.length; i++) {
  22866. if(_this.infoData[i].fileid){
  22867. fileid.push(_this.infoData[i].fileid)
  22868. }else {
  22869. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22870. if(_fileid){
  22871. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22872. _this.$forceUpdate();
  22873. if(_fileid != 1){
  22874. fileid.push(_fileid)
  22875. }
  22876. }
  22877. }
  22878. }
  22879. }
  22880. let messages = `NOTICE
  22881. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22882. Language: ${this.getLang()}
  22883. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22884. Instruction: Based on the context, follow "Format example", write content.
  22885. #Context
  22886. ## 要求
  22887. ${msg}
  22888. ## 参考资料
  22889. 任务名字: ${_this.aiCallBack.task}
  22890. ## 优化信息
  22891. ${_this.aiCallBack.taskDetail}
  22892. # Format example
  22893. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22894. _this.taskDetailLoading2.push(_tindex)
  22895. _this.ttaskDetailLoading2.push(_tindex)
  22896. let _uuid = uuidv4();
  22897. // let params = JSON.stringify({
  22898. // // "model": "Chat",
  22899. // model: 'gpt-3.5-turbo',
  22900. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22901. // max_tokens: 4096,
  22902. // top_p: 1,
  22903. // frequency_penalty: 0,
  22904. // presence_penalty: 0,
  22905. // messages: [{
  22906. // content: messages,
  22907. // role: 'user'
  22908. // }],
  22909. // uid: _uuid,
  22910. // mind_map_question: "",
  22911. // })
  22912. let params = {
  22913. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22914. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22915. session_name: _uuid,
  22916. userId: _this.userid,
  22917. uid: _uuid,
  22918. file_ids: fileid.length ? [...fileid] : '',
  22919. model: 'gpt-4o-2024-11-20',
  22920. temperature: this.mode == 3 ? 0.5 : 0.1,
  22921. }
  22922. // let params = JSON.stringify({
  22923. // message: {
  22924. // anthropic_version: "bedrock-2023-05-31",
  22925. // max_tokens: 4096,
  22926. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22927. // top_p: 1,
  22928. // messages: [{
  22929. // "role": "user",
  22930. // "content": messages
  22931. // }] ,
  22932. // },
  22933. // uid: _uuid,
  22934. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22935. // });
  22936. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22937. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22938. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22939. console.log(response);
  22940. // let data = response.data.FunctionResponse
  22941. // if (data.choices && data.choices.length && data.choices[0].message) {
  22942. // console.log(data.choices[0].message.content);
  22943. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22944. // _this.$forceUpdate()
  22945. // }
  22946. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22947. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22948. } else {
  22949. _this.$message.warning(response.data.FunctionResponse.result);
  22950. }
  22951. }).catch(function (error) {
  22952. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22953. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22954. if(error && error.message != 'Request canceled by the user.'){
  22955. _this.$message.error(this.lang.ssTooManyReq)
  22956. }
  22957. console.log(error);
  22958. });
  22959. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22960. },
  22961. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22962. let _source;
  22963. try {
  22964. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22965. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22966. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22967. } catch(error) {
  22968. console.log('EventSource error:', error);
  22969. this.$message.error(this.lang.ssTooManyReq)
  22970. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22971. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22972. return;
  22973. }
  22974. let _allText = "";
  22975. let _mdText = "";
  22976. let _iindex = 0
  22977. _source.onmessage = _e => {
  22978. let _eData = JSON.parse(_e.data).content;
  22979. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22980. //对话已经完成
  22981. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22982. _source.close();
  22983. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22984. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22985. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22986. return;
  22987. } else {
  22988. _iindex++
  22989. //对话还在继续
  22990. let _text = "";
  22991. _text = _eData.replaceAll("'", "");
  22992. if (_allText == "") {
  22993. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22994. } else {
  22995. _allText += _text;
  22996. }
  22997. _mdText = _allText + "_";
  22998. _mdText = _mdText.replace(/\\n/g, "\n");
  22999. _mdText = _mdText.replace(/\\/g, "");
  23000. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23001. //转化返回的回复流数据
  23002. if(_iindex == 10){
  23003. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  23004. _iindex = 0
  23005. }
  23006. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  23007. // 处理流数据
  23008. }
  23009. // this.$forceUpdate();
  23010. };
  23011. let _this = this
  23012. _source.onerror = function(event) {
  23013. // 处理错误,可以尝试重新连接
  23014. console.log('EventSource error:', event);
  23015. _this.$message.error(this.lang.ssTooManyReq)
  23016. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  23017. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  23018. _source.close();
  23019. };
  23020. },
  23021. async aiDetail3(msg, index, tindex) {
  23022. let _this = this
  23023. const _tindex = 'task-' + index + tindex
  23024. const _tindex2 = index
  23025. const _tindex3 = tindex
  23026. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23027. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23028. if (_this.infoData.length) {
  23029. for (var i = 0; i < _this.infoData.length; i++) {
  23030. if(_this.infoData[i].fileid){
  23031. fileid.push(_this.infoData[i].fileid)
  23032. }else {
  23033. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23034. if(_fileid){
  23035. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23036. _this.$forceUpdate();
  23037. if(_fileid != 1){
  23038. fileid.push(_fileid)
  23039. }
  23040. }
  23041. }
  23042. }
  23043. }
  23044. let tool = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]
  23045. let appJson = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].appJson
  23046. // **重点考虑该任务及工具名和工具内容的情况下*
  23047. let messages = `NOTICE
  23048. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  23049. Language: ${this.getLang()}
  23050. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23051. Instruction: Based on the context, follow "Format example", write content.
  23052. #Context
  23053. ## 参考内容
  23054. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23055. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23056. 工具名称:${_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 : '无'}
  23057. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  23058. ${tool == 72 && appJson && appJson.name && `应用名称:${appJson.name}`}
  23059. ${tool == 72 && appJson && appJson.detail && `应用描述:${appJson.detail}`}
  23060. ## 要求
  23061. ${msg} 输出格式和内容要求参考#格式与要求
  23062. # Format example
  23063. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  23064. _this.taskDetailLoading3.push(_tindex)
  23065. _this.ttaskDetailLoading3.push(_tindex)
  23066. let _uuid = uuidv4();
  23067. // let params = JSON.stringify({
  23068. // // "model": "Chat",
  23069. // model: 'gpt-3.5-turbo',
  23070. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23071. // max_tokens: 4096,
  23072. // top_p: 1,
  23073. // frequency_penalty: 0,
  23074. // presence_penalty: 0,
  23075. // messages: [{
  23076. // content: messages,
  23077. // role: 'user'
  23078. // }],
  23079. // uid: _uuid,
  23080. // mind_map_question: "",
  23081. // })
  23082. let params = {
  23083. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23084. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23085. session_name: _uuid,
  23086. userId: _this.userid,
  23087. uid: _uuid,
  23088. file_ids: fileid.length ? [...fileid] : '',
  23089. model: 'gpt-4o-2024-11-20',
  23090. temperature: this.mode == 3 ? 0.5 : 0.1,
  23091. }
  23092. // let params = JSON.stringify({
  23093. // message: {
  23094. // anthropic_version: "bedrock-2023-05-31",
  23095. // max_tokens: 4096,
  23096. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23097. // top_p: 1,
  23098. // messages: [{
  23099. // "role": "user",
  23100. // "content": messages
  23101. // }] ,
  23102. // },
  23103. // uid: _uuid,
  23104. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23105. // });
  23106. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23107. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23108. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23109. console.log(response);
  23110. let data = response.data.FunctionResponse
  23111. // if (data.choices && data.choices.length && data.choices[0].message) {
  23112. // console.log(data.choices[0].message.content);
  23113. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  23114. // _this.$forceUpdate()
  23115. // }
  23116. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23117. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23118. } else {
  23119. _this.$message.warning(response.data.FunctionResponse.result);
  23120. }
  23121. }).catch(function (error) {
  23122. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23123. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  23124. if(error && error.message != 'Request canceled by the user.'){
  23125. _this.$message.error(this.lang.ssTooManyReq)
  23126. }
  23127. console.log(error);
  23128. });
  23129. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  23130. },
  23131. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  23132. let _source;
  23133. try {
  23134. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23135. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23136. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23137. } catch(error) {
  23138. console.log('EventSource error:', event);
  23139. this.$message.error(this.lang.ssTooManyReq)
  23140. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23141. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23142. return;
  23143. }
  23144. let _allText = "";
  23145. let _mdText = "";
  23146. let _iindex = 0
  23147. _source.onmessage = _e => {
  23148. let _eData = JSON.parse(_e.data).content;
  23149. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23150. //对话已经完成
  23151. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23152. _source.close();
  23153. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23154. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23155. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23156. return;
  23157. } else {
  23158. _iindex++
  23159. //对话还在继续
  23160. let _text = "";
  23161. _text = _eData.replaceAll("'", "");
  23162. if (_allText == "") {
  23163. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23164. } else {
  23165. _allText += _text;
  23166. }
  23167. _mdText = _allText + "_";
  23168. _mdText = _mdText.replace(/\\n/g, "\n");
  23169. _mdText = _mdText.replace(/\\/g, "");
  23170. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23171. //转化返回的回复流数据
  23172. if(_iindex == 10){
  23173. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23174. _iindex = 0
  23175. }
  23176. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23177. // 处理流数据
  23178. }
  23179. // this.$forceUpdate();
  23180. };
  23181. let _this = this
  23182. _source.onerror = function(event) {
  23183. // 处理错误,可以尝试重新连接
  23184. console.log('EventSource error:', event);
  23185. _this.$message.error(this.lang.ssTooManyReq)
  23186. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  23187. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  23188. _source.close();
  23189. };
  23190. },
  23191. async aiDetail4(msg, index) {
  23192. if (!msg.length) {
  23193. this.$message.error(this.lang.ssAddEvaOpt)
  23194. return
  23195. }
  23196. let _this = this
  23197. const _tindex = 'task-' + index
  23198. const _tindex2 = index
  23199. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23200. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23201. if (_this.infoData.length) {
  23202. for (var i = 0; i < _this.infoData.length; i++) {
  23203. if(_this.infoData[i].fileid){
  23204. fileid.push(_this.infoData[i].fileid)
  23205. }else {
  23206. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23207. if(_fileid){
  23208. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23209. _this.$forceUpdate();
  23210. if(_fileid != 1){
  23211. fileid.push(_fileid)
  23212. }
  23213. }
  23214. }
  23215. }
  23216. }
  23217. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  23218. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  23219. if(_this.pingjiaInfoData[index][i].fileid){
  23220. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  23221. }
  23222. }
  23223. }
  23224. var _text = ""
  23225. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23226. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23227. // _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 : ''} `
  23228. _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 : ''} `
  23229. }
  23230. }
  23231. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23232. // **重点考虑该任务详情**
  23233. // let messages = `
  23234. // Language: ${this.getLang()}
  23235. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23236. // #Context
  23237. // ## 参考内容
  23238. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23239. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23240. // 评价设计:${_text}
  23241. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23242. // ## 要求
  23243. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23244. // # 格式与要求
  23245. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23246. // # Format example
  23247. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23248. let messages = `
  23249. Language: ${this.getLang()}
  23250. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23251. Instruction: Based on the context, follow "Format example", write content.
  23252. #Context
  23253. ## 参考内容
  23254. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23255. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23256. ${_text ? '评价设计:'+_text : ''}
  23257. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23258. ## 要求
  23259. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23260. # 格式与要求
  23261. 核心素养:从教案中提取
  23262. 目标:从教案中提取
  23263. 评价标准:从教案中提取评价标准
  23264. # Format example
  23265. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23266. _this.taskDetailLoading4.push(_tindex)
  23267. // let params = JSON.stringify({
  23268. // // "model": "Chat",
  23269. // model: 'gpt-3.5-turbo',
  23270. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23271. // max_tokens: 4096,
  23272. // top_p: 1,
  23273. // frequency_penalty: 0,
  23274. // presence_penalty: 0,
  23275. // messages: [{
  23276. // content: messages,
  23277. // role: 'user'
  23278. // }],
  23279. // stream: false,
  23280. // uid: this.userid,
  23281. // mind_map_question: "",
  23282. // })
  23283. let params = {
  23284. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23285. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23286. session_name: uuidv4(),
  23287. userId: _this.userid,
  23288. file_ids: fileid.length ? [...fileid] : '',
  23289. model: 'gpt-4o-2024-11-20',
  23290. temperature: this.mode == 3 ? 0.5 : 0.1,
  23291. }
  23292. // let params = JSON.stringify({
  23293. // message: {
  23294. // anthropic_version: "bedrock-2023-05-31",
  23295. // max_tokens: 4096,
  23296. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23297. // top_p: 1,
  23298. // messages: [{
  23299. // content: messages,
  23300. // role: 'user'
  23301. // }], //
  23302. // },
  23303. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23304. // });
  23305. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23306. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23307. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23308. console.log(response);
  23309. let data = response.data.FunctionResponse
  23310. // if (data.choices && data.choices.length && data.choices[0].message) {
  23311. // console.log(data.choices[0].message.content);
  23312. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23313. // _this.$forceUpdate()
  23314. // }
  23315. if (data.message) {
  23316. console.log(data.message);
  23317. try {
  23318. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23319. } catch (e) {
  23320. console.log("error_________________" + e);
  23321. // _this.$message.error(data.message)
  23322. try {
  23323. let regex = new RegExp(/```json([\s\S]*?)```/);
  23324. let match = data.message.match(regex);
  23325. let elist = JSON.parse(match[1])
  23326. elist = elist.filter(el=>{
  23327. el.isai = 1
  23328. return el
  23329. })
  23330. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23331. // var message = data.message;
  23332. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23333. // var jsonEnd = message.indexOf("```", jsonStart);
  23334. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23335. // var jsonString = message
  23336. // .substring(jsonStart, jsonEnd)
  23337. // .trim();
  23338. // var _data2 = JSON.parse(jsonString);
  23339. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23340. // }
  23341. } catch (error) {
  23342. }
  23343. }
  23344. _this.$forceUpdate()
  23345. }
  23346. // if (data.result) {
  23347. // console.log(data.result);
  23348. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23349. // _this.$forceUpdate()
  23350. // }
  23351. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23352. }).catch(function (error) {
  23353. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23354. if(error && error.message != 'Request canceled by the user.'){
  23355. _this.$message.error(this.lang.ssTooManyReq)
  23356. }
  23357. console.log(error);
  23358. });
  23359. },
  23360. async aiDetail5(msg, index) {
  23361. let _this = this
  23362. const _tindex = 'task-' + index
  23363. const _tindex2 = index
  23364. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23365. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23366. if (_this.infoData.length) {
  23367. for (var i = 0; i < _this.infoData.length; i++) {
  23368. if(_this.infoData[i].fileid){
  23369. fileid.push(_this.infoData[i].fileid)
  23370. }else {
  23371. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23372. if(_fileid){
  23373. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23374. _this.$forceUpdate();
  23375. if(_fileid != 1){
  23376. fileid.push(_fileid)
  23377. }
  23378. }
  23379. }
  23380. }
  23381. }
  23382. let url = []
  23383. if (this.infoData.length) {
  23384. for (var i = 0; i < this.infoData.length; i++) {
  23385. url.push(this.infoData[i].url)
  23386. }
  23387. }
  23388. var _text = ""
  23389. var _text2 = ""
  23390. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23391. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23392. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23393. }
  23394. let messages = `
  23395. Language: ${this.getLang()}
  23396. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23397. Instruction: Based on the context, follow "Format example", write content.
  23398. --------
  23399. ## 要求
  23400. ${msg}
  23401. -------
  23402. ## 本教案描述
  23403. ${_this.aiCallBack}
  23404. -------
  23405. ## 课程大纲
  23406. ${_text}
  23407. -------
  23408. ## 其他教学任务教案
  23409. ${_text2}`
  23410. // ## 补充参考资料
  23411. // - 补充资料:${url.join(",")}
  23412. // - 补充描述:${this.courseText2}
  23413. _this.taskDetailLoading5.push(_tindex)
  23414. _this.ttaskDetailLoading5.push(_tindex)
  23415. let _uuid = uuidv4();
  23416. // let params = JSON.stringify({
  23417. // // "model": "Chat",
  23418. // model: 'gpt-3.5-turbo',
  23419. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23420. // max_tokens: 4096,
  23421. // top_p: 1,
  23422. // frequency_penalty: 0,
  23423. // presence_penalty: 0,
  23424. // messages: [{
  23425. // content: messages,
  23426. // role: 'user'
  23427. // }],
  23428. // uid: _uuid,
  23429. // mind_map_question: "",
  23430. // })
  23431. let params = {
  23432. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23433. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23434. session_name: _uuid,
  23435. userId: _this.userid,
  23436. uid: _uuid,
  23437. file_ids: fileid.length ? [...fileid] : '',
  23438. model: 'gpt-4o-2024-11-20',
  23439. temperature: this.mode == 3 ? 0.5 : 0.1,
  23440. }
  23441. // let params = JSON.stringify({
  23442. // message: {
  23443. // anthropic_version: "bedrock-2023-05-31",
  23444. // max_tokens: 4096,
  23445. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23446. // top_p: 1,
  23447. // messages: [{
  23448. // "role": "user",
  23449. // "content": messages
  23450. // }] ,
  23451. // },
  23452. // uid: _uuid,
  23453. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23454. // });
  23455. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23456. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23457. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23458. console.log(response);
  23459. // let data = response.data.FunctionResponse
  23460. // if (data.choices && data.choices.length && data.choices[0].message) {
  23461. // console.log(data.choices[0].message.content);
  23462. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23463. // _this.$forceUpdate()
  23464. // }
  23465. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23466. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23467. } else {
  23468. _this.$message.warning(response.data.FunctionResponse.result);
  23469. }
  23470. }).catch(function (error) {
  23471. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23472. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23473. }
  23474. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23475. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23476. }
  23477. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23478. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23479. if(error && error.message != 'Request canceled by the user.'){
  23480. _this.$message.error(this.lang.ssTooManyReq)
  23481. }
  23482. console.log(error);
  23483. });
  23484. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23485. },
  23486. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23487. let _source;
  23488. try {
  23489. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23490. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23491. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23492. } catch(error){
  23493. console.log('EventSource error:', error);
  23494. this.$message.error(this.lang.ssTooManyReq)
  23495. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23496. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23497. }
  23498. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23499. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23500. }
  23501. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23502. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23503. return;
  23504. }
  23505. let _allText = "";
  23506. let _mdText = "";
  23507. let _iindex = 0
  23508. _source.onmessage = _e => {
  23509. let _eData = JSON.parse(_e.data).content;
  23510. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23511. //对话已经完成
  23512. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23513. _source.close();
  23514. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23515. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23516. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23517. }
  23518. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23519. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23520. }
  23521. return;
  23522. } else {
  23523. _iindex++
  23524. //对话还在继续
  23525. let _text = "";
  23526. _text = _eData.replaceAll("'", "");
  23527. if (_allText == "") {
  23528. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23529. } else {
  23530. _allText += _text;
  23531. }
  23532. _mdText = _allText + "_";
  23533. _mdText = _mdText.replace(/\\n/g, "\n");
  23534. _mdText = _mdText.replace(/\\/g, "");
  23535. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23536. //转化返回的回复流数据
  23537. if(_iindex == 10){
  23538. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23539. _iindex = 0
  23540. }
  23541. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23542. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23543. }
  23544. // 处理流数据
  23545. }
  23546. // this.$forceUpdate();
  23547. };
  23548. let _this = this
  23549. _source.onerror = function(event) {
  23550. // 处理错误,可以尝试重新连接
  23551. console.log('EventSource error:', event);
  23552. _this.$message.error(this.lang.ssTooManyReq)
  23553. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23554. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23555. }
  23556. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23557. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23558. }
  23559. _source.close();
  23560. };
  23561. },
  23562. async aiDetail52(msg, index, callback) {
  23563. let _this = this
  23564. const _tindex = 'task-' + index
  23565. const _tindex2 = index
  23566. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23567. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23568. if (_this.infoData.length) {
  23569. for (var i = 0; i < _this.infoData.length; i++) {
  23570. if(_this.infoData[i].fileid){
  23571. fileid.push(_this.infoData[i].fileid)
  23572. }else {
  23573. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23574. if(_fileid){
  23575. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23576. _this.$forceUpdate();
  23577. if(_fileid != 1){
  23578. fileid.push(_fileid)
  23579. }
  23580. }
  23581. }
  23582. }
  23583. }
  23584. let url = []
  23585. if (this.infoData.length) {
  23586. for (var i = 0; i < this.infoData.length; i++) {
  23587. url.push(this.infoData[i].url)
  23588. }
  23589. }
  23590. let taskN = []
  23591. let taskD = []
  23592. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23593. if(_tindex2 != ti){
  23594. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23595. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23596. }
  23597. }
  23598. let messages = `NOTICE
  23599. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23600. Language: ${this.getLang()}
  23601. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23602. Instruction: Based on the context, follow "Format example", write content.
  23603. #Context
  23604. ## 要求
  23605. ${msg}
  23606. ## 补充描述
  23607. 课程简要描述:${_this.courseText}
  23608. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23609. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23610. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23611. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23612. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23613. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23614. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23615. `
  23616. // ## 补充参考资料
  23617. // - 补充资料:${url.join(",")}
  23618. // - 补充描述:${this.courseText2}
  23619. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23620. _this.taskDetailLoading5.push(_tindex)
  23621. }
  23622. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23623. _this.ttaskDetailLoading5.push(_tindex)
  23624. }
  23625. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23626. let _uuid = uuidv4();
  23627. // let params = JSON.stringify({
  23628. // // "model": "Chat",
  23629. // model: 'gpt-3.5-turbo',
  23630. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23631. // max_tokens: 4096,
  23632. // top_p: 1,
  23633. // frequency_penalty: 0,
  23634. // presence_penalty: 0,
  23635. // messages: [{
  23636. // content: messages,
  23637. // role: 'user'
  23638. // }],
  23639. // uid: _uuid,
  23640. // mind_map_question: "",
  23641. // })
  23642. let params = {
  23643. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23644. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23645. session_name: _uuid,
  23646. userId: _this.userid,
  23647. uid: _uuid,
  23648. file_ids: fileid.length ? [...fileid] : '',
  23649. model: 'gpt-4o-2024-11-20',
  23650. temperature: this.mode == 3 ? 0.5 : 0.1,
  23651. }
  23652. // let params = JSON.stringify({
  23653. // message: {
  23654. // anthropic_version: "bedrock-2023-05-31",
  23655. // max_tokens: 4096,
  23656. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23657. // top_p: 1,
  23658. // messages: [{
  23659. // "role": "user",
  23660. // "content": messages
  23661. // }] ,
  23662. // },
  23663. // uid: _uuid,
  23664. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23665. // });
  23666. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23667. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23668. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23669. console.log(response);
  23670. // let data = response.data.FunctionResponse
  23671. // if (data.choices && data.choices.length && data.choices[0].message) {
  23672. // console.log(data.choices[0].message.content);
  23673. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23674. // _this.$forceUpdate()
  23675. // }
  23676. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23677. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23678. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23679. } else {
  23680. _this.$message.warning(response.data.FunctionResponse.result);
  23681. }
  23682. _this.isTeacherTaskCancelToken2[index] = null
  23683. }).catch(function (error) {
  23684. if(error && error.message != 'Request canceled by the user.'){
  23685. _this.isTeacherTaskCancelToken2[index] = null
  23686. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23687. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23688. }
  23689. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23690. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23691. }
  23692. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23693. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23694. _this.$message.error(this.lang.ssTooManyReq)
  23695. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23696. confirmButtonText: _this.lang.ssConfirm,
  23697. cancelButtonText: _this.lang.ssCancel,
  23698. distinguishCancelAndClose: true,
  23699. type: "warning",
  23700. customClass: 'custom-confirm-box'
  23701. })
  23702. .then(() => {
  23703. _this.aiDetail52(msg, index, callback)
  23704. }).catch((v) => {
  23705. console.log(v);
  23706. callback ? callback() : ''
  23707. })
  23708. setTimeout(() => {
  23709. _this.setTipsIndex()
  23710. }, 500)
  23711. }
  23712. console.log(error);
  23713. });
  23714. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23715. },
  23716. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23717. try {
  23718. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23719. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23720. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23721. } catch(error) {
  23722. console.log('EventSource error:', error);
  23723. this.$message.error(this.lang.ssTooManyReq)
  23724. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23725. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23726. }
  23727. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23728. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23729. }
  23730. this.isTeacherTaskCancelToken2[_tindex2] = null
  23731. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23732. confirmButtonText: _this.lang.ssConfirm,
  23733. cancelButtonText: _this.lang.ssCancel,
  23734. distinguishCancelAndClose: true,
  23735. type: "warning",
  23736. customClass: 'custom-confirm-box'
  23737. })
  23738. .then(() => {
  23739. _this.aiDetail52(msg, _tindex2, callback)
  23740. }).catch((v) => {
  23741. console.log(v);
  23742. callback ? callback() : ''
  23743. })
  23744. setTimeout(() => {
  23745. _this.setTipsIndex()
  23746. }, 500)
  23747. return;
  23748. }
  23749. let _allText = "";
  23750. let _mdText = "";
  23751. this.allTextArray[_tindex2] = ""
  23752. let _iindex = 0
  23753. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23754. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23755. let _eData = JSON.parse(_e.data).content;
  23756. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23757. //对话已经完成
  23758. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23759. this.isTeacherTaskCancelSource[_tindex2].close();
  23760. this.isTeacherTaskCancelSource[_tindex2] = null;
  23761. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23762. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23763. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23764. }
  23765. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23766. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23767. }
  23768. this.isTeacherTaskCancelToken2[_tindex2] = null
  23769. callback ? callback() : ''
  23770. // this.createTeacherAn(_tindex2, 2);
  23771. this.saveCourse()
  23772. return;
  23773. } else {
  23774. _iindex++
  23775. //对话还在继续
  23776. let _text = "";
  23777. _text = _eData.replaceAll("'", "");
  23778. if (_allText == "") {
  23779. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23780. } else {
  23781. _allText += _text;
  23782. }
  23783. _mdText = _allText + "_";
  23784. _mdText = _mdText.replace(/\\n/g, "\n");
  23785. _mdText = _mdText.replace(/\\/g, "");
  23786. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23787. //转化返回的回复流数据
  23788. if(_iindex == 10){
  23789. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23790. _iindex = 0
  23791. }
  23792. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23793. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23794. }
  23795. // 处理流数据
  23796. }
  23797. };
  23798. let _this = this
  23799. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23800. // 处理错误,可以尝试重新连接
  23801. console.log('EventSource error:', event);
  23802. _this.$message.error(this.lang.ssTooManyReq)
  23803. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23804. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23805. }
  23806. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23807. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23808. }
  23809. _this.isTeacherTaskCancelSource[_tindex2].close();
  23810. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23811. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23812. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23813. confirmButtonText: _this.lang.ssConfirm,
  23814. cancelButtonText: _this.lang.ssCancel,
  23815. distinguishCancelAndClose: true,
  23816. type: "warning",
  23817. customClass: 'custom-confirm-box'
  23818. })
  23819. .then(() => {
  23820. _this.aiDetail52(msg, _tindex2, callback)
  23821. }).catch((v) => {
  23822. console.log(v);
  23823. callback ? callback() : ''
  23824. })
  23825. setTimeout(() => {
  23826. _this.setTipsIndex()
  23827. }, 500)
  23828. };
  23829. },
  23830. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23831. let _mdText = "";
  23832. let _eData = JSON.parse(_e.data).content;
  23833. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23834. //对话已经完成
  23835. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23836. _source.close();
  23837. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23838. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23839. return;
  23840. } else {
  23841. //对话还在继续
  23842. let _text = "";
  23843. _text = _eData.replaceAll("'", "");
  23844. if (this.allTextArray[_tindex2] == "") {
  23845. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23846. } else {
  23847. this.allTextArray[_tindex2] += _text;
  23848. }
  23849. _mdText = this.allTextArray[_tindex2] + "_";
  23850. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23851. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23852. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23853. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23854. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23855. // 处理流数据
  23856. }
  23857. },
  23858. async aiCpote(msg, callback) {
  23859. let _this = this
  23860. let _index = _this.aitype.replace("aiC","c")
  23861. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23862. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23863. if (_this.infoData.length) {
  23864. for (var i = 0; i < _this.infoData.length; i++) {
  23865. if(_this.infoData[i].fileid){
  23866. fileid.push(_this.infoData[i].fileid)
  23867. }else {
  23868. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23869. if(_fileid){
  23870. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23871. _this.$forceUpdate();
  23872. if(_fileid != 1){
  23873. fileid.push(_fileid)
  23874. }
  23875. }
  23876. }
  23877. }
  23878. }
  23879. let sub = []
  23880. if (this.courseTypeId.length) {
  23881. for (var i = 0; i < this.courseTypeId.length; i++) {
  23882. let _sid = this.courseTypeId[i]
  23883. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23884. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23885. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23886. }
  23887. }
  23888. }
  23889. }
  23890. let mclass = []
  23891. if (this.courseTypeId.length) {
  23892. for (var i = 0; i < this.courseTypeId.length; i++) {
  23893. let _sid = this.courseTypeId[i]
  23894. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23895. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23896. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23897. }
  23898. }
  23899. }
  23900. }
  23901. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23902. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23903. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23904. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23905. let messages = `NOTICE
  23906. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23907. Language: ${this.getLang()}
  23908. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23909. Instruction: Based on the context, follow "Format example", write content.
  23910. ${msg}
  23911. ## 课程简介
  23912. 课程名字:${this.courseName}
  23913. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23914. ${sub.length ? '学科:' + sub.join(",") : ''}
  23915. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23916. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23917. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23918. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23919. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23920. _this.cpoteLoading[_index] = true
  23921. _this.cpotetLoading[_index] = true
  23922. let _uuid = uuidv4();
  23923. // let params = JSON.stringify({
  23924. // // "model": "Chat",
  23925. // model: 'gpt-3.5-turbo',
  23926. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23927. // max_tokens: 4096,
  23928. // top_p: 1,
  23929. // frequency_penalty: 0,
  23930. // presence_penalty: 0,
  23931. // messages: [{
  23932. // content: messages,
  23933. // role: 'user'
  23934. // }],
  23935. // uid: _uuid,
  23936. // mind_map_question: "",
  23937. // })
  23938. let params = {
  23939. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23940. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23941. session_name: _uuid,
  23942. userId: _this.userid,
  23943. uid: _uuid,
  23944. file_ids: fileid.length ? [...fileid] : '',
  23945. model: 'gpt-4o-2024-11-20',
  23946. temperature: this.mode == 3 ? 0.5 : 0.1,
  23947. }
  23948. // let params = JSON.stringify({
  23949. // message: {
  23950. // anthropic_version: "bedrock-2023-05-31",
  23951. // max_tokens: 4096,
  23952. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23953. // top_p: 1,
  23954. // messages: [{
  23955. // "role": "user",
  23956. // "content": messages
  23957. // }] ,
  23958. // },
  23959. // uid: _uuid,
  23960. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23961. // });
  23962. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23963. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23964. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23965. console.log(response);
  23966. // let data = response.data.FunctionResponse
  23967. // if (data.choices && data.choices.length && data.choices[0].message) {
  23968. // console.log(data.choices[0].message.content);
  23969. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23970. // _this.$forceUpdate()
  23971. // }
  23972. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23973. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23974. } else {
  23975. _this.$message.warning(response.data.FunctionResponse.result);
  23976. }
  23977. }).catch(function (error) {
  23978. _this.cpoteLoading[_index] = false
  23979. _this.cpotetLoading[_index] = false
  23980. callback ? callback() : ''
  23981. if(error && error.message != 'Request canceled by the user.'){
  23982. _this.$message.error(this.lang.ssTooManyReq)
  23983. }
  23984. console.log(error);
  23985. });
  23986. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23987. },
  23988. aiCpotegetAiContent(_uid, loading, callback) {
  23989. let _source;
  23990. try {
  23991. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23992. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23993. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23994. } catch(error){
  23995. console.log('EventSource error:', error);
  23996. this.$message.error(this.lang.ssTooManyReq)
  23997. this.cpoteLoading[loading] = false
  23998. this.cpotetLoading[loading] = false
  23999. return;
  24000. }
  24001. let _allText = "";
  24002. let _mdText = "";
  24003. let _iindex = 0
  24004. _source.onmessage = _e => {
  24005. let _eData = JSON.parse(_e.data).content;
  24006. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24007. //对话已经完成
  24008. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24009. _source.close();
  24010. this.cpote[loading] = _mdText;
  24011. this.cpoteLoading[loading] = false
  24012. this.cpotetLoading[loading] = false
  24013. callback ? callback() : ''
  24014. this.saveCourse()
  24015. return;
  24016. } else {
  24017. _iindex++
  24018. //对话还在继续
  24019. let _text = "";
  24020. _text = _eData.replaceAll("'", "");
  24021. if (_allText == "") {
  24022. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24023. } else {
  24024. _allText += _text;
  24025. }
  24026. _mdText = _allText + "_";
  24027. _mdText = _mdText.replace(/\\n/g, "\n");
  24028. _mdText = _mdText.replace(/\\/g, "");
  24029. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24030. //转化返回的回复流数据
  24031. if(_iindex == 10){
  24032. this.cpote[loading] = _mdText;
  24033. _iindex = 0
  24034. }
  24035. this.cpoteLoading[loading] = false
  24036. // 处理流数据
  24037. }
  24038. // this.$forceUpdate();
  24039. };
  24040. let _this = this
  24041. _source.onerror = function(event) {
  24042. // 处理错误,可以尝试重新连接
  24043. console.log('EventSource error:', event);
  24044. _this.$message.error(this.lang.ssTooManyReq)
  24045. _this.cpoteLoading[loading] = false
  24046. _this.cpotetLoading[loading] = false
  24047. _source.close();
  24048. };
  24049. },
  24050. async aiteacherTextDetail(msg) {
  24051. let _this = this
  24052. let fileid = []
  24053. if (_this.teacherInfoData.length) {
  24054. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24055. if(_this.teacherInfoData[i].fileid){
  24056. fileid.push(_this.teacherInfoData[i].fileid)
  24057. }else {
  24058. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24059. if(_fileid){
  24060. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24061. _this.$forceUpdate();
  24062. if(_fileid != 1){
  24063. fileid.push(_fileid)
  24064. }
  24065. }
  24066. }
  24067. }
  24068. }
  24069. _this.teacherTextLoading = true
  24070. _this.tteacherTextLoading = true
  24071. let sub = []
  24072. if (_this.courseTypeId.length) {
  24073. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24074. let _sid = _this.courseTypeId[i]
  24075. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24076. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24077. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24078. }
  24079. }
  24080. }
  24081. }
  24082. let mclass = []
  24083. if (_this.courseTypeId.length) {
  24084. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24085. let _sid = _this.courseTypeId[i]
  24086. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24087. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24088. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24089. }
  24090. }
  24091. }
  24092. }
  24093. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24094. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24095. let messages = `NOTICE
  24096. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24097. Language: ${this.getLang()}
  24098. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24099. Instruction: Based on the context, follow "Format example", write content.
  24100. #Context
  24101. ## 参考资料
  24102. 课程名字:${this.courseName}
  24103. ${sub.length ? '学科:' + sub.join(",") : ''}
  24104. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24105. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  24106. ## 要求
  24107. ${msg}
  24108. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24109. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  24110. let _uuid = uuidv4();
  24111. // let params = JSON.stringify({
  24112. // // "model": "Chat",
  24113. // model: 'gpt-3.5-turbo',
  24114. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24115. // max_tokens: 4096,
  24116. // top_p: 1,
  24117. // frequency_penalty: 0,
  24118. // presence_penalty: 0,
  24119. // messages: [{
  24120. // content: messages,
  24121. // role: 'user'
  24122. // }],
  24123. // uid: _uuid,
  24124. // mind_map_question: "",
  24125. // })
  24126. let params = {
  24127. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24128. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24129. session_name: _uuid,
  24130. userId: _this.userid,
  24131. uid: _uuid,
  24132. file_ids: fileid.length ? [...fileid] : '',
  24133. model: 'gpt-4o-2024-11-20',
  24134. temperature: this.mode == 3 ? 0.5 : 0.1,
  24135. }
  24136. // let params = JSON.stringify({
  24137. // message: {
  24138. // anthropic_version: "bedrock-2023-05-31",
  24139. // max_tokens: 4096,
  24140. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24141. // top_p: 1,
  24142. // messages: [{
  24143. // "role": "user",
  24144. // "content": messages
  24145. // }] ,
  24146. // },
  24147. // uid: _uuid,
  24148. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24149. // });
  24150. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24151. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  24152. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24153. console.log(response);
  24154. // let data = response.data.FunctionResponse
  24155. // if (data.choices && data.choices.length && data.choices[0].message) {
  24156. // _this.courseText = data.choices[0].message.content
  24157. // }
  24158. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24159. } else {
  24160. _this.$message.warning(response.data.FunctionResponse.result);
  24161. }
  24162. _this.isTeacherTextCancelToken = null
  24163. }).catch(function (error) {
  24164. _this.teacherTextLoading = false
  24165. _this.tteacherTextLoading = false
  24166. _this.isTeacherTextCancelToken = null
  24167. if(error && error.message != 'Request canceled by the user.'){
  24168. _this.$message.error(this.lang.ssTooManyReq)
  24169. }
  24170. console.log(error);
  24171. });
  24172. await _this.aiteacherTextDetailgetAiContent(_uuid)
  24173. },
  24174. aiteacherTextDetailgetAiContent(_uid) {
  24175. try {
  24176. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24177. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24178. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24179. } catch(error) {
  24180. console.log('EventSource error:', event);
  24181. this.$message.error(this.lang.ssTooManyReq)
  24182. this.teacherTextLoading = false
  24183. this.tteacherTextLoading = false
  24184. this.isTeacherTextCancelToken = null
  24185. return;
  24186. }
  24187. let _allText = "";
  24188. let _mdText = "";
  24189. let _iindex = 0
  24190. this.isTeacherTextCancelSource.onmessage = _e => {
  24191. let _eData = JSON.parse(_e.data).content;
  24192. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24193. //对话已经完成
  24194. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24195. this.isTeacherTextCancelSource.close();
  24196. this.isTeacherTextCancelSource = null;
  24197. this.teacherCourseText = _mdText;
  24198. this.teacherTextLoading = false
  24199. this.tteacherTextLoading = false
  24200. this.teacherCourseTextB = false
  24201. this.isTeacherTextCancelToken = null
  24202. return;
  24203. } else {
  24204. _iindex++
  24205. //对话还在继续
  24206. let _text = "";
  24207. _text = _eData.replaceAll("'", "");
  24208. if (_allText == "") {
  24209. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24210. } else {
  24211. _allText += _text;
  24212. }
  24213. _mdText = _allText + "_";
  24214. _mdText = _mdText.replace(/\\n/g, "\n");
  24215. _mdText = _mdText.replace(/\\/g, "");
  24216. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24217. //转化返回的回复流数据
  24218. if(_iindex == 10){
  24219. this.teacherCourseText = _mdText;
  24220. _iindex = 0
  24221. }
  24222. if(this.teacherTextLoading){
  24223. this.teacherTextLoading = false
  24224. }
  24225. // 处理流数据
  24226. }
  24227. // this.$forceUpdate();
  24228. };
  24229. let _this = this
  24230. this.isTeacherTextCancelSource.onerror = function(event) {
  24231. // 处理错误,可以尝试重新连接
  24232. console.log('EventSource error:', event);
  24233. _this.$message.error(this.lang.ssTooManyReq)
  24234. _this.teacherTextLoading = false
  24235. _this.tteacherTextLoading = false
  24236. _this.isTeacherTextCancelToken = null
  24237. _this.isTeacherTextCancelSource.close();
  24238. _this.isTeacherTextCancelSource = null;
  24239. };
  24240. },
  24241. async aitargetTextDetail(msg) {
  24242. let _this = this
  24243. let fileid = []
  24244. if (_this.teacherInfoData.length) {
  24245. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24246. if(_this.teacherInfoData[i].fileid){
  24247. fileid.push(_this.teacherInfoData[i].fileid)
  24248. }else {
  24249. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24250. if(_fileid){
  24251. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24252. _this.$forceUpdate();
  24253. if(_fileid != 1){
  24254. fileid.push(_fileid)
  24255. }
  24256. }
  24257. }
  24258. }
  24259. }
  24260. _this.targetTextLoading = true
  24261. _this.ttargetTextLoading = true
  24262. let sub = []
  24263. if (_this.courseTypeId.length) {
  24264. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24265. let _sid = _this.courseTypeId[i]
  24266. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24267. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24268. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24269. }
  24270. }
  24271. }
  24272. }
  24273. let mclass = []
  24274. if (_this.courseTypeId.length) {
  24275. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24276. let _sid = _this.courseTypeId[i]
  24277. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24278. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24279. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24280. }
  24281. }
  24282. }
  24283. }
  24284. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24285. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24286. let messages = `NOTICE
  24287. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24288. Language: ${this.getLang()}
  24289. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24290. Instruction: Based on the context, follow "Format example", write content.
  24291. #Context
  24292. ## 参考资料
  24293. 课程名字:${this.courseName}
  24294. ${sub.length ? '学科:' + sub.join(",") : ''}
  24295. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24296. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24297. ## 要求
  24298. ${msg}
  24299. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24300. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24301. let _uuid = uuidv4();
  24302. // let params = JSON.stringify({
  24303. // // "model": "Chat",
  24304. // model: 'gpt-3.5-turbo',
  24305. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24306. // max_tokens: 4096,
  24307. // top_p: 1,
  24308. // frequency_penalty: 0,
  24309. // presence_penalty: 0,
  24310. // messages: [{
  24311. // content: messages,
  24312. // role: 'user'
  24313. // }],
  24314. // uid: _uuid,
  24315. // mind_map_question: "",
  24316. // })
  24317. let params = {
  24318. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24319. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24320. session_name: _uuid,
  24321. userId: _this.userid,
  24322. uid: _uuid,
  24323. file_ids: fileid.length ? [...fileid] : '',
  24324. model: 'gpt-4o-2024-11-20',
  24325. temperature: this.mode == 3 ? 0.5 : 0.1,
  24326. }
  24327. // let params = JSON.stringify({
  24328. // message: {
  24329. // anthropic_version: "bedrock-2023-05-31",
  24330. // max_tokens: 4096,
  24331. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24332. // top_p: 1,
  24333. // messages: [{
  24334. // "role": "user",
  24335. // "content": messages
  24336. // }] ,
  24337. // },
  24338. // uid: _uuid,
  24339. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24340. // });
  24341. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24342. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24343. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24344. console.log(response);
  24345. // let data = response.data.FunctionResponse
  24346. // if (data.choices && data.choices.length && data.choices[0].message) {
  24347. // _this.courseText = data.choices[0].message.content
  24348. // }
  24349. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24350. } else {
  24351. _this.$message.warning(response.data.FunctionResponse.result);
  24352. }
  24353. _this.isTargetCancelToken1 = null
  24354. }).catch(function (error) {
  24355. _this.targetTextLoading = false
  24356. _this.ttargetTextLoading = false
  24357. _this.isTargetCancelToken1 = null
  24358. if(error && error.message != 'Request canceled by the user.'){
  24359. _this.$message.error(this.lang.ssTooManyReq)
  24360. }
  24361. console.log(error);
  24362. });
  24363. await _this.aitargetTextDetailgetAiContent(_uuid)
  24364. },
  24365. aitargetTextDetailgetAiContent(_uid) {
  24366. try {
  24367. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24368. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24369. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24370. } catch (error) {
  24371. console.log('EventSource error:', error);
  24372. this.$message.error(this.lang.ssTooManyReq)
  24373. this.targetTextLoading = false
  24374. this.ttargetTextLoading = false
  24375. this.isTargetCancelToken1 = null
  24376. return;
  24377. }
  24378. let _allText = "";
  24379. let _mdText = "";
  24380. let _iindex = 0
  24381. this.isTargetCancelSource1.onmessage = _e => {
  24382. let _eData = JSON.parse(_e.data).content;
  24383. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24384. //对话已经完成
  24385. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24386. this.isTargetCancelSource1.close();
  24387. this.isTargetCancelSource1 = null;
  24388. this.targetCourseText = _mdText;
  24389. this.targetTextLoading = false
  24390. this.ttargetTextLoading = false
  24391. this.targetCourseTextB = false
  24392. this.isTargetCancelToken1 = null
  24393. return;
  24394. } else {
  24395. _iindex++
  24396. //对话还在继续
  24397. let _text = "";
  24398. _text = _eData.replaceAll("'", "");
  24399. if (_allText == "") {
  24400. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24401. } else {
  24402. _allText += _text;
  24403. }
  24404. _mdText = _allText + "_";
  24405. _mdText = _mdText.replace(/\\n/g, "\n");
  24406. _mdText = _mdText.replace(/\\/g, "");
  24407. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24408. //转化返回的回复流数据
  24409. if(_iindex == 10){
  24410. this.targetCourseText = _mdText;
  24411. _iindex = 0
  24412. }
  24413. if(this.targetTextLoading){
  24414. this.targetTextLoading = false
  24415. }
  24416. // 处理流数据
  24417. }
  24418. // this.$forceUpdate();
  24419. };
  24420. let _this = this
  24421. this.isTargetCancelSource1.onerror = function(event) {
  24422. // 处理错误,可以尝试重新连接
  24423. console.log('EventSource error:', event);
  24424. _this.$message.error(this.lang.ssTooManyReq)
  24425. _this.targetTextLoading = false
  24426. _this.ttargetTextLoading = false
  24427. _this.isTargetCancelToken1 = null
  24428. _this.isTargetCancelSource1.close();
  24429. _this.isTargetCancelSource1 = null;
  24430. };
  24431. },
  24432. async aitargetTextDetail2(msg) {
  24433. let _this = this
  24434. let fileid = []
  24435. if(_this.mubiaoInfoData.length){
  24436. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24437. if(_this.mubiaoInfoData[i].fileid){
  24438. fileid.push(_this.mubiaoInfoData[i].fileid)
  24439. }else {
  24440. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24441. if(_fileid){
  24442. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24443. _this.$forceUpdate();
  24444. if(_fileid != 1){
  24445. fileid.push(_fileid)
  24446. }
  24447. }
  24448. }
  24449. }
  24450. }
  24451. _this.targetTextLoading2 = true
  24452. _this.ttargetTextLoading2 = true
  24453. let sub = []
  24454. if (_this.courseTypeId.length) {
  24455. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24456. let _sid = _this.courseTypeId[i]
  24457. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24458. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24459. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24460. }
  24461. }
  24462. }
  24463. }
  24464. let mclass = []
  24465. if (_this.courseTypeId.length) {
  24466. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24467. let _sid = _this.courseTypeId[i]
  24468. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24469. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24470. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24471. }
  24472. }
  24473. }
  24474. }
  24475. if(sub.length){
  24476. let _fileid = _this.importFileid(sub)
  24477. fileid = [...fileid, ..._fileid]
  24478. }
  24479. let messages = `NOTICE
  24480. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24481. Language: ${this.getLang()}
  24482. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24483. Instruction: Based on the context, follow "Format example", write content.
  24484. #Context
  24485. ## 参考资料
  24486. 课程标题:${this.courseName}
  24487. ${sub.length ? '学科:' + sub.join(",") : ''}
  24488. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24489. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24490. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24491. ## 要求
  24492. ${msg}
  24493. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24494. let _uuid = uuidv4();
  24495. // let params = JSON.stringify({
  24496. // // "model": "Chat",
  24497. // model: 'gpt-3.5-turbo',
  24498. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24499. // max_tokens: 4096,
  24500. // top_p: 1,
  24501. // frequency_penalty: 0,
  24502. // presence_penalty: 0,
  24503. // messages: [{
  24504. // content: messages,
  24505. // role: 'user'
  24506. // }],
  24507. // uid: _uuid,
  24508. // mind_map_question: "",
  24509. // })
  24510. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24511. let params = {
  24512. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24513. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24514. session_name: _uuid,
  24515. userId: _this.userid,
  24516. uid: _uuid,
  24517. file_ids: fileid.length ? [...fileid] : '',
  24518. model: 'gpt-4o-2024-11-20',
  24519. temperature: this.mode == 3 ? 0.5 : 0.1,
  24520. }
  24521. // let params = JSON.stringify({
  24522. // message: {
  24523. // anthropic_version: "bedrock-2023-05-31",
  24524. // max_tokens: 4096,
  24525. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24526. // top_p: 1,
  24527. // messages: [{
  24528. // "role": "user",
  24529. // "content": messages
  24530. // }] ,
  24531. // },
  24532. // uid: _uuid,
  24533. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24534. // });
  24535. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24536. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24537. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24538. console.log(response);
  24539. // let data = response.data.FunctionResponse
  24540. // if (data.choices && data.choices.length && data.choices[0].message) {
  24541. // _this.courseText = data.choices[0].message.content
  24542. // }
  24543. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24544. } else {
  24545. _this.$message.warning(response.data.FunctionResponse.result);
  24546. }
  24547. _this.isTargetCancelToken2 = null
  24548. }).catch(function (error) {
  24549. _this.targetTextLoading2 = false
  24550. _this.ttargetTextLoading2 = false
  24551. _this.isTargetCancelToken2 = null
  24552. if(error && error.message != 'Request canceled by the user.'){
  24553. _this.$message.error(this.lang.ssTooManyReq)
  24554. }
  24555. console.log(error);
  24556. });
  24557. await _this.aitargetTextDetail2getAiContent(_uuid)
  24558. },
  24559. importFileid(sub){
  24560. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24561. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24562. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24563. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24564. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24565. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24566. let _sub = converter(sub.join(","))
  24567. let fileid = []
  24568. for(var i = 0; i < this.fileidArray.length; i++){
  24569. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24570. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24571. fileid.push(this.fileidArray[i].fileid)
  24572. }
  24573. }
  24574. }
  24575. return fileid
  24576. },
  24577. selectFileid(){
  24578. let params = {
  24579. oid: this.oid,
  24580. };
  24581. this.ajax
  24582. .get(this.$store.state.api + "selectFileid", params)
  24583. .then((res) => {
  24584. this.fileidArray = res.data[0]
  24585. if(res.data[1].length){
  24586. this.fileidArray = res.data[1]
  24587. }
  24588. if(res.data[2].length){
  24589. this.fileidArray = res.data[2]
  24590. }
  24591. })
  24592. .catch((err) => {
  24593. console.error(err);
  24594. });
  24595. },
  24596. selectAiFileid(){
  24597. let params = {
  24598. oid: this.oid,
  24599. };
  24600. this.ajax
  24601. .get(this.$store.state.api + "selectAiFileid", params)
  24602. .then((res) => {
  24603. let fileIds = []
  24604. for(var i = 0; i < res.data[0].length; i++){
  24605. fileIds.push(res.data[0][i].fileid)
  24606. }
  24607. this.fileIds = fileIds
  24608. if(res.data[1].length){
  24609. fileIds = []
  24610. for(var i = 0; i < res.data[1].length; i++){
  24611. fileIds.push(res.data[0][i].fileid)
  24612. }
  24613. this.fileIds = fileIds
  24614. }
  24615. if(res.data[2].length){
  24616. fileIds = []
  24617. for(var i = 0; i < res.data[2].length; i++){
  24618. fileIds.push(res.data[0][i].fileid)
  24619. }
  24620. this.fileIds = fileIds
  24621. }
  24622. })
  24623. .catch((err) => {
  24624. console.error(err);
  24625. });
  24626. },
  24627. selectKnowFileid(){
  24628. let params = {
  24629. oid: this.oid,
  24630. sta: 'cn'
  24631. };
  24632. this.ajax
  24633. .get(this.$store.state.api + "selectKnowFileid", params)
  24634. .then((res) => {
  24635. this.knowFileArray = res.data[0]
  24636. if(res.data[1].length){
  24637. this.knowFileArray = res.data[1]
  24638. }
  24639. if(res.data[2].length){
  24640. this.knowFileArray = res.data[2]
  24641. }
  24642. })
  24643. .catch((err) => {
  24644. console.error(err);
  24645. });
  24646. },
  24647. async aitargetTextDetail22(msg,msg2) {
  24648. let _this = this
  24649. let fileid = []
  24650. _this.targetTextLoading2 = true
  24651. _this.ttargetTextLoading2 = true
  24652. let sub = []
  24653. if (_this.courseTypeId.length) {
  24654. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24655. let _sid = _this.courseTypeId[i]
  24656. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24657. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24658. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24659. }
  24660. }
  24661. }
  24662. }
  24663. let mclass = []
  24664. if (_this.courseTypeId.length) {
  24665. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24666. let _sid = _this.courseTypeId[i]
  24667. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24668. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24669. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24670. }
  24671. }
  24672. }
  24673. }
  24674. if(!msg2 && sub.length){
  24675. // let _fileid = _this.importFileid(sub)
  24676. // fileid = [...fileid, ..._fileid]
  24677. }
  24678. let messages = `NOTICE
  24679. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24680. Language: ${this.getLang()}
  24681. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24682. Instruction: Based on the context, follow "Format example", write content.
  24683. #Context
  24684. ## 参考资料
  24685. 课程标题:${this.courseName}
  24686. ${sub.length ? '学科:' + sub.join(",") : ''}
  24687. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24688. 课程目标:${msg2}
  24689. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24690. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24691. ## 要求
  24692. ${msg}
  24693. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24694. let _uuid = uuidv4();
  24695. // let params = JSON.stringify({
  24696. // // "model": "Chat",
  24697. // model: 'gpt-3.5-turbo',
  24698. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24699. // max_tokens: 4096,
  24700. // top_p: 1,
  24701. // frequency_penalty: 0,
  24702. // presence_penalty: 0,
  24703. // messages: [{
  24704. // content: messages,
  24705. // role: 'user'
  24706. // }],
  24707. // uid: _uuid,
  24708. // mind_map_question: "",
  24709. // })
  24710. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24711. let params = {
  24712. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24713. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24714. session_name: _uuid,
  24715. userId: _this.userid,
  24716. uid: _uuid,
  24717. file_ids: fileid.length ? [...fileid] : '',
  24718. model: 'gpt-4o-2024-11-20',
  24719. temperature: this.mode == 3 ? 0.5 : 0.1,
  24720. }
  24721. // let params = JSON.stringify({
  24722. // message: {
  24723. // anthropic_version: "bedrock-2023-05-31",
  24724. // max_tokens: 4096,
  24725. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24726. // top_p: 1,
  24727. // messages: [{
  24728. // "role": "user",
  24729. // "content": messages
  24730. // }] ,
  24731. // },
  24732. // uid: _uuid,
  24733. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24734. // });
  24735. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24736. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24737. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24738. console.log(response);
  24739. // let data = response.data.FunctionResponse
  24740. // if (data.choices && data.choices.length && data.choices[0].message) {
  24741. // _this.courseText = data.choices[0].message.content
  24742. // }
  24743. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24744. } else {
  24745. _this.$message.warning(response.data.FunctionResponse.result);
  24746. }
  24747. _this.isTargetCancelToken2 = null
  24748. }).catch(function (error) {
  24749. _this.targetTextLoading2 = false
  24750. _this.ttargetTextLoading2 = false
  24751. _this.isTargetCancelToken2 = null
  24752. if(error && error.message != 'Request canceled by the user.'){
  24753. _this.$message.error(this.lang.ssTooManyReq)
  24754. }
  24755. console.log(error);
  24756. });
  24757. await _this.aitargetTextDetail2getAiContent(_uuid)
  24758. },
  24759. aitargetTextDetail2getAiContent(_uid) {
  24760. try {
  24761. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24762. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24763. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24764. } catch(error) {
  24765. console.log('EventSource error:', error);
  24766. this.$message.error(this.lang.ssTooManyReq)
  24767. this.targetTextLoading2 = false
  24768. this.ttargetTextLoading2 = false
  24769. this.isTargetCancelToken2 = null
  24770. return;
  24771. }
  24772. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24773. let _allText = "";
  24774. let _mdText = "";
  24775. let _iindex = 0
  24776. this.isTargetCancelSource2.onmessage = _e => {
  24777. let _eData = JSON.parse(_e.data).content;
  24778. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24779. //对话已经完成
  24780. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24781. this.isTargetCancelSource2.close();
  24782. this.isTargetCancelSource2 = null;
  24783. this.targetCourseText2 = text1+' \n '+_mdText;
  24784. this.targetTextLoading2 = false
  24785. this.ttargetTextLoading2 = false
  24786. this.targetCourseText2B = false
  24787. this.isTargetCancelToken2 = null
  24788. this.saveCourse()
  24789. return;
  24790. } else {
  24791. _iindex++
  24792. //对话还在继续
  24793. let _text = "";
  24794. _text = _eData.replaceAll("'", "");
  24795. if (_allText == "") {
  24796. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24797. } else {
  24798. _allText += _text;
  24799. }
  24800. _mdText = _allText + "_";
  24801. _mdText = _mdText.replace(/\\n/g, "\n");
  24802. _mdText = _mdText.replace(/\\/g, "");
  24803. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24804. //转化返回的回复流数据
  24805. if(_iindex == 10){
  24806. this.targetCourseText2 = text1+' \n '+_mdText;
  24807. _iindex = 0
  24808. }
  24809. if(this.targetTextLoading2){
  24810. this.targetTextLoading2 = false
  24811. }
  24812. // 处理流数据
  24813. }
  24814. // this.$forceUpdate();
  24815. };
  24816. let _this = this
  24817. this.isTargetCancelSource2.onerror = function(event) {
  24818. // 处理错误,可以尝试重新连接
  24819. console.log('EventSource error:', event);
  24820. _this.$message.error(this.lang.ssTooManyReq)
  24821. _this.targetTextLoading2 = false
  24822. _this.ttargetTextLoading2 = false
  24823. _this.isTargetCancelToken2 = null
  24824. _this.isTargetCancelSource2.close();
  24825. _this.isTargetCancelSource2 = null;
  24826. };
  24827. },
  24828. async aitargetTextDetail3(msg) {
  24829. let _this = this
  24830. let fileid = []
  24831. if(_this.mubiaoInfoData.length){
  24832. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24833. if(_this.mubiaoInfoData[i].fileid){
  24834. fileid.push(_this.mubiaoInfoData[i].fileid)
  24835. }else {
  24836. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24837. if(_fileid){
  24838. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24839. _this.$forceUpdate();
  24840. if(_fileid != 1){
  24841. fileid.push(_fileid)
  24842. }
  24843. }
  24844. }
  24845. }
  24846. }
  24847. _this.targetTextLoading2 = true
  24848. _this.ttargetTextLoading2 = true
  24849. let sub = []
  24850. if (_this.courseTypeId.length) {
  24851. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24852. let _sid = _this.courseTypeId[i]
  24853. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24854. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24855. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24856. }
  24857. }
  24858. }
  24859. }
  24860. let mclass = []
  24861. if (_this.courseTypeId.length) {
  24862. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24863. let _sid = _this.courseTypeId[i]
  24864. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24865. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24866. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24867. }
  24868. }
  24869. }
  24870. }
  24871. // if(sub.length){
  24872. // let _fileid = _this.importFileid(sub)
  24873. // fileid = [...fileid, ..._fileid]
  24874. // }
  24875. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24876. if (_this.infoData.length) {
  24877. for (var i = 0; i < _this.infoData.length; i++) {
  24878. if(_this.infoData[i].fileid){
  24879. fileid.push(_this.infoData[i].fileid)
  24880. }else {
  24881. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24882. if(_fileid){
  24883. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24884. _this.$forceUpdate();
  24885. if(_fileid != 1){
  24886. fileid.push(_fileid)
  24887. }
  24888. }
  24889. }
  24890. }
  24891. }
  24892. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24893. let messages = `Language: ${this.getLang()}
  24894. ${msg}
  24895. ## 课程信息
  24896. 课程名字:${this.courseName}
  24897. 课程概况:${this.courseText}
  24898. ${sub.length ? '学科:' + sub.join(",") : ''}
  24899. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24900. let _uuid = uuidv4();
  24901. // let params = JSON.stringify({
  24902. // // "model": "Chat",
  24903. // model: 'gpt-3.5-turbo',
  24904. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24905. // max_tokens: 4096,
  24906. // top_p: 1,
  24907. // frequency_penalty: 0,
  24908. // presence_penalty: 0,
  24909. // messages: [{
  24910. // content: messages,
  24911. // role: 'user'
  24912. // }],
  24913. // uid: _uuid,
  24914. // mind_map_question: "",
  24915. // })
  24916. let params = {
  24917. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24918. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24919. session_name: _uuid,
  24920. userId: _this.userid,
  24921. uid: _uuid,
  24922. file_ids: fileid.length ? [...fileid] : '',
  24923. model: 'gpt-4o-2024-11-20',
  24924. temperature: this.mode == 3 ? 0.5 : 0.1,
  24925. }
  24926. // let params = JSON.stringify({
  24927. // message: {
  24928. // anthropic_version: "bedrock-2023-05-31",
  24929. // max_tokens: 4096,
  24930. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24931. // top_p: 1,
  24932. // messages: [{
  24933. // "role": "user",
  24934. // "content": messages
  24935. // }] ,
  24936. // },
  24937. // uid: _uuid,
  24938. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24939. // });
  24940. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24941. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24942. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24943. console.log(response);
  24944. // let data = response.data.FunctionResponse
  24945. // if (data.choices && data.choices.length && data.choices[0].message) {
  24946. // _this.courseText = data.choices[0].message.content
  24947. // }
  24948. console.log(response);
  24949. let data = response.data.FunctionResponse
  24950. // if (data.choices && data.choices.length && data.choices[0].message) {
  24951. // console.log(data.choices[0].message.content);
  24952. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24953. // _this.$forceUpdate()
  24954. // }
  24955. if (data.message) {
  24956. console.log('返回回来的目标:',data.message);
  24957. _this.targetCourseText2 = data.message
  24958. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24959. }
  24960. _this.isTargetCancelToken2 = null
  24961. }).catch(function (error) {
  24962. _this.targetTextLoading2 = false
  24963. _this.ttargetTextLoading2 = false
  24964. _this.isTargetCancelToken2 = null
  24965. if(error && error.message != 'Request canceled by the user.'){
  24966. _this.$message.error(this.lang.ssTooManyReq)
  24967. }
  24968. console.log(error);
  24969. });
  24970. },
  24971. againEva(msg, i, k) {
  24972. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24973. this.$message.error(this.lang.ssEvaCompleteInfo.replace(/\*/g, i+1).replace(/\$/g, k+1))
  24974. return;
  24975. }
  24976. if (this.ruleLoading[i]) {
  24977. this.ruleLoading[i][k] = true
  24978. } else {
  24979. this.ruleLoading[i] = []
  24980. this.ruleLoading[i][k] = true
  24981. }
  24982. let message = `NOTICE
  24983. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24984. Language: ${this.getLang()}
  24985. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24986. Instruction: Based on the context, follow "Format example", write content.
  24987. #Context
  24988. ##要求
  24989. ${msg}
  24990. ##制定标准资料
  24991. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24992. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24993. # Format example
  24994. ==
  24995. ${this.lang.ssStar0},作业内容与作业要求无关;
  24996. ${this.lang.ssStar1},没有识别问题和需求;
  24997. ${this.lang.ssStar2},问题或需求没有被清晰理解或准确识别;
  24998. ${this.lang.ssStar3},问题或需求的一部分被识别;
  24999. ${this.lang.ssStar4},问题或需求的大部分被识别;
  25000. ${this.lang.ssStar5},问题或需求都被识别。
  25001. ==
  25002. `
  25003. // let params = {
  25004. // // "model": "Chat",
  25005. // model: 'gpt-4o-2024-11-20',
  25006. // // model: "gpt-4o",
  25007. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25008. // max_tokens: 4096,
  25009. // top_p: 1,
  25010. // frequency_penalty: 0,
  25011. // presence_penalty: 0,
  25012. // messages: [
  25013. // {
  25014. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  25015. // role: "user"
  25016. // }
  25017. // ],
  25018. // stream: false,
  25019. // uid: this.userid,
  25020. // mind_map_question: ""
  25021. // };
  25022. // this.ajax
  25023. // .post("https://gpt4.cocorobo.cn/chat", params)
  25024. // .then(response => {
  25025. // let data = response.data.FunctionResponse;
  25026. // console.log("data", data);
  25027. // if (data.choices && data.choices.length && data.choices[0].message) {
  25028. // let content = data.choices[0].message.content;
  25029. // var regex = new RegExp('==([^=]+)==');
  25030. // let match = content.match(regex);
  25031. // if (match) {
  25032. // content = match[1].trim().replaceAll(' ', '');
  25033. // // 获取匹配到的内容并去除两端空格
  25034. // console.log('contentInsideDoubleEquals', content);
  25035. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  25036. // console.log("未有星级。");
  25037. // this.againEva(msg, i, k)
  25038. // return
  25039. // }
  25040. // //  return
  25041. // } else {
  25042. // console.log("未找到匹配的内容。");
  25043. // this.againEva(msg, i, k)
  25044. // return
  25045. // }
  25046. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25047. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25048. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25049. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25050. // this.$forceUpdate();
  25051. // this.ruleLoading[i][k] = false
  25052. // }else{
  25053. // this.ruleLoading[i][k] = false
  25054. // }
  25055. // })
  25056. // .catch(error => {
  25057. // console.log(error);
  25058. // this.ruleLoading[i][k] = false
  25059. // });
  25060. let parm = {
  25061. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25062. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  25063. session_name: uuidv4(),
  25064. userId: this.userid,
  25065. file_ids: [],
  25066. model: 'gpt-4o-2024-11-20',
  25067. temperature: this.mode == 3 ? 0.5 : 0.1,
  25068. }
  25069. this.ajax
  25070. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  25071. .then(async (response) => {
  25072. console.log(response);
  25073. let data = response.data.FunctionResponse
  25074. if (data.message) {
  25075. console.log(data.message);
  25076. let content = data.message;
  25077. var regex = new RegExp('==([^=]+)==');
  25078. let match = content.match(regex);
  25079. if (match) {
  25080. content = match[1].trim().replaceAll(' ', '');
  25081. // 获取匹配到的内容并去除两端空格
  25082. console.log('contentInsideDoubleEquals', content);
  25083. if (content.indexOf(this.lang.ssStar0) == -1 || content.indexOf(this.lang.ssStar1) == -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) {
  25084. console.log(this.lang.ssNoStarLevel);
  25085. this.againEva(msg, i, k)
  25086. return
  25087. }
  25088. // return
  25089. } else {
  25090. console.log(this.lang.ssNoMatch);
  25091. this.againEva(msg, i, k)
  25092. return
  25093. }
  25094. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25095. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25096. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25097. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25098. this.$forceUpdate();
  25099. this.ruleLoading[i][k] = false
  25100. this.$message.success(this.lang.ssEvaRuleSucc.replace(/\*/g, i+1).replace(/\$/g, k+1))
  25101. }else {
  25102. this.ruleLoading[i][k] = false
  25103. }
  25104. })
  25105. .catch((error) => {
  25106. this.ruleLoading[i][k] = false
  25107. console.log(error);
  25108. });
  25109. },
  25110. async aiSearchFile(messages, callback) {
  25111. let _this = this
  25112. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  25113. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  25114. console.log('fileid=========',fileid)
  25115. // let params = JSON.stringify({
  25116. // // "model": "Chat",
  25117. // model: 'gpt-3.5-turbo',
  25118. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25119. // max_tokens: 4096,
  25120. // top_p: 1,
  25121. // frequency_penalty: 0,
  25122. // presence_penalty: 0,
  25123. // messages: [{
  25124. // content: messages,
  25125. // role: 'user'
  25126. // }],
  25127. // stream: false,
  25128. // uid: this.userid,
  25129. // mind_map_question: "",
  25130. // })
  25131. // // let params = JSON.stringify({
  25132. // // message: {
  25133. // // anthropic_version: "bedrock-2023-05-31",
  25134. // // max_tokens: 4096,
  25135. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  25136. // // top_p: 1,
  25137. // // messages: [{
  25138. // // content: messages,
  25139. // // role: 'user'
  25140. // // }], //
  25141. // // },
  25142. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  25143. // // });
  25144. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  25145. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  25146. // console.log(response);
  25147. // let data = response.data.FunctionResponse
  25148. // if (data.choices && data.choices.length && data.choices[0].message) {
  25149. // console.log(data.choices[0].message.content);
  25150. // let dArray = JSON.parse(data.choices[0].message.content)
  25151. // _this.dArray = dArray
  25152. // _this.unitJson[0].chapterInfo[0].taskJson = []
  25153. // for (var i = 0; i < dArray.length; i++) {
  25154. // let _task = dArray[i]
  25155. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25156. // task: _task.task,
  25157. // taskDetail: "",
  25158. // taskDetail2: _task.detail,
  25159. // taskDetail3: "",
  25160. // chapterData: [],
  25161. // toolText: "",
  25162. // toolChoose: [
  25163. // {
  25164. // tool: [],
  25165. // toolDetail: "",
  25166. // toolType: 0,
  25167. // askCount: 1,
  25168. // askTitle: "",
  25169. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25170. // },
  25171. // ],
  25172. // isShowTools: false,
  25173. // askCount: 1,
  25174. // isFold: 0,
  25175. // askTitle: "",
  25176. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25177. // checkJson: [{ checkCount: [], checkPerent: [] }],
  25178. // homeworkList: [],
  25179. // })
  25180. // }
  25181. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  25182. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25183. // _this.$forceUpdate();
  25184. // }
  25185. // // if (data.result) {
  25186. // // console.log(data.result);
  25187. // // let dArray = JSON.parse(data.result)
  25188. // // _this.dArray = dArray
  25189. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  25190. // // for (var i = 0; i < dArray.length; i++) {
  25191. // // let _task = dArray[i]
  25192. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25193. // // task: _task.task,
  25194. // // taskDetail: "",
  25195. // // taskDetail2: _task.detail,
  25196. // // taskDetail3: "",
  25197. // // chapterData: [],
  25198. // // toolText: "",
  25199. // // toolChoose: [
  25200. // // {
  25201. // // tool: [],
  25202. // // toolDetail: "",
  25203. // // toolType: 0,
  25204. // // askCount: 1,
  25205. // // askTitle: "",
  25206. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25207. // // },
  25208. // // ],
  25209. // // isShowTools: false,
  25210. // // askCount: 1,
  25211. // // isFold: 1,
  25212. // // askTitle: "",
  25213. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25214. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  25215. // // homeworkList: [],
  25216. // // })
  25217. // // }
  25218. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25219. // // _this.$forceUpdate();
  25220. // // }
  25221. // callback ? callback() : ''
  25222. // }).catch(function (error) {
  25223. // _this.loading = false
  25224. // console.log(error);
  25225. // });
  25226. this.isFileCancelToken = this.ajax.setCancelSource();
  25227. let parm = {
  25228. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25229. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25230. session_name: uuidv4(),
  25231. userId: this.userid,
  25232. file_ids: fileid.length ? [...fileid] : '',
  25233. model: 'gpt-4o-2024-11-20',
  25234. temperature: this.mode == 3 ? 0.5 : 0.1,
  25235. }
  25236. this.ajax
  25237. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25238. .then((response) => {
  25239. console.log(response);
  25240. let data = response.data.FunctionResponse
  25241. if (data.message) {
  25242. console.log(data.message);
  25243. let dArray = []
  25244. try {
  25245. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25246. let regex3 = new RegExp('(?<!")content(?!")','g')
  25247. //
  25248. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25249. } catch (error) {
  25250. // callback ? callback() : ''
  25251. console.log("error_________________" + error);
  25252. try {
  25253. let regex = new RegExp(/```json([\s\S]*?)```/);
  25254. let match = data.message.match(regex);
  25255. dArray = JSON.parse(match[1]);
  25256. } catch (error) {
  25257. // callback ? callback() : ''
  25258. _this.$message.error(_this.lang.ssFormatErr)
  25259. console.log("error_________________" + error);
  25260. _this.isFileCancelToken = null;
  25261. _this.aiSearchFile(messages, callback)
  25262. return
  25263. }
  25264. }
  25265. for(let i = 0; i < dArray.length; i++){
  25266. let content = dArray[i].content
  25267. let name = _this.lang.ssRefMat+(i+1)
  25268. let md = new MarkdownIt();
  25269. let _html = content ? md.render(content) : ''
  25270. setTimeout(()=>{
  25271. if(i == (dArray.length - 1)){
  25272. _this.generate2(name, _html, i, callback)
  25273. }else {
  25274. _this.generate2(name, _html, i)
  25275. }
  25276. }, 500 * i)
  25277. }
  25278. _this.isFileCancelToken = null
  25279. _this.$forceUpdate();
  25280. }
  25281. })
  25282. .catch((error) => {
  25283. callback ? callback() : ''
  25284. _this.isFileCancelToken = null
  25285. console.log(error);
  25286. });
  25287. },
  25288. async aiSearchFile2(messages, callback) {
  25289. let _this = this
  25290. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25291. console.log('fileid=========',fileid)
  25292. this.isFileCancelToken = this.ajax.setCancelSource();
  25293. let parm = {
  25294. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25295. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25296. session_name: uuidv4(),
  25297. userId: this.userid,
  25298. file_ids: fileid.length ? [...fileid] : '',
  25299. model: 'gpt-4o-2024-11-20',
  25300. temperature: this.mode == 3 ? 0.5 : 0.1,
  25301. }
  25302. this.ajax
  25303. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25304. .then((response) => {
  25305. console.log(response);
  25306. let data = response.data.FunctionResponse
  25307. if (data.message) {
  25308. console.log(data.message);
  25309. let content = data.message
  25310. let name = _this.lang.ssRefMat
  25311. let md = new MarkdownIt();
  25312. let _html = content ? md.render(content) : ''
  25313. _this.generate2(name, _html, 0, callback)
  25314. _this.isFileCancelToken = null
  25315. _this.$forceUpdate();
  25316. }
  25317. })
  25318. .catch((error) => {
  25319. callback ? callback() : ''
  25320. _this.isFileCancelToken = null
  25321. console.log(error);
  25322. });
  25323. },
  25324. createFileid(url) {
  25325. let _this = this
  25326. return new Promise((resolve, reject) => {
  25327. try {
  25328. _this.ajax
  25329. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25330. url: url,
  25331. })
  25332. .then((res) => {
  25333. let _data = res.data.FunctionResponse;
  25334. if (_data.result && _data.result.id) {
  25335. resolve(_data.result.id)
  25336. }else {
  25337. resolve(1)
  25338. }
  25339. }).catch(function (error) {
  25340. resolve(1)
  25341. });
  25342. }catch (e){
  25343. resolve(1)
  25344. }
  25345. });
  25346. },
  25347. handleSwitchChange(string){
  25348. // let area = ''
  25349. // let text = ''
  25350. // if(string == 'aiteacherTextDetail'){
  25351. // area = '已有教案摘要'
  25352. // text = this.teacherCourseText
  25353. // }else if(string == 'aitargetTextDetail'){
  25354. // area = '课程目标'
  25355. // text = this.targetCourseText
  25356. // }else if(string == 'aiDetail'){
  25357. // area = '课程简要描述'
  25358. // text = this.courseText
  25359. // }else if(string == 'aitargetTextDetail2'){
  25360. // area = '课程目标'
  25361. // text = this.targetCourseText2
  25362. // }else if(string.indexOf('aiDetail1') != -1){
  25363. // let index = parseInt(string.split('aiDetail1-')[1])
  25364. // area = `任务${index+1}课程大纲`
  25365. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25366. // }else if(string == 'aiCpote1'){
  25367. // area = '概念群'
  25368. // text = this.cpote.cpote1
  25369. // }else if(string == 'aiCpote2'){
  25370. // area = '问题链'
  25371. // text = this.cpote.cpote2
  25372. // }else if(string == 'aiCpote3'){
  25373. // area = '目标层'
  25374. // text = this.cpote.cpote3
  25375. // }else if(string == 'aiCpote4'){
  25376. // area = '任务簇'
  25377. // text = this.cpote.cpote4
  25378. // }else if(string.indexOf('teacherDetail2') != -1){
  25379. // let index = parseInt(string.split('teacherDetail2-')[1])
  25380. // area = `任务${index+1}教案`
  25381. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25382. // }else if(string.indexOf('aiDetail2') != -1){
  25383. // let index = parseInt(string.split('aiDetail2-')[1])
  25384. // area = `任务${index+1}任务描述`
  25385. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25386. // }else if(string.indexOf('aiDetail3') != -1){
  25387. // let index = parseInt(string.split('-')[1])
  25388. // let index2 = parseInt(string.split('-')[2])
  25389. // area = `任务${index+1}工具${index2+1}的工具描述`
  25390. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25391. // }
  25392. // if(this.isQuote[string] && text){
  25393. // this.quoteArray.push({
  25394. // string,
  25395. // area,
  25396. // value: text
  25397. // })
  25398. // }
  25399. console.log(this.isQuote)
  25400. },
  25401. setIsQuote(string){
  25402. this.isQuote[string] = false
  25403. },
  25404. setEvaList(task, tool, elist){
  25405. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25406. this.$forceUpdate()
  25407. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25408. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25409. }
  25410. },
  25411. closeRight(){
  25412. this.isDisplay = !this.isDisplay;
  25413. },
  25414. addCourseBehavior(type, _html) { // 保存行为操作
  25415. let params = [{
  25416. uid: this.userid,
  25417. courseId: '',
  25418. type: type,
  25419. content: _html,
  25420. }];
  25421. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25422. if (res.data == 1) {
  25423. console.log('保存操作成功');
  25424. } else {
  25425. console.log('保存操作失败');
  25426. }
  25427. }).catch(e => {
  25428. console.log('保存操作失败');
  25429. console.log(e);
  25430. });
  25431. },
  25432. async useUrl(){
  25433. if(!this.knowFileids3.length){
  25434. this.$message.error(this.lang.ssSelectMat)
  25435. return
  25436. }
  25437. let array = []
  25438. for(var i = 0; i < this.knowFileids3.length; i++){
  25439. let item = this.knowFileids3[i]
  25440. for(var j = 0; j < this.knowInfoData3.length; j++){
  25441. if(item == this.knowInfoData3[j].url){
  25442. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25443. if (!isExist) {
  25444. this.knowInfoData2.push(this.knowInfoData3[j]);
  25445. }
  25446. }
  25447. }
  25448. }
  25449. this.$nextTick(() => {
  25450. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25451. });
  25452. this.knowFileids3 = []
  25453. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25454. if (!this.knowInfoData2[i].fileid) {
  25455. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25456. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25457. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25458. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25459. this.knowFileids2.push(fileid)
  25460. }
  25461. }
  25462. }
  25463. },
  25464. panFind(event) {
  25465. // if(!this.findMatchingContentsFinish){
  25466. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25467. // // 判断是否触底
  25468. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25469. // this.findMatchingContentsPage++
  25470. // this.findMatchingContents(); // 调用下拉刷新方法
  25471. // }
  25472. // }
  25473. if(!this.findMatchingContentsFinish){
  25474. this.findMatchingContentsPage++
  25475. this.findMatchingContents(); // 调用下拉刷新方法
  25476. }else{
  25477. this.$message.error(this.lang.ssGetAllData)
  25478. }
  25479. },
  25480. startFindMatchingContents(){
  25481. if(!this.searchFileName){
  25482. this.$message.error(this.lang.ssEnterKey)
  25483. return
  25484. }
  25485. if(this.knowInfoDataLoading){
  25486. this.$message.error(this.lang.ssSearchWait)
  25487. return
  25488. }
  25489. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25490. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25491. this.isfindMatchingContents = null;
  25492. }else if(this.isfindMatchingContents){
  25493. this.$message.error(this.lang.ssSearchWait)
  25494. return
  25495. }
  25496. this.findMatchingContentsFinish = false
  25497. this.findMatchingContentsPage = 1
  25498. this.knowInfoData3 = []
  25499. this.knowFileType1 = ''
  25500. this.knowFileType2 = ''
  25501. this.knowFileType = ''
  25502. this.findMatchingContents(); // 调用下拉刷新方法
  25503. },
  25504. findMatchingContents(){
  25505. if(!this.searchFileName){
  25506. this.$message.error(this.lang.ssEnterKey)
  25507. return
  25508. }
  25509. if(this.isfindMatchingContents){
  25510. this.$message.error(this.lang.ssSearchWait)
  25511. return
  25512. }
  25513. let sub = []
  25514. let grade = []
  25515. if (this.courseTypeId.length) {
  25516. for (var i = 0; i < this.courseTypeId.length; i++) {
  25517. let _sid = this.courseTypeId[i]
  25518. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25519. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25520. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25521. }
  25522. }
  25523. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25524. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25525. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25526. }
  25527. }
  25528. }
  25529. }
  25530. if(this.findMatchingContentsPage < 2){
  25531. this.knowInfoDataLoading = true
  25532. }
  25533. let params = {
  25534. type: this.typeC2.join(","),
  25535. string: this.searchFileName,
  25536. grade: this.typeC1.join(","),
  25537. page: this.findMatchingContentsPage
  25538. };
  25539. let md = new MarkdownIt();
  25540. this.isfindMatchingContents = this.ajax.setCancelSource()
  25541. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25542. console.log(res)
  25543. this.isfindMatchingContents = null
  25544. this.knowInfoDataLoading = false
  25545. if(res.data.length){
  25546. let files = []
  25547. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25548. for (var i = 0; i < res.data.length; i++) {
  25549. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25550. let el = res.data[i];
  25551. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25552. let extension = url.split('.').pop().toLowerCase();
  25553. let _type = 2; // 默认类型为2
  25554. // 定义文件类型数组
  25555. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25556. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25557. 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"];
  25558. // 根据文件扩展名判断文件类型
  25559. if (fileA.includes(extension.toUpperCase())) {
  25560. _type = 3;
  25561. } else if (videoA.includes(extension.toUpperCase())) {
  25562. _type = 2;
  25563. } else if (imgA.includes(extension)) {
  25564. _type = 13;
  25565. } else {
  25566. _type = 12;
  25567. }
  25568. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25569. if (!isExist) {
  25570. // let fileid = await this.createFileid(url)
  25571. this.knowInfoData3.push({
  25572. name: el.title,
  25573. url: url,
  25574. uid: '',
  25575. type: _type,
  25576. fileid: '',
  25577. file_type: el.file_type
  25578. // fileid == 1 ? '' : fileid
  25579. });
  25580. // if(fileid != 1){
  25581. // this.knowFileids2.push(fileid)
  25582. // }
  25583. }
  25584. }
  25585. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25586. // if (!this.knowInfoData2[i].fileid) {
  25587. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25588. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25589. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25590. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25591. // this.knowFileids2.push(fileid)
  25592. // }
  25593. // }
  25594. // }
  25595. // let data = {
  25596. // target:{
  25597. // files: files
  25598. // }
  25599. // }
  25600. // console.log(data)
  25601. // this.beforeUploadInfo2(data, 20)
  25602. if(this.findMatchingContentsPage < 10){
  25603. this.panFind()
  25604. }
  25605. }else{
  25606. if(this.findMatchingContentsPage == 1){
  25607. this.$message.error(this.lang.ssNoSearchRes)
  25608. }else {
  25609. this.findMatchingContentsFinish = true
  25610. }
  25611. }
  25612. }).catch(e => {
  25613. console.log(this.lang.ssQueryFail);
  25614. this.isfindMatchingContents = null
  25615. this.knowInfoDataLoading = false
  25616. console.log(e);
  25617. });
  25618. },
  25619. openCodeEditor(type,val, unitIndex,itemTaskIndex,index1){
  25620. console.log('openCodeEditor',type,val,unitIndex,itemTaskIndex,index1);
  25621. this.$refs.CodeEditorRef.open(type,val, unitIndex,itemTaskIndex, index1)
  25622. },
  25623. addHtmlSuccess({Tname,url,type,unitIndex,itemTaskIndex,index1}){
  25624. console.log('addHtmlSuccess',Tname,url,'type:',type,'unitIndex',unitIndex,'itemTaskIndex',itemTaskIndex,'index1',index1);
  25625. if (type == 1) {
  25626. this.unitJson[unitIndex].chapterInfo[0].taskJson[
  25627. itemTaskIndex
  25628. ].chapterData.splice(index1,1,{
  25629. name: Tname,
  25630. url: url,
  25631. type: 16
  25632. })
  25633. }else{
  25634. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25635. itemTaskIndex
  25636. ].chapterData.push({
  25637. name: Tname,
  25638. url: url,
  25639. type: 16
  25640. });
  25641. }
  25642. },
  25643. openAddApp(i) {
  25644. this.lineCount = i;
  25645. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25646. this.lineCount
  25647. ].chapterData.findIndex(i => i.type == 15);
  25648. let _obj = {}
  25649. if (_index != -1) {
  25650. _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25651. this.lineCount
  25652. ].chapterData[_index]
  25653. }
  25654. this.$refs.appDialog.openG(_obj, "", "", "", 2);
  25655. },
  25656. selectAppSuccess({ data, type }) {
  25657. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25658. this.lineCount
  25659. ].chapterData.findIndex(i => i.type == 15);
  25660. if (_index != -1) {
  25661. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25662. this.lineCount
  25663. ].chapterData.splice(_index, 1);
  25664. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25665. this.lineCount
  25666. ].chapterData.push({
  25667. name: data.name,
  25668. title: data.name,
  25669. id:data.id,
  25670. url: data.url,
  25671. type: 15
  25672. });
  25673. } else {
  25674. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25675. this.lineCount
  25676. ].chapterData.push({
  25677. name: data.name,
  25678. title: data.name,
  25679. id:data.id,
  25680. url: data.url,
  25681. type: 15
  25682. });
  25683. }
  25684. this.imgChange1(null, null, 8, this.lineCount);
  25685. this.dialogVisible7 = false;
  25686. },
  25687. // zip压缩文件上传
  25688. uploadZIPFile(i){
  25689. this.lineCount = i;
  25690. // 只支持上传zip文件
  25691. let input = document.createElement('input');
  25692. input.type = 'file';
  25693. input.accept = '.zip';
  25694. input.style.display = 'none';
  25695. // 只允许上传一个文件
  25696. input.multiple = false;
  25697. input.onchange = async (e) => {
  25698. let file = e.target.files[0];
  25699. if (!file) return;
  25700. if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
  25701. this.$message.error(this.lang.ssOnlyZip);
  25702. return;
  25703. }
  25704. try{
  25705. const zip = new JSZip();
  25706. const content = await zip.loadAsync(file);
  25707. let _fileStructure = this.buildFileStructure(file,content);
  25708. let _time = new Date().getTime();
  25709. let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
  25710. this.changeId = "";
  25711. this.$refs.selectHtmlPageDialogRef.open(_resultList);
  25712. }catch(e){
  25713. console.log(e)
  25714. this.$message.error(this.lang.ssZipFail)
  25715. }
  25716. };
  25717. document.body.appendChild(input);
  25718. input.click();
  25719. setTimeout(() => {
  25720. document.body.removeChild(input);
  25721. }, 1000);
  25722. },
  25723. // 构建文件结构树
  25724. buildFileStructure(file,zip) {
  25725. const root = {
  25726. folderName: file.name.replace(/\.[^/.]+$/, ""), // 移除扩展名
  25727. files: []
  25728. };
  25729. // 遍历ZIP文件中的所有文件/文件夹
  25730. zip.forEach((relativePath, file) => {
  25731. if (file.dir) return; // 跳过目录
  25732. const parts = relativePath.split('/');
  25733. let currentLevel = root.files;
  25734. for (let i = 0; i < parts.length; i++) {
  25735. const part = parts[i];
  25736. const isLast = i === parts.length - 1;
  25737. if (isLast) {
  25738. // 添加文件
  25739. currentLevel.push({fileName:part,file:file});
  25740. } else {
  25741. // 查找或创建文件夹
  25742. let folder = currentLevel.find(item =>
  25743. typeof item === 'object' && item.folderName === part
  25744. );
  25745. if (!folder) {
  25746. folder = {
  25747. folderName: part,
  25748. files: []
  25749. };
  25750. currentLevel.push(folder);
  25751. }
  25752. currentLevel = folder.files;
  25753. }
  25754. }
  25755. });
  25756. return root;
  25757. },
  25758. //按路径上传文件
  25759. async uploadZipFileFn(fileList,path){
  25760. return new Promise(async (resolve)=>{
  25761. let _copyFileList = fileList;
  25762. let promise = [];
  25763. for(let i = 0; i < _copyFileList.length; i++){
  25764. if(_copyFileList[i].folderName){
  25765. let _path = `${path}/${_copyFileList[i].folderName}`;
  25766. promise.push(this.uploadZipFileFn(_copyFileList[i].files,_path).then(res=>{
  25767. _copyFileList[i].files = res;
  25768. }))
  25769. }else if(_copyFileList[i].fileName){
  25770. // 将 ZIP 条目转换为文件对象
  25771. const blob = await _copyFileList[i].file.async('blob');
  25772. // 根据文件名设置type
  25773. let type = 'text/html';
  25774. if (_copyFileList[i].fileName.endsWith('.js')) {
  25775. type = 'application/javascript';
  25776. } else if (_copyFileList[i].fileName.endsWith('.css')) {
  25777. type = 'text/css';
  25778. } else if (_copyFileList[i].fileName.endsWith('.json')) {
  25779. type = 'application/json';
  25780. } else if (_copyFileList[i].fileName.endsWith('.png')) {
  25781. type = 'image/png';
  25782. } else if (_copyFileList[i].fileName.endsWith('.jpg') || _copyFileList[i].fileName.endsWith('.jpeg')) {
  25783. type = 'image/jpeg';
  25784. } else if (_copyFileList[i].fileName.endsWith('.gif')) {
  25785. type = 'image/gif';
  25786. } else if (_copyFileList[i].fileName.endsWith('.svg')) {
  25787. type = 'image/svg+xml';
  25788. } else if (_copyFileList[i].fileName.endsWith('.html') || _copyFileList[i].fileName.endsWith('.htm')) {
  25789. type = 'text/html';
  25790. } else if (_copyFileList[i].fileName.endsWith('.txt')) {
  25791. type = 'text/plain';
  25792. } else if (_copyFileList[i].fileName.endsWith('.pdf')) {
  25793. type = 'application/pdf';
  25794. } else if (_copyFileList[i].fileName.endsWith('.mp3')) {
  25795. type = 'audio/mpeg';
  25796. } else if (_copyFileList[i].fileName.endsWith('.mp4')) {
  25797. type = 'video/mp4';
  25798. } else if (_copyFileList[i].fileName.endsWith('.zip')) {
  25799. type = 'application/zip';
  25800. } else if (_copyFileList[i].fileName.endsWith('.xml')) {
  25801. type = 'application/xml';
  25802. } else if (_copyFileList[i].fileName.endsWith('.csv')) {
  25803. type = 'text/csv';
  25804. } else if (_copyFileList[i].fileName.endsWith('.md')) {
  25805. type = 'text/markdown';
  25806. }
  25807. let _file = new File([blob], _copyFileList[i].fileName, {type: type, lastModified: new Date().getTime()});
  25808. promise.push(this.awsupload({file:_file,path:`${path}/${_copyFileList[i].fileName}`}).then(res=>{
  25809. delete _copyFileList[i].file;
  25810. _copyFileList[i].url = decodeURIComponent(res.Location);
  25811. }))
  25812. }
  25813. }
  25814. Promise.all(promise).then(res=>{
  25815. resolve(_copyFileList);
  25816. })
  25817. })
  25818. },
  25819. selectHtmlPageSuccess(data){
  25820. let _selectFile = data.find(i=>i.isSelect==="1");
  25821. if(!_selectFile){
  25822. this.changeId = "";
  25823. return this.$message.info(this.lang.ssNoPageSel)
  25824. }
  25825. console.log("_selectFile",_selectFile)
  25826. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25827. this.lineCount
  25828. ].chapterData.findIndex(i => i.type == 17 && i.id == this.changeId);
  25829. if (_index != -1) {
  25830. console.log("_index",_index)
  25831. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25832. this.lineCount
  25833. ].chapterData[_index] = {
  25834. name: _selectFile.fileName,
  25835. title: _selectFile.fileName,
  25836. id:this.changeId,
  25837. url: _selectFile.url,
  25838. fileList:data,
  25839. type: 17
  25840. };
  25841. } else {
  25842. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25843. this.lineCount
  25844. ].chapterData.push({
  25845. name: _selectFile.fileName,
  25846. title: _selectFile.fileName,
  25847. id:new Date().getTime(),
  25848. url: _selectFile.url,
  25849. fileList:data,
  25850. type: 17
  25851. });
  25852. }
  25853. this.changeId = "";
  25854. this.$forceUpdate();
  25855. this.$refs.selectHtmlPageDialogRef.close();
  25856. },
  25857. changeHTmlPage(itemTaskIndex,i){
  25858. let _data = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25859. itemTaskIndex
  25860. ].chapterData[i];
  25861. this.lineCount = itemTaskIndex;
  25862. this.changeId = _data.id;
  25863. this.$refs.selectHtmlPageDialogRef.open(_data.fileList);
  25864. }
  25865. },
  25866. beforeDestroy() {
  25867. // clearTimeout(this.timer);
  25868. // this.timer = null;
  25869. // clearInterval(this.timer2);
  25870. // this.timer2 = null;
  25871. clearInterval(this.pasteTimer);
  25872. this.pasteTimer = null;
  25873. },
  25874. beforeRouteLeave(to, from, next) {
  25875. // clearTimeout(this.timer);
  25876. // this.timer = null;
  25877. // clearInterval(this.timer2);
  25878. // this.timer2 = null;
  25879. clearInterval(this.pasteTimer);
  25880. this.pasteTimer = null;
  25881. next();
  25882. },
  25883. mounted(){
  25884. // 初始化需要从 lang 获取的数组
  25885. this.appendixType = [
  25886. {
  25887. label: this.lang.ssLessonPlan,
  25888. value: 0,
  25889. },
  25890. {
  25891. label: "PPT",
  25892. value: 1,
  25893. },
  25894. {
  25895. label: this.lang.ssEduCase,
  25896. value: 2,
  25897. },
  25898. {
  25899. label: this.lang.ssRubric,
  25900. value: 3,
  25901. },
  25902. {
  25903. label: this.lang.ssChatRecord,
  25904. value: 4,
  25905. },
  25906. ];
  25907. this.knowFileTypeArray1 = [this.lang.ssFirstVol, this.lang.ssSecondVol];
  25908. this.knowFileTypeArray = [this.lang.ssHomeworkOnly, this.lang.ssLessonPlan, this.lang.ssOther];
  25909. let _this = this
  25910. // 监听浏览器后退或者刷新等离开页面的操作
  25911. window.onbeforeunload = function(event) {
  25912. // 检查是否有未保存的更改
  25913. const message = _this.lang.ssUnsavedChanges;
  25914. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25915. event.returnValue = message; // 兼容大部分浏览器
  25916. console.log(message)
  25917. return message; // 兼容部分浏览器
  25918. };
  25919. const resizable = this.$el.querySelector('.resizable');
  25920. const resizer = this.$el.querySelector('.resizer');
  25921. const maxWidth = document.body.offsetWidth / 2;
  25922. const maxWidth2 = window.innerWidth / 2;
  25923. let startX, startWidth;
  25924. const mouseMoveHandler = (e) => {
  25925. e.preventDefault(); // 添加此行以防止选中其他文本
  25926. const dx = startX - e.clientX;
  25927. const newWidth = startWidth + dx;
  25928. if (newWidth >= 350 && newWidth <= maxWidth) {
  25929. resizable.style.minWidth = `${newWidth}px`;
  25930. }
  25931. };
  25932. const mouseUpHandler = () => {
  25933. document.removeEventListener('mousemove', mouseMoveHandler);
  25934. document.removeEventListener('mouseup', mouseUpHandler);
  25935. document.body.style.cursor = 'default';
  25936. };
  25937. const mouseDownHandler = (e) => {
  25938. e.preventDefault(); // 添加此行以防止选中其他文本
  25939. startX = e.clientX;
  25940. startWidth = resizable.getBoundingClientRect().width;
  25941. document.addEventListener('mousemove', mouseMoveHandler);
  25942. document.addEventListener('mouseup', mouseUpHandler);
  25943. document.body.style.cursor = 'ew-resize';
  25944. };
  25945. resizer.addEventListener('mousedown', mouseDownHandler);
  25946. const touchMoveHandler = (e) => {
  25947. e.preventDefault(); // 添加此行以防止选中其他文本
  25948. const dx = startX - e.touches[0].clientX;
  25949. const newWidth = startWidth + dx;
  25950. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25951. resizable.style.minWidth = `${newWidth}px`;
  25952. }
  25953. };
  25954. const touchEndHandler = () => {
  25955. document.removeEventListener('touchmove', touchMoveHandler);
  25956. document.removeEventListener('touchend', touchEndHandler);
  25957. document.body.style.cursor = 'default';
  25958. };
  25959. const touchStartHandler = (e) => {
  25960. e.preventDefault(); // 添加此行以防止选中其他文本
  25961. startX = e.touches[0].clientX;
  25962. startWidth = resizable.getBoundingClientRect().width;
  25963. document.addEventListener('touchmove', touchMoveHandler);
  25964. document.addEventListener('touchend', touchEndHandler);
  25965. document.body.style.cursor = 'ew-resize';
  25966. };
  25967. resizer.addEventListener('touchstart', touchStartHandler);
  25968. },
  25969. created() {
  25970. if(this.mergedList.includes(this.org) ){
  25971. this.isTeacherSee = true
  25972. }
  25973. if(this.lang.lang == 'com'){
  25974. this.languageSetting = 2;
  25975. }else if(this.lang.lang == 'hk'){
  25976. this.languageSetting = 1;
  25977. }else{
  25978. this.languageSetting = 0;
  25979. }
  25980. this.selectFileid();
  25981. // this.selectAiFileid();
  25982. this.selectKnowFileid();
  25983. this.getStudent();
  25984. this.getTeacher();
  25985. this.getClass();
  25986. this.selectGrage();
  25987. this.getTemplate();
  25988. this.getTipsTemplate();
  25989. // this.selectType();
  25990. this.selectEva();
  25991. if(this.istemplate == 1){
  25992. this.isOutline = true
  25993. this.isOutline2 = true
  25994. this.courseTextBool = true
  25995. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25996. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25997. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25998. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25999. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  26000. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  26001. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  26002. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  26003. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  26004. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  26005. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  26006. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  26007. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  26008. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  26009. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  26010. - 我们的课程主题可以如何与学生的实际生活联系起来?
  26011. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  26012. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  26013. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  26014. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  26015. - 学生个人最终要完成什么?学生小组最终要完成什么?
  26016. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  26017. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  26018. 讨论:<转文本内容>`
  26019. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  26020. }
  26021. this.loading = false;
  26022. // this.timer2 = setInterval(() => {
  26023. // this.selectEva();
  26024. // }, 5000);
  26025. // this.pasteTimer = setInterval(() => {
  26026. // this.getPaste();
  26027. // }, 1000);
  26028. this.pasteTimer = setInterval(() => {
  26029. this.getPaste2();
  26030. }, 500);
  26031. setTimeout(() => {
  26032. // this.selectAllType();
  26033. this.selectCourseDetail();
  26034. }, 500);
  26035. let _this = this;
  26036. window.pasteStage = function (json) {
  26037. _this.pasteStage(json);
  26038. };
  26039. window.pasteTask = function (json) {
  26040. _this.pasteTask(json);
  26041. };
  26042. },
  26043. };
  26044. </script>
  26045. <style scoped>
  26046. @media screen and (max-width: 1280px) {
  26047. .mbCss {
  26048. flex-direction: column !important;
  26049. }
  26050. .pjCss {
  26051. width: 100% !important;
  26052. }
  26053. .evaCss {
  26054. width: 100% !important;
  26055. margin-top: 10px;
  26056. }
  26057. }
  26058. .el-table>>>.even_row {
  26059. background-color: #f1f1f1 !important;
  26060. }
  26061. .dialog_diy>>>.el-dialog__header {
  26062. background: #3c3c3c !important;
  26063. padding: 15px 20px;
  26064. }
  26065. .dialog_diy>>>.el-dialog__title {
  26066. color: #fff;
  26067. }
  26068. .dialog_diy>>>.el-dialog__headerbtn {
  26069. top: 19px;
  26070. }
  26071. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  26072. color: #fff;
  26073. }
  26074. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  26075. color: #fff;
  26076. }
  26077. .dialog_diy>>>.el-dialog__body,
  26078. .dialog_diy>>>.el-dialog__footer {
  26079. background: #fafafa;
  26080. }
  26081. .dialog_diy3>>>.el-dialog__body,
  26082. .dialog_diy3>>>.el-dialog__footer {
  26083. background: #eee !important;
  26084. }
  26085. .dialog_diy3>>>.el-dialog__body {
  26086. padding: 20px 20px;
  26087. }
  26088. .dialog_diyStage>>>.el-dialog__body {
  26089. padding: 10px;
  26090. }
  26091. .source_diy>>>.el-dialog {
  26092. height: 100% !important;
  26093. margin: 0 auto !important;
  26094. }
  26095. .source_diy>>>.el-dialog__body {
  26096. height: calc(100% - 185px);
  26097. overflow: auto;
  26098. background: #e6eaf0;
  26099. }
  26100. .source_diy>>>.el-dialog__footer {
  26101. background: #e6eaf0 !important;
  26102. }
  26103. .left {
  26104. border-right: 1px solid rgb(60, 94, 143);
  26105. display: flex;
  26106. flex-direction: column;
  26107. align-items: center;
  26108. min-height: 600px;
  26109. width: 385px;
  26110. height: 80%;
  26111. }
  26112. .tips {
  26113. color: rgb(128, 128, 128);
  26114. font-size: 12px;
  26115. width: 270px;
  26116. margin: 40px;
  26117. }
  26118. .pb_content {
  26119. height: 100% !important;
  26120. /* margin: 0 20px 0 20px; */
  26121. }
  26122. .pb_content_body {
  26123. width: 100% !important;
  26124. height: 100%;
  26125. display: flex;
  26126. }
  26127. .info_solid {
  26128. width: 270px;
  26129. height: 30px;
  26130. border-left: 1px solid #bdbdbd;
  26131. margin: 10px 0px 10px 30px;
  26132. }
  26133. .info_steps {
  26134. width: 270px;
  26135. font-size: 0.875rem;
  26136. display: flex;
  26137. align-items: center;
  26138. }
  26139. .info_steps span:nth-child(1) {
  26140. width: 30px;
  26141. height: 30px;
  26142. background: rgba(0, 0, 0, 0.38);
  26143. display: block;
  26144. color: #fff;
  26145. border-radius: 40px;
  26146. text-align: center;
  26147. line-height: 30px;
  26148. }
  26149. .steps_active {
  26150. background: #3d67bc !important;
  26151. }
  26152. .info_steps span:nth-child(2) {
  26153. margin-left: 5px;
  26154. }
  26155. .right {
  26156. height: 100%;
  26157. width: 100%;
  26158. display: flex;
  26159. overflow: hidden;
  26160. flex-direction: column;
  26161. }
  26162. .leftBar{
  26163. width: 290px;
  26164. height: calc(100% - 50px);
  26165. overflow: auto;
  26166. border-radius: 5px;
  26167. margin: 25px auto;
  26168. box-sizing: border-box;
  26169. margin-right: 10px;
  26170. }
  26171. .leftBar2{
  26172. width: 400px;
  26173. min-width: 400px;
  26174. height: calc(100% - 50px);
  26175. overflow: auto;
  26176. border-radius: 5px;
  26177. margin: 25px auto;
  26178. box-sizing: border-box;
  26179. margin-right: 10px;
  26180. background: #fff;
  26181. padding: 5px;
  26182. border-radius: 5px;
  26183. }
  26184. .basic_box {
  26185. margin: 0 auto;
  26186. position: relative;
  26187. padding: 0 20px 0 20px;
  26188. }
  26189. .basic_box_success {
  26190. width: 100%;
  26191. min-height: 455px;
  26192. padding: 50px 0;
  26193. position: relative;
  26194. text-align: center;
  26195. border-bottom: 1px solid #bfbfbf;
  26196. box-sizing: border-box;
  26197. display: flex;
  26198. align-items: center;
  26199. flex-direction: column;
  26200. justify-content: center;
  26201. }
  26202. .info_title {
  26203. font-size: 1.5em;
  26204. margin-right: 25px;
  26205. /* margin: 20px 30px 20px 30px; */
  26206. }
  26207. .bInfo_title {
  26208. text-align: left;
  26209. margin: 10px 0;
  26210. }
  26211. .small_title {
  26212. font-size: 14px;
  26213. line-height: 40px;
  26214. }
  26215. .chapter_beizhu {
  26216. font-size: 12px;
  26217. font-weight: bold;
  26218. float: right;
  26219. color: rgb(128, 128, 128);
  26220. margin-top: 5px;
  26221. }
  26222. .chapter_uploadBox1 {
  26223. text-align: left;
  26224. background-color: rgb(242, 242, 242);
  26225. width: 100%;
  26226. height: 67px;
  26227. padding: 0px 15px;
  26228. border-radius: 8px;
  26229. overflow: hidden;
  26230. font-size: 16px;
  26231. box-sizing: border-box;
  26232. position: relative;
  26233. }
  26234. .chapter_add {
  26235. width: 100%;
  26236. height: 32px;
  26237. margin-top: 15px;
  26238. cursor: pointer;
  26239. }
  26240. .chapter_add_l {
  26241. margin-left: 5px;
  26242. width: 30px;
  26243. height: 30px;
  26244. float: left;
  26245. border: 1px solid #aaa;
  26246. color: #aaa;
  26247. border-radius: 50%;
  26248. font-size: 25px;
  26249. text-align: center;
  26250. }
  26251. .chapter_add_r {
  26252. font-size: 18px;
  26253. height: 40px;
  26254. line-height: 30px;
  26255. text-indent: 10px;
  26256. color: #aaa;
  26257. }
  26258. .chapter_add_r span {
  26259. font-size: 12px;
  26260. color: rgb(204, 204, 204);
  26261. }
  26262. .chapter_add_input {
  26263. display: none;
  26264. }
  26265. .line {
  26266. width: 85%;
  26267. margin: 0 auto;
  26268. border-top: 1px solid #e5e5e5;
  26269. margin-top: 20px;
  26270. }
  26271. .info_btnBox {
  26272. width: calc(100%);
  26273. display: flex;
  26274. justify-content: center;
  26275. height: 80px;
  26276. align-items: center;
  26277. background: #fff;
  26278. margin: 0 auto;
  26279. border-top: 2px solid rgb(228, 232, 237);
  26280. box-sizing: border-box;
  26281. }
  26282. .info_btnBox2 {
  26283. width: calc(100%);
  26284. display: flex;
  26285. justify-content: center;
  26286. height: 20px;
  26287. align-items: center;
  26288. background: #fff;
  26289. margin: 0 auto;
  26290. border-top: 2px solid rgb(228, 232, 237);
  26291. box-sizing: border-box;
  26292. overflow: hidden;
  26293. cursor: pointer;
  26294. }
  26295. .info_btnBox3 {
  26296. width: calc(100%);
  26297. display: flex;
  26298. justify-content: flex-end;
  26299. padding: 0 20px;
  26300. height: 60px;
  26301. align-items: center;
  26302. background: unset;
  26303. margin: 0 auto;
  26304. /* border-top: 1px solid rgb(228, 232, 237); */
  26305. box-sizing: border-box;
  26306. overflow: hidden;
  26307. cursor: pointer;
  26308. background: #fff;
  26309. border-radius: 10px;
  26310. }
  26311. .info_btn+.info_btn {
  26312. margin-left: 15px;
  26313. }
  26314. .info_btn,
  26315. .teacherWord {
  26316. color: #fff;
  26317. background-color: #0f7eff;
  26318. padding: 8px 24px;
  26319. font-size: 0.9375rem;
  26320. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  26321. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  26322. min-width: 64px;
  26323. font-weight: 500;
  26324. border-radius: 4px;
  26325. box-sizing: border-box;
  26326. border: none;
  26327. cursor: pointer;
  26328. }
  26329. .teacherWord {
  26330. width: 105px !important;
  26331. text-align: center !important;
  26332. line-height: 36px !important;
  26333. padding: 0 !important;
  26334. font-size: 14px !important;
  26335. margin: 10px 0 !important;
  26336. }
  26337. .template_box {
  26338. display: flex;
  26339. flex-wrap: wrap;
  26340. }
  26341. .wordTeacher {
  26342. display: flex;
  26343. flex-direction: column;
  26344. width: 100px;
  26345. height: 100px;
  26346. text-align: center;
  26347. font-size: 13px;
  26348. margin: 0 20px 20px 0;
  26349. background: #f0f4fa;
  26350. position: relative;
  26351. border-radius: 5px;
  26352. align-items: center;
  26353. justify-content: center;
  26354. border: 1px solid #cad1dc;
  26355. color: #0e1e33;
  26356. /* padding: 25px 0px; */
  26357. cursor: pointer;
  26358. }
  26359. .wordTeacher::after {
  26360. content: "";
  26361. display: block;
  26362. position: absolute;
  26363. width: 15px;
  26364. height: 15px;
  26365. right: 10px;
  26366. top: 10px;
  26367. background-image: url(../../../assets/icon/new/choose_a.png);
  26368. background-size: 100% 100%;
  26369. }
  26370. .wordTeacherA::after {
  26371. background-image: url(../../../assets/icon/new/choose_b.png);
  26372. }
  26373. .wordTeacher:nth-child(5n) {
  26374. margin-right: 0px;
  26375. }
  26376. .wordPic {
  26377. margin: 0 auto;
  26378. width: 30px;
  26379. height: 30px;
  26380. cursor: pointer;
  26381. }
  26382. .deleteWord {
  26383. width: 22px;
  26384. height: 22px;
  26385. position: absolute;
  26386. right: 5px;
  26387. top: -15px;
  26388. cursor: pointer;
  26389. display: none;
  26390. z-index: 999;
  26391. }
  26392. .wordPic>img,
  26393. .deleteWord>img,
  26394. .addToolImg>img {
  26395. width: 100%;
  26396. height: 100%;
  26397. }
  26398. .info_btn:hover {
  26399. background-color: #4f7cd5 !important;
  26400. }
  26401. .cru_selectBox {
  26402. display: flex;
  26403. margin: 15px 0;
  26404. flex-wrap: nowrap;
  26405. white-space: nowrap;
  26406. overflow: auto;
  26407. position: relative;
  26408. height: 40px;
  26409. max-width: calc(100% - 175px);
  26410. }
  26411. .cru_selectBox::-webkit-scrollbar {
  26412. /*滚动条整体样式*/
  26413. width: 6px;
  26414. /*高宽分别对应横竖滚动条的尺寸*/
  26415. height: 6px;
  26416. }
  26417. /*定义滚动条轨道 内阴影+圆角*/
  26418. .cru_selectBox::-webkit-scrollbar-track {
  26419. border-radius: 10px;
  26420. background-color: #eee;
  26421. }
  26422. /*定义滑块 内阴影+圆角*/
  26423. .cru_selectBox::-webkit-scrollbar-thumb {
  26424. border-radius: 10px;
  26425. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  26426. background-color: rgba(0, 0, 0, 0.1);
  26427. }
  26428. .cru_line {
  26429. position: absolute;
  26430. bottom: 0px;
  26431. transition: all 0.5s;
  26432. left: 0px;
  26433. width: 50px;
  26434. height: 4px;
  26435. left: 10px;
  26436. border-radius: 2px;
  26437. background: #3681fc;
  26438. }
  26439. .cru_select {
  26440. font-size: 18px;
  26441. margin-right: 20px;
  26442. margin-left: 5px;
  26443. cursor: pointer;
  26444. color: #0e1e33;
  26445. }
  26446. .cru_select:hover {
  26447. color: #3681fc !important;
  26448. }
  26449. .cru_selected {
  26450. color: #3681fc !important;
  26451. font-weight: bold;
  26452. }
  26453. .chapter_box {
  26454. margin-top: 10px;
  26455. width: 100%;
  26456. padding: 10px 20px;
  26457. background: #fff;
  26458. border-radius: 8px;
  26459. box-sizing: border-box;
  26460. }
  26461. .chapter_contentbox {
  26462. display: flex;
  26463. align-items: center;
  26464. /* margin-top: 15px; */
  26465. }
  26466. .chapter_contentbox .cc_title {
  26467. margin: 0px;
  26468. color: black;
  26469. display: block;
  26470. white-space: nowrap;
  26471. overflow: hidden;
  26472. text-overflow: ellipsis;
  26473. margin-right: 20px;
  26474. font-size: 18px;
  26475. height: 20px;
  26476. line-height: 22px;
  26477. min-width: fit-content;
  26478. display: flex;
  26479. }
  26480. .chapter_contentbox .cc_title::before {
  26481. content: "";
  26482. height: 100%;
  26483. width: 3px;
  26484. background: #3681fc;
  26485. border-radius: 3px;
  26486. opacity: 1;
  26487. display: block;
  26488. margin-right: 10px;
  26489. }
  26490. .chapter_contentbox .cc_input {
  26491. width: 100%;
  26492. display: flex;
  26493. }
  26494. .show_taskD {
  26495. min-width: fit-content;
  26496. margin-left: 10px;
  26497. display: flex;
  26498. align-items: center;
  26499. font-size: 14px;
  26500. cursor: pointer;
  26501. color: #717c8d;
  26502. }
  26503. .show_taskD>img {
  26504. width: 15px;
  26505. margin-right: 5px;
  26506. transition: 0.2s all;
  26507. transform: rotate(-90deg);
  26508. }
  26509. .show_taskD.show>img {
  26510. transform: rotate(0deg);
  26511. }
  26512. .show_toolD {
  26513. min-width: fit-content;
  26514. margin-left: 10px;
  26515. display: flex;
  26516. align-items: center;
  26517. font-size: 14px;
  26518. cursor: pointer;
  26519. color: #717c8d;
  26520. /* position: absolute;
  26521. right: 45px;
  26522. top: 5px; */
  26523. }
  26524. .show_toolD>img {
  26525. width: 15px;
  26526. margin-right: 5px;
  26527. transition: 0.2s all;
  26528. transform: rotate(-90deg);
  26529. }
  26530. .show_toolD.show>img {
  26531. transform: rotate(0deg);
  26532. }
  26533. .remove {
  26534. background-image: url("../../../assets/icon/new/delete_u.png");
  26535. cursor: pointer;
  26536. opacity: 0.5;
  26537. width: 30px;
  26538. min-width: 30px;
  26539. height: 30px;
  26540. background-size: 100% 100%;
  26541. background-repeat: no-repeat;
  26542. margin-left: 10px;
  26543. }
  26544. .remove1 {
  26545. background-image: url("../../../assets/remove1.png");
  26546. background-repeat: no-repeat;
  26547. background-position: 5px 10px;
  26548. width: 40px;
  26549. height: 50px;
  26550. cursor: pointer;
  26551. margin-left: 10px;
  26552. }
  26553. .binfo_input {
  26554. width: 100%;
  26555. margin: 0;
  26556. padding: 12px 14px;
  26557. display: block;
  26558. min-width: 0;
  26559. outline: none;
  26560. box-sizing: border-box;
  26561. background: none;
  26562. border: none;
  26563. border-radius: 4px;
  26564. background: #fff;
  26565. font-size: 16px;
  26566. resize: none;
  26567. font-family: "Microsoft YaHei";
  26568. min-height: 48px;
  26569. /* border: 1px solid #3682fc00; */
  26570. border: 1.5px solid #cad1dc;
  26571. }
  26572. .binfo_textarea {
  26573. border: 1.5px solid #cad1dc;
  26574. font-size: 16px;
  26575. resize: none;
  26576. /* background: #f6f6f6; */
  26577. font-family: "Microsoft YaHei";
  26578. }
  26579. .binfo_input:focus-visible {
  26580. border: 1.5px solid #3681fc !important;
  26581. }
  26582. .time {
  26583. display: flex;
  26584. margin: 35px 0 80px 0;
  26585. }
  26586. .chapter_btnbox {
  26587. width: 160px;
  26588. border-radius: 5px;
  26589. border: 2px dashed gray;
  26590. display: flex;
  26591. padding: 8px 50px;
  26592. align-items: center;
  26593. justify-content: center;
  26594. margin: 30px auto 0;
  26595. cursor: pointer;
  26596. }
  26597. .icon_add {
  26598. position: relative;
  26599. width: 24px;
  26600. padding-top: 20px;
  26601. border-radius: 100%;
  26602. border-width: 2px;
  26603. border-style: solid;
  26604. border-color: gray;
  26605. }
  26606. .icon_add i:nth-child(1) {
  26607. position: absolute;
  26608. left: 50%;
  26609. top: 50%;
  26610. height: 60%;
  26611. transform: translate(-50%, -50%);
  26612. border-width: 1px;
  26613. border-style: solid;
  26614. border-color: inherit;
  26615. }
  26616. .icon_add i:nth-child(2) {
  26617. position: absolute;
  26618. top: 50%;
  26619. left: 50%;
  26620. width: 60%;
  26621. transform: translate(-50%, -50%);
  26622. border-width: 1px;
  26623. border-style: solid;
  26624. border-color: inherit;
  26625. }
  26626. .chapter_btn_w {
  26627. font-size: 0.9375rem;
  26628. font-weight: bold;
  26629. color: gray;
  26630. margin-left: 20px;
  26631. }
  26632. .disUoloadSty>>>.el-icon-plus {
  26633. display: none !important;
  26634. /* 上传按钮隐藏 */
  26635. }
  26636. .imgLeft {
  26637. margin: 15px 0;
  26638. }
  26639. .add_info_box {
  26640. margin: 0 0 0 auto;
  26641. display: flex;
  26642. flex-wrap: wrap;
  26643. }
  26644. .add_info_box button {
  26645. margin: 0 5px 10px 0;
  26646. }
  26647. .add_info_box2 {
  26648. display: flex;
  26649. align-items: center;
  26650. flex-wrap: wrap;
  26651. }
  26652. .add_info_box2::after {
  26653. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26654. color: red;
  26655. font-size: 14px;
  26656. margin-bottom: 10px;
  26657. }
  26658. .add_chapters_box {
  26659. text-align: left;
  26660. background-color: #fff;
  26661. width: 100%;
  26662. border-radius: 4px;
  26663. font-size: 16px;
  26664. box-sizing: border-box;
  26665. position: relative;
  26666. padding: 0 15px;
  26667. height: auto;
  26668. overflow-y: auto;
  26669. overflow-x: hidden;
  26670. border: 1px solid #cad1dc;
  26671. }
  26672. .add_chapters_box.add_c_none {
  26673. display: flex;
  26674. justify-content: center;
  26675. align-items: center;
  26676. padding: 15px;
  26677. }
  26678. .add_c_none>img {
  26679. width: 25px;
  26680. }
  26681. .add_chapters_box.add_c_none>span {
  26682. font-size: 14px;
  26683. font-weight: 400;
  26684. margin: 0 0 5px 5px;
  26685. }
  26686. .homework_box {
  26687. display: flex;
  26688. align-items: flex-start;
  26689. flex-wrap: wrap;
  26690. margin: 15px 0 0 0;
  26691. flex-direction: column;
  26692. align-content: flex-start;
  26693. }
  26694. .course_homework {
  26695. display: flex;
  26696. justify-content: center;
  26697. flex-direction: row;
  26698. align-items: center;
  26699. margin: 0 10px 0 0;
  26700. }
  26701. .course_homework>>>.el-input__inner {
  26702. width: 140px;
  26703. margin-left: 15px;
  26704. }
  26705. .chapter_upload_move {
  26706. position: relative;
  26707. background-color: #fff;
  26708. position: absolute;
  26709. width: 100%;
  26710. top: 0px;
  26711. left: 0px;
  26712. border: 1px solid #eee;
  26713. border-radius: 5px;
  26714. transition: width 2s;
  26715. -moz-transition: width 2s;
  26716. -webkit-transition: width 2s;
  26717. -o-transition: width 2s;
  26718. }
  26719. .chapter_upload_l_i {
  26720. background-image: url("../../../assets/icon.png");
  26721. background-position: 3px -165px;
  26722. width: 30px;
  26723. height: 30px;
  26724. margin: 10px auto 0 auto;
  26725. }
  26726. .course_input_box {
  26727. display: flex;
  26728. margin-right: 20px;
  26729. min-width: 400px;
  26730. width: calc(100% - 350px);
  26731. align-items: center;
  26732. position: relative;
  26733. margin-bottom: 15px;
  26734. }
  26735. .course_input_box2 {
  26736. display: flex;
  26737. width: 100%;
  26738. align-items: center;
  26739. position: relative;
  26740. flex-wrap: wrap;
  26741. }
  26742. .course_input_box>.binfo_input {
  26743. width: calc(100%);
  26744. margin: 0;
  26745. border: 1.5px solid rgb(202, 209, 220);
  26746. border-radius: 5px;
  26747. font-weight: 600;
  26748. padding: 12px 14px 12px 71px;
  26749. }
  26750. .bb_courseIcon {
  26751. width: 57px;
  26752. height: 45px;
  26753. background: #f0f4fa;
  26754. border-radius: 5px 0px 0px 5px;
  26755. display: flex;
  26756. align-items: center;
  26757. justify-content: center;
  26758. border-right: 1.5px solid rgb(202, 209, 220);
  26759. box-sizing: border-box;
  26760. position: absolute;
  26761. left: 1.5px;
  26762. }
  26763. .bb_courseIcon>img {
  26764. width: 25px;
  26765. height: auto;
  26766. }
  26767. .big_box {
  26768. /* margin-top: 20px; */
  26769. display: flex;
  26770. justify-content: space-between;
  26771. /* border-bottom: 1px solid #E0E2ED; */
  26772. }
  26773. .left_first {
  26774. display: flex;
  26775. flex-direction: column;
  26776. flex-wrap: nowrap;
  26777. width: calc(100% - 310px);
  26778. padding: 20px;
  26779. box-sizing: border-box;
  26780. background: #fff;
  26781. border-radius: 5px;
  26782. }
  26783. .right_first {
  26784. width: 300px;
  26785. display: flex;
  26786. align-items: center;
  26787. justify-content: center;
  26788. /* border-left: 1px solid #E0E2ED; */
  26789. box-sizing: border-box;
  26790. padding: 20px;
  26791. flex-direction: column;
  26792. background: #fff;
  26793. border-radius: 5px;
  26794. }
  26795. .ai_box {
  26796. width: 204px;
  26797. display: flex;
  26798. justify-content: flex-end;
  26799. margin-bottom: 15px;
  26800. }
  26801. .ai_content {
  26802. display: flex;
  26803. align-items: center;
  26804. font-size: 14px;
  26805. padding: 7px 20px;
  26806. box-sizing: border-box;
  26807. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26808. border-radius: 12px;
  26809. font-weight: 700;
  26810. cursor: pointer;
  26811. }
  26812. .ai_content>img {
  26813. width: 40px;
  26814. margin-right: 5px;
  26815. }
  26816. .c_info_title {
  26817. padding: 15px 0 15px 0;
  26818. font-size: 16px;
  26819. font-weight: bold;
  26820. margin: 0 0 0 20px;
  26821. box-sizing: border-box;
  26822. display: flex;
  26823. align-items: center;
  26824. line-height: 20px;
  26825. }
  26826. .c_info_title::before {
  26827. content: "";
  26828. display: block;
  26829. width: 3px;
  26830. height: 20px;
  26831. background: #0061ff;
  26832. border-radius: 3px;
  26833. margin: 0 5px 0 0;
  26834. }
  26835. .right_title {
  26836. height: 30px;
  26837. padding: 15px 0 15px 20px;
  26838. border-bottom: 1px solid #f2f2f2;
  26839. font-size: 1.5em;
  26840. font-weight: bold;
  26841. color: #0f7eff;
  26842. margin: 0 auto;
  26843. }
  26844. .people {
  26845. border: 1px solid rgb(229 229 229);
  26846. /* height: 495px; */
  26847. height: 350px;
  26848. border-radius: 5px;
  26849. width: 100%;
  26850. overflow: auto;
  26851. }
  26852. .people_top {
  26853. display: flex;
  26854. width: 100%;
  26855. /* justify-content: space-between; */
  26856. /* align-items: center; */
  26857. flex-direction: column;
  26858. padding: 10px 10px 0;
  26859. box-sizing: border-box;
  26860. }
  26861. .people_nav,
  26862. .people_top_right {
  26863. /* padding: 20px 0 0 20px; */
  26864. }
  26865. .people_top_right {
  26866. height: 40px;
  26867. margin-bottom: 10px;
  26868. }
  26869. .people_search {
  26870. display: flex;
  26871. position: relative;
  26872. }
  26873. .people_search>>>.el-input__inner {
  26874. /* height: 25px; */
  26875. width: 100%;
  26876. }
  26877. .search_img {
  26878. width: 20px;
  26879. height: 20px;
  26880. position: absolute;
  26881. right: 10px;
  26882. top: 50%;
  26883. transform: translateY(-50%);
  26884. }
  26885. .search_img>img {
  26886. width: 100%;
  26887. height: 100%;
  26888. }
  26889. .people_name {
  26890. display: flex;
  26891. justify-content: flex-start;
  26892. padding: 20px 10px;
  26893. flex-direction: column;
  26894. flex-wrap: wrap;
  26895. }
  26896. .p_box {
  26897. position: relative;
  26898. }
  26899. .people_name>>>.el-checkbox {
  26900. width: 100%;
  26901. display: flex;
  26902. align-items: center;
  26903. margin-bottom: 10px;
  26904. }
  26905. .people_name>>>.el-checkbox__label {
  26906. text-overflow: ellipsis;
  26907. overflow: hidden;
  26908. width: calc(100%);
  26909. }
  26910. .people_name2>>>.el-checkbox__label {
  26911. width: calc(100% - 130px);
  26912. }
  26913. .inviteCode {
  26914. position: absolute;
  26915. right: 30px;
  26916. color: #237ade;
  26917. top: 0;
  26918. cursor: pointer;
  26919. font-size: 13px;
  26920. }
  26921. .noneInvite {
  26922. color: #a8a8a8;
  26923. }
  26924. .inviteImg {
  26925. position: absolute;
  26926. right: 5px;
  26927. top: 0;
  26928. width: 20px;
  26929. }
  26930. .right_img {
  26931. width: 150px;
  26932. height: 150px;
  26933. margin: 0 auto;
  26934. }
  26935. .right_img>img {
  26936. width: 100%;
  26937. height: 100%;
  26938. }
  26939. .number {
  26940. margin-top: 20px;
  26941. color: #4aa6ff;
  26942. text-decoration: underline;
  26943. }
  26944. .success_button {
  26945. display: flex;
  26946. text-align: center;
  26947. margin: 5% 0 auto;
  26948. flex-direction: row;
  26949. justify-content: center;
  26950. }
  26951. .look_course {
  26952. margin-right: 40px;
  26953. background: #3d67bc;
  26954. width: 200px;
  26955. height: 35px;
  26956. line-height: 35px;
  26957. color: #fff;
  26958. text-align: center;
  26959. font-size: 14px;
  26960. border-radius: 5px;
  26961. cursor: pointer;
  26962. }
  26963. .attend_others {
  26964. width: 250px;
  26965. background: #4fb13c;
  26966. height: 35px;
  26967. line-height: 35px;
  26968. color: #fff;
  26969. text-align: center;
  26970. font-size: 14px;
  26971. border-radius: 5px;
  26972. cursor: pointer;
  26973. }
  26974. .dialog_diy2>>>.el-dialog__body {
  26975. text-align: center;
  26976. }
  26977. .write_togother {
  26978. position: absolute;
  26979. right: 45px;
  26980. display: flex;
  26981. top: 5%;
  26982. }
  26983. .write_people {
  26984. font-size: 14px;
  26985. line-height: 50px;
  26986. padding-right: 10px;
  26987. }
  26988. .end_write {
  26989. background: #3d67bc;
  26990. color: #fff;
  26991. width: 100px;
  26992. height: 35px;
  26993. line-height: 35px;
  26994. text-align: center;
  26995. font-size: 14px;
  26996. border-radius: 5px;
  26997. cursor: pointer;
  26998. }
  26999. .chapter_upload+.chapter_upload {
  27000. /* margin-top: 15px; */
  27001. border-top: 1px solid #e7ebf1;
  27002. }
  27003. .chapter_upload {
  27004. height: 45px;
  27005. position: relative;
  27006. display: flex;
  27007. align-items: center;
  27008. width: 100%;
  27009. min-height: 45px;
  27010. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  27011. /* border-radius: 4px; */
  27012. /* overflow: hidden; */
  27013. box-sizing: border-box;
  27014. }
  27015. .chapter_upload_drag {
  27016. position: absolute;
  27017. cursor: pointer;
  27018. width: 16px;
  27019. height: 16px;
  27020. left: -9px;
  27021. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  27022. background-size: 100% 100%;
  27023. z-index: 10;
  27024. display: none;
  27025. }
  27026. .isNavStage>.chapter_upload_drag {
  27027. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  27028. }
  27029. .chapter_upload_t {
  27030. background-color: #fff;
  27031. position: absolute;
  27032. height: 100%;
  27033. top: 0px;
  27034. left: 0px;
  27035. box-sizing: border-box;
  27036. }
  27037. .chapter_upload_o {
  27038. width: 100%;
  27039. height: 100%;
  27040. position: relative;
  27041. z-index: 1;
  27042. }
  27043. .chapter_upload_ic {
  27044. margin: 0 15px 0px auto;
  27045. display: flex;
  27046. align-items: center;
  27047. }
  27048. .chapter_upload_type{
  27049. width: 80px;
  27050. min-width: 80px;
  27051. text-align: center;
  27052. font-size: 14px;
  27053. }
  27054. .chapter_upload_box_file{
  27055. height: calc(100% - 45px);
  27056. overflow: auto;
  27057. border-top: 1px solid #e7ebf1;
  27058. box-sizing: border-box;
  27059. }
  27060. .chapter_upload_ic_l {
  27061. width: 50px;
  27062. height: 50px;
  27063. float: left;
  27064. }
  27065. .chapter_upload_ic_l div {
  27066. width: 30px;
  27067. height: 35px;
  27068. background: url("../../../assets/icon/icon.png");
  27069. }
  27070. .chapter_upload_ic_edit {
  27071. height: 100%;
  27072. display: flex;
  27073. align-items: center;
  27074. cursor: pointer;
  27075. margin: 0 10px 0 0;
  27076. }
  27077. .chapter_upload_ic_edit div {
  27078. width: 18px;
  27079. height: 18px;
  27080. background-image: url("../../../assets/icon/new/edit_u.png");
  27081. background-size: 100% 100%;
  27082. }
  27083. .chapter_upload_ic_download {
  27084. height: 100%;
  27085. display: flex;
  27086. align-items: center;
  27087. cursor: pointer;
  27088. margin: 0;
  27089. }
  27090. .chapter_upload_ic_download div {
  27091. width: 18px;
  27092. height: 18px;
  27093. background-image: url("../../../assets/icon/course/download.svg");
  27094. background-size: 100% 100%;
  27095. }
  27096. .chapter_upload_ic_check {
  27097. height: 100%;
  27098. display: flex;
  27099. align-items: center;
  27100. cursor: pointer;
  27101. margin: 0 10px 0 0;
  27102. }
  27103. .chapter_upload_ic_check div {
  27104. width: 18px;
  27105. height: 18px;
  27106. background-image: url("../../../assets/icon/course/lookeye.svg");
  27107. background-size: 100% 100%;
  27108. }
  27109. .chapter_upload_ic_r {
  27110. height: 100%;
  27111. display: flex;
  27112. align-items: center;
  27113. cursor: pointer;
  27114. }
  27115. .chapter_upload_ic_r div {
  27116. width: 18px;
  27117. height: 18px;
  27118. background-image: url("../../../assets/icon/new/delete_u.png");
  27119. background-size: 100% 100%;
  27120. }
  27121. .chapter_upload_n {
  27122. display: flex;
  27123. text-indent: 10px;
  27124. text-decoration: none;
  27125. text-overflow: ellipsis;
  27126. white-space: nowrap;
  27127. overflow: hidden;
  27128. width: 55%;
  27129. margin-left: 10px;
  27130. cursor: pointer;
  27131. margin-top: 2px;
  27132. align-items: center;
  27133. }
  27134. .chapter_upload_n > .chapter_upload_box{
  27135. border: none;
  27136. outline: none;
  27137. max-width: 100%;
  27138. z-index: 99;
  27139. font-size: 14px;
  27140. white-space: nowrap;
  27141. overflow: hidden;
  27142. text-overflow: ellipsis;
  27143. color: #757575;
  27144. }
  27145. .chapter_upload_l_i2,
  27146. .chapter_upload_l_i3,
  27147. .chapter_upload_l_i8,
  27148. .chapter_upload_l_i6,
  27149. .chapter_upload_l_i12,
  27150. .chapter_upload_l_i14,
  27151. .chapter_upload_l_i15 {
  27152. width: 15px;
  27153. height: 15px;
  27154. background-size: 100% 100%;
  27155. }
  27156. .chapter_upload_l_i2 {
  27157. background-image: url("../../../assets/icon/new/u_word.png");
  27158. }
  27159. .chapter_upload_l_i3 {
  27160. background-image: url("../../../assets/icon/new/u_video.png");
  27161. }
  27162. .chapter_upload_l_i8 {
  27163. background-image: url("../../../assets/icon/new/u_url.png");
  27164. }
  27165. .chapter_upload_l_i14 {
  27166. background-image: url("../../../assets/icon/new/u_source.png");
  27167. }
  27168. .chapter_upload_l_i15 {
  27169. background-image: url("../../../assets/icon/new/appStore.png");
  27170. }
  27171. .chapter_upload_l_i6 {
  27172. background-image: url("../../../assets/icon/new/u_picture.png");
  27173. }
  27174. .chapter_upload_l_i12 {
  27175. background-image: url("../../../assets/icon/new/u_word.png");
  27176. }
  27177. .chapter_upload_l_i13 {
  27178. background-image: url("../../../assets/icon/new/u_img.png");
  27179. }
  27180. .chapter_upload_noSee {
  27181. background-image: url("../../../assets/icon/new/u_noUpload.png");
  27182. width: 18px;
  27183. height: 18px;
  27184. background-size: 100% 100%;
  27185. display: block;
  27186. margin-right: 10px;
  27187. }
  27188. .chapter_upload_ud {
  27189. display: flex;
  27190. flex-direction: row;
  27191. justify-content: center;
  27192. margin: 0 10px 0 0;
  27193. }
  27194. .chapter_upload_ud>.chapter_upload_up {
  27195. margin-bottom: 0;
  27196. margin-right: 10px;
  27197. }
  27198. .chapter_upload_down,
  27199. .chapter_upload_up {
  27200. width: 20px;
  27201. height: 20px;
  27202. background: #e4eaf2;
  27203. cursor: pointer;
  27204. margin: 0 auto;
  27205. border-radius: 5px;
  27206. display: flex;
  27207. justify-content: center;
  27208. align-items: center;
  27209. }
  27210. .chapter_upload_up::after,
  27211. .chapter_upload_down::after {
  27212. content: "";
  27213. background-image: url("../../../assets/icon/new/downBtn.png");
  27214. width: 13px;
  27215. height: 13px;
  27216. background-size: 100% 100%;
  27217. display: block;
  27218. }
  27219. .chapter_upload_up::after {
  27220. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  27221. }
  27222. .chapter_upload_up {
  27223. margin-bottom: 5px;
  27224. }
  27225. .chapter_upload_ud2 {
  27226. display: flex;
  27227. flex-direction: row;
  27228. justify-content: center;
  27229. margin: 0 10px 0 0;
  27230. }
  27231. .chapter_upload_ud2>.chapter_upload_up2 {
  27232. margin-bottom: 0;
  27233. margin-right: 10px;
  27234. }
  27235. .chapter_upload_down2,
  27236. .chapter_upload_up2 {
  27237. cursor: pointer;
  27238. margin: 0 auto;
  27239. border-radius: 5px;
  27240. display: flex;
  27241. justify-content: center;
  27242. align-items: center;
  27243. color: #717c8d;
  27244. font-size: 14px;
  27245. }
  27246. .chapter_upload_up2 {
  27247. margin-right: 10px;
  27248. }
  27249. .chapter_upload_up2::before,
  27250. .chapter_upload_down2::before {
  27251. content: "";
  27252. background-image: url("../../../assets/icon/new/c_down.png");
  27253. width: 14px;
  27254. height: 14px;
  27255. background-size: 100% 100%;
  27256. display: block;
  27257. margin-right: 5px;
  27258. }
  27259. .chapter_upload_up2::before {
  27260. background-image: url("../../../assets/icon/new/c_up.png") !important;
  27261. }
  27262. .addWordStyle {
  27263. display: flex;
  27264. flex-direction: row;
  27265. justify-content: flex-start;
  27266. overflow-x: auto;
  27267. white-space: nowrap;
  27268. flex-wrap: wrap;
  27269. }
  27270. /* table 样式 */
  27271. .cont>>>table {
  27272. border-top: 1px solid #ccc;
  27273. border-left: 1px solid #ccc;
  27274. }
  27275. .cont>>>table td,
  27276. .cont>>>table th {
  27277. border-bottom: 1px solid #ccc;
  27278. border-right: 1px solid #ccc;
  27279. /* padding: 20px 5px; */
  27280. padding: 5px 10px;
  27281. max-width: 0px;
  27282. height: 30px;
  27283. vertical-align: baseline;
  27284. }
  27285. .cont>>>table th {
  27286. border-bottom: 2px solid #ccc;
  27287. text-align: center;
  27288. }
  27289. /* blockquote 样式 */
  27290. .cont>>>blockquote {
  27291. display: block;
  27292. border-left: 8px solid #d0e5f2;
  27293. padding: 5px 10px;
  27294. margin: 10px 0;
  27295. line-height: 1.4;
  27296. font-size: 100%;
  27297. background-color: #f1f1f1;
  27298. }
  27299. /* code 样式 */
  27300. .cont>>>code {
  27301. display: inline-block;
  27302. /* *display: inline; */
  27303. zoom: 1;
  27304. background-color: #f1f1f1;
  27305. border-radius: 3px;
  27306. padding: 3px 5px;
  27307. margin: 0 3px;
  27308. }
  27309. .cont>>>pre code {
  27310. display: block;
  27311. }
  27312. /* ul ol 样式 */
  27313. .cont>>>ul,
  27314. ol {
  27315. margin: 10px 0 10px 20px;
  27316. }
  27317. .wordbox {
  27318. display: flex;
  27319. flex-wrap: wrap;
  27320. cursor: pointer;
  27321. width: 100%;
  27322. }
  27323. .checkword {
  27324. width: 22px;
  27325. height: 22px;
  27326. margin: 10px auto 0;
  27327. cursor: pointer;
  27328. }
  27329. .checkword img {
  27330. width: 100%;
  27331. }
  27332. .stepBg {
  27333. display: flex;
  27334. justify-content: space-between;
  27335. align-items: center;
  27336. background: #fff;
  27337. width: calc(100%);
  27338. margin: 0 auto;
  27339. }
  27340. .stepBorder {
  27341. height: 3px !important;
  27342. background: #cad1dc;
  27343. width: 100px !important;
  27344. margin: 0 15px !important;
  27345. position: relative;
  27346. }
  27347. .border-active {
  27348. background: #3681fc !important;
  27349. }
  27350. .border-active::before,
  27351. .border-active::after {
  27352. border-color: #3681fc !important;
  27353. }
  27354. .stepBorder::before,
  27355. .stepBorder::after {
  27356. content: "";
  27357. width: 9px;
  27358. height: 9px;
  27359. background: #ffffff;
  27360. opacity: 1;
  27361. border: 2px solid #acb4bf;
  27362. display: block;
  27363. box-sizing: border-box;
  27364. border-radius: 50%;
  27365. position: absolute;
  27366. top: 50%;
  27367. transform: translateY(-50%);
  27368. }
  27369. .stepBorder::after {
  27370. right: -9px;
  27371. }
  27372. .stepTop {
  27373. width: 100%;
  27374. /* border-radius: 10px; */
  27375. display: flex;
  27376. justify-content: center;
  27377. align-items: center;
  27378. flex-wrap: nowrap;
  27379. background: #fff;
  27380. /* top: 18%; */
  27381. height: 80px;
  27382. border-bottom: 2px solid rgb(228, 232, 237);
  27383. box-sizing: border-box;
  27384. }
  27385. .stepTop2 {
  27386. width: 100%;
  27387. /* border-radius: 10px; */
  27388. display: flex;
  27389. justify-content: center;
  27390. align-items: center;
  27391. flex-wrap: nowrap;
  27392. background: #fff;
  27393. /* top: 18%; */
  27394. height: 20px;
  27395. border-bottom: 2px solid rgb(228, 232, 237);
  27396. box-sizing: border-box;
  27397. overflow: hidden;
  27398. cursor: pointer;
  27399. }
  27400. .stepTop>div img {
  27401. width: 100%;
  27402. }
  27403. .stepTop>div {
  27404. height: 50px;
  27405. width: 180px;
  27406. cursor: pointer;
  27407. margin: 10px 0;
  27408. border-radius: 10px;
  27409. }
  27410. .first,
  27411. .second,
  27412. .third,
  27413. .four {
  27414. background: #3681fc;
  27415. height: 90px;
  27416. color: #fff;
  27417. display: flex;
  27418. flex-direction: row;
  27419. align-items: center;
  27420. justify-content: center;
  27421. }
  27422. .first>div:nth-child(1),
  27423. .second>div:nth-child(1),
  27424. .third>div:nth-child(1),
  27425. .four>div:nth-child(1) {
  27426. margin: 5px 10px 0 0;
  27427. width: 2rem;
  27428. }
  27429. .firstNo,
  27430. .secondNo,
  27431. .thirdNo,
  27432. .fourNo {
  27433. background: #e7e7e7;
  27434. color: #adadad;
  27435. display: flex;
  27436. flex-direction: row;
  27437. align-items: center;
  27438. justify-content: center;
  27439. }
  27440. .firstNo>div:nth-child(1),
  27441. .secondNo>div:nth-child(1),
  27442. .thirdNo>div:nth-child(1),
  27443. .fourNo>div:nth-child(1) {
  27444. margin: 5px 10px 0 0;
  27445. width: 2rem;
  27446. }
  27447. .uploadWidth>>>.el-upload {
  27448. width: 60px;
  27449. height: 60px;
  27450. position: relative;
  27451. }
  27452. .addPeople {
  27453. background: #fa6060;
  27454. width: 150px;
  27455. height: 40px;
  27456. color: #fff;
  27457. border-radius: 5px;
  27458. text-align: center;
  27459. line-height: 40px;
  27460. font-size: 14px;
  27461. cursor: pointer;
  27462. }
  27463. .kcImg {
  27464. width: 60px;
  27465. margin-left: 10px;
  27466. }
  27467. .zyImg {
  27468. width: 55px;
  27469. margin: 0 10px;
  27470. }
  27471. .deleteZy {
  27472. width: 20px;
  27473. position: absolute;
  27474. top: 5px;
  27475. right: 5px;
  27476. cursor: pointer;
  27477. }
  27478. .kcImg>img,
  27479. .zyImg>img,
  27480. .deleteZy>img {
  27481. width: 100%;
  27482. height: 100%;
  27483. }
  27484. .zyBox {
  27485. display: flex;
  27486. flex-direction: row;
  27487. align-items: center;
  27488. background: #67d37d;
  27489. color: #fff;
  27490. width: 210px;
  27491. margin: 20px 20px 0 0;
  27492. border-radius: 10px;
  27493. height: 70px;
  27494. position: relative;
  27495. }
  27496. .upCss {
  27497. display: flex;
  27498. flex-direction: row;
  27499. justify-content: flex-start;
  27500. }
  27501. .upCss>>>.el-icon-plus {
  27502. position: none !important;
  27503. width: 200px;
  27504. height: 100px;
  27505. display: flex;
  27506. flex-wrap: nowrap;
  27507. flex-direction: column;
  27508. align-items: center;
  27509. justify-content: center;
  27510. border: 1px dashed #ccc;
  27511. min-width: 78px;
  27512. min-height: 100px;
  27513. z-index: 999;
  27514. }
  27515. .upCss>>>.el-upload-list__item-name {
  27516. width: 100px;
  27517. white-space: nowrap;
  27518. overflow: hidden;
  27519. text-overflow: ellipsis;
  27520. }
  27521. .upCss>>>.el-upload-list__item .el-icon-close {
  27522. font-size: 20px;
  27523. z-index: 9999;
  27524. }
  27525. .addStageImg {
  27526. min-width: 20px;
  27527. min-height: 20px;
  27528. width: 20px;
  27529. height: 20px;
  27530. cursor: pointer;
  27531. }
  27532. .addHW {
  27533. width: 28px;
  27534. height: 28px;
  27535. cursor: pointer;
  27536. }
  27537. .addStageImg>img,
  27538. .addHW>img {
  27539. width: 100%;
  27540. height: 100%;
  27541. }
  27542. .addNewPP>>>.el-dialog__body {
  27543. padding: 5px 20px;
  27544. }
  27545. .addNewPP>>>.el-dialog {
  27546. margin-top: 5vh !important;
  27547. }
  27548. .addNewPP2>>>.el-dialog__body {
  27549. padding: 5px 0;
  27550. }
  27551. .addNewPP2>>>.el-dialog {
  27552. margin-top: 5vh !important;
  27553. }
  27554. .isHeight {
  27555. height: 680px;
  27556. }
  27557. .toolChoose {
  27558. display: flex;
  27559. /* width: 100%; */
  27560. flex-direction: row;
  27561. flex-wrap: wrap;
  27562. }
  27563. .tool,
  27564. .isToolChoose {
  27565. display: flex;
  27566. flex-direction: column;
  27567. flex-wrap: nowrap;
  27568. width: fit-content;
  27569. margin: 10px 0 10px 0;
  27570. align-items: center;
  27571. border: 2px solid #dbdbdb00;
  27572. padding: 10px 20px;
  27573. border-radius: 5px;
  27574. cursor: pointer;
  27575. /* box-shadow: 0 0 2px 0px #dedede; */
  27576. position: relative;
  27577. box-sizing: border-box;
  27578. }
  27579. .tool:hover {
  27580. border: 2px solid #a5c7ff;
  27581. }
  27582. .tool:hover>.noCTool {
  27583. display: block;
  27584. opacity: 0.5;
  27585. }
  27586. .isToolChoose {
  27587. border: 2px solid #438aff !important;
  27588. box-shadow: 0 0 2px 0px #438aff;
  27589. opacity: 1 !important;
  27590. }
  27591. .isCTool,
  27592. .noCTool {
  27593. width: 30px;
  27594. height: 30px;
  27595. position: absolute;
  27596. top: -4px;
  27597. right: -4px;
  27598. }
  27599. .noCTool {
  27600. display: none;
  27601. }
  27602. .isCTool>img,
  27603. .noCTool>img {
  27604. width: 100%;
  27605. height: 100%;
  27606. }
  27607. .tool+.tool {
  27608. margin-right: 10px;
  27609. }
  27610. .whiteBIcon {
  27611. width: 60px;
  27612. cursor: pointer;
  27613. display: flex;
  27614. flex-direction: column;
  27615. flex-wrap: nowrap;
  27616. align-items: center;
  27617. font-size: 14px;
  27618. }
  27619. .whiteBIcon>img,
  27620. .toolIcon>img,
  27621. .arrow>img {
  27622. width: 100%;
  27623. height: 100%;
  27624. }
  27625. .check img {
  27626. width: 20px;
  27627. height: 20px;
  27628. }
  27629. .whiteBIcon>img {
  27630. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27631. border-radius: 15px;
  27632. }
  27633. .whiteBIcon>div:nth-child(2) {
  27634. height: 20px;
  27635. line-height: 20px;
  27636. text-align: center;
  27637. }
  27638. .check {
  27639. /* width: 20px;
  27640. height: 20px; */
  27641. cursor: pointer;
  27642. margin: 10px 0 0;
  27643. }
  27644. .checkDiv {
  27645. display: flex;
  27646. align-items: center;
  27647. }
  27648. .checkDiv span {
  27649. margin-left: 5px;
  27650. color: #858585;
  27651. }
  27652. .customWidth>>>.el-dialog {
  27653. min-width: 600px !important;
  27654. }
  27655. .CollaborativeCss {
  27656. width: 100%;
  27657. display: flex;
  27658. justify-content: center;
  27659. align-items: center;
  27660. box-sizing: border-box;
  27661. padding: 10px 0;
  27662. cursor: pointer;
  27663. }
  27664. .CollaborativeCss >>> .el-tooltip {
  27665. overflow: hidden;
  27666. white-space: nowrap;
  27667. text-overflow: ellipsis;
  27668. }
  27669. .CollaborativeCss2 {
  27670. background: #e0eafb;
  27671. color: #3681fc;
  27672. font-weight: 700;
  27673. border-radius: 5px;
  27674. }
  27675. .a_addBox {
  27676. margin: 10px 0;
  27677. background: #fff;
  27678. padding: 15px;
  27679. /* max-height: 600px; */
  27680. overflow: auto;
  27681. }
  27682. .a_add_box {
  27683. border-bottom: 2px solid #eee;
  27684. padding-bottom: 25px;
  27685. }
  27686. .a_add_head {
  27687. display: flex;
  27688. align-items: center;
  27689. justify-content: space-between;
  27690. margin: 10px 0 0 0;
  27691. font-size: 18px;
  27692. }
  27693. .a_add_checkType {
  27694. margin-top: 10px;
  27695. display: flex;
  27696. font-size: 14px;
  27697. align-items: center;
  27698. }
  27699. .a_add_checkType span {
  27700. box-sizing: border-box;
  27701. padding: 0 0 5px 0;
  27702. cursor: pointer;
  27703. }
  27704. .a_add_checkType span+span {
  27705. margin-left: 10px;
  27706. }
  27707. .a_add_checkType .active {
  27708. border-bottom: 2px solid #409eff;
  27709. color: #409eff;
  27710. }
  27711. .a_add_head .a_add_head_input {
  27712. /* width: 540px; */
  27713. width: 100%;
  27714. }
  27715. .a_add_head .a_add_head_div {
  27716. display: flex;
  27717. align-items: center;
  27718. justify-content: space-between;
  27719. }
  27720. .a_add_body {
  27721. display: flex;
  27722. /* align-items: center; */
  27723. align-items: flex-end;
  27724. }
  27725. .a_add_input {
  27726. display: flex;
  27727. align-items: center;
  27728. flex-wrap: wrap;
  27729. }
  27730. .a_add_input_choice {
  27731. flex-direction: column;
  27732. margin-right: 10px;
  27733. }
  27734. .a_add_input_choice>>>.el-radio {
  27735. display: flex;
  27736. align-items: center;
  27737. flex-direction: row-reverse;
  27738. margin: 30px 0 0 0;
  27739. position: relative;
  27740. }
  27741. .a_add_input_choice>>>.el-checkbox {
  27742. display: flex;
  27743. align-items: center;
  27744. flex-direction: row-reverse;
  27745. margin: 30px 0 0 0;
  27746. position: relative;
  27747. }
  27748. .width100 {
  27749. width: 100%;
  27750. }
  27751. .a_add_input .a_add_persent {
  27752. width: 100%;
  27753. }
  27754. .a_add_persent_div {
  27755. width: 100%;
  27756. display: flex;
  27757. align-items: center;
  27758. }
  27759. .a_add_persent_div span {
  27760. margin: 5px 0;
  27761. }
  27762. .a_add_persent_div span:nth-child(1) {
  27763. width: 30%;
  27764. }
  27765. .a_add_persent_div span:nth-child(2) {
  27766. width: 7%;
  27767. }
  27768. .a_add_persent_div span:nth-child(3) {
  27769. width: 40%;
  27770. }
  27771. .a_add_body_div {
  27772. display: flex;
  27773. align-items: center;
  27774. justify-content: center;
  27775. /* flex-direction: column; */
  27776. position: absolute;
  27777. right: -20px;
  27778. transform: translateX(100%);
  27779. }
  27780. .a_add_body_div>>>.el-button--primary {
  27781. background: #466b99;
  27782. border: none;
  27783. }
  27784. .all_choose {
  27785. display: flex;
  27786. flex-direction: row;
  27787. align-items: flex-start;
  27788. width: 100%;
  27789. }
  27790. .all_choose+.all_choose {
  27791. /* margin-top: 10px */
  27792. }
  27793. .all_choose>span {
  27794. min-width: fit-content;
  27795. display: block;
  27796. white-space: nowrap;
  27797. overflow: hidden;
  27798. text-overflow: ellipsis;
  27799. margin-right: 20px;
  27800. font-weight: bold;
  27801. font-size: 14px;
  27802. }
  27803. .all_choose>>>.el-checkbox-group {
  27804. display: flex;
  27805. flex-direction: row;
  27806. width: 100%;
  27807. flex-wrap: wrap;
  27808. align-content: center;
  27809. justify-content: flex-start;
  27810. align-items: center;
  27811. margin-top: 3px;
  27812. }
  27813. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27814. margin-bottom: 10px;
  27815. display: flex;
  27816. flex-direction: row;
  27817. align-items: center;
  27818. margin-right: 10px;
  27819. }
  27820. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27821. min-width: 80px;
  27822. overflow: hidden;
  27823. /* width: 80px; */
  27824. text-overflow: ellipsis;
  27825. white-space: nowrap;
  27826. }
  27827. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27828. width: auto;
  27829. }
  27830. .choose>div:nth-child(3)>span {
  27831. /* letter-spacing: 0 !important; */
  27832. }
  27833. .choose {
  27834. display: flex;
  27835. flex-direction: column;
  27836. flex-wrap: nowrap;
  27837. height: 100%;
  27838. justify-content: space-evenly;
  27839. align-items: flex-start;
  27840. }
  27841. .both {
  27842. display: flex;
  27843. flex-direction: row;
  27844. flex-wrap: wrap;
  27845. width: 100%;
  27846. align-items: center;
  27847. justify-content: flex-start;
  27848. margin: 0 0 15px;
  27849. }
  27850. .notice>>>.el-dialog {
  27851. width: 500px !important;
  27852. text-align: center;
  27853. }
  27854. .notice>>>.el-button {
  27855. margin-top: 20px;
  27856. }
  27857. .whiteBg {
  27858. /* background: #fff; */
  27859. border-radius: 10px;
  27860. }
  27861. .wb_j_box {
  27862. display: flex;
  27863. width: 100%;
  27864. padding: 0 20px 0;
  27865. box-sizing: border-box;
  27866. }
  27867. .wb_j_box_content {
  27868. width: calc(100% - 55% - 100px);
  27869. display: flex;
  27870. align-items: center;
  27871. }
  27872. .wb_j_box_p_box {
  27873. max-width: calc(100% - 200px);
  27874. word-break: break-all;
  27875. overflow: hidden;
  27876. margin: 0 0 0 10px;
  27877. font-size: 14px;
  27878. color: #6e6e6e;
  27879. z-index: 999;
  27880. }
  27881. .chooseWho {
  27882. display: flex;
  27883. gap:15px;
  27884. /* width: 410px; */
  27885. flex-direction: row;
  27886. flex-wrap: nowrap;
  27887. justify-content: space-between;
  27888. padding-bottom: 10px;
  27889. }
  27890. .chooseWho>div {
  27891. cursor: pointer;
  27892. padding-bottom: 10px;
  27893. font-weight: bold;
  27894. }
  27895. .isChooseActive {
  27896. color: #3e88f4;
  27897. border-bottom: 2px solid #2f80f3;
  27898. }
  27899. .toolSort {
  27900. display: flex;
  27901. flex-direction: row;
  27902. flex-wrap: wrap;
  27903. justify-content: flex-start;
  27904. align-items: flex-start;
  27905. }
  27906. .toolSort>div {
  27907. margin-right: 10px;
  27908. }
  27909. .tools {
  27910. width: 100%;
  27911. display: flex;
  27912. flex-direction: column;
  27913. flex-wrap: nowrap;
  27914. align-items: flex-start;
  27915. }
  27916. .leftTools,
  27917. .rightTools {
  27918. width: 50%;
  27919. }
  27920. .leftTools+.leftTools {
  27921. border-top: 1px solid #dbdbdb;
  27922. padding-top: 30px;
  27923. }
  27924. .rightTools {
  27925. display: flex;
  27926. flex-direction: row;
  27927. flex-wrap: nowrap;
  27928. justify-content: space-around;
  27929. }
  27930. .firstToolList {
  27931. display: flex;
  27932. flex-direction: column;
  27933. flex-wrap: nowrap;
  27934. align-items: center;
  27935. }
  27936. .iconList {
  27937. display: flex;
  27938. flex-direction: row;
  27939. flex-wrap: wrap;
  27940. justify-content: flex-start;
  27941. align-items: center;
  27942. margin: 20px 0 5px 0;
  27943. width: 240px;
  27944. min-width: 240px;
  27945. }
  27946. .iconTool {
  27947. display: flex;
  27948. flex-direction: column;
  27949. flex-wrap: nowrap;
  27950. align-items: center;
  27951. justify-content: flex-start;
  27952. margin: 15px 10px;
  27953. }
  27954. .toolIcon {
  27955. width: 50px;
  27956. }
  27957. .taskBorder {
  27958. /* border: 1px solid #CAD1DC; */
  27959. border-radius: 10px;
  27960. margin-top: 10px;
  27961. min-height: 670px;
  27962. position: relative;
  27963. background: #fff;
  27964. padding: 20px;
  27965. overflow: hidden;
  27966. box-sizing: border-box;
  27967. }
  27968. .smallTaskBorder {
  27969. height: 405px;
  27970. min-height: 405px !important;
  27971. overflow: hidden;
  27972. }
  27973. /* .taskBorder>div {
  27974. padding: 30px 30px 10px;
  27975. } */
  27976. .addTaskBorder {
  27977. /* border: 2px solid #5E9AFC; */
  27978. border-radius: 8px;
  27979. margin-top: 10px;
  27980. cursor: pointer;
  27981. /* height: 50px;
  27982. line-height: 50px; */
  27983. background: #fff;
  27984. padding: 15px 0;
  27985. display: flex;
  27986. align-items: center;
  27987. justify-content: center;
  27988. }
  27989. /* .addTaskBorder>div {
  27990. margin: 0 auto;
  27991. display: flex;
  27992. align-items: center;
  27993. justify-content: center;
  27994. }
  27995. .addTaskBorder>div>img {
  27996. width: 20px;
  27997. }
  27998. .addTaskBorder>div>span {
  27999. font-size: 16px;
  28000. margin-left: 10px;
  28001. color: #5E9AFC;
  28002. } */
  28003. .funBlock {
  28004. display: flex;
  28005. padding: 15px 0;
  28006. flex-direction: row;
  28007. justify-content: center;
  28008. align-items: center;
  28009. position: absolute;
  28010. right: 0;
  28011. bottom: 0;
  28012. background: #fff;
  28013. width: 100%;
  28014. height: 60px;
  28015. z-index: 9;
  28016. }
  28017. .fold {
  28018. display: flex;
  28019. margin: 0 20px;
  28020. flex-direction: row;
  28021. align-items: center;
  28022. cursor: pointer;
  28023. color: #2b7bff;
  28024. }
  28025. .arrow {
  28026. margin-right: 8px;
  28027. width: 16px;
  28028. height: 16px;
  28029. min-width: 16px;
  28030. min-height: 16px;
  28031. background-size: 100% 100%;
  28032. display: block;
  28033. background-image: url(../../../assets/icon/new/u_up.png);
  28034. /* border-left: 7px solid transparent;
  28035. border-bottom: 7px solid #717C8D;
  28036. border-top: 0px solid transparent;
  28037. border-right: 7px solid transparent; */
  28038. /* box-sizing: border-box; */
  28039. transition: all 0.3s;
  28040. }
  28041. .arrowZ {
  28042. transform: rotate(180deg);
  28043. }
  28044. .addToolFun {
  28045. display: flex;
  28046. width: 150px;
  28047. flex-direction: row;
  28048. align-items: center;
  28049. justify-content: center;
  28050. border: 2px dashed #cad1dc;
  28051. border-radius: 5px;
  28052. height: 50px;
  28053. margin: 35px auto 0;
  28054. cursor: pointer;
  28055. }
  28056. .addToolFun2 {
  28057. display: flex;
  28058. width: 150px;
  28059. border: 2px dashed #cad1dc;
  28060. flex-direction: row;
  28061. align-items: center;
  28062. justify-content: center;
  28063. border-radius: 5px;
  28064. height: 50px;
  28065. margin: 0 auto 0;
  28066. cursor: pointer;
  28067. }
  28068. .addToolFun2>div,
  28069. .addToolFun>div {
  28070. display: flex;
  28071. line-height: 50px;
  28072. }
  28073. .addToolImg {
  28074. width: 20px;
  28075. height: 20px;
  28076. margin-right: 10px;
  28077. }
  28078. .addToolsDia>>>.el-dialog__body {
  28079. padding: 20px;
  28080. }
  28081. .addToolsDia>>>.el-dialog__body>.toolChoose {
  28082. padding: 0;
  28083. }
  28084. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  28085. padding: 0;
  28086. border-bottom: none;
  28087. margin-bottom: 0;
  28088. }
  28089. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  28090. width: 100%;
  28091. }
  28092. .lineCss>>>.el-form-item__label {
  28093. width: auto !important;
  28094. }
  28095. .lineCss>>>.el-form-item__content {
  28096. margin-left: 50px !important;
  28097. }
  28098. .newSteps {
  28099. display: flex;
  28100. width: 100% !important;
  28101. /* height: 80px; */
  28102. cursor: pointer;
  28103. margin: 10px 0;
  28104. border-radius: 10px;
  28105. flex-direction: row;
  28106. align-content: center;
  28107. justify-content: center;
  28108. align-items: center;
  28109. margin: 0 !important;
  28110. }
  28111. /* 评价样式 */
  28112. .elist_css {
  28113. padding-bottom: 75px !important;
  28114. }
  28115. .elist_title {
  28116. margin-bottom: 10px;
  28117. }
  28118. .elist_input {
  28119. width: 100%;
  28120. }
  28121. .elist_input_box {
  28122. display: flex;
  28123. align-items: center;
  28124. flex-wrap: wrap;
  28125. }
  28126. .elist_input_box+.elist_input_box {
  28127. margin-top: 30px;
  28128. }
  28129. .elist_input .elist_input_box input {
  28130. font: inherit;
  28131. color: currentColor;
  28132. width: 100%;
  28133. /* max-width: calc(100% - 385px); */
  28134. max-width: calc(100% - 150px);
  28135. padding: 8px 14px;
  28136. display: block;
  28137. min-width: 0;
  28138. outline: none;
  28139. border: 1px solid rgba(0, 0, 0, 0.23);
  28140. border-radius: 4px;
  28141. box-sizing: border-box;
  28142. background: #fff;
  28143. margin: 0 20px 0 0;
  28144. }
  28145. .elist_input .elist_input_box span {
  28146. height: 36px;
  28147. line-height: 36px;
  28148. color: rgb(82, 82, 82);
  28149. min-width: 80px;
  28150. }
  28151. .elist_input .elist_input_box .remove {
  28152. height: 20px;
  28153. width: 20px;
  28154. min-height: 20px;
  28155. min-width: 20px;
  28156. background-size: 100% 100%;
  28157. background-position: unset;
  28158. margin-left: 5px;
  28159. }
  28160. .elist_input_box>>>.el-rate {
  28161. display: flex;
  28162. height: 36px;
  28163. align-items: center;
  28164. }
  28165. .elist_input_box .elist_inptu_text {
  28166. width: 100%;
  28167. display: flex;
  28168. align-items: center;
  28169. margin-top: 10px;
  28170. }
  28171. .elist_input_box .elist_inptu_text input {
  28172. /* width: 500px; */
  28173. width: 100%;
  28174. max-width: unset;
  28175. }
  28176. .elist_input_box>>>.el-rate__icon {
  28177. font-size: 24px;
  28178. }
  28179. .elist_btn {
  28180. margin-top: 10px;
  28181. }
  28182. .lineTitle {
  28183. /* margin-top: 15px; */
  28184. /* width: 160px; */
  28185. font-size: 16px;
  28186. display: flex;
  28187. align-items: center;
  28188. line-height: 20px;
  28189. }
  28190. .lineTitle::before {
  28191. content: "";
  28192. display: block;
  28193. width: 3px;
  28194. height: 20px;
  28195. background: #0061ff;
  28196. border-radius: 3px;
  28197. margin: 0 5px 0 0;
  28198. }
  28199. .clineTitle::before {
  28200. content: "";
  28201. display: block;
  28202. min-width: 10px;
  28203. width: 10px;
  28204. height: 10px;
  28205. background: #0061ff;
  28206. border-radius: 50%;
  28207. margin: 0 5px 0 0;
  28208. }
  28209. .courseTop {
  28210. display: flex;
  28211. flex-direction: row;
  28212. justify-content: space-between;
  28213. align-items: center;
  28214. width: calc(100%);
  28215. margin: 0 auto;
  28216. padding: 10px 20px;
  28217. box-sizing: border-box;
  28218. position: absolute;
  28219. top: 0;
  28220. }
  28221. .stepsNav {
  28222. display: flex;
  28223. flex-direction: row;
  28224. justify-content: flex-start;
  28225. align-items: center;
  28226. }
  28227. .stepsWord {
  28228. font-size: 18px;
  28229. color: #fff;
  28230. font-weight: bold;
  28231. margin-left: auto;
  28232. background: rgb(15, 126, 255);
  28233. border-radius: 5px;
  28234. padding: 3px 25px;
  28235. box-sizing: border-box;
  28236. }
  28237. .stepBox {
  28238. width: calc(100% - 40px);
  28239. height: calc(100%);
  28240. overflow: hidden;
  28241. border-radius: 5px;
  28242. margin: 0 auto;
  28243. }
  28244. .rightBox {
  28245. width: calc(100%);
  28246. background: #f0f2f5;
  28247. /* border-radius: 10px; */
  28248. overflow: auto;
  28249. height: calc(100% - 150px);
  28250. margin: 0 auto;
  28251. position: relative;
  28252. box-sizing: border-box;
  28253. }
  28254. .e_add_top {
  28255. display: flex;
  28256. justify-content: space-between;
  28257. background: #fff;
  28258. position: absolute;
  28259. right: 20px;
  28260. height: 50px;
  28261. align-items: center;
  28262. }
  28263. .e_add_title2 {
  28264. display: flex;
  28265. align-items: center;
  28266. }
  28267. .e_add_title2 span {
  28268. width: 40px;
  28269. }
  28270. .e_add_title {
  28271. display: flex;
  28272. align-items: center;
  28273. color: #b8b8b8;
  28274. font-size: 18px;
  28275. position: relative;
  28276. height: 40px;
  28277. }
  28278. .e_add_title span {
  28279. margin-right: 10px;
  28280. }
  28281. .e_add_title .el_input {
  28282. width: 300px;
  28283. }
  28284. .e_add_title>>>.el-input__inner {
  28285. width: 400px;
  28286. }
  28287. .e_add_btn {}
  28288. .e_add_content {
  28289. display: flex;
  28290. width: 100%;
  28291. }
  28292. .e_add_list {
  28293. background: #fff;
  28294. height: 500px;
  28295. width: 210px;
  28296. position: relative;
  28297. margin: 15px 5px 0 0;
  28298. flex-shrink: 0;
  28299. display: flex;
  28300. flex-direction: column;
  28301. }
  28302. .e_add_list_title {
  28303. font-size: 20px;
  28304. width: 100%;
  28305. box-sizing: border-box;
  28306. padding: 15px 40px;
  28307. text-align: center;
  28308. border-bottom: 1px solid #eaeaea;
  28309. position: relative;
  28310. display: flex;
  28311. align-items: center;
  28312. justify-content: center;
  28313. height: 57px;
  28314. background: #f6f6f6;
  28315. }
  28316. .e_add_list_title span {
  28317. overflow: hidden;
  28318. white-space: nowrap;
  28319. text-overflow: ellipsis;
  28320. }
  28321. .e_add_list_title img {
  28322. position: absolute;
  28323. right: 15px;
  28324. width: 25px;
  28325. cursor: pointer;
  28326. top: 50%;
  28327. transform: translateY(-50%);
  28328. }
  28329. .e_add_list_body {
  28330. height: calc(100% - 187px);
  28331. overflow: auto;
  28332. }
  28333. .e_add_list_child {
  28334. width: 100%;
  28335. display: flex;
  28336. align-items: center;
  28337. justify-content: center;
  28338. position: relative;
  28339. box-sizing: border-box;
  28340. padding: 15px 40px;
  28341. text-align: center;
  28342. }
  28343. .e_add_list_child span {
  28344. overflow: hidden;
  28345. white-space: nowrap;
  28346. text-overflow: ellipsis;
  28347. cursor: pointer;
  28348. }
  28349. .e_add_list_child img {
  28350. position: absolute;
  28351. right: 10px;
  28352. width: 21px;
  28353. cursor: pointer;
  28354. top: 50%;
  28355. transform: translateY(-50%);
  28356. }
  28357. .e_add_list_child+.e_add_list_child {
  28358. border-top: 1px solid #eaeaea;
  28359. }
  28360. .e_add_list_child .active {
  28361. color: #409eff;
  28362. }
  28363. .e_add_list_btn {
  28364. position: absolute;
  28365. bottom: 0;
  28366. height: 50px;
  28367. background: rgb(120, 120, 254);
  28368. width: 100%;
  28369. color: #fff;
  28370. font-size: 16px;
  28371. text-align: center;
  28372. line-height: 50px;
  28373. cursor: pointer;
  28374. }
  28375. .e_add_list_detail {
  28376. position: absolute;
  28377. bottom: 0;
  28378. height: 130px;
  28379. background: rgb(120, 120, 254);
  28380. width: 100%;
  28381. color: #fff;
  28382. font-size: 16px;
  28383. display: flex;
  28384. align-items: center;
  28385. justify-content: center;
  28386. }
  28387. .e_add_list_detail textarea {
  28388. height: 90%;
  28389. width: 95%;
  28390. border: none;
  28391. resize: none;
  28392. outline: none;
  28393. padding: 5px;
  28394. box-sizing: border-box;
  28395. }
  28396. .e_add_list_pbox {
  28397. width: 100%;
  28398. }
  28399. .e_add_list_pbox_title {
  28400. height: 50px;
  28401. background: #fff;
  28402. display: flex;
  28403. align-items: center;
  28404. width: 100%;
  28405. box-sizing: border-box;
  28406. padding: 0 20px;
  28407. flex-direction: row;
  28408. flex-wrap: wrap;
  28409. }
  28410. .type_title {
  28411. font-size: 18px;
  28412. font-weight: 700;
  28413. }
  28414. .type_content {
  28415. font-size: 16px;
  28416. margin-left: 30px;
  28417. }
  28418. .type_content span+span {
  28419. margin-left: 20px;
  28420. }
  28421. .type_content span {
  28422. cursor: pointer;
  28423. padding-bottom: 5px;
  28424. box-sizing: border-box;
  28425. }
  28426. .type_content .active {
  28427. color: #409eff;
  28428. border-bottom: 2px solid #409eff;
  28429. }
  28430. .e_add_list_pbox_content {
  28431. height: calc(100% - 50px);
  28432. display: flex;
  28433. align-items: center;
  28434. width: 100%;
  28435. background: #fff;
  28436. }
  28437. .mbCss {
  28438. width: 100%;
  28439. display: flex;
  28440. flex-direction: row;
  28441. flex-wrap: nowrap;
  28442. align-content: center;
  28443. align-items: flex-start;
  28444. justify-content: flex-start;
  28445. }
  28446. .pjCss {
  28447. /* width: 42%; */
  28448. width: calc(100% - 55%);
  28449. display: flex;
  28450. flex-direction: column;
  28451. flex-wrap: nowrap;
  28452. align-items: flex-start;
  28453. }
  28454. .e_box {
  28455. /* display: flex; */
  28456. flex-wrap: wrap;
  28457. max-height: 500px;
  28458. align-items: flex-start;
  28459. overflow: auto;
  28460. width: 100%;
  28461. }
  28462. .e_card {
  28463. border: 1px solid #ccc;
  28464. background: #fff;
  28465. margin-right: 20px;
  28466. width: 270px;
  28467. display: flex;
  28468. flex-direction: column;
  28469. align-items: center;
  28470. border-radius: 5px;
  28471. margin-top: 10px;
  28472. text-align: center;
  28473. }
  28474. .e_card_picture {
  28475. margin: 10px 0;
  28476. }
  28477. .e_card_picture>img {
  28478. width: 50px;
  28479. }
  28480. .e_card_name {
  28481. width: 100%;
  28482. padding: 0 10px;
  28483. box-sizing: border-box;
  28484. margin-bottom: 10px;
  28485. overflow: hidden;
  28486. text-overflow: ellipsis;
  28487. white-space: nowrap;
  28488. }
  28489. .e_card_time {
  28490. width: 100%;
  28491. padding: 0 10px;
  28492. box-sizing: border-box;
  28493. font-size: 15px;
  28494. color: #c3c3c3;
  28495. margin-bottom: 10px;
  28496. }
  28497. .e_card_btn {
  28498. height: 40px;
  28499. display: flex;
  28500. align-items: center;
  28501. width: 100%;
  28502. background: rgb(244, 244, 244);
  28503. }
  28504. .e_card_btn:hover {
  28505. background: rgb(221 221 221);
  28506. }
  28507. .e_card_btn span {
  28508. flex: 1 1 auto;
  28509. text-align: center;
  28510. cursor: pointer;
  28511. }
  28512. .addEva {
  28513. border: 1px solid #ccc;
  28514. background: #fff;
  28515. margin-right: 20px;
  28516. width: 270px;
  28517. height: 149px;
  28518. display: flex;
  28519. flex-direction: column;
  28520. align-items: center;
  28521. border-radius: 5px;
  28522. margin-top: 10px;
  28523. text-align: center;
  28524. cursor: pointer;
  28525. justify-content: center;
  28526. }
  28527. .addEva>img {
  28528. width: 50px;
  28529. object-fit: cover;
  28530. }
  28531. .uploadFm {
  28532. border: 1px dashed #ccc;
  28533. width: 100%;
  28534. height: 140px;
  28535. position: relative;
  28536. cursor: pointer;
  28537. display: flex;
  28538. flex-direction: column;
  28539. justify-content: center;
  28540. align-items: center;
  28541. font-size: 14px;
  28542. color: #6e6e6e;
  28543. position: relative;
  28544. }
  28545. .cover_p {
  28546. width: 100% !important;
  28547. height: 100%;
  28548. object-fit: cover;
  28549. }
  28550. .uploadFm2:hover .cover_mask {
  28551. display: flex !important;
  28552. }
  28553. .cover_mask {
  28554. display: none;
  28555. width: 100%;
  28556. height: 100%;
  28557. position: absolute;
  28558. background: #00000054;
  28559. align-items: center;
  28560. justify-content: center;
  28561. flex-direction: column;
  28562. }
  28563. .cover_mask>img {
  28564. width: 30px;
  28565. }
  28566. .cover_mask>span {
  28567. color: #fff;
  28568. font-size: 12px;
  28569. }
  28570. .uploadFm>img {
  28571. width: 50px;
  28572. }
  28573. .fileCss {
  28574. width: 100%;
  28575. display: flex;
  28576. flex-direction: row;
  28577. flex-wrap: nowrap;
  28578. justify-content: space-around;
  28579. align-items: center;
  28580. padding-top: 15px;
  28581. }
  28582. .fileCss>div {
  28583. display: flex;
  28584. flex-direction: column;
  28585. align-items: center;
  28586. }
  28587. .fileCss .spanName {
  28588. margin-top: 10px;
  28589. }
  28590. .sysPicBox {
  28591. display: flex;
  28592. flex-direction: row;
  28593. flex-wrap: wrap;
  28594. align-content: flex-start;
  28595. height: 435px;
  28596. overflow: auto;
  28597. position: relative;
  28598. }
  28599. .picNone {
  28600. position: absolute;
  28601. left: 50%;
  28602. top: 45%;
  28603. transform: translate(-50%, -50%);
  28604. width: fit-content;
  28605. color: #9c9c9c;
  28606. }
  28607. .sysPic {
  28608. width: 200px;
  28609. height: 115px;
  28610. margin: 0 20px 20px 0;
  28611. cursor: pointer;
  28612. }
  28613. .sysPic>img,
  28614. .isSysPic>img,
  28615. .deletePic>img {
  28616. width: 100%;
  28617. height: 100%;
  28618. object-fit: cover;
  28619. }
  28620. .isSysPic {
  28621. width: 200px;
  28622. height: 115px;
  28623. position: relative;
  28624. }
  28625. .deletePic {
  28626. width: 20px;
  28627. height: 20px;
  28628. position: absolute;
  28629. top: 0;
  28630. right: 0;
  28631. cursor: pointer;
  28632. }
  28633. .select_box1 {
  28634. height: 100%;
  28635. }
  28636. .select_box1_img {
  28637. background: #fff;
  28638. border-radius: 5px;
  28639. padding: 15px;
  28640. box-sizing: border-box;
  28641. margin-bottom: 20px;
  28642. }
  28643. .select_box1_title {
  28644. padding: 0 0 15px 0;
  28645. border-bottom: 1px solid #eee;
  28646. margin-bottom: 15px;
  28647. }
  28648. .select_box1_title span:nth-child(1) {
  28649. font-size: 16px;
  28650. margin-right: 20px;
  28651. color: #000;
  28652. }
  28653. .select_box1_title span:nth-child(2) {
  28654. font-size: 14px;
  28655. color: rgb(112, 112, 112);
  28656. }
  28657. .select_box1_add_img {}
  28658. .select_box1_select {
  28659. background: #fff;
  28660. border-radius: 5px;
  28661. padding: 15px;
  28662. box-sizing: border-box;
  28663. height: calc(100% - 200px);
  28664. overflow: auto;
  28665. }
  28666. .select_box2 {
  28667. height: 100%;
  28668. }
  28669. .select_box2_title {
  28670. background: #fff;
  28671. border-radius: 5px;
  28672. padding: 5px 10px;
  28673. box-sizing: border-box;
  28674. margin-bottom: 10px;
  28675. }
  28676. .select_box2_box {
  28677. display: flex;
  28678. height: calc(100% - 30px);
  28679. }
  28680. .select_box2_img {
  28681. width: calc(100% - 310px);
  28682. height: 100%;
  28683. overflow: auto;
  28684. background: #fff;
  28685. border-radius: 5px;
  28686. }
  28687. .select_box2_img img {
  28688. width: 100%;
  28689. }
  28690. .select_box2_answer {
  28691. background: #fff;
  28692. margin-left: 10px;
  28693. border-radius: 5px;
  28694. width: 300px;
  28695. overflow: auto;
  28696. height: 100%;
  28697. display: flex;
  28698. flex-direction: column;
  28699. align-items: center;
  28700. padding-top: 10px;
  28701. box-sizing: border-box;
  28702. }
  28703. .select_box2_answer_box {
  28704. margin: 0 0 10px 0;
  28705. width: 85%;
  28706. }
  28707. .rate_textarea {
  28708. font: inherit;
  28709. color: currentColor;
  28710. width: 100%;
  28711. padding: 8px 14px;
  28712. display: block;
  28713. min-width: 0;
  28714. outline: none;
  28715. border: 1px solid rgba(0, 0, 0, 0.23);
  28716. border-radius: 4px;
  28717. box-sizing: border-box;
  28718. background: #fff;
  28719. margin: 0 20px 0 0;
  28720. resize: none;
  28721. }
  28722. .select_answer_title {
  28723. text-align: left;
  28724. width: 85%;
  28725. margin-bottom: 10px;
  28726. font-size: 18px;
  28727. color: #8e8e8e;
  28728. }
  28729. .mask {
  28730. background-color: rgb(0 0 0 / 30%);
  28731. /* position: fixed; */
  28732. position: absolute;
  28733. top: 0;
  28734. left: 0;
  28735. width: 100%;
  28736. height: 100%;
  28737. z-index: 90;
  28738. display: flex;
  28739. align-items: center;
  28740. justify-content: center;
  28741. }
  28742. .progressBox {
  28743. width: 300px;
  28744. height: 150px;
  28745. background: #fff;
  28746. border-radius: 10px;
  28747. box-shadow: 0 0 6px 1px #bfbfbf;
  28748. display: flex;
  28749. align-items: center;
  28750. justify-content: center;
  28751. flex-direction: column;
  28752. position: relative;
  28753. color: #6c6c6c;
  28754. }
  28755. .progressBox>>>.el-progress-bar__outer {
  28756. background-color: #d1dfff !important;
  28757. }
  28758. .progressBox .lbox {
  28759. height: 50px;
  28760. font-size: 19px;
  28761. display: flex;
  28762. align-items: center;
  28763. color: #747474;
  28764. }
  28765. .progressBox .lbox img {
  28766. width: 40px;
  28767. margin-right: 20px;
  28768. }
  28769. .closeCss {
  28770. position: absolute;
  28771. top: 8px;
  28772. right: 8px;
  28773. cursor: pointer;
  28774. width: 20px;
  28775. height: 20px;
  28776. }
  28777. .closeCss>img {
  28778. width: 100%;
  28779. height: 100%;
  28780. }
  28781. .updateTips::before {
  28782. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28783. font-size: 14px;
  28784. margin-left: 20px;
  28785. font-weight: 400;
  28786. color: #ff3a3a;
  28787. margin-bottom: 10px;
  28788. display: block;
  28789. }
  28790. .updateMask {
  28791. width: 100%;
  28792. z-index: 3;
  28793. top: 0;
  28794. position: absolute;
  28795. /* background-color: rgba(0,0,0,.3); */
  28796. }
  28797. .t_j_box {
  28798. display: flex;
  28799. }
  28800. .t_j_box span:nth-child(1) {
  28801. width: 15%;
  28802. overflow: hidden;
  28803. margin-right: 10px;
  28804. text-overflow: ellipsis;
  28805. white-space: nowrap;
  28806. }
  28807. .t_j_box span:nth-child(2) {
  28808. width: 30%;
  28809. overflow: hidden;
  28810. text-overflow: ellipsis;
  28811. margin-right: 10px;
  28812. }
  28813. .t_j_box span:nth-child(3) {
  28814. max-width: calc(55% - 20px);
  28815. overflow: hidden;
  28816. text-overflow: ellipsis;
  28817. }
  28818. .sentenBox {
  28819. background: #fff;
  28820. height: 600px;
  28821. overflow: auto;
  28822. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28823. background-position: 102%;
  28824. background-repeat: no-repeat;
  28825. background-size: 60%;
  28826. }
  28827. .sentenBox>.sentenContent {
  28828. padding-bottom: 10px;
  28829. width: 97%;
  28830. margin: 0 auto;
  28831. }
  28832. .sentenBox>.sentenContent+.sentenContent {
  28833. border-top: 1px solid #cbcbcb;
  28834. }
  28835. .addSen {
  28836. background: #409efe;
  28837. width: 90px;
  28838. color: #fff;
  28839. height: 35px;
  28840. text-align: center;
  28841. line-height: 35px;
  28842. border-radius: 5px;
  28843. float: right;
  28844. margin: 10px 20px 0 0;
  28845. cursor: pointer;
  28846. }
  28847. .sentenTop {
  28848. display: flex;
  28849. flex-direction: row;
  28850. flex-wrap: nowrap;
  28851. align-items: center;
  28852. }
  28853. .sentenTop::before {
  28854. content: attr(index);
  28855. background: #3681fc;
  28856. border-radius: 50%;
  28857. color: #fff;
  28858. width: 25px;
  28859. height: 25px;
  28860. min-width: 25px;
  28861. min-height: 25px;
  28862. text-align: center;
  28863. line-height: 25px;
  28864. margin-right: 5px;
  28865. }
  28866. .sentenTop>div:nth-child(2) {
  28867. width: 300px;
  28868. margin: 0 15px;
  28869. }
  28870. .sentenTop>div:nth-child(3) {
  28871. background: #409efe;
  28872. color: #fff;
  28873. width: 65px;
  28874. height: 35px;
  28875. text-align: center;
  28876. line-height: 35px;
  28877. border-radius: 5px;
  28878. cursor: pointer;
  28879. }
  28880. .cardList {
  28881. padding: 30px 0 20px 0;
  28882. display: flex;
  28883. flex-direction: row;
  28884. flex-wrap: wrap;
  28885. align-items: center;
  28886. box-sizing: border-box;
  28887. border-bottom: 1px solid #f4f4f4;
  28888. width: 98%;
  28889. margin: 0 auto;
  28890. }
  28891. .rightCardList {
  28892. display: flex;
  28893. flex-wrap: wrap;
  28894. }
  28895. .cardBox {
  28896. display: flex;
  28897. flex-direction: row;
  28898. flex-wrap: wrap;
  28899. align-items: center;
  28900. align-content: center;
  28901. }
  28902. .isCard,
  28903. .isCard1 {
  28904. width: auto;
  28905. padding: 0 20px;
  28906. height: 65px;
  28907. text-align: center;
  28908. line-height: 65px;
  28909. font-size: 14px;
  28910. cursor: pointer;
  28911. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28912. background-size: 100% 100%;
  28913. position: relative;
  28914. z-index: 99;
  28915. }
  28916. .isCard1 {
  28917. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28918. }
  28919. .isCard:hover .deleteWord {
  28920. display: block;
  28921. }
  28922. .isCard>div:nth-child(1),
  28923. .isCard1>div:nth-child(1) {
  28924. white-space: nowrap;
  28925. overflow: hidden;
  28926. text-overflow: ellipsis;
  28927. width: 100%;
  28928. margin: 0 auto;
  28929. }
  28930. .card {
  28931. width: 140px;
  28932. height: 65px;
  28933. }
  28934. .card>img {
  28935. width: 100%;
  28936. height: 100%;
  28937. }
  28938. .rightCardBox {
  28939. width: 98%;
  28940. margin: 10px auto 0;
  28941. }
  28942. .rightCardBox>div:nth-child(1) {
  28943. margin-bottom: 10px;
  28944. }
  28945. .cardCss {
  28946. display: flex;
  28947. flex-direction: column;
  28948. flex-wrap: nowrap;
  28949. align-items: center;
  28950. border-bottom: 3px solid #b4c3d3;
  28951. padding: 0 0 5px 0;
  28952. /* margin-right: 10px; */
  28953. }
  28954. .cardCss>div:nth-child(2) {
  28955. background: #5b7b9d;
  28956. color: #fff;
  28957. width: 20px;
  28958. height: 20px;
  28959. border-radius: 50%;
  28960. text-align: center;
  28961. line-height: 20px;
  28962. }
  28963. .sentenTopBox {
  28964. display: flex;
  28965. flex-direction: row;
  28966. flex-wrap: nowrap;
  28967. align-items: center;
  28968. justify-content: space-between;
  28969. padding: 55px 0 0 20px;
  28970. box-sizing: border-box;
  28971. width: 85%;
  28972. }
  28973. .rb_c_ai_box,
  28974. .stepsBottom {
  28975. width: 100%;
  28976. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28977. /* background: #f7f7f7; */
  28978. border-radius: 10px;
  28979. overflow: hidden;
  28980. /* height: 100%; */
  28981. height: calc(100% - 55px);
  28982. }
  28983. .navTop {
  28984. background: #53749b;
  28985. color: #fff;
  28986. height: 40px;
  28987. line-height: 40px;
  28988. padding-left: 15px;
  28989. font-size: 18px;
  28990. }
  28991. .navBottom {
  28992. /* background: #6b91b7; */
  28993. height: 100%;
  28994. overflow: auto;
  28995. padding: 10px 0;
  28996. }
  28997. .navStage {
  28998. display: flex;
  28999. flex-direction: row;
  29000. flex-wrap: nowrap;
  29001. align-items: center;
  29002. padding: 10px 10px 10px 0;
  29003. cursor: pointer;
  29004. background: #ffffff;
  29005. width: 95%;
  29006. margin: 5px auto 5px;
  29007. box-sizing: border-box;
  29008. border-radius: 5px;
  29009. flex-wrap: wrap;
  29010. position: relative;
  29011. }
  29012. .navStage:hover>.chapter_upload_drag {
  29013. display: block;
  29014. }
  29015. .navTask:hover>.chapter_upload_drag {
  29016. display: block;
  29017. }
  29018. .chapter_upload:hover>.chapter_upload_drag {
  29019. display: block;
  29020. }
  29021. .navStage::before {
  29022. content: "";
  29023. display: block;
  29024. width: 16px;
  29025. height: 16px;
  29026. background-image: url(../../../assets/icon/new/icon_stage.png);
  29027. background-size: 100%;
  29028. margin-left: 25px;
  29029. }
  29030. .navStage .chapter_unit_open {
  29031. content: "";
  29032. display: block;
  29033. width: 16px;
  29034. height: 16px;
  29035. background-image: url(../../../assets/icon/new/down.png);
  29036. transform: rotate(-90deg);
  29037. background-size: 100%;
  29038. margin-left: 10px;
  29039. transition: all 0.5s;
  29040. }
  29041. .isNavStageOpen .chapter_unit_open {
  29042. transform: rotate(0deg);
  29043. }
  29044. .isNavStage {
  29045. background: #0061ff;
  29046. }
  29047. .isNavStage::before {
  29048. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  29049. }
  29050. .isNavStage .chapter_unit_open {
  29051. background-image: url(../../../assets/icon/new/downC.png);
  29052. }
  29053. .isNavStage .nt_taskName {
  29054. font-weight: bold !important;
  29055. color: #ffffff !important;
  29056. }
  29057. .isNavStage .nt_taskTitle {
  29058. font-weight: bold !important;
  29059. color: #fff !important;
  29060. }
  29061. .navStage .nt_taskBox {
  29062. width: calc(100% - 68px);
  29063. padding: 0 0 0 5px;
  29064. box-sizing: border-box;
  29065. box-sizing: border-box;
  29066. display: flex;
  29067. flex-direction: row;
  29068. flex-wrap: nowrap;
  29069. align-items: baseline;
  29070. }
  29071. .navStage .nt_taskTitle {
  29072. color: #060e17;
  29073. line-height: 25px;
  29074. font-size: 16px;
  29075. }
  29076. .navStage .nt_taskName {
  29077. max-width: calc(100% - 82px);
  29078. white-space: nowrap;
  29079. overflow: hidden;
  29080. text-overflow: ellipsis;
  29081. font-size: 16px;
  29082. color: #060e17;
  29083. }
  29084. .navTask {
  29085. display: flex;
  29086. flex-direction: row;
  29087. flex-wrap: nowrap;
  29088. align-items: center;
  29089. padding: 10px 10px 10px 0;
  29090. cursor: pointer;
  29091. background: #ffffff;
  29092. width: 95%;
  29093. margin: 5px auto 5px;
  29094. box-sizing: border-box;
  29095. border-radius: 5px;
  29096. flex-wrap: wrap;
  29097. position: relative;
  29098. }
  29099. .navTask .chapter_upload_open {
  29100. content: "";
  29101. display: block;
  29102. width: 16px;
  29103. height: 16px;
  29104. background-image: url(../../../assets/icon/new/icon_arrow.png);
  29105. background-size: 100%;
  29106. margin-left: 23px;
  29107. }
  29108. .noImage .chapter_upload_open {
  29109. display: none;
  29110. background-image: unset !important;
  29111. }
  29112. .isNavOpen .chapter_upload_open {
  29113. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  29114. transform: rotate(90deg);
  29115. }
  29116. .isNavTask .chapter_upload_open {
  29117. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  29118. transform: rotate(-90deg);
  29119. }
  29120. .isNavTask.isNavOpen .chapter_upload_open {
  29121. transform: rotate(0deg);
  29122. }
  29123. .dragOverTop {
  29124. border-top: 2px solid #0061ff !important;
  29125. border-radius: 0 !important;
  29126. margin-top: 10px;
  29127. }
  29128. .dragOverBottom {
  29129. border-bottom: 2px solid #0061ff !important;
  29130. border-radius: 0 !important;
  29131. margin-top: 10px;
  29132. }
  29133. .dragOverTop2 {
  29134. border-top: 2px solid #0061ff !important;
  29135. border-radius: 0 !important;
  29136. }
  29137. .dragOverBottom2 {
  29138. border-bottom: 2px solid #0061ff !important;
  29139. border-radius: 0 !important;
  29140. }
  29141. .isNavTask {
  29142. /* background: #3681FC; */
  29143. background: #eef3fb;
  29144. }
  29145. .isNavTask>.chapter_upload_drag {
  29146. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  29147. }
  29148. .isNavTask .nt_taskName {
  29149. /* color: #fff !important; */
  29150. font-weight: bold !important;
  29151. color: #0061ff !important;
  29152. }
  29153. .isNavTask .nt_taskTitle {
  29154. /* color: #AECCFE !important; */
  29155. font-weight: bold !important;
  29156. color: #0061ff !important;
  29157. }
  29158. .navTask .nt_taskBox {
  29159. width: calc(100% - 40px);
  29160. padding: 0 0 0 5px;
  29161. box-sizing: border-box;
  29162. box-sizing: border-box;
  29163. display: flex;
  29164. flex-direction: row;
  29165. flex-wrap: nowrap;
  29166. align-items: baseline;
  29167. }
  29168. .navTask .nt_taskTitle {
  29169. /* color: #717C8D; */
  29170. color: #060e17;
  29171. line-height: 25px;
  29172. font-size: 16px;
  29173. /* min-width: 66px; */
  29174. }
  29175. .navTask .nt_taskName {
  29176. /* color: #fff; */
  29177. /* max-width: 130px; */
  29178. /* width: 100%; */
  29179. max-width: calc(100% - 66px);
  29180. font-size: 16px;
  29181. color: #060e17;
  29182. /* color: #0E1E33; */
  29183. }
  29184. .navTask .nt_taskName span {
  29185. width: 100%;
  29186. white-space: nowrap;
  29187. overflow: hidden;
  29188. text-overflow: ellipsis;
  29189. display: block;
  29190. }
  29191. .gjBox {
  29192. width: calc(100% - 25px);
  29193. padding: 0 0 0 0;
  29194. box-sizing: border-box;
  29195. border-left: 1px solid #cad1dc;
  29196. margin-left: 25px;
  29197. }
  29198. .gjBox>div {
  29199. display: flex;
  29200. align-items: center;
  29201. }
  29202. .gjBox>div::before {
  29203. content: "";
  29204. height: 1px;
  29205. width: 10px;
  29206. background: #cad1dc;
  29207. display: block;
  29208. margin-right: 5px;
  29209. }
  29210. .gjCss {
  29211. display: flex;
  29212. flex-direction: row;
  29213. flex-wrap: nowrap;
  29214. align-items: center;
  29215. padding: 15px 0;
  29216. box-sizing: border-box;
  29217. font-size: 14px;
  29218. cursor: pointer;
  29219. }
  29220. .isGjCss {
  29221. color: #0061ff;
  29222. }
  29223. .groupBox {}
  29224. .groupContent+.groupContent {
  29225. margin-top: 30px;
  29226. }
  29227. .groupTitle {
  29228. font-size: 24px;
  29229. color: rgb(80, 80, 80);
  29230. margin-bottom: 20px;
  29231. }
  29232. .groupName {
  29233. display: flex;
  29234. align-items: center;
  29235. }
  29236. .groupn {
  29237. font-size: 15px;
  29238. margin-right: 10px;
  29239. }
  29240. .groupName+.groupName {
  29241. margin-top: 15px;
  29242. }
  29243. .groupBtn {
  29244. margin-left: 10px;
  29245. }
  29246. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  29247. text-align: left;
  29248. }
  29249. .radioBox>div {
  29250. margin: 10px 0 0 10px;
  29251. }
  29252. .radioBox>>>.el-radio__input,
  29253. .radioBox>>>.el-checkbox__inner {
  29254. margin-left: 10px;
  29255. }
  29256. .radioBox>>>.el-radio__label,
  29257. .radioBox>>>.el-checkbox__label {
  29258. display: flex;
  29259. align-items: center;
  29260. }
  29261. .inImg {
  29262. width: 50px;
  29263. }
  29264. .inImg>img {
  29265. width: 100%;
  29266. height: 100%;
  29267. object-fit: cover;
  29268. }
  29269. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  29270. height: auto;
  29271. padding: 10px;
  29272. margin: 0;
  29273. }
  29274. .upCss>>>.el-upload-list {
  29275. width: 100%;
  29276. }
  29277. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  29278. width: 100%;
  29279. height: 120px;
  29280. object-fit: contain;
  29281. background: unset;
  29282. margin-left: 0;
  29283. }
  29284. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  29285. display: none;
  29286. }
  29287. .tcMember+.tcMember::before {
  29288. content: "、";
  29289. }
  29290. .xzUpImg {
  29291. width: 25px;
  29292. height: 25px;
  29293. min-width: 25px;
  29294. min-height: 25px;
  29295. cursor: pointer;
  29296. margin: 0 10px;
  29297. }
  29298. .xzUpImg>img {
  29299. width: 100%;
  29300. height: 100%;
  29301. }
  29302. .closeCss {
  29303. position: absolute;
  29304. top: 8px;
  29305. right: 8px;
  29306. cursor: pointer;
  29307. width: 20px;
  29308. height: 20px;
  29309. }
  29310. .closeCss>img {
  29311. width: 100%;
  29312. height: 100%;
  29313. }
  29314. .moveBtn {
  29315. display: flex;
  29316. flex-direction: row;
  29317. flex-wrap: nowrap;
  29318. align-items: center;
  29319. width: 55px;
  29320. }
  29321. .timuUpImg {
  29322. display: flex;
  29323. flex-direction: row;
  29324. align-items: center;
  29325. width: 100%;
  29326. margin-right: 10px;
  29327. }
  29328. .timuUpImg>div:nth-child(1) {
  29329. margin-right: 10px;
  29330. display: flex;
  29331. align-items: center;
  29332. width: 100%;
  29333. }
  29334. .timuImgBox {
  29335. margin: 10px 0;
  29336. display: flex;
  29337. flex-direction: column;
  29338. flex-wrap: wrap;
  29339. align-items: flex-start;
  29340. }
  29341. .timuImg {
  29342. width: 100px;
  29343. margin: 5px 0;
  29344. cursor: pointer;
  29345. position: relative;
  29346. }
  29347. .timuImg:hover .deleteWord {
  29348. display: block;
  29349. }
  29350. .deleteWord {
  29351. width: 25px;
  29352. height: 25px;
  29353. position: absolute;
  29354. right: -5px;
  29355. top: -5px;
  29356. cursor: pointer;
  29357. display: none;
  29358. }
  29359. .timuImg>img,
  29360. .deleteWord>img {
  29361. width: 100%;
  29362. height: 100%;
  29363. object-fit: cover;
  29364. }
  29365. .e_add_delete {
  29366. cursor: pointer;
  29367. margin-left: 10px;
  29368. }
  29369. .pType_box {
  29370. margin: 15px 0;
  29371. align-items: flex-end;
  29372. }
  29373. .noneBox {
  29374. height: 200px;
  29375. width: 100%;
  29376. display: flex;
  29377. align-items: center;
  29378. justify-content: center;
  29379. flex-direction: column;
  29380. /* margin-top: 150px; */
  29381. }
  29382. .noneBox>img {
  29383. width: 95px;
  29384. }
  29385. .noneBox>span {
  29386. margin-top: 10px;
  29387. color: #717c8d;
  29388. }
  29389. .rb_c_box {
  29390. width: 100%;
  29391. height: 100%;
  29392. display: flex;
  29393. /* padding: 20px; */
  29394. box-sizing: border-box;
  29395. justify-content: space-between;
  29396. }
  29397. .rb_c_box_left {
  29398. height: 100%;
  29399. background: #fff;
  29400. width: 270px;
  29401. min-width: 270px;
  29402. border-radius: 8px;
  29403. margin-right: 10px;
  29404. }
  29405. .rb_c_box_right {
  29406. height: 100%;
  29407. width: calc(100%);
  29408. overflow: hidden;
  29409. }
  29410. .rb_c_box_btn {
  29411. display: flex;
  29412. justify-content: flex-start;
  29413. height: 50px;
  29414. align-items: center;
  29415. background: #fff;
  29416. padding: 0 20px;
  29417. border-radius: 10px 10px 0px 0px;
  29418. border-bottom: 1px solid #cad1dc;
  29419. }
  29420. .rb_c_box_btn > .title{
  29421. font-size: 24px;
  29422. font-weight: bold;
  29423. display: flex;
  29424. align-items: center;
  29425. }
  29426. .rb_c_box_btn > .title:before{
  29427. content: '';
  29428. background-image: url(../../../assets/icon/course/courseName.png);
  29429. width: 24px;
  29430. height: 24px;
  29431. background-size: 100% 100%;
  29432. margin-right: 10px;
  29433. }
  29434. .rb_c_box_right>.basic_box {
  29435. /* background: #fff; */
  29436. border-radius: 0;
  29437. height: calc(100% - 50px);
  29438. overflow: auto;
  29439. padding: 0;
  29440. }
  29441. .textarea_css {
  29442. display: block;
  29443. resize: none;
  29444. padding: 10px 15px;
  29445. line-height: 1.5;
  29446. box-sizing: border-box;
  29447. width: 100%;
  29448. font-size: 14px;
  29449. color: #606266;
  29450. background-color: #fff;
  29451. background-image: none;
  29452. border: 1px solid #dcdfe6;
  29453. border-radius: 4px;
  29454. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  29455. outline: none;
  29456. overflow: hidden;
  29457. height: 46px;
  29458. font-family: "Microsoft YaHei";
  29459. }
  29460. .textarea_css::-webkit-input-placeholder {
  29461. color: #c0c4cc;
  29462. }
  29463. .textarea_css:focus {
  29464. border-color: #409eff;
  29465. outline: 0;
  29466. }
  29467. .addEditor>>>.text {
  29468. height: auto;
  29469. min-height: 100px;
  29470. }
  29471. .addEditor>>>.w-e-text-container {
  29472. min-height: 100px;
  29473. }
  29474. .moveBtn2 {
  29475. flex-direction: column;
  29476. width: fit-content;
  29477. margin: 0 10px 0 10px;
  29478. }
  29479. .moveBtn2 .chapter_upload_down,
  29480. .moveBtn2 .chapter_upload_up {
  29481. width: 16px;
  29482. height: 16px;
  29483. }
  29484. .moveBtn2 .chapter_upload_up::after,
  29485. .moveBtn2 .chapter_upload_down::after {
  29486. width: 10px;
  29487. height: 10px;
  29488. }
  29489. .fullStyle>>>.el-dialog__body {
  29490. height: calc(100% - 125px) !important;
  29491. box-sizing: border-box;
  29492. }
  29493. .fullStyle1>>>.el-dialog__body {
  29494. height: auto !important;
  29495. }
  29496. .fullStyle>>>.el-dialog {
  29497. width: 100% !important;
  29498. max-width: 100% !important;
  29499. height: 100% !important;
  29500. margin: 0 !important;
  29501. }
  29502. .fullStyle {
  29503. width: 100% !important;
  29504. max-width: 100% !important;
  29505. height: 100% !important;
  29506. margin: 0 auto !important;
  29507. }
  29508. .wb_j_box_btn {
  29509. width: calc(100% - 30px);
  29510. display: flex;
  29511. height: 40px;
  29512. border: 1.5px solid #cad1dc;
  29513. border-radius: 4px;
  29514. box-sizing: border-box;
  29515. align-items: center;
  29516. font-size: 14px;
  29517. cursor: pointer;
  29518. overflow: hidden;
  29519. }
  29520. .wb_j_box_btn:hover {
  29521. border: 1.5px solid #0061ff;
  29522. }
  29523. .wb_j_box_title {
  29524. background: #f0f4fa;
  29525. height: 100%;
  29526. line-height: 40px;
  29527. /* width: 105px; */
  29528. min-width: 115px;
  29529. text-align: center;
  29530. color: #060e17;
  29531. border-right: 1.5px solid #cad1dc;
  29532. box-sizing: border-box;
  29533. }
  29534. .wb_j_box_btn_c {
  29535. width: calc(100% - 90px);
  29536. padding: 0 35px 0 10px;
  29537. box-sizing: border-box;
  29538. position: relative;
  29539. }
  29540. .wb_j_box_span {
  29541. width: 100%;
  29542. overflow: hidden;
  29543. white-space: nowrap;
  29544. text-overflow: ellipsis;
  29545. word-wrap: break-word;
  29546. color: #717c8d;
  29547. }
  29548. .wb_j_box_arrow {
  29549. content: "";
  29550. width: 14px;
  29551. height: 14px;
  29552. background: url(../../../assets/icon/new/u_arrow.png);
  29553. background-size: 100% 100%;
  29554. position: absolute;
  29555. right: 12px;
  29556. top: 50%;
  29557. transform: translateY(-50%);
  29558. }
  29559. .check_classBox {
  29560. height: 400px;
  29561. display: flex;
  29562. border-top: 1.5px solid #e7ebf1;
  29563. border-bottom: 1.5px solid #e7ebf1;
  29564. }
  29565. .check_class_right {
  29566. width: 130px;
  29567. border-right: 1px solid #e7ebf1;
  29568. display: flex;
  29569. align-items: center;
  29570. flex-direction: column;
  29571. height: 100%;
  29572. overflow: auto;
  29573. padding: 15px 0;
  29574. box-sizing: border-box;
  29575. }
  29576. .check_class {
  29577. width: 85%;
  29578. border-radius: 5px;
  29579. height: 30px;
  29580. min-height: 30px;
  29581. line-height: 30px;
  29582. text-align: center;
  29583. padding: 0 10px;
  29584. box-sizing: border-box;
  29585. cursor: pointer;
  29586. white-space: nowrap;
  29587. overflow: hidden;
  29588. text-overflow: ellipsis;
  29589. }
  29590. .check_class.activeX {
  29591. background: #e0eafb;
  29592. color: #3681fc;
  29593. font-weight: 700;
  29594. }
  29595. .check_class+.check_class {
  29596. margin-top: 15px;
  29597. }
  29598. .check_class_left {
  29599. background: #fafafa;
  29600. width: calc(100% - 130px);
  29601. padding: 15px;
  29602. box-sizing: border-box;
  29603. }
  29604. .check_class_all_box {
  29605. display: flex;
  29606. margin-bottom: 10px;
  29607. }
  29608. .all_check {
  29609. display: flex;
  29610. align-items: center;
  29611. padding: 2px 0 0;
  29612. margin-left: 10px;
  29613. }
  29614. .all_check>>>.el-checkbox__label {
  29615. line-height: 18px;
  29616. }
  29617. .check_class_left_title {
  29618. font-size: 16px;
  29619. font-weight: 700;
  29620. }
  29621. .check_class_item {
  29622. display: flex;
  29623. flex-wrap: wrap;
  29624. height: calc(100% - 45px);
  29625. overflow: auto;
  29626. justify-content: flex-start;
  29627. align-items: flex-start;
  29628. align-content: flex-start;
  29629. }
  29630. .class_item:first-child {
  29631. /* margin: 0 15px 15px 67px; */
  29632. }
  29633. .class_item {
  29634. margin: 0 15px 15px 0;
  29635. }
  29636. .class_item:hover>>>.el-checkbox__label {
  29637. color: #409eff;
  29638. }
  29639. .class_item>>>.el-checkbox__label {
  29640. color: #0e1e33;
  29641. }
  29642. .class_item:hover>>>.el-checkbox__inner {
  29643. border-color: #409eff;
  29644. }
  29645. .class_item>>>.el-checkbox,
  29646. .class_item>>>.el-checkbox__input {
  29647. display: flex;
  29648. align-items: center;
  29649. }
  29650. .taskTitle {
  29651. font-size: 20px;
  29652. font-weight: bold;
  29653. margin-bottom: 35px;
  29654. }
  29655. .taskTitle:after {
  29656. content: "";
  29657. width: 100%;
  29658. display: block;
  29659. height: 1px;
  29660. background: #cad1dc;
  29661. position: absolute;
  29662. left: 0;
  29663. margin: 15px 0 0;
  29664. }
  29665. .eva_btn_box {
  29666. margin: 20px 0px 0 0;
  29667. display: flex;
  29668. flex-direction: row;
  29669. flex-wrap: nowrap;
  29670. align-items: center;
  29671. justify-content: space-between;
  29672. width: 100%;
  29673. }
  29674. .eva_btn_left_box {
  29675. display: flex;
  29676. flex-direction: row;
  29677. flex-wrap: nowrap;
  29678. align-items: center;
  29679. }
  29680. .addTypeChoose {
  29681. display: flex;
  29682. flex-direction: row;
  29683. flex-wrap: nowrap;
  29684. align-items: center;
  29685. margin: 15px 0;
  29686. }
  29687. .addTypeBox {
  29688. display: flex;
  29689. flex-direction: column;
  29690. flex-wrap: nowrap;
  29691. align-items: center;
  29692. }
  29693. .addTypeChoose {
  29694. display: flex;
  29695. flex-direction: row;
  29696. flex-wrap: nowrap;
  29697. align-items: center;
  29698. margin: 15px 0;
  29699. }
  29700. .buchong_box {
  29701. background: #E0EAFB66;
  29702. width: calc(100% - 20px);
  29703. min-height: 50px;
  29704. display: flex;
  29705. align-items: center;
  29706. justify-content: center;
  29707. margin: 0 auto;
  29708. }
  29709. .outline {
  29710. width: calc(100% - 40px);
  29711. margin: 0 auto;
  29712. }
  29713. .task_outline {
  29714. width: calc(100% - 40px);
  29715. margin: 0 auto;
  29716. }
  29717. .outline_box+.outline_box {
  29718. margin: 30px 0 0px;
  29719. }
  29720. .outline_task {
  29721. display: flex;
  29722. align-items: center;
  29723. margin-bottom: 10px;
  29724. }
  29725. .outline_btn{
  29726. display: flex;
  29727. align-items: center;
  29728. min-width: fit-content;
  29729. margin-left: 10px;
  29730. }
  29731. .outline_task .title {
  29732. font-size: 18px;
  29733. font-weight: bold;
  29734. min-width: 80px;
  29735. }
  29736. .op_task_box,
  29737. .op_tool_box,
  29738. .outline_detail {
  29739. position: relative;
  29740. }
  29741. .op_task_box:hover .op_box,
  29742. .op_tool_box:hover .op_box,
  29743. .outline_detail:hover .op_box {
  29744. display: flex
  29745. }
  29746. .op_box {
  29747. position: absolute;
  29748. bottom: 10px;
  29749. display: none;
  29750. align-items: center;
  29751. justify-content: space-between;
  29752. width: calc(100% - 20px);
  29753. left: 50%;
  29754. transform: translateX(-50%);
  29755. }
  29756. .op_box .op_remark {
  29757. color: #8E8E8E;
  29758. font-size: 14px;
  29759. }
  29760. .op_box_right{
  29761. display: flex;
  29762. }
  29763. .op_box_isquote{
  29764. display: flex;
  29765. }
  29766. .op_box_isquote *{
  29767. display: none;
  29768. }
  29769. .op_box_isquote .op_box_right,
  29770. .op_box_isquote .custom-switch{
  29771. display: flex;
  29772. margin-left: auto;
  29773. }
  29774. .op_task_box:hover .op_box_isquote *{
  29775. display: flex;
  29776. }
  29777. .op_task_box:hover .op_box_isquote .op_box_right,
  29778. .op_task_box:hover .op_box_isquote .custom-switch{
  29779. display: flex;
  29780. margin-left: unset;
  29781. }
  29782. .rb_c_nav {
  29783. width: calc(100% - 20px);
  29784. margin: 15px auto 0;
  29785. font-size: 18px;
  29786. display: flex;
  29787. align-items: center;
  29788. }
  29789. .rb_c_nav span {
  29790. cursor: pointer;
  29791. }
  29792. .rb_c_nav span+span {
  29793. margin-left: 10px;
  29794. }
  29795. .rb_c_nav span.active {
  29796. color: #0061FF
  29797. }
  29798. .text_panel>>>.text {
  29799. height: 400px;
  29800. }
  29801. .markBox{
  29802. padding: 20px 14px;
  29803. line-height: 29px;
  29804. font-size: 16px;
  29805. background: #f4f4f4;
  29806. border-radius: 5px;
  29807. word-break: break-word;
  29808. }
  29809. .info_box_t {
  29810. display: flex;
  29811. align-items: center;
  29812. flex-wrap: wrap;
  29813. }
  29814. .info_box_t + .info_box_t {
  29815. margin-top: 10px;
  29816. }
  29817. .info_box_t_box {
  29818. display: flex;
  29819. align-items: center;
  29820. flex-wrap: wrap;
  29821. margin-bottom: 5px;
  29822. }
  29823. .info_box_t_box + .info_box_t_box{
  29824. margin-left: 10px;
  29825. }
  29826. .info_box_t_box > span{
  29827. width: fit-content;
  29828. font-weight: bold;
  29829. font-size: 14px;
  29830. }
  29831. .info_box_t_box > input{
  29832. width: 150px !important;
  29833. margin: 0 5px 0 0;
  29834. }
  29835. .info_radio >>> .el-radio, .el-radio__input{
  29836. line-height: 18px;
  29837. height: 18px;
  29838. }
  29839. .mode_box{
  29840. display: flex;
  29841. align-items: center;
  29842. }
  29843. .mode_box > span{
  29844. padding: 0px 5px;
  29845. cursor: pointer;
  29846. }
  29847. .mode_box > span.active{
  29848. color: #409eff;
  29849. }
  29850. .chapter_upload_check {
  29851. width: 15px;
  29852. height: 15px;
  29853. min-width: 15px;
  29854. min-height: 15px;
  29855. cursor: pointer;
  29856. background-image: url('../../../assets/icon/check.png');
  29857. background-size: 100% 100%;
  29858. }
  29859. .chapter_upload_check.checked{
  29860. background-image: url('../../../assets/icon/checked.png');
  29861. }
  29862. .ruleBtn {
  29863. width: fit-content;
  29864. height: 36px;
  29865. line-height: 36px;
  29866. cursor: pointer;
  29867. color: #0061FF;
  29868. }
  29869. .stopBtn{
  29870. z-index: 999999;
  29871. position: absolute;
  29872. left: 50%;
  29873. top: calc(50% + 70px);
  29874. transform: translateX(-50%);
  29875. }
  29876. .rateSwitch >>> .el-switch__label.is-active {
  29877. color: #0061FF;
  29878. }
  29879. .rateSwitch >>> .el-switch__label--right{
  29880. display: flex;
  29881. align-items: center;
  29882. }
  29883. .rateSwitch >>> .el-switch__label--right::before{
  29884. content: "";
  29885. width: 14px;
  29886. height: 14px;
  29887. min-width: 14px;
  29888. min-height: 14px;
  29889. background-size: 100% 100%;
  29890. display: block;
  29891. margin-right: 7px;
  29892. background-image: url(../../../assets/icon/new/u_op2.png);
  29893. }
  29894. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29895. background-image: url(../../../assets/icon/new/u_op.png);
  29896. }
  29897. .inter_box{
  29898. min-width: calc(50%);
  29899. min-height: 500px;
  29900. margin-right: 10px;
  29901. border: 1px solid #c7c7c7;
  29902. border-radius: 0px 5px 5px 5px;
  29903. overflow: hidden;
  29904. position: relative;
  29905. box-sizing: border-box;
  29906. }
  29907. .inter_box::before{
  29908. content:'对话区';
  29909. position: absolute;
  29910. left: 0;
  29911. top: 0;
  29912. display: block;
  29913. padding: 8px 10px;
  29914. background: #e0eafb;
  29915. color: #98a0ac;
  29916. font-size: 14px;
  29917. border-radius: 0 15px 15px 0;
  29918. }
  29919. .inter_voiceBox,
  29920. .inter_Detailbox{
  29921. border: 1px solid #c7c7c7;
  29922. border-radius: 0px 5px 5px 5px;
  29923. overflow: hidden;
  29924. position: relative;
  29925. box-sizing: border-box;
  29926. }
  29927. .inter_Detailbox::before{
  29928. content:'编辑区';
  29929. position: absolute;
  29930. left: 0;
  29931. top: 0;
  29932. display: block;
  29933. padding: 8px 10px;
  29934. background: #e0eafb;
  29935. color: #98a0ac;
  29936. font-size: 14px;
  29937. border-radius: 0 15px 15px 0;
  29938. }
  29939. .inter_voiceBox::before{
  29940. content:'录音区';
  29941. position: absolute;
  29942. left: 0;
  29943. top: 0;
  29944. display: block;
  29945. padding: 8px 10px;
  29946. background: #e0eafb;
  29947. color: #98a0ac;
  29948. font-size: 14px;
  29949. border-radius: 0 15px 15px 0;
  29950. z-index: 999;
  29951. }
  29952. .inter_box > iframe{
  29953. width: 100%;
  29954. height: 100%;
  29955. border: none;
  29956. }
  29957. .inter_setting{
  29958. display: block;
  29959. background-image: url(../../../assets/icon/course/setting.svg);
  29960. background-size: 100% 100%;
  29961. width: 20px;
  29962. height: 20px;
  29963. cursor: pointer;
  29964. margin-left: 10px;
  29965. }
  29966. .inter_setting_panel{
  29967. position: absolute;
  29968. left: 110px;
  29969. top: 30px;
  29970. background: #fff;
  29971. border-radius: 5px;
  29972. box-shadow: 0px 0px 2px 1px #00000017;
  29973. padding: 10px;
  29974. z-index: 999;
  29975. }
  29976. .panel_title{
  29977. text-align: center;
  29978. font-size: 18px;
  29979. margin-bottom: 10px;
  29980. }
  29981. .panel_tips{
  29982. font-weight: 500;
  29983. font-size: 14px;
  29984. text-align: center;
  29985. margin-bottom: 10px;
  29986. color: #6d6d6d;
  29987. }
  29988. .panel_input{
  29989. margin-bottom: 10px;
  29990. }
  29991. .panel_button{
  29992. display: flex;
  29993. justify-content: space-between;
  29994. }
  29995. .panel_input_record {
  29996. margin-top: 10px;
  29997. }
  29998. .panel_input_record > span{
  29999. margin-bottom: 5px;
  30000. display: block;
  30001. }
  30002. .custom-switch >>> .el-switch__label.is-active {
  30003. color: #0061FF;
  30004. }
  30005. .close_btn{
  30006. position: absolute;
  30007. top: 40px;
  30008. right: 10px;
  30009. box-shadow: 0 0 4px 2px #00000033;
  30010. border-radius: 70px 0 0 70px;
  30011. display: flex;
  30012. align-items: center;
  30013. padding-left: 5px;
  30014. padding: 10px 7px 10px 12px;
  30015. background: #fff;
  30016. cursor: pointer;
  30017. }
  30018. .close_btn > img {
  30019. width: 15px;
  30020. transition: 0.3s;
  30021. transform: rotate(0deg);
  30022. }
  30023. .close_btn_voice > img{
  30024. transform: rotate(180deg);
  30025. }
  30026. .resizable {
  30027. position: relative;
  30028. min-width: 350px; /* 最小宽度 */
  30029. max-width: 50%; /* 最大宽度 */
  30030. }
  30031. .resizer {
  30032. width: 12.8px;
  30033. height: 28.8px;
  30034. /* background: #ccc; */
  30035. position: absolute;
  30036. top: 50%;
  30037. left: 0;
  30038. cursor: ew-resize;
  30039. transform: translateY(-50%);
  30040. /* border-radius: 43px; */
  30041. background-image: url(../../../assets/icon/course/course_slide.png);
  30042. background-size: 100% 100%;
  30043. }
  30044. .pptBox{
  30045. position: fixed;
  30046. bottom: 10px;
  30047. left: 20px;
  30048. padding: 10px;
  30049. }
  30050. .pptBox > .box > div + div{
  30051. margin-top: 10px;
  30052. }
  30053. .ppClass{
  30054. background: #fff;
  30055. border-radius: 5px;
  30056. box-shadow: 0 0 6px 3px #00000030;
  30057. overflow: hidden;
  30058. }
  30059. .file-loading-class >>> .el-loading-spinner{
  30060. margin-top: -10px;
  30061. }
  30062. .file-loading-class >>> .el-loading-spinner .circular{
  30063. height: 20px;
  30064. width: 20px;
  30065. }
  30066. .button-toggle {
  30067. color: #007bff; /* 文本颜色 */
  30068. cursor: pointer; /* 鼠标悬停时显示手型 */
  30069. transition: color 0.2s; /* 文字颜色过渡效果 */
  30070. font-size: 14px;
  30071. }
  30072. .button-toggle:hover {
  30073. color: #0056b3; /* 悬停时的文字颜色 */
  30074. }
  30075. .button-toggle:focus {
  30076. outline: none; /* 去掉聚焦时的边框 */
  30077. }
  30078. .right_icon{
  30079. width: 12px;
  30080. height: 12px;
  30081. margin-left: 5px;
  30082. }
  30083. .buttonBoxB{
  30084. position: relative;
  30085. margin: 0 0 0 10px;
  30086. }
  30087. .buttonBoxB::after{
  30088. content: '';
  30089. display: block;
  30090. background-image: url(../../../assets/icon/course/downArrow.svg);
  30091. background-size: 100% 100%;
  30092. width: 15px;
  30093. height: 15px;
  30094. cursor: pointer;
  30095. margin-left: 5px;
  30096. }
  30097. .buttonBoxB:hover .buttonBox{
  30098. display: block;
  30099. }
  30100. .buttonBox {
  30101. position: absolute;
  30102. bottom: -0;
  30103. left: 0;
  30104. transform: translateY(100%);
  30105. background: #fff;
  30106. border-radius: 5px;
  30107. box-shadow: 0 0 3px 1px #e3e3e3;
  30108. width: 155px;
  30109. display: none;
  30110. z-index: 99999;
  30111. }
  30112. .buttonBox>div {
  30113. height: 40px;
  30114. line-height: 40px;
  30115. width: 100%;
  30116. text-align: center;
  30117. color: #000;
  30118. box-sizing: border-box;
  30119. }
  30120. .buttonBox>div+div {
  30121. border-top: 1px solid #e0e0e0;
  30122. }
  30123. .buttonBox>div:hover {
  30124. background: #f6f8ff;
  30125. }
  30126. .appendix_info_title {
  30127. padding: 15px 0 15px 0;
  30128. font-size: 20px;
  30129. font-weight: bold;
  30130. margin: 0 0 0 20px;
  30131. box-sizing: border-box;
  30132. display: flex;
  30133. align-items: center;
  30134. line-height: 20px;
  30135. }
  30136. .appendix_file_box{
  30137. width: 100%
  30138. }
  30139. .appendix_check_box{}
  30140. .appendix_check_box > div + div{
  30141. margin-top: 10px;
  30142. }
  30143. .appendix_check_task{
  30144. display: flex;
  30145. align-items: center;
  30146. }
  30147. .appendix_check_type{
  30148. display: flex;
  30149. align-items: center;
  30150. }
  30151. .appendix_check_task > span,
  30152. .appendix_check_type > span{
  30153. width: 100px;
  30154. }
  30155. .appendix_check_task > .checkButton,
  30156. .appendix_check_type > .checkButton{
  30157. border: 1px solid #1684fc;
  30158. color: #1684fc;
  30159. padding: 5px 10px;
  30160. border-radius: 5px;
  30161. margin-right: 10px;
  30162. cursor: pointer;
  30163. }
  30164. .appendix_check_task > .checkButton.checked,
  30165. .appendix_check_type > .checkButton.checked{
  30166. background: #1684fc;
  30167. color: #fff;
  30168. }
  30169. .appendix_check_all_box{
  30170. display: flex;
  30171. align-items: center;
  30172. margin-bottom: 5px;
  30173. }
  30174. .appendix_check_all{
  30175. display: flex;
  30176. align-items: center;
  30177. cursor: pointer;
  30178. }
  30179. .appendix_check_all_text{
  30180. margin-left: 5px;
  30181. }
  30182. .know_serach_box{
  30183. margin-bottom: 20px;
  30184. display: flex;
  30185. align-items: center;
  30186. }
  30187. .know_serach_box > span{
  30188. min-width: 100px;
  30189. flex-shrink: 0;
  30190. }
  30191. .know_serach_box > .c_pub_button_add{
  30192. min-width: fit-content;
  30193. }
  30194. .add_chapters_check_box{
  30195. display: flex;
  30196. align-items: center;
  30197. height: 50px;
  30198. }
  30199. .add_chapters_check{
  30200. display: flex;
  30201. align-items: center;
  30202. cursor: pointer;
  30203. }
  30204. .Ovh{
  30205. width: 4em;
  30206. -webkit-line-clamp: 2;
  30207. text-align: center;
  30208. display: -webkit-box;
  30209. -webkit-box-orient: vertical;
  30210. overflow: hidden;
  30211. text-overflow: ellipsis;
  30212. }
  30213. </style>