addCourse.vue 1.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0">
  6. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  7. <div class="courseTop">
  8. <div class="stepsNav">
  9. <el-breadcrumb separator-class="el-icon-arrow-right">
  10. <el-breadcrumb-item :to="{
  11. path:
  12. '/course?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role,
  20. }">课程管理</el-breadcrumb-item>
  21. <el-breadcrumb-item>
  22. <span style="color: rgb(15, 126, 255)">添加课程</span>
  23. </el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  27. </div>
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box">
  121. <div class="bb_courseIcon">
  122. <img src="../../../assets/icon/new/course.png" />
  123. </div>
  124. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  125. border: 1.5px solid rgb(202, 209, 220);
  126. margin: 0px 10px 0px 0px;
  127. border-radius: 5px;
  128. font-weight: 600;
  129. padding: 12px 14px 12px 71px;
  130. " @change="setCover" />
  131. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  132. style="justify-content: center; min-width: 150px"></el-switch>
  133. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  134. style="justify-content: center; min-width: 175px"></el-switch>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  139. <span>类型</span>
  140. <!-- 学科+ 主题+ 未来+ -->
  141. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  142. style="display: flex; align-items: center">
  143. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  144. :key="index">
  145. <el-radio :label="item.name">{{
  146. item.name
  147. }}</el-radio>
  148. </div>
  149. </el-radio-group>
  150. </div>
  151. <div class="both">
  152. <div class="choose">
  153. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  154. <span v-if="
  155. CourseTypeJson[item.id].length > 0 &&
  156. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  157. ? pTypeCheck.indexOf(item.id) != -1
  158. : true)
  159. ">{{ item.name }}:</span>
  160. <el-checkbox-group v-model="courseTypeId" v-if="
  161. CourseTypeJson[item.id].length > 0 &&
  162. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  163. ? pTypeCheck.indexOf(item.id) != -1
  164. : true)
  165. ">
  166. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  167. item1.name }}</el-checkbox>
  168. </el-checkbox-group>
  169. <!-- <div
  170. v-else
  171. style="font-size: 14px; margin-left: -8px"
  172. >
  173. 暂无
  174. </div> -->
  175. </div>
  176. </div>
  177. </div>
  178. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  179. <div class="info_box_t_box">
  180. <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  181. style="justify-content: center; min-width: 175px"></el-switch>
  182. </div>
  183. <div class="info_box_t_box">
  184. <span>AI生成模式:</span>
  185. <div class="mode_box">
  186. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  187. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  188. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  189. </div>
  190. </div>
  191. </div>
  192. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  193. <div class="info_box_t_box">
  194. <span>课程节数:</span>
  195. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  196. <span>节</span>
  197. </div>
  198. <div class="info_box_t_box">
  199. <span>课程时长:</span>
  200. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  201. <span>min</span>
  202. </div>
  203. </div> -->
  204. </div>
  205. <div class="right_first" v-loading="imageloading2">
  206. <!-- <div class="ai_box">
  207. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  208. </div> -->
  209. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  210. 上传封面
  211. </div>
  212. <div style="width: 100%">
  213. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  214. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  215. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  216. <div v-if="cover.length == 0">点击添加封面</div>
  217. <div class="cover_mask">
  218. <img src="../../../assets/icon/new/cover_update.png" /><span
  219. style="margin-top: 5px">修改封面</span>
  220. </div>
  221. </div>
  222. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  223. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  224. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  225. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  226. <i class="el-icon-plus"></i>
  227. </el-upload> -->
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  235. <div class="whiteBg" style="border-radius: 0">
  236. <div class="c_info_title">
  237. 课程权限设置
  238. </div>
  239. <div class="wb_j_box">
  240. <div class="wb_j_box_content">
  241. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  242. (dialogVisibleClass = true),
  243. (classSearch = ''),
  244. (gradeId = ''),
  245. getClass()
  246. ">添加班级</button>
  247. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  248. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  249. getClassC(tc) }}</span>
  250. </div> -->
  251. <div class="wb_j_box_btn" @click="
  252. (dialogVisibleClass = true),
  253. (classSearch = ''),
  254. (gradeId = ''),
  255. getClass()
  256. ">
  257. <div class="wb_j_box_title">授课班级</div>
  258. <div class="wb_j_box_btn_c">
  259. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  260. v-if="checkboxList2.length" popper-class="text_tooltip2">
  261. <div class="wb_j_box_span">
  262. {{ getListClassC(checkboxList2) }}
  263. </div>
  264. </el-tooltip>
  265. <div v-else class="wb_j_box_span">请选择授课班级</div>
  266. <div class="wb_j_box_arrow"></div>
  267. </div>
  268. </div>
  269. </div>
  270. <div class="wb_j_box_content">
  271. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  272. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  273. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  274. checkBoolean
  275. ? checkboxList3
  276. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  277. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  278. </div> -->
  279. <div class="wb_j_box_btn" @click="openMember">
  280. <div class="wb_j_box_title">协同人员</div>
  281. <div class="wb_j_box_btn_c">
  282. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  283. v-if="checkboxList3.length" popper-class="text_tooltip2">
  284. <div class="wb_j_box_span">
  285. {{ getListMan2(checkboxList3) }}
  286. </div>
  287. </el-tooltip>
  288. <div v-else class="wb_j_box_span">请选择协同人员</div>
  289. <div class="wb_j_box_arrow"></div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  296. <div class="c_info_title">目标管理</div>
  297. <div style="margin: 0 auto; padding: 0 20px">
  298. <div style="
  299. width: 95%;
  300. min-height: 200px;
  301. border: 1px solid #cad1dc;
  302. border-radius: 4px;
  303. position: relative;
  304. ">
  305. <div class="e_add_top">
  306. <div class="e_add_title">
  307. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  308. 清除
  309. </button>
  310. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  311. 添加
  312. </button>
  313. <!-- <span>当前使用目标管理</span>
  314. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  315. <img
  316. src="../../../assets/line.png"
  317. class="cru_line"
  318. style="
  319. width: 125px;
  320. height: 20px;
  321. bottom: -10px;
  322. left: 155px;
  323. "
  324. /> -->
  325. </div>
  326. <div style="
  327. display: flex;
  328. flex-direction: row;
  329. align-items: center;
  330. ">
  331. <!-- <el-button
  332. type="primary"
  333. size="small"
  334. @click="dialogVisiblemb = true"
  335. >添加目标管理</el-button
  336. >
  337. <el-button
  338. type="primary"
  339. size="small"
  340. @click="deleteEva()"
  341. >清除内容</el-button
  342. > -->
  343. <!-- <div class="e_add_delete" @click="deleteEva()">
  344. <img src="../../../assets/icon/delete.png" alt="" />
  345. </div> -->
  346. </div>
  347. </div>
  348. <div v-if="evalua == ''">
  349. <div class="noneBox">
  350. <img src="../../../assets/icon/new/eva_none.png" />
  351. <span>请添加目标管理</span>
  352. </div>
  353. </div>
  354. <div class="e_add_content" v-else>
  355. <div class="e_add_list_pbox">
  356. <div class="e_add_list_pbox_title">
  357. <span class="type_title">切换模式</span>
  358. <div class="type_content">
  359. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  360. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  361. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  362. </div>
  363. </div>
  364. <div class="e_add_list_pbox_content">
  365. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  366. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  367. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  368. v-if="typeMode == 3">
  369. </SeeBoard>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. </div>
  377. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  378. <div style="position: relative;
  379. background: #fff;
  380. box-sizing: border-box;
  381. padding: 1px 20px 10px;
  382. width: 100%;
  383. border-radius: 10px;">
  384. <div style="
  385. display: flex;
  386. flex-direction: row;
  387. justify-content: space-between;
  388. align-items: center;
  389. " :style="{
  390. margin: true
  391. ? '20px 0 10px'
  392. : '20px 0 0',
  393. }">
  394. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  395. 已有教案
  396. <div class="add_info_box" style="margin: 0 0 0 auto">
  397. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  398. 上传已有教案
  399. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  400. beforeUploadInfo2(
  401. $event,
  402. 14
  403. )
  404. " />
  405. </button>
  406. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  407. 一键智能总结生成
  408. </button>
  409. </div>
  410. </div>
  411. </div>
  412. <div>
  413. <div class="add_chapters_box add_c_none" v-if="
  414. teacherInfoData &&
  415. teacherInfoData.length == 0
  416. ">
  417. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  418. </div>
  419. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  420. <div @dragstart="
  421. dragStart(item1, index1, 0)
  422. " @dragover.prevent="
  423. dragOver(index1, 0)
  424. " @dragend="dragEnd()" :draggable="isdrag ==
  425. 'chapter-' + 0 + '-' + index1
  426. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  427. getChapterData(
  428. $event,
  429. index1,
  430. item1.type
  431. )
  432. " :class="{
  433. dragOverTop2:
  434. newIndex === index1 &&
  435. typeIndex ==
  436. 'chapter-' +
  437. 0 +
  438. '-' +
  439. index1 &&
  440. oldIndex > index1 &&
  441. dragType == 'drag',
  442. dragOverBottom2:
  443. newIndex === index1 &&
  444. typeIndex ==
  445. 'chapter-' +
  446. 0 +
  447. '-' +
  448. index1 &&
  449. oldIndex < index1 &&
  450. dragType == 'drag',
  451. }">
  452. <div class="chapter_upload_o" style="
  453. position: relative;
  454. display: flex;
  455. align-items: center;
  456. ">
  457. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  458. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  459. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  460. </div>
  461. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  462. </div>
  463. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  464. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  465. </div>
  466. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  467. </div>
  468. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  469. </div>
  470. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  471. </div>
  472. </div>
  473. <div class="chapter_upload_n">
  474. <input readonly="true" v-if="
  475. item1.type == 2 ||
  476. item1.type == 3 ||
  477. item1.type == 12 ||
  478. item1.type == 13 ||
  479. item1.type == 7
  480. " :placeholder="item1.name" style="
  481. border: none;
  482. outline: none;
  483. width: 80%;
  484. minwidth: 215px;
  485. z-index: 99;
  486. font-size: 14px;
  487. white-space: nowrap;
  488. overflow: hidden;
  489. text-overflow: ellipsis;
  490. " />
  491. </div>
  492. <div class="chapter_upload_ic">
  493. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  494. <div class="chapter_upload_ic_r" @click.stop="
  495. deleteTeacherInfoData(
  496. $event,
  497. index1
  498. )
  499. ">
  500. <div></div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. </div>
  506. </div>
  507. <div v-if="
  508. teacherinfoproVisible
  509. " class="mask">
  510. <div class="progressBox">
  511. <div class="lbox">
  512. <img src="../../../assets/loading.gif" />上传中,请稍后
  513. </div>
  514. <div style="margin-bottom: 10px">
  515. <span>{{
  516. teacherinfoisFinishSize
  517. }}</span>
  518. /
  519. <span>{{
  520. teacherinfoisAllSize
  521. }}</span>
  522. </div>
  523. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  524. ? teacherinfoprogress
  525. : 0
  526. " style="width: 80%"></el-progress> -->
  527. </div>
  528. </div>
  529. </div>
  530. </div>
  531. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  532. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  533. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  534. <div class="c_info_title">
  535. 已有教案摘要
  536. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  537. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  538. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  539. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  540. </el-tooltip>
  541. </div>
  542. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  543. <div style="width: calc(100%);" class='op_task_box'>
  544. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  545. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  546. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  547. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  548. <div class="op_box">
  549. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  550. <div style="display: flex;">
  551. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  552. <div class="r_pub_button_op"
  553. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  554. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  555. </el-tooltip>
  556. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  557. </div>
  558. </div>
  559. </div>
  560. </div>
  561. </div>
  562. </div>
  563. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  564. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  565. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  566. <div class="c_info_title">
  567. 课程目标
  568. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  569. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  570. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  571. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  572.                   </el-tooltip>
  573. </div>
  574. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  575. <div style="width: calc(100%);" class='op_task_box'>
  576. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  577. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  578. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  579. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  580. <div class="op_box">
  581. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  582. <div style="display: flex;">
  583. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  584. <div class="r_pub_button_op"
  585. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  586. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  587. </el-tooltip>
  588. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  589. </div>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  596. <div style="position: relative;
  597. background: #fff;
  598. box-sizing: border-box;
  599. padding: 1px 20px 10px;
  600. width: 100%;
  601. border-radius: 10px;">
  602. <div style="
  603. display: flex;
  604. flex-direction: row;
  605. justify-content: space-between;
  606. align-items: center;
  607. " :style="{
  608. margin: true
  609. ? '20px 0 10px'
  610. : '20px 0 0',
  611. }">
  612. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  613. 系统推荐参考资料
  614. <div class="add_info_box" style="margin: 0 0 0 auto">
  615. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  616. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  617. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  618. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  619.  </el-tooltip>
  620. </div>
  621. </div>
  622. </div>
  623. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  624. <div class="add_chapters_box add_c_none" v-if="
  625. cankaoInfoData &&
  626. cankaoInfoData.length == 0
  627. ">
  628. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  629. </div>
  630. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  631. <div @dragstart="
  632. dragStart(item1, index1, 0)
  633. " @dragover.prevent="
  634. dragOver(index1, 0)
  635. " @dragend="dragEnd()" :draggable="isdrag ==
  636. 'chapter-' + 0 + '-' + index1
  637. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  638. getChapterData(
  639. $event,
  640. index1,
  641. item1.type
  642. )
  643. " :class="{
  644. dragOverTop2:
  645. newIndex === index1 &&
  646. typeIndex ==
  647. 'chapter-' +
  648. 0 +
  649. '-' +
  650. index1 &&
  651. oldIndex > index1 &&
  652. dragType == 'drag',
  653. dragOverBottom2:
  654. newIndex === index1 &&
  655. typeIndex ==
  656. 'chapter-' +
  657. 0 +
  658. '-' +
  659. index1 &&
  660. oldIndex < index1 &&
  661. dragType == 'drag',
  662. }">
  663. <div class="chapter_upload_o" style="
  664. position: relative;
  665. display: flex;
  666. align-items: center;
  667. ">
  668. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  669. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  670. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  671. </div>
  672. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  673. </div>
  674. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  675. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  676. </div>
  677. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  678. </div>
  679. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  680. </div>
  681. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  682. </div>
  683. </div>
  684. <div class="chapter_upload_n">
  685. <input readonly="true" v-if="
  686. item1.type == 2 ||
  687. item1.type == 3 ||
  688. item1.type == 12 ||
  689. item1.type == 13 ||
  690. item1.type == 7
  691. " :placeholder="item1.name" style="
  692. border: none;
  693. outline: none;
  694. width: 80%;
  695. minwidth: 215px;
  696. z-index: 99;
  697. font-size: 14px;
  698. white-space: nowrap;
  699. overflow: hidden;
  700. text-overflow: ellipsis;
  701. " />
  702. </div>
  703. <div class="chapter_upload_ic">
  704. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  705. <div class="chapter_upload_ic_r" @click.stop="
  706. deleteCankaoInfoData(
  707. $event,
  708. index1
  709. )
  710. ">
  711. <div></div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. </div>
  717. </div>
  718. </div>
  719. </div>
  720. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  721. <div style="position: relative;
  722. background: #fff;
  723. box-sizing: border-box;
  724. padding: 1px 20px 10px;
  725. width: 100%;
  726. border-radius: 10px;">
  727. <div style="
  728. display: flex;
  729. flex-direction: row;
  730. justify-content: space-between;
  731. align-items: center;
  732. " :style="{
  733. margin: true
  734. ? '20px 0 10px'
  735. : '20px 0 0',
  736. }">
  737. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  738. 知识库
  739. <div class="add_info_box" style="margin: 0 0 0 auto">
  740. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  741. 上传补充资料
  742. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  743. beforeUploadInfo2(
  744. $event,
  745. 15
  746. )
  747. " />
  748. </button>
  749. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  750. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  751. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  752. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  753.  </el-tooltip>
  754. </div>
  755. </div>
  756. </div>
  757. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  758. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  759. <div class="add_chapters_box add_c_none" v-if="
  760. infoData2 &&
  761. infoData2.length == 0
  762. ">
  763. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  764. </div>
  765. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  766. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  767. getChapterData(
  768. $event,
  769. index1,
  770. item1.type
  771. )
  772. " >
  773. <div class="chapter_upload_o" style="
  774. position: relative;
  775. display: flex;
  776. align-items: center;
  777. ">
  778. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  779. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  780. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  781. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  782. </div>
  783. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  784. </div>
  785. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  786. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  787. </div>
  788. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  789. </div>
  790. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  791. </div>
  792. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  793. </div>
  794. </div>
  795. <div class="chapter_upload_n">
  796. <input readonly="true" v-if="
  797. item1.type == 2 ||
  798. item1.type == 3 ||
  799. item1.type == 12 ||
  800. item1.type == 13 ||
  801. item1.type == 7
  802. " :placeholder="item1.name" @click.stop="
  803. checkChpater2($event, index1 )
  804. " style="
  805. border: none;
  806. outline: none;
  807. width: 80%;
  808. minwidth: 215px;
  809. z-index: 99;
  810. font-size: 14px;
  811. white-space: nowrap;
  812. overflow: hidden;
  813. text-overflow: ellipsis;
  814. " />
  815. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  816. border: none;
  817. outline: none;
  818. width: 80%;
  819. white-space: nowrap;
  820. overflow: hidden;
  821. text-overflow: ellipsis;
  822. " readonly="true" @click="
  823. selectAttText(index1)
  824. " />
  825. <input :placeholder="item1.title ? item1.title : '链接'
  826. " v-if="item1.type == 8" style="
  827. border: none;
  828. outline: none;
  829. width: 80%;
  830. white-space: nowrap;
  831. overflow: hidden;
  832. text-overflow: ellipsis;
  833. " readonly="true" @click="selectLine(index1)" />
  834. <input :placeholder="item1.title ? item1.title : '链接'
  835. " v-if="item1.type == 14" style="
  836. border: none;
  837. outline: none;
  838. width: 80%;
  839. white-space: nowrap;
  840. overflow: hidden;
  841. text-overflow: ellipsis;
  842. " readonly="true" @click="
  843. openUpdateSource(index1)
  844. " />
  845. </div>
  846. <div class="chapter_upload_ic">
  847. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  848. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  849. checkChpater2($event, index1 )
  850. ">
  851. <div></div>
  852. </div>
  853. <div class="chapter_upload_ic_r" @click.stop="
  854. deleteInfoData2(
  855. $event,
  856. index1
  857. )
  858. ">
  859. <div></div>
  860. </div>
  861. </div>
  862. </div>
  863. </div>
  864. </div>
  865. </div>
  866. <div v-if="
  867. infoproVisible
  868. " class="mask">
  869. <div class="progressBox">
  870. <div class="lbox">
  871. <img src="../../../assets/loading.gif" />上传中,请稍后
  872. </div>
  873. <div style="margin-bottom: 10px">
  874. <span>{{
  875. infoisFinishSize
  876. }}</span>
  877. /
  878. <span>{{
  879. infoisAllSize
  880. }}</span>
  881. </div>
  882. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  883. ? infoprogress
  884. : 0
  885. " style="width: 80%"></el-progress> -->
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  891. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  892. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  893. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  894. 课程简要描述
  895. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  896. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  897. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  898. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  899. </el-tooltip>
  900. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  901. </div>
  902. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  903. <div style="width: calc(100%);" class='op_task_box'>
  904. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  905. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  906. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  907. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  908. <div class="op_box">
  909. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  910. <div style="display: flex;">
  911. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  912. <div class="r_pub_button_op"
  913. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  914. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  915. </el-tooltip>
  916. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
  917. </div>
  918. </div>
  919. </div>
  920. </div>
  921. </div>
  922. </div>
  923. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="((!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  924. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  925. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  926. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  927. 课程目标
  928. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  929. 上传补充资料
  930. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  931. beforeUploadInfo2(
  932. $event,
  933. 16
  934. )
  935. " />
  936. </button>
  937. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  938. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  939. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  940. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  941. </el-tooltip>
  942. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  943. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  944. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  945. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标</button>
  946. </el-tooltip>
  947. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  948. <div class="add_chapters_box add_c_none" v-if="
  949. mubiaoInfoData &&
  950. mubiaoInfoData.length == 0
  951. ">
  952. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  953. </div>
  954. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  955. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  956. getChapterData(
  957. $event,
  958. index1,
  959. item1.type
  960. )
  961. " >
  962. <div class="chapter_upload_o" style="
  963. position: relative;
  964. display: flex;
  965. align-items: center;
  966. ">
  967. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  968. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  969. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  970. </div>
  971. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  972. </div>
  973. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  974. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  975. </div>
  976. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  977. </div>
  978. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  979. </div>
  980. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  981. </div>
  982. </div>
  983. <div class="chapter_upload_n">
  984. <input readonly="true" v-if="
  985. item1.type == 2 ||
  986. item1.type == 3 ||
  987. item1.type == 12 ||
  988. item1.type == 13 ||
  989. item1.type == 7
  990. " :placeholder="item1.name" @click.stop="
  991. checkChpater3($event, index1, item1)
  992. " style="
  993. border: none;
  994. outline: none;
  995. width: 80%;
  996. minwidth: 215px;
  997. z-index: 99;
  998. font-size: 14px;
  999. white-space: nowrap;
  1000. overflow: hidden;
  1001. text-overflow: ellipsis;
  1002. " />
  1003. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1004. border: none;
  1005. outline: none;
  1006. width: 80%;
  1007. white-space: nowrap;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. " readonly="true" @click="
  1011. selectAttText(index1)
  1012. " />
  1013. <input :placeholder="item1.title ? item1.title : '链接'
  1014. " v-if="item1.type == 8" style="
  1015. border: none;
  1016. outline: none;
  1017. width: 80%;
  1018. white-space: nowrap;
  1019. overflow: hidden;
  1020. text-overflow: ellipsis;
  1021. " readonly="true" @click="selectLine(index1)" />
  1022. <input :placeholder="item1.title ? item1.title : '链接'
  1023. " v-if="item1.type == 14" style="
  1024. border: none;
  1025. outline: none;
  1026. width: 80%;
  1027. white-space: nowrap;
  1028. overflow: hidden;
  1029. text-overflow: ellipsis;
  1030. " readonly="true" @click="
  1031. openUpdateSource(index1)
  1032. " />
  1033. </div>
  1034. <div class="chapter_upload_ic">
  1035. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1036. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1037. checkChpater3($event, index1, item1)
  1038. ">
  1039. <div></div>
  1040. </div>
  1041. <div class="chapter_upload_ic_r" @click.stop="
  1042. deletemubiaoInfoData(
  1043. $event,
  1044. index1
  1045. )
  1046. ">
  1047. <div></div>
  1048. </div>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. </div>
  1054. <div v-if="
  1055. mubiaoinfoproVisible
  1056. " class="mask">
  1057. <div class="progressBox">
  1058. <div class="lbox">
  1059. <img src="../../../assets/loading.gif" />上传中,请稍后
  1060. </div>
  1061. <div style="margin-bottom: 10px">
  1062. <span>{{
  1063. mubiaoinfoisFinishSize
  1064. }}</span>
  1065. /
  1066. <span>{{
  1067. mubiaoinfoisAllSize
  1068. }}</span>
  1069. </div>
  1070. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1071. ? mubiaoinfoprogress
  1072. : 0
  1073. " style="width: 80%"></el-progress> -->
  1074. </div>
  1075. </div>
  1076. </div>
  1077. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1078. <div style="width: calc(100%);" class='op_task_box'>
  1079. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1080. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1081. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1082. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1083. <div class="op_box">
  1084. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1085. <div style="display: flex;">
  1086. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1087. <div class="r_pub_button_op"
  1088. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  1089. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  1090. </el-tooltip>
  1091. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1092. </div>
  1093. </div>
  1094. </div>
  1095. </div>
  1096. </div>
  1097. </div>
  1098. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1099. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1100. <div class="c_info_title">
  1101. 补充资料
  1102. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1103. </div>
  1104. <div class="buchong_box">
  1105. <span>暂时还没有内容,快去添加吧~</span>
  1106. </div>
  1107. </div> -->
  1108. <div style="position: relative;
  1109. background: #fff;
  1110. box-sizing: border-box;
  1111. padding: 1px 20px 10px;
  1112. width: 100%;
  1113. border-radius: 10px;">
  1114. <div style="
  1115. display: flex;
  1116. flex-direction: row;
  1117. justify-content: space-between;
  1118. align-items: center;
  1119. " :style="{
  1120. margin: true
  1121. ? '20px 0 10px'
  1122. : '20px 0 0',
  1123. }">
  1124. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1125. 补充资料
  1126. <div class="add_info_box" style="margin: 0 0 0 auto">
  1127. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1128. 上传补充资料
  1129. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1130. beforeUploadInfo2(
  1131. $event,
  1132. 13
  1133. )
  1134. " />
  1135. </button>
  1136. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1137. 图文
  1138. </button>
  1139. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1140. 链接
  1141. </button>
  1142. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1143. 代码
  1144. </button>
  1145. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1146. 资源
  1147. </button> -->
  1148. </div>
  1149. </div>
  1150. </div>
  1151. <div>
  1152. <div class="add_chapters_box add_c_none" v-if="
  1153. infoData &&
  1154. infoData.length == 0
  1155. ">
  1156. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1157. </div>
  1158. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1159. <div @dragstart="
  1160. dragStart(item1, index1, 0)
  1161. " @dragover.prevent="
  1162. dragOver(index1, 0)
  1163. " @dragend="dragEnd()" :draggable="isdrag ==
  1164. 'chapter-' + 0 + '-' + index1
  1165. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1166. getChapterData(
  1167. $event,
  1168. index1,
  1169. item1.type
  1170. )
  1171. " :class="{
  1172. dragOverTop2:
  1173. newIndex === index1 &&
  1174. typeIndex ==
  1175. 'chapter-' +
  1176. 0 +
  1177. '-' +
  1178. index1 &&
  1179. oldIndex > index1 &&
  1180. dragType == 'drag',
  1181. dragOverBottom2:
  1182. newIndex === index1 &&
  1183. typeIndex ==
  1184. 'chapter-' +
  1185. 0 +
  1186. '-' +
  1187. index1 &&
  1188. oldIndex < index1 &&
  1189. dragType == 'drag',
  1190. }">
  1191. <!-- <div @mousedown="
  1192. isdrag =
  1193. 'chapter-' + 0 + '-' + index1
  1194. " @mouseup="isdrag = ''" @touchstart="
  1195. isdrag =
  1196. 'chapter-' + 0 + '-' + index1
  1197. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1198. <div class="chapter_upload_o" style="
  1199. position: relative;
  1200. display: flex;
  1201. align-items: center;
  1202. ">
  1203. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1204. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1205. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1206. </div>
  1207. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1208. </div>
  1209. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1210. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1211. </div>
  1212. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1213. </div>
  1214. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1215. </div>
  1216. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1217. </div>
  1218. </div>
  1219. <div class="chapter_upload_n">
  1220. <input readonly="true" v-if="
  1221. item1.type == 2 ||
  1222. item1.type == 3 ||
  1223. item1.type == 12 ||
  1224. item1.type == 13 ||
  1225. item1.type == 7
  1226. " :placeholder="item1.name" @click="
  1227. updataVideoT(
  1228. $event,
  1229. index1
  1230. )
  1231. " style="
  1232. border: none;
  1233. outline: none;
  1234. width: 80%;
  1235. minwidth: 215px;
  1236. z-index: 99;
  1237. font-size: 14px;
  1238. white-space: nowrap;
  1239. overflow: hidden;
  1240. text-overflow: ellipsis;
  1241. " />
  1242. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1243. border: none;
  1244. outline: none;
  1245. width: 80%;
  1246. white-space: nowrap;
  1247. overflow: hidden;
  1248. text-overflow: ellipsis;
  1249. " readonly="true" @click="
  1250. selectAttText(index1)
  1251. " />
  1252. <input :placeholder="item1.title ? item1.title : '链接'
  1253. " v-if="item1.type == 8" style="
  1254. border: none;
  1255. outline: none;
  1256. width: 80%;
  1257. white-space: nowrap;
  1258. overflow: hidden;
  1259. text-overflow: ellipsis;
  1260. " readonly="true" @click="selectLine(index1)" />
  1261. <input :placeholder="item1.title ? item1.title : '链接'
  1262. " v-if="item1.type == 14" style="
  1263. border: none;
  1264. outline: none;
  1265. width: 80%;
  1266. white-space: nowrap;
  1267. overflow: hidden;
  1268. text-overflow: ellipsis;
  1269. " readonly="true" @click="
  1270. openUpdateSource(index1)
  1271. " />
  1272. </div>
  1273. <div class="chapter_upload_ic">
  1274. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1275. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1276. <div class="chapter_upload_up" @click="
  1277. upCd(
  1278. $event,
  1279. index1
  1280. )
  1281. "></div>
  1282. <div class="chapter_upload_down" @click="
  1283. downCd(
  1284. $event,
  1285. index1
  1286. )
  1287. "></div>
  1288. </div>
  1289. <div class="chapter_upload_ic_edit" v-if="
  1290. item1.type == 2 ||
  1291. item1.type == 3 ||
  1292. item1.type == 12 ||
  1293. item1.type == 13 ||
  1294. item1.type == 7
  1295. " @click.stop="
  1296. updataVideoT(
  1297. $event,
  1298. index1
  1299. )
  1300. ">
  1301. <div></div>
  1302. </div>
  1303. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1304. selectAttText(index1)
  1305. ">
  1306. <div></div>
  1307. </div>
  1308. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1309. @click="selectLine(index1)">
  1310. <div></div>
  1311. </div>
  1312. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1313. openUpdateSource(index1)
  1314. ">
  1315. <div></div>
  1316. </div> -->
  1317. <div class="chapter_upload_ic_r" @click.stop="
  1318. deleteInfoData(
  1319. $event,
  1320. index1
  1321. )
  1322. ">
  1323. <div></div>
  1324. </div>
  1325. </div>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. </div>
  1330. <div v-if="
  1331. infoproVisible
  1332. " class="mask">
  1333. <div class="progressBox">
  1334. <!-- <div id="closePro" class="closeCss">
  1335. <img src="../../../../assets/icon/close.png" alt />
  1336. </div> -->
  1337. <div class="lbox">
  1338. <img src="../../../assets/loading.gif" />上传中,请稍后
  1339. </div>
  1340. <div style="margin-bottom: 10px">
  1341. <span>{{
  1342. infoisFinishSize
  1343. }}M</span>
  1344. /
  1345. <span>{{
  1346. infoisAllSize
  1347. }}M</span>
  1348. </div>
  1349. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1350. ? infoprogress
  1351. : 0
  1352. " style="width: 80%"></el-progress>
  1353. </div>
  1354. </div>
  1355. </div>
  1356. </div>
  1357. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1358. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1359. <div class="c_info_title">
  1360. 补充描述
  1361. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1362. </div>
  1363. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1364. <div style="width: calc(100%)">
  1365. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1366. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1367. </div>
  1368. </div>
  1369. </div>
  1370. </div>
  1371. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1372. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1373. <div class="c_info_title">
  1374. 课程大纲
  1375. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1376. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1377. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1378. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1379. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1380. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1381. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1382. </el-tooltip>
  1383. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1384. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1385. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1386. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1387. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1388. </div>
  1389. <div class="task_outline">
  1390. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1391. <div class="outline_task">
  1392. <div class="title">任务{{ index + 1 }}</div>
  1393. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1394. v-model="item.task" />
  1395. <div class="outline_btn">
  1396. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1397. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1398. </el-tooltip>
  1399. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1400. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1401. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1402. </div>
  1403. </div>
  1404. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1405. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1406. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1407. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1408. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1409. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1410. <div class="op_box">
  1411. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1412. <div style="display: flex;">
  1413. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1414. <div class="r_pub_button_op"
  1415. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1416. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1417. </el-tooltip>
  1418. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1419. item.isTask2 ? '确定' : '编辑'}}</div>
  1420. </div>
  1421. </div>
  1422. </div>
  1423. </div>
  1424. </div>
  1425. </div>
  1426. </div>
  1427. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  1428. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1429. <div class="c_info_title">
  1430. 概念群
  1431. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1432. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1433. </div>
  1434. <div class="task_outline">
  1435. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1436. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1437. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1438. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1439. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1440. <div class="op_box">
  1441. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1442. <div style="display: flex;">
  1443. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1444. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1445. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1446. </el-tooltip>
  1447. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1448. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1449. </div>
  1450. </div>
  1451. </div>
  1452. </div>
  1453. </div>
  1454. </div>
  1455. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  1456. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1457. <div class="c_info_title">
  1458. 问题链
  1459. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1460. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1461. </div>
  1462. <div class="task_outline">
  1463. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1464. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1465. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1466. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1467. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1468. <div class="op_box">
  1469. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1470. <div style="display: flex;">
  1471. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1472. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1473. @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
  1474. </el-tooltip>
  1475. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1476. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1477. </div>
  1478. </div>
  1479. </div>
  1480. </div>
  1481. </div>
  1482. </div>
  1483. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  1484. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1485. <div class="c_info_title">
  1486. 目标层
  1487. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1488. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1489. </div>
  1490. <div class="task_outline">
  1491. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1492. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1493. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1494. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1495. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1496. <div class="op_box">
  1497. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1498. <div style="display: flex;">
  1499. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1500. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1501. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1502. </el-tooltip>
  1503. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1504. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1505. </div>
  1506. </div>
  1507. </div>
  1508. </div>
  1509. </div>
  1510. </div>
  1511. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  1512. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1513. <div class="c_info_title">
  1514. 任务簇
  1515. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1516. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1517. </div>
  1518. <div class="task_outline">
  1519. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1520. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1521. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1522. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1523. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1524. <div class="op_box">
  1525. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1526. <div style="display: flex;">
  1527. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1528. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1529. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1530. </el-tooltip>
  1531. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1532. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1533. </div>
  1534. </div>
  1535. </div>
  1536. </div>
  1537. </div>
  1538. </div>
  1539. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1540. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1541. <div class="c_info_title">
  1542. 教案
  1543. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1544. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1545. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1546. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1547. </el-tooltip>
  1548. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1549. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1550. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  1551. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1552. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1553. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1554. </el-tooltip>
  1555. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1556. </div>
  1557. <div class="task_outline">
  1558. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1559. <div class="outline_task">
  1560. <div class="title">任务{{ index + 1 }}</div>
  1561. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1562. v-model="item.task" />
  1563. </div>
  1564. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1565. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1566. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1567. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1568. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1569. <div class="op_box">
  1570. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1571. <div style="display: flex;">
  1572. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1573. <div class="r_pub_button_op"
  1574. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1575. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1576. </el-tooltip>
  1577. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1578. item.isTask3 ? '确定' : '编辑'}}</div>
  1579. </div>
  1580. </div>
  1581. </div>
  1582. </div>
  1583. </div>
  1584. </div>
  1585. </div>
  1586. <div class="info_btnBox3" v-if="istemplate != 1">
  1587. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1588. goTo(
  1589. '/course?userid=' +
  1590. userid +
  1591. '&oid=' +
  1592. oid +
  1593. '&org=' +
  1594. org +
  1595. '&role=' +
  1596. role
  1597. )
  1598. ">
  1599. 返回课程
  1600. </button>
  1601. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1602. {{ steps == 4 ? "返回课程" : "上一步" }}
  1603. </button>
  1604. <button class="c_pub_button_confirm" v-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" @click="clickGenTT2">
  1605. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1606. </button>
  1607. <button class="c_pub_button_confirm" v-else-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1608. {{isuseT ? "重新生成概况" : "生成概况"}}
  1609. </button>
  1610. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1612. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1613. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1614. pub_btn_next_img: steps != 3,
  1615. pub_btn_finish_img: steps == 3,
  1616. }">
  1617. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1618. </button>
  1619. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1620. @contextmenu.prevent="nextSteps(1)" :class="{
  1621. pub_btn_next_img: steps != 3,
  1622. pub_btn_finish_img: steps == 3,
  1623. }">
  1624. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1625. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1626. : "下一步" }}
  1627. </button>
  1628. </el-tooltip>
  1629. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1630. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1631. pub_btn_next_img: steps != 3,
  1632. pub_btn_finish_img: steps == 3,
  1633. }">下一步2</button>
  1634. </el-tooltip> -->
  1635. </div>
  1636. </div>
  1637. <div class="rightBox" v-if="steps == 2" :style="{
  1638. height:
  1639. !isStepDisplay && !isBtnDisplay
  1640. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1641. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1642. }">
  1643. <div class="basic_box" style="
  1644. padding: 20px 30px 0px !important;
  1645. box-sizing: border-box;
  1646. height: calc(100% - 80px);
  1647. overflow: auto;
  1648. background: #fff;
  1649. ">
  1650. <!-- <div
  1651. style="
  1652. color: #b8b8b8;
  1653. background: #fff;
  1654. width: 26%;
  1655. height: 40px;
  1656. border-radius: 15px;
  1657. padding-left: 20px;
  1658. line-height: 40px;
  1659. font-size: 17px;
  1660. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1661. "
  1662. >-->
  1663. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1664. 请选择合适的课程模板
  1665. </div>
  1666. <div class="wordbox">
  1667. <div class="wordTeacher" @click="checkTemplate2()">
  1668. <div class="wordPic">
  1669. <img src="../../../assets/icon/new/template_none.png" alt />
  1670. </div>
  1671. <div style="
  1672. margin-top: 10px;
  1673. line-height: 19px;
  1674. overflow: hidden;
  1675. text-overflow: ellipsis;
  1676. white-space: nowrap;
  1677. padding: 0 20px;
  1678. ">
  1679. 空白模板
  1680. </div>
  1681. </div>
  1682. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1683. <div class="wordPic">
  1684. <img src="../../../assets/icon/new/template.png" alt />
  1685. </div>
  1686. <div style="
  1687. margin-top: 10px;
  1688. line-height: 19px;
  1689. overflow: hidden;
  1690. text-overflow: ellipsis;
  1691. white-space: nowrap;
  1692. padding: 0 20px;
  1693. ">
  1694. {{ aa.title }}
  1695. </div>
  1696. </div>
  1697. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1698. <div class="wordPic">
  1699. <img src="../../../assets/icon/new/template.png" alt />
  1700. </div>
  1701. <div style="
  1702. margin-top: 10px;
  1703. line-height: 19px;
  1704. overflow: hidden;
  1705. text-overflow: ellipsis;
  1706. white-space: nowrap;
  1707. padding: 0 20px;
  1708. ">
  1709. 简易模板
  1710. </div>
  1711. </div>
  1712. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1713. <div class="wordPic">
  1714. <img src="../../../assets/icon/new/template.png" alt />
  1715. </div>
  1716. <div style="
  1717. margin-top: 10px;
  1718. line-height: 19px;
  1719. overflow: hidden;
  1720. text-overflow: ellipsis;
  1721. white-space: nowrap;
  1722. padding: 0 20px;
  1723. ">
  1724. 智能粘贴模式
  1725. </div>
  1726. </div>
  1727. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1728. <div class="wordPic">
  1729. <img src="../../../assets/icon/wordMub.png" alt />
  1730. </div>
  1731. <div style="
  1732. margin-top: 10px;
  1733. line-height: 19px;
  1734. overflow: hidden;
  1735. text-overflow: ellipsis;
  1736. white-space: nowrap;
  1737. padding: 0 20px;
  1738. ">
  1739. 未来小学课程设计
  1740. </div>
  1741. </div> -->
  1742. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1743. <div class="wordPic">
  1744. <img src="../../../assets/icon/wordMub.png" alt />
  1745. </div>
  1746. <div style="
  1747. margin-top: 10px;
  1748. line-height: 19px;
  1749. overflow: hidden;
  1750. text-overflow: ellipsis;
  1751. white-space: nowrap;
  1752. padding: 0 20px;
  1753. ">
  1754. 我的课程
  1755. </div>
  1756. </div> -->
  1757. </div>
  1758. </div>
  1759. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1760. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1761. goTo(
  1762. '/course?userid=' +
  1763. userid +
  1764. '&oid=' +
  1765. oid +
  1766. '&org=' +
  1767. org +
  1768. '&role=' +
  1769. role
  1770. )
  1771. ">
  1772. 返回课程
  1773. </button>
  1774. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1775. {{ steps == 4 ? "返回课程" : "上一步" }}
  1776. </button>
  1777. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1778. pub_btn_next_img: steps != 3,
  1779. pub_btn_finish_img: steps == 3,
  1780. }">
  1781. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1782. </button>
  1783. </div>
  1784. </div>
  1785. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1786. height:
  1787. !isStepDisplay && !isBtnDisplay
  1788. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1789. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1790. }">
  1791. <div class="rb_c_box">
  1792. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1793. <div class="rb_c_nav">
  1794. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1795. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1796. </div>
  1797. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1798. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1799. position: istemplate == 1 ? 'sticky' : 'unset',
  1800. top: istemplate == 1 ? '0' : 'unset'
  1801. }">
  1802. <!-- <div class="navTop">辅助导航</div> -->
  1803. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1804. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1805. <div class="nt_taskBox" style="width: 100%;">
  1806. <div class="nt_taskTitle"
  1807. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1808. unitIndex + 1 }}</div>
  1809. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1810. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1811. <span>{{ unitJson[unitIndex].dyName }}</span>
  1812. </el-tooltip>
  1813. </div>
  1814. </div>
  1815. </div> -->
  1816. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1817. .taskJson" :key="tIndex" :class="{
  1818. dragOverTop:
  1819. newIndex === tIndex &&
  1820. typeIndex == 'task-' + tIndex &&
  1821. oldIndex > tIndex &&
  1822. dragType == 'task',
  1823. dragOverBottom:
  1824. newIndex === tIndex &&
  1825. typeIndex == 'task-' + tIndex &&
  1826. oldIndex < tIndex &&
  1827. dragType == 'task',
  1828. }">
  1829. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1830. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1831. class="navTask" :class="{
  1832. isNavTask:
  1833. isClickColor > 0 && isClickColor == tIndex + 1,
  1834. isNavOpen: t.toolOpen,
  1835. }">
  1836. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1837. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1838. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1839. class="chapter_upload_drag"></div>
  1840. <div class="nt_taskBox">
  1841. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1842. <div class="nt_taskName">
  1843. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1844. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1845. </el-tooltip>
  1846. </div>
  1847. </div>
  1848. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1849. 1
  1850. ">
  1851. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1852. @click.stop="taskMove(1, tIndex)"></div>
  1853. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1854. @click.stop="taskMove(2, tIndex)"></div>
  1855. </div> -->
  1856. </div>
  1857. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1858. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1859. @click="jumpGj(tIndex, toolIndex2)">
  1860. <div class="gjCss" :class="{
  1861. isGjCss:
  1862. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1863. }">
  1864. <div>工具{{ toolIndex2 + 1 }}:</div>
  1865. <div>
  1866. {{
  1867. toolsData[tool.tool[0]] &&
  1868. toolsData[tool.tool[0]].name
  1869. }}
  1870. </div>
  1871. </div>
  1872. </div>
  1873. </div>
  1874. </div>
  1875. </div>
  1876. <div class="navBottom" v-if="courseState == 1">
  1877. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1878. dragOverTop:
  1879. newIndex === stageIndex &&
  1880. typeIndex == 'Unit-' + stageIndex &&
  1881. oldIndex > stageIndex &&
  1882. dragType == 'Unit',
  1883. dragOverBottom:
  1884. newIndex === stageIndex &&
  1885. typeIndex == 'Unit-' + stageIndex &&
  1886. oldIndex < stageIndex &&
  1887. dragType == 'Unit',
  1888. }">
  1889. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1890. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1891. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1892. isNavStage: stageIndex == unitIndex,
  1893. isNavStageOpen: stage.toolOpen,
  1894. }">
  1895. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1896. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1897. class="chapter_upload_drag"></div>
  1898. <div class="nt_taskBox">
  1899. <div class="nt_taskTitle">
  1900. 第{{ stageIndex + 1 }}阶段:
  1901. </div>
  1902. <div class="nt_taskName">
  1903. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1904. " placement="top">
  1905. <span>{{
  1906. stage.dyName ? stage.dyName : "未命名阶段"
  1907. }}</span>
  1908. </el-tooltip>
  1909. </div>
  1910. </div>
  1911. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1912. </div>
  1913. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1914. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1915. dragOverTop:
  1916. newIndex === tIndex &&
  1917. typeIndex == 'task-' + tIndex &&
  1918. ((oldIndex > tIndex &&
  1919. stageIndex == checkUnitIndex) ||
  1920. (oldIndex == tIndex &&
  1921. stageIndex == checkUnitIndex &&
  1922. checkUnitIndex != oldUnitIndex)) &&
  1923. dragType == 'task',
  1924. dragOverBottom:
  1925. newIndex === tIndex &&
  1926. typeIndex == 'task-' + tIndex &&
  1927. oldIndex < tIndex &&
  1928. stageIndex == checkUnitIndex &&
  1929. dragType == 'task',
  1930. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1931. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1932. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1933. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1934. isNavTask:
  1935. isClickColor > 0 &&
  1936. isClickColor == tIndex + 1 &&
  1937. stageIndex == unitIndex,
  1938. isNavOpen: t.toolOpen,
  1939. }">
  1940. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1941. <div @mousedown="
  1942. isdrag = 'task-' + stageIndex + '-' + tIndex
  1943. " @mouseup="isdrag = ''" @touchstart="
  1944. isdrag = 'task-' + stageIndex + '-' + tIndex
  1945. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1946. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1947. <div class="nt_taskTitle">
  1948. 任务{{ tIndex + 1 }}:
  1949. </div>
  1950. <div class="nt_taskName">
  1951. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1952. <span>{{
  1953. t.task ? t.task : "未命名任务"
  1954. }}</span>
  1955. </el-tooltip>
  1956. </div>
  1957. </div>
  1958. </div>
  1959. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1960. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1961. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1962. <div class="gjCss" :class="{
  1963. isGjCss:
  1964. toolIndexType ==
  1965. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1966. }">
  1967. <div>工具{{ toolIndex2 + 1 }}:</div>
  1968. <div>
  1969. {{
  1970. toolsData[tool.tool[0]] &&
  1971. toolsData[tool.tool[0]].name
  1972. }}
  1973. </div>
  1974. </div>
  1975. </div>
  1976. </div>
  1977. </div>
  1978. </div>
  1979. </div>
  1980. </div>
  1981. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1982. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1983. </div>
  1984. </div>
  1985. <div class="rb_c_box_right">
  1986. <!-- <div class="rb_c_box_btn">
  1987. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1988. </div> -->
  1989. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  1990. <div v-if="false" style="
  1991. display: flex;
  1992. flex-direction: row;
  1993. align-items: center;
  1994. position: sticky;
  1995. top: 0;
  1996. z-index: 99;
  1997. width: 100%;
  1998. padding: 0 20px 0 20px;
  1999. box-sizing: border-box;
  2000. background: #fff;
  2001. border-radius: 8px;
  2002. ">
  2003. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2004. <div class="cru_selectBox" :style="{
  2005. maxWidth: isPasteTask
  2006. ? 'calc(100% - 335px)'
  2007. : 'calc(100% - 190px)',
  2008. }" v-if="courseState == 1">
  2009. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2010. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2011. <!-- item.dyName ? item.dyName : -->
  2012. <span v-if="
  2013. unitJson[unitJson.length - 1].easy == 4 ||
  2014. unitJson[unitJson.length - 1].easy == 6
  2015. ">{{
  2016. item.dyName
  2017. ? item.dyName
  2018. : "第" + (index + 1) + "阶段"
  2019. }}</span>
  2020. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2021. </div>
  2022. <div class="cru_line" :style="{
  2023. left: offsetLetfPx + 'px',
  2024. }"></div>
  2025. </div>
  2026. <div class="addStageImg" @click="addunit()" v-if="
  2027. !(unitJson[unitJson.length - 1].easy == 4) &&
  2028. !(unitJson[unitJson.length - 1].easy == 6) &&
  2029. courseState == 1
  2030. ">
  2031. <img src="../../../assets/icon/new/addStage.png" alt />
  2032. </div>
  2033. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2034. v-if="courseState == 2" style="margin: 15px 0">
  2035. 新建阶段
  2036. </button>
  2037. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2038. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2039. 阶段顺序
  2040. </button>
  2041. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2042. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2043. 智能粘贴
  2044. </button>
  2045. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2046. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2047. }" style="padding: 0 12px">
  2048. 选择课程模板
  2049. </button>
  2050. </div>
  2051. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2052. :key="index">
  2053. <div v-if="courseState == 4" style="position: relative;
  2054. background: #fff;
  2055. box-sizing: border-box;
  2056. padding: 1px 20px 10px;
  2057. width: 100%;
  2058. border-radius: 10px;">
  2059. <div style="
  2060. display: flex;
  2061. flex-direction: row;
  2062. justify-content: space-between;
  2063. align-items: center;
  2064. " :style="{
  2065. margin: !item.taskJson[0].isFoldchapter
  2066. ? '20px 0 10px'
  2067. : '20px 0 0',
  2068. }">
  2069. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2070. 学习内容
  2071. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2072. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2073. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2074. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2075. </el-tooltip>
  2076. </div>
  2077. </div>
  2078. <div>
  2079. <div class="add_chapters_box add_c_none" v-if="
  2080. item.taskJson[0].chapterData &&
  2081. item.taskJson[0].chapterData.length == 0
  2082. ">
  2083. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  2084. </div>
  2085. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2086. <div @dragstart="
  2087. dragStart(item1, index1, 0)
  2088. " @dragover.prevent="
  2089. dragOver(index1, 0)
  2090. " @dragend="dragEnd()" :draggable="isdrag ==
  2091. 'chapter-' + 0 + '-' + index1
  2092. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2093. :key="item1.id" @click="
  2094. getChapterData(
  2095. $event,
  2096. unitIndex,
  2097. index,
  2098. index1,
  2099. item1.type
  2100. )
  2101. " :class="{
  2102. dragOverTop2:
  2103. newIndex === index1 &&
  2104. typeIndex ==
  2105. 'chapter-' +
  2106. 0 +
  2107. '-' +
  2108. index1 &&
  2109. oldIndex > index1 &&
  2110. dragType == 'drag',
  2111. dragOverBottom2:
  2112. newIndex === index1 &&
  2113. typeIndex ==
  2114. 'chapter-' +
  2115. 0 +
  2116. '-' +
  2117. index1 &&
  2118. oldIndex < index1 &&
  2119. dragType == 'drag',
  2120. }">
  2121. <div @mousedown="
  2122. isdrag =
  2123. 'chapter-' + 0 + '-' + index1
  2124. " @mouseup="isdrag = ''" @touchstart="
  2125. isdrag =
  2126. 'chapter-' + 0 + '-' + index1
  2127. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2128. <div class="chapter_upload_o" style="
  2129. position: relative;
  2130. display: flex;
  2131. align-items: center;
  2132. ">
  2133. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2134. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2135. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2136. </div>
  2137. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2138. </div>
  2139. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2140. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2141. </div>
  2142. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2143. </div>
  2144. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2145. </div>
  2146. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2147. </div>
  2148. </div>
  2149. <div class="chapter_upload_n">
  2150. <input readonly="true" v-if="
  2151. item1.type == 2 ||
  2152. item1.type == 3 ||
  2153. item1.type == 12 ||
  2154. item1.type == 13 ||
  2155. item1.type == 7
  2156. " :placeholder="item1.name" @click="
  2157. updataVideoT(
  2158. $event,
  2159. unitIndex,
  2160. 0,
  2161. index1
  2162. )
  2163. " style="
  2164. border: none;
  2165. outline: none;
  2166. width: 80%;
  2167. minwidth: 215px;
  2168. z-index: 99;
  2169. font-size: 14px;
  2170. white-space: nowrap;
  2171. overflow: hidden;
  2172. text-overflow: ellipsis;
  2173. " />
  2174. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2175. border: none;
  2176. outline: none;
  2177. width: 80%;
  2178. white-space: nowrap;
  2179. overflow: hidden;
  2180. text-overflow: ellipsis;
  2181. " readonly="true" @click="
  2182. selectAttText(0, index1)
  2183. " />
  2184. <input :placeholder="item1.title ? item1.title : '链接'
  2185. " v-if="item1.type == 8" style="
  2186. border: none;
  2187. outline: none;
  2188. width: 80%;
  2189. white-space: nowrap;
  2190. overflow: hidden;
  2191. text-overflow: ellipsis;
  2192. " readonly="true" @click="selectLine(0, index1)" />
  2193. <input :placeholder="item1.title ? item1.title : '链接'
  2194. " v-if="item1.type == 14" style="
  2195. border: none;
  2196. outline: none;
  2197. width: 80%;
  2198. white-space: nowrap;
  2199. overflow: hidden;
  2200. text-overflow: ellipsis;
  2201. " readonly="true" @click="
  2202. openUpdateSource(0, index1)
  2203. " />
  2204. </div>
  2205. <div class="chapter_upload_ic">
  2206. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2207. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2208. checkChpater( $event, unitIndex, 0, index1 )
  2209. ">
  2210. <div></div>
  2211. </div>
  2212. <div class="chapter_upload_ud" style="z-index: 99">
  2213. <div class="chapter_upload_up" @click="
  2214. upCd(
  2215. $event,
  2216. unitIndex,
  2217. index,
  2218. 0,
  2219. index1
  2220. )
  2221. "></div>
  2222. <div class="chapter_upload_down" @click="
  2223. downCd(
  2224. $event,
  2225. unitIndex,
  2226. index,
  2227. 0,
  2228. index1
  2229. )
  2230. "></div>
  2231. </div>
  2232. <div class="chapter_upload_ic_edit" v-if="
  2233. item1.type == 2 ||
  2234. item1.type == 3 ||
  2235. item1.type == 12 ||
  2236. item1.type == 13 ||
  2237. item1.type == 7
  2238. " @click.stop="
  2239. updataVideoT(
  2240. $event,
  2241. unitIndex,
  2242. 0,
  2243. index1
  2244. )
  2245. ">
  2246. <div></div>
  2247. </div>
  2248. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2249. selectAttText(0, index1)
  2250. ">
  2251. <div></div>
  2252. </div>
  2253. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2254. @click="selectLine(0, index1)">
  2255. <div></div>
  2256. </div>
  2257. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2258. openUpdateSource(0, index1)
  2259. ">
  2260. <div></div>
  2261. </div>
  2262. <div class="chapter_upload_ic_r" @click.stop="
  2263. deleteChapterData(
  2264. $event,
  2265. unitIndex,
  2266. index,
  2267. index1,
  2268. 0
  2269. )
  2270. ">
  2271. <div></div>
  2272. </div>
  2273. </div>
  2274. </div>
  2275. </div>
  2276. </div>
  2277. </div>
  2278. <div class="add_info_box" style="margin: 10px 0 0">
  2279. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2280. 文件
  2281. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2282. beforeUpload2(
  2283. $event,
  2284. unitIndex,
  2285. 13,
  2286. 0
  2287. )
  2288. " />
  2289. </button>
  2290. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2291. 图文
  2292. </button>
  2293. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2294. 链接
  2295. </button>
  2296. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2297. 代码
  2298. </button>
  2299. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2300. 资源
  2301. </button>
  2302. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2303. AI生成PPT
  2304. </button>
  2305. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2306. AI生成教案
  2307. </button>
  2308. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2309. 智能检索视频
  2310. </button>
  2311. </div>
  2312. <div v-if="
  2313. unitJson[unitIndex].chapterInfo[0].taskJson[
  2314. 0
  2315. ].proVisible
  2316. " class="mask">
  2317. <div class="progressBox">
  2318. <!-- <div id="closePro" class="closeCss">
  2319. <img src="../../../../assets/icon/close.png" alt />
  2320. </div> -->
  2321. <div class="lbox">
  2322. <img src="../../../assets/loading.gif" />上传中,请稍后
  2323. </div>
  2324. <div style="margin-bottom: 10px">
  2325. <span>{{
  2326. unitJson[unitIndex].chapterInfo[0].taskJson[
  2327. 0
  2328. ].isFinishSize
  2329. }}</span>
  2330. /
  2331. <span>{{
  2332. unitJson[unitIndex].chapterInfo[0].taskJson[
  2333. 0
  2334. ].isAllSize
  2335. }}</span>
  2336. </div>
  2337. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2338. 0
  2339. ].progress
  2340. ? unitJson[unitIndex].chapterInfo[0]
  2341. .taskJson[0].progress
  2342. : 0
  2343. " style="width: 80%"></el-progress> -->
  2344. </div>
  2345. </div>
  2346. </div>
  2347. <div class="chapter_box" v-if="courseState == 1">
  2348. <div class="chapter_contentbox">
  2349. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2350. <div class="cc_input">
  2351. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2352. v-model="unitJson[unitIndex].dyName" />
  2353. </div>
  2354. <div class="remove" v-if="
  2355. (unitJson.length > 1 || courseState != 2) &&
  2356. !(unitJson[unitJson.length - 1].easy == 4) &&
  2357. !(unitJson[unitJson.length - 1].easy == 6)
  2358. " @click="deleteUnit(unitIndex)"></div>
  2359. </div>
  2360. </div>
  2361. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2362. margin: 50px 0px 10px;
  2363. font-size: 1.5em;
  2364. font-weight: 700;
  2365. color: #0f7eff;
  2366. ">
  2367. 添加任务
  2368. </div> -->
  2369. <div class="taskBorder" :style="{
  2370. minHeight: unitJson[unitIndex].easy && 'unset',
  2371. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2372. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2373. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2374. <div class="taskTitle">
  2375. <div style="display: flex;width: 100%;justify-content: space-between;">
  2376. <span>任务{{ itemTaskIndex + 1 }}</span>
  2377. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2378. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2379. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2380. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2381. </el-tooltip> -->
  2382. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2383. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2384. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex)"
  2385. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex)">重新生成任务</button>
  2386. </el-tooltip>
  2387. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2388. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2389. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2390. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2391. </el-tooltip> -->
  2392. </div>
  2393. </div>
  2394. <!-- padding: 20px; -->
  2395. <div v-if="unitJson[unitIndex].easy != 1">
  2396. <div :style="{
  2397. marginBottom:
  2398. unitJson[unitIndex].easy == 3 ||
  2399. (unitJson[unitIndex].easy == 5 &&
  2400. itemTask.taskType == 1)
  2401. ? '75px'
  2402. : '0',
  2403. }">
  2404. <div style="
  2405. display: flex;
  2406. margin: 0px 0 20px;
  2407. flex-direction: row;
  2408. justify-content: flex-start;
  2409. align-items: center;
  2410. ">
  2411. <div class="lineTitle">任务概述</div>
  2412. </div>
  2413. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2414. flex-direction: row;
  2415. justify-content: flex-start;
  2416. align-items: center;
  2417. margin: 0;
  2418. ">
  2419. <!-- <div class="cc_title">
  2420. 任务{{ itemTaskIndex + 1 }}
  2421. </div> -->
  2422. <div class="cc_input">
  2423. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2424. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2425. itemTaskIndex
  2426. ].task
  2427. " />
  2428. </div>
  2429. <div class="remove" v-if="
  2430. item.taskJson.length > 1 &&
  2431. (!unitJson[unitIndex].easy ||
  2432. unitJson[unitIndex].easy == 6)
  2433. " @click="deleteTask(itemTaskIndex)"></div>
  2434. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2435. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2436. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2437. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2438. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2439. </div> -->
  2440. </div>
  2441. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2442. display: flex;
  2443. margin: 20px 0;
  2444. flex-direction: row;
  2445. justify-content: flex-start;
  2446. align-items: center;
  2447. ">
  2448. <div class="lineTitle">任务描述</div>
  2449. </div> && !itemTask.isFold2-->
  2450. <div v-if="
  2451. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2452. -1
  2453. " style="margin-top: 20px" class="op_task_box"
  2454. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2455. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2456. itemTaskIndex
  2457. ].taskDetail
  2458. " @change="change"></editor-bar> -->
  2459. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2460. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2461. itemTaskIndex
  2462. ].taskDetail
  2463. "></textarea>
  2464. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2465. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2466. itemTaskIndex
  2467. ].taskDetail
  2468. "></textarea> -->
  2469. <div class="op_box">
  2470. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2471. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2472. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2473. itemTaskIndex
  2474. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2475. itemTaskIndex
  2476. ], itemTaskIndex)">智能优化</div>
  2477. </el-tooltip>
  2478. </div>
  2479. </div>
  2480. </div>
  2481. </div>
  2482. <div
  2483. style="position: relative"
  2484. v-if="courseState == 5"
  2485. >
  2486. <div
  2487. style="
  2488. display: flex;
  2489. flex-direction: row;
  2490. justify-content: space-between;
  2491. align-items: center;
  2492. "
  2493. :style="{
  2494. margin: !itemTask.isFoldchapter
  2495. ? '20px 0 10px'
  2496. : '20px 0 0',
  2497. }"
  2498. >
  2499. <div
  2500. style="margin-bottom: 10px"
  2501. class="lineTitle clineTitle"
  2502. >
  2503. 学习内容
  2504. </div>
  2505. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2506. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2507. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2508. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2509. <!-- <div class="line"></div> -->
  2510. </div>
  2511. <!-- v-if="!itemTask.isFoldchapter" -->
  2512. <div>
  2513. <div
  2514. class="add_chapters_box add_c_none"
  2515. v-if="
  2516. itemTask.chapterData &&
  2517. itemTask.chapterData.length == 0
  2518. "
  2519. >
  2520. <img
  2521. src="../../../assets/icon/new/c_none.png"
  2522. alt
  2523. /><span>请添加学习内容</span>
  2524. </div>
  2525. <div
  2526. v-else
  2527. class="add_chapters_box"
  2528. style="display: flex; flex-direction: column"
  2529. >
  2530. <div
  2531. @dragstart="
  2532. dragStart(item1, index1, itemTaskIndex)
  2533. "
  2534. @dragover.prevent="
  2535. dragOver(index1, itemTaskIndex)
  2536. "
  2537. @dragend="dragEnd()"
  2538. :draggable="
  2539. isdrag ==
  2540. 'chapter-' + itemTaskIndex + '-' + index1
  2541. "
  2542. class="chapter_upload"
  2543. v-for="(item1, index1) in itemTask.chapterData"
  2544. :key="item1.id"
  2545. @click="
  2546. getChapterData(
  2547. $event,
  2548. unitIndex,
  2549. index,
  2550. index1,
  2551. item1.type
  2552. )
  2553. "
  2554. :class="{
  2555. dragOverTop2:
  2556. newIndex === index1 &&
  2557. typeIndex ==
  2558. 'chapter-' +
  2559. itemTaskIndex +
  2560. '-' +
  2561. index1 &&
  2562. oldIndex > index1 &&
  2563. dragType == 'drag',
  2564. dragOverBottom2:
  2565. newIndex === index1 &&
  2566. typeIndex ==
  2567. 'chapter-' +
  2568. itemTaskIndex +
  2569. '-' +
  2570. index1 &&
  2571. oldIndex < index1 &&
  2572. dragType == 'drag',
  2573. }"
  2574. >
  2575. <div
  2576. @mousedown="
  2577. isdrag =
  2578. 'chapter-' + itemTaskIndex + '-' + index1
  2579. "
  2580. @mouseup="isdrag = ''"
  2581. @touchstart="
  2582. isdrag =
  2583. 'chapter-' + itemTaskIndex + '-' + index1
  2584. "
  2585. @touchend="isdrag = ''"
  2586. class="chapter_upload_drag"
  2587. ></div>
  2588. <div
  2589. class="chapter_upload_o"
  2590. style="
  2591. position: relative;
  2592. display: flex;
  2593. align-items: center;
  2594. "
  2595. >
  2596. <div
  2597. class="chapter_upload_l"
  2598. style="padding: 1px 0 0 10px"
  2599. >
  2600. <div
  2601. v-if="item1.type == 2"
  2602. class="chapter_upload_l_i2"
  2603. ></div>
  2604. <div
  2605. v-if="item1.type == 3"
  2606. class="chapter_upload_l_i3"
  2607. style="margin-left: 1px"
  2608. ></div>
  2609. <div
  2610. v-if="item1.type == 6"
  2611. class="chapter_upload_l_i6"
  2612. style="margin-left: 1px"
  2613. ></div>
  2614. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2615. <div
  2616. v-if="item1.type == 8"
  2617. class="chapter_upload_l_i8"
  2618. style="margin-left: 1px"
  2619. ></div>
  2620. <div
  2621. v-if="item1.type == 14"
  2622. class="chapter_upload_l_i14"
  2623. style="margin-left: 1px"
  2624. ></div>
  2625. <div
  2626. v-if="item1.type == 12"
  2627. class="chapter_upload_l_i12"
  2628. style="margin-left: 1px"
  2629. ></div>
  2630. <div
  2631. v-if="item1.type == 13"
  2632. class="chapter_upload_l_i13"
  2633. style="margin-left: 1px"
  2634. ></div>
  2635. </div>
  2636. <div class="chapter_upload_n">
  2637. <input
  2638. readonly="true"
  2639. v-if="
  2640. item1.type == 2 ||
  2641. item1.type == 3 ||
  2642. item1.type == 12 ||
  2643. item1.type == 13 ||
  2644. item1.type == 7
  2645. "
  2646. :placeholder="item1.name"
  2647. @click="
  2648. updataVideoT(
  2649. $event,
  2650. unitIndex,
  2651. itemTaskIndex,
  2652. index1
  2653. )
  2654. "
  2655. style="
  2656. border: none;
  2657. outline: none;
  2658. width: 80%;
  2659. minwidth: 215px;
  2660. z-index: 99;
  2661. font-size: 14px;
  2662. white-space: nowrap;
  2663. overflow: hidden;
  2664. text-overflow: ellipsis;
  2665. "
  2666. />
  2667. <input
  2668. :placeholder="item1.name"
  2669. v-if="item1.type == 6"
  2670. style="
  2671. border: none;
  2672. outline: none;
  2673. width: 80%;
  2674. white-space: nowrap;
  2675. overflow: hidden;
  2676. text-overflow: ellipsis;
  2677. "
  2678. readonly="true"
  2679. @click="
  2680. selectAttText(itemTaskIndex, index1)
  2681. "
  2682. />
  2683. <input
  2684. :placeholder="
  2685. item1.title ? item1.title : '链接'
  2686. "
  2687. v-if="item1.type == 8"
  2688. style="
  2689. border: none;
  2690. outline: none;
  2691. width: 80%;
  2692. white-space: nowrap;
  2693. overflow: hidden;
  2694. text-overflow: ellipsis;
  2695. "
  2696. readonly="true"
  2697. @click="selectLine(itemTaskIndex, index1)"
  2698. />
  2699. <input
  2700. :placeholder="
  2701. item1.title ? item1.title : '链接'
  2702. "
  2703. v-if="item1.type == 14"
  2704. style="
  2705. border: none;
  2706. outline: none;
  2707. width: 80%;
  2708. white-space: nowrap;
  2709. overflow: hidden;
  2710. text-overflow: ellipsis;
  2711. "
  2712. readonly="true"
  2713. @click="
  2714. openUpdateSource(itemTaskIndex, index1)
  2715. "
  2716. />
  2717. </div>
  2718. <div class="chapter_upload_ic">
  2719. <div
  2720. class="chapter_upload_noSee"
  2721. v-if="item1.type == 12"
  2722. ></div>
  2723. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2724. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2725. ">
  2726. <div></div>
  2727. </div>
  2728. <div
  2729. class="chapter_upload_ud"
  2730. style="z-index: 99"
  2731. >
  2732. <div
  2733. class="chapter_upload_up"
  2734. @click="
  2735. upCd(
  2736. $event,
  2737. unitIndex,
  2738. index,
  2739. itemTaskIndex,
  2740. index1
  2741. )
  2742. "
  2743. ></div>
  2744. <div
  2745. class="chapter_upload_down"
  2746. @click="
  2747. downCd(
  2748. $event,
  2749. unitIndex,
  2750. index,
  2751. itemTaskIndex,
  2752. index1
  2753. )
  2754. "
  2755. ></div>
  2756. </div>
  2757. <div
  2758. class="chapter_upload_ic_edit"
  2759. v-if="
  2760. item1.type == 2 ||
  2761. item1.type == 3 ||
  2762. item1.type == 12 ||
  2763. item1.type == 13 ||
  2764. item1.type == 7
  2765. "
  2766. @click.stop="
  2767. updataVideoT(
  2768. $event,
  2769. unitIndex,
  2770. itemTaskIndex,
  2771. index1
  2772. )
  2773. "
  2774. >
  2775. <div></div>
  2776. </div>
  2777. <div
  2778. class="chapter_upload_ic_edit"
  2779. v-if="item1.type == 6"
  2780. @click="
  2781. selectAttText(itemTaskIndex, index1)
  2782. "
  2783. >
  2784. <div></div>
  2785. </div>
  2786. <div
  2787. class="chapter_upload_ic_edit"
  2788. v-if="item1.type == 8"
  2789. @click="selectLine(itemTaskIndex, index1)"
  2790. >
  2791. <div></div>
  2792. </div>
  2793. <div
  2794. class="chapter_upload_ic_edit"
  2795. v-if="item1.type == 14"
  2796. @click="
  2797. openUpdateSource(itemTaskIndex, index1)
  2798. "
  2799. >
  2800. <div></div>
  2801. </div>
  2802. <div
  2803. class="chapter_upload_ic_r"
  2804. @click.stop="
  2805. deleteChapterData(
  2806. $event,
  2807. unitIndex,
  2808. index,
  2809. index1,
  2810. itemTaskIndex
  2811. )
  2812. "
  2813. >
  2814. <div></div>
  2815. </div>
  2816. </div>
  2817. </div>
  2818. </div>
  2819. </div>
  2820. </div>
  2821. <!-- v-if="!itemTask.isFoldchapter" -->
  2822. <div class="add_info_box" style="margin: 10px 0 0">
  2823. <button
  2824. class="c_pub_button_add pub_btn_add_img"
  2825. @click="addImg($event)"
  2826. >
  2827. 文件
  2828. <input
  2829. type="file"
  2830. accept="*"
  2831. style="display: none"
  2832. multiple="multiple"
  2833. v-if="inputShow"
  2834. @change="
  2835. beforeUpload2(
  2836. $event,
  2837. unitIndex,
  2838. 13,
  2839. itemTaskIndex
  2840. )
  2841. "
  2842. />
  2843. </button>
  2844. <button
  2845. class="c_pub_button_add pub_btn_add_img"
  2846. @click="addAttText(itemTaskIndex)"
  2847. >
  2848. 图文
  2849. </button>
  2850. <button
  2851. class="c_pub_button_add pub_btn_add_img"
  2852. @click="openLine(itemTaskIndex)"
  2853. >
  2854. 链接
  2855. </button>
  2856. <button
  2857. class="c_pub_button_add pub_btn_add_img"
  2858. @click="pasteLine(itemTaskIndex)"
  2859. >
  2860. 代码
  2861. </button>
  2862. <button
  2863. class="c_pub_button_add pub_btn_add_img"
  2864. @click="openSource(itemTaskIndex)"
  2865. >
  2866. 资源
  2867. </button>
  2868. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2869. AI生成PPT
  2870. </button>
  2871. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2872. AI生成教案
  2873. </button>
  2874. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2875. 智能检索视频
  2876. </button>
  2877. </div>
  2878. <div
  2879. v-if="
  2880. unitJson[unitIndex].chapterInfo[0].taskJson[
  2881. itemTaskIndex
  2882. ].proVisible
  2883. "
  2884. class="mask"
  2885. >
  2886. <div class="progressBox">
  2887. <!-- <div id="closePro" class="closeCss">
  2888. <img src="../../../../assets/icon/close.png" alt />
  2889. </div> -->
  2890. <div class="lbox">
  2891. <img
  2892. src="../../../assets/loading.gif"
  2893. />上传中,请稍后
  2894. </div>
  2895. <div style="margin-bottom: 10px">
  2896. <span
  2897. >{{
  2898. unitJson[unitIndex].chapterInfo[0].taskJson[
  2899. itemTaskIndex
  2900. ].isFinishSize
  2901. }}</span
  2902. >
  2903. /
  2904. <span
  2905. >{{
  2906. unitJson[unitIndex].chapterInfo[0].taskJson[
  2907. itemTaskIndex
  2908. ].isAllSize
  2909. }}</span
  2910. >
  2911. </div>
  2912. <!-- <el-progress
  2913. :text-inside="true"
  2914. :stroke-width="20"
  2915. :percentage="
  2916. unitJson[unitIndex].chapterInfo[0].taskJson[
  2917. itemTaskIndex
  2918. ].progress
  2919. ? unitJson[unitIndex].chapterInfo[0]
  2920. .taskJson[itemTaskIndex].progress
  2921. : 0
  2922. "
  2923. style="width: 80%"
  2924. ></el-progress> -->
  2925. </div>
  2926. </div>
  2927. </div>
  2928. <div v-if="
  2929. unitJson[unitIndex].easy == 1 ||
  2930. (unitJson[unitIndex].easy == 5 &&
  2931. itemTask.taskType == 2)
  2932. ">
  2933. <div>
  2934. <div class="add_chapters_box add_c_none" v-if="
  2935. itemTask.chapterData &&
  2936. itemTask.chapterData.length == 0
  2937. ">
  2938. <img src="../../../assets/icon/new/c_none.png" alt />
  2939. </div>
  2940. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2941. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2942. dragOver(index1, itemTaskIndex)
  2943. " @dragend="dragEnd()" :draggable="isdrag ==
  2944. 'chapter-' + itemTaskIndex + '-' + index1
  2945. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2946. :key="item1.id" @click="
  2947. getChapterData(
  2948. $event,
  2949. unitIndex,
  2950. index,
  2951. index1,
  2952. item1.type
  2953. )
  2954. " :class="{
  2955. dragOverTop2:
  2956. newIndex === index1 &&
  2957. typeIndex ==
  2958. 'chapter-' +
  2959. itemTaskIndex +
  2960. '-' +
  2961. index1 &&
  2962. oldIndex > index1,
  2963. dragOverBottom2:
  2964. newIndex === index1 &&
  2965. typeIndex ==
  2966. 'chapter-' +
  2967. itemTaskIndex +
  2968. '-' +
  2969. index1 &&
  2970. oldIndex < index1,
  2971. }">
  2972. <div @mousedown="
  2973. isdrag =
  2974. 'chapter-' + itemTaskIndex + '-' + index1
  2975. " @mouseup="isdrag = ''" @touchstart="
  2976. isdrag =
  2977. 'chapter-' + itemTaskIndex + '-' + index1
  2978. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2979. <div class="chapter_upload_t" style="width: 100%"></div>
  2980. <div class="chapter_upload_o" style="
  2981. position: relative;
  2982. display: flex;
  2983. align-items: center;
  2984. ">
  2985. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2986. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2987. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2988. </div>
  2989. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2990. </div>
  2991. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2992. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2993. </div>
  2994. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2995. </div>
  2996. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2997. </div>
  2998. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2999. </div>
  3000. </div>
  3001. <div class="chapter_upload_n">
  3002. <span style="
  3003. font-size: 14px;
  3004. color: rgb(109, 109, 109);
  3005. height: 14px;
  3006. line-height: 14px;
  3007. " v-if="
  3008. item1.type == 2 ||
  3009. item1.type == 3 ||
  3010. item1.type == 7
  3011. ">{{ item1.text }}-</span>
  3012. <input readonly="true" v-if="
  3013. item1.type == 2 ||
  3014. item1.type == 3 ||
  3015. item1.type == 7
  3016. " :placeholder="item1.name" @click="
  3017. updataVideoT(
  3018. $event,
  3019. unitIndex,
  3020. itemTaskIndex,
  3021. index1
  3022. )
  3023. " style="
  3024. border: none;
  3025. outline: none;
  3026. width: 80%;
  3027. minwidth: 215px;
  3028. z-index: 99;
  3029. font-size: 14px;
  3030. white-space: nowrap;
  3031. overflow: hidden;
  3032. text-overflow: ellipsis;
  3033. " />
  3034. <input :placeholder="item1.name" v-if="item1.type == 6" 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="
  3042. selectAttText(itemTaskIndex, index1)
  3043. " />
  3044. <input :placeholder="item1.title ? item1.title : '链接'
  3045. " v-if="item1.type == 8 || item1.type == 14" style="
  3046. border: none;
  3047. outline: none;
  3048. width: 80%;
  3049. white-space: nowrap;
  3050. overflow: hidden;
  3051. text-overflow: ellipsis;
  3052. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  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_ud" style="z-index: 99">
  3057. <div class="chapter_upload_up" @click="
  3058. upCd(
  3059. $event,
  3060. unitIndex,
  3061. index,
  3062. itemTaskIndex,
  3063. index1
  3064. )
  3065. "></div>
  3066. <div class="chapter_upload_down" @click="
  3067. downCd(
  3068. $event,
  3069. unitIndex,
  3070. index,
  3071. itemTaskIndex,
  3072. index1
  3073. )
  3074. "></div>
  3075. </div>
  3076. <div class="chapter_upload_ic_edit" v-if="
  3077. item1.type == 2 ||
  3078. item1.type == 3 ||
  3079. item1.type == 12 ||
  3080. item1.type == 13 ||
  3081. item1.type == 7
  3082. " @click.stop="
  3083. updataVideoT(
  3084. $event,
  3085. unitIndex,
  3086. itemTaskIndex,
  3087. index1
  3088. )
  3089. ">
  3090. <div></div>
  3091. </div>
  3092. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3093. selectAttText(itemTaskIndex, index1)
  3094. ">
  3095. <div></div>
  3096. </div>
  3097. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3098. @click="selectLine(itemTaskIndex, index1)">
  3099. <div></div>
  3100. </div>
  3101. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3102. openUpdateSource(itemTaskIndex, index1)
  3103. ">
  3104. <div></div>
  3105. </div>
  3106. <div class="chapter_upload_ic_r" @click.stop="
  3107. deleteChapterData(
  3108. $event,
  3109. unitIndex,
  3110. index,
  3111. index1,
  3112. itemTaskIndex
  3113. )
  3114. ">
  3115. <div></div>
  3116. </div>
  3117. </div>
  3118. </div>
  3119. </div>
  3120. </div>
  3121. </div>
  3122. <div class="add_info_box" style="margin: 10px 0 0">
  3123. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3124. <span style="color: red">*</span>
  3125. 教学设计
  3126. <input type="file"
  3127. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3128. style="display: none" v-if="inputShow" @change="
  3129. beforeUpload3(
  3130. $event,
  3131. unitIndex,
  3132. 3,
  3133. itemTaskIndex,
  3134. '教学设计'
  3135. )
  3136. " />
  3137. </button>
  3138. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3139. <span style="color: red">*</span>
  3140. 教学课件
  3141. <input type="file"
  3142. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3143. style="display: none" v-if="inputShow" @change="
  3144. beforeUpload3(
  3145. $event,
  3146. unitIndex,
  3147. 3,
  3148. itemTaskIndex,
  3149. '教学课件'
  3150. )
  3151. " />
  3152. </button>
  3153. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3154. 教学视频
  3155. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3156. style="display: none" v-if="inputShow" @change="
  3157. beforeUpload3(
  3158. $event,
  3159. unitIndex,
  3160. 2,
  3161. itemTaskIndex,
  3162. '教学视频'
  3163. )
  3164. " />
  3165. </button>
  3166. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3167. 教学音频
  3168. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3169. beforeUpload3(
  3170. $event,
  3171. unitIndex,
  3172. 2,
  3173. itemTaskIndex,
  3174. '教学音频'
  3175. )
  3176. " />
  3177. </button>
  3178. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3179. 学习单
  3180. <input type="file"
  3181. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3182. style="display: none" v-if="inputShow" @change="
  3183. beforeUpload3(
  3184. $event,
  3185. unitIndex,
  3186. 3,
  3187. itemTaskIndex,
  3188. '学习单'
  3189. )
  3190. " />
  3191. </button>
  3192. </div>
  3193. <div v-if="
  3194. unitJson[unitIndex].chapterInfo[0].taskJson[
  3195. itemTaskIndex
  3196. ].proVisible
  3197. " class="mask">
  3198. <div class="progressBox">
  3199. <!-- <div id="closePro" class="closeCss">
  3200. <img src="../../../../assets/icon/close.png" alt />
  3201. </div> -->
  3202. <div class="lbox">
  3203. <img src="../../../assets/loading.gif" />上传中,请稍后
  3204. </div>
  3205. <div style="margin-bottom: 10px">
  3206. <span>{{
  3207. unitJson[unitIndex].chapterInfo[0].taskJson[
  3208. itemTaskIndex
  3209. ].isFinishSize
  3210. }}M</span>
  3211. /
  3212. <span>{{
  3213. unitJson[unitIndex].chapterInfo[0].taskJson[
  3214. itemTaskIndex
  3215. ].isAllSize
  3216. }}M</span>
  3217. </div>
  3218. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3219. itemTaskIndex
  3220. ].progress
  3221. ? unitJson[unitIndex].chapterInfo[0]
  3222. .taskJson[itemTaskIndex].progress
  3223. : 0
  3224. " style="width: 80%"></el-progress>
  3225. </div>
  3226. </div>
  3227. </div>
  3228. </div>
  3229. <!-- padding: 20px; -->
  3230. <div style="
  3231. background: #fff;
  3232. border-radius: 5px;
  3233. margin-top: 15px;
  3234. ">
  3235. <div v-if="
  3236. unitJson[unitIndex].easy == 6 ||
  3237. !unitJson[unitIndex].easy
  3238. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3239. <div v-if="
  3240. unitJson[unitIndex].easy != 3 &&
  3241. !(
  3242. unitJson[unitIndex].easy == 5 &&
  3243. itemTask.taskType == 1
  3244. )
  3245. " style="
  3246. flex-direction: row;
  3247. justify-content: flex-start;
  3248. align-items: center;
  3249. ">
  3250. <div style="
  3251. display: flex;
  3252. flex-direction: row;
  3253. align-items: center;
  3254. margin: 5px 0 20px;
  3255. ">
  3256. <div class="lineTitle clineTitle">
  3257. {{
  3258. !unitJson[unitIndex].easy ||
  3259. unitJson[unitIndex].easy == 6 ||
  3260. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3261. -1
  3262. ? "练习内容"
  3263. : "评价内容"
  3264. }}
  3265. </div>
  3266. <!-- <div class="line" style="width: 90%"></div> -->
  3267. </div>
  3268. </div>
  3269. <div class="tools">
  3270. <div class="leftTools" style="width: 100%" v-for="(
  3271. itemTool, toolIndex
  3272. ) in itemTask.toolChoose" :key="toolIndex">
  3273. <div style="
  3274. display: flex;
  3275. flex-direction: row;
  3276. align-items: baseline;
  3277. flex-wrap: nowrap;
  3278. justify-content: flex-start;
  3279. position: relative;
  3280. ">
  3281. <div style="margin-right: 20px; font-weight: bold"
  3282. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3283. 工具 {{ toolIndex + 1 }} :
  3284. </div>
  3285. <div class="chooseWho">
  3286. <div :class="itemTool.toolType == 0
  3287. ? 'isChooseActive'
  3288. : ''
  3289. " @click="
  3290. (itemTool.toolType = 0),
  3291. (itemTool.isFold3 = false),
  3292. $forceUpdate()
  3293. ">
  3294. 互动类
  3295. </div>
  3296. <div :class="itemTool.toolType == 1
  3297. ? 'isChooseActive'
  3298. : ''
  3299. " @click="
  3300. (itemTool.toolType = 1),
  3301. (itemTool.isFold3 = false),
  3302. $forceUpdate()
  3303. ">
  3304. 思维类
  3305. </div>
  3306. <div :class="itemTool.toolType == 6
  3307. ? 'isChooseActive'
  3308. : ''
  3309. " @click="
  3310. (itemTool.toolType = 6),
  3311. (itemTool.isFold3 = false),
  3312. $forceUpdate()
  3313. ">
  3314. 协作类
  3315. </div>
  3316. <div :class="itemTool.toolType == 2
  3317. ? 'isChooseActive'
  3318. : ''
  3319. " @click="
  3320. (itemTool.toolType = 2),
  3321. (itemTool.isFold3 = false),
  3322. $forceUpdate()
  3323. ">
  3324. 测评类
  3325. </div>
  3326. <div :class="itemTool.toolType == 7
  3327. ? 'isChooseActive'
  3328. : ''
  3329. " @click="
  3330. (itemTool.toolType = 7),
  3331. (itemTool.isFold3 = false),
  3332. $forceUpdate()
  3333. ">
  3334. 评价类
  3335. </div>
  3336. <div :class="itemTool.toolType == 3
  3337. ? 'isChooseActive'
  3338. : ''
  3339. " @click="
  3340. (itemTool.toolType = 3),
  3341. (itemTool.isFold3 = false),
  3342. $forceUpdate()
  3343. ">
  3344. 编程类
  3345. </div>
  3346. <div :class="itemTool.toolType == 5
  3347. ? 'isChooseActive'
  3348. : ''
  3349. " @click="
  3350. (itemTool.toolType = 5),
  3351. (itemTool.isFold3 = false),
  3352. $forceUpdate()
  3353. ">
  3354. 学科类
  3355. </div>
  3356. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3357. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3358. 其他
  3359. </div> -->
  3360. </div>
  3361. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3362. margin:
  3363. itemTask.toolChoose.length > 1
  3364. ? '0px 35px 0px auto'
  3365. : '0 0 0 auto',
  3366. }" v-if="itemTask.toolChoose.length > 1">
  3367. <div class="chapter_upload_up2" @click.stop="
  3368. upTool(
  3369. $event,
  3370. unitIndex,
  3371. itemTaskIndex,
  3372. toolIndex
  3373. )
  3374. ">
  3375. 上移
  3376. </div>
  3377. <div class="chapter_upload_down2" @click.stop="
  3378. downTool(
  3379. $event,
  3380. unitIndex,
  3381. itemTaskIndex,
  3382. toolIndex
  3383. )
  3384. ">
  3385. 下移
  3386. </div>
  3387. </div>
  3388. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3389. @click="fold3(itemTaskIndex, toolIndex)"
  3390. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3391. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3392. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3393. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3394. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3395. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3396. v-if="itemTask.toolChoose.length > 1" style="
  3397. position: absolute;
  3398. right: 0;
  3399. top: -5px;
  3400. "></div>
  3401. </div>
  3402. <!-- v-show="!itemTool.isFold3" -->
  3403. <div style="min-height: 163px">
  3404. <div class="toolSort" v-if="itemTool.toolType == 0">
  3405. <!-- <div class="tool">
  3406. <div
  3407. class="whiteBIcon"
  3408. @click="addTools(8, itemTaskIndex, toolIndex)"
  3409. >
  3410. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3411. <div style="margin: 5px 0">素材库</div>
  3412. </div>
  3413. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3414. <img
  3415. src="../../../assets/icon/checkNo.png"
  3416. alt
  3417. v-if="itemTool.tool.indexOf(8) == -1"
  3418. />
  3419. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3420. alt /><span>已选择</span></div>
  3421. </div>
  3422. </div>-->
  3423. <!-- <div class="tool">
  3424. <div
  3425. class="whiteBIcon"
  3426. @click="addTools(17, itemTaskIndex, toolIndex)"
  3427. >
  3428. <img
  3429. src="../../../assets/icon/secondToolList/library.png"
  3430. alt
  3431. />
  3432. <div style="margin: 5px 0">学习资料</div>
  3433. </div>
  3434. <div
  3435. class="check"
  3436. @click="addTools(17, itemTaskIndex, toolIndex)"
  3437. >
  3438. <img
  3439. src="../../../assets/icon/checkNo.png"
  3440. alt
  3441. v-if="itemTool.tool.indexOf(17) == -1"
  3442. />
  3443. <img
  3444. src="../../../assets/icon/checkedIs.png"
  3445. alt
  3446. v-else
  3447. />
  3448. </div>10
  3449. </div> -->
  3450. <div class="tool" :class="{
  3451. isToolChoose:
  3452. itemTool.tool.indexOf(10) != -1,
  3453. }" @click="
  3454. addTools(10, itemTaskIndex, toolIndex)
  3455. ">
  3456. <div class="whiteBIcon" @click.stop="
  3457. openTools(itemTaskIndex, 10, toolIndex)
  3458. ">
  3459. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3460. <div style="margin: 5px 0">倒计时</div>
  3461. </div>
  3462. <div class="noCTool">
  3463. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3464. </div>
  3465. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3466. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3467. </div>
  3468. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3469. <img src="../../../assets/icon/checkNo.png" alt
  3470. v-if="itemTool.tool.indexOf(10) == -1" />
  3471. <div class="checkDiv" v-else>
  3472. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3473. </div>
  3474. </div> -->
  3475. </div>
  3476. <div class="tool" :class="{
  3477. isToolChoose:
  3478. itemTool.tool.indexOf(65) != -1,
  3479. }" @click="
  3480. addTools(65, itemTaskIndex, toolIndex)
  3481. ">
  3482. <div class="whiteBIcon" @click.stop="
  3483. addTools(65, itemTaskIndex, toolIndex)
  3484. ">
  3485. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3486. <div style="margin: 5px 0">挑人</div>
  3487. </div>
  3488. <div class="noCTool">
  3489. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3490. </div>
  3491. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3492. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3493. </div>
  3494. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3495. <img src="../../../assets/icon/checkNo.png" alt
  3496. v-if="itemTool.tool.indexOf(65) == -1" />
  3497. <div class="checkDiv" v-else>
  3498. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3499. </div>
  3500. </div> -->
  3501. </div>
  3502. <!-- <div class="tool">
  3503. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3504. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3505. <div style="margin: 5px 0">学生分组</div>
  3506. </div>
  3507. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3508. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3509. <div class="checkDiv" v-else>
  3510. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3511. </div>
  3512. </div>
  3513. </div> -->
  3514. <!-- <div class="tool">
  3515. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3516. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3517. <div style="margin: 5px 0">交互视频</div>
  3518. </div>
  3519. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3520. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3521. <div class="checkDiv" v-else>
  3522. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3523. </div>
  3524. </div>
  3525. </div> -->
  3526. </div>
  3527. <div class="toolSort" v-if="itemTool.toolType == 1">
  3528. <div class="tool" :class="{
  3529. isToolChoose:
  3530. itemTool.tool.indexOf(7) != -1,
  3531. }" @click="
  3532. addTools(7, itemTaskIndex, toolIndex)
  3533. ">
  3534. <div class="whiteBIcon" @click.stop="
  3535. addTools(7, itemTaskIndex, toolIndex)
  3536. ">
  3537. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3538. <div style="margin: 5px 0">思维网格</div>
  3539. </div>
  3540. <div class="noCTool">
  3541. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3542. </div>
  3543. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3544. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3545. </div>
  3546. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3547. <img src="../../../assets/icon/checkNo.png" alt
  3548. v-if="itemTool.tool.indexOf(7) == -1" />
  3549. <div class="checkDiv" v-else>
  3550. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3551. </div>
  3552. </div> -->
  3553. </div>
  3554. <div class="tool" :class="{
  3555. isToolChoose:
  3556. itemTool.tool.indexOf(1) != -1,
  3557. }" @click="
  3558. addTools(1, itemTaskIndex, toolIndex)
  3559. ">
  3560. <div class="whiteBIcon" @click.stop="
  3561. openTools(itemTaskIndex, 1, toolIndex)
  3562. ">
  3563. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3564. <div style="margin: 5px 0">电子白板</div>
  3565. </div>
  3566. <div class="noCTool">
  3567. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3568. </div>
  3569. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3570. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3571. </div>
  3572. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3573. <img src="../../../assets/icon/checkNo.png" alt
  3574. v-if="itemTool.tool.indexOf(1) == -1" />
  3575. <div class="checkDiv" v-else>
  3576. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3577. </div>
  3578. </div> -->
  3579. </div>
  3580. <!-- <div class="tool">
  3581. <div
  3582. class="whiteBIcon"
  3583. @click="addTools(2, itemTaskIndex, toolIndex)"
  3584. >
  3585. <img
  3586. src="../../../assets/icon/secondToolList/note.png"
  3587. alt
  3588. />
  3589. <div style="margin: 5px 0">便签</div>
  3590. </div>
  3591. <div
  3592. class="check"
  3593. @click="addTools(2, itemTaskIndex, toolIndex)"
  3594. >
  3595. <img
  3596. src="../../../assets/icon/checkNo.png"
  3597. alt
  3598. v-if="itemTool.tool.indexOf(2) == -1"
  3599. />
  3600. <div class="checkDiv" v-else>
  3601. <img
  3602. src="../../../assets/icon/checkedIs.png"
  3603. alt
  3604. /><span>已选择</span>
  3605. </div>
  3606. </div>
  3607. </div> -->
  3608. <!-- <div class="tool">
  3609. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3610. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3611. <div style="margin: 5px 0">协同文档</div>
  3612. </div>
  3613. <div
  3614. class="check"
  3615. @click="addTools(6, itemTaskIndex, toolIndex)"
  3616. >
  3617. <img
  3618. src="../../../assets/icon/checkNo.png"
  3619. alt
  3620. v-if="itemTool.tool.indexOf(6) == -1"
  3621. />
  3622. <div class="checkDiv" v-else>
  3623. <img
  3624. src="../../../assets/icon/checkedIs.png"
  3625. alt
  3626. /><span>已选择</span>
  3627. </div>
  3628. </div>
  3629. </div> -->
  3630. <div class="tool" :class="{
  3631. isToolChoose:
  3632. itemTool.tool.indexOf(52) != -1,
  3633. }" @click="
  3634. addTools(52, itemTaskIndex, toolIndex)
  3635. ">
  3636. <div class="whiteBIcon" @click.stop="
  3637. openTools(itemTaskIndex, 52, toolIndex)
  3638. ">
  3639. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3640. <div style="margin: 5px 0">文档</div>
  3641. </div>
  3642. <div class="noCTool">
  3643. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3644. </div>
  3645. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3646. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3647. </div>
  3648. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3649. <img src="../../../assets/icon/checkNo.png" alt
  3650. v-if="itemTool.tool.indexOf(52) == -1" />
  3651. <div class="checkDiv" v-else>
  3652. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3653. </div>
  3654. </div> -->
  3655. </div>
  3656. <div class="tool" :class="{
  3657. isToolChoose:
  3658. itemTool.tool.indexOf(3) != -1,
  3659. }" @click="
  3660. addTools(3, itemTaskIndex, toolIndex)
  3661. ">
  3662. <div class="whiteBIcon" @click.stop="
  3663. openTools(itemTaskIndex, 3, toolIndex)
  3664. ">
  3665. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3666. <div style="margin: 5px 0">思维导图</div>
  3667. </div>
  3668. <div class="noCTool">
  3669. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3670. </div>
  3671. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3672. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3673. </div>
  3674. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3675. <img src="../../../assets/icon/checkNo.png" alt
  3676. v-if="itemTool.tool.indexOf(3) == -1" />
  3677. <div class="checkDiv" v-else>
  3678. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3679. </div>
  3680. </div> -->
  3681. </div>
  3682. <div class="tool" :class="{
  3683. isToolChoose:
  3684. itemTool.tool.indexOf(48) != -1,
  3685. }" @click="
  3686. addTools(48, itemTaskIndex, toolIndex)
  3687. ">
  3688. <div class="whiteBIcon" @click.stop="
  3689. openTools(itemTaskIndex, 48, toolIndex)
  3690. ">
  3691. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3692. <div style="margin: 5px 0">表格</div>
  3693. </div>
  3694. <div class="noCTool">
  3695. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3696. </div>
  3697. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3698. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3699. </div>
  3700. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3701. <img src="../../../assets/icon/checkNo.png" alt
  3702. v-if="itemTool.tool.indexOf(48) == -1" />
  3703. <div class="checkDiv" v-else>
  3704. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3705. </div>
  3706. </div> -->
  3707. </div>
  3708. </div>
  3709. <div class="toolSort" v-if="itemTool.toolType == 6">
  3710. <div class="tool" :class="{
  3711. isToolChoose:
  3712. itemTool.tool.indexOf(49) != -1,
  3713. }" @click="
  3714. addTools(49, itemTaskIndex, toolIndex)
  3715. ">
  3716. <div class="whiteBIcon" @click.stop="
  3717. openTools(itemTaskIndex, 49, toolIndex)
  3718. ">
  3719. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3720. <div style="margin: 5px 0">学生分组</div>
  3721. </div>
  3722. <div class="noCTool">
  3723. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3724. </div>
  3725. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3726. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3727. </div>
  3728. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3729. <img src="../../../assets/icon/checkNo.png" alt
  3730. v-if="itemTool.tool.indexOf(49) == -1" />
  3731. <div class="checkDiv" v-else>
  3732. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3733. </div>
  3734. </div> -->
  3735. </div>
  3736. </div>
  3737. <div class="toolSort" v-if="itemTool.toolType == 2">
  3738. <!-- <div class="tool">
  3739. <div
  3740. class="whiteBIcon"
  3741. @click="addTools(5, itemTaskIndex, toolIndex)"
  3742. >
  3743. <img
  3744. src="../../../assets/icon/thirdToolList/score.png"
  3745. alt
  3746. />
  3747. <div style="margin: 5px 0">量规评分</div>
  3748. </div>
  3749. <div
  3750. class="check"
  3751. @click="addTools(5, itemTaskIndex, toolIndex)"
  3752. >
  3753. <img
  3754. src="../../../assets/icon/checkNo.png"
  3755. alt
  3756. v-if="itemTool.tool.indexOf(5) == -1"
  3757. />
  3758. <img
  3759. src="../../../assets/icon/checkedIs.png"
  3760. alt
  3761. v-else
  3762. />
  3763. </div>
  3764. </div>-->
  3765. <div class="tool" :class="{
  3766. isToolChoose:
  3767. itemTool.tool.indexOf(4) != -1,
  3768. }" @click="
  3769. addTools(4, itemTaskIndex, toolIndex)
  3770. ">
  3771. <div class="whiteBIcon" @click.stop="
  3772. openTools(itemTaskIndex, 4, toolIndex)
  3773. ">
  3774. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3775. <div style="margin: 5px 0">问卷调查</div>
  3776. </div>
  3777. <div class="noCTool">
  3778. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3779. </div>
  3780. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3781. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3782. </div>
  3783. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3784. <img src="../../../assets/icon/checkNo.png" alt
  3785. v-if="itemTool.tool.indexOf(4) == -1" />
  3786. <div class="checkDiv" v-else>
  3787. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3788. </div>
  3789. </div> -->
  3790. </div>
  3791. <div class="tool" :class="{
  3792. isToolChoose:
  3793. itemTool.tool.indexOf(45) != -1,
  3794. }" @click="
  3795. addTools(45, itemTaskIndex, toolIndex)
  3796. ">
  3797. <div class="whiteBIcon" @click="
  3798. openTools(itemTaskIndex, 45, toolIndex)
  3799. ">
  3800. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3801. <div style="margin: 5px 0">选择题</div>
  3802. </div>
  3803. <div class="noCTool">
  3804. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3805. </div>
  3806. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3807. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3808. </div>
  3809. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3810. <img src="../../../assets/icon/checkNo.png" alt
  3811. v-if="itemTool.tool.indexOf(45) == -1" />
  3812. <div class="checkDiv" v-else>
  3813. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3814. </div>
  3815. </div> -->
  3816. </div>
  3817. <div class="tool" :class="{
  3818. isToolChoose:
  3819. itemTool.tool.indexOf(15) != -1,
  3820. }" @click="
  3821. addTools(15, itemTaskIndex, toolIndex)
  3822. ">
  3823. <div class="whiteBIcon" @click.stop="
  3824. openTools(itemTaskIndex, 15, toolIndex)
  3825. ">
  3826. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3827. <div style="margin: 5px 0">问答</div>
  3828. </div>
  3829. <div class="noCTool">
  3830. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3831. </div>
  3832. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3833. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3834. </div>
  3835. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3836. <img src="../../../assets/icon/checkNo.png" alt
  3837. v-if="itemTool.tool.indexOf(15) == -1" />
  3838. <div class="checkDiv" v-else>
  3839. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3840. </div>
  3841. </div> -->
  3842. </div>
  3843. <div class="tool" :class="{
  3844. isToolChoose:
  3845. itemTool.tool.indexOf(16) != -1,
  3846. }" @click="
  3847. addTools(16, itemTaskIndex, toolIndex)
  3848. ">
  3849. <div class="whiteBIcon" @click.stop="
  3850. addTools(16, itemTaskIndex, toolIndex)
  3851. ">
  3852. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3853. <div style="margin: 5px 0">作业提交</div>
  3854. </div>
  3855. <div class="noCTool">
  3856. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3857. </div>
  3858. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3859. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3860. </div>
  3861. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3862. <img src="../../../assets/icon/checkNo.png" alt
  3863. v-if="itemTool.tool.indexOf(16) == -1" />
  3864. <div class="checkDiv" v-else>
  3865. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3866. </div>
  3867. </div> -->
  3868. </div>
  3869. <div class="tool" :class="{
  3870. isToolChoose:
  3871. itemTool.tool.indexOf(50) != -1,
  3872. }" @click="
  3873. addTools(50, itemTaskIndex, toolIndex)
  3874. ">
  3875. <div class="whiteBIcon" @click.stop="
  3876. addTools(50, itemTaskIndex, toolIndex)
  3877. ">
  3878. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3879. <div style="margin: 5px 0">批量上传</div>
  3880. </div>
  3881. <div class="noCTool">
  3882. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3883. </div>
  3884. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3885. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3886. </div>
  3887. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3888. <img src="../../../assets/icon/checkNo.png" alt
  3889. v-if="itemTool.tool.indexOf(50) == -1" />
  3890. <div class="checkDiv" v-else>
  3891. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3892. </div>
  3893. </div> -->
  3894. </div>
  3895. <!-- <div class="tool">
  3896. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3897. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3898. <div style="margin: 5px 0">个人评价</div>
  3899. </div>
  3900. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3901. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3902. <div class="checkDiv" v-else>
  3903. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3904. </div>
  3905. </div>
  3906. </div> -->
  3907. <div class="tool" :class="{
  3908. isToolChoose:
  3909. itemTool.tool.indexOf(41) != -1,
  3910. }" @click="
  3911. addTools(41, itemTaskIndex, toolIndex)
  3912. ">
  3913. <div class="whiteBIcon" @click.stop="
  3914. openTools(itemTaskIndex, 41, toolIndex)
  3915. ">
  3916. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3917. <div style="margin: 5px 0">选择匹配</div>
  3918. </div>
  3919. <div class="noCTool">
  3920. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3921. </div>
  3922. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3923. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3924. </div>
  3925. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3926. <img src="../../../assets/icon/checkNo.png" alt
  3927. v-if="itemTool.tool.indexOf(41) == -1" />
  3928. <div class="checkDiv" v-else>
  3929. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3930. </div>
  3931. </div> -->
  3932. </div>
  3933. <div class="tool" :class="{
  3934. isToolChoose:
  3935. itemTool.tool.indexOf(47) != -1,
  3936. }" @click="
  3937. addTools(47, itemTaskIndex, toolIndex)
  3938. ">
  3939. <div class="whiteBIcon" @click.stop="
  3940. openTools(itemTaskIndex, 47, toolIndex)
  3941. ">
  3942. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3943. <div style="margin: 5px 0">排序</div>
  3944. </div>
  3945. <div class="noCTool">
  3946. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3947. </div>
  3948. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3949. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3950. </div>
  3951. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3952. <img src="../../../assets/icon/checkNo.png" alt
  3953. v-if="itemTool.tool.indexOf(47) == -1" />
  3954. <div class="checkDiv" v-else>
  3955. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3956. </div>
  3957. </div> -->
  3958. </div>
  3959. <!-- <div class="tool">
  3960. <div
  3961. class="whiteBIcon"
  3962. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3963. >
  3964. <img
  3965. src="../../../assets/icon/thirdToolList/mp3.png"
  3966. alt
  3967. />
  3968. <div style="margin: 5px 0">上传音频</div>
  3969. </div>
  3970. <div
  3971. class="check"
  3972. @click="addTools(42, itemTaskIndex, toolIndex)"
  3973. >
  3974. <img
  3975. src="../../../assets/icon/checkNo.png"
  3976. alt
  3977. v-if="itemTool.tool.indexOf(42) == -1"
  3978. />
  3979. <img
  3980. src="../../../assets/icon/checkedIs.png"
  3981. alt
  3982. v-else
  3983. />
  3984. </div>
  3985. </div> -->
  3986. </div>
  3987. <div class="toolSort" v-if="itemTool.toolType == 3">
  3988. <div class="tool" :class="{
  3989. isToolChoose:
  3990. itemTool.tool.indexOf(18) != -1,
  3991. }" @click="
  3992. addTools(18, itemTaskIndex, toolIndex)
  3993. ">
  3994. <div class="whiteBIcon" @click.stop="
  3995. addTools(18, itemTaskIndex, toolIndex)
  3996. ">
  3997. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3998. <div style="margin: 5px 0">训练平台</div>
  3999. </div>
  4000. <div class="noCTool">
  4001. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4002. </div>
  4003. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4004. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4005. </div>
  4006. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4007. <img src="../../../assets/icon/checkNo.png" alt
  4008. v-if="itemTool.tool.indexOf(18) == -1" />
  4009. <div class="checkDiv" v-else>
  4010. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4011. </div>
  4012. </div> -->
  4013. </div>
  4014. <div class="tool" :class="{
  4015. isToolChoose:
  4016. itemTool.tool.indexOf(21) != -1,
  4017. }" @click="
  4018. addTools(21, itemTaskIndex, toolIndex)
  4019. ">
  4020. <div class="whiteBIcon" @click.stop="
  4021. addTools(21, itemTaskIndex, toolIndex)
  4022. ">
  4023. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4024. <div style="margin: 5px 0">
  4025. AIoT Blockly
  4026. </div>
  4027. </div>
  4028. <div class="noCTool">
  4029. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4030. </div>
  4031. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4032. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4033. </div>
  4034. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4035. <img src="../../../assets/icon/checkNo.png" alt
  4036. v-if="itemTool.tool.indexOf(21) == -1" />
  4037. <div class="checkDiv" v-else>
  4038. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4039. </div>
  4040. </div> -->
  4041. </div>
  4042. <!-- <div class="tool">
  4043. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4044. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4045. <div style="margin: 5px 0">AI体验</div>
  4046. </div>
  4047. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4048. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4049. <div class="checkDiv" v-else>
  4050. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4051. </div>
  4052. </div>
  4053. </div> -->
  4054. <div class="tool" :class="{
  4055. isToolChoose:
  4056. itemTool.tool.indexOf(23) != -1,
  4057. }" @click="
  4058. addTools(23, itemTaskIndex, toolIndex)
  4059. ">
  4060. <div class="whiteBIcon" @click.stop="
  4061. addTools(23, itemTaskIndex, toolIndex)
  4062. ">
  4063. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4064. <div style="margin: 5px 0">AI Python</div>
  4065. </div>
  4066. <div class="noCTool">
  4067. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4068. </div>
  4069. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4070. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4071. </div>
  4072. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4073. <img src="../../../assets/icon/checkNo.png" alt
  4074. v-if="itemTool.tool.indexOf(23) == -1" />
  4075. <div class="checkDiv" v-else>
  4076. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4077. </div>
  4078. </div> -->
  4079. </div>
  4080. <div class="tool" :class="{
  4081. isToolChoose:
  4082. itemTool.tool.indexOf(24) != -1,
  4083. }" @click="
  4084. addTools(24, itemTaskIndex, toolIndex)
  4085. ">
  4086. <div class="whiteBIcon" @click.stop="
  4087. addTools(24, itemTaskIndex, toolIndex)
  4088. ">
  4089. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4090. <div style="margin: 5px 0">
  4091. AI Blockly
  4092. </div>
  4093. </div>
  4094. <div class="noCTool">
  4095. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4096. </div>
  4097. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4098. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4099. </div>
  4100. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4101. <img src="../../../assets/icon/checkNo.png" alt
  4102. v-if="itemTool.tool.indexOf(24) == -1" />
  4103. <div class="checkDiv" v-else>
  4104. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4105. </div>
  4106. </div> -->
  4107. </div>
  4108. <div class="tool" :class="{
  4109. isToolChoose:
  4110. itemTool.tool.indexOf(32) != -1,
  4111. }" @click="
  4112. addTools(32, itemTaskIndex, toolIndex)
  4113. ">
  4114. <div class="whiteBIcon" @click.stop="
  4115. addTools(32, itemTaskIndex, toolIndex)
  4116. ">
  4117. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4118. <div style="margin: 5px 0">源码编辑</div>
  4119. </div>
  4120. <div class="noCTool">
  4121. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4122. </div>
  4123. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4124. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4125. </div>
  4126. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4127. <img src="../../../assets/icon/checkNo.png" alt
  4128. v-if="itemTool.tool.indexOf(32) == -1" />
  4129. <div class="checkDiv" v-else>
  4130. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4131. </div>
  4132. </div> -->
  4133. </div>
  4134. <div class="tool" :class="{
  4135. isToolChoose:
  4136. itemTool.tool.indexOf(57) != -1,
  4137. }" @click="
  4138. addTools(57, itemTaskIndex, toolIndex)
  4139. ">
  4140. <div class="whiteBIcon" @click.stop="
  4141. openTools(itemTaskIndex, 57, toolIndex)
  4142. ">
  4143. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4144. <div style="margin: 5px 0">CocoPi</div>
  4145. </div>
  4146. <div class="noCTool">
  4147. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4148. </div>
  4149. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4150. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4151. </div>
  4152. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4153. <img src="../../../assets/icon/checkNo.png" alt
  4154. v-if="itemTool.tool.indexOf(57) == -1" />
  4155. <div class="checkDiv" v-else>
  4156. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4157. </div>
  4158. </div> -->
  4159. </div>
  4160. <div class="tool" :class="{
  4161. isToolChoose:
  4162. itemTool.tool.indexOf(63) != -1,
  4163. }" @click="
  4164. addTools(63, itemTaskIndex, toolIndex)
  4165. ">
  4166. <div class="whiteBIcon" @click.stop="
  4167. addTools(63, itemTaskIndex, toolIndex)
  4168. ">
  4169. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4170. <div style="margin: 5px 0">海龟编程</div>
  4171. </div>
  4172. <div class="noCTool">
  4173. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4174. </div>
  4175. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4176. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4177. </div>
  4178. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4179. <img src="../../../assets/icon/checkNo.png" alt
  4180. v-if="itemTool.tool.indexOf(63) == -1" />
  4181. <div class="checkDiv" v-else>
  4182. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4183. </div>
  4184. </div> -->
  4185. </div>
  4186. <div class="tool" :class="{
  4187. isToolChoose:
  4188. itemTool.tool.indexOf(71) != -1,
  4189. }" @click="
  4190. addTools(71, itemTaskIndex, toolIndex)
  4191. ">
  4192. <div class="whiteBIcon" @click.stop="
  4193. addTools(71, itemTaskIndex, toolIndex)
  4194. ">
  4195. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4196. <div style="margin: 5px 0">AI智能体</div>
  4197. </div>
  4198. <div class="noCTool">
  4199. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4200. </div>
  4201. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4202. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4203. </div>
  4204. </div>
  4205. </div>
  4206. <div class="toolSort" v-if="itemTool.toolType == 7">
  4207. <div class="tool" :class="{
  4208. isToolChoose:
  4209. itemTool.tool.indexOf(40) != -1,
  4210. }" @click.stop="
  4211. addTools(40, itemTaskIndex, toolIndex)
  4212. ">
  4213. <div class="whiteBIcon" @click.stop="
  4214. openTools(itemTaskIndex, 40, toolIndex)
  4215. ">
  4216. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4217. <div style="margin: 5px 0">个人评价</div>
  4218. </div>
  4219. <div class="noCTool">
  4220. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4221. </div>
  4222. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4223. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4224. </div>
  4225. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4226. <img src="../../../assets/icon/checkNo.png" alt
  4227. v-if="itemTool.tool.indexOf(40) == -1" />
  4228. <div class="checkDiv" v-else>
  4229. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4230. </div>
  4231. </div> -->
  4232. </div>
  4233. </div>
  4234. <div class="toolSort" v-if="itemTool.toolType == 5">
  4235. <div class="tool" :class="{
  4236. isToolChoose:
  4237. itemTool.tool.indexOf(28) != -1,
  4238. }" @click="
  4239. addTools(28, itemTaskIndex, toolIndex)
  4240. ">
  4241. <div class="whiteBIcon" @click.stop="
  4242. addTools(28, itemTaskIndex, toolIndex)
  4243. ">
  4244. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4245. <div style="margin: 5px 0">翻译</div>
  4246. </div>
  4247. <div class="noCTool">
  4248. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4249. </div>
  4250. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4251. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4252. </div>
  4253. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4254. <img src="../../../assets/icon/checkNo.png" alt
  4255. v-if="itemTool.tool.indexOf(28) == -1" />
  4256. <div class="checkDiv" v-else>
  4257. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4258. </div>
  4259. </div> -->
  4260. </div>
  4261. <div class="tool" :class="{
  4262. isToolChoose:
  4263. itemTool.tool.indexOf(31) != -1,
  4264. }" @click="
  4265. addTools(31, itemTaskIndex, toolIndex)
  4266. ">
  4267. <div class="whiteBIcon" @click.stop="
  4268. addTools(31, itemTaskIndex, toolIndex)
  4269. ">
  4270. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4271. <div style="margin: 5px 0">数字画板</div>
  4272. </div>
  4273. <div class="noCTool">
  4274. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4275. </div>
  4276. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4277. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4278. </div>
  4279. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4280. <img src="../../../assets/icon/checkNo.png" alt
  4281. v-if="itemTool.tool.indexOf(31) == -1" />
  4282. <div class="checkDiv" v-else>
  4283. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4284. </div>
  4285. </div> -->
  4286. </div>
  4287. <div class="tool" :class="{
  4288. isToolChoose:
  4289. itemTool.tool.indexOf(39) != -1,
  4290. }" @click="
  4291. addTools(39, itemTaskIndex, toolIndex)
  4292. ">
  4293. <div class="whiteBIcon" @click.stop="
  4294. addTools(39, itemTaskIndex, toolIndex)
  4295. ">
  4296. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4297. <div style="margin: 5px 0">GeoGebra</div>
  4298. </div>
  4299. <div class="noCTool">
  4300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4301. </div>
  4302. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4303. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4304. </div>
  4305. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4306. <img src="../../../assets/icon/checkNo.png" alt
  4307. v-if="itemTool.tool.indexOf(39) == -1" />
  4308. <div class="checkDiv" v-else>
  4309. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4310. </div>
  4311. </div> -->
  4312. </div>
  4313. <div class="tool" :class="{
  4314. isToolChoose:
  4315. itemTool.tool.indexOf(66) != -1,
  4316. }" @click="
  4317. addTools(66, itemTaskIndex, toolIndex)
  4318. ">
  4319. <div class="whiteBIcon" @click.stop="
  4320. addTools(66, itemTaskIndex, toolIndex)
  4321. ">
  4322. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4323. <div style="margin: 5px 0">公式编辑</div>
  4324. </div>
  4325. <div class="noCTool">
  4326. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4327. </div>
  4328. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4329. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4330. </div>
  4331. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4332. <img src="../../../assets/icon/checkNo.png" alt
  4333. v-if="itemTool.tool.indexOf(66) == -1" />
  4334. <div class="checkDiv" v-else>
  4335. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4336. </div>
  4337. </div> -->
  4338. </div>
  4339. <!-- <div class="tool">
  4340. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4341. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4342. <div style="margin: 5px 0">分子结构</div>
  4343. </div>
  4344. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4345. <img src="../../../assets/icon/checkNo.png" alt
  4346. v-if="itemTool.tool.indexOf(67) == -1" />
  4347. <div class="checkDiv" v-else>
  4348. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4349. </div>
  4350. </div>
  4351. </div> -->
  4352. <div class="tool" :class="{
  4353. isToolChoose:
  4354. itemTool.tool.indexOf(68) != -1,
  4355. }" @click="
  4356. addTools(68, itemTaskIndex, toolIndex)
  4357. ">
  4358. <div class="whiteBIcon" @click.stop="
  4359. addTools(68, itemTaskIndex, toolIndex)
  4360. ">
  4361. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4362. <div style="margin: 5px 0">时间轴</div>
  4363. </div>
  4364. <div class="noCTool">
  4365. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4366. </div>
  4367. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4368. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4369. </div>
  4370. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4371. <img src="../../../assets/icon/checkNo.png" alt
  4372. v-if="itemTool.tool.indexOf(68) == -1" />
  4373. <div class="checkDiv" v-else>
  4374. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4375. </div>
  4376. </div> -->
  4377. </div>
  4378. <div class="tool" :class="{
  4379. isToolChoose:
  4380. itemTool.tool.indexOf(69) != -1,
  4381. }" @click="
  4382. addTools(69, itemTaskIndex, toolIndex)
  4383. ">
  4384. <div class="whiteBIcon" @click.stop="
  4385. openTools(itemTaskIndex, 69, toolIndex)
  4386. ">
  4387. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4388. <div style="margin: 5px 0">英语写作</div>
  4389. </div>
  4390. <div class="noCTool">
  4391. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4392. </div>
  4393. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4394. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4395. </div>
  4396. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4397. <img src="../../../assets/icon/checkNo.png" alt
  4398. v-if="itemTool.tool.indexOf(4) == -1" />
  4399. <div class="checkDiv" v-else>
  4400. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4401. </div>
  4402. </div> -->
  4403. </div>
  4404. <div class="tool" :class="{
  4405. isToolChoose:
  4406. itemTool.tool.indexOf(70) != -1,
  4407. }" @click="
  4408. addTools(70, itemTaskIndex, toolIndex)
  4409. ">
  4410. <div class="whiteBIcon" @click.stop="
  4411. openTools(itemTaskIndex, 70, toolIndex)
  4412. ">
  4413. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4414. <div style="margin: 5px 0">英语口语</div>
  4415. </div>
  4416. <div class="noCTool">
  4417. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4418. </div>
  4419. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4420. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4421. </div>
  4422. </div>
  4423. <!-- <div class="tool">
  4424. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4425. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4426. <div style="margin: 5px 0">翻译</div>
  4427. </div>
  4428. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4429. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4430. <div class="checkDiv" v-else>
  4431. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4432. </div>
  4433. </div>
  4434. </div>
  4435. <div class="tool">
  4436. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4437. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4438. <div style="margin: 5px 0">魔盒识字</div>
  4439. </div>
  4440. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4441. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4442. <div class="checkDiv" v-else>
  4443. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4444. </div>
  4445. </div>
  4446. </div>
  4447. <div class="tool">
  4448. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4449. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4450. <div style="margin: 5px 0">24点</div>
  4451. </div>
  4452. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4453. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4454. <div class="checkDiv" v-else>
  4455. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4456. </div>
  4457. </div>
  4458. </div>
  4459. <div class="tool">
  4460. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4461. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4462. <div style="margin: 5px 0">数学画板</div>
  4463. </div>
  4464. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4465. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4466. <div class="checkDiv" v-else>
  4467. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4468. </div>
  4469. </div>
  4470. </div>
  4471. <div class="tool">
  4472. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4473. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4474. <div style="margin: 5px 0">GeoGebra</div>
  4475. </div>
  4476. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4477. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4478. <div class="checkDiv" v-else>
  4479. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4480. </div>
  4481. </div>
  4482. </div>
  4483. <div class="tool">
  4484. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4485. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4486. <div style="margin: 5px 0">模拟驾驶</div>
  4487. </div>
  4488. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4489. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4490. <div class="checkDiv" v-else>
  4491. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4492. </div>
  4493. </div>
  4494. </div>
  4495. <div class="tool">
  4496. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4497. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4498. <div style="margin: 5px 0">路径搜索</div>
  4499. </div>
  4500. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4501. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4502. <div class="checkDiv" v-else>
  4503. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4504. </div>
  4505. </div>
  4506. </div>
  4507. <div class="tool">
  4508. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4509. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4510. <div style="margin: 5px 0">深度学习</div>
  4511. </div>
  4512. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4513. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4514. <div class="checkDiv" v-else>
  4515. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4516. </div>
  4517. </div>
  4518. </div>
  4519. <div class="tool">
  4520. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4521. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4522. <div style="margin: 5px 0">全历史</div>
  4523. </div>
  4524. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4525. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4526. <div class="checkDiv" v-else>
  4527. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4528. </div>
  4529. </div>
  4530. </div>
  4531. </div>
  4532. <div class="toolSort" v-if="itemTool.toolType == 4">
  4533. <div class="tool">
  4534. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4535. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4536. <div style="margin: 5px 0">课程设计</div>
  4537. </div>
  4538. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4539. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4540. <div class="checkDiv" v-else>
  4541. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4542. </div>
  4543. </div>
  4544. </div>
  4545. <div class="tool">
  4546. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4547. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4548. <div style="margin: 5px 0">目标管理</div>
  4549. </div>
  4550. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4551. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4552. <div class="checkDiv" v-else>
  4553. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4554. </div>
  4555. </div>
  4556. </div> -->
  4557. <!-- <div class="tool">
  4558. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4559. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4560. <div style="margin: 5px 0">汉字宫</div>
  4561. </div>
  4562. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4563. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4564. <div class="checkDiv" v-else>
  4565. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4566. </div>
  4567. </div>
  4568. </div> -->
  4569. </div>
  4570. </div>
  4571. <!-- v-show="!itemTool.isFold3" -->
  4572. <div class="op_tool_box"
  4573. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4574. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4575. class="binfo_input" style="
  4576. margin: 0 0 20px 0;
  4577. width: 100% !important;
  4578. " v-model="itemTool.toolDetail"></textarea>
  4579. <div class="op_box">
  4580. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4581. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4582. <div class="r_pub_button_op"
  4583. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4584. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4585. 智能优化</div>
  4586.                              
  4587. </el-tooltip>
  4588. </div>
  4589. </div>
  4590. </div>
  4591. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4592. <div class="addToolImg">
  4593. <img src="../../../assets/icon/add.png" alt />
  4594. </div>
  4595. <div>添加工具</div>
  4596. </div> -->
  4597. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4598. margin: 0 auto;
  4599. padding: 0 30px;
  4600. height: 45px;
  4601. ">
  4602. 添加工具
  4603. </button>
  4604. </div>
  4605. </div>
  4606. <div v-else-if="
  4607. unitJson[unitIndex].easy == 2 ||
  4608. unitJson[unitIndex].easy == 4
  4609. " class="toolChoose" style="padding: 0 0 40px">
  4610. <div class="tools">
  4611. <div class="leftTools" style="width: 100%" v-for="(
  4612. itemTool, toolIndex
  4613. ) in itemTask.toolChoose" :key="toolIndex">
  4614. <div>
  4615. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4616. margin: 0 0 20px 0;
  4617. width: 100% !important;
  4618. " v-model="itemTool.toolDetail"></textarea>
  4619. </div>
  4620. <div style="
  4621. display: flex;
  4622. flex-direction: row;
  4623. align-items: baseline;
  4624. flex-wrap: nowrap;
  4625. justify-content: flex-start;
  4626. position: relative;
  4627. ">
  4628. <div style="margin-right: 20px; font-weight: bold"
  4629. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4630. 工具 {{ toolIndex + 1 }} :
  4631. </div>
  4632. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4633. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4634. </div>
  4635. <div style="min-height: 163px">
  4636. <div class="toolSort">
  4637. <div class="tool">
  4638. <div class="whiteBIcon" @click="
  4639. openTools(itemTaskIndex, 1, toolIndex)
  4640. ">
  4641. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4642. <div style="margin: 5px 0">电子白板</div>
  4643. </div>
  4644. <div class="check" @click="
  4645. addTools(1, itemTaskIndex, toolIndex)
  4646. ">
  4647. <img src="../../../assets/icon/checkNo.png" alt
  4648. v-if="itemTool.tool.indexOf(1) == -1" />
  4649. <div class="checkDiv" v-else>
  4650. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4651. </div>
  4652. </div>
  4653. </div>
  4654. <div class="tool">
  4655. <div class="whiteBIcon" @click="
  4656. openTools(itemTaskIndex, 52, toolIndex)
  4657. ">
  4658. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4659. <div style="margin: 5px 0">文档</div>
  4660. </div>
  4661. <div class="check" @click="
  4662. addTools(52, itemTaskIndex, toolIndex)
  4663. ">
  4664. <img src="../../../assets/icon/checkNo.png" alt
  4665. v-if="itemTool.tool.indexOf(52) == -1" />
  4666. <div class="checkDiv" v-else>
  4667. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4668. </div>
  4669. </div>
  4670. </div>
  4671. <div class="tool">
  4672. <div class="whiteBIcon" @click="
  4673. openTools(itemTaskIndex, 3, toolIndex)
  4674. ">
  4675. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4676. <div style="margin: 5px 0">思维导图</div>
  4677. </div>
  4678. <div class="check" @click="
  4679. addTools(3, itemTaskIndex, toolIndex)
  4680. ">
  4681. <img src="../../../assets/icon/checkNo.png" alt
  4682. v-if="itemTool.tool.indexOf(3) == -1" />
  4683. <div class="checkDiv" v-else>
  4684. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4685. </div>
  4686. </div>
  4687. </div>
  4688. <div class="tool">
  4689. <div class="whiteBIcon" @click="
  4690. openTools(itemTaskIndex, 4, toolIndex)
  4691. ">
  4692. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4693. <div style="margin: 5px 0">问卷调查</div>
  4694. </div>
  4695. <div class="check" @click="
  4696. addTools(4, itemTaskIndex, toolIndex)
  4697. ">
  4698. <img src="../../../assets/icon/checkNo.png" alt
  4699. v-if="itemTool.tool.indexOf(4) == -1" />
  4700. <div class="checkDiv" v-else>
  4701. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4702. </div>
  4703. </div>
  4704. </div>
  4705. <div class="tool">
  4706. <div class="whiteBIcon" @click="
  4707. openTools(itemTaskIndex, 45, toolIndex)
  4708. ">
  4709. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4710. <div style="margin: 5px 0">选择题</div>
  4711. </div>
  4712. <div class="check" @click="
  4713. addTools(45, itemTaskIndex, toolIndex)
  4714. ">
  4715. <img src="../../../assets/icon/checkNo.png" alt
  4716. v-if="itemTool.tool.indexOf(45) == -1" />
  4717. <div class="checkDiv" v-else>
  4718. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4719. </div>
  4720. </div>
  4721. </div>
  4722. <div class="tool">
  4723. <div class="whiteBIcon" @click="
  4724. openTools(itemTaskIndex, 15, toolIndex)
  4725. ">
  4726. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4727. <div style="margin: 5px 0">问答</div>
  4728. </div>
  4729. <div class="check" @click="
  4730. addTools(15, itemTaskIndex, toolIndex)
  4731. ">
  4732. <img src="../../../assets/icon/checkNo.png" alt
  4733. v-if="itemTool.tool.indexOf(15) == -1" />
  4734. <div class="checkDiv" v-else>
  4735. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4736. </div>
  4737. </div>
  4738. </div>
  4739. <div class="tool">
  4740. <div class="whiteBIcon" @click="
  4741. addTools(16, itemTaskIndex, toolIndex)
  4742. ">
  4743. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4744. <div style="margin: 5px 0">作业提交</div>
  4745. </div>
  4746. <div class="check" @click="
  4747. addTools(16, itemTaskIndex, toolIndex)
  4748. ">
  4749. <img src="../../../assets/icon/checkNo.png" alt
  4750. v-if="itemTool.tool.indexOf(16) == -1" />
  4751. <div class="checkDiv" v-else>
  4752. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4753. </div>
  4754. </div>
  4755. </div>
  4756. <div class="tool">
  4757. <div class="whiteBIcon" @click="
  4758. openTools(itemTaskIndex, 50, toolIndex)
  4759. ">
  4760. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4761. <div style="margin: 5px 0">批量上传</div>
  4762. </div>
  4763. <div class="check" @click="
  4764. addTools(50, itemTaskIndex, toolIndex)
  4765. ">
  4766. <img src="../../../assets/icon/checkNo.png" alt
  4767. v-if="itemTool.tool.indexOf(50) == -1" />
  4768. <div class="checkDiv" v-else>
  4769. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4770. </div>
  4771. </div>
  4772. </div>
  4773. <div class="tool">
  4774. <div class="whiteBIcon" @click="
  4775. openTools(itemTaskIndex, 41, toolIndex)
  4776. ">
  4777. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4778. <div style="margin: 5px 0">选择匹配</div>
  4779. </div>
  4780. <div class="check" @click="
  4781. addTools(41, itemTaskIndex, toolIndex)
  4782. ">
  4783. <img src="../../../assets/icon/checkNo.png" alt
  4784. v-if="itemTool.tool.indexOf(41) == -1" />
  4785. <div class="checkDiv" v-else>
  4786. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4787. </div>
  4788. </div>
  4789. </div>
  4790. <div class="tool">
  4791. <div class="whiteBIcon" @click="
  4792. openTools(itemTaskIndex, 47, toolIndex)
  4793. ">
  4794. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4795. <div style="margin: 5px 0">排序</div>
  4796. </div>
  4797. <div class="check" @click="
  4798. addTools(47, itemTaskIndex, toolIndex)
  4799. ">
  4800. <img src="../../../assets/icon/checkNo.png" alt
  4801. v-if="itemTool.tool.indexOf(47) == -1" />
  4802. <div class="checkDiv" v-else>
  4803. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4804. </div>
  4805. </div>
  4806. </div>
  4807. <div class="tool">
  4808. <div class="whiteBIcon" @click="
  4809. openTools(itemTaskIndex, 48, toolIndex)
  4810. ">
  4811. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4812. <div style="margin: 5px 0">表格</div>
  4813. </div>
  4814. <div class="check" @click="
  4815. addTools(48, itemTaskIndex, toolIndex)
  4816. ">
  4817. <img src="../../../assets/icon/checkNo.png" alt
  4818. v-if="itemTool.tool.indexOf(48) == -1" />
  4819. <div class="checkDiv" v-else>
  4820. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4821. </div>
  4822. </div>
  4823. </div>
  4824. </div>
  4825. </div>
  4826. </div>
  4827. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4828. <div class="addToolImg">
  4829. <img src="../../../assets/icon/add.png" alt />
  4830. </div>
  4831. <div>添加工具</div>
  4832. </div> -->
  4833. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4834. style="margin: 35px auto 20px">
  4835. 添加工具
  4836. </button>
  4837. </div>
  4838. </div>
  4839. <div v-else-if="
  4840. unitJson[unitIndex].easy == 1 ||
  4841. (unitJson[unitIndex].easy == 5 &&
  4842. itemTask.taskType == 2)
  4843. " class="toolChoose" style="padding: 0 0 40px">
  4844. <div class="tools">
  4845. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4846. itemTool, toolIndex
  4847. ) in itemTask.toolChoose" :key="toolIndex">
  4848. <div style="min-height: 163px">
  4849. <div class="toolSort">
  4850. <div class="tool">
  4851. <div class="whiteBIcon" @click="
  4852. openTools(itemTaskIndex, 50, toolIndex)
  4853. ">
  4854. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4855. <div style="margin: 5px 0">批量上传</div>
  4856. </div>
  4857. <div class="check" @click="
  4858. addTools(50, itemTaskIndex, toolIndex)
  4859. ">
  4860. <img src="../../../assets/icon/checkNo.png" alt
  4861. v-if="itemTool.tool.indexOf(50) == -1" />
  4862. <div class="checkDiv" v-else>
  4863. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4864. </div>
  4865. </div>
  4866. </div>
  4867. </div>
  4868. </div>
  4869. </div>
  4870. </div>
  4871. </div>
  4872. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4873. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  4874. <div class="elist_title">
  4875. <div style="
  4876. display: flex;
  4877. flex-direction: row;
  4878. align-items: center;
  4879. margin: 20px 0;
  4880. ">
  4881. <div class="lineTitle clineTitle">评价设置</div>
  4882. <div style="margin-left:auto;display: flex;">
  4883. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4884. <div class="r_pub_button_op"
  4885. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4886. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4887. </el-tooltip>
  4888. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4889. <div class="r_pub_button_op" style="margin-left:10px;"
  4890. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4891. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4892. </el-tooltip>
  4893. </div>
  4894. <!-- <div class="line" style="width: 90%"></div> -->
  4895. </div>
  4896. </div>
  4897. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  4898. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  4899. 上传补充资料
  4900. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  4901. beforeUploadInfo2(
  4902. $event,
  4903. 18,
  4904. itemTaskIndex
  4905. )
  4906. " />
  4907. </button>
  4908. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  4909. <div class="add_chapters_box add_c_none" v-if="
  4910. pingjiaInfoData[itemTaskIndex] &&
  4911. pingjiaInfoData[itemTaskIndex].length == 0
  4912. ">
  4913. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  4914. </div>
  4915. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  4916. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  4917. getChapterData(
  4918. $event,
  4919. index1,
  4920. item1.type
  4921. )
  4922. " >
  4923. <div class="chapter_upload_o" style="
  4924. position: relative;
  4925. display: flex;
  4926. align-items: center;
  4927. ">
  4928. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  4929. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  4930. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  4931. </div>
  4932. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  4933. </div>
  4934. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  4935. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  4936. </div>
  4937. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  4938. </div>
  4939. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  4940. </div>
  4941. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  4942. </div>
  4943. </div>
  4944. <div class="chapter_upload_n">
  4945. <input readonly="true" v-if="
  4946. item1.type == 2 ||
  4947. item1.type == 3 ||
  4948. item1.type == 12 ||
  4949. item1.type == 13 ||
  4950. item1.type == 7
  4951. " :placeholder="item1.name" @click.stop="
  4952. checkChpater3($event, index1, item1)
  4953. " style="
  4954. border: none;
  4955. outline: none;
  4956. width: 80%;
  4957. minwidth: 215px;
  4958. z-index: 99;
  4959. font-size: 14px;
  4960. white-space: nowrap;
  4961. overflow: hidden;
  4962. text-overflow: ellipsis;
  4963. " />
  4964. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  4965. border: none;
  4966. outline: none;
  4967. width: 80%;
  4968. white-space: nowrap;
  4969. overflow: hidden;
  4970. text-overflow: ellipsis;
  4971. " readonly="true" @click="
  4972. selectAttText(index1)
  4973. " />
  4974. <input :placeholder="item1.title ? item1.title : '链接'
  4975. " v-if="item1.type == 8" style="
  4976. border: none;
  4977. outline: none;
  4978. width: 80%;
  4979. white-space: nowrap;
  4980. overflow: hidden;
  4981. text-overflow: ellipsis;
  4982. " readonly="true" @click="selectLine(index1)" />
  4983. <input :placeholder="item1.title ? item1.title : '链接'
  4984. " v-if="item1.type == 14" style="
  4985. border: none;
  4986. outline: none;
  4987. width: 80%;
  4988. white-space: nowrap;
  4989. overflow: hidden;
  4990. text-overflow: ellipsis;
  4991. " readonly="true" @click="
  4992. openUpdateSource(index1)
  4993. " />
  4994. </div>
  4995. <div class="chapter_upload_ic">
  4996. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  4997. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  4998. checkChpater3($event, index1, item1)
  4999. ">
  5000. <div></div>
  5001. </div>
  5002. <div class="chapter_upload_ic_r" @click.stop="
  5003. deletepingjiaInfoData(
  5004. $event,
  5005. index1,
  5006. itemTaskIndex
  5007. )
  5008. ">
  5009. <div></div>
  5010. </div>
  5011. </div>
  5012. </div>
  5013. </div>
  5014. </div>
  5015. </div>
  5016. <div v-if="
  5017. pingjiainfoproVisible[itemTaskIndex]
  5018. " class="mask">
  5019. <div class="progressBox">
  5020. <div class="lbox">
  5021. <img src="../../../assets/loading.gif" />上传中,请稍后
  5022. </div>
  5023. <div style="margin-bottom: 10px">
  5024. <span>{{
  5025. pingjiainfoisFinishSize[itemTaskIndex]
  5026. }}</span>
  5027. /
  5028. <span>{{
  5029. pingjiainfoisAllSize[itemTaskIndex]
  5030. }}</span>
  5031. </div>
  5032. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5033. ? pingjiainfoprogress[itemTaskIndex]
  5034. : 0
  5035. " style="width: 80%"></el-progress> -->
  5036. </div>
  5037. </div>
  5038. </div>
  5039. <div class="mbCss">
  5040. <div class="pjCss" :style="{
  5041. width: itemTask.isEvaFold
  5042. ? 'calc(100% - 55%)'
  5043. : 'calc(100% - 120px)',
  5044. }">
  5045. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5046. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5047. <div class="elist_inptu_text">
  5048. <span>目标:</span>
  5049. <!-- <span>核心素养:</span> -->
  5050. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5051. <el-switch
  5052. @change="forceUpdate"
  5053. class="rateSwitch"
  5054. style="margin-left: auto;"
  5055. v-model="itemTask.eList[eIndex].isai"
  5056. active-color="#0061FF"
  5057. active-text="AI评分"
  5058. inactive-text=""
  5059. active-value="1"
  5060. inactive-value="2">
  5061. </el-switch>
  5062. </div>
  5063. <div class="elist_inptu_text" v-show="false">
  5064. <!-- <span>评价维度:</span> -->
  5065. <span>能力:</span>
  5066. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5067. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5068. <!-- </el-tooltip> -->
  5069. <!-- <span>评星等级:</span>
  5070. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5071. disabled></el-rate> -->
  5072. <div class="remove" @click="
  5073. deletEList(
  5074. unitIndex,
  5075. itemTaskIndex,
  5076. eIndex
  5077. )
  5078. "></div>
  5079. </div>
  5080. <div class="elist_inptu_text">
  5081. <!-- <span>维度描述:</span> -->
  5082. <span>评价标准:</span>
  5083. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5084. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5085. <div class="remove" @click="
  5086. deletEList(
  5087. unitIndex,
  5088. itemTaskIndex,
  5089. eIndex
  5090. )
  5091. "></div>
  5092. <!-- </el-tooltip> -->
  5093. </div>
  5094. <div class="elist_inptu_text" v-if="evalua">
  5095. <span>目标:</span>
  5096. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5097. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5098. @change="forceUpdate()">
  5099. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5100. :value="e.name">
  5101. </el-option>
  5102. </el-select> -->
  5103. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5104. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5105. </div>
  5106. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5107. <span>评价细则:</span>
  5108. <div style="width: calc(100%);">
  5109. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5110. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5111. <div class="ruleBtn"
  5112. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5113. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5114. </el-tooltip>
  5115. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5116. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5117. <div class="op_box">
  5118. <div class="op_remark"></div>
  5119. <div style="display: flex;">
  5120. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5121. <div class="r_pub_button_op"
  5122. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5123. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5124. </el-tooltip>
  5125. </div>
  5126. </div>
  5127. </div>
  5128. </div>
  5129. </div>
  5130. </div>
  5131. </div>
  5132. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5133. style="margin: 35px 35px 0 0">
  5134. <div class="addToolImg">
  5135. <img src="../../../assets/icon/add.png" alt />
  5136. </div>
  5137. <div>添加</div>
  5138. </div> -->
  5139. <div class="eva_btn_box">
  5140. <div class="eva_btn_left_box">
  5141. <button class="c_pub_button_add pub_btn_eval_img"
  5142. @click="addEList(unitIndex, itemTaskIndex)">
  5143. 添加
  5144. </button>
  5145. <button class="c_pub_button_add pub_btn_eval_source_img"
  5146. @click="openEList(unitIndex, itemTaskIndex)">
  5147. 资源
  5148. </button>
  5149. </div>
  5150. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5151. v-if="itemTask.eList && itemTask.eList.length">
  5152. 添加资源模板
  5153. </button>
  5154. </div>
  5155. </div>
  5156. <div v-if="evalua" style="
  5157. border: 1px solid #e5e5e5;
  5158. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5159. " :style="{
  5160. width: itemTask.isEvaFold ? '55%' : '116px',
  5161. }" class="evaCss">
  5162. <!-- <div class="e_add_top">
  5163. <div class="e_add_title">
  5164. <span>当前使用目标管理</span>
  5165. <span>{{ eTitle }}</span>
  5166. <img src="../../../assets/line.png" class="cru_line" style="
  5167. width: 125px;
  5168. height: 20px;
  5169. bottom: -10px;
  5170. left: 155px;
  5171. " />
  5172. </div>
  5173. </div> -->
  5174. <div class="e_add_content" style="width: 100%">
  5175. <div class="e_add_list_pbox" style="width: 100%">
  5176. <div class="e_add_list_pbox_title">
  5177. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5178. <div class="type_content" v-if="itemTask.isEvaFold">
  5179. <span :class="{ active: typeMode == 1 }"
  5180. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5181. <span :class="{ active: typeMode == 2 }"
  5182. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5183. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5184. </div>
  5185. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5186. @click="foldEva(itemTaskIndex)">
  5187. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5188. </div>
  5189. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5190. @click="foldEva(itemTaskIndex)">
  5191. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5192. </div>
  5193. </div>
  5194. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5195. style="min-height: 200px">
  5196. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5197. " v-if="typeMode == 1"></Mind>
  5198. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5199. </Sunburst>
  5200. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5201. v-if="typeMode == 3"></SeeBoard>
  5202. </div>
  5203. </div>
  5204. </div>
  5205. </div>
  5206. </div>
  5207. </div>
  5208. <div class="funBlock" style="padding: 0">
  5209. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5210. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5211. <div>
  5212. {{
  5213. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5214. }}
  5215. </div>
  5216. </div>
  5217. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5218. <div>展开</div>
  5219. <div class="arrow">
  5220. <img src="../../../assets/icon/expand.png" alt />
  5221. </div>
  5222. </div> -->
  5223. </div>
  5224. </div>
  5225. </div>
  5226. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5227. <!-- <div>
  5228. <img src="../../../../assets/icon/new/addStage.png" alt />
  5229. <span>添加任务</span>
  5230. </div> -->
  5231. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5232. 添加任务
  5233. </button>
  5234. </div>
  5235. </div>
  5236. <div class="info_btnBox3">
  5237. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5238. goTo(
  5239. '/course?userid=' +
  5240. userid +
  5241. '&oid=' +
  5242. oid +
  5243. '&org=' +
  5244. org +
  5245. '&role=' +
  5246. role
  5247. )
  5248. ">
  5249. 返回课程
  5250. </button>
  5251. <button class="c_pub_button_return pub_btn_last_img"
  5252. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5253. {{ steps == 4 ? "返回课程" : "上一步" }}
  5254. </button>
  5255. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5256. pub_btn_next_img: steps != 3,
  5257. pub_btn_finish_img: steps == 3,
  5258. }">
  5259. {{ steps == 3 ? "确认上传" : "下一步" }}
  5260. </button>
  5261. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5262. '修改模板' : '保存模板'}}</button>
  5263. </div>
  5264. </div>
  5265. </div>
  5266. </div>
  5267. </div>
  5268. <div style="
  5269. width: calc(100% - 20px);
  5270. background: rgb(255, 255, 255);
  5271. border-radius: 10px;
  5272. " v-if="steps == 4">
  5273. <div class="basic_box_success">
  5274. <div class="right_img">
  5275. <img src="../../../assets/icon/right.png" alt />
  5276. </div>
  5277. <div style="font-weight: bold">成功</div>
  5278. <!-- <div>您的课程编号</div>
  5279. <div class="number">{{ number }}</div>-->
  5280. <!-- <div class="success_button">
  5281. <div class="look_course" @click="isNoFinsh">
  5282. 邀请老师协同编辑
  5283. </div>
  5284. <div class="attend_others" @click="goCourse">预览课程</div>
  5285. </div> -->
  5286. </div>
  5287. </div>
  5288. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5289. @mouseleave="btnDisplay(false)" v-if="false">
  5290. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5291. goTo(
  5292. '/course?userid=' +
  5293. userid +
  5294. '&oid=' +
  5295. oid +
  5296. '&org=' +
  5297. org +
  5298. '&role=' +
  5299. role
  5300. )
  5301. ">
  5302. 返回课程
  5303. </button>
  5304. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5305. @click="lastSteps">
  5306. {{ steps == 4 ? "返回课程" : "上一步" }}
  5307. </button>
  5308. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5309. pub_btn_next_img: steps != 3,
  5310. pub_btn_finish_img: steps == 3,
  5311. }">
  5312. {{ steps == 3 ? "确认上传" : "下一步" }}
  5313. </button>
  5314. </div>
  5315. </div>
  5316. </div>
  5317. <div class="leftBar" v-if="istemplate == 1">
  5318. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5319. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5320. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5321. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5322. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5323. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5324. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5325. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5326. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5327. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5328. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5329. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5330. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5331. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5332. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5333. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5334. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5335. @setAiJson="setAiJson" /> -->
  5336. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5337. @setAiJson="setAiJson" />
  5338. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5339. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5340. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5341. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5342. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5343. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5344. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5345. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5346. </div>
  5347. </div>
  5348. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5349. class="dialog_diy2 customWidth">
  5350. <div>请复制该链接邀请协同编辑</div>
  5351. <div>http://www.boomyon.com/index-zhang.com</div>
  5352. <span slot="footer" class="dialog-footer">
  5353. <el-button type="primary">复制链接分享</el-button>
  5354. <el-button @click="dialogVisible = false">取消</el-button>
  5355. </span>
  5356. </el-dialog>
  5357. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5358. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5359. <el-form>
  5360. <el-form-item label="文档标题">
  5361. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5362. </el-form-item>
  5363. <div>文档简介</div>
  5364. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5365. </el-form>
  5366. <span slot="footer" class="dialog-footer">
  5367. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5368. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5369. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5370. </span>
  5371. </el-dialog>
  5372. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5373. :before-close="handleClose" class="dialog_diy">
  5374. <el-form>
  5375. <el-form-item label="文档标题">
  5376. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5377. </el-form-item>
  5378. <div>文档内容</div>
  5379. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5380. </el-form>
  5381. <span slot="footer" class="dialog-footer">
  5382. <el-button @click="clearChoose">取 消</el-button>
  5383. <el-button type="primary" @click="wordNext()">确定</el-button>
  5384. </span>
  5385. </el-dialog>
  5386. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5387. :before-close="handleClose" class="dialog_diy">
  5388. <el-form>
  5389. <el-form-item label="文本标题">
  5390. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5391. placeholder="请输入文本标题..."></el-input>
  5392. </el-form-item>
  5393. <!-- <div>富文本内容</div> -->
  5394. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5395. </el-form>
  5396. <span slot="footer" class="dialog-footer">
  5397. <el-button @click="clearAttText">取 消</el-button>
  5398. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5399. </span>
  5400. </el-dialog>
  5401. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5402. :before-close="handleClose" class="dialog_diy lineCss">
  5403. <el-form>
  5404. <el-form-item label="标题" :label-width="formLabelWidth">
  5405. <span>
  5406. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5407. </span>
  5408. </el-form-item>
  5409. <el-form-item label="链接" :label-width="formLabelWidth">
  5410. <span>
  5411. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5412. </span>
  5413. </el-form-item>
  5414. </el-form>
  5415. <span slot="footer" class="dialog-footer">
  5416. <el-button @click="clearLine">取 消</el-button>
  5417. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5418. </span>
  5419. </el-dialog>
  5420. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5421. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5422. <div>
  5423. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5424. </div>
  5425. <span slot="footer" class="dialog-footer">
  5426. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5427. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5428. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5429. </span>
  5430. </el-dialog>
  5431. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5432. :before-close="handleClose" class="addNewPP customWidth">
  5433. <div class="people">
  5434. <div class="people_top">
  5435. <div class="people_nav">选择成员</div>
  5436. <div class="people_top_right">
  5437. <div class="people_search">
  5438. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5439. <div class="search_img" @click="searchStudent">
  5440. <img src="../../../assets/icon/search.png" alt />
  5441. </div>
  5442. </div>
  5443. </div>
  5444. </div>
  5445. <el-checkbox-group v-model="checkboxList" class="people_name">
  5446. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5447. "暂无学生可选" }}</el-checkbox>
  5448. </el-checkbox-group>
  5449. </div>
  5450. <span slot="footer" class="dialog-footer">
  5451. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5452. <el-button type="primary" @click="isAddPP">确定</el-button>
  5453. </span>
  5454. </el-dialog>
  5455. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5456. :before-close="handleClose" class="addNewPP2">
  5457. <div class="check_classBox">
  5458. <div class="check_class_right">
  5459. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5460. 全部
  5461. </div>
  5462. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5463. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5464. {{ item.name }}
  5465. </div>
  5466. </el-tooltip>
  5467. </div>
  5468. <div class="check_class_left">
  5469. <div class="check_class_all_box">
  5470. <div class="check_class_left_title">选择班级</div>
  5471. <div style="display: flex; align-items: center; margin-left: auto">
  5472. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5473. </div>
  5474. </div>
  5475. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5476. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5477. </div> -->
  5478. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5479. v-if="grade2.length">
  5480. <div v-for="item in grade2" :key="item.id" class="class_item">
  5481. <el-checkbox :label="item.id">
  5482. {{ item.name }}
  5483. </el-checkbox>
  5484. </div>
  5485. </el-checkbox-group>
  5486. <div v-if="!grade2.length">暂无数据</div>
  5487. </div>
  5488. </div>
  5489. <span slot="footer" class="dialog-footer">
  5490. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5491. <el-button type="primary" @click="isAddClass">确定</el-button>
  5492. </span>
  5493. </el-dialog>
  5494. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5495. :before-close="handleClose" class="addNewPP customWidth">
  5496. <div style="display: flex;justify-content: space-between;">
  5497. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5498. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5499. 全部
  5500. </div>
  5501. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5502. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5503. <el-tooltip placement="top" :content="i.name">
  5504. <span>{{i.name}}</span>
  5505. </el-tooltip>
  5506. </div>
  5507. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5508. 其他
  5509. </div>
  5510. </div>
  5511. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5512. <div class="people">
  5513. <div class="people_top">
  5514. <div class="people_top_right">
  5515. <div class="people_search">
  5516. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5517. <div class="search_img" @click="getTeacher(collid)">
  5518. <img src="../../../assets/icon/search.png" alt />
  5519. </div>
  5520. </div>
  5521. </div>
  5522. <div class="people_nav" style="display: flex; align-items: center">
  5523. <div class="check_class_left_title">选择成员</div>
  5524. <div style="display: flex; align-items: center; margin-left: auto">
  5525. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5526. </div>
  5527. </div>
  5528. </div>
  5529. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5530. @change="InviteChange2">
  5531. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5532. <div class="t_j_box">
  5533. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5534. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5535. </el-tooltip>
  5536. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5537. <span>{{ item.username.split('@')[0] }}</span>
  5538. </el-tooltip>
  5539. <el-tooltip placement="top" :content="item.school">
  5540. <span>{{ item.school }}</span>
  5541. </el-tooltip>
  5542. </div>
  5543. </el-checkbox>
  5544. </el-checkbox-group>
  5545. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5546. </div>
  5547. </div>
  5548. </div>
  5549. <span slot="footer" class="dialog-footer">
  5550. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5551. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5552. </span>
  5553. </el-dialog>
  5554. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5555. closePan(4);
  5556. }
  5557. " class="dialog_diy fullStyle">
  5558. <div style="height: 100%">
  5559. <div class="a_add_title" style="
  5560. display: flex;
  5561. flex-direction: row;
  5562. align-items: center;
  5563. justify-content: center;
  5564. ">
  5565. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5566. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5567. </div>
  5568. <div class="a_addBox" style="height: calc(100% - 50px)">
  5569. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5570. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5571. <div class="a_add_checkType">
  5572. <span :class="{
  5573. active:
  5574. askJson.askJson[index1].type == '1' ||
  5575. !askJson.askJson[index1].type,
  5576. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5577. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5578. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5579. </div>
  5580. <div class="a_add_head">
  5581. <div style="
  5582. display: flex;
  5583. align-items: center;
  5584. width: 100%;
  5585. margin-right: 20px;
  5586. ">
  5587. <span style="min-width: fit-content">{{
  5588. index1 + 1 + "、"
  5589. }}</span>
  5590. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5591. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5592. $forceUpdate();
  5593. }
  5594. "></textarea>
  5595. </div>
  5596. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5597. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5598. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5599. </div>
  5600. <div class="a_add_head_div">
  5601. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5602. </el-button>
  5603. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5604. </div>
  5605. </div>
  5606. <div class="a_add_body">
  5607. <div class="a_add_input" style="flex-direction: column">
  5608. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5609. margin: 20px 10px 0 0;
  5610. display: flex;
  5611. align-items: center;
  5612. position: relative;
  5613. ">
  5614. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5615. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5616. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5617. @change="() => {
  5618. $forceUpdate();
  5619. }
  5620. "></textarea>
  5621. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5622. v-if="askJson.askJson[index1].askItem != 1">
  5623. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5624. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5625. </div>
  5626. <div class="a_add_body_div">
  5627. <el-button type="primary" size="small"
  5628. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5629. <el-button type="primary" size="small" @click="
  5630. deletecheckList(askJson.askJson[index1], checkIndex)
  5631. " v-if="askJson.askJson[index1].askItem != 1">删除
  5632. </el-button>
  5633. </div>
  5634. </div>
  5635. </div>
  5636. <!-- <div class="a_add_body_div">
  5637. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5638. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5639. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5640. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5641. </el-button>
  5642. </div> -->
  5643. </div>
  5644. </div>
  5645. </div>
  5646. </div>
  5647. <span slot="footer" class="dialog-footer">
  5648. <el-button @click="closePan(4)">取 消</el-button>
  5649. <el-button type="primary" @click="addAsk">确 定</el-button>
  5650. </span>
  5651. </el-dialog>
  5652. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5653. closePan(45);
  5654. }
  5655. " class="dialog_diy fullStyle">
  5656. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5657. <!-- <div class="a_add_title" style="
  5658. display: flex;
  5659. flex-direction: row;
  5660. align-items: center;
  5661. justify-content: center;
  5662. ">
  5663. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5664. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5665. </div> -->
  5666. <div class="a_addBox" style="height: 100%">
  5667. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5668. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5669. 上传补充资料
  5670. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5671. beforeUploadInfo2(
  5672. $event,
  5673. 17
  5674. )
  5675. " />
  5676. </button>
  5677. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5678. <div class="add_chapters_box add_c_none" v-if="
  5679. xuanzeInfoData &&
  5680. xuanzeInfoData.length == 0
  5681. ">
  5682. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5683. </div>
  5684. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5685. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5686. getChapterData(
  5687. $event,
  5688. index1,
  5689. item1.type
  5690. )
  5691. " >
  5692. <div class="chapter_upload_o" style="
  5693. position: relative;
  5694. display: flex;
  5695. align-items: center;
  5696. ">
  5697. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5698. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5699. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5700. </div>
  5701. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5702. </div>
  5703. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5704. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5705. </div>
  5706. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5707. </div>
  5708. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5709. </div>
  5710. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5711. </div>
  5712. </div>
  5713. <div class="chapter_upload_n">
  5714. <input readonly="true" v-if="
  5715. item1.type == 2 ||
  5716. item1.type == 3 ||
  5717. item1.type == 12 ||
  5718. item1.type == 13 ||
  5719. item1.type == 7
  5720. " :placeholder="item1.name" @click.stop="
  5721. checkChpater3($event, index1, item1)
  5722. " style="
  5723. border: none;
  5724. outline: none;
  5725. width: 80%;
  5726. minwidth: 215px;
  5727. z-index: 99;
  5728. font-size: 14px;
  5729. white-space: nowrap;
  5730. overflow: hidden;
  5731. text-overflow: ellipsis;
  5732. " />
  5733. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5734. border: none;
  5735. outline: none;
  5736. width: 80%;
  5737. white-space: nowrap;
  5738. overflow: hidden;
  5739. text-overflow: ellipsis;
  5740. " readonly="true" @click="
  5741. selectAttText(index1)
  5742. " />
  5743. <input :placeholder="item1.title ? item1.title : '链接'
  5744. " v-if="item1.type == 8" style="
  5745. border: none;
  5746. outline: none;
  5747. width: 80%;
  5748. white-space: nowrap;
  5749. overflow: hidden;
  5750. text-overflow: ellipsis;
  5751. " readonly="true" @click="selectLine(index1)" />
  5752. <input :placeholder="item1.title ? item1.title : '链接'
  5753. " v-if="item1.type == 14" style="
  5754. border: none;
  5755. outline: none;
  5756. width: 80%;
  5757. white-space: nowrap;
  5758. overflow: hidden;
  5759. text-overflow: ellipsis;
  5760. " readonly="true" @click="
  5761. openUpdateSource(index1)
  5762. " />
  5763. </div>
  5764. <div class="chapter_upload_ic">
  5765. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5766. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5767. checkChpater3($event, index1, item1)
  5768. ">
  5769. <div></div>
  5770. </div>
  5771. <div class="chapter_upload_ic_r" @click.stop="
  5772. deletexuanzeInfoData(
  5773. $event,
  5774. index1
  5775. )
  5776. ">
  5777. <div></div>
  5778. </div>
  5779. </div>
  5780. </div>
  5781. </div>
  5782. </div>
  5783. </div>
  5784. <div v-if="
  5785. xuanzeinfoproVisible
  5786. " class="mask">
  5787. <div class="progressBox">
  5788. <div class="lbox">
  5789. <img src="../../../assets/loading.gif" />上传中,请稍后
  5790. </div>
  5791. <div style="margin-bottom: 10px">
  5792. <span>{{
  5793. xuanzeinfoisFinishSize
  5794. }}</span>
  5795. /
  5796. <span>{{
  5797. xuanzeinfoisAllSize
  5798. }}</span>
  5799. </div>
  5800. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  5801. ? xuanzeinfoprogress
  5802. : 0
  5803. " style="width: 80%"></el-progress> -->
  5804. </div>
  5805. </div>
  5806. </div>
  5807. <div style="
  5808. font-size: 16px;
  5809. color: #c7c7c7;
  5810. display: flex;
  5811. align-items: center;
  5812. justify-content: flex-end;
  5813. ">
  5814. <!-- 请输入题目内容 -->
  5815. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5816. 智能生成
  5817. </button>
  5818. <!-- 请输入题目内容 -->
  5819. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5820. v-if="isPasteChoice">
  5821. 智能粘贴
  5822. </button>
  5823. </div>
  5824. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5825. <div class="a_add_checkType">
  5826. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5827. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5828. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5829. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5830. </div>
  5831. <div class="a_add_head">
  5832. <div class="timuUpImg">
  5833. <div style="display: flex; align-items: center">
  5834. <span style="min-width: fit-content">{{
  5835. index1 + 1 + "、"
  5836. }}</span>
  5837. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5838. placeholder="请输入题目">
  5839. </el-input> -->
  5840. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5841. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5842. $forceUpdate();
  5843. }
  5844. "></textarea>
  5845. </div>
  5846. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5847. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5848. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5849. </div>
  5850. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5851. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5852. <input type="file" accept="image/*" style="display: none"
  5853. @change="beforeUploadTiMu($event, index1)" />
  5854. </div>
  5855. </div>
  5856. <div class="a_add_head_div">
  5857. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5858. </el-button>
  5859. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5860. </div>
  5861. </div>
  5862. <div class="timuImgBox" v-if="
  5863. testJson.testJson[index1].timuList &&
  5864. testJson.testJson[index1].timuList.length
  5865. ">
  5866. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5867. @click.stop="previewImg(timg.src)">
  5868. <img :src="timg.src" alt="" />
  5869. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5870. <img src="../../../assets/icon/delete.png" alt="" />
  5871. </div>
  5872. </div>
  5873. </div>
  5874. <div class="a_add_body">
  5875. <div class="a_add_input a_add_input_choice">
  5876. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5877. @change="() => {
  5878. $forceUpdate();
  5879. }
  5880. ">
  5881. <div class="radioBox">
  5882. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5883. .testItem" :key="checkIndex" :label="checkIndex">
  5884. <div style="margin-right: 10px">
  5885. 选项{{ checkIndex + 1 }}
  5886. </div>
  5887. <div style="margin-right: 10px; width: 300px" v-if="
  5888. testJson.testJson[index1].checkList[checkIndex] &&
  5889. testJson.testJson[index1].checkList[checkIndex]
  5890. .imgType &&
  5891. testJson.testJson[index1].checkList[checkIndex]
  5892. .imgType == 1
  5893. ">
  5894. <div class="inImg" @click.stop="
  5895. previewImg(
  5896. testJson.testJson[index1].checkList[checkIndex]
  5897. .src
  5898. )
  5899. ">
  5900. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5901. .src
  5902. " lazy />
  5903. <!-- <img :src="
  5904. testJson.testJson[index1].checkList[checkIndex]
  5905. .src
  5906. " alt="" /> -->
  5907. </div>
  5908. </div>
  5909. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5910. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5911. $forceUpdate();
  5912. }
  5913. "></textarea>
  5914. <div class="xzUpImg" @click.stop="addImg($event)">
  5915. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5916. <input type="file" accept="image/*" style="display: none"
  5917. @change="beforeUploadTi($event, index1, checkIndex)" />
  5918. </div>
  5919. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5920. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5921. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5922. </div>
  5923. <div class="a_add_body_div">
  5924. <el-button type="primary" size="small" @click.stop="
  5925. addTcheckList(testJson.testJson[index1], checkIndex)
  5926. ">添加</el-button>
  5927. <el-button type="primary" size="small" @click.stop="
  5928. deleteTcheckList(
  5929. testJson.testJson[index1],
  5930. checkIndex
  5931. )
  5932. " v-if="testJson.testJson[index1].testItem != 1">删除
  5933. </el-button>
  5934. </div>
  5935. </el-radio>
  5936. </div>
  5937. </el-radio-group>
  5938. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5939. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5940. $forceUpdate();
  5941. }
  5942. ">
  5943. <div class="radioBox">
  5944. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5945. .testItem" :key="checkIndex1" :label="checkIndex1">
  5946. <div style="margin-right: 10px">
  5947. 选项{{ checkIndex1 + 1 }}
  5948. </div>
  5949. <div style="margin-right: 10px; width: 300px" v-if="
  5950. testJson.testJson[index1].checkList[checkIndex1] &&
  5951. testJson.testJson[index1].checkList[checkIndex1]
  5952. .imgType &&
  5953. testJson.testJson[index1].checkList[checkIndex1]
  5954. .imgType == 1
  5955. ">
  5956. <div class="inImg" @click.stop="
  5957. previewImg(
  5958. testJson.testJson[index1].checkList[checkIndex1]
  5959. .src
  5960. )
  5961. ">
  5962. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5963. .src
  5964. " lazy />
  5965. <!-- <img :src="
  5966. testJson.testJson[index1].checkList[checkIndex1]
  5967. .src
  5968. " alt="" /> -->
  5969. </div>
  5970. </div>
  5971. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5972. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5973. $forceUpdate();
  5974. }
  5975. "></textarea>
  5976. <div class="xzUpImg" @click.stop="addImg($event)">
  5977. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5978. <input type="file" accept="image/*" style="display: none"
  5979. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5980. </div>
  5981. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5982. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5983. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5984. </div>
  5985. <div class="a_add_body_div">
  5986. <el-button type="primary" size="small" @click.stop="
  5987. addTcheckList(
  5988. testJson.testJson[index1],
  5989. checkIndex1
  5990. )
  5991. ">添加</el-button>
  5992. <el-button type="primary" size="small" @click.stop="
  5993. deleteTcheckList(
  5994. testJson.testJson[index1],
  5995. checkIndex1
  5996. )
  5997. " v-if="testJson.testJson[index1].testItem != 1">删除
  5998. </el-button>
  5999. </div>
  6000. </el-checkbox>
  6001. </div>
  6002. </el-checkbox-group>
  6003. </div>
  6004. <!-- <div class="a_add_body_div">
  6005. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6006. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6007. v-if="testJson.testJson[index1].testItem != 1">删除
  6008. </el-button>
  6009. </div> -->
  6010. </div>
  6011. </div>
  6012. </div>
  6013. </div>
  6014. <span slot="footer" class="dialog-footer">
  6015. <el-button @click="closePan(45)">取 消</el-button>
  6016. <el-button type="primary" @click="addTest">确 定</el-button>
  6017. </span>
  6018. </el-dialog>
  6019. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6020. :before-close="handleClose" class="dialog_diy addToolsDia">
  6021. <div class="toolChoose">
  6022. <div class="tools">
  6023. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6024. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6025. <div style="
  6026. display: flex;
  6027. flex-direction: row;
  6028. align-items: baseline;
  6029. flex-wrap: nowrap;
  6030. justify-content: flex-start;
  6031. position: relative;
  6032. ">
  6033. <div class="chooseWho">
  6034. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6035. 互动类
  6036. </div>
  6037. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6038. 思维类
  6039. </div>
  6040. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6041. 评价类
  6042. </div>
  6043. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6044. 其他
  6045. </div>
  6046. </div>
  6047. </div>
  6048. <div style="min-height: 163px">
  6049. <div class="toolSort" v-if="chapToolsType == 0">
  6050. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6051. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6052. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6053. <div style="margin: 5px 0">素材库</div>
  6054. </div>
  6055. <div class="noCTool">
  6056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6057. </div>
  6058. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6059. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6060. </div>
  6061. <!-- <div class="check" @click="chapAddTools(8)">
  6062. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6063. <div class="checkDiv" v-else>
  6064. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6065. </div>
  6066. </div> -->
  6067. </div>
  6068. </div>
  6069. <div class="toolSort" v-if="chapToolsType == 1">
  6070. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6071. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6072. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6073. <div style="margin: 5px 0">思维网格</div>
  6074. </div>
  6075. <div class="noCTool">
  6076. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6077. </div>
  6078. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6079. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6080. </div>
  6081. <!-- <div class="check" @click="chapAddTools(7)">
  6082. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6083. <div class="checkDiv" v-else>
  6084. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6085. </div>
  6086. </div> -->
  6087. </div>
  6088. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6089. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6090. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6091. <div style="margin: 5px 0">电子白板</div>
  6092. </div>
  6093. <div class="noCTool">
  6094. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6095. </div>
  6096. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6097. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6098. </div>
  6099. <!-- <div class="check" @click="chapAddTools(1)">
  6100. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6101. <div class="checkDiv" v-else>
  6102. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6103. </div>
  6104. </div> -->
  6105. </div>
  6106. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6107. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6108. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6109. <div style="margin: 5px 0">便签</div>
  6110. </div>
  6111. <div class="noCTool">
  6112. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6113. </div>
  6114. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6115. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6116. </div>
  6117. <!-- <div class="check" @click="chapAddTools(2)">
  6118. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6119. <div class="checkDiv" v-else>
  6120. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6121. </div>
  6122. </div> -->
  6123. </div>
  6124. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6125. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6126. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6127. <div style="margin: 5px 0">协同文档</div>
  6128. </div>
  6129. <div class="noCTool">
  6130. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6131. </div>
  6132. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6133. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6134. </div>
  6135. <!-- <div class="check" @click="chapAddTools(6)">
  6136. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6137. <div class="checkDiv" v-else>
  6138. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6139. </div>
  6140. </div> -->
  6141. </div>
  6142. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6143. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6144. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6145. <div style="margin: 5px 0">思维导图</div>
  6146. </div>
  6147. <div class="noCTool">
  6148. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6149. </div>
  6150. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6152. </div>
  6153. <!-- <div class="check" @click="chapAddTools(3)">
  6154. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6155. <div class="checkDiv" v-else>
  6156. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6157. </div>
  6158. </div> -->
  6159. </div>
  6160. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6161. @click="chapAddTools(31)">
  6162. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6163. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6164. <div style="margin: 5px 0">数学画板</div>
  6165. </div>
  6166. <div class="noCTool">
  6167. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6168. </div>
  6169. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6170. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6171. </div>
  6172. <!-- <div class="check" @click="chapAddTools(31)">
  6173. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6174. <div class="checkDiv" v-else>
  6175. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6176. </div>
  6177. </div> -->
  6178. </div>
  6179. </div>
  6180. <div class="toolSort" v-if="chapToolsType == 2">
  6181. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6182. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6183. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6184. <div style="margin: 5px 0">量规评分</div>
  6185. </div>
  6186. <div class="noCTool">
  6187. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6188. </div>
  6189. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6190. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6191. </div>
  6192. <!-- <div class="check" @click="chapAddTools(5)">
  6193. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6194. <div class="checkDiv" v-else>
  6195. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6196. </div>
  6197. </div> -->
  6198. </div>
  6199. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6200. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6201. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6202. <div style="margin: 5px 0">问卷调查</div>
  6203. </div>
  6204. <div class="noCTool">
  6205. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6206. </div>
  6207. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6208. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6209. </div>
  6210. <!-- <div class="check" @click="chapAddTools(4)">
  6211. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6212. <div class="checkDiv" v-else>
  6213. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6214. </div>
  6215. </div> -->
  6216. </div>
  6217. </div>
  6218. </div>
  6219. <div>
  6220. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6221. v-model="itemTools.toolDetail" />
  6222. </div>
  6223. </div>
  6224. </div>
  6225. </div>
  6226. <span slot="footer" class="dialog-footer">
  6227. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6228. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6229. </span>
  6230. </el-dialog>
  6231. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6232. closePan(15);
  6233. }
  6234. " class="dialog_diy">
  6235. <div>
  6236. <div class="a_add_title" style="
  6237. display: flex;
  6238. flex-direction: column;
  6239. align-items: flex-start;
  6240. justify-content: center;
  6241. ">
  6242. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6243. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6244. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6245. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6246. </div>
  6247. </div>
  6248. <span slot="footer" class="dialog-footer">
  6249. <el-button @click="closePan(15)">取 消</el-button>
  6250. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6251. </span>
  6252. </el-dialog>
  6253. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6254. :before-close="handleClose" class="dialog_diy">
  6255. <div>
  6256. <div class="a_add_title" style="
  6257. display: flex;
  6258. flex-direction: column;
  6259. align-items: flex-start;
  6260. justify-content: center;
  6261. ">
  6262. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6263. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6264. </div>
  6265. </div>
  6266. <span slot="footer" class="dialog-footer">
  6267. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6268. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6269. </span>
  6270. </el-dialog>
  6271. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6272. :before-close="handleClose" class="dialog_diy">
  6273. <div>
  6274. <div class="fileCss" style="padding-top: 20px">
  6275. <div>
  6276. <button class="info_btn" @click="addImg($event)">
  6277. 选择本地文件
  6278. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6279. </button>
  6280. <div class="spanName">选择本地文件</div>
  6281. </div>
  6282. <!-- <div>
  6283. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6284. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6285. <img :src="cover[0].url" alt="" />
  6286. <div class="deletePic" @click="deleteSysPic">
  6287. <img src="../../../assets/icon/delete.png" alt="" />
  6288. </div>
  6289. </div>
  6290. <div class="spanName">选择系统文件</div>
  6291. </div> -->
  6292. <div>
  6293. <el-button @click="(searchImageValue = courseName), resetImage()"
  6294. v-if="isSysPic2 == false">选择网络文件</el-button>
  6295. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6296. <img :src="cover[0].url" alt="" />
  6297. <div class="deletePic" @click="deleteSysPic">
  6298. <img src="../../../assets/icon/delete.png" alt="" />
  6299. </div>
  6300. </div>
  6301. <div class="spanName">选择网络文件</div>
  6302. </div>
  6303. </div>
  6304. <!-- <div class="fileCss">
  6305. </div> -->
  6306. </div>
  6307. <span slot="footer" class="dialog-footer">
  6308. <el-button @click="choosePicVisible = false">取 消</el-button>
  6309. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6310. </span>
  6311. </el-dialog>
  6312. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6313. :before-close="handleClose" class="dialog_diy">
  6314. <div class="cru_selectBox" style="margin: 0">
  6315. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6316. 绘画
  6317. </div>
  6318. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6319. 科技
  6320. </div>
  6321. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6322. 人文
  6323. </div>
  6324. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6325. 艺术
  6326. </div>
  6327. </div>
  6328. <div class="sysPicBox">
  6329. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6330. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6331. </div>
  6332. </div>
  6333. </el-dialog>
  6334. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6335. :before-close="handleClose" class="dialog_diy">
  6336. <div>
  6337. <div class="people_top_right" style="display: flex; align-items: center">
  6338. <div style="position: relative; width: 100%">
  6339. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6340. @keyup.enter.native="resetImage()"></el-input>
  6341. <div class="search_img" @click="resetImage" style="right: 10px">
  6342. <img src="../../../assets/icon/search.png" alt />
  6343. </div>
  6344. </div>
  6345. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6346. </div>
  6347. <div class="sysPicBox" v-loading="imageloading">
  6348. <div class="picNone" v-if="!imageList.length">
  6349. 请输入关键词搜索图片
  6350. </div>
  6351. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6352. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6353. </div>
  6354. </div>
  6355. </div>
  6356. </el-dialog>
  6357. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6358. closePan(41);
  6359. }
  6360. " class="dialog_diy dialog_diy3 fullStyle">
  6361. <div v-if="selectJson" style="height: 100%">
  6362. <div class="select_box1" v-if="selectSteps == 1">
  6363. <div class="select_box1_img">
  6364. <div class="select_box1_title">
  6365. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6366. </div>
  6367. <div class="select_box1_add_img">
  6368. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6369. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6370. <img src="../../../assets/icon/addPoster.png" alt="" />
  6371. </div>
  6372. <div class="isSysPic" v-else>
  6373. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6374. <div class="deletePic" @click="deleteSelectPic">
  6375. <img src="../../../assets/icon/delete.png" alt="" />
  6376. </div>
  6377. </div>
  6378. </div>
  6379. </div>
  6380. <div class="select_box1_select">
  6381. <div class="select_box1_title">
  6382. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6383. </div>
  6384. <div class="select_box1_select_box">
  6385. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6386. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6387. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6388. <div class="select_box1_select_box_add">
  6389. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6390. 添加</el-button>
  6391. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6392. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6393. </div>
  6394. </div>
  6395. </div>
  6396. </div>
  6397. <div v-if="selectSteps == 2" style="height: 100%">
  6398. <div class="select_box2">
  6399. <div class="select_box2_title">设置每道题目的正确选项</div>
  6400. <div class="select_box2_box">
  6401. <div class="select_box2_img">
  6402. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6403. </div>
  6404. <div class="select_box2_answer">
  6405. <div class="select_answer_title">根据题目选择对应答案</div>
  6406. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6407. <span>{{ checkIndex + 1 }}、</span>
  6408. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6409. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6410. </el-option>
  6411. </el-select>
  6412. </div>
  6413. </div>
  6414. </div>
  6415. </div>
  6416. </div>
  6417. </div>
  6418. <span slot="footer" class="dialog-footer">
  6419. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6420. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6421. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6422. </span>
  6423. </el-dialog>
  6424. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6425. :before-close="handleClose" class="dialog_diy">
  6426. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6427. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6428. <div class="pjCss" style="width: 100%">
  6429. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6430. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6431. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6432. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6433. <div class="remove" @click="deletRateList(eIndex)"></div>
  6434. <div style="width: 100%; display: flex">
  6435. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6436. <el-rate v-model="eItem.score" disabled></el-rate>
  6437. </div>
  6438. <div class="elist_inptu_text" style="align-items: flex-start">
  6439. <span style="min-width: 100px; text-align: right">描述:</span>
  6440. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6441. </div>
  6442. </div>
  6443. </div>
  6444. <div class="addToolFun" @click="addRateList()">
  6445. <div class="addToolImg">
  6446. <img src="../../../assets/icon/add.png" alt />
  6447. </div>
  6448. <div>添加</div>
  6449. </div>
  6450. </div>
  6451. </div>
  6452. <span slot="footer" class="dialog-footer">
  6453. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6454. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6455. </span>
  6456. </el-dialog>
  6457. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6458. closePan(47);
  6459. }
  6460. " class="dialog_diy dialog_diy3 fullStyle">
  6461. <div style="height: 100%">
  6462. <div class="sentenBox" style="height: 100%">
  6463. <div class="addSen" @click="addSt">添加题目</div>
  6464. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6465. <div class="sentenTopBox">
  6466. <div class="sentenTop" :index="stIndex + 1">
  6467. <div>题目设置</div>
  6468. <div>
  6469. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6470. </div>
  6471. <div @click="addSen(stIndex)">添加</div>
  6472. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6473. </div>
  6474. </div>
  6475. <div class="cardList">
  6476. <div v-if="st.addSentence.length > 0" class="cardBox">
  6477. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6478. @click="setRightAnswer(s, stIndex, sIndex)">
  6479. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6480. <div>{{ s }}</div>
  6481. </el-tooltip>
  6482. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6483. <img src="../../../assets/icon/delete.png" alt="" />
  6484. </div>
  6485. </div>
  6486. </div>
  6487. <div class="card">
  6488. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6489. </div>
  6490. </div>
  6491. <div class="rightCardBox">
  6492. <div>正确顺序</div>
  6493. <div class="rightCardList">
  6494. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6495. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6496. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6497. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6498. <div>{{ r }}</div>
  6499. </el-tooltip>
  6500. </div>
  6501. <div>{{ rIndex + 1 }}</div>
  6502. </div>
  6503. </div>
  6504. <div class="card" v-if="st.rightAnswer.length == 0">
  6505. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6506. </div>
  6507. <div class="card" v-else>
  6508. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6509. </div>
  6510. </div>
  6511. </div>
  6512. </div>
  6513. </div>
  6514. </div>
  6515. <span slot="footer" class="dialog-footer">
  6516. <el-button @click="closePan(47)">取 消</el-button>
  6517. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6518. </span>
  6519. </el-dialog>
  6520. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6521. :before-close="handleClose" class="dialog_diy">
  6522. <el-form>
  6523. <!-- <el-form-item label="文本标题">
  6524. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6525. </el-form-item> -->
  6526. <div>表格内容</div>
  6527. <Table v-model="tableJson.text" @change="change"></Table>
  6528. </el-form>
  6529. <span slot="footer" class="dialog-footer">
  6530. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6531. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6532. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6533. </span>
  6534. </el-dialog>
  6535. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6536. :before-close="handleClose" class="dialog_diy">
  6537. <el-form>
  6538. <!-- <el-form-item label="文本标题">
  6539. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6540. </el-form-item> -->
  6541. <div>文档内容</div>
  6542. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6543. </el-form>
  6544. <span slot="footer" class="dialog-footer">
  6545. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6546. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6547. </span>
  6548. </el-dialog>
  6549. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6550. :before-close="handleClose" class="dialog_diy">
  6551. <div style="
  6552. width: 100%;
  6553. display: flex;
  6554. flex-direction: row;
  6555. flex-wrap: nowrap;
  6556. align-items: center;
  6557. justify-content: center;
  6558. ">
  6559. <div>班级:</div>
  6560. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6561. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6562. </el-option>
  6563. </el-select>
  6564. </div>
  6565. <span slot="footer" class="dialog-footer">
  6566. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6567. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6568. </span>
  6569. </el-dialog>
  6570. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6571. :before-close="handleClose" class="dialog_diy">
  6572. <div style="
  6573. width: 100%;
  6574. display: flex;
  6575. flex-direction: row;
  6576. flex-wrap: nowrap;
  6577. align-items: center;
  6578. justify-content: center;
  6579. ">
  6580. <div>随机码:</div>
  6581. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6582. </div>
  6583. <span slot="footer" class="dialog-footer">
  6584. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6585. <el-button type="primary" @click="addInvite">确定</el-button>
  6586. </span>
  6587. </el-dialog>
  6588. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6589. :before-close="handleClose" class="dialog_diy">
  6590. <div>
  6591. <div style="margin-bottom: 20px; color: #999">
  6592. 提示:点击“+”或“-”修改倒计时时长。
  6593. </div>
  6594. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6595. </div>
  6596. <span slot="footer" class="dialog-footer">
  6597. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6598. <el-button type="primary" @click="addPreTime">确定</el-button>
  6599. </span>
  6600. </el-dialog>
  6601. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6602. :before-close="handleClose" class="dialog_diy">
  6603. <div>
  6604. <div style="
  6605. width: 100%;
  6606. display: flex;
  6607. flex-direction: row;
  6608. flex-wrap: nowrap;
  6609. align-content: center;
  6610. align-items: center;
  6611. justify-content: space-between;
  6612. ">
  6613. <div style="
  6614. display: flex;
  6615. flex-flow: row nowrap;
  6616. align-items: flex-start;
  6617. width: 100%;
  6618. flex-direction: column;
  6619. flex-wrap: nowrap;
  6620. position: relative;
  6621. ">
  6622. <div class="e_box">
  6623. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6624. <div class="e_card_picture">
  6625. <img src="../../../assets/e_picture.png" />
  6626. </div>
  6627. <div class="e_card_name">
  6628. <span>{{ item.title }}</span>
  6629. </div>
  6630. <div class="e_card_btn">
  6631. <span @click="checkEva(item.id, 2)">导入</span>
  6632. </div>
  6633. </div> -->
  6634. <!-- <div class="addEva" @click="openT">
  6635. <img src="../../../assets/icon/addEva.png" alt="" />
  6636. </div> -->
  6637. <div style="
  6638. display: flex;
  6639. justify-content: flex-end;
  6640. margin-bottom: 10px;
  6641. ">
  6642. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6643. </div>
  6644. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6645. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6646. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6647. </el-table-column>
  6648. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6649. </el-table-column>
  6650. <el-table-column label="操作" width="250px">
  6651. <template slot-scope="scope">
  6652. <div class="btnBox">
  6653. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6654. </div>
  6655. </template>
  6656. </el-table-column>
  6657. </el-table>
  6658. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6659. 暂无数据
  6660. </div>
  6661. </div>
  6662. </div>
  6663. </div>
  6664. </div>
  6665. <span slot="footer" class="dialog-footer">
  6666. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6667. </span>
  6668. </el-dialog>
  6669. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6670. :before-close="handleClose" class="dialog_diy">
  6671. <div class="groupBox">
  6672. <div v-if="groupJson.group" class="groupContent">
  6673. <div class="groupTitle">请设置小组数量及名称</div>
  6674. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6675. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6676. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6677. <div class="groupBtn">
  6678. <el-button type="primary" size="small" @click="addGroup(index)"
  6679. v-if="groupJson.group.length - 1 == index">
  6680. 添加</el-button>
  6681. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6682. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6683. </div>
  6684. </div>
  6685. </div>
  6686. <div class="groupContent">
  6687. <div class="groupTitle">请设置每组人数</div>
  6688. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6689. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6690. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6691. @change="numberPan"></el-input>
  6692. </div>
  6693. </div>
  6694. <span slot="footer" class="dialog-footer">
  6695. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6696. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6697. </span>
  6698. </el-dialog>
  6699. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6700. :before-close="handleClose" class="dialog_diy">
  6701. <div style="
  6702. width: 100%;
  6703. display: flex;
  6704. flex-direction: row;
  6705. flex-wrap: nowrap;
  6706. align-items: center;
  6707. justify-content: center;
  6708. ">
  6709. <div style="min-width: fit-content">文件名称:</div>
  6710. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6711. </div>
  6712. <span slot="footer" class="dialog-footer">
  6713. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6714. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6715. </span>
  6716. </el-dialog>
  6717. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6718. closePan(69);
  6719. }
  6720. " class="dialog_diy fullStyle fullStyle1">
  6721. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6722. <span slot="footer" class="dialog-footer">
  6723. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6724. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6725. </span>
  6726. </el-dialog>
  6727. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6728. :before-close="handleClose" class="dialog_diy">
  6729. <div class="template_box">
  6730. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6731. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6732. <div class="wordPic">
  6733. <img src="../../../assets/icon/new/course_template.png" alt />
  6734. </div>
  6735. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6736. <div style="
  6737. margin-top: 10px;
  6738. line-height: 19px;
  6739. overflow: hidden;
  6740. text-overflow: ellipsis;
  6741. white-space: nowrap;
  6742. padding: 0 10px;
  6743. box-sizing: border-box;
  6744. width: 100%;
  6745. ">
  6746. {{ aa.title }}
  6747. </div>
  6748. </el-tooltip>
  6749. </div>
  6750. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6751. :class="{ wordTeacherA: ctJson.id == 1 }">
  6752. <div class="wordPic">
  6753. <img src="../../../assets/icon/new/course_template.png" alt />
  6754. </div>
  6755. <div style="
  6756. margin-top: 10px;
  6757. line-height: 19px;
  6758. overflow: hidden;
  6759. text-overflow: ellipsis;
  6760. white-space: nowrap;
  6761. padding: 0 20px;
  6762. ">
  6763. 简易模板
  6764. </div>
  6765. </div>
  6766. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6767. :class="{ wordTeacherA: ctJson.id == 2 }">
  6768. <div class="wordPic">
  6769. <img src="../../../assets/icon/new/course_template.png" alt />
  6770. </div>
  6771. <div style="
  6772. margin-top: 10px;
  6773. line-height: 19px;
  6774. overflow: hidden;
  6775. text-overflow: ellipsis;
  6776. white-space: nowrap;
  6777. padding: 0 20px;
  6778. ">
  6779. 智能粘贴模式
  6780. </div>
  6781. </div>
  6782. </div>
  6783. <span slot="footer" class="dialog-footer">
  6784. <el-button @click="templateDialog = false">取 消</el-button>
  6785. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6786. </span>
  6787. </el-dialog>
  6788. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6789. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6790. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6791. <div class="change_stageBox">
  6792. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6793. <div class="nt_taskBox">
  6794. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6795. <div class="nt_taskName">
  6796. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6797. <span>{{ t.dyName }}</span>
  6798. </el-tooltip>
  6799. </div>
  6800. </div>
  6801. <div class="moveBtn" v-if="unitJson3.length > 1">
  6802. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6803. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6804. </div>
  6805. </div>
  6806. </div>
  6807. <span slot="footer" class="dialog-footer">
  6808. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6809. <el-button type="primary" @click="updateChange">确定</el-button>
  6810. </span>
  6811. </el-dialog>
  6812. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6813. :before-close="handleClose" class="dialog_diy">
  6814. <div class="addTypeChoose" style="justify-content: center">
  6815. <div style="min-width: 100px">模板名称:</div>
  6816. <el-input v-model="templateName" style="width: 200px"></el-input>
  6817. </div>
  6818. <div class="addTypeBox">
  6819. <div class="addTypeChoose">
  6820. <div style="min-width: 100px">选择一级分类:</div>
  6821. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6822. style="width: 200px">
  6823. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6824. </el-option>
  6825. </el-select>
  6826. </div>
  6827. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6828. <div style="min-width: 100px">选择二级分类:</div>
  6829. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6830. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6831. </el-option>
  6832. </el-select>
  6833. </div>
  6834. </div>
  6835. <span slot="footer" class="dialog-footer">
  6836. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6837. <el-button @click="close()">关 闭</el-button>
  6838. </span>
  6839. </el-dialog>
  6840. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6841. </evaBox>
  6842. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6843. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6844. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  6845. </aiDialog>
  6846. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6847. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6848. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6849. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6850. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6851. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6852. </div>
  6853. </template>
  6854. <script>
  6855. import "../../../common/aws-sdk-2.235.1.min.js";
  6856. import { tools as toolsData } from "../../../common/tools.js";
  6857. // import "../../../common/aws-sdk-2.99.0.min.js";
  6858. import $ from "jquery";
  6859. import EditorBar from "../../../components/tools/wangEnduit";
  6860. import Table from "../../../components/tools/table";
  6861. import Mind from "../../tools/jsmind2";
  6862. import Time from "../../tools/time.vue";
  6863. import Sunburst from "../../tools/sunburst";
  6864. import SeeBoard from "../../tools/seeBoard";
  6865. import weilaiData from "../components/weilai.js";
  6866. import sourceDialog from "../teacherSource/dialog.vue";
  6867. import interVideo from "../interVideo/index.vue";
  6868. import englishRight from "../components/englishRight.vue";
  6869. import evaBox from "../evaBox/index.vue";
  6870. import EnglishVoice from "../EnglishVoice/index.vue";
  6871. import aiBox from './aiBox.vue'
  6872. import aiDialog from './aiDialog'
  6873. import aiTips from './aiTips.vue'
  6874. import tipsDialog from './tipsDialog.vue'
  6875. import { v4 as uuidv4 } from "uuid";
  6876. import MarkdownIt from "markdown-it";
  6877. import aiCreateDialog from './aiCreateDialog.vue'
  6878. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6879. import wpdf from "../test/file/wPdf2.vue";
  6880. import wOffice from "../test/file/wOffice.vue";
  6881. import htmlDocx from "html-docx-js/dist/html-docx";
  6882. var OpenCC = require("opencc-js");
  6883. let converter = OpenCC.Converter({
  6884. from:'hk',
  6885. to:'cn'
  6886. })
  6887. export default {
  6888. components: {
  6889. EditorBar,
  6890. Mind,
  6891. Time,
  6892. Sunburst,
  6893. SeeBoard,
  6894. Table,
  6895. sourceDialog,
  6896. interVideo,
  6897. englishRight,
  6898. evaBox,
  6899. EnglishVoice,
  6900. aiBox,
  6901. aiDialog,
  6902. aiTips,
  6903. tipsDialog,
  6904. aiCreateDialog,
  6905. aiCreateVideoDialog,
  6906. wpdf,
  6907. wOffice,
  6908. },
  6909. data() {
  6910. return {
  6911. checkAll: false,
  6912. checkAll2: false,
  6913. chooseType: 1,
  6914. checkedCities: [],
  6915. isIndeterminate: true,
  6916. isIndeterminate2: true,
  6917. isSysPic: false,
  6918. isSysPic2: false,
  6919. steps: 1,
  6920. stepsNav: 1,
  6921. nbOrder: 0,
  6922. courseId: "",
  6923. chapToolsType: 0,
  6924. chapTools: [
  6925. {
  6926. tools: [],
  6927. toolDetail: "",
  6928. },
  6929. ],
  6930. line: "",
  6931. lineTitle: "",
  6932. sysPic: [],
  6933. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6934. sentenceList2: [],
  6935. isPushTitleList: [],
  6936. lineCount: 0,
  6937. lineType: 0,
  6938. chapCount: 0,
  6939. courseName: "",
  6940. isTeacherSee: false,
  6941. courseText: "",
  6942. textLoading: false,
  6943. ttextLoading: false,
  6944. courseText2: "",
  6945. preTime: 0,
  6946. formLabelWidth: "100px",
  6947. choosePicVisible: false,
  6948. sysPicVisible: false,
  6949. sysPicVisible2: false,
  6950. uploadLoading1: false,
  6951. noneBtnImg: false,
  6952. updateBoolean2: false,
  6953. unitIndex: 0,
  6954. taskCount: 0,
  6955. dialogVisible: false,
  6956. dialogVisible1: false,
  6957. dialogVisible2: false,
  6958. dialogVisible3: false,
  6959. dialogVisible4: false,
  6960. dialogVisible5: false,
  6961. dialogVisible6: false,
  6962. dialogVisible7: false,
  6963. dialogVisible8: false,
  6964. dialogVisible9: false,
  6965. dialogVisibleClass: false,
  6966. dialogVisibleMember: false,
  6967. dialogVisibleMp3: false,
  6968. dialogVisibleSelect: false,
  6969. dialogVisibleSentence: false,
  6970. dialogVisibleRate: false,
  6971. dialogVisibleChoice: false,
  6972. dialogVisiblemb: false,
  6973. dialogVisibleInvite: false,
  6974. dialogVisibleSource: false,
  6975. dialogVisibleVideo: false,
  6976. dialogVisibleStageChange: false,
  6977. dialogVisibleupdataVideoT: false,
  6978. englishDialogVisible: false,
  6979. templateDialog: false,
  6980. ctJson: {},
  6981. isClickColor: 1,
  6982. toolIndexType: "",
  6983. publicTool: 0,
  6984. searchPeople: "",
  6985. searchTN: "",
  6986. collid: '',
  6987. CollLoading: false,
  6988. userid: this.$route.query.userid,
  6989. oid: this.$route.query.oid,
  6990. org: this.$route.query.org,
  6991. role: this.$route.query.role,
  6992. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6993. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6994. dialogVisibleTable: false,
  6995. dialogVisibleWord: false,
  6996. tableJson: { text: "" },
  6997. wordJson: { text: "" },
  6998. dialogVisibleMoreUpload: false,
  6999. dialogVisiblePreTime: false,
  7000. uploadJson: [],
  7001. classJuri: [],
  7002. gradeList: [],
  7003. cover: [], //课程封面
  7004. myWord: [],
  7005. evaJuri: [],
  7006. evalua: "",
  7007. targetArray: [],
  7008. eTitle: "",
  7009. eJson: {},
  7010. fid: "", //一级
  7011. sid: "", //二级
  7012. tid: "", //二级
  7013. typeMode: 3,
  7014. eJSONNum: 0,
  7015. data: {
  7016. meta: {
  7017. name: "example",
  7018. author: "dd@163.com",
  7019. version: "0.2",
  7020. },
  7021. format: "node_array",
  7022. data: [{ id: "root", isroot: true, topic: "" }],
  7023. },
  7024. askJson: {
  7025. askCount: 1,
  7026. askTitle: "",
  7027. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7028. },
  7029. askJson2: {},
  7030. testJson: {},
  7031. testJson2: {},
  7032. selectJson: {},
  7033. selectJson2: {},
  7034. rateJson: [],
  7035. unitJson2: [],
  7036. unitJson3: [],
  7037. unitJson: [
  7038. {
  7039. dyName: "", //单元标题
  7040. chapterInfo: [
  7041. {
  7042. isread: false,
  7043. chapterid: this.guid(),
  7044. title: "",
  7045. courseName: "",
  7046. taskJson: [
  7047. {
  7048. task: "",
  7049. taskDetail: "",
  7050. chapterData: [],
  7051. toolText: "",
  7052. toolChoose: [
  7053. {
  7054. tool: [],
  7055. toolDetail: "",
  7056. toolType: 0,
  7057. askCount: 1,
  7058. askTitle: "",
  7059. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7060. },
  7061. ],
  7062. isShowTools: false,
  7063. askCount: 1,
  7064. isFold: 1,
  7065. askTitle: "",
  7066. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7067. checkJson: [{ checkCount: [], checkPerent: [] }],
  7068. homeworkList: [],
  7069. },
  7070. ],
  7071. itemCount: 1,
  7072. fileList1: [],
  7073. video: [],
  7074. testData: [],
  7075. pData: [],
  7076. templateArray: [],
  7077. },
  7078. ],
  7079. },
  7080. ],
  7081. templateArray: [],
  7082. studentJuri: [],
  7083. teacherJuri: [],
  7084. CollaborativeTeaList: [],
  7085. checkboxList: [],
  7086. checkboxList2: [],
  7087. checkboxList3: [],
  7088. classSearch: "",
  7089. gradeId: "",
  7090. number: "",
  7091. tTitle: "",
  7092. tdetail: "",
  7093. templateC: {},
  7094. AttText: {},
  7095. AttTextType: 0,
  7096. AttTextIndex: 0,
  7097. cTemplate: "",
  7098. CourseType: [],
  7099. CourseType1: [],
  7100. CourseType2: [],
  7101. CourseTypeJson: {},
  7102. CourseTypeJson1: {},
  7103. courseTypeId: [],
  7104. courseTypeId1: [],
  7105. courseTypeSon: [],
  7106. clearArray: [],
  7107. pTypeCheck: [],
  7108. pTypeCheckName: [],
  7109. loading: false,
  7110. toolType: 0,
  7111. inputShow: true,
  7112. inputShow2: true,
  7113. toolIndex: 0,
  7114. cidType: 0,
  7115. answerQ: "",
  7116. answerQ2: "",
  7117. grade: [],
  7118. grade2: [],
  7119. courseUserid: "",
  7120. timer: null,
  7121. timer2: null,
  7122. pasteTimer: null,
  7123. checkId: "",
  7124. isDelete: 1,
  7125. addindex: 0,
  7126. selectSteps: 1,
  7127. groupJson: {},
  7128. dialogVisibleGroup: false,
  7129. rightBoxHeight: 0,
  7130. ManAarray: [],
  7131. checkBoolean: false,
  7132. inviteCode: [],
  7133. inviteId: "",
  7134. icode: "",
  7135. easyArray: [2, 4],
  7136. sourceData: {},
  7137. updateSourcePan: false,
  7138. videoJson: {},
  7139. isBtnDisplay: false,
  7140. isStepDisplay: false,
  7141. isPasteStage: false,
  7142. isPasteTask: false,
  7143. isPasteChoice: false,
  7144. imageList: [],
  7145. imageloading: false,
  7146. imageloading2: false,
  7147. searchImageValue: "",
  7148. ppage: 1,
  7149. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7150. oldIndex: 0,
  7151. dragType: "",
  7152. oldUnitIndex: 0,
  7153. oldData: null,
  7154. newIndex: "",
  7155. englishList: {},
  7156. typeIndex: "",
  7157. courseState: 5,
  7158. taskJSONa: [
  7159. {
  7160. task: "",
  7161. taskDetail: "",
  7162. chapterData: [],
  7163. toolText: "",
  7164. toolChoose: [
  7165. {
  7166. tool: [],
  7167. toolDetail: "",
  7168. toolType: 0,
  7169. askCount: 1,
  7170. askTitle: "",
  7171. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7172. },
  7173. ],
  7174. isShowTools: false,
  7175. askCount: 1,
  7176. isFold: 1,
  7177. askTitle: "",
  7178. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7179. checkJson: [{ checkCount: [], checkPerent: [] }],
  7180. homeworkList: [],
  7181. },
  7182. ],
  7183. checkUnitIndex: 0,
  7184. isdrag: "",
  7185. evaIndex: "",
  7186. evatIndex: "",
  7187. evaBoxDialog: false,
  7188. EnglishVoiceDialog: false,
  7189. englishVoiceJson: {},
  7190. cetIndex: "",
  7191. cettIndex: "",
  7192. cetBoxDialog: false,
  7193. templateName: "",
  7194. setTypeJson: {
  7195. one: "",
  7196. two: "",
  7197. },
  7198. twoJson: [],
  7199. oneJson: [],
  7200. updateKey: 1,
  7201. isOutline: false,
  7202. isOutline2: false,
  7203. infoData: [],
  7204. infoproVisible: false,
  7205. infoisFinishSize: 0,
  7206. infoisAllSize: 0,
  7207. infoprogress: 0,
  7208. taskDetailLoading: [],
  7209. ttaskDetailLoading: [],
  7210. taskDetailLoading2: [],
  7211. ttaskDetailLoading2: [],
  7212. taskDetailLoading3: [],
  7213. ttaskDetailLoading3: [],
  7214. taskDetailLoading4: [],
  7215. taskDetailLoading5: [],
  7216. ttaskDetailLoading5: [],
  7217. dArray: [],
  7218. dialogVisibleAiD: false,
  7219. aitype: "",
  7220. aiJson: {
  7221. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7222. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7223. "aiTask": "请根据<教学任务教案>。",
  7224. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7225. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7226. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7227. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7228. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7229. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7230. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7231. },
  7232. aiText: "",
  7233. aiText2: "",
  7234. aiText3: "",
  7235. aiCallBack: "",
  7236. aiIndex: "",
  7237. clickType: 1,
  7238. promptShow: false,
  7239. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7240. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7241. dialogVisibleTips: false,
  7242. tipsJson: {},
  7243. cpote:{
  7244. cpote1: '',
  7245. cpote2: '',
  7246. cpote3: '',
  7247. cpote4: '',
  7248. },
  7249. cpoteLoading:{
  7250. cpote1: false,
  7251. cpote2: false,
  7252. cpote3: false,
  7253. cpote4: false,
  7254. },
  7255. cpotetLoading:{
  7256. cpote1: false,
  7257. cpote2: false,
  7258. cpote3: false,
  7259. cpote4: false,
  7260. },
  7261. cpoteType: 0,
  7262. dialogVisibleAiCreate: false,
  7263. dialogVisibleAiCreateVideo: false,
  7264. teacherText: [],
  7265. isFileSearch: true,
  7266. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  7267. 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'],
  7268. courseJie:1,
  7269. courseTime:45,
  7270. allTextArray: [],
  7271. dialogVisiblePdf: false,
  7272. dialogVisibleOffice: false,
  7273. wurl: "",
  7274. choiceLoading: false,
  7275. teacherInfoData: [],
  7276. teacherinfoproVisible: false,
  7277. teacherinfoisFinishSize: 0,
  7278. teacherinfoisAllSize: 0,
  7279. teacherinfoprogress: 0,
  7280. teacherCourseText: "",
  7281. teacherTextLoading: false,
  7282. tteacherTextLoading: false,
  7283. targetCourseText: "",
  7284. targetTextLoading: false,
  7285. ttargetTextLoading: false,
  7286. cankaoInfoData: [],
  7287. fileSLoading: false,
  7288. infoData2: [],
  7289. isuseT: false,
  7290. mode: 1,
  7291. targetCourseText2: "",
  7292. targetTextLoading2: false,
  7293. ttargetTextLoading2: false,
  7294. courseTextBool: false,
  7295. teacherCourseTextB: true,
  7296. targetCourseTextB: true,
  7297. courseTextB: true,
  7298. targetCourseText2B: true,
  7299. // 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'],
  7300. yiKeTemplateArray:[],
  7301. taskLoading: [],
  7302. ruleLoading: [],
  7303. mubiaoInfoData: [],
  7304. mubiaoinfoproVisible: false,
  7305. mubiaoinfoisFinishSize: 0,
  7306. mubiaoinfoisAllSize: 0,
  7307. mubiaoinfoprogress: 0,
  7308. xuanzeInfoData: [],
  7309. xuanzeinfoproVisible: false,
  7310. xuanzeinfoisFinishSize: 0,
  7311. xuanzeinfoisAllSize: 0,
  7312. xuanzeinfoprogress: 0,
  7313. pingjiaInfoData: [],
  7314. pingjiainfoproVisible: [],
  7315. pingjiainfoisFinishSize: [],
  7316. pingjiainfoisAllSize: [],
  7317. pingjiainfoprogress: [],
  7318. taskGLoading: [],
  7319. isOutlineCancelToken: null,
  7320. isFileCancelToken: null,
  7321. isTargetCancelToken1: null,
  7322. isTargetCancelToken2: null,
  7323. isTextCancelToken: null,
  7324. isTeacherTextCancelToken: null,
  7325. isTeacherTaskCancelToken: null,
  7326. isOutlineTaskCancelToken: [],
  7327. isTextCancelSource: null,
  7328. isOutlineTaskCancelSource: [],
  7329. isTeacherTextCancelSource: null,
  7330. isTargetCancelSource1: null,
  7331. isTargetCancelSource2: null,
  7332. };
  7333. },
  7334. directives: {
  7335. autoHeight: {
  7336. update(el, binding) {
  7337. const { value } = binding;
  7338. if (value && typeof value === "number") {
  7339. el.style.height = `${value}px`;
  7340. } else {
  7341. el.style.height = "auto";
  7342. }
  7343. },
  7344. componentUpdated(el) {
  7345. el.style.height = `${el.scrollHeight + 25}px`;
  7346. },
  7347. },
  7348. },
  7349. computed: {
  7350. // rightBoxHeight: function () {
  7351. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7352. // },
  7353. offsetLetfPx: function () {
  7354. //addnum可以直接在模板语法里面用,相当于data内的值
  7355. return (
  7356. $(".cru_select")[this.unitIndex] &&
  7357. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7358. );
  7359. },
  7360. getMan2() {
  7361. return function (people) {
  7362. let _people = people;
  7363. let _people2 = "";
  7364. if (this.ManAarray.length) {
  7365. for (var i = 0; i < this.ManAarray.length; i++) {
  7366. if (this.ManAarray[i].userid == people) {
  7367. _people2 = this.ManAarray[i].name;
  7368. break;
  7369. }
  7370. }
  7371. }
  7372. if (people == this.courseUserid) {
  7373. return "";
  7374. }
  7375. return this.ManAarray.length ? _people2 : "";
  7376. };
  7377. },
  7378. getListMan2() {
  7379. return function (list) {
  7380. let _people2 = [];
  7381. if (this.ManAarray.length) {
  7382. for (var j = 0; j < list.length; j++) {
  7383. let people = list[j];
  7384. for (var i = 0; i < this.ManAarray.length; i++) {
  7385. if (
  7386. this.ManAarray[i].userid == people &&
  7387. people != this.courseUserid
  7388. ) {
  7389. _people2.push(this.ManAarray[i].name);
  7390. break;
  7391. }
  7392. }
  7393. }
  7394. }
  7395. return this.ManAarray.length ? _people2.join("、") : "";
  7396. };
  7397. },
  7398. isInvite() {
  7399. return function (cid) {
  7400. let array = [];
  7401. for (var i = 0; i < this.inviteCode.length; i++) {
  7402. array.push(this.inviteCode[i].cid);
  7403. }
  7404. return array.indexOf(cid) != -1;
  7405. };
  7406. },
  7407. getInviteCodeC() {
  7408. return function (cid) {
  7409. let array = [];
  7410. for (var i = 0; i < this.inviteCode.length; i++) {
  7411. array.push(this.inviteCode[i].cid);
  7412. }
  7413. return this.inviteCode[array.indexOf(cid)].ic;
  7414. };
  7415. },
  7416. getClassC() {
  7417. return function (c) {
  7418. let _c2 = "";
  7419. if (this.grade.length) {
  7420. for (var i = 0; i < this.grade.length; i++) {
  7421. if (this.grade[i].id == c) {
  7422. _c2 = this.grade[i].name;
  7423. break;
  7424. }
  7425. }
  7426. }
  7427. return this.grade.length ? _c2 : "";
  7428. };
  7429. },
  7430. getListClassC() {
  7431. return function (list) {
  7432. let _c2 = [];
  7433. if (this.grade.length) {
  7434. for (var j = 0; j < list.length; j++) {
  7435. let c = list[j];
  7436. for (var i = 0; i < this.grade.length; i++) {
  7437. if (this.grade[i].id == c) {
  7438. _c2.push(this.grade[i].name);
  7439. break;
  7440. }
  7441. }
  7442. }
  7443. }
  7444. return this.grade.length ? _c2.join("、") : "";
  7445. };
  7446. },
  7447. MarkdownT() {
  7448. return function (c) {
  7449. let md = new MarkdownIt();
  7450. return c
  7451. ? md.render(c) : "";
  7452. };
  7453. },
  7454. panOutline(){
  7455. return function () {
  7456. let count = 0;
  7457. for(var i = 0; i < this.unitJson.length; i++){
  7458. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7459. for(var j = 0; j < _task.length; j++){
  7460. if(_task[j].taskDetail2){
  7461. count++
  7462. }
  7463. }
  7464. }
  7465. return count;
  7466. };
  7467. },
  7468. panTeacher(){
  7469. return function () {
  7470. let count = 0;
  7471. for(var i = 0; i < this.unitJson.length; i++){
  7472. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7473. for(var j = 0; j < _task.length; j++){
  7474. if(_task[j].taskDetail3){
  7475. count++
  7476. }
  7477. }
  7478. }
  7479. return count;
  7480. };
  7481. },
  7482. dataCheckPan(){
  7483. return function (fileid) {
  7484. for(let i = 0; i < this.infoData.length; i++){
  7485. if(this.infoData[i].fileid == fileid){
  7486. return true
  7487. }
  7488. }
  7489. return false;
  7490. };
  7491. }
  7492. },
  7493. watch: {
  7494. unitIndex(newValue, oldValue) {
  7495. // return;
  7496. if (this.isDelete == 2) {
  7497. this.isDelete = 1;
  7498. return;
  7499. }
  7500. if (this.cid != "") {
  7501. let _unitIndex = oldValue;
  7502. if (
  7503. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7504. JSON.stringify(this.unitJson[_unitIndex])
  7505. ) {
  7506. this.$refs.rightboxR.scrollTop = 0;
  7507. return;
  7508. }
  7509. let cPan = 1;
  7510. for (
  7511. var j = 0;
  7512. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7513. j++
  7514. ) {
  7515. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7516. j
  7517. ].proVisible = false;
  7518. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7519. j
  7520. ].proVisible2 = false;
  7521. if (
  7522. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7523. .length > 1
  7524. ) {
  7525. for (
  7526. var z = 0;
  7527. z <
  7528. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7529. .length;
  7530. z++
  7531. ) {
  7532. if (
  7533. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7534. .toolChoose[z].tool.length
  7535. ) {
  7536. this.$message.error("请把工具添加完整");
  7537. cPan = 2;
  7538. break;
  7539. }
  7540. }
  7541. }
  7542. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7543. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7544. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7545. (ele) => {
  7546. return ele.value != "";
  7547. }
  7548. );
  7549. }
  7550. }
  7551. if (cPan == 2) {
  7552. this.unitIndex = oldValue;
  7553. return;
  7554. }
  7555. for (var i = 0; i < this.unitJson.length; i++) {
  7556. if (this.addindex != i) {
  7557. delete this.unitJson[i].isUpdate;
  7558. }
  7559. }
  7560. this.$refs.rightboxR.scrollTop = 0;
  7561. this.addindex = -1;
  7562. let params = [
  7563. {
  7564. cid: this.cid,
  7565. chapters: JSON.stringify(this.unitJson),
  7566. uid: this.userid,
  7567. unitIndex: _unitIndex,
  7568. },
  7569. ];
  7570. this.ajax
  7571. .post(this.$store.state.api + "updateWorkNew4", params)
  7572. .then((res) => {
  7573. // this.$message({
  7574. // message: "修改成功",
  7575. // type: "success",
  7576. // });
  7577. // this.courseId = this.cid;
  7578. this.addtips()
  7579. })
  7580. .catch((err) => {
  7581. this.$message.error("网络不佳");
  7582. console.error(err);
  7583. });
  7584. }
  7585. },
  7586. steps(newValue, old) {
  7587. if(newValue == 2){
  7588. this.steps = old
  7589. }
  7590. if (newValue == 4) {
  7591. let cPan = 1;
  7592. for (var i = 0; i < this.unitJson.length; i++) {
  7593. for (
  7594. var j = 0;
  7595. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7596. j++
  7597. ) {
  7598. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7599. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7600. if (
  7601. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7602. ) {
  7603. for (
  7604. var z = 0;
  7605. z <
  7606. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7607. z++
  7608. ) {
  7609. if (
  7610. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7611. .tool.length
  7612. ) {
  7613. this.$message.error("请把工具添加完整");
  7614. cPan = 2;
  7615. break;
  7616. }
  7617. }
  7618. }
  7619. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7620. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7621. i
  7622. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7623. return ele.value != "";
  7624. });
  7625. }
  7626. }
  7627. }
  7628. this.inputShow = true;
  7629. if (cPan == 2) {
  7630. this.steps = old;
  7631. return;
  7632. }
  7633. this.goTo(
  7634. "/course?userid=" +
  7635. this.userid +
  7636. "&oid=" +
  7637. this.oid +
  7638. "&org=" +
  7639. this.org +
  7640. "&role=" +
  7641. this.role
  7642. );
  7643. }
  7644. },
  7645. },
  7646. methods: {
  7647. tableRowClassName({ row, rowIndex }) {
  7648. if ((rowIndex + 1) % 2 === 0) {
  7649. return "even_row";
  7650. } else {
  7651. return "";
  7652. }
  7653. },
  7654. close() {
  7655. this.cetIndex = "";
  7656. this.cettIndex = "";
  7657. this.templateName = "";
  7658. this.cetBoxDialog = false;
  7659. },
  7660. openAI() {
  7661. top.postMessage({ tools: "64" }, "*");
  7662. },
  7663. setMan() {
  7664. // let teacherJuri = this.teacherJuri2;
  7665. this.ManAarray = [];
  7666. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7667. if (_user.indexOf(this.userid) == -1) {
  7668. _user.push(this.userid);
  7669. }
  7670. if (_user.indexOf(this.courseUserid) == -1) {
  7671. _user.push(this.courseUserid);
  7672. }
  7673. let params = {
  7674. uid: _user.join(","),
  7675. };
  7676. this.ajax
  7677. .get(this.$store.state.api + "getAllUserById", params)
  7678. .then((res) => {
  7679. let teacherJuri = res.data[0];
  7680. this.ManAarray = teacherJuri;
  7681. })
  7682. .catch((err) => {
  7683. console.error(err);
  7684. });
  7685. },
  7686. previewImg(url) {
  7687. this.$hevueImgPreview(url);
  7688. },
  7689. btnDisplay(bool) {
  7690. this.isBtnDisplay = bool;
  7691. },
  7692. stepDisplay(bool) {
  7693. this.isStepDisplay = bool;
  7694. },
  7695. scrollChange() {
  7696. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7697. },
  7698. addHw(e) {
  7699. var el = e.currentTarget;
  7700. el.getElementsByTagName("input")[0].click();
  7701. },
  7702. change(val) {
  7703. if (this.dialogVisible1) {
  7704. this.tdetail = val;
  7705. } else if (this.dialogVisible6) {
  7706. this.AttText.text = val;
  7707. } else if (this.dialogVisible2) {
  7708. this.cTemplate = val;
  7709. } else if (this.dialogVisibleTable) {
  7710. this.tableJson.text = val;
  7711. }
  7712. this.$forceUpdate();
  7713. console.log(val);
  7714. },
  7715. change2(val) {
  7716. console.log(val);
  7717. this.$forceUpdate();
  7718. },
  7719. handleClose(done) {
  7720. done();
  7721. },
  7722. closePan(tool) {
  7723. if (tool == 15) {
  7724. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7725. this.dialogVisible8 = false;
  7726. } else {
  7727. this.closeConfirm(tool);
  7728. }
  7729. } else if (tool == 4) {
  7730. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7731. this.dialogVisible5 = false;
  7732. } else {
  7733. this.closeConfirm(tool);
  7734. }
  7735. } else if (tool == 45) {
  7736. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7737. this.dialogVisibleChoice = false;
  7738. } else {
  7739. this.closeConfirm(tool);
  7740. }
  7741. } else if (tool == 41) {
  7742. if (
  7743. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7744. ) {
  7745. this.dialogVisibleSelect = false;
  7746. } else {
  7747. this.closeConfirm(tool);
  7748. }
  7749. } else if (tool == 47) {
  7750. if (
  7751. JSON.stringify(this.sentenceList) ==
  7752. JSON.stringify(this.sentenceList2)
  7753. ) {
  7754. this.dialogVisibleSentence = false;
  7755. } else {
  7756. this.closeConfirm(tool);
  7757. }
  7758. } else if (tool == 69) {
  7759. if (
  7760. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7761. ) {
  7762. this.englishDialogVisible = false;
  7763. } else {
  7764. this.closeConfirm(tool);
  7765. }
  7766. }
  7767. },
  7768. closeConfirm(tool) {
  7769. this.$confirm("是否保存已编辑内容?", "提示", {
  7770. confirmButtonText: "保存",
  7771. cancelButtonText: "不保存",
  7772. type: "warning",
  7773. })
  7774. .then(() => {
  7775. if (tool == 15) {
  7776. this.addAnswer();
  7777. } else if (tool == 4) {
  7778. this.addAsk();
  7779. } else if (tool == 45) {
  7780. this.addTest();
  7781. } else if (tool == 41) {
  7782. this.addSelectAnswer();
  7783. } else if (tool == 47) {
  7784. this.addSentenceTool();
  7785. } else if (tool == 69) {
  7786. this.addEnglish();
  7787. }
  7788. })
  7789. .catch(() => {
  7790. if (tool == 15) {
  7791. this.dialogVisible8 = false;
  7792. } else if (tool == 4) {
  7793. this.dialogVisible5 = false;
  7794. } else if (tool == 45) {
  7795. this.dialogVisibleChoice = false;
  7796. } else if (tool == 41) {
  7797. this.dialogVisibleSelect = false;
  7798. } else if (tool == 47) {
  7799. this.dialogVisibleSentence = false;
  7800. } else if (tool == 69) {
  7801. this.englishDialogVisible = false;
  7802. }
  7803. });
  7804. },
  7805. addEnglish(jsonType) {
  7806. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7807. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7808. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7809. if (
  7810. this.englishList.engTitle == "" ||
  7811. this.englishList.englishText == ""
  7812. ) {
  7813. this.$message.error("请将内容填写完整!");
  7814. return;
  7815. }
  7816. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7817. this.taskCount
  7818. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7819. this.englishList = {};
  7820. if (jsonType && jsonType == 1) {
  7821. this.englishDialogVisible = true;
  7822. } else {
  7823. this.englishDialogVisible = false;
  7824. }
  7825. if (
  7826. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7827. .toolChoose[this.toolIndex].tool != 69
  7828. ) {
  7829. this.addTools(69, this.taskCount, this.toolIndex);
  7830. }
  7831. },
  7832. imgChange2(i, j) {
  7833. var _tmp = this.testJson.testJson[i].checkList[j];
  7834. this.noneBtnImg = _tmp.length >= 1;
  7835. },
  7836. imgChange3(i) {
  7837. var _tmp = this.testJson.testJson[i];
  7838. this.noneBtnImg = _tmp.length >= 1;
  7839. },
  7840. imgChange1(file, fileList, type, itemTaskIndex) {
  7841. if (type == 1) {
  7842. var _tmp = this.cover;
  7843. } else if (
  7844. type == 2 ||
  7845. type == 3 ||
  7846. type == 6 ||
  7847. type == 7 ||
  7848. type == 8
  7849. ) {
  7850. var _tmp =
  7851. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7852. .chapterData;
  7853. } else if (type == 4) {
  7854. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7855. } else {
  7856. var _tmp =
  7857. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7858. .homeworkList;
  7859. }
  7860. this.noneBtnImg = _tmp.length >= 1;
  7861. },
  7862. goTo(path) {
  7863. this.$router.push(path);
  7864. },
  7865. guid() {
  7866. var _num,
  7867. i,
  7868. _guid = "";
  7869. for (i = 0; i < 32; i++) {
  7870. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7871. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7872. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7873. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7874. _guid += "-";
  7875. }
  7876. }
  7877. return _guid;
  7878. },
  7879. retrunCourse() {
  7880. if(this.istemplate == 1){
  7881. this.goTo(
  7882. "/course?userid=" +
  7883. this.userid +
  7884. "&oid=" +
  7885. this.oid +
  7886. "&org=" +
  7887. this.org +
  7888. "&role=" +
  7889. this.role
  7890. );
  7891. return
  7892. }
  7893. this.$confirm("是否保存已编辑内容?", "提示", {
  7894. confirmButtonText: "保存",
  7895. cancelButtonText: "不保存",
  7896. distinguishCancelAndClose: true,
  7897. type: "warning",
  7898. })
  7899. .then(() => {
  7900. if (this.taskLoading.length) {
  7901. let _pan = 1
  7902. for(var k = 0; k < this.taskLoading.length; k++){
  7903. if(this.taskLoading[k]){
  7904. this.$message({
  7905. message: `请等待任务${k+1}回答完毕后再保存`,
  7906. type: "warning"
  7907. });
  7908. _pan = 2
  7909. }
  7910. }
  7911. if(_pan == 2){
  7912. return
  7913. }
  7914. }
  7915. if(this.taskGLoading.length){
  7916. let _pan = 1
  7917. for(var k = 0; k < this.taskGLoading.length; k++){
  7918. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  7919. this.$message({
  7920. message: `请等待任务${k+1}回答完毕后再保存`,
  7921. type: "warning"
  7922. });
  7923. _pan = 2
  7924. }
  7925. }
  7926. if(_pan == 2){
  7927. return
  7928. }
  7929. }
  7930. if (this.cid == "" || this.cid == undefined) {
  7931. if (this.courseName == "") {
  7932. this.$message.error("请补充填写课程名称");
  7933. return;
  7934. } else {
  7935. this.addWork();
  7936. }
  7937. this.steps = 4;
  7938. } else {
  7939. if (this.courseName == "") {
  7940. this.$message.error("请补充填写课程名称");
  7941. return;
  7942. } else {
  7943. if (this.userid != this.courseUserid && this.role != "1") {
  7944. this.updateWork2();
  7945. } else {
  7946. this.updateWork();
  7947. }
  7948. this.steps = 4;
  7949. }
  7950. }
  7951. })
  7952. .catch((v) => {
  7953. console.log(v);
  7954. if (v == "cancel") {
  7955. this.goTo(
  7956. "/course?userid=" +
  7957. this.userid +
  7958. "&oid=" +
  7959. this.oid +
  7960. "&org=" +
  7961. this.org +
  7962. "&role=" +
  7963. this.role
  7964. );
  7965. }
  7966. });
  7967. },
  7968. lastSteps() {
  7969. if (this.steps == 4) {
  7970. this.goTo(
  7971. "/course?userid=" +
  7972. this.userid +
  7973. "&oid=" +
  7974. this.oid +
  7975. "&org=" +
  7976. this.org +
  7977. "&role=" +
  7978. this.role
  7979. );
  7980. } else {
  7981. // if (this.cidType == 0) {
  7982. // this.steps--;
  7983. // if (this.steps == 1) {
  7984. // setTimeout(() => {
  7985. // this.checkEva(this.checkId);
  7986. // setTimeout(() => {
  7987. // this.checkEva(this.checkId);
  7988. // }, 100);
  7989. // }, 100);
  7990. // }
  7991. // } else {
  7992. if (this.steps == 3) {
  7993. this.steps = 1;
  7994. setTimeout(() => {
  7995. this.checkEva(this.checkId);
  7996. setTimeout(() => {
  7997. this.checkEva(this.checkId);
  7998. }, 100);
  7999. }, 100);
  8000. }
  8001. // }
  8002. }
  8003. },
  8004. navSteps(s) {
  8005. if (this.courseName == "") {
  8006. this.$message.error("请补充填写课程名称");
  8007. return;
  8008. }
  8009. if (this.cidType == 0) {
  8010. if (this.steps == 1) {
  8011. if (this.cid == "" || this.cid == undefined) {
  8012. this.addWork();
  8013. } else {
  8014. if (this.userid != this.courseUserid && this.role != "1") {
  8015. this.updateWork2();
  8016. } else {
  8017. this.updateWork();
  8018. }
  8019. }
  8020. }
  8021. if (s == 1) {
  8022. this.steps = 1;
  8023. setTimeout(() => {
  8024. this.checkEva(this.checkId);
  8025. setTimeout(() => {
  8026. this.checkEva(this.checkId);
  8027. }, 100);
  8028. }, 100);
  8029. }
  8030. if (s == 2) {
  8031. this.steps = 2;
  8032. }
  8033. if (s == 3) {
  8034. this.cTemplate = this.templateC.content;
  8035. this.dialogVisible2 = false;
  8036. this.steps = 3;
  8037. this.isClickColor = 1;
  8038. this.unitJson[
  8039. this.unitIndex
  8040. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8041. this.$forceUpdate();
  8042. setTimeout(() => {
  8043. this.checkEva(this.checkId);
  8044. setTimeout(() => {
  8045. this.checkEva(this.checkId);
  8046. }, 100);
  8047. }, 1000);
  8048. }
  8049. } else {
  8050. if (this.steps == 1) {
  8051. if (this.cid == "" || this.cid == undefined) {
  8052. this.addWork();
  8053. } else {
  8054. if (this.userid != this.courseUserid && this.role != "1") {
  8055. this.updateWork2();
  8056. } else {
  8057. this.updateWork();
  8058. }
  8059. }
  8060. }
  8061. if (s == 1) {
  8062. this.steps = 1;
  8063. setTimeout(() => {
  8064. this.checkEva(this.checkId);
  8065. setTimeout(() => {
  8066. this.checkEva(this.checkId);
  8067. }, 100);
  8068. }, 100);
  8069. }
  8070. if (s == 3) {
  8071. this.cTemplate = this.templateC.content;
  8072. this.dialogVisible2 = false;
  8073. this.steps = 3;
  8074. this.isClickColor = 1;
  8075. this.unitJson[
  8076. this.unitIndex
  8077. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8078. this.$forceUpdate();
  8079. setTimeout(() => {
  8080. this.checkEva(this.checkId);
  8081. setTimeout(() => {
  8082. this.checkEva(this.checkId);
  8083. }, 100);
  8084. }, 1000);
  8085. }
  8086. }
  8087. this.$refs.stepBox.scrollTop = 0;
  8088. },
  8089. nextSteps(clickType, ttype) {
  8090. if(!this.time()){
  8091. return
  8092. }
  8093. // if (this.cidType == 1) {
  8094. if (this.steps == 1) {
  8095. if (this.courseName != "") {
  8096. if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8097. // this.$message({
  8098. // message: "请回答完毕后再次发送",
  8099. // type: "warning"
  8100. // });
  8101. if(this.ttaskDetailLoading5.length){
  8102. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8103. this.$message({
  8104. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8105. type: "warning"
  8106. });
  8107. }
  8108. if(this.ttaskDetailLoading.length){
  8109. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8110. this.$message({
  8111. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8112. type: "warning"
  8113. });
  8114. }
  8115. if(this.cpotetLoading.cpote1){
  8116. this.$message({
  8117. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8118. type: "warning"
  8119. });
  8120. }
  8121. if(this.cpotetLoading.cpote2){
  8122. this.$message({
  8123. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8124. type: "warning"
  8125. });
  8126. }
  8127. if(this.cpotetLoading.cpote3){
  8128. this.$message({
  8129. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8130. type: "warning"
  8131. });
  8132. }
  8133. if(this.cpotetLoading.cpote4){
  8134. this.$message({
  8135. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8136. type: "warning"
  8137. });
  8138. }
  8139. return;
  8140. }
  8141. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8142. if(!this.courseText && !this.teacherCourseText){
  8143. this.$message.error("请生成简要描述后再生成大纲");
  8144. return;
  8145. }
  8146. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8147. this.openAiDialog(clickType, 'aiOutline2')
  8148. }else {
  8149. this.openAiDialog(clickType, 'aiOutline')
  8150. }
  8151. return;
  8152. }
  8153. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8154. let _type = ''
  8155. if(this.cpoteType == 0){
  8156. _type = 'aiCpote1'
  8157. }else if(this.cpoteType == 1){
  8158. _type = 'aiCpote2'
  8159. }else if(this.cpoteType == 2){
  8160. _type = 'aiCpote3'
  8161. }else if(this.cpoteType == 3){
  8162. _type = 'aiCpote4'
  8163. }
  8164. this.cpoteType++
  8165. this.openAiDialog(clickType, _type)
  8166. return;
  8167. }
  8168. // if (!this.isOutline2) {
  8169. // this.openAiDialog(clickType, 'aiTeacher')
  8170. // return;
  8171. // }
  8172. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8173. this.openAiDialog(clickType, 'aiTeacher3')
  8174. return;
  8175. }
  8176. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8177. this.openAiDialog(clickType, 'aiTeacher2')
  8178. return;
  8179. }
  8180. let _pan2 = 1
  8181. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8182. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8183. _pan2 = 2
  8184. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8185. break;
  8186. }
  8187. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8188. _pan2 = 2
  8189. this.$message.error(`请完善任务${k+1}的课程教案`)
  8190. break;
  8191. }
  8192. }
  8193. if(_pan2 == 2){
  8194. return;
  8195. }
  8196. const functionA = () => {
  8197. setTimeout(() => {
  8198. this.loading = false
  8199. this.steps = 3;
  8200. }, 0)
  8201. this.isClickColor = 1;
  8202. this.unitJson[
  8203. this.unitIndex
  8204. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8205. this.$forceUpdate();
  8206. setTimeout(() => {
  8207. this.checkEva(this.checkId);
  8208. setTimeout(() => {
  8209. this.checkEva(this.checkId);
  8210. }, 100);
  8211. }, 1000);
  8212. if (this.cid == "" || this.cid == undefined) {
  8213. this.addWork();
  8214. } else {
  8215. if (this.userid != this.courseUserid && this.role != "1") {
  8216. this.updateWork2();
  8217. } else {
  8218. this.updateWork();
  8219. }
  8220. }
  8221. }
  8222. if (this.cid) {
  8223. this.loading = true
  8224. functionA()
  8225. } else {
  8226. // if(ttype == 2){
  8227. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8228. // }else {
  8229. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8230. // }
  8231. }
  8232. } else {
  8233. this.$message.error("请补充填写课程名称");
  8234. return;
  8235. }
  8236. } else if (this.steps == 3) {
  8237. if (this.taskLoading.length) {
  8238. let _pan = 1
  8239. for(var k = 0; k < this.taskLoading.length; k++){
  8240. if(this.taskLoading[k]){
  8241. this.$message({
  8242. message: `请等待任务${k+1}回答完毕后再上传`,
  8243. type: "warning"
  8244. });
  8245. _pan = 2
  8246. }
  8247. }
  8248. if(_pan == 2){
  8249. return
  8250. }
  8251. }
  8252. if(this.taskGLoading.length){
  8253. let _pan = 1
  8254. for(var k = 0; k < this.taskGLoading.length; k++){
  8255. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8256. this.$message({
  8257. message: `请等待任务${k+1}回答完毕后再保存`,
  8258. type: "warning"
  8259. });
  8260. _pan = 2
  8261. }
  8262. }
  8263. if(_pan == 2){
  8264. return
  8265. }
  8266. }
  8267. if (this.cid == "" || this.cid == undefined) {
  8268. if (this.courseName == "") {
  8269. this.$message.error("请补充填写课程名称");
  8270. return;
  8271. } else {
  8272. this.addWork();
  8273. this.steps++;
  8274. }
  8275. } else {
  8276. if (this.courseName == "") {
  8277. this.$message.error("请补充填写课程名称");
  8278. return;
  8279. } else {
  8280. if (this.userid != this.courseUserid && this.role != "1") {
  8281. this.updateWork2();
  8282. } else {
  8283. this.updateWork();
  8284. }
  8285. this.steps++;
  8286. }
  8287. }
  8288. }
  8289. // } else {
  8290. // if (this.steps == 1) {
  8291. // if (this.courseName != "") {
  8292. // if (this.cid == "" || this.cid == undefined) {
  8293. // this.addWork();
  8294. // } else {
  8295. // if (this.userid != this.courseUserid && this.role != "1") {
  8296. // // this.updateWork2();
  8297. // } else {
  8298. // this.updateWork();
  8299. // }
  8300. // }
  8301. // this.steps++;
  8302. // } else {
  8303. // this.$message.error("请补充填写课程名称");
  8304. // return;
  8305. // }
  8306. // } else if (this.steps == 2) {
  8307. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8308. // this.cTemplate = this.templateC.content;
  8309. // }
  8310. // this.dialogVisible2 = false;
  8311. // this.steps++;
  8312. // setTimeout(() => {
  8313. // this.checkEva(this.checkId);
  8314. // setTimeout(() => {
  8315. // this.checkEva(this.checkId);
  8316. // }, 100);
  8317. // }, 1000);
  8318. // } else if (this.steps == 3) {
  8319. // if (this.cid == "" || this.cid == undefined) {
  8320. // if (this.courseName == "") {
  8321. // this.$message.error("请补充填写课程名称");
  8322. // return;
  8323. // } else {
  8324. // this.addWork();
  8325. // this.steps++;
  8326. // }
  8327. // } else {
  8328. // if (this.courseName == "") {
  8329. // this.$message.error("请补充填写课程名称");
  8330. // return;
  8331. // } else {
  8332. // if (this.userid != this.courseUserid && this.role != "1") {
  8333. // this.updateWork2();
  8334. // } else {
  8335. // this.updateWork();
  8336. // }
  8337. // this.steps++;
  8338. // }
  8339. // }
  8340. // }
  8341. // }
  8342. this.$refs.stepBox.scrollTop = 0;
  8343. },
  8344. unitSet(i) {
  8345. if (this.unitIndex == i) {
  8346. return;
  8347. }
  8348. this.unitIndex = i;
  8349. this.isClickColor = 1;
  8350. // this.$refs.rightboxR.scrollTop = 0;
  8351. this.$refs.unitBox.scrollTop = 0;
  8352. },
  8353. panUnitJson() {
  8354. let _unitIndex = this.unitIndex;
  8355. let cPan = 1;
  8356. for (
  8357. var j = 0;
  8358. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8359. j++
  8360. ) {
  8361. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8362. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8363. j
  8364. ].proVisible2 = false;
  8365. if (
  8366. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8367. .length > 1
  8368. ) {
  8369. for (
  8370. var z = 0;
  8371. z <
  8372. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8373. .length;
  8374. z++
  8375. ) {
  8376. if (
  8377. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8378. z
  8379. ].tool.length
  8380. ) {
  8381. this.$message.error("请把工具添加完整");
  8382. cPan = 2;
  8383. break;
  8384. }
  8385. }
  8386. }
  8387. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8388. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8389. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8390. (ele) => {
  8391. return ele.value != "";
  8392. }
  8393. );
  8394. }
  8395. }
  8396. return cPan;
  8397. },
  8398. unitOpen(i) {
  8399. if (this.unitJson[i].toolOpen) {
  8400. this.unitJson[i].toolOpen = false;
  8401. } else {
  8402. this.unitJson[i].toolOpen = true;
  8403. }
  8404. this.updateWork();
  8405. this.$forceUpdate();
  8406. },
  8407. unitSet2(i) {
  8408. if (this.panUnitJson() == 2) {
  8409. return;
  8410. }
  8411. // if(this.unitJson[i].toolOpen){
  8412. // this.unitJson[i].toolOpen = false
  8413. // this.updateWork()
  8414. // this.$forceUpdate()
  8415. // return
  8416. // }else {
  8417. this.unitJson[i].toolOpen = true;
  8418. // }
  8419. this.$forceUpdate();
  8420. if (this.unitIndex == i) {
  8421. return;
  8422. }
  8423. this.unitIndex = i;
  8424. this.isClickColor = 1;
  8425. // this.$refs.rightboxR.scrollTop = 0;
  8426. this.$refs.unitBox.scrollTop = 0;
  8427. },
  8428. updateCourseState(i) {
  8429. let params = [
  8430. {
  8431. cid: this.cid,
  8432. state: i,
  8433. },
  8434. ];
  8435. this.ajax
  8436. .post(this.$store.state.api + "updateCourseMode", params)
  8437. .then((res) => {
  8438. this.courseState = i;
  8439. })
  8440. .catch((err) => {
  8441. this.$message.error("网络不佳");
  8442. console.error(err);
  8443. });
  8444. },
  8445. addtips(){
  8446. let params = [
  8447. {
  8448. cid: this.cid,
  8449. tips: JSON.stringify(this.aiJson),
  8450. tid: this.templateid
  8451. },
  8452. ];
  8453. this.ajax
  8454. .post(this.$store.state.api + "addTips", params)
  8455. .then((res) => {
  8456. })
  8457. .catch((err) => {
  8458. this.$message.error("网络不佳");
  8459. console.error(err);
  8460. });
  8461. },
  8462. openSaveTips(){
  8463. this.dialogVisibleTips = true
  8464. },
  8465. time() {
  8466. if (!this.now) {
  8467. this.now = new Date().getTime();
  8468. return true;
  8469. } else {
  8470. let time = new Date().getTime();
  8471. if (time - this.now > 1000) {
  8472. this.now = time;
  8473. return true;
  8474. } else {
  8475. return false;
  8476. }
  8477. }
  8478. },
  8479. deleteUnit(i) {
  8480. var _this = this;
  8481. if (i == 0 && _this.unitJson.length == 1) {
  8482. _this
  8483. .$confirm("确定切换成任务模式吗?", "提示", {
  8484. confirmButtonText: "确定",
  8485. cancelButtonText: "取消",
  8486. type: "warning",
  8487. })
  8488. .then(() => {
  8489. _this.unitJson[i].dyName = "";
  8490. // _this.updateCourseState(2);
  8491. })
  8492. .catch(() => {
  8493. return;
  8494. });
  8495. } else {
  8496. _this
  8497. .$confirm("确定删除此阶段吗?", "提示", {
  8498. confirmButtonText: "确定",
  8499. cancelButtonText: "取消",
  8500. type: "warning",
  8501. })
  8502. .then(() => {
  8503. _this.isDelete = 2;
  8504. // _this.unitIndex = _this.unitIndex - 1;
  8505. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8506. // _this.$message.success("删除成功");
  8507. })
  8508. .catch(() => {
  8509. return;
  8510. });
  8511. }
  8512. },
  8513. deleteWork(chapid) {
  8514. let params = [
  8515. {
  8516. cid: this.cid,
  8517. chapters: JSON.stringify(this.unitJson),
  8518. uid: this.userid,
  8519. chapid: chapid,
  8520. },
  8521. ];
  8522. this.ajax
  8523. .post(this.$store.state.api + "deleteWork", params)
  8524. .then((res) => {
  8525. this.$message({
  8526. message: "删除成功",
  8527. type: "success",
  8528. });
  8529. let task = JSON.parse(
  8530. JSON.stringify(
  8531. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8532. )
  8533. );
  8534. this.unitJson.splice(this.unitIndex, 1);
  8535. if (this.unitIndex == 0) {
  8536. this.unitIndex = 0;
  8537. } else {
  8538. this.unitIndex = this.unitIndex - 1;
  8539. }
  8540. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8541. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8542. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8543. ...task,
  8544. ];
  8545. }
  8546. })
  8547. .catch((err) => {
  8548. this.$message.error("网络不佳");
  8549. console.error(err);
  8550. });
  8551. },
  8552. deleteTool(itemTaskIndex, i) {
  8553. var _this = this;
  8554. if (_this.time()) {
  8555. _this
  8556. .$confirm("确定删除此工具吗?", "提示", {
  8557. confirmButtonText: "确定",
  8558. cancelButtonText: "取消",
  8559. type: "warning",
  8560. })
  8561. .then(() => {
  8562. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8563. itemTaskIndex
  8564. ].toolChoose.splice(i, 1);
  8565. _this.$message.success("删除成功");
  8566. })
  8567. .catch(() => {
  8568. return;
  8569. });
  8570. }
  8571. },
  8572. deleteSentence(i) {
  8573. var _this = this;
  8574. _this
  8575. .$confirm("确定删除此题目吗?", "提示", {
  8576. confirmButtonText: "确定",
  8577. cancelButtonText: "取消",
  8578. type: "warning",
  8579. })
  8580. .then(() => {
  8581. _this.sentenceList.splice(i, 1);
  8582. _this.$message.success("删除成功");
  8583. })
  8584. .catch(() => {
  8585. return;
  8586. });
  8587. },
  8588. deleteS(s, i, j) {
  8589. this.sentenceList[i].addSentence.splice(j, 1);
  8590. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8591. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8592. this.sentenceList[i].rightAnswer.splice(a, 1);
  8593. }
  8594. },
  8595. openT() {
  8596. top.postMessage({ tools: "25" }, "*");
  8597. },
  8598. deleteTask(i) {
  8599. var _this = this;
  8600. if (_this.time()) {
  8601. _this
  8602. .$confirm(
  8603. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8604. 1 ==
  8605. i
  8606. ? "确定删除此任务吗?"
  8607. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8608. "提示",
  8609. {
  8610. confirmButtonText: "确定",
  8611. cancelButtonText: "取消",
  8612. type: "warning",
  8613. }
  8614. )
  8615. .then(() => {
  8616. if (i == 0 && _this.courseState == 4) {
  8617. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8618. i + 1
  8619. ].chapterData = JSON.parse(
  8620. JSON.stringify(
  8621. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8622. .chapterData
  8623. )
  8624. );
  8625. }
  8626. _this.$forceUpdate();
  8627. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8628. i,
  8629. 1
  8630. );
  8631. _this.$message.success("删除成功");
  8632. })
  8633. .catch(() => {
  8634. return;
  8635. });
  8636. }
  8637. },
  8638. deleteTask2(i) {
  8639. var _this = this;
  8640. if (_this.time()) {
  8641. _this
  8642. .$confirm(
  8643. "确定删除此任务吗?",
  8644. "提示",
  8645. {
  8646. confirmButtonText: "确定",
  8647. cancelButtonText: "取消",
  8648. type: "warning",
  8649. }
  8650. )
  8651. .then(() => {
  8652. if (i == 0 && _this.courseState == 4) {
  8653. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8654. i + 1
  8655. ].chapterData = JSON.parse(
  8656. JSON.stringify(
  8657. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8658. .chapterData
  8659. )
  8660. );
  8661. }
  8662. _this.$forceUpdate();
  8663. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8664. i,
  8665. 1
  8666. );
  8667. _this.$message.success("删除成功");
  8668. })
  8669. .catch(() => {
  8670. return;
  8671. });
  8672. }
  8673. },
  8674. handlePictureCardPreview(file) {
  8675. this.dialogImageUrl = file.url;
  8676. },
  8677. clean(i, c) {
  8678. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8679. },
  8680. handle_remove1(file, fileList, type) {
  8681. var _tmp = this.cover;
  8682. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8683. // if (_tmp[i].uid == file.uid) {
  8684. // _tmp.splice(i, 1);
  8685. // break;
  8686. // }
  8687. // this.cover = _tmp;
  8688. // }
  8689. this.cover = [];
  8690. this.noneBtnImg = this.cover.length >= 1;
  8691. this.isSysPic = false;
  8692. this.isSysPic2 = false;
  8693. this.$forceUpdate();
  8694. },
  8695. addImg(e) {
  8696. var el = e.currentTarget;
  8697. el.getElementsByTagName("input")[0].click();
  8698. e.target.value = "";
  8699. },
  8700. addChaptersTools(i) {
  8701. this.chapTools = [
  8702. {
  8703. tools: [],
  8704. toolDetail: "",
  8705. },
  8706. ];
  8707. this.chapCount = i;
  8708. this.dialogVisible4 = true;
  8709. },
  8710. isNoFinsh() {
  8711. this.$message.warning("功能正在开发中");
  8712. },
  8713. addAttText(i) {
  8714. this.AttText = {
  8715. title: "",
  8716. text: "",
  8717. };
  8718. this.taskCount = i;
  8719. this.AttTextType = 0;
  8720. this.$forceUpdate();
  8721. this.dialogVisible6 = true;
  8722. setTimeout(() => {
  8723. this.$refs["fuInput"].focus();
  8724. }, 100);
  8725. },
  8726. openLine(i) {
  8727. this.line = "";
  8728. this.lineCount = i;
  8729. this.lineType = 0;
  8730. this.$forceUpdate();
  8731. this.dialogVisible7 = true;
  8732. },
  8733. pasteLine(i) {
  8734. navigator.clipboard
  8735. .readText()
  8736. .then((v) => {
  8737. console.log("获取剪贴板成功:", v);
  8738. const html = v;
  8739. const regex = /src="(.*?)"/g;
  8740. const match = regex.exec(html);
  8741. if (match && match[1]) {
  8742. console.log(match[1]);
  8743. this.$message.success("粘贴成功");
  8744. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8745. i
  8746. ].chapterData.unshift({
  8747. name: "链接",
  8748. title: "嵌入代码",
  8749. url: match[1],
  8750. type: 8,
  8751. });
  8752. } else {
  8753. // console.log("未找到包含 src 属性的 iframe");
  8754. this.$message.error(
  8755. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8756. );
  8757. }
  8758. })
  8759. .catch((v) => {
  8760. console.log("获取剪贴板失败: ", v);
  8761. });
  8762. },
  8763. openSource(i) {
  8764. this.lineCount = i;
  8765. this.sourceData = {};
  8766. this.dialogVisibleSource = true;
  8767. this.updateSourcePan = false;
  8768. },
  8769. openAiCreate(i){
  8770. this.lineCount = i;
  8771. this.dialogVisibleAiCreate = true;
  8772. },
  8773. createAiPpt(json){
  8774. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8775. this.dialogVisibleAiCreate = false;
  8776. },
  8777. openAiCreateVideo(i){
  8778. this.lineCount = i;
  8779. this.dialogVisibleAiCreateVideo = true;
  8780. },
  8781. createAiVideo(json){
  8782. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8783. // this.dialogVisibleAiCreateVideo = false;
  8784. },
  8785. async createTeacherAn(index){
  8786. // this.lineCount = index;
  8787. this.loading = true
  8788. let md = new MarkdownIt();
  8789. if(this.courseState == 4){
  8790. // if(index == 0 || index){
  8791. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8792. // let name = _task.task+'-教案'
  8793. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8794. // await this.generate(name, _html, 0)
  8795. // }else {
  8796. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8797. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8798. let name = _task.task+'-教案'
  8799. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8800. await this.generate(name, _html, 0)
  8801. }
  8802. // }
  8803. }else if(this.courseState == 5){
  8804. if(index == 0 || index){
  8805. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8806. let name = _task.task+'-教案'
  8807. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8808. await this.generate(name, _html, index)
  8809. }else {
  8810. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8811. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8812. let name = _task.task+'-教案'
  8813. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8814. await this.generate(name, _html, i)
  8815. }
  8816. }
  8817. }
  8818. },
  8819. async generate(a, html, index) {
  8820. // <html lang="en">
  8821. // 将html文件中需要用到的数据挂载到store上
  8822. const content = `<!DOCTYPE html>
  8823. <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'>
  8824. <head>
  8825. <!--[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]-->
  8826. <meta charset="UTF-8">
  8827. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8828. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8829. <title>${a}</title>
  8830. <style>
  8831. table {
  8832. border-collapse: collapse; /* 折叠边框 */
  8833. width: 100%;
  8834. }
  8835. th, td {
  8836. border: 1px solid black; /* 线条样式 */
  8837. padding: 8px;
  8838. text-align: left;
  8839. }
  8840. </style>
  8841. </head>
  8842. <body>
  8843. ${html}
  8844. </body>
  8845. </html>`;
  8846. // debugger
  8847. const blob = htmlDocx.asBlob(content)
  8848. // debugger
  8849. let dname = a + ".docx";
  8850. // 创建文件流
  8851. // 创建bolb实例时,内容一定要放在[]中
  8852. // const blob = new Blob([content], {
  8853. // type: "text/plain;charset='utf-8'",
  8854. // });
  8855. // const file = new File([blob], dname, { type: 'application/msword' });
  8856. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  8857. await this.beforeUploadHtml(file, index)
  8858. },
  8859. beforeUploadHtml(event, index) {
  8860. var file = event;
  8861. var credentials = {
  8862. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8863. secretAccessKey: "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",
  8864. }; //秘钥形式的登录上传
  8865. window.AWS.config.update(credentials);
  8866. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8867. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8868. var _this = this;
  8869. if (file) {
  8870. var params = {
  8871. Key:
  8872. file.name.split(".")[0] +
  8873. new Date().getTime() +
  8874. "." +
  8875. file.name.split(".")[file.name.split(".").length - 1],
  8876. ContentType: file.type,
  8877. Body: file,
  8878. "Access-Control-Allow-Credentials": "*",
  8879. ACL: "public-read",
  8880. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8881. var options = {
  8882. partSize: 2048 * 1024 * 1024,
  8883. queueSize: 2,
  8884. leavePartsOnError: true,
  8885. };
  8886. bucket
  8887. .upload(params, options)
  8888. .on("httpUploadProgress", function (evt) {
  8889. //这里可以写进度条
  8890. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8891. })
  8892. .send(function (err, data) {
  8893. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8894. _this.loading = false
  8895. }
  8896. if(_this.courseState == 5){
  8897. _this.loading = false
  8898. }
  8899. if (err) {
  8900. _this.$message.error("上传失败");
  8901. } else {
  8902. let _index = 0
  8903. // if(_this.lineCount == 0 || _this.lineCount){
  8904. // _index = _this.lineCount
  8905. // }else {
  8906. _index = index
  8907. // }
  8908. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8909.                   name: file.name,
  8910.                   url: data.Location,
  8911.                   type: 3,
  8912.                 })
  8913. console.log(data.Location);
  8914. }
  8915. });
  8916. }
  8917. },
  8918. async generate2(a, html, index, callback) {
  8919. // 将html文件中需要用到的数据挂载到store上
  8920. const content = `<!DOCTYPE html>
  8921. <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'>
  8922. <head>
  8923. <!--[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]-->
  8924. <meta charset="UTF-8">
  8925. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8926. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8927. <title>${a}</title>
  8928. <style>
  8929. table {
  8930. border-collapse: collapse; /* 折叠边框 */
  8931. width: 100%;
  8932. }
  8933. th, td {
  8934. border: 1px solid black; /* 线条样式 */
  8935. padding: 8px;
  8936. text-align: left;
  8937. }
  8938. </style>
  8939. </head>
  8940. <body>
  8941. ${html}
  8942. </body>
  8943. </html>`;
  8944. const blob = htmlDocx.asBlob(content)
  8945. // debugger
  8946. let dname = a + ".docx";
  8947. // 创建文件流
  8948. // 创建bolb实例时,内容一定要放在[]中
  8949. // const blob = new Blob([content], {
  8950. // type: "text/plain;charset='utf-8'",
  8951. // });
  8952. // const file = new File([blob], dname, { type: 'application/msword' });
  8953. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  8954. await this.beforeUploadHtml2(file, index, callback)
  8955. },
  8956. beforeUploadHtml2(event, index, callback) {
  8957. var file = event;
  8958. var credentials = {
  8959. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8960. secretAccessKey: "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",
  8961. }; //秘钥形式的登录上传
  8962. window.AWS.config.update(credentials);
  8963. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8964. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8965. var _this = this;
  8966. if (file) {
  8967. var params = {
  8968. Key:
  8969. file.name.split(".")[0] +
  8970. new Date().getTime() +
  8971. "." +
  8972. file.name.split(".")[file.name.split(".").length - 1],
  8973. ContentType: file.type,
  8974. Body: file,
  8975. "Access-Control-Allow-Credentials": "*",
  8976. ACL: "public-read",
  8977. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8978. var options = {
  8979. partSize: 2048 * 1024 * 1024,
  8980. queueSize: 2,
  8981. leavePartsOnError: true,
  8982. };
  8983. bucket
  8984. .upload(params, options)
  8985. .on("httpUploadProgress", function (evt) {
  8986. //这里可以写进度条
  8987. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8988. })
  8989. .send(async function (err, data) {
  8990. if(_this.courseState == 5){
  8991. _this.loading = false
  8992. }
  8993. if (err) {
  8994. callback ? callback() : ''
  8995. _this.$message.error("上传失败");
  8996. } else {
  8997. let fileid = await _this.createFileid(data.Location)
  8998. // _this.cankaoInfoData.push({
  8999. //                   name: file.name,
  9000. //                   url: data.Location,
  9001. //                   type: 3,
  9002. // fileid: fileid,
  9003. //   })
  9004. _this.infoData2.push({
  9005.                   name: file.name,
  9006.                   url: data.Location,
  9007.                   type: 3,
  9008. fileid: fileid == 1 ? '' : fileid,
  9009.   })
  9010. console.log(data.Location);
  9011. callback ? callback() : ''
  9012. }
  9013. });
  9014. }
  9015. },
  9016. addSource() {
  9017. if (!Object.keys(this.sourceData).length) {
  9018. this.$message.error("请选择要上传的资源");
  9019. return;
  9020. }
  9021. let keys = Object.keys(this.sourceData);
  9022. for (var i = 0; i < keys.length; i++) {
  9023. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9024. this.lineCount
  9025. ].chapterData.unshift({
  9026. name: "链接",
  9027. title: this.sourceData[keys[i]].name,
  9028. url: this.sourceData[keys[i]].url,
  9029. type: 14,
  9030. id: keys[i],
  9031. });
  9032. }
  9033. this.$forceUpdate();
  9034. this.dialogVisibleSource = false;
  9035. },
  9036. updateSource() {
  9037. if (!Object.keys(this.sourceData).length) {
  9038. this.$message.error("请选择要上传的资源");
  9039. return;
  9040. }
  9041. let keys = Object.keys(this.sourceData);
  9042. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9043. this.taskCount
  9044. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9045. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9046. this.taskCount
  9047. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9048. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9049. this.taskCount
  9050. ].chapterData[this.lineCount].id = keys[0];
  9051. this.updateSourcePan = false;
  9052. this.$forceUpdate();
  9053. this.dialogVisibleSource = false;
  9054. },
  9055. deleteM(i, j) {
  9056. this.testJson.testJson[i].timuList.splice(j, 1);
  9057. },
  9058. beforeUploadTiMu(event, i) {
  9059. const loading = this.openLoading();
  9060. var file = event.target.files[0];
  9061. var credentials = {
  9062. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9063. secretAccessKey: "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",
  9064. }; //秘钥形式的登录上传
  9065. window.AWS.config.update(credentials);
  9066. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9067. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9068. var _this = this;
  9069. if (file) {
  9070. var params = {
  9071. Key:
  9072. file.name.split(".")[0] +
  9073. new Date().getTime() +
  9074. "." +
  9075. file.name.split(".")[file.name.split(".").length - 1],
  9076. ContentType: file.type,
  9077. Body: file,
  9078. "Access-Control-Allow-Credentials": "*",
  9079. ACL: "public-read",
  9080. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9081. var options = {
  9082. partSize: 2048 * 1024 * 1024,
  9083. queueSize: 2,
  9084. leavePartsOnError: true,
  9085. };
  9086. bucket
  9087. .upload(params, options)
  9088. .on("httpUploadProgress", function (evt) {
  9089. //这里可以写进度条
  9090. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9091. })
  9092. .send(function (err, data) {
  9093. loading.close();
  9094. if (err) {
  9095. _this.$message.error("上传失败");
  9096. } else {
  9097. if (_this.testJson.testJson[i].timuList) {
  9098. _this.testJson.testJson[i].timuList.push({
  9099. src: data.Location,
  9100. });
  9101. } else {
  9102. _this.testJson.testJson[i].timuList = [];
  9103. _this.testJson.testJson[i].timuList.push({
  9104. src: data.Location,
  9105. });
  9106. }
  9107. _this.imgChange3(i);
  9108. _this.$forceUpdate();
  9109. }
  9110. });
  9111. }
  9112. },
  9113. beforeUploadTi(event, i, j) {
  9114. const loading = this.openLoading();
  9115. var file = event.target.files[0];
  9116. var credentials = {
  9117. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9118. secretAccessKey: "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",
  9119. }; //秘钥形式的登录上传
  9120. window.AWS.config.update(credentials);
  9121. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9122. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9123. var _this = this;
  9124. if (file) {
  9125. var params = {
  9126. Key:
  9127. file.name.split(".")[0] +
  9128. new Date().getTime() +
  9129. "." +
  9130. file.name.split(".")[file.name.split(".").length - 1],
  9131. ContentType: file.type,
  9132. Body: file,
  9133. "Access-Control-Allow-Credentials": "*",
  9134. ACL: "public-read",
  9135. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9136. var options = {
  9137. partSize: 2048 * 1024 * 1024,
  9138. queueSize: 2,
  9139. leavePartsOnError: true,
  9140. };
  9141. bucket
  9142. .upload(params, options)
  9143. .on("httpUploadProgress", function (evt) {
  9144. //这里可以写进度条
  9145. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9146. })
  9147. .send(function (err, data) {
  9148. loading.close();
  9149. if (err) {
  9150. _this.$message.error("上传失败");
  9151. } else {
  9152. _this.testJson.testJson[i].checkList[j] = {};
  9153. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9154. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9155. _this.imgChange2(i, j);
  9156. _this.$forceUpdate();
  9157. }
  9158. });
  9159. }
  9160. },
  9161. beforeUpload1(event, type) {
  9162. // const loading = this.openLoading();
  9163. var file = event.target.files[0];
  9164. var credentials = {
  9165. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9166. secretAccessKey: "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",
  9167. }; //秘钥形式的登录上传
  9168. window.AWS.config.update(credentials);
  9169. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9170. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9171. var _this = this;
  9172. if (file) {
  9173. var params = {
  9174. Key:
  9175. file.name.split(".")[0] +
  9176. new Date().getTime() +
  9177. "." +
  9178. file.name.split(".")[file.name.split(".").length - 1],
  9179. ContentType: file.type,
  9180. Body: file,
  9181. "Access-Control-Allow-Credentials": "*",
  9182. ACL: "public-read",
  9183. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9184. var options = {
  9185. partSize: 2048 * 1024 * 1024,
  9186. queueSize: 2,
  9187. leavePartsOnError: true,
  9188. };
  9189. bucket
  9190. .upload(params, options)
  9191. .on("httpUploadProgress", function (evt) {
  9192. //这里可以写进度条
  9193. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9194. })
  9195. .send(function (err, data) {
  9196. // loading.close();
  9197. if (err) {
  9198. // var a = _this.$refs.upload1.uploadFiles;
  9199. // a.splice(a.length - 1, a.length);
  9200. _this.$message.error("上传失败");
  9201. } else {
  9202. // _this.cover.push({
  9203. // name: file.name,
  9204. // url: data.Location,
  9205. // uid: file.uid,
  9206. // });
  9207. _this.cover = [
  9208. {
  9209. name: file.name,
  9210. url: data.Location,
  9211. uid: file.uid,
  9212. },
  9213. ];
  9214. _this.imgChange1(null, null, 1, null);
  9215. _this.choosePicVisible = false;
  9216. console.log(data.Location);
  9217. }
  9218. });
  9219. }
  9220. },
  9221. beforeUploadSelect(event, type) {
  9222. // const loading = this.openLoading();
  9223. var file = event.target.files[0];
  9224. var credentials = {
  9225. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9226. secretAccessKey: "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",
  9227. }; //秘钥形式的登录上传
  9228. window.AWS.config.update(credentials);
  9229. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9230. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9231. var _this = this;
  9232. if (file) {
  9233. var params = {
  9234. Key:
  9235. file.name.split(".")[0] +
  9236. new Date().getTime() +
  9237. "." +
  9238. file.name.split(".")[file.name.split(".").length - 1],
  9239. ContentType: file.type,
  9240. Body: file,
  9241. "Access-Control-Allow-Credentials": "*",
  9242. ACL: "public-read",
  9243. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9244. var options = {
  9245. partSize: 2048 * 1024 * 1024,
  9246. queueSize: 2,
  9247. leavePartsOnError: true,
  9248. };
  9249. bucket
  9250. .upload(params, options)
  9251. .on("httpUploadProgress", function (evt) {
  9252. //这里可以写进度条
  9253. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9254. })
  9255. .send(function (err, data) {
  9256. // loading.close();
  9257. if (err) {
  9258. _this.$message.error("上传失败");
  9259. } else {
  9260. _this.selectJson.url = data.Location;
  9261. console.log(data.Location);
  9262. }
  9263. });
  9264. }
  9265. },
  9266. chooseSysPic(p) {
  9267. this.cover = [];
  9268. setTimeout(() => {
  9269. this.cover[0] = {
  9270. name: "系统图片.png",
  9271. url: p,
  9272. };
  9273. this.imgChange1(null, null, 1, null);
  9274. this.$forceUpdate();
  9275. }, 0);
  9276. this.isSysPic = true;
  9277. this.isSysPic2 = false;
  9278. this.sysPicVisible = false;
  9279. this.$forceUpdate();
  9280. },
  9281. chooseSysPic2(p) {
  9282. this.cover = [];
  9283. setTimeout(() => {
  9284. this.cover[0] = {
  9285. name: "网络图片.png",
  9286. url: p,
  9287. };
  9288. this.imgChange1(null, null, 1, null);
  9289. this.$forceUpdate();
  9290. }, 0);
  9291. this.isSysPic2 = true;
  9292. this.isSysPic = false;
  9293. this.sysPicVisible2 = false;
  9294. this.$forceUpdate();
  9295. },
  9296. beforeUpload(data) {
  9297. this.$refs.upload1.uploadFiles;
  9298. this.uploadLoading1 = true;
  9299. var file = data.file;
  9300. var credentials = {
  9301. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9302. secretAccessKey: "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",
  9303. }; //秘钥形式的登录上传
  9304. window.AWS.config.update(credentials);
  9305. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9306. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9307. var _this = this;
  9308. if (file) {
  9309. var params = {
  9310. Key:
  9311. file.name.split(".")[0] +
  9312. new Date().getTime() +
  9313. "." +
  9314. file.name.split(".")[file.name.split(".").length - 1],
  9315. ContentType: file.type,
  9316. Body: file,
  9317. "Access-Control-Allow-Credentials": "*",
  9318. ACL: "public-read",
  9319. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9320. var options = {
  9321. partSize: 2048 * 1024 * 1024,
  9322. queueSize: 2,
  9323. leavePartsOnError: true,
  9324. };
  9325. bucket
  9326. .upload(params, options)
  9327. .on("httpUploadProgress", function (evt) {
  9328. //这里可以写进度条
  9329. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9330. })
  9331. .send(function (err, data) {
  9332. _this.uploadLoading1 = false;
  9333. if (err) {
  9334. // var a = _this.$refs.upload1.uploadFiles;
  9335. // a.splice(a.length - 1, a.length);
  9336. _this.$message.error("上传失败");
  9337. } else {
  9338. //上传成功处理
  9339. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9340. name: file.name,
  9341. url: data.Location,
  9342. uid: file.uid,
  9343. });
  9344. _this.imgChange();
  9345. console.log(data.Location);
  9346. }
  9347. });
  9348. }
  9349. },
  9350. onExceed() {
  9351. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9352. },
  9353. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9354. let file = "";
  9355. let cfindex2 = 0;
  9356. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9357. // var file = event.target.files[0];
  9358. file = event.target.files[cfindex];
  9359. let fileName = file.name
  9360. let fileUid = file.uid
  9361. // const loading = this.openLoading();
  9362. // var file = event.target.files[0];
  9363. var credentials = {
  9364. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9365. secretAccessKey: "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",
  9366. }; //秘钥形式的登录上传
  9367. window.AWS.config.update(credentials);
  9368. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9369. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9370. var _this = this;
  9371. if (type == 3) {
  9372. var b = [
  9373. "DOC",
  9374. "DOCX",
  9375. "DOCM",
  9376. "DOTM",
  9377. "DOTX",
  9378. "PPTX",
  9379. "PPSX",
  9380. "PPT",
  9381. "PPS",
  9382. "PPTM",
  9383. "POTM",
  9384. "PPAM",
  9385. "POTX",
  9386. "PPSM",
  9387. ];
  9388. if (
  9389. b.indexOf(
  9390. file.name
  9391. .split(".")
  9392. [file.name.split(".").length - 1].toLocaleUpperCase()
  9393. ) != -1
  9394. ) {
  9395. if (file.size / 1024 / 1024 > 80) {
  9396. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9397. this.inputShow = true;
  9398. // var a = _this.$refs.upload1.uploadFiles;
  9399. // a.splice(a.length - 1, a.length);
  9400. // loading.close();
  9401. return;
  9402. }
  9403. } else if (
  9404. file.name
  9405. .split(".")
  9406. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9407. ) {
  9408. if (file.size / 1024 / 1024 > 80) {
  9409. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9410. this.inputShow = true;
  9411. // var a = _this.$refs.upload1.uploadFiles;
  9412. // a.splice(a.length - 1, a.length);
  9413. // loading.close();
  9414. return;
  9415. }
  9416. }
  9417. }
  9418. this.inputShow = false;
  9419. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9420. // itemTaskIndex
  9421. // ].progress = 0;
  9422. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9423. itemTaskIndex
  9424. ].proVisible = true;
  9425. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9426. itemTaskIndex
  9427. ].isFinishSize = 0;
  9428. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9429. itemTaskIndex
  9430. ].isAllSize = event.target.files.length;
  9431. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9432. // itemTaskIndex
  9433. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9434. _this.$forceUpdate();
  9435. if (file) {
  9436. var params = {
  9437. Key:
  9438. file.name.split(".")[0] +
  9439. new Date().getTime() +
  9440. "." +
  9441. file.name.split(".")[file.name.split(".").length - 1],
  9442. ContentType: file.type,
  9443. Body: file,
  9444. "Access-Control-Allow-Credentials": "*",
  9445. ACL: "public-read",
  9446. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9447. var options = {
  9448. partSize: 2048 * 1024 * 1024,
  9449. queueSize: 2,
  9450. leavePartsOnError: true,
  9451. };
  9452. bucket
  9453. .upload(params, options)
  9454. .on("httpUploadProgress", function (evt) {
  9455. //这里可以写进度条
  9456. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9457. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9458. // itemTaskIndex
  9459. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9460. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9461. // itemTaskIndex
  9462. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9463. // _this.$forceUpdate();
  9464. })
  9465. .send(function (err, data) {
  9466. cfindex2++
  9467. // loading.close();
  9468. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9469. // itemTaskIndex
  9470. // ].progress = 100;
  9471. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9472. itemTaskIndex
  9473. ].isFinishSize = cfindex2
  9474. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9475. // itemTaskIndex
  9476. // ].isAllSize;
  9477. _this.$forceUpdate();
  9478. setTimeout(() => {
  9479. if (
  9480. cfindex2 == event.target.files.length ||
  9481. cfindex2 > event.target.files.length
  9482. ) {
  9483. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9484. itemTaskIndex
  9485. ].proVisible = false;
  9486. }
  9487. _this.$forceUpdate();
  9488. }, 1000);
  9489. _this.inputShow = true;
  9490. if (err) {
  9491. // var a = _this.$refs.upload1.uploadFiles;
  9492. // a.splice(a.length - 1, a.length);
  9493. _this.$message.error("上传失败");
  9494. } else {
  9495. if (type == 13) {
  9496. let _type = 2;
  9497. var imgA = [
  9498. "png",
  9499. "jpg",
  9500. "jpeg",
  9501. "bmp",
  9502. "gif",
  9503. "webp",
  9504. "psd",
  9505. "svg",
  9506. "tiff",
  9507. ];
  9508. var fileA = [
  9509. "PDF",
  9510. "DOC",
  9511. "DOCX",
  9512. "DOCM",
  9513. "DOTM",
  9514. "DOTX",
  9515. "PPTX",
  9516. "PPSX",
  9517. "PPT",
  9518. "PPS",
  9519. "PPTM",
  9520. "POTM",
  9521. "PPAM",
  9522. "POTX",
  9523. "PPSM",
  9524. "XLSX",
  9525. "XLS",
  9526. ];
  9527. var videoA = [
  9528. "AVI",
  9529. "NAVI",
  9530. "MPEG",
  9531. "ASF",
  9532. "MOV",
  9533. "WMV",
  9534. "3GP",
  9535. "RM",
  9536. "RMVB",
  9537. "FLV",
  9538. "F4V",
  9539. "H.264",
  9540. "H.265",
  9541. "REAL VIDEO",
  9542. "MKV",
  9543. "WebM",
  9544. "HDDVD",
  9545. "MP4",
  9546. "MPG",
  9547. "M4V",
  9548. "MGV",
  9549. "OGV",
  9550. "QTM",
  9551. "STR",
  9552. "AMC",
  9553. "DVX",
  9554. "EVO",
  9555. "DAT",
  9556. "OGG",
  9557. "OGM",
  9558. ];
  9559. if (
  9560. fileA.indexOf(
  9561. data.Location.split(".")[
  9562. data.Location.split(".").length - 1
  9563. ].toLocaleUpperCase()
  9564. ) != -1
  9565. ) {
  9566. _type = 3;
  9567. } else if (
  9568. videoA.indexOf(
  9569. data.Location.split(".")[
  9570. data.Location.split(".").length - 1
  9571. ].toLocaleUpperCase()
  9572. ) != -1
  9573. ) {
  9574. _type = 2;
  9575. } else if (
  9576. imgA.indexOf(
  9577. data.Location.split(".")[
  9578. data.Location.split(".").length - 1
  9579. ].toLocaleLowerCase()
  9580. ) != -1
  9581. ) {
  9582. _type = 13;
  9583. } else {
  9584. _type = 12;
  9585. }
  9586. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9587. itemTaskIndex
  9588. ].chapterData.unshift({
  9589. name: fileName,
  9590. url: data.Location,
  9591. uid: fileUid,
  9592. type: _type,
  9593. });
  9594. _this.imgChange1(null, null, _type, itemTaskIndex);
  9595. } else if (type == 2 || type == 3 || type == 12) {
  9596. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9597. itemTaskIndex
  9598. ].chapterData.unshift({
  9599. name: fileName,
  9600. url: data.Location,
  9601. uid: fileUid,
  9602. type: type,
  9603. });
  9604. _this.imgChange1(null, null, type, itemTaskIndex);
  9605. } else if (type == 4) {
  9606. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9607. itemTaskIndex
  9608. ].fileList1.push({
  9609. name: fileName,
  9610. url: data.Location,
  9611. uid: fileUid,
  9612. });
  9613. _this.imgChange1(null, null, type, itemTaskIndex);
  9614. } else if (type == 5) {
  9615. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9616. itemTaskIndex
  9617. ].homeworkList.push({
  9618. name: fileName,
  9619. url: data.Location,
  9620. uid: fileUid,
  9621. });
  9622. _this.imgChange1(null, null, type, itemTaskIndex);
  9623. }
  9624. console.log(data.Location);
  9625. }
  9626. });
  9627. }
  9628. }
  9629. },
  9630. beforeUploadInfo2(event, type, tindex) {
  9631. // const loading = this.openLoading();
  9632. let file = "";
  9633. let cfindex2 = 0;
  9634. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9635. // var file = event.target.files[0];
  9636. file = event.target.files[cfindex];
  9637. let fileName = file.name
  9638. let fileUid = file.uid
  9639. var credentials = {
  9640. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9641. secretAccessKey: "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",
  9642. }; //秘钥形式的登录上传
  9643. window.AWS.config.update(credentials);
  9644. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9645. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9646. var _this = this;
  9647. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9648. if (
  9649. ['DOC'].indexOf(
  9650. file.name
  9651. .split(".")
  9652. [file.name.split(".").length - 1].toLocaleUpperCase()
  9653. ) !== -1
  9654. ) {
  9655. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  9656. this.inputShow = true;
  9657. return;
  9658. }
  9659. if (
  9660. xianObj.indexOf(
  9661. file.name
  9662. .split(".")
  9663. [file.name.split(".").length - 1].toLocaleUpperCase()
  9664. ) == -1
  9665. ) {
  9666. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9667. this.inputShow = true;
  9668. // var a = _this.$refs.upload1.uploadFiles;
  9669. // a.splice(a.length - 1, a.length);
  9670. // loading.close();
  9671. return;
  9672. }
  9673. if (type == 3) {
  9674. var b = [
  9675. "DOC",
  9676. "DOCX",
  9677. "DOCM",
  9678. "DOTM",
  9679. "DOTX",
  9680. "PPTX",
  9681. "PPSX",
  9682. "PPT",
  9683. "PPS",
  9684. "PPTM",
  9685. "POTM",
  9686. "PPAM",
  9687. "POTX",
  9688. "PPSM",
  9689. ];
  9690. if (
  9691. b.indexOf(
  9692. file.name
  9693. .split(".")
  9694. [file.name.split(".").length - 1].toLocaleUpperCase()
  9695. ) != -1
  9696. ) {
  9697. if (file.size / 1024 / 1024 > 80) {
  9698. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9699. this.inputShow = true;
  9700. // var a = _this.$refs.upload1.uploadFiles;
  9701. // a.splice(a.length - 1, a.length);
  9702. // loading.close();
  9703. return;
  9704. }
  9705. } else if (
  9706. file.name
  9707. .split(".")
  9708. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9709. ) {
  9710. if (file.size / 1024 / 1024 > 80) {
  9711. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9712. this.inputShow = true;
  9713. // var a = _this.$refs.upload1.uploadFiles;
  9714. // a.splice(a.length - 1, a.length);
  9715. // loading.close();
  9716. return;
  9717. }
  9718. }
  9719. }
  9720. this.inputShow = false;
  9721. if(type == 14){
  9722. // _this.teacherinfoprogress = 0;
  9723. _this.teacherinfoproVisible = true;
  9724. _this.teacherinfoisFinishSize = 0;
  9725. _this.teacherinfoisAllSize = event.target.files.length;
  9726. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9727. }else if(type == 16){
  9728. _this.mubiaoinfoprogress = 0;
  9729. _this.mubiaoinfoproVisible = true;
  9730. _this.mubiaoinfoisFinishSize = 0;
  9731. _this.mubiaoinfoisAllSize = event.target.files.length;
  9732. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9733. }else if(type == 17){
  9734. _this.xuanzeinfoprogress = 0;
  9735. _this.xuanzeinfoproVisible = true;
  9736. _this.xuanzeinfoisFinishSize = 0;
  9737. _this.xuanzeinfoisAllSize = event.target.files.length;
  9738. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9739. }else if(type == 18){
  9740. _this.pingjiainfoprogress[tindex] = 0;
  9741. _this.pingjiainfoproVisible[tindex] = true;
  9742. _this.pingjiainfoisFinishSize[tindex] = 0;
  9743. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  9744. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  9745. }else{
  9746. _this.infoprogress = 0;
  9747. _this.infoproVisible = true;
  9748. _this.infoisFinishSize = 0;
  9749. _this.infoisAllSize = event.target.files.length;
  9750. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9751. }
  9752. _this.$forceUpdate();
  9753. if (file) {
  9754. var params = {
  9755. Key:
  9756. file.name.split(".")[0] +
  9757. new Date().getTime() +
  9758. "." +
  9759. file.name.split(".")[file.name.split(".").length - 1],
  9760. ContentType: file.type,
  9761. Body: file,
  9762. "Access-Control-Allow-Credentials": "*",
  9763. ACL: "public-read",
  9764. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9765. var options = {
  9766. partSize: 2048 * 1024 * 1024,
  9767. queueSize: 2,
  9768. leavePartsOnError: true,
  9769. };
  9770. bucket
  9771. .upload(params, options)
  9772. .on("httpUploadProgress", function (evt) {
  9773. //这里可以写进度条
  9774. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9775. // if(type == 14){
  9776. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9777. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9778. // }else if(type == 16){
  9779. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9780. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9781. // }else if(type == 17){
  9782. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9783. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9784. // }else if(type == 18){
  9785. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  9786. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  9787. // }else {
  9788. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9789. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9790. // }
  9791. _this.$forceUpdate();
  9792. })
  9793. .send(async function (err, data) {
  9794. // loading.close();
  9795. // if(type == 14){
  9796. // _this.teacherinfoprogress = 100;
  9797. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9798. // }else if(type == 16){
  9799. // _this.mubiaoinfoprogress = 100;
  9800. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  9801. // }else if(type == 17){
  9802. // _this.xuanzeinfoprogress = 100;
  9803. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  9804. // }else if(type == 18){
  9805. // _this.pingjiainfoprogress[tindex] = 100;
  9806. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  9807. // }else {
  9808. // _this.infoprogress = 100;
  9809. // _this.infoisFinishSize = _this.infoisAllSize;
  9810. // }
  9811. _this.$forceUpdate();
  9812. _this.inputShow = true;
  9813. if (err) {
  9814. cfindex2++;
  9815. if(type == 14){
  9816. _this.teacherinfoisFinishSize = cfindex2;
  9817. }else if(type == 16){
  9818. _this.mubiaoinfoisFinishSize = cfindex2;
  9819. }else if(type == 17){
  9820. _this.xuanzeinfoisFinishSize = cfindex2;
  9821. }else if(type == 18){
  9822. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9823. }else {
  9824. _this.infoisFinishSize = cfindex2;
  9825. }
  9826. setTimeout(() => {
  9827. if (
  9828. cfindex2 == event.target.files.length ||
  9829. cfindex2 > event.target.files.length
  9830. ) {
  9831. if(type == 14){
  9832. _this.teacherinfoproVisible = false;
  9833. }else if(type == 16){
  9834. _this.mubiaoinfoproVisible = false;
  9835. }else if(type == 17){
  9836. _this.xuanzeinfoproVisible = false;
  9837. }else if(type == 18){
  9838. _this.pingjiainfoproVisible[tindex] = false;
  9839. }else{
  9840. _this.infoproVisible = false;
  9841. }
  9842. }
  9843. _this.$forceUpdate();
  9844. }, 1000);
  9845. // var a = _this.$refs.upload1.uploadFiles;
  9846. // a.splice(a.length - 1, a.length);
  9847. _this.$message.error("上传失败");
  9848. } else {
  9849. let fileid = await _this.createFileid(data.Location)
  9850. if(fileid){
  9851. cfindex2++;
  9852. if(type == 14){
  9853. _this.teacherinfoisFinishSize = cfindex2;
  9854. }else if(type == 16){
  9855. _this.mubiaoinfoisFinishSize = cfindex2;
  9856. }else if(type == 17){
  9857. _this.xuanzeinfoisFinishSize = cfindex2;
  9858. }else if(type == 18){
  9859. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9860. }else {
  9861. _this.infoisFinishSize = cfindex2;
  9862. }
  9863. if (
  9864. cfindex2 == event.target.files.length ||
  9865. cfindex2 > event.target.files.length
  9866. ) {
  9867. if(type == 14){
  9868. _this.teacherinfoproVisible = false;
  9869. }else if(type == 16){
  9870. _this.mubiaoinfoproVisible = false;
  9871. }else if(type == 17){
  9872. _this.xuanzeinfoproVisible = false;
  9873. }else if(type == 18){
  9874. _this.pingjiainfoproVisible[tindex] = false;
  9875. }else{
  9876. _this.infoproVisible = false;
  9877. }
  9878. }
  9879. _this.$forceUpdate();
  9880. }
  9881. if(fileid == 1){
  9882. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  9883. return;
  9884. }
  9885. var imgA = [
  9886. "png",
  9887. "jpg",
  9888. "jpeg",
  9889. "bmp",
  9890. "gif",
  9891. "webp",
  9892. "psd",
  9893. "svg",
  9894. "tiff",
  9895. ];
  9896. var fileA = [
  9897. "PDF",
  9898. "DOC",
  9899. "DOCX",
  9900. "DOCM",
  9901. "DOTM",
  9902. "DOTX",
  9903. "PPTX",
  9904. "PPSX",
  9905. "PPT",
  9906. "PPS",
  9907. "PPTM",
  9908. "POTM",
  9909. "PPAM",
  9910. "POTX",
  9911. "PPSM",
  9912. "XLSX",
  9913. "XLS",
  9914. ];
  9915. var videoA = [
  9916. "AVI",
  9917. "NAVI",
  9918. "MPEG",
  9919. "ASF",
  9920. "MOV",
  9921. "WMV",
  9922. "3GP",
  9923. "RM",
  9924. "RMVB",
  9925. "FLV",
  9926. "F4V",
  9927. "H.264",
  9928. "H.265",
  9929. "REAL VIDEO",
  9930. "MKV",
  9931. "WebM",
  9932. "HDDVD",
  9933. "MP4",
  9934. "MPG",
  9935. "M4V",
  9936. "MGV",
  9937. "OGV",
  9938. "QTM",
  9939. "STR",
  9940. "AMC",
  9941. "DVX",
  9942. "EVO",
  9943. "DAT",
  9944. "OGG",
  9945. "OGM",
  9946. ];
  9947. let _type = 2;
  9948. if (
  9949. fileA.indexOf(
  9950. data.Location.split(".")[
  9951. data.Location.split(".").length - 1
  9952. ].toLocaleUpperCase()
  9953. ) != -1
  9954. ) {
  9955. _type = 3;
  9956. } else if (
  9957. videoA.indexOf(
  9958. data.Location.split(".")[
  9959. data.Location.split(".").length - 1
  9960. ].toLocaleUpperCase()
  9961. ) != -1
  9962. ) {
  9963. _type = 2;
  9964. } else if (
  9965. imgA.indexOf(
  9966. data.Location.split(".")[
  9967. data.Location.split(".").length - 1
  9968. ].toLocaleLowerCase()
  9969. ) != -1
  9970. ) {
  9971. _type = 13;
  9972. } else {
  9973. _type = 12;
  9974. }
  9975. if (type == 13) {
  9976. _this.infoData.push({
  9977. name: fileName,
  9978. url: data.Location,
  9979. uid: fileUid,
  9980. type: _type,
  9981. fileid: fileid == 1 ? '' : fileid,
  9982. });
  9983. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9984. name: fileName,
  9985. url: data.Location,
  9986. uid: fileUid,
  9987. type: _type,
  9988. fileid: fileid == 1 ? '' : fileid,
  9989. })
  9990. }else if (type == 14) {
  9991. _this.teacherInfoData.push({
  9992. name: fileName,
  9993. url: data.Location,
  9994. uid: fileUid,
  9995. type: _type,
  9996. fileid: fileid == 1 ? '' : fileid,
  9997. });
  9998. _this.infoData2.push({
  9999. name: fileName,
  10000. url: data.Location,
  10001. uid: fileUid,
  10002. type: _type,
  10003. fileid: fileid == 1 ? '' : fileid,
  10004. });
  10005. _this.infoData.push({
  10006. name: fileName,
  10007. url: data.Location,
  10008. uid: fileUid,
  10009. type: _type,
  10010. fileid: fileid == 1 ? '' : fileid,
  10011. });
  10012. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10013. name: fileName,
  10014. url: data.Location,
  10015. uid: fileUid,
  10016. type: _type,
  10017. fileid: fileid == 1 ? '' : fileid,
  10018. })
  10019. }else if (type == 15) {
  10020. _this.infoData2.push({
  10021. name: fileName,
  10022. url: data.Location,
  10023. uid: fileUid,
  10024. type: _type,
  10025. fileid: fileid == 1 ? '' : fileid,
  10026. });
  10027. _this.infoData.push({
  10028. name: fileName,
  10029. url: data.Location,
  10030. uid: fileUid,
  10031. type: _type,
  10032. fileid: fileid == 1 ? '' : fileid,
  10033. });
  10034. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10035. name: fileName,
  10036. url: data.Location,
  10037. uid: fileUid,
  10038. type: _type,
  10039. fileid: fileid == 1 ? '' : fileid,
  10040. })
  10041. }else if (type == 16) {
  10042. _this.mubiaoInfoData.push({
  10043. name: fileName,
  10044. url: data.Location,
  10045. uid: fileUid,
  10046. type: _type,
  10047. fileid: fileid == 1 ? '' : fileid,
  10048. });
  10049. }else if (type == 17) {
  10050. _this.xuanzeInfoData.push({
  10051. name: fileName,
  10052. url: data.Location,
  10053. uid: fileUid,
  10054. type: _type,
  10055. fileid: fileid == 1 ? '' : fileid,
  10056. });
  10057. }else if (type == 18) {
  10058. if(!_this.pingjiaInfoData[tindex]){
  10059. _this.pingjiaInfoData[tindex] = []
  10060. }
  10061. _this.pingjiaInfoData[tindex].push({
  10062. name: fileName,
  10063. url: data.Location,
  10064. uid: fileUid,
  10065. type: _type,
  10066. fileid: fileid == 1 ? '' : fileid,
  10067. });
  10068. }
  10069. console.log(data.Location);
  10070. console.log(fileid);
  10071. }
  10072. });
  10073. }
  10074. }
  10075. },
  10076. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10077. // const loading = this.openLoading();
  10078. var file = event.target.files[0];
  10079. var credentials = {
  10080. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10081. secretAccessKey: "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",
  10082. }; //秘钥形式的登录上传
  10083. window.AWS.config.update(credentials);
  10084. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10085. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10086. var _this = this;
  10087. if (type == 3) {
  10088. var b = [
  10089. "DOC",
  10090. "DOCX",
  10091. "DOCM",
  10092. "DOTM",
  10093. "DOTX",
  10094. "PPTX",
  10095. "PPSX",
  10096. "PPT",
  10097. "PPS",
  10098. "PPTM",
  10099. "POTM",
  10100. "PPAM",
  10101. "POTX",
  10102. "PPSM",
  10103. ];
  10104. if (
  10105. b.indexOf(
  10106. file.name
  10107. .split(".")
  10108. [file.name.split(".").length - 1].toLocaleUpperCase()
  10109. ) != -1
  10110. ) {
  10111. if (file.size / 1024 / 1024 > 80) {
  10112. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10113. this.inputShow = true;
  10114. // var a = _this.$refs.upload1.uploadFiles;
  10115. // a.splice(a.length - 1, a.length);
  10116. // loading.close();
  10117. return;
  10118. }
  10119. } else if (
  10120. file.name
  10121. .split(".")
  10122. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10123. ) {
  10124. if (file.size / 1024 / 1024 > 80) {
  10125. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10126. this.inputShow = true;
  10127. // var a = _this.$refs.upload1.uploadFiles;
  10128. // a.splice(a.length - 1, a.length);
  10129. // loading.close();
  10130. return;
  10131. }
  10132. }
  10133. }
  10134. this.inputShow = false;
  10135. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10136. itemTaskIndex
  10137. ].progress = 0;
  10138. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10139. itemTaskIndex
  10140. ].proVisible = true;
  10141. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10142. itemTaskIndex
  10143. ].isFinishSize = 0;
  10144. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10145. itemTaskIndex
  10146. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10147. _this.$forceUpdate();
  10148. if (file) {
  10149. var params = {
  10150. Key:
  10151. file.name.split(".")[0] +
  10152. new Date().getTime() +
  10153. "." +
  10154. file.name.split(".")[file.name.split(".").length - 1],
  10155. ContentType: file.type,
  10156. Body: file,
  10157. "Access-Control-Allow-Credentials": "*",
  10158. ACL: "public-read",
  10159. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10160. var options = {
  10161. partSize: 2048 * 1024 * 1024,
  10162. queueSize: 2,
  10163. leavePartsOnError: true,
  10164. };
  10165. bucket
  10166. .upload(params, options)
  10167. .on("httpUploadProgress", function (evt) {
  10168. //这里可以写进度条
  10169. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10170. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10171. itemTaskIndex
  10172. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10173. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10174. itemTaskIndex
  10175. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10176. _this.$forceUpdate();
  10177. })
  10178. .send(function (err, data) {
  10179. // loading.close();
  10180. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10181. itemTaskIndex
  10182. ].progress = 100;
  10183. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10184. itemTaskIndex
  10185. ].isFinishSize =
  10186. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10187. itemTaskIndex
  10188. ].isAllSize;
  10189. _this.$forceUpdate();
  10190. setTimeout(() => {
  10191. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10192. itemTaskIndex
  10193. ].proVisible = false;
  10194. _this.$forceUpdate();
  10195. }, 1000);
  10196. _this.inputShow = true;
  10197. if (err) {
  10198. // var a = _this.$refs.upload1.uploadFiles;
  10199. // a.splice(a.length - 1, a.length);
  10200. _this.$message.error("上传失败");
  10201. } else {
  10202. if (type == 2 || type == 3) {
  10203. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10204. itemTaskIndex
  10205. ].chapterData.unshift({
  10206. name: file.name,
  10207. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10208. // itemTaskIndex
  10209. // ].chapterData.length+1),
  10210. url: data.Location,
  10211. uid: file.uid,
  10212. type: type,
  10213. text: string,
  10214. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10215. // itemTaskIndex
  10216. // ].chapterData.length + 1),
  10217. });
  10218. _this.imgChange1(null, null, type, itemTaskIndex);
  10219. } else if (type == 4) {
  10220. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10221. itemTaskIndex
  10222. ].fileList1.push({
  10223. name: file.name,
  10224. url: data.Location,
  10225. uid: file.uid,
  10226. });
  10227. _this.imgChange1(null, null, type, itemTaskIndex);
  10228. } else if (type == 5) {
  10229. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10230. itemTaskIndex
  10231. ].homeworkList.push({
  10232. name: file.name,
  10233. url: data.Location,
  10234. uid: file.uid,
  10235. });
  10236. _this.imgChange1(null, null, type, itemTaskIndex);
  10237. }
  10238. console.log(data.Location);
  10239. }
  10240. });
  10241. }
  10242. },
  10243. addunit() {
  10244. this.unitJson.push({
  10245. dyName: "", //单元标题
  10246. isUpdate: 1,
  10247. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10248. chapterInfo: [
  10249. {
  10250. isread: false,
  10251. chapterid: this.guid(),
  10252. title: "",
  10253. courseName: "",
  10254. taskJson: [
  10255. {
  10256. task: "",
  10257. taskDetail: "",
  10258. chapterData: [],
  10259. toolText: "",
  10260. toolChoose: [
  10261. {
  10262. tool: [],
  10263. toolDetail: "",
  10264. toolType: 0,
  10265. askCount: 1,
  10266. askTitle: "",
  10267. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10268. },
  10269. ],
  10270. isShowTools: false,
  10271. askCount: 1,
  10272. isFold: 1,
  10273. askTitle: "",
  10274. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10275. checkJson: [{ checkCount: [], checkPerent: [] }],
  10276. homeworkList: [],
  10277. },
  10278. ],
  10279. itemCount: 1,
  10280. fileList1: [],
  10281. video: [],
  10282. testData: [],
  10283. pData: [],
  10284. templateArray: [],
  10285. },
  10286. ],
  10287. });
  10288. this.addindex = this.unitJson.length - 1;
  10289. setTimeout(() => {
  10290. this.unitIndex = this.unitJson.length - 1;
  10291. setTimeout(() => {
  10292. console.log(this.$refs.dyInput);
  10293. this.$refs.dyInput[0].focus();
  10294. }, 100);
  10295. this.unitSet(this.unitIndex);
  10296. }, 0);
  10297. },
  10298. addToolFun(itemTaskIndex) {
  10299. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10300. itemTaskIndex
  10301. ].toolChoose.push({
  10302. tool: [],
  10303. toolDetail: "",
  10304. toolType: 0,
  10305. askCount: 1,
  10306. askTitle: "",
  10307. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10308. });
  10309. },
  10310. addTaskBorder() {
  10311. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10312. task: "",
  10313. taskDetail: "",
  10314. chapterData: [],
  10315. toolText: "",
  10316. toolChoose: [
  10317. {
  10318. tool: [],
  10319. toolDetail: "",
  10320. toolType: 0,
  10321. askCount: 1,
  10322. askTitle: "",
  10323. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10324. },
  10325. ],
  10326. isShowTools: false,
  10327. askCount: 1,
  10328. isFold: 1, //任务收起状态
  10329. askTitle: "",
  10330. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10331. checkJson: [{ checkCount: [], checkPerent: [] }],
  10332. homeworkList: [],
  10333. });
  10334. setTimeout(() => {
  10335. this.checkEva(this.checkId);
  10336. setTimeout(() => {
  10337. this.checkEva(this.checkId);
  10338. }, 100);
  10339. }, 100);
  10340. },
  10341. addTaskBorder2(type, index) {
  10342. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10343. this.$message({
  10344. message: "有大纲在生成请生成完之后才能使用此功能",
  10345. type: "warning"
  10346. });
  10347. return;
  10348. }
  10349. if(type == 1){
  10350. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10351. task: "",
  10352. isTask2: true,
  10353. isTask3: true,
  10354. taskDetail: "",
  10355. chapterData: [],
  10356. toolText: "",
  10357. toolChoose: [
  10358. {
  10359. tool: [],
  10360. toolDetail: "",
  10361. toolType: 0,
  10362. askCount: 1,
  10363. askTitle: "",
  10364. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10365. },
  10366. ],
  10367. isShowTools: false,
  10368. askCount: 1,
  10369. isFold: 0, //任务收起状态
  10370. askTitle: "",
  10371. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10372. checkJson: [{ checkCount: [], checkPerent: [] }],
  10373. homeworkList: [],
  10374. })
  10375. }else if(type == 2){
  10376. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10377. task: "",
  10378. isTask2: true,
  10379. isTask3: true,
  10380. taskDetail: "",
  10381. chapterData: [],
  10382. toolText: "",
  10383. toolChoose: [
  10384. {
  10385. tool: [],
  10386. toolDetail: "",
  10387. toolType: 0,
  10388. askCount: 1,
  10389. askTitle: "",
  10390. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10391. },
  10392. ],
  10393. isShowTools: false,
  10394. askCount: 1,
  10395. isFold: 0, //任务收起状态
  10396. askTitle: "",
  10397. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10398. checkJson: [{ checkCount: [], checkPerent: [] }],
  10399. homeworkList: [],
  10400. })
  10401. }
  10402. setTimeout(() => {
  10403. this.checkEva(this.checkId);
  10404. setTimeout(() => {
  10405. this.checkEva(this.checkId);
  10406. }, 100);
  10407. }, 100);
  10408. },
  10409. add(e, i) {
  10410. var el = e.currentTarget;
  10411. el.getElementsByTagName("input")[0].click();
  10412. },
  10413. fold(i, e) {
  10414. if (
  10415. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10416. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10417. ) {
  10418. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10419. } else {
  10420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10421. }
  10422. },
  10423. fold2(i) {
  10424. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10425. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10426. i
  10427. ].isFold2 = false;
  10428. } else {
  10429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10430. }
  10431. this.$forceUpdate();
  10432. },
  10433. foldEva(i) {
  10434. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10435. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10436. i
  10437. ].isEvaFold = false;
  10438. } else {
  10439. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10440. i
  10441. ].isEvaFold = true;
  10442. setTimeout(() => {
  10443. this.checkEva(this.checkId);
  10444. setTimeout(() => {
  10445. this.checkEva(this.checkId);
  10446. }, 500);
  10447. }, 0);
  10448. }
  10449. this.$forceUpdate();
  10450. },
  10451. foldC(i) {
  10452. if (
  10453. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10454. ) {
  10455. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10456. i
  10457. ].isFoldchapter = false;
  10458. } else {
  10459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10460. i
  10461. ].isFoldchapter = true;
  10462. }
  10463. this.$forceUpdate();
  10464. },
  10465. fold3(i, ti) {
  10466. if (
  10467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10468. .isFold3
  10469. ) {
  10470. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10471. ti
  10472. ].isFold3 = false;
  10473. } else {
  10474. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10475. ti
  10476. ].isFold3 = true;
  10477. }
  10478. this.$forceUpdate();
  10479. },
  10480. deleteHomeworkBox(unitIndex, index, i) {
  10481. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10482. this.taskCount
  10483. ].homeworkList.splice(i, 1);
  10484. },
  10485. getStudent() {
  10486. let params = {
  10487. oid: this.oid,
  10488. cu: "",
  10489. cn: this.searchPeople,
  10490. };
  10491. this.ajax
  10492. .get(this.$store.state.api + "selectStudentAdd", params)
  10493. .then((res) => {
  10494. this.studentJuri = res.data[0];
  10495. })
  10496. .catch((err) => {
  10497. this.isLoading = false;
  10498. console.error(err);
  10499. });
  10500. },
  10501. // 添加协同成员其他选项按钮
  10502. getTeacherCopy(){
  10503. this.CollLoading=true
  10504. this.collid = ''
  10505. this.collid = '1xpz'
  10506. let params = {
  10507. oid:
  10508. this.org && this.org != "undefined" && this.org != "null"
  10509. ? this.org
  10510. : this.oid,
  10511. cu: "",
  10512. cn: this.searchTN,
  10513. coll: ''
  10514. };
  10515. this.ajax
  10516. .get(
  10517. this.$store.state.api +
  10518. (this.org && this.org != "undefined" && this.org != "null"
  10519. ? "selectCollaborativeMembersOrg"
  10520. : "selectCollaborativeMembers"),
  10521. params
  10522. )
  10523. .then((res) => {
  10524. let teacherJuri = res.data[0];
  10525. this.CollaborativeTeaList = res.data[1];
  10526. for (var i = 0; i < teacherJuri.length; i++) {
  10527. if (teacherJuri[i].userid == this.userid) {
  10528. teacherJuri.splice(i, 1);
  10529. break;
  10530. }
  10531. }
  10532. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10533. return (i.cclassid == '' || i.cclassid == null)
  10534. })
  10535. console.log(' this.teacherJuri', this.teacherJuri);
  10536. let _check = [];
  10537. let _check2 = [];
  10538. for (var i = 0; i < this.teacherJuri.length; i++) {
  10539. var gid = this.teacherJuri[i].userid;
  10540. _check.push(gid);
  10541. }
  10542. for (var i = 0; i < this.checkboxList3.length; i++) {
  10543. var _id = this.checkboxList3[i];
  10544. if (_check.indexOf(_id) !== -1) {
  10545. _check2.push(_id);
  10546. }
  10547. }
  10548. if (_check2.length==0 && _check.length==0) {
  10549. }else{
  10550. this.checkAll2 = _check2.length === _check.length;
  10551. }
  10552. this.CollLoading=false
  10553. })
  10554. .catch((err) => {
  10555. console.error(err);
  10556. this.CollLoading=false
  10557. });
  10558. },
  10559. getTeacher(val) {
  10560. this.CollLoading=true
  10561. this.collid = ''
  10562. this.collid = !val ? '' : val
  10563. let params = {
  10564. oid:
  10565. this.org && this.org != "undefined" && this.org != "null"
  10566. ? this.org
  10567. : this.oid,
  10568. cu: "",
  10569. cn: this.searchTN,
  10570. coll: this.collid
  10571. };
  10572. this.ajax
  10573. .get(
  10574. this.$store.state.api +
  10575. (this.org && this.org != "undefined" && this.org != "null"
  10576. ? "selectCollaborativeMembersOrg"
  10577. : "selectCollaborativeMembers"),
  10578. params
  10579. )
  10580. .then((res) => {
  10581. let teacherJuri = res.data[0];
  10582. this.CollaborativeTeaList = res.data[1];
  10583. for (var i = 0; i < teacherJuri.length; i++) {
  10584. if (teacherJuri[i].userid == this.userid) {
  10585. teacherJuri.splice(i, 1);
  10586. break;
  10587. }
  10588. }
  10589. this.teacherJuri = teacherJuri;
  10590. let _check = [];
  10591. let _check2 = [];
  10592. for (var i = 0; i < this.teacherJuri.length; i++) {
  10593. var gid = this.teacherJuri[i].userid;
  10594. _check.push(gid);
  10595. }
  10596. for (var i = 0; i < this.checkboxList3.length; i++) {
  10597. var _id = this.checkboxList3[i];
  10598. if (_check.indexOf(_id) !== -1) {
  10599. _check2.push(_id);
  10600. }
  10601. }
  10602. if (_check2.length==0 && _check.length==0) {
  10603. }else{
  10604. this.checkAll2 = _check2.length === _check.length;
  10605. }
  10606. this.CollLoading=false
  10607. })
  10608. .catch((err) => {
  10609. console.error(err);
  10610. this.CollLoading=false
  10611. });
  10612. },
  10613. searchStudent() {
  10614. this.getStudent();
  10615. },
  10616. selectGrage() {
  10617. let params = {
  10618. oid: this.oid,
  10619. };
  10620. this.ajax
  10621. .get(this.$store.state.api + "selectGrageBySchool", params)
  10622. .then((res) => {
  10623. this.gradeList = res.data[0];
  10624. })
  10625. .catch((err) => {
  10626. this.isLoading = false;
  10627. console.error(err);
  10628. });
  10629. },
  10630. //获取班级列表
  10631. getClass() {
  10632. let params = {
  10633. oid: this.oid,
  10634. gid: this.gradeId,
  10635. cn: this.classSearch,
  10636. };
  10637. this.ajax
  10638. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  10639. .then((res) => {
  10640. if (!this.grade.length) {
  10641. this.grade = res.data[0];
  10642. }
  10643. this.grade2 = res.data[0];
  10644. this.classJuri = res.data[0];
  10645. let _check = [];
  10646. let _check2 = [];
  10647. for (var i = 0; i < this.grade2.length; i++) {
  10648. var gid = this.grade2[i].id;
  10649. _check.push(gid);
  10650. }
  10651. for (var i = 0; i < this.checkboxList2.length; i++) {
  10652. var _id = this.checkboxList2[i];
  10653. if (_check.indexOf(_id) !== -1) {
  10654. _check2.push(_id);
  10655. }
  10656. }
  10657. this.checkAll = _check2.length === _check.length;
  10658. })
  10659. .catch((err) => {
  10660. this.isLoading = false;
  10661. console.error(err);
  10662. });
  10663. },
  10664. CourseType2Change(val) {
  10665. this.pTypeCheck = [];
  10666. for (var i = 0; i < this.CourseType2.length; i++) {
  10667. let typeA = this.CourseType2[i];
  10668. if (val.indexOf(typeA.name) != -1) {
  10669. this.pTypeCheck.push(...typeA.id);
  10670. }
  10671. }
  10672. },
  10673. getChapterData(e, i, j, ic, type) {
  10674. e.stopPropagation();
  10675. this.updataC = true;
  10676. this.icc = ic;
  10677. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  10678. console.log("还不能下载图片喔");
  10679. }
  10680. },
  10681. deleteChapterData(e, i, j, ic, taskI) {
  10682. e.stopPropagation();
  10683. let _this = this;
  10684. _this
  10685. .$confirm("确定删除此项?", "提示", {
  10686. confirmButtonText: "确定",
  10687. cancelButtonText: "取消",
  10688. type: "warning",
  10689. })
  10690. .then(() => {
  10691. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  10692. ic,
  10693. 1
  10694. );
  10695. })
  10696. .catch(() => {
  10697. return;
  10698. });
  10699. },
  10700. checkInfoData(fileid, file){
  10701. let type = 1
  10702. let index = 0
  10703. for(let i = 0; i < this.infoData.length; i++){
  10704. if(this.infoData[i].fileid == fileid){
  10705. type = 2
  10706. index = i
  10707. }
  10708. }
  10709. if(type == 2){
  10710. this.infoData.splice(index, 1)
  10711. }else {
  10712. this.infoData.push({...file})
  10713. }
  10714. },
  10715. deleteInfoData(e, ic) {
  10716. e.stopPropagation();
  10717. let _this = this;
  10718. _this
  10719. .$confirm("确定删除此项?", "提示", {
  10720. confirmButtonText: "确定",
  10721. cancelButtonText: "取消",
  10722. type: "warning",
  10723. })
  10724. .then(() => {
  10725. _this.infoData.splice(
  10726. ic,
  10727. 1
  10728. );
  10729. })
  10730. .catch(() => {
  10731. return;
  10732. });
  10733. },
  10734. deleteInfoData2(e, ic) {
  10735. e.stopPropagation();
  10736. let _this = this;
  10737. _this
  10738. .$confirm("确定删除此项?", "提示", {
  10739. confirmButtonText: "确定",
  10740. cancelButtonText: "取消",
  10741. type: "warning",
  10742. })
  10743. .then(() => {
  10744. _this.infoData2.splice(
  10745. ic,
  10746. 1
  10747. );
  10748. })
  10749. .catch(() => {
  10750. return;
  10751. });
  10752. },
  10753. deletemubiaoInfoData(e, ic) {
  10754. e.stopPropagation();
  10755. let _this = this;
  10756. _this
  10757. .$confirm("确定删除此项?", "提示", {
  10758. confirmButtonText: "确定",
  10759. cancelButtonText: "取消",
  10760. type: "warning",
  10761. })
  10762. .then(() => {
  10763. _this.mubiaoInfoData.splice(
  10764. ic,
  10765. 1
  10766. );
  10767. })
  10768. .catch(() => {
  10769. return;
  10770. });
  10771. },
  10772. deletexuanzeInfoData(e, ic) {
  10773. e.stopPropagation();
  10774. let _this = this;
  10775. _this
  10776. .$confirm("确定删除此项?", "提示", {
  10777. confirmButtonText: "确定",
  10778. cancelButtonText: "取消",
  10779. type: "warning",
  10780. })
  10781. .then(() => {
  10782. _this.xuanzeInfoData.splice(
  10783. ic,
  10784. 1
  10785. );
  10786. })
  10787. .catch(() => {
  10788. return;
  10789. });
  10790. },
  10791. deletepingjiaInfoData(e, ic, tindex) {
  10792. e.stopPropagation();
  10793. let _this = this;
  10794. _this
  10795. .$confirm("确定删除此项?", "提示", {
  10796. confirmButtonText: "确定",
  10797. cancelButtonText: "取消",
  10798. type: "warning",
  10799. })
  10800. .then(() => {
  10801. _this.pingjiaInfoData[tindex].splice(
  10802. ic,
  10803. 1
  10804. );
  10805. })
  10806. .catch(() => {
  10807. return;
  10808. });
  10809. },
  10810. deleteCankaoInfoData(e, ic) {
  10811. e.stopPropagation();
  10812. let _this = this;
  10813. _this
  10814. .$confirm("确定删除此项?", "提示", {
  10815. confirmButtonText: "确定",
  10816. cancelButtonText: "取消",
  10817. type: "warning",
  10818. })
  10819. .then(() => {
  10820. _this.cankaoInfoData.splice(
  10821. ic,
  10822. 1
  10823. );
  10824. })
  10825. .catch(() => {
  10826. return;
  10827. });
  10828. },
  10829. deleteTeacherInfoData(e, ic) {
  10830. e.stopPropagation();
  10831. let _this = this;
  10832. _this
  10833. .$confirm("确定删除此项?", "提示", {
  10834. confirmButtonText: "确定",
  10835. cancelButtonText: "取消",
  10836. type: "warning",
  10837. })
  10838. .then(() => {
  10839. _this.teacherInfoData.splice(
  10840. ic,
  10841. 1
  10842. );
  10843. })
  10844. .catch(() => {
  10845. return;
  10846. });
  10847. },
  10848. updataVideoT(e, i, j, ic) {
  10849. // e.stopPropagation();
  10850. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10851. // ic
  10852. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10853. this.line =
  10854. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10855. this.taskCount = j;
  10856. this.lineCount = ic;
  10857. this.dialogVisibleupdataVideoT = true;
  10858. this.$forceUpdate();
  10859. },
  10860. checkChpater(e, i, j, ic){
  10861. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10862. if(type == 3){
  10863. var fileA = [
  10864. "DOC",
  10865. "DOCX",
  10866. "DOCM",
  10867. "DOTM",
  10868. "DOTX",
  10869. "PPTX",
  10870. "PPSX",
  10871. "PPT",
  10872. "PPS",
  10873. "PPTM",
  10874. "POTM",
  10875. "PPAM",
  10876. "POTX",
  10877. "PPSM",
  10878. "XLSX",
  10879. "XLS"
  10880. ];
  10881. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10882. if (
  10883. fileA.indexOf(
  10884. url.split(".")[
  10885. url.split(".").length - 1
  10886. ].toLocaleUpperCase()
  10887. ) != -1
  10888. ) {
  10889. this.dialogVisibleOffice = true
  10890. this.wurl = url
  10891. } else if (
  10892. "pdf".indexOf(
  10893. url.split(".")[
  10894. url.split(".").length - 1
  10895. ].toLocaleLowerCase()
  10896. ) != -1
  10897. ) {
  10898. this.dialogVisiblePdf = true
  10899. this.wurl = url
  10900. }
  10901. }
  10902. },
  10903. checkChpater2(e, ic){
  10904. let type = this.infoData2[ic].type
  10905. if(type == 3){
  10906. var fileA = [
  10907. "DOC",
  10908. "DOCX",
  10909. "DOCM",
  10910. "DOTM",
  10911. "DOTX",
  10912. "PPTX",
  10913. "PPSX",
  10914. "PPT",
  10915. "PPS",
  10916. "PPTM",
  10917. "POTM",
  10918. "PPAM",
  10919. "POTX",
  10920. "PPSM",
  10921. "XLSX",
  10922. "XLS"
  10923. ];
  10924. let url = this.infoData2[ic].url
  10925. if (
  10926. fileA.indexOf(
  10927. url.split(".")[
  10928. url.split(".").length - 1
  10929. ].toLocaleUpperCase()
  10930. ) != -1
  10931. ) {
  10932. this.dialogVisibleOffice = true
  10933. this.wurl = url
  10934. } else if (
  10935. "pdf".indexOf(
  10936. url.split(".")[
  10937. url.split(".").length - 1
  10938. ].toLocaleLowerCase()
  10939. ) != -1
  10940. ) {
  10941. this.dialogVisiblePdf = true
  10942. this.wurl = url
  10943. }
  10944. }
  10945. },
  10946. checkChpater3(e, ic, item){
  10947. let type = item.type
  10948. if(type == 3){
  10949. var fileA = [
  10950. "DOC",
  10951. "DOCX",
  10952. "DOCM",
  10953. "DOTM",
  10954. "DOTX",
  10955. "PPTX",
  10956. "PPSX",
  10957. "PPT",
  10958. "PPS",
  10959. "PPTM",
  10960. "POTM",
  10961. "PPAM",
  10962. "POTX",
  10963. "PPSM",
  10964. "XLSX",
  10965. "XLS"
  10966. ];
  10967. let url = item.url
  10968. if (
  10969. fileA.indexOf(
  10970. url.split(".")[
  10971. url.split(".").length - 1
  10972. ].toLocaleUpperCase()
  10973. ) != -1
  10974. ) {
  10975. this.dialogVisibleOffice = true
  10976. this.wurl = url
  10977. } else if (
  10978. "pdf".indexOf(
  10979. url.split(".")[
  10980. url.split(".").length - 1
  10981. ].toLocaleLowerCase()
  10982. ) != -1
  10983. ) {
  10984. this.dialogVisiblePdf = true
  10985. this.wurl = url
  10986. }
  10987. }
  10988. },
  10989. updataVideoC() {
  10990. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10991. this.taskCount
  10992. ].chapterData[this.lineCount].name = JSON.parse(
  10993. JSON.stringify(this.line)
  10994. );
  10995. this.dialogVisibleupdataVideoT = false;
  10996. this.$forceUpdate();
  10997. },
  10998. upCd(e, i, j, taskCount, ic) {
  10999. e.stopPropagation();
  11000. if (ic == 0) {
  11001. return;
  11002. }
  11003. var a = JSON.parse(
  11004. JSON.stringify(
  11005. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11006. ic - 1
  11007. ]
  11008. )
  11009. );
  11010. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11011. JSON.parse(
  11012. JSON.stringify(
  11013. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11014. )
  11015. );
  11016. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11017. this.$forceUpdate();
  11018. },
  11019. downCd(e, i, j, taskCount, ic) {
  11020. e.stopPropagation();
  11021. if (
  11022. ic ==
  11023. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11024. 1
  11025. ) {
  11026. return;
  11027. }
  11028. var a = JSON.parse(
  11029. JSON.stringify(
  11030. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11031. ic + 1
  11032. ]
  11033. )
  11034. );
  11035. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11036. JSON.parse(
  11037. JSON.stringify(
  11038. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11039. )
  11040. );
  11041. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11042. this.$forceUpdate();
  11043. },
  11044. async upTool(e, i, j, tooli) {
  11045. e.stopPropagation();
  11046. if (tooli == 0) {
  11047. return;
  11048. }
  11049. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11050. let count2 = await this.getWorksCount(3, i, j, tooli);
  11051. if (count1 > 0 || count2 > 0) {
  11052. this.$confirm(
  11053. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11054. "提示",
  11055. {
  11056. confirmButtonText: "确定",
  11057. cancelButtonText: "取消",
  11058. type: "warning",
  11059. }
  11060. )
  11061. .then(() => {
  11062. var a = JSON.parse(
  11063. JSON.stringify(
  11064. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11065. tooli - 1
  11066. ]
  11067. )
  11068. );
  11069. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11070. JSON.parse(
  11071. JSON.stringify(
  11072. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11073. )
  11074. );
  11075. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11076. this.$forceUpdate();
  11077. })
  11078. .catch(() => {
  11079. return;
  11080. });
  11081. } else {
  11082. var a = JSON.parse(
  11083. JSON.stringify(
  11084. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11085. )
  11086. );
  11087. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11088. JSON.parse(
  11089. JSON.stringify(
  11090. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11091. )
  11092. );
  11093. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11094. this.$forceUpdate();
  11095. }
  11096. },
  11097. async downTool(e, i, j, tooli) {
  11098. e.stopPropagation();
  11099. if (
  11100. tooli ==
  11101. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11102. ) {
  11103. return;
  11104. }
  11105. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11106. let count2 = await this.getWorksCount(3, i, j, tooli);
  11107. if (count1 > 0 || count2 > 0) {
  11108. this.$confirm(
  11109. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11110. "提示",
  11111. {
  11112. confirmButtonText: "确定",
  11113. cancelButtonText: "取消",
  11114. type: "warning",
  11115. }
  11116. )
  11117. .then(() => {
  11118. var a = JSON.parse(
  11119. JSON.stringify(
  11120. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11121. tooli + 1
  11122. ]
  11123. )
  11124. );
  11125. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11126. JSON.parse(
  11127. JSON.stringify(
  11128. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11129. )
  11130. );
  11131. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11132. this.$forceUpdate();
  11133. })
  11134. .catch(() => {
  11135. return;
  11136. });
  11137. } else {
  11138. var a = JSON.parse(
  11139. JSON.stringify(
  11140. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11141. )
  11142. );
  11143. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11144. JSON.parse(
  11145. JSON.stringify(
  11146. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11147. )
  11148. );
  11149. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11150. this.$forceUpdate();
  11151. }
  11152. },
  11153. addWork(type) {
  11154. if(type == 2 && this.courseName == "") {
  11155. this.$message.error("请补充填写课程名称");
  11156. return;
  11157. }
  11158. let cPan = 1;
  11159. for (var i = 0; i < this.unitJson.length; i++) {
  11160. for (
  11161. var j = 0;
  11162. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11163. j++
  11164. ) {
  11165. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11166. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11167. if (
  11168. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11169. ) {
  11170. for (
  11171. var z = 0;
  11172. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11173. z++
  11174. ) {
  11175. if (
  11176. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11177. .length
  11178. ) {
  11179. this.$message.error("请把工具添加完整");
  11180. cPan = 2;
  11181. break;
  11182. }
  11183. }
  11184. }
  11185. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11186. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11187. i
  11188. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11189. return ele.value != "";
  11190. });
  11191. }
  11192. }
  11193. }
  11194. this.inputShow = true;
  11195. if (cPan == 2) {
  11196. this.steps--;
  11197. return;
  11198. }
  11199. for (var i = 0; i < this.unitJson.length; i++) {
  11200. delete this.unitJson[i].isUpdate;
  11201. }
  11202. if(!this.targetCourseText2){
  11203. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11204. }
  11205. let params = [
  11206. {
  11207. uid: this.userid,
  11208. title: this.courseName,
  11209. brief: this.courseText,
  11210. cover:
  11211. this.cover.length > 0
  11212. ? JSON.stringify(this.cover)
  11213. : JSON.stringify([
  11214. {
  11215. name: "noBanner.jpg",
  11216. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11217. uid: 1656409780264,
  11218. status: "success",
  11219. },
  11220. ]),
  11221. evaId: this.evalua,
  11222. astudent:
  11223. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11224. see: this.isTeacherSee == true ? 1 : 0,
  11225. chapters: JSON.stringify(this.unitJson),
  11226. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11227. courseType: JSON.stringify(this.courseTypeId),
  11228. ateacher:
  11229. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11230. inviteCode: JSON.stringify(this.inviteCode),
  11231. refile: JSON.stringify(this.infoData),
  11232. reBrief: this.courseText2,
  11233. cpote: JSON.stringify(this.cpote),
  11234. setting: JSON.stringify({
  11235. courseJie: this.courseJie,
  11236. courseTime: this.courseTime,
  11237. teacherInfoData: this.teacherInfoData,
  11238. teacherCourseText: this.teacherCourseText,
  11239. targetCourseText: this.targetCourseText,
  11240. cankaoInfoData: this.cankaoInfoData,
  11241. mubiaoInfoData: this.mubiaoInfoData,
  11242. xuanzeInfoData: this.xuanzeInfoData,
  11243. pingjiaInfoData: this.pingjiaInfoData,
  11244. infoData2: this.infoData2,
  11245. isuseT: this.isuseT,
  11246. mode: this.mode,
  11247. targetCourseText2: this.targetCourseText2,
  11248. }),
  11249. iresearch: this.isFileSearch ? 1 : 2,
  11250. },
  11251. ];
  11252. this.ajax
  11253. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11254. .then((res) => {
  11255. console.log(this.steps);
  11256. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11257. this.$message({
  11258. message: "新增成功",
  11259. type: "success",
  11260. });
  11261. }
  11262. this.number = res.data.ordernumber;
  11263. this.courseId = res.data.courseId;
  11264. this.cid = res.data.courseId;
  11265. this.courseUserid = this.userid;
  11266. this.islogin = true;
  11267. // this.updateCourseState(4);
  11268. this.updateCourseState(5);
  11269. this.addtips()
  11270. if(type == 2){
  11271. this.retrunCourse()
  11272. }
  11273. })
  11274. .catch((err) => {
  11275. this.$message.error("网络不佳");
  11276. console.error(err);
  11277. });
  11278. },
  11279. goCourse() {
  11280. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11281. },
  11282. updateWork2() {
  11283. let _unitIndex = this.unitIndex;
  11284. let cPan = 1;
  11285. for (
  11286. var j = 0;
  11287. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11288. j++
  11289. ) {
  11290. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11291. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11292. j
  11293. ].proVisible2 = false;
  11294. if (
  11295. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11296. .length > 1
  11297. ) {
  11298. for (
  11299. var z = 0;
  11300. z <
  11301. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11302. .length;
  11303. z++
  11304. ) {
  11305. if (
  11306. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11307. z
  11308. ].tool.length
  11309. ) {
  11310. this.$message.error("请把工具添加完整");
  11311. cPan = 2;
  11312. break;
  11313. }
  11314. }
  11315. }
  11316. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11317. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11318. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11319. (ele) => {
  11320. return ele.value != "";
  11321. }
  11322. );
  11323. }
  11324. }
  11325. this.inputShow = true;
  11326. if (cPan == 2) {
  11327. this.steps--;
  11328. return;
  11329. }
  11330. let params = [
  11331. {
  11332. cid: this.cid,
  11333. chapters: JSON.stringify(this.unitJson),
  11334. uid: this.userid,
  11335. unitIndex: _unitIndex,
  11336. },
  11337. ];
  11338. this.ajax
  11339. .post(this.$store.state.api + "updateWorkNew4", params)
  11340. .then((res) => {
  11341. this.$message({
  11342. message: "修改成功",
  11343. type: "success",
  11344. });
  11345. this.courseId = this.cid;
  11346. this.addtips();
  11347. })
  11348. .catch((err) => {
  11349. this.$message.error("网络不佳");
  11350. console.error(err);
  11351. });
  11352. },
  11353. updateWork3(unitIndex) {
  11354. let _unitIndex = unitIndex;
  11355. let cPan = 1;
  11356. for (
  11357. var j = 0;
  11358. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11359. j++
  11360. ) {
  11361. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11362. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11363. j
  11364. ].proVisible2 = false;
  11365. if (
  11366. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11367. .length > 1
  11368. ) {
  11369. for (
  11370. var z = 0;
  11371. z <
  11372. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11373. .length;
  11374. z++
  11375. ) {
  11376. if (
  11377. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11378. z
  11379. ].tool.length
  11380. ) {
  11381. this.$message.error("请把工具添加完整");
  11382. cPan = 2;
  11383. break;
  11384. }
  11385. }
  11386. }
  11387. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11388. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11389. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11390. (ele) => {
  11391. return ele.value != "";
  11392. }
  11393. );
  11394. }
  11395. }
  11396. this.inputShow = true;
  11397. if (cPan == 2) {
  11398. this.steps--;
  11399. return;
  11400. }
  11401. let params = [
  11402. {
  11403. cid: this.cid,
  11404. chapters: JSON.stringify(this.unitJson),
  11405. uid: this.userid,
  11406. unitIndex: _unitIndex,
  11407. },
  11408. ];
  11409. this.ajax
  11410. .post(this.$store.state.api + "updateWorkNew4", params)
  11411. .then((res) => {
  11412. // this.$message({
  11413. // message: "修改成功",
  11414. // type: "success",
  11415. // });
  11416. this.courseId = this.cid;
  11417. this.addtips()
  11418. })
  11419. .catch((err) => {
  11420. this.$message.error("网络不佳");
  11421. console.error(err);
  11422. });
  11423. },
  11424. updateWork() {
  11425. let cPan = 1;
  11426. for (var i = 0; i < this.unitJson.length; i++) {
  11427. for (
  11428. var j = 0;
  11429. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11430. j++
  11431. ) {
  11432. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11433. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11434. if (
  11435. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11436. ) {
  11437. for (
  11438. var z = 0;
  11439. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11440. z++
  11441. ) {
  11442. if (
  11443. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11444. .length
  11445. ) {
  11446. this.$message.error("请把工具添加完整");
  11447. cPan = 2;
  11448. break;
  11449. }
  11450. }
  11451. }
  11452. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11453. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11454. i
  11455. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11456. return ele.value != "";
  11457. });
  11458. }
  11459. }
  11460. }
  11461. this.inputShow = true;
  11462. if (cPan == 2) {
  11463. this.steps--;
  11464. return;
  11465. }
  11466. for (var i = 0; i < this.unitJson.length; i++) {
  11467. delete this.unitJson[i].isUpdate;
  11468. }
  11469. if(!this.targetCourseText2){
  11470. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11471. }
  11472. let params = [
  11473. {
  11474. cid: this.cid,
  11475. title: this.courseName,
  11476. brief: this.courseText,
  11477. cover:
  11478. this.cover.length > 0
  11479. ? JSON.stringify(this.cover)
  11480. : JSON.stringify([
  11481. {
  11482. name: "noBanner.jpg",
  11483. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11484. uid: 1656409780264,
  11485. status: "success",
  11486. },
  11487. ]),
  11488. evaId: this.evalua,
  11489. astudent:
  11490. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11491. see: this.isTeacherSee == true ? 1 : 0,
  11492. chapters: JSON.stringify(this.unitJson),
  11493. template: this.myWord != "undefined" ? this.myWord : [],
  11494. uid: this.userid,
  11495. courseType: JSON.stringify(this.courseTypeId),
  11496. ateacher:
  11497. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11498. inviteCode: JSON.stringify(this.inviteCode),
  11499. refile: JSON.stringify(this.infoData),
  11500. reBrief: this.courseText2,
  11501. cpote: JSON.stringify(this.cpote),
  11502. setting: JSON.stringify({
  11503. courseJie: this.courseJie,
  11504. courseTime: this.courseTime,
  11505. teacherInfoData: this.teacherInfoData,
  11506. teacherCourseText: this.teacherCourseText,
  11507. targetCourseText: this.targetCourseText,
  11508. cankaoInfoData: this.cankaoInfoData,
  11509. mubiaoInfoData: this.mubiaoInfoData,
  11510. xuanzeInfoData: this.xuanzeInfoData,
  11511. pingjiaInfoData: this.pingjiaInfoData,
  11512. infoData2: this.infoData2,
  11513. isuseT: this.isuseT,
  11514. mode: this.mode,
  11515. targetCourseText2: this.targetCourseText2,
  11516. }),
  11517. iresearch: this.isFileSearch ? 1 : 2,
  11518. },
  11519. ];
  11520. this.ajax
  11521. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  11522. .then((res) => {
  11523. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11524. if (this.cidType == 1) {
  11525. this.$message({
  11526. message: "修改成功",
  11527. type: "success",
  11528. });
  11529. } else {
  11530. this.$message({
  11531. message: "新增成功",
  11532. type: "success",
  11533. });
  11534. }
  11535. }
  11536. this.number = this.nbOrder;
  11537. this.courseId = this.cid;
  11538. this.addtips()
  11539. })
  11540. .catch((err) => {
  11541. this.$message.error("网络不佳");
  11542. console.error(err);
  11543. });
  11544. },
  11545. insertWord() {
  11546. this.dialogVisible1 = true;
  11547. this.updateBoolean2 = false;
  11548. this.tTitle = "";
  11549. this.tdetail = "";
  11550. },
  11551. addWord() {
  11552. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  11553. name: this.tTitle,
  11554. content: this.tdetail,
  11555. uid: this.guid(),
  11556. });
  11557. this.dialogVisible1 = false;
  11558. },
  11559. upWord() { },
  11560. selectWord(uid, i, c) {
  11561. this.dialogVisible1 = true;
  11562. this.updateBoolean2 = true;
  11563. if (
  11564. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  11565. ) {
  11566. this.tTitle =
  11567. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  11568. this.tdetail =
  11569. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  11570. }
  11571. },
  11572. isAddPP() {
  11573. if (this.checkboxList.length > 0) {
  11574. this.$message({
  11575. message: "添加成功",
  11576. type: "success",
  11577. });
  11578. this.dialogVisible3 = false;
  11579. } else {
  11580. this.$message({
  11581. message: "请添加课程成员",
  11582. type: "error",
  11583. });
  11584. }
  11585. },
  11586. isAddClass() {
  11587. this.dialogVisibleClass = false;
  11588. },
  11589. isAddPPTeacher() {
  11590. this.dialogVisibleMember = false;
  11591. this.setMan();
  11592. },
  11593. getTipsTemplate(){
  11594. if(this.templateid){
  11595. let params = {
  11596. id: this.templateid
  11597. }
  11598. this.ajax
  11599. .get(this.$store.state.api + "selectTipsTemplateById", params)
  11600. .then((res) => {
  11601. if(res.data[0].length){
  11602. this.tipsJson = res.data[0][0]
  11603. this.aiJson = JSON.parse(res.data[0][0].tips)
  11604. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11605. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11606. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11607. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11608. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11609. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11610. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  11611. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  11612. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  11613. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  11614. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  11615. }
  11616. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  11617. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  11618. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  11619. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  11620. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  11621. // }
  11622. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  11623. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11624. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11625. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11626. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  11627. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11628. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  11629. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11630. // }
  11631. this.$forceUpdate();
  11632. }
  11633. })
  11634. .catch((err) => { });
  11635. }
  11636. },
  11637. getTemplate() {
  11638. this.ajax
  11639. .get(this.$store.state.api + "getCourseTemplateT", "")
  11640. .then((res) => {
  11641. this.templateArray = res.data[0];
  11642. this.getTemplateOid();
  11643. this.$forceUpdate();
  11644. })
  11645. .catch((err) => { });
  11646. },
  11647. getTemplateOid() {
  11648. let params = {
  11649. oid: this.oid,
  11650. };
  11651. this.ajax
  11652. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11653. .then((res) => {
  11654. if (res.data[0].length) {
  11655. this.templateArray = [...res.data[0], ...this.templateArray];
  11656. }
  11657. this.getTemplateOrg();
  11658. this.$forceUpdate();
  11659. })
  11660. .catch((err) => { });
  11661. },
  11662. getTemplateOrg() {
  11663. let params = {
  11664. oid: this.org,
  11665. };
  11666. this.ajax
  11667. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11668. .then((res) => {
  11669. if (res.data[0].length) {
  11670. this.templateArray = [...res.data[0], ...this.templateArray];
  11671. }
  11672. this.$forceUpdate();
  11673. })
  11674. .catch((err) => { });
  11675. },
  11676. clearChoose() {
  11677. this.clearArray.splice(this.templateC.id, 1);
  11678. this.dialogVisible2 = false;
  11679. },
  11680. clearAttText() {
  11681. this.AttText = {
  11682. title: "",
  11683. text: "",
  11684. };
  11685. this.dialogVisible6 = false;
  11686. },
  11687. clearLine() {
  11688. this.line = "";
  11689. this.dialogVisible7 = false;
  11690. },
  11691. openTemplate() {
  11692. this.ctJson = {};
  11693. this.templateDialog = true;
  11694. },
  11695. checkctJson(json) {
  11696. if (this.ctJson.id == json.id) {
  11697. this.ctJson = {};
  11698. } else {
  11699. this.ctJson = json;
  11700. }
  11701. },
  11702. addTemplate(res) {
  11703. let _this = this;
  11704. let _res = [];
  11705. if (res.id == 1) {
  11706. _res = [
  11707. {
  11708. dyName: "", //单元标题
  11709. easy: 1,
  11710. chapterInfo: [
  11711. {
  11712. isread: false,
  11713. chapterid: this.guid(),
  11714. title: "",
  11715. courseName: "",
  11716. taskJson: [
  11717. {
  11718. task: "",
  11719. taskDetail: "",
  11720. chapterData: [],
  11721. toolText: "",
  11722. toolChoose: [
  11723. {
  11724. tool: [],
  11725. toolDetail: "",
  11726. toolType: 0,
  11727. askCount: 1,
  11728. askTitle: "",
  11729. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11730. },
  11731. ],
  11732. isShowTools: false,
  11733. askCount: 1,
  11734. isFold: 1,
  11735. askTitle: "",
  11736. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11737. checkJson: [{ checkCount: [], checkPerent: [] }],
  11738. homeworkList: [],
  11739. },
  11740. ],
  11741. itemCount: 1,
  11742. fileList1: [],
  11743. video: [],
  11744. testData: [],
  11745. pData: [],
  11746. templateArray: [],
  11747. },
  11748. ],
  11749. },
  11750. ];
  11751. this.updateCourseState(1);
  11752. } else if (res.id == 2) {
  11753. let stageData = [];
  11754. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11755. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11756. if (!iframe && !iframe2) {
  11757. this.$message.error("请使用AI共创生成");
  11758. return;
  11759. }
  11760. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11761. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11762. if (
  11763. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  11764. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  11765. ) {
  11766. this.$message.error("请使用AI共创生成");
  11767. return;
  11768. }
  11769. stageData = copyData
  11770. ? copyData.stageData
  11771. : copyData2
  11772. ? copyData2.stageData
  11773. : [""];
  11774. for (var i = 0; i < stageData.length; i++) {
  11775. _res.push({
  11776. dyName: stageData[i], //单元标题
  11777. chapterInfo: [
  11778. {
  11779. isread: false,
  11780. chapterid: this.guid(),
  11781. title: "",
  11782. courseName: "",
  11783. taskJson: [
  11784. {
  11785. task: "",
  11786. taskDetail: "",
  11787. chapterData: [],
  11788. toolText: "",
  11789. toolChoose: [
  11790. {
  11791. tool: [],
  11792. toolDetail: "",
  11793. toolType: 0,
  11794. askCount: 1,
  11795. askTitle: "",
  11796. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11797. },
  11798. ],
  11799. isShowTools: false,
  11800. askCount: 1,
  11801. isFold: 1,
  11802. askTitle: "",
  11803. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11804. checkJson: [{ checkCount: [], checkPerent: [] }],
  11805. homeworkList: [],
  11806. },
  11807. ],
  11808. itemCount: 1,
  11809. fileList1: [],
  11810. video: [],
  11811. testData: [],
  11812. pData: [],
  11813. templateArray: [],
  11814. },
  11815. ],
  11816. });
  11817. }
  11818. this.updateCourseState(1);
  11819. } else if (!Object.keys(res).length) {
  11820. this.$message.error("请选择模板");
  11821. retrun;
  11822. } else {
  11823. _res = JSON.parse(res.chapters);
  11824. this.updateCourseState(parseInt(res.state));
  11825. }
  11826. _this
  11827. .$confirm(
  11828. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11829. "提示",
  11830. {
  11831. confirmButtonText: "确定",
  11832. cancelButtonText: "取消",
  11833. type: "warning",
  11834. }
  11835. )
  11836. .then(() => {
  11837. _this.unitJson = _res;
  11838. _this.updateWork();
  11839. // _this.steps++;
  11840. _this.templateDialog = false;
  11841. setTimeout(() => {
  11842. this.checkEva(this.checkId);
  11843. setTimeout(() => {
  11844. this.checkEva(this.checkId);
  11845. }, 100);
  11846. }, 1000);
  11847. })
  11848. .catch(() => {
  11849. return;
  11850. });
  11851. },
  11852. checkTemplate(res) {
  11853. let _this = this;
  11854. _this
  11855. .$confirm(
  11856. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11857. "提示",
  11858. {
  11859. confirmButtonText: "确定",
  11860. cancelButtonText: "取消",
  11861. type: "warning",
  11862. }
  11863. )
  11864. .then(() => {
  11865. _this.unitJson = JSON.parse(res.chapters);
  11866. _this.steps++;
  11867. setTimeout(() => {
  11868. this.checkEva(this.checkId);
  11869. setTimeout(() => {
  11870. this.checkEva(this.checkId);
  11871. }, 100);
  11872. }, 1000);
  11873. })
  11874. .catch(() => {
  11875. return;
  11876. });
  11877. },
  11878. checkTemplate1(w) {
  11879. this.steps++;
  11880. },
  11881. checkTemplate2() {
  11882. let _this = this;
  11883. _this
  11884. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11885. confirmButtonText: "确定",
  11886. cancelButtonText: "取消",
  11887. type: "warning",
  11888. })
  11889. .then(() => {
  11890. _this.unitIndex = 0;
  11891. _this.unitJson = [
  11892. {
  11893. dyName: "", //单元标题
  11894. chapterInfo: [
  11895. {
  11896. isread: false,
  11897. chapterid: this.guid(),
  11898. title: "",
  11899. courseName: "",
  11900. taskJson: [
  11901. {
  11902. task: "",
  11903. taskDetail: "",
  11904. chapterData: [],
  11905. toolText: "",
  11906. toolChoose: [
  11907. {
  11908. tool: [],
  11909. toolDetail: "",
  11910. toolType: 0,
  11911. askCount: 1,
  11912. askTitle: "",
  11913. askJson: [
  11914. { askstitle: "", askItem: 1, checkList: [] },
  11915. ],
  11916. },
  11917. ],
  11918. isShowTools: false,
  11919. askCount: 1,
  11920. isFold: 1,
  11921. askTitle: "",
  11922. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11923. checkJson: [{ checkCount: [], checkPerent: [] }],
  11924. homeworkList: [],
  11925. },
  11926. ],
  11927. itemCount: 1,
  11928. fileList1: [],
  11929. video: [],
  11930. testData: [],
  11931. pData: [],
  11932. templateArray: [],
  11933. },
  11934. ],
  11935. },
  11936. ];
  11937. this.steps++;
  11938. setTimeout(() => {
  11939. this.checkEva(this.checkId);
  11940. setTimeout(() => {
  11941. this.checkEva(this.checkId);
  11942. }, 100);
  11943. }, 1000);
  11944. this.updateWork();
  11945. })
  11946. .catch(() => {
  11947. return;
  11948. });
  11949. },
  11950. checkTemplate3() {
  11951. let _this = this;
  11952. _this
  11953. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11954. confirmButtonText: "确定",
  11955. cancelButtonText: "取消",
  11956. type: "warning",
  11957. })
  11958. .then(() => {
  11959. _this.unitIndex = 0;
  11960. _this.unitJson = [
  11961. {
  11962. dyName: "", //单元标题
  11963. easy: 1,
  11964. chapterInfo: [
  11965. {
  11966. isread: false,
  11967. chapterid: this.guid(),
  11968. title: "",
  11969. courseName: "",
  11970. taskJson: [
  11971. {
  11972. task: "",
  11973. taskDetail: "",
  11974. chapterData: [],
  11975. toolText: "",
  11976. toolChoose: [
  11977. {
  11978. tool: [],
  11979. toolDetail: "",
  11980. toolType: 0,
  11981. askCount: 1,
  11982. askTitle: "",
  11983. askJson: [
  11984. { askstitle: "", askItem: 1, checkList: [] },
  11985. ],
  11986. },
  11987. ],
  11988. isShowTools: false,
  11989. askCount: 1,
  11990. isFold: 1,
  11991. askTitle: "",
  11992. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11993. checkJson: [{ checkCount: [], checkPerent: [] }],
  11994. homeworkList: [],
  11995. },
  11996. ],
  11997. itemCount: 1,
  11998. fileList1: [],
  11999. video: [],
  12000. testData: [],
  12001. pData: [],
  12002. templateArray: [],
  12003. },
  12004. ],
  12005. },
  12006. ];
  12007. // this.steps++;
  12008. this.updateWork();
  12009. })
  12010. .catch(() => {
  12011. return;
  12012. });
  12013. },
  12014. checkTemplate4() {
  12015. let _this = this;
  12016. _this
  12017. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12018. confirmButtonText: "确定",
  12019. cancelButtonText: "取消",
  12020. type: "warning",
  12021. })
  12022. .then(() => {
  12023. _this.unitIndex = 0;
  12024. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12025. this.steps++;
  12026. this.updateWork();
  12027. })
  12028. .catch(() => {
  12029. return;
  12030. });
  12031. },
  12032. wordNext() {
  12033. this.dialogVisible2 = false;
  12034. },
  12035. isAddOrUpdateAttText() {
  12036. if (this.AttTextType == 0) {
  12037. this.addAttTextMessage();
  12038. } else {
  12039. this.updateAttText();
  12040. }
  12041. },
  12042. isAddOrUpdateLine() {
  12043. if (!this.lineTitle) {
  12044. this.$message.error("请填写链接标题");
  12045. return;
  12046. }
  12047. if (this.lineType == 0) {
  12048. this.addLine();
  12049. } else {
  12050. this.updateLine();
  12051. }
  12052. },
  12053. addAttTextMessage() {
  12054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12055. this.taskCount
  12056. ].chapterData.unshift({
  12057. name: this.AttText.title,
  12058. url: this.AttText.text,
  12059. type: 6,
  12060. });
  12061. this.imgChange1(null, null, 6, this.taskCount);
  12062. this.dialogVisible6 = false;
  12063. },
  12064. selectAttText(itemTaskIndex, i) {
  12065. this.AttText.title =
  12066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12067. itemTaskIndex
  12068. ].chapterData[i].name;
  12069. this.AttText.text =
  12070. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12071. itemTaskIndex
  12072. ].chapterData[i].url;
  12073. this.taskCount = itemTaskIndex;
  12074. this.AttTextIndex = i;
  12075. this.AttTextType = 1;
  12076. this.dialogVisible6 = true;
  12077. },
  12078. updateAttText() {
  12079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12080. this.taskCount
  12081. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12083. this.taskCount
  12084. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12085. this.dialogVisible6 = false;
  12086. },
  12087. addLine() {
  12088. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12089. this.lineCount
  12090. ].chapterData.unshift({
  12091. name: "链接",
  12092. title: this.lineTitle,
  12093. url: this.line,
  12094. type: 8,
  12095. });
  12096. this.imgChange1(null, null, 8, this.lineCount);
  12097. this.dialogVisible7 = false;
  12098. },
  12099. selectLine(itemTaskIndex, i) {
  12100. this.line =
  12101. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12102. itemTaskIndex
  12103. ].chapterData[i].url;
  12104. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12105. itemTaskIndex
  12106. ].chapterData[i].title
  12107. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12108. .chapterData[i].title
  12109. : "";
  12110. this.taskCount = itemTaskIndex;
  12111. this.lineCount = i;
  12112. this.lineType = 1;
  12113. this.dialogVisible7 = true;
  12114. },
  12115. openUpdateSource(itemTaskIndex, i) {
  12116. this.sourceData = {};
  12117. let source =
  12118. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12119. .chapterData[i];
  12120. this.sourceData[source.id] = {};
  12121. this.sourceData[source.id].name = source.title;
  12122. this.sourceData[source.id].url = source.url;
  12123. this.dialogVisibleSource = true;
  12124. this.updateSourcePan = true;
  12125. this.taskCount = itemTaskIndex;
  12126. this.lineCount = i;
  12127. },
  12128. updateLine() {
  12129. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12130. this.taskCount
  12131. ].chapterData[this.lineCount].url = this.line;
  12132. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12133. this.taskCount
  12134. ].chapterData[this.lineCount].title = this.lineTitle;
  12135. this.dialogVisible7 = false;
  12136. },
  12137. addPP() {
  12138. this.dialogVisible3 = true;
  12139. },
  12140. goTo(path) {
  12141. this.$router.push(path);
  12142. },
  12143. openTools(itemTaskIndex, i, toolIndex) {
  12144. this.toolIndex = toolIndex;
  12145. this.taskCount = itemTaskIndex;
  12146. if (i == 4) {
  12147. if (toolIndex == null) {
  12148. var a =
  12149. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12150. .chapterData;
  12151. for (var i = 0; i < a.length; i++) {
  12152. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12153. this.askJson =
  12154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12155. itemTaskIndex
  12156. ].chapterData[i].askJson;
  12157. }
  12158. }
  12159. } else {
  12160. this.askJson = JSON.parse(
  12161. JSON.stringify(
  12162. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12163. itemTaskIndex
  12164. ].toolChoose[toolIndex]
  12165. )
  12166. );
  12167. }
  12168. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12169. this.dialogVisible5 = true;
  12170. } else if (i == 45) {
  12171. if (
  12172. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12173. .toolChoose[toolIndex].testJson
  12174. ) {
  12175. this.testJson = JSON.parse(
  12176. JSON.stringify(
  12177. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12178. itemTaskIndex
  12179. ].toolChoose[toolIndex].testJson
  12180. )
  12181. );
  12182. } else {
  12183. var testJson = {
  12184. testCount: 1,
  12185. testTitle: "",
  12186. testJson: [
  12187. {
  12188. teststitle: "",
  12189. testItem: 1,
  12190. checkList: [],
  12191. timuList: [],
  12192. answer: [],
  12193. type: "1",
  12194. },
  12195. ],
  12196. };
  12197. this.testJson = testJson;
  12198. }
  12199. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12200. this.dialogVisibleChoice = true;
  12201. } else if (i == 47) {
  12202. if (
  12203. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12204. .toolChoose[toolIndex].sentenceList
  12205. ) {
  12206. this.sentenceList = JSON.parse(
  12207. JSON.stringify(
  12208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12209. itemTaskIndex
  12210. ].toolChoose[toolIndex].sentenceList
  12211. )
  12212. );
  12213. } else {
  12214. var sentenceList = [
  12215. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12216. ];
  12217. this.sentenceList = sentenceList;
  12218. }
  12219. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12220. this.dialogVisibleSentence = true;
  12221. } else if (i == 48) {
  12222. if (
  12223. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12224. .toolChoose[toolIndex].tableJson
  12225. ) {
  12226. this.tableJson = JSON.parse(
  12227. JSON.stringify(
  12228. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12229. itemTaskIndex
  12230. ].toolChoose[toolIndex].tableJson
  12231. )
  12232. );
  12233. } else {
  12234. var tableJson = { text: "" };
  12235. this.tableJson = tableJson;
  12236. }
  12237. this.dialogVisibleTable = true;
  12238. } else if (i == 52) {
  12239. if (
  12240. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12241. .toolChoose[toolIndex].wordJson
  12242. ) {
  12243. this.wordJson = JSON.parse(
  12244. JSON.stringify(
  12245. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12246. itemTaskIndex
  12247. ].toolChoose[toolIndex].wordJson
  12248. )
  12249. );
  12250. } else {
  12251. var wordJson = { text: "" };
  12252. this.wordJson = wordJson;
  12253. }
  12254. this.dialogVisibleWord = true;
  12255. // else if (i == 50) {
  12256. // if (
  12257. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12258. // .toolChoose[toolIndex].uploadJson
  12259. // ) {
  12260. // this.uploadJson = JSON.parse(
  12261. // JSON.stringify(
  12262. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12263. // itemTaskIndex
  12264. // ].toolChoose[toolIndex].uploadJson
  12265. // )
  12266. // );
  12267. // } else {
  12268. // var uploadJson = [];
  12269. // this.uploadJson = uploadJson;
  12270. // }
  12271. // this.dialogVisibleMoreUpload = true;
  12272. // }
  12273. } else if (i == 10) {
  12274. if (
  12275. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12276. .toolChoose[toolIndex].preTime
  12277. ) {
  12278. this.preTime = JSON.parse(
  12279. JSON.stringify(
  12280. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12281. itemTaskIndex
  12282. ].toolChoose[toolIndex].preTime
  12283. )
  12284. );
  12285. } else {
  12286. var preTime = 0;
  12287. this.preTime = preTime;
  12288. }
  12289. this.dialogVisiblePreTime = true;
  12290. } else if (i == 49) {
  12291. if (
  12292. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12293. .toolChoose[toolIndex].groupJson
  12294. ) {
  12295. this.groupJson = JSON.parse(
  12296. JSON.stringify(
  12297. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12298. itemTaskIndex
  12299. ].toolChoose[toolIndex].groupJson
  12300. )
  12301. );
  12302. } else {
  12303. var groupJson = {
  12304. group: [{ name: "第1组" }],
  12305. number: undefined,
  12306. islock: 1,
  12307. };
  12308. this.groupJson = groupJson;
  12309. }
  12310. this.dialogVisibleGroup = true;
  12311. } else if (i == 62) {
  12312. if (
  12313. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12314. .toolChoose[toolIndex].videoJson
  12315. ) {
  12316. this.videoJson = JSON.parse(
  12317. JSON.stringify(
  12318. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12319. itemTaskIndex
  12320. ].toolChoose[toolIndex].videoJson
  12321. )
  12322. );
  12323. } else {
  12324. var videoJson = {
  12325. video: "",
  12326. setting: [],
  12327. };
  12328. this.videoJson = videoJson;
  12329. }
  12330. this.dialogVisibleVideo = true;
  12331. } else if (i == 15) {
  12332. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12333. itemTaskIndex
  12334. ].toolChoose[toolIndex].answerQ
  12335. ? JSON.parse(
  12336. JSON.stringify(
  12337. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12338. itemTaskIndex
  12339. ].toolChoose[toolIndex].answerQ
  12340. )
  12341. )
  12342. : "";
  12343. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12344. this.dialogVisible8 = true;
  12345. } else if (i == 40) {
  12346. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12347. itemTaskIndex
  12348. ].toolChoose[toolIndex].rateJson
  12349. ? JSON.parse(
  12350. JSON.stringify(
  12351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12352. itemTaskIndex
  12353. ].toolChoose[toolIndex].rateJson
  12354. )
  12355. )
  12356. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12357. this.selectSteps = 1;
  12358. this.dialogVisibleRate = true;
  12359. } else if (i == 42) {
  12360. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12361. itemTaskIndex
  12362. ].toolChoose[toolIndex].answerQ
  12363. ? JSON.parse(
  12364. JSON.stringify(
  12365. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12366. itemTaskIndex
  12367. ].toolChoose[toolIndex].answerQ
  12368. )
  12369. )
  12370. : "";
  12371. this.dialogVisibleMp3 = true;
  12372. } else if (i == 41) {
  12373. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12374. itemTaskIndex
  12375. ].toolChoose[toolIndex].selectJson
  12376. ? JSON.parse(
  12377. JSON.stringify(
  12378. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12379. itemTaskIndex
  12380. ].toolChoose[toolIndex].selectJson
  12381. )
  12382. )
  12383. : { url: "", select: [], answer: [] };
  12384. this.selectSteps = 1;
  12385. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12386. this.dialogVisibleSelect = true;
  12387. } else if (i == 3) {
  12388. top.postMessage(
  12389. {
  12390. tools: "3y",
  12391. cid: this.cid,
  12392. stage: this.unitIndex,
  12393. task: itemTaskIndex,
  12394. tool: toolIndex,
  12395. },
  12396. "*"
  12397. );
  12398. } else if (i == 1) {
  12399. top.postMessage(
  12400. {
  12401. tools: "1y",
  12402. cid: this.cid,
  12403. stage: this.unitIndex,
  12404. task: itemTaskIndex,
  12405. tool: toolIndex,
  12406. },
  12407. "*"
  12408. );
  12409. } else if (i == 57) {
  12410. top.postMessage(
  12411. {
  12412. tools: "57y",
  12413. cid: this.cid,
  12414. stage: this.unitIndex,
  12415. task: itemTaskIndex,
  12416. tool: toolIndex,
  12417. },
  12418. "*"
  12419. );
  12420. } else if (i == 69) {
  12421. this.englishList = {};
  12422. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12423. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12424. ? JSON.parse(
  12425. JSON.stringify(
  12426. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12427. itemTaskIndex
  12428. ].toolChoose[toolIndex].englishList
  12429. )
  12430. )
  12431. : {};
  12432. this.$forceUpdate();
  12433. this.englishDialogVisible = true;
  12434. } else if (i == 70) {
  12435. this.englishVoiceJson = {};
  12436. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12437. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12438. ? JSON.parse(
  12439. JSON.stringify(
  12440. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12441. itemTaskIndex
  12442. ].toolChoose[toolIndex].englishVoiceJson
  12443. )
  12444. )
  12445. : {
  12446. title: '',
  12447. detail: '',
  12448. array: []
  12449. };
  12450. // {
  12451. // time: "",
  12452. // class: "",
  12453. // difficulty: 0,
  12454. // topic: "",
  12455. // isShow: false,
  12456. // eva: 0,
  12457. // aiEva: {
  12458. // isAiEva: false,
  12459. // aiEvaChoose: [],
  12460. // },
  12461. // allfType: [],
  12462. // englishJson: {},
  12463. // };
  12464. this.$forceUpdate();
  12465. this.EnglishVoiceDialog = true;
  12466. }
  12467. },
  12468. setEnglishVoiceJson(val) {
  12469. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12470. this.taskCount
  12471. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12472. JSON.stringify(val)
  12473. );
  12474. this.$forceUpdate();
  12475. if (
  12476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12477. .toolChoose[this.toolIndex].tool != 70
  12478. ) {
  12479. this.addTools(70, this.taskCount, this.toolIndex);
  12480. }
  12481. },
  12482. chapAddTools(i) {
  12483. if (this.chapTools[0].tools.length == 0) {
  12484. this.chapTools[0].tools.push(i);
  12485. } else {
  12486. if (this.chapTools[0].tools.indexOf(i) != -1) {
  12487. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  12488. } else {
  12489. this.chapTools[0].tools.push(i);
  12490. }
  12491. }
  12492. this.$forceUpdate();
  12493. },
  12494. addChaptersDataTools() {
  12495. if (this.chapTools[0].tools.indexOf(4) != -1) {
  12496. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12497. this.chapCount
  12498. ].chapterData.unshift({
  12499. name: this.chapTools[0].toolDetail,
  12500. url: this.chapTools[0].tools,
  12501. type: 7,
  12502. askJson: this.askJson,
  12503. });
  12504. } else {
  12505. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12506. this.chapCount
  12507. ].chapterData.unshift({
  12508. name: this.chapTools[0].toolDetail,
  12509. url: this.chapTools[0].tools,
  12510. type: 7,
  12511. });
  12512. }
  12513. this.imgChange1(null, null, 7, this.chapCount);
  12514. this.dialogVisible4 = false;
  12515. },
  12516. addTools(i, itemTaskIndex, toolIndex) {
  12517. // if (
  12518. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12519. // .toolChoose[toolIndex].tool.length == 0
  12520. // ) {
  12521. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12522. // itemTaskIndex
  12523. // ].toolChoose[toolIndex].tool.push(i);
  12524. // } else {
  12525. // if (
  12526. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12527. // itemTaskIndex
  12528. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12529. // ) {
  12530. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12531. // itemTaskIndex
  12532. // ].toolChoose[toolIndex].tool.splice(
  12533. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12534. // itemTaskIndex
  12535. // ].toolChoose[toolIndex].tool.indexOf(i),
  12536. // 1
  12537. // );
  12538. // } else {
  12539. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12540. // itemTaskIndex
  12541. // ].toolChoose[toolIndex].tool.push(i);
  12542. // }
  12543. // console.log(
  12544. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12545. // .toolChoose[toolIndex].tool
  12546. // );
  12547. // }
  12548. if (i == 4) {
  12549. if (
  12550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12551. .toolChoose[toolIndex].askJson.askTitle == "" ||
  12552. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12553. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  12554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12555. .toolChoose[toolIndex].askJson[0].checkList < 2
  12556. ) {
  12557. this.openTools(itemTaskIndex, 4, toolIndex);
  12558. // this.$message({
  12559. // message: "请填写完整问卷内容",
  12560. // type: "error",
  12561. // });
  12562. return;
  12563. }
  12564. }
  12565. if (i == 45) {
  12566. if (
  12567. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12568. .toolChoose[toolIndex].testJson ||
  12569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12570. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  12571. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12572. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  12573. ) {
  12574. this.openTools(itemTaskIndex, 45, toolIndex);
  12575. // this.$message({
  12576. // message: "请填写完整问卷内容",
  12577. // type: "error",
  12578. // });
  12579. return;
  12580. }
  12581. }
  12582. if (i == 47) {
  12583. if (
  12584. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12585. .toolChoose[toolIndex].sentenceList ||
  12586. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12587. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  12588. ) {
  12589. this.openTools(itemTaskIndex, 47, toolIndex);
  12590. return;
  12591. }
  12592. }
  12593. if (i == 69) {
  12594. if (
  12595. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12596. .toolChoose[toolIndex].englishList
  12597. ) {
  12598. this.openTools(itemTaskIndex, 69, toolIndex);
  12599. return;
  12600. }
  12601. }
  12602. if (i == 70) {
  12603. if (
  12604. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12605. .toolChoose[toolIndex].englishVoiceJson
  12606. ) {
  12607. this.openTools(itemTaskIndex, 70, toolIndex);
  12608. return;
  12609. }
  12610. }
  12611. // if (i == 48) {
  12612. // if (
  12613. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12614. // .toolChoose[toolIndex].tableJson
  12615. // ) {
  12616. // this.openTools(itemTaskIndex, 48, toolIndex);
  12617. // return;
  12618. // }
  12619. // }
  12620. // if (i == 50) {
  12621. // if (
  12622. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12623. // .toolChoose[toolIndex].uploadJson
  12624. // ) {
  12625. // this.openTools(itemTaskIndex, 50, toolIndex);
  12626. // return;
  12627. // }
  12628. // }
  12629. if (i == 49) {
  12630. if (
  12631. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12632. .toolChoose[toolIndex].groupJson
  12633. ) {
  12634. this.openTools(itemTaskIndex, 49, toolIndex);
  12635. return;
  12636. }
  12637. }
  12638. if (i == 62) {
  12639. if (
  12640. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12641. .toolChoose[toolIndex].videoJson
  12642. ) {
  12643. this.openTools(itemTaskIndex, 62, toolIndex);
  12644. return;
  12645. }
  12646. }
  12647. if (i == 15) {
  12648. if (
  12649. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12650. .toolChoose[toolIndex].answerQ ||
  12651. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12652. .toolChoose[toolIndex].answerQ == ""
  12653. ) {
  12654. this.openTools(itemTaskIndex, 15, toolIndex);
  12655. // this.$message({
  12656. // message: "请填写问答内容",
  12657. // type: "error",
  12658. // });
  12659. return;
  12660. }
  12661. }
  12662. if (i == 40) {
  12663. if (
  12664. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12665. .toolChoose[toolIndex].rateJson ||
  12666. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12667. .toolChoose[toolIndex].rateJson.length
  12668. ) {
  12669. this.openTools(itemTaskIndex, 40, toolIndex);
  12670. return;
  12671. }
  12672. }
  12673. if (i == 41) {
  12674. if (
  12675. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12676. .toolChoose[toolIndex].selectJson ||
  12677. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12678. .toolChoose[toolIndex].selectJson.url == "" ||
  12679. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12680. .toolChoose[toolIndex].selectJson.select.length ||
  12681. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12682. .toolChoose[toolIndex].selectJson.answer.length
  12683. ) {
  12684. this.openTools(itemTaskIndex, 41, toolIndex);
  12685. return;
  12686. }
  12687. }
  12688. if (i == 42) {
  12689. if (
  12690. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12691. .toolChoose[toolIndex].answerQ ||
  12692. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12693. .toolChoose[toolIndex].answerQ == ""
  12694. ) {
  12695. this.openTools(itemTaskIndex, 42, toolIndex);
  12696. return;
  12697. }
  12698. }
  12699. if (
  12700. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12701. .toolChoose[toolIndex].tool.length > 0
  12702. ) {
  12703. if (
  12704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12705. itemTaskIndex
  12706. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12707. ) {
  12708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12709. itemTaskIndex
  12710. ].toolChoose[toolIndex].tool.splice(
  12711. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12712. itemTaskIndex
  12713. ].toolChoose[toolIndex].tool.indexOf(i),
  12714. 1
  12715. );
  12716. } else {
  12717. // this.$message({
  12718. // message: "每个工具只能添加一个",
  12719. // type: "error",
  12720. // });
  12721. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12722. itemTaskIndex
  12723. ].toolChoose[toolIndex].tool = [];
  12724. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12725. itemTaskIndex
  12726. ].toolChoose[toolIndex].tool.push(i);
  12727. }
  12728. } else {
  12729. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12730. itemTaskIndex
  12731. ].toolChoose[toolIndex].tool.push(i);
  12732. }
  12733. this.$forceUpdate();
  12734. },
  12735. addAskList(index) {
  12736. this.askJson.askJson.splice(index + 1, 0, {
  12737. askstitle: "",
  12738. askItem: 1,
  12739. checkList: [],
  12740. });
  12741. this.askJson.askCount++;
  12742. },
  12743. addTestList(index) {
  12744. this.testJson.testJson.splice(index + 1, 0, {
  12745. teststitle: "",
  12746. testItem: 1,
  12747. checkList: [],
  12748. timuList: [],
  12749. answer: [],
  12750. type: "1",
  12751. });
  12752. this.testJson.testCount++;
  12753. },
  12754. deleteAskList(index) {
  12755. if (
  12756. !this.askJson.askJson[index].askstitle &&
  12757. this.askJson.askJson[index].askItem == 1 &&
  12758. !this.askJson.askJson[index].checkList[0]
  12759. ) {
  12760. this.askJson.askJson.splice(index, 1);
  12761. this.askJson.askCount--;
  12762. } else {
  12763. let _this = this;
  12764. _this
  12765. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12766. confirmButtonText: "确定",
  12767. cancelButtonText: "取消",
  12768. type: "warning",
  12769. })
  12770. .then(() => {
  12771. _this.askJson.askJson.splice(index, 1);
  12772. _this.askJson.askCount--;
  12773. })
  12774. .catch(() => {
  12775. return;
  12776. });
  12777. }
  12778. },
  12779. deleteTestList(index) {
  12780. if (
  12781. !this.testJson.testJson[index].teststitle &&
  12782. this.testJson.testJson[index].testItem == 1 &&
  12783. !this.testJson.testJson[index].checkList[0]
  12784. ) {
  12785. this.testJson.testJson.splice(index, 1);
  12786. this.testJson.testCount--;
  12787. } else {
  12788. let _this = this;
  12789. _this
  12790. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12791. confirmButtonText: "确定",
  12792. cancelButtonText: "取消",
  12793. type: "warning",
  12794. })
  12795. .then(() => {
  12796. _this.testJson.testJson.splice(index, 1);
  12797. _this.testJson.testCount--;
  12798. })
  12799. .catch(() => {
  12800. return;
  12801. });
  12802. }
  12803. },
  12804. askMove(type, index) {
  12805. if (type == 1) {
  12806. if (index > 0) {
  12807. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  12808. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12809. this.askJson.askJson[index - 1] = b;
  12810. this.askJson.askJson[index] = a;
  12811. }
  12812. } else {
  12813. if (index < this.askJson.askJson.length - 1) {
  12814. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  12815. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12816. this.askJson.askJson[index + 1] = b;
  12817. this.askJson.askJson[index] = a;
  12818. }
  12819. }
  12820. this.$forceUpdate();
  12821. },
  12822. checkMove(type, index, checkIndex) {
  12823. if (type == 1) {
  12824. if (checkIndex > 0) {
  12825. let a = JSON.parse(
  12826. JSON.stringify(
  12827. this.askJson.askJson[index].checkList[checkIndex - 1]
  12828. )
  12829. );
  12830. let b = JSON.parse(
  12831. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12832. );
  12833. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12834. this.askJson.askJson[index].checkList[checkIndex] = a;
  12835. }
  12836. } else {
  12837. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12838. let a = JSON.parse(
  12839. JSON.stringify(
  12840. this.askJson.askJson[index].checkList[checkIndex + 1]
  12841. )
  12842. );
  12843. let b = JSON.parse(
  12844. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12845. );
  12846. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12847. this.askJson.askJson[index].checkList[checkIndex] = a;
  12848. }
  12849. }
  12850. this.$forceUpdate();
  12851. },
  12852. testMove(type, index) {
  12853. if (type == 1) {
  12854. if (index > 0) {
  12855. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12856. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12857. this.testJson.testJson[index - 1] = b;
  12858. this.testJson.testJson[index] = a;
  12859. }
  12860. } else {
  12861. if (index < this.testJson.testJson.length - 1) {
  12862. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12863. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12864. this.testJson.testJson[index + 1] = b;
  12865. this.testJson.testJson[index] = a;
  12866. }
  12867. }
  12868. this.$forceUpdate();
  12869. },
  12870. tcheckMove(type, index, checkIndex) {
  12871. if (type == 1) {
  12872. if (checkIndex > 0) {
  12873. let a = JSON.parse(
  12874. JSON.stringify(
  12875. this.testJson.testJson[index].checkList[checkIndex - 1]
  12876. )
  12877. );
  12878. let b = JSON.parse(
  12879. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12880. );
  12881. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12882. this.testJson.testJson[index].checkList[checkIndex] = a;
  12883. }
  12884. } else {
  12885. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12886. let a = JSON.parse(
  12887. JSON.stringify(
  12888. this.testJson.testJson[index].checkList[checkIndex + 1]
  12889. )
  12890. );
  12891. let b = JSON.parse(
  12892. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12893. );
  12894. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12895. this.testJson.testJson[index].checkList[checkIndex] = a;
  12896. }
  12897. }
  12898. this.$forceUpdate();
  12899. },
  12900. addcheckList(json, index) {
  12901. // json.checkList.length++;
  12902. json.checkList.splice(index + 1, 0, "");
  12903. json.askItem++;
  12904. this.$forceUpdate();
  12905. },
  12906. deletecheckList(json, index) {
  12907. // json.checkList.length--;
  12908. json.checkList.splice(index, 1);
  12909. json.askItem--;
  12910. this.$forceUpdate();
  12911. },
  12912. addTcheckList(json, index) {
  12913. // json.checkList.length++;
  12914. json.checkList.splice(index + 1, 0, "");
  12915. json.testItem++;
  12916. this.$forceUpdate();
  12917. },
  12918. deleteTcheckList(json, index) {
  12919. // json.checkList.length--;
  12920. json.checkList.splice(index, 1);
  12921. json.testItem--;
  12922. this.$forceUpdate();
  12923. },
  12924. checkTestType(type, json) {
  12925. json.type = type;
  12926. setTimeout(() => {
  12927. json.answer = [];
  12928. }, 100);
  12929. },
  12930. checkAskType(type, json) {
  12931. json.type = type;
  12932. // json.checkList = [];
  12933. this.$forceUpdate();
  12934. },
  12935. addSelectList(json) {
  12936. json.select.push("");
  12937. json.answer.push("");
  12938. },
  12939. deleteSelectList(json) {
  12940. // json.select.length--;
  12941. // json.answer.length--;
  12942. json.select.splice(json.select.length - 1, 1);
  12943. json.answer.splice(json.answer.length - 1, 1);
  12944. },
  12945. addAsk() {
  12946. if (this.askJson.askTitle === "") {
  12947. this.$message.error("标题不能为空!");
  12948. return;
  12949. }
  12950. var aj = this.askJson.askJson;
  12951. var b = 1;
  12952. for (var i = 0; i < aj.length; i++) {
  12953. if (aj[i].askstitle === "") {
  12954. var a = 1;
  12955. for (let index = 0; index < aj[i].askItem; index++) {
  12956. const element = aj[i].checkList[index]
  12957. ? aj[i].checkList[index]
  12958. : "";
  12959. if (element != "") {
  12960. b++;
  12961. this.$message.error(`请将题目${i + 1}填写完整。`);
  12962. return;
  12963. } else {
  12964. a++;
  12965. }
  12966. }
  12967. if (b == 1) {
  12968. this.$message.error("至少填写一个问题");
  12969. return;
  12970. }
  12971. } else if (aj[i].askstitle != "") {
  12972. for (let index = 0; index < aj[i].askItem; index++) {
  12973. const element = aj[i].checkList[index]
  12974. ? aj[i].checkList[index]
  12975. : "";
  12976. var index = 0;
  12977. for (var z = 0; z < aj[i].checkList.length; z++) {
  12978. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12979. if (checkC != "") {
  12980. index++;
  12981. } else {
  12982. this.$message.error(`题目${i + 1}选项不能为空!`);
  12983. return;
  12984. }
  12985. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12986. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12987. if (checkC == checkC2) {
  12988. this.$message.error(
  12989. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12990. );
  12991. return;
  12992. }
  12993. }
  12994. }
  12995. b++;
  12996. if (index < 2) {
  12997. this.$message.error("每道题目至少需要设置2个选项。");
  12998. return;
  12999. }
  13000. }
  13001. }
  13002. }
  13003. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13004. var elc = el.checkList.filter((element) => {
  13005. return element != "";
  13006. });
  13007. return el.askstitle != "" && elc.length != 0;
  13008. });
  13009. if (!this.dialogVisible4) {
  13010. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13011. this.taskCount
  13012. ].toolChoose[this.toolIndex] = this.askJson;
  13013. }
  13014. this.dialogVisible5 = false;
  13015. if (
  13016. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13017. .toolChoose[this.toolIndex].tool != 4
  13018. ) {
  13019. this.addTools(4, this.taskCount, this.toolIndex);
  13020. }
  13021. },
  13022. addTest() {
  13023. // if (this.testJson.testTitle === "") {
  13024. // this.$message.error("标题不能为空!");
  13025. // return;
  13026. // }
  13027. var aj = this.testJson.testJson;
  13028. var b = 1;
  13029. for (var i = 0; i < aj.length; i++) {
  13030. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13031. var a = 1;
  13032. for (let index = 0; index < aj[i].testItem; index++) {
  13033. const element = aj[i].checkList[index]
  13034. ? aj[i].checkList[index]
  13035. : "";
  13036. if (element != "") {
  13037. b++;
  13038. this.$message.error(`请将题目${i + 1}填写完整。`);
  13039. return;
  13040. } else {
  13041. a++;
  13042. }
  13043. }
  13044. if (b == 1) {
  13045. this.$message.error("至少填写一个问题");
  13046. return;
  13047. }
  13048. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13049. for (let index = 0; index < aj[i].testItem; index++) {
  13050. const element = aj[i].checkList[index]
  13051. ? aj[i].checkList[index]
  13052. : "";
  13053. var index = 0;
  13054. for (var z = 0; z < aj[i].checkList.length; z++) {
  13055. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13056. if (checkC != "") {
  13057. index++;
  13058. } else {
  13059. this.$message.error(`题目${i + 1}选项不能为空!`);
  13060. return;
  13061. }
  13062. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13063. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13064. if (checkC == checkC2) {
  13065. this.$message.error(
  13066. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13067. );
  13068. return;
  13069. }
  13070. }
  13071. }
  13072. b++;
  13073. if (index < 2) {
  13074. this.$message.error("每道题目至少需要设置2个选项。");
  13075. return;
  13076. }
  13077. if (
  13078. (aj[i].type == "2" && !aj[i].answer.length) ||
  13079. (aj[i].type == "1" &&
  13080. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13081. (aj[i].answer !== 0 && !aj[i].answer)))
  13082. ) {
  13083. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13084. return;
  13085. }
  13086. }
  13087. }
  13088. }
  13089. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13090. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13091. var elc = el.checkList.filter((element) => {
  13092. return element != "";
  13093. });
  13094. return (
  13095. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13096. );
  13097. });
  13098. isTestJson.testCount = isTestJson.testJson.length;
  13099. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13100. this.taskCount
  13101. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13102. this.dialogVisibleChoice = false;
  13103. if (
  13104. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13105. .toolChoose[this.toolIndex].tool != 45
  13106. ) {
  13107. this.addTools(45, this.taskCount, this.toolIndex);
  13108. }
  13109. },
  13110. addVideoJson(videoJson) {
  13111. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13112. this.taskCount
  13113. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13114. this.dialogVisibleVideo = false;
  13115. if (
  13116. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13117. .toolChoose[this.toolIndex].tool != 62
  13118. ) {
  13119. this.addTools(62, this.taskCount, this.toolIndex);
  13120. }
  13121. },
  13122. //自动获取剪贴板
  13123. pasteOption() {
  13124. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13125. if (!iframe) {
  13126. this.$message.error("请使用AI共创生成题目");
  13127. return;
  13128. }
  13129. let copyData = iframe.contentWindow.copyData;
  13130. if (!copyData || !copyData.selectData.length) {
  13131. this.$message.error("请使用AI共创生成题目");
  13132. return;
  13133. }
  13134. let selectData = copyData.selectData;
  13135. for (var i = 0; i < selectData.length; i++) {
  13136. let answer = 0;
  13137. switch (selectData[i].answer[0]) {
  13138. case "A":
  13139. answer = 0;
  13140. break;
  13141. case "B":
  13142. answer = 1;
  13143. break;
  13144. case "C":
  13145. answer = 2;
  13146. break;
  13147. case "D":
  13148. answer = 3;
  13149. break;
  13150. case "E":
  13151. answer = 4;
  13152. break;
  13153. default:
  13154. break;
  13155. }
  13156. this.testJson.testJson.push({
  13157. teststitle: selectData[i].subject,
  13158. testItem: selectData[i].options.length,
  13159. checkList: selectData[i].options,
  13160. timuList: [],
  13161. answer: answer,
  13162. type: "1",
  13163. });
  13164. this.testJson.testCount++;
  13165. }
  13166. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13167. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13168. var elc = el.checkList.filter((element) => {
  13169. return element != "";
  13170. });
  13171. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13172. });
  13173. isTestJson.testCount = isTestJson.testJson.length;
  13174. if (!isTestJson.testCount) {
  13175. return;
  13176. }
  13177. this.testJson = isTestJson;
  13178. this.$forceUpdate();
  13179. },
  13180. pasteTask(taskJson) {
  13181. let stageTasksData = [];
  13182. if (taskJson) {
  13183. stageTasksData = taskJson;
  13184. } else {
  13185. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13186. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13187. if (!iframe && !iframe2) {
  13188. this.$message.error("请使用AI共创生成");
  13189. return;
  13190. }
  13191. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13192. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13193. if (
  13194. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13195. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13196. ) {
  13197. this.$message.error("请使用AI共创生成");
  13198. return;
  13199. }
  13200. stageTasksData = copyData
  13201. ? copyData.tasksData
  13202. : copyData2
  13203. ? copyData2.tasksData
  13204. : [{ taskName: "", taskDecs: "" }];
  13205. }
  13206. let taskA = [];
  13207. let tasks = stageTasksData;
  13208. for (var j = 0; j < tasks.length; j++) {
  13209. taskA.push({
  13210. task: tasks[j].taskName,
  13211. taskDetail: tasks[j].taskDecs,
  13212. chapterData: [],
  13213. toolText: "",
  13214. toolChoose: [
  13215. {
  13216. tool: [],
  13217. toolDetail: "",
  13218. toolType: 0,
  13219. askCount: 1,
  13220. askTitle: "",
  13221. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13222. },
  13223. ],
  13224. isShowTools: false,
  13225. askCount: 1,
  13226. isFold: 1,
  13227. askTitle: "",
  13228. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13229. checkJson: [{ checkCount: [], checkPerent: [] }],
  13230. homeworkList: [],
  13231. });
  13232. }
  13233. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13234. this.$forceUpdate();
  13235. },
  13236. pasteStage(stageJson) {
  13237. let stageData = [];
  13238. if (stageJson) {
  13239. stageData = stageJson;
  13240. } else {
  13241. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13242. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13243. if (!iframe && !iframe2) {
  13244. this.$message.error("请使用AI共创生成");
  13245. return;
  13246. }
  13247. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13248. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13249. if (
  13250. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13251. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13252. ) {
  13253. this.$message.error("请使用AI共创生成");
  13254. return;
  13255. }
  13256. stageData = copyData
  13257. ? copyData.stageData
  13258. : copyData2
  13259. ? copyData2.stageData
  13260. : [""];
  13261. }
  13262. let stage = [];
  13263. for (var i = 0; i < stageData.length; i++) {
  13264. stage.push({
  13265. dyName: stageData[i], //单元标题
  13266. chapterInfo: [
  13267. {
  13268. isread: false,
  13269. chapterid: this.guid(),
  13270. title: "",
  13271. courseName: "",
  13272. taskJson: [
  13273. {
  13274. task: "",
  13275. taskDetail: "",
  13276. chapterData: [],
  13277. toolText: "",
  13278. toolChoose: [
  13279. {
  13280. tool: [],
  13281. toolDetail: "",
  13282. toolType: 0,
  13283. askCount: 1,
  13284. askTitle: "",
  13285. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13286. },
  13287. ],
  13288. isShowTools: false,
  13289. askCount: 1,
  13290. isFold: 1,
  13291. askTitle: "",
  13292. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13293. checkJson: [{ checkCount: [], checkPerent: [] }],
  13294. homeworkList: [],
  13295. },
  13296. ],
  13297. itemCount: 1,
  13298. fileList1: [],
  13299. video: [],
  13300. testData: [],
  13301. pData: [],
  13302. templateArray: [],
  13303. },
  13304. ],
  13305. });
  13306. }
  13307. let _this = this;
  13308. if (stageJson) {
  13309. if (!_this.cid) {
  13310. _this.unitJson = stage;
  13311. } else {
  13312. _this.unitIndex = 0;
  13313. _this.unitJson = stage;
  13314. _this.updateWork();
  13315. }
  13316. } else {
  13317. _this
  13318. .$confirm(
  13319. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13320. "提示",
  13321. {
  13322. confirmButtonText: "确定",
  13323. cancelButtonText: "取消",
  13324. type: "warning",
  13325. }
  13326. )
  13327. .then(() => {
  13328. _this.unitIndex = 0;
  13329. _this.unitJson = stage;
  13330. // _this.steps++;
  13331. _this.updateWork();
  13332. })
  13333. .catch(() => {
  13334. return;
  13335. });
  13336. }
  13337. },
  13338. openStageBox() {
  13339. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13340. this.dialogVisibleStageChange = true;
  13341. },
  13342. updateChange() {
  13343. this.$confirm(
  13344. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13345. "提示",
  13346. {
  13347. confirmButtonText: "确定",
  13348. cancelButtonText: "取消",
  13349. type: "warning",
  13350. }
  13351. )
  13352. .then(() => {
  13353. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13354. this.updateWork();
  13355. this.dialogVisibleStageChange = false;
  13356. })
  13357. .catch(() => {
  13358. return;
  13359. });
  13360. },
  13361. addAnswer() {
  13362. if (this.answerQ == "") {
  13363. this.$message.error("请输入您想要问的问题");
  13364. return;
  13365. }
  13366. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13367. this.taskCount
  13368. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13369. this.dialogVisible8 = false;
  13370. if (
  13371. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13372. .toolChoose[this.toolIndex].tool != 15
  13373. ) {
  13374. this.addTools(15, this.taskCount, this.toolIndex);
  13375. }
  13376. },
  13377. addMp3Answer() {
  13378. if (this.answerQ == "") {
  13379. this.$message.error("请输入您想要回答的问题");
  13380. return;
  13381. }
  13382. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13383. this.taskCount
  13384. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13385. this.dialogVisibleMp3 = false;
  13386. },
  13387. addRateAnswer() {
  13388. var a = 1;
  13389. for (var i = 0; i < this.rateJson.length; i++) {
  13390. if (this.rateJson[i].value == "") {
  13391. a = 2;
  13392. break;
  13393. }
  13394. }
  13395. if (a == 2) {
  13396. this.$message.error("请把评价信息填写完整");
  13397. return;
  13398. }
  13399. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13400. this.taskCount
  13401. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13402. this.dialogVisibleRate = false;
  13403. if (
  13404. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13405. .toolChoose[this.toolIndex].tool != 40
  13406. ) {
  13407. this.addTools(40, this.taskCount, this.toolIndex);
  13408. }
  13409. },
  13410. addSelectAnswer() {
  13411. if (this.selectJson.url == "") {
  13412. this.$message.error("请上传题目");
  13413. return;
  13414. }
  13415. if (!this.selectJson.select.length) {
  13416. this.$message.error("请添加选项");
  13417. return;
  13418. }
  13419. if (!this.selectJson.answer.length) {
  13420. this.$message.error("请设置答案");
  13421. return;
  13422. }
  13423. var a = 1;
  13424. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13425. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13426. a = 2;
  13427. }
  13428. }
  13429. if (a == 2) {
  13430. this.$message.error("请设置答案");
  13431. return;
  13432. }
  13433. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13434. this.taskCount
  13435. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13436. this.dialogVisibleSelect = false;
  13437. if (
  13438. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13439. .toolChoose[this.toolIndex].tool != 41
  13440. ) {
  13441. this.addTools(41, this.taskCount, this.toolIndex);
  13442. }
  13443. },
  13444. nextSelectSteps() {
  13445. if (this.selectJson.url == "") {
  13446. this.$message.error("请上传题目");
  13447. return;
  13448. }
  13449. if (!this.selectJson.select.length) {
  13450. this.$message.error("请添加选项");
  13451. return;
  13452. } else {
  13453. for (var z = 0; z < this.selectJson.select.length; z++) {
  13454. let checkC = this.selectJson.select[z];
  13455. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13456. let checkC2 = this.selectJson.select[z2];
  13457. if (checkC == checkC2) {
  13458. this.$message.error(
  13459. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13460. );
  13461. return;
  13462. }
  13463. }
  13464. }
  13465. }
  13466. var a = 1;
  13467. for (var i = 0; i < this.selectJson.select.length; i++) {
  13468. if (!this.selectJson.select[i]) {
  13469. a = 2;
  13470. }
  13471. }
  13472. if (a == 2) {
  13473. this.$message.error("添加的选项不能为空");
  13474. return;
  13475. }
  13476. this.selectSteps++;
  13477. },
  13478. selectCourseDetail() {
  13479. if (this.cid == "" || this.cid == undefined) {
  13480. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  13481. this.isTeacherSee = true;
  13482. }
  13483. console.log("这是新增课程");
  13484. this.selectAllType();
  13485. } else {
  13486. this.isOutline = true
  13487. this.isOutline2 = true
  13488. this.cpoteType = 4
  13489. this.cidType = 1;
  13490. let params = {
  13491. cid: this.cid,
  13492. };
  13493. this.ajax
  13494. .get(this.$store.state.api + "select_course_detail", params)
  13495. .then((res) => {
  13496. this.unitJson = JSON.parse(res.data[0][0].chapters);
  13497. this.courseState = res.data[0][0].state;
  13498. for (var j = 0; j < this.unitJson.length; j++) {
  13499. for (
  13500. var k = 0;
  13501. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  13502. k++
  13503. ) {
  13504. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  13505. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13506. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13507. : [];
  13508. let _chapterData = [];
  13509. for (
  13510. var c = 0;
  13511. c <
  13512. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  13513. .length;
  13514. c++
  13515. ) {
  13516. if (
  13517. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13518. ) {
  13519. _chapterData.push(
  13520. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13521. );
  13522. }
  13523. }
  13524. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  13525. _chapterData;
  13526. }
  13527. }
  13528. this.$forceUpdate();
  13529. this.courseName = res.data[0][0].title;
  13530. this.courseText = res.data[0][0].brief;
  13531. this.courseText2 = res.data[0][0].reBrief;
  13532. this.evalua = res.data[0][0].evaId;
  13533. this.cover = JSON.parse(res.data[0][0].cover);
  13534. this.noneBtnImg = this.cover.length >= 1;
  13535. if (res.data[0][0].refile) {
  13536. this.infoData = JSON.parse(res.data[0][0].refile)
  13537. }
  13538. // this.checkboxList =
  13539. // res.data[0][0].course_student.length > 0
  13540. // ? JSON.parse(res.data[0][0].course_student)
  13541. // : [];
  13542. this.checkboxList2 = res.data[0][0].juri
  13543. ? res.data[0][0].juri.split(",")
  13544. : [];
  13545. this.inviteCode = [];
  13546. for (var i = 0; i < res.data[2].length; i++) {
  13547. this.inviteCode.push({
  13548. cid: res.data[2][i].classid,
  13549. ic: res.data[2][i].code,
  13550. });
  13551. }
  13552. this.checkboxList3 = res.data[0][0].course_teacher
  13553. ? res.data[0][0].course_teacher.split(",")
  13554. : [];
  13555. // this.isTeacherSee =
  13556. // res.data[0][0].is_teacher_look == 0 ? true : false;
  13557. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13558. this.myWord = res.data[0][0].template;
  13559. this.templateC.id = "123";
  13560. this.courseUserid = res.data[0][0].userid;
  13561. // if(this.courseUserid == this.userid){
  13562. // this.InviteChange(this.checkboxList2)
  13563. // }
  13564. this.nbOrder = res.data[0][0].ordernumber;
  13565. this.courseTypeId = [];
  13566. for (var i = 0; i < res.data[1].length; i++) {
  13567. this.courseTypeId.push(res.data[1][i].typeid);
  13568. }
  13569. console.log(this.courseTypeId);
  13570. // if (this.timer) clearInterval(this.timer);
  13571. if (this.timer) clearTimeout(this.timer);
  13572. this.timer = null;
  13573. // this.timer = setInterval(() => {
  13574. if(res.data[3].length){
  13575. try {
  13576. this.aiJson = JSON.parse(res.data[3][0].tips);
  13577. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13578. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13579. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13580. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13581. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13582. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13583. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13584. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13585. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13586. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13587. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13588. }
  13589. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13590. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13591. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13592. this.templateid = res.data[3][0].template;
  13593. }catch(error){
  13594. console.error(error)
  13595. }
  13596. }
  13597. if(res.data[0][0].cpote){
  13598. try {
  13599. this.cpote = JSON.parse(res.data[0][0].cpote);
  13600. }catch(error){
  13601. console.error(error)
  13602. }
  13603. }
  13604. if(res.data[0][0].setting){
  13605. try {
  13606. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13607. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13608. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13609. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13610. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13611. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13612. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13613. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13614. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13615. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13616. 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;
  13617. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13618. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13619. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13620. this.courseTextBool = true
  13621. }
  13622. if(!this.teacherCourseText && !this.teacherCourseText){
  13623. this.isuseT = false
  13624. }
  13625. }catch(error){
  13626. console.error(error)
  13627. }
  13628. }
  13629. if(this.courseText){
  13630. this.courseTextB = false
  13631. }
  13632. if(this.teacherCourseText){
  13633. this.teacherCourseTextB = false
  13634. }
  13635. if(this.targetCourseText){
  13636. this.targetCourseTextB = false
  13637. }
  13638. if(this.targetCourseText2){
  13639. this.targetCourseText2B = false
  13640. }
  13641. this.isFileSearch = res.data[0][0].iresearch == 1
  13642. this.seleteCourseUpdate();
  13643. this.setMan();
  13644. this.selectAllType();
  13645. this.unitJson[
  13646. this.unitIndex
  13647. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13648. // }, 5000);
  13649. this.$forceUpdate();
  13650. setTimeout(() => {
  13651. this.checkEva(this.evalua);
  13652. setTimeout(() => {
  13653. this.checkEva(this.evalua);
  13654. }, 100);
  13655. }, 100);
  13656. })
  13657. .catch((err) => {
  13658. console.error(err);
  13659. });
  13660. }
  13661. if(this.aiId){
  13662. let params = {
  13663. cid: this.aiId,
  13664. };
  13665. this.ajax
  13666. .get(this.$store.state.api + "select_course_detail", params)
  13667. .then((res) => {
  13668. let _unitJson = JSON.parse(res.data[0][0].chapters);
  13669. let fileInfo = []
  13670. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  13671. for(var i = 0; i < _unitJson.length; i++){
  13672. let tasks = _unitJson[i].chapterInfo[0].taskJson
  13673. for(var j = 0; j < tasks.length; j++){
  13674. let _infoData = tasks[j].chapterData.filter(el => {
  13675. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  13676. })
  13677. if(_infoData.length){
  13678. fileInfo = [...fileInfo, ..._infoData]
  13679. }
  13680. }
  13681. }
  13682. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  13683. this.$forceUpdate();
  13684. this.courseName = res.data[0][0].title;
  13685. this.courseText = res.data[0][0].brief;
  13686. this.courseText2 = res.data[0][0].reBrief;
  13687. this.cover = JSON.parse(res.data[0][0].cover);
  13688. this.noneBtnImg = this.cover.length >= 1;
  13689. this.checkboxList2 = res.data[0][0].juri
  13690. ? res.data[0][0].juri.split(",")
  13691. : [];
  13692. this.inviteCode = [];
  13693. for (var i = 0; i < res.data[2].length; i++) {
  13694. this.inviteCode.push({
  13695. cid: res.data[2][i].classid,
  13696. ic: res.data[2][i].code,
  13697. });
  13698. }
  13699. this.checkboxList3 = res.data[0][0].course_teacher
  13700. ? res.data[0][0].course_teacher.split(",")
  13701. : [];
  13702. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13703. this.myWord = res.data[0][0].template;
  13704. this.templateC.id = "123";
  13705. this.courseTypeId = [];
  13706. for (var i = 0; i < res.data[1].length; i++) {
  13707. this.courseTypeId.push(res.data[1][i].typeid);
  13708. }
  13709. console.log(this.courseTypeId);
  13710. if(res.data[3].length){
  13711. try {
  13712. this.aiJson = JSON.parse(res.data[3][0].tips);
  13713. this.templateid = res.data[3][0].template;
  13714. }catch(error){
  13715. console.error(error)
  13716. }
  13717. }
  13718. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13719. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13720. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13721. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13722. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13723. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13724. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13725. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13726. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13727. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13728. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13729. }
  13730. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13731. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13732. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13733. if(res.data[0][0].cpote){
  13734. try {
  13735. this.cpote = JSON.parse(res.data[0][0].cpote);
  13736. }catch(error){
  13737. console.error(error)
  13738. }
  13739. }
  13740. if(res.data[0][0].setting){
  13741. try {
  13742. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13743. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13744. 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];
  13745. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13746. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13747. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13748. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13749. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13750. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13751. 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];
  13752. 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;
  13753. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13754. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13755. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13756. this.courseTextBool = true
  13757. }
  13758. if(!this.teacherCourseText && !this.teacherCourseText){
  13759. this.isuseT = false
  13760. }
  13761. }catch(error){
  13762. console.error(error)
  13763. }
  13764. }
  13765. if(this.teacherInfoData.length){
  13766. this.isuseT = true
  13767. }
  13768. if(this.courseText){
  13769. this.courseTextB = false
  13770. }
  13771. if(this.teacherCourseText){
  13772. this.teacherCourseTextB = false
  13773. }
  13774. if(this.targetCourseText){
  13775. this.targetCourseTextB = false
  13776. }
  13777. if(this.targetCourseText2){
  13778. this.targetCourseText2B = false
  13779. }
  13780. this.setMan();
  13781. this.unitJson[
  13782. this.unitIndex
  13783. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13784. this.$forceUpdate();
  13785. setTimeout(() => {
  13786. this.checkEva(this.evalua);
  13787. setTimeout(() => {
  13788. this.checkEva(this.evalua);
  13789. }, 100);
  13790. }, 100);
  13791. })
  13792. .catch((err) => {
  13793. console.error(err);
  13794. });
  13795. }
  13796. // if(this.cidType != 1 && this.templateid == ''){
  13797. // this.promptShow = true
  13798. // }
  13799. },
  13800. seleteCourseUpdate() {
  13801. let params = {
  13802. cid: this.cid,
  13803. };
  13804. this.ajax
  13805. .get(this.$store.state.api + "select_course_detail", params)
  13806. .then((res) => {
  13807. // console.log(this.unitJson);
  13808. let unitJson = JSON.parse(res.data[0][0].chapters);
  13809. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  13810. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  13811. let _unitJson = [];
  13812. let _chapAarry = [];
  13813. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  13814. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  13815. let index = 1;
  13816. let chapindex;
  13817. if (_unitJson2.length > unitJson.length) {
  13818. for (let c = 0; c < _unitJson2.length; c++) {
  13819. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  13820. }
  13821. for (let j = 0; j < unitJson.length; j++) {
  13822. let count = 0;
  13823. for (let k = 0; k < _unitJson2.length; k++) {
  13824. if (
  13825. unitJson[j].chapterInfo[0].chapterid ==
  13826. _unitJson2[k].chapterInfo[0].chapterid
  13827. ) {
  13828. count++;
  13829. _chapAarry.splice(
  13830. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13831. 1
  13832. );
  13833. _unitJson.push(unitJson[j]);
  13834. break;
  13835. }
  13836. }
  13837. // if(count === 0){
  13838. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13839. // }
  13840. }
  13841. for (let k = 0; k < _unitJson2.length; k++) {
  13842. if (_unitJson2[k].isUpdate == 1) {
  13843. _chapAarry.splice(
  13844. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13845. 1
  13846. );
  13847. _unitJson.push(_unitJson2[k]);
  13848. }
  13849. }
  13850. console.log(_chapAarry);
  13851. for (let d = 0; d < _unitJson2.length; d++) {
  13852. if (
  13853. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13854. ) {
  13855. if (_unitIndex == d) {
  13856. index = 2;
  13857. }
  13858. chapindex = d;
  13859. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13860. }
  13861. }
  13862. } else {
  13863. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13864. }
  13865. for (let i = 0; i < unitJson.length; i++) {
  13866. if (
  13867. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13868. _unitJson[i].chapterInfo[0].chapterid !=
  13869. unitJson[i].chapterInfo[0].chapterid
  13870. ) {
  13871. if (i == _unitJson.length - 1) {
  13872. // this.unitIndex++
  13873. _unitIndex2++;
  13874. }
  13875. _unitJson.splice(i, 0, unitJson[i]);
  13876. } else if (i > _unitJson.length - 1) {
  13877. _unitJson.push(unitJson[i]);
  13878. } else if (
  13879. _unitJson[i].chapterInfo[0].chapterid ==
  13880. unitJson[i].chapterInfo[0].chapterid
  13881. ) {
  13882. _unitJson[i] = unitJson[i];
  13883. }
  13884. // if (i == _unitIndex) {
  13885. // continue;
  13886. // } else
  13887. }
  13888. if (_chapAarry.length && index != 2) {
  13889. if (chapindex < _unitIndex) {
  13890. this.isDelete = 2;
  13891. // this.unitIndex--;
  13892. _unitIndex2--;
  13893. } else if (
  13894. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13895. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13896. ) {
  13897. this.isDelete = 2;
  13898. for (let n = 0; n < _unitJson.length; n++) {
  13899. if (
  13900. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13901. _unitJson[n].chapterInfo[0].chapterid
  13902. ) {
  13903. // this.unitIndex = n;
  13904. _unitIndex2 = n;
  13905. _unitJson[n] = _unitJson2[_unitIndex];
  13906. break;
  13907. }
  13908. }
  13909. }
  13910. } else if (index != 2) {
  13911. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13912. _unitJson2[_unitIndex];
  13913. for (
  13914. var ci = 0;
  13915. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13916. ci++
  13917. ) {
  13918. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13919. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13920. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13921. .toolChoose
  13922. : [];
  13923. let _chapterData = [];
  13924. for (
  13925. var c = 0;
  13926. c <
  13927. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13928. .length;
  13929. c++
  13930. ) {
  13931. if (
  13932. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13933. .chapterData[c]
  13934. ) {
  13935. _chapterData.push(
  13936. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13937. .chapterData[c]
  13938. );
  13939. }
  13940. }
  13941. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13942. _chapterData;
  13943. }
  13944. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13945. }
  13946. if (index == 1) {
  13947. this.unitJson = _unitJson;
  13948. this.$forceUpdate();
  13949. setTimeout(() => {
  13950. if (this.unitIndex != _unitIndex2) {
  13951. this.isDelete = 2;
  13952. this.unitIndex = _unitIndex2;
  13953. }
  13954. }, 0);
  13955. this.timer = setTimeout(() => {
  13956. this.seleteCourseUpdate();
  13957. }, 1000);
  13958. } else if (index == 2) {
  13959. let _this = this;
  13960. _this
  13961. .$confirm(
  13962. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13963. "提示",
  13964. {
  13965. confirmButtonText: "需要",
  13966. cancelButtonText: "取消",
  13967. type: "warning",
  13968. }
  13969. )
  13970. .then(() => {
  13971. if (_this.time()) {
  13972. _this.restoreWork(
  13973. _chapAarry[0],
  13974. _unitJson,
  13975. chapindex,
  13976. _unitJson2,
  13977. _unitIndex2
  13978. );
  13979. }
  13980. })
  13981. .catch(() => {
  13982. _this.unitJson = _unitJson;
  13983. _this.$forceUpdate();
  13984. setTimeout(() => {
  13985. if (this.unitIndex != _unitIndex2) {
  13986. this.isDelete = 2;
  13987. this.unitIndex = _unitIndex2;
  13988. }
  13989. }, 0);
  13990. _this.timer = setTimeout(() => {
  13991. _this.seleteCourseUpdate();
  13992. }, 1000);
  13993. });
  13994. }
  13995. // 在复制操作之前记录滚动位置
  13996. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13997. // 执行复制操作
  13998. // 复制操作完成后恢复滚动位置
  13999. this.$nextTick(() => {
  14000. if (this.$refs.scrollContainer) {
  14001. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14002. }
  14003. });
  14004. })
  14005. .catch((err) => {
  14006. console.error(err);
  14007. });
  14008. },
  14009. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14010. let params = [
  14011. {
  14012. cid: this.cid,
  14013. chapters: JSON.stringify(this.unitJson),
  14014. uid: this.userid,
  14015. chapid: chapid,
  14016. },
  14017. ];
  14018. this.ajax
  14019. .post(this.$store.state.api + "restoreWork", params)
  14020. .then((res) => {
  14021. this.$message({
  14022. message: "恢复成功",
  14023. type: "success",
  14024. });
  14025. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14026. this.unitJson = unitJson;
  14027. this.$forceUpdate();
  14028. setTimeout(() => {
  14029. if (this.unitIndex != unitIndex2) {
  14030. this.isDelete = 2;
  14031. this.unitIndex = unitIndex2;
  14032. }
  14033. }, 0);
  14034. this.timer = setTimeout(() => {
  14035. this.seleteCourseUpdate();
  14036. }, 1000);
  14037. })
  14038. .catch((err) => {
  14039. this.$message.error("网络不佳");
  14040. console.error(err);
  14041. });
  14042. },
  14043. getTypeName() {
  14044. console.log(this.courseTypeId);
  14045. this.$forceUpdate();
  14046. },
  14047. selectAllType() {
  14048. let params = {
  14049. org: this.org && this.org != "" ? this.org : "",
  14050. oid: this.oid && this.oid != "" ? this.oid : "",
  14051. };
  14052. this.ajax
  14053. .get(this.$store.state.api + "selectAllType", params)
  14054. .then((res) => {
  14055. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14056. res.data[0] = [...res.data[0], ...res.data[4]];
  14057. }
  14058. this.CourseType = res.data;
  14059. this.CourseType2 = [
  14060. { name: "智见课程", id: [] },
  14061. { name: "智行课程", id: [] },
  14062. { name: "智创课程", id: [] },
  14063. ];
  14064. for (var cti = 0; cti < res.data[0].length; cti++) {
  14065. if (
  14066. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14067. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14068. ) {
  14069. this.CourseType2[0].id.push(res.data[0][cti].id);
  14070. } else if (
  14071. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14072. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14073. ) {
  14074. this.CourseType2[1].id.push(res.data[0][cti].id);
  14075. } else if (
  14076. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14077. ) {
  14078. this.CourseType2[2].id.push(res.data[0][cti].id);
  14079. }
  14080. if (
  14081. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14082. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14083. ) {
  14084. res.data[0][cti].name = "年级";
  14085. } else if (
  14086. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14087. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14088. ) {
  14089. res.data[0][cti].name = "学科";
  14090. } else if (
  14091. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14092. ) {
  14093. res.data[0][cti].name = "主题";
  14094. }
  14095. }
  14096. let _courseTypeId = [];
  14097. for (var i = 0; i < res.data[0].length; i++) {
  14098. if (!this.cid) {
  14099. this.courseTypeId[res.data[0][i].id] = [];
  14100. }
  14101. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14102. // }
  14103. this.CourseTypeJson[res.data[0][i].id] = [];
  14104. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14105. if (res.data[0][i].name == "栏目") {
  14106. this.CourseType[0][i].name = "主题";
  14107. }
  14108. }
  14109. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14110. for (var j = 0; j < res.data[1].length; j++) {
  14111. if (
  14112. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14113. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14114. ) {
  14115. _courseTypeId.push(res.data[1][j].id);
  14116. }
  14117. if (res.data[0][i].id == res.data[1][j].pid) {
  14118. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14119. }
  14120. }
  14121. } else {
  14122. if (res.data[2].length > 0) {
  14123. for (var j = 0; j < res.data[2].length; j++) {
  14124. if (
  14125. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14126. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14127. ) {
  14128. _courseTypeId.push(res.data[2][j].id);
  14129. }
  14130. if (res.data[0][i].id == res.data[2][j].pid) {
  14131. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14132. }
  14133. }
  14134. }
  14135. if (res.data[3].length > 0) {
  14136. for (var j = 0; j < res.data[3].length; j++) {
  14137. if (
  14138. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14139. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14140. ) {
  14141. _courseTypeId.push(res.data[3][j].id);
  14142. }
  14143. if (res.data[0][i].id == res.data[3][j].pid) {
  14144. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14145. }
  14146. }
  14147. }
  14148. }
  14149. }
  14150. this.courseTypeId = _courseTypeId;
  14151. })
  14152. .catch((err) => {
  14153. console.error(err);
  14154. });
  14155. },
  14156. selectType() {
  14157. this.ajax
  14158. .get(this.$store.state.api + "selectType")
  14159. .then((res) => {
  14160. this.CourseType = res.data;
  14161. for (var i = 0; i < res.data[0].length; i++) {
  14162. if (!this.cid) {
  14163. this.courseTypeId[res.data[0][i].id] = "";
  14164. }
  14165. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14166. if (res.data[0][i].name == "栏目") {
  14167. this.CourseType[0][i].name = "主题";
  14168. }
  14169. }
  14170. for (var j = 0; j < res.data[1].length; j++) {
  14171. if (res.data[0][i].id == res.data[1][j].pid) {
  14172. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14173. this.CourseTypeJson[res.data[0][i].id] = [];
  14174. }
  14175. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14176. }
  14177. }
  14178. }
  14179. this.selectTypeByOid();
  14180. this.selectTypeByOrg();
  14181. })
  14182. .catch((err) => {
  14183. console.error(err);
  14184. });
  14185. },
  14186. selectTypeByOid() {
  14187. let params = {
  14188. oid: this.oid,
  14189. };
  14190. this.ajax
  14191. .get(this.$store.state.api + "selectTypeByOid", params)
  14192. .then((res) => {
  14193. for (var i = 0; i < res.data[0].length; i++) {
  14194. for (var j = 0; j < res.data[1].length; j++) {
  14195. if (res.data[0][i].id == res.data[1][j].pid) {
  14196. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14197. this.CourseTypeJson[res.data[0][i].id] = [];
  14198. }
  14199. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14200. }
  14201. }
  14202. }
  14203. })
  14204. .catch((err) => {
  14205. console.error(err);
  14206. });
  14207. },
  14208. selectTypeByOrg() {
  14209. let params = {
  14210. oid: this.org,
  14211. };
  14212. this.ajax
  14213. .get(this.$store.state.api + "selectTypeByOrg", params)
  14214. .then((res) => {
  14215. for (var i = 0; i < res.data[0].length; i++) {
  14216. for (var j = 0; j < res.data[1].length; j++) {
  14217. if (res.data[0][i].id == res.data[1][j].pid) {
  14218. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14219. this.CourseTypeJson[res.data[0][i].id] = [];
  14220. }
  14221. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14222. }
  14223. }
  14224. }
  14225. this.$forceUpdate();
  14226. })
  14227. .catch((err) => {
  14228. console.error(err);
  14229. });
  14230. },
  14231. OtherMb(type, task) {
  14232. if (task === 0 || task) {
  14233. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14234. task
  14235. ].isEvaFold = true;
  14236. }
  14237. this.typeMode = type;
  14238. setTimeout(() => {
  14239. this.checkEva(this.checkId);
  14240. setTimeout(() => {
  14241. this.checkEva(this.checkId);
  14242. }, 100);
  14243. }, 100);
  14244. },
  14245. openMember() {
  14246. this.searchTN = "";
  14247. this.getTeacher();
  14248. this.dialogVisibleMember = true;
  14249. },
  14250. checkEva(id, type) {
  14251. this.dialogVisiblemb = false;
  14252. this.selectEva();
  14253. if (this.evalua != id && type == 2) {
  14254. this.$message.success("导入成功");
  14255. setTimeout(() => {
  14256. this.checkEva(id);
  14257. }, 100);
  14258. }
  14259. this.evalua = id;
  14260. this.checkId = id;
  14261. if (this.evalua != "") {
  14262. for (var i = 0; i < this.evaJuri.length; i++) {
  14263. if (this.evalua == this.evaJuri[i].id) {
  14264. this.eTitle = this.evaJuri[i].title;
  14265. this.eJson = JSON.parse(this.evaJuri[i].content);
  14266. }
  14267. }
  14268. this.data.data = [];
  14269. this.$forceUpdate();
  14270. setTimeout(() => {
  14271. this.setMindData();
  14272. }, 1000);
  14273. }
  14274. },
  14275. deleteEva() {
  14276. let _this = this;
  14277. if (_this.evalua == "") {
  14278. this.$message.warning("内容已经清空了,请勿重复清空");
  14279. return;
  14280. }
  14281. _this
  14282. .$confirm("确定删除此目标吗?", "提示", {
  14283. confirmButtonText: "确定",
  14284. cancelButtonText: "取消",
  14285. type: "warning",
  14286. })
  14287. .then(() => {
  14288. _this.evalua = "";
  14289. _this.checkId = "";
  14290. _this.eTitle = "";
  14291. let _unitJson = _this.unitJson;
  14292. for (var i = 0; i < _unitJson.length; i++) {
  14293. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14294. for (var j = 0; j < _task.length; j++) {
  14295. let _eList = _task[j].eList;
  14296. for (var k = 0; k < _eList.length; k++) {
  14297. delete _eList[k].target;
  14298. }
  14299. }
  14300. }
  14301. _this.$forceUpdate();
  14302. if (_this.cid) {
  14303. _this.updateWork();
  14304. }
  14305. })
  14306. .catch(() => {
  14307. return;
  14308. });
  14309. },
  14310. selectEva() {
  14311. let params = {
  14312. oid: this.oid,
  14313. };
  14314. this.ajax
  14315. .get(this.$store.state.api + "selectAllEvaluation", params)
  14316. .then((res) => {
  14317. this.evaJuri = res.data[0];
  14318. // 在复制操作之前记录滚动位置
  14319. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14320. // 执行复制操作
  14321. // 复制操作完成后恢复滚动位置
  14322. this.$nextTick(() => {
  14323. if (this.$refs.scrollContainer) {
  14324. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14325. }
  14326. });
  14327. })
  14328. .catch((err) => {
  14329. console.error(err);
  14330. });
  14331. },
  14332. setMindData() {
  14333. let targetArray = [];
  14334. this.data.data = [];
  14335. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14336. let _eJson = Object.keys(this.eJson);
  14337. let _e = this.eJson;
  14338. for (let i = 0; i < _eJson.length; i++) {
  14339. let element = _e[_eJson[i]];
  14340. this.data.data.push({
  14341. id: element.id,
  14342. parentid: "root",
  14343. topic: element.name,
  14344. });
  14345. // targetArray.push({
  14346. // id: element.id,
  14347. // parentid: "root",
  14348. // name: element.name,
  14349. // });
  14350. targetArray.push({
  14351. value: element.name,
  14352. label: element.name,
  14353. children: [],
  14354. });
  14355. let _eJsonc = Object.keys(element.child);
  14356. let _e2 = element.child;
  14357. for (let j = 0; j < _eJsonc.length; j++) {
  14358. let _ec = _e2[_eJsonc[j]];
  14359. this.data.data.push({
  14360. id: _ec.id,
  14361. parentid: element.id,
  14362. topic: _ec.name,
  14363. });
  14364. // targetArray.push({
  14365. // id: _ec.id,
  14366. // parentid: element.id,
  14367. // name: _ec.name,
  14368. // });
  14369. targetArray[i].children.push({
  14370. value: _ec.name,
  14371. label: _ec.name,
  14372. children: [],
  14373. });
  14374. let _eJsonz = Object.keys(_ec.child);
  14375. let _e3 = _ec.child;
  14376. for (let z = 0; z < _eJsonz.length; z++) {
  14377. let _ez = _e3[_eJsonz[z]];
  14378. this.data.data.push({
  14379. id: _ez.id,
  14380. parentid: _ec.id,
  14381. topic: _ez.name,
  14382. });
  14383. // targetArray.push({
  14384. // id: _ez.id,
  14385. // parentid: _ec.id,
  14386. // name: _ez.name,
  14387. // });
  14388. targetArray[i].children[j].children.push({
  14389. value: _ez.name,
  14390. label: _ez.name,
  14391. });
  14392. }
  14393. }
  14394. }
  14395. this.targetArray = targetArray;
  14396. this.$forceUpdate();
  14397. },
  14398. /*添加评价 */
  14399. addEList(index, tIndex) {
  14400. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14401. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14402. value: "",
  14403. detail: "",
  14404. score: 5,
  14405. isai: "1",
  14406. })
  14407. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14408. { value: "", detail: "", score: 5,isai: "1", },
  14409. ]);
  14410. this.$forceUpdate();
  14411. },
  14412. openEList(index, tIndex) {
  14413. this.evaIndex = index;
  14414. this.evatIndex = tIndex;
  14415. this.evaBoxDialog = true;
  14416. },
  14417. addCET(index, tIndex) {
  14418. this.cetIndex = index;
  14419. this.cettIndex = tIndex;
  14420. this.selectAllType1();
  14421. },
  14422. addCETemplate() {
  14423. var array =
  14424. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14425. .eList;
  14426. let params = [
  14427. {
  14428. uid: this.userid,
  14429. n: this.templateName,
  14430. json: JSON.stringify(array),
  14431. t: 1,
  14432. oid: this.oid,
  14433. },
  14434. ];
  14435. this.ajax
  14436. .post(this.$store.state.api + "addCETShare", params)
  14437. .then((res) => {
  14438. this.addTypeByCET(res.data[0][0].id);
  14439. })
  14440. .catch((err) => {
  14441. this.$message.error("网络不佳");
  14442. console.error(err);
  14443. });
  14444. },
  14445. addTypeByCET(id) {
  14446. if (this.setTypeJson.two == "") {
  14447. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14448. return;
  14449. }
  14450. let params = {
  14451. cid: id,
  14452. };
  14453. this.ajax
  14454. .get(this.$store.state.api + "deleteCETLabel", params)
  14455. .then((res) => {
  14456. for (var i = 0; i < 2; i++) {
  14457. let tid = "";
  14458. if (i == 0) {
  14459. tid = this.setTypeJson.one;
  14460. } else {
  14461. tid = this.setTypeJson.two;
  14462. }
  14463. let params = [
  14464. {
  14465. cid: id,
  14466. tid: tid,
  14467. uid: this.userid,
  14468. },
  14469. ];
  14470. this.ajax
  14471. .post(this.$store.state.api + "addCETLabel", params)
  14472. .then((res) => {
  14473. this.$message({
  14474. message: "添加成功",
  14475. type: "success",
  14476. });
  14477. this.close();
  14478. })
  14479. .catch((err) => {
  14480. this.$message.error("网络不佳");
  14481. console.error(err);
  14482. });
  14483. }
  14484. })
  14485. .catch((err) => {
  14486. this.$message.error("网络不佳");
  14487. console.error(err);
  14488. });
  14489. },
  14490. updateEvaJson(array) {
  14491. array = array.filter((item) => {
  14492. item.isai = "1"
  14493. return item;
  14494. });
  14495. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  14496. this.evatIndex
  14497. ].eList = array;
  14498. },
  14499. forceUpdate() {
  14500. this.$forceUpdate();
  14501. },
  14502. deletEList(index, tIndex, eIndex) {
  14503. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  14504. eIndex,
  14505. 1
  14506. );
  14507. this.$forceUpdate();
  14508. },
  14509. getChoosePic(t) {
  14510. this.chooseType = t;
  14511. this.getAllBanner();
  14512. },
  14513. getAllBanner() {
  14514. this.sysPicVisible = true;
  14515. let params = {
  14516. t: this.chooseType,
  14517. };
  14518. this.ajax
  14519. .get(this.$store.state.api + "selectAllBanner", params)
  14520. .then((res) => {
  14521. this.sysPic = res.data[0];
  14522. })
  14523. .catch((err) => {
  14524. console.error(err);
  14525. });
  14526. },
  14527. // getClass() {
  14528. // let params = {
  14529. // oid: this.oid,
  14530. // };
  14531. // this.ajax
  14532. // .get(this.$store.state.api + "selectClassBySchool", params)
  14533. // .then((res) => {
  14534. // this.classJuri = res.data[0];
  14535. // })
  14536. // .catch((err) => {
  14537. // console.error(err);
  14538. // });
  14539. // },
  14540. deleteSysPic() {
  14541. this.cover = [];
  14542. this.isSysPic = false;
  14543. this.isSysPic2 = false;
  14544. },
  14545. deleteSelectPic() {
  14546. this.selectJson.url = "";
  14547. },
  14548. setEListStar() {
  14549. this.$forceUpdate();
  14550. },
  14551. deletRateList(i) {
  14552. this.rateJson.splice(i, 1);
  14553. },
  14554. addRateList() {
  14555. this.rateJson.push({ detail: "", score: 5, value: "" });
  14556. },
  14557. addSt() {
  14558. this.sentenceList.push({
  14559. sentenceTitle: "",
  14560. addSentence: [],
  14561. rightAnswer: [],
  14562. });
  14563. },
  14564. addSen(i) {
  14565. if (!this.sentenceList[i].sentenceTitle) {
  14566. this.$message.error("请填写卡片内容!");
  14567. return;
  14568. }
  14569. if (this.sentenceList[i].sentenceTitle.length > 10) {
  14570. this.$message.error("卡片内容字数不能超过10位");
  14571. return;
  14572. }
  14573. if (
  14574. this.sentenceList[i].addSentence.indexOf(
  14575. this.sentenceList[i].sentenceTitle
  14576. ) !== -1
  14577. ) {
  14578. this.$message.error("不能添加重复的卡片内容!");
  14579. return;
  14580. }
  14581. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  14582. // this.isPushTitleList.push(this.sentenceTitle);
  14583. this.sentenceList[i].sentenceTitle = "";
  14584. },
  14585. setRightAnswer(s, i, j) {
  14586. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  14587. this.sentenceList[i].rightAnswer.push(s);
  14588. }
  14589. },
  14590. returnCard(r, i, j) {
  14591. this.sentenceList[i].rightAnswer.splice(j, 1);
  14592. },
  14593. addSentenceTool() {
  14594. for (var i = 0; i < this.sentenceList.length; i++) {
  14595. if (this.sentenceList[i].rightAnswer.length == 0) {
  14596. this.$message.error(`请将题目${i + 1}设置完整。`);
  14597. return;
  14598. }
  14599. if (
  14600. this.sentenceList[i].addSentence.length !=
  14601. this.sentenceList[i].rightAnswer.length
  14602. ) {
  14603. this.$message.error(`请将题目${i + 1}设置完整。`);
  14604. return;
  14605. }
  14606. }
  14607. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14608. this.taskCount
  14609. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  14610. this.sentenceList = [
  14611. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14612. ];
  14613. this.dialogVisibleSentence = false;
  14614. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14615. // itemTaskIndex
  14616. // ].toolChoose[toolIndex].tool = [];
  14617. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14618. // itemTaskIndex
  14619. // ].toolChoose[toolIndex].tool.push(i);
  14620. if (
  14621. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14622. .toolChoose[this.toolIndex].tool != 47
  14623. ) {
  14624. this.addTools(47, this.taskCount, this.toolIndex);
  14625. }
  14626. },
  14627. addTableJson() {
  14628. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  14629. // this.$message.error("请将信息填写完整!");
  14630. // return;
  14631. // }
  14632. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14633. this.taskCount
  14634. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  14635. // this.tableJson = [{ text: "" }];
  14636. // this.dialogVisibleTable = false;
  14637. this.$message.success("上传成功");
  14638. if (
  14639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14640. .toolChoose[this.toolIndex].tool != 48
  14641. ) {
  14642. this.addTools(48, this.taskCount, this.toolIndex);
  14643. }
  14644. },
  14645. addWordJson() {
  14646. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14647. this.taskCount
  14648. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  14649. // this.wordJson = [{ text: "" }];
  14650. // this.dialogVisibleWord = false;
  14651. this.$message.success("上传成功");
  14652. if (
  14653. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14654. .toolChoose[this.toolIndex].tool != 52
  14655. ) {
  14656. this.addTools(52, this.taskCount, this.toolIndex);
  14657. }
  14658. },
  14659. addMoreUpload() {
  14660. if (this.uploadJson.length == 0) {
  14661. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14662. this.taskCount
  14663. ].toolChoose[this.toolIndex].uploadJson = [];
  14664. } else {
  14665. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14666. this.taskCount
  14667. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  14668. }
  14669. this.uploadJson = [];
  14670. this.dialogVisibleMoreUpload = false;
  14671. if (
  14672. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14673. .toolChoose[this.toolIndex].tool != 50
  14674. ) {
  14675. this.addTools(50, this.taskCount, this.toolIndex);
  14676. }
  14677. },
  14678. addPreTime() {
  14679. if (this.preTime == 0) {
  14680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14681. this.taskCount
  14682. ].toolChoose[this.toolIndex].preTime = 0;
  14683. } else {
  14684. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14685. this.taskCount
  14686. ].toolChoose[this.toolIndex].preTime = this.preTime;
  14687. }
  14688. this.preTime = 0;
  14689. this.dialogVisiblePreTime = false;
  14690. if (
  14691. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14692. .toolChoose[this.toolIndex].tool != 10
  14693. ) {
  14694. this.addTools(10, this.taskCount, this.toolIndex);
  14695. }
  14696. },
  14697. goToTask(i) {
  14698. this.toolIndexType = "";
  14699. if (this.isClickColor == i + 1) {
  14700. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14701. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14702. // } else {
  14703. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14704. i
  14705. ].toolOpen = true;
  14706. // }
  14707. this.$forceUpdate();
  14708. return;
  14709. }
  14710. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14711. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14712. // } else {
  14713. document.querySelectorAll(".basic_box")[0].scrollTop =
  14714. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14715. this.isClickColor = i + 1;
  14716. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14717. // }
  14718. this.$forceUpdate();
  14719. },
  14720. taskScroll(){
  14721. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  14722. const sections = document.querySelectorAll('.taskBorder');
  14723. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  14724. sections.forEach((section, index) => {
  14725. const offsetTop = section.offsetTop;
  14726. const offsetHeight = section.offsetHeight;
  14727. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  14728. this.isClickColor = index +1;
  14729. }
  14730. });
  14731. },
  14732. taskOpen(i, stageIndex) {
  14733. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14734. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  14735. } else {
  14736. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14737. }
  14738. this.updateWork3(stageIndex);
  14739. this.$forceUpdate();
  14740. },
  14741. goToTask2(i, stage) {
  14742. this.toolIndexType = "";
  14743. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  14744. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14745. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14746. // } else {
  14747. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14748. i
  14749. ].toolOpen = true;
  14750. // }
  14751. this.$forceUpdate();
  14752. return;
  14753. }
  14754. if (this.unitIndex != stage) {
  14755. if (this.panUnitJson() == 2) {
  14756. return;
  14757. }
  14758. this.unitSet(stage);
  14759. }
  14760. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14761. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14762. // } else {
  14763. document.querySelectorAll(".basic_box")[0].scrollTop =
  14764. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14765. this.isClickColor = i + 1;
  14766. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14767. // }
  14768. this.$forceUpdate();
  14769. },
  14770. taskMove(type, index) {
  14771. this.$confirm(
  14772. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14773. "提示",
  14774. {
  14775. confirmButtonText: "确定",
  14776. cancelButtonText: "取消",
  14777. type: "warning",
  14778. }
  14779. )
  14780. .then(() => {
  14781. if (type == 1) {
  14782. if (index > 0) {
  14783. let a = JSON.parse(
  14784. JSON.stringify(
  14785. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14786. index - 1
  14787. ]
  14788. )
  14789. );
  14790. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  14791. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14792. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14793. }
  14794. } else {
  14795. if (
  14796. index <
  14797. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  14798. ) {
  14799. let a = JSON.parse(
  14800. JSON.stringify(
  14801. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14802. index + 1
  14803. ]
  14804. )
  14805. );
  14806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  14807. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14808. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14809. }
  14810. }
  14811. this.$forceUpdate();
  14812. })
  14813. .catch(() => {
  14814. return;
  14815. });
  14816. },
  14817. stageMove(type, index) {
  14818. if (type == 1) {
  14819. if (index > 0) {
  14820. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  14821. let acid = JSON.parse(
  14822. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  14823. );
  14824. let bcid = JSON.parse(
  14825. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14826. );
  14827. this.unitJson3[index - 1] = this.unitJson3[index];
  14828. this.unitJson3[index] = a;
  14829. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  14830. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14831. }
  14832. } else {
  14833. if (index < this.unitJson3.length - 1) {
  14834. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  14835. let acid = JSON.parse(
  14836. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  14837. );
  14838. let bcid = JSON.parse(
  14839. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14840. );
  14841. this.unitJson3[index + 1] = this.unitJson3[index];
  14842. this.unitJson3[index] = a;
  14843. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  14844. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14845. }
  14846. }
  14847. this.$forceUpdate();
  14848. },
  14849. addGroup(i) {
  14850. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14851. this.groupJson.group.push({
  14852. name: "第" + (this.groupJson.group.length + 1) + "组",
  14853. });
  14854. },
  14855. deleteGroup(i) {
  14856. this.groupJson.group.splice(i, 1);
  14857. },
  14858. numberPan() {
  14859. if (
  14860. /[^\d]/.test(this.groupJson.number) ||
  14861. this.groupJson.number < 2 ||
  14862. this.groupJson.number > 10
  14863. ) {
  14864. this.$message.error("请输入2-10的数字");
  14865. this.groupJson.number = "";
  14866. }
  14867. },
  14868. numberPanJie() {
  14869. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  14870. this.$message.error('请输入大于1的数字')
  14871. this.courseJie = 1
  14872. }
  14873. },
  14874. numberPanTime() {
  14875. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  14876. this.$message.error('请输入大于1的数字')
  14877. this.courseTime = 1
  14878. }
  14879. },
  14880. addGroupJson() {
  14881. for (var i = 0; i < this.groupJson.group.length; i++) {
  14882. if (!this.groupJson.group[i].name) {
  14883. this.$message.error("请将信息填写完整!");
  14884. return;
  14885. }
  14886. }
  14887. if (!this.groupJson.number) {
  14888. this.$message.error("请将信息填写完整!");
  14889. return;
  14890. }
  14891. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14892. this.taskCount
  14893. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14894. JSON.stringify(this.groupJson)
  14895. );
  14896. this.dialogVisibleGroup = false;
  14897. this.groupJson = {};
  14898. if (
  14899. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14900. .toolChoose[this.toolIndex].tool != 49
  14901. ) {
  14902. this.addTools(49, this.taskCount, this.toolIndex);
  14903. }
  14904. },
  14905. updateTime(preTime) {
  14906. this.preTime = preTime;
  14907. },
  14908. InviteChange(val) {
  14909. console.log(val);
  14910. let _check = [];
  14911. let _check2 = [];
  14912. for (var i = 0; i < this.grade2.length; i++) {
  14913. var gid = this.grade2[i].id;
  14914. _check.push(gid);
  14915. }
  14916. for (var i = 0; i < this.checkboxList2.length; i++) {
  14917. var _id = this.checkboxList2[i];
  14918. if (_check.indexOf(_id) !== -1) {
  14919. _check2.push(_id);
  14920. }
  14921. }
  14922. this.checkAll = _check2.length === _check.length;
  14923. return;
  14924. let array = JSON.parse(JSON.stringify(val));
  14925. this.inviteCode = this.inviteCode.filter((el) => {
  14926. if (val.indexOf(el.cid) != -1) {
  14927. array.splice(array.indexOf(el.cid), 1);
  14928. return el;
  14929. }
  14930. });
  14931. for (var i = 0; i < array.length; i++) {
  14932. this.getInviteCode(array[i]);
  14933. }
  14934. },
  14935. InviteChange2(val) {
  14936. console.log(val);
  14937. let _check = [];
  14938. let _check2 = [];
  14939. for (var i = 0; i < this.teacherJuri.length; i++) {
  14940. var gid = this.teacherJuri[i].userid;
  14941. _check.push(gid);
  14942. }
  14943. for (var i = 0; i < this.checkboxList3.length; i++) {
  14944. var _id = this.checkboxList3[i];
  14945. if (_check.indexOf(_id) !== -1) {
  14946. _check2.push(_id);
  14947. }
  14948. }
  14949. this.checkAll2 = _check2.length === _check.length;
  14950. this.setMan();
  14951. return;
  14952. let array = JSON.parse(JSON.stringify(val));
  14953. this.inviteCode = this.inviteCode.filter((el) => {
  14954. if (val.indexOf(el.cid) != -1) {
  14955. array.splice(array.indexOf(el.cid), 1);
  14956. return el;
  14957. }
  14958. });
  14959. for (var i = 0; i < array.length; i++) {
  14960. this.getInviteCode(array[i]);
  14961. }
  14962. },
  14963. handleCheckAllChange(val) {
  14964. if (val) {
  14965. for (var i = 0; i < this.grade2.length; i++) {
  14966. var gid = this.grade2[i].id;
  14967. if (this.checkboxList2.indexOf(gid) === -1) {
  14968. this.checkboxList2.push(gid);
  14969. }
  14970. }
  14971. } else {
  14972. let _check = [];
  14973. let _check2 = [];
  14974. for (var i = 0; i < this.grade2.length; i++) {
  14975. var gid = this.grade2[i].id;
  14976. _check.push(gid);
  14977. }
  14978. for (var i = 0; i < this.checkboxList2.length; i++) {
  14979. var _id = this.checkboxList2[i];
  14980. if (_check.indexOf(_id) === -1) {
  14981. _check2.push(_id);
  14982. }
  14983. }
  14984. this.checkboxList2 = _check2;
  14985. }
  14986. this.isIndeterminate = false;
  14987. },
  14988. handleCheckAllChange2(val) {
  14989. if (val) {
  14990. for (var i = 0; i < this.teacherJuri.length; i++) {
  14991. var gid = this.teacherJuri[i].userid;
  14992. if (this.checkboxList3.indexOf(gid) === -1) {
  14993. this.checkboxList3.push(gid);
  14994. }
  14995. }
  14996. } else {
  14997. let _check = [];
  14998. let _check2 = [];
  14999. for (var i = 0; i < this.teacherJuri.length; i++) {
  15000. var gid = this.teacherJuri[i].userid;
  15001. _check.push(gid);
  15002. }
  15003. for (var i = 0; i < this.checkboxList3.length; i++) {
  15004. var _id = this.checkboxList3[i];
  15005. if (_check.indexOf(_id) === -1) {
  15006. _check2.push(_id);
  15007. }
  15008. }
  15009. this.checkboxList3 = _check2;
  15010. }
  15011. this.isIndeterminate2 = false;
  15012. },
  15013. async getInviteCode(cid) {
  15014. let code = this.randomNumber();
  15015. let params = {
  15016. code: code,
  15017. oid: this.oid,
  15018. };
  15019. let type = 1;
  15020. for (var i = 0; i < this.inviteCode.length; i++) {
  15021. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15022. type = 2;
  15023. }
  15024. }
  15025. if (type == 2) {
  15026. this.getInviteCode(cid);
  15027. return;
  15028. }
  15029. const res = await this.ajax.get(
  15030. this.$store.state.api + "selectInviteCode2",
  15031. params
  15032. );
  15033. if (
  15034. res.data.length &&
  15035. res.data[0].length &&
  15036. res.data[0][0].courseId != this.cid
  15037. ) {
  15038. this.getInviteCode(cid);
  15039. return;
  15040. }
  15041. let array = [];
  15042. for (var i = 0; i < this.inviteCode.length; i++) {
  15043. array.push(this.inviteCode[i].cid);
  15044. }
  15045. if (array.indexOf(cid) != -1) {
  15046. this.inviteCode[array.indexOf(cid)].ic = code;
  15047. } else {
  15048. this.inviteCode.push({ cid: cid, ic: code });
  15049. }
  15050. },
  15051. OpenInviteD(cid) {
  15052. let array = [];
  15053. this.icode = "";
  15054. for (var i = 0; i < this.inviteCode.length; i++) {
  15055. array.push(this.inviteCode[i].cid);
  15056. }
  15057. if (array.indexOf(cid) != -1) {
  15058. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15059. }
  15060. this.inviteId = cid;
  15061. this.dialogVisibleInvite = true;
  15062. },
  15063. addInvite() {
  15064. let reg = /^[A-Za-z0-9]{4,}$/;
  15065. if (!reg.test(this.icode)) {
  15066. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15067. return;
  15068. }
  15069. let type = 1;
  15070. for (var i = 0; i < this.inviteCode.length; i++) {
  15071. if (
  15072. this.inviteCode[i].cid != this.inviteId &&
  15073. this.icode == this.inviteCode[i].ic
  15074. ) {
  15075. type = 2;
  15076. }
  15077. }
  15078. if (type == 2) {
  15079. this.$message.error("已有此随机码,不能重复");
  15080. return;
  15081. }
  15082. let params = {
  15083. code: this.icode,
  15084. oid: this.oid,
  15085. };
  15086. this.ajax
  15087. .get(this.$store.state.api + "selectInviteCode", params)
  15088. .then((res) => {
  15089. if (
  15090. res.data.length &&
  15091. res.data[0].length &&
  15092. res.data[0][0].courseId != this.cid
  15093. ) {
  15094. this.$message.error("已有此随机码,不能重复");
  15095. return;
  15096. }
  15097. let array = [];
  15098. for (var i = 0; i < this.inviteCode.length; i++) {
  15099. array.push(this.inviteCode[i].cid);
  15100. }
  15101. if (array.indexOf(this.inviteId) != -1) {
  15102. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15103. } else {
  15104. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15105. }
  15106. this.icode = "";
  15107. this.dialogVisibleInvite = false;
  15108. })
  15109. .catch((err) => {
  15110. console.error(err);
  15111. });
  15112. },
  15113. randomNumber() {
  15114. // 随机生成两位数
  15115. // let num = Math.floor(Math.random() * 900) + 100;
  15116. // 生成 0 到 99 之间的随机整数
  15117. const randomNumber = Math.floor(Math.random() * 100);
  15118. // 如果随机数小于 10,补上前导零
  15119. const num =
  15120. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15121. // 随机生成两个大写字母
  15122. let letters = "";
  15123. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15124. for (let i = 0; i < 3; i++) {
  15125. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15126. }
  15127. // 随机生成两位数字和字母的组合
  15128. let mix = "";
  15129. let chars =
  15130. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15131. for (let i = 0; i < 3; i++) {
  15132. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15133. mix += char;
  15134. }
  15135. // 随机选择一种类型
  15136. let type = Math.floor(Math.random() * 3);
  15137. return num;
  15138. // 根据类型输出结果
  15139. switch (type) {
  15140. case 0:
  15141. console.log(num); // 输出两位数
  15142. return num;
  15143. case 1:
  15144. console.log(letters); // 输出两个大写字母
  15145. return letters;
  15146. case 2:
  15147. console.log(mix); // 输出两位数字和字母的组合
  15148. return mix;
  15149. }
  15150. },
  15151. getPaste() {
  15152. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15153. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15154. if (!iframe && !iframe2) {
  15155. return;
  15156. }
  15157. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15158. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15159. if (copyData && copyData.stageData && copyData.stageData.length) {
  15160. this.isPasteStage = true;
  15161. }
  15162. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15163. this.isPasteStage = true;
  15164. }
  15165. if (copyData && copyData.selectData.length) {
  15166. this.isPasteChoice = true;
  15167. }
  15168. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15169. this.isPasteTask = true;
  15170. }
  15171. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15172. this.isPasteTask = true;
  15173. }
  15174. },
  15175. setCover() {
  15176. var _this = this;
  15177. if(_this.cover.length){
  15178. return;
  15179. }
  15180. _this.imageloading2 = true
  15181. _this.ajax
  15182. .post("https://gpt.cocorobo.cn/search_image", {
  15183. page: _this.ppage,
  15184. pagesize: 9,
  15185. query: _this.courseName,
  15186. })
  15187. .then(function (response) {
  15188. // console.log(response.data.data);
  15189. var data = response.data.FunctionResponse.result;
  15190. _this.cover = [];
  15191.       setTimeout(() => {
  15192.         _this.cover[0] = {
  15193.           name: "网络图片.png",
  15194.           url: data[0].thumbnail
  15195.         };
  15196.         _this.imgChange1(null, null, 1, null);
  15197.         _this.$forceUpdate();
  15198.       }, 0);
  15199. _this.imageloading2 = false
  15200. })
  15201. .catch(function (error) {
  15202. _this.imageloading2 = false
  15203. console.log(error);
  15204. });
  15205. },
  15206. searchImage() {
  15207. var _this = this;
  15208. _this.imageList = [];
  15209. if (!_this.searchImageValue) {
  15210. _this.sysPicVisible2 = true;
  15211. return;
  15212. }
  15213. _this.imageloading = true;
  15214. _this.ajax
  15215. .post("https://gpt.cocorobo.cn/search_image", {
  15216. page: _this.ppage,
  15217. pagesize: 9,
  15218. query: _this.searchImageValue,
  15219. })
  15220. .then(function (response) {
  15221. // console.log(response.data.data);
  15222. var data = response.data.FunctionResponse.result;
  15223. for (var i = 0; i < data.length; i++) {
  15224. _this.imageList.push({ url: data[i].thumbnail });
  15225. }
  15226. _this.imageloading = false;
  15227. })
  15228. .catch(function (error) {
  15229. console.log(error);
  15230. });
  15231. _this.sysPicVisible2 = true;
  15232. },
  15233. changePicture() {
  15234. this.ppage++;
  15235. this.searchImage();
  15236. },
  15237. resetImage() {
  15238. this.ppage = 1;
  15239. this.searchImage();
  15240. },
  15241. jumpGj(i, j) {
  15242. if (i + 1 != this.isClickColor) {
  15243. this.isClickColor = i + 1;
  15244. }
  15245. var a = document.scrollingElement;
  15246. this.toolIndexType = `gj${i}${j}`;
  15247. let target = document.querySelector(`#gj${i}${j}`);
  15248. if (target) {
  15249. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15250. setTimeout(() => {
  15251. target.scrollIntoView(true);
  15252. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15253. j
  15254. ].isFold3 = false;
  15255. setTimeout(() => {
  15256. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15257. }, 0);
  15258. }, 0);
  15259. }
  15260. },
  15261. jumpGj2(i, j, k) {
  15262. if (this.unitIndex != k) {
  15263. if (this.panUnitJson() == 2) {
  15264. return;
  15265. }
  15266. this.unitSet(k);
  15267. }
  15268. setTimeout(() => {
  15269. if (i + 1 != this.isClickColor) {
  15270. this.isClickColor = i + 1;
  15271. }
  15272. var a = document.scrollingElement;
  15273. this.toolIndexType = `gj${i}${j}${k}`;
  15274. let target = document.querySelector(`#gj${i}${j}`);
  15275. if (target) {
  15276. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15277. setTimeout(() => {
  15278. target.scrollIntoView(true);
  15279. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15280. j
  15281. ].isFold3 = false;
  15282. setTimeout(() => {
  15283. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15284. }, 0);
  15285. }, 0);
  15286. }
  15287. }, 0);
  15288. },
  15289. dragStart(val, i, j) {
  15290. console.log(this.taskCount);
  15291. this.dragType = "drag";
  15292. this.taskCount = j;
  15293. this.oldIndex = i;
  15294. this.oldData = val;
  15295. },
  15296. dragOver(i, j) {
  15297. this.typeIndex = "chapter-" + j + "-" + i;
  15298. this.newIndex = i;
  15299. },
  15300. dragEnd() {
  15301. if (this.dragType != "drag") {
  15302. this.typeIndex = "";
  15303. this.newIndex = "";
  15304. this.dragType = "";
  15305. this.isdrag = "";
  15306. return;
  15307. }
  15308. console.log(this.taskCount);
  15309. let newItems = [
  15310. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15311. .chapterData,
  15312. ];
  15313. // 删除老的节点
  15314. newItems.splice(this.oldIndex, 1);
  15315. // 在列表中目标位置增加新的节点
  15316. newItems.splice(this.newIndex, 0, this.oldData);
  15317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15318. this.taskCount
  15319. ].chapterData = [...newItems];
  15320. this.typeIndex = "";
  15321. this.newIndex = "";
  15322. this.dragType = "";
  15323. this.isdrag = "";
  15324. this.$forceUpdate();
  15325. },
  15326. dragTaskStart(val, i, j) {
  15327. this.dragType = "task";
  15328. this.oldIndex = i;
  15329. this.oldData = val;
  15330. this.oldUnitIndex = j;
  15331. },
  15332. dragTaskOver(i, j) {
  15333. this.typeIndex = "task-" + i;
  15334. this.newIndex = i;
  15335. this.checkUnitIndex = j;
  15336. },
  15337. async dragTaskEnd() {
  15338. if (this.dragType != "task") {
  15339. this.newIndex = "";
  15340. this.dragType = "";
  15341. this.typeIndex = "";
  15342. this.checkUnitIndex = "";
  15343. this.isdrag = "";
  15344. return;
  15345. }
  15346. if (
  15347. this.newIndex == this.oldIndex &&
  15348. this.oldUnitIndex == this.checkUnitIndex
  15349. ) {
  15350. this.newIndex = "";
  15351. this.dragType = "";
  15352. this.typeIndex = "";
  15353. this.checkUnitIndex = "";
  15354. this.isdrag = "";
  15355. return;
  15356. }
  15357. let count1 = await this.getWorksCount(
  15358. 2,
  15359. this.checkUnitIndex,
  15360. this.newIndex,
  15361. 0
  15362. );
  15363. let count2 = await this.getWorksCount(
  15364. 2,
  15365. this.oldUnitIndex,
  15366. this.oldIndex,
  15367. 0
  15368. );
  15369. if (count1 > 0 || count2 > 0) {
  15370. this.$confirm(
  15371. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15372. "提示",
  15373. {
  15374. confirmButtonText: "确定",
  15375. cancelButtonText: "取消",
  15376. type: "warning",
  15377. }
  15378. )
  15379. .then(() => {
  15380. if (this.oldUnitIndex != this.checkUnitIndex) {
  15381. let newItems = [
  15382. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15383. ];
  15384. // 删除老的节点
  15385. newItems.splice(this.oldIndex, 1);
  15386. // 在列表中目标位置增加新的节点
  15387. let newItems2 = [
  15388. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15389. ];
  15390. newItems2.splice(this.newIndex, 0, this.oldData);
  15391. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15392. ...newItems,
  15393. ];
  15394. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15395. ...newItems2,
  15396. ];
  15397. } else {
  15398. let newItems = [
  15399. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15400. ];
  15401. let chapterData = []
  15402. if (this.oldIndex == 0) {
  15403. chapterData = newItems[this.oldIndex].chapterData
  15404. newItems[this.oldIndex].chapterData = []
  15405. } else if (this.newIndex == 0) {
  15406. chapterData = newItems[this.newIndex].chapterData
  15407. newItems[this.oldIndex].chapterData = []
  15408. }
  15409. // 删除老的节点
  15410. newItems.splice(this.oldIndex, 1);
  15411. // 在列表中目标位置增加新的节点
  15412. newItems.splice(this.newIndex, 0, this.oldData);
  15413. if (this.oldIndex == 0 || this.newIndex == 0) {
  15414. newItems[0].chapterData = chapterData
  15415. }
  15416. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15417. ...newItems,
  15418. ];
  15419. }
  15420. this.typeIndex = "";
  15421. this.newIndex = "";
  15422. this.dragType = "";
  15423. this.checkUnitIndex = "";
  15424. this.isdrag = "";
  15425. this.updateWork();
  15426. this.$forceUpdate();
  15427. })
  15428. .catch(() => {
  15429. this.newIndex = "";
  15430. this.dragType = "";
  15431. this.typeIndex = "";
  15432. this.checkUnitIndex = "";
  15433. this.isdrag = "";
  15434. return;
  15435. });
  15436. } else {
  15437. if (this.oldUnitIndex != this.checkUnitIndex) {
  15438. let newItems = [
  15439. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15440. ];
  15441. // 删除老的节点
  15442. newItems.splice(this.oldIndex, 1);
  15443. // 在列表中目标位置增加新的节点
  15444. let newItems2 = [
  15445. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15446. ];
  15447. newItems2.splice(this.newIndex, 0, this.oldData);
  15448. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15449. ...newItems,
  15450. ];
  15451. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15452. ...newItems2,
  15453. ];
  15454. } else {
  15455. let newItems = [
  15456. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15457. ];
  15458. let chapterData = []
  15459. if (this.oldIndex == 0) {
  15460. chapterData = newItems[this.oldIndex].chapterData
  15461. newItems[this.oldIndex].chapterData = []
  15462. } else if (this.newIndex == 0) {
  15463. chapterData = newItems[this.newIndex].chapterData
  15464. newItems[this.oldIndex].chapterData = []
  15465. }
  15466. // 删除老的节点
  15467. newItems.splice(this.oldIndex, 1);
  15468. // 在列表中目标位置增加新的节点
  15469. newItems.splice(this.newIndex, 0, this.oldData);
  15470. if (this.oldIndex == 0 || this.newIndex == 0) {
  15471. newItems[0].chapterData = chapterData
  15472. }
  15473. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15474. ...newItems,
  15475. ];
  15476. }
  15477. this.typeIndex = "";
  15478. this.newIndex = "";
  15479. this.dragType = "";
  15480. this.checkUnitIndex = "";
  15481. this.isdrag = "";
  15482. this.updateWork();
  15483. this.$forceUpdate();
  15484. }
  15485. },
  15486. dragUnitStart(val, i) {
  15487. this.dragType = "Unit";
  15488. this.oldIndex = i;
  15489. this.oldData = val;
  15490. },
  15491. dragUnitOver(i) {
  15492. this.typeIndex = "Unit-" + i;
  15493. this.newIndex = i;
  15494. console.log(i, this.unitJson[i].toolOpen);
  15495. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  15496. this.unitJson[i].toolOpen = true;
  15497. this.updateWork();
  15498. this.$forceUpdate();
  15499. }
  15500. },
  15501. async dragUnitEnd() {
  15502. if (this.dragType != "Unit") {
  15503. this.newIndex = "";
  15504. this.dragType = "";
  15505. this.typeIndex = "";
  15506. this.isdrag = "";
  15507. return;
  15508. }
  15509. if (this.newIndex == this.oldIndex) {
  15510. this.newIndex = "";
  15511. this.dragType = "";
  15512. this.typeIndex = "";
  15513. this.isdrag = "";
  15514. return;
  15515. }
  15516. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  15517. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  15518. console.log(count1, count2);
  15519. if (count1 > 0 || count2 > 0) {
  15520. this.$confirm(
  15521. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15522. "提示",
  15523. {
  15524. confirmButtonText: "确定",
  15525. cancelButtonText: "取消",
  15526. type: "warning",
  15527. }
  15528. )
  15529. .then(() => {
  15530. let newItems = [...this.unitJson];
  15531. // 删除老的节点
  15532. newItems.splice(this.oldIndex, 1);
  15533. // 在列表中目标位置增加新的节点
  15534. newItems.splice(this.newIndex, 0, this.oldData);
  15535. this.unitJson = [...newItems];
  15536. this.typeIndex = "";
  15537. this.newIndex = "";
  15538. this.dragType = "";
  15539. this.isdrag = "";
  15540. this.updateWork();
  15541. this.$forceUpdate();
  15542. })
  15543. .catch(() => {
  15544. this.newIndex = "";
  15545. this.dragType = "";
  15546. this.typeIndex = "";
  15547. this.isdrag = "";
  15548. return;
  15549. });
  15550. } else {
  15551. let newItems = [...this.unitJson];
  15552. // 删除老的节点
  15553. newItems.splice(this.oldIndex, 1);
  15554. // 在列表中目标位置增加新的节点
  15555. newItems.splice(this.newIndex, 0, this.oldData);
  15556. this.unitJson = [...newItems];
  15557. this.typeIndex = "";
  15558. this.newIndex = "";
  15559. this.dragType = "";
  15560. this.isdrag = "";
  15561. this.updateWork();
  15562. this.$forceUpdate();
  15563. }
  15564. },
  15565. getWorksCount(type, stage, task, tool) {
  15566. return new Promise((resolve, reject) => {
  15567. let params = [
  15568. {
  15569. cid: this.cid,
  15570. stage: stage,
  15571. task: task,
  15572. tool: tool,
  15573. type: type,
  15574. },
  15575. ];
  15576. this.ajax
  15577. .post(this.$store.state.api + "getCourseWorkCount", params)
  15578. .then((res) => {
  15579. let count = res.data[0][0].count;
  15580. resolve(count);
  15581. })
  15582. .catch((err) => {
  15583. resolve(0);
  15584. this.$message.error("网络不佳");
  15585. console.error(err);
  15586. });
  15587. });
  15588. },
  15589. getTwoType(id) {
  15590. this.twoJson = [];
  15591. var array = this.CourseTypeJson1[
  15592. "3f8eed32-aba9-11ee-b534-005056b86db5"
  15593. ].filter((e) => {
  15594. return e.ppid == id;
  15595. });
  15596. this.twoJson = array;
  15597. this.$forceUpdate();
  15598. },
  15599. ctype() {
  15600. this.oneJson =
  15601. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  15602. },
  15603. selectAllType1() {
  15604. this.CourseType1 = [];
  15605. this.CourseTypeJson1 = {};
  15606. this.courseTypeId1 = {};
  15607. this.$forceUpdate();
  15608. let params = {
  15609. org: this.org && this.org != "" ? this.org : "",
  15610. oid: this.oid && this.oid != "" ? this.oid : "",
  15611. };
  15612. this.ajax
  15613. .get(this.$store.state.api + "selectAllEvaType", params)
  15614. .then((res) => {
  15615. this.CourseType1 = res.data;
  15616. for (var i = 0; i < res.data[0].length; i++) {
  15617. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  15618. res.data[0][i].name = "一级分类";
  15619. } else if (
  15620. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  15621. ) {
  15622. res.data[0][i].name = "二级分类";
  15623. }
  15624. if (!this.cid) {
  15625. this.courseTypeId1[res.data[0][i].id] = [];
  15626. }
  15627. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  15628. this.CourseTypeJson1[res.data[0][i].id] = [];
  15629. }
  15630. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  15631. for (var j = 0; j < res.data[1].length; j++) {
  15632. if (res.data[0][i].id == res.data[1][j].pid) {
  15633. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15634. }
  15635. }
  15636. // } else {
  15637. if (res.data[2].length > 0) {
  15638. for (var j = 0; j < res.data[2].length; j++) {
  15639. if (res.data[0][i].id == res.data[2][j].pid) {
  15640. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15641. }
  15642. }
  15643. }
  15644. if (res.data[3].length > 0) {
  15645. for (var j = 0; j < res.data[3].length; j++) {
  15646. if (res.data[0][i].id == res.data[3][j].pid) {
  15647. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15648. }
  15649. }
  15650. }
  15651. // }
  15652. }
  15653. this.ctype();
  15654. this.cetBoxDialog = true;
  15655. })
  15656. .catch((err) => {
  15657. console.error(err);
  15658. });
  15659. },
  15660. setAiJson(pan,string,string2,string3){
  15661. if(pan == 'aiTeacher2'){
  15662. this.aiJson['teacherDetail2'] = string
  15663. }else if(pan == 'aiRateRuleA'){
  15664. this.aiJson['aiRateRule'] = string
  15665. }else if(pan == 'aiOutline2'){
  15666. this.aiJson['aiOutlineTask'] = string
  15667. this.aiJson['aiOutlineDetail'] = string2
  15668. this.aiText2 = ''
  15669. }else if(pan == 'aiTeacher3'){
  15670. this.aiJson['aiCpoteTask'] = string
  15671. this.aiJson['teacherDetail2'] = string2
  15672. this.aiText2 = ''
  15673. }else if(pan == 'aiTask2'){
  15674. this.aiJson['aiTask'] = string
  15675. }else if(pan == 'aiTask3'){
  15676. this.aiJson['aiTaskG2'] = string
  15677. this.aiJson['aiTaskG2'] = string2
  15678. this.aiJson['aiTaskG3'] = string3
  15679. }else if(pan == 'aiteacherTextDetail'){
  15680. this.aiJson['aiAbstract'] = string
  15681. }else if(pan == 'aitargetTextDetail'){
  15682. this.aiJson['aiTarget'] = string
  15683. }else if(pan == 'aitargetTextDetail2'){
  15684. this.aiJson['aiTarget2'] = string
  15685. }else if(pan == 'aitargetTextDetail3'){
  15686. this.aiJson['aiTargetGet'] = string
  15687. this.aiJson['aiTarget2'] = string2
  15688. }else {
  15689. this.aiJson[pan] = string
  15690. }
  15691. this.$forceUpdate();
  15692. },
  15693. editTask3(index){
  15694. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  15695. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  15696. }else {
  15697. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  15698. }
  15699. this.$forceUpdate();
  15700. },
  15701. editTask2(index){
  15702. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  15703. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  15704. }else {
  15705. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  15706. }
  15707. this.$forceUpdate();
  15708. },
  15709. openRule(i, k){
  15710. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  15711. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  15712. }else {
  15713. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  15714. }
  15715. this.$forceUpdate();
  15716. },
  15717. editCpote(index){
  15718. if(this.cpote[index]){
  15719. this.cpote[index] = false
  15720. }else {
  15721. this.cpote[index] = true
  15722. }
  15723. this.$forceUpdate();
  15724. },
  15725. clickGenTT(){
  15726. if(!this.teacherInfoData.length){
  15727. this.$message.error("请上传教案");
  15728. return;
  15729. }
  15730. this.openAiDialog(2, 'aiteacherTextDetail',1)
  15731. setTimeout(() => {
  15732. this.openAiDialog(2, 'aitargetTextDetail',1)
  15733. }, 500);
  15734. },
  15735. clickGenTT2(){
  15736. if (this.courseName == "") {
  15737. this.$message.error("请补充填写课程名称");
  15738. return;
  15739. }
  15740. this.openAiDialog(2, 'aiDetail',1)
  15741. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  15742. setTimeout(() => {
  15743. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  15744. this.openAiDialog(2, 'aitargetTextDetail3',1)
  15745. }, 500);
  15746. }
  15747. this.courseTextBool = true
  15748. },
  15749. openAiDialog2(clickType, type, callback, index, tindex){
  15750. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  15751. confirmButtonText: "确定",
  15752. cancelButtonText: "取消",
  15753. type: "warning",
  15754. })
  15755. .then(() => {
  15756. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  15757. // this.openAiDialog(clickType, 'aiTeacher')
  15758. // }else {
  15759. this.openAiDialog(clickType, type, callback, index, tindex)
  15760. // }
  15761. })
  15762. .catch(() => {
  15763. });
  15764. },
  15765. openAiDialog(clickType, type, callback, index, tindex) {
  15766. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  15767. this.$message.error("您没有权限修改/查看提示词");
  15768. return;
  15769. }
  15770. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  15771. this.$message.error("请上传教案");
  15772. return;
  15773. }
  15774. if (this.courseName == "") {
  15775. this.$message.error("请补充填写课程名称");
  15776. return;
  15777. }
  15778. this.aiText2 = ''
  15779. this.clickType = clickType
  15780. let sub = []
  15781. if (this.courseTypeId.length) {
  15782. for (var i = 0; i < this.courseTypeId.length; i++) {
  15783. let _sid = this.courseTypeId[i]
  15784. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15785. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15786. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15787. }
  15788. }
  15789. }
  15790. }
  15791. let mclass = []
  15792. if (this.courseTypeId.length) {
  15793. for (var i = 0; i < this.courseTypeId.length; i++) {
  15794. let _sid = this.courseTypeId[i]
  15795. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15796. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15797. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15798. }
  15799. }
  15800. }
  15801. }
  15802. if (type == "aiDetail") {
  15803. if (this.ttextLoading) {
  15804. this.$message({
  15805. message: "请回答完毕后再次发送",
  15806. type: "warning"
  15807. });
  15808. return;
  15809. }
  15810. this.aitype = "aiDetail"
  15811. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  15812. this.aiText = this.aiJson.aiDetail
  15813. this.aiCallBack = callback
  15814. } else if (type == "aiOutline") {
  15815. this.aitype = "aiOutline"
  15816. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15817. this.aiText = this.aiJson.aiOutline
  15818. } else if (type == "aiOutline2") {
  15819. this.aitype = "aiOutline2"
  15820. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15821. this.aiText = this.aiJson.aiOutlineTask
  15822. this.aiText2 = this.aiJson.aiOutlineDetail
  15823. } else if (type == "aiOutlineDetail2") {
  15824. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  15825. this.$message({
  15826. message: "请回答完毕后再次发送",
  15827. type: "warning"
  15828. });
  15829. return;
  15830. }
  15831. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  15832. this.$message.error('请输入任务名称')
  15833. return;
  15834. }
  15835. this.aitype = type
  15836. this.aiCallBack = callback
  15837. this.aiText = this.aiJson.aiOutlineDetail2
  15838. } else if (type == "aiTask") {
  15839. this.aitype = "aiTask"
  15840. var _text = ""
  15841. for (var i = 0; i < this.teacherText.length; i++) {
  15842. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  15843. }
  15844. // this.aiText = `请根据${_text}。`
  15845. this.aiText = this.aiJson.aiTask
  15846. this.aiCallBack = callback
  15847. } else if (type == "aiTask2") {
  15848. if (this.taskLoading[callback]) {
  15849. this.$message({
  15850. message: "请回答完毕后再次发送",
  15851. type: "warning"
  15852. });
  15853. return;
  15854. }
  15855. this.aitype = "aiTask2"
  15856. this.aiText = this.aiJson.aiTask
  15857. this.aiCallBack = [callback, index]
  15858. } else if (type == "aiTask3") {
  15859. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  15860. this.$message({
  15861. message: "请回答完毕后再次发送",
  15862. type: "warning"
  15863. });
  15864. return;
  15865. }
  15866. this.aitype = type
  15867. this.aiText = this.aiJson.aiTaskG1
  15868. this.aiText2 = this.aiJson.aiTaskG2
  15869. this.aiText3 = this.aiJson.aiTaskG3
  15870. this.aiCallBack = [callback, index]
  15871. } else if (type == "aiDetail1") {
  15872. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  15873. this.$message({
  15874. message: "请回答完毕后再次发送",
  15875. type: "warning"
  15876. });
  15877. return;
  15878. }
  15879. this.aitype = "aiDetail1"
  15880. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  15881. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  15882. this.aiText = this.aiJson.aiDetail1
  15883. this.aiCallBack = callback
  15884. this.aiIndex = index
  15885. } else if (type == "aiDetail2") {
  15886. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  15887. this.$message({
  15888. message: "请回答完毕后再次发送",
  15889. type: "warning"
  15890. });
  15891. return;
  15892. }
  15893. this.aitype = "aiDetail2"
  15894. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  15895. this.aiText = this.aiJson.aiDetail2
  15896. this.aiCallBack = callback
  15897. this.aiIndex = index
  15898. } else if (type == "aiDetail3") {
  15899. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  15900. this.$message({
  15901. message: "请回答完毕后再次发送",
  15902. type: "warning"
  15903. });
  15904. return;
  15905. }
  15906. this.aitype = "aiDetail3"
  15907. this.aiText = this.aiJson.aiDetail3
  15908. this.aiIndex = index + '-' + tindex
  15909. } else if (type == "aiDetail4") {
  15910. var _text = ""
  15911. if(callback && callback.length){
  15912. for (var i = 0; i < callback.length; i++) {
  15913. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15914. }
  15915. }
  15916. this.aitype = "aiDetail4"
  15917. this.aiText = this.aiJson.aiDetail4
  15918. this.aiIndex = index
  15919. } else if (type == "aiTeacher") {
  15920. this.aitype = "aiTeacher"
  15921. var _text = ""
  15922. for (var i = 0; i < this.dArray.length; i++) {
  15923. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15924. }
  15925. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15926. this.aiText = this.aiJson.aiTeacher
  15927. this.aiCallBack = callback
  15928. } else if (type == "aiTeacher2") {
  15929. this.aitype = "aiTeacher2"
  15930. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15931. } else if (type == "aiTeacher3") {
  15932. this.aitype = type
  15933. this.aiText = this.aiJson.aiCpoteTask
  15934. this.aiText2 = this.aiJson.teacherDetail2
  15935. } else if (type == "teacherDetail") {
  15936. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15937. this.$message({
  15938. message: "请回答完毕后再次发送",
  15939. type: "warning"
  15940. });
  15941. return;
  15942. }
  15943. this.aitype = "teacherDetail"
  15944. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15945. this.aiText = this.aiJson.teacherDetail
  15946. this.aiCallBack = callback
  15947. this.aiIndex = index
  15948. } else if (type == "teacherDetail2") {
  15949. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15950. this.$message({
  15951. message: "请回答完毕后再次发送",
  15952. type: "warning"
  15953. });
  15954. return;
  15955. }
  15956. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15957. this.$message.error('请输入任务名称')
  15958. return;
  15959. }
  15960. this.aitype = "teacherDetail2"
  15961. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15962. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15963. this.aiCallBack = callback
  15964. this.aiIndex = index
  15965. } else if (type == "aiCpote1") {
  15966. if (this.cpotetLoading.cpote1) {
  15967. this.$message({
  15968. message: "请回答完毕后再次发送",
  15969. type: "warning"
  15970. });
  15971. return;
  15972. }
  15973. this.aitype = "aiCpote1"
  15974. this.aiText = this.aiJson.cpote1
  15975. this.aiCallBack = callback
  15976. } else if (type == "aiCpote2") {
  15977. if (this.cpotetLoading.cpote2) {
  15978. this.$message({
  15979. message: "请回答完毕后再次发送",
  15980. type: "warning"
  15981. });
  15982. return;
  15983. }
  15984. this.aitype = "aiCpote2"
  15985. this.aiText = this.aiJson.cpote2
  15986. this.aiCallBack = callback
  15987. } else if (type == "aiCpote3") {
  15988. if (this.cpotetLoading.cpote3) {
  15989. this.$message({
  15990. message: "请回答完毕后再次发送",
  15991. type: "warning"
  15992. });
  15993. return;
  15994. }
  15995. this.aitype = "aiCpote3"
  15996. this.aiText = this.aiJson.cpote3
  15997. this.aiCallBack = callback
  15998. } else if (type == "aiCpote4") {
  15999. if (this.cpotetLoading.cpote4) {
  16000. this.$message({
  16001. message: "请回答完毕后再次发送",
  16002. type: "warning"
  16003. });
  16004. return;
  16005. }
  16006. this.aitype = "aiCpote4"
  16007. this.aiText = this.aiJson.cpote4
  16008. this.aiCallBack = callback
  16009. } else if (type == 'aiteacherTextDetail'){
  16010. if (this.tteacherTextLoading) {
  16011. this.$message({
  16012. message: "请回答完毕后再次发送",
  16013. type: "warning"
  16014. });
  16015. return;
  16016. }
  16017. this.aitype = type
  16018. this.aiText = this.aiJson.aiAbstract
  16019. this.aiCallBack = callback
  16020. } else if (type == 'aitargetTextDetail'){
  16021. if (this.ttargetTextLoading) {
  16022. this.$message({
  16023. message: "请回答完毕后再次发送",
  16024. type: "warning"
  16025. });
  16026. return;
  16027. }
  16028. this.aitype = type
  16029. this.aiText = this.aiJson.aiTarget
  16030. this.aiCallBack = callback
  16031. } else if (type == 'aitargetTextDetail2'){
  16032. if (this.ttargetTextLoading2) {
  16033. this.$message({
  16034. message: "请回答完毕后再次发送",
  16035. type: "warning"
  16036. });
  16037. return;
  16038. }
  16039. this.aitype = type
  16040. this.aiText = this.aiJson.aiTarget2
  16041. this.aiCallBack = callback
  16042. } else if (type == 'aitargetTextDetail3'){
  16043. if (this.ttargetTextLoading2) {
  16044. this.$message({
  16045. message: "请回答完毕后再次发送",
  16046. type: "warning"
  16047. });
  16048. return;
  16049. }
  16050. this.aitype = type
  16051. this.aiText = this.aiJson.aiTargetGet
  16052. this.aiText2 = this.aiJson.aiTarget2
  16053. this. aiCallBack= callback
  16054. } else if (type == 'aiSearchFile'){
  16055. if(this.fileSLoading) {
  16056. this.$message({
  16057. message: "请回答完毕后再次发送",
  16058. type: "warning"
  16059. });
  16060. return;
  16061. }
  16062. this.aitype = type
  16063. this.aiText = this.aiJson.aiSearchFile
  16064. } else if (type == 'aiRateRule'){
  16065. this.aitype = type
  16066. this.aiText = this.aiJson.aiRateRule
  16067. this.aiCallBack = [callback, index]
  16068. } else if (type == 'aiRateRuleA'){
  16069. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  16070. confirmButtonText: "生成所有",
  16071. cancelButtonText: "仅生成该任务",
  16072. distinguishCancelAndClose: true,
  16073. type: "warning",
  16074. })
  16075. .then(() => {
  16076. this.aitype = type
  16077. this.aiText = this.aiJson.aiRateRule
  16078. this.aiCallBack = [1,callback]
  16079. this.dialogVisibleAiD = true
  16080. }).catch((v) => {
  16081. console.log(v);
  16082. if (v == "cancel") {
  16083. this.aitype = type
  16084. this.aiText = this.aiJson.aiRateRule
  16085. this.aiCallBack = [2,callback]
  16086. this.dialogVisibleAiD = true
  16087. }
  16088. })
  16089. }
  16090. if(type != 'aiRateRuleA'){
  16091. this.dialogVisibleAiD = true
  16092. }
  16093. },
  16094. async aiConfirm(msg,msg2,msg3) {
  16095. let sub = []
  16096. if (this.courseTypeId.length) {
  16097. for (var i = 0; i < this.courseTypeId.length; i++) {
  16098. let _sid = this.courseTypeId[i]
  16099. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16100. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16101. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16102. }
  16103. }
  16104. }
  16105. }
  16106. let mclass = []
  16107. if (this.courseTypeId.length) {
  16108. for (var i = 0; i < this.courseTypeId.length; i++) {
  16109. let _sid = this.courseTypeId[i]
  16110. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16111. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16112. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16113. }
  16114. }
  16115. }
  16116. }
  16117. let url = []
  16118. if (this.infoData.length) {
  16119. for (var i = 0; i < this.infoData.length; i++) {
  16120. url.push(this.infoData[i].url)
  16121. }
  16122. }
  16123. if (this.aitype == "aiDetail") {
  16124. this.detailYou(msg)
  16125. } else if (this.aitype == "aiOutline") {
  16126. this.loading = true
  16127. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16128. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16129. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16130. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16131. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16132. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16133. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16134. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  16135. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16136. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16137. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16138. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16139. let message = `NOTICE
  16140. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16141. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16142. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16143. Instruction: Based on the context, follow "Format example", write content.
  16144. # Context
  16145. ## 要求
  16146. ${msg} 以及##参考资料
  16147. ## 参考资料
  16148. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16149. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16150. detail至少输出300tokens,markdown格式输出。
  16151. detail包含子教学目标、过程性成果、子评价标准
  16152. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16153. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16154. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  16155. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  16156. # Format example
  16157. [{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]`
  16158. // detail输出不要输出成json,文本或者markdown都可以
  16159. this.aiGet2(message, () => {
  16160. this.loading = false
  16161. this.isOutline = true
  16162. })
  16163. } else if (this.aitype == "aiOutline2") {
  16164. this.loading = true
  16165. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16166. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16167. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16168. let message = `NOTICE
  16169. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16170. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16171. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16172. Instruction: Based on the context, follow "Format example", write content.
  16173. # Context
  16174. ## 要求
  16175. ${msg} 以及##参考资料
  16176. ## 参考资料
  16177. 课程名字:${this.courseName}
  16178. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16179. ${sub.length ? '学科:' + sub.join(",") : ''}
  16180. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16181. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16182. # Format example
  16183. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16184. this.aiGetTask2(message, () => {
  16185. this.loading = false
  16186. this.isOutline = true
  16187. })
  16188. } else if (this.aitype == "aiOutlineDetail2") {
  16189. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16190. } else if (this.aitype == "aiTask") {
  16191. var _text = ""
  16192. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16193. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16194. }
  16195. let message = `NOTICE
  16196. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16197. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16198. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16199. Instruction: Based on the context, follow "Format example", write content.
  16200. # Context
  16201. ## 要求
  16202. ${msg} 为**每个教学任务分别输出**以下内容。
  16203.  
  16204. ${(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','') : ''}
  16205. ## 参考资料
  16206. 教学任务教案:${_text}
  16207. ## 格式要求
  16208. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16209. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16210. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16211. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16212. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16213. 出现选择题和问答题的概率提高
  16214. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16215.  
  16216. # Format example
  16217. [{"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":"工具描述"}]}]`
  16218. this.loading = true
  16219. this.aiGet3(message, this.aiCallBack)
  16220. } else if (this.aitype == "aiTask2") {
  16221. if(this.aiCallBack[0] == 'all'){
  16222. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16223. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16224. let message = `NOTICE
  16225. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16226. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16227. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16228. Instruction: Based on the context, follow "Format example", write content.
  16229. # Context
  16230. ## 要求
  16231. ${msg} 为教学任务分别输出以下内容。
  16232.  
  16233. ${(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','') : ''}
  16234. ## 参考资料
  16235. 教学任务教案:${_text}
  16236. ## 格式要求
  16237. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16238. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16239. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16240. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16241. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16242.  
  16243. # Format example
  16244. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16245. this.taskLoading[_task] = true
  16246. this.aiGet32(message, _task)
  16247. }
  16248. }else{
  16249. 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`
  16250. let message = `NOTICE
  16251. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16252. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16253. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16254. Instruction: Based on the context, follow "Format example", write content.
  16255. # Context
  16256. ## 要求
  16257. ${msg} 为教学任务分别输出以下内容。
  16258.  
  16259. ${(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','') : ''}
  16260. ## 参考资料
  16261. 教学任务教案:${_text}
  16262. ## 格式要求
  16263. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16264. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16265. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16266. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16267. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16268.  
  16269. # Format example
  16270. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16271. this.taskLoading[this.aiCallBack[0]] = true
  16272. this.aiGet32(message, this.aiCallBack[0])
  16273. }
  16274. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16275. } else if (this.aitype == "aiTask3") {
  16276. if(this.aiCallBack[0] == 'all'){
  16277. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16278. let message1 = `NOTICE
  16279. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16280. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16281. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16282. Instruction: Based on the context, follow "Format example", write content.
  16283. # Context
  16284. ## 要求
  16285. ${msg}
  16286.  
  16287. ## 参考资料
  16288. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16289. # 输出格式与要求
  16290. 任务描述(告诉学生他们需要做什么):
  16291. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16292. # 范例
  16293. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16294. # Format example
  16295. { "detail":"任务描述" }`
  16296. let message2 = `NOTICE
  16297. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16298. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16299. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16300. Instruction: Based on the context, follow "Format example", write content.
  16301. # Context
  16302. ## 要求
  16303. ${msg2}
  16304.  
  16305. ## 参考资料
  16306. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16307. # 输出格式与要求
  16308. 互动工具列表
  16309. 工具名:表格
  16310. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16311. 工具名:文档
  16312. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16313. 工具名称:选择题
  16314. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16315. # Format example
  16316. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16317. let message3 = `NOTICE
  16318. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16319. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16320. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16321. Instruction: Based on the context, follow "Format example", write content.
  16322. # Context
  16323. ## 要求
  16324. ${msg3}
  16325.  
  16326. ## 参考资料
  16327. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16328. # 输出格式与要求
  16329. 核心素养:从教案中提取
  16330. 目标:从教案中提取
  16331. 评价标准:从教案中提取评价标准
  16332. # Format example
  16333. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16334. if(!this.taskGLoading[_task]){
  16335. this.taskGLoading[_task] = []
  16336. }
  16337. this.taskGLoading[_task][0] = true
  16338. this.taskGLoading[_task][1] = true
  16339. this.taskGLoading[_task][2] = true
  16340. this.aiGetG321(message1, _task)
  16341. this.aiGetG322(message2, _task)
  16342. this.aiGetG323(message3, _task)
  16343. }
  16344. }else{
  16345. let message1 = `NOTICE
  16346. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16347. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16348. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16349. Instruction: Based on the context, follow "Format example", write content.
  16350. # Context
  16351. ## 要求
  16352. ${msg}
  16353.  
  16354. ## 参考资料
  16355. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16356. # 输出格式与要求
  16357. 任务描述(告诉学生他们需要做什么):
  16358. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16359. # 范例
  16360. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16361. # Format example
  16362. { "detail":"任务描述" }`
  16363. let message2 = `NOTICE
  16364. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16365. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16366. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16367. Instruction: Based on the context, follow "Format example", write content.
  16368. # Context
  16369. ## 要求
  16370. ${msg2}
  16371.  
  16372. ## 参考资料
  16373. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16374. # 输出格式与要求
  16375. 互动工具列表
  16376. 工具名:表格
  16377. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16378. 工具名:文档
  16379. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16380. 工具名称:选择题
  16381. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16382. # Format example
  16383. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16384. let message3 = `NOTICE
  16385. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16386. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16387. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16388. Instruction: Based on the context, follow "Format example", write content.
  16389. # Context
  16390. ## 要求
  16391. ${msg3}
  16392.  
  16393. ## 参考资料
  16394. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16395. # 输出格式与要求
  16396. 核心素养:从教案中提取
  16397. 目标:从教案中提取
  16398. 评价标准:从教案中提取评价标准
  16399. # Format example
  16400. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16401. if(!this.taskGLoading[this.aiCallBack[0]]){
  16402. this.taskGLoading[this.aiCallBack[0]] = []
  16403. }
  16404. this.taskGLoading[this.aiCallBack[0]][0] = true
  16405. this.taskGLoading[this.aiCallBack[0]][1] = true
  16406. this.taskGLoading[this.aiCallBack[0]][2] = true
  16407. this.aiGetG321(message1, this.aiCallBack[0])
  16408. this.aiGetG322(message2, this.aiCallBack[0])
  16409. this.aiGetG323(message3, this.aiCallBack[0])
  16410. }
  16411. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16412. } else if (this.aitype == "aiDetail1") {
  16413. this.aiDetail(msg, this.aiIndex)
  16414. } else if (this.aitype == "aiDetail2") {
  16415. this.aiDetail2(msg, this.aiIndex)
  16416. } else if (this.aitype == "aiDetail3") {
  16417. let _index = this.aiIndex.split('-')
  16418. this.aiDetail3(msg, _index[0], _index[1])
  16419. } else if (this.aitype == "aiDetail4") {
  16420. this.aiDetail4(msg, this.aiIndex)
  16421. } else if (this.aitype == "teacherDetail") {
  16422. this.aiDetail5(msg, this.aiIndex)
  16423. } else if (this.aitype == "teacherDetail2") {
  16424. this.aiDetail52(msg, this.aiIndex)
  16425. } else if (this.aitype == "aiCpote1") {
  16426. this.aiCpote(msg, this.aiCallBack)
  16427. } else if (this.aitype == "aiCpote2") {
  16428. this.aiCpote(msg, this.aiCallBack)
  16429. } else if (this.aitype == "aiCpote3") {
  16430. this.aiCpote(msg, this.aiCallBack)
  16431. } else if (this.aitype == "aiCpote4") {
  16432. this.aiCpote(msg, this.aiCallBack)
  16433. } else if (this.aitype == "aiTeacher") {
  16434. this.loading = true
  16435. var _text = ""
  16436. for (var i = 0; i < this.dArray.length; i++) {
  16437. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16438. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16439. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16440. let message = ` NOTICE
  16441. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16442. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16443. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16444. Instruction: Based on the context, follow "Format example", write content.
  16445. # Context
  16446. ## 要求
  16447. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  16448. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  16449. ${(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','') : ''}
  16450. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16451. ## Format example
  16452. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  16453. this.aiGet4(message, () => {
  16454. this.loading = false
  16455. this.isOutline2 = true
  16456. })
  16457. } else if (this.aitype == "aiTeacher2"){
  16458. this.isOutline2 = true
  16459. setTimeout(()=>{
  16460. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16461. this.aiDetail52(msg, i)
  16462. }
  16463. }, 0)
  16464. } else if (this.aitype == "aiTeacher3"){
  16465. this.loading = true
  16466. let message = `NOTICE
  16467. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16468. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16469. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16470. Instruction: Based on the context, follow "Format example", write content.
  16471. # Context
  16472. ## 要求
  16473. ${msg} 以及##参考资料
  16474. ## 参考资料
  16475. 任务簇:${this.cpote.cpote4}
  16476. # Format example
  16477. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  16478. this.aiGetTask3(message, () => {
  16479. this.loading = false
  16480. this.isOutline2 = true
  16481. })
  16482. } else if (this.aitype == "aiteacherTextDetail") {
  16483. this.aiteacherTextDetail(msg)
  16484. } else if (this.aitype == "aitargetTextDetail") {
  16485. this.aitargetTextDetail(msg)
  16486. } else if (this.aitype == "aitargetTextDetail2") {
  16487. this.aitargetTextDetail2(msg)
  16488. } else if (this.aitype == "aitargetTextDetail3") {
  16489. this.aitargetTextDetail3(msg)
  16490. } else if (this.aitype == 'aiSearchFile'){
  16491. let messages = `NOTICE
  16492. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16493. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16494. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16495. Instruction: Based on the context, follow "Format example", write content.
  16496. ## 参考资料
  16497. 关键词:${this.courseName}
  16498. # Context
  16499. ## 要求
  16500. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  16501. # Format example
  16502. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  16503. this.fileSLoading = true
  16504. this.aiSearchFile(messages,()=>{
  16505. this.fileSLoading = false
  16506. })
  16507. } else if (this.aitype == 'aiRateRule'){
  16508. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  16509. } else if (this.aitype == 'aiRateRuleA'){
  16510. if(this.aiCallBack[0] == 1){
  16511. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16512. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16513. for(var k = 0; k < task.eList.length; k++){
  16514. if(!task.eList[k].rule){
  16515. this.againEva(msg, i, k)
  16516. }
  16517. }
  16518. }
  16519. }else if(this.aiCallBack[0] == 2){
  16520. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  16521. for(var k = 0; k < task.eList.length; k++){
  16522. if(!task.eList[k].rule){
  16523. this.againEva(msg, this.aiCallBack[1], k)
  16524. }
  16525. }
  16526. }
  16527. }
  16528. this.setAiJson(this.aitype, msg, msg2, msg3)
  16529. },
  16530. detailYou(message) {
  16531. this.textLoading = true
  16532. this.ttextLoading = true
  16533. let sub = []
  16534. if (this.courseTypeId.length) {
  16535. for (var i = 0; i < this.courseTypeId.length; i++) {
  16536. let _sid = this.courseTypeId[i]
  16537. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16538. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16539. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16540. }
  16541. }
  16542. }
  16543. }
  16544. let mclass = []
  16545. if (this.courseTypeId.length) {
  16546. for (var i = 0; i < this.courseTypeId.length; i++) {
  16547. let _sid = this.courseTypeId[i]
  16548. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16549. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16550. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16551. }
  16552. }
  16553. }
  16554. }
  16555. let url = []
  16556. if (this.infoData.length) {
  16557. for (var i = 0; i < this.infoData.length; i++) {
  16558. url.push(this.infoData[i].url)
  16559. }
  16560. }
  16561. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16562. // --------
  16563. // ## 补充参考资料
  16564. // 补充资料:${url.join(",")}
  16565. // 补充描述:${this.courseText2} ##补充参考资料和
  16566. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16567. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16568. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16569. let msg = `NOTICE
  16570. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16571. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  16572. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16573. Instruction: Based on the context, follow "Format example", write content.
  16574. #Context
  16575. ## 参考资料
  16576. 课程名字:${this.courseName}
  16577. ${sub.length ? '学科:' + sub.join(",") : ''}
  16578. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16579. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  16580. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  16581. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  16582. ## 要求
  16583. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  16584. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  16585. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  16586. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  16587. this.aiGet(msg)
  16588. },
  16589. setUnitJson() {
  16590. 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 }] }
  16591. this.$forceUpdate()
  16592. },
  16593. async aiGet(messages) {
  16594. let _this = this
  16595. let fileid = []
  16596. if(!this.yiKeTemplateArray.includes(this.templateid)){
  16597. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  16598. if(_this.cankaoInfoData[i].fileid){
  16599. fileid.push(_this.cankaoInfoData[i].fileid)
  16600. }else {
  16601. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  16602. if(_fileid){
  16603. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  16604. _this.$forceUpdate();
  16605. if(_fileid != 1){
  16606. fileid.push(_fileid)
  16607. }
  16608. }
  16609. }
  16610. }
  16611. if(this.mode == 1){
  16612. for (var i = 0; i < _this.infoData.length; i++) {
  16613. if(_this.infoData[i].fileid){
  16614. fileid.push(_this.infoData[i].fileid)
  16615. }else {
  16616. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16617. if(_fileid){
  16618. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16619. _this.$forceUpdate();
  16620. if(_fileid != 1){
  16621. fileid.push(_fileid)
  16622. }
  16623. }
  16624. }
  16625. }
  16626. }
  16627. } else {
  16628. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16629. if (_this.infoData.length) {
  16630. for (var i = 0; i < _this.infoData.length; i++) {
  16631. if(_this.infoData[i].fileid){
  16632. fileid.push(_this.infoData[i].fileid)
  16633. }else {
  16634. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16635. if(_fileid){
  16636. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16637. _this.$forceUpdate();
  16638. if(_fileid != 1){
  16639. fileid.push(_fileid)
  16640. }
  16641. }
  16642. }
  16643. }
  16644. }
  16645. }
  16646. _this.isTextCancelToken = _this.ajax.setCancelSource();
  16647. let _uuid = uuidv4();
  16648. // let params = JSON.stringify({
  16649. // // "model": "Chat",
  16650. // model: 'gpt-3.5-turbo',
  16651. // temperature: 0.1,
  16652. // max_tokens: 4096,
  16653. // top_p: 1,
  16654. // frequency_penalty: 0,
  16655. // presence_penalty: 0,
  16656. // messages: [{
  16657. // content: messages,
  16658. // role: 'user'
  16659. // }],
  16660. // uid: _uuid,
  16661. // mind_map_question: "",
  16662. // })
  16663. let params = {
  16664. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16665. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16666. session_name: _uuid,
  16667. userId: _this.userid,
  16668. uid: _uuid,
  16669. file_ids: fileid.length ? [...fileid] : '',
  16670. model: 'gpt-4o-2024-08-06',
  16671. temperature: 0.1,
  16672. }
  16673. // let params = JSON.stringify({
  16674. // message: {
  16675. // anthropic_version: "bedrock-2023-05-31",
  16676. // max_tokens: 4096,
  16677. // temperature: 0.1,
  16678. // top_p: 1,
  16679. // messages: [{
  16680. // "role": "user",
  16681. // "content": messages
  16682. // }] ,
  16683. // },
  16684. // uid: _uuid,
  16685. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16686. // });
  16687. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16688. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  16689. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16690. console.log(response);
  16691. // let data = response.data.FunctionResponse
  16692. // if (data.choices && data.choices.length && data.choices[0].message) {
  16693. // _this.courseText = data.choices[0].message.content
  16694. // }
  16695. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16696. } else {
  16697. _this.$message.warning(response.data.FunctionResponse.result);
  16698. }
  16699. _this.isTextCancelToken = null
  16700. }).catch(function (error) {
  16701. _this.textLoading = false
  16702. _this.ttextLoading = false
  16703. _this.isTextCancelToken = null
  16704. if(error && error.message != 'Request canceled by the user.'){
  16705. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  16706. }
  16707. console.log(error);
  16708. });
  16709. await _this.aiGetgetAiContent(_uuid)
  16710. },
  16711. aiGetgetAiContent(_uid) {
  16712. try {
  16713. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16714. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16715. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16716. } catch(error){
  16717. console.log('EventSource error:', error);
  16718. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  16719. this.textLoading = false
  16720. this.ttextLoading = false
  16721. this.isTextCancelToken = null
  16722. return;
  16723. }
  16724. let _allText = "";
  16725. let _mdText = "";
  16726. let _iindex = 0
  16727. this.isTextCancelSource.onmessage = _e => {
  16728. let _eData = JSON.parse(_e.data).content;
  16729. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16730. //对话已经完成
  16731. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  16732. this.isTextCancelSource.close();
  16733. this.isTextCancelSource = null;
  16734. this.courseText = _mdText;
  16735. this.textLoading = false
  16736. this.ttextLoading = false
  16737. this.courseTextB = false
  16738. this.isTextCancelToken = null
  16739. return;
  16740. } else {
  16741. _iindex++
  16742. //对话还在继续
  16743. let _text = "";
  16744. _text = _eData.replaceAll("'", "");
  16745. if (_allText == "") {
  16746. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16747. } else {
  16748. _allText += _text;
  16749. }
  16750. _mdText = _allText + "_";
  16751. _mdText = _mdText.replace(/\\n/g, "\n");
  16752. _mdText = _mdText.replace(/\\/g, "");
  16753. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16754. //转化返回的回复流数据
  16755. if(_iindex == 10){
  16756. this.courseText = _mdText;
  16757. _iindex = 0
  16758. }
  16759. this.textLoading = false
  16760. // 处理流数据
  16761. }
  16762. // this.$forceUpdate();
  16763. };
  16764. let _this = this
  16765. this.isTextCancelSource.onerror = function(event) {
  16766. // 处理错误,可以尝试重新连接
  16767. console.log('EventSource error:', event);
  16768. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  16769. _this.textLoading = false
  16770. _this.ttextLoading = false
  16771. _this.isTextCancelToken = null
  16772. _this.isTextCancelSource.close();
  16773. _this.isTextCancelSource = null;
  16774. };
  16775. },
  16776. numberToChinese(number) {
  16777. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  16778. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  16779. let result = '';
  16780. let num = parseInt(number, 10);
  16781. let i = 0;
  16782. while (num > 0) {
  16783. result = chineseNum[num % 10] + chineseUnit[i] + result;
  16784. num = Math.floor(num / 10);
  16785. i++;
  16786. }
  16787. // 去除连续的零,保留一个零
  16788. result = result.replace(/零+/g, '零');
  16789. return result;
  16790. },
  16791. async aiGet2(messages, callback) {
  16792. let _this = this
  16793. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16794. if (_this.infoData.length) {
  16795. for (var i = 0; i < _this.infoData.length; i++) {
  16796. if(_this.infoData[i].fileid){
  16797. fileid.push(_this.infoData[i].fileid)
  16798. }else {
  16799. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16800. if(_fileid){
  16801. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16802. _this.$forceUpdate();
  16803. if(_fileid != 1){
  16804. fileid.push(_fileid)
  16805. }
  16806. }
  16807. }
  16808. }
  16809. }
  16810. console.log('fileid=========',fileid)
  16811. // let params = JSON.stringify({
  16812. // // "model": "Chat",
  16813. // model: 'gpt-3.5-turbo',
  16814. // temperature: 0.1,
  16815. // max_tokens: 4096,
  16816. // top_p: 1,
  16817. // frequency_penalty: 0,
  16818. // presence_penalty: 0,
  16819. // messages: [{
  16820. // content: messages,
  16821. // role: 'user'
  16822. // }],
  16823. // stream: false,
  16824. // uid: this.userid,
  16825. // mind_map_question: "",
  16826. // })
  16827. // // let params = JSON.stringify({
  16828. // // message: {
  16829. // // anthropic_version: "bedrock-2023-05-31",
  16830. // // max_tokens: 4096,
  16831. // // temperature: 0.1,
  16832. // // top_p: 1,
  16833. // // messages: [{
  16834. // // content: messages,
  16835. // // role: 'user'
  16836. // // }], //
  16837. // // },
  16838. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16839. // // });
  16840. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16841. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16842. // console.log(response);
  16843. // let data = response.data.FunctionResponse
  16844. // if (data.choices && data.choices.length && data.choices[0].message) {
  16845. // console.log(data.choices[0].message.content);
  16846. // let dArray = JSON.parse(data.choices[0].message.content)
  16847. // _this.dArray = dArray
  16848. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16849. // for (var i = 0; i < dArray.length; i++) {
  16850. // let _task = dArray[i]
  16851. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16852. // task: _task.task,
  16853. // taskDetail: "",
  16854. // taskDetail2: _task.detail,
  16855. // taskDetail3: "",
  16856. // chapterData: [],
  16857. // toolText: "",
  16858. // toolChoose: [
  16859. // {
  16860. // tool: [],
  16861. // toolDetail: "",
  16862. // toolType: 0,
  16863. // askCount: 1,
  16864. // askTitle: "",
  16865. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16866. // },
  16867. // ],
  16868. // isShowTools: false,
  16869. // askCount: 1,
  16870. // isFold: 0,
  16871. // askTitle: "",
  16872. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16873. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16874. // homeworkList: [],
  16875. // })
  16876. // }
  16877. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16878. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16879. // _this.$forceUpdate();
  16880. // }
  16881. // // if (data.result) {
  16882. // // console.log(data.result);
  16883. // // let dArray = JSON.parse(data.result)
  16884. // // _this.dArray = dArray
  16885. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16886. // // for (var i = 0; i < dArray.length; i++) {
  16887. // // let _task = dArray[i]
  16888. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16889. // // task: _task.task,
  16890. // // taskDetail: "",
  16891. // // taskDetail2: _task.detail,
  16892. // // taskDetail3: "",
  16893. // // chapterData: [],
  16894. // // toolText: "",
  16895. // // toolChoose: [
  16896. // // {
  16897. // // tool: [],
  16898. // // toolDetail: "",
  16899. // // toolType: 0,
  16900. // // askCount: 1,
  16901. // // askTitle: "",
  16902. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16903. // // },
  16904. // // ],
  16905. // // isShowTools: false,
  16906. // // askCount: 1,
  16907. // // isFold: 1,
  16908. // // askTitle: "",
  16909. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16910. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16911. // // homeworkList: [],
  16912. // // })
  16913. // // }
  16914. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16915. // // _this.$forceUpdate();
  16916. // // }
  16917. // callback ? callback() : ''
  16918. // }).catch(function (error) {
  16919. // _this.loading = false
  16920. // console.log(error);
  16921. // });
  16922. this.isOutlineCancelToken = this.ajax.setCancelSource();
  16923. let parm = {
  16924. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16925. message: [{"type":"text", "text":messages}],
  16926. session_name: uuidv4(),
  16927. userId: this.userid,
  16928. file_ids: fileid.length ? [...fileid] : '',
  16929. model: 'gpt-4o-2024-08-06',
  16930. temperature: 0.1,
  16931. }
  16932. this.ajax
  16933. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  16934. .then((response) => {
  16935. console.log(response);
  16936. let data = response.data.FunctionResponse
  16937. if (data.message) {
  16938. console.log(data.message);
  16939. let dArray = {}
  16940. try {
  16941. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16942. } catch (error) {
  16943. console.log("error_________________" + error);
  16944. try {
  16945. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16946. let match = data.message.match(regex);
  16947. dArray = JSON.parse(match[0]);
  16948. // var message = data.message;
  16949. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16950. // var jsonEnd = message.indexOf("```", jsonStart);
  16951. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16952. // dArray = JSON.parse(jsonString);
  16953. } catch (error) {
  16954. try {
  16955. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16956. let match = data.message.match(regex);
  16957. // eval("var aaa = " + match[0])
  16958. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  16959. } catch (error) {
  16960. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16961. _this.aiGet2(messages, callback);
  16962. console.log("error_________________" + error);
  16963. }
  16964. console.log("error_________________" + error);
  16965. }
  16966. }
  16967. _this.dArray = dArray
  16968. console.log(dArray)
  16969. if(_this.panOutline() > 0){
  16970. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16971. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16972. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16973. }
  16974. for (var i = 0; i < dArray.length; i++) {
  16975. let _task = dArray[i]
  16976. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16977. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  16978. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  16979. }else {
  16980. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16981. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  16982. taskDetail: "",
  16983. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  16984. taskDetail3: "",
  16985. chapterData: [],
  16986. toolText: "",
  16987. toolChoose: [
  16988. {
  16989. tool: [],
  16990. toolDetail: "",
  16991. toolType: 0,
  16992. askCount: 1,
  16993. askTitle: "",
  16994. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16995. },
  16996. ],
  16997. isShowTools: false,
  16998. askCount: 1,
  16999. isFold: 0,
  17000. askTitle: "",
  17001. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17002. checkJson: [{ checkCount: [], checkPerent: [] }],
  17003. homeworkList: [],
  17004. })
  17005. }
  17006. }
  17007. }else {
  17008. _this.unitJson[0].chapterInfo[0].taskJson = []
  17009. for (var i = 0; i < dArray.length; i++) {
  17010. let _task = dArray[i]
  17011. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17012. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17013. taskDetail: "",
  17014. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17015. taskDetail3: "",
  17016. chapterData: [],
  17017. toolText: "",
  17018. toolChoose: [
  17019. {
  17020. tool: [],
  17021. toolDetail: "",
  17022. toolType: 0,
  17023. askCount: 1,
  17024. askTitle: "",
  17025. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17026. },
  17027. ],
  17028. isShowTools: false,
  17029. askCount: 1,
  17030. isFold: 0,
  17031. askTitle: "",
  17032. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17033. checkJson: [{ checkCount: [], checkPerent: [] }],
  17034. homeworkList: [],
  17035. })
  17036. }
  17037. }
  17038. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17039. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17040. _this.$forceUpdate();
  17041. }
  17042. callback ? callback() : ''
  17043. _this.isOutlineCancelToken = null
  17044. })
  17045. .catch((error) => {
  17046. _this.loading = false
  17047. _this.isOutlineCancelToken = null
  17048. console.log(error);
  17049. });
  17050. },
  17051. cancelAjax(type, index){
  17052. if (this.isOutlineCancelToken && type == 'outline') {
  17053. this.$message.success("已经成功停止生成课程大纲")
  17054. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  17055. this.isOutlineCancelToken = null;
  17056. this.loading = false
  17057. }
  17058. if (this.isFileCancelToken && type == 'file') {
  17059. this.$message.success("已经成功停止智能生成检索资料")
  17060. this.isFileCancelToken.cancel('Request canceled by the user.');
  17061. this.isFileCancelToken = null;
  17062. this.fileSLoading = false
  17063. }
  17064. if(this.isTextCancelToken && type == 'text'){
  17065. this.$message.success("已经成功停止AI优化")
  17066. this.isTextCancelToken.cancel('Request canceled by the user.');
  17067. this.isTextCancelToken = null;
  17068. this.textLoading = false
  17069. this.ttextLoading = true
  17070. if(this.isTextCancelSource){
  17071. this.isTextCancelSource.close()
  17072. this.isTextCancelSource = null
  17073. }
  17074. }
  17075. if(this.isTargetCancelToken2 && type == 'target2'){
  17076. this.$message.success("已经成功停止生成目标")
  17077. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  17078. this.isTargetCancelToken2 = null;
  17079. this.targetTextLoading2 = false
  17080. this.ttargetTextLoading2 = false
  17081. if(this.isTargetCancelSource2){
  17082. this.isTargetCancelSource2.close()
  17083. this.isTargetCancelSource2 = null
  17084. }
  17085. }
  17086. if(this.isTargetCancelToken1 && type == 'target1'){
  17087. this.$message.success("已经成功停止生成目标")
  17088. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  17089. this.isTargetCancelToken1 = null;
  17090. this.targetTextLoading = false
  17091. this.ttargetTextLoading = false
  17092. if(this.isTargetCancelSource1){
  17093. this.isTargetCancelSource1.close()
  17094. this.isTargetCancelSource1 = null
  17095. }
  17096. }
  17097. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  17098. this.$message.success("已经成功停止提取摘要")
  17099. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  17100. this.isTeacherTextCancelToken = null;
  17101. this.teacherTextLoading = false
  17102. this.tteacherTextLoading = false
  17103. if(this.isTeacherTextCancelSource){
  17104. this.isTeacherTextCancelSource.close()
  17105. this.isTeacherTextCancelSource = null
  17106. }
  17107. }
  17108. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  17109. this.$message.success("已经成功停止生成教案")
  17110. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  17111. this.isTeacherTaskCancelToken = null;
  17112. this.loading = false
  17113. }
  17114. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  17115. this.$message.success("已经成功停止生成大纲")
  17116. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  17117. this.isOutlineTaskCancelToken[index] = null;
  17118. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  17119. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  17120. if(this.isOutlineTaskCancelSource[index]){
  17121. this.isOutlineTaskCancelSource[index].close()
  17122. this.isOutlineTaskCancelSource[index] = null
  17123. }
  17124. }
  17125. },
  17126. async aiGetTask2(messages, callback) {
  17127. let _this = this
  17128. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17129. if (_this.infoData.length) {
  17130. for (var i = 0; i < _this.infoData.length; i++) {
  17131. if(_this.infoData[i].fileid){
  17132. fileid.push(_this.infoData[i].fileid)
  17133. }else {
  17134. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17135. if(_fileid){
  17136. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17137. _this.$forceUpdate();
  17138. if(_fileid != 1){
  17139. fileid.push(_fileid)
  17140. }
  17141. }
  17142. }
  17143. }
  17144. }
  17145. console.log('fileid=========',fileid)
  17146. // let params = JSON.stringify({
  17147. // // "model": "Chat",
  17148. // model: 'gpt-3.5-turbo',
  17149. // temperature: 0.1,
  17150. // max_tokens: 4096,
  17151. // top_p: 1,
  17152. // frequency_penalty: 0,
  17153. // presence_penalty: 0,
  17154. // messages: [{
  17155. // content: messages,
  17156. // role: 'user'
  17157. // }],
  17158. // stream: false,
  17159. // uid: this.userid,
  17160. // mind_map_question: "",
  17161. // })
  17162. // // let params = JSON.stringify({
  17163. // // message: {
  17164. // // anthropic_version: "bedrock-2023-05-31",
  17165. // // max_tokens: 4096,
  17166. // // temperature: 0.1,
  17167. // // top_p: 1,
  17168. // // messages: [{
  17169. // // content: messages,
  17170. // // role: 'user'
  17171. // // }], //
  17172. // // },
  17173. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17174. // // });
  17175. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17176. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17177. // console.log(response);
  17178. // let data = response.data.FunctionResponse
  17179. // if (data.choices && data.choices.length && data.choices[0].message) {
  17180. // console.log(data.choices[0].message.content);
  17181. // let dArray = JSON.parse(data.choices[0].message.content)
  17182. // _this.dArray = dArray
  17183. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17184. // for (var i = 0; i < dArray.length; i++) {
  17185. // let _task = dArray[i]
  17186. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17187. // task: _task.task,
  17188. // taskDetail: "",
  17189. // taskDetail2: _task.detail,
  17190. // taskDetail3: "",
  17191. // chapterData: [],
  17192. // toolText: "",
  17193. // toolChoose: [
  17194. // {
  17195. // tool: [],
  17196. // toolDetail: "",
  17197. // toolType: 0,
  17198. // askCount: 1,
  17199. // askTitle: "",
  17200. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17201. // },
  17202. // ],
  17203. // isShowTools: false,
  17204. // askCount: 1,
  17205. // isFold: 0,
  17206. // askTitle: "",
  17207. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17208. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17209. // homeworkList: [],
  17210. // })
  17211. // }
  17212. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17213. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17214. // _this.$forceUpdate();
  17215. // }
  17216. // // if (data.result) {
  17217. // // console.log(data.result);
  17218. // // let dArray = JSON.parse(data.result)
  17219. // // _this.dArray = dArray
  17220. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17221. // // for (var i = 0; i < dArray.length; i++) {
  17222. // // let _task = dArray[i]
  17223. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17224. // // task: _task.task,
  17225. // // taskDetail: "",
  17226. // // taskDetail2: _task.detail,
  17227. // // taskDetail3: "",
  17228. // // chapterData: [],
  17229. // // toolText: "",
  17230. // // toolChoose: [
  17231. // // {
  17232. // // tool: [],
  17233. // // toolDetail: "",
  17234. // // toolType: 0,
  17235. // // askCount: 1,
  17236. // // askTitle: "",
  17237. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17238. // // },
  17239. // // ],
  17240. // // isShowTools: false,
  17241. // // askCount: 1,
  17242. // // isFold: 1,
  17243. // // askTitle: "",
  17244. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17245. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17246. // // homeworkList: [],
  17247. // // })
  17248. // // }
  17249. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17250. // // _this.$forceUpdate();
  17251. // // }
  17252. // callback ? callback() : ''
  17253. // }).catch(function (error) {
  17254. // _this.loading = false
  17255. // console.log(error);
  17256. // });
  17257. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17258. let parm = {
  17259. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17260. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17261. session_name: uuidv4(),
  17262. userId: this.userid,
  17263. file_ids: fileid.length ? [...fileid] : '',
  17264. model: 'gpt-4o-2024-08-06',
  17265. temperature: 0.1,
  17266. }
  17267. this.ajax
  17268. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17269. .then((response) => {
  17270. console.log(response);
  17271. let data = response.data.FunctionResponse
  17272. if (data.message) {
  17273. console.log(data.message);
  17274. let dArray = {}
  17275. try {
  17276. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17277. } catch (error) {
  17278. console.log("error_________________" + error);
  17279. try {
  17280. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17281. let match = data.message.match(regex);
  17282. dArray = JSON.parse(match[0]);
  17283. // var message = data.message;
  17284. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17285. // var jsonEnd = message.indexOf("```", jsonStart);
  17286. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17287. // dArray = JSON.parse(jsonString);
  17288. } catch (error) {
  17289. try {
  17290. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17291. let match = data.message.match(regex);
  17292. // eval("var aaa = " + match[0])
  17293. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17294. } catch (error) {
  17295. console.log("error_________________" + error);
  17296. }
  17297. console.log("error_________________" + error);
  17298. }
  17299. }
  17300. _this.dArray = dArray
  17301. if(_this.panOutline() > 0){
  17302. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17303. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17304. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17305. }
  17306. for (var i = 0; i < dArray.length; i++) {
  17307. let _task = dArray[i]
  17308. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17309. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17310. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17311. }else {
  17312. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17313. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17314. taskDetail: "",
  17315. taskDetail2: "",
  17316. taskDetail3: "",
  17317. chapterData: [],
  17318. toolText: "",
  17319. toolChoose: [
  17320. {
  17321. tool: [],
  17322. toolDetail: "",
  17323. toolType: 0,
  17324. askCount: 1,
  17325. askTitle: "",
  17326. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17327. },
  17328. ],
  17329. isShowTools: false,
  17330. askCount: 1,
  17331. isFold: 0,
  17332. askTitle: "",
  17333. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17334. checkJson: [{ checkCount: [], checkPerent: [] }],
  17335. homeworkList: [],
  17336. })
  17337. }
  17338. }
  17339. }else {
  17340. _this.unitJson[0].chapterInfo[0].taskJson = []
  17341. for (var i = 0; i < dArray.length; i++) {
  17342. let _task = dArray[i]
  17343. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17344. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17345. taskDetail: "",
  17346. taskDetail2: "",
  17347. taskDetail3: "",
  17348. chapterData: [],
  17349. toolText: "",
  17350. toolChoose: [
  17351. {
  17352. tool: [],
  17353. toolDetail: "",
  17354. toolType: 0,
  17355. askCount: 1,
  17356. askTitle: "",
  17357. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17358. },
  17359. ],
  17360. isShowTools: false,
  17361. askCount: 1,
  17362. isFold: 0,
  17363. askTitle: "",
  17364. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17365. checkJson: [{ checkCount: [], checkPerent: [] }],
  17366. homeworkList: [],
  17367. })
  17368. }
  17369. }
  17370. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17371. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17372. _this.$forceUpdate();
  17373. setTimeout(()=>{
  17374. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17375. this.aiOutlineDetail('', i)
  17376. }
  17377. }, 0)
  17378. }
  17379. callback ? callback() : ''
  17380. _this.isOutlineCancelToken = null
  17381. })
  17382. .catch((error) => {
  17383. _this.loading = false
  17384. _this.isOutlineCancelToken = null
  17385. console.log(error);
  17386. });
  17387. },
  17388. async aiGetTask3(messages, callback) {
  17389. let _this = this
  17390. // let params = JSON.stringify({
  17391. // // "model": "Chat",
  17392. // model: 'gpt-3.5-turbo',
  17393. // temperature: 0.1,
  17394. // max_tokens: 4096,
  17395. // top_p: 1,
  17396. // frequency_penalty: 0,
  17397. // presence_penalty: 0,
  17398. // messages: [{
  17399. // content: messages,
  17400. // role: 'user'
  17401. // }],
  17402. // stream: false,
  17403. // uid: this.userid,
  17404. // mind_map_question: "",
  17405. // })
  17406. // // let params = JSON.stringify({
  17407. // // message: {
  17408. // // anthropic_version: "bedrock-2023-05-31",
  17409. // // max_tokens: 4096,
  17410. // // temperature: 0.1,
  17411. // // top_p: 1,
  17412. // // messages: [{
  17413. // // content: messages,
  17414. // // role: 'user'
  17415. // // }], //
  17416. // // },
  17417. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17418. // // });
  17419. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17420. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17421. // console.log(response);
  17422. // let data = response.data.FunctionResponse
  17423. // if (data.choices && data.choices.length && data.choices[0].message) {
  17424. // console.log(data.choices[0].message.content);
  17425. // let dArray = JSON.parse(data.choices[0].message.content)
  17426. // _this.dArray = dArray
  17427. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17428. // for (var i = 0; i < dArray.length; i++) {
  17429. // let _task = dArray[i]
  17430. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17431. // task: _task.task,
  17432. // taskDetail: "",
  17433. // taskDetail2: _task.detail,
  17434. // taskDetail3: "",
  17435. // chapterData: [],
  17436. // toolText: "",
  17437. // toolChoose: [
  17438. // {
  17439. // tool: [],
  17440. // toolDetail: "",
  17441. // toolType: 0,
  17442. // askCount: 1,
  17443. // askTitle: "",
  17444. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17445. // },
  17446. // ],
  17447. // isShowTools: false,
  17448. // askCount: 1,
  17449. // isFold: 0,
  17450. // askTitle: "",
  17451. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17452. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17453. // homeworkList: [],
  17454. // })
  17455. // }
  17456. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17457. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17458. // _this.$forceUpdate();
  17459. // }
  17460. // // if (data.result) {
  17461. // // console.log(data.result);
  17462. // // let dArray = JSON.parse(data.result)
  17463. // // _this.dArray = dArray
  17464. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17465. // // for (var i = 0; i < dArray.length; i++) {
  17466. // // let _task = dArray[i]
  17467. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17468. // // task: _task.task,
  17469. // // taskDetail: "",
  17470. // // taskDetail2: _task.detail,
  17471. // // taskDetail3: "",
  17472. // // chapterData: [],
  17473. // // toolText: "",
  17474. // // toolChoose: [
  17475. // // {
  17476. // // tool: [],
  17477. // // toolDetail: "",
  17478. // // toolType: 0,
  17479. // // askCount: 1,
  17480. // // askTitle: "",
  17481. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17482. // // },
  17483. // // ],
  17484. // // isShowTools: false,
  17485. // // askCount: 1,
  17486. // // isFold: 1,
  17487. // // askTitle: "",
  17488. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17489. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17490. // // homeworkList: [],
  17491. // // })
  17492. // // }
  17493. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17494. // // _this.$forceUpdate();
  17495. // // }
  17496. // callback ? callback() : ''
  17497. // }).catch(function (error) {
  17498. // _this.loading = false
  17499. // console.log(error);
  17500. // });
  17501. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  17502. let parm = {
  17503. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17504. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17505. session_name: uuidv4(),
  17506. userId: this.userid,
  17507. file_ids: '',
  17508. model: 'gpt-4o-2024-08-06',
  17509. temperature: 0.1,
  17510. }
  17511. this.ajax
  17512. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  17513. .then((response) => {
  17514. console.log(response);
  17515. let data = response.data.FunctionResponse
  17516. if (data.message) {
  17517. console.log(data.message);
  17518. let dArray = {}
  17519. try {
  17520. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17521. } catch (error) {
  17522. console.log("error_________________" + error);
  17523. try {
  17524. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17525. let match = data.message.match(regex);
  17526. dArray = JSON.parse(match[0]);
  17527. // var message = data.message;
  17528. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17529. // var jsonEnd = message.indexOf("```", jsonStart);
  17530. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17531. // dArray = JSON.parse(jsonString);
  17532. } catch (error) {
  17533. try {
  17534. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17535. let match = data.message.match(regex);
  17536. // eval("var aaa = " + match[0])
  17537. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17538. } catch (error) {
  17539. console.log("error_________________" + error);
  17540. }
  17541. console.log("error_________________" + error);
  17542. }
  17543. }
  17544. _this.dArray = dArray
  17545. if(_this.panOutline() > 0){
  17546. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17547. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17548. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17549. }
  17550. for (var i = 0; i < dArray.length; i++) {
  17551. let _task = dArray[i]
  17552. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17553. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17554. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17555. }else {
  17556. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17557. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17558. taskDetail: "",
  17559. taskDetail2: "",
  17560. taskDetail3: "",
  17561. chapterData: [],
  17562. toolText: "",
  17563. toolChoose: [
  17564. {
  17565. tool: [],
  17566. toolDetail: "",
  17567. toolType: 0,
  17568. askCount: 1,
  17569. askTitle: "",
  17570. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17571. },
  17572. ],
  17573. isShowTools: false,
  17574. askCount: 1,
  17575. isFold: 0,
  17576. askTitle: "",
  17577. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17578. checkJson: [{ checkCount: [], checkPerent: [] }],
  17579. homeworkList: [],
  17580. })
  17581. }
  17582. }
  17583. }else {
  17584. _this.unitJson[0].chapterInfo[0].taskJson = []
  17585. for (var i = 0; i < dArray.length; i++) {
  17586. let _task = dArray[i]
  17587. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17588. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17589. taskDetail: "",
  17590. taskDetail2: "",
  17591. taskDetail3: "",
  17592. chapterData: [],
  17593. toolText: "",
  17594. toolChoose: [
  17595. {
  17596. tool: [],
  17597. toolDetail: "",
  17598. toolType: 0,
  17599. askCount: 1,
  17600. askTitle: "",
  17601. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17602. },
  17603. ],
  17604. isShowTools: false,
  17605. askCount: 1,
  17606. isFold: 0,
  17607. askTitle: "",
  17608. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17609. checkJson: [{ checkCount: [], checkPerent: [] }],
  17610. homeworkList: [],
  17611. })
  17612. }
  17613. }
  17614. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17615. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17616. _this.$forceUpdate();
  17617. setTimeout(()=>{
  17618. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17619. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  17620. }
  17621. }, 0)
  17622. }
  17623. callback ? callback() : ''
  17624. _this.isTeacherTaskCancelToken = null
  17625. })
  17626. .catch((error) => {
  17627. _this.loading = false
  17628. _this.isTeacherTaskCancelToken = null
  17629. console.log(error);
  17630. });
  17631. },
  17632. async aiGet3(messages, callback) {
  17633. let _this = this
  17634. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17635. if (_this.infoData.length) {
  17636. for (var i = 0; i < _this.infoData.length; i++) {
  17637. if(_this.infoData[i].fileid){
  17638. fileid.push(_this.infoData[i].fileid)
  17639. }else {
  17640. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17641. if(_fileid){
  17642. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17643. _this.$forceUpdate();
  17644. if(_fileid != 1){
  17645. fileid.push(_fileid)
  17646. }
  17647. }
  17648. }
  17649. }
  17650. }
  17651. // let params = JSON.stringify({
  17652. // // "model": "Chat",
  17653. // model: 'gpt-3.5-turbo',
  17654. // temperature: 0.1,
  17655. // max_tokens: 4096,
  17656. // top_p: 1,
  17657. // frequency_penalty: 0,
  17658. // presence_penalty: 0,
  17659. // messages: [{
  17660. // content: messages,
  17661. // role: 'user'
  17662. // }],
  17663. // stream: false,
  17664. // uid: this.userid,
  17665. // mind_map_question: "",
  17666. // })
  17667. // // let params = JSON.stringify({
  17668. // // message: {
  17669. // // anthropic_version: "bedrock-2023-05-31",
  17670. // // max_tokens: 4096,
  17671. // // temperature: 0.1,
  17672. // // top_p: 1,
  17673. // // messages: [{
  17674. // // content: messages,
  17675. // // role: 'user'
  17676. // // }], //
  17677. // // },
  17678. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17679. // // });
  17680. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17681. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17682. // console.log(response);
  17683. // let data = response.data.FunctionResponse
  17684. // if (data.choices && data.choices.length && data.choices[0].message) {
  17685. // console.log(data.choices[0].message.content);
  17686. // let tArray = JSON.parse(data.choices[0].message.content)
  17687. // // _this.unitJson[0].chapterInfo[0].task = []
  17688. // let toolsJson = {
  17689. // "电子白板": { tool: 1, type: 1 },
  17690. // "文档": { tool: 52, type: 1 },
  17691. // "思维导图": { tool: 3, type: 1 },
  17692. // "表格": { tool: 48, type: 1 },
  17693. // "作业提交": { tool: 16, type: 2 }
  17694. // }
  17695. // for (var i = 0; i < tArray.length; i++) {
  17696. // let _task = tArray[i]
  17697. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17698. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17699. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17700. // if (_task.toolChoose.length) {
  17701. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17702. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17703. // {
  17704. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17705. // toolDetail: _task.toolChoose[j].detail,
  17706. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17707. // askCount: 1,
  17708. // askTitle: "",
  17709. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17710. // },
  17711. // )
  17712. // }
  17713. // } else {
  17714. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17715. // {
  17716. // tool: [],
  17717. // toolDetail: "",
  17718. // toolType: 0,
  17719. // askCount: 1,
  17720. // askTitle: "",
  17721. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17722. // },
  17723. // )
  17724. // }
  17725. // }
  17726. // // if (_this.infoData.length) {
  17727. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17728. // // }
  17729. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17730. // _this.$forceUpdate();
  17731. // }
  17732. // // if (data.result) {
  17733. // // console.log(data.result);
  17734. // // let tArray = JSON.parse(data.result)
  17735. // // // _this.unitJson[0].chapterInfo[0].task = []
  17736. // // let toolsJson = {
  17737. // // "电子白板": { tool: 1, type: 1 },
  17738. // // "文档": { tool: 52, type: 1 },
  17739. // // "思维导图": { tool: 3, type: 1 },
  17740. // // "表格": { tool: 48, type: 1 },
  17741. // // "作业提交": { tool: 16, type: 2 }
  17742. // // }
  17743. // // for (var i = 0; i < tArray.length; i++) {
  17744. // // let _task = tArray[i]
  17745. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17746. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17747. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17748. // // if (_task.toolChoose.length) {
  17749. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  17750. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17751. // // {
  17752. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17753. // // toolDetail: _task.toolChoose[j].detail,
  17754. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17755. // // askCount: 1,
  17756. // // askTitle: "",
  17757. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17758. // // },
  17759. // // )
  17760. // // }
  17761. // // } else {
  17762. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17763. // // {
  17764. // // tool: [],
  17765. // // toolDetail: "",
  17766. // // toolType: 0,
  17767. // // askCount: 1,
  17768. // // askTitle: "",
  17769. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17770. // // },
  17771. // // )
  17772. // // }
  17773. // // }
  17774. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17775. // // _this.$forceUpdate();
  17776. // // }
  17777. // callback ? callback() : ''
  17778. // }).catch(function (error) {
  17779. // _this.loading = false
  17780. // console.log(error);
  17781. // });
  17782. let parm = {
  17783. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17784. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17785. session_name: uuidv4(),
  17786. userId: this.userid,
  17787. file_ids: fileid.length ? [...fileid] : '',
  17788. model: 'gpt-4o-2024-08-06',
  17789. temperature: 0.1,
  17790. }
  17791. this.ajax
  17792. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17793. .then(async (response) => {
  17794. console.log(response);
  17795. let data = response.data.FunctionResponse
  17796. if (data.message) {
  17797. console.log(data.message);
  17798. let tArray = {}
  17799. try {
  17800. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17801. } catch (error) {
  17802. console.log("error_________________" + error);
  17803. try {
  17804. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17805. let match = data.message.match(regex);
  17806. tArray = JSON.parse(match[0]);
  17807. // var message = data.message;
  17808. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17809. // var jsonEnd = message.indexOf("```", jsonStart);
  17810. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17811. // tArray = JSON.parse(jsonString);
  17812. } catch (error) {
  17813. try {
  17814. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17815. let match = data.message.match(regex);
  17816. // eval("var aaa = " + match[0])
  17817. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17818. } catch (error) {
  17819. console.log("error_________________" + error);
  17820. }
  17821. console.log("error_________________" + error);
  17822. }
  17823. }
  17824. let toolsJson = {
  17825. "电子白板": { tool: 1, type: 1 },
  17826. "文档": { tool: 52, type: 1 },
  17827. "思维导图": { tool: 3, type: 1 },
  17828. "表格": { tool: 48, type: 1 },
  17829. "作业提交": { tool: 16, type: 2 },
  17830. "问答": { tool: 15, type: 2 },
  17831. "选择题": { tool: 45, type: 2 },
  17832. }
  17833. // answerQ:"sssssssssssssss"
  17834. for (var i = 0; i < tArray.length; i++) {
  17835. let _task = tArray[i]
  17836. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17837. _task.elist = _task.elist.filter(el=>{
  17838. el.isai = "1"
  17839. return el
  17840. })
  17841. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17842. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17843. if (_task.toolChoose.length) {
  17844. for (var j = 0; j < _task.toolChoose.length; j++) {
  17845. let _json = {
  17846. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  17847. toolDetail: _task.toolChoose[j].detail,
  17848. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  17849. askCount: 1,
  17850. askTitle: "",
  17851. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17852. }
  17853. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  17854. let answerQ = await _this.aiCreateQuestion(15, i)
  17855. _json.answerQ = answerQ.answerQ
  17856. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  17857. let testJson = await _this.aiCreateQuestion(45, i)
  17858. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  17859. }
  17860. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  17861. }
  17862. } else {
  17863. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17864. {
  17865. tool: [],
  17866. toolDetail: "",
  17867. toolType: 0,
  17868. askCount: 1,
  17869. askTitle: "",
  17870. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17871. },
  17872. )
  17873. }
  17874. }
  17875. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17876. _this.$forceUpdate();
  17877. _this.createTeacherAn();
  17878. }
  17879. callback ? callback() : ''
  17880. })
  17881. .catch((error) => {
  17882. _this.loading = false
  17883. console.log(error);
  17884. });
  17885. },
  17886. async aiGet32(messages, index) {
  17887. let _this = this
  17888. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17889. if (_this.infoData.length) {
  17890. for (var i = 0; i < _this.infoData.length; i++) {
  17891. if(_this.infoData[i].fileid){
  17892. fileid.push(_this.infoData[i].fileid)
  17893. }else {
  17894. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17895. if(_fileid){
  17896. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17897. _this.$forceUpdate();
  17898. if(_fileid != 1){
  17899. fileid.push(_fileid)
  17900. }
  17901. }
  17902. }
  17903. }
  17904. }
  17905. // let params = JSON.stringify({
  17906. // // "model": "Chat",
  17907. // model: 'gpt-3.5-turbo',
  17908. // temperature: 0.1,
  17909. // max_tokens: 4096,
  17910. // top_p: 1,
  17911. // frequency_penalty: 0,
  17912. // presence_penalty: 0,
  17913. // messages: [{
  17914. // content: messages,
  17915. // role: 'user'
  17916. // }],
  17917. // stream: false,
  17918. // uid: this.userid,
  17919. // mind_map_question: "",
  17920. // })
  17921. // // let params = JSON.stringify({
  17922. // // message: {
  17923. // // anthropic_version: "bedrock-2023-05-31",
  17924. // // max_tokens: 4096,
  17925. // // temperature: 0.1,
  17926. // // top_p: 1,
  17927. // // messages: [{
  17928. // // content: messages,
  17929. // // role: 'user'
  17930. // // }], //
  17931. // // },
  17932. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17933. // // });
  17934. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17935. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17936. // console.log(response);
  17937. // let data = response.data.FunctionResponse
  17938. // if (data.choices && data.choices.length && data.choices[0].message) {
  17939. // console.log(data.choices[0].message.content);
  17940. // let tArray = JSON.parse(data.choices[0].message.content)
  17941. // // _this.unitJson[0].chapterInfo[0].task = []
  17942. // let toolsJson = {
  17943. // "电子白板": { tool: 1, type: 1 },
  17944. // "文档": { tool: 52, type: 1 },
  17945. // "思维导图": { tool: 3, type: 1 },
  17946. // "表格": { tool: 48, type: 1 },
  17947. // "作业提交": { tool: 16, type: 2 }
  17948. // }
  17949. // for (var i = 0; i < tArray.length; i++) {
  17950. // let _task = tArray[i]
  17951. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17952. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17953. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17954. // if (_task.toolChoose.length) {
  17955. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17956. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17957. // {
  17958. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17959. // toolDetail: _task.toolChoose[j].detail,
  17960. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17961. // askCount: 1,
  17962. // askTitle: "",
  17963. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17964. // },
  17965. // )
  17966. // }
  17967. // } else {
  17968. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17969. // {
  17970. // tool: [],
  17971. // toolDetail: "",
  17972. // toolType: 0,
  17973. // askCount: 1,
  17974. // askTitle: "",
  17975. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17976. // },
  17977. // )
  17978. // }
  17979. // }
  17980. // // if (_this.infoData.length) {
  17981. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17982. // // }
  17983. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17984. // _this.$forceUpdate();
  17985. // }
  17986. // // if (data.result) {
  17987. // // console.log(data.result);
  17988. // // let tArray = JSON.parse(data.result)
  17989. // // // _this.unitJson[0].chapterInfo[0].task = []
  17990. // // let toolsJson = {
  17991. // // "电子白板": { tool: 1, type: 1 },
  17992. // // "文档": { tool: 52, type: 1 },
  17993. // // "思维导图": { tool: 3, type: 1 },
  17994. // // "表格": { tool: 48, type: 1 },
  17995. // // "作业提交": { tool: 16, type: 2 }
  17996. // // }
  17997. // // for (var i = 0; i < tArray.length; i++) {
  17998. // // let _task = tArray[i]
  17999. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18000. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18001. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18002. // // if (_task.toolChoose.length) {
  18003. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18004. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18005. // // {
  18006. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18007. // // toolDetail: _task.toolChoose[j].detail,
  18008. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18009. // // askCount: 1,
  18010. // // askTitle: "",
  18011. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18012. // // },
  18013. // // )
  18014. // // }
  18015. // // } else {
  18016. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18017. // // {
  18018. // // tool: [],
  18019. // // toolDetail: "",
  18020. // // toolType: 0,
  18021. // // askCount: 1,
  18022. // // askTitle: "",
  18023. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18024. // // },
  18025. // // )
  18026. // // }
  18027. // // }
  18028. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18029. // // _this.$forceUpdate();
  18030. // // }
  18031. // callback ? callback() : ''
  18032. // }).catch(function (error) {
  18033. // _this.loading = false
  18034. // console.log(error);
  18035. // });
  18036. let parm = {
  18037. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18038. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18039. session_name: uuidv4(),
  18040. userId: this.userid,
  18041. file_ids: fileid.length ? [...fileid] : '',
  18042. model: 'gpt-4o-2024-08-06',
  18043. temperature: 0.1,
  18044. }
  18045. this.ajax
  18046. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18047. .then(async (response) => {
  18048. console.log(response);
  18049. let data = response.data.FunctionResponse
  18050. if (data.message) {
  18051. console.log(data.message);
  18052. let tArray = {}
  18053. try {
  18054. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18055. } catch (error) {
  18056. console.log("error_________________" + error);
  18057. try {
  18058. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18059. let match = data.message.match(regex);
  18060. tArray = JSON.parse(match[0]);
  18061. // var message = data.message;
  18062. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18063. // var jsonEnd = message.indexOf("```", jsonStart);
  18064. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18065. // tArray = JSON.parse(jsonString);
  18066. } catch (error) {
  18067. try {
  18068. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18069. let match = data.message.match(regex);
  18070. // eval("var aaa = " + match[0])
  18071. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18072. } catch (error) {
  18073. console.log("error_________________" + error);
  18074. }
  18075. console.log("error_________________" + error);
  18076. }
  18077. }
  18078. let toolsJson = {
  18079. "电子白板": { tool: 1, type: 1 },
  18080. "文档": { tool: 52, type: 1 },
  18081. "思维导图": { tool: 3, type: 1 },
  18082. "表格": { tool: 48, type: 1 },
  18083. "作业提交": { tool: 16, type: 2 },
  18084. "问答": { tool: 15, type: 2 },
  18085. "选择题": { tool: 45, type: 2 },
  18086. }
  18087. // answerQ:"sssssssssssssss"
  18088. // for (var i = 0; i < tArray.length; i++) {
  18089. let _task = tArray
  18090. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  18091. _task.elist = _task.elist.filter(el=>{
  18092. el.isai = 1
  18093. return el
  18094. })
  18095. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18096. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18097. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  18098. console.log("error_________________JSON不对重新生成");
  18099. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18100. _this.aiGet32(messages, index)
  18101. return;
  18102. }
  18103. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18104. if (_task.toolChoose && _task.toolChoose.length) {
  18105. for (var j = 0; j < _task.toolChoose.length; j++) {
  18106. let _json = {
  18107. tool: [],
  18108. toolDetail: _task.toolChoose[j].detail,
  18109. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18110. askCount: 1,
  18111. askTitle: "",
  18112. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18113. }
  18114. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18115. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18116. let answerQ = await _this.aiCreateQuestion(15, index)
  18117. // _json.answerQ = answerQ.answerQ
  18118. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18119. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18120. let testJson = await _this.aiCreateQuestion(45, index)
  18121. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18122. _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}
  18123. }
  18124. _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]
  18125. _this.$forceUpdate();
  18126. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18127. }
  18128. } else {
  18129. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18130. {
  18131. tool: [],
  18132. toolDetail: "",
  18133. toolType: 0,
  18134. askCount: 1,
  18135. askTitle: "",
  18136. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18137. },
  18138. )
  18139. }
  18140. // }
  18141. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18142. _this.$forceUpdate();
  18143. _this.createTeacherAn(index);
  18144. }
  18145. // callback ? callback() : ''
  18146. _this.taskLoading[index] = false
  18147. })
  18148. .catch((error) => {
  18149. // _this.loading = false
  18150. _this.taskLoading[index] = false
  18151. console.log(error);
  18152. });
  18153. },
  18154. async aiGetG321(messages, index) {
  18155. let _this = this
  18156. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18157. if (_this.infoData.length) {
  18158. for (var i = 0; i < _this.infoData.length; i++) {
  18159. if(_this.infoData[i].fileid){
  18160. fileid.push(_this.infoData[i].fileid)
  18161. }else {
  18162. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18163. if(_fileid){
  18164. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18165. _this.$forceUpdate();
  18166. if(_fileid != 1){
  18167. fileid.push(_fileid)
  18168. }
  18169. }
  18170. }
  18171. }
  18172. }
  18173. let parm = {
  18174. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18175. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18176. session_name: uuidv4(),
  18177. userId: this.userid,
  18178. file_ids: fileid.length ? [...fileid] : '',
  18179. model: 'gpt-4o-2024-08-06',
  18180. temperature: 0.1,
  18181. }
  18182. this.ajax
  18183. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18184. .then(async (response) => {
  18185. console.log(response);
  18186. let data = response.data.FunctionResponse
  18187. if (data.message) {
  18188. let tArray = {}
  18189. try {
  18190. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18191. } catch (error) {
  18192. console.log("error_________________" + error);
  18193. try {
  18194. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18195. let match = data.message.match(regex);
  18196. tArray = JSON.parse(match[0]);
  18197. } catch (error) {
  18198. try {
  18199. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18200. let match = data.message.match(regex);
  18201. // eval("var aaa = " + match[0])
  18202. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18203. } catch (error) {
  18204. console.log("error_________________" + error);
  18205. }
  18206. console.log("error_________________" + error);
  18207. }
  18208. }
  18209. console.log(data.message);
  18210. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  18211. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18212. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18213. _this.$forceUpdate();
  18214. _this.createTeacherAn(index);
  18215. }
  18216. // callback ? callback() : ''
  18217. _this.taskGLoading[index][0] = false
  18218. })
  18219. .catch((error) => {
  18220. // _this.loading = false
  18221. _this.taskGLoading[index][0] = false
  18222. console.log(error);
  18223. });
  18224. },
  18225. async aiGetG322(messages, index) {
  18226. let _this = this
  18227. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18228. if (_this.infoData.length) {
  18229. for (var i = 0; i < _this.infoData.length; i++) {
  18230. if(_this.infoData[i].fileid){
  18231. fileid.push(_this.infoData[i].fileid)
  18232. }else {
  18233. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18234. if(_fileid){
  18235. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18236. _this.$forceUpdate();
  18237. if(_fileid != 1){
  18238. fileid.push(_fileid)
  18239. }
  18240. }
  18241. }
  18242. }
  18243. }
  18244. let parm = {
  18245. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18246. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18247. session_name: uuidv4(),
  18248. userId: this.userid,
  18249. file_ids: fileid.length ? [...fileid] : '',
  18250. model: 'gpt-4o-2024-08-06',
  18251. temperature: 0.1,
  18252. }
  18253. this.ajax
  18254. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18255. .then(async (response) => {
  18256. console.log(response);
  18257. let data = response.data.FunctionResponse
  18258. if (data.message) {
  18259. console.log(data.message);
  18260. let tArray = {}
  18261. try {
  18262. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18263. } catch (error) {
  18264. console.log("error_________________" + error);
  18265. try {
  18266. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18267. let match = data.message.match(regex);
  18268. tArray = JSON.parse(match[0]);
  18269. } catch (error) {
  18270. try {
  18271. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18272. let match = data.message.match(regex);
  18273. // eval("var aaa = " + match[0])
  18274. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18275. } catch (error) {
  18276. console.log("error_________________" + error);
  18277. }
  18278. console.log("error_________________" + error);
  18279. }
  18280. }
  18281. let toolsJson = {
  18282. "电子白板": { tool: 1, type: 1 },
  18283. "文档": { tool: 52, type: 1 },
  18284. "思维导图": { tool: 3, type: 1 },
  18285. "表格": { tool: 48, type: 1 },
  18286. "作业提交": { tool: 16, type: 2 },
  18287. "问答": { tool: 15, type: 2 },
  18288. "选择题": { tool: 45, type: 2 },
  18289. }
  18290. let _task = tArray
  18291. if(!_task.toolChoose){
  18292. console.log("error_________________JSON不对重新生成");
  18293. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18294. _this.aiGet322(messages, index)
  18295. return;
  18296. }
  18297. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18298. if (_task.toolChoose && _task.toolChoose.length) {
  18299. for (var j = 0; j < _task.toolChoose.length; j++) {
  18300. let _json = {
  18301. tool: [],
  18302. toolDetail: _task.toolChoose[j].detail,
  18303. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18304. askCount: 1,
  18305. askTitle: "",
  18306. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18307. }
  18308. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18309. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18310. let answerQ = await _this.aiCreateQuestion(15, index)
  18311. // _json.answerQ = answerQ.answerQ
  18312. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18313. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18314. let testJson = await _this.aiCreateQuestion(45, index)
  18315. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18316. _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}
  18317. }
  18318. _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]
  18319. _this.$forceUpdate();
  18320. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18321. }
  18322. } else {
  18323. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18324. {
  18325. tool: [],
  18326. toolDetail: "",
  18327. toolType: 0,
  18328. askCount: 1,
  18329. askTitle: "",
  18330. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18331. },
  18332. )
  18333. }
  18334. // }
  18335. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18336. _this.$forceUpdate();
  18337. }
  18338. // callback ? callback() : ''
  18339. _this.taskGLoading[index][1] = false
  18340. })
  18341. .catch((error) => {
  18342. // _this.loading = false
  18343. _this.taskGLoading[index][1] = false
  18344. console.log(error);
  18345. });
  18346. },
  18347. async aiGetG323(messages, index) {
  18348. let _this = this
  18349. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18350. if (_this.infoData.length) {
  18351. for (var i = 0; i < _this.infoData.length; i++) {
  18352. if(_this.infoData[i].fileid){
  18353. fileid.push(_this.infoData[i].fileid)
  18354. }else {
  18355. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18356. if(_fileid){
  18357. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18358. _this.$forceUpdate();
  18359. if(_fileid != 1){
  18360. fileid.push(_fileid)
  18361. }
  18362. }
  18363. }
  18364. }
  18365. }
  18366. let parm = {
  18367. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18368. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18369. session_name: uuidv4(),
  18370. userId: this.userid,
  18371. file_ids: fileid.length ? [...fileid] : '',
  18372. model: 'gpt-4o-2024-08-06',
  18373. temperature: 0.1,
  18374. }
  18375. this.ajax
  18376. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18377. .then(async (response) => {
  18378. console.log(response);
  18379. let data = response.data.FunctionResponse
  18380. if (data.message) {
  18381. console.log(data.message);
  18382. let tArray = {}
  18383. try {
  18384. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18385. } catch (error) {
  18386. console.log("error_________________" + error);
  18387. try {
  18388. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18389. let match = data.message.match(regex);
  18390. tArray = JSON.parse(match[0]);
  18391. } catch (error) {
  18392. try {
  18393. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18394. let match = data.message.match(regex);
  18395. // eval("var aaa = " + match[0])
  18396. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18397. } catch (error) {
  18398. console.log("error_________________" + error);
  18399. }
  18400. console.log("error_________________" + error);
  18401. }
  18402. }
  18403. let _task = tArray
  18404. if(!_task.elist){
  18405. console.log("error_________________JSON不对重新生成");
  18406. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18407. _this.aiGet322(messages, index)
  18408. return;
  18409. }
  18410. _task.elist = _task.elist.filter(el=>{
  18411. el.isai = "1"
  18412. return el
  18413. })
  18414. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18415. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18416. _this.$forceUpdate();
  18417. }
  18418. // callback ? callback() : ''
  18419. _this.taskGLoading[index][2] = false
  18420. })
  18421. .catch((error) => {
  18422. // _this.loading = false
  18423. _this.taskGLoading[index][2] = false
  18424. console.log(error);
  18425. });
  18426. },
  18427. async aiCreateQuestion(type, task) {
  18428. let _this = this
  18429. return new Promise((resolve, reject) => {
  18430. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18431. if (_this.infoData.length) {
  18432. for (var i = 0; i < _this.infoData.length; i++) {
  18433. if(_this.infoData[i].fileid){
  18434. fileid.push(_this.infoData[i].fileid)
  18435. }
  18436. }
  18437. }
  18438. let sub = []
  18439. let mclass = []
  18440. if (this.courseTypeId.length) {
  18441. for (var i = 0; i < this.courseTypeId.length; i++) {
  18442. let _sid = this.courseTypeId[i]
  18443. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18444. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18445. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18446. }
  18447. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18448. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18449. }
  18450. }
  18451. }
  18452. }
  18453. let messages = ""
  18454. if(type == 15){
  18455. messages = `NOTICE
  18456. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18457. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  18458. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18459. Instruction: Based on the context, follow "Format example", write content.
  18460. # Context
  18461. ## 任务
  18462. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18463. ## 限制
  18464. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18465. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18466. ## 课程简介
  18467. 课程名字:${_this.courseName}
  18468. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18469. ${sub.length ? '学科:' + sub.join(",") : ''}
  18470. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18471. ## 教案
  18472. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18473. # Format example
  18474. {answerQ:"问题"}
  18475. `
  18476. }else if(type == 45){
  18477. messages = `NOTICE
  18478. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18479. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  18480. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18481. Instruction: Based on the context, follow "Format example", write content.
  18482. # Context
  18483. ## 任务
  18484. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18485. ## 限制
  18486. - 生成题目禁止重复。
  18487. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18488. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18489. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18490. ## 课程简介
  18491. 课程名字:${_this.courseName}
  18492. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18493. ${sub.length ? '学科:' + sub.join(",") : ''}
  18494. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18495. ## 教案
  18496. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18497. # Format example
  18498. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18499. `
  18500. }
  18501. let parm = {
  18502. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18503. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18504. session_name: uuidv4(),
  18505. userId: this.userid,
  18506. file_ids: fileid.length ? [...fileid] : '',
  18507. model: 'gpt-4o-2024-08-06',
  18508. temperature: 0.1,
  18509. }
  18510. this.ajax
  18511. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18512. .then((response) => {
  18513. console.log(response);
  18514. let data = response.data.FunctionResponse
  18515. if (data.message) {
  18516. console.log(data.message);
  18517. try {
  18518. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18519. let tArray = {}
  18520. try {
  18521. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18522. } catch (error) {
  18523. console.log("error_________________" + error);
  18524. try {
  18525. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18526. let match = data.message.match(regex);
  18527. tArray = JSON.parse(match[0]);
  18528. // var message = data.message;
  18529. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18530. // var jsonEnd = message.indexOf("```", jsonStart);
  18531. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18532. // tArray = JSON.parse(jsonString);
  18533. } catch (error) {
  18534. try {
  18535. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18536. let match = data.message.match(regex);
  18537. // eval("var aaa = " + match[0])
  18538. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18539. } catch (error) {
  18540. console.log("error_________________" + error);
  18541. }
  18542. console.log("error_________________" + error);
  18543. }
  18544. }
  18545. resolve(tArray)
  18546. } catch (error) {
  18547. if(type == 15){
  18548. resolve({answerQ: "题目"})
  18549. }else if(type == 45){
  18550. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18551. }
  18552. }
  18553. }else if(type == 15){
  18554. resolve({answerQ: "题目"})
  18555. }else if(type == 45){
  18556. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18557. }
  18558. })
  18559. .catch((error) => {
  18560. if(type == 15){
  18561. resolve({answerQ: "题目"})
  18562. }else if(type == 45){
  18563. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18564. }
  18565. console.log(error);
  18566. });
  18567. });
  18568. },
  18569. async aiChoice(type){
  18570. if(type == 45){
  18571. this.choiceLoading = true
  18572. }
  18573. let _this = this
  18574. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18575. if (_this.infoData.length) {
  18576. for (var i = 0; i < _this.infoData.length; i++) {
  18577. if(_this.infoData[i].fileid){
  18578. fileid.push(_this.infoData[i].fileid)
  18579. }
  18580. }
  18581. }
  18582. if (_this.xuanzeInfoData.length) {
  18583. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  18584. if(_this.xuanzeInfoData[i].fileid){
  18585. fileid.push(_this.xuanzeInfoData[i].fileid)
  18586. }
  18587. }
  18588. }
  18589. let sub = []
  18590. let mclass = []
  18591. if (this.courseTypeId.length) {
  18592. for (var i = 0; i < this.courseTypeId.length; i++) {
  18593. let _sid = this.courseTypeId[i]
  18594. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18595. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18596. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18597. }
  18598. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18599. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18600. }
  18601. }
  18602. }
  18603. }
  18604. let messages = ""
  18605. if(type == 15){
  18606. messages = `NOTICE
  18607. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18608. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  18609. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18610. Instruction: Based on the context, follow "Format example", write content.
  18611. # Context
  18612. ## 任务
  18613. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18614. ## 限制
  18615. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18616. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18617. ## 课程简介
  18618. 课程名字:${_this.courseName}
  18619. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18620. ${sub.length ? '学科:' + sub.join(",") : ''}
  18621. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18622. ## 教案
  18623. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18624. # Format example
  18625. {answerQ:"问题"}
  18626. `
  18627. }else if(type == 45){
  18628. messages = `NOTICE
  18629. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18630. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  18631. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18632. Instruction: Based on the context, follow "Format example", write content.
  18633. # Context
  18634. ## 任务
  18635. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18636. ## 限制
  18637. - 生成题目禁止重复。
  18638. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18639. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18640. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18641. ## 课程简介
  18642. 课程名字:${_this.courseName}
  18643. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18644. ${sub.length ? '学科:' + sub.join(",") : ''}
  18645. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18646. ## 教案
  18647. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18648. # Format example
  18649. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18650. `
  18651. }
  18652. let parm = {
  18653. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18654. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18655. session_name: uuidv4(),
  18656. userId: this.userid,
  18657. file_ids: fileid.length ? [...fileid] : '',
  18658. model: 'gpt-4o-2024-08-06',
  18659. temperature: 0.1,
  18660. }
  18661. this.ajax
  18662. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18663. .then((response) => {
  18664. console.log(response);
  18665. let data = response.data.FunctionResponse
  18666. if (data.message) {
  18667. console.log(data.message);
  18668. try {
  18669. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18670. let tArray = {}
  18671. try {
  18672. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18673. } catch (error) {
  18674. console.log("error_________________" + error);
  18675. try {
  18676. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18677. let match = data.message.match(regex);
  18678. tArray = JSON.parse(match[0]);
  18679. // var message = data.message;
  18680. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18681. // var jsonEnd = message.indexOf("```", jsonStart);
  18682. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18683. // tArray = JSON.parse(jsonString);
  18684. } catch (error) {
  18685. try {
  18686. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18687. let match = data.message.match(regex);
  18688. // eval("var aaa = " + match[0])
  18689. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18690. } catch (error) {
  18691. console.log("error_________________" + error);
  18692. }
  18693. console.log("error_________________" + error);
  18694. }
  18695. }
  18696. if(type == 45){
  18697. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  18698. }
  18699. } catch (error) {
  18700. if(type == 15){
  18701. {answerQ: "题目"}
  18702. }else if(type == 45){
  18703. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18704. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18705. }
  18706. _this.choiceLoading = false
  18707. }
  18708. }else if(type == 15){
  18709. {answerQ: "题目"}
  18710. }else if(type == 45){
  18711. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18712. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18713. }
  18714. _this.choiceLoading = false
  18715. }).catch((error) => {
  18716. if(type == 15){
  18717. {answerQ: "题目"}
  18718. }else if(type == 45){
  18719. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18720. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18721. }
  18722. console.log(error);
  18723. _this.choiceLoading = false
  18724. });
  18725. },
  18726. async aiGet4(messages, callback, clickType) {
  18727. let _this = this
  18728. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18729. if (_this.infoData.length) {
  18730. for (var i = 0; i < _this.infoData.length; i++) {
  18731. if(_this.infoData[i].fileid){
  18732. fileid.push(_this.infoData[i].fileid)
  18733. }else {
  18734. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18735. if(_fileid){
  18736. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18737. _this.$forceUpdate();
  18738. if(_fileid != 1){
  18739. fileid.push(_fileid)
  18740. }
  18741. }
  18742. }
  18743. }
  18744. }
  18745. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  18746. if(_this.cankaoInfoData[i].fileid){
  18747. fileid.push(_this.cankaoInfoData[i].fileid)
  18748. }else {
  18749. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  18750. if(_fileid){
  18751. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  18752. _this.$forceUpdate();
  18753. if(_fileid != 1){
  18754. fileid.push(_fileid)
  18755. }
  18756. }
  18757. }
  18758. }
  18759. // let params = JSON.stringify({
  18760. // // "model": "Chat",
  18761. // model: 'gpt-3.5-turbo',
  18762. // temperature: 0.1,
  18763. // max_tokens: 4096,
  18764. // top_p: 1,
  18765. // frequency_penalty: 0,
  18766. // presence_penalty: 0,
  18767. // messages: [{
  18768. // content: messages,
  18769. // role: 'user'
  18770. // }],
  18771. // stream: false,
  18772. // uid: this.userid,
  18773. // mind_map_question: "",
  18774. // })
  18775. // // let params = JSON.stringify({
  18776. // // message: {
  18777. // // anthropic_version: "bedrock-2023-05-31",
  18778. // // max_tokens: 4096,
  18779. // // temperature: 0.1,
  18780. // // top_p: 1,
  18781. // // messages: [{
  18782. // // content: messages,
  18783. // // role: 'user'
  18784. // // }], //
  18785. // // },
  18786. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18787. // // });
  18788. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18789. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18790. // console.log(response);
  18791. // let data = response.data.FunctionResponse
  18792. // if (data.choices && data.choices.length && data.choices[0].message) {
  18793. // console.log(data.choices[0].message.content);
  18794. // let dArray = JSON.parse(data.choices[0].message.content)
  18795. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  18796. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  18797. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18798. // for (var i = 0; i < dArray.length; i++) {
  18799. // let _task = dArray[i]
  18800. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18801. // task: _task.task,
  18802. // taskDetail: "",
  18803. // taskDetail2: "",
  18804. // taskDetail3: _task.detail,
  18805. // chapterData: [],
  18806. // toolText: "",
  18807. // toolChoose: [
  18808. // {
  18809. // tool: [],
  18810. // toolDetail: "",
  18811. // toolType: 0,
  18812. // askCount: 1,
  18813. // askTitle: "",
  18814. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18815. // },
  18816. // ],
  18817. // isShowTools: false,
  18818. // askCount: 1,
  18819. // isFold: 0,
  18820. // askTitle: "",
  18821. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18822. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18823. // homeworkList: [],
  18824. // })
  18825. // }
  18826. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18827. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18828. // _this.$forceUpdate();
  18829. // } else {
  18830. // for (var i = 0; i < dArray.length; i++) {
  18831. // let _task = dArray[i]
  18832. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18833. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18834. // }else {
  18835. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  18836. // task: _task.task,
  18837. // taskDetail: "",
  18838. // taskDetail2: "",
  18839. // taskDetail3: _task.detail,
  18840. // chapterData: [],
  18841. // toolText: "",
  18842. // toolChoose: [
  18843. // {
  18844. // tool: [],
  18845. // toolDetail: "",
  18846. // toolType: 0,
  18847. // askCount: 1,
  18848. // askTitle: "",
  18849. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18850. // },
  18851. // ],
  18852. // isShowTools: false,
  18853. // askCount: 1,
  18854. // isFold: 0,
  18855. // askTitle: "",
  18856. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18857. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18858. // homeworkList: [],
  18859. // }
  18860. // }
  18861. // }
  18862. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18863. // _this.$forceUpdate();
  18864. // }
  18865. // }
  18866. // // if (data.result) {
  18867. // // console.log(data.result);
  18868. // // let dArray = JSON.parse(data.result)
  18869. // // _this.teacherText = JSON.parse(data.result)
  18870. // // for (var i = 0; i < dArray.length; i++) {
  18871. // // let _task = dArray[i]
  18872. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18873. // // }
  18874. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18875. // // _this.$forceUpdate();
  18876. // // }
  18877. // callback ? callback() : ''
  18878. // _this.loading = false
  18879. // }).catch(function (error) {
  18880. // _this.loading = false
  18881. // console.log(error);
  18882. // });
  18883. let parm = {
  18884. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18885. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18886. session_name: uuidv4(),
  18887. userId: this.userid,
  18888. file_ids: fileid.length ? [...fileid] : '',
  18889. model: 'gpt-4o-2024-08-06',
  18890. temperature: 0.1,
  18891. }
  18892. this.ajax
  18893. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18894. .then((response) => {
  18895. console.log(response);
  18896. let data = response.data.FunctionResponse
  18897. if (data.message) {
  18898. console.log(data.message);
  18899. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18900. let dArray = []
  18901. try {
  18902. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18903. } catch (error) {
  18904. console.log("error_________________" + error);
  18905. try {
  18906. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18907. let match = data.message.match(regex);
  18908. dArray = JSON.parse(match[0]);
  18909. // var message = data.message;
  18910. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18911. // var jsonEnd = message.indexOf("```", jsonStart);
  18912. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18913. // dArray = JSON.parse(jsonString);
  18914. } catch (error) {
  18915. _this.aiGet4(messages, callback)
  18916. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18917. console.log("error_________________" + error);
  18918. return;
  18919. console.log("error_________________" + error);
  18920. _this.loading = false
  18921. }
  18922. }
  18923. try {
  18924. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  18925. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  18926. if(_this.panTeacher() > 0){
  18927. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18928. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18929. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18930. }
  18931. for (var i = 0; i < dArray.length; i++) {
  18932. let _task = dArray[i]
  18933. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18934. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18935. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18936. }else {
  18937. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18938. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18939. taskDetail: "",
  18940. taskDetail2: "",
  18941. taskDetail3: _task.detail,
  18942. chapterData: [],
  18943. toolText: "",
  18944. toolChoose: [
  18945. {
  18946. tool: [],
  18947. toolDetail: "",
  18948. toolType: 0,
  18949. askCount: 1,
  18950. askTitle: "",
  18951. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18952. },
  18953. ],
  18954. isShowTools: false,
  18955. askCount: 1,
  18956. isFold: 0,
  18957. askTitle: "",
  18958. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18959. checkJson: [{ checkCount: [], checkPerent: [] }],
  18960. homeworkList: [],
  18961. })
  18962. }
  18963. }
  18964. }else {
  18965. _this.unitJson[0].chapterInfo[0].taskJson = []
  18966. for (var i = 0; i < dArray.length; i++) {
  18967. let _task = dArray[i]
  18968. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18969. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18970. taskDetail: "",
  18971. taskDetail2: "",
  18972. taskDetail3: _task.detail,
  18973. chapterData: [],
  18974. toolText: "",
  18975. toolChoose: [
  18976. {
  18977. tool: [],
  18978. toolDetail: "",
  18979. toolType: 0,
  18980. askCount: 1,
  18981. askTitle: "",
  18982. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18983. },
  18984. ],
  18985. isShowTools: false,
  18986. askCount: 1,
  18987. isFold: 0,
  18988. askTitle: "",
  18989. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18990. checkJson: [{ checkCount: [], checkPerent: [] }],
  18991. homeworkList: [],
  18992. })
  18993. }
  18994. }
  18995. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18996. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18997. _this.$forceUpdate();
  18998. } else {
  18999. for (var i = 0; i < dArray.length; i++) {
  19000. let _task = dArray[i]
  19001. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19002. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19003. }else {
  19004. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19005. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19006. taskDetail: "",
  19007. taskDetail2: "",
  19008. taskDetail3: _task.detail,
  19009. chapterData: [],
  19010. toolText: "",
  19011. toolChoose: [
  19012. {
  19013. tool: [],
  19014. toolDetail: "",
  19015. toolType: 0,
  19016. askCount: 1,
  19017. askTitle: "",
  19018. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19019. },
  19020. ],
  19021. isShowTools: false,
  19022. askCount: 1,
  19023. isFold: 0,
  19024. askTitle: "",
  19025. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19026. checkJson: [{ checkCount: [], checkPerent: [] }],
  19027. homeworkList: [],
  19028. }
  19029. }
  19030. }
  19031. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19032. _this.$forceUpdate();
  19033. }
  19034. } catch (error) {
  19035. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19036. _this.aiGet4(messages, callback)
  19037. console.log("error_________________" + error);
  19038. return;
  19039. // _this.loading = false
  19040. }
  19041. }
  19042. callback ? callback() : ''
  19043. })
  19044. .catch((error) => {
  19045. _this.loading = false
  19046. console.log(error);
  19047. });
  19048. },
  19049. async aiDetail(msg, index) {
  19050. let _this = this
  19051. const _tindex = 'task-' + index
  19052. const _tindex2 = index
  19053. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19054. if (_this.infoData.length) {
  19055. for (var i = 0; i < _this.infoData.length; i++) {
  19056. if(_this.infoData[i].fileid){
  19057. fileid.push(_this.infoData[i].fileid)
  19058. }else {
  19059. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19060. if(_fileid){
  19061. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19062. _this.$forceUpdate();
  19063. if(_fileid != 1){
  19064. fileid.push(_fileid)
  19065. }
  19066. }
  19067. }
  19068. }
  19069. }
  19070. let url = []
  19071. if (this.infoData.length) {
  19072. for (var i = 0; i < this.infoData.length; i++) {
  19073. url.push(this.infoData[i].url)
  19074. }
  19075. }
  19076. let messages = `NOTICE
  19077. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19078. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19079. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19080. Instruction: Based on the context, follow "Format example", write content.
  19081. #Context
  19082. ## 要求
  19083. ${msg}
  19084. ## 参考信息
  19085. 任务名称:${_this.aiCallBack.task}
  19086. ## 优化内容
  19087. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  19088. // -------- #补充参考资料和
  19089. // ## 补充参考资料
  19090. // - 补充资料:${url.join(",")}
  19091. // - 补充描述:${_this.courseText2}
  19092. _this.taskDetailLoading.push(_tindex)
  19093. _this.ttaskDetailLoading.push(_tindex)
  19094. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19095. let _uuid = uuidv4();
  19096. // let params = JSON.stringify({
  19097. // // "model": "Chat",
  19098. // model: 'gpt-3.5-turbo',
  19099. // temperature: 0.1,
  19100. // max_tokens: 4096,
  19101. // top_p: 1,
  19102. // frequency_penalty: 0,
  19103. // presence_penalty: 0,
  19104. // messages: [{
  19105. // content: messages,
  19106. // role: 'user'
  19107. // }],
  19108. // uid: _uuid,
  19109. // mind_map_question: "",
  19110. // })
  19111. let params = {
  19112. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19113. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  19114. session_name: _uuid,
  19115. userId: _this.userid,
  19116. uid: _uuid,
  19117. file_ids: fileid.length ? [...fileid] : '',
  19118. model: 'gpt-4o-2024-08-06',
  19119. temperature: 0.1,
  19120. }
  19121. // let params = JSON.stringify({
  19122. // message: {
  19123. // anthropic_version: "bedrock-2023-05-31",
  19124. // max_tokens: 4096,
  19125. // temperature: 0.1,
  19126. // top_p: 1,
  19127. // messages: [{
  19128. // "role": "user",
  19129. // "content": messages
  19130. // }] ,
  19131. // },
  19132. // uid: _uuid,
  19133. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19134. // });
  19135. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19136. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19137. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19138. console.log(response);
  19139. // let data = response.data.FunctionResponse
  19140. // if (data.choices && data.choices.length && data.choices[0].message) {
  19141. // console.log(data.choices[0].message.content);
  19142. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19143. // _this.$forceUpdate()
  19144. // }
  19145. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19146. } else {
  19147. _this.$message.warning(response.data.FunctionResponse.result);
  19148. }
  19149. _this.isOutlineTaskCancelToken[index] = null
  19150. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19151. }).catch(function (error) {
  19152. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19153. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19154. _this.isOutlineTaskCancelToken[index] = null
  19155. if(error && error.message != 'Request canceled by the user.'){
  19156. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19157. }
  19158. console.log(error);
  19159. });
  19160. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  19161. },
  19162. aiDetailgetAiContent(_uid, loading, _tindex2) {
  19163. try {
  19164. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19165. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19166. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19167. } catch(error){
  19168. console.log('EventSource error:', error);
  19169. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19170. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19171. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19172. this.isOutlineTaskCancelToken[_tindex2] = null
  19173. return;
  19174. }
  19175. let _allText = "";
  19176. let _mdText = "";
  19177. let _iindex = 0
  19178. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19179. let _eData = JSON.parse(_e.data).content;
  19180. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19181. //对话已经完成
  19182. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19183. this.isOutlineTaskCancelSource[_tindex2].close();
  19184. this.isOutlineTaskCancelSource[_tindex2] = null;
  19185. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19186. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19187. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19188. this.isOutlineTaskCancelToken[_tindex2] = null
  19189. return;
  19190. } else {
  19191. _iindex++
  19192. //对话还在继续
  19193. let _text = "";
  19194. _text = _eData.replaceAll("'", "");
  19195. if (_allText == "") {
  19196. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19197. } else {
  19198. _allText += _text;
  19199. }
  19200. _mdText = _allText + "_";
  19201. _mdText = _mdText.replace(/\\n/g, "\n");
  19202. _mdText = _mdText.replace(/\\/g, "");
  19203. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19204. //转化返回的回复流数据.
  19205. if(_iindex == 10){
  19206. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19207. _iindex = 0
  19208. }
  19209. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19210. // 处理流数据
  19211. }
  19212. // this.$forceUpdate();
  19213. };
  19214. let _this = _this
  19215. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  19216. // 处理错误,可以尝试重新连接
  19217. console.log('EventSource error:', event);
  19218. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19219. _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19220. _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19221. _this.isOutlineTaskCancelToken[_tindex2] = null
  19222. _this.isOutlineTaskCancelSource[_tindex2].close();
  19223. _this.isOutlineTaskCancelSource[_tindex2] = null;
  19224. };
  19225. },
  19226. async aiOutlineDetail(msg, index) {
  19227. let _this = this
  19228. const _tindex = 'task-' + index
  19229. const _tindex2 = index
  19230. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19231. if (_this.infoData.length) {
  19232. for (var i = 0; i < _this.infoData.length; i++) {
  19233. if(_this.infoData[i].fileid){
  19234. fileid.push(_this.infoData[i].fileid)
  19235. }else {
  19236. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19237. if(_fileid){
  19238. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19239. _this.$forceUpdate();
  19240. if(_fileid != 1){
  19241. fileid.push(_fileid)
  19242. }
  19243. }
  19244. }
  19245. }
  19246. }
  19247. let url = []
  19248. if (this.infoData.length) {
  19249. for (var i = 0; i < this.infoData.length; i++) {
  19250. url.push(this.infoData[i].url)
  19251. }
  19252. }
  19253. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19254. let messages = `NOTICE
  19255. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19256. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19257. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19258. Instruction: Based on the context, follow "Format example", write content.
  19259. #Context
  19260. ## 要求
  19261. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  19262. ## 参考信息
  19263. 课程名字:${_this.courseName}
  19264. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19265. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19266. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19267. # Format example
  19268. 子任务名称:名称应该总结了该任务是在做什么,
  19269. 子任务设计:任务设计。
  19270. 子教学目标:教学目标。
  19271. 学生过程性成果:学生过程性成果。
  19272. 评价标准:评价标准。
  19273. `
  19274. // 教学目标:教学目标。
  19275. // 任务设计:任务设计。
  19276. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19277. // -------- #补充参考资料和
  19278. // ## 补充参考资料
  19279. // - 补充资料:${url.join(",")}
  19280. // - 补充描述:${_this.courseText2}
  19281. _this.taskDetailLoading.push(_tindex)
  19282. _this.ttaskDetailLoading.push(_tindex)
  19283. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19284. let _uuid = uuidv4();
  19285. // let params = JSON.stringify({
  19286. // // "model": "Chat",
  19287. // model: 'gpt-3.5-turbo',
  19288. // temperature: 0.1,
  19289. // max_tokens: 4096,
  19290. // top_p: 1,
  19291. // frequency_penalty: 0,
  19292. // presence_penalty: 0,
  19293. // messages: [{
  19294. // content: messages,
  19295. // role: 'user'
  19296. // }],
  19297. // uid: _uuid,
  19298. // mind_map_question: "",
  19299. // })
  19300. let params = {
  19301. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19302. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19303. session_name: _uuid,
  19304. userId: _this.userid,
  19305. uid: _uuid,
  19306. file_ids: fileid.length ? [...fileid] : '',
  19307. model: 'gpt-4o-2024-08-06',
  19308. temperature: 0.1,
  19309. }
  19310. // let params = JSON.stringify({
  19311. // message: {
  19312. // anthropic_version: "bedrock-2023-05-31",
  19313. // max_tokens: 4096,
  19314. // temperature: 0.1,
  19315. // top_p: 1,
  19316. // messages: [{
  19317. // "role": "user",
  19318. // "content": messages
  19319. // }] ,
  19320. // },
  19321. // uid: _uuid,
  19322. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19323. // });
  19324. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19325. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19326. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19327. console.log(response);
  19328. // let data = response.data.FunctionResponse
  19329. // if (data.choices && data.choices.length && data.choices[0].message) {
  19330. // console.log(data.choices[0].message.content);
  19331. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19332. // _this.$forceUpdate()
  19333. // }
  19334. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19335. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19336. } else {
  19337. _this.$message.warning(response.data.FunctionResponse.result);
  19338. }
  19339. _this.isOutlineTaskCancelToken[index] = null
  19340. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19341. }).catch(function (error) {
  19342. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19343. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19344. _this.isOutlineTaskCancelToken[index] = null
  19345. if(error && error.message != 'Request canceled by the user.'){
  19346. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19347. }
  19348. console.log(error);
  19349. });
  19350. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19351. },
  19352. async aiOutlineDetail2(msg, index) {
  19353. let _this = this
  19354. const _tindex = 'task-' + index
  19355. const _tindex2 = index
  19356. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19357. if (_this.infoData.length) {
  19358. for (var i = 0; i < _this.infoData.length; i++) {
  19359. if(_this.infoData[i].fileid){
  19360. fileid.push(_this.infoData[i].fileid)
  19361. }else {
  19362. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19363. if(_fileid){
  19364. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19365. _this.$forceUpdate();
  19366. if(_fileid != 1){
  19367. fileid.push(_fileid)
  19368. }
  19369. }
  19370. }
  19371. }
  19372. }
  19373. let url = []
  19374. if (this.infoData.length) {
  19375. for (var i = 0; i < this.infoData.length; i++) {
  19376. url.push(this.infoData[i].url)
  19377. }
  19378. }
  19379. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19380. let taskArray = []
  19381. let taskArrayD = []
  19382. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  19383. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  19384. if(k != index){
  19385. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  19386. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  19387. }
  19388. }
  19389. let messages = `NOTICE
  19390. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19391. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19392. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19393. Instruction: Based on the context, follow "Format example", write content.
  19394. #Context
  19395. ## 要求
  19396. ${msg}
  19397. ## 参考信息
  19398. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19399. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19400. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19401. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  19402. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  19403. # Format example
  19404. **子任务标题**:环节+子任务名称
  19405. **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19406. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19407. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19408. `
  19409. // 教学目标:教学目标。
  19410. // 任务设计:任务设计。
  19411. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19412. // -------- #补充参考资料和
  19413. // ## 补充参考资料
  19414. // - 补充资料:${url.join(",")}
  19415. // - 补充描述:${_this.courseText2}
  19416. _this.taskDetailLoading.push(_tindex)
  19417. _this.ttaskDetailLoading.push(_tindex)
  19418. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19419. let _uuid = uuidv4();
  19420. // let params = JSON.stringify({
  19421. // // "model": "Chat",
  19422. // model: 'gpt-3.5-turbo',
  19423. // temperature: 0.1,
  19424. // max_tokens: 4096,
  19425. // top_p: 1,
  19426. // frequency_penalty: 0,
  19427. // presence_penalty: 0,
  19428. // messages: [{
  19429. // content: messages,
  19430. // role: 'user'
  19431. // }],
  19432. // uid: _uuid,
  19433. // mind_map_question: "",
  19434. // })
  19435. let params = {
  19436. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19437. message: [{"type":"text", "text":messages}],
  19438. session_name: _uuid,
  19439. userId: _this.userid,
  19440. uid: _uuid,
  19441. file_ids: fileid.length ? [...fileid] : '',
  19442. model: 'gpt-4o-2024-08-06',
  19443. temperature: 0.1,
  19444. }
  19445. // let params = JSON.stringify({
  19446. // message: {
  19447. // anthropic_version: "bedrock-2023-05-31",
  19448. // max_tokens: 4096,
  19449. // temperature: 0.1,
  19450. // top_p: 1,
  19451. // messages: [{
  19452. // "role": "user",
  19453. // "content": messages
  19454. // }] ,
  19455. // },
  19456. // uid: _uuid,
  19457. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19458. // });
  19459. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19460. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  19461. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19462. console.log(response);
  19463. // let data = response.data.FunctionResponse
  19464. // if (data.choices && data.choices.length && data.choices[0].message) {
  19465. // console.log(data.choices[0].message.content);
  19466. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19467. // _this.$forceUpdate()
  19468. // }
  19469. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19470. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19471. } else {
  19472. _this.$message.warning(response.data.FunctionResponse.result);
  19473. }
  19474. _this.isOutlineTaskCancelToken[index] = null
  19475. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19476. }).catch(function (error) {
  19477. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19478. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19479. _this.isOutlineTaskCancelToken[index] = null
  19480. if(error && error.message != 'Request canceled by the user.'){
  19481. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19482. }
  19483. console.log(error);
  19484. });
  19485. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19486. },
  19487. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  19488. try {
  19489. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19490. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19491. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19492. } catch(error) {
  19493. console.log('EventSource error:', error);
  19494. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19495. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19496. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19497. this.isOutlineTaskCancelToken[_tindex2] = null
  19498. return;
  19499. }
  19500. let _allText = "";
  19501. let _mdText = "";
  19502. let _iindex = 0
  19503. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19504. let _eData = JSON.parse(_e.data).content;
  19505. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19506. //对话已经完成
  19507. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19508. this.isOutlineTaskCancelSource[_tindex2].close();
  19509. this.isOutlineTaskCancelSource[_tindex2] = null;
  19510. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19511. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  19512. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  19513. }
  19514. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19515. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19516. this.isOutlineTaskCancelToken[_tindex2] = null
  19517. return;
  19518. } else {
  19519. _iindex++
  19520. //对话还在继续
  19521. let _text = "";
  19522. _text = _eData.replaceAll("'", "");
  19523. if (_allText == "") {
  19524. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19525. } else {
  19526. _allText += _text;
  19527. }
  19528. _mdText = _allText + "_";
  19529. _mdText = _mdText.replace(/\\n/g, "\n");
  19530. _mdText = _mdText.replace(/\\/g, "");
  19531. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19532. //转化返回的回复流数据.
  19533. if(_iindex == 10){
  19534. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19535. _iindex = 0
  19536. }
  19537. if(this.taskDetailLoading.indexOf(loading) !== -1){
  19538. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19539. }
  19540. // 处理流数据
  19541. }
  19542. // this.$forceUpdate();
  19543. };
  19544. let _this = this
  19545. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  19546. // 处理错误,可以尝试重新连接
  19547. console.log('EventSource error:', event);
  19548. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19549. _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19550. _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19551. _this.isOutlineTaskCancelToken[_tindex2] = null
  19552. _this.isOutlineTaskCancelSource[_tindex2].close();
  19553. _this.isOutlineTaskCancelSource[_tindex2] = null;
  19554. };
  19555. },
  19556. async aiDetail2(msg, index) {
  19557. let _this = this
  19558. const _tindex = 'task-' + index
  19559. const _tindex2 = index
  19560. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19561. if (_this.infoData.length) {
  19562. for (var i = 0; i < _this.infoData.length; i++) {
  19563. if(_this.infoData[i].fileid){
  19564. fileid.push(_this.infoData[i].fileid)
  19565. }else {
  19566. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19567. if(_fileid){
  19568. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19569. _this.$forceUpdate();
  19570. if(_fileid != 1){
  19571. fileid.push(_fileid)
  19572. }
  19573. }
  19574. }
  19575. }
  19576. }
  19577. let messages = `NOTICE
  19578. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  19579. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19580. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19581. Instruction: Based on the context, follow "Format example", write content.
  19582. #Context
  19583. ## 要求
  19584. ${msg}
  19585. ## 参考资料
  19586. 任务名字: ${_this.aiCallBack.task}
  19587. ## 优化信息
  19588. ${_this.aiCallBack.taskDetail}
  19589. # Format example
  19590. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  19591. _this.taskDetailLoading2.push(_tindex)
  19592. _this.ttaskDetailLoading2.push(_tindex)
  19593. let _uuid = uuidv4();
  19594. // let params = JSON.stringify({
  19595. // // "model": "Chat",
  19596. // model: 'gpt-3.5-turbo',
  19597. // temperature: 0.1,
  19598. // max_tokens: 4096,
  19599. // top_p: 1,
  19600. // frequency_penalty: 0,
  19601. // presence_penalty: 0,
  19602. // messages: [{
  19603. // content: messages,
  19604. // role: 'user'
  19605. // }],
  19606. // uid: _uuid,
  19607. // mind_map_question: "",
  19608. // })
  19609. let params = {
  19610. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19611. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  19612. session_name: _uuid,
  19613. userId: _this.userid,
  19614. uid: _uuid,
  19615. file_ids: fileid.length ? [...fileid] : '',
  19616. model: 'gpt-4o-2024-08-06',
  19617. temperature: 0.1,
  19618. }
  19619. // let params = JSON.stringify({
  19620. // message: {
  19621. // anthropic_version: "bedrock-2023-05-31",
  19622. // max_tokens: 4096,
  19623. // temperature: 0.1,
  19624. // top_p: 1,
  19625. // messages: [{
  19626. // "role": "user",
  19627. // "content": messages
  19628. // }] ,
  19629. // },
  19630. // uid: _uuid,
  19631. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19632. // });
  19633. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19634. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19635. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19636. console.log(response);
  19637. // let data = response.data.FunctionResponse
  19638. // if (data.choices && data.choices.length && data.choices[0].message) {
  19639. // console.log(data.choices[0].message.content);
  19640. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19641. // _this.$forceUpdate()
  19642. // }
  19643. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19644. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19645. } else {
  19646. _this.$message.warning(response.data.FunctionResponse.result);
  19647. }
  19648. }).catch(function (error) {
  19649. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  19650. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  19651. if(error && error.message != 'Request canceled by the user.'){
  19652. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19653. }
  19654. console.log(error);
  19655. });
  19656. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  19657. },
  19658. aiDetail2getAiContent(_uid, loading, _tindex2) {
  19659. let _source;
  19660. try {
  19661. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19662. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19663. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19664. } catch(error) {
  19665. console.log('EventSource error:', error);
  19666. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19667. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19668. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19669. return;
  19670. }
  19671. let _allText = "";
  19672. let _mdText = "";
  19673. let _iindex = 0
  19674. _source.onmessage = _e => {
  19675. let _eData = JSON.parse(_e.data).content;
  19676. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19677. //对话已经完成
  19678. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19679. _source.close();
  19680. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19681. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19682. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19683. return;
  19684. } else {
  19685. _iindex++
  19686. //对话还在继续
  19687. let _text = "";
  19688. _text = _eData.replaceAll("'", "");
  19689. if (_allText == "") {
  19690. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19691. } else {
  19692. _allText += _text;
  19693. }
  19694. _mdText = _allText + "_";
  19695. _mdText = _mdText.replace(/\\n/g, "\n");
  19696. _mdText = _mdText.replace(/\\/g, "");
  19697. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19698. //转化返回的回复流数据
  19699. if(_iindex == 10){
  19700. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19701. _iindex = 0
  19702. }
  19703. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19704. // 处理流数据
  19705. }
  19706. // this.$forceUpdate();
  19707. };
  19708. let _this = this
  19709. _source.onerror = function(event) {
  19710. // 处理错误,可以尝试重新连接
  19711. console.log('EventSource error:', event);
  19712. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19713. _this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19714. _this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19715. _source.close();
  19716. };
  19717. },
  19718. async aiDetail3(msg, index, tindex) {
  19719. let _this = this
  19720. const _tindex = 'task-' + index + tindex
  19721. const _tindex2 = index
  19722. const _tindex3 = tindex
  19723. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19724. if (_this.infoData.length) {
  19725. for (var i = 0; i < _this.infoData.length; i++) {
  19726. if(_this.infoData[i].fileid){
  19727. fileid.push(_this.infoData[i].fileid)
  19728. }else {
  19729. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19730. if(_fileid){
  19731. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19732. _this.$forceUpdate();
  19733. if(_fileid != 1){
  19734. fileid.push(_fileid)
  19735. }
  19736. }
  19737. }
  19738. }
  19739. }
  19740. // **重点考虑该任务及工具名和工具内容的情况下*
  19741. let messages = `NOTICE
  19742. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  19743. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19744. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19745. Instruction: Based on the context, follow "Format example", write content.
  19746. #Context
  19747. ## 参考内容
  19748. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19749. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19750. 工具名称:${_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 : '无'}
  19751. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  19752. ## 要求
  19753. ${msg} 输出格式和内容要求参考#格式与要求
  19754. # Format example
  19755. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  19756. _this.taskDetailLoading3.push(_tindex)
  19757. _this.ttaskDetailLoading3.push(_tindex)
  19758. let _uuid = uuidv4();
  19759. // let params = JSON.stringify({
  19760. // // "model": "Chat",
  19761. // model: 'gpt-3.5-turbo',
  19762. // temperature: 0.1,
  19763. // max_tokens: 4096,
  19764. // top_p: 1,
  19765. // frequency_penalty: 0,
  19766. // presence_penalty: 0,
  19767. // messages: [{
  19768. // content: messages,
  19769. // role: 'user'
  19770. // }],
  19771. // uid: _uuid,
  19772. // mind_map_question: "",
  19773. // })
  19774. let params = {
  19775. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19776. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19777. session_name: _uuid,
  19778. userId: _this.userid,
  19779. uid: _uuid,
  19780. file_ids: fileid.length ? [...fileid] : '',
  19781. model: 'gpt-4o-2024-08-06',
  19782. temperature: 0.1,
  19783. }
  19784. // let params = JSON.stringify({
  19785. // message: {
  19786. // anthropic_version: "bedrock-2023-05-31",
  19787. // max_tokens: 4096,
  19788. // temperature: 0.1,
  19789. // top_p: 1,
  19790. // messages: [{
  19791. // "role": "user",
  19792. // "content": messages
  19793. // }] ,
  19794. // },
  19795. // uid: _uuid,
  19796. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19797. // });
  19798. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19799. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19800. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19801. console.log(response);
  19802. let data = response.data.FunctionResponse
  19803. // if (data.choices && data.choices.length && data.choices[0].message) {
  19804. // console.log(data.choices[0].message.content);
  19805. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  19806. // _this.$forceUpdate()
  19807. // }
  19808. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  19809. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19810. } else {
  19811. _this.$message.warning(response.data.FunctionResponse.result);
  19812. }
  19813. }).catch(function (error) {
  19814. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  19815. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  19816. if(error && error.message != 'Request canceled by the user.'){
  19817. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19818. }
  19819. console.log(error);
  19820. });
  19821. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  19822. },
  19823. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  19824. let _source;
  19825. try {
  19826. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19827. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19828. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19829. } catch(error) {
  19830. console.log('EventSource error:', event);
  19831. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19832. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19833. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  19834. return;
  19835. }
  19836. let _allText = "";
  19837. let _mdText = "";
  19838. let _iindex = 0
  19839. _source.onmessage = _e => {
  19840. let _eData = JSON.parse(_e.data).content;
  19841. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19842. //对话已经完成
  19843. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19844. _source.close();
  19845. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19846. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19847. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  19848. return;
  19849. } else {
  19850. _iindex++
  19851. //对话还在继续
  19852. let _text = "";
  19853. _text = _eData.replaceAll("'", "");
  19854. if (_allText == "") {
  19855. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19856. } else {
  19857. _allText += _text;
  19858. }
  19859. _mdText = _allText + "_";
  19860. _mdText = _mdText.replace(/\\n/g, "\n");
  19861. _mdText = _mdText.replace(/\\/g, "");
  19862. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19863. //转化返回的回复流数据
  19864. if(_iindex == 10){
  19865. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19866. _iindex = 0
  19867. }
  19868. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19869. // 处理流数据
  19870. }
  19871. // this.$forceUpdate();
  19872. };
  19873. let _this = this
  19874. _source.onerror = function(event) {
  19875. // 处理错误,可以尝试重新连接
  19876. console.log('EventSource error:', event);
  19877. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19878. _this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19879. _this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  19880. _source.close();
  19881. };
  19882. },
  19883. async aiDetail4(msg, index) {
  19884. if (!msg.length) {
  19885. this.$message.error("请添加评价后才能优化")
  19886. return
  19887. }
  19888. let _this = this
  19889. const _tindex = 'task-' + index
  19890. const _tindex2 = index
  19891. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19892. if (_this.infoData.length) {
  19893. for (var i = 0; i < _this.infoData.length; i++) {
  19894. if(_this.infoData[i].fileid){
  19895. fileid.push(_this.infoData[i].fileid)
  19896. }else {
  19897. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19898. if(_fileid){
  19899. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19900. _this.$forceUpdate();
  19901. if(_fileid != 1){
  19902. fileid.push(_fileid)
  19903. }
  19904. }
  19905. }
  19906. }
  19907. }
  19908. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  19909. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  19910. if(_this.pingjiaInfoData[index][i].fileid){
  19911. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  19912. }
  19913. }
  19914. }
  19915. var _text = ""
  19916. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  19917. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  19918. // _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 : ''} `
  19919. _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 : ''} `
  19920. }
  19921. }
  19922. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19923. // **重点考虑该任务详情**
  19924. // let messages = `
  19925. // Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19926. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19927. // #Context
  19928. // ## 参考内容
  19929. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19930. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19931. // 评价设计:${_text}
  19932. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19933. // ## 要求
  19934. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  19935. // # 格式与要求
  19936. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19937. // # Format example
  19938. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  19939. let messages = `
  19940. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  19941. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19942. #Context
  19943. ## 参考内容
  19944. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19945. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19946. ${_text ? '评价设计:'+_text : ''}
  19947. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19948. ## 要求
  19949. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  19950. # 格式与要求
  19951. 核心素养:从教案中提取
  19952. 目标:从教案中提取
  19953. 评价标准:从教案中提取评价标准
  19954. # Format example
  19955. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  19956. _this.taskDetailLoading4.push(_tindex)
  19957. // let params = JSON.stringify({
  19958. // // "model": "Chat",
  19959. // model: 'gpt-3.5-turbo',
  19960. // temperature: 0.1,
  19961. // max_tokens: 4096,
  19962. // top_p: 1,
  19963. // frequency_penalty: 0,
  19964. // presence_penalty: 0,
  19965. // messages: [{
  19966. // content: messages,
  19967. // role: 'user'
  19968. // }],
  19969. // stream: false,
  19970. // uid: this.userid,
  19971. // mind_map_question: "",
  19972. // })
  19973. let params = {
  19974. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19975. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19976. session_name: uuidv4(),
  19977. userId: _this.userid,
  19978. file_ids: fileid.length ? [...fileid] : '',
  19979. model: 'gpt-4o-2024-08-06',
  19980. temperature: 0.1,
  19981. }
  19982. // let params = JSON.stringify({
  19983. // message: {
  19984. // anthropic_version: "bedrock-2023-05-31",
  19985. // max_tokens: 4096,
  19986. // temperature: 0.1,
  19987. // top_p: 1,
  19988. // messages: [{
  19989. // content: messages,
  19990. // role: 'user'
  19991. // }], //
  19992. // },
  19993. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19994. // });
  19995. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19996. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  19997. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19998. console.log(response);
  19999. let data = response.data.FunctionResponse
  20000. // if (data.choices && data.choices.length && data.choices[0].message) {
  20001. // console.log(data.choices[0].message.content);
  20002. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  20003. // _this.$forceUpdate()
  20004. // }
  20005. if (data.message) {
  20006. console.log(data.message);
  20007. try {
  20008. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  20009. } catch (e) {
  20010. console.log("error_________________" + e);
  20011. // _this.$message.error(data.message)
  20012. try {
  20013. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20014. let match = data.message.match(regex);
  20015. let elist = JSON.parse(match[0])
  20016. elist = elist.filter(el=>{
  20017. el.isai = 1
  20018. return el
  20019. })
  20020. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  20021. // var message = data.message;
  20022. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20023. // var jsonEnd = message.indexOf("```", jsonStart);
  20024. // if (jsonStart !== -1 && jsonEnd !== -1) {
  20025. // var jsonString = message
  20026. // .substring(jsonStart, jsonEnd)
  20027. // .trim();
  20028. // var _data2 = JSON.parse(jsonString);
  20029. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  20030. // }
  20031. } catch (error) {
  20032. }
  20033. }
  20034. _this.$forceUpdate()
  20035. }
  20036. // if (data.result) {
  20037. // console.log(data.result);
  20038. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  20039. // _this.$forceUpdate()
  20040. // }
  20041. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20042. }).catch(function (error) {
  20043. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20044. if(error && error.message != 'Request canceled by the user.'){
  20045. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20046. }
  20047. console.log(error);
  20048. });
  20049. },
  20050. async aiDetail5(msg, index) {
  20051. let _this = this
  20052. const _tindex = 'task-' + index
  20053. const _tindex2 = index
  20054. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20055. if (_this.infoData.length) {
  20056. for (var i = 0; i < _this.infoData.length; i++) {
  20057. if(_this.infoData[i].fileid){
  20058. fileid.push(_this.infoData[i].fileid)
  20059. }else {
  20060. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20061. if(_fileid){
  20062. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20063. _this.$forceUpdate();
  20064. if(_fileid != 1){
  20065. fileid.push(_fileid)
  20066. }
  20067. }
  20068. }
  20069. }
  20070. }
  20071. let url = []
  20072. if (this.infoData.length) {
  20073. for (var i = 0; i < this.infoData.length; i++) {
  20074. url.push(this.infoData[i].url)
  20075. }
  20076. }
  20077. var _text = ""
  20078. var _text2 = ""
  20079. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20080. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20081. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20082. }
  20083. let messages = `
  20084. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  20085. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20086. --------
  20087. ## 要求
  20088. ${msg}
  20089. -------
  20090. ## 本教案描述
  20091. ${_this.aiCallBack}
  20092. -------
  20093. ## 课程大纲
  20094. ${_text}
  20095. -------
  20096. ## 其他教学任务教案
  20097. ${_text2}`
  20098. // ## 补充参考资料
  20099. // - 补充资料:${url.join(",")}
  20100. // - 补充描述:${this.courseText2}
  20101. _this.taskDetailLoading5.push(_tindex)
  20102. _this.ttaskDetailLoading5.push(_tindex)
  20103. let _uuid = uuidv4();
  20104. // let params = JSON.stringify({
  20105. // // "model": "Chat",
  20106. // model: 'gpt-3.5-turbo',
  20107. // temperature: 0.1,
  20108. // max_tokens: 4096,
  20109. // top_p: 1,
  20110. // frequency_penalty: 0,
  20111. // presence_penalty: 0,
  20112. // messages: [{
  20113. // content: messages,
  20114. // role: 'user'
  20115. // }],
  20116. // uid: _uuid,
  20117. // mind_map_question: "",
  20118. // })
  20119. let params = {
  20120. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20121. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20122. session_name: _uuid,
  20123. userId: _this.userid,
  20124. uid: _uuid,
  20125. file_ids: fileid.length ? [...fileid] : '',
  20126. model: 'gpt-4o-2024-08-06',
  20127. temperature: 0.1,
  20128. }
  20129. // let params = JSON.stringify({
  20130. // message: {
  20131. // anthropic_version: "bedrock-2023-05-31",
  20132. // max_tokens: 4096,
  20133. // temperature: 0.1,
  20134. // top_p: 1,
  20135. // messages: [{
  20136. // "role": "user",
  20137. // "content": messages
  20138. // }] ,
  20139. // },
  20140. // uid: _uuid,
  20141. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20142. // });
  20143. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20144. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20145. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20146. console.log(response);
  20147. // let data = response.data.FunctionResponse
  20148. // if (data.choices && data.choices.length && data.choices[0].message) {
  20149. // console.log(data.choices[0].message.content);
  20150. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20151. // _this.$forceUpdate()
  20152. // }
  20153. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20154. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20155. } else {
  20156. _this.$message.warning(response.data.FunctionResponse.result);
  20157. }
  20158. }).catch(function (error) {
  20159. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  20160. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  20161. if(error && error.message != 'Request canceled by the user.'){
  20162. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20163. }
  20164. console.log(error);
  20165. });
  20166. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  20167. },
  20168. aiDetail5getAiContent(_uid, loading, _tindex2) {
  20169. let _source;
  20170. try {
  20171. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20172. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20173. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20174. } catch(error){
  20175. console.log('EventSource error:', error);
  20176. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20177. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20178. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20179. return;
  20180. }
  20181. let _allText = "";
  20182. let _mdText = "";
  20183. let _iindex = 0
  20184. _source.onmessage = _e => {
  20185. let _eData = JSON.parse(_e.data).content;
  20186. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20187. //对话已经完成
  20188. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20189. _source.close();
  20190. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20191. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20192. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20193. return;
  20194. } else {
  20195. _iindex++
  20196. //对话还在继续
  20197. let _text = "";
  20198. _text = _eData.replaceAll("'", "");
  20199. if (_allText == "") {
  20200. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20201. } else {
  20202. _allText += _text;
  20203. }
  20204. _mdText = _allText + "_";
  20205. _mdText = _mdText.replace(/\\n/g, "\n");
  20206. _mdText = _mdText.replace(/\\/g, "");
  20207. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20208. //转化返回的回复流数据
  20209. if(_iindex == 10){
  20210. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20211. _iindex = 0
  20212. }
  20213. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20214. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20215. }
  20216. // 处理流数据
  20217. }
  20218. // this.$forceUpdate();
  20219. };
  20220. let _this = this
  20221. _source.onerror = function(event) {
  20222. // 处理错误,可以尝试重新连接
  20223. console.log('EventSource error:', event);
  20224. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20225. _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20226. _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20227. _source.close();
  20228. };
  20229. },
  20230. async aiDetail52(msg, index) {
  20231. let _this = this
  20232. const _tindex = 'task-' + index
  20233. const _tindex2 = index
  20234. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20235. if (_this.infoData.length) {
  20236. for (var i = 0; i < _this.infoData.length; i++) {
  20237. if(_this.infoData[i].fileid){
  20238. fileid.push(_this.infoData[i].fileid)
  20239. }else {
  20240. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20241. if(_fileid){
  20242. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20243. _this.$forceUpdate();
  20244. if(_fileid != 1){
  20245. fileid.push(_fileid)
  20246. }
  20247. }
  20248. }
  20249. }
  20250. }
  20251. let url = []
  20252. if (this.infoData.length) {
  20253. for (var i = 0; i < this.infoData.length; i++) {
  20254. url.push(this.infoData[i].url)
  20255. }
  20256. }
  20257. let taskN = []
  20258. let taskD = []
  20259. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  20260. if(_tindex2 != ti){
  20261. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  20262. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20263. }
  20264. }
  20265. let messages = `NOTICE
  20266. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20267. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  20268. #Context
  20269. ## 要求
  20270. ${msg}
  20271. ## 补充描述
  20272. 课程简要描述:${_this.courseText}
  20273. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20274. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  20275. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  20276. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20277. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  20278. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20279. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20280. `
  20281. // ## 补充参考资料
  20282. // - 补充资料:${url.join(",")}
  20283. // - 补充描述:${this.courseText2}
  20284. _this.taskDetailLoading5.push(_tindex)
  20285. _this.ttaskDetailLoading5.push(_tindex)
  20286. let _uuid = uuidv4();
  20287. // let params = JSON.stringify({
  20288. // // "model": "Chat",
  20289. // model: 'gpt-3.5-turbo',
  20290. // temperature: 0.1,
  20291. // max_tokens: 4096,
  20292. // top_p: 1,
  20293. // frequency_penalty: 0,
  20294. // presence_penalty: 0,
  20295. // messages: [{
  20296. // content: messages,
  20297. // role: 'user'
  20298. // }],
  20299. // uid: _uuid,
  20300. // mind_map_question: "",
  20301. // })
  20302. let params = {
  20303. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20304. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20305. session_name: _uuid,
  20306. userId: _this.userid,
  20307. uid: _uuid,
  20308. file_ids: fileid.length ? [...fileid] : '',
  20309. model: 'gpt-4o-2024-08-06',
  20310. temperature: 0.1,
  20311. }
  20312. // let params = JSON.stringify({
  20313. // message: {
  20314. // anthropic_version: "bedrock-2023-05-31",
  20315. // max_tokens: 4096,
  20316. // temperature: 0.1,
  20317. // top_p: 1,
  20318. // messages: [{
  20319. // "role": "user",
  20320. // "content": messages
  20321. // }] ,
  20322. // },
  20323. // uid: _uuid,
  20324. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20325. // });
  20326. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20327. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20328. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20329. console.log(response);
  20330. // let data = response.data.FunctionResponse
  20331. // if (data.choices && data.choices.length && data.choices[0].message) {
  20332. // console.log(data.choices[0].message.content);
  20333. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20334. // _this.$forceUpdate()
  20335. // }
  20336. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20337. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20338. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  20339. } else {
  20340. _this.$message.warning(response.data.FunctionResponse.result);
  20341. }
  20342. }).catch(function (error) {
  20343. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  20344. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  20345. if(error && error.message != 'Request canceled by the user.'){
  20346. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20347. }
  20348. console.log(error);
  20349. });
  20350. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  20351. },
  20352. aiDetail52getAiContent(_uid, loading, _tindex2) {
  20353. let _source;
  20354. try {
  20355. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20356. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20357. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20358. } catch(error) {
  20359. console.log('EventSource error:', error);
  20360. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20361. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20362. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20363. return;
  20364. }
  20365. let _allText = "";
  20366. let _mdText = "";
  20367. this.allTextArray[_tindex2] = ""
  20368. let _iindex = 0
  20369. _source.onmessage = async (_e) => {
  20370. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  20371. let _eData = JSON.parse(_e.data).content;
  20372. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20373. //对话已经完成
  20374. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20375. _source.close();
  20376. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20377. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20378. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20379. return;
  20380. } else {
  20381. _iindex++
  20382. //对话还在继续
  20383. let _text = "";
  20384. _text = _eData.replaceAll("'", "");
  20385. if (_allText == "") {
  20386. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20387. } else {
  20388. _allText += _text;
  20389. }
  20390. _mdText = _allText + "_";
  20391. _mdText = _mdText.replace(/\\n/g, "\n");
  20392. _mdText = _mdText.replace(/\\/g, "");
  20393. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20394. //转化返回的回复流数据
  20395. if(_iindex == 10){
  20396. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20397. _iindex = 0
  20398. }
  20399. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20400. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20401. }
  20402. // 处理流数据
  20403. }
  20404. };
  20405. let _this = this
  20406. _source.onerror = function(event) {
  20407. // 处理错误,可以尝试重新连接
  20408. console.log('EventSource error:', event);
  20409. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20410. _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20411. _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20412. _source.close();
  20413. };
  20414. },
  20415. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  20416. let _mdText = "";
  20417. let _eData = JSON.parse(_e.data).content;
  20418. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20419. //对话已经完成
  20420. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20421. _source.close();
  20422. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20423. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20424. return;
  20425. } else {
  20426. //对话还在继续
  20427. let _text = "";
  20428. _text = _eData.replaceAll("'", "");
  20429. if (this.allTextArray[_tindex2] == "") {
  20430. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20431. } else {
  20432. this.allTextArray[_tindex2] += _text;
  20433. }
  20434. _mdText = this.allTextArray[_tindex2] + "_";
  20435. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  20436. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  20437. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  20438. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  20439. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20440. // 处理流数据
  20441. }
  20442. },
  20443. async aiCpote(msg, callback) {
  20444. let _this = this
  20445. let _index = _this.aitype.replace("aiC","c")
  20446. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20447. if (_this.infoData.length) {
  20448. for (var i = 0; i < _this.infoData.length; i++) {
  20449. if(_this.infoData[i].fileid){
  20450. fileid.push(_this.infoData[i].fileid)
  20451. }else {
  20452. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20453. if(_fileid){
  20454. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20455. _this.$forceUpdate();
  20456. if(_fileid != 1){
  20457. fileid.push(_fileid)
  20458. }
  20459. }
  20460. }
  20461. }
  20462. }
  20463. let sub = []
  20464. if (this.courseTypeId.length) {
  20465. for (var i = 0; i < this.courseTypeId.length; i++) {
  20466. let _sid = this.courseTypeId[i]
  20467. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20468. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20469. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20470. }
  20471. }
  20472. }
  20473. }
  20474. let mclass = []
  20475. if (this.courseTypeId.length) {
  20476. for (var i = 0; i < this.courseTypeId.length; i++) {
  20477. let _sid = this.courseTypeId[i]
  20478. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20479. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20480. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20481. }
  20482. }
  20483. }
  20484. }
  20485. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  20486. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  20487. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  20488. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  20489. let messages = `NOTICE
  20490. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20491. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  20492. ${msg}
  20493. ## 课程简介
  20494. 课程名字:${this.courseName}
  20495. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20496. ${sub.length ? '学科:' + sub.join(",") : ''}
  20497. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20498. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20499. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  20500. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  20501. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  20502. _this.cpoteLoading[_index] = true
  20503. _this.cpotetLoading[_index] = true
  20504. let _uuid = uuidv4();
  20505. // let params = JSON.stringify({
  20506. // // "model": "Chat",
  20507. // model: 'gpt-3.5-turbo',
  20508. // temperature: 0.1,
  20509. // max_tokens: 4096,
  20510. // top_p: 1,
  20511. // frequency_penalty: 0,
  20512. // presence_penalty: 0,
  20513. // messages: [{
  20514. // content: messages,
  20515. // role: 'user'
  20516. // }],
  20517. // uid: _uuid,
  20518. // mind_map_question: "",
  20519. // })
  20520. let params = {
  20521. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20522. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20523. session_name: _uuid,
  20524. userId: _this.userid,
  20525. uid: _uuid,
  20526. file_ids: fileid.length ? [...fileid] : '',
  20527. model: 'gpt-4o-2024-08-06',
  20528. temperature: 0.1,
  20529. }
  20530. // let params = JSON.stringify({
  20531. // message: {
  20532. // anthropic_version: "bedrock-2023-05-31",
  20533. // max_tokens: 4096,
  20534. // temperature: 0.1,
  20535. // top_p: 1,
  20536. // messages: [{
  20537. // "role": "user",
  20538. // "content": messages
  20539. // }] ,
  20540. // },
  20541. // uid: _uuid,
  20542. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20543. // });
  20544. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20545. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20546. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20547. console.log(response);
  20548. // let data = response.data.FunctionResponse
  20549. // if (data.choices && data.choices.length && data.choices[0].message) {
  20550. // console.log(data.choices[0].message.content);
  20551. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20552. // _this.$forceUpdate()
  20553. // }
  20554. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20555. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20556. } else {
  20557. _this.$message.warning(response.data.FunctionResponse.result);
  20558. }
  20559. }).catch(function (error) {
  20560. _this.cpoteLoading[_index] = false
  20561. _this.cpotetLoading[_index] = false
  20562. callback ? callback() : ''
  20563. if(error && error.message != 'Request canceled by the user.'){
  20564. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20565. }
  20566. console.log(error);
  20567. });
  20568. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  20569. },
  20570. aiCpotegetAiContent(_uid, loading, callback) {
  20571. let _source;
  20572. try {
  20573. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20574. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20575. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20576. } catch(error){
  20577. console.log('EventSource error:', error);
  20578. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20579. this.cpoteLoading[loading] = false
  20580. this.cpotetLoading[loading] = false
  20581. return;
  20582. }
  20583. let _allText = "";
  20584. let _mdText = "";
  20585. let _iindex = 0
  20586. _source.onmessage = _e => {
  20587. let _eData = JSON.parse(_e.data).content;
  20588. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20589. //对话已经完成
  20590. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20591. _source.close();
  20592. this.cpote[loading] = _mdText;
  20593. this.cpoteLoading[loading] = false
  20594. this.cpotetLoading[loading] = false
  20595. callback ? callback() : ''
  20596. return;
  20597. } else {
  20598. _iindex++
  20599. //对话还在继续
  20600. let _text = "";
  20601. _text = _eData.replaceAll("'", "");
  20602. if (_allText == "") {
  20603. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20604. } else {
  20605. _allText += _text;
  20606. }
  20607. _mdText = _allText + "_";
  20608. _mdText = _mdText.replace(/\\n/g, "\n");
  20609. _mdText = _mdText.replace(/\\/g, "");
  20610. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20611. //转化返回的回复流数据
  20612. if(_iindex == 10){
  20613. this.cpote[loading] = _mdText;
  20614. _iindex = 0
  20615. }
  20616. this.cpoteLoading[loading] = false
  20617. // 处理流数据
  20618. }
  20619. // this.$forceUpdate();
  20620. };
  20621. let _this = this
  20622. _source.onerror = function(event) {
  20623. // 处理错误,可以尝试重新连接
  20624. console.log('EventSource error:', event);
  20625. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20626. _this.cpoteLoading[loading] = false
  20627. _this.cpotetLoading[loading] = false
  20628. _source.close();
  20629. };
  20630. },
  20631. async aiteacherTextDetail(msg) {
  20632. let _this = this
  20633. let fileid = []
  20634. if (_this.teacherInfoData.length) {
  20635. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  20636. if(_this.teacherInfoData[i].fileid){
  20637. fileid.push(_this.teacherInfoData[i].fileid)
  20638. }else {
  20639. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  20640. if(_fileid){
  20641. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20642. _this.$forceUpdate();
  20643. if(_fileid != 1){
  20644. fileid.push(_fileid)
  20645. }
  20646. }
  20647. }
  20648. }
  20649. }
  20650. _this.teacherTextLoading = true
  20651. _this.tteacherTextLoading = true
  20652. let sub = []
  20653. if (_this.courseTypeId.length) {
  20654. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20655. let _sid = _this.courseTypeId[i]
  20656. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20657. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20658. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20659. }
  20660. }
  20661. }
  20662. }
  20663. let mclass = []
  20664. if (_this.courseTypeId.length) {
  20665. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20666. let _sid = _this.courseTypeId[i]
  20667. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20668. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20669. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20670. }
  20671. }
  20672. }
  20673. }
  20674. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  20675. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  20676. let messages = `NOTICE
  20677. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20678. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  20679. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20680. Instruction: Based on the context, follow "Format example", write content.
  20681. #Context
  20682. ## 参考资料
  20683. 课程名字:${this.courseName}
  20684. ${sub.length ? '学科:' + sub.join(",") : ''}
  20685. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20686. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  20687. ## 要求
  20688. ${msg}
  20689. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20690. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  20691. let _uuid = uuidv4();
  20692. // let params = JSON.stringify({
  20693. // // "model": "Chat",
  20694. // model: 'gpt-3.5-turbo',
  20695. // temperature: 0.1,
  20696. // max_tokens: 4096,
  20697. // top_p: 1,
  20698. // frequency_penalty: 0,
  20699. // presence_penalty: 0,
  20700. // messages: [{
  20701. // content: messages,
  20702. // role: 'user'
  20703. // }],
  20704. // uid: _uuid,
  20705. // mind_map_question: "",
  20706. // })
  20707. let params = {
  20708. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20709. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20710. session_name: _uuid,
  20711. userId: _this.userid,
  20712. uid: _uuid,
  20713. file_ids: fileid.length ? [...fileid] : '',
  20714. model: 'gpt-4o-2024-08-06',
  20715. temperature: 0.1,
  20716. }
  20717. // let params = JSON.stringify({
  20718. // message: {
  20719. // anthropic_version: "bedrock-2023-05-31",
  20720. // max_tokens: 4096,
  20721. // temperature: 0.1,
  20722. // top_p: 1,
  20723. // messages: [{
  20724. // "role": "user",
  20725. // "content": messages
  20726. // }] ,
  20727. // },
  20728. // uid: _uuid,
  20729. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20730. // });
  20731. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20732. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  20733. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20734. console.log(response);
  20735. // let data = response.data.FunctionResponse
  20736. // if (data.choices && data.choices.length && data.choices[0].message) {
  20737. // _this.courseText = data.choices[0].message.content
  20738. // }
  20739. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20740. } else {
  20741. _this.$message.warning(response.data.FunctionResponse.result);
  20742. }
  20743. _this.isTeacherTextCancelToken = null
  20744. }).catch(function (error) {
  20745. _this.teacherTextLoading = false
  20746. _this.tteacherTextLoading = false
  20747. _this.isTeacherTextCancelToken = null
  20748. if(error && error.message != 'Request canceled by the user.'){
  20749. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20750. }
  20751. console.log(error);
  20752. });
  20753. await _this.aiteacherTextDetailgetAiContent(_uuid)
  20754. },
  20755. aiteacherTextDetailgetAiContent(_uid) {
  20756. try {
  20757. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20758. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20759. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20760. } catch(error) {
  20761. console.log('EventSource error:', event);
  20762. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20763. this.teacherTextLoading = false
  20764. this.tteacherTextLoading = false
  20765. this.isTeacherTextCancelToken = null
  20766. return;
  20767. }
  20768. let _allText = "";
  20769. let _mdText = "";
  20770. let _iindex = 0
  20771. this.isTeacherTextCancelSource.onmessage = _e => {
  20772. let _eData = JSON.parse(_e.data).content;
  20773. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20774. //对话已经完成
  20775. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20776. this.isTeacherTextCancelSource.close();
  20777. this.isTeacherTextCancelSource = null;
  20778. this.teacherCourseText = _mdText;
  20779. this.teacherTextLoading = false
  20780. this.tteacherTextLoading = false
  20781. this.teacherCourseTextB = false
  20782. this.isTeacherTextCancelToken = null
  20783. return;
  20784. } else {
  20785. _iindex++
  20786. //对话还在继续
  20787. let _text = "";
  20788. _text = _eData.replaceAll("'", "");
  20789. if (_allText == "") {
  20790. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20791. } else {
  20792. _allText += _text;
  20793. }
  20794. _mdText = _allText + "_";
  20795. _mdText = _mdText.replace(/\\n/g, "\n");
  20796. _mdText = _mdText.replace(/\\/g, "");
  20797. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20798. //转化返回的回复流数据
  20799. if(_iindex == 10){
  20800. this.teacherCourseText = _mdText;
  20801. _iindex = 0
  20802. }
  20803. if(this.teacherTextLoading){
  20804. this.teacherTextLoading = false
  20805. }
  20806. // 处理流数据
  20807. }
  20808. // this.$forceUpdate();
  20809. };
  20810. let _this = this
  20811. this.isTeacherTextCancelSource.onerror = function(event) {
  20812. // 处理错误,可以尝试重新连接
  20813. console.log('EventSource error:', event);
  20814. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20815. _this.teacherTextLoading = false
  20816. _this.tteacherTextLoading = false
  20817. _this.isTeacherTextCancelToken = null
  20818. _this.isTeacherTextCancelSource.close();
  20819. _this.isTeacherTextCancelSource = null;
  20820. };
  20821. },
  20822. async aitargetTextDetail(msg) {
  20823. let _this = this
  20824. let fileid = []
  20825. if (_this.teacherInfoData.length) {
  20826. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  20827. if(_this.teacherInfoData[i].fileid){
  20828. fileid.push(_this.teacherInfoData[i].fileid)
  20829. }else {
  20830. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  20831. if(_fileid){
  20832. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20833. _this.$forceUpdate();
  20834. if(_fileid != 1){
  20835. fileid.push(_fileid)
  20836. }
  20837. }
  20838. }
  20839. }
  20840. }
  20841. _this.targetTextLoading = true
  20842. _this.ttargetTextLoading = true
  20843. let sub = []
  20844. if (_this.courseTypeId.length) {
  20845. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20846. let _sid = _this.courseTypeId[i]
  20847. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20848. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20849. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20850. }
  20851. }
  20852. }
  20853. }
  20854. let mclass = []
  20855. if (_this.courseTypeId.length) {
  20856. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20857. let _sid = _this.courseTypeId[i]
  20858. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20859. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20860. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20861. }
  20862. }
  20863. }
  20864. }
  20865. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  20866. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  20867. let messages = `NOTICE
  20868. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20869. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  20870. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20871. Instruction: Based on the context, follow "Format example", write content.
  20872. #Context
  20873. ## 参考资料
  20874. 课程名字:${this.courseName}
  20875. ${sub.length ? '学科:' + sub.join(",") : ''}
  20876. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20877. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20878. ## 要求
  20879. ${msg}
  20880. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20881. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  20882. let _uuid = uuidv4();
  20883. // let params = JSON.stringify({
  20884. // // "model": "Chat",
  20885. // model: 'gpt-3.5-turbo',
  20886. // temperature: 0.1,
  20887. // max_tokens: 4096,
  20888. // top_p: 1,
  20889. // frequency_penalty: 0,
  20890. // presence_penalty: 0,
  20891. // messages: [{
  20892. // content: messages,
  20893. // role: 'user'
  20894. // }],
  20895. // uid: _uuid,
  20896. // mind_map_question: "",
  20897. // })
  20898. let params = {
  20899. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20900. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20901. session_name: _uuid,
  20902. userId: _this.userid,
  20903. uid: _uuid,
  20904. file_ids: fileid.length ? [...fileid] : '',
  20905. model: 'gpt-4o-2024-08-06',
  20906. temperature: 0.1,
  20907. }
  20908. // let params = JSON.stringify({
  20909. // message: {
  20910. // anthropic_version: "bedrock-2023-05-31",
  20911. // max_tokens: 4096,
  20912. // temperature: 0.1,
  20913. // top_p: 1,
  20914. // messages: [{
  20915. // "role": "user",
  20916. // "content": messages
  20917. // }] ,
  20918. // },
  20919. // uid: _uuid,
  20920. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20921. // });
  20922. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20923. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  20924. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20925. console.log(response);
  20926. // let data = response.data.FunctionResponse
  20927. // if (data.choices && data.choices.length && data.choices[0].message) {
  20928. // _this.courseText = data.choices[0].message.content
  20929. // }
  20930. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20931. } else {
  20932. _this.$message.warning(response.data.FunctionResponse.result);
  20933. }
  20934. _this.isTargetCancelToken1 = null
  20935. }).catch(function (error) {
  20936. _this.targetTextLoading = false
  20937. _this.ttargetTextLoading = false
  20938. _this.isTargetCancelToken1 = null
  20939. if(error && error.message != 'Request canceled by the user.'){
  20940. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20941. }
  20942. console.log(error);
  20943. });
  20944. await _this.aitargetTextDetailgetAiContent(_uuid)
  20945. },
  20946. aitargetTextDetailgetAiContent(_uid) {
  20947. try {
  20948. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20949. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20950. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20951. } catch (error) {
  20952. console.log('EventSource error:', error);
  20953. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20954. this.targetTextLoading = false
  20955. this.ttargetTextLoading = false
  20956. this.isTargetCancelToken1 = null
  20957. return;
  20958. }
  20959. let _allText = "";
  20960. let _mdText = "";
  20961. let _iindex = 0
  20962. this.isTargetCancelSource1.onmessage = _e => {
  20963. let _eData = JSON.parse(_e.data).content;
  20964. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20965. //对话已经完成
  20966. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20967. this.isTargetCancelSource1.close();
  20968. this.isTargetCancelSource1 = null;
  20969. this.targetCourseText = _mdText;
  20970. this.targetTextLoading = false
  20971. this.ttargetTextLoading = false
  20972. this.targetCourseTextB = false
  20973. this.isTargetCancelToken1 = null
  20974. return;
  20975. } else {
  20976. _iindex++
  20977. //对话还在继续
  20978. let _text = "";
  20979. _text = _eData.replaceAll("'", "");
  20980. if (_allText == "") {
  20981. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20982. } else {
  20983. _allText += _text;
  20984. }
  20985. _mdText = _allText + "_";
  20986. _mdText = _mdText.replace(/\\n/g, "\n");
  20987. _mdText = _mdText.replace(/\\/g, "");
  20988. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20989. //转化返回的回复流数据
  20990. if(_iindex == 10){
  20991. this.targetCourseText = _mdText;
  20992. _iindex = 0
  20993. }
  20994. if(this.targetTextLoading){
  20995. this.targetTextLoading = false
  20996. }
  20997. // 处理流数据
  20998. }
  20999. // this.$forceUpdate();
  21000. };
  21001. let _this = this
  21002. this.isTargetCancelSource1.onerror = function(event) {
  21003. // 处理错误,可以尝试重新连接
  21004. console.log('EventSource error:', event);
  21005. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21006. _this.targetTextLoading = false
  21007. _this.ttargetTextLoading = false
  21008. _this.isTargetCancelToken1 = null
  21009. _this.isTargetCancelSource1.close();
  21010. _this.isTargetCancelSource1 = null;
  21011. };
  21012. },
  21013. async aitargetTextDetail2(msg) {
  21014. let _this = this
  21015. let fileid = []
  21016. if(_this.mubiaoInfoData.length){
  21017. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21018. if(_this.mubiaoInfoData[i].fileid){
  21019. fileid.push(_this.mubiaoInfoData[i].fileid)
  21020. }else {
  21021. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21022. if(_fileid){
  21023. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21024. _this.$forceUpdate();
  21025. if(_fileid != 1){
  21026. fileid.push(_fileid)
  21027. }
  21028. }
  21029. }
  21030. }
  21031. }
  21032. _this.targetTextLoading2 = true
  21033. _this.ttargetTextLoading2 = true
  21034. let sub = []
  21035. if (_this.courseTypeId.length) {
  21036. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21037. let _sid = _this.courseTypeId[i]
  21038. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21039. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21040. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21041. }
  21042. }
  21043. }
  21044. }
  21045. let mclass = []
  21046. if (_this.courseTypeId.length) {
  21047. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21048. let _sid = _this.courseTypeId[i]
  21049. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21050. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21051. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21052. }
  21053. }
  21054. }
  21055. }
  21056. if(sub.length){
  21057. let _fileid = _this.importFileid(sub)
  21058. fileid = [...fileid, ..._fileid]
  21059. }
  21060. let messages = `NOTICE
  21061. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21062. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  21063. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21064. Instruction: Based on the context, follow "Format example", write content.
  21065. #Context
  21066. ## 参考资料
  21067. 课程标题:${this.courseName}
  21068. ${sub.length ? '学科:' + sub.join(",") : ''}
  21069. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21070. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  21071. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21072. ## 要求
  21073. ${msg}
  21074. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21075. let _uuid = uuidv4();
  21076. // let params = JSON.stringify({
  21077. // // "model": "Chat",
  21078. // model: 'gpt-3.5-turbo',
  21079. // temperature: 0.1,
  21080. // max_tokens: 4096,
  21081. // top_p: 1,
  21082. // frequency_penalty: 0,
  21083. // presence_penalty: 0,
  21084. // messages: [{
  21085. // content: messages,
  21086. // role: 'user'
  21087. // }],
  21088. // uid: _uuid,
  21089. // mind_map_question: "",
  21090. // })
  21091. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21092. let params = {
  21093. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21094. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21095. session_name: _uuid,
  21096. userId: _this.userid,
  21097. uid: _uuid,
  21098. file_ids: fileid.length ? [...fileid] : '',
  21099. model: 'gpt-4o-2024-08-06',
  21100. temperature: 0.1,
  21101. }
  21102. // let params = JSON.stringify({
  21103. // message: {
  21104. // anthropic_version: "bedrock-2023-05-31",
  21105. // max_tokens: 4096,
  21106. // temperature: 0.1,
  21107. // top_p: 1,
  21108. // messages: [{
  21109. // "role": "user",
  21110. // "content": messages
  21111. // }] ,
  21112. // },
  21113. // uid: _uuid,
  21114. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21115. // });
  21116. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21117. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  21118. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21119. console.log(response);
  21120. // let data = response.data.FunctionResponse
  21121. // if (data.choices && data.choices.length && data.choices[0].message) {
  21122. // _this.courseText = data.choices[0].message.content
  21123. // }
  21124. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21125. } else {
  21126. _this.$message.warning(response.data.FunctionResponse.result);
  21127. }
  21128. _this.isTargetCancelToken2 = null
  21129. }).catch(function (error) {
  21130. _this.targetTextLoading2 = false
  21131. _this.ttargetTextLoading2 = false
  21132. _this.isTargetCancelToken2 = null
  21133. if(error && error.message != 'Request canceled by the user.'){
  21134. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21135. }
  21136. console.log(error);
  21137. });
  21138. await _this.aitargetTextDetail2getAiContent(_uuid)
  21139. },
  21140. importFileid(sub){
  21141. // file-SNthYVubrHGg4HjFcp3FPkZq 英语
  21142. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养
  21143. // file-nkAUyRCEMncICGuFBC1WXnM1 科学素养内涵
  21144. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文
  21145. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学核心素养
  21146. // file-35koyXrFO2T4FsrQe4qXm0io 数学素养内涵
  21147. let _sub = converter(sub.join(","))
  21148. let fileid = []
  21149. if(_sub.indexOf(converter('STEM')) != -1){
  21150. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  21151. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  21152. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  21153. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  21154. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  21155. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  21156. }
  21157. if(_sub.indexOf(converter('语文')) != -1){
  21158. if(fileid.indexOf('file-aQmfmgrwdrHa9sCTTZkjvK7Z') == -1){
  21159. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  21160. }
  21161. }
  21162. if(_sub.indexOf(converter('数学')) != -1){
  21163. if(fileid.indexOf('file-G1bRfSFnQaQtzA3c8dLshg0a') == -1){
  21164. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  21165. }
  21166. if(fileid.indexOf('file-35koyXrFO2T4FsrQe4qXm0io') == -1){
  21167. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  21168. }
  21169. }
  21170. if(_sub.indexOf(converter('英语')) != -1){
  21171. if(fileid.indexOf('file-SNthYVubrHGg4HjFcp3FPkZq') == -1){
  21172. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  21173. }
  21174. }
  21175. if(_sub.indexOf(converter('科学')) != -1){
  21176. if(fileid.indexOf('file-QOKhi8i84T8eR6DYhb9TaTlG') == -1){
  21177. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  21178. }
  21179. if(fileid.indexOf('file-nkAUyRCEMncICGuFBC1WXnM1') == -1){
  21180. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  21181. }
  21182. }
  21183. return fileid
  21184. },
  21185. async aitargetTextDetail22(msg,msg2) {
  21186. let _this = this
  21187. let fileid = []
  21188. _this.targetTextLoading2 = true
  21189. _this.ttargetTextLoading2 = true
  21190. let sub = []
  21191. if (_this.courseTypeId.length) {
  21192. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21193. let _sid = _this.courseTypeId[i]
  21194. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21195. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21196. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21197. }
  21198. }
  21199. }
  21200. }
  21201. let mclass = []
  21202. if (_this.courseTypeId.length) {
  21203. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21204. let _sid = _this.courseTypeId[i]
  21205. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21206. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21207. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21208. }
  21209. }
  21210. }
  21211. }
  21212. if(!msg2 && sub.length){
  21213. let _fileid = _this.importFileid(sub)
  21214. fileid = [...fileid, ..._fileid]
  21215. }
  21216. let messages = `NOTICE
  21217. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21218. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  21219. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21220. Instruction: Based on the context, follow "Format example", write content.
  21221. #Context
  21222. ## 参考资料
  21223. 课程标题:${this.courseName}
  21224. ${sub.length ? '学科:' + sub.join(",") : ''}
  21225. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21226. 课程目标:${msg2}
  21227. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  21228. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21229. ## 要求
  21230. ${msg}
  21231. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21232. let _uuid = uuidv4();
  21233. // let params = JSON.stringify({
  21234. // // "model": "Chat",
  21235. // model: 'gpt-3.5-turbo',
  21236. // temperature: 0.1,
  21237. // max_tokens: 4096,
  21238. // top_p: 1,
  21239. // frequency_penalty: 0,
  21240. // presence_penalty: 0,
  21241. // messages: [{
  21242. // content: messages,
  21243. // role: 'user'
  21244. // }],
  21245. // uid: _uuid,
  21246. // mind_map_question: "",
  21247. // })
  21248. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21249. let params = {
  21250. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21251. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21252. session_name: _uuid,
  21253. userId: _this.userid,
  21254. uid: _uuid,
  21255. file_ids: fileid.length ? [...fileid] : '',
  21256. model: 'gpt-4o-2024-08-06',
  21257. temperature: 0.1,
  21258. }
  21259. // let params = JSON.stringify({
  21260. // message: {
  21261. // anthropic_version: "bedrock-2023-05-31",
  21262. // max_tokens: 4096,
  21263. // temperature: 0.1,
  21264. // top_p: 1,
  21265. // messages: [{
  21266. // "role": "user",
  21267. // "content": messages
  21268. // }] ,
  21269. // },
  21270. // uid: _uuid,
  21271. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21272. // });
  21273. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21274. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  21275. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21276. console.log(response);
  21277. // let data = response.data.FunctionResponse
  21278. // if (data.choices && data.choices.length && data.choices[0].message) {
  21279. // _this.courseText = data.choices[0].message.content
  21280. // }
  21281. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21282. } else {
  21283. _this.$message.warning(response.data.FunctionResponse.result);
  21284. }
  21285. _this.isTargetCancelToken2 = null
  21286. }).catch(function (error) {
  21287. _this.targetTextLoading2 = false
  21288. _this.ttargetTextLoading2 = false
  21289. _this.isTargetCancelToken2 = null
  21290. if(error && error.message != 'Request canceled by the user.'){
  21291. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21292. }
  21293. console.log(error);
  21294. });
  21295. await _this.aitargetTextDetail2getAiContent(_uuid)
  21296. },
  21297. aitargetTextDetail2getAiContent(_uid) {
  21298. try {
  21299. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21300. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21301. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21302. } catch(error) {
  21303. console.log('EventSource error:', error);
  21304. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21305. this.targetTextLoading2 = false
  21306. this.ttargetTextLoading2 = false
  21307. this.isTargetCancelToken2 = null
  21308. return;
  21309. }
  21310. let _allText = "";
  21311. let _mdText = "";
  21312. let _iindex = 0
  21313. this.isTargetCancelSource2.onmessage = _e => {
  21314. let _eData = JSON.parse(_e.data).content;
  21315. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21316. //对话已经完成
  21317. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21318. this.isTargetCancelSource2.close();
  21319. this.isTargetCancelSource2 = null;
  21320. this.targetCourseText2 = _mdText;
  21321. this.targetTextLoading2 = false
  21322. this.ttargetTextLoading2 = false
  21323. this.targetCourseText2B = false
  21324. this.isTargetCancelToken2 = null
  21325. return;
  21326. } else {
  21327. _iindex++
  21328. //对话还在继续
  21329. let _text = "";
  21330. _text = _eData.replaceAll("'", "");
  21331. if (_allText == "") {
  21332. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21333. } else {
  21334. _allText += _text;
  21335. }
  21336. _mdText = _allText + "_";
  21337. _mdText = _mdText.replace(/\\n/g, "\n");
  21338. _mdText = _mdText.replace(/\\/g, "");
  21339. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21340. //转化返回的回复流数据
  21341. if(_iindex == 10){
  21342. this.targetCourseText2 = _mdText;
  21343. _iindex = 0
  21344. }
  21345. if(this.targetTextLoading2){
  21346. this.targetTextLoading2 = false
  21347. }
  21348. // 处理流数据
  21349. }
  21350. // this.$forceUpdate();
  21351. };
  21352. let _this = this
  21353. this.isTargetCancelSource2.onerror = function(event) {
  21354. // 处理错误,可以尝试重新连接
  21355. console.log('EventSource error:', event);
  21356. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21357. _this.targetTextLoading2 = false
  21358. _this.ttargetTextLoading2 = false
  21359. _this.isTargetCancelToken2 = null
  21360. _this.isTargetCancelSource2.close();
  21361. _this.isTargetCancelSource2 = null;
  21362. };
  21363. },
  21364. async aitargetTextDetail3(msg) {
  21365. let _this = this
  21366. let fileid = []
  21367. if(_this.mubiaoInfoData.length){
  21368. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21369. if(_this.mubiaoInfoData[i].fileid){
  21370. fileid.push(_this.mubiaoInfoData[i].fileid)
  21371. }else {
  21372. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21373. if(_fileid){
  21374. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21375. _this.$forceUpdate();
  21376. if(_fileid != 1){
  21377. fileid.push(_fileid)
  21378. }
  21379. }
  21380. }
  21381. }
  21382. }
  21383. _this.targetTextLoading2 = true
  21384. _this.ttargetTextLoading2 = true
  21385. let sub = []
  21386. if (_this.courseTypeId.length) {
  21387. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21388. let _sid = _this.courseTypeId[i]
  21389. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21390. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21391. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21392. }
  21393. }
  21394. }
  21395. }
  21396. let mclass = []
  21397. if (_this.courseTypeId.length) {
  21398. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21399. let _sid = _this.courseTypeId[i]
  21400. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21401. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21402. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21403. }
  21404. }
  21405. }
  21406. }
  21407. if(sub.length){
  21408. let _fileid = _this.importFileid(sub)
  21409. fileid = [...fileid, ..._fileid]
  21410. }
  21411. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21412. let messages = `${msg}`
  21413. let _uuid = uuidv4();
  21414. // let params = JSON.stringify({
  21415. // // "model": "Chat",
  21416. // model: 'gpt-3.5-turbo',
  21417. // temperature: 0.1,
  21418. // max_tokens: 4096,
  21419. // top_p: 1,
  21420. // frequency_penalty: 0,
  21421. // presence_penalty: 0,
  21422. // messages: [{
  21423. // content: messages,
  21424. // role: 'user'
  21425. // }],
  21426. // uid: _uuid,
  21427. // mind_map_question: "",
  21428. // })
  21429. let params = {
  21430. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21431. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21432. session_name: _uuid,
  21433. userId: _this.userid,
  21434. uid: _uuid,
  21435. file_ids: fileid.length ? [...fileid] : '',
  21436. model: 'gpt-4o-2024-08-06',
  21437. temperature: 0.1,
  21438. }
  21439. // let params = JSON.stringify({
  21440. // message: {
  21441. // anthropic_version: "bedrock-2023-05-31",
  21442. // max_tokens: 4096,
  21443. // temperature: 0.1,
  21444. // top_p: 1,
  21445. // messages: [{
  21446. // "role": "user",
  21447. // "content": messages
  21448. // }] ,
  21449. // },
  21450. // uid: _uuid,
  21451. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21452. // });
  21453. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21454. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  21455. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21456. console.log(response);
  21457. // let data = response.data.FunctionResponse
  21458. // if (data.choices && data.choices.length && data.choices[0].message) {
  21459. // _this.courseText = data.choices[0].message.content
  21460. // }
  21461. console.log(response);
  21462. let data = response.data.FunctionResponse
  21463. // if (data.choices && data.choices.length && data.choices[0].message) {
  21464. // console.log(data.choices[0].message.content);
  21465. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  21466. // _this.$forceUpdate()
  21467. // }
  21468. if (data.message) {
  21469. console.log('返回回来的目标:',data.message);
  21470. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  21471. }
  21472. _this.isTargetCancelToken2 = null
  21473. }).catch(function (error) {
  21474. _this.targetTextLoading2 = false
  21475. _this.ttargetTextLoading2 = false
  21476. _this.isTargetCancelToken2 = null
  21477. if(error && error.message != 'Request canceled by the user.'){
  21478. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21479. }
  21480. console.log(error);
  21481. });
  21482. },
  21483. againEva(msg, i, k) {
  21484. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  21485. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  21486. return;
  21487. }
  21488. if (this.ruleLoading[i]) {
  21489. this.ruleLoading[i][k] = true
  21490. } else {
  21491. this.ruleLoading[i] = []
  21492. this.ruleLoading[i][k] = true
  21493. }
  21494. let message = `NOTICE
  21495. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  21496. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  21497. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21498. Instruction: Based on the context, follow "Format example", write content.
  21499. #Context
  21500. ##要求
  21501. ${msg}
  21502. ##制定标准资料
  21503. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  21504. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  21505. # Format example
  21506. ==
  21507. 0 星,作业内容与作业要求无关;
  21508. 1 星,没有识别问题和需求;
  21509. 2 星,问题或需求没有被清晰理解或准确识别;
  21510. 3 星,问题或需求的一部分被识别;
  21511. 4 星,问题或需求的大部分被识别;
  21512. 5 星,问题或需求都被识别。
  21513. ==
  21514. `
  21515. // let params = {
  21516. // // "model": "Chat",
  21517. // model: 'gpt-4o-2024-08-06',
  21518. // // model: "gpt-4o",
  21519. // temperature: 0.1,
  21520. // max_tokens: 4096,
  21521. // top_p: 1,
  21522. // frequency_penalty: 0,
  21523. // presence_penalty: 0,
  21524. // messages: [
  21525. // {
  21526. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  21527. // role: "user"
  21528. // }
  21529. // ],
  21530. // stream: false,
  21531. // uid: this.userid,
  21532. // mind_map_question: ""
  21533. // };
  21534. // this.ajax
  21535. // .post("https://gpt4.cocorobo.cn/chat", params)
  21536. // .then(response => {
  21537. // let data = response.data.FunctionResponse;
  21538. // console.log("data", data);
  21539. // if (data.choices && data.choices.length && data.choices[0].message) {
  21540. // let content = data.choices[0].message.content;
  21541. // var regex = new RegExp('==([^=]+)==');
  21542. // let match = content.match(regex);
  21543. // if (match) {
  21544. // content = match[1].trim().replaceAll(' ', '');
  21545. // // 获取匹配到的内容并去除两端空格
  21546. // console.log('contentInsideDoubleEquals', content);
  21547. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21548. // console.log("未有星级。");
  21549. // this.againEva(msg, i, k)
  21550. // return
  21551. // }
  21552. // //  return
  21553. // } else {
  21554. // console.log("未找到匹配的内容。");
  21555. // this.againEva(msg, i, k)
  21556. // return
  21557. // }
  21558. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21559. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21560. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21561. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21562. // this.$forceUpdate();
  21563. // this.ruleLoading[i][k] = false
  21564. // }else{
  21565. // this.ruleLoading[i][k] = false
  21566. // }
  21567. // })
  21568. // .catch(error => {
  21569. // console.log(error);
  21570. // this.ruleLoading[i][k] = false
  21571. // });
  21572. let parm = {
  21573. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21574. message: [{"type":"text", "text":message.replaceAll('\n', " ").replaceAll('*', "")}],
  21575. session_name: uuidv4(),
  21576. userId: this.userid,
  21577. file_ids: [],
  21578. model: 'gpt-4o-2024-08-06',
  21579. temperature: 0.1,
  21580. }
  21581. this.ajax
  21582. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21583. .then(async (response) => {
  21584. console.log(response);
  21585. let data = response.data.FunctionResponse
  21586. if (data.message) {
  21587. console.log(data.message);
  21588. let content = data.message;
  21589. var regex = new RegExp('==([^=]+)==');
  21590. let match = content.match(regex);
  21591. if (match) {
  21592. content = match[1].trim().replaceAll(' ', '');
  21593. // 获取匹配到的内容并去除两端空格
  21594. console.log('contentInsideDoubleEquals', content);
  21595. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21596. console.log("未有星级。");
  21597. this.againEva(msg, i, k)
  21598. return
  21599. }
  21600. //  return
  21601. } else {
  21602. console.log("未找到匹配的内容。");
  21603. this.againEva(msg, i, k)
  21604. return
  21605. }
  21606. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21607. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21608. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21609. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21610. this.$forceUpdate();
  21611. this.ruleLoading[i][k] = false
  21612. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  21613. }else {
  21614. this.ruleLoading[i][k] = false
  21615. }
  21616. })
  21617. .catch((error) => {
  21618. this.ruleLoading[i][k] = false
  21619. console.log(error);
  21620. });
  21621. },
  21622. async aiSearchFile(messages, callback) {
  21623. let _this = this
  21624. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21625. console.log('fileid=========',fileid)
  21626. // let params = JSON.stringify({
  21627. // // "model": "Chat",
  21628. // model: 'gpt-3.5-turbo',
  21629. // temperature: 0.1,
  21630. // max_tokens: 4096,
  21631. // top_p: 1,
  21632. // frequency_penalty: 0,
  21633. // presence_penalty: 0,
  21634. // messages: [{
  21635. // content: messages,
  21636. // role: 'user'
  21637. // }],
  21638. // stream: false,
  21639. // uid: this.userid,
  21640. // mind_map_question: "",
  21641. // })
  21642. // // let params = JSON.stringify({
  21643. // // message: {
  21644. // // anthropic_version: "bedrock-2023-05-31",
  21645. // // max_tokens: 4096,
  21646. // // temperature: 0.1,
  21647. // // top_p: 1,
  21648. // // messages: [{
  21649. // // content: messages,
  21650. // // role: 'user'
  21651. // // }], //
  21652. // // },
  21653. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21654. // // });
  21655. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21656. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21657. // console.log(response);
  21658. // let data = response.data.FunctionResponse
  21659. // if (data.choices && data.choices.length && data.choices[0].message) {
  21660. // console.log(data.choices[0].message.content);
  21661. // let dArray = JSON.parse(data.choices[0].message.content)
  21662. // _this.dArray = dArray
  21663. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21664. // for (var i = 0; i < dArray.length; i++) {
  21665. // let _task = dArray[i]
  21666. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21667. // task: _task.task,
  21668. // taskDetail: "",
  21669. // taskDetail2: _task.detail,
  21670. // taskDetail3: "",
  21671. // chapterData: [],
  21672. // toolText: "",
  21673. // toolChoose: [
  21674. // {
  21675. // tool: [],
  21676. // toolDetail: "",
  21677. // toolType: 0,
  21678. // askCount: 1,
  21679. // askTitle: "",
  21680. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21681. // },
  21682. // ],
  21683. // isShowTools: false,
  21684. // askCount: 1,
  21685. // isFold: 0,
  21686. // askTitle: "",
  21687. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21688. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21689. // homeworkList: [],
  21690. // })
  21691. // }
  21692. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21693. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21694. // _this.$forceUpdate();
  21695. // }
  21696. // // if (data.result) {
  21697. // // console.log(data.result);
  21698. // // let dArray = JSON.parse(data.result)
  21699. // // _this.dArray = dArray
  21700. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  21701. // // for (var i = 0; i < dArray.length; i++) {
  21702. // // let _task = dArray[i]
  21703. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21704. // // task: _task.task,
  21705. // // taskDetail: "",
  21706. // // taskDetail2: _task.detail,
  21707. // // taskDetail3: "",
  21708. // // chapterData: [],
  21709. // // toolText: "",
  21710. // // toolChoose: [
  21711. // // {
  21712. // // tool: [],
  21713. // // toolDetail: "",
  21714. // // toolType: 0,
  21715. // // askCount: 1,
  21716. // // askTitle: "",
  21717. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21718. // // },
  21719. // // ],
  21720. // // isShowTools: false,
  21721. // // askCount: 1,
  21722. // // isFold: 1,
  21723. // // askTitle: "",
  21724. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21725. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  21726. // // homeworkList: [],
  21727. // // })
  21728. // // }
  21729. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21730. // // _this.$forceUpdate();
  21731. // // }
  21732. // callback ? callback() : ''
  21733. // }).catch(function (error) {
  21734. // _this.loading = false
  21735. // console.log(error);
  21736. // });
  21737. this.isFileCancelToken = this.ajax.setCancelSource();
  21738. let parm = {
  21739. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21740. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21741. session_name: uuidv4(),
  21742. userId: this.userid,
  21743. file_ids: fileid.length ? [...fileid] : '',
  21744. model: 'gpt-4o-2024-08-06',
  21745. temperature: 0.1,
  21746. }
  21747. this.ajax
  21748. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  21749. .then((response) => {
  21750. console.log(response);
  21751. let data = response.data.FunctionResponse
  21752. if (data.message) {
  21753. console.log(data.message);
  21754. let dArray = []
  21755. try {
  21756. let regex2 = new RegExp("/([{,])(\w+):/g")
  21757. //
  21758. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(/(?<!")content(?!")/g, '"content"'))
  21759. } catch (error) {
  21760. // callback ? callback() : ''
  21761. console.log("error_________________" + error);
  21762. try {
  21763. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21764. let match = data.message.match(regex);
  21765. dArray = JSON.parse(match[0]);
  21766. } catch (error) {
  21767. // callback ? callback() : ''
  21768. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  21769. console.log("error_________________" + error);
  21770. _this.isFileCancelToken = null;
  21771. _this.aiSearchFile(messages, callback)
  21772. return
  21773. }
  21774. }
  21775. for(let i = 0; i < dArray.length; i++){
  21776. let content = dArray[i].content
  21777. let name = '参考资料'+(i+1)
  21778. let md = new MarkdownIt();
  21779. let _html = content ? md.render(content) : ''
  21780. setTimeout(()=>{
  21781. if(i == (dArray.length - 1)){
  21782. _this.generate2(name, _html, i, callback)
  21783. }else {
  21784. _this.generate2(name, _html, i)
  21785. }
  21786. }, 500 * i)
  21787. }
  21788. _this.isFileCancelToken = null
  21789. _this.$forceUpdate();
  21790. }
  21791. })
  21792. .catch((error) => {
  21793. callback ? callback() : ''
  21794. _this.isFileCancelToken = null
  21795. console.log(error);
  21796. });
  21797. },
  21798. createFileid(url) {
  21799. let _this = this
  21800. return new Promise((resolve, reject) => {
  21801. try {
  21802. _this.ajax
  21803. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  21804. url: url,
  21805. })
  21806. .then((res) => {
  21807. let _data = res.data.FunctionResponse;
  21808. if (_data.result && _data.result.id) {
  21809. resolve(_data.result.id)
  21810. }else {
  21811. resolve(1)
  21812. }
  21813. }).catch(function (error) {
  21814. resolve(1)
  21815. });
  21816. }catch (e){
  21817. resolve(1)
  21818. }
  21819. });
  21820. }
  21821. },
  21822. beforeDestroy() {
  21823. clearTimeout(this.timer);
  21824. this.timer = null;
  21825. clearInterval(this.timer2);
  21826. this.timer2 = null;
  21827. clearInterval(this.pasteTimer);
  21828. this.pasteTimer = null;
  21829. },
  21830. beforeRouteLeave(to, from, next) {
  21831. clearTimeout(this.timer);
  21832. this.timer = null;
  21833. clearInterval(this.timer2);
  21834. this.timer2 = null;
  21835. clearInterval(this.pasteTimer);
  21836. this.pasteTimer = null;
  21837. next();
  21838. },
  21839. created() {
  21840. this.getStudent();
  21841. this.getTeacher();
  21842. this.getClass();
  21843. this.selectGrage();
  21844. this.getTemplate();
  21845. this.getTipsTemplate();
  21846. // this.selectType();
  21847. this.selectEva();
  21848. if(this.istemplate == 1){
  21849. this.isOutline = true
  21850. this.isOutline2 = true
  21851. this.courseTextBool = true
  21852. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  21853. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  21854. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  21855. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  21856. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  21857. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  21858. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  21859. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  21860. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  21861. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  21862. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  21863. }
  21864. this.loading = false;
  21865. this.timer2 = setInterval(() => {
  21866. this.selectEva();
  21867. }, 5000);
  21868. this.pasteTimer = setInterval(() => {
  21869. this.getPaste();
  21870. }, 1000);
  21871. setTimeout(() => {
  21872. // this.selectAllType();
  21873. this.selectCourseDetail();
  21874. }, 500);
  21875. let _this = this;
  21876. window.pasteStage = function (json) {
  21877. _this.pasteStage(json);
  21878. };
  21879. window.pasteTask = function (json) {
  21880. _this.pasteTask(json);
  21881. };
  21882. },
  21883. };
  21884. </script>
  21885. <style scoped>
  21886. @media screen and (max-width: 1280px) {
  21887. .mbCss {
  21888. flex-direction: column !important;
  21889. }
  21890. .pjCss {
  21891. width: 100% !important;
  21892. }
  21893. .evaCss {
  21894. width: 100% !important;
  21895. margin-top: 10px;
  21896. }
  21897. }
  21898. .el-table>>>.even_row {
  21899. background-color: #f1f1f1 !important;
  21900. }
  21901. .dialog_diy>>>.el-dialog__header {
  21902. background: #3c3c3c !important;
  21903. padding: 15px 20px;
  21904. }
  21905. .dialog_diy>>>.el-dialog__title {
  21906. color: #fff;
  21907. }
  21908. .dialog_diy>>>.el-dialog__headerbtn {
  21909. top: 19px;
  21910. }
  21911. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  21912. color: #fff;
  21913. }
  21914. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  21915. color: #fff;
  21916. }
  21917. .dialog_diy>>>.el-dialog__body,
  21918. .dialog_diy>>>.el-dialog__footer {
  21919. background: #fafafa;
  21920. }
  21921. .dialog_diy3>>>.el-dialog__body,
  21922. .dialog_diy3>>>.el-dialog__footer {
  21923. background: #eee !important;
  21924. }
  21925. .dialog_diy3>>>.el-dialog__body {
  21926. padding: 20px 20px;
  21927. }
  21928. .dialog_diyStage>>>.el-dialog__body {
  21929. padding: 10px;
  21930. }
  21931. .source_diy>>>.el-dialog {
  21932. height: 100% !important;
  21933. margin: 0 auto !important;
  21934. }
  21935. .source_diy>>>.el-dialog__body {
  21936. height: calc(100% - 185px);
  21937. overflow: auto;
  21938. background: #e6eaf0;
  21939. }
  21940. .source_diy>>>.el-dialog__footer {
  21941. background: #e6eaf0 !important;
  21942. }
  21943. .left {
  21944. border-right: 1px solid rgb(60, 94, 143);
  21945. display: flex;
  21946. flex-direction: column;
  21947. align-items: center;
  21948. min-height: 600px;
  21949. width: 385px;
  21950. height: 80%;
  21951. }
  21952. .tips {
  21953. color: rgb(128, 128, 128);
  21954. font-size: 12px;
  21955. width: 270px;
  21956. margin: 40px;
  21957. }
  21958. .pb_content {
  21959. height: 100% !important;
  21960. /* margin: 0 20px 0 20px; */
  21961. }
  21962. .pb_content_body {
  21963. width: 100% !important;
  21964. height: 100%;
  21965. display: flex;
  21966. }
  21967. .info_solid {
  21968. width: 270px;
  21969. height: 30px;
  21970. border-left: 1px solid #bdbdbd;
  21971. margin: 10px 0px 10px 30px;
  21972. }
  21973. .info_steps {
  21974. width: 270px;
  21975. font-size: 0.875rem;
  21976. display: flex;
  21977. align-items: center;
  21978. }
  21979. .info_steps span:nth-child(1) {
  21980. width: 30px;
  21981. height: 30px;
  21982. background: rgba(0, 0, 0, 0.38);
  21983. display: block;
  21984. color: #fff;
  21985. border-radius: 40px;
  21986. text-align: center;
  21987. line-height: 30px;
  21988. }
  21989. .steps_active {
  21990. background: #3d67bc !important;
  21991. }
  21992. .info_steps span:nth-child(2) {
  21993. margin-left: 5px;
  21994. }
  21995. .right {
  21996. height: 100%;
  21997. width: 100%;
  21998. display: flex;
  21999. overflow: hidden;
  22000. flex-direction: column;
  22001. }
  22002. .leftBar{
  22003. width: 290px;
  22004. height: calc(100% - 50px);
  22005. overflow: auto;
  22006. border-radius: 5px;
  22007. margin: 25px auto;
  22008. box-sizing: border-box;
  22009. margin-right: 10px;
  22010. }
  22011. .basic_box {
  22012. margin: 0 auto;
  22013. position: relative;
  22014. padding: 0 20px 0 20px;
  22015. }
  22016. .basic_box_success {
  22017. width: 100%;
  22018. min-height: 455px;
  22019. padding: 50px 0;
  22020. position: relative;
  22021. text-align: center;
  22022. border-bottom: 1px solid #bfbfbf;
  22023. box-sizing: border-box;
  22024. display: flex;
  22025. align-items: center;
  22026. flex-direction: column;
  22027. justify-content: center;
  22028. }
  22029. .info_title {
  22030. font-size: 1.5em;
  22031. margin-right: 25px;
  22032. /* margin: 20px 30px 20px 30px; */
  22033. }
  22034. .bInfo_title {
  22035. text-align: left;
  22036. margin: 10px 0;
  22037. }
  22038. .small_title {
  22039. font-size: 14px;
  22040. line-height: 40px;
  22041. }
  22042. .chapter_beizhu {
  22043. font-size: 12px;
  22044. font-weight: bold;
  22045. float: right;
  22046. color: rgb(128, 128, 128);
  22047. margin-top: 5px;
  22048. }
  22049. .chapter_uploadBox1 {
  22050. text-align: left;
  22051. background-color: rgb(242, 242, 242);
  22052. width: 100%;
  22053. height: 67px;
  22054. padding: 0px 15px;
  22055. border-radius: 8px;
  22056. overflow: hidden;
  22057. font-size: 16px;
  22058. box-sizing: border-box;
  22059. position: relative;
  22060. }
  22061. .chapter_add {
  22062. width: 100%;
  22063. height: 32px;
  22064. margin-top: 15px;
  22065. cursor: pointer;
  22066. }
  22067. .chapter_add_l {
  22068. margin-left: 5px;
  22069. width: 30px;
  22070. height: 30px;
  22071. float: left;
  22072. border: 1px solid #aaa;
  22073. color: #aaa;
  22074. border-radius: 50%;
  22075. font-size: 25px;
  22076. text-align: center;
  22077. }
  22078. .chapter_add_r {
  22079. font-size: 18px;
  22080. height: 40px;
  22081. line-height: 30px;
  22082. text-indent: 10px;
  22083. color: #aaa;
  22084. }
  22085. .chapter_add_r span {
  22086. font-size: 12px;
  22087. color: rgb(204, 204, 204);
  22088. }
  22089. .chapter_add_input {
  22090. display: none;
  22091. }
  22092. .line {
  22093. width: 85%;
  22094. margin: 0 auto;
  22095. border-top: 1px solid #e5e5e5;
  22096. margin-top: 20px;
  22097. }
  22098. .info_btnBox {
  22099. width: calc(100%);
  22100. display: flex;
  22101. justify-content: center;
  22102. height: 80px;
  22103. align-items: center;
  22104. background: #fff;
  22105. margin: 0 auto;
  22106. border-top: 2px solid rgb(228, 232, 237);
  22107. box-sizing: border-box;
  22108. }
  22109. .info_btnBox2 {
  22110. width: calc(100%);
  22111. display: flex;
  22112. justify-content: center;
  22113. height: 20px;
  22114. align-items: center;
  22115. background: #fff;
  22116. margin: 0 auto;
  22117. border-top: 2px solid rgb(228, 232, 237);
  22118. box-sizing: border-box;
  22119. overflow: hidden;
  22120. cursor: pointer;
  22121. }
  22122. .info_btnBox3 {
  22123. width: calc(100%);
  22124. display: flex;
  22125. justify-content: flex-end;
  22126. padding: 0 20px;
  22127. height: 60px;
  22128. align-items: center;
  22129. background: unset;
  22130. margin: 0 auto;
  22131. /* border-top: 1px solid rgb(228, 232, 237); */
  22132. box-sizing: border-box;
  22133. overflow: hidden;
  22134. cursor: pointer;
  22135. background: #fff;
  22136. border-radius: 10px;
  22137. }
  22138. .info_btn+.info_btn {
  22139. margin-left: 15px;
  22140. }
  22141. .info_btn,
  22142. .teacherWord {
  22143. color: #fff;
  22144. background-color: #0f7eff;
  22145. padding: 8px 24px;
  22146. font-size: 0.9375rem;
  22147. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  22148. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  22149. min-width: 64px;
  22150. font-weight: 500;
  22151. border-radius: 4px;
  22152. box-sizing: border-box;
  22153. border: none;
  22154. cursor: pointer;
  22155. }
  22156. .teacherWord {
  22157. width: 105px !important;
  22158. text-align: center !important;
  22159. line-height: 36px !important;
  22160. padding: 0 !important;
  22161. font-size: 14px !important;
  22162. margin: 10px 0 !important;
  22163. }
  22164. .template_box {
  22165. display: flex;
  22166. flex-wrap: wrap;
  22167. }
  22168. .wordTeacher {
  22169. display: flex;
  22170. flex-direction: column;
  22171. width: 100px;
  22172. height: 100px;
  22173. text-align: center;
  22174. font-size: 13px;
  22175. margin: 0 20px 20px 0;
  22176. background: #f0f4fa;
  22177. position: relative;
  22178. border-radius: 5px;
  22179. align-items: center;
  22180. justify-content: center;
  22181. border: 1px solid #cad1dc;
  22182. color: #0e1e33;
  22183. /* padding: 25px 0px; */
  22184. cursor: pointer;
  22185. }
  22186. .wordTeacher::after {
  22187. content: "";
  22188. display: block;
  22189. position: absolute;
  22190. width: 15px;
  22191. height: 15px;
  22192. right: 10px;
  22193. top: 10px;
  22194. background-image: url(../../../assets/icon/new/choose_a.png);
  22195. background-size: 100% 100%;
  22196. }
  22197. .wordTeacherA::after {
  22198. background-image: url(../../../assets/icon/new/choose_b.png);
  22199. }
  22200. .wordTeacher:nth-child(5n) {
  22201. margin-right: 0px;
  22202. }
  22203. .wordPic {
  22204. margin: 0 auto;
  22205. width: 30px;
  22206. height: 30px;
  22207. cursor: pointer;
  22208. }
  22209. .deleteWord {
  22210. width: 22px;
  22211. height: 22px;
  22212. position: absolute;
  22213. right: 5px;
  22214. top: -15px;
  22215. cursor: pointer;
  22216. display: none;
  22217. z-index: 999;
  22218. }
  22219. .wordPic>img,
  22220. .deleteWord>img,
  22221. .addToolImg>img {
  22222. width: 100%;
  22223. height: 100%;
  22224. }
  22225. .info_btn:hover {
  22226. background-color: #4f7cd5 !important;
  22227. }
  22228. .cru_selectBox {
  22229. display: flex;
  22230. margin: 15px 0;
  22231. flex-wrap: nowrap;
  22232. white-space: nowrap;
  22233. overflow: auto;
  22234. position: relative;
  22235. height: 40px;
  22236. max-width: calc(100% - 175px);
  22237. }
  22238. .cru_selectBox::-webkit-scrollbar {
  22239. /*滚动条整体样式*/
  22240. width: 6px;
  22241. /*高宽分别对应横竖滚动条的尺寸*/
  22242. height: 6px;
  22243. }
  22244. /*定义滚动条轨道 内阴影+圆角*/
  22245. .cru_selectBox::-webkit-scrollbar-track {
  22246. border-radius: 10px;
  22247. background-color: #eee;
  22248. }
  22249. /*定义滑块 内阴影+圆角*/
  22250. .cru_selectBox::-webkit-scrollbar-thumb {
  22251. border-radius: 10px;
  22252. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  22253. background-color: rgba(0, 0, 0, 0.1);
  22254. }
  22255. .cru_line {
  22256. position: absolute;
  22257. bottom: 0px;
  22258. transition: all 0.5s;
  22259. left: 0px;
  22260. width: 50px;
  22261. height: 4px;
  22262. left: 10px;
  22263. border-radius: 2px;
  22264. background: #3681fc;
  22265. }
  22266. .cru_select {
  22267. font-size: 18px;
  22268. margin-right: 20px;
  22269. margin-left: 5px;
  22270. cursor: pointer;
  22271. color: #0e1e33;
  22272. }
  22273. .cru_select:hover {
  22274. color: #3681fc !important;
  22275. }
  22276. .cru_selected {
  22277. color: #3681fc !important;
  22278. font-weight: bold;
  22279. }
  22280. .chapter_box {
  22281. margin-top: 10px;
  22282. width: 100%;
  22283. padding: 10px 20px;
  22284. background: #fff;
  22285. border-radius: 8px;
  22286. box-sizing: border-box;
  22287. }
  22288. .chapter_contentbox {
  22289. display: flex;
  22290. align-items: center;
  22291. /* margin-top: 15px; */
  22292. }
  22293. .chapter_contentbox .cc_title {
  22294. margin: 0px;
  22295. color: black;
  22296. display: block;
  22297. white-space: nowrap;
  22298. overflow: hidden;
  22299. text-overflow: ellipsis;
  22300. margin-right: 20px;
  22301. font-size: 18px;
  22302. height: 20px;
  22303. line-height: 22px;
  22304. min-width: fit-content;
  22305. display: flex;
  22306. }
  22307. .chapter_contentbox .cc_title::before {
  22308. content: "";
  22309. height: 100%;
  22310. width: 3px;
  22311. background: #3681fc;
  22312. border-radius: 3px;
  22313. opacity: 1;
  22314. display: block;
  22315. margin-right: 10px;
  22316. }
  22317. .chapter_contentbox .cc_input {
  22318. width: 100%;
  22319. display: flex;
  22320. }
  22321. .show_taskD {
  22322. min-width: fit-content;
  22323. margin-left: 10px;
  22324. display: flex;
  22325. align-items: center;
  22326. font-size: 14px;
  22327. cursor: pointer;
  22328. color: #717c8d;
  22329. }
  22330. .show_taskD>img {
  22331. width: 15px;
  22332. margin-right: 5px;
  22333. transition: 0.2s all;
  22334. transform: rotate(-90deg);
  22335. }
  22336. .show_taskD.show>img {
  22337. transform: rotate(0deg);
  22338. }
  22339. .show_toolD {
  22340. min-width: fit-content;
  22341. margin-left: 10px;
  22342. display: flex;
  22343. align-items: center;
  22344. font-size: 14px;
  22345. cursor: pointer;
  22346. color: #717c8d;
  22347. /* position: absolute;
  22348. right: 45px;
  22349. top: 5px; */
  22350. }
  22351. .show_toolD>img {
  22352. width: 15px;
  22353. margin-right: 5px;
  22354. transition: 0.2s all;
  22355. transform: rotate(-90deg);
  22356. }
  22357. .show_toolD.show>img {
  22358. transform: rotate(0deg);
  22359. }
  22360. .remove {
  22361. background-image: url("../../../assets/icon/new/delete_u.png");
  22362. cursor: pointer;
  22363. opacity: 0.5;
  22364. width: 30px;
  22365. min-width: 30px;
  22366. height: 30px;
  22367. background-size: 100% 100%;
  22368. background-repeat: no-repeat;
  22369. margin-left: 10px;
  22370. }
  22371. .remove1 {
  22372. background-image: url("../../../assets/remove1.png");
  22373. background-repeat: no-repeat;
  22374. background-position: 5px 10px;
  22375. width: 40px;
  22376. height: 50px;
  22377. cursor: pointer;
  22378. margin-left: 10px;
  22379. }
  22380. .binfo_input {
  22381. width: 100%;
  22382. margin: 0;
  22383. padding: 12px 14px;
  22384. display: block;
  22385. min-width: 0;
  22386. outline: none;
  22387. box-sizing: border-box;
  22388. background: none;
  22389. border: none;
  22390. border-radius: 4px;
  22391. background: #fff;
  22392. font-size: 16px;
  22393. resize: none;
  22394. font-family: "Microsoft YaHei";
  22395. min-height: 48px;
  22396. /* border: 1px solid #3682fc00; */
  22397. border: 1.5px solid #cad1dc;
  22398. }
  22399. .binfo_textarea {
  22400. border: 1.5px solid #cad1dc;
  22401. font-size: 16px;
  22402. resize: none;
  22403. /* background: #f6f6f6; */
  22404. font-family: "Microsoft YaHei";
  22405. }
  22406. .binfo_input:focus-visible {
  22407. border: 1.5px solid #3681fc !important;
  22408. }
  22409. .time {
  22410. display: flex;
  22411. margin: 35px 0 80px 0;
  22412. }
  22413. .chapter_btnbox {
  22414. width: 160px;
  22415. border-radius: 5px;
  22416. border: 2px dashed gray;
  22417. display: flex;
  22418. padding: 8px 50px;
  22419. align-items: center;
  22420. justify-content: center;
  22421. margin: 30px auto 0;
  22422. cursor: pointer;
  22423. }
  22424. .icon_add {
  22425. position: relative;
  22426. width: 24px;
  22427. padding-top: 20px;
  22428. border-radius: 100%;
  22429. border-width: 2px;
  22430. border-style: solid;
  22431. border-color: gray;
  22432. }
  22433. .icon_add i:nth-child(1) {
  22434. position: absolute;
  22435. left: 50%;
  22436. top: 50%;
  22437. height: 60%;
  22438. transform: translate(-50%, -50%);
  22439. border-width: 1px;
  22440. border-style: solid;
  22441. border-color: inherit;
  22442. }
  22443. .icon_add i:nth-child(2) {
  22444. position: absolute;
  22445. top: 50%;
  22446. left: 50%;
  22447. width: 60%;
  22448. transform: translate(-50%, -50%);
  22449. border-width: 1px;
  22450. border-style: solid;
  22451. border-color: inherit;
  22452. }
  22453. .chapter_btn_w {
  22454. font-size: 0.9375rem;
  22455. font-weight: bold;
  22456. color: gray;
  22457. margin-left: 20px;
  22458. }
  22459. .disUoloadSty>>>.el-icon-plus {
  22460. display: none !important;
  22461. /* 上传按钮隐藏 */
  22462. }
  22463. .imgLeft {
  22464. margin: 15px 0;
  22465. }
  22466. .add_info_box {
  22467. margin: 0 0 0 auto;
  22468. display: flex;
  22469. flex-wrap: wrap;
  22470. }
  22471. .add_info_box button {
  22472. margin: 0 5px 10px 0;
  22473. }
  22474. .add_info_box2 {
  22475. display: flex;
  22476. align-items: center;
  22477. flex-wrap: wrap;
  22478. }
  22479. .add_info_box2::after {
  22480. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  22481. color: red;
  22482. font-size: 14px;
  22483. margin-bottom: 10px;
  22484. }
  22485. .add_chapters_box {
  22486. text-align: left;
  22487. background-color: #fff;
  22488. width: 100%;
  22489. border-radius: 4px;
  22490. font-size: 16px;
  22491. box-sizing: border-box;
  22492. position: relative;
  22493. padding: 0 15px;
  22494. height: auto;
  22495. overflow-y: auto;
  22496. overflow-x: hidden;
  22497. border: 1px solid #cad1dc;
  22498. }
  22499. .add_chapters_box.add_c_none {
  22500. display: flex;
  22501. justify-content: center;
  22502. align-items: center;
  22503. padding: 15px;
  22504. }
  22505. .add_c_none>img {
  22506. width: 25px;
  22507. }
  22508. .add_chapters_box.add_c_none>span {
  22509. font-size: 14px;
  22510. font-weight: 400;
  22511. margin: 0 0 5px 5px;
  22512. }
  22513. .homework_box {
  22514. display: flex;
  22515. align-items: flex-start;
  22516. flex-wrap: wrap;
  22517. margin: 15px 0 0 0;
  22518. flex-direction: column;
  22519. align-content: flex-start;
  22520. }
  22521. .course_homework {
  22522. display: flex;
  22523. justify-content: center;
  22524. flex-direction: row;
  22525. align-items: center;
  22526. margin: 0 10px 0 0;
  22527. }
  22528. .course_homework>>>.el-input__inner {
  22529. width: 140px;
  22530. margin-left: 15px;
  22531. }
  22532. .chapter_upload_move {
  22533. position: relative;
  22534. background-color: #fff;
  22535. position: absolute;
  22536. width: 100%;
  22537. top: 0px;
  22538. left: 0px;
  22539. border: 1px solid #eee;
  22540. border-radius: 5px;
  22541. transition: width 2s;
  22542. -moz-transition: width 2s;
  22543. -webkit-transition: width 2s;
  22544. -o-transition: width 2s;
  22545. }
  22546. .chapter_upload_l_i {
  22547. background-image: url("../../../assets/icon.png");
  22548. background-position: 3px -165px;
  22549. width: 30px;
  22550. height: 30px;
  22551. margin: 10px auto 0 auto;
  22552. }
  22553. .course_input_box {
  22554. display: flex;
  22555. margin-right: 20px;
  22556. width: 100%;
  22557. align-items: center;
  22558. position: relative;
  22559. }
  22560. .course_input_box>.binfo_input {
  22561. width: calc(100% - 0 - 200px - 20px);
  22562. margin: 0 10px;
  22563. }
  22564. .bb_courseIcon {
  22565. width: 57px;
  22566. height: 45px;
  22567. background: #f0f4fa;
  22568. border-radius: 5px 0px 0px 5px;
  22569. display: flex;
  22570. align-items: center;
  22571. justify-content: center;
  22572. border-right: 1.5px solid rgb(202, 209, 220);
  22573. box-sizing: border-box;
  22574. position: absolute;
  22575. left: 1.5px;
  22576. }
  22577. .bb_courseIcon>img {
  22578. width: 25px;
  22579. height: auto;
  22580. }
  22581. .big_box {
  22582. /* margin-top: 20px; */
  22583. display: flex;
  22584. justify-content: space-between;
  22585. /* border-bottom: 1px solid #E0E2ED; */
  22586. }
  22587. .left_first {
  22588. display: flex;
  22589. flex-direction: column;
  22590. flex-wrap: nowrap;
  22591. width: calc(100% - 310px);
  22592. padding: 20px;
  22593. box-sizing: border-box;
  22594. background: #fff;
  22595. border-radius: 5px;
  22596. }
  22597. .right_first {
  22598. width: 300px;
  22599. display: flex;
  22600. align-items: center;
  22601. justify-content: center;
  22602. /* border-left: 1px solid #E0E2ED; */
  22603. box-sizing: border-box;
  22604. padding: 20px;
  22605. flex-direction: column;
  22606. background: #fff;
  22607. border-radius: 5px;
  22608. }
  22609. .ai_box {
  22610. width: 204px;
  22611. display: flex;
  22612. justify-content: flex-end;
  22613. margin-bottom: 15px;
  22614. }
  22615. .ai_content {
  22616. display: flex;
  22617. align-items: center;
  22618. font-size: 14px;
  22619. padding: 7px 20px;
  22620. box-sizing: border-box;
  22621. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  22622. border-radius: 12px;
  22623. font-weight: 700;
  22624. cursor: pointer;
  22625. }
  22626. .ai_content>img {
  22627. width: 40px;
  22628. margin-right: 5px;
  22629. }
  22630. .c_info_title {
  22631. padding: 15px 0 15px 0;
  22632. font-size: 16px;
  22633. font-weight: bold;
  22634. margin: 0 0 0 20px;
  22635. box-sizing: border-box;
  22636. display: flex;
  22637. align-items: center;
  22638. line-height: 20px;
  22639. }
  22640. .c_info_title::before {
  22641. content: "";
  22642. display: block;
  22643. width: 3px;
  22644. height: 20px;
  22645. background: #0061ff;
  22646. border-radius: 3px;
  22647. margin: 0 5px 0 0;
  22648. }
  22649. .right_title {
  22650. height: 30px;
  22651. padding: 15px 0 15px 20px;
  22652. border-bottom: 1px solid #f2f2f2;
  22653. font-size: 1.5em;
  22654. font-weight: bold;
  22655. color: #0f7eff;
  22656. margin: 0 auto;
  22657. }
  22658. .people {
  22659. border: 1px solid rgb(229 229 229);
  22660. /* height: 495px; */
  22661. height: 350px;
  22662. border-radius: 5px;
  22663. width: 100%;
  22664. overflow: auto;
  22665. }
  22666. .people_top {
  22667. display: flex;
  22668. width: 100%;
  22669. /* justify-content: space-between; */
  22670. /* align-items: center; */
  22671. flex-direction: column;
  22672. padding: 10px 10px 0;
  22673. box-sizing: border-box;
  22674. }
  22675. .people_nav,
  22676. .people_top_right {
  22677. /* padding: 20px 0 0 20px; */
  22678. }
  22679. .people_top_right {
  22680. height: 40px;
  22681. margin-bottom: 10px;
  22682. }
  22683. .people_search {
  22684. display: flex;
  22685. position: relative;
  22686. }
  22687. .people_search>>>.el-input__inner {
  22688. /* height: 25px; */
  22689. width: 100%;
  22690. }
  22691. .search_img {
  22692. width: 20px;
  22693. height: 20px;
  22694. position: absolute;
  22695. right: 10px;
  22696. top: 50%;
  22697. transform: translateY(-50%);
  22698. }
  22699. .search_img>img {
  22700. width: 100%;
  22701. height: 100%;
  22702. }
  22703. .people_name {
  22704. display: flex;
  22705. justify-content: flex-start;
  22706. padding: 20px 10px;
  22707. flex-direction: column;
  22708. flex-wrap: wrap;
  22709. }
  22710. .p_box {
  22711. position: relative;
  22712. }
  22713. .people_name>>>.el-checkbox {
  22714. width: 100%;
  22715. display: flex;
  22716. align-items: center;
  22717. margin-bottom: 10px;
  22718. }
  22719. .people_name>>>.el-checkbox__label {
  22720. text-overflow: ellipsis;
  22721. overflow: hidden;
  22722. width: calc(100%);
  22723. }
  22724. .people_name2>>>.el-checkbox__label {
  22725. width: calc(100% - 130px);
  22726. }
  22727. .inviteCode {
  22728. position: absolute;
  22729. right: 30px;
  22730. color: #237ade;
  22731. top: 0;
  22732. cursor: pointer;
  22733. font-size: 13px;
  22734. }
  22735. .noneInvite {
  22736. color: #a8a8a8;
  22737. }
  22738. .inviteImg {
  22739. position: absolute;
  22740. right: 5px;
  22741. top: 0;
  22742. width: 20px;
  22743. }
  22744. .right_img {
  22745. width: 150px;
  22746. height: 150px;
  22747. margin: 0 auto;
  22748. }
  22749. .right_img>img {
  22750. width: 100%;
  22751. height: 100%;
  22752. }
  22753. .number {
  22754. margin-top: 20px;
  22755. color: #4aa6ff;
  22756. text-decoration: underline;
  22757. }
  22758. .success_button {
  22759. display: flex;
  22760. text-align: center;
  22761. margin: 5% 0 auto;
  22762. flex-direction: row;
  22763. justify-content: center;
  22764. }
  22765. .look_course {
  22766. margin-right: 40px;
  22767. background: #3d67bc;
  22768. width: 200px;
  22769. height: 35px;
  22770. line-height: 35px;
  22771. color: #fff;
  22772. text-align: center;
  22773. font-size: 14px;
  22774. border-radius: 5px;
  22775. cursor: pointer;
  22776. }
  22777. .attend_others {
  22778. width: 250px;
  22779. background: #4fb13c;
  22780. height: 35px;
  22781. line-height: 35px;
  22782. color: #fff;
  22783. text-align: center;
  22784. font-size: 14px;
  22785. border-radius: 5px;
  22786. cursor: pointer;
  22787. }
  22788. .dialog_diy2>>>.el-dialog__body {
  22789. text-align: center;
  22790. }
  22791. .write_togother {
  22792. position: absolute;
  22793. right: 45px;
  22794. display: flex;
  22795. top: 5%;
  22796. }
  22797. .write_people {
  22798. font-size: 14px;
  22799. line-height: 50px;
  22800. padding-right: 10px;
  22801. }
  22802. .end_write {
  22803. background: #3d67bc;
  22804. color: #fff;
  22805. width: 100px;
  22806. height: 35px;
  22807. line-height: 35px;
  22808. text-align: center;
  22809. font-size: 14px;
  22810. border-radius: 5px;
  22811. cursor: pointer;
  22812. }
  22813. .chapter_upload+.chapter_upload {
  22814. /* margin-top: 15px; */
  22815. border-top: 1px solid #e7ebf1;
  22816. }
  22817. .chapter_upload {
  22818. height: 45px;
  22819. position: relative;
  22820. display: flex;
  22821. align-items: center;
  22822. width: 100%;
  22823. min-height: 45px;
  22824. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  22825. /* border-radius: 4px; */
  22826. /* overflow: hidden; */
  22827. box-sizing: border-box;
  22828. }
  22829. .chapter_upload_drag {
  22830. position: absolute;
  22831. cursor: pointer;
  22832. width: 16px;
  22833. height: 16px;
  22834. left: -9px;
  22835. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  22836. background-size: 100% 100%;
  22837. z-index: 10;
  22838. display: none;
  22839. }
  22840. .isNavStage>.chapter_upload_drag {
  22841. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  22842. }
  22843. .chapter_upload_t {
  22844. background-color: #fff;
  22845. position: absolute;
  22846. height: 100%;
  22847. top: 0px;
  22848. left: 0px;
  22849. box-sizing: border-box;
  22850. }
  22851. .chapter_upload_o {
  22852. width: 100%;
  22853. height: 100%;
  22854. position: relative;
  22855. z-index: 1;
  22856. }
  22857. .chapter_upload_ic {
  22858. margin: 0 15px 0px auto;
  22859. display: flex;
  22860. align-items: center;
  22861. }
  22862. .chapter_upload_ic_l {
  22863. width: 50px;
  22864. height: 50px;
  22865. float: left;
  22866. }
  22867. .chapter_upload_ic_l div {
  22868. width: 30px;
  22869. height: 35px;
  22870. background: url("../../../assets/icon/icon.png");
  22871. }
  22872. .chapter_upload_ic_edit {
  22873. height: 100%;
  22874. display: flex;
  22875. align-items: center;
  22876. cursor: pointer;
  22877. margin: 0 10px 0 0;
  22878. }
  22879. .chapter_upload_ic_edit div {
  22880. width: 18px;
  22881. height: 18px;
  22882. background-image: url("../../../assets/icon/new/edit_u.png");
  22883. background-size: 100% 100%;
  22884. }
  22885. .chapter_upload_ic_check {
  22886. height: 100%;
  22887. display: flex;
  22888. align-items: center;
  22889. cursor: pointer;
  22890. margin: 0 10px 0 0;
  22891. }
  22892. .chapter_upload_ic_check div {
  22893. width: 18px;
  22894. height: 18px;
  22895. background-image: url("../../../assets/icon/course/lookeye.svg");
  22896. background-size: 100% 100%;
  22897. }
  22898. .chapter_upload_ic_r {
  22899. height: 100%;
  22900. display: flex;
  22901. align-items: center;
  22902. cursor: pointer;
  22903. }
  22904. .chapter_upload_ic_r div {
  22905. width: 18px;
  22906. height: 18px;
  22907. background-image: url("../../../assets/icon/new/delete_u.png");
  22908. background-size: 100% 100%;
  22909. }
  22910. .chapter_upload_n {
  22911. display: flex;
  22912. text-indent: 10px;
  22913. text-decoration: none;
  22914. text-overflow: ellipsis;
  22915. white-space: nowrap;
  22916. overflow: hidden;
  22917. width: 55%;
  22918. margin-left: 10px;
  22919. cursor: pointer;
  22920. margin-top: 2px;
  22921. align-items: center;
  22922. }
  22923. .chapter_upload_l_i2,
  22924. .chapter_upload_l_i3,
  22925. .chapter_upload_l_i8,
  22926. .chapter_upload_l_i6,
  22927. .chapter_upload_l_i12,
  22928. .chapter_upload_l_i14,
  22929. .chapter_upload_l_i13 {
  22930. width: 15px;
  22931. height: 15px;
  22932. background-size: 100% 100%;
  22933. }
  22934. .chapter_upload_l_i2 {
  22935. background-image: url("../../../assets/icon/new/u_word.png");
  22936. }
  22937. .chapter_upload_l_i3 {
  22938. background-image: url("../../../assets/icon/new/u_video.png");
  22939. }
  22940. .chapter_upload_l_i8 {
  22941. background-image: url("../../../assets/icon/new/u_url.png");
  22942. }
  22943. .chapter_upload_l_i14 {
  22944. background-image: url("../../../assets/icon/new/u_source.png");
  22945. }
  22946. .chapter_upload_l_i6 {
  22947. background-image: url("../../../assets/icon/new/u_picture.png");
  22948. }
  22949. .chapter_upload_l_i12 {
  22950. background-image: url("../../../assets/icon/new/u_word.png");
  22951. }
  22952. .chapter_upload_l_i13 {
  22953. background-image: url("../../../assets/icon/new/u_img.png");
  22954. }
  22955. .chapter_upload_noSee {
  22956. background-image: url("../../../assets/icon/new/u_noUpload.png");
  22957. width: 18px;
  22958. height: 18px;
  22959. background-size: 100% 100%;
  22960. display: block;
  22961. margin-right: 10px;
  22962. }
  22963. .chapter_upload_ud {
  22964. display: flex;
  22965. flex-direction: row;
  22966. justify-content: center;
  22967. margin: 0 10px 0 0;
  22968. }
  22969. .chapter_upload_ud>.chapter_upload_up {
  22970. margin-bottom: 0;
  22971. margin-right: 10px;
  22972. }
  22973. .chapter_upload_down,
  22974. .chapter_upload_up {
  22975. width: 20px;
  22976. height: 20px;
  22977. background: #e4eaf2;
  22978. cursor: pointer;
  22979. margin: 0 auto;
  22980. border-radius: 5px;
  22981. display: flex;
  22982. justify-content: center;
  22983. align-items: center;
  22984. }
  22985. .chapter_upload_up::after,
  22986. .chapter_upload_down::after {
  22987. content: "";
  22988. background-image: url("../../../assets/icon/new/downBtn.png");
  22989. width: 13px;
  22990. height: 13px;
  22991. background-size: 100% 100%;
  22992. display: block;
  22993. }
  22994. .chapter_upload_up::after {
  22995. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  22996. }
  22997. .chapter_upload_up {
  22998. margin-bottom: 5px;
  22999. }
  23000. .chapter_upload_ud2 {
  23001. display: flex;
  23002. flex-direction: row;
  23003. justify-content: center;
  23004. margin: 0 10px 0 0;
  23005. }
  23006. .chapter_upload_ud2>.chapter_upload_up2 {
  23007. margin-bottom: 0;
  23008. margin-right: 10px;
  23009. }
  23010. .chapter_upload_down2,
  23011. .chapter_upload_up2 {
  23012. cursor: pointer;
  23013. margin: 0 auto;
  23014. border-radius: 5px;
  23015. display: flex;
  23016. justify-content: center;
  23017. align-items: center;
  23018. color: #717c8d;
  23019. font-size: 14px;
  23020. }
  23021. .chapter_upload_up2 {
  23022. margin-right: 10px;
  23023. }
  23024. .chapter_upload_up2::before,
  23025. .chapter_upload_down2::before {
  23026. content: "";
  23027. background-image: url("../../../assets/icon/new/c_down.png");
  23028. width: 14px;
  23029. height: 14px;
  23030. background-size: 100% 100%;
  23031. display: block;
  23032. margin-right: 5px;
  23033. }
  23034. .chapter_upload_up2::before {
  23035. background-image: url("../../../assets/icon/new/c_up.png") !important;
  23036. }
  23037. .addWordStyle {
  23038. display: flex;
  23039. flex-direction: row;
  23040. justify-content: flex-start;
  23041. overflow-x: auto;
  23042. white-space: nowrap;
  23043. flex-wrap: wrap;
  23044. }
  23045. /* table 样式 */
  23046. .cont>>>table {
  23047. border-top: 1px solid #ccc;
  23048. border-left: 1px solid #ccc;
  23049. }
  23050. .cont>>>table td,
  23051. .cont>>>table th {
  23052. border-bottom: 1px solid #ccc;
  23053. border-right: 1px solid #ccc;
  23054. /* padding: 20px 5px; */
  23055. padding: 5px 10px;
  23056. max-width: 0px;
  23057. height: 30px;
  23058. vertical-align: baseline;
  23059. }
  23060. .cont>>>table th {
  23061. border-bottom: 2px solid #ccc;
  23062. text-align: center;
  23063. }
  23064. /* blockquote 样式 */
  23065. .cont>>>blockquote {
  23066. display: block;
  23067. border-left: 8px solid #d0e5f2;
  23068. padding: 5px 10px;
  23069. margin: 10px 0;
  23070. line-height: 1.4;
  23071. font-size: 100%;
  23072. background-color: #f1f1f1;
  23073. }
  23074. /* code 样式 */
  23075. .cont>>>code {
  23076. display: inline-block;
  23077. /* *display: inline; */
  23078. zoom: 1;
  23079. background-color: #f1f1f1;
  23080. border-radius: 3px;
  23081. padding: 3px 5px;
  23082. margin: 0 3px;
  23083. }
  23084. .cont>>>pre code {
  23085. display: block;
  23086. }
  23087. /* ul ol 样式 */
  23088. .cont>>>ul,
  23089. ol {
  23090. margin: 10px 0 10px 20px;
  23091. }
  23092. .wordbox {
  23093. display: flex;
  23094. flex-wrap: wrap;
  23095. cursor: pointer;
  23096. width: 100%;
  23097. }
  23098. .checkword {
  23099. width: 22px;
  23100. height: 22px;
  23101. margin: 10px auto 0;
  23102. cursor: pointer;
  23103. }
  23104. .checkword img {
  23105. width: 100%;
  23106. }
  23107. .stepBg {
  23108. display: flex;
  23109. justify-content: space-between;
  23110. align-items: center;
  23111. background: #fff;
  23112. width: calc(100%);
  23113. margin: 0 auto;
  23114. }
  23115. .stepBorder {
  23116. height: 3px !important;
  23117. background: #cad1dc;
  23118. width: 100px !important;
  23119. margin: 0 15px !important;
  23120. position: relative;
  23121. }
  23122. .border-active {
  23123. background: #3681fc !important;
  23124. }
  23125. .border-active::before,
  23126. .border-active::after {
  23127. border-color: #3681fc !important;
  23128. }
  23129. .stepBorder::before,
  23130. .stepBorder::after {
  23131. content: "";
  23132. width: 9px;
  23133. height: 9px;
  23134. background: #ffffff;
  23135. opacity: 1;
  23136. border: 2px solid #acb4bf;
  23137. display: block;
  23138. box-sizing: border-box;
  23139. border-radius: 50%;
  23140. position: absolute;
  23141. top: 50%;
  23142. transform: translateY(-50%);
  23143. }
  23144. .stepBorder::after {
  23145. right: -9px;
  23146. }
  23147. .stepTop {
  23148. width: 100%;
  23149. /* border-radius: 10px; */
  23150. display: flex;
  23151. justify-content: center;
  23152. align-items: center;
  23153. flex-wrap: nowrap;
  23154. background: #fff;
  23155. /* top: 18%; */
  23156. height: 80px;
  23157. border-bottom: 2px solid rgb(228, 232, 237);
  23158. box-sizing: border-box;
  23159. }
  23160. .stepTop2 {
  23161. width: 100%;
  23162. /* border-radius: 10px; */
  23163. display: flex;
  23164. justify-content: center;
  23165. align-items: center;
  23166. flex-wrap: nowrap;
  23167. background: #fff;
  23168. /* top: 18%; */
  23169. height: 20px;
  23170. border-bottom: 2px solid rgb(228, 232, 237);
  23171. box-sizing: border-box;
  23172. overflow: hidden;
  23173. cursor: pointer;
  23174. }
  23175. .stepTop>div img {
  23176. width: 100%;
  23177. }
  23178. .stepTop>div {
  23179. height: 50px;
  23180. width: 180px;
  23181. cursor: pointer;
  23182. margin: 10px 0;
  23183. border-radius: 10px;
  23184. }
  23185. .first,
  23186. .second,
  23187. .third,
  23188. .four {
  23189. background: #3681fc;
  23190. height: 90px;
  23191. color: #fff;
  23192. display: flex;
  23193. flex-direction: row;
  23194. align-items: center;
  23195. justify-content: center;
  23196. }
  23197. .first>div:nth-child(1),
  23198. .second>div:nth-child(1),
  23199. .third>div:nth-child(1),
  23200. .four>div:nth-child(1) {
  23201. margin: 5px 10px 0 0;
  23202. width: 2rem;
  23203. }
  23204. .firstNo,
  23205. .secondNo,
  23206. .thirdNo,
  23207. .fourNo {
  23208. background: #e7e7e7;
  23209. color: #adadad;
  23210. display: flex;
  23211. flex-direction: row;
  23212. align-items: center;
  23213. justify-content: center;
  23214. }
  23215. .firstNo>div:nth-child(1),
  23216. .secondNo>div:nth-child(1),
  23217. .thirdNo>div:nth-child(1),
  23218. .fourNo>div:nth-child(1) {
  23219. margin: 5px 10px 0 0;
  23220. width: 2rem;
  23221. }
  23222. .uploadWidth>>>.el-upload {
  23223. width: 60px;
  23224. height: 60px;
  23225. position: relative;
  23226. }
  23227. .addPeople {
  23228. background: #fa6060;
  23229. width: 150px;
  23230. height: 40px;
  23231. color: #fff;
  23232. border-radius: 5px;
  23233. text-align: center;
  23234. line-height: 40px;
  23235. font-size: 14px;
  23236. cursor: pointer;
  23237. }
  23238. .kcImg {
  23239. width: 60px;
  23240. margin-left: 10px;
  23241. }
  23242. .zyImg {
  23243. width: 55px;
  23244. margin: 0 10px;
  23245. }
  23246. .deleteZy {
  23247. width: 20px;
  23248. position: absolute;
  23249. top: 5px;
  23250. right: 5px;
  23251. cursor: pointer;
  23252. }
  23253. .kcImg>img,
  23254. .zyImg>img,
  23255. .deleteZy>img {
  23256. width: 100%;
  23257. height: 100%;
  23258. }
  23259. .zyBox {
  23260. display: flex;
  23261. flex-direction: row;
  23262. align-items: center;
  23263. background: #67d37d;
  23264. color: #fff;
  23265. width: 210px;
  23266. margin: 20px 20px 0 0;
  23267. border-radius: 10px;
  23268. height: 70px;
  23269. position: relative;
  23270. }
  23271. .upCss {
  23272. display: flex;
  23273. flex-direction: row;
  23274. justify-content: flex-start;
  23275. }
  23276. .upCss>>>.el-icon-plus {
  23277. position: none !important;
  23278. width: 200px;
  23279. height: 100px;
  23280. display: flex;
  23281. flex-wrap: nowrap;
  23282. flex-direction: column;
  23283. align-items: center;
  23284. justify-content: center;
  23285. border: 1px dashed #ccc;
  23286. min-width: 78px;
  23287. min-height: 100px;
  23288. z-index: 999;
  23289. }
  23290. .upCss>>>.el-upload-list__item-name {
  23291. width: 100px;
  23292. white-space: nowrap;
  23293. overflow: hidden;
  23294. text-overflow: ellipsis;
  23295. }
  23296. .upCss>>>.el-upload-list__item .el-icon-close {
  23297. font-size: 20px;
  23298. z-index: 9999;
  23299. }
  23300. .addStageImg {
  23301. min-width: 20px;
  23302. min-height: 20px;
  23303. width: 20px;
  23304. height: 20px;
  23305. cursor: pointer;
  23306. }
  23307. .addHW {
  23308. width: 28px;
  23309. height: 28px;
  23310. cursor: pointer;
  23311. }
  23312. .addStageImg>img,
  23313. .addHW>img {
  23314. width: 100%;
  23315. height: 100%;
  23316. }
  23317. .addNewPP>>>.el-dialog__body {
  23318. padding: 5px 20px;
  23319. }
  23320. .addNewPP>>>.el-dialog {
  23321. margin-top: 5vh !important;
  23322. }
  23323. .addNewPP2>>>.el-dialog__body {
  23324. padding: 5px 0;
  23325. }
  23326. .addNewPP2>>>.el-dialog {
  23327. margin-top: 5vh !important;
  23328. }
  23329. .isHeight {
  23330. height: 680px;
  23331. }
  23332. .toolChoose {
  23333. display: flex;
  23334. /* width: 100%; */
  23335. flex-direction: row;
  23336. flex-wrap: wrap;
  23337. }
  23338. .tool,
  23339. .isToolChoose {
  23340. display: flex;
  23341. flex-direction: column;
  23342. flex-wrap: nowrap;
  23343. width: fit-content;
  23344. margin: 10px 0 10px 0;
  23345. align-items: center;
  23346. border: 2px solid #dbdbdb00;
  23347. padding: 10px 20px;
  23348. border-radius: 5px;
  23349. cursor: pointer;
  23350. /* box-shadow: 0 0 2px 0px #dedede; */
  23351. position: relative;
  23352. box-sizing: border-box;
  23353. }
  23354. .tool:hover {
  23355. border: 2px solid #a5c7ff;
  23356. }
  23357. .tool:hover>.noCTool {
  23358. display: block;
  23359. opacity: 0.5;
  23360. }
  23361. .isToolChoose {
  23362. border: 2px solid #438aff !important;
  23363. box-shadow: 0 0 2px 0px #438aff;
  23364. opacity: 1 !important;
  23365. }
  23366. .isCTool,
  23367. .noCTool {
  23368. width: 30px;
  23369. height: 30px;
  23370. position: absolute;
  23371. top: -4px;
  23372. right: -4px;
  23373. }
  23374. .noCTool {
  23375. display: none;
  23376. }
  23377. .isCTool>img,
  23378. .noCTool>img {
  23379. width: 100%;
  23380. height: 100%;
  23381. }
  23382. .tool+.tool {
  23383. margin-right: 10px;
  23384. }
  23385. .whiteBIcon {
  23386. width: 80px;
  23387. cursor: pointer;
  23388. display: flex;
  23389. flex-direction: column;
  23390. flex-wrap: nowrap;
  23391. align-items: center;
  23392. font-size: 14px;
  23393. }
  23394. .whiteBIcon>img,
  23395. .toolIcon>img,
  23396. .arrow>img {
  23397. width: 100%;
  23398. height: 100%;
  23399. }
  23400. .check img {
  23401. width: 20px;
  23402. height: 20px;
  23403. }
  23404. .whiteBIcon>img {
  23405. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  23406. border-radius: 15px;
  23407. }
  23408. .whiteBIcon>div:nth-child(2) {
  23409. height: 20px;
  23410. line-height: 20px;
  23411. }
  23412. .check {
  23413. /* width: 20px;
  23414. height: 20px; */
  23415. cursor: pointer;
  23416. margin: 10px 0 0;
  23417. }
  23418. .checkDiv {
  23419. display: flex;
  23420. align-items: center;
  23421. }
  23422. .checkDiv span {
  23423. margin-left: 5px;
  23424. color: #858585;
  23425. }
  23426. .customWidth>>>.el-dialog {
  23427. min-width: 600px !important;
  23428. }
  23429. .CollaborativeCss {
  23430. width: 100%;
  23431. display: flex;
  23432. justify-content: center;
  23433. align-items: center;
  23434. box-sizing: border-box;
  23435. padding: 10px 0;
  23436. cursor: pointer;
  23437. }
  23438. .CollaborativeCss >>> .el-tooltip {
  23439. overflow: hidden;
  23440. white-space: nowrap;
  23441. text-overflow: ellipsis;
  23442. }
  23443. .CollaborativeCss2 {
  23444. background: #e0eafb;
  23445. color: #3681fc;
  23446. font-weight: 700;
  23447. border-radius: 5px;
  23448. }
  23449. .a_addBox {
  23450. margin: 10px 0;
  23451. background: #fff;
  23452. padding: 15px;
  23453. /* max-height: 600px; */
  23454. overflow: auto;
  23455. }
  23456. .a_add_box {
  23457. border-bottom: 2px solid #eee;
  23458. padding-bottom: 25px;
  23459. }
  23460. .a_add_head {
  23461. display: flex;
  23462. align-items: center;
  23463. justify-content: space-between;
  23464. margin: 10px 0 0 0;
  23465. font-size: 18px;
  23466. }
  23467. .a_add_checkType {
  23468. margin-top: 10px;
  23469. display: flex;
  23470. font-size: 14px;
  23471. align-items: center;
  23472. }
  23473. .a_add_checkType span {
  23474. box-sizing: border-box;
  23475. padding: 0 0 5px 0;
  23476. cursor: pointer;
  23477. }
  23478. .a_add_checkType span+span {
  23479. margin-left: 10px;
  23480. }
  23481. .a_add_checkType .active {
  23482. border-bottom: 2px solid #409eff;
  23483. color: #409eff;
  23484. }
  23485. .a_add_head .a_add_head_input {
  23486. /* width: 540px; */
  23487. width: 100%;
  23488. }
  23489. .a_add_head .a_add_head_div {
  23490. display: flex;
  23491. align-items: center;
  23492. justify-content: space-between;
  23493. }
  23494. .a_add_body {
  23495. display: flex;
  23496. /* align-items: center; */
  23497. align-items: flex-end;
  23498. }
  23499. .a_add_input {
  23500. display: flex;
  23501. align-items: center;
  23502. flex-wrap: wrap;
  23503. }
  23504. .a_add_input_choice {
  23505. flex-direction: column;
  23506. margin-right: 10px;
  23507. }
  23508. .a_add_input_choice>>>.el-radio {
  23509. display: flex;
  23510. align-items: center;
  23511. flex-direction: row-reverse;
  23512. margin: 30px 0 0 0;
  23513. position: relative;
  23514. }
  23515. .a_add_input_choice>>>.el-checkbox {
  23516. display: flex;
  23517. align-items: center;
  23518. flex-direction: row-reverse;
  23519. margin: 30px 0 0 0;
  23520. position: relative;
  23521. }
  23522. .width100 {
  23523. width: 100%;
  23524. }
  23525. .a_add_input .a_add_persent {
  23526. width: 100%;
  23527. }
  23528. .a_add_persent_div {
  23529. width: 100%;
  23530. display: flex;
  23531. align-items: center;
  23532. }
  23533. .a_add_persent_div span {
  23534. margin: 5px 0;
  23535. }
  23536. .a_add_persent_div span:nth-child(1) {
  23537. width: 30%;
  23538. }
  23539. .a_add_persent_div span:nth-child(2) {
  23540. width: 7%;
  23541. }
  23542. .a_add_persent_div span:nth-child(3) {
  23543. width: 40%;
  23544. }
  23545. .a_add_body_div {
  23546. display: flex;
  23547. align-items: center;
  23548. justify-content: center;
  23549. /* flex-direction: column; */
  23550. position: absolute;
  23551. right: -20px;
  23552. transform: translateX(100%);
  23553. }
  23554. .a_add_body_div>>>.el-button--primary {
  23555. background: #466b99;
  23556. border: none;
  23557. }
  23558. .all_choose {
  23559. display: flex;
  23560. flex-direction: row;
  23561. align-items: flex-start;
  23562. width: 100%;
  23563. }
  23564. .all_choose+.all_choose {
  23565. /* margin-top: 10px */
  23566. }
  23567. .all_choose>span {
  23568. min-width: fit-content;
  23569. display: block;
  23570. white-space: nowrap;
  23571. overflow: hidden;
  23572. text-overflow: ellipsis;
  23573. margin-right: 20px;
  23574. font-weight: bold;
  23575. font-size: 14px;
  23576. }
  23577. .all_choose>>>.el-checkbox-group {
  23578. display: flex;
  23579. flex-direction: row;
  23580. width: 100%;
  23581. flex-wrap: wrap;
  23582. align-content: center;
  23583. justify-content: flex-start;
  23584. align-items: center;
  23585. margin-top: 3px;
  23586. }
  23587. .all_choose>.el-checkbox-group>>>.el-checkbox {
  23588. margin-bottom: 10px;
  23589. display: flex;
  23590. flex-direction: row;
  23591. align-items: center;
  23592. margin-right: 10px;
  23593. }
  23594. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  23595. min-width: 80px;
  23596. overflow: hidden;
  23597. width: 80px;
  23598. text-overflow: ellipsis;
  23599. white-space: nowrap;
  23600. }
  23601. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  23602. width: auto;
  23603. }
  23604. .choose>div:nth-child(3)>span {
  23605. /* letter-spacing: 0 !important; */
  23606. }
  23607. .choose {
  23608. display: flex;
  23609. flex-direction: column;
  23610. flex-wrap: nowrap;
  23611. height: 100%;
  23612. justify-content: space-evenly;
  23613. align-items: flex-start;
  23614. }
  23615. .both {
  23616. display: flex;
  23617. flex-direction: row;
  23618. flex-wrap: wrap;
  23619. width: 100%;
  23620. align-items: center;
  23621. justify-content: flex-start;
  23622. margin: 15px 0;
  23623. }
  23624. .notice>>>.el-dialog {
  23625. width: 500px !important;
  23626. text-align: center;
  23627. }
  23628. .notice>>>.el-button {
  23629. margin-top: 20px;
  23630. }
  23631. .whiteBg {
  23632. /* background: #fff; */
  23633. border-radius: 10px;
  23634. }
  23635. .wb_j_box {
  23636. display: flex;
  23637. width: 100%;
  23638. padding: 0 20px 0;
  23639. box-sizing: border-box;
  23640. }
  23641. .wb_j_box_content {
  23642. width: calc(100% - 55% - 100px);
  23643. display: flex;
  23644. align-items: center;
  23645. }
  23646. .wb_j_box_p_box {
  23647. max-width: calc(100% - 200px);
  23648. word-break: break-all;
  23649. overflow: hidden;
  23650. margin: 0 0 0 10px;
  23651. font-size: 14px;
  23652. color: #6e6e6e;
  23653. z-index: 999;
  23654. }
  23655. .chooseWho {
  23656. display: flex;
  23657. width: 410px;
  23658. flex-direction: row;
  23659. flex-wrap: nowrap;
  23660. justify-content: space-between;
  23661. padding-bottom: 10px;
  23662. }
  23663. .chooseWho>div {
  23664. cursor: pointer;
  23665. padding-bottom: 10px;
  23666. font-weight: bold;
  23667. }
  23668. .isChooseActive {
  23669. color: #3e88f4;
  23670. border-bottom: 2px solid #2f80f3;
  23671. }
  23672. .toolSort {
  23673. display: flex;
  23674. flex-direction: row;
  23675. flex-wrap: wrap;
  23676. justify-content: flex-start;
  23677. align-items: flex-start;
  23678. }
  23679. .toolSort>div {
  23680. margin-right: 10px;
  23681. }
  23682. .tools {
  23683. width: 100%;
  23684. display: flex;
  23685. flex-direction: column;
  23686. flex-wrap: nowrap;
  23687. align-items: flex-start;
  23688. }
  23689. .leftTools,
  23690. .rightTools {
  23691. width: 50%;
  23692. }
  23693. .leftTools+.leftTools {
  23694. border-top: 1px solid #dbdbdb;
  23695. padding-top: 30px;
  23696. }
  23697. .rightTools {
  23698. display: flex;
  23699. flex-direction: row;
  23700. flex-wrap: nowrap;
  23701. justify-content: space-around;
  23702. }
  23703. .firstToolList {
  23704. display: flex;
  23705. flex-direction: column;
  23706. flex-wrap: nowrap;
  23707. align-items: center;
  23708. }
  23709. .iconList {
  23710. display: flex;
  23711. flex-direction: row;
  23712. flex-wrap: wrap;
  23713. justify-content: flex-start;
  23714. align-items: center;
  23715. margin: 20px 0 5px 0;
  23716. width: 240px;
  23717. min-width: 240px;
  23718. }
  23719. .iconTool {
  23720. display: flex;
  23721. flex-direction: column;
  23722. flex-wrap: nowrap;
  23723. align-items: center;
  23724. justify-content: flex-start;
  23725. margin: 15px 10px;
  23726. }
  23727. .toolIcon {
  23728. width: 50px;
  23729. }
  23730. .taskBorder {
  23731. /* border: 1px solid #CAD1DC; */
  23732. border-radius: 10px;
  23733. margin-top: 10px;
  23734. min-height: 670px;
  23735. position: relative;
  23736. background: #fff;
  23737. padding: 20px;
  23738. overflow: hidden;
  23739. box-sizing: border-box;
  23740. }
  23741. .smallTaskBorder {
  23742. height: 405px;
  23743. min-height: 405px !important;
  23744. overflow: hidden;
  23745. }
  23746. /* .taskBorder>div {
  23747. padding: 30px 30px 10px;
  23748. } */
  23749. .addTaskBorder {
  23750. /* border: 2px solid #5E9AFC; */
  23751. border-radius: 8px;
  23752. margin-top: 10px;
  23753. cursor: pointer;
  23754. /* height: 50px;
  23755. line-height: 50px; */
  23756. background: #fff;
  23757. padding: 15px 0;
  23758. display: flex;
  23759. align-items: center;
  23760. justify-content: center;
  23761. }
  23762. /* .addTaskBorder>div {
  23763. margin: 0 auto;
  23764. display: flex;
  23765. align-items: center;
  23766. justify-content: center;
  23767. }
  23768. .addTaskBorder>div>img {
  23769. width: 20px;
  23770. }
  23771. .addTaskBorder>div>span {
  23772. font-size: 16px;
  23773. margin-left: 10px;
  23774. color: #5E9AFC;
  23775. } */
  23776. .funBlock {
  23777. display: flex;
  23778. padding: 15px 0;
  23779. flex-direction: row;
  23780. justify-content: center;
  23781. align-items: center;
  23782. position: absolute;
  23783. right: 0;
  23784. bottom: 0;
  23785. background: #fff;
  23786. width: 100%;
  23787. height: 60px;
  23788. z-index: 9;
  23789. }
  23790. .fold {
  23791. display: flex;
  23792. margin: 0 20px;
  23793. flex-direction: row;
  23794. align-items: center;
  23795. cursor: pointer;
  23796. color: #2b7bff;
  23797. }
  23798. .arrow {
  23799. margin-right: 8px;
  23800. width: 16px;
  23801. height: 16px;
  23802. min-width: 16px;
  23803. min-height: 16px;
  23804. background-size: 100% 100%;
  23805. display: block;
  23806. background-image: url(../../../assets/icon/new/u_up.png);
  23807. /* border-left: 7px solid transparent;
  23808. border-bottom: 7px solid #717C8D;
  23809. border-top: 0px solid transparent;
  23810. border-right: 7px solid transparent; */
  23811. /* box-sizing: border-box; */
  23812. transition: all 0.3s;
  23813. }
  23814. .arrowZ {
  23815. transform: rotate(180deg);
  23816. }
  23817. .addToolFun {
  23818. display: flex;
  23819. width: 150px;
  23820. flex-direction: row;
  23821. align-items: center;
  23822. justify-content: center;
  23823. border: 2px dashed #cad1dc;
  23824. border-radius: 5px;
  23825. height: 50px;
  23826. margin: 35px auto 0;
  23827. cursor: pointer;
  23828. }
  23829. .addToolFun2 {
  23830. display: flex;
  23831. width: 150px;
  23832. border: 2px dashed #cad1dc;
  23833. flex-direction: row;
  23834. align-items: center;
  23835. justify-content: center;
  23836. border-radius: 5px;
  23837. height: 50px;
  23838. margin: 0 auto 0;
  23839. cursor: pointer;
  23840. }
  23841. .addToolFun2>div,
  23842. .addToolFun>div {
  23843. display: flex;
  23844. line-height: 50px;
  23845. }
  23846. .addToolImg {
  23847. width: 20px;
  23848. height: 20px;
  23849. margin-right: 10px;
  23850. }
  23851. .addToolsDia>>>.el-dialog__body {
  23852. padding: 20px;
  23853. }
  23854. .addToolsDia>>>.el-dialog__body>.toolChoose {
  23855. padding: 0;
  23856. }
  23857. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  23858. padding: 0;
  23859. border-bottom: none;
  23860. margin-bottom: 0;
  23861. }
  23862. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  23863. width: 100%;
  23864. }
  23865. .lineCss>>>.el-form-item__label {
  23866. width: auto !important;
  23867. }
  23868. .lineCss>>>.el-form-item__content {
  23869. margin-left: 50px !important;
  23870. }
  23871. .newSteps {
  23872. display: flex;
  23873. width: 100% !important;
  23874. /* height: 80px; */
  23875. cursor: pointer;
  23876. margin: 10px 0;
  23877. border-radius: 10px;
  23878. flex-direction: row;
  23879. align-content: center;
  23880. justify-content: center;
  23881. align-items: center;
  23882. margin: 0 !important;
  23883. }
  23884. /* 评价样式 */
  23885. .elist_css {
  23886. padding-bottom: 75px !important;
  23887. }
  23888. .elist_title {
  23889. margin-bottom: 10px;
  23890. }
  23891. .elist_input {
  23892. width: 100%;
  23893. }
  23894. .elist_input_box {
  23895. display: flex;
  23896. align-items: center;
  23897. flex-wrap: wrap;
  23898. }
  23899. .elist_input_box+.elist_input_box {
  23900. margin-top: 30px;
  23901. }
  23902. .elist_input .elist_input_box input {
  23903. font: inherit;
  23904. color: currentColor;
  23905. width: 100%;
  23906. /* max-width: calc(100% - 385px); */
  23907. max-width: calc(100% - 150px);
  23908. padding: 8px 14px;
  23909. display: block;
  23910. min-width: 0;
  23911. outline: none;
  23912. border: 1px solid rgba(0, 0, 0, 0.23);
  23913. border-radius: 4px;
  23914. box-sizing: border-box;
  23915. background: #fff;
  23916. margin: 0 20px 0 0;
  23917. }
  23918. .elist_input .elist_input_box span {
  23919. height: 36px;
  23920. line-height: 36px;
  23921. color: rgb(82, 82, 82);
  23922. min-width: 80px;
  23923. }
  23924. .elist_input .elist_input_box .remove {
  23925. height: 20px;
  23926. width: 20px;
  23927. min-height: 20px;
  23928. min-width: 20px;
  23929. background-size: 100% 100%;
  23930. background-position: unset;
  23931. margin-left: 5px;
  23932. }
  23933. .elist_input_box>>>.el-rate {
  23934. display: flex;
  23935. height: 36px;
  23936. align-items: center;
  23937. }
  23938. .elist_input_box .elist_inptu_text {
  23939. width: 100%;
  23940. display: flex;
  23941. align-items: center;
  23942. margin-top: 10px;
  23943. }
  23944. .elist_input_box .elist_inptu_text input {
  23945. /* width: 500px; */
  23946. width: 100%;
  23947. max-width: unset;
  23948. }
  23949. .elist_input_box>>>.el-rate__icon {
  23950. font-size: 24px;
  23951. }
  23952. .elist_btn {
  23953. margin-top: 10px;
  23954. }
  23955. .lineTitle {
  23956. /* margin-top: 15px; */
  23957. width: 110px;
  23958. font-size: 16px;
  23959. display: flex;
  23960. align-items: center;
  23961. line-height: 20px;
  23962. }
  23963. .lineTitle::before {
  23964. content: "";
  23965. display: block;
  23966. width: 3px;
  23967. height: 20px;
  23968. background: #0061ff;
  23969. border-radius: 3px;
  23970. margin: 0 5px 0 0;
  23971. }
  23972. .clineTitle::before {
  23973. content: "";
  23974. display: block;
  23975. min-width: 10px;
  23976. width: 10px;
  23977. height: 10px;
  23978. background: #0061ff;
  23979. border-radius: 50%;
  23980. margin: 0 5px 0 0;
  23981. }
  23982. .courseTop {
  23983. display: flex;
  23984. flex-direction: row;
  23985. justify-content: space-between;
  23986. align-items: center;
  23987. width: calc(100% - 40px);
  23988. margin: 0 auto;
  23989. padding: 10px 0;
  23990. }
  23991. .stepsNav {
  23992. display: flex;
  23993. flex-direction: row;
  23994. justify-content: flex-start;
  23995. align-items: center;
  23996. }
  23997. .stepsWord {
  23998. font-size: 18px;
  23999. color: #fff;
  24000. font-weight: bold;
  24001. margin-left: auto;
  24002. background: rgb(15, 126, 255);
  24003. border-radius: 5px;
  24004. padding: 3px 25px;
  24005. box-sizing: border-box;
  24006. }
  24007. .stepBox {
  24008. width: calc(100% - 40px);
  24009. height: calc(100% - 50px);
  24010. overflow: hidden;
  24011. border-radius: 5px;
  24012. margin: 0 auto;
  24013. }
  24014. .rightBox {
  24015. width: calc(100%);
  24016. background: #f0f2f5;
  24017. /* border-radius: 10px; */
  24018. overflow: auto;
  24019. height: calc(100% - 150px);
  24020. margin: 0 auto;
  24021. position: relative;
  24022. box-sizing: border-box;
  24023. }
  24024. .e_add_top {
  24025. display: flex;
  24026. justify-content: space-between;
  24027. background: #fff;
  24028. position: absolute;
  24029. right: 20px;
  24030. height: 50px;
  24031. align-items: center;
  24032. }
  24033. .e_add_title2 {
  24034. display: flex;
  24035. align-items: center;
  24036. }
  24037. .e_add_title2 span {
  24038. width: 40px;
  24039. }
  24040. .e_add_title {
  24041. display: flex;
  24042. align-items: center;
  24043. color: #b8b8b8;
  24044. font-size: 18px;
  24045. position: relative;
  24046. height: 40px;
  24047. }
  24048. .e_add_title span {
  24049. margin-right: 10px;
  24050. }
  24051. .e_add_title .el_input {
  24052. width: 300px;
  24053. }
  24054. .e_add_title>>>.el-input__inner {
  24055. width: 400px;
  24056. }
  24057. .e_add_btn {}
  24058. .e_add_content {
  24059. display: flex;
  24060. width: 100%;
  24061. }
  24062. .e_add_list {
  24063. background: #fff;
  24064. height: 500px;
  24065. width: 210px;
  24066. position: relative;
  24067. margin: 15px 5px 0 0;
  24068. flex-shrink: 0;
  24069. display: flex;
  24070. flex-direction: column;
  24071. }
  24072. .e_add_list_title {
  24073. font-size: 20px;
  24074. width: 100%;
  24075. box-sizing: border-box;
  24076. padding: 15px 40px;
  24077. text-align: center;
  24078. border-bottom: 1px solid #eaeaea;
  24079. position: relative;
  24080. display: flex;
  24081. align-items: center;
  24082. justify-content: center;
  24083. height: 57px;
  24084. background: #f6f6f6;
  24085. }
  24086. .e_add_list_title span {
  24087. overflow: hidden;
  24088. white-space: nowrap;
  24089. text-overflow: ellipsis;
  24090. }
  24091. .e_add_list_title img {
  24092. position: absolute;
  24093. right: 15px;
  24094. width: 25px;
  24095. cursor: pointer;
  24096. top: 50%;
  24097. transform: translateY(-50%);
  24098. }
  24099. .e_add_list_body {
  24100. height: calc(100% - 187px);
  24101. overflow: auto;
  24102. }
  24103. .e_add_list_child {
  24104. width: 100%;
  24105. display: flex;
  24106. align-items: center;
  24107. justify-content: center;
  24108. position: relative;
  24109. box-sizing: border-box;
  24110. padding: 15px 40px;
  24111. text-align: center;
  24112. }
  24113. .e_add_list_child span {
  24114. overflow: hidden;
  24115. white-space: nowrap;
  24116. text-overflow: ellipsis;
  24117. cursor: pointer;
  24118. }
  24119. .e_add_list_child img {
  24120. position: absolute;
  24121. right: 10px;
  24122. width: 21px;
  24123. cursor: pointer;
  24124. top: 50%;
  24125. transform: translateY(-50%);
  24126. }
  24127. .e_add_list_child+.e_add_list_child {
  24128. border-top: 1px solid #eaeaea;
  24129. }
  24130. .e_add_list_child .active {
  24131. color: #409eff;
  24132. }
  24133. .e_add_list_btn {
  24134. position: absolute;
  24135. bottom: 0;
  24136. height: 50px;
  24137. background: rgb(120, 120, 254);
  24138. width: 100%;
  24139. color: #fff;
  24140. font-size: 16px;
  24141. text-align: center;
  24142. line-height: 50px;
  24143. cursor: pointer;
  24144. }
  24145. .e_add_list_detail {
  24146. position: absolute;
  24147. bottom: 0;
  24148. height: 130px;
  24149. background: rgb(120, 120, 254);
  24150. width: 100%;
  24151. color: #fff;
  24152. font-size: 16px;
  24153. display: flex;
  24154. align-items: center;
  24155. justify-content: center;
  24156. }
  24157. .e_add_list_detail textarea {
  24158. height: 90%;
  24159. width: 95%;
  24160. border: none;
  24161. resize: none;
  24162. outline: none;
  24163. padding: 5px;
  24164. box-sizing: border-box;
  24165. }
  24166. .e_add_list_pbox {
  24167. width: 100%;
  24168. }
  24169. .e_add_list_pbox_title {
  24170. height: 50px;
  24171. background: #fff;
  24172. display: flex;
  24173. align-items: center;
  24174. width: 100%;
  24175. box-sizing: border-box;
  24176. padding: 0 20px;
  24177. flex-direction: row;
  24178. flex-wrap: wrap;
  24179. }
  24180. .type_title {
  24181. font-size: 18px;
  24182. font-weight: 700;
  24183. }
  24184. .type_content {
  24185. font-size: 16px;
  24186. margin-left: 30px;
  24187. }
  24188. .type_content span+span {
  24189. margin-left: 20px;
  24190. }
  24191. .type_content span {
  24192. cursor: pointer;
  24193. padding-bottom: 5px;
  24194. box-sizing: border-box;
  24195. }
  24196. .type_content .active {
  24197. color: #409eff;
  24198. border-bottom: 2px solid #409eff;
  24199. }
  24200. .e_add_list_pbox_content {
  24201. height: calc(100% - 50px);
  24202. display: flex;
  24203. align-items: center;
  24204. width: 100%;
  24205. background: #fff;
  24206. }
  24207. .mbCss {
  24208. width: 100%;
  24209. display: flex;
  24210. flex-direction: row;
  24211. flex-wrap: nowrap;
  24212. align-content: center;
  24213. align-items: flex-start;
  24214. justify-content: flex-start;
  24215. }
  24216. .pjCss {
  24217. /* width: 42%; */
  24218. width: calc(100% - 55%);
  24219. display: flex;
  24220. flex-direction: column;
  24221. flex-wrap: nowrap;
  24222. align-items: flex-start;
  24223. }
  24224. .e_box {
  24225. /* display: flex; */
  24226. flex-wrap: wrap;
  24227. max-height: 500px;
  24228. align-items: flex-start;
  24229. overflow: auto;
  24230. width: 100%;
  24231. }
  24232. .e_card {
  24233. border: 1px solid #ccc;
  24234. background: #fff;
  24235. margin-right: 20px;
  24236. width: 270px;
  24237. display: flex;
  24238. flex-direction: column;
  24239. align-items: center;
  24240. border-radius: 5px;
  24241. margin-top: 10px;
  24242. text-align: center;
  24243. }
  24244. .e_card_picture {
  24245. margin: 10px 0;
  24246. }
  24247. .e_card_picture>img {
  24248. width: 50px;
  24249. }
  24250. .e_card_name {
  24251. width: 100%;
  24252. padding: 0 10px;
  24253. box-sizing: border-box;
  24254. margin-bottom: 10px;
  24255. overflow: hidden;
  24256. text-overflow: ellipsis;
  24257. white-space: nowrap;
  24258. }
  24259. .e_card_time {
  24260. width: 100%;
  24261. padding: 0 10px;
  24262. box-sizing: border-box;
  24263. font-size: 15px;
  24264. color: #c3c3c3;
  24265. margin-bottom: 10px;
  24266. }
  24267. .e_card_btn {
  24268. height: 40px;
  24269. display: flex;
  24270. align-items: center;
  24271. width: 100%;
  24272. background: rgb(244, 244, 244);
  24273. }
  24274. .e_card_btn:hover {
  24275. background: rgb(221 221 221);
  24276. }
  24277. .e_card_btn span {
  24278. flex: 1 1 auto;
  24279. text-align: center;
  24280. cursor: pointer;
  24281. }
  24282. .addEva {
  24283. border: 1px solid #ccc;
  24284. background: #fff;
  24285. margin-right: 20px;
  24286. width: 270px;
  24287. height: 149px;
  24288. display: flex;
  24289. flex-direction: column;
  24290. align-items: center;
  24291. border-radius: 5px;
  24292. margin-top: 10px;
  24293. text-align: center;
  24294. cursor: pointer;
  24295. justify-content: center;
  24296. }
  24297. .addEva>img {
  24298. width: 50px;
  24299. object-fit: cover;
  24300. }
  24301. .uploadFm {
  24302. border: 1px dashed #ccc;
  24303. width: 100%;
  24304. height: 140px;
  24305. position: relative;
  24306. cursor: pointer;
  24307. display: flex;
  24308. flex-direction: column;
  24309. justify-content: center;
  24310. align-items: center;
  24311. font-size: 14px;
  24312. color: #6e6e6e;
  24313. position: relative;
  24314. }
  24315. .cover_p {
  24316. width: 100% !important;
  24317. height: 100%;
  24318. object-fit: cover;
  24319. }
  24320. .uploadFm2:hover .cover_mask {
  24321. display: flex !important;
  24322. }
  24323. .cover_mask {
  24324. display: none;
  24325. width: 100%;
  24326. height: 100%;
  24327. position: absolute;
  24328. background: #00000054;
  24329. align-items: center;
  24330. justify-content: center;
  24331. flex-direction: column;
  24332. }
  24333. .cover_mask>img {
  24334. width: 30px;
  24335. }
  24336. .cover_mask>span {
  24337. color: #fff;
  24338. font-size: 12px;
  24339. }
  24340. .uploadFm>img {
  24341. width: 50px;
  24342. }
  24343. .fileCss {
  24344. width: 100%;
  24345. display: flex;
  24346. flex-direction: row;
  24347. flex-wrap: nowrap;
  24348. justify-content: space-around;
  24349. align-items: center;
  24350. padding-top: 15px;
  24351. }
  24352. .fileCss>div {
  24353. display: flex;
  24354. flex-direction: column;
  24355. align-items: center;
  24356. }
  24357. .fileCss .spanName {
  24358. margin-top: 10px;
  24359. }
  24360. .sysPicBox {
  24361. display: flex;
  24362. flex-direction: row;
  24363. flex-wrap: wrap;
  24364. align-content: flex-start;
  24365. height: 435px;
  24366. overflow: auto;
  24367. position: relative;
  24368. }
  24369. .picNone {
  24370. position: absolute;
  24371. left: 50%;
  24372. top: 45%;
  24373. transform: translate(-50%, -50%);
  24374. width: fit-content;
  24375. color: #9c9c9c;
  24376. }
  24377. .sysPic {
  24378. width: 200px;
  24379. height: 115px;
  24380. margin: 0 20px 20px 0;
  24381. cursor: pointer;
  24382. }
  24383. .sysPic>img,
  24384. .isSysPic>img,
  24385. .deletePic>img {
  24386. width: 100%;
  24387. height: 100%;
  24388. object-fit: cover;
  24389. }
  24390. .isSysPic {
  24391. width: 200px;
  24392. height: 115px;
  24393. position: relative;
  24394. }
  24395. .deletePic {
  24396. width: 20px;
  24397. height: 20px;
  24398. position: absolute;
  24399. top: 0;
  24400. right: 0;
  24401. cursor: pointer;
  24402. }
  24403. .select_box1 {
  24404. height: 100%;
  24405. }
  24406. .select_box1_img {
  24407. background: #fff;
  24408. border-radius: 5px;
  24409. padding: 15px;
  24410. box-sizing: border-box;
  24411. margin-bottom: 20px;
  24412. }
  24413. .select_box1_title {
  24414. padding: 0 0 15px 0;
  24415. border-bottom: 1px solid #eee;
  24416. margin-bottom: 15px;
  24417. }
  24418. .select_box1_title span:nth-child(1) {
  24419. font-size: 16px;
  24420. margin-right: 20px;
  24421. color: #000;
  24422. }
  24423. .select_box1_title span:nth-child(2) {
  24424. font-size: 14px;
  24425. color: rgb(112, 112, 112);
  24426. }
  24427. .select_box1_add_img {}
  24428. .select_box1_select {
  24429. background: #fff;
  24430. border-radius: 5px;
  24431. padding: 15px;
  24432. box-sizing: border-box;
  24433. height: calc(100% - 200px);
  24434. overflow: auto;
  24435. }
  24436. .select_box2 {
  24437. height: 100%;
  24438. }
  24439. .select_box2_title {
  24440. background: #fff;
  24441. border-radius: 5px;
  24442. padding: 5px 10px;
  24443. box-sizing: border-box;
  24444. margin-bottom: 10px;
  24445. }
  24446. .select_box2_box {
  24447. display: flex;
  24448. height: calc(100% - 30px);
  24449. }
  24450. .select_box2_img {
  24451. width: calc(100% - 310px);
  24452. height: 100%;
  24453. overflow: auto;
  24454. background: #fff;
  24455. border-radius: 5px;
  24456. }
  24457. .select_box2_img img {
  24458. width: 100%;
  24459. }
  24460. .select_box2_answer {
  24461. background: #fff;
  24462. margin-left: 10px;
  24463. border-radius: 5px;
  24464. width: 300px;
  24465. overflow: auto;
  24466. height: 100%;
  24467. display: flex;
  24468. flex-direction: column;
  24469. align-items: center;
  24470. padding-top: 10px;
  24471. box-sizing: border-box;
  24472. }
  24473. .select_box2_answer_box {
  24474. margin: 0 0 10px 0;
  24475. width: 85%;
  24476. }
  24477. .rate_textarea {
  24478. font: inherit;
  24479. color: currentColor;
  24480. width: 100%;
  24481. padding: 8px 14px;
  24482. display: block;
  24483. min-width: 0;
  24484. outline: none;
  24485. border: 1px solid rgba(0, 0, 0, 0.23);
  24486. border-radius: 4px;
  24487. box-sizing: border-box;
  24488. background: #fff;
  24489. margin: 0 20px 0 0;
  24490. resize: none;
  24491. }
  24492. .select_answer_title {
  24493. text-align: left;
  24494. width: 85%;
  24495. margin-bottom: 10px;
  24496. font-size: 18px;
  24497. color: #8e8e8e;
  24498. }
  24499. .mask {
  24500. background-color: rgb(0 0 0 / 30%);
  24501. /* position: fixed; */
  24502. position: absolute;
  24503. top: 0;
  24504. left: 0;
  24505. width: 100%;
  24506. height: 100%;
  24507. z-index: 90;
  24508. display: flex;
  24509. align-items: center;
  24510. justify-content: center;
  24511. }
  24512. .progressBox {
  24513. width: 300px;
  24514. height: 150px;
  24515. background: #fff;
  24516. border-radius: 10px;
  24517. box-shadow: 0 0 6px 1px #bfbfbf;
  24518. display: flex;
  24519. align-items: center;
  24520. justify-content: center;
  24521. flex-direction: column;
  24522. position: relative;
  24523. color: #6c6c6c;
  24524. }
  24525. .progressBox>>>.el-progress-bar__outer {
  24526. background-color: #d1dfff !important;
  24527. }
  24528. .progressBox .lbox {
  24529. height: 50px;
  24530. font-size: 19px;
  24531. display: flex;
  24532. align-items: center;
  24533. color: #747474;
  24534. }
  24535. .progressBox .lbox img {
  24536. width: 40px;
  24537. margin-right: 20px;
  24538. }
  24539. .closeCss {
  24540. position: absolute;
  24541. top: 8px;
  24542. right: 8px;
  24543. cursor: pointer;
  24544. width: 20px;
  24545. height: 20px;
  24546. }
  24547. .closeCss>img {
  24548. width: 100%;
  24549. height: 100%;
  24550. }
  24551. .updateTips::before {
  24552. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  24553. font-size: 14px;
  24554. margin-left: 20px;
  24555. font-weight: 400;
  24556. color: #ff3a3a;
  24557. margin-bottom: 10px;
  24558. display: block;
  24559. }
  24560. .updateMask {
  24561. width: 100%;
  24562. z-index: 3;
  24563. top: 0;
  24564. position: absolute;
  24565. /* background-color: rgba(0,0,0,.3); */
  24566. }
  24567. .t_j_box {
  24568. display: flex;
  24569. }
  24570. .t_j_box span:nth-child(1) {
  24571. width: 15%;
  24572. overflow: hidden;
  24573. margin-right: 10px;
  24574. text-overflow: ellipsis;
  24575. white-space: nowrap;
  24576. }
  24577. .t_j_box span:nth-child(2) {
  24578. width: 30%;
  24579. overflow: hidden;
  24580. text-overflow: ellipsis;
  24581. margin-right: 10px;
  24582. }
  24583. .t_j_box span:nth-child(3) {
  24584. max-width: calc(55% - 20px);
  24585. overflow: hidden;
  24586. text-overflow: ellipsis;
  24587. }
  24588. .sentenBox {
  24589. background: #fff;
  24590. height: 600px;
  24591. overflow: auto;
  24592. background-image: url("../../../assets/icon/conSentences/csBg.png");
  24593. background-position: 102%;
  24594. background-repeat: no-repeat;
  24595. background-size: 60%;
  24596. }
  24597. .sentenBox>.sentenContent {
  24598. padding-bottom: 10px;
  24599. width: 97%;
  24600. margin: 0 auto;
  24601. }
  24602. .sentenBox>.sentenContent+.sentenContent {
  24603. border-top: 1px solid #cbcbcb;
  24604. }
  24605. .addSen {
  24606. background: #409efe;
  24607. width: 90px;
  24608. color: #fff;
  24609. height: 35px;
  24610. text-align: center;
  24611. line-height: 35px;
  24612. border-radius: 5px;
  24613. float: right;
  24614. margin: 10px 20px 0 0;
  24615. cursor: pointer;
  24616. }
  24617. .sentenTop {
  24618. display: flex;
  24619. flex-direction: row;
  24620. flex-wrap: nowrap;
  24621. align-items: center;
  24622. }
  24623. .sentenTop::before {
  24624. content: attr(index);
  24625. background: #3681fc;
  24626. border-radius: 50%;
  24627. color: #fff;
  24628. width: 25px;
  24629. height: 25px;
  24630. min-width: 25px;
  24631. min-height: 25px;
  24632. text-align: center;
  24633. line-height: 25px;
  24634. margin-right: 5px;
  24635. }
  24636. .sentenTop>div:nth-child(2) {
  24637. width: 300px;
  24638. margin: 0 15px;
  24639. }
  24640. .sentenTop>div:nth-child(3) {
  24641. background: #409efe;
  24642. color: #fff;
  24643. width: 65px;
  24644. height: 35px;
  24645. text-align: center;
  24646. line-height: 35px;
  24647. border-radius: 5px;
  24648. cursor: pointer;
  24649. }
  24650. .cardList {
  24651. padding: 30px 0 20px 0;
  24652. display: flex;
  24653. flex-direction: row;
  24654. flex-wrap: wrap;
  24655. align-items: center;
  24656. box-sizing: border-box;
  24657. border-bottom: 1px solid #f4f4f4;
  24658. width: 98%;
  24659. margin: 0 auto;
  24660. }
  24661. .rightCardList {
  24662. display: flex;
  24663. flex-wrap: wrap;
  24664. }
  24665. .cardBox {
  24666. display: flex;
  24667. flex-direction: row;
  24668. flex-wrap: wrap;
  24669. align-items: center;
  24670. align-content: center;
  24671. }
  24672. .isCard,
  24673. .isCard1 {
  24674. width: auto;
  24675. padding: 0 20px;
  24676. height: 65px;
  24677. text-align: center;
  24678. line-height: 65px;
  24679. font-size: 14px;
  24680. cursor: pointer;
  24681. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  24682. background-size: 100% 100%;
  24683. position: relative;
  24684. z-index: 99;
  24685. }
  24686. .isCard1 {
  24687. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  24688. }
  24689. .isCard:hover .deleteWord {
  24690. display: block;
  24691. }
  24692. .isCard>div:nth-child(1),
  24693. .isCard1>div:nth-child(1) {
  24694. white-space: nowrap;
  24695. overflow: hidden;
  24696. text-overflow: ellipsis;
  24697. width: 100%;
  24698. margin: 0 auto;
  24699. }
  24700. .card {
  24701. width: 140px;
  24702. height: 65px;
  24703. }
  24704. .card>img {
  24705. width: 100%;
  24706. height: 100%;
  24707. }
  24708. .rightCardBox {
  24709. width: 98%;
  24710. margin: 10px auto 0;
  24711. }
  24712. .rightCardBox>div:nth-child(1) {
  24713. margin-bottom: 10px;
  24714. }
  24715. .cardCss {
  24716. display: flex;
  24717. flex-direction: column;
  24718. flex-wrap: nowrap;
  24719. align-items: center;
  24720. border-bottom: 3px solid #b4c3d3;
  24721. padding: 0 0 5px 0;
  24722. /* margin-right: 10px; */
  24723. }
  24724. .cardCss>div:nth-child(2) {
  24725. background: #5b7b9d;
  24726. color: #fff;
  24727. width: 20px;
  24728. height: 20px;
  24729. border-radius: 50%;
  24730. text-align: center;
  24731. line-height: 20px;
  24732. }
  24733. .sentenTopBox {
  24734. display: flex;
  24735. flex-direction: row;
  24736. flex-wrap: nowrap;
  24737. align-items: center;
  24738. justify-content: space-between;
  24739. padding: 55px 0 0 20px;
  24740. box-sizing: border-box;
  24741. width: 85%;
  24742. }
  24743. .rb_c_ai_box,
  24744. .stepsBottom {
  24745. width: 100%;
  24746. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  24747. /* background: #f7f7f7; */
  24748. border-radius: 10px;
  24749. overflow: hidden;
  24750. /* height: 100%; */
  24751. height: calc(100% - 55px);
  24752. }
  24753. .navTop {
  24754. background: #53749b;
  24755. color: #fff;
  24756. height: 40px;
  24757. line-height: 40px;
  24758. padding-left: 15px;
  24759. font-size: 18px;
  24760. }
  24761. .navBottom {
  24762. /* background: #6b91b7; */
  24763. height: 100%;
  24764. overflow: auto;
  24765. padding: 10px 0;
  24766. }
  24767. .navStage {
  24768. display: flex;
  24769. flex-direction: row;
  24770. flex-wrap: nowrap;
  24771. align-items: center;
  24772. padding: 10px 10px 10px 0;
  24773. cursor: pointer;
  24774. background: #ffffff;
  24775. width: 95%;
  24776. margin: 5px auto 5px;
  24777. box-sizing: border-box;
  24778. border-radius: 5px;
  24779. flex-wrap: wrap;
  24780. position: relative;
  24781. }
  24782. .navStage:hover>.chapter_upload_drag {
  24783. display: block;
  24784. }
  24785. .navTask:hover>.chapter_upload_drag {
  24786. display: block;
  24787. }
  24788. .chapter_upload:hover>.chapter_upload_drag {
  24789. display: block;
  24790. }
  24791. .navStage::before {
  24792. content: "";
  24793. display: block;
  24794. width: 16px;
  24795. height: 16px;
  24796. background-image: url(../../../assets/icon/new/icon_stage.png);
  24797. background-size: 100%;
  24798. margin-left: 25px;
  24799. }
  24800. .navStage .chapter_unit_open {
  24801. content: "";
  24802. display: block;
  24803. width: 16px;
  24804. height: 16px;
  24805. background-image: url(../../../assets/icon/new/down.png);
  24806. transform: rotate(-90deg);
  24807. background-size: 100%;
  24808. margin-left: 10px;
  24809. transition: all 0.5s;
  24810. }
  24811. .isNavStageOpen .chapter_unit_open {
  24812. transform: rotate(0deg);
  24813. }
  24814. .isNavStage {
  24815. background: #0061ff;
  24816. }
  24817. .isNavStage::before {
  24818. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  24819. }
  24820. .isNavStage .chapter_unit_open {
  24821. background-image: url(../../../assets/icon/new/downC.png);
  24822. }
  24823. .isNavStage .nt_taskName {
  24824. font-weight: bold !important;
  24825. color: #ffffff !important;
  24826. }
  24827. .isNavStage .nt_taskTitle {
  24828. font-weight: bold !important;
  24829. color: #fff !important;
  24830. }
  24831. .navStage .nt_taskBox {
  24832. width: calc(100% - 68px);
  24833. padding: 0 0 0 5px;
  24834. box-sizing: border-box;
  24835. box-sizing: border-box;
  24836. display: flex;
  24837. flex-direction: row;
  24838. flex-wrap: nowrap;
  24839. align-items: baseline;
  24840. }
  24841. .navStage .nt_taskTitle {
  24842. color: #060e17;
  24843. line-height: 25px;
  24844. font-size: 16px;
  24845. }
  24846. .navStage .nt_taskName {
  24847. max-width: calc(100% - 82px);
  24848. white-space: nowrap;
  24849. overflow: hidden;
  24850. text-overflow: ellipsis;
  24851. font-size: 16px;
  24852. color: #060e17;
  24853. }
  24854. .navTask {
  24855. display: flex;
  24856. flex-direction: row;
  24857. flex-wrap: nowrap;
  24858. align-items: center;
  24859. padding: 10px 10px 10px 0;
  24860. cursor: pointer;
  24861. background: #ffffff;
  24862. width: 95%;
  24863. margin: 5px auto 5px;
  24864. box-sizing: border-box;
  24865. border-radius: 5px;
  24866. flex-wrap: wrap;
  24867. position: relative;
  24868. }
  24869. .navTask .chapter_upload_open {
  24870. content: "";
  24871. display: block;
  24872. width: 16px;
  24873. height: 16px;
  24874. background-image: url(../../../assets/icon/new/icon_arrow.png);
  24875. background-size: 100%;
  24876. margin-left: 23px;
  24877. }
  24878. .noImage .chapter_upload_open {
  24879. display: none;
  24880. background-image: unset !important;
  24881. }
  24882. .isNavOpen .chapter_upload_open {
  24883. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  24884. transform: rotate(90deg);
  24885. }
  24886. .isNavTask .chapter_upload_open {
  24887. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  24888. transform: rotate(-90deg);
  24889. }
  24890. .isNavTask.isNavOpen .chapter_upload_open {
  24891. transform: rotate(0deg);
  24892. }
  24893. .dragOverTop {
  24894. border-top: 2px solid #0061ff !important;
  24895. border-radius: 0 !important;
  24896. margin-top: 10px;
  24897. }
  24898. .dragOverBottom {
  24899. border-bottom: 2px solid #0061ff !important;
  24900. border-radius: 0 !important;
  24901. margin-top: 10px;
  24902. }
  24903. .dragOverTop2 {
  24904. border-top: 2px solid #0061ff !important;
  24905. border-radius: 0 !important;
  24906. }
  24907. .dragOverBottom2 {
  24908. border-bottom: 2px solid #0061ff !important;
  24909. border-radius: 0 !important;
  24910. }
  24911. .isNavTask {
  24912. /* background: #3681FC; */
  24913. background: #eef3fb;
  24914. }
  24915. .isNavTask>.chapter_upload_drag {
  24916. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  24917. }
  24918. .isNavTask .nt_taskName {
  24919. /* color: #fff !important; */
  24920. font-weight: bold !important;
  24921. color: #0061ff !important;
  24922. }
  24923. .isNavTask .nt_taskTitle {
  24924. /* color: #AECCFE !important; */
  24925. font-weight: bold !important;
  24926. color: #0061ff !important;
  24927. }
  24928. .navTask .nt_taskBox {
  24929. width: calc(100% - 40px);
  24930. padding: 0 0 0 5px;
  24931. box-sizing: border-box;
  24932. box-sizing: border-box;
  24933. display: flex;
  24934. flex-direction: row;
  24935. flex-wrap: nowrap;
  24936. align-items: baseline;
  24937. }
  24938. .navTask .nt_taskTitle {
  24939. /* color: #717C8D; */
  24940. color: #060e17;
  24941. line-height: 25px;
  24942. font-size: 16px;
  24943. /* min-width: 66px; */
  24944. }
  24945. .navTask .nt_taskName {
  24946. /* color: #fff; */
  24947. /* max-width: 130px; */
  24948. /* width: 100%; */
  24949. max-width: calc(100% - 66px);
  24950. font-size: 16px;
  24951. color: #060e17;
  24952. /* color: #0E1E33; */
  24953. }
  24954. .navTask .nt_taskName span {
  24955. width: 100%;
  24956. white-space: nowrap;
  24957. overflow: hidden;
  24958. text-overflow: ellipsis;
  24959. display: block;
  24960. }
  24961. .gjBox {
  24962. width: calc(100% - 25px);
  24963. padding: 0 0 0 0;
  24964. box-sizing: border-box;
  24965. border-left: 1px solid #cad1dc;
  24966. margin-left: 25px;
  24967. }
  24968. .gjBox>div {
  24969. display: flex;
  24970. align-items: center;
  24971. }
  24972. .gjBox>div::before {
  24973. content: "";
  24974. height: 1px;
  24975. width: 10px;
  24976. background: #cad1dc;
  24977. display: block;
  24978. margin-right: 5px;
  24979. }
  24980. .gjCss {
  24981. display: flex;
  24982. flex-direction: row;
  24983. flex-wrap: nowrap;
  24984. align-items: center;
  24985. padding: 15px 0;
  24986. box-sizing: border-box;
  24987. font-size: 14px;
  24988. cursor: pointer;
  24989. }
  24990. .isGjCss {
  24991. color: #0061ff;
  24992. }
  24993. .groupBox {}
  24994. .groupContent+.groupContent {
  24995. margin-top: 30px;
  24996. }
  24997. .groupTitle {
  24998. font-size: 24px;
  24999. color: rgb(80, 80, 80);
  25000. margin-bottom: 20px;
  25001. }
  25002. .groupName {
  25003. display: flex;
  25004. align-items: center;
  25005. }
  25006. .groupn {
  25007. font-size: 15px;
  25008. margin-right: 10px;
  25009. }
  25010. .groupName+.groupName {
  25011. margin-top: 15px;
  25012. }
  25013. .groupBtn {
  25014. margin-left: 10px;
  25015. }
  25016. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  25017. text-align: left;
  25018. }
  25019. .radioBox>div {
  25020. margin: 10px 0 0 10px;
  25021. }
  25022. .radioBox>>>.el-radio__input,
  25023. .radioBox>>>.el-checkbox__inner {
  25024. margin-left: 10px;
  25025. }
  25026. .radioBox>>>.el-radio__label,
  25027. .radioBox>>>.el-checkbox__label {
  25028. display: flex;
  25029. align-items: center;
  25030. }
  25031. .inImg {
  25032. width: 50px;
  25033. }
  25034. .inImg>img {
  25035. width: 100%;
  25036. height: 100%;
  25037. object-fit: cover;
  25038. }
  25039. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  25040. height: auto;
  25041. padding: 10px;
  25042. margin: 0;
  25043. }
  25044. .upCss>>>.el-upload-list {
  25045. width: 100%;
  25046. }
  25047. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  25048. width: 100%;
  25049. height: 120px;
  25050. object-fit: contain;
  25051. background: unset;
  25052. margin-left: 0;
  25053. }
  25054. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  25055. display: none;
  25056. }
  25057. .tcMember+.tcMember::before {
  25058. content: "、";
  25059. }
  25060. .xzUpImg {
  25061. width: 25px;
  25062. height: 25px;
  25063. min-width: 25px;
  25064. min-height: 25px;
  25065. cursor: pointer;
  25066. margin: 0 10px;
  25067. }
  25068. .xzUpImg>img {
  25069. width: 100%;
  25070. height: 100%;
  25071. }
  25072. .closeCss {
  25073. position: absolute;
  25074. top: 8px;
  25075. right: 8px;
  25076. cursor: pointer;
  25077. width: 20px;
  25078. height: 20px;
  25079. }
  25080. .closeCss>img {
  25081. width: 100%;
  25082. height: 100%;
  25083. }
  25084. .moveBtn {
  25085. display: flex;
  25086. flex-direction: row;
  25087. flex-wrap: nowrap;
  25088. align-items: center;
  25089. width: 55px;
  25090. }
  25091. .timuUpImg {
  25092. display: flex;
  25093. flex-direction: row;
  25094. align-items: center;
  25095. width: 100%;
  25096. margin-right: 10px;
  25097. }
  25098. .timuUpImg>div:nth-child(1) {
  25099. margin-right: 10px;
  25100. display: flex;
  25101. align-items: center;
  25102. width: 100%;
  25103. }
  25104. .timuImgBox {
  25105. margin: 10px 0;
  25106. display: flex;
  25107. flex-direction: column;
  25108. flex-wrap: wrap;
  25109. align-items: flex-start;
  25110. }
  25111. .timuImg {
  25112. width: 100px;
  25113. margin: 5px 0;
  25114. cursor: pointer;
  25115. position: relative;
  25116. }
  25117. .timuImg:hover .deleteWord {
  25118. display: block;
  25119. }
  25120. .deleteWord {
  25121. width: 25px;
  25122. height: 25px;
  25123. position: absolute;
  25124. right: -5px;
  25125. top: -5px;
  25126. cursor: pointer;
  25127. display: none;
  25128. }
  25129. .timuImg>img,
  25130. .deleteWord>img {
  25131. width: 100%;
  25132. height: 100%;
  25133. object-fit: cover;
  25134. }
  25135. .e_add_delete {
  25136. cursor: pointer;
  25137. margin-left: 10px;
  25138. }
  25139. .pType_box {
  25140. margin-top: 30px;
  25141. align-items: flex-end;
  25142. }
  25143. .noneBox {
  25144. height: 200px;
  25145. width: 100%;
  25146. display: flex;
  25147. align-items: center;
  25148. justify-content: center;
  25149. flex-direction: column;
  25150. /* margin-top: 150px; */
  25151. }
  25152. .noneBox>img {
  25153. width: 95px;
  25154. }
  25155. .noneBox>span {
  25156. margin-top: 10px;
  25157. color: #717c8d;
  25158. }
  25159. .rb_c_box {
  25160. width: 100%;
  25161. height: 100%;
  25162. display: flex;
  25163. /* padding: 20px; */
  25164. box-sizing: border-box;
  25165. justify-content: space-between;
  25166. }
  25167. .rb_c_box_left {
  25168. height: 100%;
  25169. background: #fff;
  25170. width: 270px;
  25171. min-width: 270px;
  25172. border-radius: 8px;
  25173. margin-right: 10px;
  25174. }
  25175. .rb_c_box_right {
  25176. height: 100%;
  25177. width: calc(100%);
  25178. overflow: hidden;
  25179. }
  25180. .rb_c_box_btn {
  25181. display: flex;
  25182. justify-content: flex-start;
  25183. height: 50px;
  25184. align-items: center;
  25185. }
  25186. .rb_c_box_right>.basic_box {
  25187. /* background: #fff; */
  25188. border-radius: 0;
  25189. height: calc(100% - 0px);
  25190. overflow: auto;
  25191. padding: 0;
  25192. }
  25193. .textarea_css {
  25194. display: block;
  25195. resize: none;
  25196. padding: 10px 15px;
  25197. line-height: 1.5;
  25198. box-sizing: border-box;
  25199. width: 100%;
  25200. font-size: 14px;
  25201. color: #606266;
  25202. background-color: #fff;
  25203. background-image: none;
  25204. border: 1px solid #dcdfe6;
  25205. border-radius: 4px;
  25206. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  25207. outline: none;
  25208. overflow: hidden;
  25209. height: 46px;
  25210. font-family: "Microsoft YaHei";
  25211. }
  25212. .textarea_css::-webkit-input-placeholder {
  25213. color: #c0c4cc;
  25214. }
  25215. .textarea_css:focus {
  25216. border-color: #409eff;
  25217. outline: 0;
  25218. }
  25219. .addEditor>>>.text {
  25220. height: auto;
  25221. min-height: 100px;
  25222. }
  25223. .addEditor>>>.w-e-text-container {
  25224. min-height: 100px;
  25225. }
  25226. .moveBtn2 {
  25227. flex-direction: column;
  25228. width: fit-content;
  25229. margin: 0 10px 0 10px;
  25230. }
  25231. .moveBtn2 .chapter_upload_down,
  25232. .moveBtn2 .chapter_upload_up {
  25233. width: 16px;
  25234. height: 16px;
  25235. }
  25236. .moveBtn2 .chapter_upload_up::after,
  25237. .moveBtn2 .chapter_upload_down::after {
  25238. width: 10px;
  25239. height: 10px;
  25240. }
  25241. .fullStyle>>>.el-dialog__body {
  25242. height: calc(100% - 125px) !important;
  25243. box-sizing: border-box;
  25244. }
  25245. .fullStyle1>>>.el-dialog__body {
  25246. height: auto !important;
  25247. }
  25248. .fullStyle>>>.el-dialog {
  25249. width: 100% !important;
  25250. max-width: 100% !important;
  25251. height: 100% !important;
  25252. margin: 0 !important;
  25253. }
  25254. .fullStyle {
  25255. width: 100% !important;
  25256. max-width: 100% !important;
  25257. height: 100% !important;
  25258. margin: 0 auto !important;
  25259. }
  25260. .wb_j_box_btn {
  25261. width: calc(100% - 30px);
  25262. display: flex;
  25263. height: 40px;
  25264. border: 1.5px solid #cad1dc;
  25265. border-radius: 4px;
  25266. box-sizing: border-box;
  25267. align-items: center;
  25268. font-size: 14px;
  25269. cursor: pointer;
  25270. overflow: hidden;
  25271. }
  25272. .wb_j_box_btn:hover {
  25273. border: 1.5px solid #0061ff;
  25274. }
  25275. .wb_j_box_title {
  25276. background: #f0f4fa;
  25277. height: 100%;
  25278. line-height: 40px;
  25279. width: 90px;
  25280. text-align: center;
  25281. color: #060e17;
  25282. border-right: 1.5px solid #cad1dc;
  25283. box-sizing: border-box;
  25284. }
  25285. .wb_j_box_btn_c {
  25286. width: calc(100% - 90px);
  25287. padding: 0 35px 0 10px;
  25288. box-sizing: border-box;
  25289. position: relative;
  25290. }
  25291. .wb_j_box_span {
  25292. width: 100%;
  25293. overflow: hidden;
  25294. white-space: nowrap;
  25295. text-overflow: ellipsis;
  25296. word-wrap: break-word;
  25297. color: #717c8d;
  25298. }
  25299. .wb_j_box_arrow {
  25300. content: "";
  25301. width: 14px;
  25302. height: 14px;
  25303. background: url(../../../assets/icon/new/u_arrow.png);
  25304. background-size: 100% 100%;
  25305. position: absolute;
  25306. right: 12px;
  25307. top: 50%;
  25308. transform: translateY(-50%);
  25309. }
  25310. .check_classBox {
  25311. height: 400px;
  25312. display: flex;
  25313. border-top: 1.5px solid #e7ebf1;
  25314. border-bottom: 1.5px solid #e7ebf1;
  25315. }
  25316. .check_class_right {
  25317. width: 130px;
  25318. border-right: 1px solid #e7ebf1;
  25319. display: flex;
  25320. align-items: center;
  25321. flex-direction: column;
  25322. height: 100%;
  25323. overflow: auto;
  25324. padding: 15px 0;
  25325. box-sizing: border-box;
  25326. }
  25327. .check_class {
  25328. width: 85%;
  25329. border-radius: 5px;
  25330. height: 30px;
  25331. min-height: 30px;
  25332. line-height: 30px;
  25333. text-align: center;
  25334. padding: 0 10px;
  25335. box-sizing: border-box;
  25336. cursor: pointer;
  25337. white-space: nowrap;
  25338. overflow: hidden;
  25339. text-overflow: ellipsis;
  25340. }
  25341. .check_class.activeX {
  25342. background: #e0eafb;
  25343. color: #3681fc;
  25344. font-weight: 700;
  25345. }
  25346. .check_class+.check_class {
  25347. margin-top: 15px;
  25348. }
  25349. .check_class_left {
  25350. background: #fafafa;
  25351. width: calc(100% - 130px);
  25352. padding: 15px;
  25353. box-sizing: border-box;
  25354. }
  25355. .check_class_all_box {
  25356. display: flex;
  25357. margin-bottom: 10px;
  25358. }
  25359. .all_check {
  25360. display: flex;
  25361. align-items: center;
  25362. padding: 2px 0 0;
  25363. margin-left: 10px;
  25364. }
  25365. .all_check>>>.el-checkbox__label {
  25366. line-height: 18px;
  25367. }
  25368. .check_class_left_title {
  25369. font-size: 16px;
  25370. font-weight: 700;
  25371. }
  25372. .check_class_item {
  25373. display: flex;
  25374. flex-wrap: wrap;
  25375. height: calc(100% - 45px);
  25376. overflow: auto;
  25377. justify-content: flex-start;
  25378. align-items: flex-start;
  25379. align-content: flex-start;
  25380. }
  25381. .class_item:first-child {
  25382. /* margin: 0 15px 15px 67px; */
  25383. }
  25384. .class_item {
  25385. margin: 0 15px 15px 0;
  25386. }
  25387. .class_item:hover>>>.el-checkbox__label {
  25388. color: #409eff;
  25389. }
  25390. .class_item>>>.el-checkbox__label {
  25391. color: #0e1e33;
  25392. }
  25393. .class_item:hover>>>.el-checkbox__inner {
  25394. border-color: #409eff;
  25395. }
  25396. .class_item>>>.el-checkbox,
  25397. .class_item>>>.el-checkbox__input {
  25398. display: flex;
  25399. align-items: center;
  25400. }
  25401. .taskTitle {
  25402. font-size: 20px;
  25403. font-weight: bold;
  25404. margin-bottom: 35px;
  25405. }
  25406. .taskTitle:after {
  25407. content: "";
  25408. width: 100%;
  25409. display: block;
  25410. height: 1px;
  25411. background: #cad1dc;
  25412. position: absolute;
  25413. left: 0;
  25414. margin: 15px 0 0;
  25415. }
  25416. .eva_btn_box {
  25417. margin: 20px 0px 0 0;
  25418. display: flex;
  25419. flex-direction: row;
  25420. flex-wrap: nowrap;
  25421. align-items: center;
  25422. justify-content: space-between;
  25423. width: 100%;
  25424. }
  25425. .eva_btn_left_box {
  25426. display: flex;
  25427. flex-direction: row;
  25428. flex-wrap: nowrap;
  25429. align-items: center;
  25430. }
  25431. .addTypeChoose {
  25432. display: flex;
  25433. flex-direction: row;
  25434. flex-wrap: nowrap;
  25435. align-items: center;
  25436. margin: 15px 0;
  25437. }
  25438. .addTypeBox {
  25439. display: flex;
  25440. flex-direction: column;
  25441. flex-wrap: nowrap;
  25442. align-items: center;
  25443. }
  25444. .addTypeChoose {
  25445. display: flex;
  25446. flex-direction: row;
  25447. flex-wrap: nowrap;
  25448. align-items: center;
  25449. margin: 15px 0;
  25450. }
  25451. .buchong_box {
  25452. background: #E0EAFB66;
  25453. width: calc(100% - 20px);
  25454. min-height: 50px;
  25455. display: flex;
  25456. align-items: center;
  25457. justify-content: center;
  25458. margin: 0 auto;
  25459. }
  25460. .outline {
  25461. width: calc(100% - 40px);
  25462. margin: 0 auto;
  25463. }
  25464. .task_outline {
  25465. width: calc(100% - 40px);
  25466. margin: 0 auto;
  25467. }
  25468. .outline_box+.outline_box {
  25469. margin: 30px 0 0px;
  25470. }
  25471. .outline_task {
  25472. display: flex;
  25473. align-items: center;
  25474. margin-bottom: 10px;
  25475. }
  25476. .outline_btn{
  25477. display: flex;
  25478. align-items: center;
  25479. min-width: fit-content;
  25480. margin-left: 10px;
  25481. }
  25482. .outline_task .title {
  25483. font-size: 18px;
  25484. font-weight: bold;
  25485. min-width: 80px;
  25486. }
  25487. .op_task_box,
  25488. .op_tool_box,
  25489. .outline_detail {
  25490. position: relative;
  25491. }
  25492. .op_task_box:hover .op_box,
  25493. .op_tool_box:hover .op_box,
  25494. .outline_detail:hover .op_box {
  25495. display: flex
  25496. }
  25497. .op_box {
  25498. position: absolute;
  25499. bottom: 10px;
  25500. display: none;
  25501. align-items: center;
  25502. justify-content: space-between;
  25503. width: calc(100% - 20px);
  25504. left: 50%;
  25505. transform: translateX(-50%);
  25506. }
  25507. .op_box .op_remark {
  25508. color: #8E8E8E;
  25509. font-size: 14px;
  25510. }
  25511. .rb_c_nav {
  25512. width: calc(100% - 20px);
  25513. margin: 15px auto 0;
  25514. font-size: 18px;
  25515. }
  25516. .rb_c_nav span {
  25517. cursor: pointer;
  25518. }
  25519. .rb_c_nav span+span {
  25520. margin-left: 10px;
  25521. }
  25522. .rb_c_nav span.active {
  25523. color: #0061FF
  25524. }
  25525. .text_panel>>>.text {
  25526. height: 400px;
  25527. }
  25528. .markBox{
  25529. padding: 20px 14px;
  25530. line-height: 29px;
  25531. font-size: 16px;
  25532. background: #f4f4f4;
  25533. border-radius: 5px;
  25534. }
  25535. .info_box_t{
  25536. display: flex;
  25537. align-items: center;
  25538. }
  25539. .info_box_t + .info_box_t{
  25540. margin-top: 10px;
  25541. }
  25542. .info_box_t_box{
  25543. display: flex;
  25544. align-items: center;
  25545. }
  25546. .info_box_t_box + .info_box_t_box{
  25547. margin-left: 10px;
  25548. }
  25549. .info_box_t_box > span{
  25550. width: fit-content
  25551. }
  25552. .info_box_t_box > input{
  25553. width: 150px !important;
  25554. margin: 0 5px 0 0;
  25555. }
  25556. .mode_box{
  25557. display: flex;
  25558. align-items: center;
  25559. }
  25560. .mode_box > span{
  25561. padding: 0px 5px;
  25562. cursor: pointer;
  25563. }
  25564. .mode_box > span.active{
  25565. color: #409eff;
  25566. }
  25567. .chapter_upload_check {
  25568. width: 15px;
  25569. height: 15px;
  25570. cursor: pointer;
  25571. background-image: url('../../../assets/icon/check.png');
  25572. background-size: 100% 100%;
  25573. }
  25574. .chapter_upload_check.checked{
  25575. background-image: url('../../../assets/icon/checked.png');
  25576. }
  25577. .ruleBtn {
  25578. width: fit-content;
  25579. height: 36px;
  25580. line-height: 36px;
  25581. cursor: pointer;
  25582. color: #0061FF;
  25583. }
  25584. .stopBtn{
  25585. z-index: 999999;
  25586. position: absolute;
  25587. left: 50%;
  25588. top: calc(50% + 70px);
  25589. transform: translateX(-50%);
  25590. }
  25591. .rateSwitch >>> .el-switch__label.is-active {
  25592. color: #0061FF;
  25593. }
  25594. .rateSwitch >>> .el-switch__label--right{
  25595. display: flex;
  25596. align-items: center;
  25597. }
  25598. .rateSwitch >>> .el-switch__label--right::before{
  25599. content: "";
  25600. width: 14px;
  25601. height: 14px;
  25602. min-width: 14px;
  25603. min-height: 14px;
  25604. background-size: 100% 100%;
  25605. display: block;
  25606. margin-right: 7px;
  25607. background-image: url(../../../assets/icon/new/u_op2.png);
  25608. }
  25609. .rateSwitch >>> .el-switch__label--right.is-active::before{
  25610. background-image: url(../../../assets/icon/new/u_op.png);
  25611. }
  25612. </style>