addCourse.vue 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560
  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.ssConfirmUpload : !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.ssConfirmUpload : ((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.ssConfirmUpload : !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.ssConfirmUpload : 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.ssConfirmUpload : 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.ssConfirmUpload : 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. <div style="display: flex;">
  7235. <span style="min-width: 100px; text-align: right">{{ lang.ssEvaCriteria }}</span>
  7236. <input type="input" v-model="eItem.value" :placeholder="lang.ssFillEvaDim" />
  7237. <div class="remove" @click="deletRateList(eIndex)"></div>
  7238. </div>
  7239. <div style="width: 100%; display: flex">
  7240. <span style="min-width: 100px; text-align: right">{{ lang.ssRatingLevel }}</span>
  7241. <el-rate v-model="eItem.score" disabled></el-rate>
  7242. </div>
  7243. <div class="elist_inptu_text" style="align-items: flex-start">
  7244. <span style="min-width: 100px; text-align: right">{{ lang.ssDesc }}</span>
  7245. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" :placeholder="lang.ssFillDimDesc"></textarea>
  7246. </div>
  7247. </div>
  7248. </div>
  7249. <div class="addToolFun" @click="addRateList()">
  7250. <div class="addToolImg">
  7251. <img src="../../../assets/icon/add.png" alt />
  7252. </div>
  7253. <div>{{ lang.ssAdd }}</div>
  7254. </div>
  7255. </div>
  7256. </div>
  7257. <span slot="footer" class="dialog-footer">
  7258. <el-button @click="dialogVisibleRate = false">{{ lang.ssCancel }}</el-button>
  7259. <el-button type="primary" @click="addRateAnswer">{{ lang.ssConfirm }}</el-button>
  7260. </span>
  7261. </el-dialog>
  7262. <el-dialog :title="lang.ssSortSet" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7263. closePan(47);
  7264. }
  7265. " class="dialog_diy dialog_diy3 fullStyle">
  7266. <div style="height: 100%">
  7267. <div class="sentenBox" style="height: 100%">
  7268. <div class="addSen" @click="addSt">{{ lang.ssAddQues2 }}</div>
  7269. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7270. <div class="sentenTopBox">
  7271. <div class="sentenTop" :index="stIndex + 1">
  7272. <div>{{ lang.ssQuesSet }}</div>
  7273. <div>
  7274. <el-input :placeholder="lang.ssEnterCard" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7275. </div>
  7276. <div @click="addSen(stIndex)">{{ lang.ssAdd }}</div>
  7277. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7278. </div>
  7279. </div>
  7280. <div class="cardList">
  7281. <div v-if="st.addSentence.length > 0" class="cardBox">
  7282. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7283. @click="setRightAnswer(s, stIndex, sIndex)">
  7284. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7285. <div>{{ s }}</div>
  7286. </el-tooltip>
  7287. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7288. <img src="../../../assets/icon/delete.png" alt="" />
  7289. </div>
  7290. </div>
  7291. </div>
  7292. <div class="card">
  7293. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7294. </div>
  7295. </div>
  7296. <div class="rightCardBox">
  7297. <div>{{ lang.ssCorrectOrder }}</div>
  7298. <div class="rightCardList">
  7299. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7300. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7301. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7302. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7303. <div>{{ r }}</div>
  7304. </el-tooltip>
  7305. </div>
  7306. <div>{{ rIndex + 1 }}</div>
  7307. </div>
  7308. </div>
  7309. <div class="card" v-if="st.rightAnswer.length == 0">
  7310. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7311. </div>
  7312. <div class="card" v-else>
  7313. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7314. </div>
  7315. </div>
  7316. </div>
  7317. </div>
  7318. </div>
  7319. </div>
  7320. <span slot="footer" class="dialog-footer">
  7321. <el-button @click="closePan(47)">{{ lang.ssCancel }}</el-button>
  7322. <el-button type="primary" @click="addSentenceTool">{{ lang.ssConfirm }}</el-button>
  7323. </span>
  7324. </el-dialog>
  7325. <el-dialog :title="lang.ssAddTable" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7326. :before-close="handleClose" class="dialog_diy">
  7327. <el-form>
  7328. <!-- <el-form-item label="文本标题">
  7329. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7330. </el-form-item> -->
  7331. <div>{{ lang.ssTableContent }}</div>
  7332. <Table v-model="tableJson.text" @change="change"></Table>
  7333. </el-form>
  7334. <span slot="footer" class="dialog-footer">
  7335. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7336. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7337. <el-button type="primary" @click="addTableJson">{{ lang.ssUploadTemp }}</el-button>
  7338. </span>
  7339. </el-dialog>
  7340. <el-dialog :title="lang.ssAddDoc" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7341. :before-close="handleClose" class="dialog_diy">
  7342. <el-form>
  7343. <!-- <el-form-item label="文本标题">
  7344. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7345. </el-form-item> -->
  7346. <div>{{ lang.ssDocContent }}</div>
  7347. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7348. </el-form>
  7349. <span slot="footer" class="dialog-footer">
  7350. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7351. <el-button type="primary" @click="addWordJson">{{ lang.ssUploadTemp }}</el-button>
  7352. </span>
  7353. </el-dialog>
  7354. <el-dialog :title="lang.ssAddClass" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7355. :before-close="handleClose" class="dialog_diy">
  7356. <div style="
  7357. width: 100%;
  7358. display: flex;
  7359. flex-direction: row;
  7360. flex-wrap: nowrap;
  7361. align-items: center;
  7362. justify-content: center;
  7363. ">
  7364. <div>{{ lang.ssClassColon }}</div>
  7365. <el-select multiple v-model="uploadJson" :placeholder="lang.ssSelect">
  7366. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7367. </el-option>
  7368. </el-select>
  7369. </div>
  7370. <span slot="footer" class="dialog-footer">
  7371. <el-button @click="dialogVisibleMoreUpload = false">{{ lang.ssCancel }}</el-button>
  7372. <el-button type="primary" @click="addMoreUpload">{{ lang.ssConfirm }}</el-button>
  7373. </span>
  7374. </el-dialog>
  7375. <el-dialog :title="lang.ssSetRandom" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7376. :before-close="handleClose" class="dialog_diy">
  7377. <div style="
  7378. width: 100%;
  7379. display: flex;
  7380. flex-direction: row;
  7381. flex-wrap: nowrap;
  7382. align-items: center;
  7383. justify-content: center;
  7384. ">
  7385. <div>{{ lang.ssRandomColon }}</div>
  7386. <el-input v-model="icode" style="width: 240px" :placeholder="lang.ssEnterRandom"></el-input>
  7387. </div>
  7388. <span slot="footer" class="dialog-footer">
  7389. <el-button @click="dialogVisibleInvite = false">{{ lang.ssCancel }}</el-button>
  7390. <el-button type="primary" @click="addInvite">{{ lang.ssConfirm }}</el-button>
  7391. </span>
  7392. </el-dialog>
  7393. <el-dialog :title="lang.ssAddPreTime" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7394. :before-close="handleClose" class="dialog_diy">
  7395. <div>
  7396. <div style="margin-bottom: 20px; color: #999">
  7397. {{ lang.ssTipClick }}
  7398. </div>
  7399. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7400. </div>
  7401. <span slot="footer" class="dialog-footer">
  7402. <el-button @click="dialogVisiblePreTime = false">{{ lang.ssCancel }}</el-button>
  7403. <el-button type="primary" @click="addPreTime">{{ lang.ssConfirm }}</el-button>
  7404. </span>
  7405. </el-dialog>
  7406. <el-dialog :title="lang.ssImportTarget" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7407. :before-close="handleClose" class="dialog_diy">
  7408. <div>
  7409. <div style="
  7410. width: 100%;
  7411. display: flex;
  7412. flex-direction: row;
  7413. flex-wrap: nowrap;
  7414. align-content: center;
  7415. align-items: center;
  7416. justify-content: space-between;
  7417. ">
  7418. <div style="
  7419. display: flex;
  7420. flex-flow: row nowrap;
  7421. align-items: flex-start;
  7422. width: 100%;
  7423. flex-direction: column;
  7424. flex-wrap: nowrap;
  7425. position: relative;
  7426. ">
  7427. <div class="e_box">
  7428. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7429. <div class="e_card_picture">
  7430. <img src="../../../assets/e_picture.png" />
  7431. </div>
  7432. <div class="e_card_name">
  7433. <span>{{ item.title }}</span>
  7434. </div>
  7435. <div class="e_card_btn">
  7436. <span @click="checkEva(item.id, 2)">导入</span>
  7437. </div>
  7438. </div> -->
  7439. <!-- <div class="addEva" @click="openT">
  7440. <img src="../../../assets/icon/addEva.png" alt="" />
  7441. </div> -->
  7442. <div style="
  7443. display: flex;
  7444. justify-content: flex-end;
  7445. margin-bottom: 10px;
  7446. ">
  7447. <el-button @click="openT" type="primary" size="small">{{ lang.ssAddTarget }}</el-button>
  7448. </div>
  7449. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7450. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7451. <el-table-column :label="lang.ssTargetName" min-width="15" align="center" prop="title">
  7452. </el-table-column>
  7453. <el-table-column prop="username" :label="lang.ssOwner" min-width="15" align="center">
  7454. </el-table-column>
  7455. <el-table-column :label="lang.ssAction" width="250px">
  7456. <template slot-scope="scope">
  7457. <div class="btnBox">
  7458. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">{{ lang.ssImport }}</el-button>
  7459. </div>
  7460. </template>
  7461. </el-table-column>
  7462. </el-table>
  7463. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7464. {{ lang.ssNoData }}
  7465. </div>
  7466. </div>
  7467. </div>
  7468. </div>
  7469. </div>
  7470. <span slot="footer" class="dialog-footer">
  7471. <el-button @click="dialogVisiblemb = false">{{ lang.ssCancel }}</el-button>
  7472. </span>
  7473. </el-dialog>
  7474. <el-dialog :title="lang.ssGroupSet" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7475. :before-close="handleClose" class="dialog_diy">
  7476. <div class="groupBox">
  7477. <div v-if="groupJson.group" class="groupContent">
  7478. <div class="groupTitle">{{ lang.ssSetGroupNum }}</div>
  7479. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7480. <span class="groupn">{{ lang.ssGroupName.replace(/\*/g, index + 1) }}</span>
  7481. <el-input v-model="item.name" :placeholder="lang.ssEnterName2" style="width: 250px"></el-input>
  7482. <div class="groupBtn">
  7483. <el-button type="primary" size="small" @click="addGroup(index)"
  7484. v-if="groupJson.group.length - 1 == index">
  7485. {{ lang.ssAdd }}</el-button>
  7486. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7487. v-if="groupJson.group && groupJson.group.length > 1">{{ lang.ssDelete }}</el-button>
  7488. </div>
  7489. </div>
  7490. </div>
  7491. <div class="groupContent">
  7492. <div class="groupTitle">{{ lang.ssSetGroupPer }}</div>
  7493. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7494. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7495. <el-input v-model="groupJson.number" style="width: 150px" :placeholder="lang.ssEnterNum"
  7496. @change="numberPan"></el-input>
  7497. </div>
  7498. </div>
  7499. <span slot="footer" class="dialog-footer">
  7500. <el-button @click="dialogVisibleGroup = false">{{ lang.ssCancel }}</el-button>
  7501. <el-button type="primary" @click="addGroupJson">{{ lang.ssConfirm }}</el-button>
  7502. </span>
  7503. </el-dialog>
  7504. <el-dialog :title="lang.ssModifyName" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7505. :before-close="handleClose" class="dialog_diy">
  7506. <div style="
  7507. width: 100%;
  7508. display: flex;
  7509. flex-direction: row;
  7510. flex-wrap: nowrap;
  7511. align-items: center;
  7512. justify-content: center;
  7513. ">
  7514. <div style="min-width: fit-content">{{ lang.ssFileNameColon }}</div>
  7515. <el-input v-model="line" :placeholder="lang.ssEnterModify"></el-input>
  7516. </div>
  7517. <span slot="footer" class="dialog-footer">
  7518. <el-button @click="dialogVisibleupdataVideoT = false">{{ lang.ssCancel }}</el-button>
  7519. <el-button type="primary" @click="updataVideoC">{{ lang.ssConfirm }}</el-button>
  7520. </span>
  7521. </el-dialog>
  7522. <el-dialog :title="lang.ssCreateEssay" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7523. closePan(69);
  7524. }
  7525. " class="dialog_diy fullStyle fullStyle1">
  7526. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7527. <span slot="footer" class="dialog-footer">
  7528. <el-button @click="englishDialogVisible = false">{{ lang.ssCancel }}</el-button>
  7529. <el-button type="primary" @click="addEnglish">{{ lang.ssConfirm }}</el-button>
  7530. </span>
  7531. </el-dialog>
  7532. <el-dialog :title="lang.ssSelectTemp" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7533. :before-close="handleClose" class="dialog_diy">
  7534. <div class="template_box">
  7535. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7536. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7537. <div class="wordPic">
  7538. <img src="../../../assets/icon/new/course_template.png" alt />
  7539. </div>
  7540. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7541. <div style="
  7542. margin-top: 10px;
  7543. line-height: 19px;
  7544. overflow: hidden;
  7545. text-overflow: ellipsis;
  7546. white-space: nowrap;
  7547. padding: 0 10px;
  7548. box-sizing: border-box;
  7549. width: 100%;
  7550. ">
  7551. {{ aa.title }}
  7552. </div>
  7553. </el-tooltip>
  7554. </div>
  7555. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7556. :class="{ wordTeacherA: ctJson.id == 1 }">
  7557. <div class="wordPic">
  7558. <img src="../../../assets/icon/new/course_template.png" alt />
  7559. </div>
  7560. <div style="
  7561. margin-top: 10px;
  7562. line-height: 19px;
  7563. overflow: hidden;
  7564. text-overflow: ellipsis;
  7565. white-space: nowrap;
  7566. padding: 0 20px;
  7567. ">
  7568. {{ lang.ssSimpleTemp }}
  7569. </div>
  7570. </div>
  7571. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7572. :class="{ wordTeacherA: ctJson.id == 2 }">
  7573. <div class="wordPic">
  7574. <img src="../../../assets/icon/new/course_template.png" alt />
  7575. </div>
  7576. <div style="
  7577. margin-top: 10px;
  7578. line-height: 19px;
  7579. overflow: hidden;
  7580. text-overflow: ellipsis;
  7581. white-space: nowrap;
  7582. padding: 0 20px;
  7583. ">
  7584. {{ lang.ssSmartPaste }}
  7585. </div>
  7586. </div>
  7587. </div>
  7588. <span slot="footer" class="dialog-footer">
  7589. <el-button @click="templateDialog = false">{{ lang.ssCancel }}</el-button>
  7590. <el-button type="primary" @click="addTemplate(ctJson)">{{ lang.ssConfirm }}</el-button>
  7591. </span>
  7592. </el-dialog>
  7593. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7594. <el-dialog :title="lang.ssChangeStage" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7595. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7596. <div class="change_stageBox">
  7597. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7598. <div class="nt_taskBox">
  7599. <div class="nt_taskTitle">{{ lang.ssStage.replace(/\*/g, tIndex + 1) }}</div>
  7600. <div class="nt_taskName">
  7601. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7602. <span>{{ t.dyName }}</span>
  7603. </el-tooltip>
  7604. </div>
  7605. </div>
  7606. <div class="moveBtn" v-if="unitJson3.length > 1">
  7607. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7608. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7609. </div>
  7610. </div>
  7611. </div>
  7612. <span slot="footer" class="dialog-footer">
  7613. <el-button @click="dialogVisibleStageChange = false">{{ lang.ssCancel }}</el-button>
  7614. <el-button type="primary" @click="updateChange">{{ lang.ssConfirm }}</el-button>
  7615. </span>
  7616. </el-dialog>
  7617. <el-dialog :title="lang.ssAddResTemp" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7618. :before-close="handleClose" class="dialog_diy">
  7619. <div class="addTypeChoose" style="justify-content: center">
  7620. <div style="min-width: 100px">{{ lang.ssTempName }}</div>
  7621. <el-input v-model="templateName" style="width: 200px"></el-input>
  7622. </div>
  7623. <div class="addTypeBox">
  7624. <div class="addTypeChoose">
  7625. <div style="min-width: 100px">{{ lang.ssSelectOne }}</div>
  7626. <el-select v-model="setTypeJson.one" :placeholder="lang.ssSelect" @change="getTwoType(setTypeJson.one)"
  7627. style="width: 200px">
  7628. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7629. </el-option>
  7630. </el-select>
  7631. </div>
  7632. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7633. <div style="min-width: 100px">{{ lang.ssSelectTwo }}</div>
  7634. <el-select v-model="setTypeJson.two" :placeholder="lang.ssSelect" style="width: 200px">
  7635. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7636. </el-option>
  7637. </el-select>
  7638. </div>
  7639. </div>
  7640. <span slot="footer" class="dialog-footer">
  7641. <el-button type="primary" @click="addCETemplate()">{{ lang.ssConfirm2 }}</el-button>
  7642. <el-button @click="close()">{{ lang.ssClose }}</el-button>
  7643. </span>
  7644. </el-dialog>
  7645. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7646. </evaBox>
  7647. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7648. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7649. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7650. @aiConfirm="aiConfirm" :clickType="clickType">
  7651. </aiDialog>
  7652. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7653. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7654. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7655. <div class="box" v-show="pptBoxDialog">
  7656. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7657. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7658. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7659. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7660. :unitJson="unitJson" :ref="'ppt'+index"
  7661. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7662. </div>
  7663. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7664. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7665. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? lang.ssFold : lang.ssExpand }}</span>
  7666. </div>
  7667. <aiCreateVideoDialog v-if="lang.lang == 'cn'" :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7668. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7669. </aiCreateVideoDialog>
  7670. <aiCreateVideoDialogHK v-else :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7671. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7672. </aiCreateVideoDialogHK>
  7673. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7674. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7675. <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
  7676. <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
  7677. <selectHtmlPageDialog ref="selectHtmlPageDialogRef" @success="selectHtmlPageSuccess"/>
  7678. </div>
  7679. </template>
  7680. <script>
  7681. import "../../../common/aws-sdk-2.235.1.min.js";
  7682. import { tools as toolsData } from "../../../common/tools.js";
  7683. // import "../../../common/aws-sdk-2.99.0.min.js";
  7684. import $ from "jquery";
  7685. import EditorBar from "../../../components/tools/wangEnduit";
  7686. import Table from "../../../components/tools/table";
  7687. import Mind from "../../tools/jsmind2";
  7688. import Time from "../../tools/time.vue";
  7689. import Sunburst from "../../tools/sunburst";
  7690. import SeeBoard from "../../tools/seeBoard";
  7691. import weilaiData from "../components/weilai.js";
  7692. import sourceDialog from "../teacherSource/dialog.vue";
  7693. import interVideo from "../interVideo/index.vue";
  7694. import englishRight from "../components/englishRight.vue";
  7695. import evaBox from "../evaBox/index.vue";
  7696. import EnglishVoice from "../EnglishVoice/index.vue";
  7697. import aiBox from './aiBox.vue'
  7698. import aiBoxRight from './aiBoxRight.vue'
  7699. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7700. import recordV from './record.vue'
  7701. import aiDialog from './aiDialog'
  7702. import aiTips from './aiTips.vue'
  7703. import tipsDialog from './tipsDialog.vue'
  7704. import { v4 as uuidv4 } from "uuid";
  7705. import MarkdownIt from "markdown-it";
  7706. import aiCreateDialog from './aiCreateDialog.vue'
  7707. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7708. import aiCreateVideoDialogHK from './aiCreateVideoDialogHK.vue'
  7709. import wpdf from "../test/file/wPdf2.vue";
  7710. import wOffice from "../test/file/wOffice.vue";
  7711. import htmlDocx from "html-docx-js/dist/html-docx";
  7712. import TurndownService from 'turndown';
  7713. import JSZip from "jszip";
  7714. import evaList from "./evaList.vue";
  7715. import MindTask from "./jsmind2";
  7716. import ConvertApi from 'convertapi-js'
  7717. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7718. import appDialog from '../components/appDialog.vue'
  7719. import { myMixin } from "@/mixins/mixin.js"
  7720. import CodeEditor from "../components/CodeEditor";
  7721. import { uploadFileMixin } from "../../tools/uploadFileMixin.js";
  7722. var OpenCC = require("opencc-js");
  7723. let converter = OpenCC.Converter({
  7724. from:'hk',
  7725. to:'cn'
  7726. })
  7727. let converter2 = OpenCC.Converter({
  7728. from:'cn',
  7729. to:'hk'
  7730. })
  7731. import selectHtmlPageDialog from '../dialog/selectHtmlPageDialog.vue'
  7732. const getFile = (url) => {
  7733. return new Promise((resolve, reject) => {
  7734. var credentials = {
  7735. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7736. secretAccessKey: "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",
  7737. }; //秘钥形式的登录上传
  7738. window.AWS.config.update(credentials);
  7739. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7740. let url2 = url;
  7741. let _url2 = "";
  7742. if (
  7743. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7744. ) {
  7745. _url2 = url2.split(
  7746. "https://view.officeapps.live.com/op/view.aspx?src="
  7747. )[1];
  7748. } else {
  7749. _url2 = url2;
  7750. }
  7751. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7752. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7753. var params = {
  7754. Bucket: "ccrb",
  7755. Key: name
  7756. };
  7757. s3.getObject(params, function (err, data) {
  7758. if (err) {
  7759. console.log(err, err.stack)
  7760. resolve({ data: 1 });
  7761. }else {
  7762. resolve({ data: data.Body });
  7763. console.log(data);
  7764. } // sxuccessful response
  7765. });
  7766. });
  7767. };
  7768. export default {
  7769. mixins: [ myMixin,uploadFileMixin ],
  7770. components: {
  7771. CodeEditor,
  7772. EditorBar,
  7773. Mind,
  7774. Time,
  7775. Sunburst,
  7776. SeeBoard,
  7777. Table,
  7778. sourceDialog,
  7779. interVideo,
  7780. englishRight,
  7781. evaBox,
  7782. EnglishVoice,
  7783. aiBox,
  7784. aiBoxRight,
  7785. aiBoxCourseDetail,
  7786. aiDialog,
  7787. aiTips,
  7788. tipsDialog,
  7789. aiCreateDialog,
  7790. aiCreateVideoDialog,
  7791. aiCreateVideoDialogHK,
  7792. wpdf,
  7793. wOffice,
  7794. evaList,
  7795. MindTask,
  7796. recordV,
  7797. appDialog,
  7798. selectHtmlPageDialog
  7799. },
  7800. data() {
  7801. return {
  7802. gotype: (window.topU && window.topU.gotype) ? window.topU.gotype : '',
  7803. checkAll: false,
  7804. checkAll2: false,
  7805. chooseType: 1,
  7806. checkedCities: [],
  7807. isIndeterminate: true,
  7808. isIndeterminate2: true,
  7809. isSysPic: false,
  7810. isSysPic2: false,
  7811. steps: 1,
  7812. stepsNav: 1,
  7813. nbOrder: 0,
  7814. courseId: "",
  7815. chapToolsType: 0,
  7816. chapTools: [
  7817. {
  7818. tools: [],
  7819. toolDetail: "",
  7820. },
  7821. ],
  7822. line: "",
  7823. lineTitle: "",
  7824. sysPic: [],
  7825. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7826. sentenceList2: [],
  7827. isPushTitleList: [],
  7828. lineCount: 0,
  7829. lineType: 0,
  7830. chapCount: 0,
  7831. courseName: "",
  7832. isTeacherSee: false,
  7833. courseText: "",
  7834. textLoading: false,
  7835. ttextLoading: false,
  7836. courseText2: "",
  7837. preTime: 0,
  7838. formLabelWidth: "100px",
  7839. choosePicVisible: false,
  7840. sysPicVisible: false,
  7841. sysPicVisible2: false,
  7842. uploadLoading1: false,
  7843. noneBtnImg: false,
  7844. updateBoolean2: false,
  7845. unitIndex: 0,
  7846. taskCount: 0,
  7847. dialogVisible: false,
  7848. dialogVisible1: false,
  7849. dialogVisible2: false,
  7850. dialogVisible3: false,
  7851. dialogVisible4: false,
  7852. dialogVisible5: false,
  7853. dialogVisible6: false,
  7854. dialogVisible7: false,
  7855. dialogVisible8: false,
  7856. dialogVisible9: false,
  7857. dialogVisibleClass: false,
  7858. dialogVisibleMember: false,
  7859. dialogVisibleMp3: false,
  7860. dialogVisibleSelect: false,
  7861. dialogVisibleSentence: false,
  7862. dialogVisibleRate: false,
  7863. dialogVisibleChoice: false,
  7864. dialogVisiblemb: false,
  7865. dialogVisibleInvite: false,
  7866. dialogVisibleSource: false,
  7867. dialogVisibleVideo: false,
  7868. dialogVisibleStageChange: false,
  7869. dialogVisibleupdataVideoT: false,
  7870. englishDialogVisible: false,
  7871. templateDialog: false,
  7872. ctJson: {},
  7873. isClickColor: 1,
  7874. toolIndexType: "",
  7875. publicTool: 0,
  7876. searchPeople: "",
  7877. searchTN: "",
  7878. collid: '',
  7879. CollLoading: false,
  7880. userid: this.$route.query.userid,
  7881. oid: this.$route.query.oid,
  7882. org: this.$route.query.org,
  7883. role: this.$route.query.role,
  7884. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7885. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7886. dialogVisibleTable: false,
  7887. dialogVisibleWord: false,
  7888. tableJson: { text: "" },
  7889. wordJson: { text: "" },
  7890. dialogVisibleMoreUpload: false,
  7891. dialogVisiblePreTime: false,
  7892. uploadJson: [],
  7893. classJuri: [],
  7894. gradeList: [],
  7895. cover: [], //课程封面
  7896. myWord: [],
  7897. evaJuri: [],
  7898. evalua: "",
  7899. targetArray: [],
  7900. eTitle: "",
  7901. eJson: {},
  7902. fid: "", //一级
  7903. sid: "", //二级
  7904. tid: "", //二级
  7905. typeMode: 3,
  7906. eJSONNum: 0,
  7907. data: {
  7908. meta: {
  7909. name: "example",
  7910. author: "dd@163.com",
  7911. version: "0.2",
  7912. },
  7913. format: "node_array",
  7914. data: [{ id: "root", isroot: true, topic: "" }],
  7915. },
  7916. askJson: {
  7917. askCount: 1,
  7918. askTitle: "",
  7919. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7920. },
  7921. askJson2: {},
  7922. testJson: {},
  7923. testJson2: {},
  7924. selectJson: {},
  7925. selectJson2: {},
  7926. rateJson: [],
  7927. unitJson2: [],
  7928. unitJson3: [],
  7929. unitJson: [
  7930. {
  7931. dyName: "", //单元标题
  7932. chapterInfo: [
  7933. {
  7934. isread: false,
  7935. chapterid: this.guid(),
  7936. title: "",
  7937. courseName: "",
  7938. taskJson: [
  7939. {
  7940. task: "",
  7941. taskDetail: "",
  7942. chapterData: [],
  7943. toolText: "",
  7944. toolChoose: [
  7945. {
  7946. tool: [],
  7947. toolDetail: "",
  7948. toolType: 0,
  7949. askCount: 1,
  7950. askTitle: "",
  7951. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7952. },
  7953. ],
  7954. isShowTools: false,
  7955. askCount: 1,
  7956. isFold: 1,
  7957. askTitle: "",
  7958. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7959. checkJson: [{ checkCount: [], checkPerent: [] }],
  7960. homeworkList: [],
  7961. },
  7962. ],
  7963. itemCount: 1,
  7964. fileList1: [],
  7965. video: [],
  7966. testData: [],
  7967. pData: [],
  7968. templateArray: [],
  7969. },
  7970. ],
  7971. },
  7972. ],
  7973. templateArray: [],
  7974. studentJuri: [],
  7975. teacherJuri: [],
  7976. CollaborativeTeaList: [],
  7977. checkboxList: [],
  7978. checkboxList2: [],
  7979. checkboxList3: [],
  7980. classSearch: "",
  7981. gradeId: "",
  7982. number: "",
  7983. tTitle: "",
  7984. tdetail: "",
  7985. templateC: {},
  7986. AttText: {},
  7987. AttTextType: 0,
  7988. AttTextIndex: 0,
  7989. cTemplate: "",
  7990. CourseType: [],
  7991. CourseType1: [],
  7992. CourseType2: [],
  7993. CourseTypeJson: {},
  7994. CourseTypeJson1: {},
  7995. courseTypeId: [],
  7996. courseTypeId1: [],
  7997. courseTypeSon: [],
  7998. clearArray: [],
  7999. pTypeCheck: [],
  8000. pTypeCheckName: [],
  8001. loading: false,
  8002. toolType: 0,
  8003. inputShow: true,
  8004. inputShow2: true,
  8005. toolIndex: 0,
  8006. cidType: 0,
  8007. answerQ: "",
  8008. answerQ2: "",
  8009. grade: [],
  8010. grade2: [],
  8011. courseUserid: "",
  8012. timer: null,
  8013. timer2: null,
  8014. pasteTimer: null,
  8015. checkId: "",
  8016. isDelete: 1,
  8017. addindex: 0,
  8018. selectSteps: 1,
  8019. groupJson: {},
  8020. dialogVisibleGroup: false,
  8021. rightBoxHeight: 0,
  8022. ManAarray: [],
  8023. checkBoolean: false,
  8024. inviteCode: [],
  8025. inviteId: "",
  8026. icode: "",
  8027. easyArray: [2, 4],
  8028. sourceData: {},
  8029. updateSourcePan: false,
  8030. videoJson: {},
  8031. isBtnDisplay: false,
  8032. isStepDisplay: false,
  8033. isPasteStage: false,
  8034. isPasteTask: false,
  8035. isPasteChoice: false,
  8036. imageList: [],
  8037. imageloading: false,
  8038. imageloading2: false,
  8039. searchImageValue: "",
  8040. ppage: 1,
  8041. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  8042. oldIndex: 0,
  8043. dragType: "",
  8044. oldUnitIndex: 0,
  8045. oldData: null,
  8046. newIndex: "",
  8047. englishList: {},
  8048. typeIndex: "",
  8049. courseState: 5,
  8050. taskJSONa: [
  8051. {
  8052. task: "",
  8053. taskDetail: "",
  8054. chapterData: [],
  8055. toolText: "",
  8056. toolChoose: [
  8057. {
  8058. tool: [],
  8059. toolDetail: "",
  8060. toolType: 0,
  8061. askCount: 1,
  8062. askTitle: "",
  8063. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8064. },
  8065. ],
  8066. isShowTools: false,
  8067. askCount: 1,
  8068. isFold: 1,
  8069. askTitle: "",
  8070. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8071. checkJson: [{ checkCount: [], checkPerent: [] }],
  8072. homeworkList: [],
  8073. },
  8074. ],
  8075. checkUnitIndex: 0,
  8076. isdrag: "",
  8077. evaIndex: "",
  8078. evatIndex: "",
  8079. evaBoxDialog: false,
  8080. EnglishVoiceDialog: false,
  8081. englishVoiceJson: {},
  8082. cetIndex: "",
  8083. cettIndex: "",
  8084. cetBoxDialog: false,
  8085. templateName: "",
  8086. setTypeJson: {
  8087. one: "",
  8088. two: "",
  8089. },
  8090. twoJson: [],
  8091. oneJson: [],
  8092. updateKey: 1,
  8093. isOutline: false,
  8094. isOutline2: false,
  8095. infoData: [],
  8096. infoproVisible: false,
  8097. infoisFinishSize: 0,
  8098. infoisAllSize: 0,
  8099. infoprogress: 0,
  8100. taskDetailLoading: [],
  8101. ttaskDetailLoading: [],
  8102. taskDetailLoading2: [],
  8103. ttaskDetailLoading2: [],
  8104. taskDetailLoading3: [],
  8105. ttaskDetailLoading3: [],
  8106. taskDetailLoading4: [],
  8107. taskDetailLoading5: [],
  8108. ttaskDetailLoading5: [],
  8109. dArray: [],
  8110. dialogVisibleAiD: false,
  8111. aitype: "",
  8112. aiJson: {
  8113. "aiDetail": this.lang.ssAiDetail,
  8114. "aiOutline": this.lang.ssAiOutline2,
  8115. "aiTask": this.lang.ssAiTask,
  8116. "aiDetail1": this.lang.ssAiDetail1,
  8117. "aiDetail2": this.lang.ssAiDetail2Alt,//和任务名:<任务名>:<任务描述>
  8118. "aiDetail3": this.lang.ssAiDetail3,
  8119. "aiDetail4": this.lang.ssAiDetail4,
  8120. "aiTeacher": this.lang.ssAiTeacher2,
  8121. "teacherDetail": this.lang.ssTeacherDet2,
  8122. "teacherDetail2": this.lang.ssTeacherDet2Alt
  8123. },
  8124. aiText: "",
  8125. aiText2: "",
  8126. aiText3: "",
  8127. aiCallBack: "",
  8128. aiIndex: "",
  8129. clickType: 1,
  8130. promptShow: false,
  8131. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  8132. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  8133. dialogVisibleTips: false,
  8134. tipsJson: {},
  8135. cpote:{
  8136. cpote1: '',
  8137. cpote2: '',
  8138. cpote3: '',
  8139. cpote4: '',
  8140. },
  8141. cpoteLoading:{
  8142. cpote1: false,
  8143. cpote2: false,
  8144. cpote3: false,
  8145. cpote4: false,
  8146. },
  8147. cpotetLoading:{
  8148. cpote1: false,
  8149. cpote2: false,
  8150. cpote3: false,
  8151. cpote4: false,
  8152. },
  8153. cpoteType: 0,
  8154. dialogVisibleAiCreate: false,
  8155. dialogVisibleAiCreate2: [],
  8156. pptBoxDialog: true,
  8157. pptCount: [],
  8158. dialogVisibleAiCreateVideo: false,
  8159. teacherText: [],
  8160. isFileSearch: true,
  8161. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  8162. 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'],
  8163. courseJie:1,
  8164. courseTime:45,
  8165. allTextArray: [],
  8166. dialogVisiblePdf: false,
  8167. dialogVisibleOffice: false,
  8168. wurl: "",
  8169. choiceLoading: false,
  8170. teacherInfoData: [],
  8171. teacherinfoproVisible: false,
  8172. teacherinfoisFinishSize: 0,
  8173. teacherinfoisAllSize: 0,
  8174. teacherinfoprogress: 0,
  8175. teacherCourseText: "",
  8176. teacherTextLoading: false,
  8177. tteacherTextLoading: false,
  8178. targetCourseText: "",
  8179. targetTextLoading: false,
  8180. ttargetTextLoading: false,
  8181. cankaoInfoData: [],
  8182. fileSLoading: false,
  8183. infoData2: [],
  8184. isuseT: false,
  8185. mode: 1,
  8186. targetCourseText2: "",
  8187. targetTextLoading2: false,
  8188. ttargetTextLoading2: false,
  8189. courseTextBool: false,
  8190. teacherCourseTextB: true,
  8191. targetCourseTextB: true,
  8192. courseTextB: true,
  8193. targetCourseText2B: true,
  8194. // 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'],
  8195. yiKeTemplateArray:[],
  8196. taskLoading: [],
  8197. ruleLoading: [],
  8198. mubiaoInfoData: [],
  8199. mubiaoinfoproVisible: false,
  8200. mubiaoinfoisFinishSize: 0,
  8201. mubiaoinfoisAllSize: 0,
  8202. mubiaoinfoprogress: 0,
  8203. xuanzeInfoData: [],
  8204. xuanzeinfoproVisible: false,
  8205. xuanzeinfoisFinishSize: 0,
  8206. xuanzeinfoisAllSize: 0,
  8207. xuanzeinfoprogress: 0,
  8208. pingjiaInfoData: [],
  8209. pingjiainfoproVisible: [],
  8210. pingjiainfoisFinishSize: [],
  8211. pingjiainfoisAllSize: [],
  8212. pingjiainfoprogress: [],
  8213. taskGLoading: [],
  8214. ttaskGLoading: [],
  8215. isOutlineCancelToken: null,
  8216. isFileCancelToken: null,
  8217. isTargetCancelToken1: null,
  8218. isTargetCancelToken2: null,
  8219. isTextCancelToken: null,
  8220. isTeacherTextCancelToken: null,
  8221. isTeacherTaskCancelToken: null,
  8222. isOutlineTaskCancelToken: [],
  8223. isTeacherTaskCancelToken2: [],
  8224. isTeacherTaskCancelSource: [],
  8225. isTextCancelSource: null,
  8226. isOutlineTaskCancelSource: [],
  8227. isTeacherTextCancelSource: null,
  8228. isTargetCancelSource1: null,
  8229. isTargetCancelSource2: null,
  8230. fileidArray: [],
  8231. interPan: true,
  8232. interFlash: true,
  8233. agentid: "",
  8234. interSetting: false,
  8235. chatid: "",
  8236. languageSetting: 0, //0中文 1繁体 2英文
  8237. isQuote: {},
  8238. knowFileArray: [],
  8239. knowInfoData: [],
  8240. knowinfoproVisible: false,
  8241. knowinfoisFinishSize: 0,
  8242. knowinfoisAllSize: 0,
  8243. knowinfoprogress: 0,
  8244. knowFileids: [],
  8245. searchFileName: "",
  8246. knowInfoDataLoading: false,
  8247. isfindMatchingContents: null,
  8248. findMatchingContentsPage: 1,
  8249. findMatchingContentsFinish: false,
  8250. knowInfoData2: [],
  8251. knowinfoproVisible2: false,
  8252. knowinfoisFinishSize2: 0,
  8253. knowinfoisAllSize2: 0,
  8254. knowinfoprogress2: 0,
  8255. knowFileids2: [],
  8256. knowInfoData3: [],
  8257. knowFileids3: [],
  8258. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8259. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41, 72],
  8260. taskAnLoading: [],
  8261. taskAnCancelToken: [],
  8262. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8263. taskCancelToken1: [],
  8264. isTaskCancelSource1: [],
  8265. taskCancelToken2: [],
  8266. isDisplay: false,
  8267. isDialog: 0,
  8268. recordVideoText: "",
  8269. recordAudioUrl: "",
  8270. r_agentid: "",
  8271. course_info: "",
  8272. stepShow: true,
  8273. anLoading: [],
  8274. appendixFile: [],
  8275. appendixPan: true,
  8276. appendixFiles: [],
  8277. appendixTypeCheck: 'all',
  8278. appendixTaskCheck: 'all',
  8279. appendixType: [],
  8280. appendixLoading: false,
  8281. interFindPan: true,
  8282. typeC1: [],
  8283. typeC2: [],
  8284. knowFileType1: "",
  8285. knowFileType2: "",
  8286. knowFileType: "",
  8287. knowFileTypeArray1: [],
  8288. knowFileTypeArray: [],
  8289. 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'],
  8290. changeId:"",
  8291. // 荔园集团下的学校
  8292. mergedList: [
  8293. "3823a6a5-1b6e-11f0-a66a-005056924926",
  8294. "292e34dc-1b6e-11f0-a66a-005056924926",
  8295. "21d6b367-1b6e-11f0-a66a-005056924926",
  8296. "1a1a172d-1b6e-11f0-a66a-005056924926",
  8297. "1197f86b-1b6e-11f0-a66a-005056924926",
  8298. "f235659b-1b6d-11f0-a66a-005056924926",
  8299. "d87b62d3-1b6d-11f0-a66a-005056924926",
  8300. "c25ea59b-1b6d-11f0-a66a-005056924926",
  8301. ],
  8302. };
  8303. },
  8304. directives: {
  8305. autoHeight: {
  8306. update(el, binding) {
  8307. const { value } = binding;
  8308. if (value && typeof value === "number") {
  8309. el.style.height = `${value}px`;
  8310. } else {
  8311. el.style.height = "auto";
  8312. }
  8313. },
  8314. componentUpdated(el) {
  8315. el.style.height = `${el.scrollHeight + 25}px`;
  8316. },
  8317. },
  8318. },
  8319. computed: {
  8320. // rightBoxHeight: function () {
  8321. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8322. // },
  8323. offsetLetfPx: function () {
  8324. //addnum可以直接在模板语法里面用,相当于data内的值
  8325. return (
  8326. $(".cru_select")[this.unitIndex] &&
  8327. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8328. );
  8329. },
  8330. getMan2() {
  8331. return function (people) {
  8332. let _people = people;
  8333. let _people2 = "";
  8334. if (this.ManAarray.length) {
  8335. for (var i = 0; i < this.ManAarray.length; i++) {
  8336. if (this.ManAarray[i].userid == people) {
  8337. _people2 = this.ManAarray[i].name;
  8338. break;
  8339. }
  8340. }
  8341. }
  8342. if (people == this.courseUserid) {
  8343. return "";
  8344. }
  8345. return this.ManAarray.length ? _people2 : "";
  8346. };
  8347. },
  8348. getListMan2() {
  8349. return function (list) {
  8350. console.log('getListMan2',list);
  8351. let _people2 = [];
  8352. if (this.ManAarray.length) {
  8353. list.slice(0, 10).forEach(people => {
  8354. let name = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid).name || "";
  8355. if (name) {
  8356. _people2.push(name);
  8357. }
  8358. });
  8359. }
  8360. return _people2.join("、");
  8361. };
  8362. },
  8363. isInvite() {
  8364. return function (cid) {
  8365. let array = [];
  8366. for (var i = 0; i < this.inviteCode.length; i++) {
  8367. array.push(this.inviteCode[i].cid);
  8368. }
  8369. return array.indexOf(cid) != -1;
  8370. };
  8371. },
  8372. getInviteCodeC() {
  8373. return function (cid) {
  8374. let array = [];
  8375. for (var i = 0; i < this.inviteCode.length; i++) {
  8376. array.push(this.inviteCode[i].cid);
  8377. }
  8378. return this.inviteCode[array.indexOf(cid)].ic;
  8379. };
  8380. },
  8381. getClassC() {
  8382. return function (c) {
  8383. let _c2 = "";
  8384. if (this.grade.length) {
  8385. for (var i = 0; i < this.grade.length; i++) {
  8386. if (this.grade[i].id == c) {
  8387. _c2 = this.grade[i].name;
  8388. break;
  8389. }
  8390. }
  8391. }
  8392. return this.grade.length ? _c2 : "";
  8393. };
  8394. },
  8395. getListClassC() {
  8396. return function (list) {
  8397. let _c2 = [];
  8398. if (this.grade.length) {
  8399. for (var j = 0; j < list.length; j++) {
  8400. let c = list[j];
  8401. for (var i = 0; i < this.grade.length; i++) {
  8402. if (this.grade[i].id == c) {
  8403. _c2.push(this.grade[i].name);
  8404. break;
  8405. }
  8406. }
  8407. }
  8408. }
  8409. return this.grade.length ? _c2.join("、") : "";
  8410. };
  8411. },
  8412. MarkdownT() {
  8413. return function (c) {
  8414. let md = new MarkdownIt();
  8415. return c
  8416. ? md.render(c) : "";
  8417. };
  8418. },
  8419. panOutline(){
  8420. return function () {
  8421. let count = 0;
  8422. for(var i = 0; i < this.unitJson.length; i++){
  8423. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8424. for(var j = 0; j < _task.length; j++){
  8425. if(_task[j].taskDetail2){
  8426. count++
  8427. }
  8428. }
  8429. }
  8430. return count;
  8431. };
  8432. },
  8433. panTeacher(){
  8434. return function () {
  8435. let count = 0;
  8436. for(var i = 0; i < this.unitJson.length; i++){
  8437. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8438. for(var j = 0; j < _task.length; j++){
  8439. if(_task[j].taskDetail3){
  8440. count++
  8441. }
  8442. }
  8443. }
  8444. return count;
  8445. };
  8446. },
  8447. panTask(){
  8448. return function () {
  8449. let count = 0;
  8450. for(var i = 0; i < this.unitJson.length; i++){
  8451. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8452. for(var j = 0; j < _task.length; j++){
  8453. if(_task[j].taskDetail){
  8454. count++
  8455. }
  8456. }
  8457. }
  8458. return count;
  8459. };
  8460. },
  8461. panElist(){
  8462. return function (array) {
  8463. let count = 0;
  8464. for(var i = 0; i < array.toolChoose.length; i++){
  8465. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8466. count++
  8467. }
  8468. }
  8469. return count;
  8470. };
  8471. },
  8472. panTaskElist(){
  8473. return function () {
  8474. let count = 0;
  8475. for(var i = 0; i < this.unitJson.length; i++){
  8476. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8477. for(var j = 0; j < _task.length; j++){
  8478. if(_task[j].eList && _task[j].eList.length){
  8479. count++
  8480. }
  8481. }
  8482. }
  8483. return count;
  8484. };
  8485. },
  8486. panEvaCont(){
  8487. return function () {
  8488. let count = 0;
  8489. for(var i = 0; i < this.unitJson.length; i++){
  8490. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8491. for(var j = 0; j < _task.length; j++){
  8492. let tool = _task[j].toolChoose
  8493. for(var k = 0; k < tool.length; k++){
  8494. if(tool[k].eList && tool[k].eList.length){
  8495. count++
  8496. }
  8497. }
  8498. }
  8499. }
  8500. return count;
  8501. };
  8502. },
  8503. dataCheckPan(){
  8504. return function (fileid) {
  8505. for(let i = 0; i < this.infoData.length; i++){
  8506. if(this.infoData[i].fileid == fileid){
  8507. return true
  8508. }
  8509. }
  8510. return false;
  8511. };
  8512. },
  8513. interUrl: function () {
  8514. let agentid = this.aiJson.agentid
  8515. let sagentid = this.aiJson.sagentid
  8516. let url = ''
  8517. if(sagentid){
  8518. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8519. }else{
  8520. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8521. }
  8522. return url;
  8523. },
  8524. panPptCount(){
  8525. return function () {
  8526. let ppts = 0
  8527. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8528. let ppt = this.$refs['ppt'+i]
  8529. if(ppt && ppt[0].tanDialog){
  8530. ppts++
  8531. }
  8532. }
  8533. if(!this.pptCount.length){
  8534. this.pptBoxDialog = false
  8535. }
  8536. return ppts;
  8537. };
  8538. },
  8539. panDanTool(){
  8540. return function (array) {
  8541. let count = 0;
  8542. for(var i = 0; i < array.toolChoose.length; i++){
  8543. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8544. count++
  8545. }
  8546. }
  8547. return count;
  8548. };
  8549. },
  8550. panDanToolEva(){
  8551. return function (array) {
  8552. let count = 0;
  8553. let tool = array.toolChoose
  8554. for(var k = 0; k < tool.length; k++){
  8555. if(tool[k].eList && tool[k].eList.length){
  8556. count++
  8557. }
  8558. }
  8559. return count;
  8560. };
  8561. },
  8562. panTool(){
  8563. return function () {
  8564. let count = 0;
  8565. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8566. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8567. for(var i = 0; i < array.toolChoose.length; i++){
  8568. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8569. count++
  8570. }
  8571. }
  8572. }
  8573. return count;
  8574. };
  8575. },
  8576. allFile(){
  8577. return function (type) {
  8578. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8579. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8580. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8581. for(var j = 0; j < _task.chapterData.length; j++){
  8582. if(_task.chapterData[j].type == 3){
  8583. file.push({..._task.chapterData[j], tool:j, task:i});
  8584. }
  8585. }
  8586. }
  8587. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8588. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8589. if(this.appendixTaskCheck != 'all' && type != '2'){
  8590. 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)));
  8591. }
  8592. if(this.appendixTypeCheck != 'all' && type != '2'){
  8593. if(this.appendixTypeCheck == 0){
  8594. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssLessonPlan));
  8595. }else if(this.appendixTypeCheck == 1){
  8596. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8597. }else if(this.appendixTypeCheck == 2){
  8598. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssStudyPlan));
  8599. }else if(this.appendixTypeCheck == 3){
  8600. uniqueFile = uniqueFile.filter(file => file.name.includes(this.lang.ssEvalSuffix));
  8601. }else if(this.appendixTypeCheck == 4){
  8602. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8603. }
  8604. }
  8605. return uniqueFile;
  8606. };
  8607. },
  8608. panAppendixCheckAll(){
  8609. return function(){
  8610. let files = this.allFile();
  8611. let count = 0
  8612. for(var i = 0; i < files.length; i++){
  8613. if(this.appendixFiles.includes(files[i].url)){
  8614. count++
  8615. }
  8616. }
  8617. if (count == files.length) {
  8618. return true
  8619. }else {
  8620. false
  8621. }
  8622. }
  8623. },
  8624. getTypeC(){
  8625. return function(index){
  8626. let sub = []
  8627. let grade = []
  8628. if (this.courseTypeId.length) {
  8629. for (var i = 0; i < this.courseTypeId.length; i++) {
  8630. let _sid = this.courseTypeId[i]
  8631. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8632. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8633. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8634. }
  8635. }
  8636. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8637. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8638. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8639. }
  8640. }
  8641. }
  8642. }
  8643. if(index == 1){
  8644. return sub
  8645. }else if(index == 2){
  8646. return grade
  8647. }
  8648. }
  8649. },
  8650. getFileType(){
  8651. return function (name) {
  8652. let fileType = this.getKnowType();
  8653. for (let type of fileType) {
  8654. if (converter(name).includes(type)) {
  8655. return type; // 判断name中是否包含对应的文件类型
  8656. }
  8657. }
  8658. return this.lang.ssOther;
  8659. };
  8660. },
  8661. allknowInfoData3(){
  8662. return function () {
  8663. let knowInfoData = this.knowInfoData3;
  8664. if(this.knowFileType){
  8665. // if(converter(this.knowFileType) == '其他'){
  8666. // let fileType = this.getKnowType().filter(item => item != '其他');
  8667. // knowInfoData = knowInfoData.filter(item => {
  8668. // return !fileType.some(type => converter(item.name).includes(type));
  8669. // });
  8670. // }else{
  8671. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8672. // }
  8673. }
  8674. if(this.knowFileType1){
  8675. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8676. }
  8677. if(this.knowFileType2){
  8678. 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)))))
  8679. }
  8680. return knowInfoData;
  8681. };
  8682. },
  8683. getKnowType(){
  8684. return function () {
  8685. let knowInfoData = this.knowInfoData3;
  8686. let array = []
  8687. for(var i = 0; i < knowInfoData.length; i++){
  8688. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8689. array.push(knowInfoData[i].file_type)
  8690. }
  8691. }
  8692. return array;
  8693. };
  8694. },
  8695. panknowInfoData3CheckAll(){
  8696. return function(){
  8697. let files = this.allknowInfoData3();
  8698. let count = 0
  8699. for(var i = 0; i < files.length; i++){
  8700. if(this.knowFileids3.includes(files[i].url)){
  8701. count++
  8702. }
  8703. }
  8704. if (count == files.length) {
  8705. return true
  8706. }else {
  8707. false
  8708. }
  8709. }
  8710. },
  8711. },
  8712. watch: {
  8713. unitIndex(newValue, oldValue) {
  8714. // return;
  8715. if (this.isDelete == 2) {
  8716. this.isDelete = 1;
  8717. return;
  8718. }
  8719. if (this.cid != "") {
  8720. let _unitIndex = oldValue;
  8721. if (
  8722. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8723. JSON.stringify(this.unitJson[_unitIndex])
  8724. ) {
  8725. this.$refs.rightboxR.scrollTop = 0;
  8726. return;
  8727. }
  8728. let cPan = 1;
  8729. for (
  8730. var j = 0;
  8731. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8732. j++
  8733. ) {
  8734. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8735. j
  8736. ].proVisible = false;
  8737. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8738. j
  8739. ].proVisible2 = false;
  8740. if (
  8741. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8742. .length > 1
  8743. ) {
  8744. for (
  8745. var z = 0;
  8746. z <
  8747. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8748. .length;
  8749. z++
  8750. ) {
  8751. if (
  8752. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8753. .toolChoose[z].tool.length
  8754. ) {
  8755. this.$message.error(this.lang.ssAddToolFull);
  8756. cPan = 2;
  8757. break;
  8758. }
  8759. }
  8760. }
  8761. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8762. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8763. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8764. (ele) => {
  8765. return ele.value != "" || ele.detail != "" || ele.target != "";
  8766. }
  8767. );
  8768. }
  8769. }
  8770. if (cPan == 2) {
  8771. this.unitIndex = oldValue;
  8772. return;
  8773. }
  8774. for (var i = 0; i < this.unitJson.length; i++) {
  8775. if (this.addindex != i) {
  8776. delete this.unitJson[i].isUpdate;
  8777. }
  8778. }
  8779. this.$refs.rightboxR.scrollTop = 0;
  8780. this.addindex = -1;
  8781. let params = [
  8782. {
  8783. cid: this.cid,
  8784. chapters: JSON.stringify(this.unitJson),
  8785. uid: this.userid,
  8786. unitIndex: _unitIndex,
  8787. },
  8788. ];
  8789. this.ajax
  8790. .post(this.$store.state.api + "updateWorkNew4", params)
  8791. .then((res) => {
  8792. // this.$message({
  8793. // message: this.lang.UpdateSuccessful,
  8794. // type: "success",
  8795. // });
  8796. // this.courseId = this.cid;
  8797. this.addtips()
  8798. })
  8799. .catch((err) => {
  8800. this.$message.error(this.lang.ssNetPoor);
  8801. console.error(err);
  8802. });
  8803. }
  8804. },
  8805. steps(newValue, old) {
  8806. if(newValue == 2){
  8807. this.steps = old
  8808. }
  8809. if (newValue == 4) {
  8810. let cPan = 1;
  8811. for (var i = 0; i < this.unitJson.length; i++) {
  8812. for (
  8813. var j = 0;
  8814. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8815. j++
  8816. ) {
  8817. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8818. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8819. if (
  8820. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8821. ) {
  8822. for (
  8823. var z = 0;
  8824. z <
  8825. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8826. z++
  8827. ) {
  8828. if (
  8829. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8830. .tool.length
  8831. ) {
  8832. this.$message.error(this.lang.ssAddToolFull);
  8833. cPan = 2;
  8834. break;
  8835. }
  8836. }
  8837. }
  8838. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8839. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8840. i
  8841. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8842. return ele.value != "" || ele.detail != "" || ele.target != "";
  8843. });
  8844. }
  8845. }
  8846. }
  8847. this.inputShow = true;
  8848. if (cPan == 2) {
  8849. this.steps = old;
  8850. return;
  8851. }
  8852. this.goTo(
  8853. "/course?userid=" +
  8854. this.userid +
  8855. "&oid=" +
  8856. this.oid +
  8857. "&org=" +
  8858. this.org +
  8859. "&role=" +
  8860. this.role
  8861. );
  8862. }
  8863. },
  8864. courseName(newVal, oldVal) {
  8865. this.setCourseInfo();
  8866. },
  8867. courseTypeId: {
  8868. immediate: true,
  8869. deep: true,
  8870. handler(newValue, oldValue) {
  8871. this.setCourseInfo();
  8872. }
  8873. },
  8874. knowFileids(newVal, oldVal) {
  8875. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8876. },
  8877. knowFileids2(newVal, oldVal) {
  8878. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8879. },
  8880. },
  8881. methods: {
  8882. tableRowClassName({ row, rowIndex }) {
  8883. if ((rowIndex + 1) % 2 === 0) {
  8884. return "even_row";
  8885. } else {
  8886. return "";
  8887. }
  8888. },
  8889. close() {
  8890. this.cetIndex = "";
  8891. this.cettIndex = "";
  8892. this.templateName = "";
  8893. this.cetBoxDialog = false;
  8894. },
  8895. openAI() {
  8896. window.topU.postMessage({ tools: "64" }, "*");
  8897. },
  8898. setMan() {
  8899. // let teacherJuri = this.teacherJuri2;
  8900. this.ManAarray = [];
  8901. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8902. if (_user.indexOf(this.userid) == -1) {
  8903. _user.push(this.userid);
  8904. }
  8905. if (_user.indexOf(this.courseUserid) == -1) {
  8906. _user.push(this.courseUserid);
  8907. }
  8908. let params = [{
  8909. uid: _user.join(","),
  8910. }];
  8911. this.ajax
  8912. .post(this.$store.state.api + "getAllUserByIdP", params)
  8913. .then((res) => {
  8914. let teacherJuri = res.data[0];
  8915. this.ManAarray = teacherJuri;
  8916. })
  8917. .catch((err) => {
  8918. console.error(err);
  8919. });
  8920. },
  8921. previewImg(url) {
  8922. this.$hevueImgPreview(url);
  8923. },
  8924. btnDisplay(bool) {
  8925. this.isBtnDisplay = bool;
  8926. },
  8927. stepDisplay(bool) {
  8928. this.isStepDisplay = bool;
  8929. },
  8930. scrollChange() {
  8931. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8932. },
  8933. addHw(e) {
  8934. var el = e.currentTarget;
  8935. el.getElementsByTagName("input")[0].click();
  8936. },
  8937. change(val) {
  8938. if (this.dialogVisible1) {
  8939. this.tdetail = val;
  8940. } else if (this.dialogVisible6) {
  8941. this.AttText.text = val;
  8942. } else if (this.dialogVisible2) {
  8943. this.cTemplate = val;
  8944. } else if (this.dialogVisibleTable) {
  8945. this.tableJson.text = val;
  8946. }
  8947. this.$forceUpdate();
  8948. console.log(val);
  8949. },
  8950. change2(val) {
  8951. console.log(val);
  8952. this.$forceUpdate();
  8953. },
  8954. handleClose(done) {
  8955. done();
  8956. },
  8957. closePan(tool) {
  8958. if (tool == 15) {
  8959. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8960. this.dialogVisible8 = false;
  8961. } else {
  8962. this.closeConfirm(tool);
  8963. }
  8964. } else if (tool == 4) {
  8965. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8966. this.dialogVisible5 = false;
  8967. } else {
  8968. this.closeConfirm(tool);
  8969. }
  8970. } else if (tool == 45) {
  8971. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8972. this.dialogVisibleChoice = false;
  8973. } else {
  8974. this.closeConfirm(tool);
  8975. }
  8976. } else if (tool == 41) {
  8977. if (
  8978. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8979. ) {
  8980. this.dialogVisibleSelect = false;
  8981. } else {
  8982. this.closeConfirm(tool);
  8983. }
  8984. } else if (tool == 47) {
  8985. if (
  8986. JSON.stringify(this.sentenceList) ==
  8987. JSON.stringify(this.sentenceList2)
  8988. ) {
  8989. this.dialogVisibleSentence = false;
  8990. } else {
  8991. this.closeConfirm(tool);
  8992. }
  8993. } else if (tool == 69) {
  8994. if (
  8995. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8996. ) {
  8997. this.englishDialogVisible = false;
  8998. } else {
  8999. this.closeConfirm(tool);
  9000. }
  9001. }
  9002. },
  9003. closeConfirm(tool) {
  9004. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  9005. confirmButtonText: this.lang.ssSave,
  9006. cancelButtonText: this.lang.ssNotSave,
  9007. type: "warning",
  9008. })
  9009. .then(() => {
  9010. if (tool == 15) {
  9011. this.addAnswer();
  9012. } else if (tool == 4) {
  9013. this.addAsk();
  9014. } else if (tool == 45) {
  9015. this.addTest();
  9016. } else if (tool == 41) {
  9017. this.addSelectAnswer();
  9018. } else if (tool == 47) {
  9019. this.addSentenceTool();
  9020. } else if (tool == 69) {
  9021. this.addEnglish();
  9022. }
  9023. })
  9024. .catch(() => {
  9025. if (tool == 15) {
  9026. this.dialogVisible8 = false;
  9027. } else if (tool == 4) {
  9028. this.dialogVisible5 = false;
  9029. } else if (tool == 45) {
  9030. this.dialogVisibleChoice = false;
  9031. } else if (tool == 41) {
  9032. this.dialogVisibleSelect = false;
  9033. } else if (tool == 47) {
  9034. this.dialogVisibleSentence = false;
  9035. } else if (tool == 69) {
  9036. this.englishDialogVisible = false;
  9037. }
  9038. });
  9039. },
  9040. addEnglish(jsonType) {
  9041. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  9042. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  9043. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  9044. if (
  9045. this.englishList.engTitle == "" ||
  9046. this.englishList.englishText == ""
  9047. ) {
  9048. this.$message.error(this.lang.ssFillComplete);
  9049. return;
  9050. }
  9051. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9052. this.taskCount
  9053. ].toolChoose[this.toolIndex].englishList = this.englishList;
  9054. this.englishList = {};
  9055. if (jsonType && jsonType == 1) {
  9056. this.englishDialogVisible = true;
  9057. } else {
  9058. this.englishDialogVisible = false;
  9059. }
  9060. if (
  9061. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9062. .toolChoose[this.toolIndex].tool != 69
  9063. ) {
  9064. this.addTools(69, this.taskCount, this.toolIndex);
  9065. }
  9066. },
  9067. imgChange2(i, j) {
  9068. var _tmp = this.testJson.testJson[i].checkList[j];
  9069. this.noneBtnImg = _tmp.length >= 1;
  9070. },
  9071. imgChange3(i) {
  9072. var _tmp = this.testJson.testJson[i];
  9073. this.noneBtnImg = _tmp.length >= 1;
  9074. },
  9075. imgChange1(file, fileList, type, itemTaskIndex) {
  9076. if (type == 1) {
  9077. var _tmp = this.cover;
  9078. } else if (
  9079. type == 2 ||
  9080. type == 3 ||
  9081. type == 6 ||
  9082. type == 7 ||
  9083. type == 8
  9084. ) {
  9085. var _tmp =
  9086. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9087. .chapterData;
  9088. } else if (type == 4) {
  9089. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  9090. } else {
  9091. var _tmp =
  9092. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9093. .homeworkList;
  9094. }
  9095. this.noneBtnImg = _tmp.length >= 1;
  9096. },
  9097. goTo(path) {
  9098. this.$router.push(path);
  9099. },
  9100. guid() {
  9101. var _num,
  9102. i,
  9103. _guid = "";
  9104. for (i = 0; i < 32; i++) {
  9105. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  9106. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  9107. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  9108. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  9109. _guid += "-";
  9110. }
  9111. }
  9112. return _guid;
  9113. },
  9114. retrunCourse() {
  9115. if(this.istemplate == 1){
  9116. this.goTo(
  9117. "/course?userid=" +
  9118. this.userid +
  9119. "&oid=" +
  9120. this.oid +
  9121. "&org=" +
  9122. this.org +
  9123. "&role=" +
  9124. this.role
  9125. );
  9126. return
  9127. }
  9128. this.$confirm(this.lang.ssSaveEdit, this.lang.ssTip, {
  9129. confirmButtonText: this.lang.ssSave,
  9130. cancelButtonText: this.lang.ssNotSave,
  9131. distinguishCancelAndClose: true,
  9132. type: "warning",
  9133. customClass: 'custom-confirm-box'
  9134. })
  9135. .then(() => {
  9136. if (this.taskLoading.length) {
  9137. let _pan = 1
  9138. for(var k = 0; k < this.taskLoading.length; k++){
  9139. if(this.taskLoading[k]){
  9140. this.$message({
  9141. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9142. type: "warning"
  9143. });
  9144. _pan = 2
  9145. }
  9146. }
  9147. if(_pan == 2){
  9148. return
  9149. }
  9150. }
  9151. if(this.taskGLoading.length){
  9152. let _pan = 1
  9153. for(var k = 0; k < this.taskGLoading.length; k++){
  9154. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9155. this.$message({
  9156. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9157. type: "warning"
  9158. });
  9159. _pan = 2
  9160. }
  9161. }
  9162. if(_pan == 2){
  9163. return
  9164. }
  9165. }
  9166. let pan2 = 1
  9167. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9168. for(var index = 0; index < taskJson.length; index++){
  9169. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9170. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9171. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9172. this.$message({
  9173. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9174. type: "warning"
  9175. });
  9176. pan2 = 2
  9177. }
  9178. }
  9179. }
  9180. }
  9181. if(pan2 == 2){
  9182. return
  9183. }
  9184. if (this.cid == "" || this.cid == undefined) {
  9185. if (this.courseName == "") {
  9186. this.$message.error(this.lang.ssFillCourseName);
  9187. return;
  9188. } else {
  9189. this.addWork();
  9190. }
  9191. this.steps = 4;
  9192. } else {
  9193. if (this.courseName == "") {
  9194. this.$message.error(this.lang.ssFillCourseName);
  9195. return;
  9196. } else {
  9197. if (this.userid != this.courseUserid && this.role != "1") {
  9198. this.updateWork2();
  9199. } else {
  9200. this.updateWork();
  9201. }
  9202. this.steps = 4;
  9203. }
  9204. }
  9205. })
  9206. .catch((v) => {
  9207. console.log(v);
  9208. if (v == "cancel") {
  9209. this.goTo(
  9210. "/course?userid=" +
  9211. this.userid +
  9212. "&oid=" +
  9213. this.oid +
  9214. "&org=" +
  9215. this.org +
  9216. "&role=" +
  9217. this.role
  9218. );
  9219. }
  9220. });
  9221. setTimeout(() => {
  9222. this.setTipsIndex()
  9223. }, 500)
  9224. },
  9225. lastSteps() {
  9226. if (this.steps == 4) {
  9227. this.goTo(
  9228. "/course?userid=" +
  9229. this.userid +
  9230. "&oid=" +
  9231. this.oid +
  9232. "&org=" +
  9233. this.org +
  9234. "&role=" +
  9235. this.role
  9236. );
  9237. } else {
  9238. // if (this.cidType == 0) {
  9239. // this.steps--;
  9240. // if (this.steps == 1) {
  9241. // setTimeout(() => {
  9242. // this.checkEva(this.checkId);
  9243. // setTimeout(() => {
  9244. // this.checkEva(this.checkId);
  9245. // }, 100);
  9246. // }, 100);
  9247. // }
  9248. // } else {
  9249. if (this.steps == 3) {
  9250. this.steps = 1;
  9251. setTimeout(() => {
  9252. this.checkEva(this.checkId);
  9253. setTimeout(() => {
  9254. this.checkEva(this.checkId);
  9255. }, 100);
  9256. }, 100);
  9257. }
  9258. // }
  9259. }
  9260. },
  9261. navSteps(s) {
  9262. if (this.courseName == "") {
  9263. this.$message.error(this.lang.ssFillCourseName);
  9264. return;
  9265. }
  9266. if (this.cidType == 0) {
  9267. if (this.steps == 1) {
  9268. if (this.cid == "" || this.cid == undefined) {
  9269. this.addWork();
  9270. } else {
  9271. if (this.userid != this.courseUserid && this.role != "1") {
  9272. this.updateWork2();
  9273. } else {
  9274. this.updateWork();
  9275. }
  9276. }
  9277. }
  9278. if (s == 1) {
  9279. this.steps = 1;
  9280. setTimeout(() => {
  9281. this.checkEva(this.checkId);
  9282. setTimeout(() => {
  9283. this.checkEva(this.checkId);
  9284. }, 100);
  9285. }, 100);
  9286. }
  9287. if (s == 2) {
  9288. this.steps = 2;
  9289. }
  9290. if (s == 3) {
  9291. this.cTemplate = this.templateC.content;
  9292. this.dialogVisible2 = false;
  9293. this.steps = 3;
  9294. this.isClickColor = 1;
  9295. this.unitJson[
  9296. this.unitIndex
  9297. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9298. this.$forceUpdate();
  9299. setTimeout(() => {
  9300. this.checkEva(this.checkId);
  9301. setTimeout(() => {
  9302. this.checkEva(this.checkId);
  9303. }, 100);
  9304. }, 1000);
  9305. }
  9306. } else {
  9307. if (this.steps == 1) {
  9308. if (this.cid == "" || this.cid == undefined) {
  9309. this.addWork();
  9310. } else {
  9311. if (this.userid != this.courseUserid && this.role != "1") {
  9312. this.updateWork2();
  9313. } else {
  9314. this.updateWork();
  9315. }
  9316. }
  9317. }
  9318. if (s == 1) {
  9319. this.steps = 1;
  9320. setTimeout(() => {
  9321. this.checkEva(this.checkId);
  9322. setTimeout(() => {
  9323. this.checkEva(this.checkId);
  9324. }, 100);
  9325. }, 100);
  9326. }
  9327. if (s == 3) {
  9328. this.cTemplate = this.templateC.content;
  9329. this.dialogVisible2 = false;
  9330. this.steps = 3;
  9331. this.isClickColor = 1;
  9332. this.unitJson[
  9333. this.unitIndex
  9334. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9335. this.$forceUpdate();
  9336. setTimeout(() => {
  9337. this.checkEva(this.checkId);
  9338. setTimeout(() => {
  9339. this.checkEva(this.checkId);
  9340. }, 100);
  9341. }, 1000);
  9342. }
  9343. }
  9344. this.$refs.stepBox.scrollTop = 0;
  9345. },
  9346. setTipsIndex(){
  9347. // 使用 setTimeout 确保对话框已经渲染完成
  9348. this.$nextTick(() => {
  9349. const dialog = document.querySelector('.custom-confirm-box');
  9350. if (dialog) {
  9351. const parent = dialog.parentElement;
  9352. if (parent) {
  9353. parent.style.zIndex = 9999999;
  9354. const adjacentElement = parent.nextElementSibling;
  9355. if (adjacentElement) {
  9356. adjacentElement.style.zIndex = 9999998;
  9357. }
  9358. }
  9359. }
  9360. });
  9361. },
  9362. nextSteps(clickType, ttype) {
  9363. if(!this.time()){
  9364. return
  9365. }
  9366. // if (this.cidType == 1) {
  9367. if (this.steps == 1) {
  9368. if (this.courseName != "") {
  9369. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9370. // this.$message({
  9371. // message: "请回答完毕后再次发送",
  9372. // type: "warning"
  9373. // });
  9374. if(this.ttaskDetailLoading.length){
  9375. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9376. this.$message({
  9377. message: this.lang.ssGenOutTaskDesc.replace(/\*/g, num),
  9378. type: "warning"
  9379. });
  9380. }
  9381. if(this.cpotetLoading.cpote1){
  9382. this.$message({
  9383. message: this.lang.ssCpoteNotGen,
  9384. type: "warning"
  9385. });
  9386. }
  9387. if(this.cpotetLoading.cpote2){
  9388. this.$message({
  9389. message: this.lang.ssQChainNotGen,
  9390. type: "warning"
  9391. });
  9392. }
  9393. if(this.cpotetLoading.cpote3){
  9394. this.$message({
  9395. message: this.lang.ssTargetNotGen,
  9396. type: "warning"
  9397. });
  9398. }
  9399. if(this.cpotetLoading.cpote4){
  9400. this.$message({
  9401. message: this.lang.ssTaskClusNotGen,
  9402. type: "warning"
  9403. });
  9404. }
  9405. return;
  9406. }
  9407. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9408. if(!this.courseText && !this.teacherCourseText){
  9409. this.$message.error(this.lang.ssGenDescFirst);
  9410. return;
  9411. }
  9412. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9413. this.openAiDialog(clickType, 'aiOutline2')
  9414. if(clickType == 1){
  9415. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9416. }else {
  9417. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9418. }
  9419. }else {
  9420. this.openAiDialog(clickType, 'aiOutline')
  9421. if(clickType == 1){
  9422. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9423. }else {
  9424. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9425. }
  9426. }
  9427. return;
  9428. }
  9429. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9430. let _type = ''
  9431. if(this.cpoteType == 0){
  9432. _type = 'aiCpote1'
  9433. if(clickType == 1){
  9434. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9435. }else {
  9436. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9437. }
  9438. }else if(this.cpoteType == 1){
  9439. _type = 'aiCpote2'
  9440. if(clickType == 1){
  9441. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9442. }else {
  9443. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9444. }
  9445. }else if(this.cpoteType == 2){
  9446. _type = 'aiCpote3'
  9447. if(clickType == 1){
  9448. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9449. }else {
  9450. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9451. }
  9452. }else if(this.cpoteType == 3){
  9453. _type = 'aiCpote4'
  9454. if(clickType == 1){
  9455. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9456. }else {
  9457. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9458. }
  9459. }
  9460. this.cpoteType++
  9461. this.openAiDialog(clickType, _type)
  9462. return;
  9463. }
  9464. // if (!this.isOutline2) {
  9465. // this.openAiDialog(clickType, 'aiTeacher')
  9466. // return;
  9467. // }
  9468. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9469. this.openAiDialog(clickType, 'aiTeacher3')
  9470. if(clickType == 1){
  9471. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9472. }else {
  9473. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9474. }
  9475. return;
  9476. }
  9477. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9478. this.openAiDialog(clickType, 'aiTeacher2')
  9479. if(clickType == 1){
  9480. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9481. }else {
  9482. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9483. }
  9484. return;
  9485. }
  9486. let _pan2 = 1
  9487. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9488. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9489. _pan2 = 2
  9490. this.$message.error(this.lang.ssPerfectOut.replace(/\*/g, k+1))
  9491. break;
  9492. }
  9493. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9494. _pan2 = 2
  9495. this.$message.error(this.lang.ssPerfectPlan.replace(/\*/g, k+1))
  9496. break;
  9497. }
  9498. }
  9499. if(_pan2 == 2){
  9500. return;
  9501. }
  9502. const functionA = () => {
  9503. setTimeout(() => {
  9504. this.loading = false
  9505. this.steps = 3;
  9506. }, 0)
  9507. this.isClickColor = 1;
  9508. this.unitJson[
  9509. this.unitIndex
  9510. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9511. this.$forceUpdate();
  9512. setTimeout(() => {
  9513. this.checkEva(this.checkId);
  9514. setTimeout(() => {
  9515. this.checkEva(this.checkId);
  9516. }, 100);
  9517. }, 1000);
  9518. if (this.cid == "" || this.cid == undefined) {
  9519. this.addWork();
  9520. } else {
  9521. if (this.userid != this.courseUserid && this.role != "1") {
  9522. this.updateWork2();
  9523. } else {
  9524. this.updateWork();
  9525. }
  9526. }
  9527. }
  9528. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9529. if(this.ttaskDetailLoading5.length){
  9530. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9531. // this.$message({
  9532. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9533. // type: "warning"
  9534. // });
  9535. this.$confirm(this.lang.ssPlanNotGen, this.lang.ssTip, {
  9536. confirmButtonText: this.lang.ssConfirm,
  9537. cancelButtonText: this.lang.ssCancel,
  9538. distinguishCancelAndClose: true,
  9539. type: "warning",
  9540. customClass: 'custom-confirm-box'
  9541. })
  9542. .then(() => {
  9543. if(this.isTeacherTaskCancelToken2){
  9544. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9545. if(this.isTeacherTaskCancelToken2[i]){
  9546. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9547. this.isTeacherTaskCancelToken2[i] = null;
  9548. }
  9549. }
  9550. }
  9551. this.taskDetailLoading5 = []
  9552. this.ttaskDetailLoading5 = []
  9553. if(this.isTeacherTaskCancelSource){
  9554. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9555. if(this.isTeacherTaskCancelSource[i]){
  9556. this.isTeacherTaskCancelSource[i].close()
  9557. this.isTeacherTaskCancelSource[i] = null
  9558. }
  9559. }
  9560. }
  9561. if (this.cid) {
  9562. this.loading = true
  9563. functionA()
  9564. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9565. } else {
  9566. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9567. if(clickType == 1){
  9568. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9569. }else {
  9570. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9571. }
  9572. }
  9573. }).catch((v) => {
  9574. console.log(v);
  9575. })
  9576. setTimeout(() => {
  9577. this.setTipsIndex()
  9578. }, 500)
  9579. }
  9580. return;
  9581. }
  9582. if (this.cid && this.panTask() > 0) {
  9583. this.loading = true
  9584. functionA()
  9585. } else {
  9586. // if(ttype == 2){
  9587. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9588. // }else {
  9589. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9590. // }
  9591. }
  9592. } else {
  9593. this.$message.error(this.lang.ssFillCourseName);
  9594. return;
  9595. }
  9596. } else if (this.steps == 3) {
  9597. if (this.taskLoading.length) {
  9598. let _pan = 1
  9599. for(var k = 0; k < this.taskLoading.length; k++){
  9600. if(this.taskLoading[k]){
  9601. this.$message({
  9602. message: this.lang.ssWaitTaskUp.replace(/\*/g, k+1),
  9603. type: "warning"
  9604. });
  9605. _pan = 2
  9606. }
  9607. }
  9608. if(_pan == 2){
  9609. return
  9610. }
  9611. }
  9612. if(this.taskGLoading.length){
  9613. let _pan = 1
  9614. for(var k = 0; k < this.taskGLoading.length; k++){
  9615. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9616. this.$message({
  9617. message: this.lang.ssWaitTaskSave.replace(/\*/g, k+1),
  9618. type: "warning"
  9619. });
  9620. _pan = 2
  9621. }
  9622. }
  9623. if(_pan == 2){
  9624. return
  9625. }
  9626. }
  9627. let pan2 = 1
  9628. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9629. for(var index = 0; index < taskJson.length; index++){
  9630. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9631. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9632. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9633. this.$message({
  9634. message: this.lang.ssWaitTaskCont.replace(/\*/g, index+1),
  9635. type: "warning"
  9636. });
  9637. pan2 = 2
  9638. }
  9639. }
  9640. }
  9641. }
  9642. if(pan2 == 2){
  9643. return
  9644. }
  9645. if (this.cid == "" || this.cid == undefined) {
  9646. if (this.courseName == "") {
  9647. this.$message.error(this.lang.ssFillCourseName);
  9648. return;
  9649. } else {
  9650. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9651. this.addWork();
  9652. this.steps++;
  9653. }
  9654. } else {
  9655. if (this.courseName == "") {
  9656. this.$message.error(this.lang.ssFillCourseName);
  9657. return;
  9658. } else {
  9659. if (this.userid != this.courseUserid && this.role != "1") {
  9660. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9661. this.updateWork2();
  9662. } else {
  9663. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9664. this.updateWork();
  9665. }
  9666. this.steps++;
  9667. }
  9668. }
  9669. }
  9670. // } else {
  9671. // if (this.steps == 1) {
  9672. // if (this.courseName != "") {
  9673. // if (this.cid == "" || this.cid == undefined) {
  9674. // this.addWork();
  9675. // } else {
  9676. // if (this.userid != this.courseUserid && this.role != "1") {
  9677. // // this.updateWork2();
  9678. // } else {
  9679. // this.updateWork();
  9680. // }
  9681. // }
  9682. // this.steps++;
  9683. // } else {
  9684. // this.$message.error("请补充填写课程名称");
  9685. // return;
  9686. // }
  9687. // } else if (this.steps == 2) {
  9688. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9689. // this.cTemplate = this.templateC.content;
  9690. // }
  9691. // this.dialogVisible2 = false;
  9692. // this.steps++;
  9693. // setTimeout(() => {
  9694. // this.checkEva(this.checkId);
  9695. // setTimeout(() => {
  9696. // this.checkEva(this.checkId);
  9697. // }, 100);
  9698. // }, 1000);
  9699. // } else if (this.steps == 3) {
  9700. // if (this.cid == "" || this.cid == undefined) {
  9701. // if (this.courseName == "") {
  9702. // this.$message.error("请补充填写课程名称");
  9703. // return;
  9704. // } else {
  9705. // this.addWork();
  9706. // this.steps++;
  9707. // }
  9708. // } else {
  9709. // if (this.courseName == "") {
  9710. // this.$message.error("请补充填写课程名称");
  9711. // return;
  9712. // } else {
  9713. // if (this.userid != this.courseUserid && this.role != "1") {
  9714. // this.updateWork2();
  9715. // } else {
  9716. // this.updateWork();
  9717. // }
  9718. // this.steps++;
  9719. // }
  9720. // }
  9721. // }
  9722. // }
  9723. this.$refs.stepBox.scrollTop = 0;
  9724. },
  9725. unitSet(i) {
  9726. if (this.unitIndex == i) {
  9727. return;
  9728. }
  9729. this.unitIndex = i;
  9730. this.isClickColor = 1;
  9731. // this.$refs.rightboxR.scrollTop = 0;
  9732. this.$refs.unitBox.scrollTop = 0;
  9733. },
  9734. panUnitJson() {
  9735. let _unitIndex = this.unitIndex;
  9736. let cPan = 1;
  9737. for (
  9738. var j = 0;
  9739. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9740. j++
  9741. ) {
  9742. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9743. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9744. j
  9745. ].proVisible2 = false;
  9746. if (
  9747. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9748. .length > 1
  9749. ) {
  9750. for (
  9751. var z = 0;
  9752. z <
  9753. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9754. .length;
  9755. z++
  9756. ) {
  9757. if (
  9758. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9759. z
  9760. ].tool.length
  9761. ) {
  9762. this.$message.error(this.lang.ssAddToolFull);
  9763. cPan = 2;
  9764. break;
  9765. }
  9766. }
  9767. }
  9768. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9769. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9770. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9771. (ele) => {
  9772. return ele.value != "" || ele.detail != "" || ele.target != "";
  9773. }
  9774. );
  9775. }
  9776. }
  9777. return cPan;
  9778. },
  9779. unitOpen(i) {
  9780. if (this.unitJson[i].toolOpen) {
  9781. this.unitJson[i].toolOpen = false;
  9782. } else {
  9783. this.unitJson[i].toolOpen = true;
  9784. }
  9785. this.updateWork();
  9786. this.$forceUpdate();
  9787. },
  9788. unitSet2(i) {
  9789. if (this.panUnitJson() == 2) {
  9790. return;
  9791. }
  9792. // if(this.unitJson[i].toolOpen){
  9793. // this.unitJson[i].toolOpen = false
  9794. // this.updateWork()
  9795. // this.$forceUpdate()
  9796. // return
  9797. // }else {
  9798. this.unitJson[i].toolOpen = true;
  9799. // }
  9800. this.$forceUpdate();
  9801. if (this.unitIndex == i) {
  9802. return;
  9803. }
  9804. this.unitIndex = i;
  9805. this.isClickColor = 1;
  9806. // this.$refs.rightboxR.scrollTop = 0;
  9807. this.$refs.unitBox.scrollTop = 0;
  9808. },
  9809. updateCourseState(i) {
  9810. let params = [
  9811. {
  9812. cid: this.cid,
  9813. state: i,
  9814. },
  9815. ];
  9816. this.ajax
  9817. .post(this.$store.state.api + "updateCourseMode", params)
  9818. .then((res) => {
  9819. this.courseState = i;
  9820. })
  9821. .catch((err) => {
  9822. this.$message.error(this.lang.ssNetPoor);
  9823. console.error(err);
  9824. });
  9825. },
  9826. addtips(){
  9827. let params = [
  9828. {
  9829. cid: this.cid,
  9830. tips: JSON.stringify(this.aiJson),
  9831. tid: this.templateid
  9832. },
  9833. ];
  9834. this.ajax
  9835. .post(this.$store.state.api + "addTips", params)
  9836. .then((res) => {
  9837. })
  9838. .catch((err) => {
  9839. this.$message.error(this.lang.ssNetPoor);
  9840. console.error(err);
  9841. });
  9842. },
  9843. openSaveTips(){
  9844. this.dialogVisibleTips = true
  9845. },
  9846. time() {
  9847. if (!this.now) {
  9848. this.now = new Date().getTime();
  9849. return true;
  9850. } else {
  9851. let time = new Date().getTime();
  9852. if (time - this.now > 1000) {
  9853. this.now = time;
  9854. return true;
  9855. } else {
  9856. return false;
  9857. }
  9858. }
  9859. },
  9860. deleteUnit(i) {
  9861. var _this = this;
  9862. if (i == 0 && _this.unitJson.length == 1) {
  9863. _this
  9864. .$confirm(_this.lang.ssSwitchTask, _this.lang.ssTip, {
  9865. confirmButtonText: _this.lang.ssConfirm,
  9866. cancelButtonText: _this.lang.ssCancel,
  9867. type: "warning",
  9868. })
  9869. .then(() => {
  9870. _this.unitJson[i].dyName = "";
  9871. // _this.updateCourseState(2);
  9872. })
  9873. .catch(() => {
  9874. return;
  9875. });
  9876. } else {
  9877. _this
  9878. .$confirm(_this.lang.ssDeleteStage, _this.lang.ssTip, {
  9879. confirmButtonText: _this.lang.ssConfirm,
  9880. cancelButtonText: _this.lang.ssCancel,
  9881. type: "warning",
  9882. })
  9883. .then(() => {
  9884. _this.isDelete = 2;
  9885. // _this.unitIndex = _this.unitIndex - 1;
  9886. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9887. // _this.$message.success("删除成功");
  9888. })
  9889. .catch(() => {
  9890. return;
  9891. });
  9892. }
  9893. },
  9894. deleteWork(chapid) {
  9895. let params = [
  9896. {
  9897. cid: this.cid,
  9898. chapters: JSON.stringify(this.unitJson),
  9899. uid: this.userid,
  9900. chapid: chapid,
  9901. },
  9902. ];
  9903. this.ajax
  9904. .post(this.$store.state.api + "deleteWork", params)
  9905. .then((res) => {
  9906. this.$message({
  9907. message: this.lang.ssDeleteSucc,
  9908. type: "success",
  9909. });
  9910. let task = JSON.parse(
  9911. JSON.stringify(
  9912. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9913. )
  9914. );
  9915. this.unitJson.splice(this.unitIndex, 1);
  9916. if (this.unitIndex == 0) {
  9917. this.unitIndex = 0;
  9918. } else {
  9919. this.unitIndex = this.unitIndex - 1;
  9920. }
  9921. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9923. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9924. ...task,
  9925. ];
  9926. }
  9927. })
  9928. .catch((err) => {
  9929. this.$message.error(this.lang.ssNetPoor);
  9930. console.error(err);
  9931. });
  9932. },
  9933. deleteTool(itemTaskIndex, i) {
  9934. var _this = this;
  9935. if (_this.time()) {
  9936. _this
  9937. .$confirm(_this.lang.ssDeleteTool, _this.lang.ssTip, {
  9938. confirmButtonText: _this.lang.ssConfirm,
  9939. cancelButtonText: _this.lang.ssCancel,
  9940. type: "warning",
  9941. })
  9942. .then(() => {
  9943. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9944. itemTaskIndex
  9945. ].toolChoose.splice(i, 1);
  9946. _this.$message.success(_this.lang.ssDeleteSucc);
  9947. })
  9948. .catch(() => {
  9949. return;
  9950. });
  9951. }
  9952. },
  9953. deleteSentence(i) {
  9954. var _this = this;
  9955. _this
  9956. .$confirm(_this.lang.ssDeleteQues, _this.lang.ssTip, {
  9957. confirmButtonText: _this.lang.ssConfirm,
  9958. cancelButtonText: _this.lang.ssCancel,
  9959. type: "warning",
  9960. })
  9961. .then(() => {
  9962. _this.sentenceList.splice(i, 1);
  9963. _this.$message.success(_this.lang.ssDeleteSucc);
  9964. })
  9965. .catch(() => {
  9966. return;
  9967. });
  9968. },
  9969. deleteS(s, i, j) {
  9970. this.sentenceList[i].addSentence.splice(j, 1);
  9971. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9972. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9973. this.sentenceList[i].rightAnswer.splice(a, 1);
  9974. }
  9975. },
  9976. openT() {
  9977. window.topU.postMessage({ tools: "25" }, "*");
  9978. },
  9979. deleteTask(i) {
  9980. var _this = this;
  9981. if (_this.time()) {
  9982. _this
  9983. .$confirm(
  9984. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9985. 1 ==
  9986. i
  9987. ? _this.lang.ssDeleteTask
  9988. : _this.lang.ssSwitchTaskDel,
  9989. _this.lang.ssTip,
  9990. {
  9991. confirmButtonText: _this.lang.ssConfirm,
  9992. cancelButtonText: _this.lang.ssCancel,
  9993. type: "warning",
  9994. }
  9995. )
  9996. .then(() => {
  9997. if (i == 0 && _this.courseState == 4) {
  9998. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9999. i + 1
  10000. ].chapterData = JSON.parse(
  10001. JSON.stringify(
  10002. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10003. .chapterData
  10004. )
  10005. );
  10006. }
  10007. _this.$forceUpdate();
  10008. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10009. i,
  10010. 1
  10011. );
  10012. _this.$message.success(_this.lang.ssDeleteSucc);
  10013. })
  10014. .catch(() => {
  10015. return;
  10016. });
  10017. }
  10018. },
  10019. deleteTask2(i) {
  10020. var _this = this;
  10021. if (_this.time()) {
  10022. _this
  10023. .$confirm(
  10024. _this.lang.ssDeleteTask,
  10025. _this.lang.ssTip,
  10026. {
  10027. confirmButtonText: _this.lang.ssConfirm,
  10028. cancelButtonText: _this.lang.ssCancel,
  10029. type: "warning",
  10030. }
  10031. )
  10032. .then(() => {
  10033. if (i == 0 && _this.courseState == 4) {
  10034. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10035. i + 1
  10036. ].chapterData = JSON.parse(
  10037. JSON.stringify(
  10038. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10039. .chapterData
  10040. )
  10041. );
  10042. }
  10043. _this.$forceUpdate();
  10044. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10045. i,
  10046. 1
  10047. );
  10048. _this.$message.success(_this.lang.ssDeleteSucc);
  10049. })
  10050. .catch(() => {
  10051. return;
  10052. });
  10053. }
  10054. },
  10055. handlePictureCardPreview(file) {
  10056. this.dialogImageUrl = file.url;
  10057. },
  10058. clean(i, c) {
  10059. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  10060. },
  10061. handle_remove1(file, fileList, type) {
  10062. var _tmp = this.cover;
  10063. // for (var i = 0, len = _tmp.length; i < len; i++) {
  10064. // if (_tmp[i].uid == file.uid) {
  10065. // _tmp.splice(i, 1);
  10066. // break;
  10067. // }
  10068. // this.cover = _tmp;
  10069. // }
  10070. this.cover = [];
  10071. this.noneBtnImg = this.cover.length >= 1;
  10072. this.isSysPic = false;
  10073. this.isSysPic2 = false;
  10074. this.$forceUpdate();
  10075. },
  10076. addImg(e) {
  10077. var el = e.currentTarget;
  10078. el.getElementsByTagName("input")[0].click();
  10079. e.target.value = "";
  10080. },
  10081. addChaptersTools(i) {
  10082. this.chapTools = [
  10083. {
  10084. tools: [],
  10085. toolDetail: "",
  10086. },
  10087. ];
  10088. this.chapCount = i;
  10089. this.dialogVisible4 = true;
  10090. },
  10091. isNoFinsh() {
  10092. this.$message.warning(this.lang.ssInDev);
  10093. },
  10094. addAttText(i) {
  10095. this.AttText = {
  10096. title: "",
  10097. text: "",
  10098. };
  10099. this.taskCount = i;
  10100. this.AttTextType = 0;
  10101. this.$forceUpdate();
  10102. this.dialogVisible6 = true;
  10103. setTimeout(() => {
  10104. this.$refs["fuInput"].focus();
  10105. }, 100);
  10106. },
  10107. openLine(i) {
  10108. this.line = "";
  10109. this.lineCount = i;
  10110. this.lineType = 0;
  10111. this.$forceUpdate();
  10112. this.dialogVisible7 = true;
  10113. },
  10114. pasteLine(i) {
  10115. navigator.clipboard
  10116. .readText()
  10117. .then((v) => {
  10118. console.log("获取剪贴板成功:", v);
  10119. const html = v;
  10120. const regex = /src="(.*?)"/g;
  10121. const match = regex.exec(html);
  10122. if (match && match[1]) {
  10123. console.log(match[1]);
  10124. this.$message.success(this.lang.ssPasteSucc);
  10125. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10126. i
  10127. ].chapterData.unshift({
  10128. name: this.lang.ssLink,
  10129. title: this.lang.ssEmbedCode,
  10130. url: match[1],
  10131. type: 8,
  10132. });
  10133. } else {
  10134. // console.log("未找到包含 src 属性的 iframe");
  10135. this.$message.error(
  10136. this.lang.ssNoPasteObj
  10137. );
  10138. }
  10139. })
  10140. .catch((v) => {
  10141. console.log("获取剪贴板失败: ", v);
  10142. });
  10143. },
  10144. openSource(i) {
  10145. this.lineCount = i;
  10146. this.sourceData = {};
  10147. this.dialogVisibleSource = true;
  10148. this.updateSourcePan = false;
  10149. },
  10150. openAiCreate(i){
  10151. // this.lineCount = i;
  10152. // this.dialogVisibleAiCreate = true;
  10153. if(!this.pptCount.includes(i)){
  10154. this.pptCount.push(i)
  10155. this.dialogVisibleAiCreate2.push(i);
  10156. }else{
  10157. this.$refs['ppt'+i][0].tanDialog = false
  10158. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  10159. }
  10160. this.pptBoxDialog = true
  10161. },
  10162. createAiPpt(json, i){
  10163. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10164. // this.dialogVisibleAiCreate = false;
  10165. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10166. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10167. },
  10168. closeAiPpt(i){
  10169. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10170. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10171. },
  10172. openAiCreateVideo(i){
  10173. this.lineCount = i;
  10174. this.dialogVisibleAiCreateVideo = true;
  10175. },
  10176. createAiVideo(json){
  10177. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10178. // this.dialogVisibleAiCreateVideo = false;
  10179. },
  10180. async createTeacherAn(index, type){
  10181. // this.lineCount = index;
  10182. let md = new MarkdownIt();
  10183. if(this.courseState == 4){
  10184. this.anLoading[0] = true
  10185. // if(index == 0 || index){
  10186. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10187. // let name = _task.task+'-教案'
  10188. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10189. // await this.generate(name, _html, 0)
  10190. // }else {
  10191. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10192. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10193. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10194. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10195. await this.generate(name, _html, 0)
  10196. }
  10197. // }
  10198. }else if(this.courseState == 5){
  10199. if(type != 2){
  10200. this.anLoading[index] = true
  10201. }
  10202. if(index == 0 || index){
  10203. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10204. let name = this.lang.ssTaskNum.replace(/\*/g, index+1)+_task.task+'-'+this.lang.ssLessonPlan
  10205. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10206. await this.generate(name, _html, index,"", type)
  10207. }else {
  10208. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10209. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10210. let name = this.lang.ssTaskNum.replace(/\*/g, i+1)+_task.task+'-'+this.lang.ssLessonPlan
  10211. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10212. await this.generate(name, _html, i)
  10213. }
  10214. }
  10215. }
  10216. },
  10217. async createTaskAn(index){
  10218. // this.lineCount = index;
  10219. if(this.taskAnLoading[index]){
  10220. // this.$message.error('请等待当前学历案生成完成')
  10221. this.cancelAjax('taskAn', index)
  10222. return
  10223. }
  10224. this.taskAnLoading[index] = true
  10225. this.$forceUpdate()
  10226. let _this = this
  10227. let md = new MarkdownIt();
  10228. let messages = ""
  10229. messages = `NOTICE
  10230. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10231. Language: ${this.getLang()}
  10232. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  10233. Instruction: Based on the context, follow "Format example", write content.
  10234. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10235. ## 任务教案
  10236. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10237. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10238. let parm = {
  10239. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10240. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10241. session_name: uuidv4(),
  10242. userId: this.userid,
  10243. file_ids: [],
  10244. model: 'gpt-4o-2024-11-20',
  10245. temperature: this.mode == 3 ? 0.5 : 0.1,
  10246. }
  10247. this.ajax
  10248. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10249. .then(async (response) => {
  10250. console.log(response);
  10251. let data = response.data.FunctionResponse
  10252. if (data.message) {
  10253. console.log(data.message);
  10254. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10255. let name = _task.task+'-'+_this.lang.ssStudyPlan
  10256. 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) => {
  10257. // 去除内容为空的<li>标签
  10258. if (!content.trim()) {
  10259. return ''; // 如果<li>标签内容为空,删除该标签
  10260. }
  10261. // 去掉<li>中的标签,保留纯文本内容
  10262. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10263. }); // 去掉 <ol> 和 </ol> 标签
  10264. console.log(_html)
  10265. await _this.generate(name, _html, index, ()=>{
  10266. _this.taskAnLoading[index] = false
  10267. _this.taskAnCancelToken[index] = null
  10268. })
  10269. }else{
  10270. _this.taskAnLoading[index] = false
  10271. _this.taskAnCancelToken[index] = null
  10272. }
  10273. }).catch((error) => {
  10274. console.log(error);
  10275. _this.taskAnLoading[index] = false
  10276. _this.taskAnCancelToken[index] = null
  10277. });
  10278. },
  10279. async generate(a, html, index, callback, type) {
  10280. // <html lang="en">
  10281. // 将html文件中需要用到的数据挂载到store上
  10282. const content = `<!DOCTYPE html>
  10283. <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'>
  10284. <head>
  10285. <!--[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]-->
  10286. <meta charset="UTF-8">
  10287. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10288. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10289. <title>${a}</title>
  10290. <style>
  10291. table {
  10292. border-collapse: collapse; /* 折叠边框 */
  10293. width: 100%;
  10294. }
  10295. th, td {
  10296. border: 1px solid black; /* 线条样式 */
  10297. padding: 8px;
  10298. text-align: left;
  10299. }
  10300. </style>
  10301. </head>
  10302. <body>
  10303. ${html}
  10304. </body>
  10305. </html>`;
  10306. // debugger
  10307. const blob = htmlDocx.asBlob(content)
  10308. // debugger
  10309. let dname = a + ".docx";
  10310. // 创建文件流
  10311. // 创建bolb实例时,内容一定要放在[]中
  10312. // const blob = new Blob([content], {
  10313. // type: "text/plain;charset='utf-8'",
  10314. // });
  10315. // const file = new File([blob], dname, { type: 'application/msword' });
  10316. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10317. // let params = convertApi.createParams()
  10318. // params.add('file', file)
  10319. // try {
  10320. // let result = await convertApi.convert('docx', 'docx', params)
  10321. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10322. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10323. // });
  10324. // await this.beforeUploadHtml(file, index, callback)
  10325. // } catch (error) {
  10326. // console.log('=================','报错')
  10327. // await this.beforeUploadHtml(file, index, callback)
  10328. // return
  10329. // }
  10330. await this.beforeUploadHtml(file, index, callback, type)
  10331. },
  10332. async generateExport(a, html, index) {
  10333. // <html lang="en">
  10334. // 将html文件中需要用到的数据挂载到store上
  10335. const content = `<!DOCTYPE html>
  10336. <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'>
  10337. <head>
  10338. <!--[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]-->
  10339. <meta charset="UTF-8">
  10340. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10341. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10342. <title>${a}</title>
  10343. <style>
  10344. table {
  10345. border-collapse: collapse; /* 折叠边框 */
  10346. width: 100%;
  10347. }
  10348. th, td {
  10349. border: 1px solid black; /* 线条样式 */
  10350. padding: 8px;
  10351. text-align: left;
  10352. }
  10353. </style>
  10354. </head>
  10355. <body>
  10356. ${html}
  10357. </body>
  10358. </html>`;
  10359. // debugger
  10360. const blob = htmlDocx.asBlob(content)
  10361. // debugger
  10362. const dname = `${a}.docx`;
  10363. // 创建文件流
  10364. // const file = new File([blob], dname, { type: 'application/msword' });
  10365. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10366. // let params = convertApi.createParams()
  10367. // params.add('file', file)
  10368. // try {
  10369. // let result = await convertApi.convert('docx', 'docx', params)
  10370. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10371. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10372. // });
  10373. // // 执行下载
  10374. // saveAs(file, dname);
  10375. // } catch (error) {
  10376. // saveAs(file, dname);
  10377. // // this.$message.error('导出失败')
  10378. // }
  10379. saveAs(file, dname);
  10380. // return file
  10381. },
  10382. async generateExport2(a, html, index) {
  10383. return new Promise(async (resolve) => {
  10384. // <html lang="en">
  10385. // 将html文件中需要用到的数据挂载到store上
  10386. const content = `<!DOCTYPE html>
  10387. <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'>
  10388. <head>
  10389. <!--[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]-->
  10390. <meta charset="UTF-8">
  10391. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10392. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10393. <title>${a}</title>
  10394. <style>
  10395. table {
  10396. border-collapse: collapse; /* 折叠边框 */
  10397. width: 100%;
  10398. }
  10399. th, td {
  10400. border: 1px solid black; /* 线条样式 */
  10401. padding: 8px;
  10402. text-align: left;
  10403. }
  10404. </style>
  10405. </head>
  10406. <body>
  10407. ${html}
  10408. </body>
  10409. </html>`;
  10410. // debugger
  10411. const blob = htmlDocx.asBlob(content)
  10412. // debugger
  10413. const dname = `${a}`;
  10414. // 创建文件流
  10415. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10416. let params = convertApi.createParams()
  10417. params.add('file', file)
  10418. resolve(file); // 通过 Promise 返回 File 对象
  10419. // try {
  10420. // let result = await convertApi.convert('docx', 'docx', params)
  10421. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10422. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10423. // });
  10424. // resolve(file); // 通过 Promise 返回 File 对象
  10425. // } catch (error) {
  10426. // resolve(''); // 通过 Promise 返回 File 对象
  10427. // }
  10428. });
  10429. },
  10430. async addChatAppendixFile(name, html){
  10431. await this.generate(name, html, 0,"", 3)
  10432. },
  10433. beforeUploadHtml(event, index, callback, type) {
  10434. var file = event;
  10435. var credentials = {
  10436. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10437. secretAccessKey: "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",
  10438. }; //秘钥形式的登录上传
  10439. window.AWS.config.update(credentials);
  10440. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10441. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10442. var _this = this;
  10443. if (file) {
  10444. var params = {
  10445. Key:
  10446. file.name.split(".")[0] +
  10447. new Date().getTime() +
  10448. "." +
  10449. file.name.split(".")[file.name.split(".").length - 1],
  10450. ContentType: file.type,
  10451. Body: file,
  10452. "Access-Control-Allow-Credentials": "*",
  10453. ACL: "public-read",
  10454. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10455. var options = {
  10456. partSize: 2048 * 1024 * 1024,
  10457. queueSize: 2,
  10458. leavePartsOnError: true,
  10459. };
  10460. bucket
  10461. .upload(params, options)
  10462. .on("httpUploadProgress", function (evt) {
  10463. //这里可以写进度条
  10464. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10465. })
  10466. .send(function (err, data) {
  10467. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10468. _this.anLoading[0] = false
  10469. }
  10470. if(_this.courseState == 5){
  10471. _this.anLoading[index] = false
  10472. }
  10473. callback ? callback() : ''
  10474. _this.$forceUpdate();
  10475. if (err) {
  10476. _this.$message.error(_this.lang.ssUploadFail);
  10477. } else {
  10478. let _index = 0
  10479. // if(_this.lineCount == 0 || _this.lineCount){
  10480. // _index = _this.lineCount
  10481. // }else {
  10482. _index = index
  10483. // }
  10484. if(type != 2 && type != 3){
  10485. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10486. name: file.name,
  10487. url: data.Location,
  10488. type: 3,
  10489. })
  10490. }else{
  10491. let fileName = file.name;
  10492. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10493. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10494. let count = 1;
  10495. // 检查文件名是否已存在
  10496. while (_this.appendixFile.some(item => item.name === fileName)) {
  10497. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10498. count++;
  10499. }
  10500. if(type == 3){
  10501. _this.$message.success(_this.lang.ssSaveAttach)
  10502. _this.appendixFile.unshift({
  10503. name: fileName,
  10504. url: data.Location,
  10505. type: 3,
  10506. task: 'dialog'
  10507. })
  10508. }else{
  10509. _this.appendixFile.unshift({
  10510. name: fileName,
  10511. url: data.Location,
  10512. type: 3,
  10513. })
  10514. }
  10515. }
  10516. console.log(data.Location);
  10517. }
  10518. });
  10519. }
  10520. },
  10521. async generate2(a, html, index, callback) {
  10522. // 将html文件中需要用到的数据挂载到store上
  10523. const content = `<!DOCTYPE html>
  10524. <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'>
  10525. <head>
  10526. <!--[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]-->
  10527. <meta charset="UTF-8">
  10528. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10529. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10530. <title>${a}</title>
  10531. <style>
  10532. table {
  10533. border-collapse: collapse; /* 折叠边框 */
  10534. width: 100%;
  10535. }
  10536. th, td {
  10537. border: 1px solid black; /* 线条样式 */
  10538. padding: 8px;
  10539. text-align: left;
  10540. }
  10541. </style>
  10542. </head>
  10543. <body>
  10544. ${html}
  10545. </body>
  10546. </html>`;
  10547. const blob = htmlDocx.asBlob(content)
  10548. // debugger
  10549. let dname = a + ".docx";
  10550. // 创建文件流
  10551. // 创建bolb实例时,内容一定要放在[]中
  10552. // const blob = new Blob([content], {
  10553. // type: "text/plain;charset='utf-8'",
  10554. // });
  10555. // const file = new File([blob], dname, { type: 'application/msword' });
  10556. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10557. // let params = convertApi.createParams()
  10558. // params.add('file', file)
  10559. // try {
  10560. // let result = await convertApi.convert('docx', 'docx', params)
  10561. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10562. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10563. // });
  10564. // await this.beforeUploadHtml2(file, index, callback)
  10565. // } catch (error) {
  10566. // await this.beforeUploadHtml2(file, index, callback)
  10567. // return;
  10568. // }
  10569. await this.beforeUploadHtml2(file, index, callback)
  10570. },
  10571. beforeUploadHtml2(event, index, callback) {
  10572. var file = event;
  10573. var credentials = {
  10574. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10575. secretAccessKey: "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",
  10576. }; //秘钥形式的登录上传
  10577. window.AWS.config.update(credentials);
  10578. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10579. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10580. var _this = this;
  10581. if (file) {
  10582. var params = {
  10583. Key:
  10584. file.name.split(".")[0] +
  10585. new Date().getTime() +
  10586. "." +
  10587. file.name.split(".")[file.name.split(".").length - 1],
  10588. ContentType: file.type,
  10589. Body: file,
  10590. "Access-Control-Allow-Credentials": "*",
  10591. ACL: "public-read",
  10592. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10593. var options = {
  10594. partSize: 2048 * 1024 * 1024,
  10595. queueSize: 2,
  10596. leavePartsOnError: true,
  10597. };
  10598. bucket
  10599. .upload(params, options)
  10600. .on("httpUploadProgress", function (evt) {
  10601. //这里可以写进度条
  10602. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10603. })
  10604. .send(async function (err, data) {
  10605. if(_this.courseState == 5){
  10606. _this.loading = false
  10607. }
  10608. if (err) {
  10609. callback ? callback() : ''
  10610. _this.$message.error(_this.lang.ssUploadFail);
  10611. } else {
  10612. let fileid = await _this.createFileid(data.Location)
  10613. // _this.cankaoInfoData.push({
  10614. //                   name: file.name,
  10615. //                   url: data.Location,
  10616. //                   type: 3,
  10617. // fileid: fileid,
  10618. //   })
  10619. _this.infoData2.push({
  10620. name: file.name,
  10621. url: data.Location,
  10622. type: 3,
  10623. fileid: fileid == 1 ? '' : fileid,
  10624. })
  10625. _this.infoData.push({
  10626. name: file.name,
  10627. url: data.Location,
  10628. type: 3,
  10629. fileid: fileid == 1 ? '' : fileid,
  10630. });
  10631. console.log(data.Location);
  10632. callback ? callback() : ''
  10633. }
  10634. });
  10635. }
  10636. },
  10637. addSource() {
  10638. if (!Object.keys(this.sourceData).length) {
  10639. this.$message.error(this.lang.ssSelectResUp);
  10640. return;
  10641. }
  10642. let keys = Object.keys(this.sourceData);
  10643. for (var i = 0; i < keys.length; i++) {
  10644. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10645. this.lineCount
  10646. ].chapterData.unshift({
  10647. name: this.lang.ssLink,
  10648. title: this.sourceData[keys[i]].name,
  10649. url: this.sourceData[keys[i]].url,
  10650. type: 14,
  10651. id: keys[i],
  10652. });
  10653. }
  10654. this.$forceUpdate();
  10655. this.dialogVisibleSource = false;
  10656. },
  10657. updateSource() {
  10658. if (!Object.keys(this.sourceData).length) {
  10659. this.$message.error(this.lang.ssSelectResUp);
  10660. return;
  10661. }
  10662. let keys = Object.keys(this.sourceData);
  10663. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10664. this.taskCount
  10665. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10666. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10667. this.taskCount
  10668. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10669. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10670. this.taskCount
  10671. ].chapterData[this.lineCount].id = keys[0];
  10672. this.updateSourcePan = false;
  10673. this.$forceUpdate();
  10674. this.dialogVisibleSource = false;
  10675. },
  10676. deleteM(i, j) {
  10677. this.testJson.testJson[i].timuList.splice(j, 1);
  10678. },
  10679. beforeUploadTiMu(event, i) {
  10680. const loading = this.openLoading();
  10681. var file = event.target.files[0];
  10682. var credentials = {
  10683. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10684. secretAccessKey: "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",
  10685. }; //秘钥形式的登录上传
  10686. window.AWS.config.update(credentials);
  10687. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10688. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10689. var _this = this;
  10690. if (file) {
  10691. var params = {
  10692. Key:
  10693. file.name.split(".")[0] +
  10694. new Date().getTime() +
  10695. "." +
  10696. file.name.split(".")[file.name.split(".").length - 1],
  10697. ContentType: file.type,
  10698. Body: file,
  10699. "Access-Control-Allow-Credentials": "*",
  10700. ACL: "public-read",
  10701. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10702. var options = {
  10703. partSize: 2048 * 1024 * 1024,
  10704. queueSize: 2,
  10705. leavePartsOnError: true,
  10706. };
  10707. bucket
  10708. .upload(params, options)
  10709. .on("httpUploadProgress", function (evt) {
  10710. //这里可以写进度条
  10711. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10712. })
  10713. .send(function (err, data) {
  10714. loading.close();
  10715. if (err) {
  10716. _this.$message.error(_this.lang.ssUploadFail);
  10717. } else {
  10718. if (_this.testJson.testJson[i].timuList) {
  10719. _this.testJson.testJson[i].timuList.push({
  10720. src: data.Location,
  10721. });
  10722. } else {
  10723. _this.testJson.testJson[i].timuList = [];
  10724. _this.testJson.testJson[i].timuList.push({
  10725. src: data.Location,
  10726. });
  10727. }
  10728. _this.imgChange3(i);
  10729. _this.$forceUpdate();
  10730. }
  10731. });
  10732. }
  10733. },
  10734. beforeUploadTi(event, i, j) {
  10735. const loading = this.openLoading();
  10736. var file = event.target.files[0];
  10737. var credentials = {
  10738. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10739. secretAccessKey: "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",
  10740. }; //秘钥形式的登录上传
  10741. window.AWS.config.update(credentials);
  10742. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10743. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10744. var _this = this;
  10745. if (file) {
  10746. var params = {
  10747. Key:
  10748. file.name.split(".")[0] +
  10749. new Date().getTime() +
  10750. "." +
  10751. file.name.split(".")[file.name.split(".").length - 1],
  10752. ContentType: file.type,
  10753. Body: file,
  10754. "Access-Control-Allow-Credentials": "*",
  10755. ACL: "public-read",
  10756. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10757. var options = {
  10758. partSize: 2048 * 1024 * 1024,
  10759. queueSize: 2,
  10760. leavePartsOnError: true,
  10761. };
  10762. bucket
  10763. .upload(params, options)
  10764. .on("httpUploadProgress", function (evt) {
  10765. //这里可以写进度条
  10766. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10767. })
  10768. .send(function (err, data) {
  10769. loading.close();
  10770. if (err) {
  10771. _this.$message.error(_this.lang.ssUploadFail);
  10772. } else {
  10773. _this.testJson.testJson[i].checkList[j] = {};
  10774. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10775. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10776. _this.imgChange2(i, j);
  10777. _this.$forceUpdate();
  10778. }
  10779. });
  10780. }
  10781. },
  10782. beforeUpload1(event, type) {
  10783. // const loading = this.openLoading();
  10784. var file = event.target.files[0];
  10785. var credentials = {
  10786. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10787. secretAccessKey: "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",
  10788. }; //秘钥形式的登录上传
  10789. window.AWS.config.update(credentials);
  10790. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10791. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10792. var _this = this;
  10793. if (file) {
  10794. var params = {
  10795. Key:
  10796. file.name.split(".")[0] +
  10797. new Date().getTime() +
  10798. "." +
  10799. file.name.split(".")[file.name.split(".").length - 1],
  10800. ContentType: file.type,
  10801. Body: file,
  10802. "Access-Control-Allow-Credentials": "*",
  10803. ACL: "public-read",
  10804. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10805. var options = {
  10806. partSize: 2048 * 1024 * 1024,
  10807. queueSize: 2,
  10808. leavePartsOnError: true,
  10809. };
  10810. bucket
  10811. .upload(params, options)
  10812. .on("httpUploadProgress", function (evt) {
  10813. //这里可以写进度条
  10814. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10815. })
  10816. .send(function (err, data) {
  10817. // loading.close();
  10818. if (err) {
  10819. // var a = _this.$refs.upload1.uploadFiles;
  10820. // a.splice(a.length - 1, a.length);
  10821. _this.$message.error(_this.lang.ssUploadFail);
  10822. } else {
  10823. // _this.cover.push({
  10824. // name: file.name,
  10825. // url: data.Location,
  10826. // uid: file.uid,
  10827. // });
  10828. _this.cover = [
  10829. {
  10830. name: file.name,
  10831. url: data.Location,
  10832. uid: file.uid,
  10833. },
  10834. ];
  10835. _this.imgChange1(null, null, 1, null);
  10836. _this.choosePicVisible = false;
  10837. console.log(data.Location);
  10838. }
  10839. });
  10840. }
  10841. },
  10842. beforeUploadSelect(event, type) {
  10843. // const loading = this.openLoading();
  10844. var file = event.target.files[0];
  10845. var credentials = {
  10846. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10847. secretAccessKey: "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",
  10848. }; //秘钥形式的登录上传
  10849. window.AWS.config.update(credentials);
  10850. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10851. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10852. var _this = this;
  10853. if (file) {
  10854. var params = {
  10855. Key:
  10856. file.name.split(".")[0] +
  10857. new Date().getTime() +
  10858. "." +
  10859. file.name.split(".")[file.name.split(".").length - 1],
  10860. ContentType: file.type,
  10861. Body: file,
  10862. "Access-Control-Allow-Credentials": "*",
  10863. ACL: "public-read",
  10864. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10865. var options = {
  10866. partSize: 2048 * 1024 * 1024,
  10867. queueSize: 2,
  10868. leavePartsOnError: true,
  10869. };
  10870. bucket
  10871. .upload(params, options)
  10872. .on("httpUploadProgress", function (evt) {
  10873. //这里可以写进度条
  10874. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10875. })
  10876. .send(function (err, data) {
  10877. // loading.close();
  10878. if (err) {
  10879. _this.$message.error(_this.lang.ssUploadFail);
  10880. } else {
  10881. _this.selectJson.url = data.Location;
  10882. console.log(data.Location);
  10883. }
  10884. });
  10885. }
  10886. },
  10887. chooseSysPic(p) {
  10888. this.cover = [];
  10889. setTimeout(() => {
  10890. this.cover[0] = {
  10891. name: this.lang.ssSystemPic,
  10892. url: p,
  10893. };
  10894. this.imgChange1(null, null, 1, null);
  10895. this.$forceUpdate();
  10896. }, 0);
  10897. this.isSysPic = true;
  10898. this.isSysPic2 = false;
  10899. this.sysPicVisible = false;
  10900. this.$forceUpdate();
  10901. },
  10902. chooseSysPic2(p) {
  10903. this.cover = [];
  10904. setTimeout(() => {
  10905. this.cover[0] = {
  10906. name: this.lang.ssNetworkPic,
  10907. url: p,
  10908. };
  10909. this.imgChange1(null, null, 1, null);
  10910. this.$forceUpdate();
  10911. }, 0);
  10912. this.isSysPic2 = true;
  10913. this.isSysPic = false;
  10914. this.sysPicVisible2 = false;
  10915. this.$forceUpdate();
  10916. },
  10917. beforeUpload(data) {
  10918. this.$refs.upload1.uploadFiles;
  10919. this.uploadLoading1 = true;
  10920. var file = data.file;
  10921. var credentials = {
  10922. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10923. secretAccessKey: "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",
  10924. }; //秘钥形式的登录上传
  10925. window.AWS.config.update(credentials);
  10926. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10927. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10928. var _this = this;
  10929. if (file) {
  10930. var params = {
  10931. Key:
  10932. file.name.split(".")[0] +
  10933. new Date().getTime() +
  10934. "." +
  10935. file.name.split(".")[file.name.split(".").length - 1],
  10936. ContentType: file.type,
  10937. Body: file,
  10938. "Access-Control-Allow-Credentials": "*",
  10939. ACL: "public-read",
  10940. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10941. var options = {
  10942. partSize: 2048 * 1024 * 1024,
  10943. queueSize: 2,
  10944. leavePartsOnError: true,
  10945. };
  10946. bucket
  10947. .upload(params, options)
  10948. .on("httpUploadProgress", function (evt) {
  10949. //这里可以写进度条
  10950. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10951. })
  10952. .send(function (err, data) {
  10953. _this.uploadLoading1 = false;
  10954. if (err) {
  10955. // var a = _this.$refs.upload1.uploadFiles;
  10956. // a.splice(a.length - 1, a.length);
  10957. _this.$message.error(_this.lang.ssUploadFail);
  10958. } else {
  10959. //上传成功处理
  10960. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10961. name: file.name,
  10962. url: data.Location,
  10963. uid: file.uid,
  10964. });
  10965. _this.imgChange();
  10966. console.log(data.Location);
  10967. }
  10968. });
  10969. }
  10970. },
  10971. onExceed() {
  10972. this.$message.error(this.lang.ssCoverOneUp);
  10973. },
  10974. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10975. let file = "";
  10976. let cfindex2 = 0;
  10977. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10978. // var file = event.target.files[0];
  10979. file = event.target.files[cfindex];
  10980. let fileName = file.name
  10981. let fileUid = file.uid
  10982. // const loading = this.openLoading();
  10983. // var file = event.target.files[0];
  10984. var credentials = {
  10985. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10986. secretAccessKey: "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",
  10987. }; //秘钥形式的登录上传
  10988. window.AWS.config.update(credentials);
  10989. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10990. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10991. var _this = this;
  10992. if (type == 3) {
  10993. var b = [
  10994. "DOC",
  10995. "DOCX",
  10996. "DOCM",
  10997. "DOTM",
  10998. "DOTX",
  10999. "PPTX",
  11000. "PPSX",
  11001. "PPT",
  11002. "PPS",
  11003. "PPTM",
  11004. "POTM",
  11005. "PPAM",
  11006. "POTX",
  11007. "PPSM",
  11008. ];
  11009. if (
  11010. b.indexOf(
  11011. file.name
  11012. .split(".")
  11013. [file.name.split(".").length - 1].toLocaleUpperCase()
  11014. ) != -1
  11015. ) {
  11016. if (file.size / 1024 / 1024 > 80) {
  11017. this.$message.error(this.lang.ssFileOver80MB);
  11018. this.inputShow = true;
  11019. // var a = _this.$refs.upload1.uploadFiles;
  11020. // a.splice(a.length - 1, a.length);
  11021. // loading.close();
  11022. return;
  11023. }
  11024. } else if (
  11025. file.name
  11026. .split(".")
  11027. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11028. ) {
  11029. if (file.size / 1024 / 1024 > 80) {
  11030. this.$message.error(this.lang.ssAddFileOver80);
  11031. this.inputShow = true;
  11032. // var a = _this.$refs.upload1.uploadFiles;
  11033. // a.splice(a.length - 1, a.length);
  11034. // loading.close();
  11035. return;
  11036. }
  11037. }
  11038. }
  11039. this.inputShow = false;
  11040. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11041. // itemTaskIndex
  11042. // ].progress = 0;
  11043. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11044. itemTaskIndex
  11045. ].proVisible = true;
  11046. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11047. itemTaskIndex
  11048. ].isFinishSize = 0;
  11049. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11050. itemTaskIndex
  11051. ].isAllSize = event.target.files.length;
  11052. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11053. // itemTaskIndex
  11054. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11055. _this.$forceUpdate();
  11056. if (file) {
  11057. var params = {
  11058. Key:
  11059. file.name.split(".")[0] +
  11060. new Date().getTime() +
  11061. "." +
  11062. file.name.split(".")[file.name.split(".").length - 1],
  11063. ContentType: file.type,
  11064. Body: file,
  11065. "Access-Control-Allow-Credentials": "*",
  11066. ACL: "public-read",
  11067. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11068. var options = {
  11069. partSize: 2048 * 1024 * 1024,
  11070. queueSize: 2,
  11071. leavePartsOnError: true,
  11072. };
  11073. bucket
  11074. .upload(params, options)
  11075. .on("httpUploadProgress", function (evt) {
  11076. //这里可以写进度条
  11077. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11078. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11079. // itemTaskIndex
  11080. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  11081. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11082. // itemTaskIndex
  11083. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11084. // _this.$forceUpdate();
  11085. })
  11086. .send(function (err, data) {
  11087. cfindex2++
  11088. // loading.close();
  11089. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11090. // itemTaskIndex
  11091. // ].progress = 100;
  11092. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11093. itemTaskIndex
  11094. ].isFinishSize = cfindex2
  11095. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11096. // itemTaskIndex
  11097. // ].isAllSize;
  11098. _this.$forceUpdate();
  11099. setTimeout(() => {
  11100. if (
  11101. cfindex2 == event.target.files.length ||
  11102. cfindex2 > event.target.files.length
  11103. ) {
  11104. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11105. itemTaskIndex
  11106. ].proVisible = false;
  11107. }
  11108. _this.$forceUpdate();
  11109. }, 1000);
  11110. _this.inputShow = true;
  11111. if (err) {
  11112. // var a = _this.$refs.upload1.uploadFiles;
  11113. // a.splice(a.length - 1, a.length);
  11114. _this.$message.error(_this.lang.ssUploadFail);
  11115. } else {
  11116. if (type == 13) {
  11117. let _type = 2;
  11118. var imgA = [
  11119. "png",
  11120. "jpg",
  11121. "jpeg",
  11122. "bmp",
  11123. "gif",
  11124. "webp",
  11125. "psd",
  11126. "svg",
  11127. "tiff",
  11128. ];
  11129. var fileA = [
  11130. "PDF",
  11131. "DOC",
  11132. "DOCX",
  11133. "DOCM",
  11134. "DOTM",
  11135. "DOTX",
  11136. "PPTX",
  11137. "PPSX",
  11138. "PPT",
  11139. "PPS",
  11140. "PPTM",
  11141. "POTM",
  11142. "PPAM",
  11143. "POTX",
  11144. "PPSM",
  11145. "XLSX",
  11146. "XLS",
  11147. ];
  11148. var videoA = [
  11149. "AVI",
  11150. "NAVI",
  11151. "MPEG",
  11152. "ASF",
  11153. "MOV",
  11154. "WMV",
  11155. "3GP",
  11156. "RM",
  11157. "RMVB",
  11158. "FLV",
  11159. "F4V",
  11160. "H.264",
  11161. "H.265",
  11162. "REAL VIDEO",
  11163. "MKV",
  11164. "WebM",
  11165. "HDDVD",
  11166. "MP4",
  11167. "MPG",
  11168. "M4V",
  11169. "MGV",
  11170. "OGV",
  11171. "QTM",
  11172. "STR",
  11173. "AMC",
  11174. "DVX",
  11175. "EVO",
  11176. "DAT",
  11177. "OGG",
  11178. "OGM",
  11179. ];
  11180. if (
  11181. fileA.indexOf(
  11182. data.Location.split(".")[
  11183. data.Location.split(".").length - 1
  11184. ].toLocaleUpperCase()
  11185. ) != -1
  11186. ) {
  11187. _type = 3;
  11188. } else if (
  11189. videoA.indexOf(
  11190. data.Location.split(".")[
  11191. data.Location.split(".").length - 1
  11192. ].toLocaleUpperCase()
  11193. ) != -1
  11194. ) {
  11195. _type = 2;
  11196. } else if (
  11197. imgA.indexOf(
  11198. data.Location.split(".")[
  11199. data.Location.split(".").length - 1
  11200. ].toLocaleLowerCase()
  11201. ) != -1
  11202. ) {
  11203. _type = 13;
  11204. } else {
  11205. _type = 12;
  11206. }
  11207. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11208. itemTaskIndex
  11209. ].chapterData.unshift({
  11210. name: fileName,
  11211. url: data.Location,
  11212. uid: fileUid,
  11213. type: _type,
  11214. });
  11215. _this.imgChange1(null, null, _type, itemTaskIndex);
  11216. } else if (type == 2 || type == 3 || type == 12) {
  11217. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11218. itemTaskIndex
  11219. ].chapterData.unshift({
  11220. name: fileName,
  11221. url: data.Location,
  11222. uid: fileUid,
  11223. type: type,
  11224. });
  11225. _this.imgChange1(null, null, type, itemTaskIndex);
  11226. } else if (type == 4) {
  11227. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11228. itemTaskIndex
  11229. ].fileList1.push({
  11230. name: fileName,
  11231. url: data.Location,
  11232. uid: fileUid,
  11233. });
  11234. _this.imgChange1(null, null, type, itemTaskIndex);
  11235. } else if (type == 5) {
  11236. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11237. itemTaskIndex
  11238. ].homeworkList.push({
  11239. name: fileName,
  11240. url: data.Location,
  11241. uid: fileUid,
  11242. });
  11243. _this.imgChange1(null, null, type, itemTaskIndex);
  11244. }
  11245. console.log(data.Location);
  11246. }
  11247. });
  11248. }
  11249. }
  11250. },
  11251. async beforeUploadInfo2(event, type, tindex) {
  11252. // const loading = this.openLoading();
  11253. let file = "";
  11254. let cfindex2 = 0;
  11255. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11256. // var file = event.target.files[0];
  11257. file = event.target.files[cfindex];
  11258. let fileName = file.name
  11259. let fileUid = file.uid
  11260. var credentials = {
  11261. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11262. secretAccessKey: "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",
  11263. }; //秘钥形式的登录上传
  11264. window.AWS.config.update(credentials);
  11265. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11266. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11267. var _this = this;
  11268. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11269. if (
  11270. xianObj.indexOf(
  11271. file.name
  11272. .split(".")
  11273. [file.name.split(".").length - 1].toLocaleUpperCase()
  11274. ) == -1
  11275. ) {
  11276. this.$message.error(this.lang.ssUploadDocPptFiles);
  11277. this.inputShow = true;
  11278. // var a = _this.$refs.upload1.uploadFiles;
  11279. // a.splice(a.length - 1, a.length);
  11280. // loading.close();
  11281. return;
  11282. }
  11283. // if (
  11284. // ['DOC'].indexOf(
  11285. // file.name
  11286. // .split(".")
  11287. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11288. // ) !== -1
  11289. // ) {
  11290. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11291. // this.inputShow = true;
  11292. // return;
  11293. // }
  11294. if (type == 3) {
  11295. var b = [
  11296. "DOC",
  11297. "DOCX",
  11298. "DOCM",
  11299. "DOTM",
  11300. "DOTX",
  11301. "PPTX",
  11302. "PPSX",
  11303. "PPT",
  11304. "PPS",
  11305. "PPTM",
  11306. "POTM",
  11307. "PPAM",
  11308. "POTX",
  11309. "PPSM",
  11310. ];
  11311. if (
  11312. b.indexOf(
  11313. file.name
  11314. .split(".")
  11315. [file.name.split(".").length - 1].toLocaleUpperCase()
  11316. ) != -1
  11317. ) {
  11318. if (file.size / 1024 / 1024 > 80) {
  11319. this.$message.error(this.lang.ssFileOver80MB);
  11320. this.inputShow = true;
  11321. // var a = _this.$refs.upload1.uploadFiles;
  11322. // a.splice(a.length - 1, a.length);
  11323. // loading.close();
  11324. return;
  11325. }
  11326. } else if (
  11327. file.name
  11328. .split(".")
  11329. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11330. ) {
  11331. if (file.size / 1024 / 1024 > 80) {
  11332. this.$message.error(this.lang.ssAddFileOver80);
  11333. this.inputShow = true;
  11334. // var a = _this.$refs.upload1.uploadFiles;
  11335. // a.splice(a.length - 1, a.length);
  11336. // loading.close();
  11337. return;
  11338. }
  11339. }
  11340. }
  11341. this.inputShow = false;
  11342. if(type == 14){
  11343. // _this.teacherinfoprogress = 0;
  11344. _this.teacherinfoproVisible = true;
  11345. _this.teacherinfoisFinishSize = 0;
  11346. _this.teacherinfoisAllSize = event.target.files.length;
  11347. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11348. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11349. }else if(type == 16){
  11350. _this.mubiaoinfoprogress = 0;
  11351. _this.mubiaoinfoproVisible = true;
  11352. _this.mubiaoinfoisFinishSize = 0;
  11353. _this.mubiaoinfoisAllSize = event.target.files.length;
  11354. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11355. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11356. }else if(type == 17){
  11357. _this.xuanzeinfoprogress = 0;
  11358. _this.xuanzeinfoproVisible = true;
  11359. _this.xuanzeinfoisFinishSize = 0;
  11360. _this.xuanzeinfoisAllSize = event.target.files.length;
  11361. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11362. }else if(type == 18){
  11363. _this.pingjiainfoprogress[tindex] = 0;
  11364. _this.pingjiainfoproVisible[tindex] = true;
  11365. _this.pingjiainfoisFinishSize[tindex] = 0;
  11366. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11367. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11368. }else if(type == 19){
  11369. _this.knowinfoprogress = 0;
  11370. _this.knowinfoproVisible = true;
  11371. _this.knowinfoisFinishSize = 0;
  11372. _this.knowinfoisAllSize = event.target.files.length;
  11373. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11374. }else if(type == 20){
  11375. _this.knowinfoprogress2 = 0;
  11376. _this.knowinfoproVisible2 = true;
  11377. _this.knowinfoisFinishSize2 = 0;
  11378. _this.knowinfoisAllSize2 = event.target.files.length;
  11379. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11380. }else{
  11381. _this.infoprogress = 0;
  11382. _this.infoproVisible = true;
  11383. _this.infoisFinishSize = 0;
  11384. _this.infoisAllSize = event.target.files.length;
  11385. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11386. }
  11387. // if (
  11388. // ['DOC'].indexOf(
  11389. // file.name
  11390. // .split(".")
  11391. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11392. // ) !== -1
  11393. // ) {
  11394. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11395. // // this.inputShow = true;
  11396. // let params = convertApi.createParams()
  11397. // params.add('file', file)
  11398. // try {
  11399. // let result = await convertApi.convert('doc', 'docx', params);
  11400. // // Get result file URL
  11401. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11402. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11403. // });
  11404. // console.log(result)
  11405. // console.log(file)
  11406. // } catch (error) {
  11407. // cfindex2++;
  11408. // if(type == 14){
  11409. // _this.teacherinfoisFinishSize = cfindex2;
  11410. // }else if(type == 16){
  11411. // _this.mubiaoinfoisFinishSize = cfindex2;
  11412. // }else if(type == 17){
  11413. // _this.xuanzeinfoisFinishSize = cfindex2;
  11414. // }else if(type == 18){
  11415. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11416. // }else if(type == 19){
  11417. // _this.knowinfoisFinishSize = cfindex2;
  11418. // }else if(type == 20){
  11419. // _this.knowinfoisFinishSize2 = cfindex2;
  11420. // }else {
  11421. // _this.infoisFinishSize = cfindex2;
  11422. // }
  11423. // setTimeout(() => {
  11424. // if (
  11425. // cfindex2 == event.target.files.length ||
  11426. // cfindex2 > event.target.files.length
  11427. // ) {
  11428. // if(type == 14){
  11429. // _this.teacherinfoproVisible = false;
  11430. // }else if(type == 16){
  11431. // _this.mubiaoinfoproVisible = false;
  11432. // }else if(type == 17){
  11433. // _this.xuanzeinfoproVisible = false;
  11434. // }else if(type == 18){
  11435. // _this.pingjiainfoproVisible[tindex] = false;
  11436. // }else if(type == 19){
  11437. // _this.knowinfoproVisible = false;
  11438. // }else if(type == 20){
  11439. // _this.knowinfoproVisible2 = false;
  11440. // }else{
  11441. // _this.infoproVisible = false;
  11442. // }
  11443. // }
  11444. // _this.$forceUpdate();
  11445. // }, 1000);
  11446. // _this.inputShow = true;
  11447. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11448. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11449. // return; // 直接返回,不继续执行后续代码
  11450. // }
  11451. // // return;
  11452. // }
  11453. _this.$forceUpdate();
  11454. if (file) {
  11455. var params = {
  11456. Key:
  11457. file.name.split(".")[0] +
  11458. new Date().getTime() +
  11459. "." +
  11460. file.name.split(".")[file.name.split(".").length - 1],
  11461. ContentType: file.type,
  11462. Body: file,
  11463. "Access-Control-Allow-Credentials": "*",
  11464. ACL: "public-read",
  11465. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11466. var options = {
  11467. partSize: 2048 * 1024 * 1024,
  11468. queueSize: 2,
  11469. leavePartsOnError: true,
  11470. };
  11471. bucket
  11472. .upload(params, options)
  11473. .on("httpUploadProgress", function (evt) {
  11474. //这里可以写进度条
  11475. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11476. // if(type == 14){
  11477. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11478. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11479. // }else if(type == 16){
  11480. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11481. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11482. // }else if(type == 17){
  11483. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11484. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11485. // }else if(type == 18){
  11486. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11487. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11488. // }else {
  11489. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11490. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11491. // }
  11492. _this.$forceUpdate();
  11493. })
  11494. .send(async function (err, data) {
  11495. // loading.close();
  11496. // if(type == 14){
  11497. // _this.teacherinfoprogress = 100;
  11498. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11499. // }else if(type == 16){
  11500. // _this.mubiaoinfoprogress = 100;
  11501. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11502. // }else if(type == 17){
  11503. // _this.xuanzeinfoprogress = 100;
  11504. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11505. // }else if(type == 18){
  11506. // _this.pingjiainfoprogress[tindex] = 100;
  11507. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11508. // }else {
  11509. // _this.infoprogress = 100;
  11510. // _this.infoisFinishSize = _this.infoisAllSize;
  11511. // }
  11512. _this.$forceUpdate();
  11513. _this.inputShow = true;
  11514. if (err) {
  11515. cfindex2++;
  11516. if(type == 14){
  11517. _this.teacherinfoisFinishSize = cfindex2;
  11518. }else if(type == 16){
  11519. _this.mubiaoinfoisFinishSize = cfindex2;
  11520. }else if(type == 17){
  11521. _this.xuanzeinfoisFinishSize = cfindex2;
  11522. }else if(type == 18){
  11523. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11524. }else if(type == 19){
  11525. _this.knowinfoisFinishSize = cfindex2;
  11526. }else if(type == 20){
  11527. _this.knowinfoisFinishSize2 = cfindex2;
  11528. }else {
  11529. _this.infoisFinishSize = cfindex2;
  11530. }
  11531. setTimeout(() => {
  11532. if (
  11533. cfindex2 == event.target.files.length ||
  11534. cfindex2 > event.target.files.length
  11535. ) {
  11536. if(type == 14){
  11537. _this.teacherinfoproVisible = false;
  11538. }else if(type == 16){
  11539. _this.mubiaoinfoproVisible = false;
  11540. }else if(type == 17){
  11541. _this.xuanzeinfoproVisible = false;
  11542. }else if(type == 18){
  11543. _this.pingjiainfoproVisible[tindex] = false;
  11544. }else if(type == 19){
  11545. _this.knowinfoproVisible = false;
  11546. }else if(type == 20){
  11547. _this.knowinfoproVisible2 = false;
  11548. }else{
  11549. _this.infoproVisible = false;
  11550. }
  11551. }
  11552. _this.$forceUpdate();
  11553. }, 1000);
  11554. // var a = _this.$refs.upload1.uploadFiles;
  11555. // a.splice(a.length - 1, a.length);
  11556. _this.$message.error(_this.lang.ssUploadFail);
  11557. } else {
  11558. let fileid = await _this.createFileid(data.Location)
  11559. if(fileid){
  11560. cfindex2++;
  11561. if(type == 14){
  11562. _this.teacherinfoisFinishSize = cfindex2;
  11563. }else if(type == 16){
  11564. _this.mubiaoinfoisFinishSize = cfindex2;
  11565. }else if(type == 17){
  11566. _this.xuanzeinfoisFinishSize = cfindex2;
  11567. }else if(type == 18){
  11568. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11569. }else if(type == 19){
  11570. _this.knowinfoisFinishSize = cfindex2;
  11571. }else if(type == 20){
  11572. _this.knowinfoisFinishSize2 = cfindex2;
  11573. }else {
  11574. _this.infoisFinishSize = cfindex2;
  11575. }
  11576. if (
  11577. cfindex2 == event.target.files.length ||
  11578. cfindex2 > event.target.files.length
  11579. ) {
  11580. if(type == 14){
  11581. _this.teacherinfoproVisible = false;
  11582. }else if(type == 16){
  11583. _this.mubiaoinfoproVisible = false;
  11584. }else if(type == 17){
  11585. _this.xuanzeinfoproVisible = false;
  11586. }else if(type == 18){
  11587. _this.pingjiainfoproVisible[tindex] = false;
  11588. }else if(type == 19){
  11589. _this.knowinfoproVisible = false;
  11590. }else if(type == 20){
  11591. _this.knowinfoproVisible2 = false;
  11592. }else{
  11593. _this.infoproVisible = false;
  11594. }
  11595. }
  11596. _this.$forceUpdate();
  11597. }
  11598. if(fileid == 1){
  11599. _this.$message.error(_this.lang.ssFileIdError);
  11600. return;
  11601. }
  11602. var imgA = [
  11603. "png",
  11604. "jpg",
  11605. "jpeg",
  11606. "bmp",
  11607. "gif",
  11608. "webp",
  11609. "psd",
  11610. "svg",
  11611. "tiff",
  11612. ];
  11613. var fileA = [
  11614. "PDF",
  11615. "DOC",
  11616. "DOCX",
  11617. "DOCM",
  11618. "DOTM",
  11619. "DOTX",
  11620. "PPTX",
  11621. "PPSX",
  11622. "PPT",
  11623. "PPS",
  11624. "PPTM",
  11625. "POTM",
  11626. "PPAM",
  11627. "POTX",
  11628. "PPSM",
  11629. "XLSX",
  11630. "XLS",
  11631. ];
  11632. var videoA = [
  11633. "AVI",
  11634. "NAVI",
  11635. "MPEG",
  11636. "ASF",
  11637. "MOV",
  11638. "WMV",
  11639. "3GP",
  11640. "RM",
  11641. "RMVB",
  11642. "FLV",
  11643. "F4V",
  11644. "H.264",
  11645. "H.265",
  11646. "REAL VIDEO",
  11647. "MKV",
  11648. "WebM",
  11649. "HDDVD",
  11650. "MP4",
  11651. "MPG",
  11652. "M4V",
  11653. "MGV",
  11654. "OGV",
  11655. "QTM",
  11656. "STR",
  11657. "AMC",
  11658. "DVX",
  11659. "EVO",
  11660. "DAT",
  11661. "OGG",
  11662. "OGM",
  11663. ];
  11664. let _type = 2;
  11665. if (
  11666. fileA.indexOf(
  11667. data.Location.split(".")[
  11668. data.Location.split(".").length - 1
  11669. ].toLocaleUpperCase()
  11670. ) != -1
  11671. ) {
  11672. _type = 3;
  11673. } else if (
  11674. videoA.indexOf(
  11675. data.Location.split(".")[
  11676. data.Location.split(".").length - 1
  11677. ].toLocaleUpperCase()
  11678. ) != -1
  11679. ) {
  11680. _type = 2;
  11681. } else if (
  11682. imgA.indexOf(
  11683. data.Location.split(".")[
  11684. data.Location.split(".").length - 1
  11685. ].toLocaleLowerCase()
  11686. ) != -1
  11687. ) {
  11688. _type = 13;
  11689. } else {
  11690. _type = 12;
  11691. }
  11692. if (type == 13) {
  11693. _this.infoData.push({
  11694. name: fileName,
  11695. url: data.Location,
  11696. uid: fileUid,
  11697. type: _type,
  11698. fileid: fileid == 1 ? '' : fileid,
  11699. });
  11700. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11701. name: fileName,
  11702. url: data.Location,
  11703. uid: fileUid,
  11704. type: _type,
  11705. fileid: fileid == 1 ? '' : fileid,
  11706. })
  11707. }else if (type == 14) {
  11708. _this.teacherInfoData.push({
  11709. name: fileName,
  11710. url: data.Location,
  11711. uid: fileUid,
  11712. type: _type,
  11713. fileid: fileid == 1 ? '' : fileid,
  11714. });
  11715. _this.infoData2.push({
  11716. name: fileName,
  11717. url: data.Location,
  11718. uid: fileUid,
  11719. type: _type,
  11720. fileid: fileid == 1 ? '' : fileid,
  11721. });
  11722. _this.infoData.push({
  11723. name: fileName,
  11724. url: data.Location,
  11725. uid: fileUid,
  11726. type: _type,
  11727. fileid: fileid == 1 ? '' : fileid,
  11728. });
  11729. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11730. name: fileName,
  11731. url: data.Location,
  11732. uid: fileUid,
  11733. type: _type,
  11734. fileid: fileid == 1 ? '' : fileid,
  11735. })
  11736. }else if (type == 15) {
  11737. _this.infoData2.push({
  11738. name: fileName,
  11739. url: data.Location,
  11740. uid: fileUid,
  11741. type: _type,
  11742. fileid: fileid == 1 ? '' : fileid,
  11743. });
  11744. _this.infoData.push({
  11745. name: fileName,
  11746. url: data.Location,
  11747. uid: fileUid,
  11748. type: _type,
  11749. fileid: fileid == 1 ? '' : fileid,
  11750. });
  11751. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11752. name: fileName,
  11753. url: data.Location,
  11754. uid: fileUid,
  11755. type: _type,
  11756. fileid: fileid == 1 ? '' : fileid,
  11757. })
  11758. }else if (type == 16) {
  11759. _this.mubiaoInfoData.push({
  11760. name: fileName,
  11761. url: data.Location,
  11762. uid: fileUid,
  11763. type: _type,
  11764. fileid: fileid == 1 ? '' : fileid,
  11765. });
  11766. }else if (type == 17) {
  11767. _this.xuanzeInfoData.push({
  11768. name: fileName,
  11769. url: data.Location,
  11770. uid: fileUid,
  11771. type: _type,
  11772. fileid: fileid == 1 ? '' : fileid,
  11773. });
  11774. }else if (type == 18) {
  11775. if(!_this.pingjiaInfoData[tindex]){
  11776. _this.pingjiaInfoData[tindex] = []
  11777. }
  11778. _this.pingjiaInfoData[tindex].push({
  11779. name: fileName,
  11780. url: data.Location,
  11781. uid: fileUid,
  11782. type: _type,
  11783. fileid: fileid == 1 ? '' : fileid,
  11784. });
  11785. }else if (type == 19) {
  11786. _this.knowInfoData.push({
  11787. name: fileName,
  11788. url: data.Location,
  11789. uid: fileUid,
  11790. type: _type,
  11791. fileid: fileid == 1 ? '' : fileid,
  11792. });
  11793. if(fileid != 1){
  11794. _this.knowFileids.push(fileid)
  11795. }
  11796. }else if (type == 20) {
  11797. _this.knowInfoData2.push({
  11798. name: fileName,
  11799. url: data.Location,
  11800. uid: fileUid,
  11801. type: _type,
  11802. fileid: fileid == 1 ? '' : fileid,
  11803. });
  11804. if(fileid != 1){
  11805. _this.knowFileids2.push(fileid)
  11806. }
  11807. }
  11808. console.log(data.Location);
  11809. console.log(fileName,'----------',fileid);
  11810. }
  11811. });
  11812. }
  11813. }
  11814. },
  11815. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11816. // const loading = this.openLoading();
  11817. var file = event.target.files[0];
  11818. var credentials = {
  11819. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11820. secretAccessKey: "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",
  11821. }; //秘钥形式的登录上传
  11822. window.AWS.config.update(credentials);
  11823. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11824. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11825. var _this = this;
  11826. if (type == 3) {
  11827. var b = [
  11828. "DOC",
  11829. "DOCX",
  11830. "DOCM",
  11831. "DOTM",
  11832. "DOTX",
  11833. "PPTX",
  11834. "PPSX",
  11835. "PPT",
  11836. "PPS",
  11837. "PPTM",
  11838. "POTM",
  11839. "PPAM",
  11840. "POTX",
  11841. "PPSM",
  11842. ];
  11843. if (
  11844. b.indexOf(
  11845. file.name
  11846. .split(".")
  11847. [file.name.split(".").length - 1].toLocaleUpperCase()
  11848. ) != -1
  11849. ) {
  11850. if (file.size / 1024 / 1024 > 80) {
  11851. this.$message.error(this.lang.ssFileOver80MB);
  11852. this.inputShow = true;
  11853. // var a = _this.$refs.upload1.uploadFiles;
  11854. // a.splice(a.length - 1, a.length);
  11855. // loading.close();
  11856. return;
  11857. }
  11858. } else if (
  11859. file.name
  11860. .split(".")
  11861. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11862. ) {
  11863. if (file.size / 1024 / 1024 > 80) {
  11864. this.$message.error(this.lang.ssAddFileOver80);
  11865. this.inputShow = true;
  11866. // var a = _this.$refs.upload1.uploadFiles;
  11867. // a.splice(a.length - 1, a.length);
  11868. // loading.close();
  11869. return;
  11870. }
  11871. }
  11872. }
  11873. this.inputShow = false;
  11874. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11875. itemTaskIndex
  11876. ].progress = 0;
  11877. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11878. itemTaskIndex
  11879. ].proVisible = true;
  11880. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11881. itemTaskIndex
  11882. ].isFinishSize = 0;
  11883. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11884. itemTaskIndex
  11885. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11886. _this.$forceUpdate();
  11887. if (file) {
  11888. var params = {
  11889. Key:
  11890. file.name.split(".")[0] +
  11891. new Date().getTime() +
  11892. "." +
  11893. file.name.split(".")[file.name.split(".").length - 1],
  11894. ContentType: file.type,
  11895. Body: file,
  11896. "Access-Control-Allow-Credentials": "*",
  11897. ACL: "public-read",
  11898. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11899. var options = {
  11900. partSize: 2048 * 1024 * 1024,
  11901. queueSize: 2,
  11902. leavePartsOnError: true,
  11903. };
  11904. bucket
  11905. .upload(params, options)
  11906. .on("httpUploadProgress", function (evt) {
  11907. //这里可以写进度条
  11908. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11909. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11910. itemTaskIndex
  11911. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11912. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11913. itemTaskIndex
  11914. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11915. _this.$forceUpdate();
  11916. })
  11917. .send(function (err, data) {
  11918. // loading.close();
  11919. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11920. itemTaskIndex
  11921. ].progress = 100;
  11922. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11923. itemTaskIndex
  11924. ].isFinishSize =
  11925. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11926. itemTaskIndex
  11927. ].isAllSize;
  11928. _this.$forceUpdate();
  11929. setTimeout(() => {
  11930. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11931. itemTaskIndex
  11932. ].proVisible = false;
  11933. _this.$forceUpdate();
  11934. }, 1000);
  11935. _this.inputShow = true;
  11936. if (err) {
  11937. // var a = _this.$refs.upload1.uploadFiles;
  11938. // a.splice(a.length - 1, a.length);
  11939. _this.$message.error(_this.lang.ssUploadFail);
  11940. } else {
  11941. if (type == 2 || type == 3) {
  11942. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11943. itemTaskIndex
  11944. ].chapterData.unshift({
  11945. name: file.name,
  11946. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11947. // itemTaskIndex
  11948. // ].chapterData.length+1),
  11949. url: data.Location,
  11950. uid: file.uid,
  11951. type: type,
  11952. text: string,
  11953. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11954. // itemTaskIndex
  11955. // ].chapterData.length + 1),
  11956. });
  11957. _this.imgChange1(null, null, type, itemTaskIndex);
  11958. } else if (type == 4) {
  11959. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11960. itemTaskIndex
  11961. ].fileList1.push({
  11962. name: file.name,
  11963. url: data.Location,
  11964. uid: file.uid,
  11965. });
  11966. _this.imgChange1(null, null, type, itemTaskIndex);
  11967. } else if (type == 5) {
  11968. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11969. itemTaskIndex
  11970. ].homeworkList.push({
  11971. name: file.name,
  11972. url: data.Location,
  11973. uid: file.uid,
  11974. });
  11975. _this.imgChange1(null, null, type, itemTaskIndex);
  11976. }
  11977. console.log(data.Location);
  11978. }
  11979. });
  11980. }
  11981. },
  11982. addunit() {
  11983. this.unitJson.push({
  11984. dyName: "", //单元标题
  11985. isUpdate: 1,
  11986. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11987. chapterInfo: [
  11988. {
  11989. isread: false,
  11990. chapterid: this.guid(),
  11991. title: "",
  11992. courseName: "",
  11993. taskJson: [
  11994. {
  11995. task: "",
  11996. taskDetail: "",
  11997. chapterData: [],
  11998. toolText: "",
  11999. toolChoose: [
  12000. {
  12001. tool: [],
  12002. toolDetail: "",
  12003. toolType: 0,
  12004. askCount: 1,
  12005. askTitle: "",
  12006. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12007. },
  12008. ],
  12009. isShowTools: false,
  12010. askCount: 1,
  12011. isFold: 1,
  12012. askTitle: "",
  12013. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12014. checkJson: [{ checkCount: [], checkPerent: [] }],
  12015. homeworkList: [],
  12016. },
  12017. ],
  12018. itemCount: 1,
  12019. fileList1: [],
  12020. video: [],
  12021. testData: [],
  12022. pData: [],
  12023. templateArray: [],
  12024. },
  12025. ],
  12026. });
  12027. this.addindex = this.unitJson.length - 1;
  12028. setTimeout(() => {
  12029. this.unitIndex = this.unitJson.length - 1;
  12030. setTimeout(() => {
  12031. console.log(this.$refs.dyInput);
  12032. this.$refs.dyInput[0].focus();
  12033. }, 100);
  12034. this.unitSet(this.unitIndex);
  12035. }, 0);
  12036. },
  12037. addToolFun(itemTaskIndex) {
  12038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12039. itemTaskIndex
  12040. ].toolChoose.push({
  12041. tool: [],
  12042. toolDetail: "",
  12043. toolType: 0,
  12044. askCount: 1,
  12045. askTitle: "",
  12046. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12047. });
  12048. },
  12049. addTaskBorder() {
  12050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  12051. task: "",
  12052. taskDetail: "",
  12053. chapterData: [],
  12054. toolText: "",
  12055. toolChoose: [
  12056. {
  12057. tool: [],
  12058. toolDetail: "",
  12059. toolType: 0,
  12060. askCount: 1,
  12061. askTitle: "",
  12062. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12063. },
  12064. ],
  12065. isShowTools: false,
  12066. askCount: 1,
  12067. isFold: 1, //任务收起状态
  12068. askTitle: "",
  12069. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12070. checkJson: [{ checkCount: [], checkPerent: [] }],
  12071. homeworkList: [],
  12072. });
  12073. setTimeout(() => {
  12074. this.checkEva(this.checkId);
  12075. setTimeout(() => {
  12076. this.checkEva(this.checkId);
  12077. }, 100);
  12078. }, 100);
  12079. },
  12080. addTaskBorder2(type, index) {
  12081. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  12082. this.$message({
  12083. message: this.lang.ssOutGenWait,
  12084. type: "warning"
  12085. });
  12086. return;
  12087. }
  12088. if(type == 1){
  12089. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  12090. task: "",
  12091. isTask2: true,
  12092. isTask3: true,
  12093. taskDetail: "",
  12094. chapterData: [],
  12095. toolText: "",
  12096. toolChoose: [
  12097. {
  12098. tool: [],
  12099. toolDetail: "",
  12100. toolType: 0,
  12101. askCount: 1,
  12102. askTitle: "",
  12103. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12104. },
  12105. ],
  12106. isShowTools: false,
  12107. askCount: 1,
  12108. isFold: 0, //任务收起状态
  12109. askTitle: "",
  12110. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12111. checkJson: [{ checkCount: [], checkPerent: [] }],
  12112. homeworkList: [],
  12113. })
  12114. }else if(type == 2){
  12115. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  12116. task: "",
  12117. isTask2: true,
  12118. isTask3: true,
  12119. taskDetail: "",
  12120. chapterData: [],
  12121. toolText: "",
  12122. toolChoose: [
  12123. {
  12124. tool: [],
  12125. toolDetail: "",
  12126. toolType: 0,
  12127. askCount: 1,
  12128. askTitle: "",
  12129. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12130. },
  12131. ],
  12132. isShowTools: false,
  12133. askCount: 1,
  12134. isFold: 0, //任务收起状态
  12135. askTitle: "",
  12136. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12137. checkJson: [{ checkCount: [], checkPerent: [] }],
  12138. homeworkList: [],
  12139. })
  12140. }
  12141. setTimeout(() => {
  12142. this.checkEva(this.checkId);
  12143. setTimeout(() => {
  12144. this.checkEva(this.checkId);
  12145. }, 100);
  12146. }, 100);
  12147. },
  12148. add(e, i) {
  12149. var el = e.currentTarget;
  12150. el.getElementsByTagName("input")[0].click();
  12151. },
  12152. fold(i, e) {
  12153. if (
  12154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  12155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  12156. ) {
  12157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  12158. } else {
  12159. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12160. }
  12161. },
  12162. fold2(i) {
  12163. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  12164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12165. i
  12166. ].isFold2 = false;
  12167. } else {
  12168. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12169. }
  12170. this.$forceUpdate();
  12171. },
  12172. foldEva(i) {
  12173. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12174. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12175. i
  12176. ].isEvaFold = false;
  12177. } else {
  12178. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12179. i
  12180. ].isEvaFold = true;
  12181. setTimeout(() => {
  12182. this.checkEva(this.checkId);
  12183. setTimeout(() => {
  12184. this.checkEva(this.checkId);
  12185. }, 500);
  12186. }, 0);
  12187. }
  12188. this.$forceUpdate();
  12189. },
  12190. foldC(i) {
  12191. if (
  12192. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12193. ) {
  12194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12195. i
  12196. ].isFoldchapter = false;
  12197. } else {
  12198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12199. i
  12200. ].isFoldchapter = true;
  12201. }
  12202. this.$forceUpdate();
  12203. },
  12204. fold3(i, ti) {
  12205. if (
  12206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12207. .isFold3
  12208. ) {
  12209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12210. ti
  12211. ].isFold3 = false;
  12212. } else {
  12213. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12214. ti
  12215. ].isFold3 = true;
  12216. }
  12217. this.$forceUpdate();
  12218. },
  12219. deleteHomeworkBox(unitIndex, index, i) {
  12220. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12221. this.taskCount
  12222. ].homeworkList.splice(i, 1);
  12223. },
  12224. getStudent() {
  12225. let params = {
  12226. oid: this.oid,
  12227. cu: "",
  12228. cn: this.searchPeople,
  12229. };
  12230. this.ajax
  12231. .get(this.$store.state.api + "selectStudentAdd", params)
  12232. .then((res) => {
  12233. this.studentJuri = res.data[0];
  12234. })
  12235. .catch((err) => {
  12236. this.isLoading = false;
  12237. console.error(err);
  12238. });
  12239. },
  12240. // 添加协同成员其他选项按钮
  12241. getTeacherCopy(){
  12242. this.CollLoading=true
  12243. this.collid = ''
  12244. this.collid = '1xpz'
  12245. let params = {
  12246. oid:
  12247. this.org && this.org != "undefined" && this.org != "null"
  12248. ? this.org
  12249. : this.oid,
  12250. cu: "",
  12251. cn: this.searchTN,
  12252. coll: ''
  12253. };
  12254. this.ajax
  12255. .get(
  12256. this.$store.state.api +
  12257. (this.org && this.org != "undefined" && this.org != "null"
  12258. ? "selectCollaborativeMembersOrg"
  12259. : "selectCollaborativeMembers"),
  12260. params
  12261. )
  12262. .then((res) => {
  12263. let teacherJuri = res.data[0];
  12264. this.CollaborativeTeaList = res.data[1];
  12265. for (var i = 0; i < teacherJuri.length; i++) {
  12266. if (teacherJuri[i].userid == this.userid) {
  12267. teacherJuri.splice(i, 1);
  12268. break;
  12269. }
  12270. }
  12271. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12272. return (i.cclassid == '' || i.cclassid == null)
  12273. })
  12274. console.log(' this.teacherJuri', this.teacherJuri);
  12275. let _check = [];
  12276. let _check2 = [];
  12277. for (var i = 0; i < this.teacherJuri.length; i++) {
  12278. var gid = this.teacherJuri[i].userid;
  12279. _check.push(gid);
  12280. }
  12281. for (var i = 0; i < this.checkboxList3.length; i++) {
  12282. var _id = this.checkboxList3[i];
  12283. if (_check.indexOf(_id) !== -1) {
  12284. _check2.push(_id);
  12285. }
  12286. }
  12287. if (_check2.length==0 && _check.length==0) {
  12288. }else{
  12289. this.checkAll2 = _check2.length === _check.length;
  12290. }
  12291. this.CollLoading=false
  12292. })
  12293. .catch((err) => {
  12294. console.error(err);
  12295. this.CollLoading=false
  12296. });
  12297. },
  12298. getTeacher(val) {
  12299. this.CollLoading=true
  12300. this.collid = ''
  12301. this.collid = !val ? '' : val
  12302. let params = {
  12303. oid:
  12304. this.org && this.org != "undefined" && this.org != "null"
  12305. ? this.org
  12306. : this.oid,
  12307. cu: "",
  12308. cn: this.searchTN,
  12309. coll: this.collid
  12310. };
  12311. this.ajax
  12312. .get(
  12313. this.$store.state.api +
  12314. (this.org && this.org != "undefined" && this.org != "null"
  12315. ? "selectCollaborativeMembersOrg"
  12316. : "selectCollaborativeMembers"),
  12317. params
  12318. )
  12319. .then((res) => {
  12320. let teacherJuri = res.data[0];
  12321. this.CollaborativeTeaList = res.data[1];
  12322. for (var i = 0; i < teacherJuri.length; i++) {
  12323. if (teacherJuri[i].userid == this.userid) {
  12324. teacherJuri.splice(i, 1);
  12325. break;
  12326. }
  12327. }
  12328. this.teacherJuri = teacherJuri;
  12329. let _check = [];
  12330. let _check2 = [];
  12331. for (var i = 0; i < this.teacherJuri.length; i++) {
  12332. var gid = this.teacherJuri[i].userid;
  12333. _check.push(gid);
  12334. }
  12335. for (var i = 0; i < this.checkboxList3.length; i++) {
  12336. var _id = this.checkboxList3[i];
  12337. if (_check.indexOf(_id) !== -1) {
  12338. _check2.push(_id);
  12339. }
  12340. }
  12341. if (_check2.length==0 && _check.length==0) {
  12342. }else{
  12343. this.checkAll2 = _check2.length === _check.length;
  12344. }
  12345. this.CollLoading=false
  12346. })
  12347. .catch((err) => {
  12348. console.error(err);
  12349. this.CollLoading=false
  12350. });
  12351. },
  12352. searchStudent() {
  12353. this.getStudent();
  12354. },
  12355. selectGrage() {
  12356. let params = {
  12357. oid: this.oid,
  12358. };
  12359. this.ajax
  12360. .get(this.$store.state.api + "selectGrageBySchool", params)
  12361. .then((res) => {
  12362. this.gradeList = res.data[0];
  12363. })
  12364. .catch((err) => {
  12365. this.isLoading = false;
  12366. console.error(err);
  12367. });
  12368. },
  12369. //获取班级列表
  12370. getClass() {
  12371. let params = {
  12372. oid: this.oid,
  12373. gid: this.gradeId,
  12374. cn: this.classSearch,
  12375. };
  12376. this.ajax
  12377. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12378. .then((res) => {
  12379. if (!this.grade.length) {
  12380. this.grade = res.data[0];
  12381. }
  12382. this.grade2 = res.data[0];
  12383. this.classJuri = res.data[0];
  12384. let _check = [];
  12385. let _check2 = [];
  12386. for (var i = 0; i < this.grade2.length; i++) {
  12387. var gid = this.grade2[i].id;
  12388. _check.push(gid);
  12389. }
  12390. for (var i = 0; i < this.checkboxList2.length; i++) {
  12391. var _id = this.checkboxList2[i];
  12392. if (_check.indexOf(_id) !== -1) {
  12393. _check2.push(_id);
  12394. }
  12395. }
  12396. this.checkAll = _check2.length === _check.length;
  12397. })
  12398. .catch((err) => {
  12399. this.isLoading = false;
  12400. console.error(err);
  12401. });
  12402. },
  12403. CourseType2Change(val) {
  12404. this.pTypeCheck = [];
  12405. for (var i = 0; i < this.CourseType2.length; i++) {
  12406. let typeA = this.CourseType2[i];
  12407. if (val.indexOf(typeA.name) != -1) {
  12408. this.pTypeCheck.push(...typeA.id);
  12409. }
  12410. }
  12411. },
  12412. arrayToArray(arrayo, arrayt) {
  12413. let array1 = arrayo;
  12414. let array2 = arrayt;
  12415. let commonElements = [];
  12416. for (let i = 0; i < array1.length; i++) {
  12417. for (let j = 0; j < array2.length; j++) {
  12418. if (array1[i] === array2[j]) {
  12419. commonElements.push(array1[i]);
  12420. }
  12421. }
  12422. }
  12423. return commonElements;
  12424. },
  12425. typeChange(){
  12426. let courseInfo = ``
  12427. let sub = []
  12428. let mclass = []
  12429. let theme = []
  12430. if (this.courseTypeId.length) {
  12431. for (var i = 0; i < this.courseTypeId.length; i++) {
  12432. let _sid = this.courseTypeId[i]
  12433. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12434. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12435. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12436. }
  12437. }
  12438. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12439. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12440. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12441. }
  12442. }
  12443. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12444. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12445. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12446. }
  12447. }
  12448. }
  12449. }
  12450. sub = JSON.parse(converter(JSON.stringify(sub)))
  12451. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12452. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12453. let _file = this.knowFileArray[fi]
  12454. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12455. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12456. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12457. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12458. let fileids = this.knowInfoData.map((item) => item.fileid)
  12459. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12460. this.knowInfoData.push({
  12461. name: _file.filename,
  12462. url: _file.url,
  12463. uid: '',
  12464. type: 3,
  12465. fileid: _file.fileid,
  12466. });
  12467. this.knowFileids.push(_file.fileid)
  12468. }
  12469. fileids = this.knowInfoData.map((item) => item.fileid)
  12470. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12471. this.knowInfoData.push({
  12472. name: _file.filename,
  12473. url: _file.url,
  12474. uid: '',
  12475. type: 3,
  12476. fileid: _file.fileid,
  12477. });
  12478. this.knowFileids.push(_file.fileid)
  12479. }
  12480. fileids = this.knowInfoData.map((item) => item.fileid)
  12481. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12482. this.knowInfoData.push({
  12483. name: _file.filename,
  12484. url: _file.url,
  12485. uid: '',
  12486. type: 3,
  12487. fileid: _file.fileid,
  12488. });
  12489. this.knowFileids.push(_file.fileid)
  12490. }
  12491. fileids = this.knowInfoData.map((item) => item.fileid)
  12492. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12493. this.knowInfoData.push({
  12494. name: _file.filename,
  12495. url: _file.url,
  12496. uid: '',
  12497. type: 3,
  12498. fileid: _file.fileid,
  12499. });
  12500. this.knowFileids.push(_file.fileid)
  12501. }
  12502. fileids = this.knowInfoData.map((item) => item.fileid)
  12503. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12504. this.knowInfoData.push({
  12505. name: _file.filename,
  12506. url: _file.url,
  12507. uid: '',
  12508. type: 3,
  12509. fileid: _file.fileid,
  12510. });
  12511. this.knowFileids.push(_file.fileid)
  12512. }
  12513. }
  12514. if(mclass.length){
  12515. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  12516. }
  12517. if(sub.length){
  12518. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  12519. }
  12520. if(theme.length){
  12521. courseInfo += `${this.lang.ssThemeColon}${theme.join(',')} `
  12522. }
  12523. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12524. this.typeC1 = this.getTypeC(2)
  12525. this.typeC2 = this.getTypeC(1)
  12526. },
  12527. getChapterData(e, i, j, ic, type) {
  12528. e.stopPropagation();
  12529. this.updataC = true;
  12530. this.icc = ic;
  12531. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12532. console.log(this.lang.ssCantDown);
  12533. }
  12534. },
  12535. deleteChapterData(e, i, j, ic, taskI) {
  12536. e.stopPropagation();
  12537. let _this = this;
  12538. _this
  12539. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12540. confirmButtonText: this.lang.ssConfirm,
  12541. cancelButtonText: this.lang.ssCancel,
  12542. type: "warning",
  12543. })
  12544. .then(() => {
  12545. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12546. ic,
  12547. 1
  12548. );
  12549. })
  12550. .catch(() => {
  12551. return;
  12552. });
  12553. },
  12554. checkInfoData(fileid, file){
  12555. let type = 1
  12556. let index = 0
  12557. for(let i = 0; i < this.infoData.length; i++){
  12558. if(this.infoData[i].fileid == fileid){
  12559. type = 2
  12560. index = i
  12561. }
  12562. }
  12563. if(type == 2){
  12564. this.infoData.splice(index, 1)
  12565. }else {
  12566. this.infoData.push({...file})
  12567. }
  12568. },
  12569. checkKnowInfoData(fileid){
  12570. if(this.knowFileids.indexOf(fileid) == -1){
  12571. this.knowFileids.push(fileid)
  12572. }else {
  12573. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12574. }
  12575. },
  12576. checkKnowInfoData2(fileid){
  12577. if(!fileid){
  12578. return
  12579. }
  12580. if(this.knowFileids2.indexOf(fileid) == -1){
  12581. this.knowFileids2.push(fileid)
  12582. }else {
  12583. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12584. }
  12585. },
  12586. checkKnowInfoData3(fileid){
  12587. if(this.knowFileids3.indexOf(fileid) == -1){
  12588. this.knowFileids3.push(fileid)
  12589. }else {
  12590. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12591. }
  12592. },
  12593. checkAllKnowInfoData3(){
  12594. // let array = this.knowInfoData3;
  12595. // if(this.knowFileids3.length === array.length){
  12596. // this.knowFileids3 = []; // 取消全选
  12597. // } else {
  12598. // this.knowFileids3 = array.map(item => item.url); // 全选
  12599. // }
  12600. let files = this.allknowInfoData3();
  12601. let count = 0
  12602. for(var i = 0; i < files.length; i++){
  12603. if(this.knowFileids3.includes(files[i].url)){
  12604. count++
  12605. }
  12606. }
  12607. if (count == files.length) {
  12608. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12609. } else {
  12610. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12611. }
  12612. },
  12613. checkAllKnowInfoData2(){
  12614. let array = this.knowInfoData2;
  12615. if(this.knowFileids2.length === array.length){
  12616. this.knowFileids2 = []; // 取消全选
  12617. } else {
  12618. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12619. }
  12620. },
  12621. deleteCheckAllKnowInfoData2(){
  12622. let _this = this;
  12623. _this
  12624. .$confirm(this.lang.ssDelSelFile, this.lang.ssTip, {
  12625. confirmButtonText: this.lang.ssConfirm,
  12626. cancelButtonText: this.lang.ssCancel,
  12627. type: "warning",
  12628. })
  12629. .then(() => {
  12630. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12631. _this.knowFileids2 = []
  12632. _this.$forceUpdate()
  12633. })
  12634. .catch(() => {
  12635. return;
  12636. });
  12637. },
  12638. checkAppendixFile(url){
  12639. if(this.appendixFiles.indexOf(url) == -1){
  12640. this.appendixFiles.push(url)
  12641. }else {
  12642. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12643. }
  12644. },
  12645. checkAllappendixFile(){
  12646. let files = this.allFile();
  12647. let count = 0
  12648. for(var i = 0; i < files.length; i++){
  12649. if(this.appendixFiles.includes(files[i].url)){
  12650. count++
  12651. }
  12652. }
  12653. if (count == files.length) {
  12654. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12655. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12656. this.appendixFiles = []
  12657. }
  12658. } else {
  12659. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12660. }
  12661. },
  12662. async exportAppendixFiles(){
  12663. let files = this.allFile(2);
  12664. let uploadFile = []
  12665. for(var i = 0; i < files.length; i++){
  12666. if(this.appendixFiles.includes(files[i].url)){
  12667. uploadFile.push(files[i])
  12668. }
  12669. }
  12670. if(!uploadFile.length){
  12671. this.$message.error(this.lang.ssSelAttach)
  12672. return
  12673. }
  12674. this.appendixLoading = true
  12675. const zip = new JSZip();
  12676. for(var j = 0; j < uploadFile.length; j++){
  12677. let fileZ = uploadFile[j]
  12678. let name = fileZ.name
  12679. let file = await getFile(fileZ.url)
  12680. const file_name = fileZ.name; // 获取文件名
  12681. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12682. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12683. // 判断是否有重复的文件名字
  12684. if (!zip.file(file_name)) {
  12685. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12686. } else {
  12687. // 如果有重复的文件名,则在文件名后添加序号
  12688. let count = 1;
  12689. let newFileName = fileNameWithoutExt;
  12690. while (zip.file(`${newFileName}.${fileExt}`)) {
  12691. newFileName = `${fileNameWithoutExt}(${count})`;
  12692. count++;
  12693. }
  12694. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12695. }
  12696. // zip.file(`${name}`, file.data, { binary: true })
  12697. }
  12698. zip.generateAsync({ type: "blob" }).then((content) => {
  12699. // 生成二进制流
  12700. saveAs(
  12701. content,
  12702. this.courseName + "-" + this.lang.ssAttachZip
  12703. ); // 利用file-saver保存文件 自定义文件名
  12704. setTimeout(() => {
  12705. this.appendixLoading = false
  12706. }, 2000);
  12707. });
  12708. },
  12709. deleteInfoData(e, ic) {
  12710. e.stopPropagation();
  12711. let _this = this;
  12712. _this
  12713. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12714. confirmButtonText: this.lang.ssConfirm,
  12715. cancelButtonText: this.lang.ssCancel,
  12716. type: "warning",
  12717. })
  12718. .then(() => {
  12719. _this.infoData.splice(
  12720. ic,
  12721. 1
  12722. );
  12723. })
  12724. .catch(() => {
  12725. return;
  12726. });
  12727. },
  12728. deleteInfoData2(e, ic) {
  12729. e.stopPropagation();
  12730. let _this = this;
  12731. _this
  12732. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12733. confirmButtonText: this.lang.ssConfirm,
  12734. cancelButtonText: this.lang.ssCancel,
  12735. type: "warning",
  12736. })
  12737. .then(() => {
  12738. let fileid = _this.infoData2[ic].fileid;
  12739. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12740. _this.infoData2.splice(
  12741. ic,
  12742. 1
  12743. );
  12744. })
  12745. .catch(() => {
  12746. return;
  12747. });
  12748. },
  12749. deleteKnowInfoData(e, ic) {
  12750. e.stopPropagation();
  12751. let _this = this;
  12752. _this
  12753. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12754. confirmButtonText: this.lang.ssConfirm,
  12755. cancelButtonText: this.lang.ssCancel,
  12756. type: "warning",
  12757. })
  12758. .then(() => {
  12759. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12760. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12761. }
  12762. _this.knowInfoData.splice(
  12763. ic,
  12764. 1
  12765. );
  12766. })
  12767. .catch(() => {
  12768. return;
  12769. });
  12770. },
  12771. deleteKnowInfoData2(e, ic) {
  12772. e.stopPropagation();
  12773. let _this = this;
  12774. _this
  12775. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12776. confirmButtonText: this.lang.ssConfirm,
  12777. cancelButtonText: this.lang.ssCancel,
  12778. type: "warning",
  12779. })
  12780. .then(() => {
  12781. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12782. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12783. }
  12784. _this.knowInfoData2.splice(
  12785. ic,
  12786. 1
  12787. );
  12788. })
  12789. .catch(() => {
  12790. return;
  12791. });
  12792. },
  12793. deletemubiaoInfoData(e, ic) {
  12794. e.stopPropagation();
  12795. let _this = this;
  12796. _this
  12797. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12798. confirmButtonText: this.lang.ssConfirm,
  12799. cancelButtonText: this.lang.ssCancel,
  12800. type: "warning",
  12801. })
  12802. .then(() => {
  12803. _this.mubiaoInfoData.splice(
  12804. ic,
  12805. 1
  12806. );
  12807. })
  12808. .catch(() => {
  12809. return;
  12810. });
  12811. },
  12812. deletexuanzeInfoData(e, ic) {
  12813. e.stopPropagation();
  12814. let _this = this;
  12815. _this
  12816. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12817. confirmButtonText: this.lang.ssConfirm,
  12818. cancelButtonText: this.lang.ssCancel,
  12819. type: "warning",
  12820. })
  12821. .then(() => {
  12822. _this.xuanzeInfoData.splice(
  12823. ic,
  12824. 1
  12825. );
  12826. })
  12827. .catch(() => {
  12828. return;
  12829. });
  12830. },
  12831. deletepingjiaInfoData(e, ic, tindex) {
  12832. e.stopPropagation();
  12833. let _this = this;
  12834. _this
  12835. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12836. confirmButtonText: this.lang.ssConfirm,
  12837. cancelButtonText: this.lang.ssCancel,
  12838. type: "warning",
  12839. })
  12840. .then(() => {
  12841. _this.pingjiaInfoData[tindex].splice(
  12842. ic,
  12843. 1
  12844. );
  12845. })
  12846. .catch(() => {
  12847. return;
  12848. });
  12849. },
  12850. deleteCankaoInfoData(e, ic) {
  12851. e.stopPropagation();
  12852. let _this = this;
  12853. _this
  12854. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12855. confirmButtonText: this.lang.ssConfirm,
  12856. cancelButtonText: this.lang.ssCancel,
  12857. type: "warning",
  12858. })
  12859. .then(() => {
  12860. _this.cankaoInfoData.splice(
  12861. ic,
  12862. 1
  12863. );
  12864. })
  12865. .catch(() => {
  12866. return;
  12867. });
  12868. },
  12869. deleteTeacherInfoData(e, ic) {
  12870. e.stopPropagation();
  12871. let _this = this;
  12872. _this
  12873. .$confirm(this.lang.ssDeleteItem, this.lang.ssTip, {
  12874. confirmButtonText: this.lang.ssConfirm,
  12875. cancelButtonText: this.lang.ssCancel,
  12876. type: "warning",
  12877. })
  12878. .then(() => {
  12879. _this.teacherInfoData.splice(
  12880. ic,
  12881. 1
  12882. );
  12883. })
  12884. .catch(() => {
  12885. return;
  12886. });
  12887. },
  12888. updataVideoT(e, i, j, ic) {
  12889. // e.stopPropagation();
  12890. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12891. // ic
  12892. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12893. this.line =
  12894. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12895. this.taskCount = j;
  12896. this.lineCount = ic;
  12897. this.dialogVisibleupdataVideoT = true;
  12898. this.$forceUpdate();
  12899. },
  12900. checkChpater(e, i, j, ic){
  12901. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12902. if(type == 3){
  12903. var fileA = [
  12904. "DOC",
  12905. "DOCX",
  12906. "DOCM",
  12907. "DOTM",
  12908. "DOTX",
  12909. "PPTX",
  12910. "PPSX",
  12911. "PPT",
  12912. "PPS",
  12913. "PPTM",
  12914. "POTM",
  12915. "PPAM",
  12916. "POTX",
  12917. "PPSM",
  12918. "XLSX",
  12919. "XLS"
  12920. ];
  12921. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12922. if (
  12923. fileA.indexOf(
  12924. url.split(".")[
  12925. url.split(".").length - 1
  12926. ].toLocaleUpperCase()
  12927. ) != -1
  12928. ) {
  12929. this.dialogVisibleOffice = true
  12930. this.wurl = url
  12931. } else if (
  12932. "pdf".indexOf(
  12933. url.split(".")[
  12934. url.split(".").length - 1
  12935. ].toLocaleLowerCase()
  12936. ) != -1
  12937. ) {
  12938. this.dialogVisiblePdf = true
  12939. this.wurl = url
  12940. }
  12941. }
  12942. },
  12943. checkChpater2(e, ic){
  12944. let type = this.infoData2[ic].type
  12945. if(type == 3){
  12946. var fileA = [
  12947. "DOC",
  12948. "DOCX",
  12949. "DOCM",
  12950. "DOTM",
  12951. "DOTX",
  12952. "PPTX",
  12953. "PPSX",
  12954. "PPT",
  12955. "PPS",
  12956. "PPTM",
  12957. "POTM",
  12958. "PPAM",
  12959. "POTX",
  12960. "PPSM",
  12961. "XLSX",
  12962. "XLS"
  12963. ];
  12964. let url = this.infoData2[ic].url
  12965. if (
  12966. fileA.indexOf(
  12967. url.split(".")[
  12968. url.split(".").length - 1
  12969. ].toLocaleUpperCase()
  12970. ) != -1
  12971. ) {
  12972. this.dialogVisibleOffice = true
  12973. this.wurl = url
  12974. } else if (
  12975. "pdf".indexOf(
  12976. url.split(".")[
  12977. url.split(".").length - 1
  12978. ].toLocaleLowerCase()
  12979. ) != -1
  12980. ) {
  12981. this.dialogVisiblePdf = true
  12982. this.wurl = url
  12983. }
  12984. }
  12985. },
  12986. checkChpater3(e, ic, item){
  12987. let type = item.type
  12988. if(type == 3){
  12989. var fileA = [
  12990. "DOC",
  12991. "DOCX",
  12992. "DOCM",
  12993. "DOTM",
  12994. "DOTX",
  12995. "PPTX",
  12996. "PPSX",
  12997. "PPT",
  12998. "PPS",
  12999. "PPTM",
  13000. "POTM",
  13001. "PPAM",
  13002. "POTX",
  13003. "PPSM",
  13004. "XLSX",
  13005. "XLS"
  13006. ];
  13007. let url = item.url
  13008. if (
  13009. fileA.indexOf(
  13010. url.split(".")[
  13011. url.split(".").length - 1
  13012. ].toLocaleUpperCase()
  13013. ) != -1
  13014. ) {
  13015. this.dialogVisibleOffice = true
  13016. this.wurl = url
  13017. } else if (
  13018. "pdf".indexOf(
  13019. url.split(".")[
  13020. url.split(".").length - 1
  13021. ].toLocaleLowerCase()
  13022. ) != -1
  13023. ) {
  13024. this.dialogVisiblePdf = true
  13025. this.wurl = url
  13026. }
  13027. }
  13028. },
  13029. updataVideoC() {
  13030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13031. this.taskCount
  13032. ].chapterData[this.lineCount].name = JSON.parse(
  13033. JSON.stringify(this.line)
  13034. );
  13035. this.dialogVisibleupdataVideoT = false;
  13036. this.$forceUpdate();
  13037. },
  13038. upCd(e, i, j, taskCount, ic) {
  13039. e.stopPropagation();
  13040. if (ic == 0) {
  13041. return;
  13042. }
  13043. var a = JSON.parse(
  13044. JSON.stringify(
  13045. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13046. ic - 1
  13047. ]
  13048. )
  13049. );
  13050. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  13051. JSON.parse(
  13052. JSON.stringify(
  13053. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13054. )
  13055. );
  13056. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13057. this.$forceUpdate();
  13058. },
  13059. downCd(e, i, j, taskCount, ic) {
  13060. e.stopPropagation();
  13061. if (
  13062. ic ==
  13063. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  13064. 1
  13065. ) {
  13066. return;
  13067. }
  13068. var a = JSON.parse(
  13069. JSON.stringify(
  13070. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13071. ic + 1
  13072. ]
  13073. )
  13074. );
  13075. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  13076. JSON.parse(
  13077. JSON.stringify(
  13078. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13079. )
  13080. );
  13081. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13082. this.$forceUpdate();
  13083. },
  13084. async upTool(e, i, j, tooli) {
  13085. e.stopPropagation();
  13086. if (tooli == 0) {
  13087. return;
  13088. }
  13089. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  13090. let count2 = await this.getWorksCount(3, i, j, tooli);
  13091. if (count1 > 0 || count2 > 0) {
  13092. this.$confirm(
  13093. this.lang.ssSwitchMove,
  13094. this.lang.ssTip,
  13095. {
  13096. confirmButtonText: this.lang.ssConfirm,
  13097. cancelButtonText: this.lang.ssCancel,
  13098. type: "warning",
  13099. }
  13100. )
  13101. .then(() => {
  13102. var a = JSON.parse(
  13103. JSON.stringify(
  13104. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13105. tooli - 1
  13106. ]
  13107. )
  13108. );
  13109. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13110. JSON.parse(
  13111. JSON.stringify(
  13112. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13113. )
  13114. );
  13115. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13116. this.$forceUpdate();
  13117. this.moveWork(3, i, j, tooli - 1, i, j, tooli);
  13118. this.updateWork();
  13119. })
  13120. .catch(() => {
  13121. return;
  13122. });
  13123. } else {
  13124. var a = JSON.parse(
  13125. JSON.stringify(
  13126. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  13127. )
  13128. );
  13129. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13130. JSON.parse(
  13131. JSON.stringify(
  13132. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13133. )
  13134. );
  13135. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13136. this.$forceUpdate();
  13137. }
  13138. },
  13139. async downTool(e, i, j, tooli) {
  13140. e.stopPropagation();
  13141. if (
  13142. tooli ==
  13143. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  13144. ) {
  13145. return;
  13146. }
  13147. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  13148. let count2 = await this.getWorksCount(3, i, j, tooli);
  13149. if (count1 > 0 || count2 > 0) {
  13150. this.$confirm(
  13151. this.lang.ssSwitchMove,
  13152. this.lang.ssTip,
  13153. {
  13154. confirmButtonText: this.lang.ssConfirm,
  13155. cancelButtonText: this.lang.ssCancel,
  13156. type: "warning",
  13157. }
  13158. )
  13159. .then(() => {
  13160. var a = JSON.parse(
  13161. JSON.stringify(
  13162. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13163. tooli + 1
  13164. ]
  13165. )
  13166. );
  13167. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13168. JSON.parse(
  13169. JSON.stringify(
  13170. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13171. )
  13172. );
  13173. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13174. this.$forceUpdate();
  13175. this.moveWork(3, i, j, tooli + 1, i, j, tooli);
  13176. this.updateWork();
  13177. })
  13178. .catch(() => {
  13179. return;
  13180. });
  13181. } else {
  13182. var a = JSON.parse(
  13183. JSON.stringify(
  13184. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13185. )
  13186. );
  13187. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13188. JSON.parse(
  13189. JSON.stringify(
  13190. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13191. )
  13192. );
  13193. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13194. this.$forceUpdate();
  13195. }
  13196. },
  13197. addWork(type) {
  13198. if(type == 2 && this.courseName == "") {
  13199. this.$message.error(this.lang.ssFillCourseName);
  13200. return;
  13201. }
  13202. let cPan = 1;
  13203. for (var i = 0; i < this.unitJson.length; i++) {
  13204. for (
  13205. var j = 0;
  13206. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13207. j++
  13208. ) {
  13209. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13210. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13211. if (
  13212. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13213. ) {
  13214. for (
  13215. var z = 0;
  13216. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13217. z++
  13218. ) {
  13219. if (
  13220. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13221. .length
  13222. ) {
  13223. this.$message.error(this.lang.ssAddToolFull);
  13224. cPan = 2;
  13225. break;
  13226. }
  13227. }
  13228. }
  13229. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13230. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13231. i
  13232. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13233. return ele.value != "" || ele.detail != "" || ele.target != "";
  13234. });
  13235. }
  13236. }
  13237. }
  13238. this.inputShow = true;
  13239. if (cPan == 2) {
  13240. this.steps--;
  13241. return;
  13242. }
  13243. for (var i = 0; i < this.unitJson.length; i++) {
  13244. delete this.unitJson[i].isUpdate;
  13245. }
  13246. if(!this.targetCourseText2){
  13247. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13248. }
  13249. let imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png'
  13250. if (this.lang.lang == 'com') {
  13251. 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'
  13252. }
  13253. let params = [
  13254. {
  13255. uid: this.userid,
  13256. title: this.courseName,
  13257. brief: this.courseText,
  13258. cover:
  13259. this.cover.length > 0
  13260. ? JSON.stringify(this.cover)
  13261. : JSON.stringify([
  13262. {
  13263. name: "noBanner.jpg",
  13264. url: imgUrl,
  13265. uid: 1656409780264,
  13266. status: "success",
  13267. },
  13268. ]),
  13269. evaId: this.evalua,
  13270. astudent:
  13271. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13272. see: this.isTeacherSee == true ? 1 : 0,
  13273. chapters: JSON.stringify(this.unitJson),
  13274. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13275. courseType: JSON.stringify(this.courseTypeId),
  13276. ateacher:
  13277. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13278. inviteCode: JSON.stringify(this.inviteCode),
  13279. refile: JSON.stringify(this.infoData),
  13280. reBrief: this.courseText2,
  13281. cpote: JSON.stringify(this.cpote),
  13282. setting: JSON.stringify({
  13283. courseJie: this.courseJie,
  13284. courseTime: this.courseTime,
  13285. teacherInfoData: this.teacherInfoData,
  13286. teacherCourseText: this.teacherCourseText,
  13287. targetCourseText: this.targetCourseText,
  13288. cankaoInfoData: this.cankaoInfoData,
  13289. mubiaoInfoData: this.mubiaoInfoData,
  13290. xuanzeInfoData: this.xuanzeInfoData,
  13291. pingjiaInfoData: this.pingjiaInfoData,
  13292. infoData2: this.infoData2,
  13293. isuseT: this.isuseT,
  13294. mode: this.mode,
  13295. targetCourseText2: this.targetCourseText2,
  13296. chatid: this.chatid,
  13297. languageSetting: this.languageSetting,
  13298. knowInfoData: this.knowInfoData,
  13299. knowFileids: this.knowFileids,
  13300. knowInfoData2: this.knowInfoData2,
  13301. knowFileids2: this.knowFileids2,
  13302. recordVideoText: this.recordVideoText,
  13303. recordAudioUrl: this.recordAudioUrl,
  13304. appendixFile: this.appendixFile,
  13305. }),
  13306. iresearch: this.isFileSearch ? 1 : 2,
  13307. },
  13308. ];
  13309. this.ajax
  13310. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13311. .then((res) => {
  13312. console.log(this.steps);
  13313. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13314. this.$message({
  13315. message: this.lang.ssAddSucc,
  13316. type: "success",
  13317. });
  13318. }
  13319. this.number = res.data.ordernumber;
  13320. this.courseId = res.data.courseId;
  13321. this.cid = res.data.courseId;
  13322. this.courseUserid = this.userid;
  13323. this.islogin = true;
  13324. // this.updateCourseState(4);
  13325. this.updateCourseState(5);
  13326. this.addtips()
  13327. if(type == 2){
  13328. this.retrunCourse()
  13329. }
  13330. if(type == 3){
  13331. this.steps = 4
  13332. }
  13333. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13334. })
  13335. .catch((err) => {
  13336. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13337. this.$message.error(this.lang.ssNetPoor);
  13338. console.error(err);
  13339. });
  13340. },
  13341. goCourse() {
  13342. window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
  13343. },
  13344. updateWork2() {
  13345. let _unitIndex = this.unitIndex;
  13346. let cPan = 1;
  13347. for (
  13348. var j = 0;
  13349. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13350. j++
  13351. ) {
  13352. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13353. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13354. j
  13355. ].proVisible2 = false;
  13356. if (
  13357. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13358. .length > 1
  13359. ) {
  13360. for (
  13361. var z = 0;
  13362. z <
  13363. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13364. .length;
  13365. z++
  13366. ) {
  13367. if (
  13368. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13369. z
  13370. ].tool.length
  13371. ) {
  13372. this.$message.error(this.lang.ssAddToolFull);
  13373. cPan = 2;
  13374. break;
  13375. }
  13376. }
  13377. }
  13378. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13379. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13380. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13381. (ele) => {
  13382. return ele.value != "" || ele.detail != "" || ele.target != "";
  13383. }
  13384. );
  13385. }
  13386. }
  13387. this.inputShow = true;
  13388. if (cPan == 2) {
  13389. this.steps--;
  13390. return;
  13391. }
  13392. let params = [
  13393. {
  13394. cid: this.cid,
  13395. chapters: JSON.stringify(this.unitJson),
  13396. uid: this.userid,
  13397. unitIndex: _unitIndex,
  13398. },
  13399. ];
  13400. this.ajax
  13401. .post(this.$store.state.api + "updateWorkNew4", params)
  13402. .then((res) => {
  13403. this.$message({
  13404. message: this.lang.UpdateSuccessful,
  13405. type: "success",
  13406. });
  13407. this.courseId = this.cid;
  13408. this.addtips();
  13409. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13410. })
  13411. .catch((err) => {
  13412. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13413. this.$message.error(this.lang.ssNetPoor);
  13414. console.error(err);
  13415. });
  13416. },
  13417. updateWork3(unitIndex) {
  13418. let _unitIndex = unitIndex;
  13419. let cPan = 1;
  13420. for (
  13421. var j = 0;
  13422. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13423. j++
  13424. ) {
  13425. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13426. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13427. j
  13428. ].proVisible2 = false;
  13429. if (
  13430. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13431. .length > 1
  13432. ) {
  13433. for (
  13434. var z = 0;
  13435. z <
  13436. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13437. .length;
  13438. z++
  13439. ) {
  13440. if (
  13441. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13442. z
  13443. ].tool.length
  13444. ) {
  13445. this.$message.error(this.lang.ssAddToolFull);
  13446. cPan = 2;
  13447. break;
  13448. }
  13449. }
  13450. }
  13451. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13452. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13453. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13454. (ele) => {
  13455. return ele.value != "" || ele.detail != "" || ele.target != "";
  13456. }
  13457. );
  13458. }
  13459. }
  13460. this.inputShow = true;
  13461. if (cPan == 2) {
  13462. this.steps--;
  13463. return;
  13464. }
  13465. let params = [
  13466. {
  13467. cid: this.cid,
  13468. chapters: JSON.stringify(this.unitJson),
  13469. uid: this.userid,
  13470. unitIndex: _unitIndex,
  13471. },
  13472. ];
  13473. this.ajax
  13474. .post(this.$store.state.api + "updateWorkNew4", params)
  13475. .then((res) => {
  13476. // this.$message({
  13477. // message: this.lang.UpdateSuccessful,
  13478. // type: "success",
  13479. // });
  13480. this.courseId = this.cid;
  13481. this.addtips()
  13482. })
  13483. .catch((err) => {
  13484. this.$message.error(this.lang.ssNetPoor);
  13485. console.error(err);
  13486. });
  13487. },
  13488. updateWork() {
  13489. let cPan = 1;
  13490. for (var i = 0; i < this.unitJson.length; i++) {
  13491. for (
  13492. var j = 0;
  13493. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13494. j++
  13495. ) {
  13496. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13497. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13498. if (
  13499. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13500. ) {
  13501. for (
  13502. var z = 0;
  13503. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13504. z++
  13505. ) {
  13506. if (
  13507. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13508. .length
  13509. ) {
  13510. this.$message.error(this.lang.ssAddToolFull);
  13511. cPan = 2;
  13512. break;
  13513. }
  13514. }
  13515. }
  13516. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13517. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13518. i
  13519. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13520. return ele.value != "" || ele.detail != "" || ele.target != "";
  13521. });
  13522. }
  13523. }
  13524. }
  13525. this.inputShow = true;
  13526. if (cPan == 2) {
  13527. this.steps--;
  13528. return;
  13529. }
  13530. for (var i = 0; i < this.unitJson.length; i++) {
  13531. delete this.unitJson[i].isUpdate;
  13532. }
  13533. if(!this.targetCourseText2){
  13534. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13535. }
  13536. let imgUrl = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png'
  13537. if (this.lang.lang == 'com') {
  13538. 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'
  13539. }
  13540. let params = [
  13541. {
  13542. cid: this.cid,
  13543. title: this.courseName,
  13544. brief: this.courseText,
  13545. cover:
  13546. this.cover.length > 0
  13547. ? JSON.stringify(this.cover)
  13548. : JSON.stringify([
  13549. {
  13550. name: "noBanner.jpg",
  13551. url: imgUrl,
  13552. uid: 1656409780264,
  13553. status: "success",
  13554. },
  13555. ]),
  13556. evaId: this.evalua,
  13557. astudent:
  13558. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13559. see: this.isTeacherSee == true ? 1 : 0,
  13560. chapters: JSON.stringify(this.unitJson),
  13561. template: this.myWord != "undefined" ? this.myWord : [],
  13562. uid: this.userid,
  13563. courseType: JSON.stringify(this.courseTypeId),
  13564. ateacher:
  13565. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13566. inviteCode: JSON.stringify(this.inviteCode),
  13567. refile: JSON.stringify(this.infoData),
  13568. reBrief: this.courseText2,
  13569. cpote: JSON.stringify(this.cpote),
  13570. setting: JSON.stringify({
  13571. courseJie: this.courseJie,
  13572. courseTime: this.courseTime,
  13573. teacherInfoData: this.teacherInfoData,
  13574. teacherCourseText: this.teacherCourseText,
  13575. targetCourseText: this.targetCourseText,
  13576. cankaoInfoData: this.cankaoInfoData,
  13577. mubiaoInfoData: this.mubiaoInfoData,
  13578. xuanzeInfoData: this.xuanzeInfoData,
  13579. pingjiaInfoData: this.pingjiaInfoData,
  13580. infoData2: this.infoData2,
  13581. isuseT: this.isuseT,
  13582. mode: this.mode,
  13583. targetCourseText2: this.targetCourseText2,
  13584. chatid: this.chatid,
  13585. languageSetting: this.languageSetting,
  13586. knowInfoData: this.knowInfoData,
  13587. knowFileids: this.knowFileids,
  13588. knowInfoData2: this.knowInfoData2,
  13589. knowFileids2: this.knowFileids2,
  13590. recordVideoText: this.recordVideoText,
  13591. recordAudioUrl: this.recordAudioUrl,
  13592. appendixFile: this.appendixFile,
  13593. }),
  13594. iresearch: this.isFileSearch ? 1 : 2,
  13595. },
  13596. ];
  13597. this.ajax
  13598. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13599. .then((res) => {
  13600. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13601. if (this.cidType == 1) {
  13602. this.$message({
  13603. message: this.lang.UpdateSuccessful,
  13604. type: "success",
  13605. });
  13606. } else {
  13607. this.$message({
  13608. message: this.lang.ssAddSucc,
  13609. type: "success",
  13610. });
  13611. }
  13612. }
  13613. this.number = this.nbOrder;
  13614. this.courseId = this.cid;
  13615. this.addtips()
  13616. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13617. })
  13618. .catch((err) => {
  13619. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13620. this.$message.error(this.lang.ssNetPoor);
  13621. console.error(err);
  13622. });
  13623. },
  13624. insertWord() {
  13625. this.dialogVisible1 = true;
  13626. this.updateBoolean2 = false;
  13627. this.tTitle = "";
  13628. this.tdetail = "";
  13629. },
  13630. addWord() {
  13631. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13632. name: this.tTitle,
  13633. content: this.tdetail,
  13634. uid: this.guid(),
  13635. });
  13636. this.dialogVisible1 = false;
  13637. },
  13638. upWord() { },
  13639. selectWord(uid, i, c) {
  13640. this.dialogVisible1 = true;
  13641. this.updateBoolean2 = true;
  13642. if (
  13643. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13644. ) {
  13645. this.tTitle =
  13646. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13647. this.tdetail =
  13648. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13649. }
  13650. },
  13651. isAddPP() {
  13652. if (this.checkboxList.length > 0) {
  13653. this.$message({
  13654. message: this.lang.ssAddOk,
  13655. type: "success",
  13656. });
  13657. this.dialogVisible3 = false;
  13658. } else {
  13659. this.$message({
  13660. message: this.lang.ssPlsAddCM,
  13661. type: "error",
  13662. });
  13663. }
  13664. },
  13665. isAddClass() {
  13666. this.dialogVisibleClass = false;
  13667. },
  13668. isAddPPTeacher() {
  13669. this.dialogVisibleMember = false;
  13670. this.setMan();
  13671. },
  13672. getTipsTemplate(){
  13673. if(this.templateid){
  13674. let params = {
  13675. id: this.templateid
  13676. }
  13677. this.ajax
  13678. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13679. .then((res) => {
  13680. if(res.data[0].length){
  13681. this.tipsJson = res.data[0][0]
  13682. this.aiJson = JSON.parse(res.data[0][0].tips)
  13683. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13684. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13685. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13686. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13687. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13688. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13689. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13690. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13691. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13692. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13693. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13694. }
  13695. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13696. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13697. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13698. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13699. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13700. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13701. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13702. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13703. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13704. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13705. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13706. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13707. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13708. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13709. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13710. 问题:<议程和问题引导>中的问题
  13711. 讨论:<转文本内容>`
  13712. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13713. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13714. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13715. // }
  13716. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13717. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13718. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13719. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13720. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13721. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13722. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13723. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13724. // }
  13725. this.$forceUpdate();
  13726. this.isDialog = res.data[0][0].isDialog
  13727. }
  13728. })
  13729. .catch((err) => { });
  13730. }
  13731. },
  13732. getTipsTemplateIsDialog(){
  13733. if(this.templateid){
  13734. let params = {
  13735. id: this.templateid
  13736. }
  13737. this.ajax
  13738. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13739. .then((res) => {
  13740. if(res.data[0].length){
  13741. this.isDialog = res.data[0][0].isDialog
  13742. }
  13743. })
  13744. .catch((err) => { });
  13745. }
  13746. },
  13747. getTemplate() {
  13748. this.ajax
  13749. .get(this.$store.state.api + "getCourseTemplateT", "")
  13750. .then((res) => {
  13751. this.templateArray = res.data[0];
  13752. this.getTemplateOid();
  13753. this.$forceUpdate();
  13754. })
  13755. .catch((err) => { });
  13756. },
  13757. getTemplateOid() {
  13758. let params = {
  13759. oid: this.oid,
  13760. };
  13761. this.ajax
  13762. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13763. .then((res) => {
  13764. if (res.data[0].length) {
  13765. this.templateArray = [...res.data[0], ...this.templateArray];
  13766. }
  13767. this.getTemplateOrg();
  13768. this.$forceUpdate();
  13769. })
  13770. .catch((err) => { });
  13771. },
  13772. getTemplateOrg() {
  13773. let params = {
  13774. oid: this.org,
  13775. };
  13776. this.ajax
  13777. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13778. .then((res) => {
  13779. if (res.data[0].length) {
  13780. this.templateArray = [...res.data[0], ...this.templateArray];
  13781. }
  13782. this.$forceUpdate();
  13783. })
  13784. .catch((err) => { });
  13785. },
  13786. clearChoose() {
  13787. this.clearArray.splice(this.templateC.id, 1);
  13788. this.dialogVisible2 = false;
  13789. },
  13790. clearAttText() {
  13791. this.AttText = {
  13792. title: "",
  13793. text: "",
  13794. };
  13795. this.dialogVisible6 = false;
  13796. },
  13797. clearLine() {
  13798. this.line = "";
  13799. this.dialogVisible7 = false;
  13800. },
  13801. openTemplate() {
  13802. this.ctJson = {};
  13803. this.templateDialog = true;
  13804. },
  13805. checkctJson(json) {
  13806. if (this.ctJson.id == json.id) {
  13807. this.ctJson = {};
  13808. } else {
  13809. this.ctJson = json;
  13810. }
  13811. },
  13812. addTemplate(res) {
  13813. let _this = this;
  13814. let _res = [];
  13815. if (res.id == 1) {
  13816. _res = [
  13817. {
  13818. dyName: "", //单元标题
  13819. easy: 1,
  13820. chapterInfo: [
  13821. {
  13822. isread: false,
  13823. chapterid: this.guid(),
  13824. title: "",
  13825. courseName: "",
  13826. taskJson: [
  13827. {
  13828. task: "",
  13829. taskDetail: "",
  13830. chapterData: [],
  13831. toolText: "",
  13832. toolChoose: [
  13833. {
  13834. tool: [],
  13835. toolDetail: "",
  13836. toolType: 0,
  13837. askCount: 1,
  13838. askTitle: "",
  13839. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13840. },
  13841. ],
  13842. isShowTools: false,
  13843. askCount: 1,
  13844. isFold: 1,
  13845. askTitle: "",
  13846. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13847. checkJson: [{ checkCount: [], checkPerent: [] }],
  13848. homeworkList: [],
  13849. },
  13850. ],
  13851. itemCount: 1,
  13852. fileList1: [],
  13853. video: [],
  13854. testData: [],
  13855. pData: [],
  13856. templateArray: [],
  13857. },
  13858. ],
  13859. },
  13860. ];
  13861. this.updateCourseState(1);
  13862. } else if (res.id == 2) {
  13863. let stageData = [];
  13864. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  13865. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  13866. if (!iframe && !iframe2) {
  13867. this.$message.error(this.lang.ssUseAI);
  13868. return;
  13869. }
  13870. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13871. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13872. if (
  13873. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13874. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13875. ) {
  13876. this.$message.error(this.lang.ssUseAI);
  13877. return;
  13878. }
  13879. stageData = copyData
  13880. ? copyData.stageData
  13881. : copyData2
  13882. ? copyData2.stageData
  13883. : [""];
  13884. for (var i = 0; i < stageData.length; i++) {
  13885. _res.push({
  13886. dyName: stageData[i], //单元标题
  13887. chapterInfo: [
  13888. {
  13889. isread: false,
  13890. chapterid: this.guid(),
  13891. title: "",
  13892. courseName: "",
  13893. taskJson: [
  13894. {
  13895. task: "",
  13896. taskDetail: "",
  13897. chapterData: [],
  13898. toolText: "",
  13899. toolChoose: [
  13900. {
  13901. tool: [],
  13902. toolDetail: "",
  13903. toolType: 0,
  13904. askCount: 1,
  13905. askTitle: "",
  13906. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13907. },
  13908. ],
  13909. isShowTools: false,
  13910. askCount: 1,
  13911. isFold: 1,
  13912. askTitle: "",
  13913. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13914. checkJson: [{ checkCount: [], checkPerent: [] }],
  13915. homeworkList: [],
  13916. },
  13917. ],
  13918. itemCount: 1,
  13919. fileList1: [],
  13920. video: [],
  13921. testData: [],
  13922. pData: [],
  13923. templateArray: [],
  13924. },
  13925. ],
  13926. });
  13927. }
  13928. this.updateCourseState(1);
  13929. } else if (!Object.keys(res).length) {
  13930. this.$message.error(this.lang.ssSelectTemplatePls);
  13931. retrun;
  13932. } else {
  13933. _res = JSON.parse(res.chapters);
  13934. this.updateCourseState(parseInt(res.state));
  13935. }
  13936. _this
  13937. .$confirm(
  13938. this.lang.ssConfirmTemp,
  13939. this.lang.ssTip,
  13940. {
  13941. confirmButtonText: this.lang.ssConfirm,
  13942. cancelButtonText: this.lang.ssCancel,
  13943. type: "warning",
  13944. }
  13945. )
  13946. .then(() => {
  13947. _this.unitJson = _res;
  13948. _this.updateWork();
  13949. // _this.steps++;
  13950. _this.templateDialog = false;
  13951. setTimeout(() => {
  13952. this.checkEva(this.checkId);
  13953. setTimeout(() => {
  13954. this.checkEva(this.checkId);
  13955. }, 100);
  13956. }, 1000);
  13957. })
  13958. .catch(() => {
  13959. return;
  13960. });
  13961. },
  13962. checkTemplate(res) {
  13963. let _this = this;
  13964. _this
  13965. .$confirm(
  13966. this.lang.ssConfirmTemp,
  13967. this.lang.ssTip,
  13968. {
  13969. confirmButtonText: this.lang.ssConfirm,
  13970. cancelButtonText: this.lang.ssCancel,
  13971. type: "warning",
  13972. }
  13973. )
  13974. .then(() => {
  13975. _this.unitJson = JSON.parse(res.chapters);
  13976. _this.steps++;
  13977. setTimeout(() => {
  13978. this.checkEva(this.checkId);
  13979. setTimeout(() => {
  13980. this.checkEva(this.checkId);
  13981. }, 100);
  13982. }, 1000);
  13983. })
  13984. .catch(() => {
  13985. return;
  13986. });
  13987. },
  13988. checkTemplate1(w) {
  13989. this.steps++;
  13990. },
  13991. checkTemplate2() {
  13992. let _this = this;
  13993. _this
  13994. .$confirm(this.lang.ssChooseEmpty, this.lang.ssTip, {
  13995. confirmButtonText: this.lang.ssConfirm,
  13996. cancelButtonText: this.lang.ssCancel,
  13997. type: "warning",
  13998. })
  13999. .then(() => {
  14000. _this.unitIndex = 0;
  14001. _this.unitJson = [
  14002. {
  14003. dyName: "", //单元标题
  14004. chapterInfo: [
  14005. {
  14006. isread: false,
  14007. chapterid: this.guid(),
  14008. title: "",
  14009. courseName: "",
  14010. taskJson: [
  14011. {
  14012. task: "",
  14013. taskDetail: "",
  14014. chapterData: [],
  14015. toolText: "",
  14016. toolChoose: [
  14017. {
  14018. tool: [],
  14019. toolDetail: "",
  14020. toolType: 0,
  14021. askCount: 1,
  14022. askTitle: "",
  14023. askJson: [
  14024. { askstitle: "", askItem: 1, checkList: [] },
  14025. ],
  14026. },
  14027. ],
  14028. isShowTools: false,
  14029. askCount: 1,
  14030. isFold: 1,
  14031. askTitle: "",
  14032. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14033. checkJson: [{ checkCount: [], checkPerent: [] }],
  14034. homeworkList: [],
  14035. },
  14036. ],
  14037. itemCount: 1,
  14038. fileList1: [],
  14039. video: [],
  14040. testData: [],
  14041. pData: [],
  14042. templateArray: [],
  14043. },
  14044. ],
  14045. },
  14046. ];
  14047. this.steps++;
  14048. setTimeout(() => {
  14049. this.checkEva(this.checkId);
  14050. setTimeout(() => {
  14051. this.checkEva(this.checkId);
  14052. }, 100);
  14053. }, 1000);
  14054. this.updateWork();
  14055. })
  14056. .catch(() => {
  14057. return;
  14058. });
  14059. },
  14060. checkTemplate3() {
  14061. let _this = this;
  14062. _this
  14063. .$confirm(this.lang.ssChooseSimple, this.lang.ssTip, {
  14064. confirmButtonText: this.lang.ssConfirm,
  14065. cancelButtonText: this.lang.ssCancel,
  14066. type: "warning",
  14067. })
  14068. .then(() => {
  14069. _this.unitIndex = 0;
  14070. _this.unitJson = [
  14071. {
  14072. dyName: "", //单元标题
  14073. easy: 1,
  14074. chapterInfo: [
  14075. {
  14076. isread: false,
  14077. chapterid: this.guid(),
  14078. title: "",
  14079. courseName: "",
  14080. taskJson: [
  14081. {
  14082. task: "",
  14083. taskDetail: "",
  14084. chapterData: [],
  14085. toolText: "",
  14086. toolChoose: [
  14087. {
  14088. tool: [],
  14089. toolDetail: "",
  14090. toolType: 0,
  14091. askCount: 1,
  14092. askTitle: "",
  14093. askJson: [
  14094. { askstitle: "", askItem: 1, checkList: [] },
  14095. ],
  14096. },
  14097. ],
  14098. isShowTools: false,
  14099. askCount: 1,
  14100. isFold: 1,
  14101. askTitle: "",
  14102. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14103. checkJson: [{ checkCount: [], checkPerent: [] }],
  14104. homeworkList: [],
  14105. },
  14106. ],
  14107. itemCount: 1,
  14108. fileList1: [],
  14109. video: [],
  14110. testData: [],
  14111. pData: [],
  14112. templateArray: [],
  14113. },
  14114. ],
  14115. },
  14116. ];
  14117. // this.steps++;
  14118. this.updateWork();
  14119. })
  14120. .catch(() => {
  14121. return;
  14122. });
  14123. },
  14124. checkTemplate4() {
  14125. let _this = this;
  14126. _this
  14127. .$confirm(this.lang.ssChooseFuture, this.lang.ssTip, {
  14128. confirmButtonText: this.lang.ssConfirm,
  14129. cancelButtonText: this.lang.ssCancel,
  14130. type: "warning",
  14131. })
  14132. .then(() => {
  14133. _this.unitIndex = 0;
  14134. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  14135. this.steps++;
  14136. this.updateWork();
  14137. })
  14138. .catch(() => {
  14139. return;
  14140. });
  14141. },
  14142. wordNext() {
  14143. this.dialogVisible2 = false;
  14144. },
  14145. isAddOrUpdateAttText() {
  14146. if (this.AttTextType == 0) {
  14147. this.addAttTextMessage();
  14148. } else {
  14149. this.updateAttText();
  14150. }
  14151. },
  14152. isAddOrUpdateLine() {
  14153. if (!this.lineTitle) {
  14154. this.$message.error(this.lang.ssLinkTitle);
  14155. return;
  14156. }
  14157. if (this.lineType == 0) {
  14158. this.addLine();
  14159. } else {
  14160. this.updateLine();
  14161. }
  14162. },
  14163. addAttTextMessage() {
  14164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14165. this.taskCount
  14166. ].chapterData.unshift({
  14167. name: this.AttText.title,
  14168. url: this.AttText.text,
  14169. type: 6,
  14170. });
  14171. this.imgChange1(null, null, 6, this.taskCount);
  14172. this.dialogVisible6 = false;
  14173. },
  14174. selectAttText(itemTaskIndex, i) {
  14175. this.AttText.title =
  14176. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14177. itemTaskIndex
  14178. ].chapterData[i].name;
  14179. this.AttText.text =
  14180. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14181. itemTaskIndex
  14182. ].chapterData[i].url;
  14183. this.taskCount = itemTaskIndex;
  14184. this.AttTextIndex = i;
  14185. this.AttTextType = 1;
  14186. this.dialogVisible6 = true;
  14187. },
  14188. updateAttText() {
  14189. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14190. this.taskCount
  14191. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14192. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14193. this.taskCount
  14194. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14195. this.dialogVisible6 = false;
  14196. },
  14197. addLine() {
  14198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14199. this.lineCount
  14200. ].chapterData.unshift({
  14201. name: this.lang.ssLink,
  14202. title: this.lineTitle,
  14203. url: this.line,
  14204. type: 8,
  14205. });
  14206. this.imgChange1(null, null, 8, this.lineCount);
  14207. this.dialogVisible7 = false;
  14208. },
  14209. selectLine(itemTaskIndex, i) {
  14210. this.line =
  14211. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14212. itemTaskIndex
  14213. ].chapterData[i].url;
  14214. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14215. itemTaskIndex
  14216. ].chapterData[i].title
  14217. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14218. .chapterData[i].title
  14219. : "";
  14220. this.taskCount = itemTaskIndex;
  14221. this.lineCount = i;
  14222. this.lineType = 1;
  14223. this.dialogVisible7 = true;
  14224. },
  14225. openUpdateSource(itemTaskIndex, i) {
  14226. this.sourceData = {};
  14227. let source =
  14228. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14229. .chapterData[i];
  14230. this.sourceData[source.id] = {};
  14231. this.sourceData[source.id].name = source.title;
  14232. this.sourceData[source.id].url = source.url;
  14233. this.dialogVisibleSource = true;
  14234. this.updateSourcePan = true;
  14235. this.taskCount = itemTaskIndex;
  14236. this.lineCount = i;
  14237. },
  14238. updateLine() {
  14239. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14240. this.taskCount
  14241. ].chapterData[this.lineCount].url = this.line;
  14242. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14243. this.taskCount
  14244. ].chapterData[this.lineCount].title = this.lineTitle;
  14245. this.dialogVisible7 = false;
  14246. },
  14247. addPP() {
  14248. this.dialogVisible3 = true;
  14249. },
  14250. goTo(path) {
  14251. this.$router.push(path);
  14252. },
  14253. openTools(itemTaskIndex, i, toolIndex) {
  14254. this.toolIndex = toolIndex;
  14255. this.taskCount = itemTaskIndex;
  14256. if (i == 4) {
  14257. if (toolIndex == null) {
  14258. var a =
  14259. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14260. .chapterData;
  14261. for (var i = 0; i < a.length; i++) {
  14262. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14263. this.askJson =
  14264. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14265. itemTaskIndex
  14266. ].chapterData[i].askJson;
  14267. }
  14268. }
  14269. } else {
  14270. this.askJson = JSON.parse(
  14271. JSON.stringify(
  14272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14273. itemTaskIndex
  14274. ].toolChoose[toolIndex]
  14275. )
  14276. );
  14277. }
  14278. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14279. this.dialogVisible5 = true;
  14280. } else if (i == 45) {
  14281. if (
  14282. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14283. .toolChoose[toolIndex].testJson
  14284. ) {
  14285. this.testJson = JSON.parse(
  14286. JSON.stringify(
  14287. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14288. itemTaskIndex
  14289. ].toolChoose[toolIndex].testJson
  14290. )
  14291. );
  14292. } else {
  14293. var testJson = {
  14294. testCount: 1,
  14295. testTitle: "",
  14296. testJson: [
  14297. {
  14298. teststitle: "",
  14299. testItem: 1,
  14300. checkList: [],
  14301. timuList: [],
  14302. answer: [],
  14303. type: "1",
  14304. },
  14305. ],
  14306. };
  14307. this.testJson = testJson;
  14308. }
  14309. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14310. this.dialogVisibleChoice = true;
  14311. } else if (i == 47) {
  14312. if (
  14313. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14314. .toolChoose[toolIndex].sentenceList
  14315. ) {
  14316. this.sentenceList = JSON.parse(
  14317. JSON.stringify(
  14318. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14319. itemTaskIndex
  14320. ].toolChoose[toolIndex].sentenceList
  14321. )
  14322. );
  14323. } else {
  14324. var sentenceList = [
  14325. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14326. ];
  14327. this.sentenceList = sentenceList;
  14328. }
  14329. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14330. this.dialogVisibleSentence = true;
  14331. } else if (i == 48) {
  14332. if (
  14333. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14334. .toolChoose[toolIndex].tableJson
  14335. ) {
  14336. this.tableJson = JSON.parse(
  14337. JSON.stringify(
  14338. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14339. itemTaskIndex
  14340. ].toolChoose[toolIndex].tableJson
  14341. )
  14342. );
  14343. } else {
  14344. var tableJson = { text: "" };
  14345. this.tableJson = tableJson;
  14346. }
  14347. this.dialogVisibleTable = true;
  14348. } else if (i == 52) {
  14349. if (
  14350. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14351. .toolChoose[toolIndex].wordJson
  14352. ) {
  14353. this.wordJson = JSON.parse(
  14354. JSON.stringify(
  14355. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14356. itemTaskIndex
  14357. ].toolChoose[toolIndex].wordJson
  14358. )
  14359. );
  14360. } else {
  14361. var wordJson = { text: "" };
  14362. this.wordJson = wordJson;
  14363. }
  14364. this.dialogVisibleWord = true;
  14365. // else if (i == 50) {
  14366. // if (
  14367. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14368. // .toolChoose[toolIndex].uploadJson
  14369. // ) {
  14370. // this.uploadJson = JSON.parse(
  14371. // JSON.stringify(
  14372. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14373. // itemTaskIndex
  14374. // ].toolChoose[toolIndex].uploadJson
  14375. // )
  14376. // );
  14377. // } else {
  14378. // var uploadJson = [];
  14379. // this.uploadJson = uploadJson;
  14380. // }
  14381. // this.dialogVisibleMoreUpload = true;
  14382. // }
  14383. } else if (i == 10) {
  14384. if (
  14385. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14386. .toolChoose[toolIndex].preTime
  14387. ) {
  14388. this.preTime = JSON.parse(
  14389. JSON.stringify(
  14390. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14391. itemTaskIndex
  14392. ].toolChoose[toolIndex].preTime
  14393. )
  14394. );
  14395. } else {
  14396. var preTime = 0;
  14397. this.preTime = preTime;
  14398. }
  14399. this.dialogVisiblePreTime = true;
  14400. } else if (i == 49) {
  14401. if (
  14402. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14403. .toolChoose[toolIndex].groupJson
  14404. ) {
  14405. this.groupJson = JSON.parse(
  14406. JSON.stringify(
  14407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14408. itemTaskIndex
  14409. ].toolChoose[toolIndex].groupJson
  14410. )
  14411. );
  14412. } else {
  14413. var groupJson = {
  14414. group: [{ name: this.lang.ssGroup.replace(/\*/g, '1') }],
  14415. number: undefined,
  14416. islock: 1,
  14417. };
  14418. this.groupJson = groupJson;
  14419. }
  14420. this.dialogVisibleGroup = true;
  14421. } else if (i == 62) {
  14422. if (
  14423. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14424. .toolChoose[toolIndex].videoJson
  14425. ) {
  14426. this.videoJson = JSON.parse(
  14427. JSON.stringify(
  14428. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14429. itemTaskIndex
  14430. ].toolChoose[toolIndex].videoJson
  14431. )
  14432. );
  14433. } else {
  14434. var videoJson = {
  14435. video: "",
  14436. setting: [],
  14437. };
  14438. this.videoJson = videoJson;
  14439. }
  14440. this.dialogVisibleVideo = true;
  14441. } else if (i == 15) {
  14442. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14443. itemTaskIndex
  14444. ].toolChoose[toolIndex].answerQ
  14445. ? JSON.parse(
  14446. JSON.stringify(
  14447. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14448. itemTaskIndex
  14449. ].toolChoose[toolIndex].answerQ
  14450. )
  14451. )
  14452. : "";
  14453. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14454. this.dialogVisible8 = true;
  14455. } else if (i == 40) {
  14456. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14457. itemTaskIndex
  14458. ].toolChoose[toolIndex].rateJson
  14459. ? JSON.parse(
  14460. JSON.stringify(
  14461. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14462. itemTaskIndex
  14463. ].toolChoose[toolIndex].rateJson
  14464. )
  14465. )
  14466. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14467. this.selectSteps = 1;
  14468. this.dialogVisibleRate = true;
  14469. } else if (i == 42) {
  14470. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14471. itemTaskIndex
  14472. ].toolChoose[toolIndex].answerQ
  14473. ? JSON.parse(
  14474. JSON.stringify(
  14475. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14476. itemTaskIndex
  14477. ].toolChoose[toolIndex].answerQ
  14478. )
  14479. )
  14480. : "";
  14481. this.dialogVisibleMp3 = true;
  14482. } else if (i == 41) {
  14483. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14484. itemTaskIndex
  14485. ].toolChoose[toolIndex].selectJson
  14486. ? JSON.parse(
  14487. JSON.stringify(
  14488. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14489. itemTaskIndex
  14490. ].toolChoose[toolIndex].selectJson
  14491. )
  14492. )
  14493. : { url: "", select: [], answer: [] };
  14494. this.selectSteps = 1;
  14495. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14496. this.dialogVisibleSelect = true;
  14497. } else if (i == 3) {
  14498. window.topU.postMessage(
  14499. {
  14500. tools: "3y",
  14501. cid: this.cid,
  14502. stage: this.unitIndex,
  14503. task: itemTaskIndex,
  14504. tool: toolIndex,
  14505. },
  14506. "*"
  14507. );
  14508. } else if (i == 1) {
  14509. window.topU.postMessage(
  14510. {
  14511. tools: "1y",
  14512. cid: this.cid,
  14513. stage: this.unitIndex,
  14514. task: itemTaskIndex,
  14515. tool: toolIndex,
  14516. },
  14517. "*"
  14518. );
  14519. } else if (i == 57) {
  14520. window.topU.postMessage(
  14521. {
  14522. tools: "57y",
  14523. cid: this.cid,
  14524. stage: this.unitIndex,
  14525. task: itemTaskIndex,
  14526. tool: toolIndex,
  14527. },
  14528. "*"
  14529. );
  14530. } else if (i == 69) {
  14531. this.englishList = {};
  14532. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14533. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14534. ? JSON.parse(
  14535. JSON.stringify(
  14536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14537. itemTaskIndex
  14538. ].toolChoose[toolIndex].englishList
  14539. )
  14540. )
  14541. : {};
  14542. this.$forceUpdate();
  14543. this.englishDialogVisible = true;
  14544. } else if (i == 70) {
  14545. this.englishVoiceJson = {};
  14546. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14547. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14548. ? JSON.parse(
  14549. JSON.stringify(
  14550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14551. itemTaskIndex
  14552. ].toolChoose[toolIndex].englishVoiceJson
  14553. )
  14554. )
  14555. : {
  14556. title: '',
  14557. detail: '',
  14558. array: []
  14559. };
  14560. // {
  14561. // time: "",
  14562. // class: "",
  14563. // difficulty: 0,
  14564. // topic: "",
  14565. // isShow: false,
  14566. // eva: 0,
  14567. // aiEva: {
  14568. // isAiEva: false,
  14569. // aiEvaChoose: [],
  14570. // },
  14571. // allfType: [],
  14572. // englishJson: {},
  14573. // };
  14574. this.$forceUpdate();
  14575. this.EnglishVoiceDialog = true;
  14576. }else if(i == 72){
  14577. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14578. itemTaskIndex
  14579. ].toolChoose[toolIndex].appJson
  14580. ? JSON.parse(
  14581. JSON.stringify(
  14582. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14583. itemTaskIndex
  14584. ].toolChoose[toolIndex].appJson
  14585. )
  14586. )
  14587. : {
  14588. url:'',
  14589. };
  14590. this.$forceUpdate();
  14591. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14592. }
  14593. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14594. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14595. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14596. }
  14597. },
  14598. setEnglishVoiceJson(val) {
  14599. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14600. this.taskCount
  14601. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14602. JSON.stringify(val)
  14603. );
  14604. this.$forceUpdate();
  14605. if (
  14606. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14607. .toolChoose[this.toolIndex].tool != 70
  14608. ) {
  14609. this.addTools(70, this.taskCount, this.toolIndex);
  14610. }
  14611. },
  14612. chapAddTools(i) {
  14613. if (this.chapTools[0].tools.length == 0) {
  14614. this.chapTools[0].tools.push(i);
  14615. } else {
  14616. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14617. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14618. } else {
  14619. this.chapTools[0].tools.push(i);
  14620. }
  14621. }
  14622. this.$forceUpdate();
  14623. },
  14624. addChaptersDataTools() {
  14625. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14626. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14627. this.chapCount
  14628. ].chapterData.unshift({
  14629. name: this.chapTools[0].toolDetail,
  14630. url: this.chapTools[0].tools,
  14631. type: 7,
  14632. askJson: this.askJson,
  14633. });
  14634. } else {
  14635. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14636. this.chapCount
  14637. ].chapterData.unshift({
  14638. name: this.chapTools[0].toolDetail,
  14639. url: this.chapTools[0].tools,
  14640. type: 7,
  14641. });
  14642. }
  14643. this.imgChange1(null, null, 7, this.chapCount);
  14644. this.dialogVisible4 = false;
  14645. },
  14646. addTools(i, itemTaskIndex, toolIndex) {
  14647. // if (
  14648. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14649. // .toolChoose[toolIndex].tool.length == 0
  14650. // ) {
  14651. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14652. // itemTaskIndex
  14653. // ].toolChoose[toolIndex].tool.push(i);
  14654. // } else {
  14655. // if (
  14656. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14657. // itemTaskIndex
  14658. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14659. // ) {
  14660. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14661. // itemTaskIndex
  14662. // ].toolChoose[toolIndex].tool.splice(
  14663. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14664. // itemTaskIndex
  14665. // ].toolChoose[toolIndex].tool.indexOf(i),
  14666. // 1
  14667. // );
  14668. // } else {
  14669. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14670. // itemTaskIndex
  14671. // ].toolChoose[toolIndex].tool.push(i);
  14672. // }
  14673. // console.log(
  14674. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14675. // .toolChoose[toolIndex].tool
  14676. // );
  14677. // }
  14678. if (i == 4) {
  14679. if (
  14680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14681. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14682. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14683. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14684. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14685. .toolChoose[toolIndex].askJson[0].checkList < 2
  14686. ) {
  14687. this.openTools(itemTaskIndex, 4, toolIndex);
  14688. // this.$message({
  14689. // message: "请填写完整问卷内容",
  14690. // type: "error",
  14691. // });
  14692. return;
  14693. }
  14694. }
  14695. if (i == 45) {
  14696. if (
  14697. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14698. .toolChoose[toolIndex].testJson ||
  14699. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14700. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14701. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14702. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14703. ) {
  14704. this.openTools(itemTaskIndex, 45, toolIndex);
  14705. // this.$message({
  14706. // message: "请填写完整问卷内容",
  14707. // type: "error",
  14708. // });
  14709. return;
  14710. }
  14711. }
  14712. if (i == 47) {
  14713. if (
  14714. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14715. .toolChoose[toolIndex].sentenceList ||
  14716. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14717. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14718. ) {
  14719. this.openTools(itemTaskIndex, 47, toolIndex);
  14720. return;
  14721. }
  14722. }
  14723. if (i == 69) {
  14724. if (
  14725. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14726. .toolChoose[toolIndex].englishList
  14727. ) {
  14728. this.openTools(itemTaskIndex, 69, toolIndex);
  14729. return;
  14730. }
  14731. }
  14732. if (i == 70) {
  14733. if (
  14734. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14735. .toolChoose[toolIndex].englishVoiceJson
  14736. ) {
  14737. this.openTools(itemTaskIndex, 70, toolIndex);
  14738. return;
  14739. }
  14740. }
  14741. if(i == 72){
  14742. if (
  14743. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14744. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14745. .toolChoose[toolIndex].appJson).length == 0
  14746. ) {
  14747. this.openTools(itemTaskIndex, 72, toolIndex);
  14748. return;
  14749. }
  14750. }
  14751. // if (i == 48) {
  14752. // if (
  14753. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14754. // .toolChoose[toolIndex].tableJson
  14755. // ) {
  14756. // this.openTools(itemTaskIndex, 48, toolIndex);
  14757. // return;
  14758. // }
  14759. // }
  14760. // if (i == 50) {
  14761. // if (
  14762. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14763. // .toolChoose[toolIndex].uploadJson
  14764. // ) {
  14765. // this.openTools(itemTaskIndex, 50, toolIndex);
  14766. // return;
  14767. // }
  14768. // }
  14769. if (i == 49) {
  14770. if (
  14771. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14772. .toolChoose[toolIndex].groupJson
  14773. ) {
  14774. this.openTools(itemTaskIndex, 49, toolIndex);
  14775. return;
  14776. }
  14777. }
  14778. if (i == 62) {
  14779. if (
  14780. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14781. .toolChoose[toolIndex].videoJson
  14782. ) {
  14783. this.openTools(itemTaskIndex, 62, toolIndex);
  14784. return;
  14785. }
  14786. }
  14787. if (i == 15) {
  14788. if (
  14789. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14790. .toolChoose[toolIndex].answerQ ||
  14791. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14792. .toolChoose[toolIndex].answerQ == ""
  14793. ) {
  14794. this.openTools(itemTaskIndex, 15, toolIndex);
  14795. // this.$message({
  14796. // message: "请填写问答内容",
  14797. // type: "error",
  14798. // });
  14799. return;
  14800. }
  14801. }
  14802. if (i == 40) {
  14803. if (
  14804. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14805. .toolChoose[toolIndex].rateJson ||
  14806. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14807. .toolChoose[toolIndex].rateJson.length
  14808. ) {
  14809. this.openTools(itemTaskIndex, 40, toolIndex);
  14810. return;
  14811. }
  14812. }
  14813. if (i == 41) {
  14814. if (
  14815. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14816. .toolChoose[toolIndex].selectJson ||
  14817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14818. .toolChoose[toolIndex].selectJson.url == "" ||
  14819. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14820. .toolChoose[toolIndex].selectJson.select.length ||
  14821. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14822. .toolChoose[toolIndex].selectJson.answer.length
  14823. ) {
  14824. this.openTools(itemTaskIndex, 41, toolIndex);
  14825. return;
  14826. }
  14827. }
  14828. if (i == 42) {
  14829. if (
  14830. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14831. .toolChoose[toolIndex].answerQ ||
  14832. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14833. .toolChoose[toolIndex].answerQ == ""
  14834. ) {
  14835. this.openTools(itemTaskIndex, 42, toolIndex);
  14836. return;
  14837. }
  14838. }
  14839. if (
  14840. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14841. .toolChoose[toolIndex].tool.length > 0
  14842. ) {
  14843. if (
  14844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14845. itemTaskIndex
  14846. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14847. ) {
  14848. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14849. itemTaskIndex
  14850. ].toolChoose[toolIndex].tool.splice(
  14851. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14852. itemTaskIndex
  14853. ].toolChoose[toolIndex].tool.indexOf(i),
  14854. 1
  14855. );
  14856. } else {
  14857. // this.$message({
  14858. // message: "每个工具只能添加一个",
  14859. // type: "error",
  14860. // });
  14861. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14862. itemTaskIndex
  14863. ].toolChoose[toolIndex].tool = [];
  14864. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14865. itemTaskIndex
  14866. ].toolChoose[toolIndex].tool.push(i);
  14867. }
  14868. } else {
  14869. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14870. itemTaskIndex
  14871. ].toolChoose[toolIndex].tool.push(i);
  14872. }
  14873. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14874. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14875. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14876. }
  14877. this.$forceUpdate();
  14878. },
  14879. addAskList(index) {
  14880. this.askJson.askJson.splice(index + 1, 0, {
  14881. askstitle: "",
  14882. askItem: 1,
  14883. checkList: [],
  14884. });
  14885. this.askJson.askCount++;
  14886. },
  14887. addTestList(index) {
  14888. this.testJson.testJson.splice(index + 1, 0, {
  14889. teststitle: "",
  14890. testItem: 1,
  14891. checkList: [],
  14892. timuList: [],
  14893. answer: [],
  14894. type: "1",
  14895. });
  14896. this.testJson.testCount++;
  14897. },
  14898. deleteAskList(index) {
  14899. if (
  14900. !this.askJson.askJson[index].askstitle &&
  14901. this.askJson.askJson[index].askItem == 1 &&
  14902. !this.askJson.askJson[index].checkList[0]
  14903. ) {
  14904. this.askJson.askJson.splice(index, 1);
  14905. this.askJson.askCount--;
  14906. } else {
  14907. let _this = this;
  14908. _this
  14909. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14910. confirmButtonText: this.lang.ssConfirm,
  14911. cancelButtonText: this.lang.ssCancel,
  14912. type: "warning",
  14913. })
  14914. .then(() => {
  14915. _this.askJson.askJson.splice(index, 1);
  14916. _this.askJson.askCount--;
  14917. })
  14918. .catch(() => {
  14919. return;
  14920. });
  14921. }
  14922. },
  14923. deleteTestList(index) {
  14924. if (
  14925. !this.testJson.testJson[index].teststitle &&
  14926. this.testJson.testJson[index].testItem == 1 &&
  14927. !this.testJson.testJson[index].checkList[0]
  14928. ) {
  14929. this.testJson.testJson.splice(index, 1);
  14930. this.testJson.testCount--;
  14931. } else {
  14932. let _this = this;
  14933. _this
  14934. .$confirm(this.lang.ssIrrevers, this.lang.ssTip, {
  14935. confirmButtonText: this.lang.ssConfirm,
  14936. cancelButtonText: this.lang.ssCancel,
  14937. type: "warning",
  14938. })
  14939. .then(() => {
  14940. _this.testJson.testJson.splice(index, 1);
  14941. _this.testJson.testCount--;
  14942. })
  14943. .catch(() => {
  14944. return;
  14945. });
  14946. }
  14947. },
  14948. askMove(type, index) {
  14949. if (type == 1) {
  14950. if (index > 0) {
  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. } else {
  14957. if (index < this.askJson.askJson.length - 1) {
  14958. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14959. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14960. this.askJson.askJson[index + 1] = b;
  14961. this.askJson.askJson[index] = a;
  14962. }
  14963. }
  14964. this.$forceUpdate();
  14965. },
  14966. checkMove(type, index, checkIndex) {
  14967. if (type == 1) {
  14968. if (checkIndex > 0) {
  14969. let a = JSON.parse(
  14970. JSON.stringify(
  14971. this.askJson.askJson[index].checkList[checkIndex - 1]
  14972. )
  14973. );
  14974. let b = JSON.parse(
  14975. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14976. );
  14977. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14978. this.askJson.askJson[index].checkList[checkIndex] = a;
  14979. }
  14980. } else {
  14981. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14982. let a = JSON.parse(
  14983. JSON.stringify(
  14984. this.askJson.askJson[index].checkList[checkIndex + 1]
  14985. )
  14986. );
  14987. let b = JSON.parse(
  14988. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14989. );
  14990. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14991. this.askJson.askJson[index].checkList[checkIndex] = a;
  14992. }
  14993. }
  14994. this.$forceUpdate();
  14995. },
  14996. testMove(type, index) {
  14997. if (type == 1) {
  14998. if (index > 0) {
  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. } else {
  15005. if (index < this.testJson.testJson.length - 1) {
  15006. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  15007. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  15008. this.testJson.testJson[index + 1] = b;
  15009. this.testJson.testJson[index] = a;
  15010. }
  15011. }
  15012. this.$forceUpdate();
  15013. },
  15014. tcheckMove(type, index, checkIndex) {
  15015. if (type == 1) {
  15016. if (checkIndex > 0) {
  15017. let a = JSON.parse(
  15018. JSON.stringify(
  15019. this.testJson.testJson[index].checkList[checkIndex - 1]
  15020. )
  15021. );
  15022. let b = JSON.parse(
  15023. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15024. );
  15025. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  15026. this.testJson.testJson[index].checkList[checkIndex] = a;
  15027. }
  15028. } else {
  15029. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  15030. let a = JSON.parse(
  15031. JSON.stringify(
  15032. this.testJson.testJson[index].checkList[checkIndex + 1]
  15033. )
  15034. );
  15035. let b = JSON.parse(
  15036. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15037. );
  15038. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  15039. this.testJson.testJson[index].checkList[checkIndex] = a;
  15040. }
  15041. }
  15042. this.$forceUpdate();
  15043. },
  15044. addcheckList(json, index) {
  15045. // json.checkList.length++;
  15046. json.checkList.splice(index + 1, 0, "");
  15047. json.askItem++;
  15048. this.$forceUpdate();
  15049. },
  15050. deletecheckList(json, index) {
  15051. // json.checkList.length--;
  15052. json.checkList.splice(index, 1);
  15053. json.askItem--;
  15054. this.$forceUpdate();
  15055. },
  15056. addTcheckList(json, index) {
  15057. // json.checkList.length++;
  15058. json.checkList.splice(index + 1, 0, "");
  15059. json.testItem++;
  15060. this.$forceUpdate();
  15061. },
  15062. deleteTcheckList(json, index) {
  15063. // json.checkList.length--;
  15064. json.checkList.splice(index, 1);
  15065. json.testItem--;
  15066. this.$forceUpdate();
  15067. },
  15068. checkTestType(type, json) {
  15069. json.type = type;
  15070. setTimeout(() => {
  15071. json.answer = [];
  15072. }, 100);
  15073. },
  15074. checkAskType(type, json) {
  15075. json.type = type;
  15076. // json.checkList = [];
  15077. this.$forceUpdate();
  15078. },
  15079. addSelectList(json) {
  15080. json.select.push("");
  15081. json.answer.push("");
  15082. },
  15083. deleteSelectList(json) {
  15084. // json.select.length--;
  15085. // json.answer.length--;
  15086. json.select.splice(json.select.length - 1, 1);
  15087. json.answer.splice(json.answer.length - 1, 1);
  15088. },
  15089. addAsk() {
  15090. if (this.askJson.askTitle === "") {
  15091. this.$message.error(this.lang.ssTitleEmpty);
  15092. return;
  15093. }
  15094. var aj = this.askJson.askJson;
  15095. var b = 1;
  15096. for (var i = 0; i < aj.length; i++) {
  15097. if (aj[i].askstitle === "") {
  15098. var a = 1;
  15099. for (let index = 0; index < aj[i].askItem; index++) {
  15100. const element = aj[i].checkList[index]
  15101. ? aj[i].checkList[index]
  15102. : "";
  15103. if (element != "") {
  15104. b++;
  15105. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15106. return;
  15107. } else {
  15108. a++;
  15109. }
  15110. }
  15111. if (b == 1) {
  15112. this.$message.error(this.lang.ssOneQues);
  15113. return;
  15114. }
  15115. } else if (aj[i].askstitle != "") {
  15116. for (let index = 0; index < aj[i].askItem; index++) {
  15117. const element = aj[i].checkList[index]
  15118. ? aj[i].checkList[index]
  15119. : "";
  15120. var index = 0;
  15121. for (var z = 0; z < aj[i].checkList.length; z++) {
  15122. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15123. if (checkC != "") {
  15124. index++;
  15125. } else {
  15126. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15127. return;
  15128. }
  15129. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15130. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15131. if (checkC == checkC2) {
  15132. this.$message.error(
  15133. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15134. );
  15135. return;
  15136. }
  15137. }
  15138. }
  15139. b++;
  15140. if (index < 2) {
  15141. this.$message.error(this.lang.ssEachQues);
  15142. return;
  15143. }
  15144. }
  15145. }
  15146. }
  15147. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  15148. var elc = el.checkList.filter((element) => {
  15149. return element != "";
  15150. });
  15151. return el.askstitle != "" && elc.length != 0;
  15152. });
  15153. if (!this.dialogVisible4) {
  15154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15155. this.taskCount
  15156. ].toolChoose[this.toolIndex] = this.askJson;
  15157. }
  15158. this.dialogVisible5 = false;
  15159. if (
  15160. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15161. .toolChoose[this.toolIndex].tool != 4
  15162. ) {
  15163. this.addTools(4, this.taskCount, this.toolIndex);
  15164. }
  15165. },
  15166. addTest() {
  15167. // if (this.testJson.testTitle === "") {
  15168. // this.$message.error("标题不能为空!");
  15169. // return;
  15170. // }
  15171. var aj = this.testJson.testJson;
  15172. var b = 1;
  15173. for (var i = 0; i < aj.length; i++) {
  15174. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  15175. var a = 1;
  15176. for (let index = 0; index < aj[i].testItem; index++) {
  15177. const element = aj[i].checkList[index]
  15178. ? aj[i].checkList[index]
  15179. : "";
  15180. if (element != "") {
  15181. b++;
  15182. this.$message.error(this.lang.ssFillTitle.replace(/\*/g, i + 1));
  15183. return;
  15184. } else {
  15185. a++;
  15186. }
  15187. }
  15188. if (b == 1) {
  15189. this.$message.error(this.lang.ssOneQues);
  15190. return;
  15191. }
  15192. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15193. for (let index = 0; index < aj[i].testItem; index++) {
  15194. const element = aj[i].checkList[index]
  15195. ? aj[i].checkList[index]
  15196. : "";
  15197. var index = 0;
  15198. for (var z = 0; z < aj[i].checkList.length; z++) {
  15199. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15200. if (checkC != "") {
  15201. index++;
  15202. } else {
  15203. this.$message.error(this.lang.ssOptEmpty.replace(/\*/g, i + 1));
  15204. return;
  15205. }
  15206. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15207. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15208. if (checkC == checkC2) {
  15209. this.$message.error(
  15210. this.lang.ssOptDup.replace(/\*/g, i + 1).replace(/\&/g, this.optionTypeList[z]).replace(/\$/g, this.optionTypeList[z2])
  15211. );
  15212. return;
  15213. }
  15214. }
  15215. }
  15216. b++;
  15217. if (index < 2) {
  15218. this.$message.error(this.lang.ssEachQues);
  15219. return;
  15220. }
  15221. if (
  15222. (aj[i].type == "2" && !aj[i].answer.length) ||
  15223. (aj[i].type == "1" &&
  15224. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15225. (aj[i].answer !== 0 && !aj[i].answer)))
  15226. ) {
  15227. this.$message.error(this.lang.ssCorrectOpt.replace(/\*/g, i + 1));
  15228. return;
  15229. }
  15230. }
  15231. }
  15232. }
  15233. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15234. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15235. var elc = el.checkList.filter((element) => {
  15236. return element != "";
  15237. });
  15238. return (
  15239. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15240. );
  15241. });
  15242. isTestJson.testCount = isTestJson.testJson.length;
  15243. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15244. this.taskCount
  15245. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15246. this.dialogVisibleChoice = false;
  15247. if (
  15248. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15249. .toolChoose[this.toolIndex].tool != 45
  15250. ) {
  15251. this.addTools(45, this.taskCount, this.toolIndex);
  15252. }
  15253. },
  15254. addVideoJson(videoJson) {
  15255. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15256. this.taskCount
  15257. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15258. this.dialogVisibleVideo = false;
  15259. if (
  15260. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15261. .toolChoose[this.toolIndex].tool != 62
  15262. ) {
  15263. this.addTools(62, this.taskCount, this.toolIndex);
  15264. }
  15265. },
  15266. //自动获取剪贴板
  15267. pasteOption() {
  15268. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15269. if (!iframe) {
  15270. this.$message.error(this.lang.ssUseAIQues);
  15271. return;
  15272. }
  15273. let copyData = iframe.contentWindow.copyData;
  15274. if (!copyData || !copyData.selectData.length) {
  15275. this.$message.error(this.lang.ssUseAIQues);
  15276. return;
  15277. }
  15278. let selectData = copyData.selectData;
  15279. for (var i = 0; i < selectData.length; i++) {
  15280. let answer = 0;
  15281. switch (selectData[i].answer[0]) {
  15282. case "A":
  15283. answer = 0;
  15284. break;
  15285. case "B":
  15286. answer = 1;
  15287. break;
  15288. case "C":
  15289. answer = 2;
  15290. break;
  15291. case "D":
  15292. answer = 3;
  15293. break;
  15294. case "E":
  15295. answer = 4;
  15296. break;
  15297. default:
  15298. break;
  15299. }
  15300. this.testJson.testJson.push({
  15301. teststitle: selectData[i].subject,
  15302. testItem: selectData[i].options.length,
  15303. checkList: selectData[i].options,
  15304. timuList: [],
  15305. answer: answer,
  15306. type: "1",
  15307. });
  15308. this.testJson.testCount++;
  15309. }
  15310. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15311. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15312. var elc = el.checkList.filter((element) => {
  15313. return element != "";
  15314. });
  15315. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15316. });
  15317. isTestJson.testCount = isTestJson.testJson.length;
  15318. if (!isTestJson.testCount) {
  15319. return;
  15320. }
  15321. this.testJson = isTestJson;
  15322. this.$forceUpdate();
  15323. },
  15324. pasteTask(taskJson) {
  15325. let stageTasksData = [];
  15326. if (taskJson) {
  15327. stageTasksData = taskJson;
  15328. } else {
  15329. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15330. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15331. if (!iframe && !iframe2) {
  15332. this.$message.error(this.lang.ssUseAI);
  15333. return;
  15334. }
  15335. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15336. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15337. if (
  15338. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15339. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15340. ) {
  15341. this.$message.error(this.lang.ssUseAI);
  15342. return;
  15343. }
  15344. stageTasksData = copyData
  15345. ? copyData.tasksData
  15346. : copyData2
  15347. ? copyData2.tasksData
  15348. : [{ taskName: "", taskDecs: "" }];
  15349. }
  15350. let taskA = [];
  15351. let tasks = stageTasksData;
  15352. for (var j = 0; j < tasks.length; j++) {
  15353. taskA.push({
  15354. task: tasks[j].taskName,
  15355. taskDetail: tasks[j].taskDecs,
  15356. chapterData: [],
  15357. toolText: "",
  15358. toolChoose: [
  15359. {
  15360. tool: [],
  15361. toolDetail: "",
  15362. toolType: 0,
  15363. askCount: 1,
  15364. askTitle: "",
  15365. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15366. },
  15367. ],
  15368. isShowTools: false,
  15369. askCount: 1,
  15370. isFold: 1,
  15371. askTitle: "",
  15372. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15373. checkJson: [{ checkCount: [], checkPerent: [] }],
  15374. homeworkList: [],
  15375. });
  15376. }
  15377. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15378. this.$forceUpdate();
  15379. },
  15380. pasteStage(stageJson) {
  15381. let stageData = [];
  15382. if (stageJson) {
  15383. stageData = stageJson;
  15384. } else {
  15385. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15386. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15387. if (!iframe && !iframe2) {
  15388. this.$message.error(this.lang.ssUseAI);
  15389. return;
  15390. }
  15391. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15392. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15393. if (
  15394. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15395. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15396. ) {
  15397. this.$message.error(this.lang.ssUseAI);
  15398. return;
  15399. }
  15400. stageData = copyData
  15401. ? copyData.stageData
  15402. : copyData2
  15403. ? copyData2.stageData
  15404. : [""];
  15405. }
  15406. let stage = [];
  15407. for (var i = 0; i < stageData.length; i++) {
  15408. stage.push({
  15409. dyName: stageData[i], //单元标题
  15410. chapterInfo: [
  15411. {
  15412. isread: false,
  15413. chapterid: this.guid(),
  15414. title: "",
  15415. courseName: "",
  15416. taskJson: [
  15417. {
  15418. task: "",
  15419. taskDetail: "",
  15420. chapterData: [],
  15421. toolText: "",
  15422. toolChoose: [
  15423. {
  15424. tool: [],
  15425. toolDetail: "",
  15426. toolType: 0,
  15427. askCount: 1,
  15428. askTitle: "",
  15429. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15430. },
  15431. ],
  15432. isShowTools: false,
  15433. askCount: 1,
  15434. isFold: 1,
  15435. askTitle: "",
  15436. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15437. checkJson: [{ checkCount: [], checkPerent: [] }],
  15438. homeworkList: [],
  15439. },
  15440. ],
  15441. itemCount: 1,
  15442. fileList1: [],
  15443. video: [],
  15444. testData: [],
  15445. pData: [],
  15446. templateArray: [],
  15447. },
  15448. ],
  15449. });
  15450. }
  15451. let _this = this;
  15452. if (stageJson) {
  15453. if (!_this.cid) {
  15454. _this.unitJson = stage;
  15455. } else {
  15456. _this.unitIndex = 0;
  15457. _this.unitJson = stage;
  15458. _this.updateWork();
  15459. }
  15460. } else {
  15461. _this
  15462. .$confirm(
  15463. this.lang.ssSmartPasteTemp,
  15464. this.lang.ssTip,
  15465. {
  15466. confirmButtonText: this.lang.ssConfirm,
  15467. cancelButtonText: this.lang.ssCancel,
  15468. type: "warning",
  15469. }
  15470. )
  15471. .then(() => {
  15472. _this.unitIndex = 0;
  15473. _this.unitJson = stage;
  15474. // _this.steps++;
  15475. _this.updateWork();
  15476. })
  15477. .catch(() => {
  15478. return;
  15479. });
  15480. }
  15481. },
  15482. openStageBox() {
  15483. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15484. this.dialogVisibleStageChange = true;
  15485. },
  15486. updateChange() {
  15487. this.$confirm(
  15488. this.lang.ssStageSeqDel,
  15489. this.lang.ssTip,
  15490. {
  15491. confirmButtonText: this.lang.ssConfirm,
  15492. cancelButtonText: this.lang.ssCancel,
  15493. type: "warning",
  15494. }
  15495. )
  15496. .then(() => {
  15497. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15498. this.updateWork();
  15499. this.dialogVisibleStageChange = false;
  15500. })
  15501. .catch(() => {
  15502. return;
  15503. });
  15504. },
  15505. addAnswer() {
  15506. if (this.answerQ == "") {
  15507. this.$message.error(this.lang.ssEnterQuesL);
  15508. return;
  15509. }
  15510. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15511. this.taskCount
  15512. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15513. this.dialogVisible8 = false;
  15514. if (
  15515. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15516. .toolChoose[this.toolIndex].tool != 15
  15517. ) {
  15518. this.addTools(15, this.taskCount, this.toolIndex);
  15519. }
  15520. },
  15521. addMp3Answer() {
  15522. if (this.answerQ == "") {
  15523. this.$message.error(this.lang.ssEnterWant);
  15524. return;
  15525. }
  15526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15527. this.taskCount
  15528. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15529. this.dialogVisibleMp3 = false;
  15530. },
  15531. addRateAnswer() {
  15532. var a = 1;
  15533. for (var i = 0; i < this.rateJson.length; i++) {
  15534. if (this.rateJson[i].value == "") {
  15535. a = 2;
  15536. break;
  15537. }
  15538. }
  15539. if (a == 2) {
  15540. this.$message.error(this.lang.ssFillEvaInfo);
  15541. return;
  15542. }
  15543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15544. this.taskCount
  15545. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15546. this.dialogVisibleRate = false;
  15547. if (
  15548. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15549. .toolChoose[this.toolIndex].tool != 40
  15550. ) {
  15551. this.addTools(40, this.taskCount, this.toolIndex);
  15552. }
  15553. },
  15554. addSelectAnswer() {
  15555. if (this.selectJson.url == "") {
  15556. this.$message.error(this.lang.ssUploadQues);
  15557. return;
  15558. }
  15559. if (!this.selectJson.select.length) {
  15560. this.$message.error(this.lang.ssAddOpt);
  15561. return;
  15562. }
  15563. if (!this.selectJson.answer.length) {
  15564. this.$message.error(this.lang.ssSetAns);
  15565. return;
  15566. }
  15567. var a = 1;
  15568. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15569. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15570. a = 2;
  15571. }
  15572. }
  15573. if (a == 2) {
  15574. this.$message.error(this.lang.ssSetAns);
  15575. return;
  15576. }
  15577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15578. this.taskCount
  15579. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15580. this.dialogVisibleSelect = false;
  15581. if (
  15582. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15583. .toolChoose[this.toolIndex].tool != 41
  15584. ) {
  15585. this.addTools(41, this.taskCount, this.toolIndex);
  15586. }
  15587. },
  15588. nextSelectSteps() {
  15589. if (this.selectJson.url == "") {
  15590. this.$message.error(this.lang.ssUploadQues);
  15591. return;
  15592. }
  15593. if (!this.selectJson.select.length) {
  15594. this.$message.error(this.lang.ssAddOpt);
  15595. return;
  15596. } else {
  15597. for (var z = 0; z < this.selectJson.select.length; z++) {
  15598. let checkC = this.selectJson.select[z];
  15599. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15600. let checkC2 = this.selectJson.select[z2];
  15601. if (checkC == checkC2) {
  15602. this.$message.error(
  15603. this.lang.ssOptDup2.replace(/\*/g, z + 1).replace(/\$/g, z2 + 1)
  15604. );
  15605. return;
  15606. }
  15607. }
  15608. }
  15609. }
  15610. var a = 1;
  15611. for (var i = 0; i < this.selectJson.select.length; i++) {
  15612. if (!this.selectJson.select[i]) {
  15613. a = 2;
  15614. }
  15615. }
  15616. if (a == 2) {
  15617. this.$message.error(this.lang.ssOptEmpty2);
  15618. return;
  15619. }
  15620. this.selectSteps++;
  15621. },
  15622. selectCourseDetail() {
  15623. if (this.cid == "" || this.cid == undefined) {
  15624. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15625. this.isTeacherSee = true;
  15626. }
  15627. console.log(this.lang.ssNewCourse);
  15628. this.selectAllType();
  15629. this.chatid = uuidv4();
  15630. // this.courseTextB = false
  15631. } else {
  15632. this.isOutline = true
  15633. this.isOutline2 = true
  15634. this.cpoteType = 4
  15635. this.cidType = 1;
  15636. let params = {
  15637. cid: this.cid,
  15638. };
  15639. this.ajax
  15640. .get(this.$store.state.api + "select_course_detail", params)
  15641. .then((res) => {
  15642. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15643. this.courseState = res.data[0][0].state;
  15644. for (var j = 0; j < this.unitJson.length; j++) {
  15645. for (
  15646. var k = 0;
  15647. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15648. k++
  15649. ) {
  15650. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15651. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15652. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15653. : [];
  15654. let _chapterData = [];
  15655. for (
  15656. var c = 0;
  15657. c <
  15658. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15659. .length;
  15660. c++
  15661. ) {
  15662. if (
  15663. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15664. ) {
  15665. _chapterData.push(
  15666. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15667. );
  15668. }
  15669. }
  15670. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15671. _chapterData;
  15672. }
  15673. }
  15674. this.$forceUpdate();
  15675. this.courseName = res.data[0][0].title;
  15676. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15677. this.courseText = res.data[0][0].brief;
  15678. this.courseText2 = res.data[0][0].reBrief;
  15679. this.evalua = res.data[0][0].evaId;
  15680. this.cover = JSON.parse(res.data[0][0].cover);
  15681. this.noneBtnImg = this.cover.length >= 1;
  15682. if (res.data[0][0].refile) {
  15683. this.infoData = JSON.parse(res.data[0][0].refile)
  15684. }
  15685. // this.checkboxList =
  15686. // res.data[0][0].course_student.length > 0
  15687. // ? JSON.parse(res.data[0][0].course_student)
  15688. // : [];
  15689. this.checkboxList2 = res.data[0][0].juri
  15690. ? res.data[0][0].juri.split(",")
  15691. : [];
  15692. this.inviteCode = [];
  15693. for (var i = 0; i < res.data[2].length; i++) {
  15694. this.inviteCode.push({
  15695. cid: res.data[2][i].classid,
  15696. ic: res.data[2][i].code,
  15697. });
  15698. }
  15699. this.checkboxList3 = res.data[0][0].course_teacher
  15700. ? res.data[0][0].course_teacher.split(",")
  15701. : [];
  15702. // this.isTeacherSee =
  15703. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15704. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15705. this.myWord = res.data[0][0].template;
  15706. this.templateC.id = "123";
  15707. this.courseUserid = res.data[0][0].userid;
  15708. // if(this.courseUserid == this.userid){
  15709. // this.InviteChange(this.checkboxList2)
  15710. // }
  15711. this.nbOrder = res.data[0][0].ordernumber;
  15712. this.courseTypeId = [];
  15713. for (var i = 0; i < res.data[1].length; i++) {
  15714. this.courseTypeId.push(res.data[1][i].typeid);
  15715. }
  15716. console.log(this.courseTypeId);
  15717. // if (this.timer) clearInterval(this.timer);
  15718. if (this.timer) clearTimeout(this.timer);
  15719. this.timer = null;
  15720. // this.timer = setInterval(() => {
  15721. if(res.data[3].length){
  15722. try {
  15723. this.aiJson = JSON.parse(res.data[3][0].tips);
  15724. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15725. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15726. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15727. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15728. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15729. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15730. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15731. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15732. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15733. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15734. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15735. }
  15736. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15737. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15738. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15739. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15740. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15741. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15742. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15743. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15744. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15745. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15746. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15747. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15748. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15749. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15750. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15751. 讨论:<转文本内容>`
  15752. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15753. this.templateid = res.data[3][0].template;
  15754. this.getTipsTemplateIsDialog()
  15755. }catch(error){
  15756. console.error(error)
  15757. }
  15758. }
  15759. if(res.data[0][0].cpote){
  15760. try {
  15761. this.cpote = JSON.parse(res.data[0][0].cpote);
  15762. }catch(error){
  15763. console.error(error)
  15764. }
  15765. }
  15766. if(res.data[0][0].setting){
  15767. try {
  15768. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15769. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15770. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15771. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15772. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15773. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15774. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15775. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15776. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15777. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15778. 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;
  15779. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15780. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15781. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15782. 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;
  15783. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15784. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15785. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15786. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15787. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15788. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15789. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15790. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15791. this.courseTextBool = true
  15792. }
  15793. // if(!this.teacherCourseText && !this.targetCourseText2){
  15794. // this.isuseT = 1
  15795. // }
  15796. }catch(error){
  15797. console.error(error)
  15798. }
  15799. }
  15800. if(this.courseText){
  15801. this.courseTextB = false
  15802. }
  15803. if(this.teacherCourseText){
  15804. this.teacherCourseTextB = false
  15805. }
  15806. if(this.targetCourseText){
  15807. this.targetCourseTextB = false
  15808. }
  15809. if(this.targetCourseText2){
  15810. this.targetCourseText2B = false
  15811. }
  15812. this.isFileSearch = res.data[0][0].iresearch == 1
  15813. // this.seleteCourseUpdate();
  15814. this.setMan();
  15815. this.selectAllType();
  15816. this.unitJson[
  15817. this.unitIndex
  15818. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15819. // }, 5000);
  15820. this.$forceUpdate();
  15821. setTimeout(() => {
  15822. this.checkEva(this.evalua);
  15823. setTimeout(() => {
  15824. this.checkEva(this.evalua);
  15825. }, 100);
  15826. }, 100);
  15827. })
  15828. .catch((err) => {
  15829. console.error(err);
  15830. });
  15831. }
  15832. if(this.aiId){
  15833. let params = {
  15834. cid: this.aiId,
  15835. };
  15836. this.ajax
  15837. .get(this.$store.state.api + "select_course_detail", params)
  15838. .then((res) => {
  15839. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15840. let fileInfo = []
  15841. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15842. for(var i = 0; i < _unitJson.length; i++){
  15843. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15844. for(var j = 0; j < tasks.length; j++){
  15845. let _infoData = tasks[j].chapterData.filter(el => {
  15846. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15847. })
  15848. if(_infoData.length){
  15849. fileInfo = [...fileInfo, ..._infoData]
  15850. }
  15851. }
  15852. }
  15853. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15854. this.$forceUpdate();
  15855. this.courseName = res.data[0][0].title;
  15856. this.courseText = res.data[0][0].brief;
  15857. this.courseText2 = res.data[0][0].reBrief;
  15858. this.cover = JSON.parse(res.data[0][0].cover);
  15859. this.noneBtnImg = this.cover.length >= 1;
  15860. this.checkboxList2 = res.data[0][0].juri
  15861. ? res.data[0][0].juri.split(",")
  15862. : [];
  15863. this.inviteCode = [];
  15864. for (var i = 0; i < res.data[2].length; i++) {
  15865. this.inviteCode.push({
  15866. cid: res.data[2][i].classid,
  15867. ic: res.data[2][i].code,
  15868. });
  15869. }
  15870. this.checkboxList3 = res.data[0][0].course_teacher
  15871. ? res.data[0][0].course_teacher.split(",")
  15872. : [];
  15873. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15874. this.myWord = res.data[0][0].template;
  15875. this.templateC.id = "123";
  15876. this.courseTypeId = [];
  15877. for (var i = 0; i < res.data[1].length; i++) {
  15878. this.courseTypeId.push(res.data[1][i].typeid);
  15879. }
  15880. console.log(this.courseTypeId);
  15881. if(res.data[3].length){
  15882. try {
  15883. this.aiJson = JSON.parse(res.data[3][0].tips);
  15884. this.templateid = res.data[3][0].template;
  15885. this.getTipsTemplateIsDialog()
  15886. }catch(error){
  15887. console.error(error)
  15888. }
  15889. }
  15890. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15891. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15892. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15893. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15894. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15895. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15896. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15897. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15898. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15899. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15900. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15901. }
  15902. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15903. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15904. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15905. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15906. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15907. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15908. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15909. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15910. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15911. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15912. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15913. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15914. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15915. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15916. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15917. 讨论:<转文本内容>`
  15918. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15919. if(res.data[0][0].cpote){
  15920. try {
  15921. this.cpote = JSON.parse(res.data[0][0].cpote);
  15922. }catch(error){
  15923. console.error(error)
  15924. }
  15925. }
  15926. if(res.data[0][0].setting){
  15927. try {
  15928. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15929. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15930. 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];
  15931. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15932. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15933. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15934. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15935. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15936. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15937. 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];
  15938. 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;
  15939. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15940. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15941. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15942. 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;
  15943. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15944. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15945. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15946. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15947. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15948. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15949. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15950. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15951. this.courseTextBool = true
  15952. }
  15953. // if(!this.teacherCourseText && !this.targetCourseText2){
  15954. // this.isuseT = 1
  15955. // }
  15956. }catch(error){
  15957. console.error(error)
  15958. }
  15959. }
  15960. if(this.teacherInfoData.length){
  15961. this.isuseT = true
  15962. }
  15963. if(this.courseText){
  15964. this.courseTextB = false
  15965. }
  15966. if(this.teacherCourseText){
  15967. this.teacherCourseTextB = false
  15968. }
  15969. if(this.targetCourseText){
  15970. this.targetCourseTextB = false
  15971. }
  15972. if(this.targetCourseText2){
  15973. this.targetCourseText2B = false
  15974. }
  15975. this.setMan();
  15976. this.unitJson[
  15977. this.unitIndex
  15978. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15979. this.$forceUpdate();
  15980. setTimeout(() => {
  15981. this.checkEva(this.evalua);
  15982. setTimeout(() => {
  15983. this.checkEva(this.evalua);
  15984. }, 100);
  15985. }, 100);
  15986. })
  15987. .catch((err) => {
  15988. console.error(err);
  15989. });
  15990. }
  15991. // if(this.cidType != 1 && this.templateid == ''){
  15992. // this.promptShow = true
  15993. // }
  15994. },
  15995. seleteCourseUpdate() {
  15996. let params = {
  15997. cid: this.cid,
  15998. };
  15999. this.ajax
  16000. .get(this.$store.state.api + "select_course_detail", params)
  16001. .then((res) => {
  16002. // console.log(this.unitJson);
  16003. let unitJson = JSON.parse(res.data[0][0].chapters);
  16004. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  16005. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  16006. let _unitJson = [];
  16007. let _chapAarry = [];
  16008. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  16009. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  16010. let index = 1;
  16011. let chapindex;
  16012. if (_unitJson2.length > unitJson.length) {
  16013. for (let c = 0; c < _unitJson2.length; c++) {
  16014. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  16015. }
  16016. for (let j = 0; j < unitJson.length; j++) {
  16017. let count = 0;
  16018. for (let k = 0; k < _unitJson2.length; k++) {
  16019. if (
  16020. unitJson[j].chapterInfo[0].chapterid ==
  16021. _unitJson2[k].chapterInfo[0].chapterid
  16022. ) {
  16023. count++;
  16024. _chapAarry.splice(
  16025. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16026. 1
  16027. );
  16028. _unitJson.push(unitJson[j]);
  16029. break;
  16030. }
  16031. }
  16032. // if(count === 0){
  16033. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16034. // }
  16035. }
  16036. for (let k = 0; k < _unitJson2.length; k++) {
  16037. if (_unitJson2[k].isUpdate == 1) {
  16038. _chapAarry.splice(
  16039. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16040. 1
  16041. );
  16042. _unitJson.push(_unitJson2[k]);
  16043. }
  16044. }
  16045. console.log(_chapAarry);
  16046. for (let d = 0; d < _unitJson2.length; d++) {
  16047. if (
  16048. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  16049. ) {
  16050. if (_unitIndex == d) {
  16051. index = 2;
  16052. }
  16053. chapindex = d;
  16054. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16055. }
  16056. }
  16057. } else {
  16058. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  16059. }
  16060. for (let i = 0; i < unitJson.length; i++) {
  16061. if (
  16062. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  16063. _unitJson[i].chapterInfo[0].chapterid !=
  16064. unitJson[i].chapterInfo[0].chapterid
  16065. ) {
  16066. if (i == _unitJson.length - 1) {
  16067. // this.unitIndex++
  16068. _unitIndex2++;
  16069. }
  16070. _unitJson.splice(i, 0, unitJson[i]);
  16071. } else if (i > _unitJson.length - 1) {
  16072. _unitJson.push(unitJson[i]);
  16073. } else if (
  16074. _unitJson[i].chapterInfo[0].chapterid ==
  16075. unitJson[i].chapterInfo[0].chapterid
  16076. ) {
  16077. _unitJson[i] = unitJson[i];
  16078. }
  16079. // if (i == _unitIndex) {
  16080. // continue;
  16081. // } else
  16082. }
  16083. if (_chapAarry.length && index != 2) {
  16084. if (chapindex < _unitIndex) {
  16085. this.isDelete = 2;
  16086. // this.unitIndex--;
  16087. _unitIndex2--;
  16088. } else if (
  16089. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  16090. _unitJson[_unitIndex].chapterInfo[0].chapterid
  16091. ) {
  16092. this.isDelete = 2;
  16093. for (let n = 0; n < _unitJson.length; n++) {
  16094. if (
  16095. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  16096. _unitJson[n].chapterInfo[0].chapterid
  16097. ) {
  16098. // this.unitIndex = n;
  16099. _unitIndex2 = n;
  16100. _unitJson[n] = _unitJson2[_unitIndex];
  16101. break;
  16102. }
  16103. }
  16104. }
  16105. } else if (index != 2) {
  16106. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  16107. _unitJson2[_unitIndex];
  16108. for (
  16109. var ci = 0;
  16110. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  16111. ci++
  16112. ) {
  16113. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  16114. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  16115. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16116. .toolChoose
  16117. : [];
  16118. let _chapterData = [];
  16119. for (
  16120. var c = 0;
  16121. c <
  16122. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  16123. .length;
  16124. c++
  16125. ) {
  16126. if (
  16127. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16128. .chapterData[c]
  16129. ) {
  16130. _chapterData.push(
  16131. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16132. .chapterData[c]
  16133. );
  16134. }
  16135. }
  16136. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  16137. _chapterData;
  16138. }
  16139. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  16140. }
  16141. if (index == 1) {
  16142. this.unitJson = _unitJson;
  16143. this.$forceUpdate();
  16144. setTimeout(() => {
  16145. if (this.unitIndex != _unitIndex2) {
  16146. this.isDelete = 2;
  16147. this.unitIndex = _unitIndex2;
  16148. }
  16149. }, 0);
  16150. this.timer = setTimeout(() => {
  16151. this.seleteCourseUpdate();
  16152. }, 5000);
  16153. } else if (index == 2) {
  16154. let _this = this;
  16155. _this
  16156. .$confirm(
  16157. _this.lang.ssStageDeletedRestore,
  16158. _this.lang.ssTip,
  16159. {
  16160. confirmButtonText: _this.lang.ssNeed,
  16161. cancelButtonText: _this.lang.ssCancel,
  16162. type: "warning",
  16163. }
  16164. )
  16165. .then(() => {
  16166. if (_this.time()) {
  16167. _this.restoreWork(
  16168. _chapAarry[0],
  16169. _unitJson,
  16170. chapindex,
  16171. _unitJson2,
  16172. _unitIndex2
  16173. );
  16174. }
  16175. })
  16176. .catch(() => {
  16177. _this.unitJson = _unitJson;
  16178. _this.$forceUpdate();
  16179. setTimeout(() => {
  16180. if (this.unitIndex != _unitIndex2) {
  16181. this.isDelete = 2;
  16182. this.unitIndex = _unitIndex2;
  16183. }
  16184. }, 0);
  16185. _this.timer = setTimeout(() => {
  16186. _this.seleteCourseUpdate();
  16187. }, 5000);
  16188. });
  16189. }
  16190. // 在复制操作之前记录滚动位置
  16191. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16192. // 执行复制操作
  16193. // 复制操作完成后恢复滚动位置
  16194. this.$nextTick(() => {
  16195. if (this.$refs.scrollContainer) {
  16196. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16197. }
  16198. });
  16199. })
  16200. .catch((err) => {
  16201. console.error(err);
  16202. });
  16203. },
  16204. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16205. let params = [
  16206. {
  16207. cid: this.cid,
  16208. chapters: JSON.stringify(this.unitJson),
  16209. uid: this.userid,
  16210. chapid: chapid,
  16211. },
  16212. ];
  16213. this.ajax
  16214. .post(this.$store.state.api + "restoreWork", params)
  16215. .then((res) => {
  16216. this.$message({
  16217. message: "恢复成功",
  16218. type: "success",
  16219. });
  16220. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16221. this.unitJson = unitJson;
  16222. this.$forceUpdate();
  16223. setTimeout(() => {
  16224. if (this.unitIndex != unitIndex2) {
  16225. this.isDelete = 2;
  16226. this.unitIndex = unitIndex2;
  16227. }
  16228. }, 0);
  16229. this.timer = setTimeout(() => {
  16230. this.seleteCourseUpdate();
  16231. }, 5000);
  16232. })
  16233. .catch((err) => {
  16234. this.$message.error(this.lang.ssNetPoor);
  16235. console.error(err);
  16236. });
  16237. },
  16238. getTypeName() {
  16239. console.log(this.courseTypeId);
  16240. this.$forceUpdate();
  16241. },
  16242. selectAllType() {
  16243. let params = {
  16244. org: this.org && this.org != "" ? this.org : "",
  16245. oid: this.oid && this.oid != "" ? this.oid : "",
  16246. stand: this.lang.lang
  16247. };
  16248. this.ajax
  16249. .get(this.$store.state.api + "selectAllTypeStand", params)
  16250. .then((res) => {
  16251. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16252. res.data[0] = [...res.data[0], ...res.data[4]];
  16253. }
  16254. this.CourseType = res.data;
  16255. this.CourseType2 = [
  16256. { name: this.lang.ssZhijian, id: [] },
  16257. { name: this.lang.ssZhixing, id: [] },
  16258. { name: this.lang.ssIntelli, id: [] },
  16259. ];
  16260. for (var cti = 0; cti < res.data[0].length; cti++) {
  16261. if (
  16262. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16263. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16264. ) {
  16265. this.CourseType2[0].id.push(res.data[0][cti].id);
  16266. } else if (
  16267. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16268. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16269. ) {
  16270. this.CourseType2[1].id.push(res.data[0][cti].id);
  16271. } else if (
  16272. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16273. ) {
  16274. this.CourseType2[2].id.push(res.data[0][cti].id);
  16275. }
  16276. if (
  16277. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16278. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16279. ) {
  16280. res.data[0][cti].name = this.lang.ssGradeType;
  16281. } else if (
  16282. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16283. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16284. ) {
  16285. res.data[0][cti].name = this.lang.ssSubjectCategory;
  16286. } else if (
  16287. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16288. ) {
  16289. res.data[0][cti].name = this.lang.ssThemeType;
  16290. }
  16291. }
  16292. let _courseTypeId = [];
  16293. for (var i = 0; i < res.data[0].length; i++) {
  16294. if (!this.cid) {
  16295. this.courseTypeId[res.data[0][i].id] = [];
  16296. }
  16297. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16298. // }
  16299. this.CourseTypeJson[res.data[0][i].id] = [];
  16300. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16301. if (res.data[0][i].name == this.lang.ssColumn) {
  16302. this.CourseType[0][i].name = this.lang.ssThemeType;
  16303. }
  16304. }
  16305. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16306. for (var j = 0; j < res.data[1].length; j++) {
  16307. if (
  16308. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16309. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16310. ) {
  16311. _courseTypeId.push(res.data[1][j].id);
  16312. }
  16313. if (res.data[0][i].id == res.data[1][j].pid) {
  16314. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16315. }
  16316. }
  16317. } else {
  16318. if (res.data[2].length > 0) {
  16319. for (var j = 0; j < res.data[2].length; j++) {
  16320. if (
  16321. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16322. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16323. ) {
  16324. _courseTypeId.push(res.data[2][j].id);
  16325. }
  16326. if (res.data[0][i].id == res.data[2][j].pid) {
  16327. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16328. }
  16329. }
  16330. }
  16331. if (res.data[3].length > 0) {
  16332. for (var j = 0; j < res.data[3].length; j++) {
  16333. if (
  16334. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16335. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16336. ) {
  16337. _courseTypeId.push(res.data[3][j].id);
  16338. }
  16339. if (res.data[0][i].id == res.data[3][j].pid) {
  16340. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16341. }
  16342. }
  16343. }
  16344. }
  16345. }
  16346. if (this.CourseType[0] && this.CourseType[0].length && this.lang.lang == 'com') {
  16347. this.CourseType[0] = this.CourseType[0].filter(item => item.id != '34629bcc-d02f-11ec-8c78-005056b86db5');
  16348. }
  16349. this.courseTypeId = _courseTypeId;
  16350. this.typeC1 = this.getTypeC(2)
  16351. this.typeC2 = this.getTypeC(1)
  16352. })
  16353. .catch((err) => {
  16354. console.error(err);
  16355. });
  16356. },
  16357. selectType() {
  16358. this.ajax
  16359. .get(this.$store.state.api + "selectType")
  16360. .then((res) => {
  16361. this.CourseType = res.data;
  16362. for (var i = 0; i < res.data[0].length; i++) {
  16363. if (!this.cid) {
  16364. this.courseTypeId[res.data[0][i].id] = "";
  16365. }
  16366. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16367. if (res.data[0][i].name == this.lang.ssColumn) {
  16368. this.CourseType[0][i].name = this.lang.ssThemeType;
  16369. }
  16370. }
  16371. for (var j = 0; j < res.data[1].length; j++) {
  16372. if (res.data[0][i].id == res.data[1][j].pid) {
  16373. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16374. this.CourseTypeJson[res.data[0][i].id] = [];
  16375. }
  16376. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16377. }
  16378. }
  16379. }
  16380. this.selectTypeByOid();
  16381. this.selectTypeByOrg();
  16382. })
  16383. .catch((err) => {
  16384. console.error(err);
  16385. });
  16386. },
  16387. selectTypeByOid() {
  16388. let params = {
  16389. oid: this.oid,
  16390. };
  16391. this.ajax
  16392. .get(this.$store.state.api + "selectTypeByOid", params)
  16393. .then((res) => {
  16394. for (var i = 0; i < res.data[0].length; i++) {
  16395. for (var j = 0; j < res.data[1].length; j++) {
  16396. if (res.data[0][i].id == res.data[1][j].pid) {
  16397. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16398. this.CourseTypeJson[res.data[0][i].id] = [];
  16399. }
  16400. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16401. }
  16402. }
  16403. }
  16404. })
  16405. .catch((err) => {
  16406. console.error(err);
  16407. });
  16408. },
  16409. selectTypeByOrg() {
  16410. let params = {
  16411. oid: this.org,
  16412. };
  16413. this.ajax
  16414. .get(this.$store.state.api + "selectTypeByOrg", params)
  16415. .then((res) => {
  16416. for (var i = 0; i < res.data[0].length; i++) {
  16417. for (var j = 0; j < res.data[1].length; j++) {
  16418. if (res.data[0][i].id == res.data[1][j].pid) {
  16419. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16420. this.CourseTypeJson[res.data[0][i].id] = [];
  16421. }
  16422. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16423. }
  16424. }
  16425. }
  16426. this.$forceUpdate();
  16427. })
  16428. .catch((err) => {
  16429. console.error(err);
  16430. });
  16431. },
  16432. OtherMb(type, task) {
  16433. if (task === 0 || task) {
  16434. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16435. task
  16436. ].isEvaFold = true;
  16437. }
  16438. this.typeMode = type;
  16439. setTimeout(() => {
  16440. this.checkEva(this.checkId);
  16441. setTimeout(() => {
  16442. this.checkEva(this.checkId);
  16443. }, 100);
  16444. }, 100);
  16445. },
  16446. openMember() {
  16447. this.searchTN = "";
  16448. this.getTeacher();
  16449. this.dialogVisibleMember = true;
  16450. },
  16451. checkEva(id, type) {
  16452. this.dialogVisiblemb = false;
  16453. this.selectEva();
  16454. if (this.evalua != id && type == 2) {
  16455. this.$message.success(this.lang.ssImportOk);
  16456. setTimeout(() => {
  16457. this.checkEva(id);
  16458. }, 100);
  16459. }
  16460. this.evalua = id;
  16461. this.checkId = id;
  16462. if (this.evalua != "") {
  16463. for (var i = 0; i < this.evaJuri.length; i++) {
  16464. if (this.evalua == this.evaJuri[i].id) {
  16465. this.eTitle = this.evaJuri[i].title;
  16466. this.eJson = JSON.parse(this.evaJuri[i].content);
  16467. }
  16468. }
  16469. this.data.data = [];
  16470. this.$forceUpdate();
  16471. setTimeout(() => {
  16472. this.setMindData();
  16473. }, 1000);
  16474. }
  16475. },
  16476. deleteEva() {
  16477. let _this = this;
  16478. if (_this.evalua == "") {
  16479. this.$message.warning(this.lang.ssClearAgain);
  16480. return;
  16481. }
  16482. _this
  16483. .$confirm(this.lang.ssDelTarget, this.lang.ssTip, {
  16484. confirmButtonText: this.lang.ssConfirm,
  16485. cancelButtonText: this.lang.ssCancel,
  16486. type: "warning",
  16487. })
  16488. .then(() => {
  16489. _this.evalua = "";
  16490. _this.checkId = "";
  16491. _this.eTitle = "";
  16492. let _unitJson = _this.unitJson;
  16493. for (var i = 0; i < _unitJson.length; i++) {
  16494. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16495. for (var j = 0; j < _task.length; j++) {
  16496. let _eList = _task[j].eList;
  16497. for (var k = 0; k < _eList.length; k++) {
  16498. delete _eList[k].target;
  16499. }
  16500. }
  16501. }
  16502. _this.$forceUpdate();
  16503. if (_this.cid) {
  16504. _this.updateWork();
  16505. }
  16506. })
  16507. .catch(() => {
  16508. return;
  16509. });
  16510. },
  16511. selectEva() {
  16512. let params = {
  16513. oid: this.oid,
  16514. };
  16515. this.ajax
  16516. .get(this.$store.state.api + "selectAllEvaluation", params)
  16517. .then((res) => {
  16518. this.evaJuri = res.data[0];
  16519. // 在复制操作之前记录滚动位置
  16520. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16521. // 执行复制操作
  16522. // 复制操作完成后恢复滚动位置
  16523. this.$nextTick(() => {
  16524. if (this.$refs.scrollContainer) {
  16525. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16526. }
  16527. });
  16528. })
  16529. .catch((err) => {
  16530. console.error(err);
  16531. });
  16532. },
  16533. setMindData() {
  16534. let targetArray = [];
  16535. this.data.data = [];
  16536. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16537. let _eJson = Object.keys(this.eJson);
  16538. let _e = this.eJson;
  16539. for (let i = 0; i < _eJson.length; i++) {
  16540. let element = _e[_eJson[i]];
  16541. this.data.data.push({
  16542. id: element.id,
  16543. parentid: "root",
  16544. topic: element.name,
  16545. });
  16546. // targetArray.push({
  16547. // id: element.id,
  16548. // parentid: "root",
  16549. // name: element.name,
  16550. // });
  16551. targetArray.push({
  16552. value: element.name,
  16553. label: element.name,
  16554. children: [],
  16555. });
  16556. let _eJsonc = Object.keys(element.child);
  16557. let _e2 = element.child;
  16558. for (let j = 0; j < _eJsonc.length; j++) {
  16559. let _ec = _e2[_eJsonc[j]];
  16560. this.data.data.push({
  16561. id: _ec.id,
  16562. parentid: element.id,
  16563. topic: _ec.name,
  16564. });
  16565. // targetArray.push({
  16566. // id: _ec.id,
  16567. // parentid: element.id,
  16568. // name: _ec.name,
  16569. // });
  16570. targetArray[i].children.push({
  16571. value: _ec.name,
  16572. label: _ec.name,
  16573. children: [],
  16574. });
  16575. let _eJsonz = Object.keys(_ec.child);
  16576. let _e3 = _ec.child;
  16577. for (let z = 0; z < _eJsonz.length; z++) {
  16578. let _ez = _e3[_eJsonz[z]];
  16579. this.data.data.push({
  16580. id: _ez.id,
  16581. parentid: _ec.id,
  16582. topic: _ez.name,
  16583. });
  16584. // targetArray.push({
  16585. // id: _ez.id,
  16586. // parentid: _ec.id,
  16587. // name: _ez.name,
  16588. // });
  16589. targetArray[i].children[j].children.push({
  16590. value: _ez.name,
  16591. label: _ez.name,
  16592. });
  16593. }
  16594. }
  16595. }
  16596. this.targetArray = targetArray;
  16597. this.$forceUpdate();
  16598. },
  16599. /*添加评价 */
  16600. addEList(index, tIndex) {
  16601. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16602. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16603. value: "",
  16604. detail: "",
  16605. score: 5,
  16606. isai: "1",
  16607. })
  16608. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16609. { value: "", detail: "", score: 5,isai: "1", },
  16610. ]);
  16611. this.$forceUpdate();
  16612. },
  16613. openEList(index, tIndex) {
  16614. this.evaIndex = index;
  16615. this.evatIndex = tIndex;
  16616. this.evaBoxDialog = true;
  16617. },
  16618. addCET(index, tIndex) {
  16619. this.cetIndex = index;
  16620. this.cettIndex = tIndex;
  16621. this.selectAllType1();
  16622. },
  16623. addCETemplate() {
  16624. var array =
  16625. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16626. .eList;
  16627. let params = [
  16628. {
  16629. uid: this.userid,
  16630. n: this.templateName,
  16631. json: JSON.stringify(array),
  16632. t: 1,
  16633. oid: this.oid,
  16634. },
  16635. ];
  16636. this.ajax
  16637. .post(this.$store.state.api + "addCETShare", params)
  16638. .then((res) => {
  16639. this.addTypeByCET(res.data[0][0].id);
  16640. })
  16641. .catch((err) => {
  16642. this.$message.error(this.lang.ssNetPoor);
  16643. console.error(err);
  16644. });
  16645. },
  16646. addTypeByCET(id) {
  16647. if (this.setTypeJson.two == "") {
  16648. this.$message.warning(this.lang.ssSelSecAdd);
  16649. return;
  16650. }
  16651. let params = {
  16652. cid: id,
  16653. };
  16654. this.ajax
  16655. .get(this.$store.state.api + "deleteCETLabel", params)
  16656. .then((res) => {
  16657. for (var i = 0; i < 2; i++) {
  16658. let tid = "";
  16659. if (i == 0) {
  16660. tid = this.setTypeJson.one;
  16661. } else {
  16662. tid = this.setTypeJson.two;
  16663. }
  16664. let params = [
  16665. {
  16666. cid: id,
  16667. tid: tid,
  16668. uid: this.userid,
  16669. },
  16670. ];
  16671. this.ajax
  16672. .post(this.$store.state.api + "addCETLabel", params)
  16673. .then((res) => {
  16674. this.$message({
  16675. message: this.lang.ssAddOk,
  16676. type: "success",
  16677. });
  16678. this.close();
  16679. })
  16680. .catch((err) => {
  16681. this.$message.error(this.lang.ssNetPoor);
  16682. console.error(err);
  16683. });
  16684. }
  16685. })
  16686. .catch((err) => {
  16687. this.$message.error(this.lang.ssNetPoor);
  16688. console.error(err);
  16689. });
  16690. },
  16691. updateEvaJson(array) {
  16692. array = array.filter((item) => {
  16693. item.isai = "1"
  16694. return item;
  16695. });
  16696. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16697. this.evatIndex
  16698. ].eList = array;
  16699. },
  16700. forceUpdate() {
  16701. this.$forceUpdate();
  16702. },
  16703. forceUpdate2() {
  16704. setTimeout(() => {
  16705. this.courseText += "*0*%*";
  16706. setTimeout(() => {
  16707. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16708. }, 0);
  16709. }, 100);
  16710. this.$forceUpdate();
  16711. },
  16712. deletEList(index, tIndex, eIndex) {
  16713. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16714. eIndex,
  16715. 1
  16716. );
  16717. this.$forceUpdate();
  16718. },
  16719. getChoosePic(t) {
  16720. this.chooseType = t;
  16721. this.getAllBanner();
  16722. },
  16723. getAllBanner() {
  16724. this.sysPicVisible = true;
  16725. let params = {
  16726. t: this.chooseType,
  16727. };
  16728. this.ajax
  16729. .get(this.$store.state.api + "selectAllBanner", params)
  16730. .then((res) => {
  16731. this.sysPic = res.data[0];
  16732. })
  16733. .catch((err) => {
  16734. console.error(err);
  16735. });
  16736. },
  16737. // getClass() {
  16738. // let params = {
  16739. // oid: this.oid,
  16740. // };
  16741. // this.ajax
  16742. // .get(this.$store.state.api + "selectClassBySchool", params)
  16743. // .then((res) => {
  16744. // this.classJuri = res.data[0];
  16745. // })
  16746. // .catch((err) => {
  16747. // console.error(err);
  16748. // });
  16749. // },
  16750. deleteSysPic() {
  16751. this.cover = [];
  16752. this.isSysPic = false;
  16753. this.isSysPic2 = false;
  16754. },
  16755. deleteSelectPic() {
  16756. this.selectJson.url = "";
  16757. },
  16758. setEListStar() {
  16759. this.$forceUpdate();
  16760. },
  16761. deletRateList(i) {
  16762. this.rateJson.splice(i, 1);
  16763. },
  16764. addRateList() {
  16765. this.rateJson.push({ detail: "", score: 5, value: "" });
  16766. },
  16767. addSt() {
  16768. this.sentenceList.push({
  16769. sentenceTitle: "",
  16770. addSentence: [],
  16771. rightAnswer: [],
  16772. });
  16773. },
  16774. addSen(i) {
  16775. if (!this.sentenceList[i].sentenceTitle) {
  16776. this.$message.error(this.lang.ssFillCard);
  16777. return;
  16778. }
  16779. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16780. this.$message.error(this.lang.ssCardOver10);
  16781. return;
  16782. }
  16783. if (
  16784. this.sentenceList[i].addSentence.indexOf(
  16785. this.sentenceList[i].sentenceTitle
  16786. ) !== -1
  16787. ) {
  16788. this.$message.error(this.lang.ssNoDupCard);
  16789. return;
  16790. }
  16791. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16792. // this.isPushTitleList.push(this.sentenceTitle);
  16793. this.sentenceList[i].sentenceTitle = "";
  16794. },
  16795. setRightAnswer(s, i, j) {
  16796. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16797. this.sentenceList[i].rightAnswer.push(s);
  16798. }
  16799. },
  16800. returnCard(r, i, j) {
  16801. this.sentenceList[i].rightAnswer.splice(j, 1);
  16802. },
  16803. addSentenceTool() {
  16804. for (var i = 0; i < this.sentenceList.length; i++) {
  16805. if (this.sentenceList[i].rightAnswer.length == 0) {
  16806. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16807. return;
  16808. }
  16809. if (
  16810. this.sentenceList[i].addSentence.length !=
  16811. this.sentenceList[i].rightAnswer.length
  16812. ) {
  16813. this.$message.error(this.lang.ssSetComplete.replace(/\*/g, i + 1));
  16814. return;
  16815. }
  16816. }
  16817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16818. this.taskCount
  16819. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16820. this.sentenceList = [
  16821. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16822. ];
  16823. this.dialogVisibleSentence = false;
  16824. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16825. // itemTaskIndex
  16826. // ].toolChoose[toolIndex].tool = [];
  16827. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16828. // itemTaskIndex
  16829. // ].toolChoose[toolIndex].tool.push(i);
  16830. if (
  16831. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16832. .toolChoose[this.toolIndex].tool != 47
  16833. ) {
  16834. this.addTools(47, this.taskCount, this.toolIndex);
  16835. }
  16836. },
  16837. addTableJson() {
  16838. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16839. // this.$message.error("请将信息填写完整!");
  16840. // return;
  16841. // }
  16842. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16843. this.taskCount
  16844. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16845. // this.tableJson = [{ text: "" }];
  16846. // this.dialogVisibleTable = false;
  16847. this.$message.success(this.lang.ssUploadSucc);
  16848. if (
  16849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16850. .toolChoose[this.toolIndex].tool != 48
  16851. ) {
  16852. this.addTools(48, this.taskCount, this.toolIndex);
  16853. }
  16854. },
  16855. addWordJson() {
  16856. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16857. this.taskCount
  16858. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16859. // this.wordJson = [{ text: "" }];
  16860. // this.dialogVisibleWord = false;
  16861. this.$message.success(this.lang.ssUploadSucc);
  16862. if (
  16863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16864. .toolChoose[this.toolIndex].tool != 52
  16865. ) {
  16866. this.addTools(52, this.taskCount, this.toolIndex);
  16867. }
  16868. },
  16869. addMoreUpload() {
  16870. if (this.uploadJson.length == 0) {
  16871. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16872. this.taskCount
  16873. ].toolChoose[this.toolIndex].uploadJson = [];
  16874. } else {
  16875. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16876. this.taskCount
  16877. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16878. }
  16879. this.uploadJson = [];
  16880. this.dialogVisibleMoreUpload = false;
  16881. if (
  16882. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16883. .toolChoose[this.toolIndex].tool != 50
  16884. ) {
  16885. this.addTools(50, this.taskCount, this.toolIndex);
  16886. }
  16887. },
  16888. addPreTime() {
  16889. if (this.preTime == 0) {
  16890. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16891. this.taskCount
  16892. ].toolChoose[this.toolIndex].preTime = 0;
  16893. } else {
  16894. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16895. this.taskCount
  16896. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16897. }
  16898. this.preTime = 0;
  16899. this.dialogVisiblePreTime = false;
  16900. if (
  16901. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16902. .toolChoose[this.toolIndex].tool != 10
  16903. ) {
  16904. this.addTools(10, this.taskCount, this.toolIndex);
  16905. }
  16906. },
  16907. goToTask(i) {
  16908. this.toolIndexType = "";
  16909. if (this.isClickColor == i + 1) {
  16910. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16911. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16912. // } else {
  16913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16914. i
  16915. ].toolOpen = true;
  16916. // }
  16917. this.$forceUpdate();
  16918. return;
  16919. }
  16920. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16921. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16922. // } else {
  16923. document.querySelectorAll(".basic_box")[0].scrollTop =
  16924. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16925. this.isClickColor = i + 1;
  16926. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16927. // }
  16928. this.$forceUpdate();
  16929. },
  16930. taskScroll(){
  16931. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16932. const sections = document.querySelectorAll('.taskBorder');
  16933. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16934. sections.forEach((section, index) => {
  16935. const offsetTop = section.offsetTop;
  16936. const offsetHeight = section.offsetHeight;
  16937. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16938. this.isClickColor = index +1;
  16939. }
  16940. });
  16941. },
  16942. taskOpen(i, stageIndex) {
  16943. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16944. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16945. } else {
  16946. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16947. }
  16948. this.updateWork3(stageIndex);
  16949. this.$forceUpdate();
  16950. },
  16951. goToTask2(i, stage) {
  16952. this.toolIndexType = "";
  16953. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16954. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16955. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16956. // } else {
  16957. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16958. i
  16959. ].toolOpen = true;
  16960. // }
  16961. this.$forceUpdate();
  16962. return;
  16963. }
  16964. if (this.unitIndex != stage) {
  16965. if (this.panUnitJson() == 2) {
  16966. return;
  16967. }
  16968. this.unitSet(stage);
  16969. }
  16970. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16971. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16972. // } else {
  16973. document.querySelectorAll(".basic_box")[0].scrollTop =
  16974. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16975. this.isClickColor = i + 1;
  16976. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16977. // }
  16978. this.$forceUpdate();
  16979. },
  16980. taskMove(type, index) {
  16981. this.$confirm(
  16982. this.lang.ssSwitchTaskDel,
  16983. this.lang.ssTip,
  16984. {
  16985. confirmButtonText: this.lang.ssConfirm,
  16986. cancelButtonText: this.lang.ssCancel,
  16987. type: "warning",
  16988. }
  16989. )
  16990. .then(() => {
  16991. if (type == 1) {
  16992. if (index > 0) {
  16993. let a = JSON.parse(
  16994. JSON.stringify(
  16995. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16996. index - 1
  16997. ]
  16998. )
  16999. );
  17000. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  17001. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  17002. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  17003. }
  17004. } else {
  17005. if (
  17006. index <
  17007. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  17008. ) {
  17009. let a = JSON.parse(
  17010. JSON.stringify(
  17011. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17012. index + 1
  17013. ]
  17014. )
  17015. );
  17016. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  17017. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  17018. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  17019. }
  17020. }
  17021. this.$forceUpdate();
  17022. })
  17023. .catch(() => {
  17024. return;
  17025. });
  17026. },
  17027. stageMove(type, index) {
  17028. if (type == 1) {
  17029. if (index > 0) {
  17030. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  17031. let acid = JSON.parse(
  17032. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  17033. );
  17034. let bcid = JSON.parse(
  17035. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17036. );
  17037. this.unitJson3[index - 1] = this.unitJson3[index];
  17038. this.unitJson3[index] = a;
  17039. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  17040. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17041. }
  17042. } else {
  17043. if (index < this.unitJson3.length - 1) {
  17044. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  17045. let acid = JSON.parse(
  17046. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  17047. );
  17048. let bcid = JSON.parse(
  17049. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17050. );
  17051. this.unitJson3[index + 1] = this.unitJson3[index];
  17052. this.unitJson3[index] = a;
  17053. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  17054. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17055. }
  17056. }
  17057. this.$forceUpdate();
  17058. },
  17059. addGroup(i) {
  17060. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  17061. this.groupJson.group.push({
  17062. name: this.lang.ssGroup.replace(/\*/g, this.groupJson.group.length + 1),
  17063. });
  17064. },
  17065. deleteGroup(i) {
  17066. this.groupJson.group.splice(i, 1);
  17067. },
  17068. numberPan() {
  17069. if (
  17070. /[^\d]/.test(this.groupJson.number) ||
  17071. this.groupJson.number < 2 ||
  17072. this.groupJson.number > 10
  17073. ) {
  17074. this.$message.error(this.lang.ssEnterNum);
  17075. this.groupJson.number = "";
  17076. }
  17077. },
  17078. numberPanJie() {
  17079. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  17080. this.$message.error(this.lang.ssInputNum1)
  17081. this.courseJie = 1
  17082. }
  17083. },
  17084. numberPanTime() {
  17085. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  17086. this.$message.error(this.lang.ssInputNum1)
  17087. this.courseTime = 1
  17088. }
  17089. },
  17090. addGroupJson() {
  17091. for (var i = 0; i < this.groupJson.group.length; i++) {
  17092. if (!this.groupJson.group[i].name) {
  17093. this.$message.error(this.lang.ssFillInfo);
  17094. return;
  17095. }
  17096. }
  17097. if (!this.groupJson.number) {
  17098. this.$message.error(this.lang.ssFillInfo);
  17099. return;
  17100. }
  17101. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17102. this.taskCount
  17103. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  17104. JSON.stringify(this.groupJson)
  17105. );
  17106. this.dialogVisibleGroup = false;
  17107. this.groupJson = {};
  17108. if (
  17109. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17110. .toolChoose[this.toolIndex].tool != 49
  17111. ) {
  17112. this.addTools(49, this.taskCount, this.toolIndex);
  17113. }
  17114. },
  17115. updateTime(preTime) {
  17116. this.preTime = preTime;
  17117. },
  17118. InviteChange(val) {
  17119. console.log(val);
  17120. let _check = [];
  17121. let _check2 = [];
  17122. for (var i = 0; i < this.grade2.length; i++) {
  17123. var gid = this.grade2[i].id;
  17124. _check.push(gid);
  17125. }
  17126. for (var i = 0; i < this.checkboxList2.length; i++) {
  17127. var _id = this.checkboxList2[i];
  17128. if (_check.indexOf(_id) !== -1) {
  17129. _check2.push(_id);
  17130. }
  17131. }
  17132. this.checkAll = _check2.length === _check.length;
  17133. return;
  17134. // let array = JSON.parse(JSON.stringify(val));
  17135. // this.inviteCode = this.inviteCode.filter((el) => {
  17136. // if (val.indexOf(el.cid) != -1) {
  17137. // array.splice(array.indexOf(el.cid), 1);
  17138. // return el;
  17139. // }
  17140. // });
  17141. // for (var i = 0; i < array.length; i++) {
  17142. // this.getInviteCode(array[i]);
  17143. // }
  17144. },
  17145. InviteChange2(val) {
  17146. console.log(val);
  17147. let _check = [];
  17148. let _check2 = [];
  17149. for (var i = 0; i < this.teacherJuri.length; i++) {
  17150. var gid = this.teacherJuri[i].userid;
  17151. _check.push(gid);
  17152. }
  17153. for (var i = 0; i < this.checkboxList3.length; i++) {
  17154. var _id = this.checkboxList3[i];
  17155. if (_check.indexOf(_id) !== -1) {
  17156. _check2.push(_id);
  17157. }
  17158. }
  17159. this.checkAll2 = _check2.length === _check.length;
  17160. this.setMan();
  17161. return;
  17162. // let array = JSON.parse(JSON.stringify(val));
  17163. // this.inviteCode = this.inviteCode.filter((el) => {
  17164. // if (val.indexOf(el.cid) != -1) {
  17165. // array.splice(array.indexOf(el.cid), 1);
  17166. // return el;
  17167. // }
  17168. // });
  17169. // for (var i = 0; i < array.length; i++) {
  17170. // this.getInviteCode(array[i]);
  17171. // }
  17172. },
  17173. handleCheckAllChange(val) {
  17174. if (val) {
  17175. for (var i = 0; i < this.grade2.length; i++) {
  17176. var gid = this.grade2[i].id;
  17177. if (this.checkboxList2.indexOf(gid) === -1) {
  17178. this.checkboxList2.push(gid);
  17179. }
  17180. }
  17181. } else {
  17182. let _check = [];
  17183. let _check2 = [];
  17184. for (var i = 0; i < this.grade2.length; i++) {
  17185. var gid = this.grade2[i].id;
  17186. _check.push(gid);
  17187. }
  17188. for (var i = 0; i < this.checkboxList2.length; i++) {
  17189. var _id = this.checkboxList2[i];
  17190. if (_check.indexOf(_id) === -1) {
  17191. _check2.push(_id);
  17192. }
  17193. }
  17194. this.checkboxList2 = _check2;
  17195. }
  17196. this.isIndeterminate = false;
  17197. },
  17198. handleCheckAllChange2(val) {
  17199. if (val) {
  17200. for (var i = 0; i < this.teacherJuri.length; i++) {
  17201. var gid = this.teacherJuri[i].userid;
  17202. if (this.checkboxList3.indexOf(gid) === -1) {
  17203. this.checkboxList3.push(gid);
  17204. }
  17205. }
  17206. } else {
  17207. let _check = [];
  17208. let _check2 = [];
  17209. for (var i = 0; i < this.teacherJuri.length; i++) {
  17210. var gid = this.teacherJuri[i].userid;
  17211. _check.push(gid);
  17212. }
  17213. for (var i = 0; i < this.checkboxList3.length; i++) {
  17214. var _id = this.checkboxList3[i];
  17215. if (_check.indexOf(_id) === -1) {
  17216. _check2.push(_id);
  17217. }
  17218. }
  17219. this.checkboxList3 = _check2;
  17220. }
  17221. this.isIndeterminate2 = false;
  17222. },
  17223. async getInviteCode(cid) {
  17224. let code = this.randomNumber();
  17225. let params = {
  17226. code: code,
  17227. oid: this.oid,
  17228. };
  17229. let type = 1;
  17230. for (var i = 0; i < this.inviteCode.length; i++) {
  17231. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17232. type = 2;
  17233. }
  17234. }
  17235. if (type == 2) {
  17236. this.getInviteCode(cid);
  17237. return;
  17238. }
  17239. const res = await this.ajax.get(
  17240. this.$store.state.api + "selectInviteCode2",
  17241. params
  17242. );
  17243. if (
  17244. res.data.length &&
  17245. res.data[0].length &&
  17246. res.data[0][0].courseId != this.cid
  17247. ) {
  17248. this.getInviteCode(cid);
  17249. return;
  17250. }
  17251. let array = [];
  17252. for (var i = 0; i < this.inviteCode.length; i++) {
  17253. array.push(this.inviteCode[i].cid);
  17254. }
  17255. if (array.indexOf(cid) != -1) {
  17256. this.inviteCode[array.indexOf(cid)].ic = code;
  17257. } else {
  17258. this.inviteCode.push({ cid: cid, ic: code });
  17259. }
  17260. },
  17261. OpenInviteD(cid) {
  17262. let array = [];
  17263. this.icode = "";
  17264. for (var i = 0; i < this.inviteCode.length; i++) {
  17265. array.push(this.inviteCode[i].cid);
  17266. }
  17267. if (array.indexOf(cid) != -1) {
  17268. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17269. }
  17270. this.inviteId = cid;
  17271. this.dialogVisibleInvite = true;
  17272. },
  17273. addInvite() {
  17274. let reg = /^[A-Za-z0-9]{4,}$/;
  17275. if (!reg.test(this.icode)) {
  17276. this.$message.error(this.lang.ssInputCode);
  17277. return;
  17278. }
  17279. let type = 1;
  17280. for (var i = 0; i < this.inviteCode.length; i++) {
  17281. if (
  17282. this.inviteCode[i].cid != this.inviteId &&
  17283. this.icode == this.inviteCode[i].ic
  17284. ) {
  17285. type = 2;
  17286. }
  17287. }
  17288. if (type == 2) {
  17289. this.$message.error(this.lang.ssCodeDup);
  17290. return;
  17291. }
  17292. let params = {
  17293. code: this.icode,
  17294. oid: this.oid,
  17295. };
  17296. this.ajax
  17297. .get(this.$store.state.api + "selectInviteCode", params)
  17298. .then((res) => {
  17299. if (
  17300. res.data.length &&
  17301. res.data[0].length &&
  17302. res.data[0][0].courseId != this.cid
  17303. ) {
  17304. this.$message.error(this.lang.ssCodeDup);
  17305. return;
  17306. }
  17307. let array = [];
  17308. for (var i = 0; i < this.inviteCode.length; i++) {
  17309. array.push(this.inviteCode[i].cid);
  17310. }
  17311. if (array.indexOf(this.inviteId) != -1) {
  17312. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17313. } else {
  17314. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17315. }
  17316. this.icode = "";
  17317. this.dialogVisibleInvite = false;
  17318. })
  17319. .catch((err) => {
  17320. console.error(err);
  17321. });
  17322. },
  17323. randomNumber() {
  17324. // 随机生成两位数
  17325. // let num = Math.floor(Math.random() * 900) + 100;
  17326. // 生成 0 到 99 之间的随机整数
  17327. const randomNumber = Math.floor(Math.random() * 100);
  17328. // 如果随机数小于 10,补上前导零
  17329. const num =
  17330. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17331. // 随机生成两个大写字母
  17332. let letters = "";
  17333. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17334. for (let i = 0; i < 3; i++) {
  17335. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17336. }
  17337. // 随机生成两位数字和字母的组合
  17338. let mix = "";
  17339. let chars =
  17340. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17341. for (let i = 0; i < 3; i++) {
  17342. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17343. mix += char;
  17344. }
  17345. // 随机选择一种类型
  17346. let type = Math.floor(Math.random() * 3);
  17347. return num;
  17348. // 根据类型输出结果
  17349. switch (type) {
  17350. case 0:
  17351. console.log(num); // 输出两位数
  17352. return num;
  17353. case 1:
  17354. console.log(letters); // 输出两个大写字母
  17355. return letters;
  17356. case 2:
  17357. console.log(mix); // 输出两位数字和字母的组合
  17358. return mix;
  17359. }
  17360. },
  17361. getPaste() {
  17362. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  17363. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  17364. if (!iframe && !iframe2) {
  17365. return;
  17366. }
  17367. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17368. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17369. if (copyData && copyData.stageData && copyData.stageData.length) {
  17370. this.isPasteStage = true;
  17371. }
  17372. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17373. this.isPasteStage = true;
  17374. }
  17375. if (copyData && copyData.selectData.length) {
  17376. this.isPasteChoice = true;
  17377. }
  17378. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17379. this.isPasteTask = true;
  17380. }
  17381. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17382. this.isPasteTask = true;
  17383. }
  17384. },
  17385. getPaste2() {
  17386. let iframe = document.querySelectorAll(".interIframe")[0];
  17387. const turndownService = new TurndownService();
  17388. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17389. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17390. if(confirm_next_step){
  17391. this.courseText += turndownService.turndown(confirm_next_step)
  17392. iframe.contentWindow.confirm_next_step = ''
  17393. }
  17394. if(work_area_text && work_area_text.aiContent){
  17395. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17396. iframe.contentWindow.work_area_text = ''
  17397. }
  17398. },
  17399. textAreaChange(type, index){
  17400. if(type == 'courseText'){
  17401. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17402. }
  17403. if(type == 'targetCourseText2'){
  17404. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17405. }
  17406. if(type == 'taskDetail2'){
  17407. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17408. }
  17409. if(type == 'taskDetail3'){
  17410. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17411. }
  17412. },
  17413. setCourseInfo(type){
  17414. let courseInfo = ''
  17415. let sub = []
  17416. let mclass = []
  17417. if (this.courseTypeId.length) {
  17418. for (var i = 0; i < this.courseTypeId.length; i++) {
  17419. let _sid = this.courseTypeId[i]
  17420. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17421. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17422. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17423. }
  17424. }
  17425. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17426. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17427. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17428. }
  17429. }
  17430. }
  17431. }
  17432. if(this.courseName){
  17433. courseInfo = `${this.lang.ssCourseColon}${this.courseName} `
  17434. }
  17435. if(mclass.length){
  17436. courseInfo += `${this.lang.ssGradeColon}${mclass.join(',')} `
  17437. }
  17438. if(sub.length){
  17439. courseInfo += `${this.lang.ssSubjColon}${sub.join(',')} `
  17440. }
  17441. console.log(courseInfo)
  17442. window.course_info = courseInfo
  17443. this.course_info = courseInfo
  17444. window.course_lang = this.languageSetting
  17445. },
  17446. saveCourse(){
  17447. if (this.cid == "" || this.cid == undefined) {
  17448. this.addWork();
  17449. } else {
  17450. if (this.userid != this.courseUserid && this.role != "1") {
  17451. this.updateWork2();
  17452. } else {
  17453. this.updateWork();
  17454. }
  17455. }
  17456. },
  17457. setCover($event, attempts = 0) {
  17458. var _this = this;
  17459. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17460. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17461. if (_this.cover.length || attempts >= 3) {
  17462. return;
  17463. }
  17464. _this.findMatchingContents()
  17465. _this.imageloading2 = true;
  17466. _this.ajax
  17467. .post("https://gpt.cocorobo.cn/search_image", {
  17468. page: _this.ppage,
  17469. pagesize: 9,
  17470. query: _this.courseName,
  17471. })
  17472. .then(function (response) {
  17473. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17474. if(data){
  17475. _this.cover = [];
  17476. setTimeout(() => {
  17477. _this.cover[0] = {
  17478. name: _this.lang.ssNetImgPng,
  17479. url: data[0].thumbnail,
  17480. };
  17481. _this.imgChange1(null, null, 1, null);
  17482. _this.$forceUpdate();
  17483. _this.saveCourse()
  17484. }, 0);
  17485. _this.imageloading2 = false;
  17486. }else {
  17487. _this.imageloading2 = false;
  17488. _this.setCover($event, attempts + 1);
  17489. }
  17490. })
  17491. .catch(function (error) {
  17492. _this.imageloading2 = false;
  17493. _this.setCover($event, attempts + 1);
  17494. console.log(error);
  17495. });
  17496. },
  17497. searchImage() {
  17498. var _this = this;
  17499. _this.imageList = [];
  17500. if (!_this.searchImageValue) {
  17501. _this.sysPicVisible2 = true;
  17502. return;
  17503. }
  17504. _this.imageloading = true;
  17505. _this.ajax
  17506. .post("https://gpt.cocorobo.cn/search_image", {
  17507. page: _this.ppage,
  17508. pagesize: 9,
  17509. query: _this.searchImageValue,
  17510. })
  17511. .then(function (response) {
  17512. // console.log(response.data.data);
  17513. var data = response.data.FunctionResponse.result;
  17514. for (var i = 0; i < data.length; i++) {
  17515. _this.imageList.push({ url: data[i].thumbnail });
  17516. }
  17517. _this.imageloading = false;
  17518. })
  17519. .catch(function (error) {
  17520. console.log(error);
  17521. });
  17522. _this.sysPicVisible2 = true;
  17523. },
  17524. changePicture() {
  17525. this.ppage++;
  17526. this.searchImage();
  17527. },
  17528. resetImage() {
  17529. this.ppage = 1;
  17530. this.searchImage();
  17531. },
  17532. jumpGj(i, j) {
  17533. if (i + 1 != this.isClickColor) {
  17534. this.isClickColor = i + 1;
  17535. }
  17536. var a = document.scrollingElement;
  17537. this.toolIndexType = `gj${i}${j}`;
  17538. let target = document.querySelector(`#gj${i}${j}`);
  17539. if (target) {
  17540. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17541. setTimeout(() => {
  17542. target.scrollIntoView(true);
  17543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17544. j
  17545. ].isFold3 = false;
  17546. setTimeout(() => {
  17547. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17548. }, 0);
  17549. }, 0);
  17550. }
  17551. },
  17552. jumpGj2(i, j, k) {
  17553. if (this.unitIndex != k) {
  17554. if (this.panUnitJson() == 2) {
  17555. return;
  17556. }
  17557. this.unitSet(k);
  17558. }
  17559. setTimeout(() => {
  17560. if (i + 1 != this.isClickColor) {
  17561. this.isClickColor = i + 1;
  17562. }
  17563. var a = document.scrollingElement;
  17564. this.toolIndexType = `gj${i}${j}${k}`;
  17565. let target = document.querySelector(`#gj${i}${j}`);
  17566. if (target) {
  17567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17568. setTimeout(() => {
  17569. target.scrollIntoView(true);
  17570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17571. j
  17572. ].isFold3 = false;
  17573. setTimeout(() => {
  17574. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17575. }, 0);
  17576. }, 0);
  17577. }
  17578. }, 0);
  17579. },
  17580. dragStart(val, i, j) {
  17581. console.log(this.taskCount);
  17582. this.dragType = "drag";
  17583. this.taskCount = j;
  17584. this.oldIndex = i;
  17585. this.oldData = val;
  17586. },
  17587. dragOver(i, j) {
  17588. this.typeIndex = "chapter-" + j + "-" + i;
  17589. this.newIndex = i;
  17590. },
  17591. dragEnd() {
  17592. if (this.dragType != "drag") {
  17593. this.typeIndex = "";
  17594. this.newIndex = "";
  17595. this.dragType = "";
  17596. this.isdrag = "";
  17597. return;
  17598. }
  17599. console.log(this.taskCount);
  17600. let newItems = [
  17601. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17602. .chapterData,
  17603. ];
  17604. // 删除老的节点
  17605. newItems.splice(this.oldIndex, 1);
  17606. // 在列表中目标位置增加新的节点
  17607. newItems.splice(this.newIndex, 0, this.oldData);
  17608. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17609. this.taskCount
  17610. ].chapterData = [...newItems];
  17611. this.typeIndex = "";
  17612. this.newIndex = "";
  17613. this.dragType = "";
  17614. this.isdrag = "";
  17615. this.$forceUpdate();
  17616. },
  17617. dragTaskStart(val, i, j) {
  17618. this.dragType = "task";
  17619. this.oldIndex = i;
  17620. this.oldData = val;
  17621. this.oldUnitIndex = j;
  17622. },
  17623. dragTaskOver(i, j) {
  17624. this.typeIndex = "task-" + i;
  17625. this.newIndex = i;
  17626. this.checkUnitIndex = j;
  17627. },
  17628. async dragTaskEnd() {
  17629. if (this.dragType != "task") {
  17630. this.newIndex = "";
  17631. this.dragType = "";
  17632. this.typeIndex = "";
  17633. this.checkUnitIndex = "";
  17634. this.isdrag = "";
  17635. return;
  17636. }
  17637. if (
  17638. this.newIndex == this.oldIndex &&
  17639. this.oldUnitIndex == this.checkUnitIndex
  17640. ) {
  17641. this.newIndex = "";
  17642. this.dragType = "";
  17643. this.typeIndex = "";
  17644. this.checkUnitIndex = "";
  17645. this.isdrag = "";
  17646. return;
  17647. }
  17648. let count1 = await this.getWorksCount(
  17649. 2,
  17650. this.checkUnitIndex,
  17651. this.newIndex,
  17652. 0
  17653. );
  17654. let count2 = await this.getWorksCount(
  17655. 2,
  17656. this.oldUnitIndex,
  17657. this.oldIndex,
  17658. 0
  17659. );
  17660. if (count1 > 0 || count2 > 0) {
  17661. this.$confirm(
  17662. this.lang.ssTaskMoveAll,
  17663. this.lang.ssTip,
  17664. {
  17665. confirmButtonText: this.lang.ssConfirm,
  17666. cancelButtonText: this.lang.ssCancel,
  17667. type: "warning",
  17668. }
  17669. )
  17670. .then(() => {
  17671. if (this.oldUnitIndex != this.checkUnitIndex) {
  17672. let newItems = [
  17673. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17674. ];
  17675. // 删除老的节点
  17676. newItems.splice(this.oldIndex, 1);
  17677. // 在列表中目标位置增加新的节点
  17678. let newItems2 = [
  17679. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17680. ];
  17681. newItems2.splice(this.newIndex, 0, this.oldData);
  17682. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17683. ...newItems,
  17684. ];
  17685. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17686. ...newItems2,
  17687. ];
  17688. } else {
  17689. let newItems = [
  17690. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17691. ];
  17692. let chapterData = []
  17693. if (this.oldIndex == 0) {
  17694. chapterData = newItems[this.oldIndex].chapterData
  17695. newItems[this.oldIndex].chapterData = []
  17696. } else if (this.newIndex == 0) {
  17697. chapterData = newItems[this.newIndex].chapterData
  17698. newItems[this.oldIndex].chapterData = []
  17699. }
  17700. // 删除老的节点
  17701. newItems.splice(this.oldIndex, 1);
  17702. // 在列表中目标位置增加新的节点
  17703. newItems.splice(this.newIndex, 0, this.oldData);
  17704. if (this.oldIndex == 0 || this.newIndex == 0) {
  17705. newItems[0].chapterData = chapterData
  17706. }
  17707. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17708. ...newItems,
  17709. ];
  17710. }
  17711. this.moveWork(2, this.checkUnitIndex, this.newIndex, 0, this.oldUnitIndex, this.oldIndex, 0);
  17712. this.typeIndex = "";
  17713. this.newIndex = "";
  17714. this.dragType = "";
  17715. this.checkUnitIndex = "";
  17716. this.isdrag = "";
  17717. this.updateWork();
  17718. this.$forceUpdate();
  17719. })
  17720. .catch(() => {
  17721. this.newIndex = "";
  17722. this.dragType = "";
  17723. this.typeIndex = "";
  17724. this.checkUnitIndex = "";
  17725. this.isdrag = "";
  17726. return;
  17727. });
  17728. } else {
  17729. if (this.oldUnitIndex != this.checkUnitIndex) {
  17730. let newItems = [
  17731. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17732. ];
  17733. // 删除老的节点
  17734. newItems.splice(this.oldIndex, 1);
  17735. // 在列表中目标位置增加新的节点
  17736. let newItems2 = [
  17737. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17738. ];
  17739. newItems2.splice(this.newIndex, 0, this.oldData);
  17740. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17741. ...newItems,
  17742. ];
  17743. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17744. ...newItems2,
  17745. ];
  17746. } else {
  17747. let newItems = [
  17748. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17749. ];
  17750. let chapterData = []
  17751. if (this.oldIndex == 0) {
  17752. chapterData = newItems[this.oldIndex].chapterData
  17753. newItems[this.oldIndex].chapterData = []
  17754. } else if (this.newIndex == 0) {
  17755. chapterData = newItems[this.newIndex].chapterData
  17756. newItems[this.oldIndex].chapterData = []
  17757. }
  17758. // 删除老的节点
  17759. newItems.splice(this.oldIndex, 1);
  17760. // 在列表中目标位置增加新的节点
  17761. newItems.splice(this.newIndex, 0, this.oldData);
  17762. if (this.oldIndex == 0 || this.newIndex == 0) {
  17763. newItems[0].chapterData = chapterData
  17764. }
  17765. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17766. ...newItems,
  17767. ];
  17768. }
  17769. this.typeIndex = "";
  17770. this.newIndex = "";
  17771. this.dragType = "";
  17772. this.checkUnitIndex = "";
  17773. this.isdrag = "";
  17774. this.updateWork();
  17775. this.$forceUpdate();
  17776. }
  17777. },
  17778. dragUnitStart(val, i) {
  17779. this.dragType = "Unit";
  17780. this.oldIndex = i;
  17781. this.oldData = val;
  17782. },
  17783. dragUnitOver(i) {
  17784. this.typeIndex = "Unit-" + i;
  17785. this.newIndex = i;
  17786. console.log(i, this.unitJson[i].toolOpen);
  17787. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17788. this.unitJson[i].toolOpen = true;
  17789. this.updateWork();
  17790. this.$forceUpdate();
  17791. }
  17792. },
  17793. async dragUnitEnd() {
  17794. if (this.dragType != "Unit") {
  17795. this.newIndex = "";
  17796. this.dragType = "";
  17797. this.typeIndex = "";
  17798. this.isdrag = "";
  17799. return;
  17800. }
  17801. if (this.newIndex == this.oldIndex) {
  17802. this.newIndex = "";
  17803. this.dragType = "";
  17804. this.typeIndex = "";
  17805. this.isdrag = "";
  17806. return;
  17807. }
  17808. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17809. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17810. console.log(count1, count2);
  17811. if (count1 > 0 || count2 > 0) {
  17812. this.$confirm(
  17813. this.lang.ssStageMove,
  17814. this.lang.ssTip,
  17815. {
  17816. confirmButtonText: this.lang.ssConfirm,
  17817. cancelButtonText: this.lang.ssCancel,
  17818. type: "warning",
  17819. }
  17820. )
  17821. .then(() => {
  17822. let newItems = [...this.unitJson];
  17823. // 删除老的节点
  17824. newItems.splice(this.oldIndex, 1);
  17825. // 在列表中目标位置增加新的节点
  17826. newItems.splice(this.newIndex, 0, this.oldData);
  17827. this.unitJson = [...newItems];
  17828. this.moveWork(1, this.newIndex, 0, 0, this.oldIndex, 0, 0);
  17829. this.typeIndex = "";
  17830. this.newIndex = "";
  17831. this.dragType = "";
  17832. this.isdrag = "";
  17833. this.updateWork();
  17834. this.$forceUpdate();
  17835. })
  17836. .catch(() => {
  17837. this.newIndex = "";
  17838. this.dragType = "";
  17839. this.typeIndex = "";
  17840. this.isdrag = "";
  17841. return;
  17842. });
  17843. } else {
  17844. let newItems = [...this.unitJson];
  17845. // 删除老的节点
  17846. newItems.splice(this.oldIndex, 1);
  17847. // 在列表中目标位置增加新的节点
  17848. newItems.splice(this.newIndex, 0, this.oldData);
  17849. this.unitJson = [...newItems];
  17850. this.typeIndex = "";
  17851. this.newIndex = "";
  17852. this.dragType = "";
  17853. this.isdrag = "";
  17854. this.updateWork();
  17855. this.$forceUpdate();
  17856. }
  17857. },
  17858. getWorksCount(type, stage, task, tool) {
  17859. return new Promise((resolve, reject) => {
  17860. let params = [
  17861. {
  17862. cid: this.cid,
  17863. stage: stage,
  17864. task: task,
  17865. tool: tool,
  17866. type: type,
  17867. },
  17868. ];
  17869. this.ajax
  17870. .post(this.$store.state.api + "getCourseWorkCount", params)
  17871. .then((res) => {
  17872. let count = res.data[0][0].count;
  17873. resolve(count);
  17874. })
  17875. .catch((err) => {
  17876. resolve(0);
  17877. this.$message.error(this.lang.ssNetPoor);
  17878. console.error(err);
  17879. });
  17880. });
  17881. },
  17882. moveWork(type, nstage, ntask, ntool, ostage, otask, otool) {
  17883. // type: int 类型
  17884. // nstage, ntask, ntool: 新目标位置(目标单元/任务/工具)
  17885. // ostage, otask, otool: 原始位置
  17886. // this.cid 课程id
  17887. let params = [
  17888. {
  17889. cid: this.cid,
  17890. nstage: nstage,
  17891. ntask: ntask,
  17892. ntool: ntool,
  17893. type: type,
  17894. ostage: ostage,
  17895. otask: otask,
  17896. otool: otool
  17897. }
  17898. ];
  17899. return this.ajax
  17900. .post(this.$store.state.api + "moveCourseWork", params)
  17901. .then(res => {
  17902. console.log(res);
  17903. })
  17904. .catch(err => {
  17905. console.error(this.lang.ssMoveFail);
  17906. console.error(err);
  17907. throw err;
  17908. });
  17909. },
  17910. getTwoType(id) {
  17911. this.twoJson = [];
  17912. var array = this.CourseTypeJson1[
  17913. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17914. ].filter((e) => {
  17915. return e.ppid == id;
  17916. });
  17917. this.twoJson = array;
  17918. this.$forceUpdate();
  17919. },
  17920. ctype() {
  17921. this.oneJson =
  17922. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17923. },
  17924. selectAllType1() {
  17925. this.CourseType1 = [];
  17926. this.CourseTypeJson1 = {};
  17927. this.courseTypeId1 = {};
  17928. this.$forceUpdate();
  17929. let params = {
  17930. org: this.org && this.org != "" ? this.org : "",
  17931. oid: this.oid && this.oid != "" ? this.oid : "",
  17932. };
  17933. this.ajax
  17934. .get(this.$store.state.api + "selectAllEvaType", params)
  17935. .then((res) => {
  17936. this.CourseType1 = res.data;
  17937. for (var i = 0; i < res.data[0].length; i++) {
  17938. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17939. res.data[0][i].name = this.lang.ssLevel1;
  17940. } else if (
  17941. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17942. ) {
  17943. res.data[0][i].name = this.lang.ssLevel2;
  17944. }
  17945. if (!this.cid) {
  17946. this.courseTypeId1[res.data[0][i].id] = [];
  17947. }
  17948. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17949. this.CourseTypeJson1[res.data[0][i].id] = [];
  17950. }
  17951. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17952. for (var j = 0; j < res.data[1].length; j++) {
  17953. if (res.data[0][i].id == res.data[1][j].pid) {
  17954. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17955. }
  17956. }
  17957. // } else {
  17958. if (res.data[2].length > 0) {
  17959. for (var j = 0; j < res.data[2].length; j++) {
  17960. if (res.data[0][i].id == res.data[2][j].pid) {
  17961. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17962. }
  17963. }
  17964. }
  17965. if (res.data[3].length > 0) {
  17966. for (var j = 0; j < res.data[3].length; j++) {
  17967. if (res.data[0][i].id == res.data[3][j].pid) {
  17968. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17969. }
  17970. }
  17971. }
  17972. // }
  17973. }
  17974. this.ctype();
  17975. this.cetBoxDialog = true;
  17976. })
  17977. .catch((err) => {
  17978. console.error(err);
  17979. });
  17980. },
  17981. allEvaCan() {
  17982. if (this.taskLoading.length) {
  17983. let _pan = 1
  17984. for (var k = 0; k < this.taskLoading.length; k++) {
  17985. if (this.taskLoading[k]) {
  17986. this.$message({
  17987. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  17988. type: "warning"
  17989. });
  17990. _pan = 2
  17991. }
  17992. }
  17993. if (_pan == 2) {
  17994. return
  17995. }
  17996. }
  17997. if (this.taskGLoading.length) {
  17998. let _pan = 1
  17999. for (var k = 0; k < this.taskGLoading.length; k++) {
  18000. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  18001. this.$message({
  18002. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18003. type: "warning"
  18004. });
  18005. _pan = 2
  18006. }
  18007. }
  18008. if (_pan == 2) {
  18009. return
  18010. }
  18011. }
  18012. this.$confirm(this.lang.ssGenAllEvaSet, this.lang.ssTip, {
  18013. confirmButtonText: this.lang.ssConfirm,
  18014. cancelButtonText: this.lang.ssCancel,
  18015. type: "warning",
  18016. customClass: 'custom-confirm-box'
  18017. })
  18018. .then(() => {
  18019. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18020. for (var index = 0; index < taskJson.length; index++) {
  18021. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18022. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18023. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18024. }
  18025. }
  18026. }
  18027. })
  18028. .catch(() => {
  18029. });
  18030. setTimeout(() => {
  18031. this.setTipsIndex()
  18032. }, 500)
  18033. },
  18034. allEvaCan2(index) {
  18035. if (this.taskLoading.length) {
  18036. let _pan = 1
  18037. for (var k = 0; k < this.taskLoading.length; k++) {
  18038. if (this.taskLoading[k]) {
  18039. this.$message({
  18040. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18041. type: "warning"
  18042. });
  18043. _pan = 2
  18044. }
  18045. }
  18046. if (_pan == 2) {
  18047. return
  18048. }
  18049. }
  18050. if (this.taskGLoading.length) {
  18051. let _pan = 1
  18052. for (var k = 0; k < this.taskGLoading.length; k++) {
  18053. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  18054. this.$message({
  18055. message: this.lang.ssWaitTaskCont.replace(/\*/g, k + 1),
  18056. type: "warning"
  18057. });
  18058. _pan = 2
  18059. }
  18060. }
  18061. if (_pan == 2) {
  18062. return
  18063. }
  18064. }
  18065. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18066. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18067. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18068. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18069. }
  18070. }
  18071. this.$message({
  18072. message: this.lang.ssExecSucc,
  18073. type: "success"
  18074. });
  18075. },
  18076. setAiJson(pan,string,string2,string3){
  18077. if(pan == 'aiTeacher2'){
  18078. this.aiJson['teacherDetail2'] = string
  18079. }else if(pan == 'aiRateRuleA'){
  18080. this.aiJson['aiRateRule'] = string
  18081. }else if(pan == 'aiOutline2'){
  18082. this.aiJson['aiOutlineTask'] = string
  18083. this.aiJson['aiOutlineDetail'] = string2
  18084. }else if(pan == 'aiTeacher3'){
  18085. this.aiJson['aiCpoteTask'] = string
  18086. this.aiJson['teacherDetail2'] = string2
  18087. }else if(pan == 'aiTask2'){
  18088. this.aiJson['aiTask'] = string
  18089. }else if(pan == 'aiTask3'){
  18090. this.aiJson['aiTaskG1'] = string
  18091. this.aiJson['aiTaskG2'] = string2
  18092. this.aiJson['aiTaskG3'] = string3
  18093. }else if(pan == 'aiteacherTextDetail'){
  18094. this.aiJson['aiAbstract'] = string
  18095. }else if(pan == 'aitargetTextDetail'){
  18096. this.aiJson['aiTarget'] = string
  18097. }else if(pan == 'aitargetTextDetail2'){
  18098. this.aiJson['aiTarget2'] = string
  18099. }else if(pan == 'aitargetTextDetail3'){
  18100. this.aiJson['aiTargetGet'] = string
  18101. this.aiJson['aiTarget2'] = string2
  18102. }else {
  18103. this.aiJson[pan] = string
  18104. }
  18105. this.aiText2 = ''
  18106. this.aiText3 = ''
  18107. this.$forceUpdate();
  18108. },
  18109. editTask3(index){
  18110. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  18111. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  18112. }else {
  18113. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  18114. }
  18115. setTimeout(() => {
  18116. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  18117. setTimeout(() => {
  18118. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  18119. }, 0);
  18120. }, 100);
  18121. this.$forceUpdate();
  18122. },
  18123. editTask2(index){
  18124. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  18125. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  18126. }else {
  18127. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  18128. }
  18129. setTimeout(() => {
  18130. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  18131. setTimeout(() => {
  18132. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  18133. }, 0);
  18134. }, 100);
  18135. this.$forceUpdate();
  18136. },
  18137. openRule(i, k){
  18138. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  18139. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  18140. }else {
  18141. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  18142. }
  18143. setTimeout(() => {
  18144. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  18145. setTimeout(() => {
  18146. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  18147. }, 0);
  18148. }, 200);
  18149. this.$forceUpdate();
  18150. },
  18151. editCpote(index){
  18152. if(this.cpote[index]){
  18153. this.cpote[index] = false
  18154. }else {
  18155. this.cpote[index] = true
  18156. }
  18157. setTimeout(() => {
  18158. this.cpote[index.replace('s','')] += "*0*%*";
  18159. setTimeout(() => {
  18160. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  18161. }, 0);
  18162. }, 100);
  18163. this.$forceUpdate();
  18164. },
  18165. clickGenTT(){
  18166. if(!this.teacherInfoData.length){
  18167. this.$message.error(this.lang.ssPlsUpPlan);
  18168. return;
  18169. }
  18170. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  18171. this.openAiDialog(2, 'aiteacherTextDetail',1)
  18172. setTimeout(() => {
  18173. this.openAiDialog(2, 'aitargetTextDetail',1)
  18174. }, 500);
  18175. },
  18176. async getUserName() {
  18177. let params = { uid: this.userid };
  18178. try {
  18179. let res = await this.ajax.get(
  18180. this.$store.state.api + "getUser",
  18181. params
  18182. );
  18183. return res.data[0][0].name;
  18184. } catch (err) {
  18185. console.error(err);
  18186. }
  18187. },
  18188. getCGN(type){
  18189. let sub = [] //学科
  18190. let mclass = [] //年纪
  18191. let theme = []
  18192. if (this.courseTypeId.length) {
  18193. for (var i = 0; i < this.courseTypeId.length; i++) {
  18194. let _sid = this.courseTypeId[i]
  18195. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18196. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18197. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18198. }
  18199. }
  18200. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18201. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18202. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18203. }
  18204. }
  18205. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18206. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  18207. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  18208. }
  18209. }
  18210. }
  18211. if(type == 1){
  18212. return sub.join(",")
  18213. }else if(type == 2){
  18214. return mclass.join(",")
  18215. }else if(type == 3){
  18216. return theme.join(",")
  18217. }
  18218. }
  18219. },
  18220. async exportTeachPlan(){
  18221. this.loading = true
  18222. const zip = new JSZip();
  18223. let md = new MarkdownIt();
  18224. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18225. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18226. let String = ''
  18227. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18228. String += `<h2>${this.lang.ssCourseBasic}</h2>`
  18229. String += `<div><strong>${this.lang.ssDesigner}</strong><span>${await this.getUserName()}</span></div>`
  18230. String += `<div><strong>${this.lang.ssGradeColon}</strong><span></span>${this.getCGN(2)}</div>`
  18231. String += `<div><strong>${this.lang.ssThemeColon}</strong><span></span>${this.getCGN(3)}</div>`
  18232. String += `<div><strong>${this.lang.ssSubjColon}</strong><span></span>${this.getCGN(1)}</div>`
  18233. if(courseText){
  18234. String += `<h2>${this.lang.ssCourseOver}</h2>`
  18235. String += md.render(courseText)
  18236. }
  18237. if(target){
  18238. String += `<h2>${this.lang.ssCourseObj}</h2>`
  18239. String += md.render(target)
  18240. }
  18241. String += `<h2>${this.lang.ssCoursePlan}</h2>`
  18242. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18243. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18244. // let name = _task.task+'-教案'
  18245. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18246. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18247. await this.generate(name, _html, i)
  18248. }
  18249. String += `<h3>${this.lang.ssTaskNum.replace(/\*/g, i+1)}</h3>`
  18250. String += `<h4>${_task.task}</h4>`
  18251. String += _html
  18252. // let file = await this.generateExport(name, _html, i)
  18253. // zip.file(`${name}.docx`, file, { binary: true })
  18254. }
  18255. await this.generateExport(this.courseName, String, i)
  18256. setTimeout(() => {
  18257. this.loading = false
  18258. }, 2000);
  18259. // zip.generateAsync({ type: "blob" }).then((content) => {
  18260. // // 生成二进制流
  18261. // saveAs(
  18262. // content,
  18263. // this.courseName + "-" + "教案.zip"
  18264. // ); // 利用file-saver保存文件 自定义文件名
  18265. // setTimeout(() => {
  18266. // this.loading = false
  18267. // // if(!this.cid){
  18268. // // this.addWork(3)
  18269. // // }else{
  18270. // // this.updateWork();
  18271. // // this.steps = 4;
  18272. // // }
  18273. // }, 2000);
  18274. // });
  18275. },
  18276. async exportTaskEA(){
  18277. this.loading = true
  18278. const zip = new JSZip();
  18279. let md = new MarkdownIt();
  18280. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18281. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18282. for(var j = 0; j < _task.chapterData.length; j++){
  18283. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18284. let file = await getFile(_task.chapterData[j].url)
  18285. if (file.data != 1) {
  18286. // 下载文件, 并存成ArrayBuffer对象
  18287. const file_name = _task.chapterData[j].name; // 获取文件名
  18288. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18289. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18290. // 判断是否有重复的文件名字
  18291. if (!zip.file(file_name)) {
  18292. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18293. } else {
  18294. // 如果有重复的文件名,则在文件名后添加序号
  18295. let count = 1;
  18296. let newFileName = fileNameWithoutExt;
  18297. while (zip.file(`${newFileName}.${fileExt}`)) {
  18298. newFileName = `${fileNameWithoutExt}(${count})`;
  18299. count++;
  18300. }
  18301. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18302. }
  18303. }
  18304. }
  18305. }
  18306. for(var j = 0; j < _task.toolChoose.length; j++){
  18307. let tool = _task.toolChoose[j]
  18308. if(tool.eList && tool.eList.length){
  18309. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18310. tool.eList.forEach(item => {
  18311. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18312. });
  18313. let html = md.render(tableContent);
  18314. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18315. let file = await this.generateExport2(name, html, i)
  18316. zip.file(`${name}`, file, { binary: true })
  18317. }
  18318. }
  18319. // let file = await this.generateExport(name, _html, i)
  18320. // zip.file(`${name}.docx`, file, { binary: true })
  18321. }
  18322. zip.generateAsync({ type: "blob" }).then((content) => {
  18323. // 生成二进制流
  18324. saveAs(
  18325. content,
  18326. this.courseName + "-" + this.lang.ssEvaDegreeZip
  18327. ); // 利用file-saver保存文件 自定义文件名
  18328. setTimeout(() => {
  18329. this.loading = false
  18330. }, 2000);
  18331. });
  18332. },
  18333. async downloadFile(item){
  18334. let data = await getFile(item.url)
  18335. let file = new File([data.data], item.name);
  18336. saveAs(file, item.name);
  18337. },
  18338. async addAppendixEva(i, j){
  18339. let md = new MarkdownIt();
  18340. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18341. if(tool.eList && tool.eList.length){
  18342. let tableContent = this.lang.ssEvaTable + '\n| --- | --- | --- |\n';
  18343. tool.eList.forEach(item => {
  18344. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18345. });
  18346. let html = md.render(tableContent);
  18347. let name = this.lang.ssTaskToolEva.replace(/\*/g, i+1).replace(/\$/g, j+1)
  18348. let file = await this.generateExport2(name, html, i)
  18349. this.beforeUploadHtml(file, 0, "", 2)
  18350. }
  18351. },
  18352. clickGenTT2(){
  18353. if (this.courseName == "") {
  18354. this.$message.error(this.lang.ssFillCourseName);
  18355. return;
  18356. }
  18357. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18358. let functionA = ''
  18359. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18360. // setTimeout(() => {
  18361. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18362. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18363. // }, 500);
  18364. functionA = ()=>{
  18365. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18366. }
  18367. }
  18368. this.openAiDialog(2, 'aiDetail',1, functionA)
  18369. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18370. // setTimeout(() => {
  18371. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18372. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18373. // }, 500);
  18374. }
  18375. this.courseTextBool = true
  18376. },
  18377. changeIsuseT(){
  18378. if(this.isuseT == 1){
  18379. this.courseTextB = false
  18380. }else if(this.isuseT == 2){
  18381. navigator.mediaDevices.getUserMedia({ audio: true })
  18382. .then(stream => {
  18383. console.log('获取录音权限成功');
  18384. })
  18385. .catch(err => {
  18386. this.$message.error(this.lang.ssRecordFail)
  18387. console.error('获取录音权限失败:', err);
  18388. });
  18389. }else{
  18390. if(this.courseText){
  18391. this.courseTextB = false
  18392. }else{
  18393. this.courseTextB = true
  18394. }
  18395. }
  18396. this.interSetting = false
  18397. this.interPan = true
  18398. },
  18399. changeLang(){
  18400. window.course_lang = this.languageSetting
  18401. },
  18402. openInterPanSetting(){
  18403. this.interSetting = !this.interSetting
  18404. if(this.interSetting){
  18405. if(this.istemplate == 1){
  18406. this.agentid = this.aiJson.agentid
  18407. }else {
  18408. this.agentid = this.aiJson.sagentid
  18409. }
  18410. }else {
  18411. this.agentid = ''
  18412. }
  18413. },
  18414. openInterPanSetting2(){
  18415. this.interSetting = !this.interSetting
  18416. if(this.interSetting){
  18417. this.r_agentid = this.aiJson.recordAgentid
  18418. }else {
  18419. this.r_agentid = ''
  18420. }
  18421. },
  18422. setAgentid(){
  18423. if(!this.agentid.trim()){
  18424. this.$message.error(this.lang.ssPlsWorkflow)
  18425. return;
  18426. }
  18427. if(this.istemplate == 1){
  18428. this.aiJson.agentid = this.agentid.trim()
  18429. }else {
  18430. this.aiJson.sagentid = this.agentid.trim()
  18431. }
  18432. this.interFlash = false
  18433. setTimeout(() => {
  18434. this.interFlash = true
  18435. }, 100);
  18436. this.interSetting = false
  18437. },
  18438. setAgentid2(){
  18439. if(!this.r_agentid.trim()){
  18440. this.$message.error(this.lang.ssPlsWorkflow)
  18441. return;
  18442. }
  18443. this.aiJson.recordAgentid = this.r_agentid.trim()
  18444. this.interSetting = false
  18445. },
  18446. rebuildAgentid(){
  18447. this.aiJson.sagentid = ''
  18448. this.interFlash = false
  18449. setTimeout(() => {
  18450. this.interFlash = true
  18451. }, 100);
  18452. this.interSetting = false
  18453. },
  18454. cancelInterSetting(){
  18455. this.agentid = ''
  18456. this.interSetting = false
  18457. },
  18458. cancelInterSetting2(){
  18459. this.r_agentid = ''
  18460. this.interSetting = false
  18461. },
  18462. openAiDialog2(clickType, type, callback, index, tindex){
  18463. if (this.taskLoading.length) {
  18464. let _pan = 1
  18465. for(var k = 0; k < this.taskLoading.length; k++){
  18466. if(this.taskLoading[k]){
  18467. this.$message({
  18468. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18469. type: "warning"
  18470. });
  18471. _pan = 2
  18472. }
  18473. }
  18474. if(_pan == 2){
  18475. return
  18476. }
  18477. }
  18478. if(this.taskGLoading.length){
  18479. let _pan = 1
  18480. for(var k = 0; k < this.taskGLoading.length; k++){
  18481. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18482. this.$message({
  18483. message: this.lang.ssWaitTaskCont.replace(/\*/g, k+1),
  18484. type: "warning"
  18485. });
  18486. _pan = 2
  18487. }
  18488. }
  18489. if(_pan == 2){
  18490. return
  18491. }
  18492. }
  18493. let pan2 = 1
  18494. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18495. for(var _index = 0; _index < taskJson.length; _index++){
  18496. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18497. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18498. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18499. this.$message({
  18500. message: this.lang.ssWaitTaskCont.replace(/\*/g, _index+1),
  18501. type: "warning"
  18502. });
  18503. pan2 = 2
  18504. }
  18505. }
  18506. }
  18507. }
  18508. if(pan2 == 2){
  18509. return
  18510. }
  18511. this.$confirm(this.lang.ssRegenAffect, this.lang.ssTip, {
  18512. confirmButtonText: this.lang.ssConfirm,
  18513. cancelButtonText: this.lang.ssCancel,
  18514. type: "warning",
  18515. customClass: 'custom-confirm-box'
  18516. })
  18517. .then(() => {
  18518. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18519. // this.openAiDialog(clickType, 'aiTeacher')
  18520. // }else {
  18521. this.openAiDialog(clickType, type, callback, index, tindex)
  18522. // }
  18523. })
  18524. .catch(() => {
  18525. });
  18526. setTimeout(() => {
  18527. this.setTipsIndex()
  18528. }, 500)
  18529. },
  18530. async openAiDialog(clickType, type, callback, index, tindex) {
  18531. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18532. fileid = [...fileid]
  18533. if (this.infoData.length) {
  18534. for (var i = 0; i < this.infoData.length; i++) {
  18535. if(this.infoData[i].fileid){
  18536. fileid.push(this.infoData[i].fileid)
  18537. }else {
  18538. let _fileid = await this.createFileid(this.infoData[i].url)
  18539. if(_fileid){
  18540. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18541. this.$forceUpdate();
  18542. if(_fileid != 1){
  18543. fileid.push(_fileid)
  18544. }
  18545. }
  18546. }
  18547. }
  18548. }
  18549. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18550. if(fileid.length > 30){
  18551. this.$message.error(this.lang.ssFileLimit30)
  18552. return;
  18553. }
  18554. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18555. this.$message.error(this.lang.ssNoPermTip);
  18556. return;
  18557. }
  18558. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18559. this.$message.error(this.lang.ssPlsUpPlan);
  18560. return;
  18561. }
  18562. if (this.courseName == "") {
  18563. this.$message.error(this.lang.ssFillCourseName);
  18564. return;
  18565. }
  18566. this.aiText2 = ''
  18567. this.clickType = clickType
  18568. let sub = []
  18569. if (this.courseTypeId.length) {
  18570. for (var i = 0; i < this.courseTypeId.length; i++) {
  18571. let _sid = this.courseTypeId[i]
  18572. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18573. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18574. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18575. }
  18576. }
  18577. }
  18578. }
  18579. let mclass = []
  18580. if (this.courseTypeId.length) {
  18581. for (var i = 0; i < this.courseTypeId.length; i++) {
  18582. let _sid = this.courseTypeId[i]
  18583. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18584. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18585. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18586. }
  18587. }
  18588. }
  18589. }
  18590. if (type == "aiDetail") {
  18591. if (this.ttextLoading) {
  18592. this.$message({
  18593. message: this.lang.ssPlsAnswer,
  18594. type: "warning"
  18595. });
  18596. return;
  18597. }
  18598. this.aitype = "aiDetail"
  18599. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18600. this.aiText = this.aiJson.aiDetail
  18601. this.aiCallBack = [callback, index]
  18602. } else if (type == "aiOutline") {
  18603. this.aitype = "aiOutline"
  18604. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18605. this.aiText = this.aiJson.aiOutline
  18606. } else if (type == "aiOutline2") {
  18607. this.aitype = "aiOutline2"
  18608. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18609. this.aiText = this.aiJson.aiOutlineTask
  18610. this.aiText2 = this.aiJson.aiOutlineDetail
  18611. } else if (type == "aiOutlineDetail2") {
  18612. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18613. this.$message({
  18614. message: this.lang.ssPlsAnswer,
  18615. type: "warning"
  18616. });
  18617. return;
  18618. }
  18619. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18620. this.$message.error(this.lang.ssEnterTask)
  18621. return;
  18622. }
  18623. this.aitype = type
  18624. this.aiCallBack = callback
  18625. this.aiText = this.aiJson.aiOutlineDetail2
  18626. } else if (type == "aiTask") {
  18627. this.aitype = "aiTask"
  18628. var _text = ""
  18629. for (var i = 0; i < this.teacherText.length; i++) {
  18630. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18631. }
  18632. // this.aiText = `请根据${_text}。`
  18633. this.aiText = this.aiJson.aiTask
  18634. this.aiCallBack = callback
  18635. } else if (type == "aiTask2") {
  18636. if (this.taskLoading[callback]) {
  18637. this.$message({
  18638. message: this.lang.ssPlsAnswer,
  18639. type: "warning"
  18640. });
  18641. return;
  18642. }
  18643. this.aitype = "aiTask2"
  18644. this.aiText = this.aiJson.aiTask
  18645. this.aiCallBack = [callback, index]
  18646. } else if (type == "aiTask3") {
  18647. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18648. this.$message({
  18649. message: this.lang.ssPlsAnswer,
  18650. type: "warning"
  18651. });
  18652. return;
  18653. }
  18654. this.aitype = type
  18655. this.aiText = this.aiJson.aiTaskG1
  18656. this.aiText2 = this.aiJson.aiTaskG2
  18657. this.aiText3 = this.aiJson.aiTaskG3
  18658. this.aiCallBack = [callback, index]
  18659. } else if (type == "aiTaskG3") {
  18660. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][2])) {
  18661. this.$message({
  18662. message: this.lang.ssPlsAnswer,
  18663. type: "warning"
  18664. });
  18665. return;
  18666. }
  18667. this.aitype = type
  18668. this.aiText = this.aiJson.aiTaskG3
  18669. this.aiCallBack = callback
  18670. } else if (type == "aiTaskG2") {
  18671. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][1])) {
  18672. this.$message({
  18673. message: this.lang.ssPlsAnswer,
  18674. type: "warning"
  18675. });
  18676. return;
  18677. }
  18678. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18679. this.$message({
  18680. message: this.lang.ssGenTaskPlan.replace(/\*/g, callback),
  18681. type: "warning"
  18682. });
  18683. return;
  18684. }
  18685. this.aitype = type
  18686. this.aiText = this.aiJson.aiTaskG2
  18687. this.aiCallBack = callback
  18688. } else if (type == "aiDetail1") {
  18689. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18690. this.$message({
  18691. message: this.lang.ssPlsAnswer,
  18692. type: "warning"
  18693. });
  18694. return;
  18695. }
  18696. this.aitype = "aiDetail1"
  18697. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18698. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18699. this.aiText = this.aiJson.aiDetail1
  18700. this.aiCallBack = callback
  18701. this.aiIndex = index
  18702. } else if (type == "aiDetail2") {
  18703. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18704. this.$message({
  18705. message: this.lang.ssPlsAnswer,
  18706. type: "warning"
  18707. });
  18708. return;
  18709. }
  18710. this.aitype = "aiDetail2"
  18711. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18712. this.aiText = this.aiJson.aiDetail2
  18713. this.aiCallBack = callback
  18714. this.aiIndex = index
  18715. } else if (type == "aiDetail3") {
  18716. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18717. this.$message({
  18718. message: this.lang.ssPlsAnswer,
  18719. type: "warning"
  18720. });
  18721. return;
  18722. }
  18723. this.aitype = "aiDetail3"
  18724. this.aiText = this.aiJson.aiDetail3
  18725. this.aiIndex = index + '-' + tindex
  18726. } else if (type == "aiDetail4") {
  18727. var _text = ""
  18728. if(callback && callback.length){
  18729. for (var i = 0; i < callback.length; i++) {
  18730. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18731. }
  18732. }
  18733. this.aitype = "aiDetail4"
  18734. this.aiText = this.aiJson.aiDetail4
  18735. this.aiIndex = index
  18736. } else if (type == "aiTeacher") {
  18737. this.aitype = "aiTeacher"
  18738. var _text = ""
  18739. for (var i = 0; i < this.dArray.length; i++) {
  18740. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18741. }
  18742. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18743. this.aiText = this.aiJson.aiTeacher
  18744. this.aiCallBack = callback
  18745. } else if (type == "aiTeacher2") {
  18746. if(this.ttaskDetailLoading5.length){
  18747. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18748. this.$message({
  18749. message: this.lang.ssPlanTaskNotGen.replace(/\*/g, num),
  18750. type: "warning"
  18751. });
  18752. return
  18753. }
  18754. this.aitype = "aiTeacher2"
  18755. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18756. } else if (type == "aiTeacher3") {
  18757. this.aitype = type
  18758. this.aiText = this.aiJson.aiCpoteTask
  18759. this.aiText2 = this.aiJson.teacherDetail2
  18760. } else if (type == "teacherDetail") {
  18761. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18762. this.$message({
  18763. message: this.lang.ssPlsAnswer,
  18764. type: "warning"
  18765. });
  18766. return;
  18767. }
  18768. this.aitype = "teacherDetail"
  18769. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18770. this.aiText = this.aiJson.teacherDetail
  18771. this.aiCallBack = callback
  18772. this.aiIndex = index
  18773. } else if (type == "teacherDetail2") {
  18774. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18775. this.$message.error(this.lang.ssEnterTask)
  18776. return;
  18777. }
  18778. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18779. // this.$message({
  18780. // message: "请回答完毕后再次发送",
  18781. // type: "warning"
  18782. // });
  18783. // return;
  18784. this.$confirm(this.lang.ssNotGenRegen, this.lang.ssTip, {
  18785. confirmButtonText: this.lang.ssConfirmRegen,
  18786. cancelButtonText: this.lang.ssCancel,
  18787. distinguishCancelAndClose: true,
  18788. type: "warning",
  18789. customClass: 'custom-confirm-box'
  18790. })
  18791. .then(() => {
  18792. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18793. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18794. this.isTeacherTaskCancelToken2[index] = null;
  18795. }
  18796. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18797. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18798. if(this.isTeacherTaskCancelSource[index]){
  18799. this.isTeacherTaskCancelSource[index].close()
  18800. this.isTeacherTaskCancelSource[index] = null
  18801. }
  18802. this.aitype = "teacherDetail2"
  18803. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18804. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18805. this.aiCallBack = callback
  18806. this.aiIndex = index
  18807. this.dialogVisibleAiD = true
  18808. }).catch((v) => {
  18809. console.log(v);
  18810. })
  18811. setTimeout(() => {
  18812. this.setTipsIndex()
  18813. }, 500)
  18814. return;
  18815. }else {
  18816. this.aitype = "teacherDetail2"
  18817. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18818. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18819. this.aiCallBack = callback
  18820. this.aiIndex = index
  18821. this.dialogVisibleAiD = true
  18822. }
  18823. } else if (type == "aiCpote1") {
  18824. if (this.cpotetLoading.cpote1) {
  18825. this.$message({
  18826. message: this.lang.ssPlsAnswer,
  18827. type: "warning"
  18828. });
  18829. return;
  18830. }
  18831. this.aitype = "aiCpote1"
  18832. this.aiText = this.aiJson.cpote1
  18833. this.aiCallBack = callback
  18834. } else if (type == "aiCpote2") {
  18835. if (this.cpotetLoading.cpote2) {
  18836. this.$message({
  18837. message: this.lang.ssPlsAnswer,
  18838. type: "warning"
  18839. });
  18840. return;
  18841. }
  18842. this.aitype = "aiCpote2"
  18843. this.aiText = this.aiJson.cpote2
  18844. this.aiCallBack = callback
  18845. } else if (type == "aiCpote3") {
  18846. if (this.cpotetLoading.cpote3) {
  18847. this.$message({
  18848. message: this.lang.ssPlsAnswer,
  18849. type: "warning"
  18850. });
  18851. return;
  18852. }
  18853. this.aitype = "aiCpote3"
  18854. this.aiText = this.aiJson.cpote3
  18855. this.aiCallBack = callback
  18856. } else if (type == "aiCpote4") {
  18857. if (this.cpotetLoading.cpote4) {
  18858. this.$message({
  18859. message: this.lang.ssPlsAnswer,
  18860. type: "warning"
  18861. });
  18862. return;
  18863. }
  18864. this.aitype = "aiCpote4"
  18865. this.aiText = this.aiJson.cpote4
  18866. this.aiCallBack = callback
  18867. } else if (type == 'aiteacherTextDetail'){
  18868. if (this.tteacherTextLoading) {
  18869. this.$message({
  18870. message: this.lang.ssPlsAnswer,
  18871. type: "warning"
  18872. });
  18873. return;
  18874. }
  18875. this.aitype = type
  18876. this.aiText = this.aiJson.aiAbstract
  18877. this.aiCallBack = callback
  18878. } else if (type == 'aitargetTextDetail'){
  18879. if (this.ttargetTextLoading) {
  18880. this.$message({
  18881. message: this.lang.ssPlsAnswer,
  18882. type: "warning"
  18883. });
  18884. return;
  18885. }
  18886. this.aitype = type
  18887. this.aiText = this.aiJson.aiTarget
  18888. this.aiCallBack = callback
  18889. } else if (type == 'aitargetTextDetail2'){
  18890. if (this.ttargetTextLoading2) {
  18891. this.$message({
  18892. message: this.lang.ssPlsAnswer,
  18893. type: "warning"
  18894. });
  18895. return;
  18896. }
  18897. this.aitype = type
  18898. this.aiText = this.aiJson.aiTarget2
  18899. this.aiCallBack = callback
  18900. } else if (type == 'aitargetTextDetail3'){
  18901. if (this.ttargetTextLoading2) {
  18902. this.$message({
  18903. message: this.lang.ssPlsAnswer,
  18904. type: "warning"
  18905. });
  18906. return;
  18907. }
  18908. if(!this.courseText){
  18909. this.$message.error(this.lang.ssGenDescTarget);
  18910. return;
  18911. }
  18912. this.$nextTick(() => {
  18913. const targetDiv = this.$refs.aitargetTextDetail3;
  18914. if (targetDiv) {
  18915. targetDiv.scrollIntoView();
  18916. }
  18917. });
  18918. this.aitype = type
  18919. this.aiText = this.aiJson.aiTargetGet
  18920. this.aiText2 = this.aiJson.aiTarget2
  18921. this.aiCallBack= callback
  18922. } else if (type == 'aiSearchFile'){
  18923. if(this.fileSLoading) {
  18924. this.$message({
  18925. message: this.lang.ssPlsAnswer,
  18926. type: "warning"
  18927. });
  18928. return;
  18929. }
  18930. this.aitype = type
  18931. this.aiText = this.aiJson.aiSearchFile
  18932. } else if (type == 'aiSearchFile2'){
  18933. if(this.fileSLoading) {
  18934. this.$message({
  18935. message: this.lang.ssPlsAnswer,
  18936. type: "warning"
  18937. });
  18938. return;
  18939. }
  18940. this.aitype = type
  18941. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18942. #输出样例
  18943. <学科1>:关键词
  18944. - 匹配到的内容1
  18945. - 匹配到的内容2
  18946. - 匹配到的内容3
  18947. - 匹配到的内容4
  18948. - 匹配到的内容5
  18949. <学科2>:关键词
  18950. - 匹配到的内容1
  18951. - 匹配到的内容2
  18952. - 匹配到的内容3
  18953. - 匹配到的内容4
  18954. - 匹配到的内容5
  18955. ...
  18956. <学科n>:关键词
  18957. - 匹配到的内容1
  18958. - 匹配到的内容2
  18959. - 匹配到的内容3
  18960. - 匹配到的内容4
  18961. - 匹配到的内容5
  18962. `
  18963. } else if (type == 'aiRateRule'){
  18964. this.aitype = type
  18965. this.aiText = this.aiJson.aiRateRule
  18966. this.aiCallBack = [callback, index]
  18967. } else if (type == 'aiRateRuleA'){
  18968. this.$confirm(this.lang.ssGenAllDim, this.lang.ssTip, {
  18969. confirmButtonText: this.lang.ssGenAll,
  18970. cancelButtonText: this.lang.ssGenThisTask,
  18971. distinguishCancelAndClose: true,
  18972. type: "warning",
  18973. })
  18974. .then(() => {
  18975. this.aitype = type
  18976. this.aiText = this.aiJson.aiRateRule
  18977. this.aiCallBack = [1,callback]
  18978. this.dialogVisibleAiD = true
  18979. }).catch((v) => {
  18980. console.log(v);
  18981. if (v == "cancel") {
  18982. this.aitype = type
  18983. this.aiText = this.aiJson.aiRateRule
  18984. this.aiCallBack = [2,callback]
  18985. this.dialogVisibleAiD = true
  18986. }
  18987. })
  18988. }
  18989. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18990. this.dialogVisibleAiD = true
  18991. }
  18992. },
  18993. async aiConfirm(msg,msg2,msg3) {
  18994. let sub = []
  18995. if (this.courseTypeId.length) {
  18996. for (var i = 0; i < this.courseTypeId.length; i++) {
  18997. let _sid = this.courseTypeId[i]
  18998. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18999. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19000. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19001. }
  19002. }
  19003. }
  19004. }
  19005. let mclass = []
  19006. if (this.courseTypeId.length) {
  19007. for (var i = 0; i < this.courseTypeId.length; i++) {
  19008. let _sid = this.courseTypeId[i]
  19009. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19010. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19011. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19012. }
  19013. }
  19014. }
  19015. }
  19016. let url = []
  19017. if (this.infoData.length) {
  19018. for (var i = 0; i < this.infoData.length; i++) {
  19019. url.push(this.infoData[i].url)
  19020. }
  19021. }
  19022. if (this.aitype == "aiDetail") {
  19023. this.detailYou(msg)
  19024. } else if (this.aitype == "aiOutline") {
  19025. this.loading = true
  19026. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19027. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19028. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  19029. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19030. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19031. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19032. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19033. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19034. if(this.languageSetting == 2){
  19035. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19036. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19037. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  19038. }
  19039. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  19040. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19041. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19042. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19043. let message = `NOTICE
  19044. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19045. Output: Provide your output in json format.
  19046. Language: ${this.getLang()}
  19047. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19048. Instruction: Based on the context, follow "Format example", write content.
  19049. # Context
  19050. ## 要求
  19051. ${msg} 以及##参考资料
  19052. ## 参考资料
  19053. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19054. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19055. detail至少输出300tokens,markdown格式输出。
  19056. detail包含子教学目标、过程性成果、子评价标准
  19057. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19058. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19059. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19060. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  19061. # Format example`
  19062. message = message.replaceAll('\n', ' ')
  19063. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  19064. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  19065. // detail输出不要输出成json,文本或者markdown都可以
  19066. this.aiGet2(message, () => {
  19067. this.loading = false
  19068. this.isOutline = true
  19069. })
  19070. } else if (this.aitype == "aiOutline2") {
  19071. this.loading = true
  19072. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19073. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19074. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19075. let message = `NOTICE
  19076. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19077. Language: ${this.getLang()}
  19078. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19079. Instruction: Based on the context, follow "Format example", write content.
  19080. # Context
  19081. ## 要求
  19082. ${msg} 以及##参考资料
  19083. ## 参考资料
  19084. 课程名字:${this.courseName}
  19085. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  19086. ${sub.length ? '学科:' + sub.join(",") : ''}
  19087. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19088. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19089. # Format example
  19090. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  19091. this.aiGetTask2(message, () => {
  19092. this.loading = false
  19093. this.isOutline = true
  19094. })
  19095. } else if (this.aitype == "aiOutlineDetail2") {
  19096. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  19097. } else if (this.aitype == "aiTask") {
  19098. var _text = ""
  19099. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19100. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19101. }
  19102. let message = `NOTICE
  19103. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19104. Language: ${this.getLang()}
  19105. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19106. Instruction: Based on the context, follow "Format example", write content.
  19107. # Context
  19108. ## 要求
  19109. ${msg} 为**每个教学任务分别输出**以下内容。
  19110.  
  19111. ${(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','') : ''}
  19112. ## 参考资料
  19113. 教学任务教案:${_text}
  19114. ## 格式要求
  19115. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  19116. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19117. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19118. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19119. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19120. 出现选择题和问答题的概率提高
  19121. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  19122.  
  19123. # Format example
  19124. [{"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":"工具描述"}]}]`
  19125. this.loading = true
  19126. this.aiGet3(message, this.aiCallBack)
  19127. } else if (this.aitype == "aiTask2") {
  19128. if(this.aiCallBack[0] == 'all'){
  19129. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19130. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19131. let message = `NOTICE
  19132. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19133. Language: ${this.getLang()}
  19134. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19135. Instruction: Based on the context, follow "Format example", write content.
  19136. # Context
  19137. ## 要求
  19138. ${msg} 为教学任务分别输出以下内容。
  19139.  
  19140. ${(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','') : ''}
  19141. ## 参考资料
  19142. 教学任务教案:${_text}
  19143. ## 格式要求
  19144. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19145. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19146. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19147. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19148. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19149.  
  19150. # Format example
  19151. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19152. this.taskLoading[_task] = true
  19153. this.aiGet32(message, _task)
  19154. }
  19155. }else{
  19156. 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`
  19157. let message = `NOTICE
  19158. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19159. Language: ${this.getLang()}
  19160. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19161. Instruction: Based on the context, follow "Format example", write content.
  19162. # Context
  19163. ## 要求
  19164. ${msg} 为教学任务分别输出以下内容。
  19165.  
  19166. ${(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','') : ''}
  19167. ## 参考资料
  19168. 教学任务教案:${_text}
  19169. ## 格式要求
  19170. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19171. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19172. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19173. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19174. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19175.  
  19176. # Format example
  19177. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19178. this.taskLoading[this.aiCallBack[0]] = true
  19179. this.aiGet32(message, this.aiCallBack[0])
  19180. }
  19181. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19182. } else if (this.aitype == "aiTask3") {
  19183. if(this.aiCallBack[0] == 'all'){
  19184. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19185. if(!this.taskGLoading[_task]){
  19186. this.taskGLoading[_task] = []
  19187. this.ttaskGLoading[_task] = []
  19188. }
  19189. this.taskGLoading[_task][0] = true
  19190. this.ttaskGLoading[_task][0] = true
  19191. // this.taskGLoading[_task][1] = true
  19192. // this.taskGLoading[_task][2] = true
  19193. // this.aiGetG323(message3, _task)
  19194. }
  19195. let ij = 0;
  19196. let _this = this
  19197. function processNext() {
  19198. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19199. if(!_this.taskGLoading[ij][0]){
  19200. ij++;
  19201. processNext();
  19202. return;
  19203. }
  19204. let message1 = `NOTICE
  19205. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19206. Language: ${_this.getLang()}
  19207. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19208. Instruction: Based on the context, follow "Format example", write content.
  19209. # Context
  19210. ## 要求
  19211. ${msg}
  19212. ## 参考资料
  19213. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19214. # 输出格式与要求
  19215. 任务描述(告诉学生他们需要做什么):
  19216. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19217. # 范例
  19218. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19219. _this.aiGetG321L(message1, ij, (callback2) => {
  19220. // _this.aiGetG322(message2, ij, callback2);
  19221. callback2 ? callback2() : ''
  19222. }, () => {
  19223. // 回调函数,当前任务完成后执行
  19224. ij++;
  19225. processNext(); // 处理下一个任务
  19226. });
  19227. }
  19228. }
  19229. processNext(); // 启动处理
  19230. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19231. }else{
  19232. let message1 = `NOTICE
  19233. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19234. Language: ${this.getLang()}
  19235. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19236. Instruction: Based on the context, follow "Format example", write content.
  19237. # Context
  19238. ## 要求
  19239. ${msg}
  19240. ## 参考资料
  19241. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19242. # 输出格式与要求
  19243. 任务描述(告诉学生他们需要做什么):
  19244. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19245. # 范例
  19246. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19247. if(!this.taskGLoading[this.aiCallBack[0]]){
  19248. this.taskGLoading[this.aiCallBack[0]] = []
  19249. this.ttaskGLoading[this.aiCallBack[0]] = []
  19250. }
  19251. this.taskGLoading[this.aiCallBack[0]][0] = true
  19252. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19253. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19254. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19255. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19256. // this.aiGetG322(message2, this.aiCallBack[0])
  19257. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19258. })
  19259. // this.aiGetG323(message3, this.aiCallBack[0])
  19260. }
  19261. } else if (this.aitype == "aiTaskG3") {
  19262. let message3 = `NOTICE
  19263. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19264. Language: ${this.getLang()}
  19265. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19266. Instruction: Based on the context, follow "Format example", write content.
  19267. # Context
  19268. ## 要求
  19269. ${msg3}
  19270. ## 参考资料
  19271. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19272. # 输出格式与要求
  19273. 核心素养:从教案中提取
  19274. 目标:从教案中提取
  19275. 评价标准:从教案中提取评价标准
  19276. # Format example
  19277. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19278. if(!this.taskGLoading[this.aiCallBack]){
  19279. this.taskGLoading[this.aiCallBack] = []
  19280. }
  19281. this.taskGLoading[this.aiCallBack][2] = true
  19282. this.aiGetG323(message3, this.aiCallBack)
  19283. } else if (this.aitype == "aiTaskG2") {
  19284. if(this.aiCallBack == 'all'){
  19285. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19286. if(!this.taskGLoading[_task]){
  19287. this.taskGLoading[_task] = []
  19288. }
  19289. this.taskGLoading[_task][1] = true
  19290. }
  19291. let ij = 0;
  19292. let _this = this
  19293. function processNext() {
  19294. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19295. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19296. _this.taskGLoading[ij][1] = false
  19297. ij++;
  19298. processNext();
  19299. return;
  19300. }
  19301. let message2 = `NOTICE
  19302. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19303. Language: ${_this.getLang()}
  19304. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19305. Instruction: Based on the context, follow "Format example", write content.
  19306. # Context
  19307. ## 要求
  19308. ${msg2}
  19309. ## 参考资料
  19310. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19311. # 输出格式与要求
  19312. 互动工具列表
  19313. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19314. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19315. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19316. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19317. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19318. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19319. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19320. # Format example
  19321. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19322. _this.aiGetG322(message2, ij, () => {
  19323. // 回调函数,当前任务完成后执行
  19324. ij++;
  19325. processNext(); // 处理下一个任务
  19326. });
  19327. }
  19328. }
  19329. processNext(); // 启动处理
  19330. }else{
  19331. let message2 = `NOTICE
  19332. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19333. Language: ${this.getLang()}
  19334. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19335. Instruction: Based on the context, follow "Format example", write content.
  19336. # Context
  19337. ## 要求
  19338. ${msg2}
  19339. ## 参考资料
  19340. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19341. # 输出格式与要求
  19342. 互动工具列表
  19343. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19344. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19345. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19346. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19347. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19348. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19349. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19350. # Format example
  19351. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19352. if(!this.taskGLoading[this.aiCallBack]){
  19353. this.taskGLoading[this.aiCallBack] = []
  19354. }
  19355. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19356. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19357. this.taskGLoading[this.aiCallBack][1] = true
  19358. this.aiGetG322(message2, this.aiCallBack)
  19359. }
  19360. } else if (this.aitype == "aiDetail1") {
  19361. this.aiDetail(msg, this.aiIndex)
  19362. } else if (this.aitype == "aiDetail2") {
  19363. this.aiDetail2(msg, this.aiIndex)
  19364. } else if (this.aitype == "aiDetail3") {
  19365. let _index = this.aiIndex.split('-')
  19366. this.aiDetail3(msg, _index[0], _index[1])
  19367. } else if (this.aitype == "aiDetail4") {
  19368. this.aiDetail4(msg, this.aiIndex)
  19369. } else if (this.aitype == "teacherDetail") {
  19370. this.aiDetail5(msg, this.aiIndex)
  19371. } else if (this.aitype == "teacherDetail2") {
  19372. this.aiDetail52(msg, this.aiIndex)
  19373. } else if (this.aitype == "aiCpote1") {
  19374. this.aiCpote(msg, this.aiCallBack)
  19375. } else if (this.aitype == "aiCpote2") {
  19376. this.aiCpote(msg, this.aiCallBack)
  19377. } else if (this.aitype == "aiCpote3") {
  19378. this.aiCpote(msg, this.aiCallBack)
  19379. } else if (this.aitype == "aiCpote4") {
  19380. this.aiCpote(msg, this.aiCallBack)
  19381. } else if (this.aitype == "aiTeacher") {
  19382. this.loading = true
  19383. var _text = ""
  19384. for (var i = 0; i < this.dArray.length; i++) {
  19385. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19386. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19387. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19388. let message = ` NOTICE
  19389. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19390. Language: ${this.getLang()}
  19391. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19392. Instruction: Based on the context, follow "Format example", write content.
  19393. # Context
  19394. ## 要求
  19395. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19396. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19397. ${(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','') : ''}
  19398. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19399. ## Format example
  19400. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19401. this.aiGet4(message, () => {
  19402. this.loading = false
  19403. this.isOutline2 = true
  19404. })
  19405. } else if (this.aitype == "aiTeacher2"){
  19406. this.isOutline2 = true
  19407. let _this = this
  19408. setTimeout(()=>{
  19409. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19410. const _tindex = 'task-' + i;
  19411. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19412. _this.taskDetailLoading5.push(_tindex)
  19413. }
  19414. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19415. _this.ttaskDetailLoading5.push(_tindex)
  19416. }
  19417. // this.aiDetail52(msg, i)
  19418. }
  19419. let ij = 0;
  19420. function processNext() {
  19421. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19422. const _tindex = 'task-' + ij;
  19423. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19424. ij++;
  19425. processNext();
  19426. return;
  19427. }
  19428. // 处理当前任务
  19429. _this.aiDetail52(msg, ij, function () {
  19430. // 回调函数,当前任务完成后执行
  19431. ij++;
  19432. processNext(); // 处理下一个任务
  19433. });
  19434. }
  19435. }
  19436. processNext(); // 启动处理
  19437. }, 0)
  19438. } else if (this.aitype == "aiTeacher3"){
  19439. this.loading = true
  19440. let message = `NOTICE
  19441. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19442. Language: ${this.getLang()}
  19443. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19444. Instruction: Based on the context, follow "Format example", write content.
  19445. # Context
  19446. ## 要求
  19447. ${msg} 以及##参考资料
  19448. ## 参考资料
  19449. 任务簇:${this.cpote.cpote4}
  19450. # Format example
  19451. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19452. this.aiGetTask3(message, () => {
  19453. this.loading = false
  19454. this.isOutline2 = true
  19455. })
  19456. } else if (this.aitype == "aiteacherTextDetail") {
  19457. this.aiteacherTextDetail(msg)
  19458. } else if (this.aitype == "aitargetTextDetail") {
  19459. this.aitargetTextDetail(msg)
  19460. } else if (this.aitype == "aitargetTextDetail2") {
  19461. this.aitargetTextDetail2(msg)
  19462. } else if (this.aitype == "aitargetTextDetail3") {
  19463. this.aitargetTextDetail3(msg)
  19464. } else if (this.aitype == 'aiSearchFile'){
  19465. let messages = `NOTICE
  19466. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19467. Language: ${this.getLang()}
  19468. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19469. Instruction: Based on the context, follow "Format example", write content.
  19470. ## 参考资料
  19471. 关键词:${this.courseName}
  19472. # Context
  19473. ## 要求
  19474. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19475. # Format example
  19476. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19477. this.fileSLoading = true
  19478. this.aiSearchFile(messages,()=>{
  19479. this.fileSLoading = false
  19480. })
  19481. } else if (this.aitype == 'aiSearchFile2'){
  19482. let messages = `${msg}
  19483. 课程名字:${this.courseName}
  19484. ${sub.length ? '学科:' + sub.join(",") : ''}
  19485. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19486. this.fileSLoading = true
  19487. this.aiSearchFile2(messages,()=>{
  19488. this.fileSLoading = false
  19489. })
  19490. } else if (this.aitype == 'aiRateRule'){
  19491. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19492. } else if (this.aitype == 'aiRateRuleA'){
  19493. if(this.aiCallBack[0] == 1){
  19494. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19495. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19496. for(var k = 0; k < task.eList.length; k++){
  19497. if(!task.eList[k].rule){
  19498. this.againEva(msg, i, k)
  19499. }
  19500. }
  19501. }
  19502. }else if(this.aiCallBack[0] == 2){
  19503. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19504. for(var k = 0; k < task.eList.length; k++){
  19505. if(!task.eList[k].rule){
  19506. this.againEva(msg, this.aiCallBack[1], k)
  19507. }
  19508. }
  19509. }
  19510. }
  19511. this.setAiJson(this.aitype, msg, msg2, msg3)
  19512. },
  19513. getLang(){
  19514. let lang = ''
  19515. if(this.languageSetting == 0){
  19516. lang = 'Chinese.'
  19517. }else if(this.languageSetting == 1){
  19518. lang = 'Traditional Chinese.'
  19519. }else if(this.languageSetting == 2){
  19520. lang = 'English.'
  19521. }
  19522. return lang
  19523. },
  19524. detailYou(message) {
  19525. this.textLoading = true
  19526. this.ttextLoading = true
  19527. let sub = []
  19528. if (this.courseTypeId.length) {
  19529. for (var i = 0; i < this.courseTypeId.length; i++) {
  19530. let _sid = this.courseTypeId[i]
  19531. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19532. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19533. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19534. }
  19535. }
  19536. }
  19537. }
  19538. let mclass = []
  19539. if (this.courseTypeId.length) {
  19540. for (var i = 0; i < this.courseTypeId.length; i++) {
  19541. let _sid = this.courseTypeId[i]
  19542. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19543. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19544. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19545. }
  19546. }
  19547. }
  19548. }
  19549. let url = []
  19550. if (this.infoData.length) {
  19551. for (var i = 0; i < this.infoData.length; i++) {
  19552. url.push(this.infoData[i].url)
  19553. }
  19554. }
  19555. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19556. // --------
  19557. // ## 补充参考资料
  19558. // 补充资料:${url.join(",")}
  19559. // 补充描述:${this.courseText2} ##补充参考资料和
  19560. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19561. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19562. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19563. let msg = `NOTICE
  19564. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19565. Language: ${this.getLang()}
  19566. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19567. Instruction: Based on the context, follow "Format example", write content.
  19568. #Context
  19569. ## 参考资料
  19570. 课程名字:${this.courseName}
  19571. ${sub.length ? '学科:' + sub.join(",") : ''}
  19572. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19573. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19574. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19575. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19576. ## 要求
  19577. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19578. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19579. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19580. this.aiGet(msg)
  19581. },
  19582. setUnitJson() {
  19583. 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 }] }
  19584. this.$forceUpdate()
  19585. },
  19586. async aiGet(messages) {
  19587. let _this = this
  19588. let fileid = []
  19589. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19590. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19591. if(_this.cankaoInfoData[i].fileid){
  19592. fileid.push(_this.cankaoInfoData[i].fileid)
  19593. }else {
  19594. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19595. if(_fileid){
  19596. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19597. _this.$forceUpdate();
  19598. if(_fileid != 1){
  19599. fileid.push(_fileid)
  19600. }
  19601. }
  19602. }
  19603. }
  19604. if(this.mode == 1){
  19605. for (var i = 0; i < _this.infoData.length; i++) {
  19606. if(_this.infoData[i].fileid){
  19607. fileid.push(_this.infoData[i].fileid)
  19608. }else {
  19609. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19610. if(_fileid){
  19611. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19612. _this.$forceUpdate();
  19613. if(_fileid != 1){
  19614. fileid.push(_fileid)
  19615. }
  19616. }
  19617. }
  19618. }
  19619. }
  19620. } else {
  19621. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19622. fileid = [...fileid]
  19623. if (_this.infoData.length) {
  19624. for (var i = 0; i < _this.infoData.length; i++) {
  19625. if(_this.infoData[i].fileid){
  19626. fileid.push(_this.infoData[i].fileid)
  19627. }else {
  19628. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19629. if(_fileid){
  19630. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19631. _this.$forceUpdate();
  19632. if(_fileid != 1){
  19633. fileid.push(_fileid)
  19634. }
  19635. }
  19636. }
  19637. }
  19638. }
  19639. }
  19640. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19641. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19642. let _uuid = uuidv4();
  19643. // let params = JSON.stringify({
  19644. // // "model": "Chat",
  19645. // model: 'gpt-3.5-turbo',
  19646. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19647. // max_tokens: 4096,
  19648. // top_p: 1,
  19649. // frequency_penalty: 0,
  19650. // presence_penalty: 0,
  19651. // messages: [{
  19652. // content: messages,
  19653. // role: 'user'
  19654. // }],
  19655. // uid: _uuid,
  19656. // mind_map_question: "",
  19657. // })
  19658. let params = {
  19659. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19660. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19661. session_name: _uuid,
  19662. userId: _this.userid,
  19663. uid: _uuid,
  19664. file_ids: fileid.length ? [...fileid] : '',
  19665. model: 'gpt-4o-2024-11-20',
  19666. temperature: this.mode == 3 ? 0.5 : 0.1,
  19667. }
  19668. // let params = JSON.stringify({
  19669. // message: {
  19670. // anthropic_version: "bedrock-2023-05-31",
  19671. // max_tokens: 4096,
  19672. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19673. // top_p: 1,
  19674. // messages: [{
  19675. // "role": "user",
  19676. // "content": messages
  19677. // }] ,
  19678. // },
  19679. // uid: _uuid,
  19680. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19681. // });
  19682. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19683. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19684. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19685. console.log(response);
  19686. // let data = response.data.FunctionResponse
  19687. // if (data.choices && data.choices.length && data.choices[0].message) {
  19688. // _this.courseText = data.choices[0].message.content
  19689. // }
  19690. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19691. } else {
  19692. _this.$message.warning(response.data.FunctionResponse.result);
  19693. }
  19694. _this.isTextCancelToken = null
  19695. }).catch(function (error) {
  19696. _this.textLoading = false
  19697. _this.ttextLoading = false
  19698. _this.isTextCancelToken = null
  19699. if(error && error.message != 'Request canceled by the user.'){
  19700. _this.$message.error(_this.lang.ssTooManyReq)
  19701. }
  19702. console.log(error);
  19703. });
  19704. await _this.aiGetgetAiContent(_uuid)
  19705. },
  19706. aiGetgetAiContent(_uid) {
  19707. try {
  19708. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19709. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19710. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19711. } catch(error){
  19712. console.log('EventSource error:', error);
  19713. this.$message.error(this.lang.ssTooManyReq)
  19714. this.textLoading = false
  19715. this.ttextLoading = false
  19716. this.isTextCancelToken = null
  19717. return;
  19718. }
  19719. let _allText = "";
  19720. let _mdText = "";
  19721. let _iindex = 0
  19722. this.isTextCancelSource.onmessage = _e => {
  19723. let _eData = JSON.parse(_e.data).content;
  19724. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19725. //对话已经完成
  19726. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19727. this.isTextCancelSource.close();
  19728. this.isTextCancelSource = null;
  19729. this.courseText = _mdText;
  19730. this.textLoading = false
  19731. this.ttextLoading = false
  19732. this.courseTextB = false
  19733. this.isTextCancelToken = null
  19734. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19735. this.saveCourse()
  19736. return;
  19737. } else {
  19738. _iindex++
  19739. //对话还在继续
  19740. let _text = "";
  19741. _text = _eData.replaceAll("'", "");
  19742. if (_allText == "") {
  19743. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19744. } else {
  19745. _allText += _text;
  19746. }
  19747. _mdText = _allText + "_";
  19748. _mdText = _mdText.replace(/\\n/g, "\n");
  19749. _mdText = _mdText.replace(/\\/g, "");
  19750. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19751. //转化返回的回复流数据
  19752. if(_iindex == 10){
  19753. this.courseText = _mdText;
  19754. _iindex = 0
  19755. }
  19756. this.textLoading = false
  19757. // 处理流数据
  19758. }
  19759. // this.$forceUpdate();
  19760. };
  19761. let _this = this
  19762. this.isTextCancelSource.onerror = function(event) {
  19763. // 处理错误,可以尝试重新连接
  19764. console.log('EventSource error:', event);
  19765. _this.$message.error(_this.lang.ssTooManyReq)
  19766. _this.textLoading = false
  19767. _this.ttextLoading = false
  19768. _this.isTextCancelToken = null
  19769. _this.isTextCancelSource.close();
  19770. _this.isTextCancelSource = null;
  19771. };
  19772. },
  19773. numberToChinese(number) {
  19774. 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];
  19775. 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];
  19776. let result = '';
  19777. let num = parseInt(number, 10);
  19778. let i = 0;
  19779. while (num > 0) {
  19780. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19781. num = Math.floor(num / 10);
  19782. i++;
  19783. }
  19784. // 去除连续的零,保留一个零
  19785. result = result.replace(new RegExp(this.lang.ssZero + '+', 'g'), this.lang.ssZero);
  19786. return result;
  19787. },
  19788. async aiGet2(messages, callback) {
  19789. let _this = this
  19790. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19791. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19792. if (_this.infoData.length) {
  19793. for (var i = 0; i < _this.infoData.length; i++) {
  19794. if(_this.infoData[i].fileid){
  19795. fileid.push(_this.infoData[i].fileid)
  19796. }else {
  19797. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19798. if(_fileid){
  19799. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19800. _this.$forceUpdate();
  19801. if(_fileid != 1){
  19802. fileid.push(_fileid)
  19803. }
  19804. }
  19805. }
  19806. }
  19807. }
  19808. console.log('fileid=========',fileid)
  19809. // let params = JSON.stringify({
  19810. // // "model": "Chat",
  19811. // model: 'gpt-3.5-turbo',
  19812. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19813. // max_tokens: 4096,
  19814. // top_p: 1,
  19815. // frequency_penalty: 0,
  19816. // presence_penalty: 0,
  19817. // messages: [{
  19818. // content: messages,
  19819. // role: 'user'
  19820. // }],
  19821. // stream: false,
  19822. // uid: this.userid,
  19823. // mind_map_question: "",
  19824. // })
  19825. // // let params = JSON.stringify({
  19826. // // message: {
  19827. // // anthropic_version: "bedrock-2023-05-31",
  19828. // // max_tokens: 4096,
  19829. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19830. // // top_p: 1,
  19831. // // messages: [{
  19832. // // content: messages,
  19833. // // role: 'user'
  19834. // // }], //
  19835. // // },
  19836. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19837. // // });
  19838. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19839. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19840. // console.log(response);
  19841. // let data = response.data.FunctionResponse
  19842. // if (data.choices && data.choices.length && data.choices[0].message) {
  19843. // console.log(data.choices[0].message.content);
  19844. // let dArray = JSON.parse(data.choices[0].message.content)
  19845. // _this.dArray = dArray
  19846. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19847. // for (var i = 0; i < dArray.length; i++) {
  19848. // let _task = dArray[i]
  19849. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19850. // task: _task.task,
  19851. // taskDetail: "",
  19852. // taskDetail2: _task.detail,
  19853. // taskDetail3: "",
  19854. // chapterData: [],
  19855. // toolText: "",
  19856. // toolChoose: [
  19857. // {
  19858. // tool: [],
  19859. // toolDetail: "",
  19860. // toolType: 0,
  19861. // askCount: 1,
  19862. // askTitle: "",
  19863. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19864. // },
  19865. // ],
  19866. // isShowTools: false,
  19867. // askCount: 1,
  19868. // isFold: 0,
  19869. // askTitle: "",
  19870. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19871. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19872. // homeworkList: [],
  19873. // })
  19874. // }
  19875. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19876. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19877. // _this.$forceUpdate();
  19878. // }
  19879. // // if (data.result) {
  19880. // // console.log(data.result);
  19881. // // let dArray = JSON.parse(data.result)
  19882. // // _this.dArray = dArray
  19883. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19884. // // for (var i = 0; i < dArray.length; i++) {
  19885. // // let _task = dArray[i]
  19886. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19887. // // task: _task.task,
  19888. // // taskDetail: "",
  19889. // // taskDetail2: _task.detail,
  19890. // // taskDetail3: "",
  19891. // // chapterData: [],
  19892. // // toolText: "",
  19893. // // toolChoose: [
  19894. // // {
  19895. // // tool: [],
  19896. // // toolDetail: "",
  19897. // // toolType: 0,
  19898. // // askCount: 1,
  19899. // // askTitle: "",
  19900. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19901. // // },
  19902. // // ],
  19903. // // isShowTools: false,
  19904. // // askCount: 1,
  19905. // // isFold: 1,
  19906. // // askTitle: "",
  19907. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19908. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19909. // // homeworkList: [],
  19910. // // })
  19911. // // }
  19912. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19913. // // _this.$forceUpdate();
  19914. // // }
  19915. // callback ? callback() : ''
  19916. // }).catch(function (error) {
  19917. // _this.loading = false
  19918. // console.log(error);
  19919. // });
  19920. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19921. let parm = {
  19922. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19923. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19924. session_name: uuidv4(),
  19925. userId: this.userid,
  19926. file_ids: fileid.length ? [...fileid] : '',
  19927. model: 'gpt-4o-2024-11-20',
  19928. temperature: this.mode == 3 ? 0.5 : 0.1,
  19929. }
  19930. this.ajax
  19931. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19932. .then((response) => {
  19933. console.log(response);
  19934. let data = response.data.FunctionResponse
  19935. if (data.message) {
  19936. console.log(data.message);
  19937. let dArray = {}
  19938. try {
  19939. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19940. } catch (error) {
  19941. console.log("error_________________" + error);
  19942. try {
  19943. let regex = new RegExp(/```json([\s\S]*?)```/);
  19944. let match = data.message.match(regex);
  19945. dArray = JSON.parse(match[1]);
  19946. // var message = data.message;
  19947. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19948. // var jsonEnd = message.indexOf("```", jsonStart);
  19949. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19950. // dArray = JSON.parse(jsonString);
  19951. } catch (error) {
  19952. try {
  19953. let regex = new RegExp(/```json([\s\S]*?)```/);
  19954. let match = data.message.match(regex);
  19955. // eval("var aaa = " + match[0])
  19956. if(match && match[1]){
  19957. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19958. }else {
  19959. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19960. }
  19961. } catch (error) {
  19962. _this.$message.error(_this.lang.ssJsonFormat)
  19963. // +data.message
  19964. // _this.aiGet2(messages, callback);
  19965. _this.loading = false
  19966. _this.isOutlineCancelToken = null
  19967. console.log("error_________________" + error);
  19968. return;
  19969. }
  19970. console.log("error_________________" + error);
  19971. }
  19972. }
  19973. _this.dArray = dArray
  19974. console.log(dArray)
  19975. if(_this.panOutline() > 0){
  19976. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19977. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19978. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19979. }
  19980. for (var i = 0; i < dArray.length; i++) {
  19981. let _task = dArray[i]
  19982. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19983. _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 : "")
  19984. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19985. }else {
  19986. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19987. 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 : ""),
  19988. taskDetail: "",
  19989. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19990. taskDetail3: "",
  19991. chapterData: [],
  19992. toolText: "",
  19993. toolChoose: [
  19994. {
  19995. tool: [],
  19996. toolDetail: "",
  19997. toolType: 0,
  19998. askCount: 1,
  19999. askTitle: "",
  20000. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20001. },
  20002. ],
  20003. isShowTools: false,
  20004. askCount: 1,
  20005. isFold: 0,
  20006. askTitle: "",
  20007. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20008. checkJson: [{ checkCount: [], checkPerent: [] }],
  20009. homeworkList: [],
  20010. })
  20011. }
  20012. }
  20013. }else {
  20014. _this.unitJson[0].chapterInfo[0].taskJson = []
  20015. for (var i = 0; i < dArray.length; i++) {
  20016. let _task = dArray[i]
  20017. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20018. 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 : ""),
  20019. taskDetail: "",
  20020. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  20021. taskDetail3: "",
  20022. chapterData: [],
  20023. toolText: "",
  20024. toolChoose: [
  20025. {
  20026. tool: [],
  20027. toolDetail: "",
  20028. toolType: 0,
  20029. askCount: 1,
  20030. askTitle: "",
  20031. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20032. },
  20033. ],
  20034. isShowTools: false,
  20035. askCount: 1,
  20036. isFold: 0,
  20037. askTitle: "",
  20038. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20039. checkJson: [{ checkCount: [], checkPerent: [] }],
  20040. homeworkList: [],
  20041. })
  20042. }
  20043. }
  20044. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20045. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20046. _this.$forceUpdate();
  20047. _this.saveCourse()
  20048. }
  20049. callback ? callback() : ''
  20050. _this.isOutlineCancelToken = null
  20051. })
  20052. .catch((error) => {
  20053. _this.loading = false
  20054. _this.isOutlineCancelToken = null
  20055. console.log(error);
  20056. });
  20057. },
  20058. cancelAjax(type, index){
  20059. if (this.isOutlineCancelToken && type == 'outline') {
  20060. this.$message.success(this.lang.ssStopOutline)
  20061. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  20062. this.isOutlineCancelToken = null;
  20063. this.loading = false
  20064. }
  20065. if (this.isFileCancelToken && type == 'file') {
  20066. this.$message.success(this.lang.ssStopFileGen)
  20067. this.isFileCancelToken.cancel('Request canceled by the user.');
  20068. this.isFileCancelToken = null;
  20069. this.fileSLoading = false
  20070. }
  20071. if(this.isTextCancelToken && type == 'text'){
  20072. this.$message.success(this.lang.ssStopAIOpt)
  20073. this.isTextCancelToken.cancel('Request canceled by the user.');
  20074. this.isTextCancelToken = null;
  20075. this.textLoading = false
  20076. this.ttextLoading = true
  20077. if(this.isTextCancelSource){
  20078. this.isTextCancelSource.close()
  20079. this.isTextCancelSource = null
  20080. }
  20081. }
  20082. if(this.isTargetCancelToken2 && type == 'target2'){
  20083. this.$message.success(this.lang.ssStopGenTarget)
  20084. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  20085. this.isTargetCancelToken2 = null;
  20086. this.targetTextLoading2 = false
  20087. this.ttargetTextLoading2 = false
  20088. if(this.isTargetCancelSource2){
  20089. this.isTargetCancelSource2.close()
  20090. this.isTargetCancelSource2 = null
  20091. }
  20092. this.$nextTick(() => {
  20093. const targetDiv = this.$refs.aitargetTextDetail3;
  20094. if (targetDiv) {
  20095. targetDiv.scrollIntoView();
  20096. }
  20097. });
  20098. }
  20099. if(this.isTargetCancelToken1 && type == 'target1'){
  20100. this.$message.success(this.lang.ssStopGenTarget)
  20101. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  20102. this.isTargetCancelToken1 = null;
  20103. this.targetTextLoading = false
  20104. this.ttargetTextLoading = false
  20105. if(this.isTargetCancelSource1){
  20106. this.isTargetCancelSource1.close()
  20107. this.isTargetCancelSource1 = null
  20108. }
  20109. }
  20110. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  20111. this.$message.success(this.lang.ssStopExtract)
  20112. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  20113. this.isTeacherTextCancelToken = null;
  20114. this.teacherTextLoading = false
  20115. this.tteacherTextLoading = false
  20116. if(this.isTeacherTextCancelSource){
  20117. this.isTeacherTextCancelSource.close()
  20118. this.isTeacherTextCancelSource = null
  20119. }
  20120. }
  20121. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  20122. this.$message.success(this.lang.ssStopGenPlan)
  20123. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  20124. this.isTeacherTaskCancelToken = null;
  20125. this.loading = false
  20126. }
  20127. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  20128. this.$message.success(this.lang.ssStopGenOut)
  20129. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  20130. this.isOutlineTaskCancelToken[index] = null;
  20131. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  20132. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  20133. if(this.isOutlineTaskCancelSource[index]){
  20134. this.isOutlineTaskCancelSource[index].close()
  20135. this.isOutlineTaskCancelSource[index] = null
  20136. }
  20137. }
  20138. if(type == 'teacherDetail2'){
  20139. this.$message.success(this.lang.ssStopGenPlan)
  20140. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  20141. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  20142. this.isTeacherTaskCancelToken2[index] = null;
  20143. }
  20144. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  20145. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  20146. }
  20147. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  20148. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  20149. }
  20150. if(this.isTeacherTaskCancelSource[index]){
  20151. this.isTeacherTaskCancelSource[index].close()
  20152. this.isTeacherTaskCancelSource[index] = null
  20153. }
  20154. }
  20155. if(type == 'aiTaskGL1'){
  20156. this.$message.success(this.lang.ssStopTaskOver)
  20157. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  20158. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  20159. this.taskCancelToken1[index] = null;
  20160. }
  20161. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  20162. this.taskGLoading[index][0] = false
  20163. }
  20164. if(this.isTaskCancelSource1[index]){
  20165. this.isTaskCancelSource1[index].close()
  20166. this.isTaskCancelSource1[index] = null
  20167. }
  20168. setTimeout(() => {
  20169. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  20170. this.cancelAjax('aiTaskGL2', index)
  20171. }
  20172. }, 1000)
  20173. this.$forceUpdate()
  20174. }
  20175. if(type == 'aiTaskGL2'){
  20176. this.$message.success(this.lang.ssStopTaskTool)
  20177. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  20178. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  20179. this.taskCancelToken2[index] = null;
  20180. }
  20181. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  20182. this.taskGLoading[index][1] = false
  20183. }
  20184. this.$forceUpdate()
  20185. }
  20186. if(type == 'taskAn'){
  20187. this.$message.success(this.lang.ssStopTaskOver)
  20188. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  20189. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  20190. this.taskAnCancelToken[index] = null;
  20191. }
  20192. if(this.taskAnLoading[index]){
  20193. this.taskAnLoading[index] = false
  20194. }
  20195. this.$forceUpdate()
  20196. }
  20197. if(type == 'findMatchingContents'){
  20198. this.$message.success(this.lang.ssStopSearch)
  20199. if(this.isfindMatchingContents){
  20200. this.isfindMatchingContents.cancel('Request canceled by the user.');
  20201. this.isfindMatchingContents = null;
  20202. }
  20203. if(this.knowInfoDataLoading){
  20204. this.knowInfoDataLoading = false
  20205. }
  20206. if(this.findMatchingContentsPage > 1){
  20207. this.findMatchingContentsPage --
  20208. }
  20209. this.$forceUpdate()
  20210. }
  20211. },
  20212. async aiGetTask2(messages, callback) {
  20213. let _this = this
  20214. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20215. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20216. if (_this.infoData.length) {
  20217. for (var i = 0; i < _this.infoData.length; i++) {
  20218. if(_this.infoData[i].fileid){
  20219. fileid.push(_this.infoData[i].fileid)
  20220. }else {
  20221. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20222. if(_fileid){
  20223. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20224. _this.$forceUpdate();
  20225. if(_fileid != 1){
  20226. fileid.push(_fileid)
  20227. }
  20228. }
  20229. }
  20230. }
  20231. }
  20232. console.log('fileid=========',fileid)
  20233. // let params = JSON.stringify({
  20234. // // "model": "Chat",
  20235. // model: 'gpt-3.5-turbo',
  20236. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20237. // max_tokens: 4096,
  20238. // top_p: 1,
  20239. // frequency_penalty: 0,
  20240. // presence_penalty: 0,
  20241. // messages: [{
  20242. // content: messages,
  20243. // role: 'user'
  20244. // }],
  20245. // stream: false,
  20246. // uid: this.userid,
  20247. // mind_map_question: "",
  20248. // })
  20249. // // let params = JSON.stringify({
  20250. // // message: {
  20251. // // anthropic_version: "bedrock-2023-05-31",
  20252. // // max_tokens: 4096,
  20253. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20254. // // top_p: 1,
  20255. // // messages: [{
  20256. // // content: messages,
  20257. // // role: 'user'
  20258. // // }], //
  20259. // // },
  20260. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20261. // // });
  20262. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20263. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20264. // console.log(response);
  20265. // let data = response.data.FunctionResponse
  20266. // if (data.choices && data.choices.length && data.choices[0].message) {
  20267. // console.log(data.choices[0].message.content);
  20268. // let dArray = JSON.parse(data.choices[0].message.content)
  20269. // _this.dArray = dArray
  20270. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20271. // for (var i = 0; i < dArray.length; i++) {
  20272. // let _task = dArray[i]
  20273. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20274. // task: _task.task,
  20275. // taskDetail: "",
  20276. // taskDetail2: _task.detail,
  20277. // taskDetail3: "",
  20278. // chapterData: [],
  20279. // toolText: "",
  20280. // toolChoose: [
  20281. // {
  20282. // tool: [],
  20283. // toolDetail: "",
  20284. // toolType: 0,
  20285. // askCount: 1,
  20286. // askTitle: "",
  20287. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20288. // },
  20289. // ],
  20290. // isShowTools: false,
  20291. // askCount: 1,
  20292. // isFold: 0,
  20293. // askTitle: "",
  20294. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20295. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20296. // homeworkList: [],
  20297. // })
  20298. // }
  20299. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20300. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20301. // _this.$forceUpdate();
  20302. // }
  20303. // // if (data.result) {
  20304. // // console.log(data.result);
  20305. // // let dArray = JSON.parse(data.result)
  20306. // // _this.dArray = dArray
  20307. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20308. // // for (var i = 0; i < dArray.length; i++) {
  20309. // // let _task = dArray[i]
  20310. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20311. // // task: _task.task,
  20312. // // taskDetail: "",
  20313. // // taskDetail2: _task.detail,
  20314. // // taskDetail3: "",
  20315. // // chapterData: [],
  20316. // // toolText: "",
  20317. // // toolChoose: [
  20318. // // {
  20319. // // tool: [],
  20320. // // toolDetail: "",
  20321. // // toolType: 0,
  20322. // // askCount: 1,
  20323. // // askTitle: "",
  20324. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20325. // // },
  20326. // // ],
  20327. // // isShowTools: false,
  20328. // // askCount: 1,
  20329. // // isFold: 1,
  20330. // // askTitle: "",
  20331. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20332. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20333. // // homeworkList: [],
  20334. // // })
  20335. // // }
  20336. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20337. // // _this.$forceUpdate();
  20338. // // }
  20339. // callback ? callback() : ''
  20340. // }).catch(function (error) {
  20341. // _this.loading = false
  20342. // console.log(error);
  20343. // });
  20344. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20345. let parm = {
  20346. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20347. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20348. session_name: uuidv4(),
  20349. userId: this.userid,
  20350. file_ids: fileid.length ? [...fileid] : '',
  20351. model: 'gpt-4o-2024-11-20',
  20352. temperature: this.mode == 3 ? 0.5 : 0.1,
  20353. }
  20354. this.ajax
  20355. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20356. .then((response) => {
  20357. console.log(response);
  20358. let data = response.data.FunctionResponse
  20359. if (data.message) {
  20360. console.log(data.message);
  20361. let dArray = {}
  20362. try {
  20363. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20364. } catch (error) {
  20365. console.log("error_________________" + error);
  20366. try {
  20367. let regex = new RegExp(/```json([\s\S]*?)```/);
  20368. let match = data.message.match(regex);
  20369. dArray = JSON.parse(match[1]);
  20370. // var message = data.message;
  20371. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20372. // var jsonEnd = message.indexOf("```", jsonStart);
  20373. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20374. // dArray = JSON.parse(jsonString);
  20375. } catch (error) {
  20376. try {
  20377. let regex = new RegExp(/```json([\s\S]*?)```/);
  20378. let match = data.message.match(regex);
  20379. // eval("var aaa = " + match[0])
  20380. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20381. } catch (error) {
  20382. console.log("error_________________" + error);
  20383. }
  20384. console.log("error_________________" + error);
  20385. }
  20386. }
  20387. _this.dArray = dArray
  20388. if(_this.panOutline() > 0){
  20389. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20390. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20391. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20392. }
  20393. for (var i = 0; i < dArray.length; i++) {
  20394. let _task = dArray[i]
  20395. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20396. _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(':','')
  20397. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20398. }else {
  20399. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20400. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20401. taskDetail: "",
  20402. taskDetail2: "",
  20403. taskDetail3: "",
  20404. chapterData: [],
  20405. toolText: "",
  20406. toolChoose: [
  20407. {
  20408. tool: [],
  20409. toolDetail: "",
  20410. toolType: 0,
  20411. askCount: 1,
  20412. askTitle: "",
  20413. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20414. },
  20415. ],
  20416. isShowTools: false,
  20417. askCount: 1,
  20418. isFold: 0,
  20419. askTitle: "",
  20420. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20421. checkJson: [{ checkCount: [], checkPerent: [] }],
  20422. homeworkList: [],
  20423. })
  20424. }
  20425. }
  20426. }else {
  20427. _this.unitJson[0].chapterInfo[0].taskJson = []
  20428. for (var i = 0; i < dArray.length; i++) {
  20429. let _task = dArray[i]
  20430. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20431. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20432. taskDetail: "",
  20433. taskDetail2: "",
  20434. taskDetail3: "",
  20435. chapterData: [],
  20436. toolText: "",
  20437. toolChoose: [
  20438. {
  20439. tool: [],
  20440. toolDetail: "",
  20441. toolType: 0,
  20442. askCount: 1,
  20443. askTitle: "",
  20444. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20445. },
  20446. ],
  20447. isShowTools: false,
  20448. askCount: 1,
  20449. isFold: 0,
  20450. askTitle: "",
  20451. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20452. checkJson: [{ checkCount: [], checkPerent: [] }],
  20453. homeworkList: [],
  20454. })
  20455. }
  20456. }
  20457. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20458. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20459. _this.$forceUpdate();
  20460. _this.saveCourse()
  20461. setTimeout(()=>{
  20462. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20463. this.aiOutlineDetail('', i)
  20464. }
  20465. }, 0)
  20466. }
  20467. callback ? callback() : ''
  20468. _this.isOutlineCancelToken = null
  20469. })
  20470. .catch((error) => {
  20471. _this.loading = false
  20472. _this.isOutlineCancelToken = null
  20473. console.log(error);
  20474. });
  20475. },
  20476. async aiGetTask3(messages, callback) {
  20477. let _this = this
  20478. // let params = JSON.stringify({
  20479. // // "model": "Chat",
  20480. // model: 'gpt-3.5-turbo',
  20481. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20482. // max_tokens: 4096,
  20483. // top_p: 1,
  20484. // frequency_penalty: 0,
  20485. // presence_penalty: 0,
  20486. // messages: [{
  20487. // content: messages,
  20488. // role: 'user'
  20489. // }],
  20490. // stream: false,
  20491. // uid: this.userid,
  20492. // mind_map_question: "",
  20493. // })
  20494. // // let params = JSON.stringify({
  20495. // // message: {
  20496. // // anthropic_version: "bedrock-2023-05-31",
  20497. // // max_tokens: 4096,
  20498. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20499. // // top_p: 1,
  20500. // // messages: [{
  20501. // // content: messages,
  20502. // // role: 'user'
  20503. // // }], //
  20504. // // },
  20505. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20506. // // });
  20507. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20508. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20509. // console.log(response);
  20510. // let data = response.data.FunctionResponse
  20511. // if (data.choices && data.choices.length && data.choices[0].message) {
  20512. // console.log(data.choices[0].message.content);
  20513. // let dArray = JSON.parse(data.choices[0].message.content)
  20514. // _this.dArray = dArray
  20515. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20516. // for (var i = 0; i < dArray.length; i++) {
  20517. // let _task = dArray[i]
  20518. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20519. // task: _task.task,
  20520. // taskDetail: "",
  20521. // taskDetail2: _task.detail,
  20522. // taskDetail3: "",
  20523. // chapterData: [],
  20524. // toolText: "",
  20525. // toolChoose: [
  20526. // {
  20527. // tool: [],
  20528. // toolDetail: "",
  20529. // toolType: 0,
  20530. // askCount: 1,
  20531. // askTitle: "",
  20532. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20533. // },
  20534. // ],
  20535. // isShowTools: false,
  20536. // askCount: 1,
  20537. // isFold: 0,
  20538. // askTitle: "",
  20539. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20540. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20541. // homeworkList: [],
  20542. // })
  20543. // }
  20544. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20545. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20546. // _this.$forceUpdate();
  20547. // }
  20548. // // if (data.result) {
  20549. // // console.log(data.result);
  20550. // // let dArray = JSON.parse(data.result)
  20551. // // _this.dArray = dArray
  20552. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20553. // // for (var i = 0; i < dArray.length; i++) {
  20554. // // let _task = dArray[i]
  20555. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20556. // // task: _task.task,
  20557. // // taskDetail: "",
  20558. // // taskDetail2: _task.detail,
  20559. // // taskDetail3: "",
  20560. // // chapterData: [],
  20561. // // toolText: "",
  20562. // // toolChoose: [
  20563. // // {
  20564. // // tool: [],
  20565. // // toolDetail: "",
  20566. // // toolType: 0,
  20567. // // askCount: 1,
  20568. // // askTitle: "",
  20569. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20570. // // },
  20571. // // ],
  20572. // // isShowTools: false,
  20573. // // askCount: 1,
  20574. // // isFold: 1,
  20575. // // askTitle: "",
  20576. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20577. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20578. // // homeworkList: [],
  20579. // // })
  20580. // // }
  20581. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20582. // // _this.$forceUpdate();
  20583. // // }
  20584. // callback ? callback() : ''
  20585. // }).catch(function (error) {
  20586. // _this.loading = false
  20587. // console.log(error);
  20588. // });
  20589. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20590. let parm = {
  20591. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20592. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20593. session_name: uuidv4(),
  20594. userId: this.userid,
  20595. file_ids: '',
  20596. model: 'gpt-4o-2024-11-20',
  20597. temperature: this.mode == 3 ? 0.5 : 0.1,
  20598. }
  20599. this.ajax
  20600. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20601. .then((response) => {
  20602. console.log(response);
  20603. let data = response.data.FunctionResponse
  20604. if (data.message) {
  20605. console.log(data.message);
  20606. let dArray = {}
  20607. try {
  20608. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20609. } catch (error) {
  20610. console.log("error_________________" + error);
  20611. try {
  20612. let regex = new RegExp(/```json([\s\S]*?)```/);
  20613. let match = data.message.match(regex);
  20614. dArray = JSON.parse(match[1]);
  20615. // var message = data.message;
  20616. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20617. // var jsonEnd = message.indexOf("```", jsonStart);
  20618. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20619. // dArray = JSON.parse(jsonString);
  20620. } catch (error) {
  20621. try {
  20622. let regex = new RegExp(/```json([\s\S]*?)```/);
  20623. let match = data.message.match(regex);
  20624. // eval("var aaa = " + match[0])
  20625. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20626. } catch (error) {
  20627. console.log("error_________________" + error);
  20628. }
  20629. console.log("error_________________" + error);
  20630. }
  20631. }
  20632. _this.dArray = dArray
  20633. if(_this.panOutline() > 0){
  20634. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20635. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20636. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20637. }
  20638. for (var i = 0; i < dArray.length; i++) {
  20639. let _task = dArray[i]
  20640. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20641. _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(':','')
  20642. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20643. }else {
  20644. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20645. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20646. taskDetail: "",
  20647. taskDetail2: "",
  20648. taskDetail3: "",
  20649. chapterData: [],
  20650. toolText: "",
  20651. toolChoose: [
  20652. {
  20653. tool: [],
  20654. toolDetail: "",
  20655. toolType: 0,
  20656. askCount: 1,
  20657. askTitle: "",
  20658. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20659. },
  20660. ],
  20661. isShowTools: false,
  20662. askCount: 1,
  20663. isFold: 0,
  20664. askTitle: "",
  20665. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20666. checkJson: [{ checkCount: [], checkPerent: [] }],
  20667. homeworkList: [],
  20668. })
  20669. }
  20670. }
  20671. }else {
  20672. _this.unitJson[0].chapterInfo[0].taskJson = []
  20673. for (var i = 0; i < dArray.length; i++) {
  20674. let _task = dArray[i]
  20675. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20676. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  20677. taskDetail: "",
  20678. taskDetail2: "",
  20679. taskDetail3: "",
  20680. chapterData: [],
  20681. toolText: "",
  20682. toolChoose: [
  20683. {
  20684. tool: [],
  20685. toolDetail: "",
  20686. toolType: 0,
  20687. askCount: 1,
  20688. askTitle: "",
  20689. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20690. },
  20691. ],
  20692. isShowTools: false,
  20693. askCount: 1,
  20694. isFold: 0,
  20695. askTitle: "",
  20696. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20697. checkJson: [{ checkCount: [], checkPerent: [] }],
  20698. homeworkList: [],
  20699. })
  20700. }
  20701. }
  20702. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20703. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20704. _this.$forceUpdate();
  20705. _this.saveCourse()
  20706. // setTimeout(()=>{
  20707. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20708. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20709. // }
  20710. // }, 0)
  20711. setTimeout(()=>{
  20712. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20713. const _tindex = 'task-' + i;
  20714. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20715. _this.taskDetailLoading5.push(_tindex)
  20716. }
  20717. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20718. _this.ttaskDetailLoading5.push(_tindex)
  20719. }
  20720. }
  20721. let ij = 0;
  20722. function processNext() {
  20723. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20724. const _tindex = 'task-' + ij;
  20725. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20726. ij++;
  20727. processNext();
  20728. return;
  20729. }
  20730. // 处理当前任务
  20731. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20732. // 回调函数,当前任务完成后执行
  20733. ij++;
  20734. processNext(); // 处理下一个任务
  20735. });
  20736. }
  20737. }
  20738. processNext(); // 启动处理
  20739. }, 0)
  20740. }
  20741. callback ? callback() : ''
  20742. _this.isTeacherTaskCancelToken = null
  20743. })
  20744. .catch((error) => {
  20745. _this.loading = false
  20746. _this.isTeacherTaskCancelToken = null
  20747. console.log(error);
  20748. });
  20749. },
  20750. async aiGet3(messages, callback) {
  20751. let _this = this
  20752. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20753. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20754. if (_this.infoData.length) {
  20755. for (var i = 0; i < _this.infoData.length; i++) {
  20756. if(_this.infoData[i].fileid){
  20757. fileid.push(_this.infoData[i].fileid)
  20758. }else {
  20759. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20760. if(_fileid){
  20761. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20762. _this.$forceUpdate();
  20763. if(_fileid != 1){
  20764. fileid.push(_fileid)
  20765. }
  20766. }
  20767. }
  20768. }
  20769. }
  20770. // let params = JSON.stringify({
  20771. // // "model": "Chat",
  20772. // model: 'gpt-3.5-turbo',
  20773. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20774. // max_tokens: 4096,
  20775. // top_p: 1,
  20776. // frequency_penalty: 0,
  20777. // presence_penalty: 0,
  20778. // messages: [{
  20779. // content: messages,
  20780. // role: 'user'
  20781. // }],
  20782. // stream: false,
  20783. // uid: this.userid,
  20784. // mind_map_question: "",
  20785. // })
  20786. // // let params = JSON.stringify({
  20787. // // message: {
  20788. // // anthropic_version: "bedrock-2023-05-31",
  20789. // // max_tokens: 4096,
  20790. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20791. // // top_p: 1,
  20792. // // messages: [{
  20793. // // content: messages,
  20794. // // role: 'user'
  20795. // // }], //
  20796. // // },
  20797. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20798. // // });
  20799. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20800. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20801. // console.log(response);
  20802. // let data = response.data.FunctionResponse
  20803. // if (data.choices && data.choices.length && data.choices[0].message) {
  20804. // console.log(data.choices[0].message.content);
  20805. // let tArray = JSON.parse(data.choices[0].message.content)
  20806. // // _this.unitJson[0].chapterInfo[0].task = []
  20807. // let toolsJson = {
  20808. // "电子白板": { tool: 1, type: 1 },
  20809. // "文档": { tool: 52, type: 1 },
  20810. // "思维导图": { tool: 3, type: 1 },
  20811. // "表格": { tool: 48, type: 1 },
  20812. // "作业提交": { tool: 16, type: 2 }
  20813. // }
  20814. // for (var i = 0; i < tArray.length; i++) {
  20815. // let _task = tArray[i]
  20816. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20817. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20818. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20819. // if (_task.toolChoose.length) {
  20820. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20821. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20822. // {
  20823. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20824. // toolDetail: _task.toolChoose[j].detail,
  20825. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20826. // askCount: 1,
  20827. // askTitle: "",
  20828. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20829. // },
  20830. // )
  20831. // }
  20832. // } else {
  20833. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20834. // {
  20835. // tool: [],
  20836. // toolDetail: "",
  20837. // toolType: 0,
  20838. // askCount: 1,
  20839. // askTitle: "",
  20840. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20841. // },
  20842. // )
  20843. // }
  20844. // }
  20845. // // if (_this.infoData.length) {
  20846. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20847. // // }
  20848. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20849. // _this.$forceUpdate();
  20850. // }
  20851. // // if (data.result) {
  20852. // // console.log(data.result);
  20853. // // let tArray = JSON.parse(data.result)
  20854. // // // _this.unitJson[0].chapterInfo[0].task = []
  20855. // // let toolsJson = {
  20856. // // "电子白板": { tool: 1, type: 1 },
  20857. // // "文档": { tool: 52, type: 1 },
  20858. // // "思维导图": { tool: 3, type: 1 },
  20859. // // "表格": { tool: 48, type: 1 },
  20860. // // "作业提交": { tool: 16, type: 2 }
  20861. // // }
  20862. // // for (var i = 0; i < tArray.length; i++) {
  20863. // // let _task = tArray[i]
  20864. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20865. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20866. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20867. // // if (_task.toolChoose.length) {
  20868. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20869. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20870. // // {
  20871. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20872. // // toolDetail: _task.toolChoose[j].detail,
  20873. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20874. // // askCount: 1,
  20875. // // askTitle: "",
  20876. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20877. // // },
  20878. // // )
  20879. // // }
  20880. // // } else {
  20881. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20882. // // {
  20883. // // tool: [],
  20884. // // toolDetail: "",
  20885. // // toolType: 0,
  20886. // // askCount: 1,
  20887. // // askTitle: "",
  20888. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20889. // // },
  20890. // // )
  20891. // // }
  20892. // // }
  20893. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20894. // // _this.$forceUpdate();
  20895. // // }
  20896. // callback ? callback() : ''
  20897. // }).catch(function (error) {
  20898. // _this.loading = false
  20899. // console.log(error);
  20900. // });
  20901. let parm = {
  20902. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20903. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20904. session_name: uuidv4(),
  20905. userId: this.userid,
  20906. file_ids: fileid.length ? [...fileid] : '',
  20907. model: 'gpt-4o-2024-11-20',
  20908. temperature: this.mode == 3 ? 0.5 : 0.1,
  20909. }
  20910. this.ajax
  20911. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20912. .then(async (response) => {
  20913. console.log(response);
  20914. let data = response.data.FunctionResponse
  20915. if (data.message) {
  20916. console.log(data.message);
  20917. let tArray = {}
  20918. try {
  20919. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20920. } catch (error) {
  20921. console.log("error_________________" + error);
  20922. try {
  20923. let regex = new RegExp(/```json([\s\S]*?)```/);
  20924. let match = data.message.match(regex);
  20925. tArray = JSON.parse(match[1]);
  20926. // var message = data.message;
  20927. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20928. // var jsonEnd = message.indexOf("```", jsonStart);
  20929. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20930. // tArray = JSON.parse(jsonString);
  20931. } catch (error) {
  20932. try {
  20933. let regex = new RegExp(/```json([\s\S]*?)```/);
  20934. let match = data.message.match(regex);
  20935. // eval("var aaa = " + match[0])
  20936. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20937. } catch (error) {
  20938. console.log("error_________________" + error);
  20939. }
  20940. console.log("error_________________" + error);
  20941. }
  20942. }
  20943. let toolsJson = {
  20944. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  20945. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  20946. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  20947. [_this.lang.ssTable]: { tool: 48, type: 1 },
  20948. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  20949. [_this.lang.ssQA]: { tool: 15, type: 2 },
  20950. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  20951. }
  20952. // answerQ:"sssssssssssssss"
  20953. for (var i = 0; i < tArray.length; i++) {
  20954. let _task = tArray[i]
  20955. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20956. _task.elist = _task.elist.filter(el=>{
  20957. el.isai = "1"
  20958. return el
  20959. })
  20960. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20961. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20962. if (_task.toolChoose.length) {
  20963. for (var j = 0; j < _task.toolChoose.length; j++) {
  20964. let _json = {
  20965. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20966. toolDetail: _task.toolChoose[j].detail,
  20967. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20968. askCount: 1,
  20969. askTitle: "",
  20970. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20971. }
  20972. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  20973. let answerQ = await _this.aiCreateQuestion(15, i)
  20974. _json.answerQ = answerQ.answerQ
  20975. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  20976. let testJson = await _this.aiCreateQuestion(45, i)
  20977. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20978. }
  20979. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20980. }
  20981. } else {
  20982. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20983. {
  20984. tool: [],
  20985. toolDetail: "",
  20986. toolType: 0,
  20987. askCount: 1,
  20988. askTitle: "",
  20989. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20990. },
  20991. )
  20992. }
  20993. }
  20994. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20995. _this.$forceUpdate();
  20996. _this.createTeacherAn();
  20997. }
  20998. callback ? callback() : ''
  20999. })
  21000. .catch((error) => {
  21001. _this.loading = false
  21002. console.log(error);
  21003. });
  21004. },
  21005. async aiGet32(messages, index) {
  21006. let _this = this
  21007. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21008. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21009. if (_this.infoData.length) {
  21010. for (var i = 0; i < _this.infoData.length; i++) {
  21011. if(_this.infoData[i].fileid){
  21012. fileid.push(_this.infoData[i].fileid)
  21013. }else {
  21014. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21015. if(_fileid){
  21016. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21017. _this.$forceUpdate();
  21018. if(_fileid != 1){
  21019. fileid.push(_fileid)
  21020. }
  21021. }
  21022. }
  21023. }
  21024. }
  21025. // let params = JSON.stringify({
  21026. // // "model": "Chat",
  21027. // model: 'gpt-3.5-turbo',
  21028. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21029. // max_tokens: 4096,
  21030. // top_p: 1,
  21031. // frequency_penalty: 0,
  21032. // presence_penalty: 0,
  21033. // messages: [{
  21034. // content: messages,
  21035. // role: 'user'
  21036. // }],
  21037. // stream: false,
  21038. // uid: this.userid,
  21039. // mind_map_question: "",
  21040. // })
  21041. // // let params = JSON.stringify({
  21042. // // message: {
  21043. // // anthropic_version: "bedrock-2023-05-31",
  21044. // // max_tokens: 4096,
  21045. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21046. // // top_p: 1,
  21047. // // messages: [{
  21048. // // content: messages,
  21049. // // role: 'user'
  21050. // // }], //
  21051. // // },
  21052. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21053. // // });
  21054. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21055. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21056. // console.log(response);
  21057. // let data = response.data.FunctionResponse
  21058. // if (data.choices && data.choices.length && data.choices[0].message) {
  21059. // console.log(data.choices[0].message.content);
  21060. // let tArray = JSON.parse(data.choices[0].message.content)
  21061. // // _this.unitJson[0].chapterInfo[0].task = []
  21062. // let toolsJson = {
  21063. // "电子白板": { tool: 1, type: 1 },
  21064. // "文档": { tool: 52, type: 1 },
  21065. // "思维导图": { tool: 3, type: 1 },
  21066. // "表格": { tool: 48, type: 1 },
  21067. // "作业提交": { tool: 16, type: 2 }
  21068. // }
  21069. // for (var i = 0; i < tArray.length; i++) {
  21070. // let _task = tArray[i]
  21071. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21072. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21073. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21074. // if (_task.toolChoose.length) {
  21075. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21076. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21077. // {
  21078. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21079. // toolDetail: _task.toolChoose[j].detail,
  21080. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21081. // askCount: 1,
  21082. // askTitle: "",
  21083. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21084. // },
  21085. // )
  21086. // }
  21087. // } else {
  21088. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21089. // {
  21090. // tool: [],
  21091. // toolDetail: "",
  21092. // toolType: 0,
  21093. // askCount: 1,
  21094. // askTitle: "",
  21095. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21096. // },
  21097. // )
  21098. // }
  21099. // }
  21100. // // if (_this.infoData.length) {
  21101. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21102. // // }
  21103. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21104. // _this.$forceUpdate();
  21105. // }
  21106. // // if (data.result) {
  21107. // // console.log(data.result);
  21108. // // let tArray = JSON.parse(data.result)
  21109. // // // _this.unitJson[0].chapterInfo[0].task = []
  21110. // // let toolsJson = {
  21111. // // "电子白板": { tool: 1, type: 1 },
  21112. // // "文档": { tool: 52, type: 1 },
  21113. // // "思维导图": { tool: 3, type: 1 },
  21114. // // "表格": { tool: 48, type: 1 },
  21115. // // "作业提交": { tool: 16, type: 2 }
  21116. // // }
  21117. // // for (var i = 0; i < tArray.length; i++) {
  21118. // // let _task = tArray[i]
  21119. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21120. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21121. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21122. // // if (_task.toolChoose.length) {
  21123. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  21124. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21125. // // {
  21126. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21127. // // toolDetail: _task.toolChoose[j].detail,
  21128. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21129. // // askCount: 1,
  21130. // // askTitle: "",
  21131. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21132. // // },
  21133. // // )
  21134. // // }
  21135. // // } else {
  21136. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21137. // // {
  21138. // // tool: [],
  21139. // // toolDetail: "",
  21140. // // toolType: 0,
  21141. // // askCount: 1,
  21142. // // askTitle: "",
  21143. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21144. // // },
  21145. // // )
  21146. // // }
  21147. // // }
  21148. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21149. // // _this.$forceUpdate();
  21150. // // }
  21151. // callback ? callback() : ''
  21152. // }).catch(function (error) {
  21153. // _this.loading = false
  21154. // console.log(error);
  21155. // });
  21156. let parm = {
  21157. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21158. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21159. session_name: uuidv4(),
  21160. userId: this.userid,
  21161. file_ids: fileid.length ? [...fileid] : '',
  21162. model: 'gpt-4o-2024-11-20',
  21163. temperature: this.mode == 3 ? 0.5 : 0.1,
  21164. }
  21165. this.ajax
  21166. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21167. .then(async (response) => {
  21168. console.log(response);
  21169. let data = response.data.FunctionResponse
  21170. if (data.message) {
  21171. console.log(data.message);
  21172. let tArray = {}
  21173. try {
  21174. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21175. } catch (error) {
  21176. console.log("error_________________" + error);
  21177. try {
  21178. let regex = new RegExp(/```json([\s\S]*?)```/);
  21179. let match = data.message.match(regex);
  21180. tArray = JSON.parse(match[1]);
  21181. // var message = data.message;
  21182. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21183. // var jsonEnd = message.indexOf("```", jsonStart);
  21184. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21185. // tArray = JSON.parse(jsonString);
  21186. } catch (error) {
  21187. try {
  21188. let regex = new RegExp(/```json([\s\S]*?)```/);
  21189. let match = data.message.match(regex);
  21190. // eval("var aaa = " + match[0])
  21191. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21192. } catch (error) {
  21193. console.log("error_________________" + error);
  21194. }
  21195. console.log("error_________________" + error);
  21196. }
  21197. }
  21198. let toolsJson = {
  21199. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21200. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21201. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21202. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21203. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21204. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21205. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21206. }
  21207. // answerQ:"sssssssssssssss"
  21208. // for (var i = 0; i < tArray.length; i++) {
  21209. let _task = tArray
  21210. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  21211. _task.elist = _task.elist.filter(el=>{
  21212. el.isai = 1
  21213. return el
  21214. })
  21215. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21216. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21217. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  21218. console.log("error_________________JSON不对重新生成");
  21219. _this.$message.error(_this.lang.ssNetWave)
  21220. _this.aiGet32(messages, index)
  21221. return;
  21222. }
  21223. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21224. if (_task.toolChoose && _task.toolChoose.length) {
  21225. for (var j = 0; j < _task.toolChoose.length; j++) {
  21226. let _json = {
  21227. tool: [],
  21228. toolDetail: _task.toolChoose[j].detail,
  21229. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21230. askCount: 1,
  21231. askTitle: "",
  21232. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21233. }
  21234. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21235. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA)){
  21236. let answerQ = await _this.aiCreateQuestion(15, index)
  21237. // _json.answerQ = answerQ.answerQ
  21238. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21239. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice)){
  21240. let testJson = await _this.aiCreateQuestion(45, index)
  21241. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21242. _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}
  21243. }
  21244. _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]
  21245. _this.$forceUpdate();
  21246. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21247. }
  21248. } else {
  21249. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21250. {
  21251. tool: [],
  21252. toolDetail: "",
  21253. toolType: 0,
  21254. askCount: 1,
  21255. askTitle: "",
  21256. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21257. },
  21258. )
  21259. }
  21260. // }
  21261. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21262. _this.$forceUpdate();
  21263. _this.createTeacherAn(index);
  21264. }
  21265. // callback ? callback() : ''
  21266. _this.taskLoading[index] = false
  21267. })
  21268. .catch((error) => {
  21269. // _this.loading = false
  21270. _this.taskLoading[index] = false
  21271. console.log(error);
  21272. });
  21273. },
  21274. async aiGetG321(messages, index, callback, callback2) {
  21275. let _this = this
  21276. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21277. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21278. if (_this.infoData.length) {
  21279. for (var i = 0; i < _this.infoData.length; i++) {
  21280. if(_this.infoData[i].fileid){
  21281. fileid.push(_this.infoData[i].fileid)
  21282. }else {
  21283. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21284. if(_fileid){
  21285. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21286. _this.$forceUpdate();
  21287. if(_fileid != 1){
  21288. fileid.push(_fileid)
  21289. }
  21290. }
  21291. }
  21292. }
  21293. }
  21294. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21295. let parm = {
  21296. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21297. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21298. session_name: uuidv4(),
  21299. userId: this.userid,
  21300. file_ids: fileid.length ? [...fileid] : '',
  21301. model: 'gpt-4o-2024-11-20',
  21302. temperature: this.mode == 3 ? 0.5 : 0.1,
  21303. }
  21304. this.ajax
  21305. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21306. .then(async (response) => {
  21307. console.log(response);
  21308. let data = response.data.FunctionResponse
  21309. if (data.message) {
  21310. let tArray = {}
  21311. try {
  21312. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21313. } catch (error) {
  21314. console.log("error_________________" + error);
  21315. try {
  21316. let regex = new RegExp(/```json([\s\S]*?)```/);
  21317. let match = data.message.match(regex);
  21318. tArray = JSON.parse(match[1]);
  21319. } catch (error) {
  21320. try {
  21321. let regex = new RegExp(/```json([\s\S]*?)```/);
  21322. let match = data.message.match(regex);
  21323. // eval("var aaa = " + match[0])
  21324. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21325. } catch (error) {
  21326. console.log("error_________________" + error);
  21327. }
  21328. console.log("error_________________" + error);
  21329. }
  21330. }
  21331. console.log(data.message);
  21332. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21333. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21334. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21335. _this.$forceUpdate();
  21336. _this.createTeacherAn(index);
  21337. }
  21338. callback ? callback(callback2) : ''
  21339. _this.taskGLoading[index][0] = false
  21340. _this.taskCancelToken1[index] = null
  21341. _this.$forceUpdate();
  21342. })
  21343. .catch((error) => {
  21344. // _this.loading = false
  21345. callback ? callback(callback2) : ''
  21346. _this.taskGLoading[index][0] = false
  21347. _this.taskCancelToken1[index] = null
  21348. _this.$forceUpdate();
  21349. console.log(error);
  21350. });
  21351. },
  21352. async aiGetG321L(messages, index, callback, callback2) {
  21353. let _this = this
  21354. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21355. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21356. if (_this.infoData.length) {
  21357. for (var i = 0; i < _this.infoData.length; i++) {
  21358. if(_this.infoData[i].fileid){
  21359. fileid.push(_this.infoData[i].fileid)
  21360. }else {
  21361. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21362. if(_fileid){
  21363. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21364. _this.$forceUpdate();
  21365. if(_fileid != 1){
  21366. fileid.push(_fileid)
  21367. }
  21368. }
  21369. }
  21370. }
  21371. }
  21372. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21373. let _uuid = uuidv4();
  21374. let parm = {
  21375. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21376. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21377. session_name: uuidv4(),
  21378. userId: this.userid,
  21379. file_ids: fileid.length ? [...fileid] : '',
  21380. uid: _uuid,
  21381. // model: 'gpt-4o-2024-11-20',
  21382. model: 'gpt-4o-mini',
  21383. temperature: this.mode == 3 ? 0.5 : 0.1,
  21384. }
  21385. this.ajax
  21386. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21387. .then(async (response) => {
  21388. console.log(response);
  21389. // }
  21390. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21391. } else {
  21392. _this.$message.warning(response.data.FunctionResponse.result);
  21393. callback ? callback(callback2) : ''
  21394. _this.taskGLoading[index][0] = false
  21395. _this.ttaskGLoading[index][0] = false
  21396. _this.taskCancelToken1[index] = null
  21397. }
  21398. _this.taskCancelToken1[index] = null
  21399. _this.$forceUpdate();
  21400. })
  21401. .catch((error) => {
  21402. // _this.loading = false
  21403. callback ? callback(callback2) : ''
  21404. _this.taskGLoading[index][0] = false
  21405. _this.ttaskGLoading[index][0] = false
  21406. _this.taskCancelToken1[index] = null
  21407. _this.$forceUpdate();
  21408. console.log(error);
  21409. });
  21410. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21411. },
  21412. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21413. try {
  21414. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21415. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21416. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21417. } catch(error){
  21418. console.log('EventSource error:', error);
  21419. this.$message.error(this.lang.ssTooManyReq)
  21420. callback ? callback(callback2) : ''
  21421. this.taskGLoading[index][0] = false
  21422. this.ttaskGLoading[index][0] = false
  21423. this.taskCancelToken1[index][0] = null
  21424. return;
  21425. }
  21426. let _allText = "";
  21427. let _mdText = "";
  21428. let _iindex = 0
  21429. this.isTaskCancelSource1[index].onmessage = _e => {
  21430. let _eData = JSON.parse(_e.data).content;
  21431. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21432. //对话已经完成
  21433. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21434. callback ? callback(callback2) : ''
  21435. this.isTaskCancelSource1[index].close();
  21436. this.isTaskCancelSource1[index] = null;
  21437. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21438. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21439. this.createTeacherAn(index);
  21440. this.taskGLoading[index][0] = false
  21441. this.ttaskGLoading[index][0] = false
  21442. this.taskCancelToken1[index][0] = null
  21443. return;
  21444. } else {
  21445. _iindex++
  21446. //对话还在继续
  21447. let _text = "";
  21448. _text = _eData.replaceAll("'", "");
  21449. if (_allText == "") {
  21450. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21451. } else {
  21452. _allText += _text;
  21453. }
  21454. _mdText = _allText + "_";
  21455. _mdText = _mdText.replace(/\\n/g, "\n");
  21456. _mdText = _mdText.replace(/\\/g, "");
  21457. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21458. //转化返回的回复流数据.
  21459. if(_iindex == 10){
  21460. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21461. _iindex = 0
  21462. }
  21463. this.taskGLoading[index][0] = false
  21464. // 处理流数据
  21465. }
  21466. // this.$forceUpdate();
  21467. };
  21468. let _this = this
  21469. this.isTaskCancelSource1[index].onerror = function(event) {
  21470. // 处理错误,可以尝试重新连接
  21471. console.log('EventSource error:', event);
  21472. _this.$message.error(this.lang.ssTooManyReq)
  21473. callback ? callback(callback2) : ''
  21474. _this.taskGLoading[index][0] = false
  21475. _this.ttaskGLoading[index][0] = false
  21476. _this.isTaskCancelSource1[index].close();
  21477. _this.isTaskCancelSource1[index] = null;
  21478. _this.taskCancelToken1[index][0] = null
  21479. };
  21480. },
  21481. async aiGetG322(messages, index, callback) {
  21482. let _this = this
  21483. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21484. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21485. if (_this.infoData.length) {
  21486. for (var i = 0; i < _this.infoData.length; i++) {
  21487. if(_this.infoData[i].fileid){
  21488. fileid.push(_this.infoData[i].fileid)
  21489. }else {
  21490. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21491. if(_fileid){
  21492. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21493. _this.$forceUpdate();
  21494. if(_fileid != 1){
  21495. fileid.push(_fileid)
  21496. }
  21497. }
  21498. }
  21499. }
  21500. }
  21501. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21502. let parm = {
  21503. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21504. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21505. session_name: uuidv4(),
  21506. userId: this.userid,
  21507. file_ids: fileid.length ? [...fileid] : '',
  21508. model: 'gpt-4o-2024-11-20',
  21509. temperature: this.mode == 3 ? 0.5 : 0.1,
  21510. }
  21511. this.ajax
  21512. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21513. .then(async (response) => {
  21514. console.log(response);
  21515. let data = response.data.FunctionResponse
  21516. if (data.message) {
  21517. console.log(data.message);
  21518. let tArray = {}
  21519. try {
  21520. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21521. } catch (error) {
  21522. console.log("error_________________" + error);
  21523. try {
  21524. let regex = new RegExp(/```json([\s\S]*?)```/);
  21525. let match = data.message.match(regex);
  21526. tArray = JSON.parse(match[1]);
  21527. } catch (error) {
  21528. try {
  21529. let regex = new RegExp(/```json([\s\S]*?)```/);
  21530. let match = data.message.match(regex);
  21531. // eval("var aaa = " + match[0])
  21532. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21533. } catch (error) {
  21534. console.log("error_________________" + error);
  21535. }
  21536. console.log("error_________________" + error);
  21537. }
  21538. }
  21539. let toolsJson = {
  21540. [_this.lang.ssEWhite]: { tool: 1, type: 1 },
  21541. [_this.lang.ssDocument]: { tool: 52, type: 1 },
  21542. [_this.lang.ssMindMap]: { tool: 3, type: 1 },
  21543. [_this.lang.ssTable]: { tool: 48, type: 1 },
  21544. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21545. [_this.lang.ssQA]: { tool: 15, type: 2 },
  21546. [_this.lang.ssChoice]: { tool: 45, type: 2 },
  21547. }
  21548. if(_this.languageSetting == 1){
  21549. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21550. }else if(_this.languageSetting == 2){
  21551. toolsJson = {
  21552. "Mind Map Tool": { tool: 1, type: 1 },
  21553. "Document tool": { tool: 52, type: 1 },
  21554. "Diagram Tool": { tool: 3, type: 1 },
  21555. "Spreadsheet tool": { tool: 48, type: 1 },
  21556. [_this.lang.ssHomework]: { tool: 16, type: 2 },
  21557. "Q&A Tool": { tool: 15, type: 2 },
  21558. "Choice tool": { tool: 45, type: 2 },
  21559. }
  21560. }
  21561. let _task = tArray
  21562. if(!_task.toolChoose){
  21563. console.log("error_________________JSON不对重新生成");
  21564. _this.$message.error(_this.lang.ssNetWave)
  21565. _this.aiGetG322(messages, index)
  21566. return;
  21567. }
  21568. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21569. if (_task.toolChoose && _task.toolChoose.length) {
  21570. for (var j = 0; j < _task.toolChoose.length; j++) {
  21571. let _json = {
  21572. tool: [],
  21573. toolDetail: _task.toolChoose[j].detail,
  21574. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21575. askCount: 1,
  21576. askTitle: "",
  21577. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21578. }
  21579. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21580. if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssQA) || _task.toolChoose[j].tool == 'Q&A Tool'){
  21581. let answerQ = await _this.aiCreateQuestion(15, index)
  21582. // _json.answerQ = answerQ.answerQ
  21583. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21584. }else if(converter(_task.toolChoose[j].tool) == converter(_this.lang.ssChoice) || _task.toolChoose[j].tool == 'Choice tool'){
  21585. let testJson = await _this.aiCreateQuestion(45, index)
  21586. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21587. _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}
  21588. }
  21589. _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]
  21590. _this.$forceUpdate();
  21591. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21592. }
  21593. } else {
  21594. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21595. {
  21596. tool: [],
  21597. toolDetail: "",
  21598. toolType: 0,
  21599. askCount: 1,
  21600. askTitle: "",
  21601. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21602. },
  21603. )
  21604. }
  21605. //
  21606. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21607. _this.$forceUpdate();
  21608. // _this.$nextTick(()=>{
  21609. // setTimeout(() => {
  21610. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21611. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21612. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21613. // }
  21614. // }
  21615. // }, 2000);
  21616. // })
  21617. }
  21618. callback ? callback() : ''
  21619. _this.taskGLoading[index][1] = false
  21620. _this.taskCancelToken2[index] = null
  21621. _this.$forceUpdate();
  21622. })
  21623. .catch((error) => {
  21624. // _this.loading = false
  21625. callback ? callback() : ''
  21626. _this.taskGLoading[index][1] = false
  21627. _this.taskCancelToken2[index] = null
  21628. _this.$forceUpdate();
  21629. console.log(error);
  21630. });
  21631. },
  21632. async aiGetG323(messages, index) {
  21633. let _this = this
  21634. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21635. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21636. if (_this.infoData.length) {
  21637. for (var i = 0; i < _this.infoData.length; i++) {
  21638. if(_this.infoData[i].fileid){
  21639. fileid.push(_this.infoData[i].fileid)
  21640. }else {
  21641. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21642. if(_fileid){
  21643. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21644. _this.$forceUpdate();
  21645. if(_fileid != 1){
  21646. fileid.push(_fileid)
  21647. }
  21648. }
  21649. }
  21650. }
  21651. }
  21652. let parm = {
  21653. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21654. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21655. session_name: uuidv4(),
  21656. userId: this.userid,
  21657. file_ids: fileid.length ? [...fileid] : '',
  21658. model: 'gpt-4o-2024-11-20',
  21659. temperature: this.mode == 3 ? 0.5 : 0.1,
  21660. }
  21661. this.ajax
  21662. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21663. .then(async (response) => {
  21664. console.log(response);
  21665. let data = response.data.FunctionResponse
  21666. if (data.message) {
  21667. console.log(data.message);
  21668. let tArray = {}
  21669. try {
  21670. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21671. } catch (error) {
  21672. console.log("error_________________" + error);
  21673. try {
  21674. let regex = new RegExp(/```json([\s\S]*?)```/);
  21675. let match = data.message.match(regex);
  21676. tArray = JSON.parse(match[1]);
  21677. } catch (error) {
  21678. try {
  21679. let regex = new RegExp(/```json([\s\S]*?)```/);
  21680. let match = data.message.match(regex);
  21681. // eval("var aaa = " + match[0])
  21682. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21683. } catch (error) {
  21684. console.log("error_________________" + error);
  21685. }
  21686. console.log("error_________________" + error);
  21687. }
  21688. }
  21689. let _task = tArray
  21690. if(!_task.elist){
  21691. console.log("error_________________JSON不对重新生成");
  21692. _this.$message.error(this.lang.ssNetWave)
  21693. _this.aiGetG322(messages, index)
  21694. return;
  21695. }
  21696. _task.elist = _task.elist.filter(el=>{
  21697. el.isai = "1"
  21698. return el
  21699. })
  21700. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21701. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21702. _this.$forceUpdate();
  21703. }
  21704. // callback ? callback() : ''
  21705. _this.taskGLoading[index][2] = false
  21706. })
  21707. .catch((error) => {
  21708. // _this.loading = false
  21709. _this.taskGLoading[index][2] = false
  21710. console.log(error);
  21711. });
  21712. },
  21713. async aiCreateQuestion(type, task) {
  21714. let _this = this
  21715. return new Promise((resolve, reject) => {
  21716. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21717. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21718. if (_this.infoData.length) {
  21719. for (var i = 0; i < _this.infoData.length; i++) {
  21720. if(_this.infoData[i].fileid){
  21721. fileid.push(_this.infoData[i].fileid)
  21722. }
  21723. }
  21724. }
  21725. let sub = []
  21726. let mclass = []
  21727. if (this.courseTypeId.length) {
  21728. for (var i = 0; i < this.courseTypeId.length; i++) {
  21729. let _sid = this.courseTypeId[i]
  21730. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21731. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21732. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21733. }
  21734. }
  21735. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21736. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21737. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21738. }
  21739. }
  21740. }
  21741. }
  21742. let messages = ""
  21743. if(type == 15){
  21744. messages = `NOTICE
  21745. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21746. Language: ${this.getLang()}
  21747. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21748. Instruction: Based on the context, follow "Format example", write content.
  21749. # Context
  21750. ## 任务
  21751. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21752. ## 限制
  21753. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21754. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21755. ## 课程简介
  21756. 课程名字:${_this.courseName}
  21757. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21758. ${sub.length ? '学科:' + sub.join(",") : ''}
  21759. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21760. ## 教案
  21761. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21762. # Format example
  21763. {"answerQ":"问题"}
  21764. `
  21765. }else if(type == 45){
  21766. messages = `NOTICE
  21767. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21768. Language: ${this.getLang()}
  21769. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21770. Instruction: Based on the context, follow "Format example", write content.
  21771. # Context
  21772. ## 任务
  21773. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21774. ## 限制
  21775. - 生成题目禁止重复。
  21776. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21777. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21778. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21779. ## 课程简介
  21780. 课程名字:${_this.courseName}
  21781. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21782. ${sub.length ? '学科:' + sub.join(",") : ''}
  21783. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21784. ## 教案
  21785. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21786. # Format example
  21787. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21788. `
  21789. }
  21790. let parm = {
  21791. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21792. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21793. session_name: uuidv4(),
  21794. userId: this.userid,
  21795. file_ids: fileid.length ? [...fileid] : '',
  21796. model: 'gpt-4o-2024-11-20',
  21797. temperature: this.mode == 3 ? 0.5 : 0.1,
  21798. }
  21799. this.ajax
  21800. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21801. .then((response) => {
  21802. console.log(response);
  21803. let data = response.data.FunctionResponse
  21804. if (data.message) {
  21805. console.log(data.message);
  21806. try {
  21807. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21808. let tArray = {}
  21809. try {
  21810. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21811. } catch (error) {
  21812. console.log("error_________________" + error);
  21813. try {
  21814. let regex = new RegExp(/```json([\s\S]*?)```/);
  21815. let match = data.message.match(regex);
  21816. tArray = JSON.parse(match[1]);
  21817. // var message = data.message;
  21818. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21819. // var jsonEnd = message.indexOf("```", jsonStart);
  21820. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21821. // tArray = JSON.parse(jsonString);
  21822. } catch (error) {
  21823. try {
  21824. let regex = new RegExp(/```json([\s\S]*?)```/);
  21825. let match = data.message.match(regex);
  21826. // eval("var aaa = " + match[0])
  21827. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21828. } catch (error) {
  21829. try {
  21830. let regex = new RegExp(/```json([\s\S]*?)```/);
  21831. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21832. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21833. // eval("var aaa = " + match[0])
  21834. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21835. } catch (error) {
  21836. console.log("error_________________" + error);
  21837. }
  21838. console.log("error_________________" + error);
  21839. }
  21840. console.log("error_________________" + error);
  21841. }
  21842. }
  21843. resolve(tArray)
  21844. } catch (error) {
  21845. if(type == 15){
  21846. resolve({answerQ: _this.lang.ssTopic})
  21847. }else if(type == 45){
  21848. 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"}])
  21849. }
  21850. }
  21851. }else 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. })
  21857. .catch((error) => {
  21858. if(type == 15){
  21859. resolve({answerQ: _this.lang.ssTopic})
  21860. }else if(type == 45){
  21861. 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"}])
  21862. }
  21863. console.log(error);
  21864. });
  21865. });
  21866. },
  21867. async aiChoice(type){
  21868. if(type == 45){
  21869. this.choiceLoading = true
  21870. }
  21871. let _this = this
  21872. let fileid = []
  21873. if (_this.xuanzeInfoData.length) {
  21874. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21875. if(_this.xuanzeInfoData[i].fileid){
  21876. fileid.push(_this.xuanzeInfoData[i].fileid)
  21877. }
  21878. }
  21879. }else{
  21880. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21881. if (_this.infoData.length) {
  21882. for (var i = 0; i < _this.infoData.length; i++) {
  21883. if(_this.infoData[i].fileid){
  21884. fileid.push(_this.infoData[i].fileid)
  21885. }
  21886. }
  21887. }
  21888. }
  21889. let sub = []
  21890. let mclass = []
  21891. if (this.courseTypeId.length) {
  21892. for (var i = 0; i < this.courseTypeId.length; i++) {
  21893. let _sid = this.courseTypeId[i]
  21894. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21895. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21896. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21897. }
  21898. }
  21899. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21900. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21901. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21902. }
  21903. }
  21904. }
  21905. }
  21906. let messages = ""
  21907. if(type == 15){
  21908. messages = `NOTICE
  21909. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21910. Language: ${this.getLang()}
  21911. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21912. Instruction: Based on the context, follow "Format example", write content.
  21913. # Context
  21914. ## 任务
  21915. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21916. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21917. ## 限制
  21918. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21919. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21920. ## 课程简介
  21921. 课程名字:${_this.courseName}
  21922. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21923. ${sub.length ? '学科:' + sub.join(",") : ''}
  21924. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21925. ## 教案
  21926. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21927. # Format example
  21928. {"answerQ":"问题"}
  21929. `
  21930. }else if(type == 45){
  21931. messages = `NOTICE
  21932. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21933. Language: ${this.getLang()}
  21934. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21935. Instruction: Based on the context, follow "Format example", write content.
  21936. # Context
  21937. ## 任务
  21938. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21939. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21940. ## 限制
  21941. - 生成题目禁止重复。
  21942. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21943. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21944. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21945. ## 课程简介
  21946. 课程名字:${_this.courseName}
  21947. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21948. ${sub.length ? '学科:' + sub.join(",") : ''}
  21949. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21950. ## 教案
  21951. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21952. # Format example
  21953. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21954. `
  21955. }
  21956. let parm = {
  21957. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21958. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21959. session_name: uuidv4(),
  21960. userId: this.userid,
  21961. file_ids: fileid.length ? [...fileid] : '',
  21962. model: 'gpt-4o-2024-11-20',
  21963. temperature: this.mode == 3 ? 0.5 : 0.1,
  21964. }
  21965. this.ajax
  21966. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21967. .then((response) => {
  21968. console.log(response);
  21969. let data = response.data.FunctionResponse
  21970. if (data.message) {
  21971. console.log(data.message);
  21972. try {
  21973. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21974. let tArray = {}
  21975. try {
  21976. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21977. } catch (error) {
  21978. console.log("error_________________" + error);
  21979. try {
  21980. let regex = new RegExp(/```json([\s\S]*?)```/);
  21981. let match = data.message.match(regex);
  21982. tArray = JSON.parse(match[1]);
  21983. // var message = data.message;
  21984. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21985. // var jsonEnd = message.indexOf("```", jsonStart);
  21986. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21987. // tArray = JSON.parse(jsonString);
  21988. } catch (error) {
  21989. try {
  21990. let regex = new RegExp(/```json([\s\S]*?)```/);
  21991. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21992. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21993. // eval("var aaa = " + match[0])
  21994. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21995. } catch (error) {
  21996. console.log("error_________________" + error);
  21997. }
  21998. console.log("error_________________" + error);
  21999. }
  22000. }
  22001. if(type == 45){
  22002. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  22003. }
  22004. } catch (error) {
  22005. if(type == 15){
  22006. {answerQ: _this.lang.ssTopic}
  22007. }else if(type == 45){
  22008. 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"}]
  22009. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22010. }
  22011. _this.choiceLoading = false
  22012. }
  22013. }else if(type == 15){
  22014. {answerQ: _this.lang.ssTopic}
  22015. }else if(type == 45){
  22016. 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"}]
  22017. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22018. }
  22019. _this.choiceLoading = false
  22020. }).catch((error) => {
  22021. if(type == 15){
  22022. {answerQ: _this.lang.ssTopic}
  22023. }else if(type == 45){
  22024. 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"}]
  22025. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  22026. }
  22027. console.log(error);
  22028. _this.choiceLoading = false
  22029. });
  22030. },
  22031. async aiGet4(messages, callback, clickType) {
  22032. let _this = this
  22033. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22034. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22035. if (_this.infoData.length) {
  22036. for (var i = 0; i < _this.infoData.length; i++) {
  22037. if(_this.infoData[i].fileid){
  22038. fileid.push(_this.infoData[i].fileid)
  22039. }else {
  22040. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22041. if(_fileid){
  22042. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22043. _this.$forceUpdate();
  22044. if(_fileid != 1){
  22045. fileid.push(_fileid)
  22046. }
  22047. }
  22048. }
  22049. }
  22050. }
  22051. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  22052. if(_this.cankaoInfoData[i].fileid){
  22053. fileid.push(_this.cankaoInfoData[i].fileid)
  22054. }else {
  22055. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  22056. if(_fileid){
  22057. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22058. _this.$forceUpdate();
  22059. if(_fileid != 1){
  22060. fileid.push(_fileid)
  22061. }
  22062. }
  22063. }
  22064. }
  22065. // let params = JSON.stringify({
  22066. // // "model": "Chat",
  22067. // model: 'gpt-3.5-turbo',
  22068. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22069. // max_tokens: 4096,
  22070. // top_p: 1,
  22071. // frequency_penalty: 0,
  22072. // presence_penalty: 0,
  22073. // messages: [{
  22074. // content: messages,
  22075. // role: 'user'
  22076. // }],
  22077. // stream: false,
  22078. // uid: this.userid,
  22079. // mind_map_question: "",
  22080. // })
  22081. // // let params = JSON.stringify({
  22082. // // message: {
  22083. // // anthropic_version: "bedrock-2023-05-31",
  22084. // // max_tokens: 4096,
  22085. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  22086. // // top_p: 1,
  22087. // // messages: [{
  22088. // // content: messages,
  22089. // // role: 'user'
  22090. // // }], //
  22091. // // },
  22092. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22093. // // });
  22094. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22095. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22096. // console.log(response);
  22097. // let data = response.data.FunctionResponse
  22098. // if (data.choices && data.choices.length && data.choices[0].message) {
  22099. // console.log(data.choices[0].message.content);
  22100. // let dArray = JSON.parse(data.choices[0].message.content)
  22101. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  22102. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  22103. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22104. // for (var i = 0; i < dArray.length; i++) {
  22105. // let _task = dArray[i]
  22106. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22107. // task: _task.task,
  22108. // taskDetail: "",
  22109. // taskDetail2: "",
  22110. // taskDetail3: _task.detail,
  22111. // chapterData: [],
  22112. // toolText: "",
  22113. // toolChoose: [
  22114. // {
  22115. // tool: [],
  22116. // toolDetail: "",
  22117. // toolType: 0,
  22118. // askCount: 1,
  22119. // askTitle: "",
  22120. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22121. // },
  22122. // ],
  22123. // isShowTools: false,
  22124. // askCount: 1,
  22125. // isFold: 0,
  22126. // askTitle: "",
  22127. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22128. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22129. // homeworkList: [],
  22130. // })
  22131. // }
  22132. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22133. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22134. // _this.$forceUpdate();
  22135. // } else {
  22136. // for (var i = 0; i < dArray.length; i++) {
  22137. // let _task = dArray[i]
  22138. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22139. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22140. // }else {
  22141. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22142. // task: _task.task,
  22143. // taskDetail: "",
  22144. // taskDetail2: "",
  22145. // taskDetail3: _task.detail,
  22146. // chapterData: [],
  22147. // toolText: "",
  22148. // toolChoose: [
  22149. // {
  22150. // tool: [],
  22151. // toolDetail: "",
  22152. // toolType: 0,
  22153. // askCount: 1,
  22154. // askTitle: "",
  22155. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22156. // },
  22157. // ],
  22158. // isShowTools: false,
  22159. // askCount: 1,
  22160. // isFold: 0,
  22161. // askTitle: "",
  22162. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22163. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22164. // homeworkList: [],
  22165. // }
  22166. // }
  22167. // }
  22168. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22169. // _this.$forceUpdate();
  22170. // }
  22171. // }
  22172. // // if (data.result) {
  22173. // // console.log(data.result);
  22174. // // let dArray = JSON.parse(data.result)
  22175. // // _this.teacherText = JSON.parse(data.result)
  22176. // // for (var i = 0; i < dArray.length; i++) {
  22177. // // let _task = dArray[i]
  22178. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22179. // // }
  22180. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22181. // // _this.$forceUpdate();
  22182. // // }
  22183. // callback ? callback() : ''
  22184. // _this.loading = false
  22185. // }).catch(function (error) {
  22186. // _this.loading = false
  22187. // console.log(error);
  22188. // });
  22189. let parm = {
  22190. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22191. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22192. session_name: uuidv4(),
  22193. userId: this.userid,
  22194. file_ids: fileid.length ? [...fileid] : '',
  22195. model: 'gpt-4o-2024-11-20',
  22196. temperature: this.mode == 3 ? 0.5 : 0.1,
  22197. }
  22198. this.ajax
  22199. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22200. .then((response) => {
  22201. console.log(response);
  22202. let data = response.data.FunctionResponse
  22203. if (data.message) {
  22204. console.log(data.message);
  22205. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22206. let dArray = []
  22207. try {
  22208. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22209. } catch (error) {
  22210. console.log("error_________________" + error);
  22211. try {
  22212. let regex = new RegExp(/```json([\s\S]*?)```/);
  22213. let match = data.message.match(regex);
  22214. dArray = JSON.parse(match[1]);
  22215. // var message = data.message;
  22216. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22217. // var jsonEnd = message.indexOf("```", jsonStart);
  22218. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  22219. // dArray = JSON.parse(jsonString);
  22220. } catch (error) {
  22221. _this.aiGet4(messages, callback)
  22222. _this.$message.error(this.lang.ssNetWave)
  22223. console.log("error_________________" + error);
  22224. return;
  22225. console.log("error_________________" + error);
  22226. _this.loading = false
  22227. }
  22228. }
  22229. try {
  22230. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22231. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22232. if(_this.panTeacher() > 0){
  22233. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22234. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22235. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22236. }
  22237. for (var i = 0; i < dArray.length; i++) {
  22238. let _task = dArray[i]
  22239. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22240. _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(':','')
  22241. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22242. }else {
  22243. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22244. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22245. taskDetail: "",
  22246. taskDetail2: "",
  22247. taskDetail3: _task.detail,
  22248. chapterData: [],
  22249. toolText: "",
  22250. toolChoose: [
  22251. {
  22252. tool: [],
  22253. toolDetail: "",
  22254. toolType: 0,
  22255. askCount: 1,
  22256. askTitle: "",
  22257. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22258. },
  22259. ],
  22260. isShowTools: false,
  22261. askCount: 1,
  22262. isFold: 0,
  22263. askTitle: "",
  22264. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22265. checkJson: [{ checkCount: [], checkPerent: [] }],
  22266. homeworkList: [],
  22267. })
  22268. }
  22269. }
  22270. }else {
  22271. _this.unitJson[0].chapterInfo[0].taskJson = []
  22272. for (var i = 0; i < dArray.length; i++) {
  22273. let _task = dArray[i]
  22274. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22275. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22276. taskDetail: "",
  22277. taskDetail2: "",
  22278. taskDetail3: _task.detail,
  22279. chapterData: [],
  22280. toolText: "",
  22281. toolChoose: [
  22282. {
  22283. tool: [],
  22284. toolDetail: "",
  22285. toolType: 0,
  22286. askCount: 1,
  22287. askTitle: "",
  22288. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22289. },
  22290. ],
  22291. isShowTools: false,
  22292. askCount: 1,
  22293. isFold: 0,
  22294. askTitle: "",
  22295. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22296. checkJson: [{ checkCount: [], checkPerent: [] }],
  22297. homeworkList: [],
  22298. })
  22299. }
  22300. }
  22301. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22302. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22303. _this.$forceUpdate();
  22304. } else {
  22305. for (var i = 0; i < dArray.length; i++) {
  22306. let _task = dArray[i]
  22307. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22308. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22309. }else {
  22310. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22311. task: _task.task.replaceAll(_this.lang.ssTask+(i+1),'').replaceAll(_this.lang.ssTask+_this.numberToChinese(i+1),'').replaceAll(_this.lang.ssColon,'').replaceAll(':',''),
  22312. taskDetail: "",
  22313. taskDetail2: "",
  22314. taskDetail3: _task.detail,
  22315. chapterData: [],
  22316. toolText: "",
  22317. toolChoose: [
  22318. {
  22319. tool: [],
  22320. toolDetail: "",
  22321. toolType: 0,
  22322. askCount: 1,
  22323. askTitle: "",
  22324. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22325. },
  22326. ],
  22327. isShowTools: false,
  22328. askCount: 1,
  22329. isFold: 0,
  22330. askTitle: "",
  22331. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22332. checkJson: [{ checkCount: [], checkPerent: [] }],
  22333. homeworkList: [],
  22334. }
  22335. }
  22336. }
  22337. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22338. _this.$forceUpdate();
  22339. }
  22340. } catch (error) {
  22341. _this.$message.error(this.lang.ssNetWave)
  22342. _this.aiGet4(messages, callback)
  22343. console.log("error_________________" + error);
  22344. return;
  22345. // _this.loading = false
  22346. }
  22347. }
  22348. callback ? callback() : ''
  22349. })
  22350. .catch((error) => {
  22351. _this.loading = false
  22352. console.log(error);
  22353. });
  22354. },
  22355. async aiDetail(msg, index) {
  22356. let _this = this
  22357. const _tindex = 'task-' + index
  22358. const _tindex2 = index
  22359. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22360. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22361. if (_this.infoData.length) {
  22362. for (var i = 0; i < _this.infoData.length; i++) {
  22363. if(_this.infoData[i].fileid){
  22364. fileid.push(_this.infoData[i].fileid)
  22365. }else {
  22366. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22367. if(_fileid){
  22368. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22369. _this.$forceUpdate();
  22370. if(_fileid != 1){
  22371. fileid.push(_fileid)
  22372. }
  22373. }
  22374. }
  22375. }
  22376. }
  22377. let url = []
  22378. if (this.infoData.length) {
  22379. for (var i = 0; i < this.infoData.length; i++) {
  22380. url.push(this.infoData[i].url)
  22381. }
  22382. }
  22383. let messages = `NOTICE
  22384. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22385. Language: ${this.getLang()}
  22386. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22387. Instruction: Based on the context, follow "Format example", write content.
  22388. #Context
  22389. ## 要求
  22390. ${msg}
  22391. ## 参考信息
  22392. 任务名称:${_this.aiCallBack.task}
  22393. ## 优化内容
  22394. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22395. // -------- #补充参考资料和
  22396. // ## 补充参考资料
  22397. // - 补充资料:${url.join(",")}
  22398. // - 补充描述:${_this.courseText2}
  22399. _this.taskDetailLoading.push(_tindex)
  22400. _this.ttaskDetailLoading.push(_tindex)
  22401. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22402. let _uuid = uuidv4();
  22403. // let params = JSON.stringify({
  22404. // // "model": "Chat",
  22405. // model: 'gpt-3.5-turbo',
  22406. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22407. // max_tokens: 4096,
  22408. // top_p: 1,
  22409. // frequency_penalty: 0,
  22410. // presence_penalty: 0,
  22411. // messages: [{
  22412. // content: messages,
  22413. // role: 'user'
  22414. // }],
  22415. // uid: _uuid,
  22416. // mind_map_question: "",
  22417. // })
  22418. let params = {
  22419. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22420. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22421. session_name: _uuid,
  22422. userId: _this.userid,
  22423. uid: _uuid,
  22424. file_ids: fileid.length ? [...fileid] : '',
  22425. model: 'gpt-4o-2024-11-20',
  22426. temperature: this.mode == 3 ? 0.5 : 0.1,
  22427. }
  22428. // let params = JSON.stringify({
  22429. // message: {
  22430. // anthropic_version: "bedrock-2023-05-31",
  22431. // max_tokens: 4096,
  22432. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22433. // top_p: 1,
  22434. // messages: [{
  22435. // "role": "user",
  22436. // "content": messages
  22437. // }] ,
  22438. // },
  22439. // uid: _uuid,
  22440. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22441. // });
  22442. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22443. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22444. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22445. console.log(response);
  22446. // let data = response.data.FunctionResponse
  22447. // if (data.choices && data.choices.length && data.choices[0].message) {
  22448. // console.log(data.choices[0].message.content);
  22449. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22450. // _this.$forceUpdate()
  22451. // }
  22452. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22453. } else {
  22454. _this.$message.warning(response.data.FunctionResponse.result);
  22455. }
  22456. _this.isOutlineTaskCancelToken[index] = null
  22457. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22458. }).catch(function (error) {
  22459. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22460. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22461. _this.isOutlineTaskCancelToken[index] = null
  22462. if(error && error.message != 'Request canceled by the user.'){
  22463. _this.$message.error(this.lang.ssTooManyReq)
  22464. }
  22465. console.log(error);
  22466. });
  22467. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22468. },
  22469. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22470. try {
  22471. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22472. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22473. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22474. } catch(error){
  22475. console.log('EventSource error:', error);
  22476. this.$message.error(this.lang.ssTooManyReq)
  22477. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22478. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22479. this.isOutlineTaskCancelToken[_tindex2] = null
  22480. return;
  22481. }
  22482. let _allText = "";
  22483. let _mdText = "";
  22484. let _iindex = 0
  22485. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22486. let _eData = JSON.parse(_e.data).content;
  22487. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22488. //对话已经完成
  22489. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22490. this.isOutlineTaskCancelSource[_tindex2].close();
  22491. this.isOutlineTaskCancelSource[_tindex2] = null;
  22492. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22493. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22494. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22495. this.isOutlineTaskCancelToken[_tindex2] = null
  22496. return;
  22497. } else {
  22498. _iindex++
  22499. //对话还在继续
  22500. let _text = "";
  22501. _text = _eData.replaceAll("'", "");
  22502. if (_allText == "") {
  22503. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22504. } else {
  22505. _allText += _text;
  22506. }
  22507. _mdText = _allText + "_";
  22508. _mdText = _mdText.replace(/\\n/g, "\n");
  22509. _mdText = _mdText.replace(/\\/g, "");
  22510. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22511. //转化返回的回复流数据.
  22512. if(_iindex == 10){
  22513. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22514. _iindex = 0
  22515. }
  22516. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22517. // 处理流数据
  22518. }
  22519. // this.$forceUpdate();
  22520. };
  22521. let _this = this
  22522. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22523. // 处理错误,可以尝试重新连接
  22524. console.log('EventSource error:', event);
  22525. _this.$message.error(this.lang.ssTooManyReq)
  22526. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22527. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22528. _this.isOutlineTaskCancelToken[_tindex2] = null
  22529. _this.isOutlineTaskCancelSource[_tindex2].close();
  22530. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22531. };
  22532. },
  22533. async aiOutlineDetail(msg, index) {
  22534. let _this = this
  22535. const _tindex = 'task-' + index
  22536. const _tindex2 = index
  22537. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22538. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22539. if (_this.infoData.length) {
  22540. for (var i = 0; i < _this.infoData.length; i++) {
  22541. if(_this.infoData[i].fileid){
  22542. fileid.push(_this.infoData[i].fileid)
  22543. }else {
  22544. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22545. if(_fileid){
  22546. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22547. _this.$forceUpdate();
  22548. if(_fileid != 1){
  22549. fileid.push(_fileid)
  22550. }
  22551. }
  22552. }
  22553. }
  22554. }
  22555. let url = []
  22556. if (this.infoData.length) {
  22557. for (var i = 0; i < this.infoData.length; i++) {
  22558. url.push(this.infoData[i].url)
  22559. }
  22560. }
  22561. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22562. let messages = `NOTICE
  22563. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22564. Language: ${this.getLang()}
  22565. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22566. Instruction: Based on the context, follow "Format example", write content.
  22567. #Context
  22568. ## 要求
  22569. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22570. ## 参考信息
  22571. 课程名字:${_this.courseName}
  22572. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22573. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22574. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22575. # Format example
  22576. 子任务名称:名称应该总结了该任务是在做什么,
  22577. 子任务设计:任务设计。
  22578. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22579. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22580. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22581. `
  22582. // 教学目标:教学目标。
  22583. // 任务设计:任务设计。
  22584. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22585. // -------- #补充参考资料和
  22586. // ## 补充参考资料
  22587. // - 补充资料:${url.join(",")}
  22588. // - 补充描述:${_this.courseText2}
  22589. _this.taskDetailLoading.push(_tindex)
  22590. _this.ttaskDetailLoading.push(_tindex)
  22591. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22592. let _uuid = uuidv4();
  22593. // let params = JSON.stringify({
  22594. // // "model": "Chat",
  22595. // model: 'gpt-3.5-turbo',
  22596. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22597. // max_tokens: 4096,
  22598. // top_p: 1,
  22599. // frequency_penalty: 0,
  22600. // presence_penalty: 0,
  22601. // messages: [{
  22602. // content: messages,
  22603. // role: 'user'
  22604. // }],
  22605. // uid: _uuid,
  22606. // mind_map_question: "",
  22607. // })
  22608. let params = {
  22609. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22610. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22611. session_name: _uuid,
  22612. userId: _this.userid,
  22613. uid: _uuid,
  22614. file_ids: fileid.length ? [...fileid] : '',
  22615. model: 'gpt-4o-2024-11-20',
  22616. temperature: this.mode == 3 ? 0.5 : 0.1,
  22617. }
  22618. // let params = JSON.stringify({
  22619. // message: {
  22620. // anthropic_version: "bedrock-2023-05-31",
  22621. // max_tokens: 4096,
  22622. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22623. // top_p: 1,
  22624. // messages: [{
  22625. // "role": "user",
  22626. // "content": messages
  22627. // }] ,
  22628. // },
  22629. // uid: _uuid,
  22630. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22631. // });
  22632. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22633. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22634. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22635. console.log(response);
  22636. // let data = response.data.FunctionResponse
  22637. // if (data.choices && data.choices.length && data.choices[0].message) {
  22638. // console.log(data.choices[0].message.content);
  22639. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22640. // _this.$forceUpdate()
  22641. // }
  22642. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22643. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22644. } else {
  22645. _this.$message.warning(response.data.FunctionResponse.result);
  22646. }
  22647. _this.isOutlineTaskCancelToken[index] = null
  22648. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22649. }).catch(function (error) {
  22650. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22651. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22652. _this.isOutlineTaskCancelToken[index] = null
  22653. if(error && error.message != 'Request canceled by the user.'){
  22654. _this.$message.error(this.lang.ssTooManyReq)
  22655. }
  22656. console.log(error);
  22657. });
  22658. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22659. },
  22660. async aiOutlineDetail2(msg, index) {
  22661. let _this = this
  22662. const _tindex = 'task-' + index
  22663. const _tindex2 = index
  22664. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22665. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22666. if (_this.infoData.length) {
  22667. for (var i = 0; i < _this.infoData.length; i++) {
  22668. if(_this.infoData[i].fileid){
  22669. fileid.push(_this.infoData[i].fileid)
  22670. }else {
  22671. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22672. if(_fileid){
  22673. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22674. _this.$forceUpdate();
  22675. if(_fileid != 1){
  22676. fileid.push(_fileid)
  22677. }
  22678. }
  22679. }
  22680. }
  22681. }
  22682. let url = []
  22683. if (this.infoData.length) {
  22684. for (var i = 0; i < this.infoData.length; i++) {
  22685. url.push(this.infoData[i].url)
  22686. }
  22687. }
  22688. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22689. let taskArray = []
  22690. let taskArrayD = []
  22691. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22692. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22693. if(k != index){
  22694. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22695. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22696. }
  22697. }
  22698. let messages = `NOTICE
  22699. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22700. Language: ${this.getLang()}
  22701. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22702. Instruction: Based on the context, follow "Format example", write content.
  22703. #Context
  22704. ## 要求
  22705. ${msg}
  22706. ## 参考信息
  22707. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22708. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22709. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22710. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22711. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22712. # Format example
  22713. **子任务标题**:环节+子任务名称
  22714. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22715. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22716. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22717. `
  22718. // 教学目标:教学目标。
  22719. // 任务设计:任务设计。
  22720. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22721. // -------- #补充参考资料和
  22722. // ## 补充参考资料
  22723. // - 补充资料:${url.join(",")}
  22724. // - 补充描述:${_this.courseText2}
  22725. _this.taskDetailLoading.push(_tindex)
  22726. _this.ttaskDetailLoading.push(_tindex)
  22727. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22728. let _uuid = uuidv4();
  22729. // let params = JSON.stringify({
  22730. // // "model": "Chat",
  22731. // model: 'gpt-3.5-turbo',
  22732. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22733. // max_tokens: 4096,
  22734. // top_p: 1,
  22735. // frequency_penalty: 0,
  22736. // presence_penalty: 0,
  22737. // messages: [{
  22738. // content: messages,
  22739. // role: 'user'
  22740. // }],
  22741. // uid: _uuid,
  22742. // mind_map_question: "",
  22743. // })
  22744. let params = {
  22745. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22746. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22747. session_name: _uuid,
  22748. userId: _this.userid,
  22749. uid: _uuid,
  22750. file_ids: fileid.length ? [...fileid] : '',
  22751. model: 'gpt-4o-2024-11-20',
  22752. temperature: this.mode == 3 ? 0.5 : 0.1,
  22753. }
  22754. // let params = JSON.stringify({
  22755. // message: {
  22756. // anthropic_version: "bedrock-2023-05-31",
  22757. // max_tokens: 4096,
  22758. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22759. // top_p: 1,
  22760. // messages: [{
  22761. // "role": "user",
  22762. // "content": messages
  22763. // }] ,
  22764. // },
  22765. // uid: _uuid,
  22766. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22767. // });
  22768. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22769. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22770. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22771. console.log(response);
  22772. // let data = response.data.FunctionResponse
  22773. // if (data.choices && data.choices.length && data.choices[0].message) {
  22774. // console.log(data.choices[0].message.content);
  22775. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22776. // _this.$forceUpdate()
  22777. // }
  22778. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22779. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22780. } else {
  22781. _this.$message.warning(response.data.FunctionResponse.result);
  22782. }
  22783. _this.isOutlineTaskCancelToken[index] = null
  22784. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22785. }).catch(function (error) {
  22786. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22787. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22788. _this.isOutlineTaskCancelToken[index] = null
  22789. if(error && error.message != 'Request canceled by the user.'){
  22790. _this.$message.error(this.lang.ssTooManyReq)
  22791. }
  22792. console.log(error);
  22793. });
  22794. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22795. },
  22796. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22797. try {
  22798. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22799. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22800. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22801. } catch(error) {
  22802. console.log('EventSource error:', error);
  22803. this.$message.error(this.lang.ssTooManyReq)
  22804. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22805. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22806. this.isOutlineTaskCancelToken[_tindex2] = null
  22807. return;
  22808. }
  22809. let _allText = "";
  22810. let _mdText = "";
  22811. let _iindex = 0
  22812. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22813. let _eData = JSON.parse(_e.data).content;
  22814. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22815. //对话已经完成
  22816. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22817. this.isOutlineTaskCancelSource[_tindex2].close();
  22818. this.isOutlineTaskCancelSource[_tindex2] = null;
  22819. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22820. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22821. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22822. }
  22823. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22824. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22825. this.isOutlineTaskCancelToken[_tindex2] = null
  22826. return;
  22827. } else {
  22828. _iindex++
  22829. //对话还在继续
  22830. let _text = "";
  22831. _text = _eData.replaceAll("'", "");
  22832. if (_allText == "") {
  22833. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22834. } else {
  22835. _allText += _text;
  22836. }
  22837. _mdText = _allText + "_";
  22838. _mdText = _mdText.replace(/\\n/g, "\n");
  22839. _mdText = _mdText.replace(/\\/g, "");
  22840. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22841. //转化返回的回复流数据.
  22842. if(_iindex == 10){
  22843. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22844. _iindex = 0
  22845. }
  22846. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22847. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22848. }
  22849. // 处理流数据
  22850. }
  22851. // this.$forceUpdate();
  22852. };
  22853. let _this = this
  22854. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22855. // 处理错误,可以尝试重新连接
  22856. console.log('EventSource error:', event);
  22857. _this.$message.error(this.lang.ssTooManyReq)
  22858. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22859. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22860. _this.isOutlineTaskCancelToken[_tindex2] = null
  22861. _this.isOutlineTaskCancelSource[_tindex2].close();
  22862. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22863. };
  22864. },
  22865. async aiDetail2(msg, index) {
  22866. let _this = this
  22867. const _tindex = 'task-' + index
  22868. const _tindex2 = index
  22869. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22870. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22871. if (_this.infoData.length) {
  22872. for (var i = 0; i < _this.infoData.length; i++) {
  22873. if(_this.infoData[i].fileid){
  22874. fileid.push(_this.infoData[i].fileid)
  22875. }else {
  22876. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22877. if(_fileid){
  22878. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22879. _this.$forceUpdate();
  22880. if(_fileid != 1){
  22881. fileid.push(_fileid)
  22882. }
  22883. }
  22884. }
  22885. }
  22886. }
  22887. let messages = `NOTICE
  22888. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22889. Language: ${this.getLang()}
  22890. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22891. Instruction: Based on the context, follow "Format example", write content.
  22892. #Context
  22893. ## 要求
  22894. ${msg}
  22895. ## 参考资料
  22896. 任务名字: ${_this.aiCallBack.task}
  22897. ## 优化信息
  22898. ${_this.aiCallBack.taskDetail}
  22899. # Format example
  22900. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22901. _this.taskDetailLoading2.push(_tindex)
  22902. _this.ttaskDetailLoading2.push(_tindex)
  22903. let _uuid = uuidv4();
  22904. // let params = JSON.stringify({
  22905. // // "model": "Chat",
  22906. // model: 'gpt-3.5-turbo',
  22907. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22908. // max_tokens: 4096,
  22909. // top_p: 1,
  22910. // frequency_penalty: 0,
  22911. // presence_penalty: 0,
  22912. // messages: [{
  22913. // content: messages,
  22914. // role: 'user'
  22915. // }],
  22916. // uid: _uuid,
  22917. // mind_map_question: "",
  22918. // })
  22919. let params = {
  22920. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22921. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22922. session_name: _uuid,
  22923. userId: _this.userid,
  22924. uid: _uuid,
  22925. file_ids: fileid.length ? [...fileid] : '',
  22926. model: 'gpt-4o-2024-11-20',
  22927. temperature: this.mode == 3 ? 0.5 : 0.1,
  22928. }
  22929. // let params = JSON.stringify({
  22930. // message: {
  22931. // anthropic_version: "bedrock-2023-05-31",
  22932. // max_tokens: 4096,
  22933. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22934. // top_p: 1,
  22935. // messages: [{
  22936. // "role": "user",
  22937. // "content": messages
  22938. // }] ,
  22939. // },
  22940. // uid: _uuid,
  22941. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22942. // });
  22943. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22944. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22945. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22946. console.log(response);
  22947. // let data = response.data.FunctionResponse
  22948. // if (data.choices && data.choices.length && data.choices[0].message) {
  22949. // console.log(data.choices[0].message.content);
  22950. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22951. // _this.$forceUpdate()
  22952. // }
  22953. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22954. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22955. } else {
  22956. _this.$message.warning(response.data.FunctionResponse.result);
  22957. }
  22958. }).catch(function (error) {
  22959. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22960. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22961. if(error && error.message != 'Request canceled by the user.'){
  22962. _this.$message.error(this.lang.ssTooManyReq)
  22963. }
  22964. console.log(error);
  22965. });
  22966. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22967. },
  22968. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22969. let _source;
  22970. try {
  22971. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22972. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22973. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22974. } catch(error) {
  22975. console.log('EventSource error:', error);
  22976. this.$message.error(this.lang.ssTooManyReq)
  22977. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22978. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22979. return;
  22980. }
  22981. let _allText = "";
  22982. let _mdText = "";
  22983. let _iindex = 0
  22984. _source.onmessage = _e => {
  22985. let _eData = JSON.parse(_e.data).content;
  22986. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22987. //对话已经完成
  22988. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22989. _source.close();
  22990. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22991. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22992. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22993. return;
  22994. } else {
  22995. _iindex++
  22996. //对话还在继续
  22997. let _text = "";
  22998. _text = _eData.replaceAll("'", "");
  22999. if (_allText == "") {
  23000. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23001. } else {
  23002. _allText += _text;
  23003. }
  23004. _mdText = _allText + "_";
  23005. _mdText = _mdText.replace(/\\n/g, "\n");
  23006. _mdText = _mdText.replace(/\\/g, "");
  23007. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23008. //转化返回的回复流数据
  23009. if(_iindex == 10){
  23010. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  23011. _iindex = 0
  23012. }
  23013. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  23014. // 处理流数据
  23015. }
  23016. // this.$forceUpdate();
  23017. };
  23018. let _this = this
  23019. _source.onerror = function(event) {
  23020. // 处理错误,可以尝试重新连接
  23021. console.log('EventSource error:', event);
  23022. _this.$message.error(this.lang.ssTooManyReq)
  23023. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  23024. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  23025. _source.close();
  23026. };
  23027. },
  23028. async aiDetail3(msg, index, tindex) {
  23029. let _this = this
  23030. const _tindex = 'task-' + index + tindex
  23031. const _tindex2 = index
  23032. const _tindex3 = tindex
  23033. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23034. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23035. if (_this.infoData.length) {
  23036. for (var i = 0; i < _this.infoData.length; i++) {
  23037. if(_this.infoData[i].fileid){
  23038. fileid.push(_this.infoData[i].fileid)
  23039. }else {
  23040. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23041. if(_fileid){
  23042. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23043. _this.$forceUpdate();
  23044. if(_fileid != 1){
  23045. fileid.push(_fileid)
  23046. }
  23047. }
  23048. }
  23049. }
  23050. }
  23051. let tool = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]
  23052. let appJson = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].appJson
  23053. // **重点考虑该任务及工具名和工具内容的情况下*
  23054. let messages = `NOTICE
  23055. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  23056. Language: ${this.getLang()}
  23057. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23058. Instruction: Based on the context, follow "Format example", write content.
  23059. #Context
  23060. ## 参考内容
  23061. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23062. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23063. 工具名称:${_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 : '无'}
  23064. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  23065. ${tool == 72 && appJson && appJson.name && `应用名称:${appJson.name}`}
  23066. ${tool == 72 && appJson && appJson.detail && `应用描述:${appJson.detail}`}
  23067. ## 要求
  23068. ${msg} 输出格式和内容要求参考#格式与要求
  23069. # Format example
  23070. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  23071. _this.taskDetailLoading3.push(_tindex)
  23072. _this.ttaskDetailLoading3.push(_tindex)
  23073. let _uuid = uuidv4();
  23074. // let params = JSON.stringify({
  23075. // // "model": "Chat",
  23076. // model: 'gpt-3.5-turbo',
  23077. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23078. // max_tokens: 4096,
  23079. // top_p: 1,
  23080. // frequency_penalty: 0,
  23081. // presence_penalty: 0,
  23082. // messages: [{
  23083. // content: messages,
  23084. // role: 'user'
  23085. // }],
  23086. // uid: _uuid,
  23087. // mind_map_question: "",
  23088. // })
  23089. let params = {
  23090. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23091. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23092. session_name: _uuid,
  23093. userId: _this.userid,
  23094. uid: _uuid,
  23095. file_ids: fileid.length ? [...fileid] : '',
  23096. model: 'gpt-4o-2024-11-20',
  23097. temperature: this.mode == 3 ? 0.5 : 0.1,
  23098. }
  23099. // let params = JSON.stringify({
  23100. // message: {
  23101. // anthropic_version: "bedrock-2023-05-31",
  23102. // max_tokens: 4096,
  23103. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23104. // top_p: 1,
  23105. // messages: [{
  23106. // "role": "user",
  23107. // "content": messages
  23108. // }] ,
  23109. // },
  23110. // uid: _uuid,
  23111. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23112. // });
  23113. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23114. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23115. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23116. console.log(response);
  23117. let data = response.data.FunctionResponse
  23118. // if (data.choices && data.choices.length && data.choices[0].message) {
  23119. // console.log(data.choices[0].message.content);
  23120. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  23121. // _this.$forceUpdate()
  23122. // }
  23123. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23124. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23125. } else {
  23126. _this.$message.warning(response.data.FunctionResponse.result);
  23127. }
  23128. }).catch(function (error) {
  23129. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23130. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  23131. if(error && error.message != 'Request canceled by the user.'){
  23132. _this.$message.error(this.lang.ssTooManyReq)
  23133. }
  23134. console.log(error);
  23135. });
  23136. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  23137. },
  23138. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  23139. let _source;
  23140. try {
  23141. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23142. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23143. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23144. } catch(error) {
  23145. console.log('EventSource error:', event);
  23146. this.$message.error(this.lang.ssTooManyReq)
  23147. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23148. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23149. return;
  23150. }
  23151. let _allText = "";
  23152. let _mdText = "";
  23153. let _iindex = 0
  23154. _source.onmessage = _e => {
  23155. let _eData = JSON.parse(_e.data).content;
  23156. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23157. //对话已经完成
  23158. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23159. _source.close();
  23160. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23161. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23162. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23163. return;
  23164. } else {
  23165. _iindex++
  23166. //对话还在继续
  23167. let _text = "";
  23168. _text = _eData.replaceAll("'", "");
  23169. if (_allText == "") {
  23170. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23171. } else {
  23172. _allText += _text;
  23173. }
  23174. _mdText = _allText + "_";
  23175. _mdText = _mdText.replace(/\\n/g, "\n");
  23176. _mdText = _mdText.replace(/\\/g, "");
  23177. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23178. //转化返回的回复流数据
  23179. if(_iindex == 10){
  23180. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23181. _iindex = 0
  23182. }
  23183. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23184. // 处理流数据
  23185. }
  23186. // this.$forceUpdate();
  23187. };
  23188. let _this = this
  23189. _source.onerror = function(event) {
  23190. // 处理错误,可以尝试重新连接
  23191. console.log('EventSource error:', event);
  23192. _this.$message.error(this.lang.ssTooManyReq)
  23193. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  23194. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  23195. _source.close();
  23196. };
  23197. },
  23198. async aiDetail4(msg, index) {
  23199. if (!msg.length) {
  23200. this.$message.error(this.lang.ssAddEvaOpt)
  23201. return
  23202. }
  23203. let _this = this
  23204. const _tindex = 'task-' + index
  23205. const _tindex2 = index
  23206. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23207. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23208. if (_this.infoData.length) {
  23209. for (var i = 0; i < _this.infoData.length; i++) {
  23210. if(_this.infoData[i].fileid){
  23211. fileid.push(_this.infoData[i].fileid)
  23212. }else {
  23213. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23214. if(_fileid){
  23215. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23216. _this.$forceUpdate();
  23217. if(_fileid != 1){
  23218. fileid.push(_fileid)
  23219. }
  23220. }
  23221. }
  23222. }
  23223. }
  23224. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  23225. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  23226. if(_this.pingjiaInfoData[index][i].fileid){
  23227. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  23228. }
  23229. }
  23230. }
  23231. var _text = ""
  23232. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23233. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23234. // _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 : ''} `
  23235. _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 : ''} `
  23236. }
  23237. }
  23238. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23239. // **重点考虑该任务详情**
  23240. // let messages = `
  23241. // Language: ${this.getLang()}
  23242. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23243. // #Context
  23244. // ## 参考内容
  23245. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23246. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23247. // 评价设计:${_text}
  23248. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23249. // ## 要求
  23250. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23251. // # 格式与要求
  23252. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23253. // # Format example
  23254. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23255. let messages = `
  23256. Language: ${this.getLang()}
  23257. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23258. Instruction: Based on the context, follow "Format example", write content.
  23259. #Context
  23260. ## 参考内容
  23261. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23262. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23263. ${_text ? '评价设计:'+_text : ''}
  23264. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23265. ## 要求
  23266. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23267. # 格式与要求
  23268. 核心素养:从教案中提取
  23269. 目标:从教案中提取
  23270. 评价标准:从教案中提取评价标准
  23271. # Format example
  23272. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23273. _this.taskDetailLoading4.push(_tindex)
  23274. // let params = JSON.stringify({
  23275. // // "model": "Chat",
  23276. // model: 'gpt-3.5-turbo',
  23277. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23278. // max_tokens: 4096,
  23279. // top_p: 1,
  23280. // frequency_penalty: 0,
  23281. // presence_penalty: 0,
  23282. // messages: [{
  23283. // content: messages,
  23284. // role: 'user'
  23285. // }],
  23286. // stream: false,
  23287. // uid: this.userid,
  23288. // mind_map_question: "",
  23289. // })
  23290. let params = {
  23291. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23292. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23293. session_name: uuidv4(),
  23294. userId: _this.userid,
  23295. file_ids: fileid.length ? [...fileid] : '',
  23296. model: 'gpt-4o-2024-11-20',
  23297. temperature: this.mode == 3 ? 0.5 : 0.1,
  23298. }
  23299. // let params = JSON.stringify({
  23300. // message: {
  23301. // anthropic_version: "bedrock-2023-05-31",
  23302. // max_tokens: 4096,
  23303. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23304. // top_p: 1,
  23305. // messages: [{
  23306. // content: messages,
  23307. // role: 'user'
  23308. // }], //
  23309. // },
  23310. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23311. // });
  23312. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23313. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23314. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23315. console.log(response);
  23316. let data = response.data.FunctionResponse
  23317. // if (data.choices && data.choices.length && data.choices[0].message) {
  23318. // console.log(data.choices[0].message.content);
  23319. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23320. // _this.$forceUpdate()
  23321. // }
  23322. if (data.message) {
  23323. console.log(data.message);
  23324. try {
  23325. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23326. } catch (e) {
  23327. console.log("error_________________" + e);
  23328. // _this.$message.error(data.message)
  23329. try {
  23330. let regex = new RegExp(/```json([\s\S]*?)```/);
  23331. let match = data.message.match(regex);
  23332. let elist = JSON.parse(match[1])
  23333. elist = elist.filter(el=>{
  23334. el.isai = 1
  23335. return el
  23336. })
  23337. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23338. // var message = data.message;
  23339. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23340. // var jsonEnd = message.indexOf("```", jsonStart);
  23341. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23342. // var jsonString = message
  23343. // .substring(jsonStart, jsonEnd)
  23344. // .trim();
  23345. // var _data2 = JSON.parse(jsonString);
  23346. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23347. // }
  23348. } catch (error) {
  23349. }
  23350. }
  23351. _this.$forceUpdate()
  23352. }
  23353. // if (data.result) {
  23354. // console.log(data.result);
  23355. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23356. // _this.$forceUpdate()
  23357. // }
  23358. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23359. }).catch(function (error) {
  23360. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23361. if(error && error.message != 'Request canceled by the user.'){
  23362. _this.$message.error(this.lang.ssTooManyReq)
  23363. }
  23364. console.log(error);
  23365. });
  23366. },
  23367. async aiDetail5(msg, index) {
  23368. let _this = this
  23369. const _tindex = 'task-' + index
  23370. const _tindex2 = index
  23371. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23372. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23373. if (_this.infoData.length) {
  23374. for (var i = 0; i < _this.infoData.length; i++) {
  23375. if(_this.infoData[i].fileid){
  23376. fileid.push(_this.infoData[i].fileid)
  23377. }else {
  23378. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23379. if(_fileid){
  23380. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23381. _this.$forceUpdate();
  23382. if(_fileid != 1){
  23383. fileid.push(_fileid)
  23384. }
  23385. }
  23386. }
  23387. }
  23388. }
  23389. let url = []
  23390. if (this.infoData.length) {
  23391. for (var i = 0; i < this.infoData.length; i++) {
  23392. url.push(this.infoData[i].url)
  23393. }
  23394. }
  23395. var _text = ""
  23396. var _text2 = ""
  23397. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23398. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23399. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23400. }
  23401. let messages = `
  23402. Language: ${this.getLang()}
  23403. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23404. Instruction: Based on the context, follow "Format example", write content.
  23405. --------
  23406. ## 要求
  23407. ${msg}
  23408. -------
  23409. ## 本教案描述
  23410. ${_this.aiCallBack}
  23411. -------
  23412. ## 课程大纲
  23413. ${_text}
  23414. -------
  23415. ## 其他教学任务教案
  23416. ${_text2}`
  23417. // ## 补充参考资料
  23418. // - 补充资料:${url.join(",")}
  23419. // - 补充描述:${this.courseText2}
  23420. _this.taskDetailLoading5.push(_tindex)
  23421. _this.ttaskDetailLoading5.push(_tindex)
  23422. let _uuid = uuidv4();
  23423. // let params = JSON.stringify({
  23424. // // "model": "Chat",
  23425. // model: 'gpt-3.5-turbo',
  23426. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23427. // max_tokens: 4096,
  23428. // top_p: 1,
  23429. // frequency_penalty: 0,
  23430. // presence_penalty: 0,
  23431. // messages: [{
  23432. // content: messages,
  23433. // role: 'user'
  23434. // }],
  23435. // uid: _uuid,
  23436. // mind_map_question: "",
  23437. // })
  23438. let params = {
  23439. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23440. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23441. session_name: _uuid,
  23442. userId: _this.userid,
  23443. uid: _uuid,
  23444. file_ids: fileid.length ? [...fileid] : '',
  23445. model: 'gpt-4o-2024-11-20',
  23446. temperature: this.mode == 3 ? 0.5 : 0.1,
  23447. }
  23448. // let params = JSON.stringify({
  23449. // message: {
  23450. // anthropic_version: "bedrock-2023-05-31",
  23451. // max_tokens: 4096,
  23452. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23453. // top_p: 1,
  23454. // messages: [{
  23455. // "role": "user",
  23456. // "content": messages
  23457. // }] ,
  23458. // },
  23459. // uid: _uuid,
  23460. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23461. // });
  23462. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23463. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23464. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23465. console.log(response);
  23466. // let data = response.data.FunctionResponse
  23467. // if (data.choices && data.choices.length && data.choices[0].message) {
  23468. // console.log(data.choices[0].message.content);
  23469. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23470. // _this.$forceUpdate()
  23471. // }
  23472. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23473. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23474. } else {
  23475. _this.$message.warning(response.data.FunctionResponse.result);
  23476. }
  23477. }).catch(function (error) {
  23478. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23479. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23480. }
  23481. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23482. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23483. }
  23484. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23485. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23486. if(error && error.message != 'Request canceled by the user.'){
  23487. _this.$message.error(this.lang.ssTooManyReq)
  23488. }
  23489. console.log(error);
  23490. });
  23491. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23492. },
  23493. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23494. let _source;
  23495. try {
  23496. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23497. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23498. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23499. } catch(error){
  23500. console.log('EventSource error:', error);
  23501. this.$message.error(this.lang.ssTooManyReq)
  23502. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23503. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23504. }
  23505. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23506. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23507. }
  23508. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23509. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23510. return;
  23511. }
  23512. let _allText = "";
  23513. let _mdText = "";
  23514. let _iindex = 0
  23515. _source.onmessage = _e => {
  23516. let _eData = JSON.parse(_e.data).content;
  23517. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23518. //对话已经完成
  23519. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23520. _source.close();
  23521. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23522. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23523. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23524. }
  23525. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23526. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23527. }
  23528. return;
  23529. } else {
  23530. _iindex++
  23531. //对话还在继续
  23532. let _text = "";
  23533. _text = _eData.replaceAll("'", "");
  23534. if (_allText == "") {
  23535. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23536. } else {
  23537. _allText += _text;
  23538. }
  23539. _mdText = _allText + "_";
  23540. _mdText = _mdText.replace(/\\n/g, "\n");
  23541. _mdText = _mdText.replace(/\\/g, "");
  23542. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23543. //转化返回的回复流数据
  23544. if(_iindex == 10){
  23545. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23546. _iindex = 0
  23547. }
  23548. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23549. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23550. }
  23551. // 处理流数据
  23552. }
  23553. // this.$forceUpdate();
  23554. };
  23555. let _this = this
  23556. _source.onerror = function(event) {
  23557. // 处理错误,可以尝试重新连接
  23558. console.log('EventSource error:', event);
  23559. _this.$message.error(this.lang.ssTooManyReq)
  23560. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23561. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23562. }
  23563. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23564. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23565. }
  23566. _source.close();
  23567. };
  23568. },
  23569. async aiDetail52(msg, index, callback) {
  23570. let _this = this
  23571. const _tindex = 'task-' + index
  23572. const _tindex2 = index
  23573. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23574. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23575. if (_this.infoData.length) {
  23576. for (var i = 0; i < _this.infoData.length; i++) {
  23577. if(_this.infoData[i].fileid){
  23578. fileid.push(_this.infoData[i].fileid)
  23579. }else {
  23580. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23581. if(_fileid){
  23582. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23583. _this.$forceUpdate();
  23584. if(_fileid != 1){
  23585. fileid.push(_fileid)
  23586. }
  23587. }
  23588. }
  23589. }
  23590. }
  23591. let url = []
  23592. if (this.infoData.length) {
  23593. for (var i = 0; i < this.infoData.length; i++) {
  23594. url.push(this.infoData[i].url)
  23595. }
  23596. }
  23597. let taskN = []
  23598. let taskD = []
  23599. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23600. if(_tindex2 != ti){
  23601. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23602. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23603. }
  23604. }
  23605. let messages = `NOTICE
  23606. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23607. Language: ${this.getLang()}
  23608. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23609. Instruction: Based on the context, follow "Format example", write content.
  23610. #Context
  23611. ## 要求
  23612. ${msg}
  23613. ## 补充描述
  23614. 课程简要描述:${_this.courseText}
  23615. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23616. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23617. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23618. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23619. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23620. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23621. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23622. `
  23623. // ## 补充参考资料
  23624. // - 补充资料:${url.join(",")}
  23625. // - 补充描述:${this.courseText2}
  23626. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23627. _this.taskDetailLoading5.push(_tindex)
  23628. }
  23629. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23630. _this.ttaskDetailLoading5.push(_tindex)
  23631. }
  23632. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23633. let _uuid = uuidv4();
  23634. // let params = JSON.stringify({
  23635. // // "model": "Chat",
  23636. // model: 'gpt-3.5-turbo',
  23637. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23638. // max_tokens: 4096,
  23639. // top_p: 1,
  23640. // frequency_penalty: 0,
  23641. // presence_penalty: 0,
  23642. // messages: [{
  23643. // content: messages,
  23644. // role: 'user'
  23645. // }],
  23646. // uid: _uuid,
  23647. // mind_map_question: "",
  23648. // })
  23649. let params = {
  23650. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23651. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23652. session_name: _uuid,
  23653. userId: _this.userid,
  23654. uid: _uuid,
  23655. file_ids: fileid.length ? [...fileid] : '',
  23656. model: 'gpt-4o-2024-11-20',
  23657. temperature: this.mode == 3 ? 0.5 : 0.1,
  23658. }
  23659. // let params = JSON.stringify({
  23660. // message: {
  23661. // anthropic_version: "bedrock-2023-05-31",
  23662. // max_tokens: 4096,
  23663. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23664. // top_p: 1,
  23665. // messages: [{
  23666. // "role": "user",
  23667. // "content": messages
  23668. // }] ,
  23669. // },
  23670. // uid: _uuid,
  23671. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23672. // });
  23673. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23674. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23675. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23676. console.log(response);
  23677. // let data = response.data.FunctionResponse
  23678. // if (data.choices && data.choices.length && data.choices[0].message) {
  23679. // console.log(data.choices[0].message.content);
  23680. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23681. // _this.$forceUpdate()
  23682. // }
  23683. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23684. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23685. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23686. } else {
  23687. _this.$message.warning(response.data.FunctionResponse.result);
  23688. }
  23689. _this.isTeacherTaskCancelToken2[index] = null
  23690. }).catch(function (error) {
  23691. if(error && error.message != 'Request canceled by the user.'){
  23692. _this.isTeacherTaskCancelToken2[index] = null
  23693. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23694. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23695. }
  23696. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23697. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23698. }
  23699. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23700. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23701. _this.$message.error(this.lang.ssTooManyReq)
  23702. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23703. confirmButtonText: _this.lang.ssConfirm,
  23704. cancelButtonText: _this.lang.ssCancel,
  23705. distinguishCancelAndClose: true,
  23706. type: "warning",
  23707. customClass: 'custom-confirm-box'
  23708. })
  23709. .then(() => {
  23710. _this.aiDetail52(msg, index, callback)
  23711. }).catch((v) => {
  23712. console.log(v);
  23713. callback ? callback() : ''
  23714. })
  23715. setTimeout(() => {
  23716. _this.setTipsIndex()
  23717. }, 500)
  23718. }
  23719. console.log(error);
  23720. });
  23721. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23722. },
  23723. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23724. try {
  23725. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23726. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23727. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23728. } catch(error) {
  23729. console.log('EventSource error:', error);
  23730. this.$message.error(this.lang.ssTooManyReq)
  23731. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23732. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23733. }
  23734. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23735. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23736. }
  23737. this.isTeacherTaskCancelToken2[_tindex2] = null
  23738. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23739. confirmButtonText: _this.lang.ssConfirm,
  23740. cancelButtonText: _this.lang.ssCancel,
  23741. distinguishCancelAndClose: true,
  23742. type: "warning",
  23743. customClass: 'custom-confirm-box'
  23744. })
  23745. .then(() => {
  23746. _this.aiDetail52(msg, _tindex2, callback)
  23747. }).catch((v) => {
  23748. console.log(v);
  23749. callback ? callback() : ''
  23750. })
  23751. setTimeout(() => {
  23752. _this.setTipsIndex()
  23753. }, 500)
  23754. return;
  23755. }
  23756. let _allText = "";
  23757. let _mdText = "";
  23758. this.allTextArray[_tindex2] = ""
  23759. let _iindex = 0
  23760. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23761. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23762. let _eData = JSON.parse(_e.data).content;
  23763. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23764. //对话已经完成
  23765. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23766. this.isTeacherTaskCancelSource[_tindex2].close();
  23767. this.isTeacherTaskCancelSource[_tindex2] = null;
  23768. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23769. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23770. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23771. }
  23772. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23773. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23774. }
  23775. this.isTeacherTaskCancelToken2[_tindex2] = null
  23776. callback ? callback() : ''
  23777. // this.createTeacherAn(_tindex2, 2);
  23778. this.saveCourse()
  23779. return;
  23780. } else {
  23781. _iindex++
  23782. //对话还在继续
  23783. let _text = "";
  23784. _text = _eData.replaceAll("'", "");
  23785. if (_allText == "") {
  23786. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23787. } else {
  23788. _allText += _text;
  23789. }
  23790. _mdText = _allText + "_";
  23791. _mdText = _mdText.replace(/\\n/g, "\n");
  23792. _mdText = _mdText.replace(/\\/g, "");
  23793. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23794. //转化返回的回复流数据
  23795. if(_iindex == 10){
  23796. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23797. _iindex = 0
  23798. }
  23799. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23800. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23801. }
  23802. // 处理流数据
  23803. }
  23804. };
  23805. let _this = this
  23806. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23807. // 处理错误,可以尝试重新连接
  23808. console.log('EventSource error:', event);
  23809. _this.$message.error(this.lang.ssTooManyReq)
  23810. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23811. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23812. }
  23813. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23814. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23815. }
  23816. _this.isTeacherTaskCancelSource[_tindex2].close();
  23817. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23818. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23819. _this.$confirm(_this.lang.ssPlanGenFail, _this.lang.ssTip, {
  23820. confirmButtonText: _this.lang.ssConfirm,
  23821. cancelButtonText: _this.lang.ssCancel,
  23822. distinguishCancelAndClose: true,
  23823. type: "warning",
  23824. customClass: 'custom-confirm-box'
  23825. })
  23826. .then(() => {
  23827. _this.aiDetail52(msg, _tindex2, callback)
  23828. }).catch((v) => {
  23829. console.log(v);
  23830. callback ? callback() : ''
  23831. })
  23832. setTimeout(() => {
  23833. _this.setTipsIndex()
  23834. }, 500)
  23835. };
  23836. },
  23837. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23838. let _mdText = "";
  23839. let _eData = JSON.parse(_e.data).content;
  23840. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23841. //对话已经完成
  23842. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23843. _source.close();
  23844. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23845. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23846. return;
  23847. } else {
  23848. //对话还在继续
  23849. let _text = "";
  23850. _text = _eData.replaceAll("'", "");
  23851. if (this.allTextArray[_tindex2] == "") {
  23852. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23853. } else {
  23854. this.allTextArray[_tindex2] += _text;
  23855. }
  23856. _mdText = this.allTextArray[_tindex2] + "_";
  23857. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23858. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23859. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23860. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23861. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23862. // 处理流数据
  23863. }
  23864. },
  23865. async aiCpote(msg, callback) {
  23866. let _this = this
  23867. let _index = _this.aitype.replace("aiC","c")
  23868. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23869. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23870. if (_this.infoData.length) {
  23871. for (var i = 0; i < _this.infoData.length; i++) {
  23872. if(_this.infoData[i].fileid){
  23873. fileid.push(_this.infoData[i].fileid)
  23874. }else {
  23875. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23876. if(_fileid){
  23877. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23878. _this.$forceUpdate();
  23879. if(_fileid != 1){
  23880. fileid.push(_fileid)
  23881. }
  23882. }
  23883. }
  23884. }
  23885. }
  23886. let sub = []
  23887. if (this.courseTypeId.length) {
  23888. for (var i = 0; i < this.courseTypeId.length; i++) {
  23889. let _sid = this.courseTypeId[i]
  23890. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23891. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23892. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23893. }
  23894. }
  23895. }
  23896. }
  23897. let mclass = []
  23898. if (this.courseTypeId.length) {
  23899. for (var i = 0; i < this.courseTypeId.length; i++) {
  23900. let _sid = this.courseTypeId[i]
  23901. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23902. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23903. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23904. }
  23905. }
  23906. }
  23907. }
  23908. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23909. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23910. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23911. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23912. let messages = `NOTICE
  23913. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23914. Language: ${this.getLang()}
  23915. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23916. Instruction: Based on the context, follow "Format example", write content.
  23917. ${msg}
  23918. ## 课程简介
  23919. 课程名字:${this.courseName}
  23920. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23921. ${sub.length ? '学科:' + sub.join(",") : ''}
  23922. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23923. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23924. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23925. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23926. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23927. _this.cpoteLoading[_index] = true
  23928. _this.cpotetLoading[_index] = true
  23929. let _uuid = uuidv4();
  23930. // let params = JSON.stringify({
  23931. // // "model": "Chat",
  23932. // model: 'gpt-3.5-turbo',
  23933. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23934. // max_tokens: 4096,
  23935. // top_p: 1,
  23936. // frequency_penalty: 0,
  23937. // presence_penalty: 0,
  23938. // messages: [{
  23939. // content: messages,
  23940. // role: 'user'
  23941. // }],
  23942. // uid: _uuid,
  23943. // mind_map_question: "",
  23944. // })
  23945. let params = {
  23946. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23947. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23948. session_name: _uuid,
  23949. userId: _this.userid,
  23950. uid: _uuid,
  23951. file_ids: fileid.length ? [...fileid] : '',
  23952. model: 'gpt-4o-2024-11-20',
  23953. temperature: this.mode == 3 ? 0.5 : 0.1,
  23954. }
  23955. // let params = JSON.stringify({
  23956. // message: {
  23957. // anthropic_version: "bedrock-2023-05-31",
  23958. // max_tokens: 4096,
  23959. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23960. // top_p: 1,
  23961. // messages: [{
  23962. // "role": "user",
  23963. // "content": messages
  23964. // }] ,
  23965. // },
  23966. // uid: _uuid,
  23967. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23968. // });
  23969. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23970. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23971. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23972. console.log(response);
  23973. // let data = response.data.FunctionResponse
  23974. // if (data.choices && data.choices.length && data.choices[0].message) {
  23975. // console.log(data.choices[0].message.content);
  23976. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23977. // _this.$forceUpdate()
  23978. // }
  23979. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23980. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23981. } else {
  23982. _this.$message.warning(response.data.FunctionResponse.result);
  23983. }
  23984. }).catch(function (error) {
  23985. _this.cpoteLoading[_index] = false
  23986. _this.cpotetLoading[_index] = false
  23987. callback ? callback() : ''
  23988. if(error && error.message != 'Request canceled by the user.'){
  23989. _this.$message.error(this.lang.ssTooManyReq)
  23990. }
  23991. console.log(error);
  23992. });
  23993. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23994. },
  23995. aiCpotegetAiContent(_uid, loading, callback) {
  23996. let _source;
  23997. try {
  23998. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23999. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24000. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24001. } catch(error){
  24002. console.log('EventSource error:', error);
  24003. this.$message.error(this.lang.ssTooManyReq)
  24004. this.cpoteLoading[loading] = false
  24005. this.cpotetLoading[loading] = false
  24006. return;
  24007. }
  24008. let _allText = "";
  24009. let _mdText = "";
  24010. let _iindex = 0
  24011. _source.onmessage = _e => {
  24012. let _eData = JSON.parse(_e.data).content;
  24013. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24014. //对话已经完成
  24015. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24016. _source.close();
  24017. this.cpote[loading] = _mdText;
  24018. this.cpoteLoading[loading] = false
  24019. this.cpotetLoading[loading] = false
  24020. callback ? callback() : ''
  24021. this.saveCourse()
  24022. return;
  24023. } else {
  24024. _iindex++
  24025. //对话还在继续
  24026. let _text = "";
  24027. _text = _eData.replaceAll("'", "");
  24028. if (_allText == "") {
  24029. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24030. } else {
  24031. _allText += _text;
  24032. }
  24033. _mdText = _allText + "_";
  24034. _mdText = _mdText.replace(/\\n/g, "\n");
  24035. _mdText = _mdText.replace(/\\/g, "");
  24036. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24037. //转化返回的回复流数据
  24038. if(_iindex == 10){
  24039. this.cpote[loading] = _mdText;
  24040. _iindex = 0
  24041. }
  24042. this.cpoteLoading[loading] = false
  24043. // 处理流数据
  24044. }
  24045. // this.$forceUpdate();
  24046. };
  24047. let _this = this
  24048. _source.onerror = function(event) {
  24049. // 处理错误,可以尝试重新连接
  24050. console.log('EventSource error:', event);
  24051. _this.$message.error(this.lang.ssTooManyReq)
  24052. _this.cpoteLoading[loading] = false
  24053. _this.cpotetLoading[loading] = false
  24054. _source.close();
  24055. };
  24056. },
  24057. async aiteacherTextDetail(msg) {
  24058. let _this = this
  24059. let fileid = []
  24060. if (_this.teacherInfoData.length) {
  24061. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24062. if(_this.teacherInfoData[i].fileid){
  24063. fileid.push(_this.teacherInfoData[i].fileid)
  24064. }else {
  24065. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24066. if(_fileid){
  24067. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24068. _this.$forceUpdate();
  24069. if(_fileid != 1){
  24070. fileid.push(_fileid)
  24071. }
  24072. }
  24073. }
  24074. }
  24075. }
  24076. _this.teacherTextLoading = true
  24077. _this.tteacherTextLoading = true
  24078. let sub = []
  24079. if (_this.courseTypeId.length) {
  24080. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24081. let _sid = _this.courseTypeId[i]
  24082. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24083. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24084. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24085. }
  24086. }
  24087. }
  24088. }
  24089. let mclass = []
  24090. if (_this.courseTypeId.length) {
  24091. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24092. let _sid = _this.courseTypeId[i]
  24093. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24094. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24095. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24096. }
  24097. }
  24098. }
  24099. }
  24100. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24101. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24102. let messages = `NOTICE
  24103. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24104. Language: ${this.getLang()}
  24105. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24106. Instruction: Based on the context, follow "Format example", write content.
  24107. #Context
  24108. ## 参考资料
  24109. 课程名字:${this.courseName}
  24110. ${sub.length ? '学科:' + sub.join(",") : ''}
  24111. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24112. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  24113. ## 要求
  24114. ${msg}
  24115. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24116. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  24117. let _uuid = uuidv4();
  24118. // let params = JSON.stringify({
  24119. // // "model": "Chat",
  24120. // model: 'gpt-3.5-turbo',
  24121. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24122. // max_tokens: 4096,
  24123. // top_p: 1,
  24124. // frequency_penalty: 0,
  24125. // presence_penalty: 0,
  24126. // messages: [{
  24127. // content: messages,
  24128. // role: 'user'
  24129. // }],
  24130. // uid: _uuid,
  24131. // mind_map_question: "",
  24132. // })
  24133. let params = {
  24134. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24135. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24136. session_name: _uuid,
  24137. userId: _this.userid,
  24138. uid: _uuid,
  24139. file_ids: fileid.length ? [...fileid] : '',
  24140. model: 'gpt-4o-2024-11-20',
  24141. temperature: this.mode == 3 ? 0.5 : 0.1,
  24142. }
  24143. // let params = JSON.stringify({
  24144. // message: {
  24145. // anthropic_version: "bedrock-2023-05-31",
  24146. // max_tokens: 4096,
  24147. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24148. // top_p: 1,
  24149. // messages: [{
  24150. // "role": "user",
  24151. // "content": messages
  24152. // }] ,
  24153. // },
  24154. // uid: _uuid,
  24155. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24156. // });
  24157. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24158. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  24159. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24160. console.log(response);
  24161. // let data = response.data.FunctionResponse
  24162. // if (data.choices && data.choices.length && data.choices[0].message) {
  24163. // _this.courseText = data.choices[0].message.content
  24164. // }
  24165. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24166. } else {
  24167. _this.$message.warning(response.data.FunctionResponse.result);
  24168. }
  24169. _this.isTeacherTextCancelToken = null
  24170. }).catch(function (error) {
  24171. _this.teacherTextLoading = false
  24172. _this.tteacherTextLoading = false
  24173. _this.isTeacherTextCancelToken = null
  24174. if(error && error.message != 'Request canceled by the user.'){
  24175. _this.$message.error(this.lang.ssTooManyReq)
  24176. }
  24177. console.log(error);
  24178. });
  24179. await _this.aiteacherTextDetailgetAiContent(_uuid)
  24180. },
  24181. aiteacherTextDetailgetAiContent(_uid) {
  24182. try {
  24183. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24184. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24185. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24186. } catch(error) {
  24187. console.log('EventSource error:', event);
  24188. this.$message.error(this.lang.ssTooManyReq)
  24189. this.teacherTextLoading = false
  24190. this.tteacherTextLoading = false
  24191. this.isTeacherTextCancelToken = null
  24192. return;
  24193. }
  24194. let _allText = "";
  24195. let _mdText = "";
  24196. let _iindex = 0
  24197. this.isTeacherTextCancelSource.onmessage = _e => {
  24198. let _eData = JSON.parse(_e.data).content;
  24199. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24200. //对话已经完成
  24201. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24202. this.isTeacherTextCancelSource.close();
  24203. this.isTeacherTextCancelSource = null;
  24204. this.teacherCourseText = _mdText;
  24205. this.teacherTextLoading = false
  24206. this.tteacherTextLoading = false
  24207. this.teacherCourseTextB = false
  24208. this.isTeacherTextCancelToken = null
  24209. return;
  24210. } else {
  24211. _iindex++
  24212. //对话还在继续
  24213. let _text = "";
  24214. _text = _eData.replaceAll("'", "");
  24215. if (_allText == "") {
  24216. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24217. } else {
  24218. _allText += _text;
  24219. }
  24220. _mdText = _allText + "_";
  24221. _mdText = _mdText.replace(/\\n/g, "\n");
  24222. _mdText = _mdText.replace(/\\/g, "");
  24223. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24224. //转化返回的回复流数据
  24225. if(_iindex == 10){
  24226. this.teacherCourseText = _mdText;
  24227. _iindex = 0
  24228. }
  24229. if(this.teacherTextLoading){
  24230. this.teacherTextLoading = false
  24231. }
  24232. // 处理流数据
  24233. }
  24234. // this.$forceUpdate();
  24235. };
  24236. let _this = this
  24237. this.isTeacherTextCancelSource.onerror = function(event) {
  24238. // 处理错误,可以尝试重新连接
  24239. console.log('EventSource error:', event);
  24240. _this.$message.error(this.lang.ssTooManyReq)
  24241. _this.teacherTextLoading = false
  24242. _this.tteacherTextLoading = false
  24243. _this.isTeacherTextCancelToken = null
  24244. _this.isTeacherTextCancelSource.close();
  24245. _this.isTeacherTextCancelSource = null;
  24246. };
  24247. },
  24248. async aitargetTextDetail(msg) {
  24249. let _this = this
  24250. let fileid = []
  24251. if (_this.teacherInfoData.length) {
  24252. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24253. if(_this.teacherInfoData[i].fileid){
  24254. fileid.push(_this.teacherInfoData[i].fileid)
  24255. }else {
  24256. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24257. if(_fileid){
  24258. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24259. _this.$forceUpdate();
  24260. if(_fileid != 1){
  24261. fileid.push(_fileid)
  24262. }
  24263. }
  24264. }
  24265. }
  24266. }
  24267. _this.targetTextLoading = true
  24268. _this.ttargetTextLoading = true
  24269. let sub = []
  24270. if (_this.courseTypeId.length) {
  24271. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24272. let _sid = _this.courseTypeId[i]
  24273. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24274. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24275. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24276. }
  24277. }
  24278. }
  24279. }
  24280. let mclass = []
  24281. if (_this.courseTypeId.length) {
  24282. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24283. let _sid = _this.courseTypeId[i]
  24284. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24285. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24286. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24287. }
  24288. }
  24289. }
  24290. }
  24291. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24292. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24293. let messages = `NOTICE
  24294. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24295. Language: ${this.getLang()}
  24296. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24297. Instruction: Based on the context, follow "Format example", write content.
  24298. #Context
  24299. ## 参考资料
  24300. 课程名字:${this.courseName}
  24301. ${sub.length ? '学科:' + sub.join(",") : ''}
  24302. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24303. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24304. ## 要求
  24305. ${msg}
  24306. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24307. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24308. let _uuid = uuidv4();
  24309. // let params = JSON.stringify({
  24310. // // "model": "Chat",
  24311. // model: 'gpt-3.5-turbo',
  24312. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24313. // max_tokens: 4096,
  24314. // top_p: 1,
  24315. // frequency_penalty: 0,
  24316. // presence_penalty: 0,
  24317. // messages: [{
  24318. // content: messages,
  24319. // role: 'user'
  24320. // }],
  24321. // uid: _uuid,
  24322. // mind_map_question: "",
  24323. // })
  24324. let params = {
  24325. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24326. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24327. session_name: _uuid,
  24328. userId: _this.userid,
  24329. uid: _uuid,
  24330. file_ids: fileid.length ? [...fileid] : '',
  24331. model: 'gpt-4o-2024-11-20',
  24332. temperature: this.mode == 3 ? 0.5 : 0.1,
  24333. }
  24334. // let params = JSON.stringify({
  24335. // message: {
  24336. // anthropic_version: "bedrock-2023-05-31",
  24337. // max_tokens: 4096,
  24338. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24339. // top_p: 1,
  24340. // messages: [{
  24341. // "role": "user",
  24342. // "content": messages
  24343. // }] ,
  24344. // },
  24345. // uid: _uuid,
  24346. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24347. // });
  24348. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24349. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24350. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24351. console.log(response);
  24352. // let data = response.data.FunctionResponse
  24353. // if (data.choices && data.choices.length && data.choices[0].message) {
  24354. // _this.courseText = data.choices[0].message.content
  24355. // }
  24356. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24357. } else {
  24358. _this.$message.warning(response.data.FunctionResponse.result);
  24359. }
  24360. _this.isTargetCancelToken1 = null
  24361. }).catch(function (error) {
  24362. _this.targetTextLoading = false
  24363. _this.ttargetTextLoading = false
  24364. _this.isTargetCancelToken1 = null
  24365. if(error && error.message != 'Request canceled by the user.'){
  24366. _this.$message.error(this.lang.ssTooManyReq)
  24367. }
  24368. console.log(error);
  24369. });
  24370. await _this.aitargetTextDetailgetAiContent(_uuid)
  24371. },
  24372. aitargetTextDetailgetAiContent(_uid) {
  24373. try {
  24374. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24375. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24376. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24377. } catch (error) {
  24378. console.log('EventSource error:', error);
  24379. this.$message.error(this.lang.ssTooManyReq)
  24380. this.targetTextLoading = false
  24381. this.ttargetTextLoading = false
  24382. this.isTargetCancelToken1 = null
  24383. return;
  24384. }
  24385. let _allText = "";
  24386. let _mdText = "";
  24387. let _iindex = 0
  24388. this.isTargetCancelSource1.onmessage = _e => {
  24389. let _eData = JSON.parse(_e.data).content;
  24390. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24391. //对话已经完成
  24392. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24393. this.isTargetCancelSource1.close();
  24394. this.isTargetCancelSource1 = null;
  24395. this.targetCourseText = _mdText;
  24396. this.targetTextLoading = false
  24397. this.ttargetTextLoading = false
  24398. this.targetCourseTextB = false
  24399. this.isTargetCancelToken1 = null
  24400. return;
  24401. } else {
  24402. _iindex++
  24403. //对话还在继续
  24404. let _text = "";
  24405. _text = _eData.replaceAll("'", "");
  24406. if (_allText == "") {
  24407. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24408. } else {
  24409. _allText += _text;
  24410. }
  24411. _mdText = _allText + "_";
  24412. _mdText = _mdText.replace(/\\n/g, "\n");
  24413. _mdText = _mdText.replace(/\\/g, "");
  24414. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24415. //转化返回的回复流数据
  24416. if(_iindex == 10){
  24417. this.targetCourseText = _mdText;
  24418. _iindex = 0
  24419. }
  24420. if(this.targetTextLoading){
  24421. this.targetTextLoading = false
  24422. }
  24423. // 处理流数据
  24424. }
  24425. // this.$forceUpdate();
  24426. };
  24427. let _this = this
  24428. this.isTargetCancelSource1.onerror = function(event) {
  24429. // 处理错误,可以尝试重新连接
  24430. console.log('EventSource error:', event);
  24431. _this.$message.error(this.lang.ssTooManyReq)
  24432. _this.targetTextLoading = false
  24433. _this.ttargetTextLoading = false
  24434. _this.isTargetCancelToken1 = null
  24435. _this.isTargetCancelSource1.close();
  24436. _this.isTargetCancelSource1 = null;
  24437. };
  24438. },
  24439. async aitargetTextDetail2(msg) {
  24440. let _this = this
  24441. let fileid = []
  24442. if(_this.mubiaoInfoData.length){
  24443. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24444. if(_this.mubiaoInfoData[i].fileid){
  24445. fileid.push(_this.mubiaoInfoData[i].fileid)
  24446. }else {
  24447. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24448. if(_fileid){
  24449. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24450. _this.$forceUpdate();
  24451. if(_fileid != 1){
  24452. fileid.push(_fileid)
  24453. }
  24454. }
  24455. }
  24456. }
  24457. }
  24458. _this.targetTextLoading2 = true
  24459. _this.ttargetTextLoading2 = true
  24460. let sub = []
  24461. if (_this.courseTypeId.length) {
  24462. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24463. let _sid = _this.courseTypeId[i]
  24464. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24465. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24466. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24467. }
  24468. }
  24469. }
  24470. }
  24471. let mclass = []
  24472. if (_this.courseTypeId.length) {
  24473. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24474. let _sid = _this.courseTypeId[i]
  24475. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24476. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24477. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24478. }
  24479. }
  24480. }
  24481. }
  24482. if(sub.length){
  24483. let _fileid = _this.importFileid(sub)
  24484. fileid = [...fileid, ..._fileid]
  24485. }
  24486. let messages = `NOTICE
  24487. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24488. Language: ${this.getLang()}
  24489. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24490. Instruction: Based on the context, follow "Format example", write content.
  24491. #Context
  24492. ## 参考资料
  24493. 课程标题:${this.courseName}
  24494. ${sub.length ? '学科:' + sub.join(",") : ''}
  24495. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24496. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24497. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24498. ## 要求
  24499. ${msg}
  24500. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24501. let _uuid = uuidv4();
  24502. // let params = JSON.stringify({
  24503. // // "model": "Chat",
  24504. // model: 'gpt-3.5-turbo',
  24505. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24506. // max_tokens: 4096,
  24507. // top_p: 1,
  24508. // frequency_penalty: 0,
  24509. // presence_penalty: 0,
  24510. // messages: [{
  24511. // content: messages,
  24512. // role: 'user'
  24513. // }],
  24514. // uid: _uuid,
  24515. // mind_map_question: "",
  24516. // })
  24517. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24518. let params = {
  24519. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24520. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24521. session_name: _uuid,
  24522. userId: _this.userid,
  24523. uid: _uuid,
  24524. file_ids: fileid.length ? [...fileid] : '',
  24525. model: 'gpt-4o-2024-11-20',
  24526. temperature: this.mode == 3 ? 0.5 : 0.1,
  24527. }
  24528. // let params = JSON.stringify({
  24529. // message: {
  24530. // anthropic_version: "bedrock-2023-05-31",
  24531. // max_tokens: 4096,
  24532. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24533. // top_p: 1,
  24534. // messages: [{
  24535. // "role": "user",
  24536. // "content": messages
  24537. // }] ,
  24538. // },
  24539. // uid: _uuid,
  24540. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24541. // });
  24542. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24543. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24544. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24545. console.log(response);
  24546. // let data = response.data.FunctionResponse
  24547. // if (data.choices && data.choices.length && data.choices[0].message) {
  24548. // _this.courseText = data.choices[0].message.content
  24549. // }
  24550. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24551. } else {
  24552. _this.$message.warning(response.data.FunctionResponse.result);
  24553. }
  24554. _this.isTargetCancelToken2 = null
  24555. }).catch(function (error) {
  24556. _this.targetTextLoading2 = false
  24557. _this.ttargetTextLoading2 = false
  24558. _this.isTargetCancelToken2 = null
  24559. if(error && error.message != 'Request canceled by the user.'){
  24560. _this.$message.error(this.lang.ssTooManyReq)
  24561. }
  24562. console.log(error);
  24563. });
  24564. await _this.aitargetTextDetail2getAiContent(_uuid)
  24565. },
  24566. importFileid(sub){
  24567. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24568. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24569. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24570. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24571. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24572. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24573. let _sub = converter(sub.join(","))
  24574. let fileid = []
  24575. for(var i = 0; i < this.fileidArray.length; i++){
  24576. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24577. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24578. fileid.push(this.fileidArray[i].fileid)
  24579. }
  24580. }
  24581. }
  24582. return fileid
  24583. },
  24584. selectFileid(){
  24585. let params = {
  24586. oid: this.oid,
  24587. };
  24588. this.ajax
  24589. .get(this.$store.state.api + "selectFileid", params)
  24590. .then((res) => {
  24591. this.fileidArray = res.data[0]
  24592. if(res.data[1].length){
  24593. this.fileidArray = res.data[1]
  24594. }
  24595. if(res.data[2].length){
  24596. this.fileidArray = res.data[2]
  24597. }
  24598. })
  24599. .catch((err) => {
  24600. console.error(err);
  24601. });
  24602. },
  24603. selectAiFileid(){
  24604. let params = {
  24605. oid: this.oid,
  24606. };
  24607. this.ajax
  24608. .get(this.$store.state.api + "selectAiFileid", params)
  24609. .then((res) => {
  24610. let fileIds = []
  24611. for(var i = 0; i < res.data[0].length; i++){
  24612. fileIds.push(res.data[0][i].fileid)
  24613. }
  24614. this.fileIds = fileIds
  24615. if(res.data[1].length){
  24616. fileIds = []
  24617. for(var i = 0; i < res.data[1].length; i++){
  24618. fileIds.push(res.data[0][i].fileid)
  24619. }
  24620. this.fileIds = fileIds
  24621. }
  24622. if(res.data[2].length){
  24623. fileIds = []
  24624. for(var i = 0; i < res.data[2].length; i++){
  24625. fileIds.push(res.data[0][i].fileid)
  24626. }
  24627. this.fileIds = fileIds
  24628. }
  24629. })
  24630. .catch((err) => {
  24631. console.error(err);
  24632. });
  24633. },
  24634. selectKnowFileid(){
  24635. let params = {
  24636. oid: this.oid,
  24637. sta: 'cn'
  24638. };
  24639. this.ajax
  24640. .get(this.$store.state.api + "selectKnowFileid", params)
  24641. .then((res) => {
  24642. this.knowFileArray = res.data[0]
  24643. if(res.data[1].length){
  24644. this.knowFileArray = res.data[1]
  24645. }
  24646. if(res.data[2].length){
  24647. this.knowFileArray = res.data[2]
  24648. }
  24649. })
  24650. .catch((err) => {
  24651. console.error(err);
  24652. });
  24653. },
  24654. async aitargetTextDetail22(msg,msg2) {
  24655. let _this = this
  24656. let fileid = []
  24657. _this.targetTextLoading2 = true
  24658. _this.ttargetTextLoading2 = true
  24659. let sub = []
  24660. if (_this.courseTypeId.length) {
  24661. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24662. let _sid = _this.courseTypeId[i]
  24663. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24664. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24665. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24666. }
  24667. }
  24668. }
  24669. }
  24670. let mclass = []
  24671. if (_this.courseTypeId.length) {
  24672. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24673. let _sid = _this.courseTypeId[i]
  24674. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24675. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24676. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24677. }
  24678. }
  24679. }
  24680. }
  24681. if(!msg2 && sub.length){
  24682. // let _fileid = _this.importFileid(sub)
  24683. // fileid = [...fileid, ..._fileid]
  24684. }
  24685. let messages = `NOTICE
  24686. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24687. Language: ${this.getLang()}
  24688. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24689. Instruction: Based on the context, follow "Format example", write content.
  24690. #Context
  24691. ## 参考资料
  24692. 课程标题:${this.courseName}
  24693. ${sub.length ? '学科:' + sub.join(",") : ''}
  24694. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24695. 课程目标:${msg2}
  24696. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24697. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24698. ## 要求
  24699. ${msg}
  24700. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24701. let _uuid = uuidv4();
  24702. // let params = JSON.stringify({
  24703. // // "model": "Chat",
  24704. // model: 'gpt-3.5-turbo',
  24705. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24706. // max_tokens: 4096,
  24707. // top_p: 1,
  24708. // frequency_penalty: 0,
  24709. // presence_penalty: 0,
  24710. // messages: [{
  24711. // content: messages,
  24712. // role: 'user'
  24713. // }],
  24714. // uid: _uuid,
  24715. // mind_map_question: "",
  24716. // })
  24717. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24718. let params = {
  24719. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24720. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24721. session_name: _uuid,
  24722. userId: _this.userid,
  24723. uid: _uuid,
  24724. file_ids: fileid.length ? [...fileid] : '',
  24725. model: 'gpt-4o-2024-11-20',
  24726. temperature: this.mode == 3 ? 0.5 : 0.1,
  24727. }
  24728. // let params = JSON.stringify({
  24729. // message: {
  24730. // anthropic_version: "bedrock-2023-05-31",
  24731. // max_tokens: 4096,
  24732. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24733. // top_p: 1,
  24734. // messages: [{
  24735. // "role": "user",
  24736. // "content": messages
  24737. // }] ,
  24738. // },
  24739. // uid: _uuid,
  24740. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24741. // });
  24742. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24743. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24744. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24745. console.log(response);
  24746. // let data = response.data.FunctionResponse
  24747. // if (data.choices && data.choices.length && data.choices[0].message) {
  24748. // _this.courseText = data.choices[0].message.content
  24749. // }
  24750. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24751. } else {
  24752. _this.$message.warning(response.data.FunctionResponse.result);
  24753. }
  24754. _this.isTargetCancelToken2 = null
  24755. }).catch(function (error) {
  24756. _this.targetTextLoading2 = false
  24757. _this.ttargetTextLoading2 = false
  24758. _this.isTargetCancelToken2 = null
  24759. if(error && error.message != 'Request canceled by the user.'){
  24760. _this.$message.error(this.lang.ssTooManyReq)
  24761. }
  24762. console.log(error);
  24763. });
  24764. await _this.aitargetTextDetail2getAiContent(_uuid)
  24765. },
  24766. aitargetTextDetail2getAiContent(_uid) {
  24767. try {
  24768. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24769. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24770. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24771. } catch(error) {
  24772. console.log('EventSource error:', error);
  24773. this.$message.error(this.lang.ssTooManyReq)
  24774. this.targetTextLoading2 = false
  24775. this.ttargetTextLoading2 = false
  24776. this.isTargetCancelToken2 = null
  24777. return;
  24778. }
  24779. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24780. let _allText = "";
  24781. let _mdText = "";
  24782. let _iindex = 0
  24783. this.isTargetCancelSource2.onmessage = _e => {
  24784. let _eData = JSON.parse(_e.data).content;
  24785. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24786. //对话已经完成
  24787. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24788. this.isTargetCancelSource2.close();
  24789. this.isTargetCancelSource2 = null;
  24790. this.targetCourseText2 = text1+' \n '+_mdText;
  24791. this.targetTextLoading2 = false
  24792. this.ttargetTextLoading2 = false
  24793. this.targetCourseText2B = false
  24794. this.isTargetCancelToken2 = null
  24795. this.saveCourse()
  24796. return;
  24797. } else {
  24798. _iindex++
  24799. //对话还在继续
  24800. let _text = "";
  24801. _text = _eData.replaceAll("'", "");
  24802. if (_allText == "") {
  24803. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24804. } else {
  24805. _allText += _text;
  24806. }
  24807. _mdText = _allText + "_";
  24808. _mdText = _mdText.replace(/\\n/g, "\n");
  24809. _mdText = _mdText.replace(/\\/g, "");
  24810. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24811. //转化返回的回复流数据
  24812. if(_iindex == 10){
  24813. this.targetCourseText2 = text1+' \n '+_mdText;
  24814. _iindex = 0
  24815. }
  24816. if(this.targetTextLoading2){
  24817. this.targetTextLoading2 = false
  24818. }
  24819. // 处理流数据
  24820. }
  24821. // this.$forceUpdate();
  24822. };
  24823. let _this = this
  24824. this.isTargetCancelSource2.onerror = function(event) {
  24825. // 处理错误,可以尝试重新连接
  24826. console.log('EventSource error:', event);
  24827. _this.$message.error(this.lang.ssTooManyReq)
  24828. _this.targetTextLoading2 = false
  24829. _this.ttargetTextLoading2 = false
  24830. _this.isTargetCancelToken2 = null
  24831. _this.isTargetCancelSource2.close();
  24832. _this.isTargetCancelSource2 = null;
  24833. };
  24834. },
  24835. async aitargetTextDetail3(msg) {
  24836. let _this = this
  24837. let fileid = []
  24838. if(_this.mubiaoInfoData.length){
  24839. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24840. if(_this.mubiaoInfoData[i].fileid){
  24841. fileid.push(_this.mubiaoInfoData[i].fileid)
  24842. }else {
  24843. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24844. if(_fileid){
  24845. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24846. _this.$forceUpdate();
  24847. if(_fileid != 1){
  24848. fileid.push(_fileid)
  24849. }
  24850. }
  24851. }
  24852. }
  24853. }
  24854. _this.targetTextLoading2 = true
  24855. _this.ttargetTextLoading2 = true
  24856. let sub = []
  24857. if (_this.courseTypeId.length) {
  24858. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24859. let _sid = _this.courseTypeId[i]
  24860. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24861. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24862. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24863. }
  24864. }
  24865. }
  24866. }
  24867. let mclass = []
  24868. if (_this.courseTypeId.length) {
  24869. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24870. let _sid = _this.courseTypeId[i]
  24871. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24872. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24873. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24874. }
  24875. }
  24876. }
  24877. }
  24878. // if(sub.length){
  24879. // let _fileid = _this.importFileid(sub)
  24880. // fileid = [...fileid, ..._fileid]
  24881. // }
  24882. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24883. if (_this.infoData.length) {
  24884. for (var i = 0; i < _this.infoData.length; i++) {
  24885. if(_this.infoData[i].fileid){
  24886. fileid.push(_this.infoData[i].fileid)
  24887. }else {
  24888. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24889. if(_fileid){
  24890. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24891. _this.$forceUpdate();
  24892. if(_fileid != 1){
  24893. fileid.push(_fileid)
  24894. }
  24895. }
  24896. }
  24897. }
  24898. }
  24899. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24900. let messages = `Language: ${this.getLang()}
  24901. ${msg}
  24902. ## 课程信息
  24903. 课程名字:${this.courseName}
  24904. 课程概况:${this.courseText}
  24905. ${sub.length ? '学科:' + sub.join(",") : ''}
  24906. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24907. let _uuid = uuidv4();
  24908. // let params = JSON.stringify({
  24909. // // "model": "Chat",
  24910. // model: 'gpt-3.5-turbo',
  24911. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24912. // max_tokens: 4096,
  24913. // top_p: 1,
  24914. // frequency_penalty: 0,
  24915. // presence_penalty: 0,
  24916. // messages: [{
  24917. // content: messages,
  24918. // role: 'user'
  24919. // }],
  24920. // uid: _uuid,
  24921. // mind_map_question: "",
  24922. // })
  24923. let params = {
  24924. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24925. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24926. session_name: _uuid,
  24927. userId: _this.userid,
  24928. uid: _uuid,
  24929. file_ids: fileid.length ? [...fileid] : '',
  24930. model: 'gpt-4o-2024-11-20',
  24931. temperature: this.mode == 3 ? 0.5 : 0.1,
  24932. }
  24933. // let params = JSON.stringify({
  24934. // message: {
  24935. // anthropic_version: "bedrock-2023-05-31",
  24936. // max_tokens: 4096,
  24937. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24938. // top_p: 1,
  24939. // messages: [{
  24940. // "role": "user",
  24941. // "content": messages
  24942. // }] ,
  24943. // },
  24944. // uid: _uuid,
  24945. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24946. // });
  24947. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24948. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24949. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24950. console.log(response);
  24951. // let data = response.data.FunctionResponse
  24952. // if (data.choices && data.choices.length && data.choices[0].message) {
  24953. // _this.courseText = data.choices[0].message.content
  24954. // }
  24955. console.log(response);
  24956. let data = response.data.FunctionResponse
  24957. // if (data.choices && data.choices.length && data.choices[0].message) {
  24958. // console.log(data.choices[0].message.content);
  24959. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24960. // _this.$forceUpdate()
  24961. // }
  24962. if (data.message) {
  24963. console.log('返回回来的目标:',data.message);
  24964. _this.targetCourseText2 = data.message
  24965. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24966. }
  24967. _this.isTargetCancelToken2 = null
  24968. }).catch(function (error) {
  24969. _this.targetTextLoading2 = false
  24970. _this.ttargetTextLoading2 = false
  24971. _this.isTargetCancelToken2 = null
  24972. if(error && error.message != 'Request canceled by the user.'){
  24973. _this.$message.error(this.lang.ssTooManyReq)
  24974. }
  24975. console.log(error);
  24976. });
  24977. },
  24978. againEva(msg, i, k) {
  24979. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24980. this.$message.error(this.lang.ssEvaCompleteInfo.replace(/\*/g, i+1).replace(/\$/g, k+1))
  24981. return;
  24982. }
  24983. if (this.ruleLoading[i]) {
  24984. this.ruleLoading[i][k] = true
  24985. } else {
  24986. this.ruleLoading[i] = []
  24987. this.ruleLoading[i][k] = true
  24988. }
  24989. let message = `NOTICE
  24990. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24991. Language: ${this.getLang()}
  24992. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24993. Instruction: Based on the context, follow "Format example", write content.
  24994. #Context
  24995. ##要求
  24996. ${msg}
  24997. ##制定标准资料
  24998. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24999. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  25000. # Format example
  25001. ==
  25002. ${this.lang.ssStar0},作业内容与作业要求无关;
  25003. ${this.lang.ssStar1},没有识别问题和需求;
  25004. ${this.lang.ssStar2},问题或需求没有被清晰理解或准确识别;
  25005. ${this.lang.ssStar3},问题或需求的一部分被识别;
  25006. ${this.lang.ssStar4},问题或需求的大部分被识别;
  25007. ${this.lang.ssStar5},问题或需求都被识别。
  25008. ==
  25009. `
  25010. // let params = {
  25011. // // "model": "Chat",
  25012. // model: 'gpt-4o-2024-11-20',
  25013. // // model: "gpt-4o",
  25014. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25015. // max_tokens: 4096,
  25016. // top_p: 1,
  25017. // frequency_penalty: 0,
  25018. // presence_penalty: 0,
  25019. // messages: [
  25020. // {
  25021. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  25022. // role: "user"
  25023. // }
  25024. // ],
  25025. // stream: false,
  25026. // uid: this.userid,
  25027. // mind_map_question: ""
  25028. // };
  25029. // this.ajax
  25030. // .post("https://gpt4.cocorobo.cn/chat", params)
  25031. // .then(response => {
  25032. // let data = response.data.FunctionResponse;
  25033. // console.log("data", data);
  25034. // if (data.choices && data.choices.length && data.choices[0].message) {
  25035. // let content = data.choices[0].message.content;
  25036. // var regex = new RegExp('==([^=]+)==');
  25037. // let match = content.match(regex);
  25038. // if (match) {
  25039. // content = match[1].trim().replaceAll(' ', '');
  25040. // // 获取匹配到的内容并去除两端空格
  25041. // console.log('contentInsideDoubleEquals', content);
  25042. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  25043. // console.log("未有星级。");
  25044. // this.againEva(msg, i, k)
  25045. // return
  25046. // }
  25047. // //  return
  25048. // } else {
  25049. // console.log("未找到匹配的内容。");
  25050. // this.againEva(msg, i, k)
  25051. // return
  25052. // }
  25053. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25054. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25055. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25056. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25057. // this.$forceUpdate();
  25058. // this.ruleLoading[i][k] = false
  25059. // }else{
  25060. // this.ruleLoading[i][k] = false
  25061. // }
  25062. // })
  25063. // .catch(error => {
  25064. // console.log(error);
  25065. // this.ruleLoading[i][k] = false
  25066. // });
  25067. let parm = {
  25068. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25069. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  25070. session_name: uuidv4(),
  25071. userId: this.userid,
  25072. file_ids: [],
  25073. model: 'gpt-4o-2024-11-20',
  25074. temperature: this.mode == 3 ? 0.5 : 0.1,
  25075. }
  25076. this.ajax
  25077. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  25078. .then(async (response) => {
  25079. console.log(response);
  25080. let data = response.data.FunctionResponse
  25081. if (data.message) {
  25082. console.log(data.message);
  25083. let content = data.message;
  25084. var regex = new RegExp('==([^=]+)==');
  25085. let match = content.match(regex);
  25086. if (match) {
  25087. content = match[1].trim().replaceAll(' ', '');
  25088. // 获取匹配到的内容并去除两端空格
  25089. console.log('contentInsideDoubleEquals', content);
  25090. 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) {
  25091. console.log(this.lang.ssNoStarLevel);
  25092. this.againEva(msg, i, k)
  25093. return
  25094. }
  25095. // return
  25096. } else {
  25097. console.log(this.lang.ssNoMatch);
  25098. this.againEva(msg, i, k)
  25099. return
  25100. }
  25101. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25102. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25103. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25104. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25105. this.$forceUpdate();
  25106. this.ruleLoading[i][k] = false
  25107. this.$message.success(this.lang.ssEvaRuleSucc.replace(/\*/g, i+1).replace(/\$/g, k+1))
  25108. }else {
  25109. this.ruleLoading[i][k] = false
  25110. }
  25111. })
  25112. .catch((error) => {
  25113. this.ruleLoading[i][k] = false
  25114. console.log(error);
  25115. });
  25116. },
  25117. async aiSearchFile(messages, callback) {
  25118. let _this = this
  25119. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  25120. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  25121. console.log('fileid=========',fileid)
  25122. // let params = JSON.stringify({
  25123. // // "model": "Chat",
  25124. // model: 'gpt-3.5-turbo',
  25125. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25126. // max_tokens: 4096,
  25127. // top_p: 1,
  25128. // frequency_penalty: 0,
  25129. // presence_penalty: 0,
  25130. // messages: [{
  25131. // content: messages,
  25132. // role: 'user'
  25133. // }],
  25134. // stream: false,
  25135. // uid: this.userid,
  25136. // mind_map_question: "",
  25137. // })
  25138. // // let params = JSON.stringify({
  25139. // // message: {
  25140. // // anthropic_version: "bedrock-2023-05-31",
  25141. // // max_tokens: 4096,
  25142. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  25143. // // top_p: 1,
  25144. // // messages: [{
  25145. // // content: messages,
  25146. // // role: 'user'
  25147. // // }], //
  25148. // // },
  25149. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  25150. // // });
  25151. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  25152. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  25153. // console.log(response);
  25154. // let data = response.data.FunctionResponse
  25155. // if (data.choices && data.choices.length && data.choices[0].message) {
  25156. // console.log(data.choices[0].message.content);
  25157. // let dArray = JSON.parse(data.choices[0].message.content)
  25158. // _this.dArray = dArray
  25159. // _this.unitJson[0].chapterInfo[0].taskJson = []
  25160. // for (var i = 0; i < dArray.length; i++) {
  25161. // let _task = dArray[i]
  25162. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25163. // task: _task.task,
  25164. // taskDetail: "",
  25165. // taskDetail2: _task.detail,
  25166. // taskDetail3: "",
  25167. // chapterData: [],
  25168. // toolText: "",
  25169. // toolChoose: [
  25170. // {
  25171. // tool: [],
  25172. // toolDetail: "",
  25173. // toolType: 0,
  25174. // askCount: 1,
  25175. // askTitle: "",
  25176. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25177. // },
  25178. // ],
  25179. // isShowTools: false,
  25180. // askCount: 1,
  25181. // isFold: 0,
  25182. // askTitle: "",
  25183. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25184. // checkJson: [{ checkCount: [], checkPerent: [] }],
  25185. // homeworkList: [],
  25186. // })
  25187. // }
  25188. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  25189. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25190. // _this.$forceUpdate();
  25191. // }
  25192. // // if (data.result) {
  25193. // // console.log(data.result);
  25194. // // let dArray = JSON.parse(data.result)
  25195. // // _this.dArray = dArray
  25196. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  25197. // // for (var i = 0; i < dArray.length; i++) {
  25198. // // let _task = dArray[i]
  25199. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25200. // // task: _task.task,
  25201. // // taskDetail: "",
  25202. // // taskDetail2: _task.detail,
  25203. // // taskDetail3: "",
  25204. // // chapterData: [],
  25205. // // toolText: "",
  25206. // // toolChoose: [
  25207. // // {
  25208. // // tool: [],
  25209. // // toolDetail: "",
  25210. // // toolType: 0,
  25211. // // askCount: 1,
  25212. // // askTitle: "",
  25213. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25214. // // },
  25215. // // ],
  25216. // // isShowTools: false,
  25217. // // askCount: 1,
  25218. // // isFold: 1,
  25219. // // askTitle: "",
  25220. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25221. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  25222. // // homeworkList: [],
  25223. // // })
  25224. // // }
  25225. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25226. // // _this.$forceUpdate();
  25227. // // }
  25228. // callback ? callback() : ''
  25229. // }).catch(function (error) {
  25230. // _this.loading = false
  25231. // console.log(error);
  25232. // });
  25233. this.isFileCancelToken = this.ajax.setCancelSource();
  25234. let parm = {
  25235. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25236. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25237. session_name: uuidv4(),
  25238. userId: this.userid,
  25239. file_ids: fileid.length ? [...fileid] : '',
  25240. model: 'gpt-4o-2024-11-20',
  25241. temperature: this.mode == 3 ? 0.5 : 0.1,
  25242. }
  25243. this.ajax
  25244. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25245. .then((response) => {
  25246. console.log(response);
  25247. let data = response.data.FunctionResponse
  25248. if (data.message) {
  25249. console.log(data.message);
  25250. let dArray = []
  25251. try {
  25252. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25253. let regex3 = new RegExp('(?<!")content(?!")','g')
  25254. //
  25255. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25256. } catch (error) {
  25257. // callback ? callback() : ''
  25258. console.log("error_________________" + error);
  25259. try {
  25260. let regex = new RegExp(/```json([\s\S]*?)```/);
  25261. let match = data.message.match(regex);
  25262. dArray = JSON.parse(match[1]);
  25263. } catch (error) {
  25264. // callback ? callback() : ''
  25265. _this.$message.error(_this.lang.ssFormatErr)
  25266. console.log("error_________________" + error);
  25267. _this.isFileCancelToken = null;
  25268. _this.aiSearchFile(messages, callback)
  25269. return
  25270. }
  25271. }
  25272. for(let i = 0; i < dArray.length; i++){
  25273. let content = dArray[i].content
  25274. let name = _this.lang.ssRefMat+(i+1)
  25275. let md = new MarkdownIt();
  25276. let _html = content ? md.render(content) : ''
  25277. setTimeout(()=>{
  25278. if(i == (dArray.length - 1)){
  25279. _this.generate2(name, _html, i, callback)
  25280. }else {
  25281. _this.generate2(name, _html, i)
  25282. }
  25283. }, 500 * i)
  25284. }
  25285. _this.isFileCancelToken = null
  25286. _this.$forceUpdate();
  25287. }
  25288. })
  25289. .catch((error) => {
  25290. callback ? callback() : ''
  25291. _this.isFileCancelToken = null
  25292. console.log(error);
  25293. });
  25294. },
  25295. async aiSearchFile2(messages, callback) {
  25296. let _this = this
  25297. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25298. console.log('fileid=========',fileid)
  25299. this.isFileCancelToken = this.ajax.setCancelSource();
  25300. let parm = {
  25301. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25302. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25303. session_name: uuidv4(),
  25304. userId: this.userid,
  25305. file_ids: fileid.length ? [...fileid] : '',
  25306. model: 'gpt-4o-2024-11-20',
  25307. temperature: this.mode == 3 ? 0.5 : 0.1,
  25308. }
  25309. this.ajax
  25310. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25311. .then((response) => {
  25312. console.log(response);
  25313. let data = response.data.FunctionResponse
  25314. if (data.message) {
  25315. console.log(data.message);
  25316. let content = data.message
  25317. let name = _this.lang.ssRefMat
  25318. let md = new MarkdownIt();
  25319. let _html = content ? md.render(content) : ''
  25320. _this.generate2(name, _html, 0, callback)
  25321. _this.isFileCancelToken = null
  25322. _this.$forceUpdate();
  25323. }
  25324. })
  25325. .catch((error) => {
  25326. callback ? callback() : ''
  25327. _this.isFileCancelToken = null
  25328. console.log(error);
  25329. });
  25330. },
  25331. createFileid(url) {
  25332. let _this = this
  25333. return new Promise((resolve, reject) => {
  25334. try {
  25335. _this.ajax
  25336. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25337. url: url,
  25338. })
  25339. .then((res) => {
  25340. let _data = res.data.FunctionResponse;
  25341. if (_data.result && _data.result.id) {
  25342. resolve(_data.result.id)
  25343. }else {
  25344. resolve(1)
  25345. }
  25346. }).catch(function (error) {
  25347. resolve(1)
  25348. });
  25349. }catch (e){
  25350. resolve(1)
  25351. }
  25352. });
  25353. },
  25354. handleSwitchChange(string){
  25355. // let area = ''
  25356. // let text = ''
  25357. // if(string == 'aiteacherTextDetail'){
  25358. // area = '已有教案摘要'
  25359. // text = this.teacherCourseText
  25360. // }else if(string == 'aitargetTextDetail'){
  25361. // area = '课程目标'
  25362. // text = this.targetCourseText
  25363. // }else if(string == 'aiDetail'){
  25364. // area = '课程简要描述'
  25365. // text = this.courseText
  25366. // }else if(string == 'aitargetTextDetail2'){
  25367. // area = '课程目标'
  25368. // text = this.targetCourseText2
  25369. // }else if(string.indexOf('aiDetail1') != -1){
  25370. // let index = parseInt(string.split('aiDetail1-')[1])
  25371. // area = `任务${index+1}课程大纲`
  25372. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25373. // }else if(string == 'aiCpote1'){
  25374. // area = '概念群'
  25375. // text = this.cpote.cpote1
  25376. // }else if(string == 'aiCpote2'){
  25377. // area = '问题链'
  25378. // text = this.cpote.cpote2
  25379. // }else if(string == 'aiCpote3'){
  25380. // area = '目标层'
  25381. // text = this.cpote.cpote3
  25382. // }else if(string == 'aiCpote4'){
  25383. // area = '任务簇'
  25384. // text = this.cpote.cpote4
  25385. // }else if(string.indexOf('teacherDetail2') != -1){
  25386. // let index = parseInt(string.split('teacherDetail2-')[1])
  25387. // area = `任务${index+1}教案`
  25388. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25389. // }else if(string.indexOf('aiDetail2') != -1){
  25390. // let index = parseInt(string.split('aiDetail2-')[1])
  25391. // area = `任务${index+1}任务描述`
  25392. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25393. // }else if(string.indexOf('aiDetail3') != -1){
  25394. // let index = parseInt(string.split('-')[1])
  25395. // let index2 = parseInt(string.split('-')[2])
  25396. // area = `任务${index+1}工具${index2+1}的工具描述`
  25397. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25398. // }
  25399. // if(this.isQuote[string] && text){
  25400. // this.quoteArray.push({
  25401. // string,
  25402. // area,
  25403. // value: text
  25404. // })
  25405. // }
  25406. console.log(this.isQuote)
  25407. },
  25408. setIsQuote(string){
  25409. this.isQuote[string] = false
  25410. },
  25411. setEvaList(task, tool, elist){
  25412. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25413. this.$forceUpdate()
  25414. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25415. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25416. }
  25417. },
  25418. closeRight(){
  25419. this.isDisplay = !this.isDisplay;
  25420. },
  25421. addCourseBehavior(type, _html) { // 保存行为操作
  25422. let params = [{
  25423. uid: this.userid,
  25424. courseId: '',
  25425. type: type,
  25426. content: _html,
  25427. }];
  25428. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25429. if (res.data == 1) {
  25430. console.log('保存操作成功');
  25431. } else {
  25432. console.log('保存操作失败');
  25433. }
  25434. }).catch(e => {
  25435. console.log('保存操作失败');
  25436. console.log(e);
  25437. });
  25438. },
  25439. async useUrl(){
  25440. if(!this.knowFileids3.length){
  25441. this.$message.error(this.lang.ssSelectMat)
  25442. return
  25443. }
  25444. let array = []
  25445. for(var i = 0; i < this.knowFileids3.length; i++){
  25446. let item = this.knowFileids3[i]
  25447. for(var j = 0; j < this.knowInfoData3.length; j++){
  25448. if(item == this.knowInfoData3[j].url){
  25449. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25450. if (!isExist) {
  25451. this.knowInfoData2.push(this.knowInfoData3[j]);
  25452. }
  25453. }
  25454. }
  25455. }
  25456. this.$nextTick(() => {
  25457. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25458. });
  25459. this.knowFileids3 = []
  25460. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25461. if (!this.knowInfoData2[i].fileid) {
  25462. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25463. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25464. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25465. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25466. this.knowFileids2.push(fileid)
  25467. }
  25468. }
  25469. }
  25470. },
  25471. panFind(event) {
  25472. // if(!this.findMatchingContentsFinish){
  25473. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25474. // // 判断是否触底
  25475. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25476. // this.findMatchingContentsPage++
  25477. // this.findMatchingContents(); // 调用下拉刷新方法
  25478. // }
  25479. // }
  25480. if(!this.findMatchingContentsFinish){
  25481. this.findMatchingContentsPage++
  25482. this.findMatchingContents(); // 调用下拉刷新方法
  25483. }else{
  25484. this.$message.error(this.lang.ssGetAllData)
  25485. }
  25486. },
  25487. startFindMatchingContents(){
  25488. if(!this.searchFileName){
  25489. this.$message.error(this.lang.ssEnterKey)
  25490. return
  25491. }
  25492. if(this.knowInfoDataLoading){
  25493. this.$message.error(this.lang.ssSearchWait)
  25494. return
  25495. }
  25496. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25497. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25498. this.isfindMatchingContents = null;
  25499. }else if(this.isfindMatchingContents){
  25500. this.$message.error(this.lang.ssSearchWait)
  25501. return
  25502. }
  25503. this.findMatchingContentsFinish = false
  25504. this.findMatchingContentsPage = 1
  25505. this.knowInfoData3 = []
  25506. this.knowFileType1 = ''
  25507. this.knowFileType2 = ''
  25508. this.knowFileType = ''
  25509. this.findMatchingContents(); // 调用下拉刷新方法
  25510. },
  25511. findMatchingContents(){
  25512. if(!this.searchFileName){
  25513. this.$message.error(this.lang.ssEnterKey)
  25514. return
  25515. }
  25516. if(this.isfindMatchingContents){
  25517. this.$message.error(this.lang.ssSearchWait)
  25518. return
  25519. }
  25520. let sub = []
  25521. let grade = []
  25522. if (this.courseTypeId.length) {
  25523. for (var i = 0; i < this.courseTypeId.length; i++) {
  25524. let _sid = this.courseTypeId[i]
  25525. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25526. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25527. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25528. }
  25529. }
  25530. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25531. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25532. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25533. }
  25534. }
  25535. }
  25536. }
  25537. if(this.findMatchingContentsPage < 2){
  25538. this.knowInfoDataLoading = true
  25539. }
  25540. let params = {
  25541. type: this.typeC2.join(","),
  25542. string: this.searchFileName,
  25543. grade: this.typeC1.join(","),
  25544. page: this.findMatchingContentsPage
  25545. };
  25546. let md = new MarkdownIt();
  25547. this.isfindMatchingContents = this.ajax.setCancelSource()
  25548. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25549. console.log(res)
  25550. this.isfindMatchingContents = null
  25551. this.knowInfoDataLoading = false
  25552. if(res.data.length){
  25553. let files = []
  25554. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25555. for (var i = 0; i < res.data.length; i++) {
  25556. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25557. let el = res.data[i];
  25558. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25559. let extension = url.split('.').pop().toLowerCase();
  25560. let _type = 2; // 默认类型为2
  25561. // 定义文件类型数组
  25562. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25563. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25564. 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"];
  25565. // 根据文件扩展名判断文件类型
  25566. if (fileA.includes(extension.toUpperCase())) {
  25567. _type = 3;
  25568. } else if (videoA.includes(extension.toUpperCase())) {
  25569. _type = 2;
  25570. } else if (imgA.includes(extension)) {
  25571. _type = 13;
  25572. } else {
  25573. _type = 12;
  25574. }
  25575. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25576. if (!isExist) {
  25577. // let fileid = await this.createFileid(url)
  25578. this.knowInfoData3.push({
  25579. name: el.title,
  25580. url: url,
  25581. uid: '',
  25582. type: _type,
  25583. fileid: '',
  25584. file_type: el.file_type
  25585. // fileid == 1 ? '' : fileid
  25586. });
  25587. // if(fileid != 1){
  25588. // this.knowFileids2.push(fileid)
  25589. // }
  25590. }
  25591. }
  25592. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25593. // if (!this.knowInfoData2[i].fileid) {
  25594. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25595. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25596. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25597. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25598. // this.knowFileids2.push(fileid)
  25599. // }
  25600. // }
  25601. // }
  25602. // let data = {
  25603. // target:{
  25604. // files: files
  25605. // }
  25606. // }
  25607. // console.log(data)
  25608. // this.beforeUploadInfo2(data, 20)
  25609. if(this.findMatchingContentsPage < 10){
  25610. this.panFind()
  25611. }
  25612. }else{
  25613. if(this.findMatchingContentsPage == 1){
  25614. this.$message.error(this.lang.ssNoSearchRes)
  25615. }else {
  25616. this.findMatchingContentsFinish = true
  25617. }
  25618. }
  25619. }).catch(e => {
  25620. console.log(this.lang.ssQueryFail);
  25621. this.isfindMatchingContents = null
  25622. this.knowInfoDataLoading = false
  25623. console.log(e);
  25624. });
  25625. },
  25626. openCodeEditor(type,val, unitIndex,itemTaskIndex,index1){
  25627. console.log('openCodeEditor',type,val,unitIndex,itemTaskIndex,index1);
  25628. this.$refs.CodeEditorRef.open(type,val, unitIndex,itemTaskIndex, index1)
  25629. },
  25630. addHtmlSuccess({Tname,url,type,unitIndex,itemTaskIndex,index1}){
  25631. console.log('addHtmlSuccess',Tname,url,'type:',type,'unitIndex',unitIndex,'itemTaskIndex',itemTaskIndex,'index1',index1);
  25632. if (type == 1) {
  25633. this.unitJson[unitIndex].chapterInfo[0].taskJson[
  25634. itemTaskIndex
  25635. ].chapterData.splice(index1,1,{
  25636. name: Tname,
  25637. url: url,
  25638. type: 16
  25639. })
  25640. }else{
  25641. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25642. itemTaskIndex
  25643. ].chapterData.push({
  25644. name: Tname,
  25645. url: url,
  25646. type: 16
  25647. });
  25648. }
  25649. },
  25650. openAddApp(i) {
  25651. this.lineCount = i;
  25652. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25653. this.lineCount
  25654. ].chapterData.findIndex(i => i.type == 15);
  25655. let _obj = {}
  25656. if (_index != -1) {
  25657. _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25658. this.lineCount
  25659. ].chapterData[_index]
  25660. }
  25661. this.$refs.appDialog.openG(_obj, "", "", "", 2);
  25662. },
  25663. selectAppSuccess({ data, type }) {
  25664. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25665. this.lineCount
  25666. ].chapterData.findIndex(i => i.type == 15);
  25667. if (_index != -1) {
  25668. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25669. this.lineCount
  25670. ].chapterData.splice(_index, 1);
  25671. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25672. this.lineCount
  25673. ].chapterData.push({
  25674. name: data.name,
  25675. title: data.name,
  25676. id:data.id,
  25677. url: data.url,
  25678. type: 15
  25679. });
  25680. } else {
  25681. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25682. this.lineCount
  25683. ].chapterData.push({
  25684. name: data.name,
  25685. title: data.name,
  25686. id:data.id,
  25687. url: data.url,
  25688. type: 15
  25689. });
  25690. }
  25691. this.imgChange1(null, null, 8, this.lineCount);
  25692. this.dialogVisible7 = false;
  25693. },
  25694. // zip压缩文件上传
  25695. uploadZIPFile(i){
  25696. this.lineCount = i;
  25697. // 只支持上传zip文件
  25698. let input = document.createElement('input');
  25699. input.type = 'file';
  25700. input.accept = '.zip';
  25701. input.style.display = 'none';
  25702. // 只允许上传一个文件
  25703. input.multiple = false;
  25704. input.onchange = async (e) => {
  25705. let file = e.target.files[0];
  25706. if (!file) return;
  25707. if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
  25708. this.$message.error(this.lang.ssOnlyZip);
  25709. return;
  25710. }
  25711. try{
  25712. const zip = new JSZip();
  25713. const content = await zip.loadAsync(file);
  25714. let _fileStructure = this.buildFileStructure(file,content);
  25715. let _time = new Date().getTime();
  25716. let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
  25717. this.changeId = "";
  25718. this.$refs.selectHtmlPageDialogRef.open(_resultList);
  25719. }catch(e){
  25720. console.log(e)
  25721. this.$message.error(this.lang.ssZipFail)
  25722. }
  25723. };
  25724. document.body.appendChild(input);
  25725. input.click();
  25726. setTimeout(() => {
  25727. document.body.removeChild(input);
  25728. }, 1000);
  25729. },
  25730. // 构建文件结构树
  25731. buildFileStructure(file,zip) {
  25732. const root = {
  25733. folderName: file.name.replace(/\.[^/.]+$/, ""), // 移除扩展名
  25734. files: []
  25735. };
  25736. // 遍历ZIP文件中的所有文件/文件夹
  25737. zip.forEach((relativePath, file) => {
  25738. if (file.dir) return; // 跳过目录
  25739. const parts = relativePath.split('/');
  25740. let currentLevel = root.files;
  25741. for (let i = 0; i < parts.length; i++) {
  25742. const part = parts[i];
  25743. const isLast = i === parts.length - 1;
  25744. if (isLast) {
  25745. // 添加文件
  25746. currentLevel.push({fileName:part,file:file});
  25747. } else {
  25748. // 查找或创建文件夹
  25749. let folder = currentLevel.find(item =>
  25750. typeof item === 'object' && item.folderName === part
  25751. );
  25752. if (!folder) {
  25753. folder = {
  25754. folderName: part,
  25755. files: []
  25756. };
  25757. currentLevel.push(folder);
  25758. }
  25759. currentLevel = folder.files;
  25760. }
  25761. }
  25762. });
  25763. return root;
  25764. },
  25765. //按路径上传文件
  25766. async uploadZipFileFn(fileList,path){
  25767. return new Promise(async (resolve)=>{
  25768. let _copyFileList = fileList;
  25769. let promise = [];
  25770. for(let i = 0; i < _copyFileList.length; i++){
  25771. if(_copyFileList[i].folderName){
  25772. let _path = `${path}/${_copyFileList[i].folderName}`;
  25773. promise.push(this.uploadZipFileFn(_copyFileList[i].files,_path).then(res=>{
  25774. _copyFileList[i].files = res;
  25775. }))
  25776. }else if(_copyFileList[i].fileName){
  25777. // 将 ZIP 条目转换为文件对象
  25778. const blob = await _copyFileList[i].file.async('blob');
  25779. // 根据文件名设置type
  25780. let type = 'text/html';
  25781. if (_copyFileList[i].fileName.endsWith('.js')) {
  25782. type = 'application/javascript';
  25783. } else if (_copyFileList[i].fileName.endsWith('.css')) {
  25784. type = 'text/css';
  25785. } else if (_copyFileList[i].fileName.endsWith('.json')) {
  25786. type = 'application/json';
  25787. } else if (_copyFileList[i].fileName.endsWith('.png')) {
  25788. type = 'image/png';
  25789. } else if (_copyFileList[i].fileName.endsWith('.jpg') || _copyFileList[i].fileName.endsWith('.jpeg')) {
  25790. type = 'image/jpeg';
  25791. } else if (_copyFileList[i].fileName.endsWith('.gif')) {
  25792. type = 'image/gif';
  25793. } else if (_copyFileList[i].fileName.endsWith('.svg')) {
  25794. type = 'image/svg+xml';
  25795. } else if (_copyFileList[i].fileName.endsWith('.html') || _copyFileList[i].fileName.endsWith('.htm')) {
  25796. type = 'text/html';
  25797. } else if (_copyFileList[i].fileName.endsWith('.txt')) {
  25798. type = 'text/plain';
  25799. } else if (_copyFileList[i].fileName.endsWith('.pdf')) {
  25800. type = 'application/pdf';
  25801. } else if (_copyFileList[i].fileName.endsWith('.mp3')) {
  25802. type = 'audio/mpeg';
  25803. } else if (_copyFileList[i].fileName.endsWith('.mp4')) {
  25804. type = 'video/mp4';
  25805. } else if (_copyFileList[i].fileName.endsWith('.zip')) {
  25806. type = 'application/zip';
  25807. } else if (_copyFileList[i].fileName.endsWith('.xml')) {
  25808. type = 'application/xml';
  25809. } else if (_copyFileList[i].fileName.endsWith('.csv')) {
  25810. type = 'text/csv';
  25811. } else if (_copyFileList[i].fileName.endsWith('.md')) {
  25812. type = 'text/markdown';
  25813. }
  25814. let _file = new File([blob], _copyFileList[i].fileName, {type: type, lastModified: new Date().getTime()});
  25815. promise.push(this.awsupload({file:_file,path:`${path}/${_copyFileList[i].fileName}`}).then(res=>{
  25816. delete _copyFileList[i].file;
  25817. _copyFileList[i].url = decodeURIComponent(res.Location);
  25818. }))
  25819. }
  25820. }
  25821. Promise.all(promise).then(res=>{
  25822. resolve(_copyFileList);
  25823. })
  25824. })
  25825. },
  25826. selectHtmlPageSuccess(data){
  25827. let _selectFile = data.find(i=>i.isSelect==="1");
  25828. if(!_selectFile){
  25829. this.changeId = "";
  25830. return this.$message.info(this.lang.ssNoPageSel)
  25831. }
  25832. console.log("_selectFile",_selectFile)
  25833. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25834. this.lineCount
  25835. ].chapterData.findIndex(i => i.type == 17 && i.id == this.changeId);
  25836. if (_index != -1) {
  25837. console.log("_index",_index)
  25838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25839. this.lineCount
  25840. ].chapterData[_index] = {
  25841. name: _selectFile.fileName,
  25842. title: _selectFile.fileName,
  25843. id:this.changeId,
  25844. url: _selectFile.url,
  25845. fileList:data,
  25846. type: 17
  25847. };
  25848. } else {
  25849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25850. this.lineCount
  25851. ].chapterData.push({
  25852. name: _selectFile.fileName,
  25853. title: _selectFile.fileName,
  25854. id:new Date().getTime(),
  25855. url: _selectFile.url,
  25856. fileList:data,
  25857. type: 17
  25858. });
  25859. }
  25860. this.changeId = "";
  25861. this.$forceUpdate();
  25862. this.$refs.selectHtmlPageDialogRef.close();
  25863. },
  25864. changeHTmlPage(itemTaskIndex,i){
  25865. let _data = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25866. itemTaskIndex
  25867. ].chapterData[i];
  25868. this.lineCount = itemTaskIndex;
  25869. this.changeId = _data.id;
  25870. this.$refs.selectHtmlPageDialogRef.open(_data.fileList);
  25871. }
  25872. },
  25873. beforeDestroy() {
  25874. // clearTimeout(this.timer);
  25875. // this.timer = null;
  25876. // clearInterval(this.timer2);
  25877. // this.timer2 = null;
  25878. clearInterval(this.pasteTimer);
  25879. this.pasteTimer = null;
  25880. },
  25881. beforeRouteLeave(to, from, next) {
  25882. // clearTimeout(this.timer);
  25883. // this.timer = null;
  25884. // clearInterval(this.timer2);
  25885. // this.timer2 = null;
  25886. clearInterval(this.pasteTimer);
  25887. this.pasteTimer = null;
  25888. next();
  25889. },
  25890. mounted(){
  25891. // 初始化需要从 lang 获取的数组
  25892. this.appendixType = [
  25893. {
  25894. label: this.lang.ssLessonPlan,
  25895. value: 0,
  25896. },
  25897. {
  25898. label: "PPT",
  25899. value: 1,
  25900. },
  25901. {
  25902. label: this.lang.ssEduCase,
  25903. value: 2,
  25904. },
  25905. {
  25906. label: this.lang.ssRubric,
  25907. value: 3,
  25908. },
  25909. {
  25910. label: this.lang.ssChatRecord,
  25911. value: 4,
  25912. },
  25913. ];
  25914. this.knowFileTypeArray1 = [this.lang.ssFirstVol, this.lang.ssSecondVol];
  25915. this.knowFileTypeArray = [this.lang.ssHomeworkOnly, this.lang.ssLessonPlan, this.lang.ssOther];
  25916. let _this = this
  25917. // 监听浏览器后退或者刷新等离开页面的操作
  25918. window.onbeforeunload = function(event) {
  25919. // 检查是否有未保存的更改
  25920. const message = _this.lang.ssUnsavedChanges;
  25921. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25922. event.returnValue = message; // 兼容大部分浏览器
  25923. console.log(message)
  25924. return message; // 兼容部分浏览器
  25925. };
  25926. const resizable = this.$el.querySelector('.resizable');
  25927. const resizer = this.$el.querySelector('.resizer');
  25928. const maxWidth = document.body.offsetWidth / 2;
  25929. const maxWidth2 = window.innerWidth / 2;
  25930. let startX, startWidth;
  25931. const mouseMoveHandler = (e) => {
  25932. e.preventDefault(); // 添加此行以防止选中其他文本
  25933. const dx = startX - e.clientX;
  25934. const newWidth = startWidth + dx;
  25935. if (newWidth >= 350 && newWidth <= maxWidth) {
  25936. resizable.style.minWidth = `${newWidth}px`;
  25937. }
  25938. };
  25939. const mouseUpHandler = () => {
  25940. document.removeEventListener('mousemove', mouseMoveHandler);
  25941. document.removeEventListener('mouseup', mouseUpHandler);
  25942. document.body.style.cursor = 'default';
  25943. };
  25944. const mouseDownHandler = (e) => {
  25945. e.preventDefault(); // 添加此行以防止选中其他文本
  25946. startX = e.clientX;
  25947. startWidth = resizable.getBoundingClientRect().width;
  25948. document.addEventListener('mousemove', mouseMoveHandler);
  25949. document.addEventListener('mouseup', mouseUpHandler);
  25950. document.body.style.cursor = 'ew-resize';
  25951. };
  25952. resizer.addEventListener('mousedown', mouseDownHandler);
  25953. const touchMoveHandler = (e) => {
  25954. e.preventDefault(); // 添加此行以防止选中其他文本
  25955. const dx = startX - e.touches[0].clientX;
  25956. const newWidth = startWidth + dx;
  25957. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25958. resizable.style.minWidth = `${newWidth}px`;
  25959. }
  25960. };
  25961. const touchEndHandler = () => {
  25962. document.removeEventListener('touchmove', touchMoveHandler);
  25963. document.removeEventListener('touchend', touchEndHandler);
  25964. document.body.style.cursor = 'default';
  25965. };
  25966. const touchStartHandler = (e) => {
  25967. e.preventDefault(); // 添加此行以防止选中其他文本
  25968. startX = e.touches[0].clientX;
  25969. startWidth = resizable.getBoundingClientRect().width;
  25970. document.addEventListener('touchmove', touchMoveHandler);
  25971. document.addEventListener('touchend', touchEndHandler);
  25972. document.body.style.cursor = 'ew-resize';
  25973. };
  25974. resizer.addEventListener('touchstart', touchStartHandler);
  25975. },
  25976. created() {
  25977. if(this.mergedList.includes(this.org) ){
  25978. this.isTeacherSee = true
  25979. }
  25980. if(this.lang.lang == 'com'){
  25981. this.languageSetting = 2;
  25982. }else if(this.lang.lang == 'hk'){
  25983. this.languageSetting = 1;
  25984. }else{
  25985. this.languageSetting = 0;
  25986. }
  25987. this.selectFileid();
  25988. // this.selectAiFileid();
  25989. this.selectKnowFileid();
  25990. this.getStudent();
  25991. this.getTeacher();
  25992. this.getClass();
  25993. this.selectGrage();
  25994. this.getTemplate();
  25995. this.getTipsTemplate();
  25996. // this.selectType();
  25997. this.selectEva();
  25998. if(this.istemplate == 1){
  25999. this.isOutline = true
  26000. this.isOutline2 = true
  26001. this.courseTextBool = true
  26002. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  26003. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  26004. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  26005. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  26006. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  26007. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  26008. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  26009. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  26010. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  26011. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  26012. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  26013. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  26014. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  26015. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  26016. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  26017. - 我们的课程主题可以如何与学生的实际生活联系起来?
  26018. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  26019. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  26020. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  26021. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  26022. - 学生个人最终要完成什么?学生小组最终要完成什么?
  26023. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  26024. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  26025. 讨论:<转文本内容>`
  26026. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  26027. }
  26028. this.loading = false;
  26029. // this.timer2 = setInterval(() => {
  26030. // this.selectEva();
  26031. // }, 5000);
  26032. // this.pasteTimer = setInterval(() => {
  26033. // this.getPaste();
  26034. // }, 1000);
  26035. this.pasteTimer = setInterval(() => {
  26036. this.getPaste2();
  26037. }, 500);
  26038. setTimeout(() => {
  26039. // this.selectAllType();
  26040. this.selectCourseDetail();
  26041. }, 500);
  26042. let _this = this;
  26043. window.pasteStage = function (json) {
  26044. _this.pasteStage(json);
  26045. };
  26046. window.pasteTask = function (json) {
  26047. _this.pasteTask(json);
  26048. };
  26049. },
  26050. };
  26051. </script>
  26052. <style scoped>
  26053. @media screen and (max-width: 1280px) {
  26054. .mbCss {
  26055. flex-direction: column !important;
  26056. }
  26057. .pjCss {
  26058. width: 100% !important;
  26059. }
  26060. .evaCss {
  26061. width: 100% !important;
  26062. margin-top: 10px;
  26063. }
  26064. }
  26065. .el-table>>>.even_row {
  26066. background-color: #f1f1f1 !important;
  26067. }
  26068. .dialog_diy>>>.el-dialog__header {
  26069. background: #3c3c3c !important;
  26070. padding: 15px 20px;
  26071. }
  26072. .dialog_diy>>>.el-dialog__title {
  26073. color: #fff;
  26074. }
  26075. .dialog_diy>>>.el-dialog__headerbtn {
  26076. top: 19px;
  26077. }
  26078. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  26079. color: #fff;
  26080. }
  26081. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  26082. color: #fff;
  26083. }
  26084. .dialog_diy>>>.el-dialog__body,
  26085. .dialog_diy>>>.el-dialog__footer {
  26086. background: #fafafa;
  26087. }
  26088. .dialog_diy3>>>.el-dialog__body,
  26089. .dialog_diy3>>>.el-dialog__footer {
  26090. background: #eee !important;
  26091. }
  26092. .dialog_diy3>>>.el-dialog__body {
  26093. padding: 20px 20px;
  26094. }
  26095. .dialog_diyStage>>>.el-dialog__body {
  26096. padding: 10px;
  26097. }
  26098. .source_diy>>>.el-dialog {
  26099. height: 100% !important;
  26100. margin: 0 auto !important;
  26101. }
  26102. .source_diy>>>.el-dialog__body {
  26103. height: calc(100% - 185px);
  26104. overflow: auto;
  26105. background: #e6eaf0;
  26106. }
  26107. .source_diy>>>.el-dialog__footer {
  26108. background: #e6eaf0 !important;
  26109. }
  26110. .left {
  26111. border-right: 1px solid rgb(60, 94, 143);
  26112. display: flex;
  26113. flex-direction: column;
  26114. align-items: center;
  26115. min-height: 600px;
  26116. width: 385px;
  26117. height: 80%;
  26118. }
  26119. .tips {
  26120. color: rgb(128, 128, 128);
  26121. font-size: 12px;
  26122. width: 270px;
  26123. margin: 40px;
  26124. }
  26125. .pb_content {
  26126. height: 100% !important;
  26127. /* margin: 0 20px 0 20px; */
  26128. }
  26129. .pb_content_body {
  26130. width: 100% !important;
  26131. height: 100%;
  26132. display: flex;
  26133. }
  26134. .info_solid {
  26135. width: 270px;
  26136. height: 30px;
  26137. border-left: 1px solid #bdbdbd;
  26138. margin: 10px 0px 10px 30px;
  26139. }
  26140. .info_steps {
  26141. width: 270px;
  26142. font-size: 0.875rem;
  26143. display: flex;
  26144. align-items: center;
  26145. }
  26146. .info_steps span:nth-child(1) {
  26147. width: 30px;
  26148. height: 30px;
  26149. background: rgba(0, 0, 0, 0.38);
  26150. display: block;
  26151. color: #fff;
  26152. border-radius: 40px;
  26153. text-align: center;
  26154. line-height: 30px;
  26155. }
  26156. .steps_active {
  26157. background: #3d67bc !important;
  26158. }
  26159. .info_steps span:nth-child(2) {
  26160. margin-left: 5px;
  26161. }
  26162. .right {
  26163. height: 100%;
  26164. width: 100%;
  26165. display: flex;
  26166. overflow: hidden;
  26167. flex-direction: column;
  26168. }
  26169. .leftBar{
  26170. width: 290px;
  26171. height: calc(100% - 50px);
  26172. overflow: auto;
  26173. border-radius: 5px;
  26174. margin: 25px auto;
  26175. box-sizing: border-box;
  26176. margin-right: 10px;
  26177. }
  26178. .leftBar2{
  26179. width: 400px;
  26180. min-width: 400px;
  26181. height: calc(100% - 50px);
  26182. overflow: auto;
  26183. border-radius: 5px;
  26184. margin: 25px auto;
  26185. box-sizing: border-box;
  26186. margin-right: 10px;
  26187. background: #fff;
  26188. padding: 5px;
  26189. border-radius: 5px;
  26190. }
  26191. .basic_box {
  26192. margin: 0 auto;
  26193. position: relative;
  26194. padding: 0 20px 0 20px;
  26195. }
  26196. .basic_box_success {
  26197. width: 100%;
  26198. min-height: 455px;
  26199. padding: 50px 0;
  26200. position: relative;
  26201. text-align: center;
  26202. border-bottom: 1px solid #bfbfbf;
  26203. box-sizing: border-box;
  26204. display: flex;
  26205. align-items: center;
  26206. flex-direction: column;
  26207. justify-content: center;
  26208. }
  26209. .info_title {
  26210. font-size: 1.5em;
  26211. margin-right: 25px;
  26212. /* margin: 20px 30px 20px 30px; */
  26213. }
  26214. .bInfo_title {
  26215. text-align: left;
  26216. margin: 10px 0;
  26217. }
  26218. .small_title {
  26219. font-size: 14px;
  26220. line-height: 40px;
  26221. }
  26222. .chapter_beizhu {
  26223. font-size: 12px;
  26224. font-weight: bold;
  26225. float: right;
  26226. color: rgb(128, 128, 128);
  26227. margin-top: 5px;
  26228. }
  26229. .chapter_uploadBox1 {
  26230. text-align: left;
  26231. background-color: rgb(242, 242, 242);
  26232. width: 100%;
  26233. height: 67px;
  26234. padding: 0px 15px;
  26235. border-radius: 8px;
  26236. overflow: hidden;
  26237. font-size: 16px;
  26238. box-sizing: border-box;
  26239. position: relative;
  26240. }
  26241. .chapter_add {
  26242. width: 100%;
  26243. height: 32px;
  26244. margin-top: 15px;
  26245. cursor: pointer;
  26246. }
  26247. .chapter_add_l {
  26248. margin-left: 5px;
  26249. width: 30px;
  26250. height: 30px;
  26251. float: left;
  26252. border: 1px solid #aaa;
  26253. color: #aaa;
  26254. border-radius: 50%;
  26255. font-size: 25px;
  26256. text-align: center;
  26257. }
  26258. .chapter_add_r {
  26259. font-size: 18px;
  26260. height: 40px;
  26261. line-height: 30px;
  26262. text-indent: 10px;
  26263. color: #aaa;
  26264. }
  26265. .chapter_add_r span {
  26266. font-size: 12px;
  26267. color: rgb(204, 204, 204);
  26268. }
  26269. .chapter_add_input {
  26270. display: none;
  26271. }
  26272. .line {
  26273. width: 85%;
  26274. margin: 0 auto;
  26275. border-top: 1px solid #e5e5e5;
  26276. margin-top: 20px;
  26277. }
  26278. .info_btnBox {
  26279. width: calc(100%);
  26280. display: flex;
  26281. justify-content: center;
  26282. height: 80px;
  26283. align-items: center;
  26284. background: #fff;
  26285. margin: 0 auto;
  26286. border-top: 2px solid rgb(228, 232, 237);
  26287. box-sizing: border-box;
  26288. }
  26289. .info_btnBox2 {
  26290. width: calc(100%);
  26291. display: flex;
  26292. justify-content: center;
  26293. height: 20px;
  26294. align-items: center;
  26295. background: #fff;
  26296. margin: 0 auto;
  26297. border-top: 2px solid rgb(228, 232, 237);
  26298. box-sizing: border-box;
  26299. overflow: hidden;
  26300. cursor: pointer;
  26301. }
  26302. .info_btnBox3 {
  26303. width: calc(100%);
  26304. display: flex;
  26305. justify-content: flex-end;
  26306. padding: 0 20px;
  26307. height: 60px;
  26308. align-items: center;
  26309. background: unset;
  26310. margin: 0 auto;
  26311. /* border-top: 1px solid rgb(228, 232, 237); */
  26312. box-sizing: border-box;
  26313. overflow: hidden;
  26314. cursor: pointer;
  26315. background: #fff;
  26316. border-radius: 10px;
  26317. }
  26318. .info_btn+.info_btn {
  26319. margin-left: 15px;
  26320. }
  26321. .info_btn,
  26322. .teacherWord {
  26323. color: #fff;
  26324. background-color: #0f7eff;
  26325. padding: 8px 24px;
  26326. font-size: 0.9375rem;
  26327. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  26328. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  26329. min-width: 64px;
  26330. font-weight: 500;
  26331. border-radius: 4px;
  26332. box-sizing: border-box;
  26333. border: none;
  26334. cursor: pointer;
  26335. }
  26336. .teacherWord {
  26337. width: 105px !important;
  26338. text-align: center !important;
  26339. line-height: 36px !important;
  26340. padding: 0 !important;
  26341. font-size: 14px !important;
  26342. margin: 10px 0 !important;
  26343. }
  26344. .template_box {
  26345. display: flex;
  26346. flex-wrap: wrap;
  26347. }
  26348. .wordTeacher {
  26349. display: flex;
  26350. flex-direction: column;
  26351. width: 100px;
  26352. height: 100px;
  26353. text-align: center;
  26354. font-size: 13px;
  26355. margin: 0 20px 20px 0;
  26356. background: #f0f4fa;
  26357. position: relative;
  26358. border-radius: 5px;
  26359. align-items: center;
  26360. justify-content: center;
  26361. border: 1px solid #cad1dc;
  26362. color: #0e1e33;
  26363. /* padding: 25px 0px; */
  26364. cursor: pointer;
  26365. }
  26366. .wordTeacher::after {
  26367. content: "";
  26368. display: block;
  26369. position: absolute;
  26370. width: 15px;
  26371. height: 15px;
  26372. right: 10px;
  26373. top: 10px;
  26374. background-image: url(../../../assets/icon/new/choose_a.png);
  26375. background-size: 100% 100%;
  26376. }
  26377. .wordTeacherA::after {
  26378. background-image: url(../../../assets/icon/new/choose_b.png);
  26379. }
  26380. .wordTeacher:nth-child(5n) {
  26381. margin-right: 0px;
  26382. }
  26383. .wordPic {
  26384. margin: 0 auto;
  26385. width: 30px;
  26386. height: 30px;
  26387. cursor: pointer;
  26388. }
  26389. .deleteWord {
  26390. width: 22px;
  26391. height: 22px;
  26392. position: absolute;
  26393. right: 5px;
  26394. top: -15px;
  26395. cursor: pointer;
  26396. display: none;
  26397. z-index: 999;
  26398. }
  26399. .wordPic>img,
  26400. .deleteWord>img,
  26401. .addToolImg>img {
  26402. width: 100%;
  26403. height: 100%;
  26404. }
  26405. .info_btn:hover {
  26406. background-color: #4f7cd5 !important;
  26407. }
  26408. .cru_selectBox {
  26409. display: flex;
  26410. margin: 15px 0;
  26411. flex-wrap: nowrap;
  26412. white-space: nowrap;
  26413. overflow: auto;
  26414. position: relative;
  26415. height: 40px;
  26416. max-width: calc(100% - 175px);
  26417. }
  26418. .cru_selectBox::-webkit-scrollbar {
  26419. /*滚动条整体样式*/
  26420. width: 6px;
  26421. /*高宽分别对应横竖滚动条的尺寸*/
  26422. height: 6px;
  26423. }
  26424. /*定义滚动条轨道 内阴影+圆角*/
  26425. .cru_selectBox::-webkit-scrollbar-track {
  26426. border-radius: 10px;
  26427. background-color: #eee;
  26428. }
  26429. /*定义滑块 内阴影+圆角*/
  26430. .cru_selectBox::-webkit-scrollbar-thumb {
  26431. border-radius: 10px;
  26432. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  26433. background-color: rgba(0, 0, 0, 0.1);
  26434. }
  26435. .cru_line {
  26436. position: absolute;
  26437. bottom: 0px;
  26438. transition: all 0.5s;
  26439. left: 0px;
  26440. width: 50px;
  26441. height: 4px;
  26442. left: 10px;
  26443. border-radius: 2px;
  26444. background: #3681fc;
  26445. }
  26446. .cru_select {
  26447. font-size: 18px;
  26448. margin-right: 20px;
  26449. margin-left: 5px;
  26450. cursor: pointer;
  26451. color: #0e1e33;
  26452. }
  26453. .cru_select:hover {
  26454. color: #3681fc !important;
  26455. }
  26456. .cru_selected {
  26457. color: #3681fc !important;
  26458. font-weight: bold;
  26459. }
  26460. .chapter_box {
  26461. margin-top: 10px;
  26462. width: 100%;
  26463. padding: 10px 20px;
  26464. background: #fff;
  26465. border-radius: 8px;
  26466. box-sizing: border-box;
  26467. }
  26468. .chapter_contentbox {
  26469. display: flex;
  26470. align-items: center;
  26471. /* margin-top: 15px; */
  26472. }
  26473. .chapter_contentbox .cc_title {
  26474. margin: 0px;
  26475. color: black;
  26476. display: block;
  26477. white-space: nowrap;
  26478. overflow: hidden;
  26479. text-overflow: ellipsis;
  26480. margin-right: 20px;
  26481. font-size: 18px;
  26482. height: 20px;
  26483. line-height: 22px;
  26484. min-width: fit-content;
  26485. display: flex;
  26486. }
  26487. .chapter_contentbox .cc_title::before {
  26488. content: "";
  26489. height: 100%;
  26490. width: 3px;
  26491. background: #3681fc;
  26492. border-radius: 3px;
  26493. opacity: 1;
  26494. display: block;
  26495. margin-right: 10px;
  26496. }
  26497. .chapter_contentbox .cc_input {
  26498. width: 100%;
  26499. display: flex;
  26500. }
  26501. .show_taskD {
  26502. min-width: fit-content;
  26503. margin-left: 10px;
  26504. display: flex;
  26505. align-items: center;
  26506. font-size: 14px;
  26507. cursor: pointer;
  26508. color: #717c8d;
  26509. }
  26510. .show_taskD>img {
  26511. width: 15px;
  26512. margin-right: 5px;
  26513. transition: 0.2s all;
  26514. transform: rotate(-90deg);
  26515. }
  26516. .show_taskD.show>img {
  26517. transform: rotate(0deg);
  26518. }
  26519. .show_toolD {
  26520. min-width: fit-content;
  26521. margin-left: 10px;
  26522. display: flex;
  26523. align-items: center;
  26524. font-size: 14px;
  26525. cursor: pointer;
  26526. color: #717c8d;
  26527. /* position: absolute;
  26528. right: 45px;
  26529. top: 5px; */
  26530. }
  26531. .show_toolD>img {
  26532. width: 15px;
  26533. margin-right: 5px;
  26534. transition: 0.2s all;
  26535. transform: rotate(-90deg);
  26536. }
  26537. .show_toolD.show>img {
  26538. transform: rotate(0deg);
  26539. }
  26540. .remove {
  26541. background-image: url("../../../assets/icon/new/delete_u.png");
  26542. cursor: pointer;
  26543. opacity: 0.5;
  26544. width: 30px;
  26545. min-width: 30px;
  26546. height: 30px;
  26547. background-size: 100% 100%;
  26548. background-repeat: no-repeat;
  26549. margin-left: 10px;
  26550. }
  26551. .remove1 {
  26552. background-image: url("../../../assets/remove1.png");
  26553. background-repeat: no-repeat;
  26554. background-position: 5px 10px;
  26555. width: 40px;
  26556. height: 50px;
  26557. cursor: pointer;
  26558. margin-left: 10px;
  26559. }
  26560. .binfo_input {
  26561. width: 100%;
  26562. margin: 0;
  26563. padding: 12px 14px;
  26564. display: block;
  26565. min-width: 0;
  26566. outline: none;
  26567. box-sizing: border-box;
  26568. background: none;
  26569. border: none;
  26570. border-radius: 4px;
  26571. background: #fff;
  26572. font-size: 16px;
  26573. resize: none;
  26574. font-family: "Microsoft YaHei";
  26575. min-height: 48px;
  26576. /* border: 1px solid #3682fc00; */
  26577. border: 1.5px solid #cad1dc;
  26578. }
  26579. .binfo_textarea {
  26580. border: 1.5px solid #cad1dc;
  26581. font-size: 16px;
  26582. resize: none;
  26583. /* background: #f6f6f6; */
  26584. font-family: "Microsoft YaHei";
  26585. }
  26586. .binfo_input:focus-visible {
  26587. border: 1.5px solid #3681fc !important;
  26588. }
  26589. .time {
  26590. display: flex;
  26591. margin: 35px 0 80px 0;
  26592. }
  26593. .chapter_btnbox {
  26594. width: 160px;
  26595. border-radius: 5px;
  26596. border: 2px dashed gray;
  26597. display: flex;
  26598. padding: 8px 50px;
  26599. align-items: center;
  26600. justify-content: center;
  26601. margin: 30px auto 0;
  26602. cursor: pointer;
  26603. }
  26604. .icon_add {
  26605. position: relative;
  26606. width: 24px;
  26607. padding-top: 20px;
  26608. border-radius: 100%;
  26609. border-width: 2px;
  26610. border-style: solid;
  26611. border-color: gray;
  26612. }
  26613. .icon_add i:nth-child(1) {
  26614. position: absolute;
  26615. left: 50%;
  26616. top: 50%;
  26617. height: 60%;
  26618. transform: translate(-50%, -50%);
  26619. border-width: 1px;
  26620. border-style: solid;
  26621. border-color: inherit;
  26622. }
  26623. .icon_add i:nth-child(2) {
  26624. position: absolute;
  26625. top: 50%;
  26626. left: 50%;
  26627. width: 60%;
  26628. transform: translate(-50%, -50%);
  26629. border-width: 1px;
  26630. border-style: solid;
  26631. border-color: inherit;
  26632. }
  26633. .chapter_btn_w {
  26634. font-size: 0.9375rem;
  26635. font-weight: bold;
  26636. color: gray;
  26637. margin-left: 20px;
  26638. }
  26639. .disUoloadSty>>>.el-icon-plus {
  26640. display: none !important;
  26641. /* 上传按钮隐藏 */
  26642. }
  26643. .imgLeft {
  26644. margin: 15px 0;
  26645. }
  26646. .add_info_box {
  26647. margin: 0 0 0 auto;
  26648. display: flex;
  26649. flex-wrap: wrap;
  26650. }
  26651. .add_info_box button {
  26652. margin: 0 5px 10px 0;
  26653. }
  26654. .add_info_box2 {
  26655. display: flex;
  26656. align-items: center;
  26657. flex-wrap: wrap;
  26658. }
  26659. .add_info_box2::after {
  26660. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26661. color: red;
  26662. font-size: 14px;
  26663. margin-bottom: 10px;
  26664. }
  26665. .add_chapters_box {
  26666. text-align: left;
  26667. background-color: #fff;
  26668. width: 100%;
  26669. border-radius: 4px;
  26670. font-size: 16px;
  26671. box-sizing: border-box;
  26672. position: relative;
  26673. padding: 0 15px;
  26674. height: auto;
  26675. overflow-y: auto;
  26676. overflow-x: hidden;
  26677. border: 1px solid #cad1dc;
  26678. }
  26679. .add_chapters_box.add_c_none {
  26680. display: flex;
  26681. justify-content: center;
  26682. align-items: center;
  26683. padding: 15px;
  26684. }
  26685. .add_c_none>img {
  26686. width: 25px;
  26687. }
  26688. .add_chapters_box.add_c_none>span {
  26689. font-size: 14px;
  26690. font-weight: 400;
  26691. margin: 0 0 5px 5px;
  26692. }
  26693. .homework_box {
  26694. display: flex;
  26695. align-items: flex-start;
  26696. flex-wrap: wrap;
  26697. margin: 15px 0 0 0;
  26698. flex-direction: column;
  26699. align-content: flex-start;
  26700. }
  26701. .course_homework {
  26702. display: flex;
  26703. justify-content: center;
  26704. flex-direction: row;
  26705. align-items: center;
  26706. margin: 0 10px 0 0;
  26707. }
  26708. .course_homework>>>.el-input__inner {
  26709. width: 140px;
  26710. margin-left: 15px;
  26711. }
  26712. .chapter_upload_move {
  26713. position: relative;
  26714. background-color: #fff;
  26715. position: absolute;
  26716. width: 100%;
  26717. top: 0px;
  26718. left: 0px;
  26719. border: 1px solid #eee;
  26720. border-radius: 5px;
  26721. transition: width 2s;
  26722. -moz-transition: width 2s;
  26723. -webkit-transition: width 2s;
  26724. -o-transition: width 2s;
  26725. }
  26726. .chapter_upload_l_i {
  26727. background-image: url("../../../assets/icon.png");
  26728. background-position: 3px -165px;
  26729. width: 30px;
  26730. height: 30px;
  26731. margin: 10px auto 0 auto;
  26732. }
  26733. .course_input_box {
  26734. display: flex;
  26735. margin-right: 20px;
  26736. min-width: 400px;
  26737. width: calc(100% - 350px);
  26738. align-items: center;
  26739. position: relative;
  26740. margin-bottom: 15px;
  26741. }
  26742. .course_input_box2 {
  26743. display: flex;
  26744. width: 100%;
  26745. align-items: center;
  26746. position: relative;
  26747. flex-wrap: wrap;
  26748. }
  26749. .course_input_box>.binfo_input {
  26750. width: calc(100%);
  26751. margin: 0;
  26752. border: 1.5px solid rgb(202, 209, 220);
  26753. border-radius: 5px;
  26754. font-weight: 600;
  26755. padding: 12px 14px 12px 71px;
  26756. }
  26757. .bb_courseIcon {
  26758. width: 57px;
  26759. height: 45px;
  26760. background: #f0f4fa;
  26761. border-radius: 5px 0px 0px 5px;
  26762. display: flex;
  26763. align-items: center;
  26764. justify-content: center;
  26765. border-right: 1.5px solid rgb(202, 209, 220);
  26766. box-sizing: border-box;
  26767. position: absolute;
  26768. left: 1.5px;
  26769. }
  26770. .bb_courseIcon>img {
  26771. width: 25px;
  26772. height: auto;
  26773. }
  26774. .big_box {
  26775. /* margin-top: 20px; */
  26776. display: flex;
  26777. justify-content: space-between;
  26778. /* border-bottom: 1px solid #E0E2ED; */
  26779. }
  26780. .left_first {
  26781. display: flex;
  26782. flex-direction: column;
  26783. flex-wrap: nowrap;
  26784. width: calc(100% - 310px);
  26785. padding: 20px;
  26786. box-sizing: border-box;
  26787. background: #fff;
  26788. border-radius: 5px;
  26789. }
  26790. .right_first {
  26791. width: 300px;
  26792. display: flex;
  26793. align-items: center;
  26794. justify-content: center;
  26795. /* border-left: 1px solid #E0E2ED; */
  26796. box-sizing: border-box;
  26797. padding: 20px;
  26798. flex-direction: column;
  26799. background: #fff;
  26800. border-radius: 5px;
  26801. }
  26802. .ai_box {
  26803. width: 204px;
  26804. display: flex;
  26805. justify-content: flex-end;
  26806. margin-bottom: 15px;
  26807. }
  26808. .ai_content {
  26809. display: flex;
  26810. align-items: center;
  26811. font-size: 14px;
  26812. padding: 7px 20px;
  26813. box-sizing: border-box;
  26814. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26815. border-radius: 12px;
  26816. font-weight: 700;
  26817. cursor: pointer;
  26818. }
  26819. .ai_content>img {
  26820. width: 40px;
  26821. margin-right: 5px;
  26822. }
  26823. .c_info_title {
  26824. padding: 15px 0 15px 0;
  26825. font-size: 16px;
  26826. font-weight: bold;
  26827. margin: 0 0 0 20px;
  26828. box-sizing: border-box;
  26829. display: flex;
  26830. align-items: center;
  26831. line-height: 20px;
  26832. }
  26833. .c_info_title::before {
  26834. content: "";
  26835. display: block;
  26836. width: 3px;
  26837. height: 20px;
  26838. background: #0061ff;
  26839. border-radius: 3px;
  26840. margin: 0 5px 0 0;
  26841. }
  26842. .right_title {
  26843. height: 30px;
  26844. padding: 15px 0 15px 20px;
  26845. border-bottom: 1px solid #f2f2f2;
  26846. font-size: 1.5em;
  26847. font-weight: bold;
  26848. color: #0f7eff;
  26849. margin: 0 auto;
  26850. }
  26851. .people {
  26852. border: 1px solid rgb(229 229 229);
  26853. /* height: 495px; */
  26854. height: 350px;
  26855. border-radius: 5px;
  26856. width: 100%;
  26857. overflow: auto;
  26858. }
  26859. .people_top {
  26860. display: flex;
  26861. width: 100%;
  26862. /* justify-content: space-between; */
  26863. /* align-items: center; */
  26864. flex-direction: column;
  26865. padding: 10px 10px 0;
  26866. box-sizing: border-box;
  26867. }
  26868. .people_nav,
  26869. .people_top_right {
  26870. /* padding: 20px 0 0 20px; */
  26871. }
  26872. .people_top_right {
  26873. height: 40px;
  26874. margin-bottom: 10px;
  26875. }
  26876. .people_search {
  26877. display: flex;
  26878. position: relative;
  26879. }
  26880. .people_search>>>.el-input__inner {
  26881. /* height: 25px; */
  26882. width: 100%;
  26883. }
  26884. .search_img {
  26885. width: 20px;
  26886. height: 20px;
  26887. position: absolute;
  26888. right: 10px;
  26889. top: 50%;
  26890. transform: translateY(-50%);
  26891. }
  26892. .search_img>img {
  26893. width: 100%;
  26894. height: 100%;
  26895. }
  26896. .people_name {
  26897. display: flex;
  26898. justify-content: flex-start;
  26899. padding: 20px 10px;
  26900. flex-direction: column;
  26901. flex-wrap: wrap;
  26902. }
  26903. .p_box {
  26904. position: relative;
  26905. }
  26906. .people_name>>>.el-checkbox {
  26907. width: 100%;
  26908. display: flex;
  26909. align-items: center;
  26910. margin-bottom: 10px;
  26911. }
  26912. .people_name>>>.el-checkbox__label {
  26913. text-overflow: ellipsis;
  26914. overflow: hidden;
  26915. width: calc(100%);
  26916. }
  26917. .people_name2>>>.el-checkbox__label {
  26918. width: calc(100% - 130px);
  26919. }
  26920. .inviteCode {
  26921. position: absolute;
  26922. right: 30px;
  26923. color: #237ade;
  26924. top: 0;
  26925. cursor: pointer;
  26926. font-size: 13px;
  26927. }
  26928. .noneInvite {
  26929. color: #a8a8a8;
  26930. }
  26931. .inviteImg {
  26932. position: absolute;
  26933. right: 5px;
  26934. top: 0;
  26935. width: 20px;
  26936. }
  26937. .right_img {
  26938. width: 150px;
  26939. height: 150px;
  26940. margin: 0 auto;
  26941. }
  26942. .right_img>img {
  26943. width: 100%;
  26944. height: 100%;
  26945. }
  26946. .number {
  26947. margin-top: 20px;
  26948. color: #4aa6ff;
  26949. text-decoration: underline;
  26950. }
  26951. .success_button {
  26952. display: flex;
  26953. text-align: center;
  26954. margin: 5% 0 auto;
  26955. flex-direction: row;
  26956. justify-content: center;
  26957. }
  26958. .look_course {
  26959. margin-right: 40px;
  26960. background: #3d67bc;
  26961. width: 200px;
  26962. height: 35px;
  26963. line-height: 35px;
  26964. color: #fff;
  26965. text-align: center;
  26966. font-size: 14px;
  26967. border-radius: 5px;
  26968. cursor: pointer;
  26969. }
  26970. .attend_others {
  26971. width: 250px;
  26972. background: #4fb13c;
  26973. height: 35px;
  26974. line-height: 35px;
  26975. color: #fff;
  26976. text-align: center;
  26977. font-size: 14px;
  26978. border-radius: 5px;
  26979. cursor: pointer;
  26980. }
  26981. .dialog_diy2>>>.el-dialog__body {
  26982. text-align: center;
  26983. }
  26984. .write_togother {
  26985. position: absolute;
  26986. right: 45px;
  26987. display: flex;
  26988. top: 5%;
  26989. }
  26990. .write_people {
  26991. font-size: 14px;
  26992. line-height: 50px;
  26993. padding-right: 10px;
  26994. }
  26995. .end_write {
  26996. background: #3d67bc;
  26997. color: #fff;
  26998. width: 100px;
  26999. height: 35px;
  27000. line-height: 35px;
  27001. text-align: center;
  27002. font-size: 14px;
  27003. border-radius: 5px;
  27004. cursor: pointer;
  27005. }
  27006. .chapter_upload+.chapter_upload {
  27007. /* margin-top: 15px; */
  27008. border-top: 1px solid #e7ebf1;
  27009. }
  27010. .chapter_upload {
  27011. height: 45px;
  27012. position: relative;
  27013. display: flex;
  27014. align-items: center;
  27015. width: 100%;
  27016. min-height: 45px;
  27017. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  27018. /* border-radius: 4px; */
  27019. /* overflow: hidden; */
  27020. box-sizing: border-box;
  27021. }
  27022. .chapter_upload_drag {
  27023. position: absolute;
  27024. cursor: pointer;
  27025. width: 16px;
  27026. height: 16px;
  27027. left: -9px;
  27028. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  27029. background-size: 100% 100%;
  27030. z-index: 10;
  27031. display: none;
  27032. }
  27033. .isNavStage>.chapter_upload_drag {
  27034. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  27035. }
  27036. .chapter_upload_t {
  27037. background-color: #fff;
  27038. position: absolute;
  27039. height: 100%;
  27040. top: 0px;
  27041. left: 0px;
  27042. box-sizing: border-box;
  27043. }
  27044. .chapter_upload_o {
  27045. width: 100%;
  27046. height: 100%;
  27047. position: relative;
  27048. z-index: 1;
  27049. }
  27050. .chapter_upload_ic {
  27051. margin: 0 15px 0px auto;
  27052. display: flex;
  27053. align-items: center;
  27054. }
  27055. .chapter_upload_type{
  27056. width: 80px;
  27057. min-width: 80px;
  27058. text-align: center;
  27059. font-size: 14px;
  27060. }
  27061. .chapter_upload_box_file{
  27062. height: calc(100% - 45px);
  27063. overflow: auto;
  27064. border-top: 1px solid #e7ebf1;
  27065. box-sizing: border-box;
  27066. }
  27067. .chapter_upload_ic_l {
  27068. width: 50px;
  27069. height: 50px;
  27070. float: left;
  27071. }
  27072. .chapter_upload_ic_l div {
  27073. width: 30px;
  27074. height: 35px;
  27075. background: url("../../../assets/icon/icon.png");
  27076. }
  27077. .chapter_upload_ic_edit {
  27078. height: 100%;
  27079. display: flex;
  27080. align-items: center;
  27081. cursor: pointer;
  27082. margin: 0 10px 0 0;
  27083. }
  27084. .chapter_upload_ic_edit div {
  27085. width: 18px;
  27086. height: 18px;
  27087. background-image: url("../../../assets/icon/new/edit_u.png");
  27088. background-size: 100% 100%;
  27089. }
  27090. .chapter_upload_ic_download {
  27091. height: 100%;
  27092. display: flex;
  27093. align-items: center;
  27094. cursor: pointer;
  27095. margin: 0;
  27096. }
  27097. .chapter_upload_ic_download div {
  27098. width: 18px;
  27099. height: 18px;
  27100. background-image: url("../../../assets/icon/course/download.svg");
  27101. background-size: 100% 100%;
  27102. }
  27103. .chapter_upload_ic_check {
  27104. height: 100%;
  27105. display: flex;
  27106. align-items: center;
  27107. cursor: pointer;
  27108. margin: 0 10px 0 0;
  27109. }
  27110. .chapter_upload_ic_check div {
  27111. width: 18px;
  27112. height: 18px;
  27113. background-image: url("../../../assets/icon/course/lookeye.svg");
  27114. background-size: 100% 100%;
  27115. }
  27116. .chapter_upload_ic_r {
  27117. height: 100%;
  27118. display: flex;
  27119. align-items: center;
  27120. cursor: pointer;
  27121. }
  27122. .chapter_upload_ic_r div {
  27123. width: 18px;
  27124. height: 18px;
  27125. background-image: url("../../../assets/icon/new/delete_u.png");
  27126. background-size: 100% 100%;
  27127. }
  27128. .chapter_upload_n {
  27129. display: flex;
  27130. text-indent: 10px;
  27131. text-decoration: none;
  27132. text-overflow: ellipsis;
  27133. white-space: nowrap;
  27134. overflow: hidden;
  27135. width: 55%;
  27136. margin-left: 10px;
  27137. cursor: pointer;
  27138. margin-top: 2px;
  27139. align-items: center;
  27140. }
  27141. .chapter_upload_n > .chapter_upload_box{
  27142. border: none;
  27143. outline: none;
  27144. max-width: 100%;
  27145. z-index: 99;
  27146. font-size: 14px;
  27147. white-space: nowrap;
  27148. overflow: hidden;
  27149. text-overflow: ellipsis;
  27150. color: #757575;
  27151. }
  27152. .chapter_upload_l_i2,
  27153. .chapter_upload_l_i3,
  27154. .chapter_upload_l_i8,
  27155. .chapter_upload_l_i6,
  27156. .chapter_upload_l_i12,
  27157. .chapter_upload_l_i14,
  27158. .chapter_upload_l_i15 {
  27159. width: 15px;
  27160. height: 15px;
  27161. background-size: 100% 100%;
  27162. }
  27163. .chapter_upload_l_i2 {
  27164. background-image: url("../../../assets/icon/new/u_word.png");
  27165. }
  27166. .chapter_upload_l_i3 {
  27167. background-image: url("../../../assets/icon/new/u_video.png");
  27168. }
  27169. .chapter_upload_l_i8 {
  27170. background-image: url("../../../assets/icon/new/u_url.png");
  27171. }
  27172. .chapter_upload_l_i14 {
  27173. background-image: url("../../../assets/icon/new/u_source.png");
  27174. }
  27175. .chapter_upload_l_i15 {
  27176. background-image: url("../../../assets/icon/new/appStore.png");
  27177. }
  27178. .chapter_upload_l_i6 {
  27179. background-image: url("../../../assets/icon/new/u_picture.png");
  27180. }
  27181. .chapter_upload_l_i12 {
  27182. background-image: url("../../../assets/icon/new/u_word.png");
  27183. }
  27184. .chapter_upload_l_i13 {
  27185. background-image: url("../../../assets/icon/new/u_img.png");
  27186. }
  27187. .chapter_upload_noSee {
  27188. background-image: url("../../../assets/icon/new/u_noUpload.png");
  27189. width: 18px;
  27190. height: 18px;
  27191. background-size: 100% 100%;
  27192. display: block;
  27193. margin-right: 10px;
  27194. }
  27195. .chapter_upload_ud {
  27196. display: flex;
  27197. flex-direction: row;
  27198. justify-content: center;
  27199. margin: 0 10px 0 0;
  27200. }
  27201. .chapter_upload_ud>.chapter_upload_up {
  27202. margin-bottom: 0;
  27203. margin-right: 10px;
  27204. }
  27205. .chapter_upload_down,
  27206. .chapter_upload_up {
  27207. width: 20px;
  27208. height: 20px;
  27209. background: #e4eaf2;
  27210. cursor: pointer;
  27211. margin: 0 auto;
  27212. border-radius: 5px;
  27213. display: flex;
  27214. justify-content: center;
  27215. align-items: center;
  27216. }
  27217. .chapter_upload_up::after,
  27218. .chapter_upload_down::after {
  27219. content: "";
  27220. background-image: url("../../../assets/icon/new/downBtn.png");
  27221. width: 13px;
  27222. height: 13px;
  27223. background-size: 100% 100%;
  27224. display: block;
  27225. }
  27226. .chapter_upload_up::after {
  27227. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  27228. }
  27229. .chapter_upload_up {
  27230. margin-bottom: 5px;
  27231. }
  27232. .chapter_upload_ud2 {
  27233. display: flex;
  27234. flex-direction: row;
  27235. justify-content: center;
  27236. margin: 0 10px 0 0;
  27237. }
  27238. .chapter_upload_ud2>.chapter_upload_up2 {
  27239. margin-bottom: 0;
  27240. margin-right: 10px;
  27241. }
  27242. .chapter_upload_down2,
  27243. .chapter_upload_up2 {
  27244. cursor: pointer;
  27245. margin: 0 auto;
  27246. border-radius: 5px;
  27247. display: flex;
  27248. justify-content: center;
  27249. align-items: center;
  27250. color: #717c8d;
  27251. font-size: 14px;
  27252. }
  27253. .chapter_upload_up2 {
  27254. margin-right: 10px;
  27255. }
  27256. .chapter_upload_up2::before,
  27257. .chapter_upload_down2::before {
  27258. content: "";
  27259. background-image: url("../../../assets/icon/new/c_down.png");
  27260. width: 14px;
  27261. height: 14px;
  27262. background-size: 100% 100%;
  27263. display: block;
  27264. margin-right: 5px;
  27265. }
  27266. .chapter_upload_up2::before {
  27267. background-image: url("../../../assets/icon/new/c_up.png") !important;
  27268. }
  27269. .addWordStyle {
  27270. display: flex;
  27271. flex-direction: row;
  27272. justify-content: flex-start;
  27273. overflow-x: auto;
  27274. white-space: nowrap;
  27275. flex-wrap: wrap;
  27276. }
  27277. /* table 样式 */
  27278. .cont>>>table {
  27279. border-top: 1px solid #ccc;
  27280. border-left: 1px solid #ccc;
  27281. }
  27282. .cont>>>table td,
  27283. .cont>>>table th {
  27284. border-bottom: 1px solid #ccc;
  27285. border-right: 1px solid #ccc;
  27286. /* padding: 20px 5px; */
  27287. padding: 5px 10px;
  27288. max-width: 0px;
  27289. height: 30px;
  27290. vertical-align: baseline;
  27291. }
  27292. .cont>>>table th {
  27293. border-bottom: 2px solid #ccc;
  27294. text-align: center;
  27295. }
  27296. /* blockquote 样式 */
  27297. .cont>>>blockquote {
  27298. display: block;
  27299. border-left: 8px solid #d0e5f2;
  27300. padding: 5px 10px;
  27301. margin: 10px 0;
  27302. line-height: 1.4;
  27303. font-size: 100%;
  27304. background-color: #f1f1f1;
  27305. }
  27306. /* code 样式 */
  27307. .cont>>>code {
  27308. display: inline-block;
  27309. /* *display: inline; */
  27310. zoom: 1;
  27311. background-color: #f1f1f1;
  27312. border-radius: 3px;
  27313. padding: 3px 5px;
  27314. margin: 0 3px;
  27315. }
  27316. .cont>>>pre code {
  27317. display: block;
  27318. }
  27319. /* ul ol 样式 */
  27320. .cont>>>ul,
  27321. ol {
  27322. margin: 10px 0 10px 20px;
  27323. }
  27324. .wordbox {
  27325. display: flex;
  27326. flex-wrap: wrap;
  27327. cursor: pointer;
  27328. width: 100%;
  27329. }
  27330. .checkword {
  27331. width: 22px;
  27332. height: 22px;
  27333. margin: 10px auto 0;
  27334. cursor: pointer;
  27335. }
  27336. .checkword img {
  27337. width: 100%;
  27338. }
  27339. .stepBg {
  27340. display: flex;
  27341. justify-content: space-between;
  27342. align-items: center;
  27343. background: #fff;
  27344. width: calc(100%);
  27345. margin: 0 auto;
  27346. }
  27347. .stepBorder {
  27348. height: 3px !important;
  27349. background: #cad1dc;
  27350. width: 100px !important;
  27351. margin: 0 15px !important;
  27352. position: relative;
  27353. }
  27354. .border-active {
  27355. background: #3681fc !important;
  27356. }
  27357. .border-active::before,
  27358. .border-active::after {
  27359. border-color: #3681fc !important;
  27360. }
  27361. .stepBorder::before,
  27362. .stepBorder::after {
  27363. content: "";
  27364. width: 9px;
  27365. height: 9px;
  27366. background: #ffffff;
  27367. opacity: 1;
  27368. border: 2px solid #acb4bf;
  27369. display: block;
  27370. box-sizing: border-box;
  27371. border-radius: 50%;
  27372. position: absolute;
  27373. top: 50%;
  27374. transform: translateY(-50%);
  27375. }
  27376. .stepBorder::after {
  27377. right: -9px;
  27378. }
  27379. .stepTop {
  27380. width: 100%;
  27381. /* border-radius: 10px; */
  27382. display: flex;
  27383. justify-content: center;
  27384. align-items: center;
  27385. flex-wrap: nowrap;
  27386. background: #fff;
  27387. /* top: 18%; */
  27388. height: 80px;
  27389. border-bottom: 2px solid rgb(228, 232, 237);
  27390. box-sizing: border-box;
  27391. }
  27392. .stepTop2 {
  27393. width: 100%;
  27394. /* border-radius: 10px; */
  27395. display: flex;
  27396. justify-content: center;
  27397. align-items: center;
  27398. flex-wrap: nowrap;
  27399. background: #fff;
  27400. /* top: 18%; */
  27401. height: 20px;
  27402. border-bottom: 2px solid rgb(228, 232, 237);
  27403. box-sizing: border-box;
  27404. overflow: hidden;
  27405. cursor: pointer;
  27406. }
  27407. .stepTop>div img {
  27408. width: 100%;
  27409. }
  27410. .stepTop>div {
  27411. height: 50px;
  27412. width: 180px;
  27413. cursor: pointer;
  27414. margin: 10px 0;
  27415. border-radius: 10px;
  27416. }
  27417. .first,
  27418. .second,
  27419. .third,
  27420. .four {
  27421. background: #3681fc;
  27422. height: 90px;
  27423. color: #fff;
  27424. display: flex;
  27425. flex-direction: row;
  27426. align-items: center;
  27427. justify-content: center;
  27428. }
  27429. .first>div:nth-child(1),
  27430. .second>div:nth-child(1),
  27431. .third>div:nth-child(1),
  27432. .four>div:nth-child(1) {
  27433. margin: 5px 10px 0 0;
  27434. width: 2rem;
  27435. }
  27436. .firstNo,
  27437. .secondNo,
  27438. .thirdNo,
  27439. .fourNo {
  27440. background: #e7e7e7;
  27441. color: #adadad;
  27442. display: flex;
  27443. flex-direction: row;
  27444. align-items: center;
  27445. justify-content: center;
  27446. }
  27447. .firstNo>div:nth-child(1),
  27448. .secondNo>div:nth-child(1),
  27449. .thirdNo>div:nth-child(1),
  27450. .fourNo>div:nth-child(1) {
  27451. margin: 5px 10px 0 0;
  27452. width: 2rem;
  27453. }
  27454. .uploadWidth>>>.el-upload {
  27455. width: 60px;
  27456. height: 60px;
  27457. position: relative;
  27458. }
  27459. .addPeople {
  27460. background: #fa6060;
  27461. width: 150px;
  27462. height: 40px;
  27463. color: #fff;
  27464. border-radius: 5px;
  27465. text-align: center;
  27466. line-height: 40px;
  27467. font-size: 14px;
  27468. cursor: pointer;
  27469. }
  27470. .kcImg {
  27471. width: 60px;
  27472. margin-left: 10px;
  27473. }
  27474. .zyImg {
  27475. width: 55px;
  27476. margin: 0 10px;
  27477. }
  27478. .deleteZy {
  27479. width: 20px;
  27480. position: absolute;
  27481. top: 5px;
  27482. right: 5px;
  27483. cursor: pointer;
  27484. }
  27485. .kcImg>img,
  27486. .zyImg>img,
  27487. .deleteZy>img {
  27488. width: 100%;
  27489. height: 100%;
  27490. }
  27491. .zyBox {
  27492. display: flex;
  27493. flex-direction: row;
  27494. align-items: center;
  27495. background: #67d37d;
  27496. color: #fff;
  27497. width: 210px;
  27498. margin: 20px 20px 0 0;
  27499. border-radius: 10px;
  27500. height: 70px;
  27501. position: relative;
  27502. }
  27503. .upCss {
  27504. display: flex;
  27505. flex-direction: row;
  27506. justify-content: flex-start;
  27507. }
  27508. .upCss>>>.el-icon-plus {
  27509. position: none !important;
  27510. width: 200px;
  27511. height: 100px;
  27512. display: flex;
  27513. flex-wrap: nowrap;
  27514. flex-direction: column;
  27515. align-items: center;
  27516. justify-content: center;
  27517. border: 1px dashed #ccc;
  27518. min-width: 78px;
  27519. min-height: 100px;
  27520. z-index: 999;
  27521. }
  27522. .upCss>>>.el-upload-list__item-name {
  27523. width: 100px;
  27524. white-space: nowrap;
  27525. overflow: hidden;
  27526. text-overflow: ellipsis;
  27527. }
  27528. .upCss>>>.el-upload-list__item .el-icon-close {
  27529. font-size: 20px;
  27530. z-index: 9999;
  27531. }
  27532. .addStageImg {
  27533. min-width: 20px;
  27534. min-height: 20px;
  27535. width: 20px;
  27536. height: 20px;
  27537. cursor: pointer;
  27538. }
  27539. .addHW {
  27540. width: 28px;
  27541. height: 28px;
  27542. cursor: pointer;
  27543. }
  27544. .addStageImg>img,
  27545. .addHW>img {
  27546. width: 100%;
  27547. height: 100%;
  27548. }
  27549. .addNewPP>>>.el-dialog__body {
  27550. padding: 5px 20px;
  27551. }
  27552. .addNewPP>>>.el-dialog {
  27553. margin-top: 5vh !important;
  27554. }
  27555. .addNewPP2>>>.el-dialog__body {
  27556. padding: 5px 0;
  27557. }
  27558. .addNewPP2>>>.el-dialog {
  27559. margin-top: 5vh !important;
  27560. }
  27561. .isHeight {
  27562. height: 680px;
  27563. }
  27564. .toolChoose {
  27565. display: flex;
  27566. /* width: 100%; */
  27567. flex-direction: row;
  27568. flex-wrap: wrap;
  27569. }
  27570. .tool,
  27571. .isToolChoose {
  27572. display: flex;
  27573. flex-direction: column;
  27574. flex-wrap: nowrap;
  27575. width: fit-content;
  27576. margin: 10px 0 10px 0;
  27577. align-items: center;
  27578. border: 2px solid #dbdbdb00;
  27579. padding: 10px 20px;
  27580. border-radius: 5px;
  27581. cursor: pointer;
  27582. /* box-shadow: 0 0 2px 0px #dedede; */
  27583. position: relative;
  27584. box-sizing: border-box;
  27585. }
  27586. .tool:hover {
  27587. border: 2px solid #a5c7ff;
  27588. }
  27589. .tool:hover>.noCTool {
  27590. display: block;
  27591. opacity: 0.5;
  27592. }
  27593. .isToolChoose {
  27594. border: 2px solid #438aff !important;
  27595. box-shadow: 0 0 2px 0px #438aff;
  27596. opacity: 1 !important;
  27597. }
  27598. .isCTool,
  27599. .noCTool {
  27600. width: 30px;
  27601. height: 30px;
  27602. position: absolute;
  27603. top: -4px;
  27604. right: -4px;
  27605. }
  27606. .noCTool {
  27607. display: none;
  27608. }
  27609. .isCTool>img,
  27610. .noCTool>img {
  27611. width: 100%;
  27612. height: 100%;
  27613. }
  27614. .tool+.tool {
  27615. margin-right: 10px;
  27616. }
  27617. .whiteBIcon {
  27618. width: 60px;
  27619. cursor: pointer;
  27620. display: flex;
  27621. flex-direction: column;
  27622. flex-wrap: nowrap;
  27623. align-items: center;
  27624. font-size: 14px;
  27625. }
  27626. .whiteBIcon>img,
  27627. .toolIcon>img,
  27628. .arrow>img {
  27629. width: 100%;
  27630. height: 100%;
  27631. }
  27632. .check img {
  27633. width: 20px;
  27634. height: 20px;
  27635. }
  27636. .whiteBIcon>img {
  27637. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27638. border-radius: 15px;
  27639. }
  27640. .whiteBIcon>div:nth-child(2) {
  27641. height: 20px;
  27642. line-height: 20px;
  27643. text-align: center;
  27644. }
  27645. .check {
  27646. /* width: 20px;
  27647. height: 20px; */
  27648. cursor: pointer;
  27649. margin: 10px 0 0;
  27650. }
  27651. .checkDiv {
  27652. display: flex;
  27653. align-items: center;
  27654. }
  27655. .checkDiv span {
  27656. margin-left: 5px;
  27657. color: #858585;
  27658. }
  27659. .customWidth>>>.el-dialog {
  27660. min-width: 600px !important;
  27661. }
  27662. .CollaborativeCss {
  27663. width: 100%;
  27664. display: flex;
  27665. justify-content: center;
  27666. align-items: center;
  27667. box-sizing: border-box;
  27668. padding: 10px 0;
  27669. cursor: pointer;
  27670. }
  27671. .CollaborativeCss >>> .el-tooltip {
  27672. overflow: hidden;
  27673. white-space: nowrap;
  27674. text-overflow: ellipsis;
  27675. }
  27676. .CollaborativeCss2 {
  27677. background: #e0eafb;
  27678. color: #3681fc;
  27679. font-weight: 700;
  27680. border-radius: 5px;
  27681. }
  27682. .a_addBox {
  27683. margin: 10px 0;
  27684. background: #fff;
  27685. padding: 15px;
  27686. /* max-height: 600px; */
  27687. overflow: auto;
  27688. }
  27689. .a_add_box {
  27690. border-bottom: 2px solid #eee;
  27691. padding-bottom: 25px;
  27692. }
  27693. .a_add_head {
  27694. display: flex;
  27695. align-items: center;
  27696. justify-content: space-between;
  27697. margin: 10px 0 0 0;
  27698. font-size: 18px;
  27699. }
  27700. .a_add_checkType {
  27701. margin-top: 10px;
  27702. display: flex;
  27703. font-size: 14px;
  27704. align-items: center;
  27705. }
  27706. .a_add_checkType span {
  27707. box-sizing: border-box;
  27708. padding: 0 0 5px 0;
  27709. cursor: pointer;
  27710. }
  27711. .a_add_checkType span+span {
  27712. margin-left: 10px;
  27713. }
  27714. .a_add_checkType .active {
  27715. border-bottom: 2px solid #409eff;
  27716. color: #409eff;
  27717. }
  27718. .a_add_head .a_add_head_input {
  27719. /* width: 540px; */
  27720. width: 100%;
  27721. }
  27722. .a_add_head .a_add_head_div {
  27723. display: flex;
  27724. align-items: center;
  27725. justify-content: space-between;
  27726. }
  27727. .a_add_body {
  27728. display: flex;
  27729. /* align-items: center; */
  27730. align-items: flex-end;
  27731. }
  27732. .a_add_input {
  27733. display: flex;
  27734. align-items: center;
  27735. flex-wrap: wrap;
  27736. }
  27737. .a_add_input_choice {
  27738. flex-direction: column;
  27739. margin-right: 10px;
  27740. }
  27741. .a_add_input_choice>>>.el-radio {
  27742. display: flex;
  27743. align-items: center;
  27744. flex-direction: row-reverse;
  27745. margin: 30px 0 0 0;
  27746. position: relative;
  27747. }
  27748. .a_add_input_choice>>>.el-checkbox {
  27749. display: flex;
  27750. align-items: center;
  27751. flex-direction: row-reverse;
  27752. margin: 30px 0 0 0;
  27753. position: relative;
  27754. }
  27755. .width100 {
  27756. width: 100%;
  27757. }
  27758. .a_add_input .a_add_persent {
  27759. width: 100%;
  27760. }
  27761. .a_add_persent_div {
  27762. width: 100%;
  27763. display: flex;
  27764. align-items: center;
  27765. }
  27766. .a_add_persent_div span {
  27767. margin: 5px 0;
  27768. }
  27769. .a_add_persent_div span:nth-child(1) {
  27770. width: 30%;
  27771. }
  27772. .a_add_persent_div span:nth-child(2) {
  27773. width: 7%;
  27774. }
  27775. .a_add_persent_div span:nth-child(3) {
  27776. width: 40%;
  27777. }
  27778. .a_add_body_div {
  27779. display: flex;
  27780. align-items: center;
  27781. justify-content: center;
  27782. /* flex-direction: column; */
  27783. position: absolute;
  27784. right: -20px;
  27785. transform: translateX(100%);
  27786. }
  27787. .a_add_body_div>>>.el-button--primary {
  27788. background: #466b99;
  27789. border: none;
  27790. }
  27791. .all_choose {
  27792. display: flex;
  27793. flex-direction: row;
  27794. align-items: flex-start;
  27795. width: 100%;
  27796. }
  27797. .all_choose+.all_choose {
  27798. /* margin-top: 10px */
  27799. }
  27800. .all_choose>span {
  27801. min-width: fit-content;
  27802. display: block;
  27803. white-space: nowrap;
  27804. overflow: hidden;
  27805. text-overflow: ellipsis;
  27806. margin-right: 20px;
  27807. font-weight: bold;
  27808. font-size: 14px;
  27809. }
  27810. .all_choose>>>.el-checkbox-group {
  27811. display: flex;
  27812. flex-direction: row;
  27813. width: 100%;
  27814. flex-wrap: wrap;
  27815. align-content: center;
  27816. justify-content: flex-start;
  27817. align-items: center;
  27818. margin-top: 3px;
  27819. }
  27820. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27821. margin-bottom: 10px;
  27822. display: flex;
  27823. flex-direction: row;
  27824. align-items: center;
  27825. margin-right: 10px;
  27826. }
  27827. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27828. min-width: 80px;
  27829. overflow: hidden;
  27830. /* width: 80px; */
  27831. text-overflow: ellipsis;
  27832. white-space: nowrap;
  27833. }
  27834. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27835. width: auto;
  27836. }
  27837. .choose>div:nth-child(3)>span {
  27838. /* letter-spacing: 0 !important; */
  27839. }
  27840. .choose {
  27841. display: flex;
  27842. flex-direction: column;
  27843. flex-wrap: nowrap;
  27844. height: 100%;
  27845. justify-content: space-evenly;
  27846. align-items: flex-start;
  27847. }
  27848. .both {
  27849. display: flex;
  27850. flex-direction: row;
  27851. flex-wrap: wrap;
  27852. width: 100%;
  27853. align-items: center;
  27854. justify-content: flex-start;
  27855. margin: 0 0 15px;
  27856. }
  27857. .notice>>>.el-dialog {
  27858. width: 500px !important;
  27859. text-align: center;
  27860. }
  27861. .notice>>>.el-button {
  27862. margin-top: 20px;
  27863. }
  27864. .whiteBg {
  27865. /* background: #fff; */
  27866. border-radius: 10px;
  27867. }
  27868. .wb_j_box {
  27869. display: flex;
  27870. width: 100%;
  27871. padding: 0 20px 0;
  27872. box-sizing: border-box;
  27873. }
  27874. .wb_j_box_content {
  27875. width: calc(100% - 55% - 100px);
  27876. display: flex;
  27877. align-items: center;
  27878. }
  27879. .wb_j_box_p_box {
  27880. max-width: calc(100% - 200px);
  27881. word-break: break-all;
  27882. overflow: hidden;
  27883. margin: 0 0 0 10px;
  27884. font-size: 14px;
  27885. color: #6e6e6e;
  27886. z-index: 999;
  27887. }
  27888. .chooseWho {
  27889. display: flex;
  27890. gap:15px;
  27891. /* width: 410px; */
  27892. flex-direction: row;
  27893. flex-wrap: nowrap;
  27894. justify-content: space-between;
  27895. padding-bottom: 10px;
  27896. }
  27897. .chooseWho>div {
  27898. cursor: pointer;
  27899. padding-bottom: 10px;
  27900. font-weight: bold;
  27901. }
  27902. .isChooseActive {
  27903. color: #3e88f4;
  27904. border-bottom: 2px solid #2f80f3;
  27905. }
  27906. .toolSort {
  27907. display: flex;
  27908. flex-direction: row;
  27909. flex-wrap: wrap;
  27910. justify-content: flex-start;
  27911. align-items: flex-start;
  27912. }
  27913. .toolSort>div {
  27914. margin-right: 10px;
  27915. }
  27916. .tools {
  27917. width: 100%;
  27918. display: flex;
  27919. flex-direction: column;
  27920. flex-wrap: nowrap;
  27921. align-items: flex-start;
  27922. }
  27923. .leftTools,
  27924. .rightTools {
  27925. width: 50%;
  27926. }
  27927. .leftTools+.leftTools {
  27928. border-top: 1px solid #dbdbdb;
  27929. padding-top: 30px;
  27930. }
  27931. .rightTools {
  27932. display: flex;
  27933. flex-direction: row;
  27934. flex-wrap: nowrap;
  27935. justify-content: space-around;
  27936. }
  27937. .firstToolList {
  27938. display: flex;
  27939. flex-direction: column;
  27940. flex-wrap: nowrap;
  27941. align-items: center;
  27942. }
  27943. .iconList {
  27944. display: flex;
  27945. flex-direction: row;
  27946. flex-wrap: wrap;
  27947. justify-content: flex-start;
  27948. align-items: center;
  27949. margin: 20px 0 5px 0;
  27950. width: 240px;
  27951. min-width: 240px;
  27952. }
  27953. .iconTool {
  27954. display: flex;
  27955. flex-direction: column;
  27956. flex-wrap: nowrap;
  27957. align-items: center;
  27958. justify-content: flex-start;
  27959. margin: 15px 10px;
  27960. }
  27961. .toolIcon {
  27962. width: 50px;
  27963. }
  27964. .taskBorder {
  27965. /* border: 1px solid #CAD1DC; */
  27966. border-radius: 10px;
  27967. margin-top: 10px;
  27968. min-height: 670px;
  27969. position: relative;
  27970. background: #fff;
  27971. padding: 20px;
  27972. overflow: hidden;
  27973. box-sizing: border-box;
  27974. }
  27975. .smallTaskBorder {
  27976. height: 405px;
  27977. min-height: 405px !important;
  27978. overflow: hidden;
  27979. }
  27980. /* .taskBorder>div {
  27981. padding: 30px 30px 10px;
  27982. } */
  27983. .addTaskBorder {
  27984. /* border: 2px solid #5E9AFC; */
  27985. border-radius: 8px;
  27986. margin-top: 10px;
  27987. cursor: pointer;
  27988. /* height: 50px;
  27989. line-height: 50px; */
  27990. background: #fff;
  27991. padding: 15px 0;
  27992. display: flex;
  27993. align-items: center;
  27994. justify-content: center;
  27995. }
  27996. /* .addTaskBorder>div {
  27997. margin: 0 auto;
  27998. display: flex;
  27999. align-items: center;
  28000. justify-content: center;
  28001. }
  28002. .addTaskBorder>div>img {
  28003. width: 20px;
  28004. }
  28005. .addTaskBorder>div>span {
  28006. font-size: 16px;
  28007. margin-left: 10px;
  28008. color: #5E9AFC;
  28009. } */
  28010. .funBlock {
  28011. display: flex;
  28012. padding: 15px 0;
  28013. flex-direction: row;
  28014. justify-content: center;
  28015. align-items: center;
  28016. position: absolute;
  28017. right: 0;
  28018. bottom: 0;
  28019. background: #fff;
  28020. width: 100%;
  28021. height: 60px;
  28022. z-index: 9;
  28023. }
  28024. .fold {
  28025. display: flex;
  28026. margin: 0 20px;
  28027. flex-direction: row;
  28028. align-items: center;
  28029. cursor: pointer;
  28030. color: #2b7bff;
  28031. }
  28032. .arrow {
  28033. margin-right: 8px;
  28034. width: 16px;
  28035. height: 16px;
  28036. min-width: 16px;
  28037. min-height: 16px;
  28038. background-size: 100% 100%;
  28039. display: block;
  28040. background-image: url(../../../assets/icon/new/u_up.png);
  28041. /* border-left: 7px solid transparent;
  28042. border-bottom: 7px solid #717C8D;
  28043. border-top: 0px solid transparent;
  28044. border-right: 7px solid transparent; */
  28045. /* box-sizing: border-box; */
  28046. transition: all 0.3s;
  28047. }
  28048. .arrowZ {
  28049. transform: rotate(180deg);
  28050. }
  28051. .addToolFun {
  28052. display: flex;
  28053. width: 150px;
  28054. flex-direction: row;
  28055. align-items: center;
  28056. justify-content: center;
  28057. border: 2px dashed #cad1dc;
  28058. border-radius: 5px;
  28059. height: 50px;
  28060. margin: 35px auto 0;
  28061. cursor: pointer;
  28062. }
  28063. .addToolFun2 {
  28064. display: flex;
  28065. width: 150px;
  28066. border: 2px dashed #cad1dc;
  28067. flex-direction: row;
  28068. align-items: center;
  28069. justify-content: center;
  28070. border-radius: 5px;
  28071. height: 50px;
  28072. margin: 0 auto 0;
  28073. cursor: pointer;
  28074. }
  28075. .addToolFun2>div,
  28076. .addToolFun>div {
  28077. display: flex;
  28078. line-height: 50px;
  28079. }
  28080. .addToolImg {
  28081. width: 20px;
  28082. height: 20px;
  28083. margin-right: 10px;
  28084. }
  28085. .addToolsDia>>>.el-dialog__body {
  28086. padding: 20px;
  28087. }
  28088. .addToolsDia>>>.el-dialog__body>.toolChoose {
  28089. padding: 0;
  28090. }
  28091. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  28092. padding: 0;
  28093. border-bottom: none;
  28094. margin-bottom: 0;
  28095. }
  28096. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  28097. width: 100%;
  28098. }
  28099. .lineCss>>>.el-form-item__label {
  28100. width: auto !important;
  28101. }
  28102. .lineCss>>>.el-form-item__content {
  28103. margin-left: 50px !important;
  28104. }
  28105. .newSteps {
  28106. display: flex;
  28107. width: 100% !important;
  28108. /* height: 80px; */
  28109. cursor: pointer;
  28110. margin: 10px 0;
  28111. border-radius: 10px;
  28112. flex-direction: row;
  28113. align-content: center;
  28114. justify-content: center;
  28115. align-items: center;
  28116. margin: 0 !important;
  28117. }
  28118. /* 评价样式 */
  28119. .elist_css {
  28120. padding-bottom: 75px !important;
  28121. }
  28122. .elist_title {
  28123. margin-bottom: 10px;
  28124. }
  28125. .elist_input {
  28126. width: 100%;
  28127. }
  28128. .elist_input_box {
  28129. display: flex;
  28130. align-items: center;
  28131. flex-wrap: wrap;
  28132. }
  28133. .elist_input_box+.elist_input_box {
  28134. margin-top: 30px;
  28135. }
  28136. .elist_input .elist_input_box input {
  28137. font: inherit;
  28138. color: currentColor;
  28139. width: 100%;
  28140. /* max-width: calc(100% - 385px); */
  28141. max-width: calc(100% - 150px);
  28142. padding: 8px 14px;
  28143. display: block;
  28144. min-width: 0;
  28145. outline: none;
  28146. border: 1px solid rgba(0, 0, 0, 0.23);
  28147. border-radius: 4px;
  28148. box-sizing: border-box;
  28149. background: #fff;
  28150. margin: 0 20px 0 0;
  28151. }
  28152. .elist_input .elist_input_box span {
  28153. height: 36px;
  28154. line-height: 36px;
  28155. color: rgb(82, 82, 82);
  28156. min-width: 80px;
  28157. flex-shrink: 0;
  28158. }
  28159. .elist_input .elist_input_box .remove {
  28160. height: 20px;
  28161. width: 20px;
  28162. min-height: 20px;
  28163. min-width: 20px;
  28164. background-size: 100% 100%;
  28165. background-position: unset;
  28166. margin-left: 5px;
  28167. }
  28168. .elist_input_box>>>.el-rate {
  28169. display: flex;
  28170. height: 36px;
  28171. align-items: center;
  28172. }
  28173. .elist_input_box .elist_inptu_text {
  28174. width: 100%;
  28175. display: flex;
  28176. align-items: center;
  28177. margin-top: 10px;
  28178. }
  28179. .elist_input_box .elist_inptu_text input {
  28180. /* width: 500px; */
  28181. width: 100%;
  28182. max-width: unset;
  28183. }
  28184. .elist_input_box>>>.el-rate__icon {
  28185. font-size: 24px;
  28186. }
  28187. .elist_btn {
  28188. margin-top: 10px;
  28189. }
  28190. .lineTitle {
  28191. /* margin-top: 15px; */
  28192. /* width: 160px; */
  28193. font-size: 16px;
  28194. display: flex;
  28195. align-items: center;
  28196. line-height: 20px;
  28197. }
  28198. .lineTitle::before {
  28199. content: "";
  28200. display: block;
  28201. width: 3px;
  28202. height: 20px;
  28203. background: #0061ff;
  28204. border-radius: 3px;
  28205. margin: 0 5px 0 0;
  28206. }
  28207. .clineTitle::before {
  28208. content: "";
  28209. display: block;
  28210. min-width: 10px;
  28211. width: 10px;
  28212. height: 10px;
  28213. background: #0061ff;
  28214. border-radius: 50%;
  28215. margin: 0 5px 0 0;
  28216. }
  28217. .courseTop {
  28218. display: flex;
  28219. flex-direction: row;
  28220. justify-content: space-between;
  28221. align-items: center;
  28222. width: calc(100%);
  28223. margin: 0 auto;
  28224. padding: 10px 20px;
  28225. box-sizing: border-box;
  28226. position: absolute;
  28227. top: 0;
  28228. }
  28229. .stepsNav {
  28230. display: flex;
  28231. flex-direction: row;
  28232. justify-content: flex-start;
  28233. align-items: center;
  28234. }
  28235. .stepsWord {
  28236. font-size: 18px;
  28237. color: #fff;
  28238. font-weight: bold;
  28239. margin-left: auto;
  28240. background: rgb(15, 126, 255);
  28241. border-radius: 5px;
  28242. padding: 3px 25px;
  28243. box-sizing: border-box;
  28244. }
  28245. .stepBox {
  28246. width: calc(100% - 40px);
  28247. height: calc(100%);
  28248. overflow: hidden;
  28249. border-radius: 5px;
  28250. margin: 0 auto;
  28251. }
  28252. .rightBox {
  28253. width: calc(100%);
  28254. background: #f0f2f5;
  28255. /* border-radius: 10px; */
  28256. overflow: auto;
  28257. height: calc(100% - 150px);
  28258. margin: 0 auto;
  28259. position: relative;
  28260. box-sizing: border-box;
  28261. }
  28262. .e_add_top {
  28263. display: flex;
  28264. justify-content: space-between;
  28265. background: #fff;
  28266. position: absolute;
  28267. right: 20px;
  28268. height: 50px;
  28269. align-items: center;
  28270. }
  28271. .e_add_title2 {
  28272. display: flex;
  28273. align-items: center;
  28274. }
  28275. .e_add_title2 span {
  28276. width: 40px;
  28277. }
  28278. .e_add_title {
  28279. display: flex;
  28280. align-items: center;
  28281. color: #b8b8b8;
  28282. font-size: 18px;
  28283. position: relative;
  28284. height: 40px;
  28285. }
  28286. .e_add_title span {
  28287. margin-right: 10px;
  28288. }
  28289. .e_add_title .el_input {
  28290. width: 300px;
  28291. }
  28292. .e_add_title>>>.el-input__inner {
  28293. width: 400px;
  28294. }
  28295. .e_add_btn {}
  28296. .e_add_content {
  28297. display: flex;
  28298. width: 100%;
  28299. }
  28300. .e_add_list {
  28301. background: #fff;
  28302. height: 500px;
  28303. width: 210px;
  28304. position: relative;
  28305. margin: 15px 5px 0 0;
  28306. flex-shrink: 0;
  28307. display: flex;
  28308. flex-direction: column;
  28309. }
  28310. .e_add_list_title {
  28311. font-size: 20px;
  28312. width: 100%;
  28313. box-sizing: border-box;
  28314. padding: 15px 40px;
  28315. text-align: center;
  28316. border-bottom: 1px solid #eaeaea;
  28317. position: relative;
  28318. display: flex;
  28319. align-items: center;
  28320. justify-content: center;
  28321. height: 57px;
  28322. background: #f6f6f6;
  28323. }
  28324. .e_add_list_title span {
  28325. overflow: hidden;
  28326. white-space: nowrap;
  28327. text-overflow: ellipsis;
  28328. }
  28329. .e_add_list_title img {
  28330. position: absolute;
  28331. right: 15px;
  28332. width: 25px;
  28333. cursor: pointer;
  28334. top: 50%;
  28335. transform: translateY(-50%);
  28336. }
  28337. .e_add_list_body {
  28338. height: calc(100% - 187px);
  28339. overflow: auto;
  28340. }
  28341. .e_add_list_child {
  28342. width: 100%;
  28343. display: flex;
  28344. align-items: center;
  28345. justify-content: center;
  28346. position: relative;
  28347. box-sizing: border-box;
  28348. padding: 15px 40px;
  28349. text-align: center;
  28350. }
  28351. .e_add_list_child span {
  28352. overflow: hidden;
  28353. white-space: nowrap;
  28354. text-overflow: ellipsis;
  28355. cursor: pointer;
  28356. }
  28357. .e_add_list_child img {
  28358. position: absolute;
  28359. right: 10px;
  28360. width: 21px;
  28361. cursor: pointer;
  28362. top: 50%;
  28363. transform: translateY(-50%);
  28364. }
  28365. .e_add_list_child+.e_add_list_child {
  28366. border-top: 1px solid #eaeaea;
  28367. }
  28368. .e_add_list_child .active {
  28369. color: #409eff;
  28370. }
  28371. .e_add_list_btn {
  28372. position: absolute;
  28373. bottom: 0;
  28374. height: 50px;
  28375. background: rgb(120, 120, 254);
  28376. width: 100%;
  28377. color: #fff;
  28378. font-size: 16px;
  28379. text-align: center;
  28380. line-height: 50px;
  28381. cursor: pointer;
  28382. }
  28383. .e_add_list_detail {
  28384. position: absolute;
  28385. bottom: 0;
  28386. height: 130px;
  28387. background: rgb(120, 120, 254);
  28388. width: 100%;
  28389. color: #fff;
  28390. font-size: 16px;
  28391. display: flex;
  28392. align-items: center;
  28393. justify-content: center;
  28394. }
  28395. .e_add_list_detail textarea {
  28396. height: 90%;
  28397. width: 95%;
  28398. border: none;
  28399. resize: none;
  28400. outline: none;
  28401. padding: 5px;
  28402. box-sizing: border-box;
  28403. }
  28404. .e_add_list_pbox {
  28405. width: 100%;
  28406. }
  28407. .e_add_list_pbox_title {
  28408. height: 50px;
  28409. background: #fff;
  28410. display: flex;
  28411. align-items: center;
  28412. width: 100%;
  28413. box-sizing: border-box;
  28414. padding: 0 20px;
  28415. flex-direction: row;
  28416. flex-wrap: wrap;
  28417. }
  28418. .type_title {
  28419. font-size: 18px;
  28420. font-weight: 700;
  28421. }
  28422. .type_content {
  28423. font-size: 16px;
  28424. margin-left: 30px;
  28425. }
  28426. .type_content span+span {
  28427. margin-left: 20px;
  28428. }
  28429. .type_content span {
  28430. cursor: pointer;
  28431. padding-bottom: 5px;
  28432. box-sizing: border-box;
  28433. }
  28434. .type_content .active {
  28435. color: #409eff;
  28436. border-bottom: 2px solid #409eff;
  28437. }
  28438. .e_add_list_pbox_content {
  28439. height: calc(100% - 50px);
  28440. display: flex;
  28441. align-items: center;
  28442. width: 100%;
  28443. background: #fff;
  28444. }
  28445. .mbCss {
  28446. width: 100%;
  28447. display: flex;
  28448. flex-direction: row;
  28449. flex-wrap: nowrap;
  28450. align-content: center;
  28451. align-items: flex-start;
  28452. justify-content: flex-start;
  28453. }
  28454. .pjCss {
  28455. /* width: 42%; */
  28456. width: calc(100% - 55%);
  28457. display: flex;
  28458. flex-direction: column;
  28459. flex-wrap: nowrap;
  28460. align-items: flex-start;
  28461. }
  28462. .e_box {
  28463. /* display: flex; */
  28464. flex-wrap: wrap;
  28465. max-height: 500px;
  28466. align-items: flex-start;
  28467. overflow: auto;
  28468. width: 100%;
  28469. }
  28470. .e_card {
  28471. border: 1px solid #ccc;
  28472. background: #fff;
  28473. margin-right: 20px;
  28474. width: 270px;
  28475. display: flex;
  28476. flex-direction: column;
  28477. align-items: center;
  28478. border-radius: 5px;
  28479. margin-top: 10px;
  28480. text-align: center;
  28481. }
  28482. .e_card_picture {
  28483. margin: 10px 0;
  28484. }
  28485. .e_card_picture>img {
  28486. width: 50px;
  28487. }
  28488. .e_card_name {
  28489. width: 100%;
  28490. padding: 0 10px;
  28491. box-sizing: border-box;
  28492. margin-bottom: 10px;
  28493. overflow: hidden;
  28494. text-overflow: ellipsis;
  28495. white-space: nowrap;
  28496. }
  28497. .e_card_time {
  28498. width: 100%;
  28499. padding: 0 10px;
  28500. box-sizing: border-box;
  28501. font-size: 15px;
  28502. color: #c3c3c3;
  28503. margin-bottom: 10px;
  28504. }
  28505. .e_card_btn {
  28506. height: 40px;
  28507. display: flex;
  28508. align-items: center;
  28509. width: 100%;
  28510. background: rgb(244, 244, 244);
  28511. }
  28512. .e_card_btn:hover {
  28513. background: rgb(221 221 221);
  28514. }
  28515. .e_card_btn span {
  28516. flex: 1 1 auto;
  28517. text-align: center;
  28518. cursor: pointer;
  28519. }
  28520. .addEva {
  28521. border: 1px solid #ccc;
  28522. background: #fff;
  28523. margin-right: 20px;
  28524. width: 270px;
  28525. height: 149px;
  28526. display: flex;
  28527. flex-direction: column;
  28528. align-items: center;
  28529. border-radius: 5px;
  28530. margin-top: 10px;
  28531. text-align: center;
  28532. cursor: pointer;
  28533. justify-content: center;
  28534. }
  28535. .addEva>img {
  28536. width: 50px;
  28537. object-fit: cover;
  28538. }
  28539. .uploadFm {
  28540. border: 1px dashed #ccc;
  28541. width: 100%;
  28542. height: 140px;
  28543. position: relative;
  28544. cursor: pointer;
  28545. display: flex;
  28546. flex-direction: column;
  28547. justify-content: center;
  28548. align-items: center;
  28549. font-size: 14px;
  28550. color: #6e6e6e;
  28551. position: relative;
  28552. }
  28553. .cover_p {
  28554. width: 100% !important;
  28555. height: 100%;
  28556. object-fit: cover;
  28557. }
  28558. .uploadFm2:hover .cover_mask {
  28559. display: flex !important;
  28560. }
  28561. .cover_mask {
  28562. display: none;
  28563. width: 100%;
  28564. height: 100%;
  28565. position: absolute;
  28566. background: #00000054;
  28567. align-items: center;
  28568. justify-content: center;
  28569. flex-direction: column;
  28570. }
  28571. .cover_mask>img {
  28572. width: 30px;
  28573. }
  28574. .cover_mask>span {
  28575. color: #fff;
  28576. font-size: 12px;
  28577. }
  28578. .uploadFm>img {
  28579. width: 50px;
  28580. }
  28581. .fileCss {
  28582. width: 100%;
  28583. display: flex;
  28584. flex-direction: row;
  28585. flex-wrap: nowrap;
  28586. justify-content: space-around;
  28587. align-items: center;
  28588. padding-top: 15px;
  28589. }
  28590. .fileCss>div {
  28591. display: flex;
  28592. flex-direction: column;
  28593. align-items: center;
  28594. }
  28595. .fileCss .spanName {
  28596. margin-top: 10px;
  28597. }
  28598. .sysPicBox {
  28599. display: flex;
  28600. flex-direction: row;
  28601. flex-wrap: wrap;
  28602. align-content: flex-start;
  28603. height: 435px;
  28604. overflow: auto;
  28605. position: relative;
  28606. }
  28607. .picNone {
  28608. position: absolute;
  28609. left: 50%;
  28610. top: 45%;
  28611. transform: translate(-50%, -50%);
  28612. width: fit-content;
  28613. color: #9c9c9c;
  28614. }
  28615. .sysPic {
  28616. width: 200px;
  28617. height: 115px;
  28618. margin: 0 20px 20px 0;
  28619. cursor: pointer;
  28620. }
  28621. .sysPic>img,
  28622. .isSysPic>img,
  28623. .deletePic>img {
  28624. width: 100%;
  28625. height: 100%;
  28626. object-fit: cover;
  28627. }
  28628. .isSysPic {
  28629. width: 200px;
  28630. height: 115px;
  28631. position: relative;
  28632. }
  28633. .deletePic {
  28634. width: 20px;
  28635. height: 20px;
  28636. position: absolute;
  28637. top: 0;
  28638. right: 0;
  28639. cursor: pointer;
  28640. }
  28641. .select_box1 {
  28642. height: 100%;
  28643. }
  28644. .select_box1_img {
  28645. background: #fff;
  28646. border-radius: 5px;
  28647. padding: 15px;
  28648. box-sizing: border-box;
  28649. margin-bottom: 20px;
  28650. }
  28651. .select_box1_title {
  28652. padding: 0 0 15px 0;
  28653. border-bottom: 1px solid #eee;
  28654. margin-bottom: 15px;
  28655. }
  28656. .select_box1_title span:nth-child(1) {
  28657. font-size: 16px;
  28658. margin-right: 20px;
  28659. color: #000;
  28660. }
  28661. .select_box1_title span:nth-child(2) {
  28662. font-size: 14px;
  28663. color: rgb(112, 112, 112);
  28664. }
  28665. .select_box1_add_img {}
  28666. .select_box1_select {
  28667. background: #fff;
  28668. border-radius: 5px;
  28669. padding: 15px;
  28670. box-sizing: border-box;
  28671. height: calc(100% - 200px);
  28672. overflow: auto;
  28673. }
  28674. .select_box2 {
  28675. height: 100%;
  28676. }
  28677. .select_box2_title {
  28678. background: #fff;
  28679. border-radius: 5px;
  28680. padding: 5px 10px;
  28681. box-sizing: border-box;
  28682. margin-bottom: 10px;
  28683. }
  28684. .select_box2_box {
  28685. display: flex;
  28686. height: calc(100% - 30px);
  28687. }
  28688. .select_box2_img {
  28689. width: calc(100% - 310px);
  28690. height: 100%;
  28691. overflow: auto;
  28692. background: #fff;
  28693. border-radius: 5px;
  28694. }
  28695. .select_box2_img img {
  28696. width: 100%;
  28697. }
  28698. .select_box2_answer {
  28699. background: #fff;
  28700. margin-left: 10px;
  28701. border-radius: 5px;
  28702. width: 300px;
  28703. overflow: auto;
  28704. height: 100%;
  28705. display: flex;
  28706. flex-direction: column;
  28707. align-items: center;
  28708. padding-top: 10px;
  28709. box-sizing: border-box;
  28710. }
  28711. .select_box2_answer_box {
  28712. margin: 0 0 10px 0;
  28713. width: 85%;
  28714. }
  28715. .rate_textarea {
  28716. font: inherit;
  28717. color: currentColor;
  28718. width: 100%;
  28719. padding: 8px 14px;
  28720. display: block;
  28721. min-width: 0;
  28722. outline: none;
  28723. border: 1px solid rgba(0, 0, 0, 0.23);
  28724. border-radius: 4px;
  28725. box-sizing: border-box;
  28726. background: #fff;
  28727. margin: 0 20px 0 0;
  28728. resize: none;
  28729. }
  28730. .select_answer_title {
  28731. text-align: left;
  28732. width: 85%;
  28733. margin-bottom: 10px;
  28734. font-size: 18px;
  28735. color: #8e8e8e;
  28736. }
  28737. .mask {
  28738. background-color: rgb(0 0 0 / 30%);
  28739. /* position: fixed; */
  28740. position: absolute;
  28741. top: 0;
  28742. left: 0;
  28743. width: 100%;
  28744. height: 100%;
  28745. z-index: 90;
  28746. display: flex;
  28747. align-items: center;
  28748. justify-content: center;
  28749. }
  28750. .progressBox {
  28751. width: 300px;
  28752. height: 150px;
  28753. background: #fff;
  28754. border-radius: 10px;
  28755. box-shadow: 0 0 6px 1px #bfbfbf;
  28756. display: flex;
  28757. align-items: center;
  28758. justify-content: center;
  28759. flex-direction: column;
  28760. position: relative;
  28761. color: #6c6c6c;
  28762. }
  28763. .progressBox>>>.el-progress-bar__outer {
  28764. background-color: #d1dfff !important;
  28765. }
  28766. .progressBox .lbox {
  28767. height: 50px;
  28768. font-size: 19px;
  28769. display: flex;
  28770. align-items: center;
  28771. color: #747474;
  28772. }
  28773. .progressBox .lbox img {
  28774. width: 40px;
  28775. margin-right: 20px;
  28776. }
  28777. .closeCss {
  28778. position: absolute;
  28779. top: 8px;
  28780. right: 8px;
  28781. cursor: pointer;
  28782. width: 20px;
  28783. height: 20px;
  28784. }
  28785. .closeCss>img {
  28786. width: 100%;
  28787. height: 100%;
  28788. }
  28789. .updateTips::before {
  28790. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28791. font-size: 14px;
  28792. margin-left: 20px;
  28793. font-weight: 400;
  28794. color: #ff3a3a;
  28795. margin-bottom: 10px;
  28796. display: block;
  28797. }
  28798. .updateMask {
  28799. width: 100%;
  28800. z-index: 3;
  28801. top: 0;
  28802. position: absolute;
  28803. /* background-color: rgba(0,0,0,.3); */
  28804. }
  28805. .t_j_box {
  28806. display: flex;
  28807. }
  28808. .t_j_box span:nth-child(1) {
  28809. width: 15%;
  28810. overflow: hidden;
  28811. margin-right: 10px;
  28812. text-overflow: ellipsis;
  28813. white-space: nowrap;
  28814. }
  28815. .t_j_box span:nth-child(2) {
  28816. width: 30%;
  28817. overflow: hidden;
  28818. text-overflow: ellipsis;
  28819. margin-right: 10px;
  28820. }
  28821. .t_j_box span:nth-child(3) {
  28822. max-width: calc(55% - 20px);
  28823. overflow: hidden;
  28824. text-overflow: ellipsis;
  28825. }
  28826. .sentenBox {
  28827. background: #fff;
  28828. height: 600px;
  28829. overflow: auto;
  28830. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28831. background-position: 102%;
  28832. background-repeat: no-repeat;
  28833. background-size: 60%;
  28834. }
  28835. .sentenBox>.sentenContent {
  28836. padding-bottom: 10px;
  28837. width: 97%;
  28838. margin: 0 auto;
  28839. }
  28840. .sentenBox>.sentenContent+.sentenContent {
  28841. border-top: 1px solid #cbcbcb;
  28842. }
  28843. .addSen {
  28844. background: #409efe;
  28845. width: 90px;
  28846. color: #fff;
  28847. height: 35px;
  28848. text-align: center;
  28849. line-height: 35px;
  28850. border-radius: 5px;
  28851. float: right;
  28852. margin: 10px 20px 0 0;
  28853. cursor: pointer;
  28854. }
  28855. .sentenTop {
  28856. display: flex;
  28857. flex-direction: row;
  28858. flex-wrap: nowrap;
  28859. align-items: center;
  28860. }
  28861. .sentenTop::before {
  28862. content: attr(index);
  28863. background: #3681fc;
  28864. border-radius: 50%;
  28865. color: #fff;
  28866. width: 25px;
  28867. height: 25px;
  28868. min-width: 25px;
  28869. min-height: 25px;
  28870. text-align: center;
  28871. line-height: 25px;
  28872. margin-right: 5px;
  28873. }
  28874. .sentenTop>div:nth-child(2) {
  28875. width: 300px;
  28876. margin: 0 15px;
  28877. }
  28878. .sentenTop>div:nth-child(3) {
  28879. background: #409efe;
  28880. color: #fff;
  28881. width: 65px;
  28882. height: 35px;
  28883. text-align: center;
  28884. line-height: 35px;
  28885. border-radius: 5px;
  28886. cursor: pointer;
  28887. }
  28888. .cardList {
  28889. padding: 30px 0 20px 0;
  28890. display: flex;
  28891. flex-direction: row;
  28892. flex-wrap: wrap;
  28893. align-items: center;
  28894. box-sizing: border-box;
  28895. border-bottom: 1px solid #f4f4f4;
  28896. width: 98%;
  28897. margin: 0 auto;
  28898. }
  28899. .rightCardList {
  28900. display: flex;
  28901. flex-wrap: wrap;
  28902. }
  28903. .cardBox {
  28904. display: flex;
  28905. flex-direction: row;
  28906. flex-wrap: wrap;
  28907. align-items: center;
  28908. align-content: center;
  28909. }
  28910. .isCard,
  28911. .isCard1 {
  28912. width: auto;
  28913. padding: 0 20px;
  28914. height: 65px;
  28915. text-align: center;
  28916. line-height: 65px;
  28917. font-size: 14px;
  28918. cursor: pointer;
  28919. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28920. background-size: 100% 100%;
  28921. position: relative;
  28922. z-index: 99;
  28923. }
  28924. .isCard1 {
  28925. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28926. }
  28927. .isCard:hover .deleteWord {
  28928. display: block;
  28929. }
  28930. .isCard>div:nth-child(1),
  28931. .isCard1>div:nth-child(1) {
  28932. white-space: nowrap;
  28933. overflow: hidden;
  28934. text-overflow: ellipsis;
  28935. width: 100%;
  28936. margin: 0 auto;
  28937. }
  28938. .card {
  28939. width: 140px;
  28940. height: 65px;
  28941. }
  28942. .card>img {
  28943. width: 100%;
  28944. height: 100%;
  28945. }
  28946. .rightCardBox {
  28947. width: 98%;
  28948. margin: 10px auto 0;
  28949. }
  28950. .rightCardBox>div:nth-child(1) {
  28951. margin-bottom: 10px;
  28952. }
  28953. .cardCss {
  28954. display: flex;
  28955. flex-direction: column;
  28956. flex-wrap: nowrap;
  28957. align-items: center;
  28958. border-bottom: 3px solid #b4c3d3;
  28959. padding: 0 0 5px 0;
  28960. /* margin-right: 10px; */
  28961. }
  28962. .cardCss>div:nth-child(2) {
  28963. background: #5b7b9d;
  28964. color: #fff;
  28965. width: 20px;
  28966. height: 20px;
  28967. border-radius: 50%;
  28968. text-align: center;
  28969. line-height: 20px;
  28970. }
  28971. .sentenTopBox {
  28972. display: flex;
  28973. flex-direction: row;
  28974. flex-wrap: nowrap;
  28975. align-items: center;
  28976. justify-content: space-between;
  28977. padding: 55px 0 0 20px;
  28978. box-sizing: border-box;
  28979. width: 85%;
  28980. }
  28981. .rb_c_ai_box,
  28982. .stepsBottom {
  28983. width: 100%;
  28984. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28985. /* background: #f7f7f7; */
  28986. border-radius: 10px;
  28987. overflow: hidden;
  28988. /* height: 100%; */
  28989. height: calc(100% - 55px);
  28990. }
  28991. .navTop {
  28992. background: #53749b;
  28993. color: #fff;
  28994. height: 40px;
  28995. line-height: 40px;
  28996. padding-left: 15px;
  28997. font-size: 18px;
  28998. }
  28999. .navBottom {
  29000. /* background: #6b91b7; */
  29001. height: 100%;
  29002. overflow: auto;
  29003. padding: 10px 0;
  29004. }
  29005. .navStage {
  29006. display: flex;
  29007. flex-direction: row;
  29008. flex-wrap: nowrap;
  29009. align-items: center;
  29010. padding: 10px 10px 10px 0;
  29011. cursor: pointer;
  29012. background: #ffffff;
  29013. width: 95%;
  29014. margin: 5px auto 5px;
  29015. box-sizing: border-box;
  29016. border-radius: 5px;
  29017. flex-wrap: wrap;
  29018. position: relative;
  29019. }
  29020. .navStage:hover>.chapter_upload_drag {
  29021. display: block;
  29022. }
  29023. .navTask:hover>.chapter_upload_drag {
  29024. display: block;
  29025. }
  29026. .chapter_upload:hover>.chapter_upload_drag {
  29027. display: block;
  29028. }
  29029. .navStage::before {
  29030. content: "";
  29031. display: block;
  29032. width: 16px;
  29033. height: 16px;
  29034. background-image: url(../../../assets/icon/new/icon_stage.png);
  29035. background-size: 100%;
  29036. margin-left: 25px;
  29037. }
  29038. .navStage .chapter_unit_open {
  29039. content: "";
  29040. display: block;
  29041. width: 16px;
  29042. height: 16px;
  29043. background-image: url(../../../assets/icon/new/down.png);
  29044. transform: rotate(-90deg);
  29045. background-size: 100%;
  29046. margin-left: 10px;
  29047. transition: all 0.5s;
  29048. }
  29049. .isNavStageOpen .chapter_unit_open {
  29050. transform: rotate(0deg);
  29051. }
  29052. .isNavStage {
  29053. background: #0061ff;
  29054. }
  29055. .isNavStage::before {
  29056. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  29057. }
  29058. .isNavStage .chapter_unit_open {
  29059. background-image: url(../../../assets/icon/new/downC.png);
  29060. }
  29061. .isNavStage .nt_taskName {
  29062. font-weight: bold !important;
  29063. color: #ffffff !important;
  29064. }
  29065. .isNavStage .nt_taskTitle {
  29066. font-weight: bold !important;
  29067. color: #fff !important;
  29068. }
  29069. .navStage .nt_taskBox {
  29070. width: calc(100% - 68px);
  29071. padding: 0 0 0 5px;
  29072. box-sizing: border-box;
  29073. box-sizing: border-box;
  29074. display: flex;
  29075. flex-direction: row;
  29076. flex-wrap: nowrap;
  29077. align-items: baseline;
  29078. }
  29079. .navStage .nt_taskTitle {
  29080. color: #060e17;
  29081. line-height: 25px;
  29082. font-size: 16px;
  29083. }
  29084. .navStage .nt_taskName {
  29085. max-width: calc(100% - 82px);
  29086. white-space: nowrap;
  29087. overflow: hidden;
  29088. text-overflow: ellipsis;
  29089. font-size: 16px;
  29090. color: #060e17;
  29091. }
  29092. .navTask {
  29093. display: flex;
  29094. flex-direction: row;
  29095. flex-wrap: nowrap;
  29096. align-items: center;
  29097. padding: 10px 10px 10px 0;
  29098. cursor: pointer;
  29099. background: #ffffff;
  29100. width: 95%;
  29101. margin: 5px auto 5px;
  29102. box-sizing: border-box;
  29103. border-radius: 5px;
  29104. flex-wrap: wrap;
  29105. position: relative;
  29106. }
  29107. .navTask .chapter_upload_open {
  29108. content: "";
  29109. display: block;
  29110. width: 16px;
  29111. height: 16px;
  29112. background-image: url(../../../assets/icon/new/icon_arrow.png);
  29113. background-size: 100%;
  29114. margin-left: 23px;
  29115. }
  29116. .noImage .chapter_upload_open {
  29117. display: none;
  29118. background-image: unset !important;
  29119. }
  29120. .isNavOpen .chapter_upload_open {
  29121. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  29122. transform: rotate(90deg);
  29123. }
  29124. .isNavTask .chapter_upload_open {
  29125. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  29126. transform: rotate(-90deg);
  29127. }
  29128. .isNavTask.isNavOpen .chapter_upload_open {
  29129. transform: rotate(0deg);
  29130. }
  29131. .dragOverTop {
  29132. border-top: 2px solid #0061ff !important;
  29133. border-radius: 0 !important;
  29134. margin-top: 10px;
  29135. }
  29136. .dragOverBottom {
  29137. border-bottom: 2px solid #0061ff !important;
  29138. border-radius: 0 !important;
  29139. margin-top: 10px;
  29140. }
  29141. .dragOverTop2 {
  29142. border-top: 2px solid #0061ff !important;
  29143. border-radius: 0 !important;
  29144. }
  29145. .dragOverBottom2 {
  29146. border-bottom: 2px solid #0061ff !important;
  29147. border-radius: 0 !important;
  29148. }
  29149. .isNavTask {
  29150. /* background: #3681FC; */
  29151. background: #eef3fb;
  29152. }
  29153. .isNavTask>.chapter_upload_drag {
  29154. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  29155. }
  29156. .isNavTask .nt_taskName {
  29157. /* color: #fff !important; */
  29158. font-weight: bold !important;
  29159. color: #0061ff !important;
  29160. }
  29161. .isNavTask .nt_taskTitle {
  29162. /* color: #AECCFE !important; */
  29163. font-weight: bold !important;
  29164. color: #0061ff !important;
  29165. }
  29166. .navTask .nt_taskBox {
  29167. width: calc(100% - 40px);
  29168. padding: 0 0 0 5px;
  29169. box-sizing: border-box;
  29170. box-sizing: border-box;
  29171. display: flex;
  29172. flex-direction: row;
  29173. flex-wrap: nowrap;
  29174. align-items: baseline;
  29175. }
  29176. .navTask .nt_taskTitle {
  29177. /* color: #717C8D; */
  29178. color: #060e17;
  29179. line-height: 25px;
  29180. font-size: 16px;
  29181. /* min-width: 66px; */
  29182. }
  29183. .navTask .nt_taskName {
  29184. /* color: #fff; */
  29185. /* max-width: 130px; */
  29186. /* width: 100%; */
  29187. max-width: calc(100% - 66px);
  29188. font-size: 16px;
  29189. color: #060e17;
  29190. /* color: #0E1E33; */
  29191. }
  29192. .navTask .nt_taskName span {
  29193. width: 100%;
  29194. white-space: nowrap;
  29195. overflow: hidden;
  29196. text-overflow: ellipsis;
  29197. display: block;
  29198. }
  29199. .gjBox {
  29200. width: calc(100% - 25px);
  29201. padding: 0 0 0 0;
  29202. box-sizing: border-box;
  29203. border-left: 1px solid #cad1dc;
  29204. margin-left: 25px;
  29205. }
  29206. .gjBox>div {
  29207. display: flex;
  29208. align-items: center;
  29209. }
  29210. .gjBox>div::before {
  29211. content: "";
  29212. height: 1px;
  29213. width: 10px;
  29214. background: #cad1dc;
  29215. display: block;
  29216. margin-right: 5px;
  29217. }
  29218. .gjCss {
  29219. display: flex;
  29220. flex-direction: row;
  29221. flex-wrap: nowrap;
  29222. align-items: center;
  29223. padding: 15px 0;
  29224. box-sizing: border-box;
  29225. font-size: 14px;
  29226. cursor: pointer;
  29227. }
  29228. .isGjCss {
  29229. color: #0061ff;
  29230. }
  29231. .groupBox {}
  29232. .groupContent+.groupContent {
  29233. margin-top: 30px;
  29234. }
  29235. .groupTitle {
  29236. font-size: 24px;
  29237. color: rgb(80, 80, 80);
  29238. margin-bottom: 20px;
  29239. }
  29240. .groupName {
  29241. display: flex;
  29242. align-items: center;
  29243. }
  29244. .groupn {
  29245. font-size: 15px;
  29246. margin-right: 10px;
  29247. }
  29248. .groupName+.groupName {
  29249. margin-top: 15px;
  29250. }
  29251. .groupBtn {
  29252. margin-left: 10px;
  29253. }
  29254. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  29255. text-align: left;
  29256. }
  29257. .radioBox>div {
  29258. margin: 10px 0 0 10px;
  29259. }
  29260. .radioBox>>>.el-radio__input,
  29261. .radioBox>>>.el-checkbox__inner {
  29262. margin-left: 10px;
  29263. }
  29264. .radioBox>>>.el-radio__label,
  29265. .radioBox>>>.el-checkbox__label {
  29266. display: flex;
  29267. align-items: center;
  29268. }
  29269. .inImg {
  29270. width: 50px;
  29271. }
  29272. .inImg>img {
  29273. width: 100%;
  29274. height: 100%;
  29275. object-fit: cover;
  29276. }
  29277. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  29278. height: auto;
  29279. padding: 10px;
  29280. margin: 0;
  29281. }
  29282. .upCss>>>.el-upload-list {
  29283. width: 100%;
  29284. }
  29285. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  29286. width: 100%;
  29287. height: 120px;
  29288. object-fit: contain;
  29289. background: unset;
  29290. margin-left: 0;
  29291. }
  29292. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  29293. display: none;
  29294. }
  29295. .tcMember+.tcMember::before {
  29296. content: "、";
  29297. }
  29298. .xzUpImg {
  29299. width: 25px;
  29300. height: 25px;
  29301. min-width: 25px;
  29302. min-height: 25px;
  29303. cursor: pointer;
  29304. margin: 0 10px;
  29305. }
  29306. .xzUpImg>img {
  29307. width: 100%;
  29308. height: 100%;
  29309. }
  29310. .closeCss {
  29311. position: absolute;
  29312. top: 8px;
  29313. right: 8px;
  29314. cursor: pointer;
  29315. width: 20px;
  29316. height: 20px;
  29317. }
  29318. .closeCss>img {
  29319. width: 100%;
  29320. height: 100%;
  29321. }
  29322. .moveBtn {
  29323. display: flex;
  29324. flex-direction: row;
  29325. flex-wrap: nowrap;
  29326. align-items: center;
  29327. width: 55px;
  29328. }
  29329. .timuUpImg {
  29330. display: flex;
  29331. flex-direction: row;
  29332. align-items: center;
  29333. width: 100%;
  29334. margin-right: 10px;
  29335. }
  29336. .timuUpImg>div:nth-child(1) {
  29337. margin-right: 10px;
  29338. display: flex;
  29339. align-items: center;
  29340. width: 100%;
  29341. }
  29342. .timuImgBox {
  29343. margin: 10px 0;
  29344. display: flex;
  29345. flex-direction: column;
  29346. flex-wrap: wrap;
  29347. align-items: flex-start;
  29348. }
  29349. .timuImg {
  29350. width: 100px;
  29351. margin: 5px 0;
  29352. cursor: pointer;
  29353. position: relative;
  29354. }
  29355. .timuImg:hover .deleteWord {
  29356. display: block;
  29357. }
  29358. .deleteWord {
  29359. width: 25px;
  29360. height: 25px;
  29361. position: absolute;
  29362. right: -5px;
  29363. top: -5px;
  29364. cursor: pointer;
  29365. display: none;
  29366. }
  29367. .timuImg>img,
  29368. .deleteWord>img {
  29369. width: 100%;
  29370. height: 100%;
  29371. object-fit: cover;
  29372. }
  29373. .e_add_delete {
  29374. cursor: pointer;
  29375. margin-left: 10px;
  29376. }
  29377. .pType_box {
  29378. margin: 15px 0;
  29379. align-items: flex-end;
  29380. }
  29381. .noneBox {
  29382. height: 200px;
  29383. width: 100%;
  29384. display: flex;
  29385. align-items: center;
  29386. justify-content: center;
  29387. flex-direction: column;
  29388. /* margin-top: 150px; */
  29389. }
  29390. .noneBox>img {
  29391. width: 95px;
  29392. }
  29393. .noneBox>span {
  29394. margin-top: 10px;
  29395. color: #717c8d;
  29396. }
  29397. .rb_c_box {
  29398. width: 100%;
  29399. height: 100%;
  29400. display: flex;
  29401. /* padding: 20px; */
  29402. box-sizing: border-box;
  29403. justify-content: space-between;
  29404. }
  29405. .rb_c_box_left {
  29406. height: 100%;
  29407. background: #fff;
  29408. width: 270px;
  29409. min-width: 270px;
  29410. border-radius: 8px;
  29411. margin-right: 10px;
  29412. }
  29413. .rb_c_box_right {
  29414. height: 100%;
  29415. width: calc(100%);
  29416. overflow: hidden;
  29417. }
  29418. .rb_c_box_btn {
  29419. display: flex;
  29420. justify-content: flex-start;
  29421. height: 50px;
  29422. align-items: center;
  29423. background: #fff;
  29424. padding: 0 20px;
  29425. border-radius: 10px 10px 0px 0px;
  29426. border-bottom: 1px solid #cad1dc;
  29427. }
  29428. .rb_c_box_btn > .title{
  29429. font-size: 24px;
  29430. font-weight: bold;
  29431. display: flex;
  29432. align-items: center;
  29433. }
  29434. .rb_c_box_btn > .title:before{
  29435. content: '';
  29436. background-image: url(../../../assets/icon/course/courseName.png);
  29437. width: 24px;
  29438. height: 24px;
  29439. background-size: 100% 100%;
  29440. margin-right: 10px;
  29441. }
  29442. .rb_c_box_right>.basic_box {
  29443. /* background: #fff; */
  29444. border-radius: 0;
  29445. height: calc(100% - 50px);
  29446. overflow: auto;
  29447. padding: 0;
  29448. }
  29449. .textarea_css {
  29450. display: block;
  29451. resize: none;
  29452. padding: 10px 15px;
  29453. line-height: 1.5;
  29454. box-sizing: border-box;
  29455. width: 100%;
  29456. font-size: 14px;
  29457. color: #606266;
  29458. background-color: #fff;
  29459. background-image: none;
  29460. border: 1px solid #dcdfe6;
  29461. border-radius: 4px;
  29462. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  29463. outline: none;
  29464. overflow: hidden;
  29465. height: 46px;
  29466. font-family: "Microsoft YaHei";
  29467. }
  29468. .textarea_css::-webkit-input-placeholder {
  29469. color: #c0c4cc;
  29470. }
  29471. .textarea_css:focus {
  29472. border-color: #409eff;
  29473. outline: 0;
  29474. }
  29475. .addEditor>>>.text {
  29476. height: auto;
  29477. min-height: 100px;
  29478. }
  29479. .addEditor>>>.w-e-text-container {
  29480. min-height: 100px;
  29481. }
  29482. .moveBtn2 {
  29483. flex-direction: column;
  29484. width: fit-content;
  29485. margin: 0 10px 0 10px;
  29486. }
  29487. .moveBtn2 .chapter_upload_down,
  29488. .moveBtn2 .chapter_upload_up {
  29489. width: 16px;
  29490. height: 16px;
  29491. }
  29492. .moveBtn2 .chapter_upload_up::after,
  29493. .moveBtn2 .chapter_upload_down::after {
  29494. width: 10px;
  29495. height: 10px;
  29496. }
  29497. .fullStyle>>>.el-dialog__body {
  29498. height: calc(100% - 125px) !important;
  29499. box-sizing: border-box;
  29500. }
  29501. .fullStyle1>>>.el-dialog__body {
  29502. height: auto !important;
  29503. }
  29504. .fullStyle>>>.el-dialog {
  29505. width: 100% !important;
  29506. max-width: 100% !important;
  29507. height: 100% !important;
  29508. margin: 0 !important;
  29509. }
  29510. .fullStyle {
  29511. width: 100% !important;
  29512. max-width: 100% !important;
  29513. height: 100% !important;
  29514. margin: 0 auto !important;
  29515. }
  29516. .wb_j_box_btn {
  29517. width: calc(100% - 30px);
  29518. display: flex;
  29519. height: 40px;
  29520. border: 1.5px solid #cad1dc;
  29521. border-radius: 4px;
  29522. box-sizing: border-box;
  29523. align-items: center;
  29524. font-size: 14px;
  29525. cursor: pointer;
  29526. overflow: hidden;
  29527. }
  29528. .wb_j_box_btn:hover {
  29529. border: 1.5px solid #0061ff;
  29530. }
  29531. .wb_j_box_title {
  29532. background: #f0f4fa;
  29533. height: 100%;
  29534. line-height: 40px;
  29535. /* width: 105px; */
  29536. min-width: 115px;
  29537. text-align: center;
  29538. color: #060e17;
  29539. border-right: 1.5px solid #cad1dc;
  29540. box-sizing: border-box;
  29541. }
  29542. .wb_j_box_btn_c {
  29543. width: calc(100% - 90px);
  29544. padding: 0 35px 0 10px;
  29545. box-sizing: border-box;
  29546. position: relative;
  29547. }
  29548. .wb_j_box_span {
  29549. width: 100%;
  29550. overflow: hidden;
  29551. white-space: nowrap;
  29552. text-overflow: ellipsis;
  29553. word-wrap: break-word;
  29554. color: #717c8d;
  29555. }
  29556. .wb_j_box_arrow {
  29557. content: "";
  29558. width: 14px;
  29559. height: 14px;
  29560. background: url(../../../assets/icon/new/u_arrow.png);
  29561. background-size: 100% 100%;
  29562. position: absolute;
  29563. right: 12px;
  29564. top: 50%;
  29565. transform: translateY(-50%);
  29566. }
  29567. .check_classBox {
  29568. height: 400px;
  29569. display: flex;
  29570. border-top: 1.5px solid #e7ebf1;
  29571. border-bottom: 1.5px solid #e7ebf1;
  29572. }
  29573. .check_class_right {
  29574. width: 130px;
  29575. border-right: 1px solid #e7ebf1;
  29576. display: flex;
  29577. align-items: center;
  29578. flex-direction: column;
  29579. height: 100%;
  29580. overflow: auto;
  29581. padding: 15px 0;
  29582. box-sizing: border-box;
  29583. }
  29584. .check_class {
  29585. width: 85%;
  29586. border-radius: 5px;
  29587. height: 30px;
  29588. min-height: 30px;
  29589. line-height: 30px;
  29590. text-align: center;
  29591. padding: 0 10px;
  29592. box-sizing: border-box;
  29593. cursor: pointer;
  29594. white-space: nowrap;
  29595. overflow: hidden;
  29596. text-overflow: ellipsis;
  29597. }
  29598. .check_class.activeX {
  29599. background: #e0eafb;
  29600. color: #3681fc;
  29601. font-weight: 700;
  29602. }
  29603. .check_class+.check_class {
  29604. margin-top: 15px;
  29605. }
  29606. .check_class_left {
  29607. background: #fafafa;
  29608. width: calc(100% - 130px);
  29609. padding: 15px;
  29610. box-sizing: border-box;
  29611. }
  29612. .check_class_all_box {
  29613. display: flex;
  29614. margin-bottom: 10px;
  29615. }
  29616. .all_check {
  29617. display: flex;
  29618. align-items: center;
  29619. padding: 2px 0 0;
  29620. margin-left: 10px;
  29621. }
  29622. .all_check>>>.el-checkbox__label {
  29623. line-height: 18px;
  29624. }
  29625. .check_class_left_title {
  29626. font-size: 16px;
  29627. font-weight: 700;
  29628. }
  29629. .check_class_item {
  29630. display: flex;
  29631. flex-wrap: wrap;
  29632. height: calc(100% - 45px);
  29633. overflow: auto;
  29634. justify-content: flex-start;
  29635. align-items: flex-start;
  29636. align-content: flex-start;
  29637. }
  29638. .class_item:first-child {
  29639. /* margin: 0 15px 15px 67px; */
  29640. }
  29641. .class_item {
  29642. margin: 0 15px 15px 0;
  29643. }
  29644. .class_item:hover>>>.el-checkbox__label {
  29645. color: #409eff;
  29646. }
  29647. .class_item>>>.el-checkbox__label {
  29648. color: #0e1e33;
  29649. }
  29650. .class_item:hover>>>.el-checkbox__inner {
  29651. border-color: #409eff;
  29652. }
  29653. .class_item>>>.el-checkbox,
  29654. .class_item>>>.el-checkbox__input {
  29655. display: flex;
  29656. align-items: center;
  29657. }
  29658. .taskTitle {
  29659. font-size: 20px;
  29660. font-weight: bold;
  29661. margin-bottom: 35px;
  29662. }
  29663. .taskTitle:after {
  29664. content: "";
  29665. width: 100%;
  29666. display: block;
  29667. height: 1px;
  29668. background: #cad1dc;
  29669. position: absolute;
  29670. left: 0;
  29671. margin: 15px 0 0;
  29672. }
  29673. .eva_btn_box {
  29674. margin: 20px 0px 0 0;
  29675. display: flex;
  29676. flex-direction: row;
  29677. flex-wrap: nowrap;
  29678. align-items: center;
  29679. justify-content: space-between;
  29680. width: 100%;
  29681. }
  29682. .eva_btn_left_box {
  29683. display: flex;
  29684. flex-direction: row;
  29685. flex-wrap: nowrap;
  29686. align-items: center;
  29687. }
  29688. .addTypeChoose {
  29689. display: flex;
  29690. flex-direction: row;
  29691. flex-wrap: nowrap;
  29692. align-items: center;
  29693. margin: 15px 0;
  29694. }
  29695. .addTypeBox {
  29696. display: flex;
  29697. flex-direction: column;
  29698. flex-wrap: nowrap;
  29699. align-items: center;
  29700. }
  29701. .addTypeChoose {
  29702. display: flex;
  29703. flex-direction: row;
  29704. flex-wrap: nowrap;
  29705. align-items: center;
  29706. margin: 15px 0;
  29707. }
  29708. .buchong_box {
  29709. background: #E0EAFB66;
  29710. width: calc(100% - 20px);
  29711. min-height: 50px;
  29712. display: flex;
  29713. align-items: center;
  29714. justify-content: center;
  29715. margin: 0 auto;
  29716. }
  29717. .outline {
  29718. width: calc(100% - 40px);
  29719. margin: 0 auto;
  29720. }
  29721. .task_outline {
  29722. width: calc(100% - 40px);
  29723. margin: 0 auto;
  29724. }
  29725. .outline_box+.outline_box {
  29726. margin: 30px 0 0px;
  29727. }
  29728. .outline_task {
  29729. display: flex;
  29730. align-items: center;
  29731. margin-bottom: 10px;
  29732. }
  29733. .outline_btn{
  29734. display: flex;
  29735. align-items: center;
  29736. min-width: fit-content;
  29737. margin-left: 10px;
  29738. }
  29739. .outline_task .title {
  29740. font-size: 18px;
  29741. font-weight: bold;
  29742. min-width: 80px;
  29743. }
  29744. .op_task_box,
  29745. .op_tool_box,
  29746. .outline_detail {
  29747. position: relative;
  29748. }
  29749. .op_task_box:hover .op_box,
  29750. .op_tool_box:hover .op_box,
  29751. .outline_detail:hover .op_box {
  29752. display: flex
  29753. }
  29754. .op_box {
  29755. position: absolute;
  29756. bottom: 10px;
  29757. display: none;
  29758. align-items: center;
  29759. justify-content: space-between;
  29760. width: calc(100% - 20px);
  29761. left: 50%;
  29762. transform: translateX(-50%);
  29763. }
  29764. .op_box .op_remark {
  29765. color: #8E8E8E;
  29766. font-size: 14px;
  29767. }
  29768. .op_box_right{
  29769. display: flex;
  29770. }
  29771. .op_box_isquote{
  29772. display: flex;
  29773. }
  29774. .op_box_isquote *{
  29775. display: none;
  29776. }
  29777. .op_box_isquote .op_box_right,
  29778. .op_box_isquote .custom-switch{
  29779. display: flex;
  29780. margin-left: auto;
  29781. }
  29782. .op_task_box:hover .op_box_isquote *{
  29783. display: flex;
  29784. }
  29785. .op_task_box:hover .op_box_isquote .op_box_right,
  29786. .op_task_box:hover .op_box_isquote .custom-switch{
  29787. display: flex;
  29788. margin-left: unset;
  29789. }
  29790. .rb_c_nav {
  29791. width: calc(100% - 20px);
  29792. margin: 15px auto 0;
  29793. font-size: 18px;
  29794. display: flex;
  29795. align-items: center;
  29796. }
  29797. .rb_c_nav span {
  29798. cursor: pointer;
  29799. }
  29800. .rb_c_nav span+span {
  29801. margin-left: 10px;
  29802. }
  29803. .rb_c_nav span.active {
  29804. color: #0061FF
  29805. }
  29806. .text_panel>>>.text {
  29807. height: 400px;
  29808. }
  29809. .markBox{
  29810. padding: 20px 14px;
  29811. line-height: 29px;
  29812. font-size: 16px;
  29813. background: #f4f4f4;
  29814. border-radius: 5px;
  29815. word-break: break-word;
  29816. }
  29817. .info_box_t {
  29818. display: flex;
  29819. align-items: center;
  29820. flex-wrap: wrap;
  29821. }
  29822. .info_box_t + .info_box_t {
  29823. margin-top: 10px;
  29824. }
  29825. .info_box_t_box {
  29826. display: flex;
  29827. align-items: center;
  29828. flex-wrap: wrap;
  29829. margin-bottom: 5px;
  29830. }
  29831. .info_box_t_box + .info_box_t_box{
  29832. margin-left: 10px;
  29833. }
  29834. .info_box_t_box > span{
  29835. width: fit-content;
  29836. font-weight: bold;
  29837. font-size: 14px;
  29838. }
  29839. .info_box_t_box > input{
  29840. width: 150px !important;
  29841. margin: 0 5px 0 0;
  29842. }
  29843. .info_radio >>> .el-radio, .el-radio__input{
  29844. line-height: 18px;
  29845. height: 18px;
  29846. }
  29847. .mode_box{
  29848. display: flex;
  29849. align-items: center;
  29850. }
  29851. .mode_box > span{
  29852. padding: 0px 5px;
  29853. cursor: pointer;
  29854. }
  29855. .mode_box > span.active{
  29856. color: #409eff;
  29857. }
  29858. .chapter_upload_check {
  29859. width: 15px;
  29860. height: 15px;
  29861. min-width: 15px;
  29862. min-height: 15px;
  29863. cursor: pointer;
  29864. background-image: url('../../../assets/icon/check.png');
  29865. background-size: 100% 100%;
  29866. }
  29867. .chapter_upload_check.checked{
  29868. background-image: url('../../../assets/icon/checked.png');
  29869. }
  29870. .ruleBtn {
  29871. width: fit-content;
  29872. height: 36px;
  29873. line-height: 36px;
  29874. cursor: pointer;
  29875. color: #0061FF;
  29876. }
  29877. .stopBtn{
  29878. z-index: 999999;
  29879. position: absolute;
  29880. left: 50%;
  29881. top: calc(50% + 70px);
  29882. transform: translateX(-50%);
  29883. }
  29884. .rateSwitch >>> .el-switch__label.is-active {
  29885. color: #0061FF;
  29886. }
  29887. .rateSwitch >>> .el-switch__label--right{
  29888. display: flex;
  29889. align-items: center;
  29890. }
  29891. .rateSwitch >>> .el-switch__label--right::before{
  29892. content: "";
  29893. width: 14px;
  29894. height: 14px;
  29895. min-width: 14px;
  29896. min-height: 14px;
  29897. background-size: 100% 100%;
  29898. display: block;
  29899. margin-right: 7px;
  29900. background-image: url(../../../assets/icon/new/u_op2.png);
  29901. }
  29902. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29903. background-image: url(../../../assets/icon/new/u_op.png);
  29904. }
  29905. .inter_box{
  29906. min-width: calc(50%);
  29907. min-height: 500px;
  29908. margin-right: 10px;
  29909. border: 1px solid #c7c7c7;
  29910. border-radius: 0px 5px 5px 5px;
  29911. overflow: hidden;
  29912. position: relative;
  29913. box-sizing: border-box;
  29914. }
  29915. .inter_box::before{
  29916. content:'对话区';
  29917. position: absolute;
  29918. left: 0;
  29919. top: 0;
  29920. display: block;
  29921. padding: 8px 10px;
  29922. background: #e0eafb;
  29923. color: #98a0ac;
  29924. font-size: 14px;
  29925. border-radius: 0 15px 15px 0;
  29926. }
  29927. .inter_voiceBox,
  29928. .inter_Detailbox{
  29929. border: 1px solid #c7c7c7;
  29930. border-radius: 0px 5px 5px 5px;
  29931. overflow: hidden;
  29932. position: relative;
  29933. box-sizing: border-box;
  29934. }
  29935. .inter_Detailbox::before{
  29936. content:'编辑区';
  29937. position: absolute;
  29938. left: 0;
  29939. top: 0;
  29940. display: block;
  29941. padding: 8px 10px;
  29942. background: #e0eafb;
  29943. color: #98a0ac;
  29944. font-size: 14px;
  29945. border-radius: 0 15px 15px 0;
  29946. }
  29947. .inter_voiceBox::before{
  29948. content:'录音区';
  29949. position: absolute;
  29950. left: 0;
  29951. top: 0;
  29952. display: block;
  29953. padding: 8px 10px;
  29954. background: #e0eafb;
  29955. color: #98a0ac;
  29956. font-size: 14px;
  29957. border-radius: 0 15px 15px 0;
  29958. z-index: 999;
  29959. }
  29960. .inter_box > iframe{
  29961. width: 100%;
  29962. height: 100%;
  29963. border: none;
  29964. }
  29965. .inter_setting{
  29966. display: block;
  29967. background-image: url(../../../assets/icon/course/setting.svg);
  29968. background-size: 100% 100%;
  29969. width: 20px;
  29970. height: 20px;
  29971. cursor: pointer;
  29972. margin-left: 10px;
  29973. }
  29974. .inter_setting_panel{
  29975. position: absolute;
  29976. left: 110px;
  29977. top: 30px;
  29978. background: #fff;
  29979. border-radius: 5px;
  29980. box-shadow: 0px 0px 2px 1px #00000017;
  29981. padding: 10px;
  29982. z-index: 999;
  29983. }
  29984. .panel_title{
  29985. text-align: center;
  29986. font-size: 18px;
  29987. margin-bottom: 10px;
  29988. }
  29989. .panel_tips{
  29990. font-weight: 500;
  29991. font-size: 14px;
  29992. text-align: center;
  29993. margin-bottom: 10px;
  29994. color: #6d6d6d;
  29995. }
  29996. .panel_input{
  29997. margin-bottom: 10px;
  29998. }
  29999. .panel_button{
  30000. display: flex;
  30001. justify-content: space-between;
  30002. }
  30003. .panel_input_record {
  30004. margin-top: 10px;
  30005. }
  30006. .panel_input_record > span{
  30007. margin-bottom: 5px;
  30008. display: block;
  30009. }
  30010. .custom-switch >>> .el-switch__label.is-active {
  30011. color: #0061FF;
  30012. }
  30013. .close_btn{
  30014. position: absolute;
  30015. top: 40px;
  30016. right: 10px;
  30017. box-shadow: 0 0 4px 2px #00000033;
  30018. border-radius: 70px 0 0 70px;
  30019. display: flex;
  30020. align-items: center;
  30021. padding-left: 5px;
  30022. padding: 10px 7px 10px 12px;
  30023. background: #fff;
  30024. cursor: pointer;
  30025. }
  30026. .close_btn > img {
  30027. width: 15px;
  30028. transition: 0.3s;
  30029. transform: rotate(0deg);
  30030. }
  30031. .close_btn_voice > img{
  30032. transform: rotate(180deg);
  30033. }
  30034. .resizable {
  30035. position: relative;
  30036. min-width: 350px; /* 最小宽度 */
  30037. max-width: 50%; /* 最大宽度 */
  30038. }
  30039. .resizer {
  30040. width: 12.8px;
  30041. height: 28.8px;
  30042. /* background: #ccc; */
  30043. position: absolute;
  30044. top: 50%;
  30045. left: 0;
  30046. cursor: ew-resize;
  30047. transform: translateY(-50%);
  30048. /* border-radius: 43px; */
  30049. background-image: url(../../../assets/icon/course/course_slide.png);
  30050. background-size: 100% 100%;
  30051. }
  30052. .pptBox{
  30053. position: fixed;
  30054. bottom: 10px;
  30055. left: 20px;
  30056. padding: 10px;
  30057. }
  30058. .pptBox > .box > div + div{
  30059. margin-top: 10px;
  30060. }
  30061. .ppClass{
  30062. background: #fff;
  30063. border-radius: 5px;
  30064. box-shadow: 0 0 6px 3px #00000030;
  30065. overflow: hidden;
  30066. }
  30067. .file-loading-class >>> .el-loading-spinner{
  30068. margin-top: -10px;
  30069. }
  30070. .file-loading-class >>> .el-loading-spinner .circular{
  30071. height: 20px;
  30072. width: 20px;
  30073. }
  30074. .button-toggle {
  30075. color: #007bff; /* 文本颜色 */
  30076. cursor: pointer; /* 鼠标悬停时显示手型 */
  30077. transition: color 0.2s; /* 文字颜色过渡效果 */
  30078. font-size: 14px;
  30079. }
  30080. .button-toggle:hover {
  30081. color: #0056b3; /* 悬停时的文字颜色 */
  30082. }
  30083. .button-toggle:focus {
  30084. outline: none; /* 去掉聚焦时的边框 */
  30085. }
  30086. .right_icon{
  30087. width: 12px;
  30088. height: 12px;
  30089. margin-left: 5px;
  30090. }
  30091. .buttonBoxB{
  30092. position: relative;
  30093. margin: 0 0 0 10px;
  30094. }
  30095. .buttonBoxB::after{
  30096. content: '';
  30097. display: block;
  30098. background-image: url(../../../assets/icon/course/downArrow.svg);
  30099. background-size: 100% 100%;
  30100. width: 15px;
  30101. height: 15px;
  30102. cursor: pointer;
  30103. margin-left: 5px;
  30104. }
  30105. .buttonBoxB:hover .buttonBox{
  30106. display: block;
  30107. }
  30108. .buttonBox {
  30109. position: absolute;
  30110. bottom: -0;
  30111. left: 0;
  30112. transform: translateY(100%);
  30113. background: #fff;
  30114. border-radius: 5px;
  30115. box-shadow: 0 0 3px 1px #e3e3e3;
  30116. width: 155px;
  30117. display: none;
  30118. z-index: 99999;
  30119. }
  30120. .buttonBox>div {
  30121. height: 40px;
  30122. line-height: 40px;
  30123. width: 100%;
  30124. text-align: center;
  30125. color: #000;
  30126. box-sizing: border-box;
  30127. }
  30128. .buttonBox>div+div {
  30129. border-top: 1px solid #e0e0e0;
  30130. }
  30131. .buttonBox>div:hover {
  30132. background: #f6f8ff;
  30133. }
  30134. .appendix_info_title {
  30135. padding: 15px 0 15px 0;
  30136. font-size: 20px;
  30137. font-weight: bold;
  30138. margin: 0 0 0 20px;
  30139. box-sizing: border-box;
  30140. display: flex;
  30141. align-items: center;
  30142. line-height: 20px;
  30143. }
  30144. .appendix_file_box{
  30145. width: 100%
  30146. }
  30147. .appendix_check_box{}
  30148. .appendix_check_box > div + div{
  30149. margin-top: 10px;
  30150. }
  30151. .appendix_check_task{
  30152. display: flex;
  30153. align-items: center;
  30154. }
  30155. .appendix_check_type{
  30156. display: flex;
  30157. align-items: center;
  30158. }
  30159. .appendix_check_task > span,
  30160. .appendix_check_type > span{
  30161. width: 100px;
  30162. }
  30163. .appendix_check_task > .checkButton,
  30164. .appendix_check_type > .checkButton{
  30165. border: 1px solid #1684fc;
  30166. color: #1684fc;
  30167. padding: 5px 10px;
  30168. border-radius: 5px;
  30169. margin-right: 10px;
  30170. cursor: pointer;
  30171. }
  30172. .appendix_check_task > .checkButton.checked,
  30173. .appendix_check_type > .checkButton.checked{
  30174. background: #1684fc;
  30175. color: #fff;
  30176. }
  30177. .appendix_check_all_box{
  30178. display: flex;
  30179. align-items: center;
  30180. margin-bottom: 5px;
  30181. }
  30182. .appendix_check_all{
  30183. display: flex;
  30184. align-items: center;
  30185. cursor: pointer;
  30186. }
  30187. .appendix_check_all_text{
  30188. margin-left: 5px;
  30189. }
  30190. .know_serach_box{
  30191. margin-bottom: 20px;
  30192. display: flex;
  30193. align-items: center;
  30194. }
  30195. .know_serach_box > span{
  30196. min-width: 100px;
  30197. flex-shrink: 0;
  30198. }
  30199. .know_serach_box > .c_pub_button_add{
  30200. min-width: fit-content;
  30201. }
  30202. .add_chapters_check_box{
  30203. display: flex;
  30204. align-items: center;
  30205. height: 50px;
  30206. }
  30207. .add_chapters_check{
  30208. display: flex;
  30209. align-items: center;
  30210. cursor: pointer;
  30211. }
  30212. .Ovh{
  30213. width: 4em;
  30214. -webkit-line-clamp: 2;
  30215. text-align: center;
  30216. display: -webkit-box;
  30217. -webkit-box-orient: vertical;
  30218. overflow: hidden;
  30219. text-overflow: ellipsis;
  30220. }
  30221. </style>