addCourse.vue 1.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359
  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">
  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">
  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;">生成概况和目标</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)">
  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))" @click="clickGenTT2">
  1605. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1606. </button>
  1607. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1608. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1609. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1610. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1611. pub_btn_next_img: steps != 3,
  1612. pub_btn_finish_img: steps == 3,
  1613. }">
  1614. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1615. </button>
  1616. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1617. @contextmenu.prevent="nextSteps(1)" :class="{
  1618. pub_btn_next_img: steps != 3,
  1619. pub_btn_finish_img: steps == 3,
  1620. }">
  1621. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1622. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1623. : "下一步" }}
  1624. </button>
  1625. </el-tooltip>
  1626. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1627. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1628. pub_btn_next_img: steps != 3,
  1629. pub_btn_finish_img: steps == 3,
  1630. }">下一步2</button>
  1631. </el-tooltip>
  1632. </div>
  1633. </div>
  1634. <div class="rightBox" v-if="steps == 2" :style="{
  1635. height:
  1636. !isStepDisplay && !isBtnDisplay
  1637. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1638. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1639. }">
  1640. <div class="basic_box" style="
  1641. padding: 20px 30px 0px !important;
  1642. box-sizing: border-box;
  1643. height: calc(100% - 80px);
  1644. overflow: auto;
  1645. background: #fff;
  1646. ">
  1647. <!-- <div
  1648. style="
  1649. color: #b8b8b8;
  1650. background: #fff;
  1651. width: 26%;
  1652. height: 40px;
  1653. border-radius: 15px;
  1654. padding-left: 20px;
  1655. line-height: 40px;
  1656. font-size: 17px;
  1657. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1658. "
  1659. >-->
  1660. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1661. 请选择合适的课程模板
  1662. </div>
  1663. <div class="wordbox">
  1664. <div class="wordTeacher" @click="checkTemplate2()">
  1665. <div class="wordPic">
  1666. <img src="../../../assets/icon/new/template_none.png" alt />
  1667. </div>
  1668. <div style="
  1669. margin-top: 10px;
  1670. line-height: 19px;
  1671. overflow: hidden;
  1672. text-overflow: ellipsis;
  1673. white-space: nowrap;
  1674. padding: 0 20px;
  1675. ">
  1676. 空白模板
  1677. </div>
  1678. </div>
  1679. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1680. <div class="wordPic">
  1681. <img src="../../../assets/icon/new/template.png" alt />
  1682. </div>
  1683. <div style="
  1684. margin-top: 10px;
  1685. line-height: 19px;
  1686. overflow: hidden;
  1687. text-overflow: ellipsis;
  1688. white-space: nowrap;
  1689. padding: 0 20px;
  1690. ">
  1691. {{ aa.title }}
  1692. </div>
  1693. </div>
  1694. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1695. <div class="wordPic">
  1696. <img src="../../../assets/icon/new/template.png" alt />
  1697. </div>
  1698. <div style="
  1699. margin-top: 10px;
  1700. line-height: 19px;
  1701. overflow: hidden;
  1702. text-overflow: ellipsis;
  1703. white-space: nowrap;
  1704. padding: 0 20px;
  1705. ">
  1706. 简易模板
  1707. </div>
  1708. </div>
  1709. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1710. <div class="wordPic">
  1711. <img src="../../../assets/icon/new/template.png" alt />
  1712. </div>
  1713. <div style="
  1714. margin-top: 10px;
  1715. line-height: 19px;
  1716. overflow: hidden;
  1717. text-overflow: ellipsis;
  1718. white-space: nowrap;
  1719. padding: 0 20px;
  1720. ">
  1721. 智能粘贴模式
  1722. </div>
  1723. </div>
  1724. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1725. <div class="wordPic">
  1726. <img src="../../../assets/icon/wordMub.png" alt />
  1727. </div>
  1728. <div style="
  1729. margin-top: 10px;
  1730. line-height: 19px;
  1731. overflow: hidden;
  1732. text-overflow: ellipsis;
  1733. white-space: nowrap;
  1734. padding: 0 20px;
  1735. ">
  1736. 未来小学课程设计
  1737. </div>
  1738. </div> -->
  1739. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1740. <div class="wordPic">
  1741. <img src="../../../assets/icon/wordMub.png" alt />
  1742. </div>
  1743. <div style="
  1744. margin-top: 10px;
  1745. line-height: 19px;
  1746. overflow: hidden;
  1747. text-overflow: ellipsis;
  1748. white-space: nowrap;
  1749. padding: 0 20px;
  1750. ">
  1751. 我的课程
  1752. </div>
  1753. </div> -->
  1754. </div>
  1755. </div>
  1756. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1757. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1758. goTo(
  1759. '/course?userid=' +
  1760. userid +
  1761. '&oid=' +
  1762. oid +
  1763. '&org=' +
  1764. org +
  1765. '&role=' +
  1766. role
  1767. )
  1768. ">
  1769. 返回课程
  1770. </button>
  1771. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1772. {{ steps == 4 ? "返回课程" : "上一步" }}
  1773. </button>
  1774. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1775. pub_btn_next_img: steps != 3,
  1776. pub_btn_finish_img: steps == 3,
  1777. }">
  1778. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1779. </button>
  1780. </div>
  1781. </div>
  1782. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1783. height:
  1784. !isStepDisplay && !isBtnDisplay
  1785. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1786. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1787. }">
  1788. <div class="rb_c_box">
  1789. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1790. <div class="rb_c_nav">
  1791. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1792. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1793. </div>
  1794. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1795. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1796. position: istemplate == 1 ? 'sticky' : 'unset',
  1797. top: istemplate == 1 ? '0' : 'unset'
  1798. }">
  1799. <!-- <div class="navTop">辅助导航</div> -->
  1800. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1801. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1802. <div class="nt_taskBox" style="width: 100%;">
  1803. <div class="nt_taskTitle"
  1804. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1805. unitIndex + 1 }}</div>
  1806. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1807. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1808. <span>{{ unitJson[unitIndex].dyName }}</span>
  1809. </el-tooltip>
  1810. </div>
  1811. </div>
  1812. </div> -->
  1813. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1814. .taskJson" :key="tIndex" :class="{
  1815. dragOverTop:
  1816. newIndex === tIndex &&
  1817. typeIndex == 'task-' + tIndex &&
  1818. oldIndex > tIndex &&
  1819. dragType == 'task',
  1820. dragOverBottom:
  1821. newIndex === tIndex &&
  1822. typeIndex == 'task-' + tIndex &&
  1823. oldIndex < tIndex &&
  1824. dragType == 'task',
  1825. }">
  1826. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1827. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1828. class="navTask" :class="{
  1829. isNavTask:
  1830. isClickColor > 0 && isClickColor == tIndex + 1,
  1831. isNavOpen: t.toolOpen,
  1832. }">
  1833. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1834. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1835. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1836. class="chapter_upload_drag"></div>
  1837. <div class="nt_taskBox">
  1838. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1839. <div class="nt_taskName">
  1840. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1841. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1842. </el-tooltip>
  1843. </div>
  1844. </div>
  1845. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1846. 1
  1847. ">
  1848. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1849. @click.stop="taskMove(1, tIndex)"></div>
  1850. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1851. @click.stop="taskMove(2, tIndex)"></div>
  1852. </div> -->
  1853. </div>
  1854. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1855. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1856. @click="jumpGj(tIndex, toolIndex2)">
  1857. <div class="gjCss" :class="{
  1858. isGjCss:
  1859. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1860. }">
  1861. <div>工具{{ toolIndex2 + 1 }}:</div>
  1862. <div>
  1863. {{
  1864. toolsData[tool.tool[0]] &&
  1865. toolsData[tool.tool[0]].name
  1866. }}
  1867. </div>
  1868. </div>
  1869. </div>
  1870. </div>
  1871. </div>
  1872. </div>
  1873. <div class="navBottom" v-if="courseState == 1">
  1874. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1875. dragOverTop:
  1876. newIndex === stageIndex &&
  1877. typeIndex == 'Unit-' + stageIndex &&
  1878. oldIndex > stageIndex &&
  1879. dragType == 'Unit',
  1880. dragOverBottom:
  1881. newIndex === stageIndex &&
  1882. typeIndex == 'Unit-' + stageIndex &&
  1883. oldIndex < stageIndex &&
  1884. dragType == 'Unit',
  1885. }">
  1886. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1887. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1888. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1889. isNavStage: stageIndex == unitIndex,
  1890. isNavStageOpen: stage.toolOpen,
  1891. }">
  1892. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1893. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1894. class="chapter_upload_drag"></div>
  1895. <div class="nt_taskBox">
  1896. <div class="nt_taskTitle">
  1897. 第{{ stageIndex + 1 }}阶段:
  1898. </div>
  1899. <div class="nt_taskName">
  1900. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1901. " placement="top">
  1902. <span>{{
  1903. stage.dyName ? stage.dyName : "未命名阶段"
  1904. }}</span>
  1905. </el-tooltip>
  1906. </div>
  1907. </div>
  1908. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1909. </div>
  1910. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1911. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1912. dragOverTop:
  1913. newIndex === tIndex &&
  1914. typeIndex == 'task-' + tIndex &&
  1915. ((oldIndex > tIndex &&
  1916. stageIndex == checkUnitIndex) ||
  1917. (oldIndex == tIndex &&
  1918. stageIndex == checkUnitIndex &&
  1919. checkUnitIndex != oldUnitIndex)) &&
  1920. dragType == 'task',
  1921. dragOverBottom:
  1922. newIndex === tIndex &&
  1923. typeIndex == 'task-' + tIndex &&
  1924. oldIndex < tIndex &&
  1925. stageIndex == checkUnitIndex &&
  1926. dragType == 'task',
  1927. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1928. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1929. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1930. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1931. isNavTask:
  1932. isClickColor > 0 &&
  1933. isClickColor == tIndex + 1 &&
  1934. stageIndex == unitIndex,
  1935. isNavOpen: t.toolOpen,
  1936. }">
  1937. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1938. <div @mousedown="
  1939. isdrag = 'task-' + stageIndex + '-' + tIndex
  1940. " @mouseup="isdrag = ''" @touchstart="
  1941. isdrag = 'task-' + stageIndex + '-' + tIndex
  1942. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1943. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1944. <div class="nt_taskTitle">
  1945. 任务{{ tIndex + 1 }}:
  1946. </div>
  1947. <div class="nt_taskName">
  1948. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1949. <span>{{
  1950. t.task ? t.task : "未命名任务"
  1951. }}</span>
  1952. </el-tooltip>
  1953. </div>
  1954. </div>
  1955. </div>
  1956. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1957. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1958. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1959. <div class="gjCss" :class="{
  1960. isGjCss:
  1961. toolIndexType ==
  1962. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1963. }">
  1964. <div>工具{{ toolIndex2 + 1 }}:</div>
  1965. <div>
  1966. {{
  1967. toolsData[tool.tool[0]] &&
  1968. toolsData[tool.tool[0]].name
  1969. }}
  1970. </div>
  1971. </div>
  1972. </div>
  1973. </div>
  1974. </div>
  1975. </div>
  1976. </div>
  1977. </div>
  1978. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1979. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1980. </div>
  1981. </div>
  1982. <div class="rb_c_box_right">
  1983. <!-- <div class="rb_c_box_btn">
  1984. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1985. </div> -->
  1986. <div class="basic_box" ref="unitBox">
  1987. <div v-if="false" style="
  1988. display: flex;
  1989. flex-direction: row;
  1990. align-items: center;
  1991. position: sticky;
  1992. top: 0;
  1993. z-index: 99;
  1994. width: 100%;
  1995. padding: 0 20px 0 20px;
  1996. box-sizing: border-box;
  1997. background: #fff;
  1998. border-radius: 8px;
  1999. ">
  2000. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2001. <div class="cru_selectBox" :style="{
  2002. maxWidth: isPasteTask
  2003. ? 'calc(100% - 335px)'
  2004. : 'calc(100% - 190px)',
  2005. }" v-if="courseState == 1">
  2006. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2007. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2008. <!-- item.dyName ? item.dyName : -->
  2009. <span v-if="
  2010. unitJson[unitJson.length - 1].easy == 4 ||
  2011. unitJson[unitJson.length - 1].easy == 6
  2012. ">{{
  2013. item.dyName
  2014. ? item.dyName
  2015. : "第" + (index + 1) + "阶段"
  2016. }}</span>
  2017. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2018. </div>
  2019. <div class="cru_line" :style="{
  2020. left: offsetLetfPx + 'px',
  2021. }"></div>
  2022. </div>
  2023. <div class="addStageImg" @click="addunit()" v-if="
  2024. !(unitJson[unitJson.length - 1].easy == 4) &&
  2025. !(unitJson[unitJson.length - 1].easy == 6) &&
  2026. courseState == 1
  2027. ">
  2028. <img src="../../../assets/icon/new/addStage.png" alt />
  2029. </div>
  2030. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2031. v-if="courseState == 2" style="margin: 15px 0">
  2032. 新建阶段
  2033. </button>
  2034. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2035. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2036. 阶段顺序
  2037. </button>
  2038. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2039. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2040. 智能粘贴
  2041. </button>
  2042. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2043. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2044. }" style="padding: 0 12px">
  2045. 选择课程模板
  2046. </button>
  2047. </div>
  2048. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2049. :key="index">
  2050. <div v-if="courseState == 4" style="position: relative;
  2051. background: #fff;
  2052. box-sizing: border-box;
  2053. padding: 1px 20px 10px;
  2054. width: 100%;
  2055. border-radius: 10px;">
  2056. <div style="
  2057. display: flex;
  2058. flex-direction: row;
  2059. justify-content: space-between;
  2060. align-items: center;
  2061. " :style="{
  2062. margin: !item.taskJson[0].isFoldchapter
  2063. ? '20px 0 10px'
  2064. : '20px 0 0',
  2065. }">
  2066. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2067. 学习内容
  2068. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2069. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2070. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2071. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2072. </el-tooltip>
  2073. </div>
  2074. </div>
  2075. <div>
  2076. <div class="add_chapters_box add_c_none" v-if="
  2077. item.taskJson[0].chapterData &&
  2078. item.taskJson[0].chapterData.length == 0
  2079. ">
  2080. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  2081. </div>
  2082. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2083. <div @dragstart="
  2084. dragStart(item1, index1, 0)
  2085. " @dragover.prevent="
  2086. dragOver(index1, 0)
  2087. " @dragend="dragEnd()" :draggable="isdrag ==
  2088. 'chapter-' + 0 + '-' + index1
  2089. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2090. :key="item1.id" @click="
  2091. getChapterData(
  2092. $event,
  2093. unitIndex,
  2094. index,
  2095. index1,
  2096. item1.type
  2097. )
  2098. " :class="{
  2099. dragOverTop2:
  2100. newIndex === index1 &&
  2101. typeIndex ==
  2102. 'chapter-' +
  2103. 0 +
  2104. '-' +
  2105. index1 &&
  2106. oldIndex > index1 &&
  2107. dragType == 'drag',
  2108. dragOverBottom2:
  2109. newIndex === index1 &&
  2110. typeIndex ==
  2111. 'chapter-' +
  2112. 0 +
  2113. '-' +
  2114. index1 &&
  2115. oldIndex < index1 &&
  2116. dragType == 'drag',
  2117. }">
  2118. <div @mousedown="
  2119. isdrag =
  2120. 'chapter-' + 0 + '-' + index1
  2121. " @mouseup="isdrag = ''" @touchstart="
  2122. isdrag =
  2123. 'chapter-' + 0 + '-' + index1
  2124. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2125. <div class="chapter_upload_o" style="
  2126. position: relative;
  2127. display: flex;
  2128. align-items: center;
  2129. ">
  2130. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2131. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2132. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2133. </div>
  2134. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2135. </div>
  2136. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2137. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2138. </div>
  2139. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2140. </div>
  2141. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2142. </div>
  2143. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2144. </div>
  2145. </div>
  2146. <div class="chapter_upload_n">
  2147. <input readonly="true" v-if="
  2148. item1.type == 2 ||
  2149. item1.type == 3 ||
  2150. item1.type == 12 ||
  2151. item1.type == 13 ||
  2152. item1.type == 7
  2153. " :placeholder="item1.name" @click="
  2154. updataVideoT(
  2155. $event,
  2156. unitIndex,
  2157. 0,
  2158. index1
  2159. )
  2160. " style="
  2161. border: none;
  2162. outline: none;
  2163. width: 80%;
  2164. minwidth: 215px;
  2165. z-index: 99;
  2166. font-size: 14px;
  2167. white-space: nowrap;
  2168. overflow: hidden;
  2169. text-overflow: ellipsis;
  2170. " />
  2171. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2172. border: none;
  2173. outline: none;
  2174. width: 80%;
  2175. white-space: nowrap;
  2176. overflow: hidden;
  2177. text-overflow: ellipsis;
  2178. " readonly="true" @click="
  2179. selectAttText(0, index1)
  2180. " />
  2181. <input :placeholder="item1.title ? item1.title : '链接'
  2182. " v-if="item1.type == 8" style="
  2183. border: none;
  2184. outline: none;
  2185. width: 80%;
  2186. white-space: nowrap;
  2187. overflow: hidden;
  2188. text-overflow: ellipsis;
  2189. " readonly="true" @click="selectLine(0, index1)" />
  2190. <input :placeholder="item1.title ? item1.title : '链接'
  2191. " v-if="item1.type == 14" style="
  2192. border: none;
  2193. outline: none;
  2194. width: 80%;
  2195. white-space: nowrap;
  2196. overflow: hidden;
  2197. text-overflow: ellipsis;
  2198. " readonly="true" @click="
  2199. openUpdateSource(0, index1)
  2200. " />
  2201. </div>
  2202. <div class="chapter_upload_ic">
  2203. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2204. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2205. checkChpater( $event, unitIndex, 0, index1 )
  2206. ">
  2207. <div></div>
  2208. </div>
  2209. <div class="chapter_upload_ud" style="z-index: 99">
  2210. <div class="chapter_upload_up" @click="
  2211. upCd(
  2212. $event,
  2213. unitIndex,
  2214. index,
  2215. 0,
  2216. index1
  2217. )
  2218. "></div>
  2219. <div class="chapter_upload_down" @click="
  2220. downCd(
  2221. $event,
  2222. unitIndex,
  2223. index,
  2224. 0,
  2225. index1
  2226. )
  2227. "></div>
  2228. </div>
  2229. <div class="chapter_upload_ic_edit" v-if="
  2230. item1.type == 2 ||
  2231. item1.type == 3 ||
  2232. item1.type == 12 ||
  2233. item1.type == 13 ||
  2234. item1.type == 7
  2235. " @click.stop="
  2236. updataVideoT(
  2237. $event,
  2238. unitIndex,
  2239. 0,
  2240. index1
  2241. )
  2242. ">
  2243. <div></div>
  2244. </div>
  2245. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2246. selectAttText(0, index1)
  2247. ">
  2248. <div></div>
  2249. </div>
  2250. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2251. @click="selectLine(0, index1)">
  2252. <div></div>
  2253. </div>
  2254. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2255. openUpdateSource(0, index1)
  2256. ">
  2257. <div></div>
  2258. </div>
  2259. <div class="chapter_upload_ic_r" @click.stop="
  2260. deleteChapterData(
  2261. $event,
  2262. unitIndex,
  2263. index,
  2264. index1,
  2265. 0
  2266. )
  2267. ">
  2268. <div></div>
  2269. </div>
  2270. </div>
  2271. </div>
  2272. </div>
  2273. </div>
  2274. </div>
  2275. <div class="add_info_box" style="margin: 10px 0 0">
  2276. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2277. 文件
  2278. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2279. beforeUpload2(
  2280. $event,
  2281. unitIndex,
  2282. 13,
  2283. 0
  2284. )
  2285. " />
  2286. </button>
  2287. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2288. 图文
  2289. </button>
  2290. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2291. 链接
  2292. </button>
  2293. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2294. 代码
  2295. </button>
  2296. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2297. 资源
  2298. </button>
  2299. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2300. AI生成PPT
  2301. </button>
  2302. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2303. AI生成教案
  2304. </button>
  2305. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2306. 智能检索视频
  2307. </button>
  2308. </div>
  2309. <div v-if="
  2310. unitJson[unitIndex].chapterInfo[0].taskJson[
  2311. 0
  2312. ].proVisible
  2313. " class="mask">
  2314. <div class="progressBox">
  2315. <!-- <div id="closePro" class="closeCss">
  2316. <img src="../../../../assets/icon/close.png" alt />
  2317. </div> -->
  2318. <div class="lbox">
  2319. <img src="../../../assets/loading.gif" />上传中,请稍后
  2320. </div>
  2321. <div style="margin-bottom: 10px">
  2322. <span>{{
  2323. unitJson[unitIndex].chapterInfo[0].taskJson[
  2324. 0
  2325. ].isFinishSize
  2326. }}</span>
  2327. /
  2328. <span>{{
  2329. unitJson[unitIndex].chapterInfo[0].taskJson[
  2330. 0
  2331. ].isAllSize
  2332. }}</span>
  2333. </div>
  2334. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2335. 0
  2336. ].progress
  2337. ? unitJson[unitIndex].chapterInfo[0]
  2338. .taskJson[0].progress
  2339. : 0
  2340. " style="width: 80%"></el-progress> -->
  2341. </div>
  2342. </div>
  2343. </div>
  2344. <div class="chapter_box" v-if="courseState == 1">
  2345. <div class="chapter_contentbox">
  2346. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2347. <div class="cc_input">
  2348. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2349. v-model="unitJson[unitIndex].dyName" />
  2350. </div>
  2351. <div class="remove" v-if="
  2352. (unitJson.length > 1 || courseState != 2) &&
  2353. !(unitJson[unitJson.length - 1].easy == 4) &&
  2354. !(unitJson[unitJson.length - 1].easy == 6)
  2355. " @click="deleteUnit(unitIndex)"></div>
  2356. </div>
  2357. </div>
  2358. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2359. margin: 50px 0px 10px;
  2360. font-size: 1.5em;
  2361. font-weight: 700;
  2362. color: #0f7eff;
  2363. ">
  2364. 添加任务
  2365. </div> -->
  2366. <div class="taskBorder" :style="{
  2367. minHeight: unitJson[unitIndex].easy && 'unset',
  2368. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2369. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2370. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2371. <div class="taskTitle">
  2372. <div style="display: flex;width: 100%;justify-content: space-between;">
  2373. <span>任务{{ itemTaskIndex + 1 }}</span>
  2374. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2375. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2376. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2377. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2378. </el-tooltip>
  2379. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2380. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2381. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex)"
  2382. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex)">重新生成任务2</button>
  2383. </el-tooltip>
  2384. </div>
  2385. </div>
  2386. <!-- padding: 20px; -->
  2387. <div v-if="unitJson[unitIndex].easy != 1">
  2388. <div :style="{
  2389. marginBottom:
  2390. unitJson[unitIndex].easy == 3 ||
  2391. (unitJson[unitIndex].easy == 5 &&
  2392. itemTask.taskType == 1)
  2393. ? '75px'
  2394. : '0',
  2395. }">
  2396. <div style="
  2397. display: flex;
  2398. margin: 0px 0 20px;
  2399. flex-direction: row;
  2400. justify-content: flex-start;
  2401. align-items: center;
  2402. ">
  2403. <div class="lineTitle">任务概述</div>
  2404. </div>
  2405. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2406. flex-direction: row;
  2407. justify-content: flex-start;
  2408. align-items: center;
  2409. margin: 0;
  2410. ">
  2411. <!-- <div class="cc_title">
  2412. 任务{{ itemTaskIndex + 1 }}
  2413. </div> -->
  2414. <div class="cc_input">
  2415. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2416. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2417. itemTaskIndex
  2418. ].task
  2419. " />
  2420. </div>
  2421. <div class="remove" v-if="
  2422. item.taskJson.length > 1 &&
  2423. (!unitJson[unitIndex].easy ||
  2424. unitJson[unitIndex].easy == 6)
  2425. " @click="deleteTask(itemTaskIndex)"></div>
  2426. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2427. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2428. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2429. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2430. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2431. </div> -->
  2432. </div>
  2433. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2434. display: flex;
  2435. margin: 20px 0;
  2436. flex-direction: row;
  2437. justify-content: flex-start;
  2438. align-items: center;
  2439. ">
  2440. <div class="lineTitle">任务描述</div>
  2441. </div> && !itemTask.isFold2-->
  2442. <div v-if="
  2443. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2444. -1
  2445. " style="margin-top: 20px" class="op_task_box"
  2446. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2447. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2448. itemTaskIndex
  2449. ].taskDetail
  2450. " @change="change"></editor-bar> -->
  2451. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2452. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2453. itemTaskIndex
  2454. ].taskDetail
  2455. "></textarea>
  2456. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2457. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2458. itemTaskIndex
  2459. ].taskDetail
  2460. "></textarea> -->
  2461. <div class="op_box">
  2462. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2463. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2464. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2465. itemTaskIndex
  2466. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2467. itemTaskIndex
  2468. ], itemTaskIndex)">智能优化</div>
  2469. </el-tooltip>
  2470. </div>
  2471. </div>
  2472. </div>
  2473. </div>
  2474. <div
  2475. style="position: relative"
  2476. v-if="courseState == 5"
  2477. >
  2478. <div
  2479. style="
  2480. display: flex;
  2481. flex-direction: row;
  2482. justify-content: space-between;
  2483. align-items: center;
  2484. "
  2485. :style="{
  2486. margin: !itemTask.isFoldchapter
  2487. ? '20px 0 10px'
  2488. : '20px 0 0',
  2489. }"
  2490. >
  2491. <div
  2492. style="margin-bottom: 10px"
  2493. class="lineTitle clineTitle"
  2494. >
  2495. 学习内容
  2496. </div>
  2497. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2498. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2499. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2500. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2501. <!-- <div class="line"></div> -->
  2502. </div>
  2503. <!-- v-if="!itemTask.isFoldchapter" -->
  2504. <div>
  2505. <div
  2506. class="add_chapters_box add_c_none"
  2507. v-if="
  2508. itemTask.chapterData &&
  2509. itemTask.chapterData.length == 0
  2510. "
  2511. >
  2512. <img
  2513. src="../../../assets/icon/new/c_none.png"
  2514. alt
  2515. /><span>请添加学习内容</span>
  2516. </div>
  2517. <div
  2518. v-else
  2519. class="add_chapters_box"
  2520. style="display: flex; flex-direction: column"
  2521. >
  2522. <div
  2523. @dragstart="
  2524. dragStart(item1, index1, itemTaskIndex)
  2525. "
  2526. @dragover.prevent="
  2527. dragOver(index1, itemTaskIndex)
  2528. "
  2529. @dragend="dragEnd()"
  2530. :draggable="
  2531. isdrag ==
  2532. 'chapter-' + itemTaskIndex + '-' + index1
  2533. "
  2534. class="chapter_upload"
  2535. v-for="(item1, index1) in itemTask.chapterData"
  2536. :key="item1.id"
  2537. @click="
  2538. getChapterData(
  2539. $event,
  2540. unitIndex,
  2541. index,
  2542. index1,
  2543. item1.type
  2544. )
  2545. "
  2546. :class="{
  2547. dragOverTop2:
  2548. newIndex === index1 &&
  2549. typeIndex ==
  2550. 'chapter-' +
  2551. itemTaskIndex +
  2552. '-' +
  2553. index1 &&
  2554. oldIndex > index1 &&
  2555. dragType == 'drag',
  2556. dragOverBottom2:
  2557. newIndex === index1 &&
  2558. typeIndex ==
  2559. 'chapter-' +
  2560. itemTaskIndex +
  2561. '-' +
  2562. index1 &&
  2563. oldIndex < index1 &&
  2564. dragType == 'drag',
  2565. }"
  2566. >
  2567. <div
  2568. @mousedown="
  2569. isdrag =
  2570. 'chapter-' + itemTaskIndex + '-' + index1
  2571. "
  2572. @mouseup="isdrag = ''"
  2573. @touchstart="
  2574. isdrag =
  2575. 'chapter-' + itemTaskIndex + '-' + index1
  2576. "
  2577. @touchend="isdrag = ''"
  2578. class="chapter_upload_drag"
  2579. ></div>
  2580. <div
  2581. class="chapter_upload_o"
  2582. style="
  2583. position: relative;
  2584. display: flex;
  2585. align-items: center;
  2586. "
  2587. >
  2588. <div
  2589. class="chapter_upload_l"
  2590. style="padding: 1px 0 0 10px"
  2591. >
  2592. <div
  2593. v-if="item1.type == 2"
  2594. class="chapter_upload_l_i2"
  2595. ></div>
  2596. <div
  2597. v-if="item1.type == 3"
  2598. class="chapter_upload_l_i3"
  2599. style="margin-left: 1px"
  2600. ></div>
  2601. <div
  2602. v-if="item1.type == 6"
  2603. class="chapter_upload_l_i6"
  2604. style="margin-left: 1px"
  2605. ></div>
  2606. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2607. <div
  2608. v-if="item1.type == 8"
  2609. class="chapter_upload_l_i8"
  2610. style="margin-left: 1px"
  2611. ></div>
  2612. <div
  2613. v-if="item1.type == 14"
  2614. class="chapter_upload_l_i14"
  2615. style="margin-left: 1px"
  2616. ></div>
  2617. <div
  2618. v-if="item1.type == 12"
  2619. class="chapter_upload_l_i12"
  2620. style="margin-left: 1px"
  2621. ></div>
  2622. <div
  2623. v-if="item1.type == 13"
  2624. class="chapter_upload_l_i13"
  2625. style="margin-left: 1px"
  2626. ></div>
  2627. </div>
  2628. <div class="chapter_upload_n">
  2629. <input
  2630. readonly="true"
  2631. v-if="
  2632. item1.type == 2 ||
  2633. item1.type == 3 ||
  2634. item1.type == 12 ||
  2635. item1.type == 13 ||
  2636. item1.type == 7
  2637. "
  2638. :placeholder="item1.name"
  2639. @click="
  2640. updataVideoT(
  2641. $event,
  2642. unitIndex,
  2643. itemTaskIndex,
  2644. index1
  2645. )
  2646. "
  2647. style="
  2648. border: none;
  2649. outline: none;
  2650. width: 80%;
  2651. minwidth: 215px;
  2652. z-index: 99;
  2653. font-size: 14px;
  2654. white-space: nowrap;
  2655. overflow: hidden;
  2656. text-overflow: ellipsis;
  2657. "
  2658. />
  2659. <input
  2660. :placeholder="item1.name"
  2661. v-if="item1.type == 6"
  2662. style="
  2663. border: none;
  2664. outline: none;
  2665. width: 80%;
  2666. white-space: nowrap;
  2667. overflow: hidden;
  2668. text-overflow: ellipsis;
  2669. "
  2670. readonly="true"
  2671. @click="
  2672. selectAttText(itemTaskIndex, index1)
  2673. "
  2674. />
  2675. <input
  2676. :placeholder="
  2677. item1.title ? item1.title : '链接'
  2678. "
  2679. v-if="item1.type == 8"
  2680. style="
  2681. border: none;
  2682. outline: none;
  2683. width: 80%;
  2684. white-space: nowrap;
  2685. overflow: hidden;
  2686. text-overflow: ellipsis;
  2687. "
  2688. readonly="true"
  2689. @click="selectLine(itemTaskIndex, index1)"
  2690. />
  2691. <input
  2692. :placeholder="
  2693. item1.title ? item1.title : '链接'
  2694. "
  2695. v-if="item1.type == 14"
  2696. style="
  2697. border: none;
  2698. outline: none;
  2699. width: 80%;
  2700. white-space: nowrap;
  2701. overflow: hidden;
  2702. text-overflow: ellipsis;
  2703. "
  2704. readonly="true"
  2705. @click="
  2706. openUpdateSource(itemTaskIndex, index1)
  2707. "
  2708. />
  2709. </div>
  2710. <div class="chapter_upload_ic">
  2711. <div
  2712. class="chapter_upload_noSee"
  2713. v-if="item1.type == 12"
  2714. ></div>
  2715. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2716. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2717. ">
  2718. <div></div>
  2719. </div>
  2720. <div
  2721. class="chapter_upload_ud"
  2722. style="z-index: 99"
  2723. >
  2724. <div
  2725. class="chapter_upload_up"
  2726. @click="
  2727. upCd(
  2728. $event,
  2729. unitIndex,
  2730. index,
  2731. itemTaskIndex,
  2732. index1
  2733. )
  2734. "
  2735. ></div>
  2736. <div
  2737. class="chapter_upload_down"
  2738. @click="
  2739. downCd(
  2740. $event,
  2741. unitIndex,
  2742. index,
  2743. itemTaskIndex,
  2744. index1
  2745. )
  2746. "
  2747. ></div>
  2748. </div>
  2749. <div
  2750. class="chapter_upload_ic_edit"
  2751. v-if="
  2752. item1.type == 2 ||
  2753. item1.type == 3 ||
  2754. item1.type == 12 ||
  2755. item1.type == 13 ||
  2756. item1.type == 7
  2757. "
  2758. @click.stop="
  2759. updataVideoT(
  2760. $event,
  2761. unitIndex,
  2762. itemTaskIndex,
  2763. index1
  2764. )
  2765. "
  2766. >
  2767. <div></div>
  2768. </div>
  2769. <div
  2770. class="chapter_upload_ic_edit"
  2771. v-if="item1.type == 6"
  2772. @click="
  2773. selectAttText(itemTaskIndex, index1)
  2774. "
  2775. >
  2776. <div></div>
  2777. </div>
  2778. <div
  2779. class="chapter_upload_ic_edit"
  2780. v-if="item1.type == 8"
  2781. @click="selectLine(itemTaskIndex, index1)"
  2782. >
  2783. <div></div>
  2784. </div>
  2785. <div
  2786. class="chapter_upload_ic_edit"
  2787. v-if="item1.type == 14"
  2788. @click="
  2789. openUpdateSource(itemTaskIndex, index1)
  2790. "
  2791. >
  2792. <div></div>
  2793. </div>
  2794. <div
  2795. class="chapter_upload_ic_r"
  2796. @click.stop="
  2797. deleteChapterData(
  2798. $event,
  2799. unitIndex,
  2800. index,
  2801. index1,
  2802. itemTaskIndex
  2803. )
  2804. "
  2805. >
  2806. <div></div>
  2807. </div>
  2808. </div>
  2809. </div>
  2810. </div>
  2811. </div>
  2812. </div>
  2813. <!-- v-if="!itemTask.isFoldchapter" -->
  2814. <div class="add_info_box" style="margin: 10px 0 0">
  2815. <button
  2816. class="c_pub_button_add pub_btn_add_img"
  2817. @click="addImg($event)"
  2818. >
  2819. 文件
  2820. <input
  2821. type="file"
  2822. accept="*"
  2823. style="display: none"
  2824. multiple="multiple"
  2825. v-if="inputShow"
  2826. @change="
  2827. beforeUpload2(
  2828. $event,
  2829. unitIndex,
  2830. 13,
  2831. itemTaskIndex
  2832. )
  2833. "
  2834. />
  2835. </button>
  2836. <button
  2837. class="c_pub_button_add pub_btn_add_img"
  2838. @click="addAttText(itemTaskIndex)"
  2839. >
  2840. 图文
  2841. </button>
  2842. <button
  2843. class="c_pub_button_add pub_btn_add_img"
  2844. @click="openLine(itemTaskIndex)"
  2845. >
  2846. 链接
  2847. </button>
  2848. <button
  2849. class="c_pub_button_add pub_btn_add_img"
  2850. @click="pasteLine(itemTaskIndex)"
  2851. >
  2852. 代码
  2853. </button>
  2854. <button
  2855. class="c_pub_button_add pub_btn_add_img"
  2856. @click="openSource(itemTaskIndex)"
  2857. >
  2858. 资源
  2859. </button>
  2860. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2861. AI生成PPT
  2862. </button>
  2863. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2864. AI生成教案
  2865. </button>
  2866. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2867. 智能检索视频
  2868. </button>
  2869. </div>
  2870. <div
  2871. v-if="
  2872. unitJson[unitIndex].chapterInfo[0].taskJson[
  2873. itemTaskIndex
  2874. ].proVisible
  2875. "
  2876. class="mask"
  2877. >
  2878. <div class="progressBox">
  2879. <!-- <div id="closePro" class="closeCss">
  2880. <img src="../../../../assets/icon/close.png" alt />
  2881. </div> -->
  2882. <div class="lbox">
  2883. <img
  2884. src="../../../assets/loading.gif"
  2885. />上传中,请稍后
  2886. </div>
  2887. <div style="margin-bottom: 10px">
  2888. <span
  2889. >{{
  2890. unitJson[unitIndex].chapterInfo[0].taskJson[
  2891. itemTaskIndex
  2892. ].isFinishSize
  2893. }}</span
  2894. >
  2895. /
  2896. <span
  2897. >{{
  2898. unitJson[unitIndex].chapterInfo[0].taskJson[
  2899. itemTaskIndex
  2900. ].isAllSize
  2901. }}</span
  2902. >
  2903. </div>
  2904. <!-- <el-progress
  2905. :text-inside="true"
  2906. :stroke-width="20"
  2907. :percentage="
  2908. unitJson[unitIndex].chapterInfo[0].taskJson[
  2909. itemTaskIndex
  2910. ].progress
  2911. ? unitJson[unitIndex].chapterInfo[0]
  2912. .taskJson[itemTaskIndex].progress
  2913. : 0
  2914. "
  2915. style="width: 80%"
  2916. ></el-progress> -->
  2917. </div>
  2918. </div>
  2919. </div>
  2920. <div v-if="
  2921. unitJson[unitIndex].easy == 1 ||
  2922. (unitJson[unitIndex].easy == 5 &&
  2923. itemTask.taskType == 2)
  2924. ">
  2925. <div>
  2926. <div class="add_chapters_box add_c_none" v-if="
  2927. itemTask.chapterData &&
  2928. itemTask.chapterData.length == 0
  2929. ">
  2930. <img src="../../../assets/icon/new/c_none.png" alt />
  2931. </div>
  2932. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2933. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2934. dragOver(index1, itemTaskIndex)
  2935. " @dragend="dragEnd()" :draggable="isdrag ==
  2936. 'chapter-' + itemTaskIndex + '-' + index1
  2937. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2938. :key="item1.id" @click="
  2939. getChapterData(
  2940. $event,
  2941. unitIndex,
  2942. index,
  2943. index1,
  2944. item1.type
  2945. )
  2946. " :class="{
  2947. dragOverTop2:
  2948. newIndex === index1 &&
  2949. typeIndex ==
  2950. 'chapter-' +
  2951. itemTaskIndex +
  2952. '-' +
  2953. index1 &&
  2954. oldIndex > index1,
  2955. dragOverBottom2:
  2956. newIndex === index1 &&
  2957. typeIndex ==
  2958. 'chapter-' +
  2959. itemTaskIndex +
  2960. '-' +
  2961. index1 &&
  2962. oldIndex < index1,
  2963. }">
  2964. <div @mousedown="
  2965. isdrag =
  2966. 'chapter-' + itemTaskIndex + '-' + index1
  2967. " @mouseup="isdrag = ''" @touchstart="
  2968. isdrag =
  2969. 'chapter-' + itemTaskIndex + '-' + index1
  2970. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2971. <div class="chapter_upload_t" style="width: 100%"></div>
  2972. <div class="chapter_upload_o" style="
  2973. position: relative;
  2974. display: flex;
  2975. align-items: center;
  2976. ">
  2977. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2978. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2979. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2980. </div>
  2981. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2982. </div>
  2983. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2984. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2985. </div>
  2986. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2987. </div>
  2988. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2989. </div>
  2990. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2991. </div>
  2992. </div>
  2993. <div class="chapter_upload_n">
  2994. <span style="
  2995. font-size: 14px;
  2996. color: rgb(109, 109, 109);
  2997. height: 14px;
  2998. line-height: 14px;
  2999. " v-if="
  3000. item1.type == 2 ||
  3001. item1.type == 3 ||
  3002. item1.type == 7
  3003. ">{{ item1.text }}-</span>
  3004. <input readonly="true" v-if="
  3005. item1.type == 2 ||
  3006. item1.type == 3 ||
  3007. item1.type == 7
  3008. " :placeholder="item1.name" @click="
  3009. updataVideoT(
  3010. $event,
  3011. unitIndex,
  3012. itemTaskIndex,
  3013. index1
  3014. )
  3015. " style="
  3016. border: none;
  3017. outline: none;
  3018. width: 80%;
  3019. minwidth: 215px;
  3020. z-index: 99;
  3021. font-size: 14px;
  3022. white-space: nowrap;
  3023. overflow: hidden;
  3024. text-overflow: ellipsis;
  3025. " />
  3026. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3027. border: none;
  3028. outline: none;
  3029. width: 80%;
  3030. white-space: nowrap;
  3031. overflow: hidden;
  3032. text-overflow: ellipsis;
  3033. " readonly="true" @click="
  3034. selectAttText(itemTaskIndex, index1)
  3035. " />
  3036. <input :placeholder="item1.title ? item1.title : '链接'
  3037. " v-if="item1.type == 8 || item1.type == 14" style="
  3038. border: none;
  3039. outline: none;
  3040. width: 80%;
  3041. white-space: nowrap;
  3042. overflow: hidden;
  3043. text-overflow: ellipsis;
  3044. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3045. </div>
  3046. <div class="chapter_upload_ic">
  3047. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3048. <div class="chapter_upload_ud" style="z-index: 99">
  3049. <div class="chapter_upload_up" @click="
  3050. upCd(
  3051. $event,
  3052. unitIndex,
  3053. index,
  3054. itemTaskIndex,
  3055. index1
  3056. )
  3057. "></div>
  3058. <div class="chapter_upload_down" @click="
  3059. downCd(
  3060. $event,
  3061. unitIndex,
  3062. index,
  3063. itemTaskIndex,
  3064. index1
  3065. )
  3066. "></div>
  3067. </div>
  3068. <div class="chapter_upload_ic_edit" v-if="
  3069. item1.type == 2 ||
  3070. item1.type == 3 ||
  3071. item1.type == 12 ||
  3072. item1.type == 13 ||
  3073. item1.type == 7
  3074. " @click.stop="
  3075. updataVideoT(
  3076. $event,
  3077. unitIndex,
  3078. itemTaskIndex,
  3079. index1
  3080. )
  3081. ">
  3082. <div></div>
  3083. </div>
  3084. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3085. selectAttText(itemTaskIndex, index1)
  3086. ">
  3087. <div></div>
  3088. </div>
  3089. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3090. @click="selectLine(itemTaskIndex, index1)">
  3091. <div></div>
  3092. </div>
  3093. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3094. openUpdateSource(itemTaskIndex, index1)
  3095. ">
  3096. <div></div>
  3097. </div>
  3098. <div class="chapter_upload_ic_r" @click.stop="
  3099. deleteChapterData(
  3100. $event,
  3101. unitIndex,
  3102. index,
  3103. index1,
  3104. itemTaskIndex
  3105. )
  3106. ">
  3107. <div></div>
  3108. </div>
  3109. </div>
  3110. </div>
  3111. </div>
  3112. </div>
  3113. </div>
  3114. <div class="add_info_box" style="margin: 10px 0 0">
  3115. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3116. <span style="color: red">*</span>
  3117. 教学设计
  3118. <input type="file"
  3119. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3120. style="display: none" v-if="inputShow" @change="
  3121. beforeUpload3(
  3122. $event,
  3123. unitIndex,
  3124. 3,
  3125. itemTaskIndex,
  3126. '教学设计'
  3127. )
  3128. " />
  3129. </button>
  3130. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3131. <span style="color: red">*</span>
  3132. 教学课件
  3133. <input type="file"
  3134. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3135. style="display: none" v-if="inputShow" @change="
  3136. beforeUpload3(
  3137. $event,
  3138. unitIndex,
  3139. 3,
  3140. itemTaskIndex,
  3141. '教学课件'
  3142. )
  3143. " />
  3144. </button>
  3145. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3146. 教学视频
  3147. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3148. style="display: none" v-if="inputShow" @change="
  3149. beforeUpload3(
  3150. $event,
  3151. unitIndex,
  3152. 2,
  3153. itemTaskIndex,
  3154. '教学视频'
  3155. )
  3156. " />
  3157. </button>
  3158. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3159. 教学音频
  3160. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3161. beforeUpload3(
  3162. $event,
  3163. unitIndex,
  3164. 2,
  3165. itemTaskIndex,
  3166. '教学音频'
  3167. )
  3168. " />
  3169. </button>
  3170. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3171. 学习单
  3172. <input type="file"
  3173. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3174. style="display: none" v-if="inputShow" @change="
  3175. beforeUpload3(
  3176. $event,
  3177. unitIndex,
  3178. 3,
  3179. itemTaskIndex,
  3180. '学习单'
  3181. )
  3182. " />
  3183. </button>
  3184. </div>
  3185. <div v-if="
  3186. unitJson[unitIndex].chapterInfo[0].taskJson[
  3187. itemTaskIndex
  3188. ].proVisible
  3189. " class="mask">
  3190. <div class="progressBox">
  3191. <!-- <div id="closePro" class="closeCss">
  3192. <img src="../../../../assets/icon/close.png" alt />
  3193. </div> -->
  3194. <div class="lbox">
  3195. <img src="../../../assets/loading.gif" />上传中,请稍后
  3196. </div>
  3197. <div style="margin-bottom: 10px">
  3198. <span>{{
  3199. unitJson[unitIndex].chapterInfo[0].taskJson[
  3200. itemTaskIndex
  3201. ].isFinishSize
  3202. }}M</span>
  3203. /
  3204. <span>{{
  3205. unitJson[unitIndex].chapterInfo[0].taskJson[
  3206. itemTaskIndex
  3207. ].isAllSize
  3208. }}M</span>
  3209. </div>
  3210. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3211. itemTaskIndex
  3212. ].progress
  3213. ? unitJson[unitIndex].chapterInfo[0]
  3214. .taskJson[itemTaskIndex].progress
  3215. : 0
  3216. " style="width: 80%"></el-progress>
  3217. </div>
  3218. </div>
  3219. </div>
  3220. </div>
  3221. <!-- padding: 20px; -->
  3222. <div style="
  3223. background: #fff;
  3224. border-radius: 5px;
  3225. margin-top: 15px;
  3226. ">
  3227. <div v-if="
  3228. unitJson[unitIndex].easy == 6 ||
  3229. !unitJson[unitIndex].easy
  3230. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3231. <div v-if="
  3232. unitJson[unitIndex].easy != 3 &&
  3233. !(
  3234. unitJson[unitIndex].easy == 5 &&
  3235. itemTask.taskType == 1
  3236. )
  3237. " style="
  3238. flex-direction: row;
  3239. justify-content: flex-start;
  3240. align-items: center;
  3241. ">
  3242. <div style="
  3243. display: flex;
  3244. flex-direction: row;
  3245. align-items: center;
  3246. margin: 5px 0 20px;
  3247. ">
  3248. <div class="lineTitle clineTitle">
  3249. {{
  3250. !unitJson[unitIndex].easy ||
  3251. unitJson[unitIndex].easy == 6 ||
  3252. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3253. -1
  3254. ? "练习内容"
  3255. : "评价内容"
  3256. }}
  3257. </div>
  3258. <!-- <div class="line" style="width: 90%"></div> -->
  3259. </div>
  3260. </div>
  3261. <div class="tools">
  3262. <div class="leftTools" style="width: 100%" v-for="(
  3263. itemTool, toolIndex
  3264. ) in itemTask.toolChoose" :key="toolIndex">
  3265. <div style="
  3266. display: flex;
  3267. flex-direction: row;
  3268. align-items: baseline;
  3269. flex-wrap: nowrap;
  3270. justify-content: flex-start;
  3271. position: relative;
  3272. ">
  3273. <div style="margin-right: 20px; font-weight: bold"
  3274. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3275. 工具 {{ toolIndex + 1 }} :
  3276. </div>
  3277. <div class="chooseWho">
  3278. <div :class="itemTool.toolType == 0
  3279. ? 'isChooseActive'
  3280. : ''
  3281. " @click="
  3282. (itemTool.toolType = 0),
  3283. (itemTool.isFold3 = false),
  3284. $forceUpdate()
  3285. ">
  3286. 互动类
  3287. </div>
  3288. <div :class="itemTool.toolType == 1
  3289. ? 'isChooseActive'
  3290. : ''
  3291. " @click="
  3292. (itemTool.toolType = 1),
  3293. (itemTool.isFold3 = false),
  3294. $forceUpdate()
  3295. ">
  3296. 思维类
  3297. </div>
  3298. <div :class="itemTool.toolType == 6
  3299. ? 'isChooseActive'
  3300. : ''
  3301. " @click="
  3302. (itemTool.toolType = 6),
  3303. (itemTool.isFold3 = false),
  3304. $forceUpdate()
  3305. ">
  3306. 协作类
  3307. </div>
  3308. <div :class="itemTool.toolType == 2
  3309. ? 'isChooseActive'
  3310. : ''
  3311. " @click="
  3312. (itemTool.toolType = 2),
  3313. (itemTool.isFold3 = false),
  3314. $forceUpdate()
  3315. ">
  3316. 测评类
  3317. </div>
  3318. <div :class="itemTool.toolType == 7
  3319. ? 'isChooseActive'
  3320. : ''
  3321. " @click="
  3322. (itemTool.toolType = 7),
  3323. (itemTool.isFold3 = false),
  3324. $forceUpdate()
  3325. ">
  3326. 评价类
  3327. </div>
  3328. <div :class="itemTool.toolType == 3
  3329. ? 'isChooseActive'
  3330. : ''
  3331. " @click="
  3332. (itemTool.toolType = 3),
  3333. (itemTool.isFold3 = false),
  3334. $forceUpdate()
  3335. ">
  3336. 编程类
  3337. </div>
  3338. <div :class="itemTool.toolType == 5
  3339. ? 'isChooseActive'
  3340. : ''
  3341. " @click="
  3342. (itemTool.toolType = 5),
  3343. (itemTool.isFold3 = false),
  3344. $forceUpdate()
  3345. ">
  3346. 学科类
  3347. </div>
  3348. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3349. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3350. 其他
  3351. </div> -->
  3352. </div>
  3353. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3354. margin:
  3355. itemTask.toolChoose.length > 1
  3356. ? '0px 35px 0px auto'
  3357. : '0 0 0 auto',
  3358. }" v-if="itemTask.toolChoose.length > 1">
  3359. <div class="chapter_upload_up2" @click.stop="
  3360. upTool(
  3361. $event,
  3362. unitIndex,
  3363. itemTaskIndex,
  3364. toolIndex
  3365. )
  3366. ">
  3367. 上移
  3368. </div>
  3369. <div class="chapter_upload_down2" @click.stop="
  3370. downTool(
  3371. $event,
  3372. unitIndex,
  3373. itemTaskIndex,
  3374. toolIndex
  3375. )
  3376. ">
  3377. 下移
  3378. </div>
  3379. </div>
  3380. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3381. @click="fold3(itemTaskIndex, toolIndex)"
  3382. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3383. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3384. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3385. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3386. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3387. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3388. v-if="itemTask.toolChoose.length > 1" style="
  3389. position: absolute;
  3390. right: 0;
  3391. top: -5px;
  3392. "></div>
  3393. </div>
  3394. <!-- v-show="!itemTool.isFold3" -->
  3395. <div style="min-height: 163px">
  3396. <div class="toolSort" v-if="itemTool.toolType == 0">
  3397. <!-- <div class="tool">
  3398. <div
  3399. class="whiteBIcon"
  3400. @click="addTools(8, itemTaskIndex, toolIndex)"
  3401. >
  3402. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3403. <div style="margin: 5px 0">素材库</div>
  3404. </div>
  3405. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3406. <img
  3407. src="../../../assets/icon/checkNo.png"
  3408. alt
  3409. v-if="itemTool.tool.indexOf(8) == -1"
  3410. />
  3411. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3412. alt /><span>已选择</span></div>
  3413. </div>
  3414. </div>-->
  3415. <!-- <div class="tool">
  3416. <div
  3417. class="whiteBIcon"
  3418. @click="addTools(17, itemTaskIndex, toolIndex)"
  3419. >
  3420. <img
  3421. src="../../../assets/icon/secondToolList/library.png"
  3422. alt
  3423. />
  3424. <div style="margin: 5px 0">学习资料</div>
  3425. </div>
  3426. <div
  3427. class="check"
  3428. @click="addTools(17, itemTaskIndex, toolIndex)"
  3429. >
  3430. <img
  3431. src="../../../assets/icon/checkNo.png"
  3432. alt
  3433. v-if="itemTool.tool.indexOf(17) == -1"
  3434. />
  3435. <img
  3436. src="../../../assets/icon/checkedIs.png"
  3437. alt
  3438. v-else
  3439. />
  3440. </div>10
  3441. </div> -->
  3442. <div class="tool" :class="{
  3443. isToolChoose:
  3444. itemTool.tool.indexOf(10) != -1,
  3445. }" @click="
  3446. addTools(10, itemTaskIndex, toolIndex)
  3447. ">
  3448. <div class="whiteBIcon" @click.stop="
  3449. openTools(itemTaskIndex, 10, toolIndex)
  3450. ">
  3451. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3452. <div style="margin: 5px 0">倒计时</div>
  3453. </div>
  3454. <div class="noCTool">
  3455. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3456. </div>
  3457. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3458. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3459. </div>
  3460. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3461. <img src="../../../assets/icon/checkNo.png" alt
  3462. v-if="itemTool.tool.indexOf(10) == -1" />
  3463. <div class="checkDiv" v-else>
  3464. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3465. </div>
  3466. </div> -->
  3467. </div>
  3468. <div class="tool" :class="{
  3469. isToolChoose:
  3470. itemTool.tool.indexOf(65) != -1,
  3471. }" @click="
  3472. addTools(65, itemTaskIndex, toolIndex)
  3473. ">
  3474. <div class="whiteBIcon" @click.stop="
  3475. addTools(65, itemTaskIndex, toolIndex)
  3476. ">
  3477. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3478. <div style="margin: 5px 0">挑人</div>
  3479. </div>
  3480. <div class="noCTool">
  3481. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3482. </div>
  3483. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3484. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3485. </div>
  3486. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3487. <img src="../../../assets/icon/checkNo.png" alt
  3488. v-if="itemTool.tool.indexOf(65) == -1" />
  3489. <div class="checkDiv" v-else>
  3490. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3491. </div>
  3492. </div> -->
  3493. </div>
  3494. <!-- <div class="tool">
  3495. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3496. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3497. <div style="margin: 5px 0">学生分组</div>
  3498. </div>
  3499. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3500. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3501. <div class="checkDiv" v-else>
  3502. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3503. </div>
  3504. </div>
  3505. </div> -->
  3506. <!-- <div class="tool">
  3507. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3508. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3509. <div style="margin: 5px 0">交互视频</div>
  3510. </div>
  3511. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3512. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3513. <div class="checkDiv" v-else>
  3514. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3515. </div>
  3516. </div>
  3517. </div> -->
  3518. </div>
  3519. <div class="toolSort" v-if="itemTool.toolType == 1">
  3520. <div class="tool" :class="{
  3521. isToolChoose:
  3522. itemTool.tool.indexOf(7) != -1,
  3523. }" @click="
  3524. addTools(7, itemTaskIndex, toolIndex)
  3525. ">
  3526. <div class="whiteBIcon" @click.stop="
  3527. addTools(7, itemTaskIndex, toolIndex)
  3528. ">
  3529. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3530. <div style="margin: 5px 0">思维网格</div>
  3531. </div>
  3532. <div class="noCTool">
  3533. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3534. </div>
  3535. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3536. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3537. </div>
  3538. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3539. <img src="../../../assets/icon/checkNo.png" alt
  3540. v-if="itemTool.tool.indexOf(7) == -1" />
  3541. <div class="checkDiv" v-else>
  3542. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3543. </div>
  3544. </div> -->
  3545. </div>
  3546. <div class="tool" :class="{
  3547. isToolChoose:
  3548. itemTool.tool.indexOf(1) != -1,
  3549. }" @click="
  3550. addTools(1, itemTaskIndex, toolIndex)
  3551. ">
  3552. <div class="whiteBIcon" @click.stop="
  3553. openTools(itemTaskIndex, 1, toolIndex)
  3554. ">
  3555. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3556. <div style="margin: 5px 0">电子白板</div>
  3557. </div>
  3558. <div class="noCTool">
  3559. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3560. </div>
  3561. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3562. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3563. </div>
  3564. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3565. <img src="../../../assets/icon/checkNo.png" alt
  3566. v-if="itemTool.tool.indexOf(1) == -1" />
  3567. <div class="checkDiv" v-else>
  3568. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3569. </div>
  3570. </div> -->
  3571. </div>
  3572. <!-- <div class="tool">
  3573. <div
  3574. class="whiteBIcon"
  3575. @click="addTools(2, itemTaskIndex, toolIndex)"
  3576. >
  3577. <img
  3578. src="../../../assets/icon/secondToolList/note.png"
  3579. alt
  3580. />
  3581. <div style="margin: 5px 0">便签</div>
  3582. </div>
  3583. <div
  3584. class="check"
  3585. @click="addTools(2, itemTaskIndex, toolIndex)"
  3586. >
  3587. <img
  3588. src="../../../assets/icon/checkNo.png"
  3589. alt
  3590. v-if="itemTool.tool.indexOf(2) == -1"
  3591. />
  3592. <div class="checkDiv" v-else>
  3593. <img
  3594. src="../../../assets/icon/checkedIs.png"
  3595. alt
  3596. /><span>已选择</span>
  3597. </div>
  3598. </div>
  3599. </div> -->
  3600. <!-- <div class="tool">
  3601. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3602. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3603. <div style="margin: 5px 0">协同文档</div>
  3604. </div>
  3605. <div
  3606. class="check"
  3607. @click="addTools(6, itemTaskIndex, toolIndex)"
  3608. >
  3609. <img
  3610. src="../../../assets/icon/checkNo.png"
  3611. alt
  3612. v-if="itemTool.tool.indexOf(6) == -1"
  3613. />
  3614. <div class="checkDiv" v-else>
  3615. <img
  3616. src="../../../assets/icon/checkedIs.png"
  3617. alt
  3618. /><span>已选择</span>
  3619. </div>
  3620. </div>
  3621. </div> -->
  3622. <div class="tool" :class="{
  3623. isToolChoose:
  3624. itemTool.tool.indexOf(52) != -1,
  3625. }" @click="
  3626. addTools(52, itemTaskIndex, toolIndex)
  3627. ">
  3628. <div class="whiteBIcon" @click.stop="
  3629. openTools(itemTaskIndex, 52, toolIndex)
  3630. ">
  3631. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3632. <div style="margin: 5px 0">文档</div>
  3633. </div>
  3634. <div class="noCTool">
  3635. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3636. </div>
  3637. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3638. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3639. </div>
  3640. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3641. <img src="../../../assets/icon/checkNo.png" alt
  3642. v-if="itemTool.tool.indexOf(52) == -1" />
  3643. <div class="checkDiv" v-else>
  3644. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3645. </div>
  3646. </div> -->
  3647. </div>
  3648. <div class="tool" :class="{
  3649. isToolChoose:
  3650. itemTool.tool.indexOf(3) != -1,
  3651. }" @click="
  3652. addTools(3, itemTaskIndex, toolIndex)
  3653. ">
  3654. <div class="whiteBIcon" @click.stop="
  3655. openTools(itemTaskIndex, 3, toolIndex)
  3656. ">
  3657. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3658. <div style="margin: 5px 0">思维导图</div>
  3659. </div>
  3660. <div class="noCTool">
  3661. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3662. </div>
  3663. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3664. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3665. </div>
  3666. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3667. <img src="../../../assets/icon/checkNo.png" alt
  3668. v-if="itemTool.tool.indexOf(3) == -1" />
  3669. <div class="checkDiv" v-else>
  3670. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3671. </div>
  3672. </div> -->
  3673. </div>
  3674. <div class="tool" :class="{
  3675. isToolChoose:
  3676. itemTool.tool.indexOf(48) != -1,
  3677. }" @click="
  3678. addTools(48, itemTaskIndex, toolIndex)
  3679. ">
  3680. <div class="whiteBIcon" @click.stop="
  3681. openTools(itemTaskIndex, 48, toolIndex)
  3682. ">
  3683. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3684. <div style="margin: 5px 0">表格</div>
  3685. </div>
  3686. <div class="noCTool">
  3687. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3688. </div>
  3689. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3690. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3691. </div>
  3692. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3693. <img src="../../../assets/icon/checkNo.png" alt
  3694. v-if="itemTool.tool.indexOf(48) == -1" />
  3695. <div class="checkDiv" v-else>
  3696. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3697. </div>
  3698. </div> -->
  3699. </div>
  3700. </div>
  3701. <div class="toolSort" v-if="itemTool.toolType == 6">
  3702. <div class="tool" :class="{
  3703. isToolChoose:
  3704. itemTool.tool.indexOf(49) != -1,
  3705. }" @click="
  3706. addTools(49, itemTaskIndex, toolIndex)
  3707. ">
  3708. <div class="whiteBIcon" @click.stop="
  3709. openTools(itemTaskIndex, 49, toolIndex)
  3710. ">
  3711. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3712. <div style="margin: 5px 0">学生分组</div>
  3713. </div>
  3714. <div class="noCTool">
  3715. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3716. </div>
  3717. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3718. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3719. </div>
  3720. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3721. <img src="../../../assets/icon/checkNo.png" alt
  3722. v-if="itemTool.tool.indexOf(49) == -1" />
  3723. <div class="checkDiv" v-else>
  3724. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3725. </div>
  3726. </div> -->
  3727. </div>
  3728. </div>
  3729. <div class="toolSort" v-if="itemTool.toolType == 2">
  3730. <!-- <div class="tool">
  3731. <div
  3732. class="whiteBIcon"
  3733. @click="addTools(5, itemTaskIndex, toolIndex)"
  3734. >
  3735. <img
  3736. src="../../../assets/icon/thirdToolList/score.png"
  3737. alt
  3738. />
  3739. <div style="margin: 5px 0">量规评分</div>
  3740. </div>
  3741. <div
  3742. class="check"
  3743. @click="addTools(5, itemTaskIndex, toolIndex)"
  3744. >
  3745. <img
  3746. src="../../../assets/icon/checkNo.png"
  3747. alt
  3748. v-if="itemTool.tool.indexOf(5) == -1"
  3749. />
  3750. <img
  3751. src="../../../assets/icon/checkedIs.png"
  3752. alt
  3753. v-else
  3754. />
  3755. </div>
  3756. </div>-->
  3757. <div class="tool" :class="{
  3758. isToolChoose:
  3759. itemTool.tool.indexOf(4) != -1,
  3760. }" @click="
  3761. addTools(4, itemTaskIndex, toolIndex)
  3762. ">
  3763. <div class="whiteBIcon" @click.stop="
  3764. openTools(itemTaskIndex, 4, toolIndex)
  3765. ">
  3766. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3767. <div style="margin: 5px 0">问卷调查</div>
  3768. </div>
  3769. <div class="noCTool">
  3770. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3771. </div>
  3772. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3773. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3774. </div>
  3775. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3776. <img src="../../../assets/icon/checkNo.png" alt
  3777. v-if="itemTool.tool.indexOf(4) == -1" />
  3778. <div class="checkDiv" v-else>
  3779. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3780. </div>
  3781. </div> -->
  3782. </div>
  3783. <div class="tool" :class="{
  3784. isToolChoose:
  3785. itemTool.tool.indexOf(45) != -1,
  3786. }" @click="
  3787. addTools(45, itemTaskIndex, toolIndex)
  3788. ">
  3789. <div class="whiteBIcon" @click="
  3790. openTools(itemTaskIndex, 45, toolIndex)
  3791. ">
  3792. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3793. <div style="margin: 5px 0">选择题</div>
  3794. </div>
  3795. <div class="noCTool">
  3796. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3797. </div>
  3798. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3799. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3800. </div>
  3801. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3802. <img src="../../../assets/icon/checkNo.png" alt
  3803. v-if="itemTool.tool.indexOf(45) == -1" />
  3804. <div class="checkDiv" v-else>
  3805. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3806. </div>
  3807. </div> -->
  3808. </div>
  3809. <div class="tool" :class="{
  3810. isToolChoose:
  3811. itemTool.tool.indexOf(15) != -1,
  3812. }" @click="
  3813. addTools(15, itemTaskIndex, toolIndex)
  3814. ">
  3815. <div class="whiteBIcon" @click.stop="
  3816. openTools(itemTaskIndex, 15, toolIndex)
  3817. ">
  3818. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3819. <div style="margin: 5px 0">问答</div>
  3820. </div>
  3821. <div class="noCTool">
  3822. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3823. </div>
  3824. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3825. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3826. </div>
  3827. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3828. <img src="../../../assets/icon/checkNo.png" alt
  3829. v-if="itemTool.tool.indexOf(15) == -1" />
  3830. <div class="checkDiv" v-else>
  3831. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3832. </div>
  3833. </div> -->
  3834. </div>
  3835. <div class="tool" :class="{
  3836. isToolChoose:
  3837. itemTool.tool.indexOf(16) != -1,
  3838. }" @click="
  3839. addTools(16, itemTaskIndex, toolIndex)
  3840. ">
  3841. <div class="whiteBIcon" @click.stop="
  3842. addTools(16, itemTaskIndex, toolIndex)
  3843. ">
  3844. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3845. <div style="margin: 5px 0">作业提交</div>
  3846. </div>
  3847. <div class="noCTool">
  3848. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3849. </div>
  3850. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3851. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3852. </div>
  3853. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3854. <img src="../../../assets/icon/checkNo.png" alt
  3855. v-if="itemTool.tool.indexOf(16) == -1" />
  3856. <div class="checkDiv" v-else>
  3857. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3858. </div>
  3859. </div> -->
  3860. </div>
  3861. <div class="tool" :class="{
  3862. isToolChoose:
  3863. itemTool.tool.indexOf(50) != -1,
  3864. }" @click="
  3865. addTools(50, itemTaskIndex, toolIndex)
  3866. ">
  3867. <div class="whiteBIcon" @click.stop="
  3868. addTools(50, itemTaskIndex, toolIndex)
  3869. ">
  3870. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3871. <div style="margin: 5px 0">批量上传</div>
  3872. </div>
  3873. <div class="noCTool">
  3874. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3875. </div>
  3876. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3878. </div>
  3879. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3880. <img src="../../../assets/icon/checkNo.png" alt
  3881. v-if="itemTool.tool.indexOf(50) == -1" />
  3882. <div class="checkDiv" v-else>
  3883. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3884. </div>
  3885. </div> -->
  3886. </div>
  3887. <!-- <div class="tool">
  3888. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3889. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3890. <div style="margin: 5px 0">个人评价</div>
  3891. </div>
  3892. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3893. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3894. <div class="checkDiv" v-else>
  3895. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3896. </div>
  3897. </div>
  3898. </div> -->
  3899. <div class="tool" :class="{
  3900. isToolChoose:
  3901. itemTool.tool.indexOf(41) != -1,
  3902. }" @click="
  3903. addTools(41, itemTaskIndex, toolIndex)
  3904. ">
  3905. <div class="whiteBIcon" @click.stop="
  3906. openTools(itemTaskIndex, 41, toolIndex)
  3907. ">
  3908. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3909. <div style="margin: 5px 0">选择匹配</div>
  3910. </div>
  3911. <div class="noCTool">
  3912. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3913. </div>
  3914. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3915. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3916. </div>
  3917. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3918. <img src="../../../assets/icon/checkNo.png" alt
  3919. v-if="itemTool.tool.indexOf(41) == -1" />
  3920. <div class="checkDiv" v-else>
  3921. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3922. </div>
  3923. </div> -->
  3924. </div>
  3925. <div class="tool" :class="{
  3926. isToolChoose:
  3927. itemTool.tool.indexOf(47) != -1,
  3928. }" @click="
  3929. addTools(47, itemTaskIndex, toolIndex)
  3930. ">
  3931. <div class="whiteBIcon" @click.stop="
  3932. openTools(itemTaskIndex, 47, toolIndex)
  3933. ">
  3934. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3935. <div style="margin: 5px 0">排序</div>
  3936. </div>
  3937. <div class="noCTool">
  3938. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3939. </div>
  3940. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3941. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3942. </div>
  3943. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3944. <img src="../../../assets/icon/checkNo.png" alt
  3945. v-if="itemTool.tool.indexOf(47) == -1" />
  3946. <div class="checkDiv" v-else>
  3947. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3948. </div>
  3949. </div> -->
  3950. </div>
  3951. <!-- <div class="tool">
  3952. <div
  3953. class="whiteBIcon"
  3954. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3955. >
  3956. <img
  3957. src="../../../assets/icon/thirdToolList/mp3.png"
  3958. alt
  3959. />
  3960. <div style="margin: 5px 0">上传音频</div>
  3961. </div>
  3962. <div
  3963. class="check"
  3964. @click="addTools(42, itemTaskIndex, toolIndex)"
  3965. >
  3966. <img
  3967. src="../../../assets/icon/checkNo.png"
  3968. alt
  3969. v-if="itemTool.tool.indexOf(42) == -1"
  3970. />
  3971. <img
  3972. src="../../../assets/icon/checkedIs.png"
  3973. alt
  3974. v-else
  3975. />
  3976. </div>
  3977. </div> -->
  3978. </div>
  3979. <div class="toolSort" v-if="itemTool.toolType == 3">
  3980. <div class="tool" :class="{
  3981. isToolChoose:
  3982. itemTool.tool.indexOf(18) != -1,
  3983. }" @click="
  3984. addTools(18, itemTaskIndex, toolIndex)
  3985. ">
  3986. <div class="whiteBIcon" @click.stop="
  3987. addTools(18, itemTaskIndex, toolIndex)
  3988. ">
  3989. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3990. <div style="margin: 5px 0">训练平台</div>
  3991. </div>
  3992. <div class="noCTool">
  3993. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3994. </div>
  3995. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3996. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3997. </div>
  3998. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3999. <img src="../../../assets/icon/checkNo.png" alt
  4000. v-if="itemTool.tool.indexOf(18) == -1" />
  4001. <div class="checkDiv" v-else>
  4002. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4003. </div>
  4004. </div> -->
  4005. </div>
  4006. <div class="tool" :class="{
  4007. isToolChoose:
  4008. itemTool.tool.indexOf(21) != -1,
  4009. }" @click="
  4010. addTools(21, itemTaskIndex, toolIndex)
  4011. ">
  4012. <div class="whiteBIcon" @click.stop="
  4013. addTools(21, itemTaskIndex, toolIndex)
  4014. ">
  4015. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4016. <div style="margin: 5px 0">
  4017. AIoT Blockly
  4018. </div>
  4019. </div>
  4020. <div class="noCTool">
  4021. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4022. </div>
  4023. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4024. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4025. </div>
  4026. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4027. <img src="../../../assets/icon/checkNo.png" alt
  4028. v-if="itemTool.tool.indexOf(21) == -1" />
  4029. <div class="checkDiv" v-else>
  4030. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4031. </div>
  4032. </div> -->
  4033. </div>
  4034. <!-- <div class="tool">
  4035. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4036. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4037. <div style="margin: 5px 0">AI体验</div>
  4038. </div>
  4039. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4040. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4041. <div class="checkDiv" v-else>
  4042. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4043. </div>
  4044. </div>
  4045. </div> -->
  4046. <div class="tool" :class="{
  4047. isToolChoose:
  4048. itemTool.tool.indexOf(23) != -1,
  4049. }" @click="
  4050. addTools(23, itemTaskIndex, toolIndex)
  4051. ">
  4052. <div class="whiteBIcon" @click.stop="
  4053. addTools(23, itemTaskIndex, toolIndex)
  4054. ">
  4055. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4056. <div style="margin: 5px 0">AI Python</div>
  4057. </div>
  4058. <div class="noCTool">
  4059. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4060. </div>
  4061. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4062. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4063. </div>
  4064. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4065. <img src="../../../assets/icon/checkNo.png" alt
  4066. v-if="itemTool.tool.indexOf(23) == -1" />
  4067. <div class="checkDiv" v-else>
  4068. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4069. </div>
  4070. </div> -->
  4071. </div>
  4072. <div class="tool" :class="{
  4073. isToolChoose:
  4074. itemTool.tool.indexOf(24) != -1,
  4075. }" @click="
  4076. addTools(24, itemTaskIndex, toolIndex)
  4077. ">
  4078. <div class="whiteBIcon" @click.stop="
  4079. addTools(24, itemTaskIndex, toolIndex)
  4080. ">
  4081. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4082. <div style="margin: 5px 0">
  4083. AI Blockly
  4084. </div>
  4085. </div>
  4086. <div class="noCTool">
  4087. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4088. </div>
  4089. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4090. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4091. </div>
  4092. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4093. <img src="../../../assets/icon/checkNo.png" alt
  4094. v-if="itemTool.tool.indexOf(24) == -1" />
  4095. <div class="checkDiv" v-else>
  4096. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4097. </div>
  4098. </div> -->
  4099. </div>
  4100. <div class="tool" :class="{
  4101. isToolChoose:
  4102. itemTool.tool.indexOf(32) != -1,
  4103. }" @click="
  4104. addTools(32, itemTaskIndex, toolIndex)
  4105. ">
  4106. <div class="whiteBIcon" @click.stop="
  4107. addTools(32, itemTaskIndex, toolIndex)
  4108. ">
  4109. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4110. <div style="margin: 5px 0">源码编辑</div>
  4111. </div>
  4112. <div class="noCTool">
  4113. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4114. </div>
  4115. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4116. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4117. </div>
  4118. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4119. <img src="../../../assets/icon/checkNo.png" alt
  4120. v-if="itemTool.tool.indexOf(32) == -1" />
  4121. <div class="checkDiv" v-else>
  4122. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4123. </div>
  4124. </div> -->
  4125. </div>
  4126. <div class="tool" :class="{
  4127. isToolChoose:
  4128. itemTool.tool.indexOf(57) != -1,
  4129. }" @click="
  4130. addTools(57, itemTaskIndex, toolIndex)
  4131. ">
  4132. <div class="whiteBIcon" @click.stop="
  4133. openTools(itemTaskIndex, 57, toolIndex)
  4134. ">
  4135. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4136. <div style="margin: 5px 0">CocoPi</div>
  4137. </div>
  4138. <div class="noCTool">
  4139. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4140. </div>
  4141. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4142. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4143. </div>
  4144. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4145. <img src="../../../assets/icon/checkNo.png" alt
  4146. v-if="itemTool.tool.indexOf(57) == -1" />
  4147. <div class="checkDiv" v-else>
  4148. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4149. </div>
  4150. </div> -->
  4151. </div>
  4152. <div class="tool" :class="{
  4153. isToolChoose:
  4154. itemTool.tool.indexOf(63) != -1,
  4155. }" @click="
  4156. addTools(63, itemTaskIndex, toolIndex)
  4157. ">
  4158. <div class="whiteBIcon" @click.stop="
  4159. addTools(63, itemTaskIndex, toolIndex)
  4160. ">
  4161. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4162. <div style="margin: 5px 0">海龟编程</div>
  4163. </div>
  4164. <div class="noCTool">
  4165. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4166. </div>
  4167. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4168. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4169. </div>
  4170. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4171. <img src="../../../assets/icon/checkNo.png" alt
  4172. v-if="itemTool.tool.indexOf(63) == -1" />
  4173. <div class="checkDiv" v-else>
  4174. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4175. </div>
  4176. </div> -->
  4177. </div>
  4178. <div class="tool" :class="{
  4179. isToolChoose:
  4180. itemTool.tool.indexOf(71) != -1,
  4181. }" @click="
  4182. addTools(71, itemTaskIndex, toolIndex)
  4183. ">
  4184. <div class="whiteBIcon" @click.stop="
  4185. addTools(71, itemTaskIndex, toolIndex)
  4186. ">
  4187. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4188. <div style="margin: 5px 0">AI智能体</div>
  4189. </div>
  4190. <div class="noCTool">
  4191. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4192. </div>
  4193. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4194. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4195. </div>
  4196. </div>
  4197. </div>
  4198. <div class="toolSort" v-if="itemTool.toolType == 7">
  4199. <div class="tool" :class="{
  4200. isToolChoose:
  4201. itemTool.tool.indexOf(40) != -1,
  4202. }" @click.stop="
  4203. addTools(40, itemTaskIndex, toolIndex)
  4204. ">
  4205. <div class="whiteBIcon" @click.stop="
  4206. openTools(itemTaskIndex, 40, toolIndex)
  4207. ">
  4208. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4209. <div style="margin: 5px 0">个人评价</div>
  4210. </div>
  4211. <div class="noCTool">
  4212. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4213. </div>
  4214. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4215. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4216. </div>
  4217. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4218. <img src="../../../assets/icon/checkNo.png" alt
  4219. v-if="itemTool.tool.indexOf(40) == -1" />
  4220. <div class="checkDiv" v-else>
  4221. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4222. </div>
  4223. </div> -->
  4224. </div>
  4225. </div>
  4226. <div class="toolSort" v-if="itemTool.toolType == 5">
  4227. <div class="tool" :class="{
  4228. isToolChoose:
  4229. itemTool.tool.indexOf(28) != -1,
  4230. }" @click="
  4231. addTools(28, itemTaskIndex, toolIndex)
  4232. ">
  4233. <div class="whiteBIcon" @click.stop="
  4234. addTools(28, itemTaskIndex, toolIndex)
  4235. ">
  4236. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4237. <div style="margin: 5px 0">翻译</div>
  4238. </div>
  4239. <div class="noCTool">
  4240. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4241. </div>
  4242. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4243. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4244. </div>
  4245. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4246. <img src="../../../assets/icon/checkNo.png" alt
  4247. v-if="itemTool.tool.indexOf(28) == -1" />
  4248. <div class="checkDiv" v-else>
  4249. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4250. </div>
  4251. </div> -->
  4252. </div>
  4253. <div class="tool" :class="{
  4254. isToolChoose:
  4255. itemTool.tool.indexOf(31) != -1,
  4256. }" @click="
  4257. addTools(31, itemTaskIndex, toolIndex)
  4258. ">
  4259. <div class="whiteBIcon" @click.stop="
  4260. addTools(31, itemTaskIndex, toolIndex)
  4261. ">
  4262. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4263. <div style="margin: 5px 0">数字画板</div>
  4264. </div>
  4265. <div class="noCTool">
  4266. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4267. </div>
  4268. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4269. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4270. </div>
  4271. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4272. <img src="../../../assets/icon/checkNo.png" alt
  4273. v-if="itemTool.tool.indexOf(31) == -1" />
  4274. <div class="checkDiv" v-else>
  4275. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4276. </div>
  4277. </div> -->
  4278. </div>
  4279. <div class="tool" :class="{
  4280. isToolChoose:
  4281. itemTool.tool.indexOf(39) != -1,
  4282. }" @click="
  4283. addTools(39, itemTaskIndex, toolIndex)
  4284. ">
  4285. <div class="whiteBIcon" @click.stop="
  4286. addTools(39, itemTaskIndex, toolIndex)
  4287. ">
  4288. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4289. <div style="margin: 5px 0">GeoGebra</div>
  4290. </div>
  4291. <div class="noCTool">
  4292. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4293. </div>
  4294. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4295. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4296. </div>
  4297. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4298. <img src="../../../assets/icon/checkNo.png" alt
  4299. v-if="itemTool.tool.indexOf(39) == -1" />
  4300. <div class="checkDiv" v-else>
  4301. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4302. </div>
  4303. </div> -->
  4304. </div>
  4305. <div class="tool" :class="{
  4306. isToolChoose:
  4307. itemTool.tool.indexOf(66) != -1,
  4308. }" @click="
  4309. addTools(66, itemTaskIndex, toolIndex)
  4310. ">
  4311. <div class="whiteBIcon" @click.stop="
  4312. addTools(66, itemTaskIndex, toolIndex)
  4313. ">
  4314. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4315. <div style="margin: 5px 0">公式编辑</div>
  4316. </div>
  4317. <div class="noCTool">
  4318. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4319. </div>
  4320. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4322. </div>
  4323. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4324. <img src="../../../assets/icon/checkNo.png" alt
  4325. v-if="itemTool.tool.indexOf(66) == -1" />
  4326. <div class="checkDiv" v-else>
  4327. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4328. </div>
  4329. </div> -->
  4330. </div>
  4331. <!-- <div class="tool">
  4332. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4333. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4334. <div style="margin: 5px 0">分子结构</div>
  4335. </div>
  4336. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4337. <img src="../../../assets/icon/checkNo.png" alt
  4338. v-if="itemTool.tool.indexOf(67) == -1" />
  4339. <div class="checkDiv" v-else>
  4340. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4341. </div>
  4342. </div>
  4343. </div> -->
  4344. <div class="tool" :class="{
  4345. isToolChoose:
  4346. itemTool.tool.indexOf(68) != -1,
  4347. }" @click="
  4348. addTools(68, itemTaskIndex, toolIndex)
  4349. ">
  4350. <div class="whiteBIcon" @click.stop="
  4351. addTools(68, itemTaskIndex, toolIndex)
  4352. ">
  4353. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4354. <div style="margin: 5px 0">时间轴</div>
  4355. </div>
  4356. <div class="noCTool">
  4357. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4358. </div>
  4359. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4360. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4361. </div>
  4362. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4363. <img src="../../../assets/icon/checkNo.png" alt
  4364. v-if="itemTool.tool.indexOf(68) == -1" />
  4365. <div class="checkDiv" v-else>
  4366. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4367. </div>
  4368. </div> -->
  4369. </div>
  4370. <div class="tool" :class="{
  4371. isToolChoose:
  4372. itemTool.tool.indexOf(69) != -1,
  4373. }" @click="
  4374. addTools(69, itemTaskIndex, toolIndex)
  4375. ">
  4376. <div class="whiteBIcon" @click.stop="
  4377. openTools(itemTaskIndex, 69, toolIndex)
  4378. ">
  4379. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4380. <div style="margin: 5px 0">英语写作</div>
  4381. </div>
  4382. <div class="noCTool">
  4383. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4384. </div>
  4385. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4386. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4387. </div>
  4388. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4389. <img src="../../../assets/icon/checkNo.png" alt
  4390. v-if="itemTool.tool.indexOf(4) == -1" />
  4391. <div class="checkDiv" v-else>
  4392. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4393. </div>
  4394. </div> -->
  4395. </div>
  4396. <div class="tool" :class="{
  4397. isToolChoose:
  4398. itemTool.tool.indexOf(70) != -1,
  4399. }" @click="
  4400. addTools(70, itemTaskIndex, toolIndex)
  4401. ">
  4402. <div class="whiteBIcon" @click.stop="
  4403. openTools(itemTaskIndex, 70, toolIndex)
  4404. ">
  4405. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4406. <div style="margin: 5px 0">英语口语</div>
  4407. </div>
  4408. <div class="noCTool">
  4409. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4410. </div>
  4411. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4412. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4413. </div>
  4414. </div>
  4415. <!-- <div class="tool">
  4416. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4417. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4418. <div style="margin: 5px 0">翻译</div>
  4419. </div>
  4420. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4421. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4422. <div class="checkDiv" v-else>
  4423. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4424. </div>
  4425. </div>
  4426. </div>
  4427. <div class="tool">
  4428. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4429. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4430. <div style="margin: 5px 0">魔盒识字</div>
  4431. </div>
  4432. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4433. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4434. <div class="checkDiv" v-else>
  4435. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4436. </div>
  4437. </div>
  4438. </div>
  4439. <div class="tool">
  4440. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4441. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4442. <div style="margin: 5px 0">24点</div>
  4443. </div>
  4444. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4445. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4446. <div class="checkDiv" v-else>
  4447. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4448. </div>
  4449. </div>
  4450. </div>
  4451. <div class="tool">
  4452. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4453. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4454. <div style="margin: 5px 0">数学画板</div>
  4455. </div>
  4456. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4457. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4458. <div class="checkDiv" v-else>
  4459. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4460. </div>
  4461. </div>
  4462. </div>
  4463. <div class="tool">
  4464. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4465. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4466. <div style="margin: 5px 0">GeoGebra</div>
  4467. </div>
  4468. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4469. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4470. <div class="checkDiv" v-else>
  4471. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4472. </div>
  4473. </div>
  4474. </div>
  4475. <div class="tool">
  4476. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4477. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4478. <div style="margin: 5px 0">模拟驾驶</div>
  4479. </div>
  4480. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4481. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4482. <div class="checkDiv" v-else>
  4483. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4484. </div>
  4485. </div>
  4486. </div>
  4487. <div class="tool">
  4488. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4489. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4490. <div style="margin: 5px 0">路径搜索</div>
  4491. </div>
  4492. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4493. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4494. <div class="checkDiv" v-else>
  4495. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4496. </div>
  4497. </div>
  4498. </div>
  4499. <div class="tool">
  4500. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4501. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4502. <div style="margin: 5px 0">深度学习</div>
  4503. </div>
  4504. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4505. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4506. <div class="checkDiv" v-else>
  4507. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4508. </div>
  4509. </div>
  4510. </div>
  4511. <div class="tool">
  4512. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4513. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4514. <div style="margin: 5px 0">全历史</div>
  4515. </div>
  4516. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4517. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4518. <div class="checkDiv" v-else>
  4519. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4520. </div>
  4521. </div>
  4522. </div>
  4523. </div>
  4524. <div class="toolSort" v-if="itemTool.toolType == 4">
  4525. <div class="tool">
  4526. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4527. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4528. <div style="margin: 5px 0">课程设计</div>
  4529. </div>
  4530. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4531. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4532. <div class="checkDiv" v-else>
  4533. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4534. </div>
  4535. </div>
  4536. </div>
  4537. <div class="tool">
  4538. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4539. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4540. <div style="margin: 5px 0">目标管理</div>
  4541. </div>
  4542. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4543. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4544. <div class="checkDiv" v-else>
  4545. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4546. </div>
  4547. </div>
  4548. </div> -->
  4549. <!-- <div class="tool">
  4550. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4551. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4552. <div style="margin: 5px 0">汉字宫</div>
  4553. </div>
  4554. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4555. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4556. <div class="checkDiv" v-else>
  4557. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4558. </div>
  4559. </div>
  4560. </div> -->
  4561. </div>
  4562. </div>
  4563. <!-- v-show="!itemTool.isFold3" -->
  4564. <div class="op_tool_box"
  4565. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4566. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4567. class="binfo_input" style="
  4568. margin: 0 0 20px 0;
  4569. width: 100% !important;
  4570. " v-model="itemTool.toolDetail"></textarea>
  4571. <div class="op_box">
  4572. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4573. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4574. <div class="r_pub_button_op"
  4575. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4576. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4577. 智能优化</div>
  4578.                              
  4579. </el-tooltip>
  4580. </div>
  4581. </div>
  4582. </div>
  4583. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4584. <div class="addToolImg">
  4585. <img src="../../../assets/icon/add.png" alt />
  4586. </div>
  4587. <div>添加工具</div>
  4588. </div> -->
  4589. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4590. margin: 0 auto;
  4591. padding: 0 30px;
  4592. height: 45px;
  4593. ">
  4594. 添加工具
  4595. </button>
  4596. </div>
  4597. </div>
  4598. <div v-else-if="
  4599. unitJson[unitIndex].easy == 2 ||
  4600. unitJson[unitIndex].easy == 4
  4601. " class="toolChoose" style="padding: 0 0 40px">
  4602. <div class="tools">
  4603. <div class="leftTools" style="width: 100%" v-for="(
  4604. itemTool, toolIndex
  4605. ) in itemTask.toolChoose" :key="toolIndex">
  4606. <div>
  4607. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4608. margin: 0 0 20px 0;
  4609. width: 100% !important;
  4610. " v-model="itemTool.toolDetail"></textarea>
  4611. </div>
  4612. <div style="
  4613. display: flex;
  4614. flex-direction: row;
  4615. align-items: baseline;
  4616. flex-wrap: nowrap;
  4617. justify-content: flex-start;
  4618. position: relative;
  4619. ">
  4620. <div style="margin-right: 20px; font-weight: bold"
  4621. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4622. 工具 {{ toolIndex + 1 }} :
  4623. </div>
  4624. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4625. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4626. </div>
  4627. <div style="min-height: 163px">
  4628. <div class="toolSort">
  4629. <div class="tool">
  4630. <div class="whiteBIcon" @click="
  4631. openTools(itemTaskIndex, 1, toolIndex)
  4632. ">
  4633. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4634. <div style="margin: 5px 0">电子白板</div>
  4635. </div>
  4636. <div class="check" @click="
  4637. addTools(1, itemTaskIndex, toolIndex)
  4638. ">
  4639. <img src="../../../assets/icon/checkNo.png" alt
  4640. v-if="itemTool.tool.indexOf(1) == -1" />
  4641. <div class="checkDiv" v-else>
  4642. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4643. </div>
  4644. </div>
  4645. </div>
  4646. <div class="tool">
  4647. <div class="whiteBIcon" @click="
  4648. openTools(itemTaskIndex, 52, toolIndex)
  4649. ">
  4650. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4651. <div style="margin: 5px 0">文档</div>
  4652. </div>
  4653. <div class="check" @click="
  4654. addTools(52, itemTaskIndex, toolIndex)
  4655. ">
  4656. <img src="../../../assets/icon/checkNo.png" alt
  4657. v-if="itemTool.tool.indexOf(52) == -1" />
  4658. <div class="checkDiv" v-else>
  4659. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4660. </div>
  4661. </div>
  4662. </div>
  4663. <div class="tool">
  4664. <div class="whiteBIcon" @click="
  4665. openTools(itemTaskIndex, 3, toolIndex)
  4666. ">
  4667. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4668. <div style="margin: 5px 0">思维导图</div>
  4669. </div>
  4670. <div class="check" @click="
  4671. addTools(3, itemTaskIndex, toolIndex)
  4672. ">
  4673. <img src="../../../assets/icon/checkNo.png" alt
  4674. v-if="itemTool.tool.indexOf(3) == -1" />
  4675. <div class="checkDiv" v-else>
  4676. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4677. </div>
  4678. </div>
  4679. </div>
  4680. <div class="tool">
  4681. <div class="whiteBIcon" @click="
  4682. openTools(itemTaskIndex, 4, toolIndex)
  4683. ">
  4684. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4685. <div style="margin: 5px 0">问卷调查</div>
  4686. </div>
  4687. <div class="check" @click="
  4688. addTools(4, itemTaskIndex, toolIndex)
  4689. ">
  4690. <img src="../../../assets/icon/checkNo.png" alt
  4691. v-if="itemTool.tool.indexOf(4) == -1" />
  4692. <div class="checkDiv" v-else>
  4693. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4694. </div>
  4695. </div>
  4696. </div>
  4697. <div class="tool">
  4698. <div class="whiteBIcon" @click="
  4699. openTools(itemTaskIndex, 45, toolIndex)
  4700. ">
  4701. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4702. <div style="margin: 5px 0">选择题</div>
  4703. </div>
  4704. <div class="check" @click="
  4705. addTools(45, itemTaskIndex, toolIndex)
  4706. ">
  4707. <img src="../../../assets/icon/checkNo.png" alt
  4708. v-if="itemTool.tool.indexOf(45) == -1" />
  4709. <div class="checkDiv" v-else>
  4710. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4711. </div>
  4712. </div>
  4713. </div>
  4714. <div class="tool">
  4715. <div class="whiteBIcon" @click="
  4716. openTools(itemTaskIndex, 15, toolIndex)
  4717. ">
  4718. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4719. <div style="margin: 5px 0">问答</div>
  4720. </div>
  4721. <div class="check" @click="
  4722. addTools(15, itemTaskIndex, toolIndex)
  4723. ">
  4724. <img src="../../../assets/icon/checkNo.png" alt
  4725. v-if="itemTool.tool.indexOf(15) == -1" />
  4726. <div class="checkDiv" v-else>
  4727. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4728. </div>
  4729. </div>
  4730. </div>
  4731. <div class="tool">
  4732. <div class="whiteBIcon" @click="
  4733. addTools(16, itemTaskIndex, toolIndex)
  4734. ">
  4735. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4736. <div style="margin: 5px 0">作业提交</div>
  4737. </div>
  4738. <div class="check" @click="
  4739. addTools(16, itemTaskIndex, toolIndex)
  4740. ">
  4741. <img src="../../../assets/icon/checkNo.png" alt
  4742. v-if="itemTool.tool.indexOf(16) == -1" />
  4743. <div class="checkDiv" v-else>
  4744. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4745. </div>
  4746. </div>
  4747. </div>
  4748. <div class="tool">
  4749. <div class="whiteBIcon" @click="
  4750. openTools(itemTaskIndex, 50, toolIndex)
  4751. ">
  4752. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4753. <div style="margin: 5px 0">批量上传</div>
  4754. </div>
  4755. <div class="check" @click="
  4756. addTools(50, itemTaskIndex, toolIndex)
  4757. ">
  4758. <img src="../../../assets/icon/checkNo.png" alt
  4759. v-if="itemTool.tool.indexOf(50) == -1" />
  4760. <div class="checkDiv" v-else>
  4761. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4762. </div>
  4763. </div>
  4764. </div>
  4765. <div class="tool">
  4766. <div class="whiteBIcon" @click="
  4767. openTools(itemTaskIndex, 41, toolIndex)
  4768. ">
  4769. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4770. <div style="margin: 5px 0">选择匹配</div>
  4771. </div>
  4772. <div class="check" @click="
  4773. addTools(41, itemTaskIndex, toolIndex)
  4774. ">
  4775. <img src="../../../assets/icon/checkNo.png" alt
  4776. v-if="itemTool.tool.indexOf(41) == -1" />
  4777. <div class="checkDiv" v-else>
  4778. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4779. </div>
  4780. </div>
  4781. </div>
  4782. <div class="tool">
  4783. <div class="whiteBIcon" @click="
  4784. openTools(itemTaskIndex, 47, toolIndex)
  4785. ">
  4786. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4787. <div style="margin: 5px 0">排序</div>
  4788. </div>
  4789. <div class="check" @click="
  4790. addTools(47, itemTaskIndex, toolIndex)
  4791. ">
  4792. <img src="../../../assets/icon/checkNo.png" alt
  4793. v-if="itemTool.tool.indexOf(47) == -1" />
  4794. <div class="checkDiv" v-else>
  4795. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4796. </div>
  4797. </div>
  4798. </div>
  4799. <div class="tool">
  4800. <div class="whiteBIcon" @click="
  4801. openTools(itemTaskIndex, 48, toolIndex)
  4802. ">
  4803. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4804. <div style="margin: 5px 0">表格</div>
  4805. </div>
  4806. <div class="check" @click="
  4807. addTools(48, itemTaskIndex, toolIndex)
  4808. ">
  4809. <img src="../../../assets/icon/checkNo.png" alt
  4810. v-if="itemTool.tool.indexOf(48) == -1" />
  4811. <div class="checkDiv" v-else>
  4812. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4813. </div>
  4814. </div>
  4815. </div>
  4816. </div>
  4817. </div>
  4818. </div>
  4819. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4820. <div class="addToolImg">
  4821. <img src="../../../assets/icon/add.png" alt />
  4822. </div>
  4823. <div>添加工具</div>
  4824. </div> -->
  4825. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4826. style="margin: 35px auto 20px">
  4827. 添加工具
  4828. </button>
  4829. </div>
  4830. </div>
  4831. <div v-else-if="
  4832. unitJson[unitIndex].easy == 1 ||
  4833. (unitJson[unitIndex].easy == 5 &&
  4834. itemTask.taskType == 2)
  4835. " class="toolChoose" style="padding: 0 0 40px">
  4836. <div class="tools">
  4837. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4838. itemTool, toolIndex
  4839. ) in itemTask.toolChoose" :key="toolIndex">
  4840. <div style="min-height: 163px">
  4841. <div class="toolSort">
  4842. <div class="tool">
  4843. <div class="whiteBIcon" @click="
  4844. openTools(itemTaskIndex, 50, toolIndex)
  4845. ">
  4846. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4847. <div style="margin: 5px 0">批量上传</div>
  4848. </div>
  4849. <div class="check" @click="
  4850. addTools(50, itemTaskIndex, toolIndex)
  4851. ">
  4852. <img src="../../../assets/icon/checkNo.png" alt
  4853. v-if="itemTool.tool.indexOf(50) == -1" />
  4854. <div class="checkDiv" v-else>
  4855. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4856. </div>
  4857. </div>
  4858. </div>
  4859. </div>
  4860. </div>
  4861. </div>
  4862. </div>
  4863. </div>
  4864. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4865. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  4866. <div class="elist_title">
  4867. <div style="
  4868. display: flex;
  4869. flex-direction: row;
  4870. align-items: center;
  4871. margin: 20px 0;
  4872. ">
  4873. <div class="lineTitle clineTitle">评价设置</div>
  4874. <div style="margin-left:auto;display: flex;">
  4875. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4876. <div class="r_pub_button_op"
  4877. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4878. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4879. </el-tooltip>
  4880. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4881. <div class="r_pub_button_op" style="margin-left:10px;"
  4882. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4883. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4884. </el-tooltip>
  4885. </div>
  4886. <!-- <div class="line" style="width: 90%"></div> -->
  4887. </div>
  4888. </div>
  4889. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  4890. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  4891. 上传补充资料
  4892. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  4893. beforeUploadInfo2(
  4894. $event,
  4895. 18,
  4896. itemTaskIndex
  4897. )
  4898. " />
  4899. </button>
  4900. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  4901. <div class="add_chapters_box add_c_none" v-if="
  4902. pingjiaInfoData[itemTaskIndex] &&
  4903. pingjiaInfoData[itemTaskIndex].length == 0
  4904. ">
  4905. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  4906. </div>
  4907. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  4908. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  4909. getChapterData(
  4910. $event,
  4911. index1,
  4912. item1.type
  4913. )
  4914. " >
  4915. <div class="chapter_upload_o" style="
  4916. position: relative;
  4917. display: flex;
  4918. align-items: center;
  4919. ">
  4920. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  4921. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  4922. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  4923. </div>
  4924. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  4925. </div>
  4926. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  4927. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  4928. </div>
  4929. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  4930. </div>
  4931. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  4932. </div>
  4933. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  4934. </div>
  4935. </div>
  4936. <div class="chapter_upload_n">
  4937. <input readonly="true" v-if="
  4938. item1.type == 2 ||
  4939. item1.type == 3 ||
  4940. item1.type == 12 ||
  4941. item1.type == 13 ||
  4942. item1.type == 7
  4943. " :placeholder="item1.name" @click.stop="
  4944. checkChpater3($event, index1, item1)
  4945. " style="
  4946. border: none;
  4947. outline: none;
  4948. width: 80%;
  4949. minwidth: 215px;
  4950. z-index: 99;
  4951. font-size: 14px;
  4952. white-space: nowrap;
  4953. overflow: hidden;
  4954. text-overflow: ellipsis;
  4955. " />
  4956. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  4957. border: none;
  4958. outline: none;
  4959. width: 80%;
  4960. white-space: nowrap;
  4961. overflow: hidden;
  4962. text-overflow: ellipsis;
  4963. " readonly="true" @click="
  4964. selectAttText(index1)
  4965. " />
  4966. <input :placeholder="item1.title ? item1.title : '链接'
  4967. " v-if="item1.type == 8" style="
  4968. border: none;
  4969. outline: none;
  4970. width: 80%;
  4971. white-space: nowrap;
  4972. overflow: hidden;
  4973. text-overflow: ellipsis;
  4974. " readonly="true" @click="selectLine(index1)" />
  4975. <input :placeholder="item1.title ? item1.title : '链接'
  4976. " v-if="item1.type == 14" style="
  4977. border: none;
  4978. outline: none;
  4979. width: 80%;
  4980. white-space: nowrap;
  4981. overflow: hidden;
  4982. text-overflow: ellipsis;
  4983. " readonly="true" @click="
  4984. openUpdateSource(index1)
  4985. " />
  4986. </div>
  4987. <div class="chapter_upload_ic">
  4988. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  4989. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  4990. checkChpater3($event, index1, item1)
  4991. ">
  4992. <div></div>
  4993. </div>
  4994. <div class="chapter_upload_ic_r" @click.stop="
  4995. deletepingjiaInfoData(
  4996. $event,
  4997. index1,
  4998. itemTaskIndex
  4999. )
  5000. ">
  5001. <div></div>
  5002. </div>
  5003. </div>
  5004. </div>
  5005. </div>
  5006. </div>
  5007. </div>
  5008. <div v-if="
  5009. pingjiainfoproVisible[itemTaskIndex]
  5010. " class="mask">
  5011. <div class="progressBox">
  5012. <div class="lbox">
  5013. <img src="../../../assets/loading.gif" />上传中,请稍后
  5014. </div>
  5015. <div style="margin-bottom: 10px">
  5016. <span>{{
  5017. pingjiainfoisFinishSize[itemTaskIndex]
  5018. }}</span>
  5019. /
  5020. <span>{{
  5021. pingjiainfoisAllSize[itemTaskIndex]
  5022. }}</span>
  5023. </div>
  5024. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5025. ? pingjiainfoprogress[itemTaskIndex]
  5026. : 0
  5027. " style="width: 80%"></el-progress> -->
  5028. </div>
  5029. </div>
  5030. </div>
  5031. <div class="mbCss">
  5032. <div class="pjCss" :style="{
  5033. width: itemTask.isEvaFold
  5034. ? 'calc(100% - 55%)'
  5035. : 'calc(100% - 120px)',
  5036. }">
  5037. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5038. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5039. <div class="elist_inptu_text">
  5040. <!-- <span>目标:</span> -->
  5041. <span>核心素养:</span>
  5042. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写核心素养" style="width: calc(100% - 280px);"/>
  5043. <el-switch
  5044. class="rateSwitch"
  5045. style="margin-left: auto;"
  5046. v-model="itemTask.eList[eIndex].isai"
  5047. active-color="#0061FF"
  5048. active-text="人工评分"
  5049. inactive-text="AI评分"
  5050. active-value="2"
  5051. inactive-value="1">
  5052. </el-switch>
  5053. </div>
  5054. <div class="elist_inptu_text">
  5055. <!-- <span>评价维度:</span> -->
  5056. <span>目标:</span>
  5057. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5058. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写目标" />
  5059. <!-- </el-tooltip> -->
  5060. <!-- <span>评星等级:</span>
  5061. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5062. disabled></el-rate> -->
  5063. <div class="remove" @click="
  5064. deletEList(
  5065. unitIndex,
  5066. itemTaskIndex,
  5067. eIndex
  5068. )
  5069. "></div>
  5070. </div>
  5071. <div class="elist_inptu_text">
  5072. <!-- <span>维度描述:</span> -->
  5073. <span>评价标准:</span>
  5074. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5075. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5076. <!-- </el-tooltip> -->
  5077. </div>
  5078. <div class="elist_inptu_text" v-if="evalua">
  5079. <span>目标:</span>
  5080. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5081. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5082. @change="forceUpdate()">
  5083. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5084. :value="e.name">
  5085. </el-option>
  5086. </el-select> -->
  5087. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5088. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5089. </div>
  5090. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5091. <span>细则:</span>
  5092. <div style="width: calc(100%);">
  5093. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5094. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5095. <div class="ruleBtn"
  5096. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5097. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5098. </el-tooltip>
  5099. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5100. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5101. <div class="op_box">
  5102. <div class="op_remark"></div>
  5103. <div style="display: flex;">
  5104. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5105. <div class="r_pub_button_op"
  5106. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5107. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5108. </el-tooltip>
  5109. </div>
  5110. </div>
  5111. </div>
  5112. </div>
  5113. </div>
  5114. </div>
  5115. </div>
  5116. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5117. style="margin: 35px 35px 0 0">
  5118. <div class="addToolImg">
  5119. <img src="../../../assets/icon/add.png" alt />
  5120. </div>
  5121. <div>添加</div>
  5122. </div> -->
  5123. <div class="eva_btn_box">
  5124. <div class="eva_btn_left_box">
  5125. <button class="c_pub_button_add pub_btn_eval_img"
  5126. @click="addEList(unitIndex, itemTaskIndex)">
  5127. 添加
  5128. </button>
  5129. <button class="c_pub_button_add pub_btn_eval_source_img"
  5130. @click="openEList(unitIndex, itemTaskIndex)">
  5131. 资源
  5132. </button>
  5133. </div>
  5134. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5135. v-if="itemTask.eList && itemTask.eList.length">
  5136. 添加资源模板
  5137. </button>
  5138. </div>
  5139. </div>
  5140. <div v-if="evalua" style="
  5141. border: 1px solid #e5e5e5;
  5142. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5143. " :style="{
  5144. width: itemTask.isEvaFold ? '55%' : '116px',
  5145. }" class="evaCss">
  5146. <!-- <div class="e_add_top">
  5147. <div class="e_add_title">
  5148. <span>当前使用目标管理</span>
  5149. <span>{{ eTitle }}</span>
  5150. <img src="../../../assets/line.png" class="cru_line" style="
  5151. width: 125px;
  5152. height: 20px;
  5153. bottom: -10px;
  5154. left: 155px;
  5155. " />
  5156. </div>
  5157. </div> -->
  5158. <div class="e_add_content" style="width: 100%">
  5159. <div class="e_add_list_pbox" style="width: 100%">
  5160. <div class="e_add_list_pbox_title">
  5161. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5162. <div class="type_content" v-if="itemTask.isEvaFold">
  5163. <span :class="{ active: typeMode == 1 }"
  5164. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5165. <span :class="{ active: typeMode == 2 }"
  5166. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5167. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5168. </div>
  5169. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5170. @click="foldEva(itemTaskIndex)">
  5171. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5172. </div>
  5173. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5174. @click="foldEva(itemTaskIndex)">
  5175. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5176. </div>
  5177. </div>
  5178. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5179. style="min-height: 200px">
  5180. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5181. " v-if="typeMode == 1"></Mind>
  5182. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5183. </Sunburst>
  5184. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5185. v-if="typeMode == 3"></SeeBoard>
  5186. </div>
  5187. </div>
  5188. </div>
  5189. </div>
  5190. </div>
  5191. </div>
  5192. <div class="funBlock" style="padding: 0">
  5193. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5194. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5195. <div>
  5196. {{
  5197. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5198. }}
  5199. </div>
  5200. </div>
  5201. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5202. <div>展开</div>
  5203. <div class="arrow">
  5204. <img src="../../../assets/icon/expand.png" alt />
  5205. </div>
  5206. </div> -->
  5207. </div>
  5208. </div>
  5209. </div>
  5210. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5211. <!-- <div>
  5212. <img src="../../../../assets/icon/new/addStage.png" alt />
  5213. <span>添加任务</span>
  5214. </div> -->
  5215. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5216. 添加任务
  5217. </button>
  5218. </div>
  5219. </div>
  5220. <div class="info_btnBox3">
  5221. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5222. goTo(
  5223. '/course?userid=' +
  5224. userid +
  5225. '&oid=' +
  5226. oid +
  5227. '&org=' +
  5228. org +
  5229. '&role=' +
  5230. role
  5231. )
  5232. ">
  5233. 返回课程
  5234. </button>
  5235. <button class="c_pub_button_return pub_btn_last_img"
  5236. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5237. {{ steps == 4 ? "返回课程" : "上一步" }}
  5238. </button>
  5239. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5240. pub_btn_next_img: steps != 3,
  5241. pub_btn_finish_img: steps == 3,
  5242. }">
  5243. {{ steps == 3 ? "确认上传" : "下一步" }}
  5244. </button>
  5245. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5246. '修改模板' : '保存模板'}}</button>
  5247. </div>
  5248. </div>
  5249. </div>
  5250. </div>
  5251. </div>
  5252. <div style="
  5253. width: calc(100% - 20px);
  5254. background: rgb(255, 255, 255);
  5255. border-radius: 10px;
  5256. " v-if="steps == 4">
  5257. <div class="basic_box_success">
  5258. <div class="right_img">
  5259. <img src="../../../assets/icon/right.png" alt />
  5260. </div>
  5261. <div style="font-weight: bold">成功</div>
  5262. <!-- <div>您的课程编号</div>
  5263. <div class="number">{{ number }}</div>-->
  5264. <!-- <div class="success_button">
  5265. <div class="look_course" @click="isNoFinsh">
  5266. 邀请老师协同编辑
  5267. </div>
  5268. <div class="attend_others" @click="goCourse">预览课程</div>
  5269. </div> -->
  5270. </div>
  5271. </div>
  5272. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5273. @mouseleave="btnDisplay(false)" v-if="false">
  5274. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5275. goTo(
  5276. '/course?userid=' +
  5277. userid +
  5278. '&oid=' +
  5279. oid +
  5280. '&org=' +
  5281. org +
  5282. '&role=' +
  5283. role
  5284. )
  5285. ">
  5286. 返回课程
  5287. </button>
  5288. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5289. @click="lastSteps">
  5290. {{ steps == 4 ? "返回课程" : "上一步" }}
  5291. </button>
  5292. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5293. pub_btn_next_img: steps != 3,
  5294. pub_btn_finish_img: steps == 3,
  5295. }">
  5296. {{ steps == 3 ? "确认上传" : "下一步" }}
  5297. </button>
  5298. </div>
  5299. </div>
  5300. </div>
  5301. <div class="leftBar" v-if="istemplate == 1">
  5302. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5303. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5304. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5305. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5306. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5307. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5308. <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'"/>
  5309. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5310. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5311. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5312. <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'"/>
  5313. <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'"/>
  5314. <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'"/>
  5315. <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'"/>
  5316. <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'"/>
  5317. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5318. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5319. @setAiJson="setAiJson" /> -->
  5320. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5321. @setAiJson="setAiJson" />
  5322. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5323. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5324. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5325. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5326. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5327. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5328. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5329. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5330. </div>
  5331. </div>
  5332. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5333. class="dialog_diy2 customWidth">
  5334. <div>请复制该链接邀请协同编辑</div>
  5335. <div>http://www.boomyon.com/index-zhang.com</div>
  5336. <span slot="footer" class="dialog-footer">
  5337. <el-button type="primary">复制链接分享</el-button>
  5338. <el-button @click="dialogVisible = false">取消</el-button>
  5339. </span>
  5340. </el-dialog>
  5341. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5342. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5343. <el-form>
  5344. <el-form-item label="文档标题">
  5345. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5346. </el-form-item>
  5347. <div>文档简介</div>
  5348. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5349. </el-form>
  5350. <span slot="footer" class="dialog-footer">
  5351. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5352. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5353. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5354. </span>
  5355. </el-dialog>
  5356. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5357. :before-close="handleClose" class="dialog_diy">
  5358. <el-form>
  5359. <el-form-item label="文档标题">
  5360. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5361. </el-form-item>
  5362. <div>文档内容</div>
  5363. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5364. </el-form>
  5365. <span slot="footer" class="dialog-footer">
  5366. <el-button @click="clearChoose">取 消</el-button>
  5367. <el-button type="primary" @click="wordNext()">确定</el-button>
  5368. </span>
  5369. </el-dialog>
  5370. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5371. :before-close="handleClose" class="dialog_diy">
  5372. <el-form>
  5373. <el-form-item label="文本标题">
  5374. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5375. placeholder="请输入文本标题..."></el-input>
  5376. </el-form-item>
  5377. <!-- <div>富文本内容</div> -->
  5378. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5379. </el-form>
  5380. <span slot="footer" class="dialog-footer">
  5381. <el-button @click="clearAttText">取 消</el-button>
  5382. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5383. </span>
  5384. </el-dialog>
  5385. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5386. :before-close="handleClose" class="dialog_diy lineCss">
  5387. <el-form>
  5388. <el-form-item label="标题" :label-width="formLabelWidth">
  5389. <span>
  5390. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5391. </span>
  5392. </el-form-item>
  5393. <el-form-item label="链接" :label-width="formLabelWidth">
  5394. <span>
  5395. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5396. </span>
  5397. </el-form-item>
  5398. </el-form>
  5399. <span slot="footer" class="dialog-footer">
  5400. <el-button @click="clearLine">取 消</el-button>
  5401. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5402. </span>
  5403. </el-dialog>
  5404. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5405. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5406. <div>
  5407. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5408. </div>
  5409. <span slot="footer" class="dialog-footer">
  5410. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5411. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5412. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5413. </span>
  5414. </el-dialog>
  5415. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5416. :before-close="handleClose" class="addNewPP customWidth">
  5417. <div class="people">
  5418. <div class="people_top">
  5419. <div class="people_nav">选择成员</div>
  5420. <div class="people_top_right">
  5421. <div class="people_search">
  5422. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5423. <div class="search_img" @click="searchStudent">
  5424. <img src="../../../assets/icon/search.png" alt />
  5425. </div>
  5426. </div>
  5427. </div>
  5428. </div>
  5429. <el-checkbox-group v-model="checkboxList" class="people_name">
  5430. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5431. "暂无学生可选" }}</el-checkbox>
  5432. </el-checkbox-group>
  5433. </div>
  5434. <span slot="footer" class="dialog-footer">
  5435. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5436. <el-button type="primary" @click="isAddPP">确定</el-button>
  5437. </span>
  5438. </el-dialog>
  5439. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5440. :before-close="handleClose" class="addNewPP2">
  5441. <div class="check_classBox">
  5442. <div class="check_class_right">
  5443. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5444. 全部
  5445. </div>
  5446. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5447. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5448. {{ item.name }}
  5449. </div>
  5450. </el-tooltip>
  5451. </div>
  5452. <div class="check_class_left">
  5453. <div class="check_class_all_box">
  5454. <div class="check_class_left_title">选择班级</div>
  5455. <div style="display: flex; align-items: center; margin-left: auto">
  5456. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5457. </div>
  5458. </div>
  5459. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5460. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5461. </div> -->
  5462. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5463. v-if="grade2.length">
  5464. <div v-for="item in grade2" :key="item.id" class="class_item">
  5465. <el-checkbox :label="item.id">
  5466. {{ item.name }}
  5467. </el-checkbox>
  5468. </div>
  5469. </el-checkbox-group>
  5470. <div v-if="!grade2.length">暂无数据</div>
  5471. </div>
  5472. </div>
  5473. <span slot="footer" class="dialog-footer">
  5474. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5475. <el-button type="primary" @click="isAddClass">确定</el-button>
  5476. </span>
  5477. </el-dialog>
  5478. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5479. :before-close="handleClose" class="addNewPP customWidth">
  5480. <div style="display: flex;justify-content: space-between;">
  5481. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5482. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5483. 全部
  5484. </div>
  5485. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5486. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5487. <el-tooltip placement="top" :content="i.name">
  5488. <span>{{i.name}}</span>
  5489. </el-tooltip>
  5490. </div>
  5491. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5492. 其他
  5493. </div>
  5494. </div>
  5495. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5496. <div class="people">
  5497. <div class="people_top">
  5498. <div class="people_top_right">
  5499. <div class="people_search">
  5500. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5501. <div class="search_img" @click="getTeacher(collid)">
  5502. <img src="../../../assets/icon/search.png" alt />
  5503. </div>
  5504. </div>
  5505. </div>
  5506. <div class="people_nav" style="display: flex; align-items: center">
  5507. <div class="check_class_left_title">选择成员</div>
  5508. <div style="display: flex; align-items: center; margin-left: auto">
  5509. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5510. </div>
  5511. </div>
  5512. </div>
  5513. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5514. @change="InviteChange2">
  5515. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5516. <div class="t_j_box">
  5517. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5518. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5519. </el-tooltip>
  5520. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5521. <span>{{ item.username.split('@')[0] }}</span>
  5522. </el-tooltip>
  5523. <el-tooltip placement="top" :content="item.school">
  5524. <span>{{ item.school }}</span>
  5525. </el-tooltip>
  5526. </div>
  5527. </el-checkbox>
  5528. </el-checkbox-group>
  5529. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5530. </div>
  5531. </div>
  5532. </div>
  5533. <span slot="footer" class="dialog-footer">
  5534. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5535. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5536. </span>
  5537. </el-dialog>
  5538. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5539. closePan(4);
  5540. }
  5541. " class="dialog_diy fullStyle">
  5542. <div style="height: 100%">
  5543. <div class="a_add_title" style="
  5544. display: flex;
  5545. flex-direction: row;
  5546. align-items: center;
  5547. justify-content: center;
  5548. ">
  5549. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5550. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5551. </div>
  5552. <div class="a_addBox" style="height: calc(100% - 50px)">
  5553. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5554. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5555. <div class="a_add_checkType">
  5556. <span :class="{
  5557. active:
  5558. askJson.askJson[index1].type == '1' ||
  5559. !askJson.askJson[index1].type,
  5560. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5561. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5562. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5563. </div>
  5564. <div class="a_add_head">
  5565. <div style="
  5566. display: flex;
  5567. align-items: center;
  5568. width: 100%;
  5569. margin-right: 20px;
  5570. ">
  5571. <span style="min-width: fit-content">{{
  5572. index1 + 1 + "、"
  5573. }}</span>
  5574. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5575. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5576. $forceUpdate();
  5577. }
  5578. "></textarea>
  5579. </div>
  5580. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5581. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5582. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5583. </div>
  5584. <div class="a_add_head_div">
  5585. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5586. </el-button>
  5587. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5588. </div>
  5589. </div>
  5590. <div class="a_add_body">
  5591. <div class="a_add_input" style="flex-direction: column">
  5592. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5593. margin: 20px 10px 0 0;
  5594. display: flex;
  5595. align-items: center;
  5596. position: relative;
  5597. ">
  5598. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5599. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5600. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5601. @change="() => {
  5602. $forceUpdate();
  5603. }
  5604. "></textarea>
  5605. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5606. v-if="askJson.askJson[index1].askItem != 1">
  5607. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5608. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5609. </div>
  5610. <div class="a_add_body_div">
  5611. <el-button type="primary" size="small"
  5612. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5613. <el-button type="primary" size="small" @click="
  5614. deletecheckList(askJson.askJson[index1], checkIndex)
  5615. " v-if="askJson.askJson[index1].askItem != 1">删除
  5616. </el-button>
  5617. </div>
  5618. </div>
  5619. </div>
  5620. <!-- <div class="a_add_body_div">
  5621. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5622. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5623. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5624. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5625. </el-button>
  5626. </div> -->
  5627. </div>
  5628. </div>
  5629. </div>
  5630. </div>
  5631. <span slot="footer" class="dialog-footer">
  5632. <el-button @click="closePan(4)">取 消</el-button>
  5633. <el-button type="primary" @click="addAsk">确 定</el-button>
  5634. </span>
  5635. </el-dialog>
  5636. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5637. closePan(45);
  5638. }
  5639. " class="dialog_diy fullStyle">
  5640. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5641. <!-- <div class="a_add_title" style="
  5642. display: flex;
  5643. flex-direction: row;
  5644. align-items: center;
  5645. justify-content: center;
  5646. ">
  5647. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5648. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5649. </div> -->
  5650. <div class="a_addBox" style="height: 100%">
  5651. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5652. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5653. 上传补充资料
  5654. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5655. beforeUploadInfo2(
  5656. $event,
  5657. 17
  5658. )
  5659. " />
  5660. </button>
  5661. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5662. <div class="add_chapters_box add_c_none" v-if="
  5663. xuanzeInfoData &&
  5664. xuanzeInfoData.length == 0
  5665. ">
  5666. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5667. </div>
  5668. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5669. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5670. getChapterData(
  5671. $event,
  5672. index1,
  5673. item1.type
  5674. )
  5675. " >
  5676. <div class="chapter_upload_o" style="
  5677. position: relative;
  5678. display: flex;
  5679. align-items: center;
  5680. ">
  5681. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5682. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5683. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5684. </div>
  5685. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5686. </div>
  5687. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5688. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5689. </div>
  5690. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5691. </div>
  5692. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5693. </div>
  5694. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5695. </div>
  5696. </div>
  5697. <div class="chapter_upload_n">
  5698. <input readonly="true" v-if="
  5699. item1.type == 2 ||
  5700. item1.type == 3 ||
  5701. item1.type == 12 ||
  5702. item1.type == 13 ||
  5703. item1.type == 7
  5704. " :placeholder="item1.name" @click.stop="
  5705. checkChpater3($event, index1, item1)
  5706. " style="
  5707. border: none;
  5708. outline: none;
  5709. width: 80%;
  5710. minwidth: 215px;
  5711. z-index: 99;
  5712. font-size: 14px;
  5713. white-space: nowrap;
  5714. overflow: hidden;
  5715. text-overflow: ellipsis;
  5716. " />
  5717. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5718. border: none;
  5719. outline: none;
  5720. width: 80%;
  5721. white-space: nowrap;
  5722. overflow: hidden;
  5723. text-overflow: ellipsis;
  5724. " readonly="true" @click="
  5725. selectAttText(index1)
  5726. " />
  5727. <input :placeholder="item1.title ? item1.title : '链接'
  5728. " v-if="item1.type == 8" style="
  5729. border: none;
  5730. outline: none;
  5731. width: 80%;
  5732. white-space: nowrap;
  5733. overflow: hidden;
  5734. text-overflow: ellipsis;
  5735. " readonly="true" @click="selectLine(index1)" />
  5736. <input :placeholder="item1.title ? item1.title : '链接'
  5737. " v-if="item1.type == 14" style="
  5738. border: none;
  5739. outline: none;
  5740. width: 80%;
  5741. white-space: nowrap;
  5742. overflow: hidden;
  5743. text-overflow: ellipsis;
  5744. " readonly="true" @click="
  5745. openUpdateSource(index1)
  5746. " />
  5747. </div>
  5748. <div class="chapter_upload_ic">
  5749. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5750. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5751. checkChpater3($event, index1, item1)
  5752. ">
  5753. <div></div>
  5754. </div>
  5755. <div class="chapter_upload_ic_r" @click.stop="
  5756. deletexuanzeInfoData(
  5757. $event,
  5758. index1
  5759. )
  5760. ">
  5761. <div></div>
  5762. </div>
  5763. </div>
  5764. </div>
  5765. </div>
  5766. </div>
  5767. </div>
  5768. <div v-if="
  5769. xuanzeinfoproVisible
  5770. " class="mask">
  5771. <div class="progressBox">
  5772. <div class="lbox">
  5773. <img src="../../../assets/loading.gif" />上传中,请稍后
  5774. </div>
  5775. <div style="margin-bottom: 10px">
  5776. <span>{{
  5777. xuanzeinfoisFinishSize
  5778. }}</span>
  5779. /
  5780. <span>{{
  5781. xuanzeinfoisAllSize
  5782. }}</span>
  5783. </div>
  5784. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  5785. ? xuanzeinfoprogress
  5786. : 0
  5787. " style="width: 80%"></el-progress> -->
  5788. </div>
  5789. </div>
  5790. </div>
  5791. <div style="
  5792. font-size: 16px;
  5793. color: #c7c7c7;
  5794. display: flex;
  5795. align-items: center;
  5796. justify-content: flex-end;
  5797. ">
  5798. <!-- 请输入题目内容 -->
  5799. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5800. 智能生成
  5801. </button>
  5802. <!-- 请输入题目内容 -->
  5803. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5804. v-if="isPasteChoice">
  5805. 智能粘贴
  5806. </button>
  5807. </div>
  5808. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5809. <div class="a_add_checkType">
  5810. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5811. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5812. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5813. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5814. </div>
  5815. <div class="a_add_head">
  5816. <div class="timuUpImg">
  5817. <div style="display: flex; align-items: center">
  5818. <span style="min-width: fit-content">{{
  5819. index1 + 1 + "、"
  5820. }}</span>
  5821. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5822. placeholder="请输入题目">
  5823. </el-input> -->
  5824. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5825. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5826. $forceUpdate();
  5827. }
  5828. "></textarea>
  5829. </div>
  5830. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5831. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5832. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5833. </div>
  5834. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5835. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5836. <input type="file" accept="image/*" style="display: none"
  5837. @change="beforeUploadTiMu($event, index1)" />
  5838. </div>
  5839. </div>
  5840. <div class="a_add_head_div">
  5841. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5842. </el-button>
  5843. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5844. </div>
  5845. </div>
  5846. <div class="timuImgBox" v-if="
  5847. testJson.testJson[index1].timuList &&
  5848. testJson.testJson[index1].timuList.length
  5849. ">
  5850. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5851. @click.stop="previewImg(timg.src)">
  5852. <img :src="timg.src" alt="" />
  5853. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5854. <img src="../../../assets/icon/delete.png" alt="" />
  5855. </div>
  5856. </div>
  5857. </div>
  5858. <div class="a_add_body">
  5859. <div class="a_add_input a_add_input_choice">
  5860. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5861. @change="() => {
  5862. $forceUpdate();
  5863. }
  5864. ">
  5865. <div class="radioBox">
  5866. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5867. .testItem" :key="checkIndex" :label="checkIndex">
  5868. <div style="margin-right: 10px">
  5869. 选项{{ checkIndex + 1 }}
  5870. </div>
  5871. <div style="margin-right: 10px; width: 300px" v-if="
  5872. testJson.testJson[index1].checkList[checkIndex] &&
  5873. testJson.testJson[index1].checkList[checkIndex]
  5874. .imgType &&
  5875. testJson.testJson[index1].checkList[checkIndex]
  5876. .imgType == 1
  5877. ">
  5878. <div class="inImg" @click.stop="
  5879. previewImg(
  5880. testJson.testJson[index1].checkList[checkIndex]
  5881. .src
  5882. )
  5883. ">
  5884. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5885. .src
  5886. " lazy />
  5887. <!-- <img :src="
  5888. testJson.testJson[index1].checkList[checkIndex]
  5889. .src
  5890. " alt="" /> -->
  5891. </div>
  5892. </div>
  5893. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5894. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5895. $forceUpdate();
  5896. }
  5897. "></textarea>
  5898. <div class="xzUpImg" @click.stop="addImg($event)">
  5899. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5900. <input type="file" accept="image/*" style="display: none"
  5901. @change="beforeUploadTi($event, index1, checkIndex)" />
  5902. </div>
  5903. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5904. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5905. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5906. </div>
  5907. <div class="a_add_body_div">
  5908. <el-button type="primary" size="small" @click.stop="
  5909. addTcheckList(testJson.testJson[index1], checkIndex)
  5910. ">添加</el-button>
  5911. <el-button type="primary" size="small" @click.stop="
  5912. deleteTcheckList(
  5913. testJson.testJson[index1],
  5914. checkIndex
  5915. )
  5916. " v-if="testJson.testJson[index1].testItem != 1">删除
  5917. </el-button>
  5918. </div>
  5919. </el-radio>
  5920. </div>
  5921. </el-radio-group>
  5922. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5923. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5924. $forceUpdate();
  5925. }
  5926. ">
  5927. <div class="radioBox">
  5928. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5929. .testItem" :key="checkIndex1" :label="checkIndex1">
  5930. <div style="margin-right: 10px">
  5931. 选项{{ checkIndex1 + 1 }}
  5932. </div>
  5933. <div style="margin-right: 10px; width: 300px" v-if="
  5934. testJson.testJson[index1].checkList[checkIndex1] &&
  5935. testJson.testJson[index1].checkList[checkIndex1]
  5936. .imgType &&
  5937. testJson.testJson[index1].checkList[checkIndex1]
  5938. .imgType == 1
  5939. ">
  5940. <div class="inImg" @click.stop="
  5941. previewImg(
  5942. testJson.testJson[index1].checkList[checkIndex1]
  5943. .src
  5944. )
  5945. ">
  5946. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5947. .src
  5948. " lazy />
  5949. <!-- <img :src="
  5950. testJson.testJson[index1].checkList[checkIndex1]
  5951. .src
  5952. " alt="" /> -->
  5953. </div>
  5954. </div>
  5955. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5956. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5957. $forceUpdate();
  5958. }
  5959. "></textarea>
  5960. <div class="xzUpImg" @click.stop="addImg($event)">
  5961. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5962. <input type="file" accept="image/*" style="display: none"
  5963. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5964. </div>
  5965. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5966. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5967. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5968. </div>
  5969. <div class="a_add_body_div">
  5970. <el-button type="primary" size="small" @click.stop="
  5971. addTcheckList(
  5972. testJson.testJson[index1],
  5973. checkIndex1
  5974. )
  5975. ">添加</el-button>
  5976. <el-button type="primary" size="small" @click.stop="
  5977. deleteTcheckList(
  5978. testJson.testJson[index1],
  5979. checkIndex1
  5980. )
  5981. " v-if="testJson.testJson[index1].testItem != 1">删除
  5982. </el-button>
  5983. </div>
  5984. </el-checkbox>
  5985. </div>
  5986. </el-checkbox-group>
  5987. </div>
  5988. <!-- <div class="a_add_body_div">
  5989. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  5990. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  5991. v-if="testJson.testJson[index1].testItem != 1">删除
  5992. </el-button>
  5993. </div> -->
  5994. </div>
  5995. </div>
  5996. </div>
  5997. </div>
  5998. <span slot="footer" class="dialog-footer">
  5999. <el-button @click="closePan(45)">取 消</el-button>
  6000. <el-button type="primary" @click="addTest">确 定</el-button>
  6001. </span>
  6002. </el-dialog>
  6003. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6004. :before-close="handleClose" class="dialog_diy addToolsDia">
  6005. <div class="toolChoose">
  6006. <div class="tools">
  6007. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6008. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6009. <div style="
  6010. display: flex;
  6011. flex-direction: row;
  6012. align-items: baseline;
  6013. flex-wrap: nowrap;
  6014. justify-content: flex-start;
  6015. position: relative;
  6016. ">
  6017. <div class="chooseWho">
  6018. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6019. 互动类
  6020. </div>
  6021. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6022. 思维类
  6023. </div>
  6024. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6025. 评价类
  6026. </div>
  6027. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6028. 其他
  6029. </div>
  6030. </div>
  6031. </div>
  6032. <div style="min-height: 163px">
  6033. <div class="toolSort" v-if="chapToolsType == 0">
  6034. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6035. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6036. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6037. <div style="margin: 5px 0">素材库</div>
  6038. </div>
  6039. <div class="noCTool">
  6040. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6041. </div>
  6042. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6043. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6044. </div>
  6045. <!-- <div class="check" @click="chapAddTools(8)">
  6046. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6047. <div class="checkDiv" v-else>
  6048. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6049. </div>
  6050. </div> -->
  6051. </div>
  6052. </div>
  6053. <div class="toolSort" v-if="chapToolsType == 1">
  6054. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6055. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6056. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6057. <div style="margin: 5px 0">思维网格</div>
  6058. </div>
  6059. <div class="noCTool">
  6060. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6061. </div>
  6062. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6063. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6064. </div>
  6065. <!-- <div class="check" @click="chapAddTools(7)">
  6066. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6067. <div class="checkDiv" v-else>
  6068. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6069. </div>
  6070. </div> -->
  6071. </div>
  6072. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6073. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6074. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6075. <div style="margin: 5px 0">电子白板</div>
  6076. </div>
  6077. <div class="noCTool">
  6078. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6079. </div>
  6080. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6081. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6082. </div>
  6083. <!-- <div class="check" @click="chapAddTools(1)">
  6084. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6085. <div class="checkDiv" v-else>
  6086. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6087. </div>
  6088. </div> -->
  6089. </div>
  6090. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6091. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6092. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6093. <div style="margin: 5px 0">便签</div>
  6094. </div>
  6095. <div class="noCTool">
  6096. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6097. </div>
  6098. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6099. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6100. </div>
  6101. <!-- <div class="check" @click="chapAddTools(2)">
  6102. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6103. <div class="checkDiv" v-else>
  6104. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6105. </div>
  6106. </div> -->
  6107. </div>
  6108. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6109. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6110. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6111. <div style="margin: 5px 0">协同文档</div>
  6112. </div>
  6113. <div class="noCTool">
  6114. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6115. </div>
  6116. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6117. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6118. </div>
  6119. <!-- <div class="check" @click="chapAddTools(6)">
  6120. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6121. <div class="checkDiv" v-else>
  6122. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6123. </div>
  6124. </div> -->
  6125. </div>
  6126. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6127. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6128. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6129. <div style="margin: 5px 0">思维导图</div>
  6130. </div>
  6131. <div class="noCTool">
  6132. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6133. </div>
  6134. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6135. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6136. </div>
  6137. <!-- <div class="check" @click="chapAddTools(3)">
  6138. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6139. <div class="checkDiv" v-else>
  6140. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6141. </div>
  6142. </div> -->
  6143. </div>
  6144. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6145. @click="chapAddTools(31)">
  6146. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6147. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6148. <div style="margin: 5px 0">数学画板</div>
  6149. </div>
  6150. <div class="noCTool">
  6151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6152. </div>
  6153. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6154. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6155. </div>
  6156. <!-- <div class="check" @click="chapAddTools(31)">
  6157. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6158. <div class="checkDiv" v-else>
  6159. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6160. </div>
  6161. </div> -->
  6162. </div>
  6163. </div>
  6164. <div class="toolSort" v-if="chapToolsType == 2">
  6165. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6166. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6167. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6168. <div style="margin: 5px 0">量规评分</div>
  6169. </div>
  6170. <div class="noCTool">
  6171. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6172. </div>
  6173. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6174. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6175. </div>
  6176. <!-- <div class="check" @click="chapAddTools(5)">
  6177. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6178. <div class="checkDiv" v-else>
  6179. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6180. </div>
  6181. </div> -->
  6182. </div>
  6183. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6184. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6185. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6186. <div style="margin: 5px 0">问卷调查</div>
  6187. </div>
  6188. <div class="noCTool">
  6189. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6190. </div>
  6191. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6192. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6193. </div>
  6194. <!-- <div class="check" @click="chapAddTools(4)">
  6195. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6196. <div class="checkDiv" v-else>
  6197. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6198. </div>
  6199. </div> -->
  6200. </div>
  6201. </div>
  6202. </div>
  6203. <div>
  6204. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6205. v-model="itemTools.toolDetail" />
  6206. </div>
  6207. </div>
  6208. </div>
  6209. </div>
  6210. <span slot="footer" class="dialog-footer">
  6211. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6212. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6213. </span>
  6214. </el-dialog>
  6215. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6216. closePan(15);
  6217. }
  6218. " class="dialog_diy">
  6219. <div>
  6220. <div class="a_add_title" style="
  6221. display: flex;
  6222. flex-direction: column;
  6223. align-items: flex-start;
  6224. justify-content: center;
  6225. ">
  6226. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6227. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6228. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6229. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6230. </div>
  6231. </div>
  6232. <span slot="footer" class="dialog-footer">
  6233. <el-button @click="closePan(15)">取 消</el-button>
  6234. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6235. </span>
  6236. </el-dialog>
  6237. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6238. :before-close="handleClose" class="dialog_diy">
  6239. <div>
  6240. <div class="a_add_title" style="
  6241. display: flex;
  6242. flex-direction: column;
  6243. align-items: flex-start;
  6244. justify-content: center;
  6245. ">
  6246. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6247. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6248. </div>
  6249. </div>
  6250. <span slot="footer" class="dialog-footer">
  6251. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6252. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6253. </span>
  6254. </el-dialog>
  6255. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6256. :before-close="handleClose" class="dialog_diy">
  6257. <div>
  6258. <div class="fileCss" style="padding-top: 20px">
  6259. <div>
  6260. <button class="info_btn" @click="addImg($event)">
  6261. 选择本地文件
  6262. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6263. </button>
  6264. <div class="spanName">选择本地文件</div>
  6265. </div>
  6266. <!-- <div>
  6267. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6268. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6269. <img :src="cover[0].url" alt="" />
  6270. <div class="deletePic" @click="deleteSysPic">
  6271. <img src="../../../assets/icon/delete.png" alt="" />
  6272. </div>
  6273. </div>
  6274. <div class="spanName">选择系统文件</div>
  6275. </div> -->
  6276. <div>
  6277. <el-button @click="(searchImageValue = courseName), resetImage()"
  6278. v-if="isSysPic2 == false">选择网络文件</el-button>
  6279. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6280. <img :src="cover[0].url" alt="" />
  6281. <div class="deletePic" @click="deleteSysPic">
  6282. <img src="../../../assets/icon/delete.png" alt="" />
  6283. </div>
  6284. </div>
  6285. <div class="spanName">选择网络文件</div>
  6286. </div>
  6287. </div>
  6288. <!-- <div class="fileCss">
  6289. </div> -->
  6290. </div>
  6291. <span slot="footer" class="dialog-footer">
  6292. <el-button @click="choosePicVisible = false">取 消</el-button>
  6293. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6294. </span>
  6295. </el-dialog>
  6296. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6297. :before-close="handleClose" class="dialog_diy">
  6298. <div class="cru_selectBox" style="margin: 0">
  6299. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6300. 绘画
  6301. </div>
  6302. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6303. 科技
  6304. </div>
  6305. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6306. 人文
  6307. </div>
  6308. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6309. 艺术
  6310. </div>
  6311. </div>
  6312. <div class="sysPicBox">
  6313. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6314. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6315. </div>
  6316. </div>
  6317. </el-dialog>
  6318. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6319. :before-close="handleClose" class="dialog_diy">
  6320. <div>
  6321. <div class="people_top_right" style="display: flex; align-items: center">
  6322. <div style="position: relative; width: 100%">
  6323. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6324. @keyup.enter.native="resetImage()"></el-input>
  6325. <div class="search_img" @click="resetImage" style="right: 10px">
  6326. <img src="../../../assets/icon/search.png" alt />
  6327. </div>
  6328. </div>
  6329. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6330. </div>
  6331. <div class="sysPicBox" v-loading="imageloading">
  6332. <div class="picNone" v-if="!imageList.length">
  6333. 请输入关键词搜索图片
  6334. </div>
  6335. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6336. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6337. </div>
  6338. </div>
  6339. </div>
  6340. </el-dialog>
  6341. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6342. closePan(41);
  6343. }
  6344. " class="dialog_diy dialog_diy3 fullStyle">
  6345. <div v-if="selectJson" style="height: 100%">
  6346. <div class="select_box1" v-if="selectSteps == 1">
  6347. <div class="select_box1_img">
  6348. <div class="select_box1_title">
  6349. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6350. </div>
  6351. <div class="select_box1_add_img">
  6352. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6353. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6354. <img src="../../../assets/icon/addPoster.png" alt="" />
  6355. </div>
  6356. <div class="isSysPic" v-else>
  6357. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6358. <div class="deletePic" @click="deleteSelectPic">
  6359. <img src="../../../assets/icon/delete.png" alt="" />
  6360. </div>
  6361. </div>
  6362. </div>
  6363. </div>
  6364. <div class="select_box1_select">
  6365. <div class="select_box1_title">
  6366. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6367. </div>
  6368. <div class="select_box1_select_box">
  6369. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6370. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6371. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6372. <div class="select_box1_select_box_add">
  6373. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6374. 添加</el-button>
  6375. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6376. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6377. </div>
  6378. </div>
  6379. </div>
  6380. </div>
  6381. <div v-if="selectSteps == 2" style="height: 100%">
  6382. <div class="select_box2">
  6383. <div class="select_box2_title">设置每道题目的正确选项</div>
  6384. <div class="select_box2_box">
  6385. <div class="select_box2_img">
  6386. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6387. </div>
  6388. <div class="select_box2_answer">
  6389. <div class="select_answer_title">根据题目选择对应答案</div>
  6390. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6391. <span>{{ checkIndex + 1 }}、</span>
  6392. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6393. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6394. </el-option>
  6395. </el-select>
  6396. </div>
  6397. </div>
  6398. </div>
  6399. </div>
  6400. </div>
  6401. </div>
  6402. <span slot="footer" class="dialog-footer">
  6403. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6404. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6405. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6406. </span>
  6407. </el-dialog>
  6408. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6409. :before-close="handleClose" class="dialog_diy">
  6410. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6411. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6412. <div class="pjCss" style="width: 100%">
  6413. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6414. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6415. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6416. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6417. <div class="remove" @click="deletRateList(eIndex)"></div>
  6418. <div style="width: 100%; display: flex">
  6419. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6420. <el-rate v-model="eItem.score" disabled></el-rate>
  6421. </div>
  6422. <div class="elist_inptu_text" style="align-items: flex-start">
  6423. <span style="min-width: 100px; text-align: right">描述:</span>
  6424. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6425. </div>
  6426. </div>
  6427. </div>
  6428. <div class="addToolFun" @click="addRateList()">
  6429. <div class="addToolImg">
  6430. <img src="../../../assets/icon/add.png" alt />
  6431. </div>
  6432. <div>添加</div>
  6433. </div>
  6434. </div>
  6435. </div>
  6436. <span slot="footer" class="dialog-footer">
  6437. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6438. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6439. </span>
  6440. </el-dialog>
  6441. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6442. closePan(47);
  6443. }
  6444. " class="dialog_diy dialog_diy3 fullStyle">
  6445. <div style="height: 100%">
  6446. <div class="sentenBox" style="height: 100%">
  6447. <div class="addSen" @click="addSt">添加题目</div>
  6448. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6449. <div class="sentenTopBox">
  6450. <div class="sentenTop" :index="stIndex + 1">
  6451. <div>题目设置</div>
  6452. <div>
  6453. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6454. </div>
  6455. <div @click="addSen(stIndex)">添加</div>
  6456. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6457. </div>
  6458. </div>
  6459. <div class="cardList">
  6460. <div v-if="st.addSentence.length > 0" class="cardBox">
  6461. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6462. @click="setRightAnswer(s, stIndex, sIndex)">
  6463. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6464. <div>{{ s }}</div>
  6465. </el-tooltip>
  6466. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6467. <img src="../../../assets/icon/delete.png" alt="" />
  6468. </div>
  6469. </div>
  6470. </div>
  6471. <div class="card">
  6472. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6473. </div>
  6474. </div>
  6475. <div class="rightCardBox">
  6476. <div>正确顺序</div>
  6477. <div class="rightCardList">
  6478. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6479. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6480. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6481. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6482. <div>{{ r }}</div>
  6483. </el-tooltip>
  6484. </div>
  6485. <div>{{ rIndex + 1 }}</div>
  6486. </div>
  6487. </div>
  6488. <div class="card" v-if="st.rightAnswer.length == 0">
  6489. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6490. </div>
  6491. <div class="card" v-else>
  6492. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6493. </div>
  6494. </div>
  6495. </div>
  6496. </div>
  6497. </div>
  6498. </div>
  6499. <span slot="footer" class="dialog-footer">
  6500. <el-button @click="closePan(47)">取 消</el-button>
  6501. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6502. </span>
  6503. </el-dialog>
  6504. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6505. :before-close="handleClose" class="dialog_diy">
  6506. <el-form>
  6507. <!-- <el-form-item label="文本标题">
  6508. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6509. </el-form-item> -->
  6510. <div>表格内容</div>
  6511. <Table v-model="tableJson.text" @change="change"></Table>
  6512. </el-form>
  6513. <span slot="footer" class="dialog-footer">
  6514. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6515. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6516. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6517. </span>
  6518. </el-dialog>
  6519. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6520. :before-close="handleClose" class="dialog_diy">
  6521. <el-form>
  6522. <!-- <el-form-item label="文本标题">
  6523. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6524. </el-form-item> -->
  6525. <div>文档内容</div>
  6526. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6527. </el-form>
  6528. <span slot="footer" class="dialog-footer">
  6529. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6530. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6531. </span>
  6532. </el-dialog>
  6533. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6534. :before-close="handleClose" class="dialog_diy">
  6535. <div style="
  6536. width: 100%;
  6537. display: flex;
  6538. flex-direction: row;
  6539. flex-wrap: nowrap;
  6540. align-items: center;
  6541. justify-content: center;
  6542. ">
  6543. <div>班级:</div>
  6544. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6545. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6546. </el-option>
  6547. </el-select>
  6548. </div>
  6549. <span slot="footer" class="dialog-footer">
  6550. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6551. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6552. </span>
  6553. </el-dialog>
  6554. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6555. :before-close="handleClose" class="dialog_diy">
  6556. <div style="
  6557. width: 100%;
  6558. display: flex;
  6559. flex-direction: row;
  6560. flex-wrap: nowrap;
  6561. align-items: center;
  6562. justify-content: center;
  6563. ">
  6564. <div>随机码:</div>
  6565. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6566. </div>
  6567. <span slot="footer" class="dialog-footer">
  6568. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6569. <el-button type="primary" @click="addInvite">确定</el-button>
  6570. </span>
  6571. </el-dialog>
  6572. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6573. :before-close="handleClose" class="dialog_diy">
  6574. <div>
  6575. <div style="margin-bottom: 20px; color: #999">
  6576. 提示:点击“+”或“-”修改倒计时时长。
  6577. </div>
  6578. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6579. </div>
  6580. <span slot="footer" class="dialog-footer">
  6581. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6582. <el-button type="primary" @click="addPreTime">确定</el-button>
  6583. </span>
  6584. </el-dialog>
  6585. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6586. :before-close="handleClose" class="dialog_diy">
  6587. <div>
  6588. <div style="
  6589. width: 100%;
  6590. display: flex;
  6591. flex-direction: row;
  6592. flex-wrap: nowrap;
  6593. align-content: center;
  6594. align-items: center;
  6595. justify-content: space-between;
  6596. ">
  6597. <div style="
  6598. display: flex;
  6599. flex-flow: row nowrap;
  6600. align-items: flex-start;
  6601. width: 100%;
  6602. flex-direction: column;
  6603. flex-wrap: nowrap;
  6604. position: relative;
  6605. ">
  6606. <div class="e_box">
  6607. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6608. <div class="e_card_picture">
  6609. <img src="../../../assets/e_picture.png" />
  6610. </div>
  6611. <div class="e_card_name">
  6612. <span>{{ item.title }}</span>
  6613. </div>
  6614. <div class="e_card_btn">
  6615. <span @click="checkEva(item.id, 2)">导入</span>
  6616. </div>
  6617. </div> -->
  6618. <!-- <div class="addEva" @click="openT">
  6619. <img src="../../../assets/icon/addEva.png" alt="" />
  6620. </div> -->
  6621. <div style="
  6622. display: flex;
  6623. justify-content: flex-end;
  6624. margin-bottom: 10px;
  6625. ">
  6626. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6627. </div>
  6628. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6629. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6630. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6631. </el-table-column>
  6632. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6633. </el-table-column>
  6634. <el-table-column label="操作" width="250px">
  6635. <template slot-scope="scope">
  6636. <div class="btnBox">
  6637. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6638. </div>
  6639. </template>
  6640. </el-table-column>
  6641. </el-table>
  6642. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6643. 暂无数据
  6644. </div>
  6645. </div>
  6646. </div>
  6647. </div>
  6648. </div>
  6649. <span slot="footer" class="dialog-footer">
  6650. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6651. </span>
  6652. </el-dialog>
  6653. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6654. :before-close="handleClose" class="dialog_diy">
  6655. <div class="groupBox">
  6656. <div v-if="groupJson.group" class="groupContent">
  6657. <div class="groupTitle">请设置小组数量及名称</div>
  6658. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6659. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6660. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6661. <div class="groupBtn">
  6662. <el-button type="primary" size="small" @click="addGroup(index)"
  6663. v-if="groupJson.group.length - 1 == index">
  6664. 添加</el-button>
  6665. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6666. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6667. </div>
  6668. </div>
  6669. </div>
  6670. <div class="groupContent">
  6671. <div class="groupTitle">请设置每组人数</div>
  6672. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6673. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6674. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6675. @change="numberPan"></el-input>
  6676. </div>
  6677. </div>
  6678. <span slot="footer" class="dialog-footer">
  6679. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6680. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6681. </span>
  6682. </el-dialog>
  6683. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6684. :before-close="handleClose" class="dialog_diy">
  6685. <div style="
  6686. width: 100%;
  6687. display: flex;
  6688. flex-direction: row;
  6689. flex-wrap: nowrap;
  6690. align-items: center;
  6691. justify-content: center;
  6692. ">
  6693. <div style="min-width: fit-content">文件名称:</div>
  6694. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6695. </div>
  6696. <span slot="footer" class="dialog-footer">
  6697. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6698. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6699. </span>
  6700. </el-dialog>
  6701. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6702. closePan(69);
  6703. }
  6704. " class="dialog_diy fullStyle fullStyle1">
  6705. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6706. <span slot="footer" class="dialog-footer">
  6707. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6708. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6709. </span>
  6710. </el-dialog>
  6711. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6712. :before-close="handleClose" class="dialog_diy">
  6713. <div class="template_box">
  6714. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6715. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6716. <div class="wordPic">
  6717. <img src="../../../assets/icon/new/course_template.png" alt />
  6718. </div>
  6719. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6720. <div style="
  6721. margin-top: 10px;
  6722. line-height: 19px;
  6723. overflow: hidden;
  6724. text-overflow: ellipsis;
  6725. white-space: nowrap;
  6726. padding: 0 10px;
  6727. box-sizing: border-box;
  6728. width: 100%;
  6729. ">
  6730. {{ aa.title }}
  6731. </div>
  6732. </el-tooltip>
  6733. </div>
  6734. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6735. :class="{ wordTeacherA: ctJson.id == 1 }">
  6736. <div class="wordPic">
  6737. <img src="../../../assets/icon/new/course_template.png" alt />
  6738. </div>
  6739. <div style="
  6740. margin-top: 10px;
  6741. line-height: 19px;
  6742. overflow: hidden;
  6743. text-overflow: ellipsis;
  6744. white-space: nowrap;
  6745. padding: 0 20px;
  6746. ">
  6747. 简易模板
  6748. </div>
  6749. </div>
  6750. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6751. :class="{ wordTeacherA: ctJson.id == 2 }">
  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>
  6767. <span slot="footer" class="dialog-footer">
  6768. <el-button @click="templateDialog = false">取 消</el-button>
  6769. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6770. </span>
  6771. </el-dialog>
  6772. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6773. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6774. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6775. <div class="change_stageBox">
  6776. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6777. <div class="nt_taskBox">
  6778. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6779. <div class="nt_taskName">
  6780. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6781. <span>{{ t.dyName }}</span>
  6782. </el-tooltip>
  6783. </div>
  6784. </div>
  6785. <div class="moveBtn" v-if="unitJson3.length > 1">
  6786. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6787. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6788. </div>
  6789. </div>
  6790. </div>
  6791. <span slot="footer" class="dialog-footer">
  6792. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6793. <el-button type="primary" @click="updateChange">确定</el-button>
  6794. </span>
  6795. </el-dialog>
  6796. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6797. :before-close="handleClose" class="dialog_diy">
  6798. <div class="addTypeChoose" style="justify-content: center">
  6799. <div style="min-width: 100px">模板名称:</div>
  6800. <el-input v-model="templateName" style="width: 200px"></el-input>
  6801. </div>
  6802. <div class="addTypeBox">
  6803. <div class="addTypeChoose">
  6804. <div style="min-width: 100px">选择一级分类:</div>
  6805. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6806. style="width: 200px">
  6807. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6808. </el-option>
  6809. </el-select>
  6810. </div>
  6811. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6812. <div style="min-width: 100px">选择二级分类:</div>
  6813. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6814. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6815. </el-option>
  6816. </el-select>
  6817. </div>
  6818. </div>
  6819. <span slot="footer" class="dialog-footer">
  6820. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6821. <el-button @click="close()">关 闭</el-button>
  6822. </span>
  6823. </el-dialog>
  6824. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6825. </evaBox>
  6826. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6827. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6828. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  6829. </aiDialog>
  6830. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6831. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6832. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6833. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6834. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6835. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6836. </div>
  6837. </template>
  6838. <script>
  6839. import "../../../common/aws-sdk-2.235.1.min.js";
  6840. import { tools as toolsData } from "../../../common/tools.js";
  6841. // import "../../../common/aws-sdk-2.99.0.min.js";
  6842. import $ from "jquery";
  6843. import EditorBar from "../../../components/tools/wangEnduit";
  6844. import Table from "../../../components/tools/table";
  6845. import Mind from "../../tools/jsmind2";
  6846. import Time from "../../tools/time.vue";
  6847. import Sunburst from "../../tools/sunburst";
  6848. import SeeBoard from "../../tools/seeBoard";
  6849. import weilaiData from "../components/weilai.js";
  6850. import sourceDialog from "../teacherSource/dialog.vue";
  6851. import interVideo from "../interVideo/index.vue";
  6852. import englishRight from "../components/englishRight.vue";
  6853. import evaBox from "../evaBox/index.vue";
  6854. import EnglishVoice from "../EnglishVoice/index.vue";
  6855. import aiBox from './aiBox.vue'
  6856. import aiDialog from './aiDialog'
  6857. import aiTips from './aiTips.vue'
  6858. import tipsDialog from './tipsDialog.vue'
  6859. import { v4 as uuidv4 } from "uuid";
  6860. import MarkdownIt from "markdown-it";
  6861. import aiCreateDialog from './aiCreateDialog.vue'
  6862. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6863. import wpdf from "../test/file/wPdf2.vue";
  6864. import wOffice from "../test/file/wOffice.vue";
  6865. import htmlDocx from "html-docx-js/dist/html-docx";
  6866. var OpenCC = require("opencc-js");
  6867. let converter = OpenCC.Converter({
  6868. from:'hk',
  6869. to:'cn'
  6870. })
  6871. export default {
  6872. components: {
  6873. EditorBar,
  6874. Mind,
  6875. Time,
  6876. Sunburst,
  6877. SeeBoard,
  6878. Table,
  6879. sourceDialog,
  6880. interVideo,
  6881. englishRight,
  6882. evaBox,
  6883. EnglishVoice,
  6884. aiBox,
  6885. aiDialog,
  6886. aiTips,
  6887. tipsDialog,
  6888. aiCreateDialog,
  6889. aiCreateVideoDialog,
  6890. wpdf,
  6891. wOffice,
  6892. },
  6893. data() {
  6894. return {
  6895. checkAll: false,
  6896. checkAll2: false,
  6897. chooseType: 1,
  6898. checkedCities: [],
  6899. isIndeterminate: true,
  6900. isIndeterminate2: true,
  6901. isSysPic: false,
  6902. isSysPic2: false,
  6903. steps: 1,
  6904. stepsNav: 1,
  6905. nbOrder: 0,
  6906. courseId: "",
  6907. chapToolsType: 0,
  6908. chapTools: [
  6909. {
  6910. tools: [],
  6911. toolDetail: "",
  6912. },
  6913. ],
  6914. line: "",
  6915. lineTitle: "",
  6916. sysPic: [],
  6917. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6918. sentenceList2: [],
  6919. isPushTitleList: [],
  6920. lineCount: 0,
  6921. lineType: 0,
  6922. chapCount: 0,
  6923. courseName: "",
  6924. isTeacherSee: false,
  6925. courseText: "",
  6926. textLoading: false,
  6927. ttextLoading: false,
  6928. courseText2: "",
  6929. preTime: 0,
  6930. formLabelWidth: "100px",
  6931. choosePicVisible: false,
  6932. sysPicVisible: false,
  6933. sysPicVisible2: false,
  6934. uploadLoading1: false,
  6935. noneBtnImg: false,
  6936. updateBoolean2: false,
  6937. unitIndex: 0,
  6938. taskCount: 0,
  6939. dialogVisible: false,
  6940. dialogVisible1: false,
  6941. dialogVisible2: false,
  6942. dialogVisible3: false,
  6943. dialogVisible4: false,
  6944. dialogVisible5: false,
  6945. dialogVisible6: false,
  6946. dialogVisible7: false,
  6947. dialogVisible8: false,
  6948. dialogVisible9: false,
  6949. dialogVisibleClass: false,
  6950. dialogVisibleMember: false,
  6951. dialogVisibleMp3: false,
  6952. dialogVisibleSelect: false,
  6953. dialogVisibleSentence: false,
  6954. dialogVisibleRate: false,
  6955. dialogVisibleChoice: false,
  6956. dialogVisiblemb: false,
  6957. dialogVisibleInvite: false,
  6958. dialogVisibleSource: false,
  6959. dialogVisibleVideo: false,
  6960. dialogVisibleStageChange: false,
  6961. dialogVisibleupdataVideoT: false,
  6962. englishDialogVisible: false,
  6963. templateDialog: false,
  6964. ctJson: {},
  6965. isClickColor: 1,
  6966. toolIndexType: "",
  6967. publicTool: 0,
  6968. searchPeople: "",
  6969. searchTN: "",
  6970. collid: '',
  6971. CollLoading: false,
  6972. userid: this.$route.query.userid,
  6973. oid: this.$route.query.oid,
  6974. org: this.$route.query.org,
  6975. role: this.$route.query.role,
  6976. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6977. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6978. dialogVisibleTable: false,
  6979. dialogVisibleWord: false,
  6980. tableJson: { text: "" },
  6981. wordJson: { text: "" },
  6982. dialogVisibleMoreUpload: false,
  6983. dialogVisiblePreTime: false,
  6984. uploadJson: [],
  6985. classJuri: [],
  6986. gradeList: [],
  6987. cover: [], //课程封面
  6988. myWord: [],
  6989. evaJuri: [],
  6990. evalua: "",
  6991. targetArray: [],
  6992. eTitle: "",
  6993. eJson: {},
  6994. fid: "", //一级
  6995. sid: "", //二级
  6996. tid: "", //二级
  6997. typeMode: 3,
  6998. eJSONNum: 0,
  6999. data: {
  7000. meta: {
  7001. name: "example",
  7002. author: "dd@163.com",
  7003. version: "0.2",
  7004. },
  7005. format: "node_array",
  7006. data: [{ id: "root", isroot: true, topic: "" }],
  7007. },
  7008. askJson: {
  7009. askCount: 1,
  7010. askTitle: "",
  7011. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7012. },
  7013. askJson2: {},
  7014. testJson: {},
  7015. testJson2: {},
  7016. selectJson: {},
  7017. selectJson2: {},
  7018. rateJson: [],
  7019. unitJson2: [],
  7020. unitJson3: [],
  7021. unitJson: [
  7022. {
  7023. dyName: "", //单元标题
  7024. chapterInfo: [
  7025. {
  7026. isread: false,
  7027. chapterid: this.guid(),
  7028. title: "",
  7029. courseName: "",
  7030. taskJson: [
  7031. {
  7032. task: "",
  7033. taskDetail: "",
  7034. chapterData: [],
  7035. toolText: "",
  7036. toolChoose: [
  7037. {
  7038. tool: [],
  7039. toolDetail: "",
  7040. toolType: 0,
  7041. askCount: 1,
  7042. askTitle: "",
  7043. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7044. },
  7045. ],
  7046. isShowTools: false,
  7047. askCount: 1,
  7048. isFold: 1,
  7049. askTitle: "",
  7050. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7051. checkJson: [{ checkCount: [], checkPerent: [] }],
  7052. homeworkList: [],
  7053. },
  7054. ],
  7055. itemCount: 1,
  7056. fileList1: [],
  7057. video: [],
  7058. testData: [],
  7059. pData: [],
  7060. templateArray: [],
  7061. },
  7062. ],
  7063. },
  7064. ],
  7065. templateArray: [],
  7066. studentJuri: [],
  7067. teacherJuri: [],
  7068. CollaborativeTeaList: [],
  7069. checkboxList: [],
  7070. checkboxList2: [],
  7071. checkboxList3: [],
  7072. classSearch: "",
  7073. gradeId: "",
  7074. number: "",
  7075. tTitle: "",
  7076. tdetail: "",
  7077. templateC: {},
  7078. AttText: {},
  7079. AttTextType: 0,
  7080. AttTextIndex: 0,
  7081. cTemplate: "",
  7082. CourseType: [],
  7083. CourseType1: [],
  7084. CourseType2: [],
  7085. CourseTypeJson: {},
  7086. CourseTypeJson1: {},
  7087. courseTypeId: [],
  7088. courseTypeId1: [],
  7089. courseTypeSon: [],
  7090. clearArray: [],
  7091. pTypeCheck: [],
  7092. pTypeCheckName: [],
  7093. loading: false,
  7094. toolType: 0,
  7095. inputShow: true,
  7096. inputShow2: true,
  7097. toolIndex: 0,
  7098. cidType: 0,
  7099. answerQ: "",
  7100. answerQ2: "",
  7101. grade: [],
  7102. grade2: [],
  7103. courseUserid: "",
  7104. timer: null,
  7105. timer2: null,
  7106. pasteTimer: null,
  7107. checkId: "",
  7108. isDelete: 1,
  7109. addindex: 0,
  7110. selectSteps: 1,
  7111. groupJson: {},
  7112. dialogVisibleGroup: false,
  7113. rightBoxHeight: 0,
  7114. ManAarray: [],
  7115. checkBoolean: false,
  7116. inviteCode: [],
  7117. inviteId: "",
  7118. icode: "",
  7119. easyArray: [2, 4],
  7120. sourceData: {},
  7121. updateSourcePan: false,
  7122. videoJson: {},
  7123. isBtnDisplay: false,
  7124. isStepDisplay: false,
  7125. isPasteStage: false,
  7126. isPasteTask: false,
  7127. isPasteChoice: false,
  7128. imageList: [],
  7129. imageloading: false,
  7130. imageloading2: false,
  7131. searchImageValue: "",
  7132. ppage: 1,
  7133. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7134. oldIndex: 0,
  7135. dragType: "",
  7136. oldUnitIndex: 0,
  7137. oldData: null,
  7138. newIndex: "",
  7139. englishList: {},
  7140. typeIndex: "",
  7141. courseState: 5,
  7142. taskJSONa: [
  7143. {
  7144. task: "",
  7145. taskDetail: "",
  7146. chapterData: [],
  7147. toolText: "",
  7148. toolChoose: [
  7149. {
  7150. tool: [],
  7151. toolDetail: "",
  7152. toolType: 0,
  7153. askCount: 1,
  7154. askTitle: "",
  7155. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7156. },
  7157. ],
  7158. isShowTools: false,
  7159. askCount: 1,
  7160. isFold: 1,
  7161. askTitle: "",
  7162. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7163. checkJson: [{ checkCount: [], checkPerent: [] }],
  7164. homeworkList: [],
  7165. },
  7166. ],
  7167. checkUnitIndex: 0,
  7168. isdrag: "",
  7169. evaIndex: "",
  7170. evatIndex: "",
  7171. evaBoxDialog: false,
  7172. EnglishVoiceDialog: false,
  7173. englishVoiceJson: {},
  7174. cetIndex: "",
  7175. cettIndex: "",
  7176. cetBoxDialog: false,
  7177. templateName: "",
  7178. setTypeJson: {
  7179. one: "",
  7180. two: "",
  7181. },
  7182. twoJson: [],
  7183. oneJson: [],
  7184. updateKey: 1,
  7185. isOutline: false,
  7186. isOutline2: false,
  7187. infoData: [],
  7188. infoproVisible: false,
  7189. infoisFinishSize: 0,
  7190. infoisAllSize: 0,
  7191. infoprogress: 0,
  7192. taskDetailLoading: [],
  7193. ttaskDetailLoading: [],
  7194. taskDetailLoading2: [],
  7195. ttaskDetailLoading2: [],
  7196. taskDetailLoading3: [],
  7197. ttaskDetailLoading3: [],
  7198. taskDetailLoading4: [],
  7199. taskDetailLoading5: [],
  7200. ttaskDetailLoading5: [],
  7201. dArray: [],
  7202. dialogVisibleAiD: false,
  7203. aitype: "",
  7204. aiJson: {
  7205. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7206. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7207. "aiTask": "请根据<教学任务教案>。",
  7208. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7209. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7210. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7211. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7212. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7213. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7214. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7215. },
  7216. aiText: "",
  7217. aiText2: "",
  7218. aiText3: "",
  7219. aiCallBack: "",
  7220. aiIndex: "",
  7221. clickType: 1,
  7222. promptShow: false,
  7223. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7224. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7225. dialogVisibleTips: false,
  7226. tipsJson: {},
  7227. cpote:{
  7228. cpote1: '',
  7229. cpote2: '',
  7230. cpote3: '',
  7231. cpote4: '',
  7232. },
  7233. cpoteLoading:{
  7234. cpote1: false,
  7235. cpote2: false,
  7236. cpote3: false,
  7237. cpote4: false,
  7238. },
  7239. cpotetLoading:{
  7240. cpote1: false,
  7241. cpote2: false,
  7242. cpote3: false,
  7243. cpote4: false,
  7244. },
  7245. cpoteType: 0,
  7246. dialogVisibleAiCreate: false,
  7247. dialogVisibleAiCreateVideo: false,
  7248. teacherText: [],
  7249. isFileSearch: true,
  7250. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  7251. 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'],
  7252. courseJie:1,
  7253. courseTime:45,
  7254. allTextArray: [],
  7255. dialogVisiblePdf: false,
  7256. dialogVisibleOffice: false,
  7257. wurl: "",
  7258. choiceLoading: false,
  7259. teacherInfoData: [],
  7260. teacherinfoproVisible: false,
  7261. teacherinfoisFinishSize: 0,
  7262. teacherinfoisAllSize: 0,
  7263. teacherinfoprogress: 0,
  7264. teacherCourseText: "",
  7265. teacherTextLoading: false,
  7266. tteacherTextLoading: false,
  7267. targetCourseText: "",
  7268. targetTextLoading: false,
  7269. ttargetTextLoading: false,
  7270. cankaoInfoData: [],
  7271. fileSLoading: false,
  7272. infoData2: [],
  7273. isuseT: false,
  7274. mode: 1,
  7275. targetCourseText2: "",
  7276. targetTextLoading2: false,
  7277. ttargetTextLoading2: false,
  7278. courseTextBool: false,
  7279. teacherCourseTextB: true,
  7280. targetCourseTextB: true,
  7281. courseTextB: true,
  7282. targetCourseText2B: true,
  7283. // 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'],
  7284. yiKeTemplateArray:[],
  7285. taskLoading: [],
  7286. ruleLoading: [],
  7287. mubiaoInfoData: [],
  7288. mubiaoinfoproVisible: false,
  7289. mubiaoinfoisFinishSize: 0,
  7290. mubiaoinfoisAllSize: 0,
  7291. mubiaoinfoprogress: 0,
  7292. xuanzeInfoData: [],
  7293. xuanzeinfoproVisible: false,
  7294. xuanzeinfoisFinishSize: 0,
  7295. xuanzeinfoisAllSize: 0,
  7296. xuanzeinfoprogress: 0,
  7297. pingjiaInfoData: [],
  7298. pingjiainfoproVisible: [],
  7299. pingjiainfoisFinishSize: [],
  7300. pingjiainfoisAllSize: [],
  7301. pingjiainfoprogress: [],
  7302. taskGLoading: [],
  7303. isOutlineCancelToken: null,
  7304. isFileCancelToken: null,
  7305. isTargetCancelToken1: null,
  7306. isTargetCancelToken2: null,
  7307. isTextCancelToken: null,
  7308. isTeacherTextCancelToken: null,
  7309. isTeacherTaskCancelToken: null,
  7310. isOutlineTaskCancelToken: [],
  7311. isTextCancelSource: null,
  7312. isOutlineTaskCancelSource: [],
  7313. isTeacherTextCancelSource: null,
  7314. isTargetCancelSource1: null,
  7315. isTargetCancelSource2: null,
  7316. };
  7317. },
  7318. directives: {
  7319. autoHeight: {
  7320. update(el, binding) {
  7321. const { value } = binding;
  7322. if (value && typeof value === "number") {
  7323. el.style.height = `${value}px`;
  7324. } else {
  7325. el.style.height = "auto";
  7326. }
  7327. },
  7328. componentUpdated(el) {
  7329. el.style.height = `${el.scrollHeight + 25}px`;
  7330. },
  7331. },
  7332. },
  7333. computed: {
  7334. // rightBoxHeight: function () {
  7335. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7336. // },
  7337. offsetLetfPx: function () {
  7338. //addnum可以直接在模板语法里面用,相当于data内的值
  7339. return (
  7340. $(".cru_select")[this.unitIndex] &&
  7341. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7342. );
  7343. },
  7344. getMan2() {
  7345. return function (people) {
  7346. let _people = people;
  7347. let _people2 = "";
  7348. if (this.ManAarray.length) {
  7349. for (var i = 0; i < this.ManAarray.length; i++) {
  7350. if (this.ManAarray[i].userid == people) {
  7351. _people2 = this.ManAarray[i].name;
  7352. break;
  7353. }
  7354. }
  7355. }
  7356. if (people == this.courseUserid) {
  7357. return "";
  7358. }
  7359. return this.ManAarray.length ? _people2 : "";
  7360. };
  7361. },
  7362. getListMan2() {
  7363. return function (list) {
  7364. let _people2 = [];
  7365. if (this.ManAarray.length) {
  7366. for (var j = 0; j < list.length; j++) {
  7367. let people = list[j];
  7368. for (var i = 0; i < this.ManAarray.length; i++) {
  7369. if (
  7370. this.ManAarray[i].userid == people &&
  7371. people != this.courseUserid
  7372. ) {
  7373. _people2.push(this.ManAarray[i].name);
  7374. break;
  7375. }
  7376. }
  7377. }
  7378. }
  7379. return this.ManAarray.length ? _people2.join("、") : "";
  7380. };
  7381. },
  7382. isInvite() {
  7383. return function (cid) {
  7384. let array = [];
  7385. for (var i = 0; i < this.inviteCode.length; i++) {
  7386. array.push(this.inviteCode[i].cid);
  7387. }
  7388. return array.indexOf(cid) != -1;
  7389. };
  7390. },
  7391. getInviteCodeC() {
  7392. return function (cid) {
  7393. let array = [];
  7394. for (var i = 0; i < this.inviteCode.length; i++) {
  7395. array.push(this.inviteCode[i].cid);
  7396. }
  7397. return this.inviteCode[array.indexOf(cid)].ic;
  7398. };
  7399. },
  7400. getClassC() {
  7401. return function (c) {
  7402. let _c2 = "";
  7403. if (this.grade.length) {
  7404. for (var i = 0; i < this.grade.length; i++) {
  7405. if (this.grade[i].id == c) {
  7406. _c2 = this.grade[i].name;
  7407. break;
  7408. }
  7409. }
  7410. }
  7411. return this.grade.length ? _c2 : "";
  7412. };
  7413. },
  7414. getListClassC() {
  7415. return function (list) {
  7416. let _c2 = [];
  7417. if (this.grade.length) {
  7418. for (var j = 0; j < list.length; j++) {
  7419. let c = list[j];
  7420. for (var i = 0; i < this.grade.length; i++) {
  7421. if (this.grade[i].id == c) {
  7422. _c2.push(this.grade[i].name);
  7423. break;
  7424. }
  7425. }
  7426. }
  7427. }
  7428. return this.grade.length ? _c2.join("、") : "";
  7429. };
  7430. },
  7431. MarkdownT() {
  7432. return function (c) {
  7433. let md = new MarkdownIt();
  7434. return c
  7435. ? md.render(c) : "";
  7436. };
  7437. },
  7438. panOutline(){
  7439. return function () {
  7440. let count = 0;
  7441. for(var i = 0; i < this.unitJson.length; i++){
  7442. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7443. for(var j = 0; j < _task.length; j++){
  7444. if(_task[j].taskDetail2){
  7445. count++
  7446. }
  7447. }
  7448. }
  7449. return count;
  7450. };
  7451. },
  7452. panTeacher(){
  7453. return function () {
  7454. let count = 0;
  7455. for(var i = 0; i < this.unitJson.length; i++){
  7456. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7457. for(var j = 0; j < _task.length; j++){
  7458. if(_task[j].taskDetail3){
  7459. count++
  7460. }
  7461. }
  7462. }
  7463. return count;
  7464. };
  7465. },
  7466. dataCheckPan(){
  7467. return function (fileid) {
  7468. for(let i = 0; i < this.infoData.length; i++){
  7469. if(this.infoData[i].fileid == fileid){
  7470. return true
  7471. }
  7472. }
  7473. return false;
  7474. };
  7475. }
  7476. },
  7477. watch: {
  7478. unitIndex(newValue, oldValue) {
  7479. // return;
  7480. if (this.isDelete == 2) {
  7481. this.isDelete = 1;
  7482. return;
  7483. }
  7484. if (this.cid != "") {
  7485. let _unitIndex = oldValue;
  7486. if (
  7487. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7488. JSON.stringify(this.unitJson[_unitIndex])
  7489. ) {
  7490. this.$refs.rightboxR.scrollTop = 0;
  7491. return;
  7492. }
  7493. let cPan = 1;
  7494. for (
  7495. var j = 0;
  7496. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7497. j++
  7498. ) {
  7499. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7500. j
  7501. ].proVisible = false;
  7502. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7503. j
  7504. ].proVisible2 = false;
  7505. if (
  7506. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7507. .length > 1
  7508. ) {
  7509. for (
  7510. var z = 0;
  7511. z <
  7512. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7513. .length;
  7514. z++
  7515. ) {
  7516. if (
  7517. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7518. .toolChoose[z].tool.length
  7519. ) {
  7520. this.$message.error("请把工具添加完整");
  7521. cPan = 2;
  7522. break;
  7523. }
  7524. }
  7525. }
  7526. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7527. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7528. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7529. (ele) => {
  7530. return ele.value != "";
  7531. }
  7532. );
  7533. }
  7534. }
  7535. if (cPan == 2) {
  7536. this.unitIndex = oldValue;
  7537. return;
  7538. }
  7539. for (var i = 0; i < this.unitJson.length; i++) {
  7540. if (this.addindex != i) {
  7541. delete this.unitJson[i].isUpdate;
  7542. }
  7543. }
  7544. this.$refs.rightboxR.scrollTop = 0;
  7545. this.addindex = -1;
  7546. let params = [
  7547. {
  7548. cid: this.cid,
  7549. chapters: JSON.stringify(this.unitJson),
  7550. uid: this.userid,
  7551. unitIndex: _unitIndex,
  7552. },
  7553. ];
  7554. this.ajax
  7555. .post(this.$store.state.api + "updateWorkNew4", params)
  7556. .then((res) => {
  7557. // this.$message({
  7558. // message: "修改成功",
  7559. // type: "success",
  7560. // });
  7561. // this.courseId = this.cid;
  7562. this.addtips()
  7563. })
  7564. .catch((err) => {
  7565. this.$message.error("网络不佳");
  7566. console.error(err);
  7567. });
  7568. }
  7569. },
  7570. steps(newValue, old) {
  7571. if (newValue == 4) {
  7572. let cPan = 1;
  7573. for (var i = 0; i < this.unitJson.length; i++) {
  7574. for (
  7575. var j = 0;
  7576. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7577. j++
  7578. ) {
  7579. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7580. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7581. if (
  7582. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7583. ) {
  7584. for (
  7585. var z = 0;
  7586. z <
  7587. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7588. z++
  7589. ) {
  7590. if (
  7591. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7592. .tool.length
  7593. ) {
  7594. this.$message.error("请把工具添加完整");
  7595. cPan = 2;
  7596. break;
  7597. }
  7598. }
  7599. }
  7600. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7601. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7602. i
  7603. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7604. return ele.value != "";
  7605. });
  7606. }
  7607. }
  7608. }
  7609. this.inputShow = true;
  7610. if (cPan == 2) {
  7611. this.steps = old;
  7612. return;
  7613. }
  7614. this.goTo(
  7615. "/course?userid=" +
  7616. this.userid +
  7617. "&oid=" +
  7618. this.oid +
  7619. "&org=" +
  7620. this.org +
  7621. "&role=" +
  7622. this.role
  7623. );
  7624. }
  7625. },
  7626. },
  7627. methods: {
  7628. tableRowClassName({ row, rowIndex }) {
  7629. if ((rowIndex + 1) % 2 === 0) {
  7630. return "even_row";
  7631. } else {
  7632. return "";
  7633. }
  7634. },
  7635. close() {
  7636. this.cetIndex = "";
  7637. this.cettIndex = "";
  7638. this.templateName = "";
  7639. this.cetBoxDialog = false;
  7640. },
  7641. openAI() {
  7642. top.postMessage({ tools: "64" }, "*");
  7643. },
  7644. setMan() {
  7645. // let teacherJuri = this.teacherJuri2;
  7646. this.ManAarray = [];
  7647. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7648. if (_user.indexOf(this.userid) == -1) {
  7649. _user.push(this.userid);
  7650. }
  7651. if (_user.indexOf(this.courseUserid) == -1) {
  7652. _user.push(this.courseUserid);
  7653. }
  7654. let params = {
  7655. uid: _user.join(","),
  7656. };
  7657. this.ajax
  7658. .get(this.$store.state.api + "getAllUserById", params)
  7659. .then((res) => {
  7660. let teacherJuri = res.data[0];
  7661. this.ManAarray = teacherJuri;
  7662. })
  7663. .catch((err) => {
  7664. console.error(err);
  7665. });
  7666. },
  7667. previewImg(url) {
  7668. this.$hevueImgPreview(url);
  7669. },
  7670. btnDisplay(bool) {
  7671. this.isBtnDisplay = bool;
  7672. },
  7673. stepDisplay(bool) {
  7674. this.isStepDisplay = bool;
  7675. },
  7676. scrollChange() {
  7677. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7678. },
  7679. addHw(e) {
  7680. var el = e.currentTarget;
  7681. el.getElementsByTagName("input")[0].click();
  7682. },
  7683. change(val) {
  7684. if (this.dialogVisible1) {
  7685. this.tdetail = val;
  7686. } else if (this.dialogVisible6) {
  7687. this.AttText.text = val;
  7688. } else if (this.dialogVisible2) {
  7689. this.cTemplate = val;
  7690. } else if (this.dialogVisibleTable) {
  7691. this.tableJson.text = val;
  7692. }
  7693. this.$forceUpdate();
  7694. console.log(val);
  7695. },
  7696. change2(val) {
  7697. console.log(val);
  7698. this.$forceUpdate();
  7699. },
  7700. handleClose(done) {
  7701. done();
  7702. },
  7703. closePan(tool) {
  7704. if (tool == 15) {
  7705. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7706. this.dialogVisible8 = false;
  7707. } else {
  7708. this.closeConfirm(tool);
  7709. }
  7710. } else if (tool == 4) {
  7711. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7712. this.dialogVisible5 = false;
  7713. } else {
  7714. this.closeConfirm(tool);
  7715. }
  7716. } else if (tool == 45) {
  7717. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7718. this.dialogVisibleChoice = false;
  7719. } else {
  7720. this.closeConfirm(tool);
  7721. }
  7722. } else if (tool == 41) {
  7723. if (
  7724. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7725. ) {
  7726. this.dialogVisibleSelect = false;
  7727. } else {
  7728. this.closeConfirm(tool);
  7729. }
  7730. } else if (tool == 47) {
  7731. if (
  7732. JSON.stringify(this.sentenceList) ==
  7733. JSON.stringify(this.sentenceList2)
  7734. ) {
  7735. this.dialogVisibleSentence = false;
  7736. } else {
  7737. this.closeConfirm(tool);
  7738. }
  7739. } else if (tool == 69) {
  7740. if (
  7741. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7742. ) {
  7743. this.englishDialogVisible = false;
  7744. } else {
  7745. this.closeConfirm(tool);
  7746. }
  7747. }
  7748. },
  7749. closeConfirm(tool) {
  7750. this.$confirm("是否保存已编辑内容?", "提示", {
  7751. confirmButtonText: "保存",
  7752. cancelButtonText: "不保存",
  7753. type: "warning",
  7754. })
  7755. .then(() => {
  7756. if (tool == 15) {
  7757. this.addAnswer();
  7758. } else if (tool == 4) {
  7759. this.addAsk();
  7760. } else if (tool == 45) {
  7761. this.addTest();
  7762. } else if (tool == 41) {
  7763. this.addSelectAnswer();
  7764. } else if (tool == 47) {
  7765. this.addSentenceTool();
  7766. } else if (tool == 69) {
  7767. this.addEnglish();
  7768. }
  7769. })
  7770. .catch(() => {
  7771. if (tool == 15) {
  7772. this.dialogVisible8 = false;
  7773. } else if (tool == 4) {
  7774. this.dialogVisible5 = false;
  7775. } else if (tool == 45) {
  7776. this.dialogVisibleChoice = false;
  7777. } else if (tool == 41) {
  7778. this.dialogVisibleSelect = false;
  7779. } else if (tool == 47) {
  7780. this.dialogVisibleSentence = false;
  7781. } else if (tool == 69) {
  7782. this.englishDialogVisible = false;
  7783. }
  7784. });
  7785. },
  7786. addEnglish(jsonType) {
  7787. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7788. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7789. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7790. if (
  7791. this.englishList.engTitle == "" ||
  7792. this.englishList.englishText == ""
  7793. ) {
  7794. this.$message.error("请将内容填写完整!");
  7795. return;
  7796. }
  7797. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7798. this.taskCount
  7799. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7800. this.englishList = {};
  7801. if (jsonType && jsonType == 1) {
  7802. this.englishDialogVisible = true;
  7803. } else {
  7804. this.englishDialogVisible = false;
  7805. }
  7806. if (
  7807. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7808. .toolChoose[this.toolIndex].tool != 69
  7809. ) {
  7810. this.addTools(69, this.taskCount, this.toolIndex);
  7811. }
  7812. },
  7813. imgChange2(i, j) {
  7814. var _tmp = this.testJson.testJson[i].checkList[j];
  7815. this.noneBtnImg = _tmp.length >= 1;
  7816. },
  7817. imgChange3(i) {
  7818. var _tmp = this.testJson.testJson[i];
  7819. this.noneBtnImg = _tmp.length >= 1;
  7820. },
  7821. imgChange1(file, fileList, type, itemTaskIndex) {
  7822. if (type == 1) {
  7823. var _tmp = this.cover;
  7824. } else if (
  7825. type == 2 ||
  7826. type == 3 ||
  7827. type == 6 ||
  7828. type == 7 ||
  7829. type == 8
  7830. ) {
  7831. var _tmp =
  7832. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7833. .chapterData;
  7834. } else if (type == 4) {
  7835. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7836. } else {
  7837. var _tmp =
  7838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7839. .homeworkList;
  7840. }
  7841. this.noneBtnImg = _tmp.length >= 1;
  7842. },
  7843. goTo(path) {
  7844. this.$router.push(path);
  7845. },
  7846. guid() {
  7847. var _num,
  7848. i,
  7849. _guid = "";
  7850. for (i = 0; i < 32; i++) {
  7851. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7852. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7853. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7854. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7855. _guid += "-";
  7856. }
  7857. }
  7858. return _guid;
  7859. },
  7860. retrunCourse() {
  7861. if(this.istemplate == 1){
  7862. this.goTo(
  7863. "/course?userid=" +
  7864. this.userid +
  7865. "&oid=" +
  7866. this.oid +
  7867. "&org=" +
  7868. this.org +
  7869. "&role=" +
  7870. this.role
  7871. );
  7872. return
  7873. }
  7874. this.$confirm("是否保存已编辑内容?", "提示", {
  7875. confirmButtonText: "保存",
  7876. cancelButtonText: "不保存",
  7877. distinguishCancelAndClose: true,
  7878. type: "warning",
  7879. })
  7880. .then(() => {
  7881. if (this.taskLoading.length) {
  7882. let _pan = 1
  7883. for(var k = 0; k < this.taskLoading.length; k++){
  7884. if(this.taskLoading[k]){
  7885. this.$message({
  7886. message: `请等待任务${k+1}回答完毕后再保存`,
  7887. type: "warning"
  7888. });
  7889. _pan = 2
  7890. }
  7891. }
  7892. if(_pan == 2){
  7893. return
  7894. }
  7895. }
  7896. if(this.taskGLoading.length){
  7897. let _pan = 1
  7898. for(var k = 0; k < this.taskGLoading.length; k++){
  7899. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  7900. this.$message({
  7901. message: `请等待任务${k+1}回答完毕后再保存`,
  7902. type: "warning"
  7903. });
  7904. _pan = 2
  7905. }
  7906. }
  7907. if(_pan == 2){
  7908. return
  7909. }
  7910. }
  7911. if (this.cid == "" || this.cid == undefined) {
  7912. if (this.courseName == "") {
  7913. this.$message.error("请补充填写课程名称");
  7914. return;
  7915. } else {
  7916. this.addWork();
  7917. }
  7918. this.steps = 4;
  7919. } else {
  7920. if (this.courseName == "") {
  7921. this.$message.error("请补充填写课程名称");
  7922. return;
  7923. } else {
  7924. if (this.userid != this.courseUserid && this.role != "1") {
  7925. this.updateWork2();
  7926. } else {
  7927. this.updateWork();
  7928. }
  7929. this.steps = 4;
  7930. }
  7931. }
  7932. })
  7933. .catch((v) => {
  7934. console.log(v);
  7935. if (v == "cancel") {
  7936. this.goTo(
  7937. "/course?userid=" +
  7938. this.userid +
  7939. "&oid=" +
  7940. this.oid +
  7941. "&org=" +
  7942. this.org +
  7943. "&role=" +
  7944. this.role
  7945. );
  7946. }
  7947. });
  7948. },
  7949. lastSteps() {
  7950. if (this.steps == 4) {
  7951. this.goTo(
  7952. "/course?userid=" +
  7953. this.userid +
  7954. "&oid=" +
  7955. this.oid +
  7956. "&org=" +
  7957. this.org +
  7958. "&role=" +
  7959. this.role
  7960. );
  7961. } else {
  7962. // if (this.cidType == 0) {
  7963. // this.steps--;
  7964. // if (this.steps == 1) {
  7965. // setTimeout(() => {
  7966. // this.checkEva(this.checkId);
  7967. // setTimeout(() => {
  7968. // this.checkEva(this.checkId);
  7969. // }, 100);
  7970. // }, 100);
  7971. // }
  7972. // } else {
  7973. if (this.steps == 3) {
  7974. this.steps = 1;
  7975. setTimeout(() => {
  7976. this.checkEva(this.checkId);
  7977. setTimeout(() => {
  7978. this.checkEva(this.checkId);
  7979. }, 100);
  7980. }, 100);
  7981. }
  7982. // }
  7983. }
  7984. },
  7985. navSteps(s) {
  7986. if (this.courseName == "") {
  7987. this.$message.error("请补充填写课程名称");
  7988. return;
  7989. }
  7990. if (this.cidType == 0) {
  7991. if (this.steps == 1) {
  7992. if (this.cid == "" || this.cid == undefined) {
  7993. this.addWork();
  7994. } else {
  7995. if (this.userid != this.courseUserid && this.role != "1") {
  7996. this.updateWork2();
  7997. } else {
  7998. this.updateWork();
  7999. }
  8000. }
  8001. }
  8002. if (s == 1) {
  8003. this.steps = 1;
  8004. setTimeout(() => {
  8005. this.checkEva(this.checkId);
  8006. setTimeout(() => {
  8007. this.checkEva(this.checkId);
  8008. }, 100);
  8009. }, 100);
  8010. }
  8011. if (s == 2) {
  8012. this.steps = 2;
  8013. }
  8014. if (s == 3) {
  8015. this.cTemplate = this.templateC.content;
  8016. this.dialogVisible2 = false;
  8017. this.steps = 3;
  8018. this.isClickColor = 1;
  8019. this.unitJson[
  8020. this.unitIndex
  8021. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8022. this.$forceUpdate();
  8023. setTimeout(() => {
  8024. this.checkEva(this.checkId);
  8025. setTimeout(() => {
  8026. this.checkEva(this.checkId);
  8027. }, 100);
  8028. }, 1000);
  8029. }
  8030. } else {
  8031. if (this.steps == 1) {
  8032. if (this.cid == "" || this.cid == undefined) {
  8033. this.addWork();
  8034. } else {
  8035. if (this.userid != this.courseUserid && this.role != "1") {
  8036. this.updateWork2();
  8037. } else {
  8038. this.updateWork();
  8039. }
  8040. }
  8041. }
  8042. if (s == 1) {
  8043. this.steps = 1;
  8044. setTimeout(() => {
  8045. this.checkEva(this.checkId);
  8046. setTimeout(() => {
  8047. this.checkEva(this.checkId);
  8048. }, 100);
  8049. }, 100);
  8050. }
  8051. if (s == 3) {
  8052. this.cTemplate = this.templateC.content;
  8053. this.dialogVisible2 = false;
  8054. this.steps = 3;
  8055. this.isClickColor = 1;
  8056. this.unitJson[
  8057. this.unitIndex
  8058. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8059. this.$forceUpdate();
  8060. setTimeout(() => {
  8061. this.checkEva(this.checkId);
  8062. setTimeout(() => {
  8063. this.checkEva(this.checkId);
  8064. }, 100);
  8065. }, 1000);
  8066. }
  8067. }
  8068. this.$refs.stepBox.scrollTop = 0;
  8069. },
  8070. nextSteps(clickType, ttype) {
  8071. // if (this.cidType == 1) {
  8072. if (this.steps == 1) {
  8073. if (this.courseName != "") {
  8074. 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) {
  8075. // this.$message({
  8076. // message: "请回答完毕后再次发送",
  8077. // type: "warning"
  8078. // });
  8079. if(this.ttaskDetailLoading5.length){
  8080. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8081. this.$message({
  8082. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8083. type: "warning"
  8084. });
  8085. }
  8086. if(this.ttaskDetailLoading.length){
  8087. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8088. this.$message({
  8089. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8090. type: "warning"
  8091. });
  8092. }
  8093. if(this.cpotetLoading.cpote1){
  8094. this.$message({
  8095. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8096. type: "warning"
  8097. });
  8098. }
  8099. if(this.cpotetLoading.cpote2){
  8100. this.$message({
  8101. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8102. type: "warning"
  8103. });
  8104. }
  8105. if(this.cpotetLoading.cpote3){
  8106. this.$message({
  8107. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8108. type: "warning"
  8109. });
  8110. }
  8111. if(this.cpotetLoading.cpote4){
  8112. this.$message({
  8113. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8114. type: "warning"
  8115. });
  8116. }
  8117. return;
  8118. }
  8119. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8120. if(!this.courseText && !this.teacherCourseText){
  8121. this.$message.error("请生成简要描述后再生成大纲");
  8122. return;
  8123. }
  8124. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8125. this.openAiDialog(clickType, 'aiOutline2')
  8126. }else {
  8127. this.openAiDialog(clickType, 'aiOutline')
  8128. }
  8129. return;
  8130. }
  8131. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8132. let _type = ''
  8133. if(this.cpoteType == 0){
  8134. _type = 'aiCpote1'
  8135. }else if(this.cpoteType == 1){
  8136. _type = 'aiCpote2'
  8137. }else if(this.cpoteType == 2){
  8138. _type = 'aiCpote3'
  8139. }else if(this.cpoteType == 3){
  8140. _type = 'aiCpote4'
  8141. }
  8142. this.cpoteType++
  8143. this.openAiDialog(clickType, _type)
  8144. return;
  8145. }
  8146. // if (!this.isOutline2) {
  8147. // this.openAiDialog(clickType, 'aiTeacher')
  8148. // return;
  8149. // }
  8150. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8151. this.openAiDialog(clickType, 'aiTeacher3')
  8152. return;
  8153. }
  8154. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8155. this.openAiDialog(clickType, 'aiTeacher2')
  8156. return;
  8157. }
  8158. let _pan2 = 1
  8159. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8160. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8161. _pan2 = 2
  8162. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8163. break;
  8164. }
  8165. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8166. _pan2 = 2
  8167. this.$message.error(`请完善任务${k+1}的课程教案`)
  8168. break;
  8169. }
  8170. }
  8171. if(_pan2 == 2){
  8172. return;
  8173. }
  8174. const functionA = () => {
  8175. setTimeout(() => {
  8176. this.loading = false
  8177. this.steps = 3;
  8178. }, 0)
  8179. this.isClickColor = 1;
  8180. this.unitJson[
  8181. this.unitIndex
  8182. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8183. this.$forceUpdate();
  8184. setTimeout(() => {
  8185. this.checkEva(this.checkId);
  8186. setTimeout(() => {
  8187. this.checkEva(this.checkId);
  8188. }, 100);
  8189. }, 1000);
  8190. if (this.cid == "" || this.cid == undefined) {
  8191. this.addWork();
  8192. } else {
  8193. if (this.userid != this.courseUserid && this.role != "1") {
  8194. this.updateWork2();
  8195. } else {
  8196. this.updateWork();
  8197. }
  8198. }
  8199. }
  8200. if (this.cid) {
  8201. this.loading = true
  8202. functionA()
  8203. } else {
  8204. if(ttype == 2){
  8205. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8206. }else {
  8207. this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8208. }
  8209. }
  8210. } else {
  8211. this.$message.error("请补充填写课程名称");
  8212. return;
  8213. }
  8214. } else if (this.steps == 3) {
  8215. if (this.taskLoading.length) {
  8216. let _pan = 1
  8217. for(var k = 0; k < this.taskLoading.length; k++){
  8218. if(this.taskLoading[k]){
  8219. this.$message({
  8220. message: `请等待任务${k+1}回答完毕后再上传`,
  8221. type: "warning"
  8222. });
  8223. _pan = 2
  8224. }
  8225. }
  8226. if(_pan == 2){
  8227. return
  8228. }
  8229. }
  8230. if(this.taskGLoading.length){
  8231. let _pan = 1
  8232. for(var k = 0; k < this.taskGLoading.length; k++){
  8233. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8234. this.$message({
  8235. message: `请等待任务${k+1}回答完毕后再保存`,
  8236. type: "warning"
  8237. });
  8238. _pan = 2
  8239. }
  8240. }
  8241. if(_pan == 2){
  8242. return
  8243. }
  8244. }
  8245. if (this.cid == "" || this.cid == undefined) {
  8246. if (this.courseName == "") {
  8247. this.$message.error("请补充填写课程名称");
  8248. return;
  8249. } else {
  8250. this.addWork();
  8251. this.steps++;
  8252. }
  8253. } else {
  8254. if (this.courseName == "") {
  8255. this.$message.error("请补充填写课程名称");
  8256. return;
  8257. } else {
  8258. if (this.userid != this.courseUserid && this.role != "1") {
  8259. this.updateWork2();
  8260. } else {
  8261. this.updateWork();
  8262. }
  8263. this.steps++;
  8264. }
  8265. }
  8266. }
  8267. // } else {
  8268. // if (this.steps == 1) {
  8269. // if (this.courseName != "") {
  8270. // if (this.cid == "" || this.cid == undefined) {
  8271. // this.addWork();
  8272. // } else {
  8273. // if (this.userid != this.courseUserid && this.role != "1") {
  8274. // // this.updateWork2();
  8275. // } else {
  8276. // this.updateWork();
  8277. // }
  8278. // }
  8279. // this.steps++;
  8280. // } else {
  8281. // this.$message.error("请补充填写课程名称");
  8282. // return;
  8283. // }
  8284. // } else if (this.steps == 2) {
  8285. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8286. // this.cTemplate = this.templateC.content;
  8287. // }
  8288. // this.dialogVisible2 = false;
  8289. // this.steps++;
  8290. // setTimeout(() => {
  8291. // this.checkEva(this.checkId);
  8292. // setTimeout(() => {
  8293. // this.checkEva(this.checkId);
  8294. // }, 100);
  8295. // }, 1000);
  8296. // } else if (this.steps == 3) {
  8297. // if (this.cid == "" || this.cid == undefined) {
  8298. // if (this.courseName == "") {
  8299. // this.$message.error("请补充填写课程名称");
  8300. // return;
  8301. // } else {
  8302. // this.addWork();
  8303. // this.steps++;
  8304. // }
  8305. // } else {
  8306. // if (this.courseName == "") {
  8307. // this.$message.error("请补充填写课程名称");
  8308. // return;
  8309. // } else {
  8310. // if (this.userid != this.courseUserid && this.role != "1") {
  8311. // this.updateWork2();
  8312. // } else {
  8313. // this.updateWork();
  8314. // }
  8315. // this.steps++;
  8316. // }
  8317. // }
  8318. // }
  8319. // }
  8320. this.$refs.stepBox.scrollTop = 0;
  8321. },
  8322. unitSet(i) {
  8323. if (this.unitIndex == i) {
  8324. return;
  8325. }
  8326. this.unitIndex = i;
  8327. this.isClickColor = 1;
  8328. // this.$refs.rightboxR.scrollTop = 0;
  8329. this.$refs.unitBox.scrollTop = 0;
  8330. },
  8331. panUnitJson() {
  8332. let _unitIndex = this.unitIndex;
  8333. let cPan = 1;
  8334. for (
  8335. var j = 0;
  8336. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8337. j++
  8338. ) {
  8339. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8340. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8341. j
  8342. ].proVisible2 = false;
  8343. if (
  8344. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8345. .length > 1
  8346. ) {
  8347. for (
  8348. var z = 0;
  8349. z <
  8350. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8351. .length;
  8352. z++
  8353. ) {
  8354. if (
  8355. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8356. z
  8357. ].tool.length
  8358. ) {
  8359. this.$message.error("请把工具添加完整");
  8360. cPan = 2;
  8361. break;
  8362. }
  8363. }
  8364. }
  8365. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8366. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8367. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8368. (ele) => {
  8369. return ele.value != "";
  8370. }
  8371. );
  8372. }
  8373. }
  8374. return cPan;
  8375. },
  8376. unitOpen(i) {
  8377. if (this.unitJson[i].toolOpen) {
  8378. this.unitJson[i].toolOpen = false;
  8379. } else {
  8380. this.unitJson[i].toolOpen = true;
  8381. }
  8382. this.updateWork();
  8383. this.$forceUpdate();
  8384. },
  8385. unitSet2(i) {
  8386. if (this.panUnitJson() == 2) {
  8387. return;
  8388. }
  8389. // if(this.unitJson[i].toolOpen){
  8390. // this.unitJson[i].toolOpen = false
  8391. // this.updateWork()
  8392. // this.$forceUpdate()
  8393. // return
  8394. // }else {
  8395. this.unitJson[i].toolOpen = true;
  8396. // }
  8397. this.$forceUpdate();
  8398. if (this.unitIndex == i) {
  8399. return;
  8400. }
  8401. this.unitIndex = i;
  8402. this.isClickColor = 1;
  8403. // this.$refs.rightboxR.scrollTop = 0;
  8404. this.$refs.unitBox.scrollTop = 0;
  8405. },
  8406. updateCourseState(i) {
  8407. let params = [
  8408. {
  8409. cid: this.cid,
  8410. state: i,
  8411. },
  8412. ];
  8413. this.ajax
  8414. .post(this.$store.state.api + "updateCourseMode", params)
  8415. .then((res) => {
  8416. this.courseState = i;
  8417. })
  8418. .catch((err) => {
  8419. this.$message.error("网络不佳");
  8420. console.error(err);
  8421. });
  8422. },
  8423. addtips(){
  8424. let params = [
  8425. {
  8426. cid: this.cid,
  8427. tips: JSON.stringify(this.aiJson),
  8428. tid: this.templateid
  8429. },
  8430. ];
  8431. this.ajax
  8432. .post(this.$store.state.api + "addTips", params)
  8433. .then((res) => {
  8434. })
  8435. .catch((err) => {
  8436. this.$message.error("网络不佳");
  8437. console.error(err);
  8438. });
  8439. },
  8440. openSaveTips(){
  8441. this.dialogVisibleTips = true
  8442. },
  8443. time() {
  8444. if (!this.now) {
  8445. this.now = new Date().getTime();
  8446. return true;
  8447. } else {
  8448. let time = new Date().getTime();
  8449. if (time - this.now > 3000) {
  8450. this.now = time;
  8451. return true;
  8452. } else {
  8453. return false;
  8454. }
  8455. }
  8456. },
  8457. deleteUnit(i) {
  8458. var _this = this;
  8459. if (i == 0 && _this.unitJson.length == 1) {
  8460. _this
  8461. .$confirm("确定切换成任务模式吗?", "提示", {
  8462. confirmButtonText: "确定",
  8463. cancelButtonText: "取消",
  8464. type: "warning",
  8465. })
  8466. .then(() => {
  8467. _this.unitJson[i].dyName = "";
  8468. // _this.updateCourseState(2);
  8469. })
  8470. .catch(() => {
  8471. return;
  8472. });
  8473. } else {
  8474. _this
  8475. .$confirm("确定删除此阶段吗?", "提示", {
  8476. confirmButtonText: "确定",
  8477. cancelButtonText: "取消",
  8478. type: "warning",
  8479. })
  8480. .then(() => {
  8481. _this.isDelete = 2;
  8482. // _this.unitIndex = _this.unitIndex - 1;
  8483. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8484. // _this.$message.success("删除成功");
  8485. })
  8486. .catch(() => {
  8487. return;
  8488. });
  8489. }
  8490. },
  8491. deleteWork(chapid) {
  8492. let params = [
  8493. {
  8494. cid: this.cid,
  8495. chapters: JSON.stringify(this.unitJson),
  8496. uid: this.userid,
  8497. chapid: chapid,
  8498. },
  8499. ];
  8500. this.ajax
  8501. .post(this.$store.state.api + "deleteWork", params)
  8502. .then((res) => {
  8503. this.$message({
  8504. message: "删除成功",
  8505. type: "success",
  8506. });
  8507. let task = JSON.parse(
  8508. JSON.stringify(
  8509. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8510. )
  8511. );
  8512. this.unitJson.splice(this.unitIndex, 1);
  8513. if (this.unitIndex == 0) {
  8514. this.unitIndex = 0;
  8515. } else {
  8516. this.unitIndex = this.unitIndex - 1;
  8517. }
  8518. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8520. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8521. ...task,
  8522. ];
  8523. }
  8524. })
  8525. .catch((err) => {
  8526. this.$message.error("网络不佳");
  8527. console.error(err);
  8528. });
  8529. },
  8530. deleteTool(itemTaskIndex, i) {
  8531. var _this = this;
  8532. if (_this.time()) {
  8533. _this
  8534. .$confirm("确定删除此工具吗?", "提示", {
  8535. confirmButtonText: "确定",
  8536. cancelButtonText: "取消",
  8537. type: "warning",
  8538. })
  8539. .then(() => {
  8540. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8541. itemTaskIndex
  8542. ].toolChoose.splice(i, 1);
  8543. _this.$message.success("删除成功");
  8544. })
  8545. .catch(() => {
  8546. return;
  8547. });
  8548. }
  8549. },
  8550. deleteSentence(i) {
  8551. var _this = this;
  8552. _this
  8553. .$confirm("确定删除此题目吗?", "提示", {
  8554. confirmButtonText: "确定",
  8555. cancelButtonText: "取消",
  8556. type: "warning",
  8557. })
  8558. .then(() => {
  8559. _this.sentenceList.splice(i, 1);
  8560. _this.$message.success("删除成功");
  8561. })
  8562. .catch(() => {
  8563. return;
  8564. });
  8565. },
  8566. deleteS(s, i, j) {
  8567. this.sentenceList[i].addSentence.splice(j, 1);
  8568. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8569. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8570. this.sentenceList[i].rightAnswer.splice(a, 1);
  8571. }
  8572. },
  8573. openT() {
  8574. top.postMessage({ tools: "25" }, "*");
  8575. },
  8576. deleteTask(i) {
  8577. var _this = this;
  8578. if (_this.time()) {
  8579. _this
  8580. .$confirm(
  8581. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8582. 1 ==
  8583. i
  8584. ? "确定删除此任务吗?"
  8585. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8586. "提示",
  8587. {
  8588. confirmButtonText: "确定",
  8589. cancelButtonText: "取消",
  8590. type: "warning",
  8591. }
  8592. )
  8593. .then(() => {
  8594. if (i == 0 && _this.courseState == 4) {
  8595. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8596. i + 1
  8597. ].chapterData = JSON.parse(
  8598. JSON.stringify(
  8599. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8600. .chapterData
  8601. )
  8602. );
  8603. }
  8604. _this.$forceUpdate();
  8605. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8606. i,
  8607. 1
  8608. );
  8609. _this.$message.success("删除成功");
  8610. })
  8611. .catch(() => {
  8612. return;
  8613. });
  8614. }
  8615. },
  8616. deleteTask2(i) {
  8617. var _this = this;
  8618. if (_this.time()) {
  8619. _this
  8620. .$confirm(
  8621. "确定删除此任务吗?",
  8622. "提示",
  8623. {
  8624. confirmButtonText: "确定",
  8625. cancelButtonText: "取消",
  8626. type: "warning",
  8627. }
  8628. )
  8629. .then(() => {
  8630. if (i == 0 && _this.courseState == 4) {
  8631. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8632. i + 1
  8633. ].chapterData = JSON.parse(
  8634. JSON.stringify(
  8635. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8636. .chapterData
  8637. )
  8638. );
  8639. }
  8640. _this.$forceUpdate();
  8641. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8642. i,
  8643. 1
  8644. );
  8645. _this.$message.success("删除成功");
  8646. })
  8647. .catch(() => {
  8648. return;
  8649. });
  8650. }
  8651. },
  8652. handlePictureCardPreview(file) {
  8653. this.dialogImageUrl = file.url;
  8654. },
  8655. clean(i, c) {
  8656. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8657. },
  8658. handle_remove1(file, fileList, type) {
  8659. var _tmp = this.cover;
  8660. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8661. // if (_tmp[i].uid == file.uid) {
  8662. // _tmp.splice(i, 1);
  8663. // break;
  8664. // }
  8665. // this.cover = _tmp;
  8666. // }
  8667. this.cover = [];
  8668. this.noneBtnImg = this.cover.length >= 1;
  8669. this.isSysPic = false;
  8670. this.isSysPic2 = false;
  8671. this.$forceUpdate();
  8672. },
  8673. addImg(e) {
  8674. var el = e.currentTarget;
  8675. el.getElementsByTagName("input")[0].click();
  8676. e.target.value = "";
  8677. },
  8678. addChaptersTools(i) {
  8679. this.chapTools = [
  8680. {
  8681. tools: [],
  8682. toolDetail: "",
  8683. },
  8684. ];
  8685. this.chapCount = i;
  8686. this.dialogVisible4 = true;
  8687. },
  8688. isNoFinsh() {
  8689. this.$message.warning("功能正在开发中");
  8690. },
  8691. addAttText(i) {
  8692. this.AttText = {
  8693. title: "",
  8694. text: "",
  8695. };
  8696. this.taskCount = i;
  8697. this.AttTextType = 0;
  8698. this.$forceUpdate();
  8699. this.dialogVisible6 = true;
  8700. setTimeout(() => {
  8701. this.$refs["fuInput"].focus();
  8702. }, 100);
  8703. },
  8704. openLine(i) {
  8705. this.line = "";
  8706. this.lineCount = i;
  8707. this.lineType = 0;
  8708. this.$forceUpdate();
  8709. this.dialogVisible7 = true;
  8710. },
  8711. pasteLine(i) {
  8712. navigator.clipboard
  8713. .readText()
  8714. .then((v) => {
  8715. console.log("获取剪贴板成功:", v);
  8716. const html = v;
  8717. const regex = /src="(.*?)"/g;
  8718. const match = regex.exec(html);
  8719. if (match && match[1]) {
  8720. console.log(match[1]);
  8721. this.$message.success("粘贴成功");
  8722. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8723. i
  8724. ].chapterData.unshift({
  8725. name: "链接",
  8726. title: "嵌入代码",
  8727. url: match[1],
  8728. type: 8,
  8729. });
  8730. } else {
  8731. // console.log("未找到包含 src 属性的 iframe");
  8732. this.$message.error(
  8733. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8734. );
  8735. }
  8736. })
  8737. .catch((v) => {
  8738. console.log("获取剪贴板失败: ", v);
  8739. });
  8740. },
  8741. openSource(i) {
  8742. this.lineCount = i;
  8743. this.sourceData = {};
  8744. this.dialogVisibleSource = true;
  8745. this.updateSourcePan = false;
  8746. },
  8747. openAiCreate(i){
  8748. this.lineCount = i;
  8749. this.dialogVisibleAiCreate = true;
  8750. },
  8751. createAiPpt(json){
  8752. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8753. this.dialogVisibleAiCreate = false;
  8754. },
  8755. openAiCreateVideo(i){
  8756. this.lineCount = i;
  8757. this.dialogVisibleAiCreateVideo = true;
  8758. },
  8759. createAiVideo(json){
  8760. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8761. // this.dialogVisibleAiCreateVideo = false;
  8762. },
  8763. async createTeacherAn(index){
  8764. this.lineCount = index;
  8765. this.loading = true
  8766. let md = new MarkdownIt();
  8767. if(this.courseState == 4){
  8768. if(index == 0 || index){
  8769. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8770. let name = _task.task+'-教案'
  8771. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8772. await this.generate(name, _html, 0)
  8773. }else {
  8774. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8775. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8776. let name = _task.task+'-教案'
  8777. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8778. await this.generate(name, _html, 0)
  8779. }
  8780. }
  8781. }else if(this.courseState == 5){
  8782. if(index == 0 || index){
  8783. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8784. let name = _task.task+'-教案'
  8785. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8786. await this.generate(name, _html, index)
  8787. }else {
  8788. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8789. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8790. let name = _task.task+'-教案'
  8791. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8792. await this.generate(name, _html, i)
  8793. }
  8794. }
  8795. }
  8796. },
  8797. async generate(a, html, index) {
  8798. // <html lang="en">
  8799. // 将html文件中需要用到的数据挂载到store上
  8800. const content = `<!DOCTYPE html>
  8801. <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'>
  8802. <head>
  8803. <!--[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]-->
  8804. <meta charset="UTF-8">
  8805. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8806. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8807. <title>${a}</title>
  8808. <style>
  8809. table {
  8810. border-collapse: collapse; /* 折叠边框 */
  8811. width: 100%;
  8812. }
  8813. th, td {
  8814. border: 1px solid black; /* 线条样式 */
  8815. padding: 8px;
  8816. text-align: left;
  8817. }
  8818. </style>
  8819. </head>
  8820. <body>
  8821. ${html}
  8822. </body>
  8823. </html>`;
  8824. // debugger
  8825. const blob = htmlDocx.asBlob(content)
  8826. // debugger
  8827. let dname = a + ".docx";
  8828. // 创建文件流
  8829. // 创建bolb实例时,内容一定要放在[]中
  8830. // const blob = new Blob([content], {
  8831. // type: "text/plain;charset='utf-8'",
  8832. // });
  8833. // const file = new File([blob], dname, { type: 'application/msword' });
  8834. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  8835. await this.beforeUploadHtml(file, index)
  8836. },
  8837. beforeUploadHtml(event, index) {
  8838. var file = event;
  8839. var credentials = {
  8840. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8841. secretAccessKey: "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",
  8842. }; //秘钥形式的登录上传
  8843. window.AWS.config.update(credentials);
  8844. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8845. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8846. var _this = this;
  8847. if (file) {
  8848. var params = {
  8849. Key:
  8850. file.name.split(".")[0] +
  8851. new Date().getTime() +
  8852. "." +
  8853. file.name.split(".")[file.name.split(".").length - 1],
  8854. ContentType: file.type,
  8855. Body: file,
  8856. "Access-Control-Allow-Credentials": "*",
  8857. ACL: "public-read",
  8858. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8859. var options = {
  8860. partSize: 2048 * 1024 * 1024,
  8861. queueSize: 2,
  8862. leavePartsOnError: true,
  8863. };
  8864. bucket
  8865. .upload(params, options)
  8866. .on("httpUploadProgress", function (evt) {
  8867. //这里可以写进度条
  8868. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8869. })
  8870. .send(function (err, data) {
  8871. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8872. _this.loading = false
  8873. }
  8874. if(_this.courseState == 5){
  8875. _this.loading = false
  8876. }
  8877. if (err) {
  8878. _this.$message.error("上传失败");
  8879. } else {
  8880. let _index = 0
  8881. if(_this.lineCount == 0 || _this.lineCount){
  8882. _index = _this.lineCount
  8883. }else {
  8884. _index = index
  8885. }
  8886. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8887.                   name: file.name,
  8888.                   url: data.Location,
  8889.                   type: 3,
  8890.                 })
  8891. console.log(data.Location);
  8892. }
  8893. });
  8894. }
  8895. },
  8896. async generate2(a, html, index, callback) {
  8897. // 将html文件中需要用到的数据挂载到store上
  8898. const content = `<!DOCTYPE html>
  8899. <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'>
  8900. <head>
  8901. <!--[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]-->
  8902. <meta charset="UTF-8">
  8903. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8904. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8905. <title>${a}</title>
  8906. <style>
  8907. table {
  8908. border-collapse: collapse; /* 折叠边框 */
  8909. width: 100%;
  8910. }
  8911. th, td {
  8912. border: 1px solid black; /* 线条样式 */
  8913. padding: 8px;
  8914. text-align: left;
  8915. }
  8916. </style>
  8917. </head>
  8918. <body>
  8919. ${html}
  8920. </body>
  8921. </html>`;
  8922. const blob = htmlDocx.asBlob(content)
  8923. // debugger
  8924. let dname = a + ".docx";
  8925. // 创建文件流
  8926. // 创建bolb实例时,内容一定要放在[]中
  8927. // const blob = new Blob([content], {
  8928. // type: "text/plain;charset='utf-8'",
  8929. // });
  8930. // const file = new File([blob], dname, { type: 'application/msword' });
  8931. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  8932. await this.beforeUploadHtml2(file, index, callback)
  8933. },
  8934. beforeUploadHtml2(event, index, callback) {
  8935. var file = event;
  8936. var credentials = {
  8937. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8938. secretAccessKey: "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",
  8939. }; //秘钥形式的登录上传
  8940. window.AWS.config.update(credentials);
  8941. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8942. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8943. var _this = this;
  8944. if (file) {
  8945. var params = {
  8946. Key:
  8947. file.name.split(".")[0] +
  8948. new Date().getTime() +
  8949. "." +
  8950. file.name.split(".")[file.name.split(".").length - 1],
  8951. ContentType: file.type,
  8952. Body: file,
  8953. "Access-Control-Allow-Credentials": "*",
  8954. ACL: "public-read",
  8955. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8956. var options = {
  8957. partSize: 2048 * 1024 * 1024,
  8958. queueSize: 2,
  8959. leavePartsOnError: true,
  8960. };
  8961. bucket
  8962. .upload(params, options)
  8963. .on("httpUploadProgress", function (evt) {
  8964. //这里可以写进度条
  8965. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8966. })
  8967. .send(async function (err, data) {
  8968. if(_this.courseState == 5){
  8969. _this.loading = false
  8970. }
  8971. if (err) {
  8972. callback ? callback() : ''
  8973. _this.$message.error("上传失败");
  8974. } else {
  8975. let fileid = await _this.createFileid(data.Location)
  8976. // _this.cankaoInfoData.push({
  8977. //                   name: file.name,
  8978. //                   url: data.Location,
  8979. //                   type: 3,
  8980. // fileid: fileid,
  8981. //   })
  8982. _this.infoData2.push({
  8983.                   name: file.name,
  8984.                   url: data.Location,
  8985.                   type: 3,
  8986. fileid: fileid == 1 ? '' : fileid,
  8987.   })
  8988. console.log(data.Location);
  8989. callback ? callback() : ''
  8990. }
  8991. });
  8992. }
  8993. },
  8994. addSource() {
  8995. if (!Object.keys(this.sourceData).length) {
  8996. this.$message.error("请选择要上传的资源");
  8997. return;
  8998. }
  8999. let keys = Object.keys(this.sourceData);
  9000. for (var i = 0; i < keys.length; i++) {
  9001. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9002. this.lineCount
  9003. ].chapterData.unshift({
  9004. name: "链接",
  9005. title: this.sourceData[keys[i]].name,
  9006. url: this.sourceData[keys[i]].url,
  9007. type: 14,
  9008. id: keys[i],
  9009. });
  9010. }
  9011. this.$forceUpdate();
  9012. this.dialogVisibleSource = false;
  9013. },
  9014. updateSource() {
  9015. if (!Object.keys(this.sourceData).length) {
  9016. this.$message.error("请选择要上传的资源");
  9017. return;
  9018. }
  9019. let keys = Object.keys(this.sourceData);
  9020. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9021. this.taskCount
  9022. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9023. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9024. this.taskCount
  9025. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9026. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9027. this.taskCount
  9028. ].chapterData[this.lineCount].id = keys[0];
  9029. this.updateSourcePan = false;
  9030. this.$forceUpdate();
  9031. this.dialogVisibleSource = false;
  9032. },
  9033. deleteM(i, j) {
  9034. this.testJson.testJson[i].timuList.splice(j, 1);
  9035. },
  9036. beforeUploadTiMu(event, i) {
  9037. const loading = this.openLoading();
  9038. var file = event.target.files[0];
  9039. var credentials = {
  9040. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9041. secretAccessKey: "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",
  9042. }; //秘钥形式的登录上传
  9043. window.AWS.config.update(credentials);
  9044. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9045. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9046. var _this = this;
  9047. if (file) {
  9048. var params = {
  9049. Key:
  9050. file.name.split(".")[0] +
  9051. new Date().getTime() +
  9052. "." +
  9053. file.name.split(".")[file.name.split(".").length - 1],
  9054. ContentType: file.type,
  9055. Body: file,
  9056. "Access-Control-Allow-Credentials": "*",
  9057. ACL: "public-read",
  9058. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9059. var options = {
  9060. partSize: 2048 * 1024 * 1024,
  9061. queueSize: 2,
  9062. leavePartsOnError: true,
  9063. };
  9064. bucket
  9065. .upload(params, options)
  9066. .on("httpUploadProgress", function (evt) {
  9067. //这里可以写进度条
  9068. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9069. })
  9070. .send(function (err, data) {
  9071. loading.close();
  9072. if (err) {
  9073. _this.$message.error("上传失败");
  9074. } else {
  9075. if (_this.testJson.testJson[i].timuList) {
  9076. _this.testJson.testJson[i].timuList.push({
  9077. src: data.Location,
  9078. });
  9079. } else {
  9080. _this.testJson.testJson[i].timuList = [];
  9081. _this.testJson.testJson[i].timuList.push({
  9082. src: data.Location,
  9083. });
  9084. }
  9085. _this.imgChange3(i);
  9086. _this.$forceUpdate();
  9087. }
  9088. });
  9089. }
  9090. },
  9091. beforeUploadTi(event, i, j) {
  9092. const loading = this.openLoading();
  9093. var file = event.target.files[0];
  9094. var credentials = {
  9095. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9096. secretAccessKey: "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",
  9097. }; //秘钥形式的登录上传
  9098. window.AWS.config.update(credentials);
  9099. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9100. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9101. var _this = this;
  9102. if (file) {
  9103. var params = {
  9104. Key:
  9105. file.name.split(".")[0] +
  9106. new Date().getTime() +
  9107. "." +
  9108. file.name.split(".")[file.name.split(".").length - 1],
  9109. ContentType: file.type,
  9110. Body: file,
  9111. "Access-Control-Allow-Credentials": "*",
  9112. ACL: "public-read",
  9113. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9114. var options = {
  9115. partSize: 2048 * 1024 * 1024,
  9116. queueSize: 2,
  9117. leavePartsOnError: true,
  9118. };
  9119. bucket
  9120. .upload(params, options)
  9121. .on("httpUploadProgress", function (evt) {
  9122. //这里可以写进度条
  9123. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9124. })
  9125. .send(function (err, data) {
  9126. loading.close();
  9127. if (err) {
  9128. _this.$message.error("上传失败");
  9129. } else {
  9130. _this.testJson.testJson[i].checkList[j] = {};
  9131. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9132. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9133. _this.imgChange2(i, j);
  9134. _this.$forceUpdate();
  9135. }
  9136. });
  9137. }
  9138. },
  9139. beforeUpload1(event, type) {
  9140. // const loading = this.openLoading();
  9141. var file = event.target.files[0];
  9142. var credentials = {
  9143. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9144. secretAccessKey: "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",
  9145. }; //秘钥形式的登录上传
  9146. window.AWS.config.update(credentials);
  9147. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9148. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9149. var _this = this;
  9150. if (file) {
  9151. var params = {
  9152. Key:
  9153. file.name.split(".")[0] +
  9154. new Date().getTime() +
  9155. "." +
  9156. file.name.split(".")[file.name.split(".").length - 1],
  9157. ContentType: file.type,
  9158. Body: file,
  9159. "Access-Control-Allow-Credentials": "*",
  9160. ACL: "public-read",
  9161. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9162. var options = {
  9163. partSize: 2048 * 1024 * 1024,
  9164. queueSize: 2,
  9165. leavePartsOnError: true,
  9166. };
  9167. bucket
  9168. .upload(params, options)
  9169. .on("httpUploadProgress", function (evt) {
  9170. //这里可以写进度条
  9171. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9172. })
  9173. .send(function (err, data) {
  9174. // loading.close();
  9175. if (err) {
  9176. // var a = _this.$refs.upload1.uploadFiles;
  9177. // a.splice(a.length - 1, a.length);
  9178. _this.$message.error("上传失败");
  9179. } else {
  9180. // _this.cover.push({
  9181. // name: file.name,
  9182. // url: data.Location,
  9183. // uid: file.uid,
  9184. // });
  9185. _this.cover = [
  9186. {
  9187. name: file.name,
  9188. url: data.Location,
  9189. uid: file.uid,
  9190. },
  9191. ];
  9192. _this.imgChange1(null, null, 1, null);
  9193. _this.choosePicVisible = false;
  9194. console.log(data.Location);
  9195. }
  9196. });
  9197. }
  9198. },
  9199. beforeUploadSelect(event, type) {
  9200. // const loading = this.openLoading();
  9201. var file = event.target.files[0];
  9202. var credentials = {
  9203. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9204. secretAccessKey: "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",
  9205. }; //秘钥形式的登录上传
  9206. window.AWS.config.update(credentials);
  9207. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9208. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9209. var _this = this;
  9210. if (file) {
  9211. var params = {
  9212. Key:
  9213. file.name.split(".")[0] +
  9214. new Date().getTime() +
  9215. "." +
  9216. file.name.split(".")[file.name.split(".").length - 1],
  9217. ContentType: file.type,
  9218. Body: file,
  9219. "Access-Control-Allow-Credentials": "*",
  9220. ACL: "public-read",
  9221. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9222. var options = {
  9223. partSize: 2048 * 1024 * 1024,
  9224. queueSize: 2,
  9225. leavePartsOnError: true,
  9226. };
  9227. bucket
  9228. .upload(params, options)
  9229. .on("httpUploadProgress", function (evt) {
  9230. //这里可以写进度条
  9231. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9232. })
  9233. .send(function (err, data) {
  9234. // loading.close();
  9235. if (err) {
  9236. _this.$message.error("上传失败");
  9237. } else {
  9238. _this.selectJson.url = data.Location;
  9239. console.log(data.Location);
  9240. }
  9241. });
  9242. }
  9243. },
  9244. chooseSysPic(p) {
  9245. this.cover = [];
  9246. setTimeout(() => {
  9247. this.cover[0] = {
  9248. name: "系统图片.png",
  9249. url: p,
  9250. };
  9251. this.imgChange1(null, null, 1, null);
  9252. this.$forceUpdate();
  9253. }, 0);
  9254. this.isSysPic = true;
  9255. this.isSysPic2 = false;
  9256. this.sysPicVisible = false;
  9257. this.$forceUpdate();
  9258. },
  9259. chooseSysPic2(p) {
  9260. this.cover = [];
  9261. setTimeout(() => {
  9262. this.cover[0] = {
  9263. name: "网络图片.png",
  9264. url: p,
  9265. };
  9266. this.imgChange1(null, null, 1, null);
  9267. this.$forceUpdate();
  9268. }, 0);
  9269. this.isSysPic2 = true;
  9270. this.isSysPic = false;
  9271. this.sysPicVisible2 = false;
  9272. this.$forceUpdate();
  9273. },
  9274. beforeUpload(data) {
  9275. this.$refs.upload1.uploadFiles;
  9276. this.uploadLoading1 = true;
  9277. var file = data.file;
  9278. var credentials = {
  9279. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9280. secretAccessKey: "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",
  9281. }; //秘钥形式的登录上传
  9282. window.AWS.config.update(credentials);
  9283. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9284. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9285. var _this = this;
  9286. if (file) {
  9287. var params = {
  9288. Key:
  9289. file.name.split(".")[0] +
  9290. new Date().getTime() +
  9291. "." +
  9292. file.name.split(".")[file.name.split(".").length - 1],
  9293. ContentType: file.type,
  9294. Body: file,
  9295. "Access-Control-Allow-Credentials": "*",
  9296. ACL: "public-read",
  9297. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9298. var options = {
  9299. partSize: 2048 * 1024 * 1024,
  9300. queueSize: 2,
  9301. leavePartsOnError: true,
  9302. };
  9303. bucket
  9304. .upload(params, options)
  9305. .on("httpUploadProgress", function (evt) {
  9306. //这里可以写进度条
  9307. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9308. })
  9309. .send(function (err, data) {
  9310. _this.uploadLoading1 = false;
  9311. if (err) {
  9312. // var a = _this.$refs.upload1.uploadFiles;
  9313. // a.splice(a.length - 1, a.length);
  9314. _this.$message.error("上传失败");
  9315. } else {
  9316. //上传成功处理
  9317. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9318. name: file.name,
  9319. url: data.Location,
  9320. uid: file.uid,
  9321. });
  9322. _this.imgChange();
  9323. console.log(data.Location);
  9324. }
  9325. });
  9326. }
  9327. },
  9328. onExceed() {
  9329. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9330. },
  9331. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9332. let file = "";
  9333. let cfindex2 = 0;
  9334. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9335. // var file = event.target.files[0];
  9336. file = event.target.files[cfindex];
  9337. let fileName = file.name
  9338. let fileUid = file.uid
  9339. // const loading = this.openLoading();
  9340. // var file = event.target.files[0];
  9341. var credentials = {
  9342. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9343. secretAccessKey: "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",
  9344. }; //秘钥形式的登录上传
  9345. window.AWS.config.update(credentials);
  9346. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9347. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9348. var _this = this;
  9349. if (type == 3) {
  9350. var b = [
  9351. "DOC",
  9352. "DOCX",
  9353. "DOCM",
  9354. "DOTM",
  9355. "DOTX",
  9356. "PPTX",
  9357. "PPSX",
  9358. "PPT",
  9359. "PPS",
  9360. "PPTM",
  9361. "POTM",
  9362. "PPAM",
  9363. "POTX",
  9364. "PPSM",
  9365. ];
  9366. if (
  9367. b.indexOf(
  9368. file.name
  9369. .split(".")
  9370. [file.name.split(".").length - 1].toLocaleUpperCase()
  9371. ) != -1
  9372. ) {
  9373. if (file.size / 1024 / 1024 > 80) {
  9374. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9375. this.inputShow = true;
  9376. // var a = _this.$refs.upload1.uploadFiles;
  9377. // a.splice(a.length - 1, a.length);
  9378. // loading.close();
  9379. return;
  9380. }
  9381. } else if (
  9382. file.name
  9383. .split(".")
  9384. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9385. ) {
  9386. if (file.size / 1024 / 1024 > 80) {
  9387. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9388. this.inputShow = true;
  9389. // var a = _this.$refs.upload1.uploadFiles;
  9390. // a.splice(a.length - 1, a.length);
  9391. // loading.close();
  9392. return;
  9393. }
  9394. }
  9395. }
  9396. this.inputShow = false;
  9397. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9398. // itemTaskIndex
  9399. // ].progress = 0;
  9400. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9401. itemTaskIndex
  9402. ].proVisible = true;
  9403. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9404. itemTaskIndex
  9405. ].isFinishSize = 0;
  9406. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9407. itemTaskIndex
  9408. ].isAllSize = event.target.files.length;
  9409. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9410. // itemTaskIndex
  9411. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9412. _this.$forceUpdate();
  9413. if (file) {
  9414. var params = {
  9415. Key:
  9416. file.name.split(".")[0] +
  9417. new Date().getTime() +
  9418. "." +
  9419. file.name.split(".")[file.name.split(".").length - 1],
  9420. ContentType: file.type,
  9421. Body: file,
  9422. "Access-Control-Allow-Credentials": "*",
  9423. ACL: "public-read",
  9424. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9425. var options = {
  9426. partSize: 2048 * 1024 * 1024,
  9427. queueSize: 2,
  9428. leavePartsOnError: true,
  9429. };
  9430. bucket
  9431. .upload(params, options)
  9432. .on("httpUploadProgress", function (evt) {
  9433. //这里可以写进度条
  9434. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9435. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9436. // itemTaskIndex
  9437. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9438. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9439. // itemTaskIndex
  9440. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9441. // _this.$forceUpdate();
  9442. })
  9443. .send(function (err, data) {
  9444. cfindex2++
  9445. // loading.close();
  9446. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9447. // itemTaskIndex
  9448. // ].progress = 100;
  9449. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9450. itemTaskIndex
  9451. ].isFinishSize = cfindex2
  9452. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9453. // itemTaskIndex
  9454. // ].isAllSize;
  9455. _this.$forceUpdate();
  9456. setTimeout(() => {
  9457. if (
  9458. cfindex2 == event.target.files.length ||
  9459. cfindex2 > event.target.files.length
  9460. ) {
  9461. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9462. itemTaskIndex
  9463. ].proVisible = false;
  9464. }
  9465. _this.$forceUpdate();
  9466. }, 1000);
  9467. _this.inputShow = true;
  9468. if (err) {
  9469. // var a = _this.$refs.upload1.uploadFiles;
  9470. // a.splice(a.length - 1, a.length);
  9471. _this.$message.error("上传失败");
  9472. } else {
  9473. if (type == 13) {
  9474. let _type = 2;
  9475. var imgA = [
  9476. "png",
  9477. "jpg",
  9478. "jpeg",
  9479. "bmp",
  9480. "gif",
  9481. "webp",
  9482. "psd",
  9483. "svg",
  9484. "tiff",
  9485. ];
  9486. var fileA = [
  9487. "PDF",
  9488. "DOC",
  9489. "DOCX",
  9490. "DOCM",
  9491. "DOTM",
  9492. "DOTX",
  9493. "PPTX",
  9494. "PPSX",
  9495. "PPT",
  9496. "PPS",
  9497. "PPTM",
  9498. "POTM",
  9499. "PPAM",
  9500. "POTX",
  9501. "PPSM",
  9502. "XLSX",
  9503. "XLS",
  9504. ];
  9505. var videoA = [
  9506. "AVI",
  9507. "NAVI",
  9508. "MPEG",
  9509. "ASF",
  9510. "MOV",
  9511. "WMV",
  9512. "3GP",
  9513. "RM",
  9514. "RMVB",
  9515. "FLV",
  9516. "F4V",
  9517. "H.264",
  9518. "H.265",
  9519. "REAL VIDEO",
  9520. "MKV",
  9521. "WebM",
  9522. "HDDVD",
  9523. "MP4",
  9524. "MPG",
  9525. "M4V",
  9526. "MGV",
  9527. "OGV",
  9528. "QTM",
  9529. "STR",
  9530. "AMC",
  9531. "DVX",
  9532. "EVO",
  9533. "DAT",
  9534. "OGG",
  9535. "OGM",
  9536. ];
  9537. if (
  9538. fileA.indexOf(
  9539. data.Location.split(".")[
  9540. data.Location.split(".").length - 1
  9541. ].toLocaleUpperCase()
  9542. ) != -1
  9543. ) {
  9544. _type = 3;
  9545. } else if (
  9546. videoA.indexOf(
  9547. data.Location.split(".")[
  9548. data.Location.split(".").length - 1
  9549. ].toLocaleUpperCase()
  9550. ) != -1
  9551. ) {
  9552. _type = 2;
  9553. } else if (
  9554. imgA.indexOf(
  9555. data.Location.split(".")[
  9556. data.Location.split(".").length - 1
  9557. ].toLocaleLowerCase()
  9558. ) != -1
  9559. ) {
  9560. _type = 13;
  9561. } else {
  9562. _type = 12;
  9563. }
  9564. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9565. itemTaskIndex
  9566. ].chapterData.unshift({
  9567. name: fileName,
  9568. url: data.Location,
  9569. uid: fileUid,
  9570. type: _type,
  9571. });
  9572. _this.imgChange1(null, null, _type, itemTaskIndex);
  9573. } else if (type == 2 || type == 3 || type == 12) {
  9574. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9575. itemTaskIndex
  9576. ].chapterData.unshift({
  9577. name: fileName,
  9578. url: data.Location,
  9579. uid: fileUid,
  9580. type: type,
  9581. });
  9582. _this.imgChange1(null, null, type, itemTaskIndex);
  9583. } else if (type == 4) {
  9584. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9585. itemTaskIndex
  9586. ].fileList1.push({
  9587. name: fileName,
  9588. url: data.Location,
  9589. uid: fileUid,
  9590. });
  9591. _this.imgChange1(null, null, type, itemTaskIndex);
  9592. } else if (type == 5) {
  9593. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9594. itemTaskIndex
  9595. ].homeworkList.push({
  9596. name: fileName,
  9597. url: data.Location,
  9598. uid: fileUid,
  9599. });
  9600. _this.imgChange1(null, null, type, itemTaskIndex);
  9601. }
  9602. console.log(data.Location);
  9603. }
  9604. });
  9605. }
  9606. }
  9607. },
  9608. beforeUploadInfo2(event, type, tindex) {
  9609. // const loading = this.openLoading();
  9610. let file = "";
  9611. let cfindex2 = 0;
  9612. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9613. // var file = event.target.files[0];
  9614. file = event.target.files[cfindex];
  9615. let fileName = file.name
  9616. let fileUid = file.uid
  9617. var credentials = {
  9618. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9619. secretAccessKey: "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",
  9620. }; //秘钥形式的登录上传
  9621. window.AWS.config.update(credentials);
  9622. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9623. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9624. var _this = this;
  9625. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9626. if (
  9627. ['DOC'].indexOf(
  9628. file.name
  9629. .split(".")
  9630. [file.name.split(".").length - 1].toLocaleUpperCase()
  9631. ) !== -1
  9632. ) {
  9633. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  9634. this.inputShow = true;
  9635. return;
  9636. }
  9637. if (
  9638. xianObj.indexOf(
  9639. file.name
  9640. .split(".")
  9641. [file.name.split(".").length - 1].toLocaleUpperCase()
  9642. ) == -1
  9643. ) {
  9644. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9645. this.inputShow = true;
  9646. // var a = _this.$refs.upload1.uploadFiles;
  9647. // a.splice(a.length - 1, a.length);
  9648. // loading.close();
  9649. return;
  9650. }
  9651. if (type == 3) {
  9652. var b = [
  9653. "DOC",
  9654. "DOCX",
  9655. "DOCM",
  9656. "DOTM",
  9657. "DOTX",
  9658. "PPTX",
  9659. "PPSX",
  9660. "PPT",
  9661. "PPS",
  9662. "PPTM",
  9663. "POTM",
  9664. "PPAM",
  9665. "POTX",
  9666. "PPSM",
  9667. ];
  9668. if (
  9669. b.indexOf(
  9670. file.name
  9671. .split(".")
  9672. [file.name.split(".").length - 1].toLocaleUpperCase()
  9673. ) != -1
  9674. ) {
  9675. if (file.size / 1024 / 1024 > 80) {
  9676. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9677. this.inputShow = true;
  9678. // var a = _this.$refs.upload1.uploadFiles;
  9679. // a.splice(a.length - 1, a.length);
  9680. // loading.close();
  9681. return;
  9682. }
  9683. } else if (
  9684. file.name
  9685. .split(".")
  9686. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9687. ) {
  9688. if (file.size / 1024 / 1024 > 80) {
  9689. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9690. this.inputShow = true;
  9691. // var a = _this.$refs.upload1.uploadFiles;
  9692. // a.splice(a.length - 1, a.length);
  9693. // loading.close();
  9694. return;
  9695. }
  9696. }
  9697. }
  9698. this.inputShow = false;
  9699. if(type == 14){
  9700. // _this.teacherinfoprogress = 0;
  9701. _this.teacherinfoproVisible = true;
  9702. _this.teacherinfoisFinishSize = 0;
  9703. _this.teacherinfoisAllSize = event.target.files.length;
  9704. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9705. }else if(type == 16){
  9706. _this.mubiaoinfoprogress = 0;
  9707. _this.mubiaoinfoproVisible = true;
  9708. _this.mubiaoinfoisFinishSize = 0;
  9709. _this.mubiaoinfoisAllSize = event.target.files.length;
  9710. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9711. }else if(type == 17){
  9712. _this.xuanzeinfoprogress = 0;
  9713. _this.xuanzeinfoproVisible = true;
  9714. _this.xuanzeinfoisFinishSize = 0;
  9715. _this.xuanzeinfoisAllSize = event.target.files.length;
  9716. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9717. }else if(type == 18){
  9718. _this.pingjiainfoprogress[tindex] = 0;
  9719. _this.pingjiainfoproVisible[tindex] = true;
  9720. _this.pingjiainfoisFinishSize[tindex] = 0;
  9721. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  9722. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  9723. }else{
  9724. _this.infoprogress = 0;
  9725. _this.infoproVisible = true;
  9726. _this.infoisFinishSize = 0;
  9727. _this.infoisAllSize = event.target.files.length;
  9728. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9729. }
  9730. _this.$forceUpdate();
  9731. if (file) {
  9732. var params = {
  9733. Key:
  9734. file.name.split(".")[0] +
  9735. new Date().getTime() +
  9736. "." +
  9737. file.name.split(".")[file.name.split(".").length - 1],
  9738. ContentType: file.type,
  9739. Body: file,
  9740. "Access-Control-Allow-Credentials": "*",
  9741. ACL: "public-read",
  9742. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9743. var options = {
  9744. partSize: 2048 * 1024 * 1024,
  9745. queueSize: 2,
  9746. leavePartsOnError: true,
  9747. };
  9748. bucket
  9749. .upload(params, options)
  9750. .on("httpUploadProgress", function (evt) {
  9751. //这里可以写进度条
  9752. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9753. // if(type == 14){
  9754. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9755. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9756. // }else if(type == 16){
  9757. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9758. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9759. // }else if(type == 17){
  9760. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9761. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9762. // }else if(type == 18){
  9763. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  9764. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  9765. // }else {
  9766. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9767. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9768. // }
  9769. _this.$forceUpdate();
  9770. })
  9771. .send(async function (err, data) {
  9772. // loading.close();
  9773. // if(type == 14){
  9774. // _this.teacherinfoprogress = 100;
  9775. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9776. // }else if(type == 16){
  9777. // _this.mubiaoinfoprogress = 100;
  9778. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  9779. // }else if(type == 17){
  9780. // _this.xuanzeinfoprogress = 100;
  9781. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  9782. // }else if(type == 18){
  9783. // _this.pingjiainfoprogress[tindex] = 100;
  9784. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  9785. // }else {
  9786. // _this.infoprogress = 100;
  9787. // _this.infoisFinishSize = _this.infoisAllSize;
  9788. // }
  9789. _this.$forceUpdate();
  9790. _this.inputShow = true;
  9791. if (err) {
  9792. cfindex2++;
  9793. if(type == 14){
  9794. _this.teacherinfoisFinishSize = cfindex2;
  9795. }else if(type == 16){
  9796. _this.mubiaoinfoisFinishSize = cfindex2;
  9797. }else if(type == 17){
  9798. _this.xuanzeinfoisFinishSize = cfindex2;
  9799. }else if(type == 18){
  9800. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9801. }else {
  9802. _this.infoisFinishSize = cfindex2;
  9803. }
  9804. setTimeout(() => {
  9805. if (
  9806. cfindex2 == event.target.files.length ||
  9807. cfindex2 > event.target.files.length
  9808. ) {
  9809. if(type == 14){
  9810. _this.teacherinfoproVisible = false;
  9811. }else if(type == 16){
  9812. _this.mubiaoinfoproVisible = false;
  9813. }else if(type == 17){
  9814. _this.xuanzeinfoproVisible = false;
  9815. }else if(type == 18){
  9816. _this.pingjiainfoproVisible[tindex] = false;
  9817. }else{
  9818. _this.infoproVisible = false;
  9819. }
  9820. }
  9821. _this.$forceUpdate();
  9822. }, 1000);
  9823. // var a = _this.$refs.upload1.uploadFiles;
  9824. // a.splice(a.length - 1, a.length);
  9825. _this.$message.error("上传失败");
  9826. } else {
  9827. let fileid = await _this.createFileid(data.Location)
  9828. if(fileid){
  9829. cfindex2++;
  9830. if(type == 14){
  9831. _this.teacherinfoisFinishSize = cfindex2;
  9832. }else if(type == 16){
  9833. _this.mubiaoinfoisFinishSize = cfindex2;
  9834. }else if(type == 17){
  9835. _this.xuanzeinfoisFinishSize = cfindex2;
  9836. }else if(type == 18){
  9837. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9838. }else {
  9839. _this.infoisFinishSize = cfindex2;
  9840. }
  9841. if (
  9842. cfindex2 == event.target.files.length ||
  9843. cfindex2 > event.target.files.length
  9844. ) {
  9845. if(type == 14){
  9846. _this.teacherinfoproVisible = false;
  9847. }else if(type == 16){
  9848. _this.mubiaoinfoproVisible = false;
  9849. }else if(type == 17){
  9850. _this.xuanzeinfoproVisible = false;
  9851. }else if(type == 18){
  9852. _this.pingjiainfoproVisible[tindex] = false;
  9853. }else{
  9854. _this.infoproVisible = false;
  9855. }
  9856. }
  9857. _this.$forceUpdate();
  9858. }
  9859. if(fileid == 1){
  9860. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  9861. return;
  9862. }
  9863. var imgA = [
  9864. "png",
  9865. "jpg",
  9866. "jpeg",
  9867. "bmp",
  9868. "gif",
  9869. "webp",
  9870. "psd",
  9871. "svg",
  9872. "tiff",
  9873. ];
  9874. var fileA = [
  9875. "PDF",
  9876. "DOC",
  9877. "DOCX",
  9878. "DOCM",
  9879. "DOTM",
  9880. "DOTX",
  9881. "PPTX",
  9882. "PPSX",
  9883. "PPT",
  9884. "PPS",
  9885. "PPTM",
  9886. "POTM",
  9887. "PPAM",
  9888. "POTX",
  9889. "PPSM",
  9890. "XLSX",
  9891. "XLS",
  9892. ];
  9893. var videoA = [
  9894. "AVI",
  9895. "NAVI",
  9896. "MPEG",
  9897. "ASF",
  9898. "MOV",
  9899. "WMV",
  9900. "3GP",
  9901. "RM",
  9902. "RMVB",
  9903. "FLV",
  9904. "F4V",
  9905. "H.264",
  9906. "H.265",
  9907. "REAL VIDEO",
  9908. "MKV",
  9909. "WebM",
  9910. "HDDVD",
  9911. "MP4",
  9912. "MPG",
  9913. "M4V",
  9914. "MGV",
  9915. "OGV",
  9916. "QTM",
  9917. "STR",
  9918. "AMC",
  9919. "DVX",
  9920. "EVO",
  9921. "DAT",
  9922. "OGG",
  9923. "OGM",
  9924. ];
  9925. let _type = 2;
  9926. if (
  9927. fileA.indexOf(
  9928. data.Location.split(".")[
  9929. data.Location.split(".").length - 1
  9930. ].toLocaleUpperCase()
  9931. ) != -1
  9932. ) {
  9933. _type = 3;
  9934. } else if (
  9935. videoA.indexOf(
  9936. data.Location.split(".")[
  9937. data.Location.split(".").length - 1
  9938. ].toLocaleUpperCase()
  9939. ) != -1
  9940. ) {
  9941. _type = 2;
  9942. } else if (
  9943. imgA.indexOf(
  9944. data.Location.split(".")[
  9945. data.Location.split(".").length - 1
  9946. ].toLocaleLowerCase()
  9947. ) != -1
  9948. ) {
  9949. _type = 13;
  9950. } else {
  9951. _type = 12;
  9952. }
  9953. if (type == 13) {
  9954. _this.infoData.push({
  9955. name: fileName,
  9956. url: data.Location,
  9957. uid: fileUid,
  9958. type: _type,
  9959. fileid: fileid == 1 ? '' : fileid,
  9960. });
  9961. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9962. name: fileName,
  9963. url: data.Location,
  9964. uid: fileUid,
  9965. type: _type,
  9966. fileid: fileid == 1 ? '' : fileid,
  9967. })
  9968. }else if (type == 14) {
  9969. _this.teacherInfoData.push({
  9970. name: fileName,
  9971. url: data.Location,
  9972. uid: fileUid,
  9973. type: _type,
  9974. fileid: fileid == 1 ? '' : fileid,
  9975. });
  9976. _this.infoData2.push({
  9977. name: fileName,
  9978. url: data.Location,
  9979. uid: fileUid,
  9980. type: _type,
  9981. fileid: fileid == 1 ? '' : fileid,
  9982. });
  9983. _this.infoData.push({
  9984. name: fileName,
  9985. url: data.Location,
  9986. uid: fileUid,
  9987. type: _type,
  9988. fileid: fileid == 1 ? '' : fileid,
  9989. });
  9990. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9991. name: fileName,
  9992. url: data.Location,
  9993. uid: fileUid,
  9994. type: _type,
  9995. fileid: fileid == 1 ? '' : fileid,
  9996. })
  9997. }else if (type == 15) {
  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 == 16) {
  10020. _this.mubiaoInfoData.push({
  10021. name: fileName,
  10022. url: data.Location,
  10023. uid: fileUid,
  10024. type: _type,
  10025. fileid: fileid == 1 ? '' : fileid,
  10026. });
  10027. }else if (type == 17) {
  10028. _this.xuanzeInfoData.push({
  10029. name: fileName,
  10030. url: data.Location,
  10031. uid: fileUid,
  10032. type: _type,
  10033. fileid: fileid == 1 ? '' : fileid,
  10034. });
  10035. }else if (type == 18) {
  10036. if(!_this.pingjiaInfoData[tindex]){
  10037. _this.pingjiaInfoData[tindex] = []
  10038. }
  10039. _this.pingjiaInfoData[tindex].push({
  10040. name: fileName,
  10041. url: data.Location,
  10042. uid: fileUid,
  10043. type: _type,
  10044. fileid: fileid == 1 ? '' : fileid,
  10045. });
  10046. }
  10047. console.log(data.Location);
  10048. console.log(fileid);
  10049. }
  10050. });
  10051. }
  10052. }
  10053. },
  10054. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10055. // const loading = this.openLoading();
  10056. var file = event.target.files[0];
  10057. var credentials = {
  10058. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10059. secretAccessKey: "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",
  10060. }; //秘钥形式的登录上传
  10061. window.AWS.config.update(credentials);
  10062. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10063. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10064. var _this = this;
  10065. if (type == 3) {
  10066. var b = [
  10067. "DOC",
  10068. "DOCX",
  10069. "DOCM",
  10070. "DOTM",
  10071. "DOTX",
  10072. "PPTX",
  10073. "PPSX",
  10074. "PPT",
  10075. "PPS",
  10076. "PPTM",
  10077. "POTM",
  10078. "PPAM",
  10079. "POTX",
  10080. "PPSM",
  10081. ];
  10082. if (
  10083. b.indexOf(
  10084. file.name
  10085. .split(".")
  10086. [file.name.split(".").length - 1].toLocaleUpperCase()
  10087. ) != -1
  10088. ) {
  10089. if (file.size / 1024 / 1024 > 80) {
  10090. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10091. this.inputShow = true;
  10092. // var a = _this.$refs.upload1.uploadFiles;
  10093. // a.splice(a.length - 1, a.length);
  10094. // loading.close();
  10095. return;
  10096. }
  10097. } else if (
  10098. file.name
  10099. .split(".")
  10100. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10101. ) {
  10102. if (file.size / 1024 / 1024 > 80) {
  10103. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10104. this.inputShow = true;
  10105. // var a = _this.$refs.upload1.uploadFiles;
  10106. // a.splice(a.length - 1, a.length);
  10107. // loading.close();
  10108. return;
  10109. }
  10110. }
  10111. }
  10112. this.inputShow = false;
  10113. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10114. itemTaskIndex
  10115. ].progress = 0;
  10116. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10117. itemTaskIndex
  10118. ].proVisible = true;
  10119. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10120. itemTaskIndex
  10121. ].isFinishSize = 0;
  10122. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10123. itemTaskIndex
  10124. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10125. _this.$forceUpdate();
  10126. if (file) {
  10127. var params = {
  10128. Key:
  10129. file.name.split(".")[0] +
  10130. new Date().getTime() +
  10131. "." +
  10132. file.name.split(".")[file.name.split(".").length - 1],
  10133. ContentType: file.type,
  10134. Body: file,
  10135. "Access-Control-Allow-Credentials": "*",
  10136. ACL: "public-read",
  10137. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10138. var options = {
  10139. partSize: 2048 * 1024 * 1024,
  10140. queueSize: 2,
  10141. leavePartsOnError: true,
  10142. };
  10143. bucket
  10144. .upload(params, options)
  10145. .on("httpUploadProgress", function (evt) {
  10146. //这里可以写进度条
  10147. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10148. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10149. itemTaskIndex
  10150. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10151. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10152. itemTaskIndex
  10153. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10154. _this.$forceUpdate();
  10155. })
  10156. .send(function (err, data) {
  10157. // loading.close();
  10158. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10159. itemTaskIndex
  10160. ].progress = 100;
  10161. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10162. itemTaskIndex
  10163. ].isFinishSize =
  10164. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10165. itemTaskIndex
  10166. ].isAllSize;
  10167. _this.$forceUpdate();
  10168. setTimeout(() => {
  10169. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10170. itemTaskIndex
  10171. ].proVisible = false;
  10172. _this.$forceUpdate();
  10173. }, 1000);
  10174. _this.inputShow = true;
  10175. if (err) {
  10176. // var a = _this.$refs.upload1.uploadFiles;
  10177. // a.splice(a.length - 1, a.length);
  10178. _this.$message.error("上传失败");
  10179. } else {
  10180. if (type == 2 || type == 3) {
  10181. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10182. itemTaskIndex
  10183. ].chapterData.unshift({
  10184. name: file.name,
  10185. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10186. // itemTaskIndex
  10187. // ].chapterData.length+1),
  10188. url: data.Location,
  10189. uid: file.uid,
  10190. type: type,
  10191. text: string,
  10192. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10193. // itemTaskIndex
  10194. // ].chapterData.length + 1),
  10195. });
  10196. _this.imgChange1(null, null, type, itemTaskIndex);
  10197. } else if (type == 4) {
  10198. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10199. itemTaskIndex
  10200. ].fileList1.push({
  10201. name: file.name,
  10202. url: data.Location,
  10203. uid: file.uid,
  10204. });
  10205. _this.imgChange1(null, null, type, itemTaskIndex);
  10206. } else if (type == 5) {
  10207. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10208. itemTaskIndex
  10209. ].homeworkList.push({
  10210. name: file.name,
  10211. url: data.Location,
  10212. uid: file.uid,
  10213. });
  10214. _this.imgChange1(null, null, type, itemTaskIndex);
  10215. }
  10216. console.log(data.Location);
  10217. }
  10218. });
  10219. }
  10220. },
  10221. addunit() {
  10222. this.unitJson.push({
  10223. dyName: "", //单元标题
  10224. isUpdate: 1,
  10225. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10226. chapterInfo: [
  10227. {
  10228. isread: false,
  10229. chapterid: this.guid(),
  10230. title: "",
  10231. courseName: "",
  10232. taskJson: [
  10233. {
  10234. task: "",
  10235. taskDetail: "",
  10236. chapterData: [],
  10237. toolText: "",
  10238. toolChoose: [
  10239. {
  10240. tool: [],
  10241. toolDetail: "",
  10242. toolType: 0,
  10243. askCount: 1,
  10244. askTitle: "",
  10245. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10246. },
  10247. ],
  10248. isShowTools: false,
  10249. askCount: 1,
  10250. isFold: 1,
  10251. askTitle: "",
  10252. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10253. checkJson: [{ checkCount: [], checkPerent: [] }],
  10254. homeworkList: [],
  10255. },
  10256. ],
  10257. itemCount: 1,
  10258. fileList1: [],
  10259. video: [],
  10260. testData: [],
  10261. pData: [],
  10262. templateArray: [],
  10263. },
  10264. ],
  10265. });
  10266. this.addindex = this.unitJson.length - 1;
  10267. setTimeout(() => {
  10268. this.unitIndex = this.unitJson.length - 1;
  10269. setTimeout(() => {
  10270. console.log(this.$refs.dyInput);
  10271. this.$refs.dyInput[0].focus();
  10272. }, 100);
  10273. this.unitSet(this.unitIndex);
  10274. }, 0);
  10275. },
  10276. addToolFun(itemTaskIndex) {
  10277. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10278. itemTaskIndex
  10279. ].toolChoose.push({
  10280. tool: [],
  10281. toolDetail: "",
  10282. toolType: 0,
  10283. askCount: 1,
  10284. askTitle: "",
  10285. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10286. });
  10287. },
  10288. addTaskBorder() {
  10289. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10290. task: "",
  10291. taskDetail: "",
  10292. chapterData: [],
  10293. toolText: "",
  10294. toolChoose: [
  10295. {
  10296. tool: [],
  10297. toolDetail: "",
  10298. toolType: 0,
  10299. askCount: 1,
  10300. askTitle: "",
  10301. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10302. },
  10303. ],
  10304. isShowTools: false,
  10305. askCount: 1,
  10306. isFold: 1, //任务收起状态
  10307. askTitle: "",
  10308. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10309. checkJson: [{ checkCount: [], checkPerent: [] }],
  10310. homeworkList: [],
  10311. });
  10312. setTimeout(() => {
  10313. this.checkEva(this.checkId);
  10314. setTimeout(() => {
  10315. this.checkEva(this.checkId);
  10316. }, 100);
  10317. }, 100);
  10318. },
  10319. addTaskBorder2(type, index) {
  10320. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10321. this.$message({
  10322. message: "有大纲在生成请生成完之后才能使用此功能",
  10323. type: "warning"
  10324. });
  10325. return;
  10326. }
  10327. if(type == 1){
  10328. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10329. task: "",
  10330. isTask2: true,
  10331. isTask3: true,
  10332. taskDetail: "",
  10333. chapterData: [],
  10334. toolText: "",
  10335. toolChoose: [
  10336. {
  10337. tool: [],
  10338. toolDetail: "",
  10339. toolType: 0,
  10340. askCount: 1,
  10341. askTitle: "",
  10342. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10343. },
  10344. ],
  10345. isShowTools: false,
  10346. askCount: 1,
  10347. isFold: 0, //任务收起状态
  10348. askTitle: "",
  10349. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10350. checkJson: [{ checkCount: [], checkPerent: [] }],
  10351. homeworkList: [],
  10352. })
  10353. }else if(type == 2){
  10354. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10355. task: "",
  10356. isTask2: true,
  10357. isTask3: true,
  10358. taskDetail: "",
  10359. chapterData: [],
  10360. toolText: "",
  10361. toolChoose: [
  10362. {
  10363. tool: [],
  10364. toolDetail: "",
  10365. toolType: 0,
  10366. askCount: 1,
  10367. askTitle: "",
  10368. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10369. },
  10370. ],
  10371. isShowTools: false,
  10372. askCount: 1,
  10373. isFold: 0, //任务收起状态
  10374. askTitle: "",
  10375. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10376. checkJson: [{ checkCount: [], checkPerent: [] }],
  10377. homeworkList: [],
  10378. })
  10379. }
  10380. setTimeout(() => {
  10381. this.checkEva(this.checkId);
  10382. setTimeout(() => {
  10383. this.checkEva(this.checkId);
  10384. }, 100);
  10385. }, 100);
  10386. },
  10387. add(e, i) {
  10388. var el = e.currentTarget;
  10389. el.getElementsByTagName("input")[0].click();
  10390. },
  10391. fold(i, e) {
  10392. if (
  10393. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10394. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10395. ) {
  10396. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10397. } else {
  10398. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10399. }
  10400. },
  10401. fold2(i) {
  10402. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10403. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10404. i
  10405. ].isFold2 = false;
  10406. } else {
  10407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10408. }
  10409. this.$forceUpdate();
  10410. },
  10411. foldEva(i) {
  10412. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10413. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10414. i
  10415. ].isEvaFold = false;
  10416. } else {
  10417. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10418. i
  10419. ].isEvaFold = true;
  10420. setTimeout(() => {
  10421. this.checkEva(this.checkId);
  10422. setTimeout(() => {
  10423. this.checkEva(this.checkId);
  10424. }, 500);
  10425. }, 0);
  10426. }
  10427. this.$forceUpdate();
  10428. },
  10429. foldC(i) {
  10430. if (
  10431. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10432. ) {
  10433. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10434. i
  10435. ].isFoldchapter = false;
  10436. } else {
  10437. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10438. i
  10439. ].isFoldchapter = true;
  10440. }
  10441. this.$forceUpdate();
  10442. },
  10443. fold3(i, ti) {
  10444. if (
  10445. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10446. .isFold3
  10447. ) {
  10448. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10449. ti
  10450. ].isFold3 = false;
  10451. } else {
  10452. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10453. ti
  10454. ].isFold3 = true;
  10455. }
  10456. this.$forceUpdate();
  10457. },
  10458. deleteHomeworkBox(unitIndex, index, i) {
  10459. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10460. this.taskCount
  10461. ].homeworkList.splice(i, 1);
  10462. },
  10463. getStudent() {
  10464. let params = {
  10465. oid: this.oid,
  10466. cu: "",
  10467. cn: this.searchPeople,
  10468. };
  10469. this.ajax
  10470. .get(this.$store.state.api + "selectStudentAdd", params)
  10471. .then((res) => {
  10472. this.studentJuri = res.data[0];
  10473. })
  10474. .catch((err) => {
  10475. this.isLoading = false;
  10476. console.error(err);
  10477. });
  10478. },
  10479. // 添加协同成员其他选项按钮
  10480. getTeacherCopy(){
  10481. this.CollLoading=true
  10482. this.collid = ''
  10483. this.collid = '1xpz'
  10484. let params = {
  10485. oid:
  10486. this.org && this.org != "undefined" && this.org != "null"
  10487. ? this.org
  10488. : this.oid,
  10489. cu: "",
  10490. cn: this.searchTN,
  10491. coll: ''
  10492. };
  10493. this.ajax
  10494. .get(
  10495. this.$store.state.api +
  10496. (this.org && this.org != "undefined" && this.org != "null"
  10497. ? "selectCollaborativeMembersOrg"
  10498. : "selectCollaborativeMembers"),
  10499. params
  10500. )
  10501. .then((res) => {
  10502. let teacherJuri = res.data[0];
  10503. this.CollaborativeTeaList = res.data[1];
  10504. for (var i = 0; i < teacherJuri.length; i++) {
  10505. if (teacherJuri[i].userid == this.userid) {
  10506. teacherJuri.splice(i, 1);
  10507. break;
  10508. }
  10509. }
  10510. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10511. return (i.cclassid == '' || i.cclassid == null)
  10512. })
  10513. console.log(' this.teacherJuri', this.teacherJuri);
  10514. let _check = [];
  10515. let _check2 = [];
  10516. for (var i = 0; i < this.teacherJuri.length; i++) {
  10517. var gid = this.teacherJuri[i].userid;
  10518. _check.push(gid);
  10519. }
  10520. for (var i = 0; i < this.checkboxList3.length; i++) {
  10521. var _id = this.checkboxList3[i];
  10522. if (_check.indexOf(_id) !== -1) {
  10523. _check2.push(_id);
  10524. }
  10525. }
  10526. if (_check2.length==0 && _check.length==0) {
  10527. }else{
  10528. this.checkAll2 = _check2.length === _check.length;
  10529. }
  10530. this.CollLoading=false
  10531. })
  10532. .catch((err) => {
  10533. console.error(err);
  10534. this.CollLoading=false
  10535. });
  10536. },
  10537. getTeacher(val) {
  10538. this.CollLoading=true
  10539. this.collid = ''
  10540. this.collid = !val ? '' : val
  10541. let params = {
  10542. oid:
  10543. this.org && this.org != "undefined" && this.org != "null"
  10544. ? this.org
  10545. : this.oid,
  10546. cu: "",
  10547. cn: this.searchTN,
  10548. coll: this.collid
  10549. };
  10550. this.ajax
  10551. .get(
  10552. this.$store.state.api +
  10553. (this.org && this.org != "undefined" && this.org != "null"
  10554. ? "selectCollaborativeMembersOrg"
  10555. : "selectCollaborativeMembers"),
  10556. params
  10557. )
  10558. .then((res) => {
  10559. let teacherJuri = res.data[0];
  10560. this.CollaborativeTeaList = res.data[1];
  10561. for (var i = 0; i < teacherJuri.length; i++) {
  10562. if (teacherJuri[i].userid == this.userid) {
  10563. teacherJuri.splice(i, 1);
  10564. break;
  10565. }
  10566. }
  10567. this.teacherJuri = teacherJuri;
  10568. let _check = [];
  10569. let _check2 = [];
  10570. for (var i = 0; i < this.teacherJuri.length; i++) {
  10571. var gid = this.teacherJuri[i].userid;
  10572. _check.push(gid);
  10573. }
  10574. for (var i = 0; i < this.checkboxList3.length; i++) {
  10575. var _id = this.checkboxList3[i];
  10576. if (_check.indexOf(_id) !== -1) {
  10577. _check2.push(_id);
  10578. }
  10579. }
  10580. if (_check2.length==0 && _check.length==0) {
  10581. }else{
  10582. this.checkAll2 = _check2.length === _check.length;
  10583. }
  10584. this.CollLoading=false
  10585. })
  10586. .catch((err) => {
  10587. console.error(err);
  10588. this.CollLoading=false
  10589. });
  10590. },
  10591. searchStudent() {
  10592. this.getStudent();
  10593. },
  10594. selectGrage() {
  10595. let params = {
  10596. oid: this.oid,
  10597. };
  10598. this.ajax
  10599. .get(this.$store.state.api + "selectGrageBySchool", params)
  10600. .then((res) => {
  10601. this.gradeList = res.data[0];
  10602. })
  10603. .catch((err) => {
  10604. this.isLoading = false;
  10605. console.error(err);
  10606. });
  10607. },
  10608. //获取班级列表
  10609. getClass() {
  10610. let params = {
  10611. oid: this.oid,
  10612. gid: this.gradeId,
  10613. cn: this.classSearch,
  10614. };
  10615. this.ajax
  10616. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  10617. .then((res) => {
  10618. if (!this.grade.length) {
  10619. this.grade = res.data[0];
  10620. }
  10621. this.grade2 = res.data[0];
  10622. this.classJuri = res.data[0];
  10623. let _check = [];
  10624. let _check2 = [];
  10625. for (var i = 0; i < this.grade2.length; i++) {
  10626. var gid = this.grade2[i].id;
  10627. _check.push(gid);
  10628. }
  10629. for (var i = 0; i < this.checkboxList2.length; i++) {
  10630. var _id = this.checkboxList2[i];
  10631. if (_check.indexOf(_id) !== -1) {
  10632. _check2.push(_id);
  10633. }
  10634. }
  10635. this.checkAll = _check2.length === _check.length;
  10636. })
  10637. .catch((err) => {
  10638. this.isLoading = false;
  10639. console.error(err);
  10640. });
  10641. },
  10642. CourseType2Change(val) {
  10643. this.pTypeCheck = [];
  10644. for (var i = 0; i < this.CourseType2.length; i++) {
  10645. let typeA = this.CourseType2[i];
  10646. if (val.indexOf(typeA.name) != -1) {
  10647. this.pTypeCheck.push(...typeA.id);
  10648. }
  10649. }
  10650. },
  10651. getChapterData(e, i, j, ic, type) {
  10652. e.stopPropagation();
  10653. this.updataC = true;
  10654. this.icc = ic;
  10655. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  10656. console.log("还不能下载图片喔");
  10657. }
  10658. },
  10659. deleteChapterData(e, i, j, ic, taskI) {
  10660. e.stopPropagation();
  10661. let _this = this;
  10662. _this
  10663. .$confirm("确定删除此项?", "提示", {
  10664. confirmButtonText: "确定",
  10665. cancelButtonText: "取消",
  10666. type: "warning",
  10667. })
  10668. .then(() => {
  10669. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  10670. ic,
  10671. 1
  10672. );
  10673. })
  10674. .catch(() => {
  10675. return;
  10676. });
  10677. },
  10678. checkInfoData(fileid, file){
  10679. let type = 1
  10680. let index = 0
  10681. for(let i = 0; i < this.infoData.length; i++){
  10682. if(this.infoData[i].fileid == fileid){
  10683. type = 2
  10684. index = i
  10685. }
  10686. }
  10687. if(type == 2){
  10688. this.infoData.splice(index, 1)
  10689. }else {
  10690. this.infoData.push({...file})
  10691. }
  10692. },
  10693. deleteInfoData(e, ic) {
  10694. e.stopPropagation();
  10695. let _this = this;
  10696. _this
  10697. .$confirm("确定删除此项?", "提示", {
  10698. confirmButtonText: "确定",
  10699. cancelButtonText: "取消",
  10700. type: "warning",
  10701. })
  10702. .then(() => {
  10703. _this.infoData.splice(
  10704. ic,
  10705. 1
  10706. );
  10707. })
  10708. .catch(() => {
  10709. return;
  10710. });
  10711. },
  10712. deleteInfoData2(e, ic) {
  10713. e.stopPropagation();
  10714. let _this = this;
  10715. _this
  10716. .$confirm("确定删除此项?", "提示", {
  10717. confirmButtonText: "确定",
  10718. cancelButtonText: "取消",
  10719. type: "warning",
  10720. })
  10721. .then(() => {
  10722. _this.infoData2.splice(
  10723. ic,
  10724. 1
  10725. );
  10726. })
  10727. .catch(() => {
  10728. return;
  10729. });
  10730. },
  10731. deletemubiaoInfoData(e, ic) {
  10732. e.stopPropagation();
  10733. let _this = this;
  10734. _this
  10735. .$confirm("确定删除此项?", "提示", {
  10736. confirmButtonText: "确定",
  10737. cancelButtonText: "取消",
  10738. type: "warning",
  10739. })
  10740. .then(() => {
  10741. _this.mubiaoInfoData.splice(
  10742. ic,
  10743. 1
  10744. );
  10745. })
  10746. .catch(() => {
  10747. return;
  10748. });
  10749. },
  10750. deletexuanzeInfoData(e, ic) {
  10751. e.stopPropagation();
  10752. let _this = this;
  10753. _this
  10754. .$confirm("确定删除此项?", "提示", {
  10755. confirmButtonText: "确定",
  10756. cancelButtonText: "取消",
  10757. type: "warning",
  10758. })
  10759. .then(() => {
  10760. _this.xuanzeInfoData.splice(
  10761. ic,
  10762. 1
  10763. );
  10764. })
  10765. .catch(() => {
  10766. return;
  10767. });
  10768. },
  10769. deletepingjiaInfoData(e, ic, tindex) {
  10770. e.stopPropagation();
  10771. let _this = this;
  10772. _this
  10773. .$confirm("确定删除此项?", "提示", {
  10774. confirmButtonText: "确定",
  10775. cancelButtonText: "取消",
  10776. type: "warning",
  10777. })
  10778. .then(() => {
  10779. _this.pingjiaInfoData[tindex].splice(
  10780. ic,
  10781. 1
  10782. );
  10783. })
  10784. .catch(() => {
  10785. return;
  10786. });
  10787. },
  10788. deleteCankaoInfoData(e, ic) {
  10789. e.stopPropagation();
  10790. let _this = this;
  10791. _this
  10792. .$confirm("确定删除此项?", "提示", {
  10793. confirmButtonText: "确定",
  10794. cancelButtonText: "取消",
  10795. type: "warning",
  10796. })
  10797. .then(() => {
  10798. _this.cankaoInfoData.splice(
  10799. ic,
  10800. 1
  10801. );
  10802. })
  10803. .catch(() => {
  10804. return;
  10805. });
  10806. },
  10807. deleteTeacherInfoData(e, ic) {
  10808. e.stopPropagation();
  10809. let _this = this;
  10810. _this
  10811. .$confirm("确定删除此项?", "提示", {
  10812. confirmButtonText: "确定",
  10813. cancelButtonText: "取消",
  10814. type: "warning",
  10815. })
  10816. .then(() => {
  10817. _this.teacherInfoData.splice(
  10818. ic,
  10819. 1
  10820. );
  10821. })
  10822. .catch(() => {
  10823. return;
  10824. });
  10825. },
  10826. updataVideoT(e, i, j, ic) {
  10827. // e.stopPropagation();
  10828. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10829. // ic
  10830. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10831. this.line =
  10832. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10833. this.taskCount = j;
  10834. this.lineCount = ic;
  10835. this.dialogVisibleupdataVideoT = true;
  10836. this.$forceUpdate();
  10837. },
  10838. checkChpater(e, i, j, ic){
  10839. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10840. if(type == 3){
  10841. var fileA = [
  10842. "DOC",
  10843. "DOCX",
  10844. "DOCM",
  10845. "DOTM",
  10846. "DOTX",
  10847. "PPTX",
  10848. "PPSX",
  10849. "PPT",
  10850. "PPS",
  10851. "PPTM",
  10852. "POTM",
  10853. "PPAM",
  10854. "POTX",
  10855. "PPSM",
  10856. "XLSX",
  10857. "XLS"
  10858. ];
  10859. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10860. if (
  10861. fileA.indexOf(
  10862. url.split(".")[
  10863. url.split(".").length - 1
  10864. ].toLocaleUpperCase()
  10865. ) != -1
  10866. ) {
  10867. this.dialogVisibleOffice = true
  10868. this.wurl = url
  10869. } else if (
  10870. "pdf".indexOf(
  10871. url.split(".")[
  10872. url.split(".").length - 1
  10873. ].toLocaleLowerCase()
  10874. ) != -1
  10875. ) {
  10876. this.dialogVisiblePdf = true
  10877. this.wurl = url
  10878. }
  10879. }
  10880. },
  10881. checkChpater2(e, ic){
  10882. let type = this.infoData2[ic].type
  10883. if(type == 3){
  10884. var fileA = [
  10885. "DOC",
  10886. "DOCX",
  10887. "DOCM",
  10888. "DOTM",
  10889. "DOTX",
  10890. "PPTX",
  10891. "PPSX",
  10892. "PPT",
  10893. "PPS",
  10894. "PPTM",
  10895. "POTM",
  10896. "PPAM",
  10897. "POTX",
  10898. "PPSM",
  10899. "XLSX",
  10900. "XLS"
  10901. ];
  10902. let url = this.infoData2[ic].url
  10903. if (
  10904. fileA.indexOf(
  10905. url.split(".")[
  10906. url.split(".").length - 1
  10907. ].toLocaleUpperCase()
  10908. ) != -1
  10909. ) {
  10910. this.dialogVisibleOffice = true
  10911. this.wurl = url
  10912. } else if (
  10913. "pdf".indexOf(
  10914. url.split(".")[
  10915. url.split(".").length - 1
  10916. ].toLocaleLowerCase()
  10917. ) != -1
  10918. ) {
  10919. this.dialogVisiblePdf = true
  10920. this.wurl = url
  10921. }
  10922. }
  10923. },
  10924. checkChpater3(e, ic, item){
  10925. let type = item.type
  10926. if(type == 3){
  10927. var fileA = [
  10928. "DOC",
  10929. "DOCX",
  10930. "DOCM",
  10931. "DOTM",
  10932. "DOTX",
  10933. "PPTX",
  10934. "PPSX",
  10935. "PPT",
  10936. "PPS",
  10937. "PPTM",
  10938. "POTM",
  10939. "PPAM",
  10940. "POTX",
  10941. "PPSM",
  10942. "XLSX",
  10943. "XLS"
  10944. ];
  10945. let url = item.url
  10946. if (
  10947. fileA.indexOf(
  10948. url.split(".")[
  10949. url.split(".").length - 1
  10950. ].toLocaleUpperCase()
  10951. ) != -1
  10952. ) {
  10953. this.dialogVisibleOffice = true
  10954. this.wurl = url
  10955. } else if (
  10956. "pdf".indexOf(
  10957. url.split(".")[
  10958. url.split(".").length - 1
  10959. ].toLocaleLowerCase()
  10960. ) != -1
  10961. ) {
  10962. this.dialogVisiblePdf = true
  10963. this.wurl = url
  10964. }
  10965. }
  10966. },
  10967. updataVideoC() {
  10968. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10969. this.taskCount
  10970. ].chapterData[this.lineCount].name = JSON.parse(
  10971. JSON.stringify(this.line)
  10972. );
  10973. this.dialogVisibleupdataVideoT = false;
  10974. this.$forceUpdate();
  10975. },
  10976. upCd(e, i, j, taskCount, ic) {
  10977. e.stopPropagation();
  10978. if (ic == 0) {
  10979. return;
  10980. }
  10981. var a = JSON.parse(
  10982. JSON.stringify(
  10983. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10984. ic - 1
  10985. ]
  10986. )
  10987. );
  10988. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  10989. JSON.parse(
  10990. JSON.stringify(
  10991. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10992. )
  10993. );
  10994. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10995. this.$forceUpdate();
  10996. },
  10997. downCd(e, i, j, taskCount, ic) {
  10998. e.stopPropagation();
  10999. if (
  11000. ic ==
  11001. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11002. 1
  11003. ) {
  11004. return;
  11005. }
  11006. var a = JSON.parse(
  11007. JSON.stringify(
  11008. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11009. ic + 1
  11010. ]
  11011. )
  11012. );
  11013. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11014. JSON.parse(
  11015. JSON.stringify(
  11016. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11017. )
  11018. );
  11019. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11020. this.$forceUpdate();
  11021. },
  11022. async upTool(e, i, j, tooli) {
  11023. e.stopPropagation();
  11024. if (tooli == 0) {
  11025. return;
  11026. }
  11027. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11028. let count2 = await this.getWorksCount(3, i, j, tooli);
  11029. if (count1 > 0 || count2 > 0) {
  11030. this.$confirm(
  11031. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11032. "提示",
  11033. {
  11034. confirmButtonText: "确定",
  11035. cancelButtonText: "取消",
  11036. type: "warning",
  11037. }
  11038. )
  11039. .then(() => {
  11040. var a = JSON.parse(
  11041. JSON.stringify(
  11042. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11043. tooli - 1
  11044. ]
  11045. )
  11046. );
  11047. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11048. JSON.parse(
  11049. JSON.stringify(
  11050. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11051. )
  11052. );
  11053. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11054. this.$forceUpdate();
  11055. })
  11056. .catch(() => {
  11057. return;
  11058. });
  11059. } else {
  11060. var a = JSON.parse(
  11061. JSON.stringify(
  11062. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11063. )
  11064. );
  11065. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11066. JSON.parse(
  11067. JSON.stringify(
  11068. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11069. )
  11070. );
  11071. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11072. this.$forceUpdate();
  11073. }
  11074. },
  11075. async downTool(e, i, j, tooli) {
  11076. e.stopPropagation();
  11077. if (
  11078. tooli ==
  11079. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11080. ) {
  11081. return;
  11082. }
  11083. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11084. let count2 = await this.getWorksCount(3, i, j, tooli);
  11085. if (count1 > 0 || count2 > 0) {
  11086. this.$confirm(
  11087. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11088. "提示",
  11089. {
  11090. confirmButtonText: "确定",
  11091. cancelButtonText: "取消",
  11092. type: "warning",
  11093. }
  11094. )
  11095. .then(() => {
  11096. var a = JSON.parse(
  11097. JSON.stringify(
  11098. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11099. tooli + 1
  11100. ]
  11101. )
  11102. );
  11103. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11104. JSON.parse(
  11105. JSON.stringify(
  11106. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11107. )
  11108. );
  11109. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11110. this.$forceUpdate();
  11111. })
  11112. .catch(() => {
  11113. return;
  11114. });
  11115. } else {
  11116. var a = JSON.parse(
  11117. JSON.stringify(
  11118. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11119. )
  11120. );
  11121. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11122. JSON.parse(
  11123. JSON.stringify(
  11124. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11125. )
  11126. );
  11127. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11128. this.$forceUpdate();
  11129. }
  11130. },
  11131. addWork(type) {
  11132. if(type == 2 && this.courseName == "") {
  11133. this.$message.error("请补充填写课程名称");
  11134. return;
  11135. }
  11136. let cPan = 1;
  11137. for (var i = 0; i < this.unitJson.length; i++) {
  11138. for (
  11139. var j = 0;
  11140. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11141. j++
  11142. ) {
  11143. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11144. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11145. if (
  11146. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11147. ) {
  11148. for (
  11149. var z = 0;
  11150. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11151. z++
  11152. ) {
  11153. if (
  11154. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11155. .length
  11156. ) {
  11157. this.$message.error("请把工具添加完整");
  11158. cPan = 2;
  11159. break;
  11160. }
  11161. }
  11162. }
  11163. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11164. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11165. i
  11166. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11167. return ele.value != "";
  11168. });
  11169. }
  11170. }
  11171. }
  11172. this.inputShow = true;
  11173. if (cPan == 2) {
  11174. this.steps--;
  11175. return;
  11176. }
  11177. for (var i = 0; i < this.unitJson.length; i++) {
  11178. delete this.unitJson[i].isUpdate;
  11179. }
  11180. if(!this.targetCourseText2){
  11181. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11182. }
  11183. let params = [
  11184. {
  11185. uid: this.userid,
  11186. title: this.courseName,
  11187. brief: this.courseText,
  11188. cover:
  11189. this.cover.length > 0
  11190. ? JSON.stringify(this.cover)
  11191. : JSON.stringify([
  11192. {
  11193. name: "noBanner.jpg",
  11194. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11195. uid: 1656409780264,
  11196. status: "success",
  11197. },
  11198. ]),
  11199. evaId: this.evalua,
  11200. astudent:
  11201. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11202. see: this.isTeacherSee == true ? 1 : 0,
  11203. chapters: JSON.stringify(this.unitJson),
  11204. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11205. courseType: JSON.stringify(this.courseTypeId),
  11206. ateacher:
  11207. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11208. inviteCode: JSON.stringify(this.inviteCode),
  11209. refile: JSON.stringify(this.infoData),
  11210. reBrief: this.courseText2,
  11211. cpote: JSON.stringify(this.cpote),
  11212. setting: JSON.stringify({
  11213. courseJie: this.courseJie,
  11214. courseTime: this.courseTime,
  11215. teacherInfoData: this.teacherInfoData,
  11216. teacherCourseText: this.teacherCourseText,
  11217. targetCourseText: this.targetCourseText,
  11218. cankaoInfoData: this.cankaoInfoData,
  11219. mubiaoInfoData: this.mubiaoInfoData,
  11220. xuanzeInfoData: this.xuanzeInfoData,
  11221. pingjiaInfoData: this.pingjiaInfoData,
  11222. infoData2: this.infoData2,
  11223. isuseT: this.isuseT,
  11224. mode: this.mode,
  11225. targetCourseText2: this.targetCourseText2,
  11226. }),
  11227. iresearch: this.isFileSearch ? 1 : 2,
  11228. },
  11229. ];
  11230. this.ajax
  11231. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11232. .then((res) => {
  11233. console.log(this.steps);
  11234. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11235. this.$message({
  11236. message: "新增成功",
  11237. type: "success",
  11238. });
  11239. }
  11240. this.number = res.data.ordernumber;
  11241. this.courseId = res.data.courseId;
  11242. this.cid = res.data.courseId;
  11243. this.courseUserid = this.userid;
  11244. this.islogin = true;
  11245. // this.updateCourseState(4);
  11246. this.updateCourseState(5);
  11247. this.addtips()
  11248. if(type == 2){
  11249. this.retrunCourse()
  11250. }
  11251. })
  11252. .catch((err) => {
  11253. this.$message.error("网络不佳");
  11254. console.error(err);
  11255. });
  11256. },
  11257. goCourse() {
  11258. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11259. },
  11260. updateWork2() {
  11261. let _unitIndex = this.unitIndex;
  11262. let cPan = 1;
  11263. for (
  11264. var j = 0;
  11265. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11266. j++
  11267. ) {
  11268. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11269. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11270. j
  11271. ].proVisible2 = false;
  11272. if (
  11273. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11274. .length > 1
  11275. ) {
  11276. for (
  11277. var z = 0;
  11278. z <
  11279. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11280. .length;
  11281. z++
  11282. ) {
  11283. if (
  11284. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11285. z
  11286. ].tool.length
  11287. ) {
  11288. this.$message.error("请把工具添加完整");
  11289. cPan = 2;
  11290. break;
  11291. }
  11292. }
  11293. }
  11294. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11295. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11296. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11297. (ele) => {
  11298. return ele.value != "";
  11299. }
  11300. );
  11301. }
  11302. }
  11303. this.inputShow = true;
  11304. if (cPan == 2) {
  11305. this.steps--;
  11306. return;
  11307. }
  11308. let params = [
  11309. {
  11310. cid: this.cid,
  11311. chapters: JSON.stringify(this.unitJson),
  11312. uid: this.userid,
  11313. unitIndex: _unitIndex,
  11314. },
  11315. ];
  11316. this.ajax
  11317. .post(this.$store.state.api + "updateWorkNew4", params)
  11318. .then((res) => {
  11319. this.$message({
  11320. message: "修改成功",
  11321. type: "success",
  11322. });
  11323. this.courseId = this.cid;
  11324. this.addtips();
  11325. })
  11326. .catch((err) => {
  11327. this.$message.error("网络不佳");
  11328. console.error(err);
  11329. });
  11330. },
  11331. updateWork3(unitIndex) {
  11332. let _unitIndex = unitIndex;
  11333. let cPan = 1;
  11334. for (
  11335. var j = 0;
  11336. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11337. j++
  11338. ) {
  11339. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11340. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11341. j
  11342. ].proVisible2 = false;
  11343. if (
  11344. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11345. .length > 1
  11346. ) {
  11347. for (
  11348. var z = 0;
  11349. z <
  11350. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11351. .length;
  11352. z++
  11353. ) {
  11354. if (
  11355. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11356. z
  11357. ].tool.length
  11358. ) {
  11359. this.$message.error("请把工具添加完整");
  11360. cPan = 2;
  11361. break;
  11362. }
  11363. }
  11364. }
  11365. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11366. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11367. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11368. (ele) => {
  11369. return ele.value != "";
  11370. }
  11371. );
  11372. }
  11373. }
  11374. this.inputShow = true;
  11375. if (cPan == 2) {
  11376. this.steps--;
  11377. return;
  11378. }
  11379. let params = [
  11380. {
  11381. cid: this.cid,
  11382. chapters: JSON.stringify(this.unitJson),
  11383. uid: this.userid,
  11384. unitIndex: _unitIndex,
  11385. },
  11386. ];
  11387. this.ajax
  11388. .post(this.$store.state.api + "updateWorkNew4", params)
  11389. .then((res) => {
  11390. // this.$message({
  11391. // message: "修改成功",
  11392. // type: "success",
  11393. // });
  11394. this.courseId = this.cid;
  11395. this.addtips()
  11396. })
  11397. .catch((err) => {
  11398. this.$message.error("网络不佳");
  11399. console.error(err);
  11400. });
  11401. },
  11402. updateWork() {
  11403. let cPan = 1;
  11404. for (var i = 0; i < this.unitJson.length; i++) {
  11405. for (
  11406. var j = 0;
  11407. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11408. j++
  11409. ) {
  11410. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11411. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11412. if (
  11413. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11414. ) {
  11415. for (
  11416. var z = 0;
  11417. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11418. z++
  11419. ) {
  11420. if (
  11421. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11422. .length
  11423. ) {
  11424. this.$message.error("请把工具添加完整");
  11425. cPan = 2;
  11426. break;
  11427. }
  11428. }
  11429. }
  11430. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11431. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11432. i
  11433. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11434. return ele.value != "";
  11435. });
  11436. }
  11437. }
  11438. }
  11439. this.inputShow = true;
  11440. if (cPan == 2) {
  11441. this.steps--;
  11442. return;
  11443. }
  11444. for (var i = 0; i < this.unitJson.length; i++) {
  11445. delete this.unitJson[i].isUpdate;
  11446. }
  11447. if(!this.targetCourseText2){
  11448. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11449. }
  11450. let params = [
  11451. {
  11452. cid: this.cid,
  11453. title: this.courseName,
  11454. brief: this.courseText,
  11455. cover:
  11456. this.cover.length > 0
  11457. ? JSON.stringify(this.cover)
  11458. : JSON.stringify([
  11459. {
  11460. name: "noBanner.jpg",
  11461. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11462. uid: 1656409780264,
  11463. status: "success",
  11464. },
  11465. ]),
  11466. evaId: this.evalua,
  11467. astudent:
  11468. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11469. see: this.isTeacherSee == true ? 1 : 0,
  11470. chapters: JSON.stringify(this.unitJson),
  11471. template: this.myWord != "undefined" ? this.myWord : [],
  11472. uid: this.userid,
  11473. courseType: JSON.stringify(this.courseTypeId),
  11474. ateacher:
  11475. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11476. inviteCode: JSON.stringify(this.inviteCode),
  11477. refile: JSON.stringify(this.infoData),
  11478. reBrief: this.courseText2,
  11479. cpote: JSON.stringify(this.cpote),
  11480. setting: JSON.stringify({
  11481. courseJie: this.courseJie,
  11482. courseTime: this.courseTime,
  11483. teacherInfoData: this.teacherInfoData,
  11484. teacherCourseText: this.teacherCourseText,
  11485. targetCourseText: this.targetCourseText,
  11486. cankaoInfoData: this.cankaoInfoData,
  11487. mubiaoInfoData: this.mubiaoInfoData,
  11488. xuanzeInfoData: this.xuanzeInfoData,
  11489. pingjiaInfoData: this.pingjiaInfoData,
  11490. infoData2: this.infoData2,
  11491. isuseT: this.isuseT,
  11492. mode: this.mode,
  11493. targetCourseText2: this.targetCourseText2,
  11494. }),
  11495. iresearch: this.isFileSearch ? 1 : 2,
  11496. },
  11497. ];
  11498. this.ajax
  11499. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  11500. .then((res) => {
  11501. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11502. if (this.cidType == 1) {
  11503. this.$message({
  11504. message: "修改成功",
  11505. type: "success",
  11506. });
  11507. } else {
  11508. this.$message({
  11509. message: "新增成功",
  11510. type: "success",
  11511. });
  11512. }
  11513. }
  11514. this.number = this.nbOrder;
  11515. this.courseId = this.cid;
  11516. this.addtips()
  11517. })
  11518. .catch((err) => {
  11519. this.$message.error("网络不佳");
  11520. console.error(err);
  11521. });
  11522. },
  11523. insertWord() {
  11524. this.dialogVisible1 = true;
  11525. this.updateBoolean2 = false;
  11526. this.tTitle = "";
  11527. this.tdetail = "";
  11528. },
  11529. addWord() {
  11530. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  11531. name: this.tTitle,
  11532. content: this.tdetail,
  11533. uid: this.guid(),
  11534. });
  11535. this.dialogVisible1 = false;
  11536. },
  11537. upWord() { },
  11538. selectWord(uid, i, c) {
  11539. this.dialogVisible1 = true;
  11540. this.updateBoolean2 = true;
  11541. if (
  11542. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  11543. ) {
  11544. this.tTitle =
  11545. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  11546. this.tdetail =
  11547. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  11548. }
  11549. },
  11550. isAddPP() {
  11551. if (this.checkboxList.length > 0) {
  11552. this.$message({
  11553. message: "添加成功",
  11554. type: "success",
  11555. });
  11556. this.dialogVisible3 = false;
  11557. } else {
  11558. this.$message({
  11559. message: "请添加课程成员",
  11560. type: "error",
  11561. });
  11562. }
  11563. },
  11564. isAddClass() {
  11565. this.dialogVisibleClass = false;
  11566. },
  11567. isAddPPTeacher() {
  11568. this.dialogVisibleMember = false;
  11569. this.setMan();
  11570. },
  11571. getTipsTemplate(){
  11572. if(this.templateid){
  11573. let params = {
  11574. id: this.templateid
  11575. }
  11576. this.ajax
  11577. .get(this.$store.state.api + "selectTipsTemplateById", params)
  11578. .then((res) => {
  11579. if(res.data[0].length){
  11580. this.tipsJson = res.data[0][0]
  11581. this.aiJson = JSON.parse(res.data[0][0].tips)
  11582. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11583. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11584. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11585. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11586. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11587. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11588. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  11589. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  11590. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  11591. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  11592. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  11593. }
  11594. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  11595. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  11596. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  11597. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  11598. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  11599. // }
  11600. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  11601. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11602. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11603. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11604. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  11605. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11606. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  11607. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11608. // }
  11609. this.$forceUpdate();
  11610. }
  11611. })
  11612. .catch((err) => { });
  11613. }
  11614. },
  11615. getTemplate() {
  11616. this.ajax
  11617. .get(this.$store.state.api + "getCourseTemplateT", "")
  11618. .then((res) => {
  11619. this.templateArray = res.data[0];
  11620. this.getTemplateOid();
  11621. this.$forceUpdate();
  11622. })
  11623. .catch((err) => { });
  11624. },
  11625. getTemplateOid() {
  11626. let params = {
  11627. oid: this.oid,
  11628. };
  11629. this.ajax
  11630. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11631. .then((res) => {
  11632. if (res.data[0].length) {
  11633. this.templateArray = [...res.data[0], ...this.templateArray];
  11634. }
  11635. this.getTemplateOrg();
  11636. this.$forceUpdate();
  11637. })
  11638. .catch((err) => { });
  11639. },
  11640. getTemplateOrg() {
  11641. let params = {
  11642. oid: this.org,
  11643. };
  11644. this.ajax
  11645. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11646. .then((res) => {
  11647. if (res.data[0].length) {
  11648. this.templateArray = [...res.data[0], ...this.templateArray];
  11649. }
  11650. this.$forceUpdate();
  11651. })
  11652. .catch((err) => { });
  11653. },
  11654. clearChoose() {
  11655. this.clearArray.splice(this.templateC.id, 1);
  11656. this.dialogVisible2 = false;
  11657. },
  11658. clearAttText() {
  11659. this.AttText = {
  11660. title: "",
  11661. text: "",
  11662. };
  11663. this.dialogVisible6 = false;
  11664. },
  11665. clearLine() {
  11666. this.line = "";
  11667. this.dialogVisible7 = false;
  11668. },
  11669. openTemplate() {
  11670. this.ctJson = {};
  11671. this.templateDialog = true;
  11672. },
  11673. checkctJson(json) {
  11674. if (this.ctJson.id == json.id) {
  11675. this.ctJson = {};
  11676. } else {
  11677. this.ctJson = json;
  11678. }
  11679. },
  11680. addTemplate(res) {
  11681. let _this = this;
  11682. let _res = [];
  11683. if (res.id == 1) {
  11684. _res = [
  11685. {
  11686. dyName: "", //单元标题
  11687. easy: 1,
  11688. chapterInfo: [
  11689. {
  11690. isread: false,
  11691. chapterid: this.guid(),
  11692. title: "",
  11693. courseName: "",
  11694. taskJson: [
  11695. {
  11696. task: "",
  11697. taskDetail: "",
  11698. chapterData: [],
  11699. toolText: "",
  11700. toolChoose: [
  11701. {
  11702. tool: [],
  11703. toolDetail: "",
  11704. toolType: 0,
  11705. askCount: 1,
  11706. askTitle: "",
  11707. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11708. },
  11709. ],
  11710. isShowTools: false,
  11711. askCount: 1,
  11712. isFold: 1,
  11713. askTitle: "",
  11714. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11715. checkJson: [{ checkCount: [], checkPerent: [] }],
  11716. homeworkList: [],
  11717. },
  11718. ],
  11719. itemCount: 1,
  11720. fileList1: [],
  11721. video: [],
  11722. testData: [],
  11723. pData: [],
  11724. templateArray: [],
  11725. },
  11726. ],
  11727. },
  11728. ];
  11729. this.updateCourseState(1);
  11730. } else if (res.id == 2) {
  11731. let stageData = [];
  11732. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11733. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11734. if (!iframe && !iframe2) {
  11735. this.$message.error("请使用AI共创生成");
  11736. return;
  11737. }
  11738. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11739. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11740. if (
  11741. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  11742. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  11743. ) {
  11744. this.$message.error("请使用AI共创生成");
  11745. return;
  11746. }
  11747. stageData = copyData
  11748. ? copyData.stageData
  11749. : copyData2
  11750. ? copyData2.stageData
  11751. : [""];
  11752. for (var i = 0; i < stageData.length; i++) {
  11753. _res.push({
  11754. dyName: stageData[i], //单元标题
  11755. chapterInfo: [
  11756. {
  11757. isread: false,
  11758. chapterid: this.guid(),
  11759. title: "",
  11760. courseName: "",
  11761. taskJson: [
  11762. {
  11763. task: "",
  11764. taskDetail: "",
  11765. chapterData: [],
  11766. toolText: "",
  11767. toolChoose: [
  11768. {
  11769. tool: [],
  11770. toolDetail: "",
  11771. toolType: 0,
  11772. askCount: 1,
  11773. askTitle: "",
  11774. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11775. },
  11776. ],
  11777. isShowTools: false,
  11778. askCount: 1,
  11779. isFold: 1,
  11780. askTitle: "",
  11781. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11782. checkJson: [{ checkCount: [], checkPerent: [] }],
  11783. homeworkList: [],
  11784. },
  11785. ],
  11786. itemCount: 1,
  11787. fileList1: [],
  11788. video: [],
  11789. testData: [],
  11790. pData: [],
  11791. templateArray: [],
  11792. },
  11793. ],
  11794. });
  11795. }
  11796. this.updateCourseState(1);
  11797. } else if (!Object.keys(res).length) {
  11798. this.$message.error("请选择模板");
  11799. retrun;
  11800. } else {
  11801. _res = JSON.parse(res.chapters);
  11802. this.updateCourseState(parseInt(res.state));
  11803. }
  11804. _this
  11805. .$confirm(
  11806. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11807. "提示",
  11808. {
  11809. confirmButtonText: "确定",
  11810. cancelButtonText: "取消",
  11811. type: "warning",
  11812. }
  11813. )
  11814. .then(() => {
  11815. _this.unitJson = _res;
  11816. _this.updateWork();
  11817. // _this.steps++;
  11818. _this.templateDialog = false;
  11819. setTimeout(() => {
  11820. this.checkEva(this.checkId);
  11821. setTimeout(() => {
  11822. this.checkEva(this.checkId);
  11823. }, 100);
  11824. }, 1000);
  11825. })
  11826. .catch(() => {
  11827. return;
  11828. });
  11829. },
  11830. checkTemplate(res) {
  11831. let _this = this;
  11832. _this
  11833. .$confirm(
  11834. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11835. "提示",
  11836. {
  11837. confirmButtonText: "确定",
  11838. cancelButtonText: "取消",
  11839. type: "warning",
  11840. }
  11841. )
  11842. .then(() => {
  11843. _this.unitJson = JSON.parse(res.chapters);
  11844. _this.steps++;
  11845. setTimeout(() => {
  11846. this.checkEva(this.checkId);
  11847. setTimeout(() => {
  11848. this.checkEva(this.checkId);
  11849. }, 100);
  11850. }, 1000);
  11851. })
  11852. .catch(() => {
  11853. return;
  11854. });
  11855. },
  11856. checkTemplate1(w) {
  11857. this.steps++;
  11858. },
  11859. checkTemplate2() {
  11860. let _this = this;
  11861. _this
  11862. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11863. confirmButtonText: "确定",
  11864. cancelButtonText: "取消",
  11865. type: "warning",
  11866. })
  11867. .then(() => {
  11868. _this.unitIndex = 0;
  11869. _this.unitJson = [
  11870. {
  11871. dyName: "", //单元标题
  11872. chapterInfo: [
  11873. {
  11874. isread: false,
  11875. chapterid: this.guid(),
  11876. title: "",
  11877. courseName: "",
  11878. taskJson: [
  11879. {
  11880. task: "",
  11881. taskDetail: "",
  11882. chapterData: [],
  11883. toolText: "",
  11884. toolChoose: [
  11885. {
  11886. tool: [],
  11887. toolDetail: "",
  11888. toolType: 0,
  11889. askCount: 1,
  11890. askTitle: "",
  11891. askJson: [
  11892. { askstitle: "", askItem: 1, checkList: [] },
  11893. ],
  11894. },
  11895. ],
  11896. isShowTools: false,
  11897. askCount: 1,
  11898. isFold: 1,
  11899. askTitle: "",
  11900. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11901. checkJson: [{ checkCount: [], checkPerent: [] }],
  11902. homeworkList: [],
  11903. },
  11904. ],
  11905. itemCount: 1,
  11906. fileList1: [],
  11907. video: [],
  11908. testData: [],
  11909. pData: [],
  11910. templateArray: [],
  11911. },
  11912. ],
  11913. },
  11914. ];
  11915. this.steps++;
  11916. setTimeout(() => {
  11917. this.checkEva(this.checkId);
  11918. setTimeout(() => {
  11919. this.checkEva(this.checkId);
  11920. }, 100);
  11921. }, 1000);
  11922. this.updateWork();
  11923. })
  11924. .catch(() => {
  11925. return;
  11926. });
  11927. },
  11928. checkTemplate3() {
  11929. let _this = this;
  11930. _this
  11931. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11932. confirmButtonText: "确定",
  11933. cancelButtonText: "取消",
  11934. type: "warning",
  11935. })
  11936. .then(() => {
  11937. _this.unitIndex = 0;
  11938. _this.unitJson = [
  11939. {
  11940. dyName: "", //单元标题
  11941. easy: 1,
  11942. chapterInfo: [
  11943. {
  11944. isread: false,
  11945. chapterid: this.guid(),
  11946. title: "",
  11947. courseName: "",
  11948. taskJson: [
  11949. {
  11950. task: "",
  11951. taskDetail: "",
  11952. chapterData: [],
  11953. toolText: "",
  11954. toolChoose: [
  11955. {
  11956. tool: [],
  11957. toolDetail: "",
  11958. toolType: 0,
  11959. askCount: 1,
  11960. askTitle: "",
  11961. askJson: [
  11962. { askstitle: "", askItem: 1, checkList: [] },
  11963. ],
  11964. },
  11965. ],
  11966. isShowTools: false,
  11967. askCount: 1,
  11968. isFold: 1,
  11969. askTitle: "",
  11970. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11971. checkJson: [{ checkCount: [], checkPerent: [] }],
  11972. homeworkList: [],
  11973. },
  11974. ],
  11975. itemCount: 1,
  11976. fileList1: [],
  11977. video: [],
  11978. testData: [],
  11979. pData: [],
  11980. templateArray: [],
  11981. },
  11982. ],
  11983. },
  11984. ];
  11985. // this.steps++;
  11986. this.updateWork();
  11987. })
  11988. .catch(() => {
  11989. return;
  11990. });
  11991. },
  11992. checkTemplate4() {
  11993. let _this = this;
  11994. _this
  11995. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  11996. confirmButtonText: "确定",
  11997. cancelButtonText: "取消",
  11998. type: "warning",
  11999. })
  12000. .then(() => {
  12001. _this.unitIndex = 0;
  12002. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12003. this.steps++;
  12004. this.updateWork();
  12005. })
  12006. .catch(() => {
  12007. return;
  12008. });
  12009. },
  12010. wordNext() {
  12011. this.dialogVisible2 = false;
  12012. },
  12013. isAddOrUpdateAttText() {
  12014. if (this.AttTextType == 0) {
  12015. this.addAttTextMessage();
  12016. } else {
  12017. this.updateAttText();
  12018. }
  12019. },
  12020. isAddOrUpdateLine() {
  12021. if (!this.lineTitle) {
  12022. this.$message.error("请填写链接标题");
  12023. return;
  12024. }
  12025. if (this.lineType == 0) {
  12026. this.addLine();
  12027. } else {
  12028. this.updateLine();
  12029. }
  12030. },
  12031. addAttTextMessage() {
  12032. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12033. this.taskCount
  12034. ].chapterData.unshift({
  12035. name: this.AttText.title,
  12036. url: this.AttText.text,
  12037. type: 6,
  12038. });
  12039. this.imgChange1(null, null, 6, this.taskCount);
  12040. this.dialogVisible6 = false;
  12041. },
  12042. selectAttText(itemTaskIndex, i) {
  12043. this.AttText.title =
  12044. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12045. itemTaskIndex
  12046. ].chapterData[i].name;
  12047. this.AttText.text =
  12048. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12049. itemTaskIndex
  12050. ].chapterData[i].url;
  12051. this.taskCount = itemTaskIndex;
  12052. this.AttTextIndex = i;
  12053. this.AttTextType = 1;
  12054. this.dialogVisible6 = true;
  12055. },
  12056. updateAttText() {
  12057. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12058. this.taskCount
  12059. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12060. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12061. this.taskCount
  12062. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12063. this.dialogVisible6 = false;
  12064. },
  12065. addLine() {
  12066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12067. this.lineCount
  12068. ].chapterData.unshift({
  12069. name: "链接",
  12070. title: this.lineTitle,
  12071. url: this.line,
  12072. type: 8,
  12073. });
  12074. this.imgChange1(null, null, 8, this.lineCount);
  12075. this.dialogVisible7 = false;
  12076. },
  12077. selectLine(itemTaskIndex, i) {
  12078. this.line =
  12079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12080. itemTaskIndex
  12081. ].chapterData[i].url;
  12082. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12083. itemTaskIndex
  12084. ].chapterData[i].title
  12085. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12086. .chapterData[i].title
  12087. : "";
  12088. this.taskCount = itemTaskIndex;
  12089. this.lineCount = i;
  12090. this.lineType = 1;
  12091. this.dialogVisible7 = true;
  12092. },
  12093. openUpdateSource(itemTaskIndex, i) {
  12094. this.sourceData = {};
  12095. let source =
  12096. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12097. .chapterData[i];
  12098. this.sourceData[source.id] = {};
  12099. this.sourceData[source.id].name = source.title;
  12100. this.sourceData[source.id].url = source.url;
  12101. this.dialogVisibleSource = true;
  12102. this.updateSourcePan = true;
  12103. this.taskCount = itemTaskIndex;
  12104. this.lineCount = i;
  12105. },
  12106. updateLine() {
  12107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12108. this.taskCount
  12109. ].chapterData[this.lineCount].url = this.line;
  12110. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12111. this.taskCount
  12112. ].chapterData[this.lineCount].title = this.lineTitle;
  12113. this.dialogVisible7 = false;
  12114. },
  12115. addPP() {
  12116. this.dialogVisible3 = true;
  12117. },
  12118. goTo(path) {
  12119. this.$router.push(path);
  12120. },
  12121. openTools(itemTaskIndex, i, toolIndex) {
  12122. this.toolIndex = toolIndex;
  12123. this.taskCount = itemTaskIndex;
  12124. if (i == 4) {
  12125. if (toolIndex == null) {
  12126. var a =
  12127. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12128. .chapterData;
  12129. for (var i = 0; i < a.length; i++) {
  12130. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12131. this.askJson =
  12132. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12133. itemTaskIndex
  12134. ].chapterData[i].askJson;
  12135. }
  12136. }
  12137. } else {
  12138. this.askJson = JSON.parse(
  12139. JSON.stringify(
  12140. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12141. itemTaskIndex
  12142. ].toolChoose[toolIndex]
  12143. )
  12144. );
  12145. }
  12146. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12147. this.dialogVisible5 = true;
  12148. } else if (i == 45) {
  12149. if (
  12150. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12151. .toolChoose[toolIndex].testJson
  12152. ) {
  12153. this.testJson = JSON.parse(
  12154. JSON.stringify(
  12155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12156. itemTaskIndex
  12157. ].toolChoose[toolIndex].testJson
  12158. )
  12159. );
  12160. } else {
  12161. var testJson = {
  12162. testCount: 1,
  12163. testTitle: "",
  12164. testJson: [
  12165. {
  12166. teststitle: "",
  12167. testItem: 1,
  12168. checkList: [],
  12169. timuList: [],
  12170. answer: [],
  12171. type: "1",
  12172. },
  12173. ],
  12174. };
  12175. this.testJson = testJson;
  12176. }
  12177. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12178. this.dialogVisibleChoice = true;
  12179. } else if (i == 47) {
  12180. if (
  12181. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12182. .toolChoose[toolIndex].sentenceList
  12183. ) {
  12184. this.sentenceList = JSON.parse(
  12185. JSON.stringify(
  12186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12187. itemTaskIndex
  12188. ].toolChoose[toolIndex].sentenceList
  12189. )
  12190. );
  12191. } else {
  12192. var sentenceList = [
  12193. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12194. ];
  12195. this.sentenceList = sentenceList;
  12196. }
  12197. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12198. this.dialogVisibleSentence = true;
  12199. } else if (i == 48) {
  12200. if (
  12201. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12202. .toolChoose[toolIndex].tableJson
  12203. ) {
  12204. this.tableJson = JSON.parse(
  12205. JSON.stringify(
  12206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12207. itemTaskIndex
  12208. ].toolChoose[toolIndex].tableJson
  12209. )
  12210. );
  12211. } else {
  12212. var tableJson = { text: "" };
  12213. this.tableJson = tableJson;
  12214. }
  12215. this.dialogVisibleTable = true;
  12216. } else if (i == 52) {
  12217. if (
  12218. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12219. .toolChoose[toolIndex].wordJson
  12220. ) {
  12221. this.wordJson = JSON.parse(
  12222. JSON.stringify(
  12223. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12224. itemTaskIndex
  12225. ].toolChoose[toolIndex].wordJson
  12226. )
  12227. );
  12228. } else {
  12229. var wordJson = { text: "" };
  12230. this.wordJson = wordJson;
  12231. }
  12232. this.dialogVisibleWord = true;
  12233. // else if (i == 50) {
  12234. // if (
  12235. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12236. // .toolChoose[toolIndex].uploadJson
  12237. // ) {
  12238. // this.uploadJson = JSON.parse(
  12239. // JSON.stringify(
  12240. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12241. // itemTaskIndex
  12242. // ].toolChoose[toolIndex].uploadJson
  12243. // )
  12244. // );
  12245. // } else {
  12246. // var uploadJson = [];
  12247. // this.uploadJson = uploadJson;
  12248. // }
  12249. // this.dialogVisibleMoreUpload = true;
  12250. // }
  12251. } else if (i == 10) {
  12252. if (
  12253. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12254. .toolChoose[toolIndex].preTime
  12255. ) {
  12256. this.preTime = JSON.parse(
  12257. JSON.stringify(
  12258. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12259. itemTaskIndex
  12260. ].toolChoose[toolIndex].preTime
  12261. )
  12262. );
  12263. } else {
  12264. var preTime = 0;
  12265. this.preTime = preTime;
  12266. }
  12267. this.dialogVisiblePreTime = true;
  12268. } else if (i == 49) {
  12269. if (
  12270. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12271. .toolChoose[toolIndex].groupJson
  12272. ) {
  12273. this.groupJson = JSON.parse(
  12274. JSON.stringify(
  12275. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12276. itemTaskIndex
  12277. ].toolChoose[toolIndex].groupJson
  12278. )
  12279. );
  12280. } else {
  12281. var groupJson = {
  12282. group: [{ name: "第1组" }],
  12283. number: undefined,
  12284. islock: 1,
  12285. };
  12286. this.groupJson = groupJson;
  12287. }
  12288. this.dialogVisibleGroup = true;
  12289. } else if (i == 62) {
  12290. if (
  12291. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12292. .toolChoose[toolIndex].videoJson
  12293. ) {
  12294. this.videoJson = JSON.parse(
  12295. JSON.stringify(
  12296. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12297. itemTaskIndex
  12298. ].toolChoose[toolIndex].videoJson
  12299. )
  12300. );
  12301. } else {
  12302. var videoJson = {
  12303. video: "",
  12304. setting: [],
  12305. };
  12306. this.videoJson = videoJson;
  12307. }
  12308. this.dialogVisibleVideo = true;
  12309. } else if (i == 15) {
  12310. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12311. itemTaskIndex
  12312. ].toolChoose[toolIndex].answerQ
  12313. ? JSON.parse(
  12314. JSON.stringify(
  12315. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12316. itemTaskIndex
  12317. ].toolChoose[toolIndex].answerQ
  12318. )
  12319. )
  12320. : "";
  12321. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12322. this.dialogVisible8 = true;
  12323. } else if (i == 40) {
  12324. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12325. itemTaskIndex
  12326. ].toolChoose[toolIndex].rateJson
  12327. ? JSON.parse(
  12328. JSON.stringify(
  12329. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12330. itemTaskIndex
  12331. ].toolChoose[toolIndex].rateJson
  12332. )
  12333. )
  12334. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12335. this.selectSteps = 1;
  12336. this.dialogVisibleRate = true;
  12337. } else if (i == 42) {
  12338. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12339. itemTaskIndex
  12340. ].toolChoose[toolIndex].answerQ
  12341. ? JSON.parse(
  12342. JSON.stringify(
  12343. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12344. itemTaskIndex
  12345. ].toolChoose[toolIndex].answerQ
  12346. )
  12347. )
  12348. : "";
  12349. this.dialogVisibleMp3 = true;
  12350. } else if (i == 41) {
  12351. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12352. itemTaskIndex
  12353. ].toolChoose[toolIndex].selectJson
  12354. ? JSON.parse(
  12355. JSON.stringify(
  12356. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12357. itemTaskIndex
  12358. ].toolChoose[toolIndex].selectJson
  12359. )
  12360. )
  12361. : { url: "", select: [], answer: [] };
  12362. this.selectSteps = 1;
  12363. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12364. this.dialogVisibleSelect = true;
  12365. } else if (i == 3) {
  12366. top.postMessage(
  12367. {
  12368. tools: "3y",
  12369. cid: this.cid,
  12370. stage: this.unitIndex,
  12371. task: itemTaskIndex,
  12372. tool: toolIndex,
  12373. },
  12374. "*"
  12375. );
  12376. } else if (i == 1) {
  12377. top.postMessage(
  12378. {
  12379. tools: "1y",
  12380. cid: this.cid,
  12381. stage: this.unitIndex,
  12382. task: itemTaskIndex,
  12383. tool: toolIndex,
  12384. },
  12385. "*"
  12386. );
  12387. } else if (i == 57) {
  12388. top.postMessage(
  12389. {
  12390. tools: "57y",
  12391. cid: this.cid,
  12392. stage: this.unitIndex,
  12393. task: itemTaskIndex,
  12394. tool: toolIndex,
  12395. },
  12396. "*"
  12397. );
  12398. } else if (i == 69) {
  12399. this.englishList = {};
  12400. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12401. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12402. ? JSON.parse(
  12403. JSON.stringify(
  12404. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12405. itemTaskIndex
  12406. ].toolChoose[toolIndex].englishList
  12407. )
  12408. )
  12409. : {};
  12410. this.$forceUpdate();
  12411. this.englishDialogVisible = true;
  12412. } else if (i == 70) {
  12413. this.englishVoiceJson = {};
  12414. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12415. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12416. ? JSON.parse(
  12417. JSON.stringify(
  12418. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12419. itemTaskIndex
  12420. ].toolChoose[toolIndex].englishVoiceJson
  12421. )
  12422. )
  12423. : {
  12424. title: '',
  12425. detail: '',
  12426. array: []
  12427. };
  12428. // {
  12429. // time: "",
  12430. // class: "",
  12431. // difficulty: 0,
  12432. // topic: "",
  12433. // isShow: false,
  12434. // eva: 0,
  12435. // aiEva: {
  12436. // isAiEva: false,
  12437. // aiEvaChoose: [],
  12438. // },
  12439. // allfType: [],
  12440. // englishJson: {},
  12441. // };
  12442. this.$forceUpdate();
  12443. this.EnglishVoiceDialog = true;
  12444. }
  12445. },
  12446. setEnglishVoiceJson(val) {
  12447. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12448. this.taskCount
  12449. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12450. JSON.stringify(val)
  12451. );
  12452. this.$forceUpdate();
  12453. if (
  12454. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12455. .toolChoose[this.toolIndex].tool != 70
  12456. ) {
  12457. this.addTools(70, this.taskCount, this.toolIndex);
  12458. }
  12459. },
  12460. chapAddTools(i) {
  12461. if (this.chapTools[0].tools.length == 0) {
  12462. this.chapTools[0].tools.push(i);
  12463. } else {
  12464. if (this.chapTools[0].tools.indexOf(i) != -1) {
  12465. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  12466. } else {
  12467. this.chapTools[0].tools.push(i);
  12468. }
  12469. }
  12470. this.$forceUpdate();
  12471. },
  12472. addChaptersDataTools() {
  12473. if (this.chapTools[0].tools.indexOf(4) != -1) {
  12474. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12475. this.chapCount
  12476. ].chapterData.unshift({
  12477. name: this.chapTools[0].toolDetail,
  12478. url: this.chapTools[0].tools,
  12479. type: 7,
  12480. askJson: this.askJson,
  12481. });
  12482. } else {
  12483. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12484. this.chapCount
  12485. ].chapterData.unshift({
  12486. name: this.chapTools[0].toolDetail,
  12487. url: this.chapTools[0].tools,
  12488. type: 7,
  12489. });
  12490. }
  12491. this.imgChange1(null, null, 7, this.chapCount);
  12492. this.dialogVisible4 = false;
  12493. },
  12494. addTools(i, itemTaskIndex, toolIndex) {
  12495. // if (
  12496. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12497. // .toolChoose[toolIndex].tool.length == 0
  12498. // ) {
  12499. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12500. // itemTaskIndex
  12501. // ].toolChoose[toolIndex].tool.push(i);
  12502. // } else {
  12503. // if (
  12504. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12505. // itemTaskIndex
  12506. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12507. // ) {
  12508. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12509. // itemTaskIndex
  12510. // ].toolChoose[toolIndex].tool.splice(
  12511. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12512. // itemTaskIndex
  12513. // ].toolChoose[toolIndex].tool.indexOf(i),
  12514. // 1
  12515. // );
  12516. // } else {
  12517. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12518. // itemTaskIndex
  12519. // ].toolChoose[toolIndex].tool.push(i);
  12520. // }
  12521. // console.log(
  12522. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12523. // .toolChoose[toolIndex].tool
  12524. // );
  12525. // }
  12526. if (i == 4) {
  12527. if (
  12528. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12529. .toolChoose[toolIndex].askJson.askTitle == "" ||
  12530. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12531. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  12532. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12533. .toolChoose[toolIndex].askJson[0].checkList < 2
  12534. ) {
  12535. this.openTools(itemTaskIndex, 4, toolIndex);
  12536. // this.$message({
  12537. // message: "请填写完整问卷内容",
  12538. // type: "error",
  12539. // });
  12540. return;
  12541. }
  12542. }
  12543. if (i == 45) {
  12544. if (
  12545. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12546. .toolChoose[toolIndex].testJson ||
  12547. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12548. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  12549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12550. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  12551. ) {
  12552. this.openTools(itemTaskIndex, 45, toolIndex);
  12553. // this.$message({
  12554. // message: "请填写完整问卷内容",
  12555. // type: "error",
  12556. // });
  12557. return;
  12558. }
  12559. }
  12560. if (i == 47) {
  12561. if (
  12562. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12563. .toolChoose[toolIndex].sentenceList ||
  12564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12565. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  12566. ) {
  12567. this.openTools(itemTaskIndex, 47, toolIndex);
  12568. return;
  12569. }
  12570. }
  12571. if (i == 69) {
  12572. if (
  12573. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12574. .toolChoose[toolIndex].englishList
  12575. ) {
  12576. this.openTools(itemTaskIndex, 69, toolIndex);
  12577. return;
  12578. }
  12579. }
  12580. if (i == 70) {
  12581. if (
  12582. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12583. .toolChoose[toolIndex].englishVoiceJson
  12584. ) {
  12585. this.openTools(itemTaskIndex, 70, toolIndex);
  12586. return;
  12587. }
  12588. }
  12589. // if (i == 48) {
  12590. // if (
  12591. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12592. // .toolChoose[toolIndex].tableJson
  12593. // ) {
  12594. // this.openTools(itemTaskIndex, 48, toolIndex);
  12595. // return;
  12596. // }
  12597. // }
  12598. // if (i == 50) {
  12599. // if (
  12600. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12601. // .toolChoose[toolIndex].uploadJson
  12602. // ) {
  12603. // this.openTools(itemTaskIndex, 50, toolIndex);
  12604. // return;
  12605. // }
  12606. // }
  12607. if (i == 49) {
  12608. if (
  12609. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12610. .toolChoose[toolIndex].groupJson
  12611. ) {
  12612. this.openTools(itemTaskIndex, 49, toolIndex);
  12613. return;
  12614. }
  12615. }
  12616. if (i == 62) {
  12617. if (
  12618. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12619. .toolChoose[toolIndex].videoJson
  12620. ) {
  12621. this.openTools(itemTaskIndex, 62, toolIndex);
  12622. return;
  12623. }
  12624. }
  12625. if (i == 15) {
  12626. if (
  12627. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12628. .toolChoose[toolIndex].answerQ ||
  12629. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12630. .toolChoose[toolIndex].answerQ == ""
  12631. ) {
  12632. this.openTools(itemTaskIndex, 15, toolIndex);
  12633. // this.$message({
  12634. // message: "请填写问答内容",
  12635. // type: "error",
  12636. // });
  12637. return;
  12638. }
  12639. }
  12640. if (i == 40) {
  12641. if (
  12642. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12643. .toolChoose[toolIndex].rateJson ||
  12644. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12645. .toolChoose[toolIndex].rateJson.length
  12646. ) {
  12647. this.openTools(itemTaskIndex, 40, toolIndex);
  12648. return;
  12649. }
  12650. }
  12651. if (i == 41) {
  12652. if (
  12653. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12654. .toolChoose[toolIndex].selectJson ||
  12655. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12656. .toolChoose[toolIndex].selectJson.url == "" ||
  12657. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12658. .toolChoose[toolIndex].selectJson.select.length ||
  12659. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12660. .toolChoose[toolIndex].selectJson.answer.length
  12661. ) {
  12662. this.openTools(itemTaskIndex, 41, toolIndex);
  12663. return;
  12664. }
  12665. }
  12666. if (i == 42) {
  12667. if (
  12668. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12669. .toolChoose[toolIndex].answerQ ||
  12670. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12671. .toolChoose[toolIndex].answerQ == ""
  12672. ) {
  12673. this.openTools(itemTaskIndex, 42, toolIndex);
  12674. return;
  12675. }
  12676. }
  12677. if (
  12678. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12679. .toolChoose[toolIndex].tool.length > 0
  12680. ) {
  12681. if (
  12682. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12683. itemTaskIndex
  12684. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12685. ) {
  12686. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12687. itemTaskIndex
  12688. ].toolChoose[toolIndex].tool.splice(
  12689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12690. itemTaskIndex
  12691. ].toolChoose[toolIndex].tool.indexOf(i),
  12692. 1
  12693. );
  12694. } else {
  12695. // this.$message({
  12696. // message: "每个工具只能添加一个",
  12697. // type: "error",
  12698. // });
  12699. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12700. itemTaskIndex
  12701. ].toolChoose[toolIndex].tool = [];
  12702. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12703. itemTaskIndex
  12704. ].toolChoose[toolIndex].tool.push(i);
  12705. }
  12706. } else {
  12707. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12708. itemTaskIndex
  12709. ].toolChoose[toolIndex].tool.push(i);
  12710. }
  12711. this.$forceUpdate();
  12712. },
  12713. addAskList(index) {
  12714. this.askJson.askJson.splice(index + 1, 0, {
  12715. askstitle: "",
  12716. askItem: 1,
  12717. checkList: [],
  12718. });
  12719. this.askJson.askCount++;
  12720. },
  12721. addTestList(index) {
  12722. this.testJson.testJson.splice(index + 1, 0, {
  12723. teststitle: "",
  12724. testItem: 1,
  12725. checkList: [],
  12726. timuList: [],
  12727. answer: [],
  12728. type: "1",
  12729. });
  12730. this.testJson.testCount++;
  12731. },
  12732. deleteAskList(index) {
  12733. if (
  12734. !this.askJson.askJson[index].askstitle &&
  12735. this.askJson.askJson[index].askItem == 1 &&
  12736. !this.askJson.askJson[index].checkList[0]
  12737. ) {
  12738. this.askJson.askJson.splice(index, 1);
  12739. this.askJson.askCount--;
  12740. } else {
  12741. let _this = this;
  12742. _this
  12743. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12744. confirmButtonText: "确定",
  12745. cancelButtonText: "取消",
  12746. type: "warning",
  12747. })
  12748. .then(() => {
  12749. _this.askJson.askJson.splice(index, 1);
  12750. _this.askJson.askCount--;
  12751. })
  12752. .catch(() => {
  12753. return;
  12754. });
  12755. }
  12756. },
  12757. deleteTestList(index) {
  12758. if (
  12759. !this.testJson.testJson[index].teststitle &&
  12760. this.testJson.testJson[index].testItem == 1 &&
  12761. !this.testJson.testJson[index].checkList[0]
  12762. ) {
  12763. this.testJson.testJson.splice(index, 1);
  12764. this.testJson.testCount--;
  12765. } else {
  12766. let _this = this;
  12767. _this
  12768. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12769. confirmButtonText: "确定",
  12770. cancelButtonText: "取消",
  12771. type: "warning",
  12772. })
  12773. .then(() => {
  12774. _this.testJson.testJson.splice(index, 1);
  12775. _this.testJson.testCount--;
  12776. })
  12777. .catch(() => {
  12778. return;
  12779. });
  12780. }
  12781. },
  12782. askMove(type, index) {
  12783. if (type == 1) {
  12784. if (index > 0) {
  12785. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  12786. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12787. this.askJson.askJson[index - 1] = b;
  12788. this.askJson.askJson[index] = a;
  12789. }
  12790. } else {
  12791. if (index < this.askJson.askJson.length - 1) {
  12792. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  12793. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12794. this.askJson.askJson[index + 1] = b;
  12795. this.askJson.askJson[index] = a;
  12796. }
  12797. }
  12798. this.$forceUpdate();
  12799. },
  12800. checkMove(type, index, checkIndex) {
  12801. if (type == 1) {
  12802. if (checkIndex > 0) {
  12803. let a = JSON.parse(
  12804. JSON.stringify(
  12805. this.askJson.askJson[index].checkList[checkIndex - 1]
  12806. )
  12807. );
  12808. let b = JSON.parse(
  12809. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12810. );
  12811. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12812. this.askJson.askJson[index].checkList[checkIndex] = a;
  12813. }
  12814. } else {
  12815. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12816. let a = JSON.parse(
  12817. JSON.stringify(
  12818. this.askJson.askJson[index].checkList[checkIndex + 1]
  12819. )
  12820. );
  12821. let b = JSON.parse(
  12822. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12823. );
  12824. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12825. this.askJson.askJson[index].checkList[checkIndex] = a;
  12826. }
  12827. }
  12828. this.$forceUpdate();
  12829. },
  12830. testMove(type, index) {
  12831. if (type == 1) {
  12832. if (index > 0) {
  12833. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12834. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12835. this.testJson.testJson[index - 1] = b;
  12836. this.testJson.testJson[index] = a;
  12837. }
  12838. } else {
  12839. if (index < this.testJson.testJson.length - 1) {
  12840. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12841. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12842. this.testJson.testJson[index + 1] = b;
  12843. this.testJson.testJson[index] = a;
  12844. }
  12845. }
  12846. this.$forceUpdate();
  12847. },
  12848. tcheckMove(type, index, checkIndex) {
  12849. if (type == 1) {
  12850. if (checkIndex > 0) {
  12851. let a = JSON.parse(
  12852. JSON.stringify(
  12853. this.testJson.testJson[index].checkList[checkIndex - 1]
  12854. )
  12855. );
  12856. let b = JSON.parse(
  12857. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12858. );
  12859. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12860. this.testJson.testJson[index].checkList[checkIndex] = a;
  12861. }
  12862. } else {
  12863. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12864. let a = JSON.parse(
  12865. JSON.stringify(
  12866. this.testJson.testJson[index].checkList[checkIndex + 1]
  12867. )
  12868. );
  12869. let b = JSON.parse(
  12870. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12871. );
  12872. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12873. this.testJson.testJson[index].checkList[checkIndex] = a;
  12874. }
  12875. }
  12876. this.$forceUpdate();
  12877. },
  12878. addcheckList(json, index) {
  12879. // json.checkList.length++;
  12880. json.checkList.splice(index + 1, 0, "");
  12881. json.askItem++;
  12882. this.$forceUpdate();
  12883. },
  12884. deletecheckList(json, index) {
  12885. // json.checkList.length--;
  12886. json.checkList.splice(index, 1);
  12887. json.askItem--;
  12888. this.$forceUpdate();
  12889. },
  12890. addTcheckList(json, index) {
  12891. // json.checkList.length++;
  12892. json.checkList.splice(index + 1, 0, "");
  12893. json.testItem++;
  12894. this.$forceUpdate();
  12895. },
  12896. deleteTcheckList(json, index) {
  12897. // json.checkList.length--;
  12898. json.checkList.splice(index, 1);
  12899. json.testItem--;
  12900. this.$forceUpdate();
  12901. },
  12902. checkTestType(type, json) {
  12903. json.type = type;
  12904. setTimeout(() => {
  12905. json.answer = [];
  12906. }, 100);
  12907. },
  12908. checkAskType(type, json) {
  12909. json.type = type;
  12910. // json.checkList = [];
  12911. this.$forceUpdate();
  12912. },
  12913. addSelectList(json) {
  12914. json.select.push("");
  12915. json.answer.push("");
  12916. },
  12917. deleteSelectList(json) {
  12918. // json.select.length--;
  12919. // json.answer.length--;
  12920. json.select.splice(json.select.length - 1, 1);
  12921. json.answer.splice(json.answer.length - 1, 1);
  12922. },
  12923. addAsk() {
  12924. if (this.askJson.askTitle === "") {
  12925. this.$message.error("标题不能为空!");
  12926. return;
  12927. }
  12928. var aj = this.askJson.askJson;
  12929. var b = 1;
  12930. for (var i = 0; i < aj.length; i++) {
  12931. if (aj[i].askstitle === "") {
  12932. var a = 1;
  12933. for (let index = 0; index < aj[i].askItem; index++) {
  12934. const element = aj[i].checkList[index]
  12935. ? aj[i].checkList[index]
  12936. : "";
  12937. if (element != "") {
  12938. b++;
  12939. this.$message.error(`请将题目${i + 1}填写完整。`);
  12940. return;
  12941. } else {
  12942. a++;
  12943. }
  12944. }
  12945. if (b == 1) {
  12946. this.$message.error("至少填写一个问题");
  12947. return;
  12948. }
  12949. } else if (aj[i].askstitle != "") {
  12950. for (let index = 0; index < aj[i].askItem; index++) {
  12951. const element = aj[i].checkList[index]
  12952. ? aj[i].checkList[index]
  12953. : "";
  12954. var index = 0;
  12955. for (var z = 0; z < aj[i].checkList.length; z++) {
  12956. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12957. if (checkC != "") {
  12958. index++;
  12959. } else {
  12960. this.$message.error(`题目${i + 1}选项不能为空!`);
  12961. return;
  12962. }
  12963. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12964. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12965. if (checkC == checkC2) {
  12966. this.$message.error(
  12967. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12968. );
  12969. return;
  12970. }
  12971. }
  12972. }
  12973. b++;
  12974. if (index < 2) {
  12975. this.$message.error("每道题目至少需要设置2个选项。");
  12976. return;
  12977. }
  12978. }
  12979. }
  12980. }
  12981. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  12982. var elc = el.checkList.filter((element) => {
  12983. return element != "";
  12984. });
  12985. return el.askstitle != "" && elc.length != 0;
  12986. });
  12987. if (!this.dialogVisible4) {
  12988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12989. this.taskCount
  12990. ].toolChoose[this.toolIndex] = this.askJson;
  12991. }
  12992. this.dialogVisible5 = false;
  12993. if (
  12994. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12995. .toolChoose[this.toolIndex].tool != 4
  12996. ) {
  12997. this.addTools(4, this.taskCount, this.toolIndex);
  12998. }
  12999. },
  13000. addTest() {
  13001. // if (this.testJson.testTitle === "") {
  13002. // this.$message.error("标题不能为空!");
  13003. // return;
  13004. // }
  13005. var aj = this.testJson.testJson;
  13006. var b = 1;
  13007. for (var i = 0; i < aj.length; i++) {
  13008. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13009. var a = 1;
  13010. for (let index = 0; index < aj[i].testItem; index++) {
  13011. const element = aj[i].checkList[index]
  13012. ? aj[i].checkList[index]
  13013. : "";
  13014. if (element != "") {
  13015. b++;
  13016. this.$message.error(`请将题目${i + 1}填写完整。`);
  13017. return;
  13018. } else {
  13019. a++;
  13020. }
  13021. }
  13022. if (b == 1) {
  13023. this.$message.error("至少填写一个问题");
  13024. return;
  13025. }
  13026. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13027. for (let index = 0; index < aj[i].testItem; index++) {
  13028. const element = aj[i].checkList[index]
  13029. ? aj[i].checkList[index]
  13030. : "";
  13031. var index = 0;
  13032. for (var z = 0; z < aj[i].checkList.length; z++) {
  13033. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13034. if (checkC != "") {
  13035. index++;
  13036. } else {
  13037. this.$message.error(`题目${i + 1}选项不能为空!`);
  13038. return;
  13039. }
  13040. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13041. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13042. if (checkC == checkC2) {
  13043. this.$message.error(
  13044. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13045. );
  13046. return;
  13047. }
  13048. }
  13049. }
  13050. b++;
  13051. if (index < 2) {
  13052. this.$message.error("每道题目至少需要设置2个选项。");
  13053. return;
  13054. }
  13055. if (
  13056. (aj[i].type == "2" && !aj[i].answer.length) ||
  13057. (aj[i].type == "1" &&
  13058. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13059. (aj[i].answer !== 0 && !aj[i].answer)))
  13060. ) {
  13061. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13062. return;
  13063. }
  13064. }
  13065. }
  13066. }
  13067. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13068. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13069. var elc = el.checkList.filter((element) => {
  13070. return element != "";
  13071. });
  13072. return (
  13073. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13074. );
  13075. });
  13076. isTestJson.testCount = isTestJson.testJson.length;
  13077. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13078. this.taskCount
  13079. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13080. this.dialogVisibleChoice = false;
  13081. if (
  13082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13083. .toolChoose[this.toolIndex].tool != 45
  13084. ) {
  13085. this.addTools(45, this.taskCount, this.toolIndex);
  13086. }
  13087. },
  13088. addVideoJson(videoJson) {
  13089. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13090. this.taskCount
  13091. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13092. this.dialogVisibleVideo = false;
  13093. if (
  13094. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13095. .toolChoose[this.toolIndex].tool != 62
  13096. ) {
  13097. this.addTools(62, this.taskCount, this.toolIndex);
  13098. }
  13099. },
  13100. //自动获取剪贴板
  13101. pasteOption() {
  13102. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13103. if (!iframe) {
  13104. this.$message.error("请使用AI共创生成题目");
  13105. return;
  13106. }
  13107. let copyData = iframe.contentWindow.copyData;
  13108. if (!copyData || !copyData.selectData.length) {
  13109. this.$message.error("请使用AI共创生成题目");
  13110. return;
  13111. }
  13112. let selectData = copyData.selectData;
  13113. for (var i = 0; i < selectData.length; i++) {
  13114. let answer = 0;
  13115. switch (selectData[i].answer[0]) {
  13116. case "A":
  13117. answer = 0;
  13118. break;
  13119. case "B":
  13120. answer = 1;
  13121. break;
  13122. case "C":
  13123. answer = 2;
  13124. break;
  13125. case "D":
  13126. answer = 3;
  13127. break;
  13128. case "E":
  13129. answer = 4;
  13130. break;
  13131. default:
  13132. break;
  13133. }
  13134. this.testJson.testJson.push({
  13135. teststitle: selectData[i].subject,
  13136. testItem: selectData[i].options.length,
  13137. checkList: selectData[i].options,
  13138. timuList: [],
  13139. answer: answer,
  13140. type: "1",
  13141. });
  13142. this.testJson.testCount++;
  13143. }
  13144. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13145. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13146. var elc = el.checkList.filter((element) => {
  13147. return element != "";
  13148. });
  13149. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13150. });
  13151. isTestJson.testCount = isTestJson.testJson.length;
  13152. if (!isTestJson.testCount) {
  13153. return;
  13154. }
  13155. this.testJson = isTestJson;
  13156. this.$forceUpdate();
  13157. },
  13158. pasteTask(taskJson) {
  13159. let stageTasksData = [];
  13160. if (taskJson) {
  13161. stageTasksData = taskJson;
  13162. } else {
  13163. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13164. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13165. if (!iframe && !iframe2) {
  13166. this.$message.error("请使用AI共创生成");
  13167. return;
  13168. }
  13169. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13170. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13171. if (
  13172. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13173. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13174. ) {
  13175. this.$message.error("请使用AI共创生成");
  13176. return;
  13177. }
  13178. stageTasksData = copyData
  13179. ? copyData.tasksData
  13180. : copyData2
  13181. ? copyData2.tasksData
  13182. : [{ taskName: "", taskDecs: "" }];
  13183. }
  13184. let taskA = [];
  13185. let tasks = stageTasksData;
  13186. for (var j = 0; j < tasks.length; j++) {
  13187. taskA.push({
  13188. task: tasks[j].taskName,
  13189. taskDetail: tasks[j].taskDecs,
  13190. chapterData: [],
  13191. toolText: "",
  13192. toolChoose: [
  13193. {
  13194. tool: [],
  13195. toolDetail: "",
  13196. toolType: 0,
  13197. askCount: 1,
  13198. askTitle: "",
  13199. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13200. },
  13201. ],
  13202. isShowTools: false,
  13203. askCount: 1,
  13204. isFold: 1,
  13205. askTitle: "",
  13206. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13207. checkJson: [{ checkCount: [], checkPerent: [] }],
  13208. homeworkList: [],
  13209. });
  13210. }
  13211. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13212. this.$forceUpdate();
  13213. },
  13214. pasteStage(stageJson) {
  13215. let stageData = [];
  13216. if (stageJson) {
  13217. stageData = stageJson;
  13218. } else {
  13219. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13220. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13221. if (!iframe && !iframe2) {
  13222. this.$message.error("请使用AI共创生成");
  13223. return;
  13224. }
  13225. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13226. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13227. if (
  13228. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13229. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13230. ) {
  13231. this.$message.error("请使用AI共创生成");
  13232. return;
  13233. }
  13234. stageData = copyData
  13235. ? copyData.stageData
  13236. : copyData2
  13237. ? copyData2.stageData
  13238. : [""];
  13239. }
  13240. let stage = [];
  13241. for (var i = 0; i < stageData.length; i++) {
  13242. stage.push({
  13243. dyName: stageData[i], //单元标题
  13244. chapterInfo: [
  13245. {
  13246. isread: false,
  13247. chapterid: this.guid(),
  13248. title: "",
  13249. courseName: "",
  13250. taskJson: [
  13251. {
  13252. task: "",
  13253. taskDetail: "",
  13254. chapterData: [],
  13255. toolText: "",
  13256. toolChoose: [
  13257. {
  13258. tool: [],
  13259. toolDetail: "",
  13260. toolType: 0,
  13261. askCount: 1,
  13262. askTitle: "",
  13263. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13264. },
  13265. ],
  13266. isShowTools: false,
  13267. askCount: 1,
  13268. isFold: 1,
  13269. askTitle: "",
  13270. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13271. checkJson: [{ checkCount: [], checkPerent: [] }],
  13272. homeworkList: [],
  13273. },
  13274. ],
  13275. itemCount: 1,
  13276. fileList1: [],
  13277. video: [],
  13278. testData: [],
  13279. pData: [],
  13280. templateArray: [],
  13281. },
  13282. ],
  13283. });
  13284. }
  13285. let _this = this;
  13286. if (stageJson) {
  13287. if (!_this.cid) {
  13288. _this.unitJson = stage;
  13289. } else {
  13290. _this.unitIndex = 0;
  13291. _this.unitJson = stage;
  13292. _this.updateWork();
  13293. }
  13294. } else {
  13295. _this
  13296. .$confirm(
  13297. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13298. "提示",
  13299. {
  13300. confirmButtonText: "确定",
  13301. cancelButtonText: "取消",
  13302. type: "warning",
  13303. }
  13304. )
  13305. .then(() => {
  13306. _this.unitIndex = 0;
  13307. _this.unitJson = stage;
  13308. // _this.steps++;
  13309. _this.updateWork();
  13310. })
  13311. .catch(() => {
  13312. return;
  13313. });
  13314. }
  13315. },
  13316. openStageBox() {
  13317. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13318. this.dialogVisibleStageChange = true;
  13319. },
  13320. updateChange() {
  13321. this.$confirm(
  13322. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13323. "提示",
  13324. {
  13325. confirmButtonText: "确定",
  13326. cancelButtonText: "取消",
  13327. type: "warning",
  13328. }
  13329. )
  13330. .then(() => {
  13331. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13332. this.updateWork();
  13333. this.dialogVisibleStageChange = false;
  13334. })
  13335. .catch(() => {
  13336. return;
  13337. });
  13338. },
  13339. addAnswer() {
  13340. if (this.answerQ == "") {
  13341. this.$message.error("请输入您想要问的问题");
  13342. return;
  13343. }
  13344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13345. this.taskCount
  13346. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13347. this.dialogVisible8 = false;
  13348. if (
  13349. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13350. .toolChoose[this.toolIndex].tool != 15
  13351. ) {
  13352. this.addTools(15, this.taskCount, this.toolIndex);
  13353. }
  13354. },
  13355. addMp3Answer() {
  13356. if (this.answerQ == "") {
  13357. this.$message.error("请输入您想要回答的问题");
  13358. return;
  13359. }
  13360. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13361. this.taskCount
  13362. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13363. this.dialogVisibleMp3 = false;
  13364. },
  13365. addRateAnswer() {
  13366. var a = 1;
  13367. for (var i = 0; i < this.rateJson.length; i++) {
  13368. if (this.rateJson[i].value == "") {
  13369. a = 2;
  13370. break;
  13371. }
  13372. }
  13373. if (a == 2) {
  13374. this.$message.error("请把评价信息填写完整");
  13375. return;
  13376. }
  13377. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13378. this.taskCount
  13379. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13380. this.dialogVisibleRate = false;
  13381. if (
  13382. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13383. .toolChoose[this.toolIndex].tool != 40
  13384. ) {
  13385. this.addTools(40, this.taskCount, this.toolIndex);
  13386. }
  13387. },
  13388. addSelectAnswer() {
  13389. if (this.selectJson.url == "") {
  13390. this.$message.error("请上传题目");
  13391. return;
  13392. }
  13393. if (!this.selectJson.select.length) {
  13394. this.$message.error("请添加选项");
  13395. return;
  13396. }
  13397. if (!this.selectJson.answer.length) {
  13398. this.$message.error("请设置答案");
  13399. return;
  13400. }
  13401. var a = 1;
  13402. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13403. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13404. a = 2;
  13405. }
  13406. }
  13407. if (a == 2) {
  13408. this.$message.error("请设置答案");
  13409. return;
  13410. }
  13411. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13412. this.taskCount
  13413. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13414. this.dialogVisibleSelect = false;
  13415. if (
  13416. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13417. .toolChoose[this.toolIndex].tool != 41
  13418. ) {
  13419. this.addTools(41, this.taskCount, this.toolIndex);
  13420. }
  13421. },
  13422. nextSelectSteps() {
  13423. if (this.selectJson.url == "") {
  13424. this.$message.error("请上传题目");
  13425. return;
  13426. }
  13427. if (!this.selectJson.select.length) {
  13428. this.$message.error("请添加选项");
  13429. return;
  13430. } else {
  13431. for (var z = 0; z < this.selectJson.select.length; z++) {
  13432. let checkC = this.selectJson.select[z];
  13433. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13434. let checkC2 = this.selectJson.select[z2];
  13435. if (checkC == checkC2) {
  13436. this.$message.error(
  13437. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13438. );
  13439. return;
  13440. }
  13441. }
  13442. }
  13443. }
  13444. var a = 1;
  13445. for (var i = 0; i < this.selectJson.select.length; i++) {
  13446. if (!this.selectJson.select[i]) {
  13447. a = 2;
  13448. }
  13449. }
  13450. if (a == 2) {
  13451. this.$message.error("添加的选项不能为空");
  13452. return;
  13453. }
  13454. this.selectSteps++;
  13455. },
  13456. selectCourseDetail() {
  13457. if (this.cid == "" || this.cid == undefined) {
  13458. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  13459. this.isTeacherSee = true;
  13460. }
  13461. console.log("这是新增课程");
  13462. this.selectAllType();
  13463. } else {
  13464. this.isOutline = true
  13465. this.isOutline2 = true
  13466. this.cpoteType = 4
  13467. this.cidType = 1;
  13468. let params = {
  13469. cid: this.cid,
  13470. };
  13471. this.ajax
  13472. .get(this.$store.state.api + "select_course_detail", params)
  13473. .then((res) => {
  13474. this.unitJson = JSON.parse(res.data[0][0].chapters);
  13475. this.courseState = res.data[0][0].state;
  13476. for (var j = 0; j < this.unitJson.length; j++) {
  13477. for (
  13478. var k = 0;
  13479. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  13480. k++
  13481. ) {
  13482. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  13483. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13484. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13485. : [];
  13486. let _chapterData = [];
  13487. for (
  13488. var c = 0;
  13489. c <
  13490. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  13491. .length;
  13492. c++
  13493. ) {
  13494. if (
  13495. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13496. ) {
  13497. _chapterData.push(
  13498. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13499. );
  13500. }
  13501. }
  13502. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  13503. _chapterData;
  13504. }
  13505. }
  13506. this.$forceUpdate();
  13507. this.courseName = res.data[0][0].title;
  13508. this.courseText = res.data[0][0].brief;
  13509. this.courseText2 = res.data[0][0].reBrief;
  13510. this.evalua = res.data[0][0].evaId;
  13511. this.cover = JSON.parse(res.data[0][0].cover);
  13512. this.noneBtnImg = this.cover.length >= 1;
  13513. if (res.data[0][0].refile) {
  13514. this.infoData = JSON.parse(res.data[0][0].refile)
  13515. }
  13516. // this.checkboxList =
  13517. // res.data[0][0].course_student.length > 0
  13518. // ? JSON.parse(res.data[0][0].course_student)
  13519. // : [];
  13520. this.checkboxList2 = res.data[0][0].juri
  13521. ? res.data[0][0].juri.split(",")
  13522. : [];
  13523. this.inviteCode = [];
  13524. for (var i = 0; i < res.data[2].length; i++) {
  13525. this.inviteCode.push({
  13526. cid: res.data[2][i].classid,
  13527. ic: res.data[2][i].code,
  13528. });
  13529. }
  13530. this.checkboxList3 = res.data[0][0].course_teacher
  13531. ? res.data[0][0].course_teacher.split(",")
  13532. : [];
  13533. // this.isTeacherSee =
  13534. // res.data[0][0].is_teacher_look == 0 ? true : false;
  13535. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13536. this.myWord = res.data[0][0].template;
  13537. this.templateC.id = "123";
  13538. this.courseUserid = res.data[0][0].userid;
  13539. // if(this.courseUserid == this.userid){
  13540. // this.InviteChange(this.checkboxList2)
  13541. // }
  13542. this.nbOrder = res.data[0][0].ordernumber;
  13543. this.courseTypeId = [];
  13544. for (var i = 0; i < res.data[1].length; i++) {
  13545. this.courseTypeId.push(res.data[1][i].typeid);
  13546. }
  13547. console.log(this.courseTypeId);
  13548. // if (this.timer) clearInterval(this.timer);
  13549. if (this.timer) clearTimeout(this.timer);
  13550. this.timer = null;
  13551. // this.timer = setInterval(() => {
  13552. if(res.data[3].length){
  13553. try {
  13554. this.aiJson = JSON.parse(res.data[3][0].tips);
  13555. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13556. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13557. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13558. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13559. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13560. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13561. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13562. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13563. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13564. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13565. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13566. }
  13567. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13568. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13569. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13570. this.templateid = res.data[3][0].template;
  13571. }catch(error){
  13572. console.error(error)
  13573. }
  13574. }
  13575. if(res.data[0][0].cpote){
  13576. try {
  13577. this.cpote = JSON.parse(res.data[0][0].cpote);
  13578. }catch(error){
  13579. console.error(error)
  13580. }
  13581. }
  13582. if(res.data[0][0].setting){
  13583. try {
  13584. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13585. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13586. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13587. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13588. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13589. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13590. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13591. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13592. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13593. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13594. 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;
  13595. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13596. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13597. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13598. this.courseTextBool = true
  13599. }
  13600. if(!this.teacherCourseText && !this.teacherCourseText){
  13601. this.isuseT = false
  13602. }
  13603. }catch(error){
  13604. console.error(error)
  13605. }
  13606. }
  13607. if(this.courseText){
  13608. this.courseTextB = false
  13609. }
  13610. if(this.teacherCourseText){
  13611. this.teacherCourseTextB = false
  13612. }
  13613. if(this.targetCourseText){
  13614. this.targetCourseTextB = false
  13615. }
  13616. if(this.targetCourseText2){
  13617. this.targetCourseText2B = false
  13618. }
  13619. this.isFileSearch = res.data[0][0].iresearch == 1
  13620. this.seleteCourseUpdate();
  13621. this.setMan();
  13622. this.selectAllType();
  13623. this.unitJson[
  13624. this.unitIndex
  13625. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13626. // }, 5000);
  13627. this.$forceUpdate();
  13628. setTimeout(() => {
  13629. this.checkEva(this.evalua);
  13630. setTimeout(() => {
  13631. this.checkEva(this.evalua);
  13632. }, 100);
  13633. }, 100);
  13634. })
  13635. .catch((err) => {
  13636. console.error(err);
  13637. });
  13638. }
  13639. if(this.aiId){
  13640. let params = {
  13641. cid: this.aiId,
  13642. };
  13643. this.ajax
  13644. .get(this.$store.state.api + "select_course_detail", params)
  13645. .then((res) => {
  13646. let _unitJson = JSON.parse(res.data[0][0].chapters);
  13647. let fileInfo = []
  13648. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  13649. for(var i = 0; i < _unitJson.length; i++){
  13650. let tasks = _unitJson[i].chapterInfo[0].taskJson
  13651. for(var j = 0; j < tasks.length; j++){
  13652. let _infoData = tasks[j].chapterData.filter(el => {
  13653. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  13654. })
  13655. if(_infoData.length){
  13656. fileInfo = [...fileInfo, ..._infoData]
  13657. }
  13658. }
  13659. }
  13660. this.infoData = fileInfo
  13661. this.$forceUpdate();
  13662. this.courseName = res.data[0][0].title;
  13663. this.courseText = res.data[0][0].brief;
  13664. this.courseText2 = res.data[0][0].reBrief;
  13665. this.cover = JSON.parse(res.data[0][0].cover);
  13666. this.noneBtnImg = this.cover.length >= 1;
  13667. this.checkboxList2 = res.data[0][0].juri
  13668. ? res.data[0][0].juri.split(",")
  13669. : [];
  13670. this.inviteCode = [];
  13671. for (var i = 0; i < res.data[2].length; i++) {
  13672. this.inviteCode.push({
  13673. cid: res.data[2][i].classid,
  13674. ic: res.data[2][i].code,
  13675. });
  13676. }
  13677. this.checkboxList3 = res.data[0][0].course_teacher
  13678. ? res.data[0][0].course_teacher.split(",")
  13679. : [];
  13680. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13681. this.myWord = res.data[0][0].template;
  13682. this.templateC.id = "123";
  13683. this.courseTypeId = [];
  13684. for (var i = 0; i < res.data[1].length; i++) {
  13685. this.courseTypeId.push(res.data[1][i].typeid);
  13686. }
  13687. console.log(this.courseTypeId);
  13688. if(res.data[3].length){
  13689. try {
  13690. this.aiJson = JSON.parse(res.data[3][0].tips);
  13691. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13692. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13693. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13694. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13695. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13696. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13697. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13698. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13699. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13700. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13701. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13702. }
  13703. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13704. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13705. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13706. this.templateid = res.data[3][0].template;
  13707. }catch(error){
  13708. console.error(error)
  13709. }
  13710. }
  13711. if(res.data[0][0].cpote){
  13712. try {
  13713. this.cpote = JSON.parse(res.data[0][0].cpote);
  13714. }catch(error){
  13715. console.error(error)
  13716. }
  13717. }
  13718. if(res.data[0][0].setting){
  13719. try {
  13720. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13721. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13722. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13723. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13724. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13725. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13726. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13727. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13728. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13729. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13730. 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;
  13731. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13732. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13733. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13734. this.courseTextBool = true
  13735. }
  13736. if(!this.teacherCourseText && !this.teacherCourseText){
  13737. this.isuseT = false
  13738. }
  13739. }catch(error){
  13740. console.error(error)
  13741. }
  13742. }
  13743. if(this.courseText){
  13744. this.courseTextB = false
  13745. }
  13746. if(this.teacherCourseText){
  13747. this.teacherCourseTextB = false
  13748. }
  13749. if(this.targetCourseText){
  13750. this.targetCourseTextB = false
  13751. }
  13752. if(this.targetCourseText2){
  13753. this.targetCourseText2B = false
  13754. }
  13755. this.setMan();
  13756. this.unitJson[
  13757. this.unitIndex
  13758. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13759. this.$forceUpdate();
  13760. setTimeout(() => {
  13761. this.checkEva(this.evalua);
  13762. setTimeout(() => {
  13763. this.checkEva(this.evalua);
  13764. }, 100);
  13765. }, 100);
  13766. })
  13767. .catch((err) => {
  13768. console.error(err);
  13769. });
  13770. }
  13771. // if(this.cidType != 1 && this.templateid == ''){
  13772. // this.promptShow = true
  13773. // }
  13774. },
  13775. seleteCourseUpdate() {
  13776. let params = {
  13777. cid: this.cid,
  13778. };
  13779. this.ajax
  13780. .get(this.$store.state.api + "select_course_detail", params)
  13781. .then((res) => {
  13782. // console.log(this.unitJson);
  13783. let unitJson = JSON.parse(res.data[0][0].chapters);
  13784. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  13785. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  13786. let _unitJson = [];
  13787. let _chapAarry = [];
  13788. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  13789. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  13790. let index = 1;
  13791. let chapindex;
  13792. if (_unitJson2.length > unitJson.length) {
  13793. for (let c = 0; c < _unitJson2.length; c++) {
  13794. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  13795. }
  13796. for (let j = 0; j < unitJson.length; j++) {
  13797. let count = 0;
  13798. for (let k = 0; k < _unitJson2.length; k++) {
  13799. if (
  13800. unitJson[j].chapterInfo[0].chapterid ==
  13801. _unitJson2[k].chapterInfo[0].chapterid
  13802. ) {
  13803. count++;
  13804. _chapAarry.splice(
  13805. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13806. 1
  13807. );
  13808. _unitJson.push(unitJson[j]);
  13809. break;
  13810. }
  13811. }
  13812. // if(count === 0){
  13813. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13814. // }
  13815. }
  13816. for (let k = 0; k < _unitJson2.length; k++) {
  13817. if (_unitJson2[k].isUpdate == 1) {
  13818. _chapAarry.splice(
  13819. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13820. 1
  13821. );
  13822. _unitJson.push(_unitJson2[k]);
  13823. }
  13824. }
  13825. console.log(_chapAarry);
  13826. for (let d = 0; d < _unitJson2.length; d++) {
  13827. if (
  13828. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13829. ) {
  13830. if (_unitIndex == d) {
  13831. index = 2;
  13832. }
  13833. chapindex = d;
  13834. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13835. }
  13836. }
  13837. } else {
  13838. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13839. }
  13840. for (let i = 0; i < unitJson.length; i++) {
  13841. if (
  13842. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13843. _unitJson[i].chapterInfo[0].chapterid !=
  13844. unitJson[i].chapterInfo[0].chapterid
  13845. ) {
  13846. if (i == _unitJson.length - 1) {
  13847. // this.unitIndex++
  13848. _unitIndex2++;
  13849. }
  13850. _unitJson.splice(i, 0, unitJson[i]);
  13851. } else if (i > _unitJson.length - 1) {
  13852. _unitJson.push(unitJson[i]);
  13853. } else if (
  13854. _unitJson[i].chapterInfo[0].chapterid ==
  13855. unitJson[i].chapterInfo[0].chapterid
  13856. ) {
  13857. _unitJson[i] = unitJson[i];
  13858. }
  13859. // if (i == _unitIndex) {
  13860. // continue;
  13861. // } else
  13862. }
  13863. if (_chapAarry.length && index != 2) {
  13864. if (chapindex < _unitIndex) {
  13865. this.isDelete = 2;
  13866. // this.unitIndex--;
  13867. _unitIndex2--;
  13868. } else if (
  13869. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13870. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13871. ) {
  13872. this.isDelete = 2;
  13873. for (let n = 0; n < _unitJson.length; n++) {
  13874. if (
  13875. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13876. _unitJson[n].chapterInfo[0].chapterid
  13877. ) {
  13878. // this.unitIndex = n;
  13879. _unitIndex2 = n;
  13880. _unitJson[n] = _unitJson2[_unitIndex];
  13881. break;
  13882. }
  13883. }
  13884. }
  13885. } else if (index != 2) {
  13886. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13887. _unitJson2[_unitIndex];
  13888. for (
  13889. var ci = 0;
  13890. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13891. ci++
  13892. ) {
  13893. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13894. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13895. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13896. .toolChoose
  13897. : [];
  13898. let _chapterData = [];
  13899. for (
  13900. var c = 0;
  13901. c <
  13902. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13903. .length;
  13904. c++
  13905. ) {
  13906. if (
  13907. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13908. .chapterData[c]
  13909. ) {
  13910. _chapterData.push(
  13911. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13912. .chapterData[c]
  13913. );
  13914. }
  13915. }
  13916. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13917. _chapterData;
  13918. }
  13919. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13920. }
  13921. if (index == 1) {
  13922. this.unitJson = _unitJson;
  13923. this.$forceUpdate();
  13924. setTimeout(() => {
  13925. if (this.unitIndex != _unitIndex2) {
  13926. this.isDelete = 2;
  13927. this.unitIndex = _unitIndex2;
  13928. }
  13929. }, 0);
  13930. this.timer = setTimeout(() => {
  13931. this.seleteCourseUpdate();
  13932. }, 1000);
  13933. } else if (index == 2) {
  13934. let _this = this;
  13935. _this
  13936. .$confirm(
  13937. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13938. "提示",
  13939. {
  13940. confirmButtonText: "需要",
  13941. cancelButtonText: "取消",
  13942. type: "warning",
  13943. }
  13944. )
  13945. .then(() => {
  13946. if (_this.time()) {
  13947. _this.restoreWork(
  13948. _chapAarry[0],
  13949. _unitJson,
  13950. chapindex,
  13951. _unitJson2,
  13952. _unitIndex2
  13953. );
  13954. }
  13955. })
  13956. .catch(() => {
  13957. _this.unitJson = _unitJson;
  13958. _this.$forceUpdate();
  13959. setTimeout(() => {
  13960. if (this.unitIndex != _unitIndex2) {
  13961. this.isDelete = 2;
  13962. this.unitIndex = _unitIndex2;
  13963. }
  13964. }, 0);
  13965. _this.timer = setTimeout(() => {
  13966. _this.seleteCourseUpdate();
  13967. }, 1000);
  13968. });
  13969. }
  13970. // 在复制操作之前记录滚动位置
  13971. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13972. // 执行复制操作
  13973. // 复制操作完成后恢复滚动位置
  13974. this.$nextTick(() => {
  13975. if (this.$refs.scrollContainer) {
  13976. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13977. }
  13978. });
  13979. })
  13980. .catch((err) => {
  13981. console.error(err);
  13982. });
  13983. },
  13984. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  13985. let params = [
  13986. {
  13987. cid: this.cid,
  13988. chapters: JSON.stringify(this.unitJson),
  13989. uid: this.userid,
  13990. chapid: chapid,
  13991. },
  13992. ];
  13993. this.ajax
  13994. .post(this.$store.state.api + "restoreWork", params)
  13995. .then((res) => {
  13996. this.$message({
  13997. message: "恢复成功",
  13998. type: "success",
  13999. });
  14000. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14001. this.unitJson = unitJson;
  14002. this.$forceUpdate();
  14003. setTimeout(() => {
  14004. if (this.unitIndex != unitIndex2) {
  14005. this.isDelete = 2;
  14006. this.unitIndex = unitIndex2;
  14007. }
  14008. }, 0);
  14009. this.timer = setTimeout(() => {
  14010. this.seleteCourseUpdate();
  14011. }, 1000);
  14012. })
  14013. .catch((err) => {
  14014. this.$message.error("网络不佳");
  14015. console.error(err);
  14016. });
  14017. },
  14018. getTypeName() {
  14019. console.log(this.courseTypeId);
  14020. this.$forceUpdate();
  14021. },
  14022. selectAllType() {
  14023. let params = {
  14024. org: this.org && this.org != "" ? this.org : "",
  14025. oid: this.oid && this.oid != "" ? this.oid : "",
  14026. };
  14027. this.ajax
  14028. .get(this.$store.state.api + "selectAllType", params)
  14029. .then((res) => {
  14030. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14031. res.data[0] = [...res.data[0], ...res.data[4]];
  14032. }
  14033. this.CourseType = res.data;
  14034. this.CourseType2 = [
  14035. { name: "智见课程", id: [] },
  14036. { name: "智行课程", id: [] },
  14037. { name: "智创课程", id: [] },
  14038. ];
  14039. for (var cti = 0; cti < res.data[0].length; cti++) {
  14040. if (
  14041. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14042. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14043. ) {
  14044. this.CourseType2[0].id.push(res.data[0][cti].id);
  14045. } else if (
  14046. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14047. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14048. ) {
  14049. this.CourseType2[1].id.push(res.data[0][cti].id);
  14050. } else if (
  14051. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14052. ) {
  14053. this.CourseType2[2].id.push(res.data[0][cti].id);
  14054. }
  14055. if (
  14056. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14057. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14058. ) {
  14059. res.data[0][cti].name = "年级";
  14060. } else if (
  14061. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14062. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14063. ) {
  14064. res.data[0][cti].name = "学科";
  14065. } else if (
  14066. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14067. ) {
  14068. res.data[0][cti].name = "主题";
  14069. }
  14070. }
  14071. let _courseTypeId = [];
  14072. for (var i = 0; i < res.data[0].length; i++) {
  14073. if (!this.cid) {
  14074. this.courseTypeId[res.data[0][i].id] = [];
  14075. }
  14076. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14077. // }
  14078. this.CourseTypeJson[res.data[0][i].id] = [];
  14079. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14080. if (res.data[0][i].name == "栏目") {
  14081. this.CourseType[0][i].name = "主题";
  14082. }
  14083. }
  14084. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14085. for (var j = 0; j < res.data[1].length; j++) {
  14086. if (
  14087. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14088. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14089. ) {
  14090. _courseTypeId.push(res.data[1][j].id);
  14091. }
  14092. if (res.data[0][i].id == res.data[1][j].pid) {
  14093. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14094. }
  14095. }
  14096. } else {
  14097. if (res.data[2].length > 0) {
  14098. for (var j = 0; j < res.data[2].length; j++) {
  14099. if (
  14100. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14101. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14102. ) {
  14103. _courseTypeId.push(res.data[2][j].id);
  14104. }
  14105. if (res.data[0][i].id == res.data[2][j].pid) {
  14106. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14107. }
  14108. }
  14109. }
  14110. if (res.data[3].length > 0) {
  14111. for (var j = 0; j < res.data[3].length; j++) {
  14112. if (
  14113. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14114. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14115. ) {
  14116. _courseTypeId.push(res.data[3][j].id);
  14117. }
  14118. if (res.data[0][i].id == res.data[3][j].pid) {
  14119. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14120. }
  14121. }
  14122. }
  14123. }
  14124. }
  14125. this.courseTypeId = _courseTypeId;
  14126. })
  14127. .catch((err) => {
  14128. console.error(err);
  14129. });
  14130. },
  14131. selectType() {
  14132. this.ajax
  14133. .get(this.$store.state.api + "selectType")
  14134. .then((res) => {
  14135. this.CourseType = res.data;
  14136. for (var i = 0; i < res.data[0].length; i++) {
  14137. if (!this.cid) {
  14138. this.courseTypeId[res.data[0][i].id] = "";
  14139. }
  14140. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14141. if (res.data[0][i].name == "栏目") {
  14142. this.CourseType[0][i].name = "主题";
  14143. }
  14144. }
  14145. for (var j = 0; j < res.data[1].length; j++) {
  14146. if (res.data[0][i].id == res.data[1][j].pid) {
  14147. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14148. this.CourseTypeJson[res.data[0][i].id] = [];
  14149. }
  14150. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14151. }
  14152. }
  14153. }
  14154. this.selectTypeByOid();
  14155. this.selectTypeByOrg();
  14156. })
  14157. .catch((err) => {
  14158. console.error(err);
  14159. });
  14160. },
  14161. selectTypeByOid() {
  14162. let params = {
  14163. oid: this.oid,
  14164. };
  14165. this.ajax
  14166. .get(this.$store.state.api + "selectTypeByOid", params)
  14167. .then((res) => {
  14168. for (var i = 0; i < res.data[0].length; i++) {
  14169. for (var j = 0; j < res.data[1].length; j++) {
  14170. if (res.data[0][i].id == res.data[1][j].pid) {
  14171. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14172. this.CourseTypeJson[res.data[0][i].id] = [];
  14173. }
  14174. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14175. }
  14176. }
  14177. }
  14178. })
  14179. .catch((err) => {
  14180. console.error(err);
  14181. });
  14182. },
  14183. selectTypeByOrg() {
  14184. let params = {
  14185. oid: this.org,
  14186. };
  14187. this.ajax
  14188. .get(this.$store.state.api + "selectTypeByOrg", params)
  14189. .then((res) => {
  14190. for (var i = 0; i < res.data[0].length; i++) {
  14191. for (var j = 0; j < res.data[1].length; j++) {
  14192. if (res.data[0][i].id == res.data[1][j].pid) {
  14193. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14194. this.CourseTypeJson[res.data[0][i].id] = [];
  14195. }
  14196. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14197. }
  14198. }
  14199. }
  14200. this.$forceUpdate();
  14201. })
  14202. .catch((err) => {
  14203. console.error(err);
  14204. });
  14205. },
  14206. OtherMb(type, task) {
  14207. if (task === 0 || task) {
  14208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14209. task
  14210. ].isEvaFold = true;
  14211. }
  14212. this.typeMode = type;
  14213. setTimeout(() => {
  14214. this.checkEva(this.checkId);
  14215. setTimeout(() => {
  14216. this.checkEva(this.checkId);
  14217. }, 100);
  14218. }, 100);
  14219. },
  14220. openMember() {
  14221. this.searchTN = "";
  14222. this.getTeacher();
  14223. this.dialogVisibleMember = true;
  14224. },
  14225. checkEva(id, type) {
  14226. this.dialogVisiblemb = false;
  14227. this.selectEva();
  14228. if (this.evalua != id && type == 2) {
  14229. this.$message.success("导入成功");
  14230. setTimeout(() => {
  14231. this.checkEva(id);
  14232. }, 100);
  14233. }
  14234. this.evalua = id;
  14235. this.checkId = id;
  14236. if (this.evalua != "") {
  14237. for (var i = 0; i < this.evaJuri.length; i++) {
  14238. if (this.evalua == this.evaJuri[i].id) {
  14239. this.eTitle = this.evaJuri[i].title;
  14240. this.eJson = JSON.parse(this.evaJuri[i].content);
  14241. }
  14242. }
  14243. this.data.data = [];
  14244. this.$forceUpdate();
  14245. setTimeout(() => {
  14246. this.setMindData();
  14247. }, 1000);
  14248. }
  14249. },
  14250. deleteEva() {
  14251. let _this = this;
  14252. if (_this.evalua == "") {
  14253. this.$message.warning("内容已经清空了,请勿重复清空");
  14254. return;
  14255. }
  14256. _this
  14257. .$confirm("确定删除此目标吗?", "提示", {
  14258. confirmButtonText: "确定",
  14259. cancelButtonText: "取消",
  14260. type: "warning",
  14261. })
  14262. .then(() => {
  14263. _this.evalua = "";
  14264. _this.checkId = "";
  14265. _this.eTitle = "";
  14266. let _unitJson = _this.unitJson;
  14267. for (var i = 0; i < _unitJson.length; i++) {
  14268. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14269. for (var j = 0; j < _task.length; j++) {
  14270. let _eList = _task[j].eList;
  14271. for (var k = 0; k < _eList.length; k++) {
  14272. delete _eList[k].target;
  14273. }
  14274. }
  14275. }
  14276. _this.$forceUpdate();
  14277. if (_this.cid) {
  14278. _this.updateWork();
  14279. }
  14280. })
  14281. .catch(() => {
  14282. return;
  14283. });
  14284. },
  14285. selectEva() {
  14286. let params = {
  14287. oid: this.oid,
  14288. };
  14289. this.ajax
  14290. .get(this.$store.state.api + "selectAllEvaluation", params)
  14291. .then((res) => {
  14292. this.evaJuri = res.data[0];
  14293. // 在复制操作之前记录滚动位置
  14294. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14295. // 执行复制操作
  14296. // 复制操作完成后恢复滚动位置
  14297. this.$nextTick(() => {
  14298. if (this.$refs.scrollContainer) {
  14299. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14300. }
  14301. });
  14302. })
  14303. .catch((err) => {
  14304. console.error(err);
  14305. });
  14306. },
  14307. setMindData() {
  14308. let targetArray = [];
  14309. this.data.data = [];
  14310. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14311. let _eJson = Object.keys(this.eJson);
  14312. let _e = this.eJson;
  14313. for (let i = 0; i < _eJson.length; i++) {
  14314. let element = _e[_eJson[i]];
  14315. this.data.data.push({
  14316. id: element.id,
  14317. parentid: "root",
  14318. topic: element.name,
  14319. });
  14320. // targetArray.push({
  14321. // id: element.id,
  14322. // parentid: "root",
  14323. // name: element.name,
  14324. // });
  14325. targetArray.push({
  14326. value: element.name,
  14327. label: element.name,
  14328. children: [],
  14329. });
  14330. let _eJsonc = Object.keys(element.child);
  14331. let _e2 = element.child;
  14332. for (let j = 0; j < _eJsonc.length; j++) {
  14333. let _ec = _e2[_eJsonc[j]];
  14334. this.data.data.push({
  14335. id: _ec.id,
  14336. parentid: element.id,
  14337. topic: _ec.name,
  14338. });
  14339. // targetArray.push({
  14340. // id: _ec.id,
  14341. // parentid: element.id,
  14342. // name: _ec.name,
  14343. // });
  14344. targetArray[i].children.push({
  14345. value: _ec.name,
  14346. label: _ec.name,
  14347. children: [],
  14348. });
  14349. let _eJsonz = Object.keys(_ec.child);
  14350. let _e3 = _ec.child;
  14351. for (let z = 0; z < _eJsonz.length; z++) {
  14352. let _ez = _e3[_eJsonz[z]];
  14353. this.data.data.push({
  14354. id: _ez.id,
  14355. parentid: _ec.id,
  14356. topic: _ez.name,
  14357. });
  14358. // targetArray.push({
  14359. // id: _ez.id,
  14360. // parentid: _ec.id,
  14361. // name: _ez.name,
  14362. // });
  14363. targetArray[i].children[j].children.push({
  14364. value: _ez.name,
  14365. label: _ez.name,
  14366. });
  14367. }
  14368. }
  14369. }
  14370. this.targetArray = targetArray;
  14371. this.$forceUpdate();
  14372. },
  14373. /*添加评价 */
  14374. addEList(index, tIndex) {
  14375. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14376. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14377. value: "",
  14378. detail: "",
  14379. score: 5,
  14380. })
  14381. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14382. { value: "", detail: "", score: 5 },
  14383. ]);
  14384. this.$forceUpdate();
  14385. },
  14386. openEList(index, tIndex) {
  14387. this.evaIndex = index;
  14388. this.evatIndex = tIndex;
  14389. this.evaBoxDialog = true;
  14390. },
  14391. addCET(index, tIndex) {
  14392. this.cetIndex = index;
  14393. this.cettIndex = tIndex;
  14394. this.selectAllType1();
  14395. },
  14396. addCETemplate() {
  14397. var array =
  14398. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14399. .eList;
  14400. let params = [
  14401. {
  14402. uid: this.userid,
  14403. n: this.templateName,
  14404. json: JSON.stringify(array),
  14405. t: 1,
  14406. oid: this.oid,
  14407. },
  14408. ];
  14409. this.ajax
  14410. .post(this.$store.state.api + "addCETShare", params)
  14411. .then((res) => {
  14412. this.addTypeByCET(res.data[0][0].id);
  14413. })
  14414. .catch((err) => {
  14415. this.$message.error("网络不佳");
  14416. console.error(err);
  14417. });
  14418. },
  14419. addTypeByCET(id) {
  14420. if (this.setTypeJson.two == "") {
  14421. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14422. return;
  14423. }
  14424. let params = {
  14425. cid: id,
  14426. };
  14427. this.ajax
  14428. .get(this.$store.state.api + "deleteCETLabel", params)
  14429. .then((res) => {
  14430. for (var i = 0; i < 2; i++) {
  14431. let tid = "";
  14432. if (i == 0) {
  14433. tid = this.setTypeJson.one;
  14434. } else {
  14435. tid = this.setTypeJson.two;
  14436. }
  14437. let params = [
  14438. {
  14439. cid: id,
  14440. tid: tid,
  14441. uid: this.userid,
  14442. },
  14443. ];
  14444. this.ajax
  14445. .post(this.$store.state.api + "addCETLabel", params)
  14446. .then((res) => {
  14447. this.$message({
  14448. message: "添加成功",
  14449. type: "success",
  14450. });
  14451. this.close();
  14452. })
  14453. .catch((err) => {
  14454. this.$message.error("网络不佳");
  14455. console.error(err);
  14456. });
  14457. }
  14458. })
  14459. .catch((err) => {
  14460. this.$message.error("网络不佳");
  14461. console.error(err);
  14462. });
  14463. },
  14464. updateEvaJson(array) {
  14465. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  14466. this.evatIndex
  14467. ].eList = array;
  14468. },
  14469. forceUpdate() {
  14470. this.$forceUpdate();
  14471. },
  14472. deletEList(index, tIndex, eIndex) {
  14473. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  14474. eIndex,
  14475. 1
  14476. );
  14477. this.$forceUpdate();
  14478. },
  14479. getChoosePic(t) {
  14480. this.chooseType = t;
  14481. this.getAllBanner();
  14482. },
  14483. getAllBanner() {
  14484. this.sysPicVisible = true;
  14485. let params = {
  14486. t: this.chooseType,
  14487. };
  14488. this.ajax
  14489. .get(this.$store.state.api + "selectAllBanner", params)
  14490. .then((res) => {
  14491. this.sysPic = res.data[0];
  14492. })
  14493. .catch((err) => {
  14494. console.error(err);
  14495. });
  14496. },
  14497. // getClass() {
  14498. // let params = {
  14499. // oid: this.oid,
  14500. // };
  14501. // this.ajax
  14502. // .get(this.$store.state.api + "selectClassBySchool", params)
  14503. // .then((res) => {
  14504. // this.classJuri = res.data[0];
  14505. // })
  14506. // .catch((err) => {
  14507. // console.error(err);
  14508. // });
  14509. // },
  14510. deleteSysPic() {
  14511. this.cover = [];
  14512. this.isSysPic = false;
  14513. this.isSysPic2 = false;
  14514. },
  14515. deleteSelectPic() {
  14516. this.selectJson.url = "";
  14517. },
  14518. setEListStar() {
  14519. this.$forceUpdate();
  14520. },
  14521. deletRateList(i) {
  14522. this.rateJson.splice(i, 1);
  14523. },
  14524. addRateList() {
  14525. this.rateJson.push({ detail: "", score: 5, value: "" });
  14526. },
  14527. addSt() {
  14528. this.sentenceList.push({
  14529. sentenceTitle: "",
  14530. addSentence: [],
  14531. rightAnswer: [],
  14532. });
  14533. },
  14534. addSen(i) {
  14535. if (!this.sentenceList[i].sentenceTitle) {
  14536. this.$message.error("请填写卡片内容!");
  14537. return;
  14538. }
  14539. if (this.sentenceList[i].sentenceTitle.length > 10) {
  14540. this.$message.error("卡片内容字数不能超过10位");
  14541. return;
  14542. }
  14543. if (
  14544. this.sentenceList[i].addSentence.indexOf(
  14545. this.sentenceList[i].sentenceTitle
  14546. ) !== -1
  14547. ) {
  14548. this.$message.error("不能添加重复的卡片内容!");
  14549. return;
  14550. }
  14551. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  14552. // this.isPushTitleList.push(this.sentenceTitle);
  14553. this.sentenceList[i].sentenceTitle = "";
  14554. },
  14555. setRightAnswer(s, i, j) {
  14556. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  14557. this.sentenceList[i].rightAnswer.push(s);
  14558. }
  14559. },
  14560. returnCard(r, i, j) {
  14561. this.sentenceList[i].rightAnswer.splice(j, 1);
  14562. },
  14563. addSentenceTool() {
  14564. for (var i = 0; i < this.sentenceList.length; i++) {
  14565. if (this.sentenceList[i].rightAnswer.length == 0) {
  14566. this.$message.error(`请将题目${i + 1}设置完整。`);
  14567. return;
  14568. }
  14569. if (
  14570. this.sentenceList[i].addSentence.length !=
  14571. this.sentenceList[i].rightAnswer.length
  14572. ) {
  14573. this.$message.error(`请将题目${i + 1}设置完整。`);
  14574. return;
  14575. }
  14576. }
  14577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14578. this.taskCount
  14579. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  14580. this.sentenceList = [
  14581. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14582. ];
  14583. this.dialogVisibleSentence = false;
  14584. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14585. // itemTaskIndex
  14586. // ].toolChoose[toolIndex].tool = [];
  14587. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14588. // itemTaskIndex
  14589. // ].toolChoose[toolIndex].tool.push(i);
  14590. if (
  14591. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14592. .toolChoose[this.toolIndex].tool != 47
  14593. ) {
  14594. this.addTools(47, this.taskCount, this.toolIndex);
  14595. }
  14596. },
  14597. addTableJson() {
  14598. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  14599. // this.$message.error("请将信息填写完整!");
  14600. // return;
  14601. // }
  14602. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14603. this.taskCount
  14604. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  14605. // this.tableJson = [{ text: "" }];
  14606. // this.dialogVisibleTable = false;
  14607. this.$message.success("上传成功");
  14608. if (
  14609. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14610. .toolChoose[this.toolIndex].tool != 48
  14611. ) {
  14612. this.addTools(48, this.taskCount, this.toolIndex);
  14613. }
  14614. },
  14615. addWordJson() {
  14616. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14617. this.taskCount
  14618. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  14619. // this.wordJson = [{ text: "" }];
  14620. // this.dialogVisibleWord = false;
  14621. this.$message.success("上传成功");
  14622. if (
  14623. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14624. .toolChoose[this.toolIndex].tool != 52
  14625. ) {
  14626. this.addTools(52, this.taskCount, this.toolIndex);
  14627. }
  14628. },
  14629. addMoreUpload() {
  14630. if (this.uploadJson.length == 0) {
  14631. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14632. this.taskCount
  14633. ].toolChoose[this.toolIndex].uploadJson = [];
  14634. } else {
  14635. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14636. this.taskCount
  14637. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  14638. }
  14639. this.uploadJson = [];
  14640. this.dialogVisibleMoreUpload = false;
  14641. if (
  14642. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14643. .toolChoose[this.toolIndex].tool != 50
  14644. ) {
  14645. this.addTools(50, this.taskCount, this.toolIndex);
  14646. }
  14647. },
  14648. addPreTime() {
  14649. if (this.preTime == 0) {
  14650. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14651. this.taskCount
  14652. ].toolChoose[this.toolIndex].preTime = 0;
  14653. } else {
  14654. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14655. this.taskCount
  14656. ].toolChoose[this.toolIndex].preTime = this.preTime;
  14657. }
  14658. this.preTime = 0;
  14659. this.dialogVisiblePreTime = false;
  14660. if (
  14661. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14662. .toolChoose[this.toolIndex].tool != 10
  14663. ) {
  14664. this.addTools(10, this.taskCount, this.toolIndex);
  14665. }
  14666. },
  14667. goToTask(i) {
  14668. this.toolIndexType = "";
  14669. if (this.isClickColor == i + 1) {
  14670. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14671. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14672. // } else {
  14673. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14674. i
  14675. ].toolOpen = true;
  14676. // }
  14677. this.$forceUpdate();
  14678. return;
  14679. }
  14680. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14681. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14682. // } else {
  14683. document.querySelectorAll(".basic_box")[0].scrollTop =
  14684. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14685. this.isClickColor = i + 1;
  14686. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14687. // }
  14688. this.$forceUpdate();
  14689. },
  14690. taskOpen(i, stageIndex) {
  14691. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14692. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  14693. } else {
  14694. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14695. }
  14696. this.updateWork3(stageIndex);
  14697. this.$forceUpdate();
  14698. },
  14699. goToTask2(i, stage) {
  14700. this.toolIndexType = "";
  14701. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  14702. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14703. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14704. // } else {
  14705. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14706. i
  14707. ].toolOpen = true;
  14708. // }
  14709. this.$forceUpdate();
  14710. return;
  14711. }
  14712. if (this.unitIndex != stage) {
  14713. if (this.panUnitJson() == 2) {
  14714. return;
  14715. }
  14716. this.unitSet(stage);
  14717. }
  14718. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14719. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14720. // } else {
  14721. document.querySelectorAll(".basic_box")[0].scrollTop =
  14722. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14723. this.isClickColor = i + 1;
  14724. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14725. // }
  14726. this.$forceUpdate();
  14727. },
  14728. taskMove(type, index) {
  14729. this.$confirm(
  14730. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14731. "提示",
  14732. {
  14733. confirmButtonText: "确定",
  14734. cancelButtonText: "取消",
  14735. type: "warning",
  14736. }
  14737. )
  14738. .then(() => {
  14739. if (type == 1) {
  14740. if (index > 0) {
  14741. let a = JSON.parse(
  14742. JSON.stringify(
  14743. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14744. index - 1
  14745. ]
  14746. )
  14747. );
  14748. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  14749. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14750. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14751. }
  14752. } else {
  14753. if (
  14754. index <
  14755. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  14756. ) {
  14757. let a = JSON.parse(
  14758. JSON.stringify(
  14759. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14760. index + 1
  14761. ]
  14762. )
  14763. );
  14764. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  14765. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14766. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14767. }
  14768. }
  14769. this.$forceUpdate();
  14770. })
  14771. .catch(() => {
  14772. return;
  14773. });
  14774. },
  14775. stageMove(type, index) {
  14776. if (type == 1) {
  14777. if (index > 0) {
  14778. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  14779. let acid = JSON.parse(
  14780. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  14781. );
  14782. let bcid = JSON.parse(
  14783. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14784. );
  14785. this.unitJson3[index - 1] = this.unitJson3[index];
  14786. this.unitJson3[index] = a;
  14787. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  14788. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14789. }
  14790. } else {
  14791. if (index < this.unitJson3.length - 1) {
  14792. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  14793. let acid = JSON.parse(
  14794. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  14795. );
  14796. let bcid = JSON.parse(
  14797. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14798. );
  14799. this.unitJson3[index + 1] = this.unitJson3[index];
  14800. this.unitJson3[index] = a;
  14801. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  14802. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14803. }
  14804. }
  14805. this.$forceUpdate();
  14806. },
  14807. addGroup(i) {
  14808. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14809. this.groupJson.group.push({
  14810. name: "第" + (this.groupJson.group.length + 1) + "组",
  14811. });
  14812. },
  14813. deleteGroup(i) {
  14814. this.groupJson.group.splice(i, 1);
  14815. },
  14816. numberPan() {
  14817. if (
  14818. /[^\d]/.test(this.groupJson.number) ||
  14819. this.groupJson.number < 2 ||
  14820. this.groupJson.number > 10
  14821. ) {
  14822. this.$message.error("请输入2-10的数字");
  14823. this.groupJson.number = "";
  14824. }
  14825. },
  14826. numberPanJie() {
  14827. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  14828. this.$message.error('请输入大于1的数字')
  14829. this.courseJie = 1
  14830. }
  14831. },
  14832. numberPanTime() {
  14833. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  14834. this.$message.error('请输入大于1的数字')
  14835. this.courseTime = 1
  14836. }
  14837. },
  14838. addGroupJson() {
  14839. for (var i = 0; i < this.groupJson.group.length; i++) {
  14840. if (!this.groupJson.group[i].name) {
  14841. this.$message.error("请将信息填写完整!");
  14842. return;
  14843. }
  14844. }
  14845. if (!this.groupJson.number) {
  14846. this.$message.error("请将信息填写完整!");
  14847. return;
  14848. }
  14849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14850. this.taskCount
  14851. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14852. JSON.stringify(this.groupJson)
  14853. );
  14854. this.dialogVisibleGroup = false;
  14855. this.groupJson = {};
  14856. if (
  14857. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14858. .toolChoose[this.toolIndex].tool != 49
  14859. ) {
  14860. this.addTools(49, this.taskCount, this.toolIndex);
  14861. }
  14862. },
  14863. updateTime(preTime) {
  14864. this.preTime = preTime;
  14865. },
  14866. InviteChange(val) {
  14867. console.log(val);
  14868. let _check = [];
  14869. let _check2 = [];
  14870. for (var i = 0; i < this.grade2.length; i++) {
  14871. var gid = this.grade2[i].id;
  14872. _check.push(gid);
  14873. }
  14874. for (var i = 0; i < this.checkboxList2.length; i++) {
  14875. var _id = this.checkboxList2[i];
  14876. if (_check.indexOf(_id) !== -1) {
  14877. _check2.push(_id);
  14878. }
  14879. }
  14880. this.checkAll = _check2.length === _check.length;
  14881. return;
  14882. let array = JSON.parse(JSON.stringify(val));
  14883. this.inviteCode = this.inviteCode.filter((el) => {
  14884. if (val.indexOf(el.cid) != -1) {
  14885. array.splice(array.indexOf(el.cid), 1);
  14886. return el;
  14887. }
  14888. });
  14889. for (var i = 0; i < array.length; i++) {
  14890. this.getInviteCode(array[i]);
  14891. }
  14892. },
  14893. InviteChange2(val) {
  14894. console.log(val);
  14895. let _check = [];
  14896. let _check2 = [];
  14897. for (var i = 0; i < this.teacherJuri.length; i++) {
  14898. var gid = this.teacherJuri[i].userid;
  14899. _check.push(gid);
  14900. }
  14901. for (var i = 0; i < this.checkboxList3.length; i++) {
  14902. var _id = this.checkboxList3[i];
  14903. if (_check.indexOf(_id) !== -1) {
  14904. _check2.push(_id);
  14905. }
  14906. }
  14907. this.checkAll2 = _check2.length === _check.length;
  14908. this.setMan();
  14909. return;
  14910. let array = JSON.parse(JSON.stringify(val));
  14911. this.inviteCode = this.inviteCode.filter((el) => {
  14912. if (val.indexOf(el.cid) != -1) {
  14913. array.splice(array.indexOf(el.cid), 1);
  14914. return el;
  14915. }
  14916. });
  14917. for (var i = 0; i < array.length; i++) {
  14918. this.getInviteCode(array[i]);
  14919. }
  14920. },
  14921. handleCheckAllChange(val) {
  14922. if (val) {
  14923. for (var i = 0; i < this.grade2.length; i++) {
  14924. var gid = this.grade2[i].id;
  14925. if (this.checkboxList2.indexOf(gid) === -1) {
  14926. this.checkboxList2.push(gid);
  14927. }
  14928. }
  14929. } else {
  14930. let _check = [];
  14931. let _check2 = [];
  14932. for (var i = 0; i < this.grade2.length; i++) {
  14933. var gid = this.grade2[i].id;
  14934. _check.push(gid);
  14935. }
  14936. for (var i = 0; i < this.checkboxList2.length; i++) {
  14937. var _id = this.checkboxList2[i];
  14938. if (_check.indexOf(_id) === -1) {
  14939. _check2.push(_id);
  14940. }
  14941. }
  14942. this.checkboxList2 = _check2;
  14943. }
  14944. this.isIndeterminate = false;
  14945. },
  14946. handleCheckAllChange2(val) {
  14947. if (val) {
  14948. for (var i = 0; i < this.teacherJuri.length; i++) {
  14949. var gid = this.teacherJuri[i].userid;
  14950. if (this.checkboxList3.indexOf(gid) === -1) {
  14951. this.checkboxList3.push(gid);
  14952. }
  14953. }
  14954. } else {
  14955. let _check = [];
  14956. let _check2 = [];
  14957. for (var i = 0; i < this.teacherJuri.length; i++) {
  14958. var gid = this.teacherJuri[i].userid;
  14959. _check.push(gid);
  14960. }
  14961. for (var i = 0; i < this.checkboxList3.length; i++) {
  14962. var _id = this.checkboxList3[i];
  14963. if (_check.indexOf(_id) === -1) {
  14964. _check2.push(_id);
  14965. }
  14966. }
  14967. this.checkboxList3 = _check2;
  14968. }
  14969. this.isIndeterminate2 = false;
  14970. },
  14971. async getInviteCode(cid) {
  14972. let code = this.randomNumber();
  14973. let params = {
  14974. code: code,
  14975. oid: this.oid,
  14976. };
  14977. let type = 1;
  14978. for (var i = 0; i < this.inviteCode.length; i++) {
  14979. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  14980. type = 2;
  14981. }
  14982. }
  14983. if (type == 2) {
  14984. this.getInviteCode(cid);
  14985. return;
  14986. }
  14987. const res = await this.ajax.get(
  14988. this.$store.state.api + "selectInviteCode2",
  14989. params
  14990. );
  14991. if (
  14992. res.data.length &&
  14993. res.data[0].length &&
  14994. res.data[0][0].courseId != this.cid
  14995. ) {
  14996. this.getInviteCode(cid);
  14997. return;
  14998. }
  14999. let array = [];
  15000. for (var i = 0; i < this.inviteCode.length; i++) {
  15001. array.push(this.inviteCode[i].cid);
  15002. }
  15003. if (array.indexOf(cid) != -1) {
  15004. this.inviteCode[array.indexOf(cid)].ic = code;
  15005. } else {
  15006. this.inviteCode.push({ cid: cid, ic: code });
  15007. }
  15008. },
  15009. OpenInviteD(cid) {
  15010. let array = [];
  15011. this.icode = "";
  15012. for (var i = 0; i < this.inviteCode.length; i++) {
  15013. array.push(this.inviteCode[i].cid);
  15014. }
  15015. if (array.indexOf(cid) != -1) {
  15016. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15017. }
  15018. this.inviteId = cid;
  15019. this.dialogVisibleInvite = true;
  15020. },
  15021. addInvite() {
  15022. let reg = /^[A-Za-z0-9]{4,}$/;
  15023. if (!reg.test(this.icode)) {
  15024. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15025. return;
  15026. }
  15027. let type = 1;
  15028. for (var i = 0; i < this.inviteCode.length; i++) {
  15029. if (
  15030. this.inviteCode[i].cid != this.inviteId &&
  15031. this.icode == this.inviteCode[i].ic
  15032. ) {
  15033. type = 2;
  15034. }
  15035. }
  15036. if (type == 2) {
  15037. this.$message.error("已有此随机码,不能重复");
  15038. return;
  15039. }
  15040. let params = {
  15041. code: this.icode,
  15042. oid: this.oid,
  15043. };
  15044. this.ajax
  15045. .get(this.$store.state.api + "selectInviteCode", params)
  15046. .then((res) => {
  15047. if (
  15048. res.data.length &&
  15049. res.data[0].length &&
  15050. res.data[0][0].courseId != this.cid
  15051. ) {
  15052. this.$message.error("已有此随机码,不能重复");
  15053. return;
  15054. }
  15055. let array = [];
  15056. for (var i = 0; i < this.inviteCode.length; i++) {
  15057. array.push(this.inviteCode[i].cid);
  15058. }
  15059. if (array.indexOf(this.inviteId) != -1) {
  15060. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15061. } else {
  15062. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15063. }
  15064. this.icode = "";
  15065. this.dialogVisibleInvite = false;
  15066. })
  15067. .catch((err) => {
  15068. console.error(err);
  15069. });
  15070. },
  15071. randomNumber() {
  15072. // 随机生成两位数
  15073. // let num = Math.floor(Math.random() * 900) + 100;
  15074. // 生成 0 到 99 之间的随机整数
  15075. const randomNumber = Math.floor(Math.random() * 100);
  15076. // 如果随机数小于 10,补上前导零
  15077. const num =
  15078. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15079. // 随机生成两个大写字母
  15080. let letters = "";
  15081. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15082. for (let i = 0; i < 3; i++) {
  15083. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15084. }
  15085. // 随机生成两位数字和字母的组合
  15086. let mix = "";
  15087. let chars =
  15088. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15089. for (let i = 0; i < 3; i++) {
  15090. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15091. mix += char;
  15092. }
  15093. // 随机选择一种类型
  15094. let type = Math.floor(Math.random() * 3);
  15095. return num;
  15096. // 根据类型输出结果
  15097. switch (type) {
  15098. case 0:
  15099. console.log(num); // 输出两位数
  15100. return num;
  15101. case 1:
  15102. console.log(letters); // 输出两个大写字母
  15103. return letters;
  15104. case 2:
  15105. console.log(mix); // 输出两位数字和字母的组合
  15106. return mix;
  15107. }
  15108. },
  15109. getPaste() {
  15110. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15111. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15112. if (!iframe && !iframe2) {
  15113. return;
  15114. }
  15115. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15116. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15117. if (copyData && copyData.stageData && copyData.stageData.length) {
  15118. this.isPasteStage = true;
  15119. }
  15120. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15121. this.isPasteStage = true;
  15122. }
  15123. if (copyData && copyData.selectData.length) {
  15124. this.isPasteChoice = true;
  15125. }
  15126. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15127. this.isPasteTask = true;
  15128. }
  15129. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15130. this.isPasteTask = true;
  15131. }
  15132. },
  15133. setCover() {
  15134. var _this = this;
  15135. if(_this.cover.length){
  15136. return;
  15137. }
  15138. _this.imageloading2 = true
  15139. _this.ajax
  15140. .post("https://gpt.cocorobo.cn/search_image", {
  15141. page: _this.ppage,
  15142. pagesize: 9,
  15143. query: _this.courseName,
  15144. })
  15145. .then(function (response) {
  15146. // console.log(response.data.data);
  15147. var data = response.data.FunctionResponse.result;
  15148. _this.cover = [];
  15149.       setTimeout(() => {
  15150.         _this.cover[0] = {
  15151.           name: "网络图片.png",
  15152.           url: data[0].thumbnail
  15153.         };
  15154.         _this.imgChange1(null, null, 1, null);
  15155.         _this.$forceUpdate();
  15156.       }, 0);
  15157. _this.imageloading2 = false
  15158. })
  15159. .catch(function (error) {
  15160. _this.imageloading2 = false
  15161. console.log(error);
  15162. });
  15163. },
  15164. searchImage() {
  15165. var _this = this;
  15166. _this.imageList = [];
  15167. if (!_this.searchImageValue) {
  15168. _this.sysPicVisible2 = true;
  15169. return;
  15170. }
  15171. _this.imageloading = true;
  15172. _this.ajax
  15173. .post("https://gpt.cocorobo.cn/search_image", {
  15174. page: _this.ppage,
  15175. pagesize: 9,
  15176. query: _this.searchImageValue,
  15177. })
  15178. .then(function (response) {
  15179. // console.log(response.data.data);
  15180. var data = response.data.FunctionResponse.result;
  15181. for (var i = 0; i < data.length; i++) {
  15182. _this.imageList.push({ url: data[i].thumbnail });
  15183. }
  15184. _this.imageloading = false;
  15185. })
  15186. .catch(function (error) {
  15187. console.log(error);
  15188. });
  15189. _this.sysPicVisible2 = true;
  15190. },
  15191. changePicture() {
  15192. this.ppage++;
  15193. this.searchImage();
  15194. },
  15195. resetImage() {
  15196. this.ppage = 1;
  15197. this.searchImage();
  15198. },
  15199. jumpGj(i, j) {
  15200. if (i + 1 != this.isClickColor) {
  15201. this.isClickColor = i + 1;
  15202. }
  15203. var a = document.scrollingElement;
  15204. this.toolIndexType = `gj${i}${j}`;
  15205. let target = document.querySelector(`#gj${i}${j}`);
  15206. if (target) {
  15207. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15208. setTimeout(() => {
  15209. target.scrollIntoView(true);
  15210. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15211. j
  15212. ].isFold3 = false;
  15213. setTimeout(() => {
  15214. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15215. }, 0);
  15216. }, 0);
  15217. }
  15218. },
  15219. jumpGj2(i, j, k) {
  15220. if (this.unitIndex != k) {
  15221. if (this.panUnitJson() == 2) {
  15222. return;
  15223. }
  15224. this.unitSet(k);
  15225. }
  15226. setTimeout(() => {
  15227. if (i + 1 != this.isClickColor) {
  15228. this.isClickColor = i + 1;
  15229. }
  15230. var a = document.scrollingElement;
  15231. this.toolIndexType = `gj${i}${j}${k}`;
  15232. let target = document.querySelector(`#gj${i}${j}`);
  15233. if (target) {
  15234. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15235. setTimeout(() => {
  15236. target.scrollIntoView(true);
  15237. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15238. j
  15239. ].isFold3 = false;
  15240. setTimeout(() => {
  15241. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15242. }, 0);
  15243. }, 0);
  15244. }
  15245. }, 0);
  15246. },
  15247. dragStart(val, i, j) {
  15248. console.log(this.taskCount);
  15249. this.dragType = "drag";
  15250. this.taskCount = j;
  15251. this.oldIndex = i;
  15252. this.oldData = val;
  15253. },
  15254. dragOver(i, j) {
  15255. this.typeIndex = "chapter-" + j + "-" + i;
  15256. this.newIndex = i;
  15257. },
  15258. dragEnd() {
  15259. if (this.dragType != "drag") {
  15260. this.typeIndex = "";
  15261. this.newIndex = "";
  15262. this.dragType = "";
  15263. this.isdrag = "";
  15264. return;
  15265. }
  15266. console.log(this.taskCount);
  15267. let newItems = [
  15268. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15269. .chapterData,
  15270. ];
  15271. // 删除老的节点
  15272. newItems.splice(this.oldIndex, 1);
  15273. // 在列表中目标位置增加新的节点
  15274. newItems.splice(this.newIndex, 0, this.oldData);
  15275. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15276. this.taskCount
  15277. ].chapterData = [...newItems];
  15278. this.typeIndex = "";
  15279. this.newIndex = "";
  15280. this.dragType = "";
  15281. this.isdrag = "";
  15282. this.$forceUpdate();
  15283. },
  15284. dragTaskStart(val, i, j) {
  15285. this.dragType = "task";
  15286. this.oldIndex = i;
  15287. this.oldData = val;
  15288. this.oldUnitIndex = j;
  15289. },
  15290. dragTaskOver(i, j) {
  15291. this.typeIndex = "task-" + i;
  15292. this.newIndex = i;
  15293. this.checkUnitIndex = j;
  15294. },
  15295. async dragTaskEnd() {
  15296. if (this.dragType != "task") {
  15297. this.newIndex = "";
  15298. this.dragType = "";
  15299. this.typeIndex = "";
  15300. this.checkUnitIndex = "";
  15301. this.isdrag = "";
  15302. return;
  15303. }
  15304. if (
  15305. this.newIndex == this.oldIndex &&
  15306. this.oldUnitIndex == this.checkUnitIndex
  15307. ) {
  15308. this.newIndex = "";
  15309. this.dragType = "";
  15310. this.typeIndex = "";
  15311. this.checkUnitIndex = "";
  15312. this.isdrag = "";
  15313. return;
  15314. }
  15315. let count1 = await this.getWorksCount(
  15316. 2,
  15317. this.checkUnitIndex,
  15318. this.newIndex,
  15319. 0
  15320. );
  15321. let count2 = await this.getWorksCount(
  15322. 2,
  15323. this.oldUnitIndex,
  15324. this.oldIndex,
  15325. 0
  15326. );
  15327. if (count1 > 0 || count2 > 0) {
  15328. this.$confirm(
  15329. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15330. "提示",
  15331. {
  15332. confirmButtonText: "确定",
  15333. cancelButtonText: "取消",
  15334. type: "warning",
  15335. }
  15336. )
  15337. .then(() => {
  15338. if (this.oldUnitIndex != this.checkUnitIndex) {
  15339. let newItems = [
  15340. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15341. ];
  15342. // 删除老的节点
  15343. newItems.splice(this.oldIndex, 1);
  15344. // 在列表中目标位置增加新的节点
  15345. let newItems2 = [
  15346. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15347. ];
  15348. newItems2.splice(this.newIndex, 0, this.oldData);
  15349. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15350. ...newItems,
  15351. ];
  15352. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15353. ...newItems2,
  15354. ];
  15355. } else {
  15356. let newItems = [
  15357. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15358. ];
  15359. let chapterData = []
  15360. if (this.oldIndex == 0) {
  15361. chapterData = newItems[this.oldIndex].chapterData
  15362. newItems[this.oldIndex].chapterData = []
  15363. } else if (this.newIndex == 0) {
  15364. chapterData = newItems[this.newIndex].chapterData
  15365. newItems[this.oldIndex].chapterData = []
  15366. }
  15367. // 删除老的节点
  15368. newItems.splice(this.oldIndex, 1);
  15369. // 在列表中目标位置增加新的节点
  15370. newItems.splice(this.newIndex, 0, this.oldData);
  15371. if (this.oldIndex == 0 || this.newIndex == 0) {
  15372. newItems[0].chapterData = chapterData
  15373. }
  15374. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15375. ...newItems,
  15376. ];
  15377. }
  15378. this.typeIndex = "";
  15379. this.newIndex = "";
  15380. this.dragType = "";
  15381. this.checkUnitIndex = "";
  15382. this.isdrag = "";
  15383. this.updateWork();
  15384. this.$forceUpdate();
  15385. })
  15386. .catch(() => {
  15387. this.newIndex = "";
  15388. this.dragType = "";
  15389. this.typeIndex = "";
  15390. this.checkUnitIndex = "";
  15391. this.isdrag = "";
  15392. return;
  15393. });
  15394. } else {
  15395. if (this.oldUnitIndex != this.checkUnitIndex) {
  15396. let newItems = [
  15397. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15398. ];
  15399. // 删除老的节点
  15400. newItems.splice(this.oldIndex, 1);
  15401. // 在列表中目标位置增加新的节点
  15402. let newItems2 = [
  15403. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15404. ];
  15405. newItems2.splice(this.newIndex, 0, this.oldData);
  15406. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15407. ...newItems,
  15408. ];
  15409. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15410. ...newItems2,
  15411. ];
  15412. } else {
  15413. let newItems = [
  15414. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15415. ];
  15416. let chapterData = []
  15417. if (this.oldIndex == 0) {
  15418. chapterData = newItems[this.oldIndex].chapterData
  15419. newItems[this.oldIndex].chapterData = []
  15420. } else if (this.newIndex == 0) {
  15421. chapterData = newItems[this.newIndex].chapterData
  15422. newItems[this.oldIndex].chapterData = []
  15423. }
  15424. // 删除老的节点
  15425. newItems.splice(this.oldIndex, 1);
  15426. // 在列表中目标位置增加新的节点
  15427. newItems.splice(this.newIndex, 0, this.oldData);
  15428. if (this.oldIndex == 0 || this.newIndex == 0) {
  15429. newItems[0].chapterData = chapterData
  15430. }
  15431. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15432. ...newItems,
  15433. ];
  15434. }
  15435. this.typeIndex = "";
  15436. this.newIndex = "";
  15437. this.dragType = "";
  15438. this.checkUnitIndex = "";
  15439. this.isdrag = "";
  15440. this.updateWork();
  15441. this.$forceUpdate();
  15442. }
  15443. },
  15444. dragUnitStart(val, i) {
  15445. this.dragType = "Unit";
  15446. this.oldIndex = i;
  15447. this.oldData = val;
  15448. },
  15449. dragUnitOver(i) {
  15450. this.typeIndex = "Unit-" + i;
  15451. this.newIndex = i;
  15452. console.log(i, this.unitJson[i].toolOpen);
  15453. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  15454. this.unitJson[i].toolOpen = true;
  15455. this.updateWork();
  15456. this.$forceUpdate();
  15457. }
  15458. },
  15459. async dragUnitEnd() {
  15460. if (this.dragType != "Unit") {
  15461. this.newIndex = "";
  15462. this.dragType = "";
  15463. this.typeIndex = "";
  15464. this.isdrag = "";
  15465. return;
  15466. }
  15467. if (this.newIndex == this.oldIndex) {
  15468. this.newIndex = "";
  15469. this.dragType = "";
  15470. this.typeIndex = "";
  15471. this.isdrag = "";
  15472. return;
  15473. }
  15474. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  15475. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  15476. console.log(count1, count2);
  15477. if (count1 > 0 || count2 > 0) {
  15478. this.$confirm(
  15479. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15480. "提示",
  15481. {
  15482. confirmButtonText: "确定",
  15483. cancelButtonText: "取消",
  15484. type: "warning",
  15485. }
  15486. )
  15487. .then(() => {
  15488. let newItems = [...this.unitJson];
  15489. // 删除老的节点
  15490. newItems.splice(this.oldIndex, 1);
  15491. // 在列表中目标位置增加新的节点
  15492. newItems.splice(this.newIndex, 0, this.oldData);
  15493. this.unitJson = [...newItems];
  15494. this.typeIndex = "";
  15495. this.newIndex = "";
  15496. this.dragType = "";
  15497. this.isdrag = "";
  15498. this.updateWork();
  15499. this.$forceUpdate();
  15500. })
  15501. .catch(() => {
  15502. this.newIndex = "";
  15503. this.dragType = "";
  15504. this.typeIndex = "";
  15505. this.isdrag = "";
  15506. return;
  15507. });
  15508. } else {
  15509. let newItems = [...this.unitJson];
  15510. // 删除老的节点
  15511. newItems.splice(this.oldIndex, 1);
  15512. // 在列表中目标位置增加新的节点
  15513. newItems.splice(this.newIndex, 0, this.oldData);
  15514. this.unitJson = [...newItems];
  15515. this.typeIndex = "";
  15516. this.newIndex = "";
  15517. this.dragType = "";
  15518. this.isdrag = "";
  15519. this.updateWork();
  15520. this.$forceUpdate();
  15521. }
  15522. },
  15523. getWorksCount(type, stage, task, tool) {
  15524. return new Promise((resolve, reject) => {
  15525. let params = [
  15526. {
  15527. cid: this.cid,
  15528. stage: stage,
  15529. task: task,
  15530. tool: tool,
  15531. type: type,
  15532. },
  15533. ];
  15534. this.ajax
  15535. .post(this.$store.state.api + "getCourseWorkCount", params)
  15536. .then((res) => {
  15537. let count = res.data[0][0].count;
  15538. resolve(count);
  15539. })
  15540. .catch((err) => {
  15541. resolve(0);
  15542. this.$message.error("网络不佳");
  15543. console.error(err);
  15544. });
  15545. });
  15546. },
  15547. getTwoType(id) {
  15548. this.twoJson = [];
  15549. var array = this.CourseTypeJson1[
  15550. "3f8eed32-aba9-11ee-b534-005056b86db5"
  15551. ].filter((e) => {
  15552. return e.ppid == id;
  15553. });
  15554. this.twoJson = array;
  15555. this.$forceUpdate();
  15556. },
  15557. ctype() {
  15558. this.oneJson =
  15559. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  15560. },
  15561. selectAllType1() {
  15562. this.CourseType1 = [];
  15563. this.CourseTypeJson1 = {};
  15564. this.courseTypeId1 = {};
  15565. this.$forceUpdate();
  15566. let params = {
  15567. org: this.org && this.org != "" ? this.org : "",
  15568. oid: this.oid && this.oid != "" ? this.oid : "",
  15569. };
  15570. this.ajax
  15571. .get(this.$store.state.api + "selectAllEvaType", params)
  15572. .then((res) => {
  15573. this.CourseType1 = res.data;
  15574. for (var i = 0; i < res.data[0].length; i++) {
  15575. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  15576. res.data[0][i].name = "一级分类";
  15577. } else if (
  15578. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  15579. ) {
  15580. res.data[0][i].name = "二级分类";
  15581. }
  15582. if (!this.cid) {
  15583. this.courseTypeId1[res.data[0][i].id] = [];
  15584. }
  15585. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  15586. this.CourseTypeJson1[res.data[0][i].id] = [];
  15587. }
  15588. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  15589. for (var j = 0; j < res.data[1].length; j++) {
  15590. if (res.data[0][i].id == res.data[1][j].pid) {
  15591. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15592. }
  15593. }
  15594. // } else {
  15595. if (res.data[2].length > 0) {
  15596. for (var j = 0; j < res.data[2].length; j++) {
  15597. if (res.data[0][i].id == res.data[2][j].pid) {
  15598. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15599. }
  15600. }
  15601. }
  15602. if (res.data[3].length > 0) {
  15603. for (var j = 0; j < res.data[3].length; j++) {
  15604. if (res.data[0][i].id == res.data[3][j].pid) {
  15605. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15606. }
  15607. }
  15608. }
  15609. // }
  15610. }
  15611. this.ctype();
  15612. this.cetBoxDialog = true;
  15613. })
  15614. .catch((err) => {
  15615. console.error(err);
  15616. });
  15617. },
  15618. setAiJson(pan,string,string2,string3){
  15619. if(pan == 'aiTeacher2'){
  15620. this.aiJson['teacherDetail2'] = string
  15621. }else if(pan == 'aiRateRuleA'){
  15622. this.aiJson['aiRateRule'] = string
  15623. }else if(pan == 'aiOutline2'){
  15624. this.aiJson['aiOutlineTask'] = string
  15625. this.aiJson['aiOutlineDetail'] = string2
  15626. this.aiText2 = ''
  15627. }else if(pan == 'aiTeacher3'){
  15628. this.aiJson['aiCpoteTask'] = string
  15629. this.aiJson['teacherDetail2'] = string2
  15630. this.aiText2 = ''
  15631. }else if(pan == 'aiTask2'){
  15632. this.aiJson['aiTask'] = string
  15633. }else if(pan == 'aiTask3'){
  15634. this.aiJson['aiTaskG2'] = string
  15635. this.aiJson['aiTaskG2'] = string2
  15636. this.aiJson['aiTaskG3'] = string3
  15637. }else if(pan == 'aiteacherTextDetail'){
  15638. this.aiJson['aiAbstract'] = string
  15639. }else if(pan == 'aitargetTextDetail'){
  15640. this.aiJson['aiTarget'] = string
  15641. }else if(pan == 'aitargetTextDetail2'){
  15642. this.aiJson['aiTarget2'] = string
  15643. }else if(pan == 'aitargetTextDetail3'){
  15644. this.aiJson['aiTargetGet'] = string
  15645. this.aiJson['aiTarget2'] = string2
  15646. }else {
  15647. this.aiJson[pan] = string
  15648. }
  15649. this.$forceUpdate();
  15650. },
  15651. editTask3(index){
  15652. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  15653. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  15654. }else {
  15655. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  15656. }
  15657. this.$forceUpdate();
  15658. },
  15659. editTask2(index){
  15660. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  15661. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  15662. }else {
  15663. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  15664. }
  15665. this.$forceUpdate();
  15666. },
  15667. openRule(i, k){
  15668. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  15669. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  15670. }else {
  15671. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  15672. }
  15673. this.$forceUpdate();
  15674. },
  15675. editCpote(index){
  15676. if(this.cpote[index]){
  15677. this.cpote[index] = false
  15678. }else {
  15679. this.cpote[index] = true
  15680. }
  15681. this.$forceUpdate();
  15682. },
  15683. clickGenTT(){
  15684. if(!this.teacherInfoData.length){
  15685. this.$message.error("请上传教案");
  15686. return;
  15687. }
  15688. this.openAiDialog(2, 'aiteacherTextDetail',1)
  15689. setTimeout(() => {
  15690. this.openAiDialog(2, 'aitargetTextDetail',1)
  15691. }, 500);
  15692. },
  15693. clickGenTT2(){
  15694. if (this.courseName == "") {
  15695. this.$message.error("请补充填写课程名称");
  15696. return;
  15697. }
  15698. this.openAiDialog(2, 'aiDetail',1)
  15699. setTimeout(() => {
  15700. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  15701. this.openAiDialog(2, 'aitargetTextDetail3',1)
  15702. }, 500);
  15703. this.courseTextBool = true
  15704. },
  15705. openAiDialog2(clickType, type, callback, index, tindex){
  15706. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  15707. confirmButtonText: "确定",
  15708. cancelButtonText: "取消",
  15709. type: "warning",
  15710. })
  15711. .then(() => {
  15712. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  15713. // this.openAiDialog(clickType, 'aiTeacher')
  15714. // }else {
  15715. this.openAiDialog(clickType, type, callback, index, tindex)
  15716. // }
  15717. })
  15718. .catch(() => {
  15719. });
  15720. },
  15721. openAiDialog(clickType, type, callback, index, tindex) {
  15722. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  15723. this.$message.error("您没有权限修改/查看提示词");
  15724. return;
  15725. }
  15726. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  15727. this.$message.error("请上传教案");
  15728. return;
  15729. }
  15730. if (this.courseName == "") {
  15731. this.$message.error("请补充填写课程名称");
  15732. return;
  15733. }
  15734. this.aiText2 = ''
  15735. this.clickType = clickType
  15736. let sub = []
  15737. if (this.courseTypeId.length) {
  15738. for (var i = 0; i < this.courseTypeId.length; i++) {
  15739. let _sid = this.courseTypeId[i]
  15740. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15741. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15742. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15743. }
  15744. }
  15745. }
  15746. }
  15747. let mclass = []
  15748. if (this.courseTypeId.length) {
  15749. for (var i = 0; i < this.courseTypeId.length; i++) {
  15750. let _sid = this.courseTypeId[i]
  15751. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15752. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15753. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15754. }
  15755. }
  15756. }
  15757. }
  15758. if (type == "aiDetail") {
  15759. if (this.ttextLoading) {
  15760. this.$message({
  15761. message: "请回答完毕后再次发送",
  15762. type: "warning"
  15763. });
  15764. return;
  15765. }
  15766. this.aitype = "aiDetail"
  15767. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  15768. this.aiText = this.aiJson.aiDetail
  15769. this.aiCallBack = callback
  15770. } else if (type == "aiOutline") {
  15771. this.aitype = "aiOutline"
  15772. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15773. this.aiText = this.aiJson.aiOutline
  15774. } else if (type == "aiOutline2") {
  15775. this.aitype = "aiOutline2"
  15776. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15777. this.aiText = this.aiJson.aiOutlineTask
  15778. this.aiText2 = this.aiJson.aiOutlineDetail
  15779. } else if (type == "aiOutlineDetail2") {
  15780. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  15781. this.$message({
  15782. message: "请回答完毕后再次发送",
  15783. type: "warning"
  15784. });
  15785. return;
  15786. }
  15787. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  15788. this.$message.error('请输入任务名称')
  15789. return;
  15790. }
  15791. this.aitype = type
  15792. this.aiCallBack = callback
  15793. this.aiText = this.aiJson.aiOutlineDetail2
  15794. } else if (type == "aiTask") {
  15795. this.aitype = "aiTask"
  15796. var _text = ""
  15797. for (var i = 0; i < this.teacherText.length; i++) {
  15798. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  15799. }
  15800. // this.aiText = `请根据${_text}。`
  15801. this.aiText = this.aiJson.aiTask
  15802. this.aiCallBack = callback
  15803. } else if (type == "aiTask2") {
  15804. if (this.taskLoading[callback]) {
  15805. this.$message({
  15806. message: "请回答完毕后再次发送",
  15807. type: "warning"
  15808. });
  15809. return;
  15810. }
  15811. this.aitype = "aiTask2"
  15812. this.aiText = this.aiJson.aiTask
  15813. this.aiCallBack = [callback, index]
  15814. } else if (type == "aiTask3") {
  15815. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  15816. this.$message({
  15817. message: "请回答完毕后再次发送",
  15818. type: "warning"
  15819. });
  15820. return;
  15821. }
  15822. this.aitype = type
  15823. this.aiText = this.aiJson.aiTaskG1
  15824. this.aiText2 = this.aiJson.aiTaskG2
  15825. this.aiText3 = this.aiJson.aiTaskG3
  15826. this.aiCallBack = [callback, index]
  15827. } else if (type == "aiDetail1") {
  15828. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  15829. this.$message({
  15830. message: "请回答完毕后再次发送",
  15831. type: "warning"
  15832. });
  15833. return;
  15834. }
  15835. this.aitype = "aiDetail1"
  15836. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  15837. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  15838. this.aiText = this.aiJson.aiDetail1
  15839. this.aiCallBack = callback
  15840. this.aiIndex = index
  15841. } else if (type == "aiDetail2") {
  15842. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  15843. this.$message({
  15844. message: "请回答完毕后再次发送",
  15845. type: "warning"
  15846. });
  15847. return;
  15848. }
  15849. this.aitype = "aiDetail2"
  15850. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  15851. this.aiText = this.aiJson.aiDetail2
  15852. this.aiCallBack = callback
  15853. this.aiIndex = index
  15854. } else if (type == "aiDetail3") {
  15855. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  15856. this.$message({
  15857. message: "请回答完毕后再次发送",
  15858. type: "warning"
  15859. });
  15860. return;
  15861. }
  15862. this.aitype = "aiDetail3"
  15863. this.aiText = this.aiJson.aiDetail3
  15864. this.aiIndex = index + '-' + tindex
  15865. } else if (type == "aiDetail4") {
  15866. var _text = ""
  15867. if(callback && callback.length){
  15868. for (var i = 0; i < callback.length; i++) {
  15869. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15870. }
  15871. }
  15872. this.aitype = "aiDetail4"
  15873. this.aiText = this.aiJson.aiDetail4
  15874. this.aiIndex = index
  15875. } else if (type == "aiTeacher") {
  15876. this.aitype = "aiTeacher"
  15877. var _text = ""
  15878. for (var i = 0; i < this.dArray.length; i++) {
  15879. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15880. }
  15881. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15882. this.aiText = this.aiJson.aiTeacher
  15883. this.aiCallBack = callback
  15884. } else if (type == "aiTeacher2") {
  15885. this.aitype = "aiTeacher2"
  15886. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15887. } else if (type == "aiTeacher3") {
  15888. this.aitype = type
  15889. this.aiText = this.aiJson.aiCpoteTask
  15890. this.aiText2 = this.aiJson.teacherDetail2
  15891. } else if (type == "teacherDetail") {
  15892. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15893. this.$message({
  15894. message: "请回答完毕后再次发送",
  15895. type: "warning"
  15896. });
  15897. return;
  15898. }
  15899. this.aitype = "teacherDetail"
  15900. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15901. this.aiText = this.aiJson.teacherDetail
  15902. this.aiCallBack = callback
  15903. this.aiIndex = index
  15904. } else if (type == "teacherDetail2") {
  15905. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15906. this.$message({
  15907. message: "请回答完毕后再次发送",
  15908. type: "warning"
  15909. });
  15910. return;
  15911. }
  15912. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15913. this.$message.error('请输入任务名称')
  15914. return;
  15915. }
  15916. this.aitype = "teacherDetail2"
  15917. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15918. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15919. this.aiCallBack = callback
  15920. this.aiIndex = index
  15921. } else if (type == "aiCpote1") {
  15922. if (this.cpotetLoading.cpote1) {
  15923. this.$message({
  15924. message: "请回答完毕后再次发送",
  15925. type: "warning"
  15926. });
  15927. return;
  15928. }
  15929. this.aitype = "aiCpote1"
  15930. this.aiText = this.aiJson.cpote1
  15931. this.aiCallBack = callback
  15932. } else if (type == "aiCpote2") {
  15933. if (this.cpotetLoading.cpote2) {
  15934. this.$message({
  15935. message: "请回答完毕后再次发送",
  15936. type: "warning"
  15937. });
  15938. return;
  15939. }
  15940. this.aitype = "aiCpote2"
  15941. this.aiText = this.aiJson.cpote2
  15942. this.aiCallBack = callback
  15943. } else if (type == "aiCpote3") {
  15944. if (this.cpotetLoading.cpote3) {
  15945. this.$message({
  15946. message: "请回答完毕后再次发送",
  15947. type: "warning"
  15948. });
  15949. return;
  15950. }
  15951. this.aitype = "aiCpote3"
  15952. this.aiText = this.aiJson.cpote3
  15953. this.aiCallBack = callback
  15954. } else if (type == "aiCpote4") {
  15955. if (this.cpotetLoading.cpote4) {
  15956. this.$message({
  15957. message: "请回答完毕后再次发送",
  15958. type: "warning"
  15959. });
  15960. return;
  15961. }
  15962. this.aitype = "aiCpote4"
  15963. this.aiText = this.aiJson.cpote4
  15964. this.aiCallBack = callback
  15965. } else if (type == 'aiteacherTextDetail'){
  15966. if (this.tteacherTextLoading) {
  15967. this.$message({
  15968. message: "请回答完毕后再次发送",
  15969. type: "warning"
  15970. });
  15971. return;
  15972. }
  15973. this.aitype = type
  15974. this.aiText = this.aiJson.aiAbstract
  15975. this.aiCallBack = callback
  15976. } else if (type == 'aitargetTextDetail'){
  15977. if (this.ttargetTextLoading) {
  15978. this.$message({
  15979. message: "请回答完毕后再次发送",
  15980. type: "warning"
  15981. });
  15982. return;
  15983. }
  15984. this.aitype = type
  15985. this.aiText = this.aiJson.aiTarget
  15986. this.aiCallBack = callback
  15987. } else if (type == 'aitargetTextDetail2'){
  15988. if (this.ttargetTextLoading2) {
  15989. this.$message({
  15990. message: "请回答完毕后再次发送",
  15991. type: "warning"
  15992. });
  15993. return;
  15994. }
  15995. this.aitype = type
  15996. this.aiText = this.aiJson.aiTarget2
  15997. this.aiCallBack = callback
  15998. } else if (type == 'aitargetTextDetail3'){
  15999. if (this.ttargetTextLoading2) {
  16000. this.$message({
  16001. message: "请回答完毕后再次发送",
  16002. type: "warning"
  16003. });
  16004. return;
  16005. }
  16006. this.aitype = type
  16007. this.aiText = this.aiJson.aiTargetGet
  16008. this.aiText2 = this.aiJson.aiTarget2
  16009. this. aiCallBack= callback
  16010. } else if (type == 'aiSearchFile'){
  16011. if(this.fileSLoading) {
  16012. this.$message({
  16013. message: "请回答完毕后再次发送",
  16014. type: "warning"
  16015. });
  16016. return;
  16017. }
  16018. this.aitype = type
  16019. this.aiText = this.aiJson.aiSearchFile
  16020. } else if (type == 'aiRateRule'){
  16021. this.aitype = type
  16022. this.aiText = this.aiJson.aiRateRule
  16023. this.aiCallBack = [callback, index]
  16024. } else if (type == 'aiRateRuleA'){
  16025. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  16026. confirmButtonText: "生成所有",
  16027. cancelButtonText: "仅生成该任务",
  16028. distinguishCancelAndClose: true,
  16029. type: "warning",
  16030. })
  16031. .then(() => {
  16032. this.aitype = type
  16033. this.aiText = this.aiJson.aiRateRule
  16034. this.aiCallBack = [1,callback]
  16035. this.dialogVisibleAiD = true
  16036. }).catch((v) => {
  16037. console.log(v);
  16038. if (v == "cancel") {
  16039. this.aitype = type
  16040. this.aiText = this.aiJson.aiRateRule
  16041. this.aiCallBack = [2,callback]
  16042. this.dialogVisibleAiD = true
  16043. }
  16044. })
  16045. }
  16046. if(type != 'aiRateRuleA'){
  16047. this.dialogVisibleAiD = true
  16048. }
  16049. },
  16050. async aiConfirm(msg,msg2,msg3) {
  16051. let sub = []
  16052. if (this.courseTypeId.length) {
  16053. for (var i = 0; i < this.courseTypeId.length; i++) {
  16054. let _sid = this.courseTypeId[i]
  16055. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16056. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16057. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16058. }
  16059. }
  16060. }
  16061. }
  16062. let mclass = []
  16063. if (this.courseTypeId.length) {
  16064. for (var i = 0; i < this.courseTypeId.length; i++) {
  16065. let _sid = this.courseTypeId[i]
  16066. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16067. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16068. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16069. }
  16070. }
  16071. }
  16072. }
  16073. let url = []
  16074. if (this.infoData.length) {
  16075. for (var i = 0; i < this.infoData.length; i++) {
  16076. url.push(this.infoData[i].url)
  16077. }
  16078. }
  16079. if (this.aitype == "aiDetail") {
  16080. this.detailYou(msg)
  16081. } else if (this.aitype == "aiOutline") {
  16082. this.loading = true
  16083. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16084. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16085. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16086. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16087. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16088. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16089. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16090. let message = `NOTICE
  16091. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16092. 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.
  16093. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16094. Instruction: Based on the context, follow "Format example", write content.
  16095. # Context
  16096. ## 要求
  16097. ${msg} 以及##参考资料
  16098. ## 参考资料
  16099. 课程名字:${this.courseName}
  16100. ${courseText ? '课程简要描述:' + courseText : ''}
  16101. ${sub.length ? '学科:' + sub.join(",") : ''}
  16102. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16103. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16104. detail输出不要输出成json,文本或者markdown都可以
  16105. # Format example
  16106. [{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"}]`
  16107. this.aiGet2(message, () => {
  16108. this.loading = false
  16109. this.isOutline = true
  16110. })
  16111. } else if (this.aitype == "aiOutline2") {
  16112. this.loading = true
  16113. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16114. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16115. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16116. let message = `NOTICE
  16117. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16118. 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.
  16119. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16120. Instruction: Based on the context, follow "Format example", write content.
  16121. # Context
  16122. ## 要求
  16123. ${msg} 以及##参考资料
  16124. ## 参考资料
  16125. 课程名字:${this.courseName}
  16126. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16127. ${sub.length ? '学科:' + sub.join(",") : ''}
  16128. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16129. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16130. # Format example
  16131. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16132. this.aiGetTask2(message, () => {
  16133. this.loading = false
  16134. this.isOutline = true
  16135. })
  16136. } else if (this.aitype == "aiOutlineDetail2") {
  16137. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16138. } else if (this.aitype == "aiTask") {
  16139. var _text = ""
  16140. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16141. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16142. }
  16143. let message = `NOTICE
  16144. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16145. 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.
  16146. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16147. Instruction: Based on the context, follow "Format example", write content.
  16148. # Context
  16149. ## 要求
  16150. ${msg} 为**每个教学任务分别输出**以下内容。
  16151.  
  16152. ${(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','') : ''}
  16153. ## 参考资料
  16154. 教学任务教案:${_text}
  16155. ## 格式要求
  16156. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16157. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16158. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16159. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16160. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16161. 出现选择题和问答题的概率提高
  16162. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16163.  
  16164. # Format example
  16165. [{"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":"工具描述"}]}]`
  16166. this.loading = true
  16167. this.aiGet3(message, this.aiCallBack)
  16168. } else if (this.aitype == "aiTask2") {
  16169. if(this.aiCallBack[0] == 'all'){
  16170. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16171. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16172. let message = `NOTICE
  16173. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16174. 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.
  16175. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16176. Instruction: Based on the context, follow "Format example", write content.
  16177. # Context
  16178. ## 要求
  16179. ${msg} 为教学任务分别输出以下内容。
  16180.  
  16181. ${(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','') : ''}
  16182. ## 参考资料
  16183. 教学任务教案:${_text}
  16184. ## 格式要求
  16185. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16186. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16187. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16188. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16189. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16190.  
  16191. # Format example
  16192. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16193. this.taskLoading[_task] = true
  16194. this.aiGet32(message, _task)
  16195. }
  16196. }else{
  16197. 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`
  16198. let message = `NOTICE
  16199. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16200. 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.
  16201. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16202. Instruction: Based on the context, follow "Format example", write content.
  16203. # Context
  16204. ## 要求
  16205. ${msg} 为教学任务分别输出以下内容。
  16206.  
  16207. ${(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','') : ''}
  16208. ## 参考资料
  16209. 教学任务教案:${_text}
  16210. ## 格式要求
  16211. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16212. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16213. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16214. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16215. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16216.  
  16217. # Format example
  16218. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16219. this.taskLoading[this.aiCallBack[0]] = true
  16220. this.aiGet32(message, this.aiCallBack[0])
  16221. }
  16222. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16223. } else if (this.aitype == "aiTask3") {
  16224. if(this.aiCallBack[0] == 'all'){
  16225. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16226. let message1 = `NOTICE
  16227. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16228. 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.
  16229. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16230. Instruction: Based on the context, follow "Format example", write content.
  16231. # Context
  16232. ## 要求
  16233. ${msg}
  16234.  
  16235. ## 参考资料
  16236. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16237. # 输出格式与要求
  16238. 任务描述(告诉学生他们需要做什么):
  16239. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16240. # 范例
  16241. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16242. # Format example
  16243. { "detail":"任务描述" }`
  16244. let message2 = `NOTICE
  16245. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16246. 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.
  16247. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16248. Instruction: Based on the context, follow "Format example", write content.
  16249. # Context
  16250. ## 要求
  16251. ${msg}
  16252.  
  16253. ## 参考资料
  16254. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16255. # 输出格式与要求
  16256. 互动工具列表
  16257. 工具名:表格
  16258. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16259. 工具名:文档
  16260. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16261. 工具名称:选择题
  16262. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16263. 工具名称:作业提交
  16264. 工具指引:同学们,当你们完成实验报告后,我们需要用PPT来汇报项目成果。PPT是一种强大的工具,能帮助我们将复杂的信息以直观、有趣的方式展示出来。首先,打开PPT工具,新建一个演示文稿,并设置好基本结构,如标题页、实验背景、实验方法、数据分析、结论与建议等。接着,可以通过选择合适的主题和背景,美化幻灯片,插入图片、图标和图表,让PPT更生动。记住要保持文字简洁、突出重点,并为每张幻灯片添加适当的动画效果。制作完成后,多次练习你的演讲,确保表达清晰自然。最后,保存并分享你的PPT,准备好精彩的展示吧!期待看到你们的优秀成果,有问题随时来问我哦!
  16265. # Format example
  16266. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16267. let message3 = `NOTICE
  16268. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16269. 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.
  16270. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16271. Instruction: Based on the context, follow "Format example", write content.
  16272. # Context
  16273. ## 要求
  16274. ${msg}
  16275.  
  16276. ## 参考资料
  16277. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16278. # 输出格式与要求
  16279. 核心素养:从教案中提取
  16280. 目标:从教案中提取
  16281. 评价标准:从教案中提取评价标准
  16282. # Format example
  16283. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16284. if(!this.taskGLoading[_task]){
  16285. this.taskGLoading[_task] = []
  16286. }
  16287. this.taskGLoading[_task][0] = true
  16288. this.taskGLoading[_task][1] = true
  16289. this.taskGLoading[_task][2] = true
  16290. this.aiGetG321(message1, _task)
  16291. this.aiGetG322(message2, _task)
  16292. this.aiGetG323(message3, _task)
  16293. }
  16294. }else{
  16295. let message1 = `NOTICE
  16296. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16297. 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.
  16298. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16299. Instruction: Based on the context, follow "Format example", write content.
  16300. # Context
  16301. ## 要求
  16302. ${msg}
  16303.  
  16304. ## 参考资料
  16305. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16306. # 输出格式与要求
  16307. 任务描述(告诉学生他们需要做什么):
  16308. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16309. # 范例
  16310. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16311. # Format example
  16312. { "detail":"任务描述" }`
  16313. let message2 = `NOTICE
  16314. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16315. 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.
  16316. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16317. Instruction: Based on the context, follow "Format example", write content.
  16318. # Context
  16319. ## 要求
  16320. ${msg}
  16321.  
  16322. ## 参考资料
  16323. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16324. # 输出格式与要求
  16325. 互动工具列表
  16326. 工具名:表格
  16327. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16328. 工具名:文档
  16329. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16330. 工具名称:选择题
  16331. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16332. 工具名称:作业提交
  16333. 工具指引:同学们,当你们完成实验报告后,我们需要用PPT来汇报项目成果。PPT是一种强大的工具,能帮助我们将复杂的信息以直观、有趣的方式展示出来。首先,打开PPT工具,新建一个演示文稿,并设置好基本结构,如标题页、实验背景、实验方法、数据分析、结论与建议等。接着,可以通过选择合适的主题和背景,美化幻灯片,插入图片、图标和图表,让PPT更生动。记住要保持文字简洁、突出重点,并为每张幻灯片添加适当的动画效果。制作完成后,多次练习你的演讲,确保表达清晰自然。最后,保存并分享你的PPT,准备好精彩的展示吧!期待看到你们的优秀成果,有问题随时来问我哦!
  16334. # Format example
  16335. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16336. let message3 = `NOTICE
  16337. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16338. 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.
  16339. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16340. Instruction: Based on the context, follow "Format example", write content.
  16341. # Context
  16342. ## 要求
  16343. ${msg}
  16344.  
  16345. ## 参考资料
  16346. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16347. # 输出格式与要求
  16348. 核心素养:从教案中提取
  16349. 目标:从教案中提取
  16350. 评价标准:从教案中提取评价标准
  16351. # Format example
  16352. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16353. if(!this.taskGLoading[this.aiCallBack[0]]){
  16354. this.taskGLoading[this.aiCallBack[0]] = []
  16355. }
  16356. this.taskGLoading[this.aiCallBack[0]][0] = true
  16357. this.taskGLoading[this.aiCallBack[0]][1] = true
  16358. this.taskGLoading[this.aiCallBack[0]][2] = true
  16359. this.aiGetG321(message1, this.aiCallBack[0])
  16360. this.aiGetG322(message2, this.aiCallBack[0])
  16361. this.aiGetG323(message3, this.aiCallBack[0])
  16362. }
  16363. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16364. } else if (this.aitype == "aiDetail1") {
  16365. this.aiDetail(msg, this.aiIndex)
  16366. } else if (this.aitype == "aiDetail2") {
  16367. this.aiDetail2(msg, this.aiIndex)
  16368. } else if (this.aitype == "aiDetail3") {
  16369. let _index = this.aiIndex.split('-')
  16370. this.aiDetail3(msg, _index[0], _index[1])
  16371. } else if (this.aitype == "aiDetail4") {
  16372. this.aiDetail4(msg, this.aiIndex)
  16373. } else if (this.aitype == "teacherDetail") {
  16374. this.aiDetail5(msg, this.aiIndex)
  16375. } else if (this.aitype == "teacherDetail2") {
  16376. this.aiDetail52(msg, this.aiIndex)
  16377. } else if (this.aitype == "aiCpote1") {
  16378. this.aiCpote(msg, this.aiCallBack)
  16379. } else if (this.aitype == "aiCpote2") {
  16380. this.aiCpote(msg, this.aiCallBack)
  16381. } else if (this.aitype == "aiCpote3") {
  16382. this.aiCpote(msg, this.aiCallBack)
  16383. } else if (this.aitype == "aiCpote4") {
  16384. this.aiCpote(msg, this.aiCallBack)
  16385. } else if (this.aitype == "aiTeacher") {
  16386. this.loading = true
  16387. var _text = ""
  16388. for (var i = 0; i < this.dArray.length; i++) {
  16389. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16390. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16391. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16392. let message = ` NOTICE
  16393. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16394. 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.
  16395. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16396. Instruction: Based on the context, follow "Format example", write content.
  16397. # Context
  16398. ## 要求
  16399. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  16400. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  16401. ${(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','') : ''}
  16402. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16403. ## Format example
  16404. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  16405. this.aiGet4(message, () => {
  16406. this.loading = false
  16407. this.isOutline2 = true
  16408. })
  16409. } else if (this.aitype == "aiTeacher2"){
  16410. this.isOutline2 = true
  16411. setTimeout(()=>{
  16412. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16413. this.aiDetail52(msg, i)
  16414. }
  16415. }, 0)
  16416. } else if (this.aitype == "aiTeacher3"){
  16417. this.loading = true
  16418. let message = `NOTICE
  16419. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16420. 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.
  16421. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16422. Instruction: Based on the context, follow "Format example", write content.
  16423. # Context
  16424. ## 要求
  16425. ${msg} 以及##参考资料
  16426. ## 参考资料
  16427. 任务簇:${this.cpote.cpote4}
  16428. # Format example
  16429. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  16430. this.aiGetTask3(message, () => {
  16431. this.loading = false
  16432. this.isOutline2 = true
  16433. })
  16434. } else if (this.aitype == "aiteacherTextDetail") {
  16435. this.aiteacherTextDetail(msg)
  16436. } else if (this.aitype == "aitargetTextDetail") {
  16437. this.aitargetTextDetail(msg)
  16438. } else if (this.aitype == "aitargetTextDetail2") {
  16439. this.aitargetTextDetail2(msg)
  16440. } else if (this.aitype == "aitargetTextDetail3") {
  16441. this.aitargetTextDetail3(msg)
  16442. } else if (this.aitype == 'aiSearchFile'){
  16443. let messages = `NOTICE
  16444. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16445. 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.
  16446. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16447. Instruction: Based on the context, follow "Format example", write content.
  16448. ## 参考资料
  16449. 关键词:${this.courseName}
  16450. # Context
  16451. ## 要求
  16452. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  16453. # Format example
  16454. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  16455. this.fileSLoading = true
  16456. this.aiSearchFile(messages,()=>{
  16457. this.fileSLoading = false
  16458. })
  16459. } else if (this.aitype == 'aiRateRule'){
  16460. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  16461. } else if (this.aitype == 'aiRateRuleA'){
  16462. if(this.aiCallBack[0] == 1){
  16463. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16464. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16465. for(var k = 0; k < task.eList.length; k++){
  16466. if(!task.eList[k].rule){
  16467. this.againEva(msg, i, k)
  16468. }
  16469. }
  16470. }
  16471. }else if(this.aiCallBack[0] == 2){
  16472. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  16473. for(var k = 0; k < task.eList.length; k++){
  16474. if(!task.eList[k].rule){
  16475. this.againEva(msg, this.aiCallBack[1], k)
  16476. }
  16477. }
  16478. }
  16479. }
  16480. this.setAiJson(this.aitype, msg, msg2, msg3)
  16481. },
  16482. detailYou(message) {
  16483. this.textLoading = true
  16484. this.ttextLoading = true
  16485. let sub = []
  16486. if (this.courseTypeId.length) {
  16487. for (var i = 0; i < this.courseTypeId.length; i++) {
  16488. let _sid = this.courseTypeId[i]
  16489. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16490. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16491. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16492. }
  16493. }
  16494. }
  16495. }
  16496. let mclass = []
  16497. if (this.courseTypeId.length) {
  16498. for (var i = 0; i < this.courseTypeId.length; i++) {
  16499. let _sid = this.courseTypeId[i]
  16500. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16501. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16502. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16503. }
  16504. }
  16505. }
  16506. }
  16507. let url = []
  16508. if (this.infoData.length) {
  16509. for (var i = 0; i < this.infoData.length; i++) {
  16510. url.push(this.infoData[i].url)
  16511. }
  16512. }
  16513. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16514. // --------
  16515. // ## 补充参考资料
  16516. // 补充资料:${url.join(",")}
  16517. // 补充描述:${this.courseText2} ##补充参考资料和
  16518. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16519. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16520. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16521. let msg = `NOTICE
  16522. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16523. 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.
  16524. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16525. Instruction: Based on the context, follow "Format example", write content.
  16526. #Context
  16527. ## 参考资料
  16528. 课程名字:${this.courseName}
  16529. ${sub.length ? '学科:' + sub.join(",") : ''}
  16530. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16531. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  16532. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  16533. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  16534. ## 要求
  16535. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  16536. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  16537. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  16538. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  16539. this.aiGet(msg)
  16540. },
  16541. setUnitJson() {
  16542. 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 }] }
  16543. this.$forceUpdate()
  16544. },
  16545. async aiGet(messages) {
  16546. let _this = this
  16547. let fileid = []
  16548. if(!this.yiKeTemplateArray.includes(this.templateid)){
  16549. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  16550. if(_this.cankaoInfoData[i].fileid){
  16551. fileid.push(_this.cankaoInfoData[i].fileid)
  16552. }else {
  16553. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  16554. if(_fileid){
  16555. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  16556. _this.$forceUpdate();
  16557. if(_fileid != 1){
  16558. fileid.push(_fileid)
  16559. }
  16560. }
  16561. }
  16562. }
  16563. if(this.mode == 1){
  16564. for (var i = 0; i < _this.infoData.length; i++) {
  16565. if(_this.infoData[i].fileid){
  16566. fileid.push(_this.infoData[i].fileid)
  16567. }else {
  16568. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16569. if(_fileid){
  16570. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16571. _this.$forceUpdate();
  16572. if(_fileid != 1){
  16573. fileid.push(_fileid)
  16574. }
  16575. }
  16576. }
  16577. }
  16578. }
  16579. } else {
  16580. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16581. if (_this.infoData.length) {
  16582. for (var i = 0; i < _this.infoData.length; i++) {
  16583. if(_this.infoData[i].fileid){
  16584. fileid.push(_this.infoData[i].fileid)
  16585. }else {
  16586. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16587. if(_fileid){
  16588. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16589. _this.$forceUpdate();
  16590. if(_fileid != 1){
  16591. fileid.push(_fileid)
  16592. }
  16593. }
  16594. }
  16595. }
  16596. }
  16597. }
  16598. _this.isTextCancelToken = _this.ajax.setCancelSource();
  16599. let _uuid = uuidv4();
  16600. // let params = JSON.stringify({
  16601. // // "model": "Chat",
  16602. // model: 'gpt-3.5-turbo',
  16603. // temperature: 0.1,
  16604. // max_tokens: 4096,
  16605. // top_p: 1,
  16606. // frequency_penalty: 0,
  16607. // presence_penalty: 0,
  16608. // messages: [{
  16609. // content: messages,
  16610. // role: 'user'
  16611. // }],
  16612. // uid: _uuid,
  16613. // mind_map_question: "",
  16614. // })
  16615. let params = {
  16616. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16617. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16618. session_name: _uuid,
  16619. userId: _this.userid,
  16620. uid: _uuid,
  16621. file_ids: fileid.length ? [...fileid] : '',
  16622. model: 'gpt-4o-2024-08-06',
  16623. temperature: 0.1,
  16624. }
  16625. // let params = JSON.stringify({
  16626. // message: {
  16627. // anthropic_version: "bedrock-2023-05-31",
  16628. // max_tokens: 4096,
  16629. // temperature: 0.1,
  16630. // top_p: 1,
  16631. // messages: [{
  16632. // "role": "user",
  16633. // "content": messages
  16634. // }] ,
  16635. // },
  16636. // uid: _uuid,
  16637. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16638. // });
  16639. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16640. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  16641. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16642. console.log(response);
  16643. // let data = response.data.FunctionResponse
  16644. // if (data.choices && data.choices.length && data.choices[0].message) {
  16645. // _this.courseText = data.choices[0].message.content
  16646. // }
  16647. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16648. } else {
  16649. _this.$message.warning(response.data.FunctionResponse.result);
  16650. }
  16651. _this.isTextCancelToken = null
  16652. }).catch(function (error) {
  16653. _this.textLoading = false
  16654. _this.ttextLoading = false
  16655. _this.isTextCancelToken = null
  16656. console.log(error);
  16657. });
  16658. await _this.aiGetgetAiContent(_uuid)
  16659. },
  16660. aiGetgetAiContent(_uid) {
  16661. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16662. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16663. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16664. let _allText = "";
  16665. let _mdText = "";
  16666. let _iindex = 0
  16667. this.isTextCancelSource.onmessage = _e => {
  16668. let _eData = JSON.parse(_e.data).content;
  16669. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16670. //对话已经完成
  16671. _mdText = _mdText.replace("_", "");
  16672. this.isTextCancelSource.close();
  16673. this.isTextCancelSource = null;
  16674. this.courseText = _mdText;
  16675. this.textLoading = false
  16676. this.ttextLoading = false
  16677. this.courseTextB = false
  16678. this.isTextCancelToken = null
  16679. return;
  16680. } else {
  16681. _iindex++
  16682. //对话还在继续
  16683. let _text = "";
  16684. _text = _eData.replaceAll("'", "");
  16685. if (_allText == "") {
  16686. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16687. } else {
  16688. _allText += _text;
  16689. }
  16690. _mdText = _allText + "_";
  16691. _mdText = _mdText.replace(/\\n/g, "\n");
  16692. _mdText = _mdText.replace(/\\/g, "");
  16693. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16694. //转化返回的回复流数据
  16695. if(_iindex == 10){
  16696. this.courseText = _mdText;
  16697. _iindex = 0
  16698. }
  16699. this.textLoading = false
  16700. // 处理流数据
  16701. }
  16702. // this.$forceUpdate();
  16703. };
  16704. },
  16705. numberToChinese(number) {
  16706. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  16707. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  16708. let result = '';
  16709. let num = parseInt(number, 10);
  16710. let i = 0;
  16711. while (num > 0) {
  16712. result = chineseNum[num % 10] + chineseUnit[i] + result;
  16713. num = Math.floor(num / 10);
  16714. i++;
  16715. }
  16716. // 去除连续的零,保留一个零
  16717. result = result.replace(/零+/g, '零');
  16718. return result;
  16719. },
  16720. async aiGet2(messages, callback) {
  16721. let _this = this
  16722. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16723. if (_this.infoData.length) {
  16724. for (var i = 0; i < _this.infoData.length; i++) {
  16725. if(_this.infoData[i].fileid){
  16726. fileid.push(_this.infoData[i].fileid)
  16727. }else {
  16728. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16729. if(_fileid){
  16730. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16731. _this.$forceUpdate();
  16732. if(_fileid != 1){
  16733. fileid.push(_fileid)
  16734. }
  16735. }
  16736. }
  16737. }
  16738. }
  16739. console.log('fileid=========',fileid)
  16740. // let params = JSON.stringify({
  16741. // // "model": "Chat",
  16742. // model: 'gpt-3.5-turbo',
  16743. // temperature: 0.1,
  16744. // max_tokens: 4096,
  16745. // top_p: 1,
  16746. // frequency_penalty: 0,
  16747. // presence_penalty: 0,
  16748. // messages: [{
  16749. // content: messages,
  16750. // role: 'user'
  16751. // }],
  16752. // stream: false,
  16753. // uid: this.userid,
  16754. // mind_map_question: "",
  16755. // })
  16756. // // let params = JSON.stringify({
  16757. // // message: {
  16758. // // anthropic_version: "bedrock-2023-05-31",
  16759. // // max_tokens: 4096,
  16760. // // temperature: 0.1,
  16761. // // top_p: 1,
  16762. // // messages: [{
  16763. // // content: messages,
  16764. // // role: 'user'
  16765. // // }], //
  16766. // // },
  16767. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16768. // // });
  16769. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16770. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16771. // console.log(response);
  16772. // let data = response.data.FunctionResponse
  16773. // if (data.choices && data.choices.length && data.choices[0].message) {
  16774. // console.log(data.choices[0].message.content);
  16775. // let dArray = JSON.parse(data.choices[0].message.content)
  16776. // _this.dArray = dArray
  16777. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16778. // for (var i = 0; i < dArray.length; i++) {
  16779. // let _task = dArray[i]
  16780. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16781. // task: _task.task,
  16782. // taskDetail: "",
  16783. // taskDetail2: _task.detail,
  16784. // taskDetail3: "",
  16785. // chapterData: [],
  16786. // toolText: "",
  16787. // toolChoose: [
  16788. // {
  16789. // tool: [],
  16790. // toolDetail: "",
  16791. // toolType: 0,
  16792. // askCount: 1,
  16793. // askTitle: "",
  16794. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16795. // },
  16796. // ],
  16797. // isShowTools: false,
  16798. // askCount: 1,
  16799. // isFold: 0,
  16800. // askTitle: "",
  16801. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16802. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16803. // homeworkList: [],
  16804. // })
  16805. // }
  16806. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16807. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16808. // _this.$forceUpdate();
  16809. // }
  16810. // // if (data.result) {
  16811. // // console.log(data.result);
  16812. // // let dArray = JSON.parse(data.result)
  16813. // // _this.dArray = dArray
  16814. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16815. // // for (var i = 0; i < dArray.length; i++) {
  16816. // // let _task = dArray[i]
  16817. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16818. // // task: _task.task,
  16819. // // taskDetail: "",
  16820. // // taskDetail2: _task.detail,
  16821. // // taskDetail3: "",
  16822. // // chapterData: [],
  16823. // // toolText: "",
  16824. // // toolChoose: [
  16825. // // {
  16826. // // tool: [],
  16827. // // toolDetail: "",
  16828. // // toolType: 0,
  16829. // // askCount: 1,
  16830. // // askTitle: "",
  16831. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16832. // // },
  16833. // // ],
  16834. // // isShowTools: false,
  16835. // // askCount: 1,
  16836. // // isFold: 1,
  16837. // // askTitle: "",
  16838. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16839. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16840. // // homeworkList: [],
  16841. // // })
  16842. // // }
  16843. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16844. // // _this.$forceUpdate();
  16845. // // }
  16846. // callback ? callback() : ''
  16847. // }).catch(function (error) {
  16848. // _this.loading = false
  16849. // console.log(error);
  16850. // });
  16851. this.isOutlineCancelToken = this.ajax.setCancelSource();
  16852. let parm = {
  16853. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16854. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16855. session_name: uuidv4(),
  16856. userId: this.userid,
  16857. file_ids: fileid.length ? [...fileid] : '',
  16858. model: 'gpt-4o-2024-08-06',
  16859. temperature: 0.1,
  16860. }
  16861. this.ajax
  16862. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  16863. .then((response) => {
  16864. console.log(response);
  16865. let data = response.data.FunctionResponse
  16866. if (data.message) {
  16867. console.log(data.message);
  16868. let dArray = {}
  16869. try {
  16870. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16871. } catch (error) {
  16872. console.log("error_________________" + error);
  16873. try {
  16874. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16875. let match = data.message.match(regex);
  16876. dArray = JSON.parse(match[0]);
  16877. // var message = data.message;
  16878. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16879. // var jsonEnd = message.indexOf("```", jsonStart);
  16880. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16881. // dArray = JSON.parse(jsonString);
  16882. } catch (error) {
  16883. try {
  16884. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16885. let match = data.message.match(regex);
  16886. // eval("var aaa = " + match[0])
  16887. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16888. } catch (error) {
  16889. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16890. _this.aiGet2(messages, callback);
  16891. console.log("error_________________" + error);
  16892. }
  16893. console.log("error_________________" + error);
  16894. }
  16895. }
  16896. _this.dArray = dArray
  16897. console.log(dArray)
  16898. if(_this.panOutline() > 0){
  16899. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16900. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16901. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16902. }
  16903. for (var i = 0; i < dArray.length; i++) {
  16904. let _task = dArray[i]
  16905. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16906. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  16907. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16908. }else {
  16909. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16910. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16911. taskDetail: "",
  16912. taskDetail2: _task.detail,
  16913. taskDetail3: "",
  16914. chapterData: [],
  16915. toolText: "",
  16916. toolChoose: [
  16917. {
  16918. tool: [],
  16919. toolDetail: "",
  16920. toolType: 0,
  16921. askCount: 1,
  16922. askTitle: "",
  16923. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16924. },
  16925. ],
  16926. isShowTools: false,
  16927. askCount: 1,
  16928. isFold: 0,
  16929. askTitle: "",
  16930. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16931. checkJson: [{ checkCount: [], checkPerent: [] }],
  16932. homeworkList: [],
  16933. })
  16934. }
  16935. }
  16936. }else {
  16937. _this.unitJson[0].chapterInfo[0].taskJson = []
  16938. for (var i = 0; i < dArray.length; i++) {
  16939. let _task = dArray[i]
  16940. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16941. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16942. taskDetail: "",
  16943. taskDetail2: _task.detail,
  16944. taskDetail3: "",
  16945. chapterData: [],
  16946. toolText: "",
  16947. toolChoose: [
  16948. {
  16949. tool: [],
  16950. toolDetail: "",
  16951. toolType: 0,
  16952. askCount: 1,
  16953. askTitle: "",
  16954. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16955. },
  16956. ],
  16957. isShowTools: false,
  16958. askCount: 1,
  16959. isFold: 0,
  16960. askTitle: "",
  16961. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16962. checkJson: [{ checkCount: [], checkPerent: [] }],
  16963. homeworkList: [],
  16964. })
  16965. }
  16966. }
  16967. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16968. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16969. _this.$forceUpdate();
  16970. }
  16971. callback ? callback() : ''
  16972. _this.isOutlineCancelToken = null
  16973. })
  16974. .catch((error) => {
  16975. _this.loading = false
  16976. _this.isOutlineCancelToken = null
  16977. console.log(error);
  16978. });
  16979. },
  16980. cancelAjax(type, index){
  16981. if (this.isOutlineCancelToken && type == 'outline') {
  16982. this.$message.success("已经成功停止生成课程大纲")
  16983. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  16984. this.isOutlineCancelToken = null;
  16985. this.loading = false
  16986. }
  16987. if (this.isFileCancelToken && type == 'file') {
  16988. this.$message.success("已经成功停止智能生成检索资料")
  16989. this.isFileCancelToken.cancel('Request canceled by the user.');
  16990. this.isFileCancelToken = null;
  16991. this.fileSLoading = false
  16992. }
  16993. if(this.isTextCancelToken && type == 'text'){
  16994. this.$message.success("已经成功停止AI优化")
  16995. this.isTextCancelToken.cancel('Request canceled by the user.');
  16996. this.isTextCancelToken = null;
  16997. this.textLoading = false
  16998. this.ttextLoading = true
  16999. if(this.isTextCancelSource){
  17000. this.isTextCancelSource.close()
  17001. this.isTextCancelSource = null
  17002. }
  17003. }
  17004. if(this.isTargetCancelToken2 && type == 'target2'){
  17005. this.$message.success("已经成功停止生成目标")
  17006. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  17007. this.isTargetCancelToken2 = null;
  17008. this.targetTextLoading2 = false
  17009. this.ttargetTextLoading2 = false
  17010. if(this.isTargetCancelSource2){
  17011. this.isTargetCancelSource2.close()
  17012. this.isTargetCancelSource2 = null
  17013. }
  17014. }
  17015. if(this.isTargetCancelToken1 && type == 'target1'){
  17016. this.$message.success("已经成功停止生成目标")
  17017. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  17018. this.isTargetCancelToken1 = null;
  17019. this.targetTextLoading = false
  17020. this.ttargetTextLoading = false
  17021. if(this.isTargetCancelSource1){
  17022. this.isTargetCancelSource1.close()
  17023. this.isTargetCancelSource1 = null
  17024. }
  17025. }
  17026. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  17027. this.$message.success("已经成功停止提取摘要")
  17028. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  17029. this.isTeacherTextCancelToken = null;
  17030. this.teacherTextLoading = false
  17031. this.tteacherTextLoading = false
  17032. if(this.isTeacherTextCancelSource){
  17033. this.isTeacherTextCancelSource.close()
  17034. this.isTeacherTextCancelSource = null
  17035. }
  17036. }
  17037. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  17038. this.$message.success("已经成功停止生成教案")
  17039. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  17040. this.isTeacherTaskCancelToken = null;
  17041. this.loading = false
  17042. }
  17043. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  17044. this.$message.success("已经成功停止生成大纲")
  17045. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  17046. this.isOutlineTaskCancelToken[index] = null;
  17047. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  17048. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  17049. if(this.isOutlineTaskCancelSource[index]){
  17050. this.isOutlineTaskCancelSource[index].close()
  17051. this.isOutlineTaskCancelSource[index] = null
  17052. }
  17053. }
  17054. },
  17055. async aiGetTask2(messages, callback) {
  17056. let _this = this
  17057. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17058. if (_this.infoData.length) {
  17059. for (var i = 0; i < _this.infoData.length; i++) {
  17060. if(_this.infoData[i].fileid){
  17061. fileid.push(_this.infoData[i].fileid)
  17062. }else {
  17063. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17064. if(_fileid){
  17065. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17066. _this.$forceUpdate();
  17067. if(_fileid != 1){
  17068. fileid.push(_fileid)
  17069. }
  17070. }
  17071. }
  17072. }
  17073. }
  17074. console.log('fileid=========',fileid)
  17075. // let params = JSON.stringify({
  17076. // // "model": "Chat",
  17077. // model: 'gpt-3.5-turbo',
  17078. // temperature: 0.1,
  17079. // max_tokens: 4096,
  17080. // top_p: 1,
  17081. // frequency_penalty: 0,
  17082. // presence_penalty: 0,
  17083. // messages: [{
  17084. // content: messages,
  17085. // role: 'user'
  17086. // }],
  17087. // stream: false,
  17088. // uid: this.userid,
  17089. // mind_map_question: "",
  17090. // })
  17091. // // let params = JSON.stringify({
  17092. // // message: {
  17093. // // anthropic_version: "bedrock-2023-05-31",
  17094. // // max_tokens: 4096,
  17095. // // temperature: 0.1,
  17096. // // top_p: 1,
  17097. // // messages: [{
  17098. // // content: messages,
  17099. // // role: 'user'
  17100. // // }], //
  17101. // // },
  17102. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17103. // // });
  17104. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17105. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17106. // console.log(response);
  17107. // let data = response.data.FunctionResponse
  17108. // if (data.choices && data.choices.length && data.choices[0].message) {
  17109. // console.log(data.choices[0].message.content);
  17110. // let dArray = JSON.parse(data.choices[0].message.content)
  17111. // _this.dArray = dArray
  17112. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17113. // for (var i = 0; i < dArray.length; i++) {
  17114. // let _task = dArray[i]
  17115. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17116. // task: _task.task,
  17117. // taskDetail: "",
  17118. // taskDetail2: _task.detail,
  17119. // taskDetail3: "",
  17120. // chapterData: [],
  17121. // toolText: "",
  17122. // toolChoose: [
  17123. // {
  17124. // tool: [],
  17125. // toolDetail: "",
  17126. // toolType: 0,
  17127. // askCount: 1,
  17128. // askTitle: "",
  17129. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17130. // },
  17131. // ],
  17132. // isShowTools: false,
  17133. // askCount: 1,
  17134. // isFold: 0,
  17135. // askTitle: "",
  17136. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17137. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17138. // homeworkList: [],
  17139. // })
  17140. // }
  17141. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17142. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17143. // _this.$forceUpdate();
  17144. // }
  17145. // // if (data.result) {
  17146. // // console.log(data.result);
  17147. // // let dArray = JSON.parse(data.result)
  17148. // // _this.dArray = dArray
  17149. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17150. // // for (var i = 0; i < dArray.length; i++) {
  17151. // // let _task = dArray[i]
  17152. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17153. // // task: _task.task,
  17154. // // taskDetail: "",
  17155. // // taskDetail2: _task.detail,
  17156. // // taskDetail3: "",
  17157. // // chapterData: [],
  17158. // // toolText: "",
  17159. // // toolChoose: [
  17160. // // {
  17161. // // tool: [],
  17162. // // toolDetail: "",
  17163. // // toolType: 0,
  17164. // // askCount: 1,
  17165. // // askTitle: "",
  17166. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17167. // // },
  17168. // // ],
  17169. // // isShowTools: false,
  17170. // // askCount: 1,
  17171. // // isFold: 1,
  17172. // // askTitle: "",
  17173. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17174. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17175. // // homeworkList: [],
  17176. // // })
  17177. // // }
  17178. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17179. // // _this.$forceUpdate();
  17180. // // }
  17181. // callback ? callback() : ''
  17182. // }).catch(function (error) {
  17183. // _this.loading = false
  17184. // console.log(error);
  17185. // });
  17186. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17187. let parm = {
  17188. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17189. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17190. session_name: uuidv4(),
  17191. userId: this.userid,
  17192. file_ids: fileid.length ? [...fileid] : '',
  17193. model: 'gpt-4o-2024-08-06',
  17194. temperature: 0.1,
  17195. }
  17196. this.ajax
  17197. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17198. .then((response) => {
  17199. console.log(response);
  17200. let data = response.data.FunctionResponse
  17201. if (data.message) {
  17202. console.log(data.message);
  17203. let dArray = {}
  17204. try {
  17205. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17206. } catch (error) {
  17207. console.log("error_________________" + error);
  17208. try {
  17209. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17210. let match = data.message.match(regex);
  17211. dArray = JSON.parse(match[0]);
  17212. // var message = data.message;
  17213. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17214. // var jsonEnd = message.indexOf("```", jsonStart);
  17215. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17216. // dArray = JSON.parse(jsonString);
  17217. } catch (error) {
  17218. try {
  17219. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17220. let match = data.message.match(regex);
  17221. // eval("var aaa = " + match[0])
  17222. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17223. } catch (error) {
  17224. console.log("error_________________" + error);
  17225. }
  17226. console.log("error_________________" + error);
  17227. }
  17228. }
  17229. _this.dArray = dArray
  17230. if(_this.panOutline() > 0){
  17231. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17232. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17233. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17234. }
  17235. for (var i = 0; i < dArray.length; i++) {
  17236. let _task = dArray[i]
  17237. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17238. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17239. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17240. }else {
  17241. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17242. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17243. taskDetail: "",
  17244. taskDetail2: "",
  17245. taskDetail3: "",
  17246. chapterData: [],
  17247. toolText: "",
  17248. toolChoose: [
  17249. {
  17250. tool: [],
  17251. toolDetail: "",
  17252. toolType: 0,
  17253. askCount: 1,
  17254. askTitle: "",
  17255. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17256. },
  17257. ],
  17258. isShowTools: false,
  17259. askCount: 1,
  17260. isFold: 0,
  17261. askTitle: "",
  17262. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17263. checkJson: [{ checkCount: [], checkPerent: [] }],
  17264. homeworkList: [],
  17265. })
  17266. }
  17267. }
  17268. }else {
  17269. _this.unitJson[0].chapterInfo[0].taskJson = []
  17270. for (var i = 0; i < dArray.length; i++) {
  17271. let _task = dArray[i]
  17272. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17273. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17274. taskDetail: "",
  17275. taskDetail2: "",
  17276. taskDetail3: "",
  17277. chapterData: [],
  17278. toolText: "",
  17279. toolChoose: [
  17280. {
  17281. tool: [],
  17282. toolDetail: "",
  17283. toolType: 0,
  17284. askCount: 1,
  17285. askTitle: "",
  17286. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17287. },
  17288. ],
  17289. isShowTools: false,
  17290. askCount: 1,
  17291. isFold: 0,
  17292. askTitle: "",
  17293. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17294. checkJson: [{ checkCount: [], checkPerent: [] }],
  17295. homeworkList: [],
  17296. })
  17297. }
  17298. }
  17299. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17300. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17301. _this.$forceUpdate();
  17302. setTimeout(()=>{
  17303. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17304. this.aiOutlineDetail('', i)
  17305. }
  17306. }, 0)
  17307. }
  17308. callback ? callback() : ''
  17309. _this.isOutlineCancelToken = null
  17310. })
  17311. .catch((error) => {
  17312. _this.loading = false
  17313. _this.isOutlineCancelToken = null
  17314. console.log(error);
  17315. });
  17316. },
  17317. async aiGetTask3(messages, callback) {
  17318. let _this = this
  17319. // let params = JSON.stringify({
  17320. // // "model": "Chat",
  17321. // model: 'gpt-3.5-turbo',
  17322. // temperature: 0.1,
  17323. // max_tokens: 4096,
  17324. // top_p: 1,
  17325. // frequency_penalty: 0,
  17326. // presence_penalty: 0,
  17327. // messages: [{
  17328. // content: messages,
  17329. // role: 'user'
  17330. // }],
  17331. // stream: false,
  17332. // uid: this.userid,
  17333. // mind_map_question: "",
  17334. // })
  17335. // // let params = JSON.stringify({
  17336. // // message: {
  17337. // // anthropic_version: "bedrock-2023-05-31",
  17338. // // max_tokens: 4096,
  17339. // // temperature: 0.1,
  17340. // // top_p: 1,
  17341. // // messages: [{
  17342. // // content: messages,
  17343. // // role: 'user'
  17344. // // }], //
  17345. // // },
  17346. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17347. // // });
  17348. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17349. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17350. // console.log(response);
  17351. // let data = response.data.FunctionResponse
  17352. // if (data.choices && data.choices.length && data.choices[0].message) {
  17353. // console.log(data.choices[0].message.content);
  17354. // let dArray = JSON.parse(data.choices[0].message.content)
  17355. // _this.dArray = dArray
  17356. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17357. // for (var i = 0; i < dArray.length; i++) {
  17358. // let _task = dArray[i]
  17359. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17360. // task: _task.task,
  17361. // taskDetail: "",
  17362. // taskDetail2: _task.detail,
  17363. // taskDetail3: "",
  17364. // chapterData: [],
  17365. // toolText: "",
  17366. // toolChoose: [
  17367. // {
  17368. // tool: [],
  17369. // toolDetail: "",
  17370. // toolType: 0,
  17371. // askCount: 1,
  17372. // askTitle: "",
  17373. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17374. // },
  17375. // ],
  17376. // isShowTools: false,
  17377. // askCount: 1,
  17378. // isFold: 0,
  17379. // askTitle: "",
  17380. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17381. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17382. // homeworkList: [],
  17383. // })
  17384. // }
  17385. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17386. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17387. // _this.$forceUpdate();
  17388. // }
  17389. // // if (data.result) {
  17390. // // console.log(data.result);
  17391. // // let dArray = JSON.parse(data.result)
  17392. // // _this.dArray = dArray
  17393. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17394. // // for (var i = 0; i < dArray.length; i++) {
  17395. // // let _task = dArray[i]
  17396. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17397. // // task: _task.task,
  17398. // // taskDetail: "",
  17399. // // taskDetail2: _task.detail,
  17400. // // taskDetail3: "",
  17401. // // chapterData: [],
  17402. // // toolText: "",
  17403. // // toolChoose: [
  17404. // // {
  17405. // // tool: [],
  17406. // // toolDetail: "",
  17407. // // toolType: 0,
  17408. // // askCount: 1,
  17409. // // askTitle: "",
  17410. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17411. // // },
  17412. // // ],
  17413. // // isShowTools: false,
  17414. // // askCount: 1,
  17415. // // isFold: 1,
  17416. // // askTitle: "",
  17417. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17418. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17419. // // homeworkList: [],
  17420. // // })
  17421. // // }
  17422. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17423. // // _this.$forceUpdate();
  17424. // // }
  17425. // callback ? callback() : ''
  17426. // }).catch(function (error) {
  17427. // _this.loading = false
  17428. // console.log(error);
  17429. // });
  17430. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  17431. let parm = {
  17432. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17433. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17434. session_name: uuidv4(),
  17435. userId: this.userid,
  17436. file_ids: '',
  17437. model: 'gpt-4o-2024-08-06',
  17438. temperature: 0.1,
  17439. }
  17440. this.ajax
  17441. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  17442. .then((response) => {
  17443. console.log(response);
  17444. let data = response.data.FunctionResponse
  17445. if (data.message) {
  17446. console.log(data.message);
  17447. let dArray = {}
  17448. try {
  17449. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17450. } catch (error) {
  17451. console.log("error_________________" + error);
  17452. try {
  17453. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17454. let match = data.message.match(regex);
  17455. dArray = JSON.parse(match[0]);
  17456. // var message = data.message;
  17457. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17458. // var jsonEnd = message.indexOf("```", jsonStart);
  17459. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17460. // dArray = JSON.parse(jsonString);
  17461. } catch (error) {
  17462. try {
  17463. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17464. let match = data.message.match(regex);
  17465. // eval("var aaa = " + match[0])
  17466. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17467. } catch (error) {
  17468. console.log("error_________________" + error);
  17469. }
  17470. console.log("error_________________" + error);
  17471. }
  17472. }
  17473. _this.dArray = dArray
  17474. if(_this.panOutline() > 0){
  17475. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17476. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17477. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17478. }
  17479. for (var i = 0; i < dArray.length; i++) {
  17480. let _task = dArray[i]
  17481. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17482. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17483. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17484. }else {
  17485. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17486. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17487. taskDetail: "",
  17488. taskDetail2: "",
  17489. taskDetail3: "",
  17490. chapterData: [],
  17491. toolText: "",
  17492. toolChoose: [
  17493. {
  17494. tool: [],
  17495. toolDetail: "",
  17496. toolType: 0,
  17497. askCount: 1,
  17498. askTitle: "",
  17499. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17500. },
  17501. ],
  17502. isShowTools: false,
  17503. askCount: 1,
  17504. isFold: 0,
  17505. askTitle: "",
  17506. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17507. checkJson: [{ checkCount: [], checkPerent: [] }],
  17508. homeworkList: [],
  17509. })
  17510. }
  17511. }
  17512. }else {
  17513. _this.unitJson[0].chapterInfo[0].taskJson = []
  17514. for (var i = 0; i < dArray.length; i++) {
  17515. let _task = dArray[i]
  17516. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17517. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17518. taskDetail: "",
  17519. taskDetail2: "",
  17520. taskDetail3: "",
  17521. chapterData: [],
  17522. toolText: "",
  17523. toolChoose: [
  17524. {
  17525. tool: [],
  17526. toolDetail: "",
  17527. toolType: 0,
  17528. askCount: 1,
  17529. askTitle: "",
  17530. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17531. },
  17532. ],
  17533. isShowTools: false,
  17534. askCount: 1,
  17535. isFold: 0,
  17536. askTitle: "",
  17537. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17538. checkJson: [{ checkCount: [], checkPerent: [] }],
  17539. homeworkList: [],
  17540. })
  17541. }
  17542. }
  17543. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17544. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17545. _this.$forceUpdate();
  17546. setTimeout(()=>{
  17547. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17548. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  17549. }
  17550. }, 0)
  17551. }
  17552. callback ? callback() : ''
  17553. _this.isTeacherTaskCancelToken = null
  17554. })
  17555. .catch((error) => {
  17556. _this.loading = false
  17557. _this.isTeacherTaskCancelToken = null
  17558. console.log(error);
  17559. });
  17560. },
  17561. async aiGet3(messages, callback) {
  17562. let _this = this
  17563. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17564. if (_this.infoData.length) {
  17565. for (var i = 0; i < _this.infoData.length; i++) {
  17566. if(_this.infoData[i].fileid){
  17567. fileid.push(_this.infoData[i].fileid)
  17568. }else {
  17569. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17570. if(_fileid){
  17571. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17572. _this.$forceUpdate();
  17573. if(_fileid != 1){
  17574. fileid.push(_fileid)
  17575. }
  17576. }
  17577. }
  17578. }
  17579. }
  17580. // let params = JSON.stringify({
  17581. // // "model": "Chat",
  17582. // model: 'gpt-3.5-turbo',
  17583. // temperature: 0.1,
  17584. // max_tokens: 4096,
  17585. // top_p: 1,
  17586. // frequency_penalty: 0,
  17587. // presence_penalty: 0,
  17588. // messages: [{
  17589. // content: messages,
  17590. // role: 'user'
  17591. // }],
  17592. // stream: false,
  17593. // uid: this.userid,
  17594. // mind_map_question: "",
  17595. // })
  17596. // // let params = JSON.stringify({
  17597. // // message: {
  17598. // // anthropic_version: "bedrock-2023-05-31",
  17599. // // max_tokens: 4096,
  17600. // // temperature: 0.1,
  17601. // // top_p: 1,
  17602. // // messages: [{
  17603. // // content: messages,
  17604. // // role: 'user'
  17605. // // }], //
  17606. // // },
  17607. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17608. // // });
  17609. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17610. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17611. // console.log(response);
  17612. // let data = response.data.FunctionResponse
  17613. // if (data.choices && data.choices.length && data.choices[0].message) {
  17614. // console.log(data.choices[0].message.content);
  17615. // let tArray = JSON.parse(data.choices[0].message.content)
  17616. // // _this.unitJson[0].chapterInfo[0].task = []
  17617. // let toolsJson = {
  17618. // "电子白板": { tool: 1, type: 1 },
  17619. // "文档": { tool: 52, type: 1 },
  17620. // "思维导图": { tool: 3, type: 1 },
  17621. // "表格": { tool: 48, type: 1 },
  17622. // "作业提交": { tool: 16, type: 2 }
  17623. // }
  17624. // for (var i = 0; i < tArray.length; i++) {
  17625. // let _task = tArray[i]
  17626. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17627. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17628. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17629. // if (_task.toolChoose.length) {
  17630. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17631. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17632. // {
  17633. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17634. // toolDetail: _task.toolChoose[j].detail,
  17635. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17636. // askCount: 1,
  17637. // askTitle: "",
  17638. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17639. // },
  17640. // )
  17641. // }
  17642. // } else {
  17643. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17644. // {
  17645. // tool: [],
  17646. // toolDetail: "",
  17647. // toolType: 0,
  17648. // askCount: 1,
  17649. // askTitle: "",
  17650. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17651. // },
  17652. // )
  17653. // }
  17654. // }
  17655. // // if (_this.infoData.length) {
  17656. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17657. // // }
  17658. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17659. // _this.$forceUpdate();
  17660. // }
  17661. // // if (data.result) {
  17662. // // console.log(data.result);
  17663. // // let tArray = JSON.parse(data.result)
  17664. // // // _this.unitJson[0].chapterInfo[0].task = []
  17665. // // let toolsJson = {
  17666. // // "电子白板": { tool: 1, type: 1 },
  17667. // // "文档": { tool: 52, type: 1 },
  17668. // // "思维导图": { tool: 3, type: 1 },
  17669. // // "表格": { tool: 48, type: 1 },
  17670. // // "作业提交": { tool: 16, type: 2 }
  17671. // // }
  17672. // // for (var i = 0; i < tArray.length; i++) {
  17673. // // let _task = tArray[i]
  17674. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17675. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17676. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17677. // // if (_task.toolChoose.length) {
  17678. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  17679. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17680. // // {
  17681. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17682. // // toolDetail: _task.toolChoose[j].detail,
  17683. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17684. // // askCount: 1,
  17685. // // askTitle: "",
  17686. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17687. // // },
  17688. // // )
  17689. // // }
  17690. // // } else {
  17691. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17692. // // {
  17693. // // tool: [],
  17694. // // toolDetail: "",
  17695. // // toolType: 0,
  17696. // // askCount: 1,
  17697. // // askTitle: "",
  17698. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17699. // // },
  17700. // // )
  17701. // // }
  17702. // // }
  17703. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17704. // // _this.$forceUpdate();
  17705. // // }
  17706. // callback ? callback() : ''
  17707. // }).catch(function (error) {
  17708. // _this.loading = false
  17709. // console.log(error);
  17710. // });
  17711. let parm = {
  17712. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17713. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17714. session_name: uuidv4(),
  17715. userId: this.userid,
  17716. file_ids: fileid.length ? [...fileid] : '',
  17717. model: 'gpt-4o-2024-08-06',
  17718. temperature: 0.1,
  17719. }
  17720. this.ajax
  17721. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17722. .then(async (response) => {
  17723. console.log(response);
  17724. let data = response.data.FunctionResponse
  17725. if (data.message) {
  17726. console.log(data.message);
  17727. let tArray = {}
  17728. try {
  17729. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17730. } catch (error) {
  17731. console.log("error_________________" + error);
  17732. try {
  17733. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17734. let match = data.message.match(regex);
  17735. tArray = JSON.parse(match[0]);
  17736. // var message = data.message;
  17737. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17738. // var jsonEnd = message.indexOf("```", jsonStart);
  17739. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17740. // tArray = JSON.parse(jsonString);
  17741. } catch (error) {
  17742. try {
  17743. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17744. let match = data.message.match(regex);
  17745. // eval("var aaa = " + match[0])
  17746. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17747. } catch (error) {
  17748. console.log("error_________________" + error);
  17749. }
  17750. console.log("error_________________" + error);
  17751. }
  17752. }
  17753. let toolsJson = {
  17754. "电子白板": { tool: 1, type: 1 },
  17755. "文档": { tool: 52, type: 1 },
  17756. "思维导图": { tool: 3, type: 1 },
  17757. "表格": { tool: 48, type: 1 },
  17758. "作业提交": { tool: 16, type: 2 },
  17759. "问答": { tool: 15, type: 2 },
  17760. "选择题": { tool: 45, type: 2 },
  17761. }
  17762. // answerQ:"sssssssssssssss"
  17763. for (var i = 0; i < tArray.length; i++) {
  17764. let _task = tArray[i]
  17765. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17766. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17767. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17768. if (_task.toolChoose.length) {
  17769. for (var j = 0; j < _task.toolChoose.length; j++) {
  17770. let _json = {
  17771. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  17772. toolDetail: _task.toolChoose[j].detail,
  17773. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  17774. askCount: 1,
  17775. askTitle: "",
  17776. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17777. }
  17778. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  17779. let answerQ = await _this.aiCreateQuestion(15, i)
  17780. _json.answerQ = answerQ.answerQ
  17781. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  17782. let testJson = await _this.aiCreateQuestion(45, i)
  17783. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  17784. }
  17785. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  17786. }
  17787. } else {
  17788. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17789. {
  17790. tool: [],
  17791. toolDetail: "",
  17792. toolType: 0,
  17793. askCount: 1,
  17794. askTitle: "",
  17795. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17796. },
  17797. )
  17798. }
  17799. }
  17800. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17801. _this.$forceUpdate();
  17802. _this.createTeacherAn();
  17803. }
  17804. callback ? callback() : ''
  17805. })
  17806. .catch((error) => {
  17807. _this.loading = false
  17808. console.log(error);
  17809. });
  17810. },
  17811. async aiGet32(messages, index) {
  17812. let _this = this
  17813. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17814. if (_this.infoData.length) {
  17815. for (var i = 0; i < _this.infoData.length; i++) {
  17816. if(_this.infoData[i].fileid){
  17817. fileid.push(_this.infoData[i].fileid)
  17818. }else {
  17819. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17820. if(_fileid){
  17821. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17822. _this.$forceUpdate();
  17823. if(_fileid != 1){
  17824. fileid.push(_fileid)
  17825. }
  17826. }
  17827. }
  17828. }
  17829. }
  17830. // let params = JSON.stringify({
  17831. // // "model": "Chat",
  17832. // model: 'gpt-3.5-turbo',
  17833. // temperature: 0.1,
  17834. // max_tokens: 4096,
  17835. // top_p: 1,
  17836. // frequency_penalty: 0,
  17837. // presence_penalty: 0,
  17838. // messages: [{
  17839. // content: messages,
  17840. // role: 'user'
  17841. // }],
  17842. // stream: false,
  17843. // uid: this.userid,
  17844. // mind_map_question: "",
  17845. // })
  17846. // // let params = JSON.stringify({
  17847. // // message: {
  17848. // // anthropic_version: "bedrock-2023-05-31",
  17849. // // max_tokens: 4096,
  17850. // // temperature: 0.1,
  17851. // // top_p: 1,
  17852. // // messages: [{
  17853. // // content: messages,
  17854. // // role: 'user'
  17855. // // }], //
  17856. // // },
  17857. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17858. // // });
  17859. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17860. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17861. // console.log(response);
  17862. // let data = response.data.FunctionResponse
  17863. // if (data.choices && data.choices.length && data.choices[0].message) {
  17864. // console.log(data.choices[0].message.content);
  17865. // let tArray = JSON.parse(data.choices[0].message.content)
  17866. // // _this.unitJson[0].chapterInfo[0].task = []
  17867. // let toolsJson = {
  17868. // "电子白板": { tool: 1, type: 1 },
  17869. // "文档": { tool: 52, type: 1 },
  17870. // "思维导图": { tool: 3, type: 1 },
  17871. // "表格": { tool: 48, type: 1 },
  17872. // "作业提交": { tool: 16, type: 2 }
  17873. // }
  17874. // for (var i = 0; i < tArray.length; i++) {
  17875. // let _task = tArray[i]
  17876. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17877. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17878. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17879. // if (_task.toolChoose.length) {
  17880. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17881. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17882. // {
  17883. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17884. // toolDetail: _task.toolChoose[j].detail,
  17885. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17886. // askCount: 1,
  17887. // askTitle: "",
  17888. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17889. // },
  17890. // )
  17891. // }
  17892. // } else {
  17893. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17894. // {
  17895. // tool: [],
  17896. // toolDetail: "",
  17897. // toolType: 0,
  17898. // askCount: 1,
  17899. // askTitle: "",
  17900. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17901. // },
  17902. // )
  17903. // }
  17904. // }
  17905. // // if (_this.infoData.length) {
  17906. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17907. // // }
  17908. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17909. // _this.$forceUpdate();
  17910. // }
  17911. // // if (data.result) {
  17912. // // console.log(data.result);
  17913. // // let tArray = JSON.parse(data.result)
  17914. // // // _this.unitJson[0].chapterInfo[0].task = []
  17915. // // let toolsJson = {
  17916. // // "电子白板": { tool: 1, type: 1 },
  17917. // // "文档": { tool: 52, type: 1 },
  17918. // // "思维导图": { tool: 3, type: 1 },
  17919. // // "表格": { tool: 48, type: 1 },
  17920. // // "作业提交": { tool: 16, type: 2 }
  17921. // // }
  17922. // // for (var i = 0; i < tArray.length; i++) {
  17923. // // let _task = tArray[i]
  17924. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17925. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17926. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17927. // // if (_task.toolChoose.length) {
  17928. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  17929. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17930. // // {
  17931. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17932. // // toolDetail: _task.toolChoose[j].detail,
  17933. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17934. // // askCount: 1,
  17935. // // askTitle: "",
  17936. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17937. // // },
  17938. // // )
  17939. // // }
  17940. // // } else {
  17941. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17942. // // {
  17943. // // tool: [],
  17944. // // toolDetail: "",
  17945. // // toolType: 0,
  17946. // // askCount: 1,
  17947. // // askTitle: "",
  17948. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17949. // // },
  17950. // // )
  17951. // // }
  17952. // // }
  17953. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17954. // // _this.$forceUpdate();
  17955. // // }
  17956. // callback ? callback() : ''
  17957. // }).catch(function (error) {
  17958. // _this.loading = false
  17959. // console.log(error);
  17960. // });
  17961. let parm = {
  17962. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17963. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17964. session_name: uuidv4(),
  17965. userId: this.userid,
  17966. file_ids: fileid.length ? [...fileid] : '',
  17967. model: 'gpt-4o-2024-08-06',
  17968. temperature: 0.1,
  17969. }
  17970. this.ajax
  17971. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17972. .then(async (response) => {
  17973. console.log(response);
  17974. let data = response.data.FunctionResponse
  17975. if (data.message) {
  17976. console.log(data.message);
  17977. let tArray = {}
  17978. try {
  17979. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17980. } catch (error) {
  17981. console.log("error_________________" + error);
  17982. try {
  17983. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17984. let match = data.message.match(regex);
  17985. tArray = JSON.parse(match[0]);
  17986. // var message = data.message;
  17987. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17988. // var jsonEnd = message.indexOf("```", jsonStart);
  17989. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17990. // tArray = JSON.parse(jsonString);
  17991. } catch (error) {
  17992. try {
  17993. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17994. let match = data.message.match(regex);
  17995. // eval("var aaa = " + match[0])
  17996. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17997. } catch (error) {
  17998. console.log("error_________________" + error);
  17999. }
  18000. console.log("error_________________" + error);
  18001. }
  18002. }
  18003. let toolsJson = {
  18004. "电子白板": { tool: 1, type: 1 },
  18005. "文档": { tool: 52, type: 1 },
  18006. "思维导图": { tool: 3, type: 1 },
  18007. "表格": { tool: 48, type: 1 },
  18008. "作业提交": { tool: 16, type: 2 },
  18009. "问答": { tool: 15, type: 2 },
  18010. "选择题": { tool: 45, type: 2 },
  18011. }
  18012. // answerQ:"sssssssssssssss"
  18013. // for (var i = 0; i < tArray.length; i++) {
  18014. let _task = tArray
  18015. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  18016. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18017. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18018. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  18019. console.log("error_________________JSON不对重新生成");
  18020. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18021. _this.aiGet32(messages, index)
  18022. return;
  18023. }
  18024. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18025. if (_task.toolChoose && _task.toolChoose.length) {
  18026. for (var j = 0; j < _task.toolChoose.length; j++) {
  18027. let _json = {
  18028. tool: [],
  18029. toolDetail: _task.toolChoose[j].detail,
  18030. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18031. askCount: 1,
  18032. askTitle: "",
  18033. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18034. }
  18035. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18036. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18037. let answerQ = await _this.aiCreateQuestion(15, index)
  18038. // _json.answerQ = answerQ.answerQ
  18039. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18040. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18041. let testJson = await _this.aiCreateQuestion(45, index)
  18042. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18043. _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}
  18044. }
  18045. _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]
  18046. _this.$forceUpdate();
  18047. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18048. }
  18049. } else {
  18050. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18051. {
  18052. tool: [],
  18053. toolDetail: "",
  18054. toolType: 0,
  18055. askCount: 1,
  18056. askTitle: "",
  18057. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18058. },
  18059. )
  18060. }
  18061. // }
  18062. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18063. _this.$forceUpdate();
  18064. _this.createTeacherAn(index);
  18065. }
  18066. // callback ? callback() : ''
  18067. _this.taskLoading[index] = false
  18068. })
  18069. .catch((error) => {
  18070. // _this.loading = false
  18071. _this.taskLoading[index] = false
  18072. console.log(error);
  18073. });
  18074. },
  18075. async aiGetG321(messages, index) {
  18076. let _this = this
  18077. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18078. if (_this.infoData.length) {
  18079. for (var i = 0; i < _this.infoData.length; i++) {
  18080. if(_this.infoData[i].fileid){
  18081. fileid.push(_this.infoData[i].fileid)
  18082. }else {
  18083. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18084. if(_fileid){
  18085. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18086. _this.$forceUpdate();
  18087. if(_fileid != 1){
  18088. fileid.push(_fileid)
  18089. }
  18090. }
  18091. }
  18092. }
  18093. }
  18094. let parm = {
  18095. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18096. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18097. session_name: uuidv4(),
  18098. userId: this.userid,
  18099. file_ids: fileid.length ? [...fileid] : '',
  18100. model: 'gpt-4o-2024-08-06',
  18101. temperature: 0.1,
  18102. }
  18103. this.ajax
  18104. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18105. .then(async (response) => {
  18106. console.log(response);
  18107. let data = response.data.FunctionResponse
  18108. if (data.message) {
  18109. let tArray = {}
  18110. try {
  18111. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18112. } catch (error) {
  18113. console.log("error_________________" + error);
  18114. try {
  18115. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18116. let match = data.message.match(regex);
  18117. tArray = JSON.parse(match[0]);
  18118. } catch (error) {
  18119. try {
  18120. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18121. let match = data.message.match(regex);
  18122. // eval("var aaa = " + match[0])
  18123. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18124. } catch (error) {
  18125. console.log("error_________________" + error);
  18126. }
  18127. console.log("error_________________" + error);
  18128. }
  18129. }
  18130. console.log(data.message);
  18131. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  18132. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18133. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18134. _this.$forceUpdate();
  18135. _this.createTeacherAn(index);
  18136. }
  18137. // callback ? callback() : ''
  18138. _this.taskGLoading[index][0] = false
  18139. })
  18140. .catch((error) => {
  18141. // _this.loading = false
  18142. _this.taskGLoading[index][0] = false
  18143. console.log(error);
  18144. });
  18145. },
  18146. async aiGetG322(messages, index) {
  18147. let _this = this
  18148. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18149. if (_this.infoData.length) {
  18150. for (var i = 0; i < _this.infoData.length; i++) {
  18151. if(_this.infoData[i].fileid){
  18152. fileid.push(_this.infoData[i].fileid)
  18153. }else {
  18154. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18155. if(_fileid){
  18156. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18157. _this.$forceUpdate();
  18158. if(_fileid != 1){
  18159. fileid.push(_fileid)
  18160. }
  18161. }
  18162. }
  18163. }
  18164. }
  18165. let parm = {
  18166. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18167. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18168. session_name: uuidv4(),
  18169. userId: this.userid,
  18170. file_ids: fileid.length ? [...fileid] : '',
  18171. model: 'gpt-4o-2024-08-06',
  18172. temperature: 0.1,
  18173. }
  18174. this.ajax
  18175. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18176. .then(async (response) => {
  18177. console.log(response);
  18178. let data = response.data.FunctionResponse
  18179. if (data.message) {
  18180. console.log(data.message);
  18181. let tArray = {}
  18182. try {
  18183. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18184. } catch (error) {
  18185. console.log("error_________________" + error);
  18186. try {
  18187. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18188. let match = data.message.match(regex);
  18189. tArray = JSON.parse(match[0]);
  18190. } catch (error) {
  18191. try {
  18192. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18193. let match = data.message.match(regex);
  18194. // eval("var aaa = " + match[0])
  18195. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18196. } catch (error) {
  18197. console.log("error_________________" + error);
  18198. }
  18199. console.log("error_________________" + error);
  18200. }
  18201. }
  18202. let toolsJson = {
  18203. "电子白板": { tool: 1, type: 1 },
  18204. "文档": { tool: 52, type: 1 },
  18205. "思维导图": { tool: 3, type: 1 },
  18206. "表格": { tool: 48, type: 1 },
  18207. "作业提交": { tool: 16, type: 2 },
  18208. "问答": { tool: 15, type: 2 },
  18209. "选择题": { tool: 45, type: 2 },
  18210. }
  18211. let _task = tArray
  18212. if(!_task.toolChoose){
  18213. console.log("error_________________JSON不对重新生成");
  18214. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18215. _this.aiGet322(messages, index)
  18216. return;
  18217. }
  18218. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18219. if (_task.toolChoose && _task.toolChoose.length) {
  18220. for (var j = 0; j < _task.toolChoose.length; j++) {
  18221. let _json = {
  18222. tool: [],
  18223. toolDetail: _task.toolChoose[j].detail,
  18224. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18225. askCount: 1,
  18226. askTitle: "",
  18227. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18228. }
  18229. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18230. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18231. let answerQ = await _this.aiCreateQuestion(15, index)
  18232. // _json.answerQ = answerQ.answerQ
  18233. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18234. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18235. let testJson = await _this.aiCreateQuestion(45, index)
  18236. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18237. _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}
  18238. }
  18239. _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]
  18240. _this.$forceUpdate();
  18241. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18242. }
  18243. } else {
  18244. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18245. {
  18246. tool: [],
  18247. toolDetail: "",
  18248. toolType: 0,
  18249. askCount: 1,
  18250. askTitle: "",
  18251. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18252. },
  18253. )
  18254. }
  18255. // }
  18256. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18257. _this.$forceUpdate();
  18258. }
  18259. // callback ? callback() : ''
  18260. _this.taskGLoading[index][1] = false
  18261. })
  18262. .catch((error) => {
  18263. // _this.loading = false
  18264. _this.taskGLoading[index][1] = false
  18265. console.log(error);
  18266. });
  18267. },
  18268. async aiGetG323(messages, index) {
  18269. let _this = this
  18270. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18271. if (_this.infoData.length) {
  18272. for (var i = 0; i < _this.infoData.length; i++) {
  18273. if(_this.infoData[i].fileid){
  18274. fileid.push(_this.infoData[i].fileid)
  18275. }else {
  18276. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18277. if(_fileid){
  18278. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18279. _this.$forceUpdate();
  18280. if(_fileid != 1){
  18281. fileid.push(_fileid)
  18282. }
  18283. }
  18284. }
  18285. }
  18286. }
  18287. let parm = {
  18288. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18289. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18290. session_name: uuidv4(),
  18291. userId: this.userid,
  18292. file_ids: fileid.length ? [...fileid] : '',
  18293. model: 'gpt-4o-2024-08-06',
  18294. temperature: 0.1,
  18295. }
  18296. this.ajax
  18297. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18298. .then(async (response) => {
  18299. console.log(response);
  18300. let data = response.data.FunctionResponse
  18301. if (data.message) {
  18302. console.log(data.message);
  18303. let tArray = {}
  18304. try {
  18305. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18306. } catch (error) {
  18307. console.log("error_________________" + error);
  18308. try {
  18309. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18310. let match = data.message.match(regex);
  18311. tArray = JSON.parse(match[0]);
  18312. } catch (error) {
  18313. try {
  18314. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18315. let match = data.message.match(regex);
  18316. // eval("var aaa = " + match[0])
  18317. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18318. } catch (error) {
  18319. console.log("error_________________" + error);
  18320. }
  18321. console.log("error_________________" + error);
  18322. }
  18323. }
  18324. let _task = tArray
  18325. if(!_task.elist){
  18326. console.log("error_________________JSON不对重新生成");
  18327. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18328. _this.aiGet322(messages, index)
  18329. return;
  18330. }
  18331. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18332. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18333. _this.$forceUpdate();
  18334. }
  18335. // callback ? callback() : ''
  18336. _this.taskGLoading[index][2] = false
  18337. })
  18338. .catch((error) => {
  18339. // _this.loading = false
  18340. _this.taskGLoading[index][2] = false
  18341. console.log(error);
  18342. });
  18343. },
  18344. async aiCreateQuestion(type, task) {
  18345. let _this = this
  18346. return new Promise((resolve, reject) => {
  18347. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18348. if (_this.infoData.length) {
  18349. for (var i = 0; i < _this.infoData.length; i++) {
  18350. if(_this.infoData[i].fileid){
  18351. fileid.push(_this.infoData[i].fileid)
  18352. }
  18353. }
  18354. }
  18355. let sub = []
  18356. let mclass = []
  18357. if (this.courseTypeId.length) {
  18358. for (var i = 0; i < this.courseTypeId.length; i++) {
  18359. let _sid = this.courseTypeId[i]
  18360. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18361. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18362. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18363. }
  18364. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18365. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18366. }
  18367. }
  18368. }
  18369. }
  18370. let messages = ""
  18371. if(type == 15){
  18372. messages = `NOTICE
  18373. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18374. 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.
  18375. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18376. Instruction: Based on the context, follow "Format example", write content.
  18377. # Context
  18378. ## 任务
  18379. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18380. ## 限制
  18381. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18382. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18383. ## 课程简介
  18384. 课程名字:${_this.courseName}
  18385. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18386. ${sub.length ? '学科:' + sub.join(",") : ''}
  18387. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18388. ## 教案
  18389. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18390. # Format example
  18391. {answerQ:"问题"}
  18392. `
  18393. }else if(type == 45){
  18394. messages = `NOTICE
  18395. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18396. 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.
  18397. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18398. Instruction: Based on the context, follow "Format example", write content.
  18399. # Context
  18400. ## 任务
  18401. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18402. ## 限制
  18403. - 生成题目禁止重复。
  18404. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18405. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18406. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18407. ## 课程简介
  18408. 课程名字:${_this.courseName}
  18409. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18410. ${sub.length ? '学科:' + sub.join(",") : ''}
  18411. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18412. ## 教案
  18413. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18414. # Format example
  18415. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18416. `
  18417. }
  18418. let parm = {
  18419. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18420. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18421. session_name: uuidv4(),
  18422. userId: this.userid,
  18423. file_ids: fileid.length ? [...fileid] : '',
  18424. model: 'gpt-4o-2024-08-06',
  18425. temperature: 0.1,
  18426. }
  18427. this.ajax
  18428. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18429. .then((response) => {
  18430. console.log(response);
  18431. let data = response.data.FunctionResponse
  18432. if (data.message) {
  18433. console.log(data.message);
  18434. try {
  18435. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18436. let tArray = {}
  18437. try {
  18438. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18439. } catch (error) {
  18440. console.log("error_________________" + error);
  18441. try {
  18442. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18443. let match = data.message.match(regex);
  18444. tArray = JSON.parse(match[0]);
  18445. // var message = data.message;
  18446. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18447. // var jsonEnd = message.indexOf("```", jsonStart);
  18448. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18449. // tArray = JSON.parse(jsonString);
  18450. } catch (error) {
  18451. try {
  18452. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18453. let match = data.message.match(regex);
  18454. // eval("var aaa = " + match[0])
  18455. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18456. } catch (error) {
  18457. console.log("error_________________" + error);
  18458. }
  18459. console.log("error_________________" + error);
  18460. }
  18461. }
  18462. resolve(tArray)
  18463. } catch (error) {
  18464. if(type == 15){
  18465. resolve({answerQ: "题目"})
  18466. }else if(type == 45){
  18467. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18468. }
  18469. }
  18470. }else if(type == 15){
  18471. resolve({answerQ: "题目"})
  18472. }else if(type == 45){
  18473. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18474. }
  18475. })
  18476. .catch((error) => {
  18477. if(type == 15){
  18478. resolve({answerQ: "题目"})
  18479. }else if(type == 45){
  18480. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18481. }
  18482. console.log(error);
  18483. });
  18484. });
  18485. },
  18486. async aiChoice(type){
  18487. if(type == 45){
  18488. this.choiceLoading = true
  18489. }
  18490. let _this = this
  18491. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18492. if (_this.infoData.length) {
  18493. for (var i = 0; i < _this.infoData.length; i++) {
  18494. if(_this.infoData[i].fileid){
  18495. fileid.push(_this.infoData[i].fileid)
  18496. }
  18497. }
  18498. }
  18499. if (_this.xuanzeInfoData.length) {
  18500. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  18501. if(_this.xuanzeInfoData[i].fileid){
  18502. fileid.push(_this.xuanzeInfoData[i].fileid)
  18503. }
  18504. }
  18505. }
  18506. let sub = []
  18507. let mclass = []
  18508. if (this.courseTypeId.length) {
  18509. for (var i = 0; i < this.courseTypeId.length; i++) {
  18510. let _sid = this.courseTypeId[i]
  18511. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18512. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18513. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18514. }
  18515. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18516. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18517. }
  18518. }
  18519. }
  18520. }
  18521. let messages = ""
  18522. if(type == 15){
  18523. messages = `NOTICE
  18524. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18525. 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.
  18526. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18527. Instruction: Based on the context, follow "Format example", write content.
  18528. # Context
  18529. ## 任务
  18530. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18531. ## 限制
  18532. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18533. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18534. ## 课程简介
  18535. 课程名字:${_this.courseName}
  18536. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18537. ${sub.length ? '学科:' + sub.join(",") : ''}
  18538. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18539. ## 教案
  18540. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18541. # Format example
  18542. {answerQ:"问题"}
  18543. `
  18544. }else if(type == 45){
  18545. messages = `NOTICE
  18546. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18547. 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.
  18548. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18549. Instruction: Based on the context, follow "Format example", write content.
  18550. # Context
  18551. ## 任务
  18552. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18553. ## 限制
  18554. - 生成题目禁止重复。
  18555. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18556. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18557. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18558. ## 课程简介
  18559. 课程名字:${_this.courseName}
  18560. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18561. ${sub.length ? '学科:' + sub.join(",") : ''}
  18562. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18563. ## 教案
  18564. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18565. # Format example
  18566. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18567. `
  18568. }
  18569. let parm = {
  18570. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18571. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18572. session_name: uuidv4(),
  18573. userId: this.userid,
  18574. file_ids: fileid.length ? [...fileid] : '',
  18575. model: 'gpt-4o-2024-08-06',
  18576. temperature: 0.1,
  18577. }
  18578. this.ajax
  18579. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18580. .then((response) => {
  18581. console.log(response);
  18582. let data = response.data.FunctionResponse
  18583. if (data.message) {
  18584. console.log(data.message);
  18585. try {
  18586. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18587. let tArray = {}
  18588. try {
  18589. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18590. } catch (error) {
  18591. console.log("error_________________" + error);
  18592. try {
  18593. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18594. let match = data.message.match(regex);
  18595. tArray = JSON.parse(match[0]);
  18596. // var message = data.message;
  18597. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18598. // var jsonEnd = message.indexOf("```", jsonStart);
  18599. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18600. // tArray = JSON.parse(jsonString);
  18601. } catch (error) {
  18602. try {
  18603. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18604. let match = data.message.match(regex);
  18605. // eval("var aaa = " + match[0])
  18606. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18607. } catch (error) {
  18608. console.log("error_________________" + error);
  18609. }
  18610. console.log("error_________________" + error);
  18611. }
  18612. }
  18613. if(type == 45){
  18614. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  18615. }
  18616. } catch (error) {
  18617. if(type == 15){
  18618. {answerQ: "题目"}
  18619. }else if(type == 45){
  18620. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18621. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18622. }
  18623. _this.choiceLoading = false
  18624. }
  18625. }else if(type == 15){
  18626. {answerQ: "题目"}
  18627. }else if(type == 45){
  18628. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18629. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18630. }
  18631. _this.choiceLoading = false
  18632. }).catch((error) => {
  18633. if(type == 15){
  18634. {answerQ: "题目"}
  18635. }else if(type == 45){
  18636. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18637. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18638. }
  18639. console.log(error);
  18640. _this.choiceLoading = false
  18641. });
  18642. },
  18643. async aiGet4(messages, callback, clickType) {
  18644. let _this = this
  18645. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18646. if (_this.infoData.length) {
  18647. for (var i = 0; i < _this.infoData.length; i++) {
  18648. if(_this.infoData[i].fileid){
  18649. fileid.push(_this.infoData[i].fileid)
  18650. }else {
  18651. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18652. if(_fileid){
  18653. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18654. _this.$forceUpdate();
  18655. if(_fileid != 1){
  18656. fileid.push(_fileid)
  18657. }
  18658. }
  18659. }
  18660. }
  18661. }
  18662. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  18663. if(_this.cankaoInfoData[i].fileid){
  18664. fileid.push(_this.cankaoInfoData[i].fileid)
  18665. }else {
  18666. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  18667. if(_fileid){
  18668. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  18669. _this.$forceUpdate();
  18670. if(_fileid != 1){
  18671. fileid.push(_fileid)
  18672. }
  18673. }
  18674. }
  18675. }
  18676. // let params = JSON.stringify({
  18677. // // "model": "Chat",
  18678. // model: 'gpt-3.5-turbo',
  18679. // temperature: 0.1,
  18680. // max_tokens: 4096,
  18681. // top_p: 1,
  18682. // frequency_penalty: 0,
  18683. // presence_penalty: 0,
  18684. // messages: [{
  18685. // content: messages,
  18686. // role: 'user'
  18687. // }],
  18688. // stream: false,
  18689. // uid: this.userid,
  18690. // mind_map_question: "",
  18691. // })
  18692. // // let params = JSON.stringify({
  18693. // // message: {
  18694. // // anthropic_version: "bedrock-2023-05-31",
  18695. // // max_tokens: 4096,
  18696. // // temperature: 0.1,
  18697. // // top_p: 1,
  18698. // // messages: [{
  18699. // // content: messages,
  18700. // // role: 'user'
  18701. // // }], //
  18702. // // },
  18703. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18704. // // });
  18705. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18706. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18707. // console.log(response);
  18708. // let data = response.data.FunctionResponse
  18709. // if (data.choices && data.choices.length && data.choices[0].message) {
  18710. // console.log(data.choices[0].message.content);
  18711. // let dArray = JSON.parse(data.choices[0].message.content)
  18712. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  18713. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  18714. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18715. // for (var i = 0; i < dArray.length; i++) {
  18716. // let _task = dArray[i]
  18717. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18718. // task: _task.task,
  18719. // taskDetail: "",
  18720. // taskDetail2: "",
  18721. // taskDetail3: _task.detail,
  18722. // chapterData: [],
  18723. // toolText: "",
  18724. // toolChoose: [
  18725. // {
  18726. // tool: [],
  18727. // toolDetail: "",
  18728. // toolType: 0,
  18729. // askCount: 1,
  18730. // askTitle: "",
  18731. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18732. // },
  18733. // ],
  18734. // isShowTools: false,
  18735. // askCount: 1,
  18736. // isFold: 0,
  18737. // askTitle: "",
  18738. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18739. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18740. // homeworkList: [],
  18741. // })
  18742. // }
  18743. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18744. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18745. // _this.$forceUpdate();
  18746. // } else {
  18747. // for (var i = 0; i < dArray.length; i++) {
  18748. // let _task = dArray[i]
  18749. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18750. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18751. // }else {
  18752. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  18753. // task: _task.task,
  18754. // taskDetail: "",
  18755. // taskDetail2: "",
  18756. // taskDetail3: _task.detail,
  18757. // chapterData: [],
  18758. // toolText: "",
  18759. // toolChoose: [
  18760. // {
  18761. // tool: [],
  18762. // toolDetail: "",
  18763. // toolType: 0,
  18764. // askCount: 1,
  18765. // askTitle: "",
  18766. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18767. // },
  18768. // ],
  18769. // isShowTools: false,
  18770. // askCount: 1,
  18771. // isFold: 0,
  18772. // askTitle: "",
  18773. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18774. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18775. // homeworkList: [],
  18776. // }
  18777. // }
  18778. // }
  18779. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18780. // _this.$forceUpdate();
  18781. // }
  18782. // }
  18783. // // if (data.result) {
  18784. // // console.log(data.result);
  18785. // // let dArray = JSON.parse(data.result)
  18786. // // _this.teacherText = JSON.parse(data.result)
  18787. // // for (var i = 0; i < dArray.length; i++) {
  18788. // // let _task = dArray[i]
  18789. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18790. // // }
  18791. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18792. // // _this.$forceUpdate();
  18793. // // }
  18794. // callback ? callback() : ''
  18795. // _this.loading = false
  18796. // }).catch(function (error) {
  18797. // _this.loading = false
  18798. // console.log(error);
  18799. // });
  18800. let parm = {
  18801. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18802. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18803. session_name: uuidv4(),
  18804. userId: this.userid,
  18805. file_ids: fileid.length ? [...fileid] : '',
  18806. model: 'gpt-4o-2024-08-06',
  18807. temperature: 0.1,
  18808. }
  18809. this.ajax
  18810. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18811. .then((response) => {
  18812. console.log(response);
  18813. let data = response.data.FunctionResponse
  18814. if (data.message) {
  18815. console.log(data.message);
  18816. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18817. let dArray = []
  18818. try {
  18819. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18820. } catch (error) {
  18821. console.log("error_________________" + error);
  18822. try {
  18823. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18824. let match = data.message.match(regex);
  18825. dArray = JSON.parse(match[0]);
  18826. // var message = data.message;
  18827. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18828. // var jsonEnd = message.indexOf("```", jsonStart);
  18829. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18830. // dArray = JSON.parse(jsonString);
  18831. } catch (error) {
  18832. _this.aiGet4(messages, callback)
  18833. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18834. console.log("error_________________" + error);
  18835. return;
  18836. console.log("error_________________" + error);
  18837. _this.loading = false
  18838. }
  18839. }
  18840. try {
  18841. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  18842. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  18843. if(_this.panTeacher() > 0){
  18844. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18845. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18846. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18847. }
  18848. for (var i = 0; i < dArray.length; i++) {
  18849. let _task = dArray[i]
  18850. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18851. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18852. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18853. }else {
  18854. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18855. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18856. taskDetail: "",
  18857. taskDetail2: "",
  18858. taskDetail3: _task.detail,
  18859. chapterData: [],
  18860. toolText: "",
  18861. toolChoose: [
  18862. {
  18863. tool: [],
  18864. toolDetail: "",
  18865. toolType: 0,
  18866. askCount: 1,
  18867. askTitle: "",
  18868. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18869. },
  18870. ],
  18871. isShowTools: false,
  18872. askCount: 1,
  18873. isFold: 0,
  18874. askTitle: "",
  18875. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18876. checkJson: [{ checkCount: [], checkPerent: [] }],
  18877. homeworkList: [],
  18878. })
  18879. }
  18880. }
  18881. }else {
  18882. _this.unitJson[0].chapterInfo[0].taskJson = []
  18883. for (var i = 0; i < dArray.length; i++) {
  18884. let _task = dArray[i]
  18885. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18886. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18887. taskDetail: "",
  18888. taskDetail2: "",
  18889. taskDetail3: _task.detail,
  18890. chapterData: [],
  18891. toolText: "",
  18892. toolChoose: [
  18893. {
  18894. tool: [],
  18895. toolDetail: "",
  18896. toolType: 0,
  18897. askCount: 1,
  18898. askTitle: "",
  18899. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18900. },
  18901. ],
  18902. isShowTools: false,
  18903. askCount: 1,
  18904. isFold: 0,
  18905. askTitle: "",
  18906. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18907. checkJson: [{ checkCount: [], checkPerent: [] }],
  18908. homeworkList: [],
  18909. })
  18910. }
  18911. }
  18912. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18913. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18914. _this.$forceUpdate();
  18915. } else {
  18916. for (var i = 0; i < dArray.length; i++) {
  18917. let _task = dArray[i]
  18918. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18919. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18920. }else {
  18921. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  18922. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18923. taskDetail: "",
  18924. taskDetail2: "",
  18925. taskDetail3: _task.detail,
  18926. chapterData: [],
  18927. toolText: "",
  18928. toolChoose: [
  18929. {
  18930. tool: [],
  18931. toolDetail: "",
  18932. toolType: 0,
  18933. askCount: 1,
  18934. askTitle: "",
  18935. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18936. },
  18937. ],
  18938. isShowTools: false,
  18939. askCount: 1,
  18940. isFold: 0,
  18941. askTitle: "",
  18942. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18943. checkJson: [{ checkCount: [], checkPerent: [] }],
  18944. homeworkList: [],
  18945. }
  18946. }
  18947. }
  18948. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18949. _this.$forceUpdate();
  18950. }
  18951. } catch (error) {
  18952. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18953. _this.aiGet4(messages, callback)
  18954. console.log("error_________________" + error);
  18955. return;
  18956. // _this.loading = false
  18957. }
  18958. }
  18959. callback ? callback() : ''
  18960. })
  18961. .catch((error) => {
  18962. _this.loading = false
  18963. console.log(error);
  18964. });
  18965. },
  18966. async aiDetail(msg, index) {
  18967. let _this = this
  18968. const _tindex = 'task-' + index
  18969. const _tindex2 = index
  18970. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18971. if (_this.infoData.length) {
  18972. for (var i = 0; i < _this.infoData.length; i++) {
  18973. if(_this.infoData[i].fileid){
  18974. fileid.push(_this.infoData[i].fileid)
  18975. }else {
  18976. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18977. if(_fileid){
  18978. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18979. _this.$forceUpdate();
  18980. if(_fileid != 1){
  18981. fileid.push(_fileid)
  18982. }
  18983. }
  18984. }
  18985. }
  18986. }
  18987. let url = []
  18988. if (this.infoData.length) {
  18989. for (var i = 0; i < this.infoData.length; i++) {
  18990. url.push(this.infoData[i].url)
  18991. }
  18992. }
  18993. let messages = `NOTICE
  18994. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  18995. 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.
  18996. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18997. Instruction: Based on the context, follow "Format example", write content.
  18998. #Context
  18999. ## 要求
  19000. ${msg}
  19001. ## 参考信息
  19002. 任务名称:${_this.aiCallBack.task}
  19003. ## 优化内容
  19004. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  19005. // -------- #补充参考资料和
  19006. // ## 补充参考资料
  19007. // - 补充资料:${url.join(",")}
  19008. // - 补充描述:${_this.courseText2}
  19009. _this.taskDetailLoading.push(_tindex)
  19010. _this.ttaskDetailLoading.push(_tindex)
  19011. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19012. let _uuid = uuidv4();
  19013. // let params = JSON.stringify({
  19014. // // "model": "Chat",
  19015. // model: 'gpt-3.5-turbo',
  19016. // temperature: 0.1,
  19017. // max_tokens: 4096,
  19018. // top_p: 1,
  19019. // frequency_penalty: 0,
  19020. // presence_penalty: 0,
  19021. // messages: [{
  19022. // content: messages,
  19023. // role: 'user'
  19024. // }],
  19025. // uid: _uuid,
  19026. // mind_map_question: "",
  19027. // })
  19028. let params = {
  19029. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19030. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19031. session_name: _uuid,
  19032. userId: _this.userid,
  19033. uid: _uuid,
  19034. file_ids: fileid.length ? [...fileid] : '',
  19035. model: 'gpt-4o-2024-08-06',
  19036. temperature: 0.1,
  19037. }
  19038. // let params = JSON.stringify({
  19039. // message: {
  19040. // anthropic_version: "bedrock-2023-05-31",
  19041. // max_tokens: 4096,
  19042. // temperature: 0.1,
  19043. // top_p: 1,
  19044. // messages: [{
  19045. // "role": "user",
  19046. // "content": messages
  19047. // }] ,
  19048. // },
  19049. // uid: _uuid,
  19050. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19051. // });
  19052. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19053. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19054. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19055. console.log(response);
  19056. // let data = response.data.FunctionResponse
  19057. // if (data.choices && data.choices.length && data.choices[0].message) {
  19058. // console.log(data.choices[0].message.content);
  19059. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19060. // _this.$forceUpdate()
  19061. // }
  19062. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19063. } else {
  19064. _this.$message.warning(response.data.FunctionResponse.result);
  19065. }
  19066. _this.isOutlineTaskCancelToken[index] = null
  19067. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19068. }).catch(function (error) {
  19069. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19070. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19071. _this.isOutlineTaskCancelToken[index] = null
  19072. console.log(error);
  19073. });
  19074. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  19075. },
  19076. aiDetailgetAiContent(_uid, loading, _tindex2) {
  19077. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19078. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19079. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19080. let _allText = "";
  19081. let _mdText = "";
  19082. let _iindex = 0
  19083. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19084. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19085. //对话已经完成
  19086. _mdText = _mdText.replace("_", "");
  19087. this.isOutlineTaskCancelSource[_tindex2].close();
  19088. this.isOutlineTaskCancelSource[_tindex2] = null;
  19089. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19090. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19091. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19092. this.isOutlineTaskCancelToken[_tindex2] = null
  19093. return;
  19094. } else {
  19095. _iindex++
  19096. //对话还在继续
  19097. let _text = "";
  19098. _text = _eData.replaceAll("'", "");
  19099. if (_allText == "") {
  19100. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19101. } else {
  19102. _allText += _text;
  19103. }
  19104. _mdText = _allText + "_";
  19105. _mdText = _mdText.replace(/\\n/g, "\n");
  19106. _mdText = _mdText.replace(/\\/g, "");
  19107. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19108. //转化返回的回复流数据.
  19109. if(_iindex == 10){
  19110. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19111. _iindex = 0
  19112. }
  19113. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19114. // 处理流数据
  19115. }
  19116. // this.$forceUpdate();
  19117. };
  19118. },
  19119. async aiOutlineDetail(msg, index) {
  19120. let _this = this
  19121. const _tindex = 'task-' + index
  19122. const _tindex2 = index
  19123. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19124. if (_this.infoData.length) {
  19125. for (var i = 0; i < _this.infoData.length; i++) {
  19126. if(_this.infoData[i].fileid){
  19127. fileid.push(_this.infoData[i].fileid)
  19128. }else {
  19129. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19130. if(_fileid){
  19131. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19132. _this.$forceUpdate();
  19133. if(_fileid != 1){
  19134. fileid.push(_fileid)
  19135. }
  19136. }
  19137. }
  19138. }
  19139. }
  19140. let url = []
  19141. if (this.infoData.length) {
  19142. for (var i = 0; i < this.infoData.length; i++) {
  19143. url.push(this.infoData[i].url)
  19144. }
  19145. }
  19146. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19147. let messages = `NOTICE
  19148. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19149. 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.
  19150. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19151. Instruction: Based on the context, follow "Format example", write content.
  19152. #Context
  19153. ## 要求
  19154. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  19155. ## 参考信息
  19156. 课程名字:${_this.courseName}
  19157. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19158. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19159. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19160. # Format example
  19161. 教学目标:教学目标。
  19162. 任务设计:任务设计。
  19163. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19164. `
  19165. // -------- #补充参考资料和
  19166. // ## 补充参考资料
  19167. // - 补充资料:${url.join(",")}
  19168. // - 补充描述:${_this.courseText2}
  19169. _this.taskDetailLoading.push(_tindex)
  19170. _this.ttaskDetailLoading.push(_tindex)
  19171. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19172. let _uuid = uuidv4();
  19173. // let params = JSON.stringify({
  19174. // // "model": "Chat",
  19175. // model: 'gpt-3.5-turbo',
  19176. // temperature: 0.1,
  19177. // max_tokens: 4096,
  19178. // top_p: 1,
  19179. // frequency_penalty: 0,
  19180. // presence_penalty: 0,
  19181. // messages: [{
  19182. // content: messages,
  19183. // role: 'user'
  19184. // }],
  19185. // uid: _uuid,
  19186. // mind_map_question: "",
  19187. // })
  19188. let params = {
  19189. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19190. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19191. session_name: _uuid,
  19192. userId: _this.userid,
  19193. uid: _uuid,
  19194. file_ids: fileid.length ? [...fileid] : '',
  19195. model: 'gpt-4o-2024-08-06',
  19196. temperature: 0.1,
  19197. }
  19198. // let params = JSON.stringify({
  19199. // message: {
  19200. // anthropic_version: "bedrock-2023-05-31",
  19201. // max_tokens: 4096,
  19202. // temperature: 0.1,
  19203. // top_p: 1,
  19204. // messages: [{
  19205. // "role": "user",
  19206. // "content": messages
  19207. // }] ,
  19208. // },
  19209. // uid: _uuid,
  19210. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19211. // });
  19212. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19213. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19214. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19215. console.log(response);
  19216. // let data = response.data.FunctionResponse
  19217. // if (data.choices && data.choices.length && data.choices[0].message) {
  19218. // console.log(data.choices[0].message.content);
  19219. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19220. // _this.$forceUpdate()
  19221. // }
  19222. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19223. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19224. } else {
  19225. _this.$message.warning(response.data.FunctionResponse.result);
  19226. }
  19227. _this.isOutlineTaskCancelToken[index] = null
  19228. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19229. }).catch(function (error) {
  19230. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19231. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19232. _this.isOutlineTaskCancelToken[index] = null
  19233. console.log(error);
  19234. });
  19235. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19236. },
  19237. async aiOutlineDetail2(msg, index) {
  19238. let _this = this
  19239. const _tindex = 'task-' + index
  19240. const _tindex2 = index
  19241. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19242. if (_this.infoData.length) {
  19243. for (var i = 0; i < _this.infoData.length; i++) {
  19244. if(_this.infoData[i].fileid){
  19245. fileid.push(_this.infoData[i].fileid)
  19246. }else {
  19247. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19248. if(_fileid){
  19249. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19250. _this.$forceUpdate();
  19251. if(_fileid != 1){
  19252. fileid.push(_fileid)
  19253. }
  19254. }
  19255. }
  19256. }
  19257. }
  19258. let url = []
  19259. if (this.infoData.length) {
  19260. for (var i = 0; i < this.infoData.length; i++) {
  19261. url.push(this.infoData[i].url)
  19262. }
  19263. }
  19264. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19265. let taskArray = []
  19266. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  19267. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  19268. if(k != index){
  19269. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  19270. }
  19271. }
  19272. let messages = `NOTICE
  19273. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19274. 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.
  19275. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19276. Instruction: Based on the context, follow "Format example", write content.
  19277. #Context
  19278. ## 要求
  19279. ${msg}
  19280. ## 参考信息
  19281. 课程名字:${_this.courseName}
  19282. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19283. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19284. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19285. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  19286. # Format example
  19287. 教学目标:教学目标。
  19288. 任务设计:任务设计。
  19289. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19290. `
  19291. // -------- #补充参考资料和
  19292. // ## 补充参考资料
  19293. // - 补充资料:${url.join(",")}
  19294. // - 补充描述:${_this.courseText2}
  19295. _this.taskDetailLoading.push(_tindex)
  19296. _this.ttaskDetailLoading.push(_tindex)
  19297. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19298. let _uuid = uuidv4();
  19299. // let params = JSON.stringify({
  19300. // // "model": "Chat",
  19301. // model: 'gpt-3.5-turbo',
  19302. // temperature: 0.1,
  19303. // max_tokens: 4096,
  19304. // top_p: 1,
  19305. // frequency_penalty: 0,
  19306. // presence_penalty: 0,
  19307. // messages: [{
  19308. // content: messages,
  19309. // role: 'user'
  19310. // }],
  19311. // uid: _uuid,
  19312. // mind_map_question: "",
  19313. // })
  19314. let params = {
  19315. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19316. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19317. session_name: _uuid,
  19318. userId: _this.userid,
  19319. uid: _uuid,
  19320. file_ids: fileid.length ? [...fileid] : '',
  19321. model: 'gpt-4o-2024-08-06',
  19322. temperature: 0.1,
  19323. }
  19324. // let params = JSON.stringify({
  19325. // message: {
  19326. // anthropic_version: "bedrock-2023-05-31",
  19327. // max_tokens: 4096,
  19328. // temperature: 0.1,
  19329. // top_p: 1,
  19330. // messages: [{
  19331. // "role": "user",
  19332. // "content": messages
  19333. // }] ,
  19334. // },
  19335. // uid: _uuid,
  19336. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19337. // });
  19338. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19339. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  19340. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19341. console.log(response);
  19342. // let data = response.data.FunctionResponse
  19343. // if (data.choices && data.choices.length && data.choices[0].message) {
  19344. // console.log(data.choices[0].message.content);
  19345. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19346. // _this.$forceUpdate()
  19347. // }
  19348. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19349. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19350. } else {
  19351. _this.$message.warning(response.data.FunctionResponse.result);
  19352. }
  19353. _this.isOutlineTaskCancelToken[index] = null
  19354. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19355. }).catch(function (error) {
  19356. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19357. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19358. _this.isOutlineTaskCancelToken[index] = null
  19359. console.log(error);
  19360. });
  19361. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19362. },
  19363. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  19364. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19365. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19366. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19367. let _allText = "";
  19368. let _mdText = "";
  19369. let _iindex = 0
  19370. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19371. let _eData = JSON.parse(_e.data).content;
  19372. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19373. //对话已经完成
  19374. _mdText = _mdText.replace("_", "");
  19375. this.isOutlineTaskCancelSource[_tindex2].close();
  19376. this.isOutlineTaskCancelSource[_tindex2] = null;
  19377. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19378. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  19379. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  19380. }
  19381. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19382. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19383. this.isOutlineTaskCancelToken[_tindex2] = null
  19384. return;
  19385. } else {
  19386. _iindex++
  19387. //对话还在继续
  19388. let _text = "";
  19389. _text = _eData.replaceAll("'", "");
  19390. if (_allText == "") {
  19391. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19392. } else {
  19393. _allText += _text;
  19394. }
  19395. _mdText = _allText + "_";
  19396. _mdText = _mdText.replace(/\\n/g, "\n");
  19397. _mdText = _mdText.replace(/\\/g, "");
  19398. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19399. //转化返回的回复流数据.
  19400. if(_iindex == 10){
  19401. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19402. _iindex = 0
  19403. }
  19404. if(this.taskDetailLoading.indexOf(loading) !== -1){
  19405. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19406. }
  19407. // 处理流数据
  19408. }
  19409. // this.$forceUpdate();
  19410. };
  19411. },
  19412. async aiDetail2(msg, index) {
  19413. let _this = this
  19414. const _tindex = 'task-' + index
  19415. const _tindex2 = index
  19416. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19417. if (_this.infoData.length) {
  19418. for (var i = 0; i < _this.infoData.length; i++) {
  19419. if(_this.infoData[i].fileid){
  19420. fileid.push(_this.infoData[i].fileid)
  19421. }else {
  19422. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19423. if(_fileid){
  19424. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19425. _this.$forceUpdate();
  19426. if(_fileid != 1){
  19427. fileid.push(_fileid)
  19428. }
  19429. }
  19430. }
  19431. }
  19432. }
  19433. let messages = `NOTICE
  19434. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  19435. 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.
  19436. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19437. Instruction: Based on the context, follow "Format example", write content.
  19438. #Context
  19439. ## 要求
  19440. ${msg}
  19441. ## 参考资料
  19442. 任务名字: ${_this.aiCallBack.task}
  19443. ## 优化信息
  19444. ${_this.aiCallBack.taskDetail}
  19445. # Format example
  19446. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  19447. _this.taskDetailLoading2.push(_tindex)
  19448. _this.ttaskDetailLoading2.push(_tindex)
  19449. let _uuid = uuidv4();
  19450. // let params = JSON.stringify({
  19451. // // "model": "Chat",
  19452. // model: 'gpt-3.5-turbo',
  19453. // temperature: 0.1,
  19454. // max_tokens: 4096,
  19455. // top_p: 1,
  19456. // frequency_penalty: 0,
  19457. // presence_penalty: 0,
  19458. // messages: [{
  19459. // content: messages,
  19460. // role: 'user'
  19461. // }],
  19462. // uid: _uuid,
  19463. // mind_map_question: "",
  19464. // })
  19465. let params = {
  19466. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19467. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  19468. session_name: _uuid,
  19469. userId: _this.userid,
  19470. uid: _uuid,
  19471. file_ids: fileid.length ? [...fileid] : '',
  19472. model: 'gpt-4o-2024-08-06',
  19473. temperature: 0.1,
  19474. }
  19475. // let params = JSON.stringify({
  19476. // message: {
  19477. // anthropic_version: "bedrock-2023-05-31",
  19478. // max_tokens: 4096,
  19479. // temperature: 0.1,
  19480. // top_p: 1,
  19481. // messages: [{
  19482. // "role": "user",
  19483. // "content": messages
  19484. // }] ,
  19485. // },
  19486. // uid: _uuid,
  19487. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19488. // });
  19489. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19490. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19491. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19492. console.log(response);
  19493. // let data = response.data.FunctionResponse
  19494. // if (data.choices && data.choices.length && data.choices[0].message) {
  19495. // console.log(data.choices[0].message.content);
  19496. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19497. // _this.$forceUpdate()
  19498. // }
  19499. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19500. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19501. } else {
  19502. _this.$message.warning(response.data.FunctionResponse.result);
  19503. }
  19504. }).catch(function (error) {
  19505. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  19506. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  19507. console.log(error);
  19508. });
  19509. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  19510. },
  19511. aiDetail2getAiContent(_uid, loading, _tindex2) {
  19512. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19513. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19514. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19515. let _allText = "";
  19516. let _mdText = "";
  19517. let _iindex = 0
  19518. _source.onmessage = _e => {
  19519. let _eData = JSON.parse(_e.data).content;
  19520. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19521. //对话已经完成
  19522. _mdText = _mdText.replace("_", "");
  19523. _source.close();
  19524. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19525. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19526. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19527. return;
  19528. } else {
  19529. _iindex++
  19530. //对话还在继续
  19531. let _text = "";
  19532. _text = _eData.replaceAll("'", "");
  19533. if (_allText == "") {
  19534. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19535. } else {
  19536. _allText += _text;
  19537. }
  19538. _mdText = _allText + "_";
  19539. _mdText = _mdText.replace(/\\n/g, "\n");
  19540. _mdText = _mdText.replace(/\\/g, "");
  19541. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19542. //转化返回的回复流数据
  19543. if(_iindex == 10){
  19544. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19545. _iindex = 0
  19546. }
  19547. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19548. // 处理流数据
  19549. }
  19550. // this.$forceUpdate();
  19551. };
  19552. },
  19553. async aiDetail3(msg, index, tindex) {
  19554. let _this = this
  19555. const _tindex = 'task-' + index + tindex
  19556. const _tindex2 = index
  19557. const _tindex3 = tindex
  19558. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19559. if (_this.infoData.length) {
  19560. for (var i = 0; i < _this.infoData.length; i++) {
  19561. if(_this.infoData[i].fileid){
  19562. fileid.push(_this.infoData[i].fileid)
  19563. }else {
  19564. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19565. if(_fileid){
  19566. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19567. _this.$forceUpdate();
  19568. if(_fileid != 1){
  19569. fileid.push(_fileid)
  19570. }
  19571. }
  19572. }
  19573. }
  19574. }
  19575. // **重点考虑该任务及工具名和工具内容的情况下*
  19576. let messages = `NOTICE
  19577. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  19578. 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.
  19579. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19580. Instruction: Based on the context, follow "Format example", write content.
  19581. #Context
  19582. ## 参考内容
  19583. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19584. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19585. 工具名称:${_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 : '无'}
  19586. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  19587. ## 要求
  19588. ${msg} 输出格式和内容要求参考#格式与要求
  19589. # Format example
  19590. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  19591. _this.taskDetailLoading3.push(_tindex)
  19592. _this.ttaskDetailLoading3.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', " ").replaceAll('*', "")}],
  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].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  19641. // _this.$forceUpdate()
  19642. // }
  19643. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.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.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  19650. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  19651. console.log(error);
  19652. });
  19653. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  19654. },
  19655. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  19656. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19657. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19658. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19659. let _allText = "";
  19660. let _mdText = "";
  19661. let _iindex = 0
  19662. _source.onmessage = _e => {
  19663. let _eData = JSON.parse(_e.data).content;
  19664. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19665. //对话已经完成
  19666. _mdText = _mdText.replace("_", "");
  19667. _source.close();
  19668. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19669. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19670. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  19671. return;
  19672. } else {
  19673. _iindex++
  19674. //对话还在继续
  19675. let _text = "";
  19676. _text = _eData.replaceAll("'", "");
  19677. if (_allText == "") {
  19678. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19679. } else {
  19680. _allText += _text;
  19681. }
  19682. _mdText = _allText + "_";
  19683. _mdText = _mdText.replace(/\\n/g, "\n");
  19684. _mdText = _mdText.replace(/\\/g, "");
  19685. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19686. //转化返回的回复流数据
  19687. if(_iindex == 10){
  19688. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19689. _iindex = 0
  19690. }
  19691. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19692. // 处理流数据
  19693. }
  19694. // this.$forceUpdate();
  19695. };
  19696. },
  19697. async aiDetail4(msg, index) {
  19698. if (!msg.length) {
  19699. this.$message.error("请添加评价后才能优化")
  19700. return
  19701. }
  19702. let _this = this
  19703. const _tindex = 'task-' + index
  19704. const _tindex2 = index
  19705. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19706. if (_this.infoData.length) {
  19707. for (var i = 0; i < _this.infoData.length; i++) {
  19708. if(_this.infoData[i].fileid){
  19709. fileid.push(_this.infoData[i].fileid)
  19710. }else {
  19711. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19712. if(_fileid){
  19713. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19714. _this.$forceUpdate();
  19715. if(_fileid != 1){
  19716. fileid.push(_fileid)
  19717. }
  19718. }
  19719. }
  19720. }
  19721. }
  19722. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  19723. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  19724. if(_this.pingjiaInfoData[index][i].fileid){
  19725. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  19726. }
  19727. }
  19728. }
  19729. var _text = ""
  19730. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  19731. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  19732. // _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 : ''} `
  19733. _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 : ''} `
  19734. }
  19735. }
  19736. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19737. // **重点考虑该任务详情**
  19738. // let messages = `
  19739. // 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.
  19740. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19741. // #Context
  19742. // ## 参考内容
  19743. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19744. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19745. // 评价设计:${_text}
  19746. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19747. // ## 要求
  19748. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  19749. // # 格式与要求
  19750. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19751. // # Format example
  19752. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  19753. let messages = `
  19754. 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.
  19755. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19756. #Context
  19757. ## 参考内容
  19758. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19759. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19760. ${_text ? '评价设计:'+_text : ''}
  19761. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19762. ## 要求
  19763. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  19764. # 格式与要求
  19765. 核心素养:从教案中提取
  19766. 目标:从教案中提取
  19767. 评价标准:从教案中提取评价标准
  19768. # Format example
  19769. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  19770. _this.taskDetailLoading4.push(_tindex)
  19771. // let params = JSON.stringify({
  19772. // // "model": "Chat",
  19773. // model: 'gpt-3.5-turbo',
  19774. // temperature: 0.1,
  19775. // max_tokens: 4096,
  19776. // top_p: 1,
  19777. // frequency_penalty: 0,
  19778. // presence_penalty: 0,
  19779. // messages: [{
  19780. // content: messages,
  19781. // role: 'user'
  19782. // }],
  19783. // stream: false,
  19784. // uid: this.userid,
  19785. // mind_map_question: "",
  19786. // })
  19787. let params = {
  19788. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19789. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19790. session_name: uuidv4(),
  19791. userId: _this.userid,
  19792. file_ids: fileid.length ? [...fileid] : '',
  19793. model: 'gpt-4o-2024-08-06',
  19794. temperature: 0.1,
  19795. }
  19796. // let params = JSON.stringify({
  19797. // message: {
  19798. // anthropic_version: "bedrock-2023-05-31",
  19799. // max_tokens: 4096,
  19800. // temperature: 0.1,
  19801. // top_p: 1,
  19802. // messages: [{
  19803. // content: messages,
  19804. // role: 'user'
  19805. // }], //
  19806. // },
  19807. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19808. // });
  19809. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19810. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  19811. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19812. console.log(response);
  19813. let data = response.data.FunctionResponse
  19814. // if (data.choices && data.choices.length && data.choices[0].message) {
  19815. // console.log(data.choices[0].message.content);
  19816. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  19817. // _this.$forceUpdate()
  19818. // }
  19819. if (data.message) {
  19820. console.log(data.message);
  19821. try {
  19822. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  19823. } catch (e) {
  19824. console.log("error_________________" + e);
  19825. // _this.$message.error(data.message)
  19826. try {
  19827. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19828. let match = data.message.match(regex);
  19829. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  19830. // var message = data.message;
  19831. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19832. // var jsonEnd = message.indexOf("```", jsonStart);
  19833. // if (jsonStart !== -1 && jsonEnd !== -1) {
  19834. // var jsonString = message
  19835. // .substring(jsonStart, jsonEnd)
  19836. // .trim();
  19837. // var _data2 = JSON.parse(jsonString);
  19838. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  19839. // }
  19840. } catch (error) {
  19841. }
  19842. }
  19843. _this.$forceUpdate()
  19844. }
  19845. // if (data.result) {
  19846. // console.log(data.result);
  19847. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  19848. // _this.$forceUpdate()
  19849. // }
  19850. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19851. }).catch(function (error) {
  19852. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19853. console.log(error);
  19854. });
  19855. },
  19856. async aiDetail5(msg, index) {
  19857. let _this = this
  19858. const _tindex = 'task-' + index
  19859. const _tindex2 = index
  19860. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19861. if (_this.infoData.length) {
  19862. for (var i = 0; i < _this.infoData.length; i++) {
  19863. if(_this.infoData[i].fileid){
  19864. fileid.push(_this.infoData[i].fileid)
  19865. }else {
  19866. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19867. if(_fileid){
  19868. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19869. _this.$forceUpdate();
  19870. if(_fileid != 1){
  19871. fileid.push(_fileid)
  19872. }
  19873. }
  19874. }
  19875. }
  19876. }
  19877. let url = []
  19878. if (this.infoData.length) {
  19879. for (var i = 0; i < this.infoData.length; i++) {
  19880. url.push(this.infoData[i].url)
  19881. }
  19882. }
  19883. var _text = ""
  19884. var _text2 = ""
  19885. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19886. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19887. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19888. }
  19889. let messages = `
  19890. 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.
  19891. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19892. --------
  19893. ## 要求
  19894. ${msg}
  19895. -------
  19896. ## 本教案描述
  19897. ${_this.aiCallBack}
  19898. -------
  19899. ## 课程大纲
  19900. ${_text}
  19901. -------
  19902. ## 其他教学任务教案
  19903. ${_text2}`
  19904. // ## 补充参考资料
  19905. // - 补充资料:${url.join(",")}
  19906. // - 补充描述:${this.courseText2}
  19907. _this.taskDetailLoading5.push(_tindex)
  19908. _this.ttaskDetailLoading5.push(_tindex)
  19909. let _uuid = uuidv4();
  19910. // let params = JSON.stringify({
  19911. // // "model": "Chat",
  19912. // model: 'gpt-3.5-turbo',
  19913. // temperature: 0.1,
  19914. // max_tokens: 4096,
  19915. // top_p: 1,
  19916. // frequency_penalty: 0,
  19917. // presence_penalty: 0,
  19918. // messages: [{
  19919. // content: messages,
  19920. // role: 'user'
  19921. // }],
  19922. // uid: _uuid,
  19923. // mind_map_question: "",
  19924. // })
  19925. let params = {
  19926. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19927. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19928. session_name: _uuid,
  19929. userId: _this.userid,
  19930. uid: _uuid,
  19931. file_ids: fileid.length ? [...fileid] : '',
  19932. model: 'gpt-4o-2024-08-06',
  19933. temperature: 0.1,
  19934. }
  19935. // let params = JSON.stringify({
  19936. // message: {
  19937. // anthropic_version: "bedrock-2023-05-31",
  19938. // max_tokens: 4096,
  19939. // temperature: 0.1,
  19940. // top_p: 1,
  19941. // messages: [{
  19942. // "role": "user",
  19943. // "content": messages
  19944. // }] ,
  19945. // },
  19946. // uid: _uuid,
  19947. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19948. // });
  19949. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19950. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19951. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19952. console.log(response);
  19953. // let data = response.data.FunctionResponse
  19954. // if (data.choices && data.choices.length && data.choices[0].message) {
  19955. // console.log(data.choices[0].message.content);
  19956. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19957. // _this.$forceUpdate()
  19958. // }
  19959. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19960. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19961. } else {
  19962. _this.$message.warning(response.data.FunctionResponse.result);
  19963. }
  19964. }).catch(function (error) {
  19965. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  19966. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  19967. console.log(error);
  19968. });
  19969. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  19970. },
  19971. aiDetail5getAiContent(_uid, loading, _tindex2) {
  19972. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19973. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19974. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19975. let _allText = "";
  19976. let _mdText = "";
  19977. let _iindex = 0
  19978. _source.onmessage = _e => {
  19979. let _eData = JSON.parse(_e.data).content;
  19980. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19981. //对话已经完成
  19982. _mdText = _mdText.replace("_", "");
  19983. _source.close();
  19984. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  19985. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19986. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  19987. return;
  19988. } else {
  19989. _iindex++
  19990. //对话还在继续
  19991. let _text = "";
  19992. _text = _eData.replaceAll("'", "");
  19993. if (_allText == "") {
  19994. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19995. } else {
  19996. _allText += _text;
  19997. }
  19998. _mdText = _allText + "_";
  19999. _mdText = _mdText.replace(/\\n/g, "\n");
  20000. _mdText = _mdText.replace(/\\/g, "");
  20001. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20002. //转化返回的回复流数据
  20003. if(_iindex == 10){
  20004. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20005. _iindex = 0
  20006. }
  20007. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20008. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20009. }
  20010. // 处理流数据
  20011. }
  20012. // this.$forceUpdate();
  20013. };
  20014. },
  20015. async aiDetail52(msg, index) {
  20016. let _this = this
  20017. const _tindex = 'task-' + index
  20018. const _tindex2 = index
  20019. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20020. if (_this.infoData.length) {
  20021. for (var i = 0; i < _this.infoData.length; i++) {
  20022. if(_this.infoData[i].fileid){
  20023. fileid.push(_this.infoData[i].fileid)
  20024. }else {
  20025. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20026. if(_fileid){
  20027. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20028. _this.$forceUpdate();
  20029. if(_fileid != 1){
  20030. fileid.push(_fileid)
  20031. }
  20032. }
  20033. }
  20034. }
  20035. }
  20036. let url = []
  20037. if (this.infoData.length) {
  20038. for (var i = 0; i < this.infoData.length; i++) {
  20039. url.push(this.infoData[i].url)
  20040. }
  20041. }
  20042. let taskN = []
  20043. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  20044. if(_tindex2 != ti){
  20045. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  20046. }
  20047. }
  20048. let messages = `NOTICE
  20049. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20050. 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.
  20051. #Context
  20052. ## 要求
  20053. ${msg}
  20054. ## 补充描述
  20055. 课程简要描述:${_this.courseText}
  20056. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20057. 其他大纲的任务名:${taskN.join(",")}
  20058. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  20059. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20060. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20061. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20062. `
  20063. // ## 补充参考资料
  20064. // - 补充资料:${url.join(",")}
  20065. // - 补充描述:${this.courseText2}
  20066. _this.taskDetailLoading5.push(_tindex)
  20067. _this.ttaskDetailLoading5.push(_tindex)
  20068. let _uuid = uuidv4();
  20069. // let params = JSON.stringify({
  20070. // // "model": "Chat",
  20071. // model: 'gpt-3.5-turbo',
  20072. // temperature: 0.1,
  20073. // max_tokens: 4096,
  20074. // top_p: 1,
  20075. // frequency_penalty: 0,
  20076. // presence_penalty: 0,
  20077. // messages: [{
  20078. // content: messages,
  20079. // role: 'user'
  20080. // }],
  20081. // uid: _uuid,
  20082. // mind_map_question: "",
  20083. // })
  20084. let params = {
  20085. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20086. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20087. session_name: _uuid,
  20088. userId: _this.userid,
  20089. uid: _uuid,
  20090. file_ids: fileid.length ? [...fileid] : '',
  20091. model: 'gpt-4o-2024-08-06',
  20092. temperature: 0.1,
  20093. }
  20094. // let params = JSON.stringify({
  20095. // message: {
  20096. // anthropic_version: "bedrock-2023-05-31",
  20097. // max_tokens: 4096,
  20098. // temperature: 0.1,
  20099. // top_p: 1,
  20100. // messages: [{
  20101. // "role": "user",
  20102. // "content": messages
  20103. // }] ,
  20104. // },
  20105. // uid: _uuid,
  20106. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20107. // });
  20108. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20109. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20110. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20111. console.log(response);
  20112. // let data = response.data.FunctionResponse
  20113. // if (data.choices && data.choices.length && data.choices[0].message) {
  20114. // console.log(data.choices[0].message.content);
  20115. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20116. // _this.$forceUpdate()
  20117. // }
  20118. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20119. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20120. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  20121. } else {
  20122. _this.$message.warning(response.data.FunctionResponse.result);
  20123. }
  20124. }).catch(function (error) {
  20125. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  20126. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  20127. console.log(error);
  20128. });
  20129. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  20130. },
  20131. aiDetail52getAiContent(_uid, loading, _tindex2) {
  20132. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20133. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20134. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20135. let _allText = "";
  20136. let _mdText = "";
  20137. this.allTextArray[_tindex2] = ""
  20138. let _iindex = 0
  20139. _source.onmessage = async (_e) => {
  20140. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  20141. let _eData = JSON.parse(_e.data).content;
  20142. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20143. //对话已经完成
  20144. _mdText = _mdText.replace("_", "");
  20145. _source.close();
  20146. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20147. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20148. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20149. return;
  20150. } else {
  20151. _iindex++
  20152. //对话还在继续
  20153. let _text = "";
  20154. _text = _eData.replaceAll("'", "");
  20155. if (_allText == "") {
  20156. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20157. } else {
  20158. _allText += _text;
  20159. }
  20160. _mdText = _allText + "_";
  20161. _mdText = _mdText.replace(/\\n/g, "\n");
  20162. _mdText = _mdText.replace(/\\/g, "");
  20163. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20164. //转化返回的回复流数据
  20165. if(_iindex == 10){
  20166. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20167. _iindex = 0
  20168. }
  20169. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20170. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20171. }
  20172. // 处理流数据
  20173. }
  20174. };
  20175. },
  20176. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  20177. let _mdText = "";
  20178. let _eData = JSON.parse(_e.data).content;
  20179. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20180. //对话已经完成
  20181. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  20182. _source.close();
  20183. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20184. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20185. return;
  20186. } else {
  20187. //对话还在继续
  20188. let _text = "";
  20189. _text = _eData.replaceAll("'", "");
  20190. if (this.allTextArray[_tindex2] == "") {
  20191. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20192. } else {
  20193. this.allTextArray[_tindex2] += _text;
  20194. }
  20195. _mdText = this.allTextArray[_tindex2] + "_";
  20196. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  20197. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  20198. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  20199. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  20200. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20201. // 处理流数据
  20202. }
  20203. },
  20204. async aiCpote(msg, callback) {
  20205. let _this = this
  20206. let _index = _this.aitype.replace("aiC","c")
  20207. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20208. if (_this.infoData.length) {
  20209. for (var i = 0; i < _this.infoData.length; i++) {
  20210. if(_this.infoData[i].fileid){
  20211. fileid.push(_this.infoData[i].fileid)
  20212. }else {
  20213. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20214. if(_fileid){
  20215. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20216. _this.$forceUpdate();
  20217. if(_fileid != 1){
  20218. fileid.push(_fileid)
  20219. }
  20220. }
  20221. }
  20222. }
  20223. }
  20224. let sub = []
  20225. if (this.courseTypeId.length) {
  20226. for (var i = 0; i < this.courseTypeId.length; i++) {
  20227. let _sid = this.courseTypeId[i]
  20228. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20229. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20230. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20231. }
  20232. }
  20233. }
  20234. }
  20235. let mclass = []
  20236. if (this.courseTypeId.length) {
  20237. for (var i = 0; i < this.courseTypeId.length; i++) {
  20238. let _sid = this.courseTypeId[i]
  20239. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20240. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20241. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20242. }
  20243. }
  20244. }
  20245. }
  20246. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  20247. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  20248. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  20249. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  20250. let messages = `NOTICE
  20251. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20252. 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.
  20253. ${msg}
  20254. ## 课程简介
  20255. 课程名字:${this.courseName}
  20256. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20257. ${sub.length ? '学科:' + sub.join(",") : ''}
  20258. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20259. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20260. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  20261. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  20262. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  20263. _this.cpoteLoading[_index] = true
  20264. _this.cpotetLoading[_index] = true
  20265. let _uuid = uuidv4();
  20266. // let params = JSON.stringify({
  20267. // // "model": "Chat",
  20268. // model: 'gpt-3.5-turbo',
  20269. // temperature: 0.1,
  20270. // max_tokens: 4096,
  20271. // top_p: 1,
  20272. // frequency_penalty: 0,
  20273. // presence_penalty: 0,
  20274. // messages: [{
  20275. // content: messages,
  20276. // role: 'user'
  20277. // }],
  20278. // uid: _uuid,
  20279. // mind_map_question: "",
  20280. // })
  20281. let params = {
  20282. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20283. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20284. session_name: _uuid,
  20285. userId: _this.userid,
  20286. uid: _uuid,
  20287. file_ids: fileid.length ? [...fileid] : '',
  20288. model: 'gpt-4o-2024-08-06',
  20289. temperature: 0.1,
  20290. }
  20291. // let params = JSON.stringify({
  20292. // message: {
  20293. // anthropic_version: "bedrock-2023-05-31",
  20294. // max_tokens: 4096,
  20295. // temperature: 0.1,
  20296. // top_p: 1,
  20297. // messages: [{
  20298. // "role": "user",
  20299. // "content": messages
  20300. // }] ,
  20301. // },
  20302. // uid: _uuid,
  20303. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20304. // });
  20305. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20306. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20307. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20308. console.log(response);
  20309. // let data = response.data.FunctionResponse
  20310. // if (data.choices && data.choices.length && data.choices[0].message) {
  20311. // console.log(data.choices[0].message.content);
  20312. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20313. // _this.$forceUpdate()
  20314. // }
  20315. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20316. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20317. } else {
  20318. _this.$message.warning(response.data.FunctionResponse.result);
  20319. }
  20320. }).catch(function (error) {
  20321. _this.cpoteLoading[_index] = false
  20322. _this.cpotetLoading[_index] = false
  20323. callback ? callback() : ''
  20324. console.log(error);
  20325. });
  20326. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  20327. },
  20328. aiCpotegetAiContent(_uid, loading, callback) {
  20329. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20330. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20331. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20332. let _allText = "";
  20333. let _mdText = "";
  20334. let _iindex = 0
  20335. _source.onmessage = _e => {
  20336. let _eData = JSON.parse(_e.data).content;
  20337. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20338. //对话已经完成
  20339. _mdText = _mdText.replace("_", "");
  20340. _source.close();
  20341. this.cpote[loading] = _mdText;
  20342. this.cpoteLoading[loading] = false
  20343. this.cpotetLoading[loading] = false
  20344. callback ? callback() : ''
  20345. return;
  20346. } else {
  20347. _iindex++
  20348. //对话还在继续
  20349. let _text = "";
  20350. _text = _eData.replaceAll("'", "");
  20351. if (_allText == "") {
  20352. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20353. } else {
  20354. _allText += _text;
  20355. }
  20356. _mdText = _allText + "_";
  20357. _mdText = _mdText.replace(/\\n/g, "\n");
  20358. _mdText = _mdText.replace(/\\/g, "");
  20359. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20360. //转化返回的回复流数据
  20361. if(_iindex == 10){
  20362. this.cpote[loading] = _mdText;
  20363. _iindex = 0
  20364. }
  20365. this.cpoteLoading[loading] = false
  20366. // 处理流数据
  20367. }
  20368. // this.$forceUpdate();
  20369. };
  20370. },
  20371. async aiteacherTextDetail(msg) {
  20372. let _this = this
  20373. let fileid = []
  20374. if (_this.teacherInfoData.length) {
  20375. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  20376. if(_this.teacherInfoData[i].fileid){
  20377. fileid.push(_this.teacherInfoData[i].fileid)
  20378. }else {
  20379. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  20380. if(_fileid){
  20381. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20382. _this.$forceUpdate();
  20383. if(_fileid != 1){
  20384. fileid.push(_fileid)
  20385. }
  20386. }
  20387. }
  20388. }
  20389. }
  20390. _this.teacherTextLoading = true
  20391. _this.tteacherTextLoading = true
  20392. let sub = []
  20393. if (_this.courseTypeId.length) {
  20394. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20395. let _sid = _this.courseTypeId[i]
  20396. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20397. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20398. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20399. }
  20400. }
  20401. }
  20402. }
  20403. let mclass = []
  20404. if (_this.courseTypeId.length) {
  20405. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20406. let _sid = _this.courseTypeId[i]
  20407. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20408. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20409. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20410. }
  20411. }
  20412. }
  20413. }
  20414. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  20415. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  20416. let messages = `NOTICE
  20417. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20418. 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.
  20419. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20420. Instruction: Based on the context, follow "Format example", write content.
  20421. #Context
  20422. ## 参考资料
  20423. 课程名字:${this.courseName}
  20424. ${sub.length ? '学科:' + sub.join(",") : ''}
  20425. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20426. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  20427. ## 要求
  20428. ${msg}
  20429. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20430. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  20431. let _uuid = uuidv4();
  20432. // let params = JSON.stringify({
  20433. // // "model": "Chat",
  20434. // model: 'gpt-3.5-turbo',
  20435. // temperature: 0.1,
  20436. // max_tokens: 4096,
  20437. // top_p: 1,
  20438. // frequency_penalty: 0,
  20439. // presence_penalty: 0,
  20440. // messages: [{
  20441. // content: messages,
  20442. // role: 'user'
  20443. // }],
  20444. // uid: _uuid,
  20445. // mind_map_question: "",
  20446. // })
  20447. let params = {
  20448. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20449. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20450. session_name: _uuid,
  20451. userId: _this.userid,
  20452. uid: _uuid,
  20453. file_ids: fileid.length ? [...fileid] : '',
  20454. model: 'gpt-4o-2024-08-06',
  20455. temperature: 0.1,
  20456. }
  20457. // let params = JSON.stringify({
  20458. // message: {
  20459. // anthropic_version: "bedrock-2023-05-31",
  20460. // max_tokens: 4096,
  20461. // temperature: 0.1,
  20462. // top_p: 1,
  20463. // messages: [{
  20464. // "role": "user",
  20465. // "content": messages
  20466. // }] ,
  20467. // },
  20468. // uid: _uuid,
  20469. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20470. // });
  20471. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20472. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  20473. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20474. console.log(response);
  20475. // let data = response.data.FunctionResponse
  20476. // if (data.choices && data.choices.length && data.choices[0].message) {
  20477. // _this.courseText = data.choices[0].message.content
  20478. // }
  20479. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20480. } else {
  20481. _this.$message.warning(response.data.FunctionResponse.result);
  20482. }
  20483. _this.isTeacherTextCancelToken = null
  20484. }).catch(function (error) {
  20485. _this.teacherTextLoading = false
  20486. _this.tteacherTextLoading = false
  20487. _this.isTeacherTextCancelToken = null
  20488. console.log(error);
  20489. });
  20490. await _this.aiteacherTextDetailgetAiContent(_uuid)
  20491. },
  20492. aiteacherTextDetailgetAiContent(_uid) {
  20493. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20494. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20495. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20496. let _allText = "";
  20497. let _mdText = "";
  20498. let _iindex = 0
  20499. this.isTeacherTextCancelSource.onmessage = _e => {
  20500. let _eData = JSON.parse(_e.data).content;
  20501. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20502. //对话已经完成
  20503. _mdText = _mdText.replace("_", "");
  20504. this.isTeacherTextCancelSource.close();
  20505. this.isTeacherTextCancelSource = null;
  20506. this.teacherCourseText = _mdText;
  20507. this.teacherTextLoading = false
  20508. this.tteacherTextLoading = false
  20509. this.teacherCourseTextB = false
  20510. this.isTeacherTextCancelToken = null
  20511. return;
  20512. } else {
  20513. _iindex++
  20514. //对话还在继续
  20515. let _text = "";
  20516. _text = _eData.replaceAll("'", "");
  20517. if (_allText == "") {
  20518. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20519. } else {
  20520. _allText += _text;
  20521. }
  20522. _mdText = _allText + "_";
  20523. _mdText = _mdText.replace(/\\n/g, "\n");
  20524. _mdText = _mdText.replace(/\\/g, "");
  20525. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20526. //转化返回的回复流数据
  20527. if(_iindex == 10){
  20528. this.teacherCourseText = _mdText;
  20529. _iindex = 0
  20530. }
  20531. if(this.teacherTextLoading){
  20532. this.teacherTextLoading = false
  20533. }
  20534. // 处理流数据
  20535. }
  20536. // this.$forceUpdate();
  20537. };
  20538. },
  20539. async aitargetTextDetail(msg) {
  20540. let _this = this
  20541. let fileid = []
  20542. if (_this.teacherInfoData.length) {
  20543. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  20544. if(_this.teacherInfoData[i].fileid){
  20545. fileid.push(_this.teacherInfoData[i].fileid)
  20546. }else {
  20547. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  20548. if(_fileid){
  20549. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20550. _this.$forceUpdate();
  20551. if(_fileid != 1){
  20552. fileid.push(_fileid)
  20553. }
  20554. }
  20555. }
  20556. }
  20557. }
  20558. _this.targetTextLoading = true
  20559. _this.ttargetTextLoading = true
  20560. let sub = []
  20561. if (_this.courseTypeId.length) {
  20562. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20563. let _sid = _this.courseTypeId[i]
  20564. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20565. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20566. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20567. }
  20568. }
  20569. }
  20570. }
  20571. let mclass = []
  20572. if (_this.courseTypeId.length) {
  20573. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20574. let _sid = _this.courseTypeId[i]
  20575. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20576. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20577. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20578. }
  20579. }
  20580. }
  20581. }
  20582. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  20583. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  20584. let messages = `NOTICE
  20585. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20586. 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.
  20587. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20588. Instruction: Based on the context, follow "Format example", write content.
  20589. #Context
  20590. ## 参考资料
  20591. 课程名字:${this.courseName}
  20592. ${sub.length ? '学科:' + sub.join(",") : ''}
  20593. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20594. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20595. ## 要求
  20596. ${msg}
  20597. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20598. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  20599. let _uuid = uuidv4();
  20600. // let params = JSON.stringify({
  20601. // // "model": "Chat",
  20602. // model: 'gpt-3.5-turbo',
  20603. // temperature: 0.1,
  20604. // max_tokens: 4096,
  20605. // top_p: 1,
  20606. // frequency_penalty: 0,
  20607. // presence_penalty: 0,
  20608. // messages: [{
  20609. // content: messages,
  20610. // role: 'user'
  20611. // }],
  20612. // uid: _uuid,
  20613. // mind_map_question: "",
  20614. // })
  20615. let params = {
  20616. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20617. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20618. session_name: _uuid,
  20619. userId: _this.userid,
  20620. uid: _uuid,
  20621. file_ids: fileid.length ? [...fileid] : '',
  20622. model: 'gpt-4o-2024-08-06',
  20623. temperature: 0.1,
  20624. }
  20625. // let params = JSON.stringify({
  20626. // message: {
  20627. // anthropic_version: "bedrock-2023-05-31",
  20628. // max_tokens: 4096,
  20629. // temperature: 0.1,
  20630. // top_p: 1,
  20631. // messages: [{
  20632. // "role": "user",
  20633. // "content": messages
  20634. // }] ,
  20635. // },
  20636. // uid: _uuid,
  20637. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20638. // });
  20639. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20640. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  20641. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20642. console.log(response);
  20643. // let data = response.data.FunctionResponse
  20644. // if (data.choices && data.choices.length && data.choices[0].message) {
  20645. // _this.courseText = data.choices[0].message.content
  20646. // }
  20647. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20648. } else {
  20649. _this.$message.warning(response.data.FunctionResponse.result);
  20650. }
  20651. _this.isTargetCancelToken1 = null
  20652. }).catch(function (error) {
  20653. _this.targetTextLoading = false
  20654. _this.ttargetTextLoading = false
  20655. _this.isTargetCancelToken1 = null
  20656. console.log(error);
  20657. });
  20658. await _this.aitargetTextDetailgetAiContent(_uuid)
  20659. },
  20660. aitargetTextDetailgetAiContent(_uid) {
  20661. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20662. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20663. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20664. let _allText = "";
  20665. let _mdText = "";
  20666. let _iindex = 0
  20667. this.isTargetCancelSource1.onmessage = _e => {
  20668. let _eData = JSON.parse(_e.data).content;
  20669. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20670. //对话已经完成
  20671. _mdText = _mdText.replace("_", "");
  20672. this.isTargetCancelSource1.close();
  20673. this.isTargetCancelSource1 = null;
  20674. this.targetCourseText = _mdText;
  20675. this.targetTextLoading = false
  20676. this.ttargetTextLoading = false
  20677. this.targetCourseTextB = false
  20678. this.isTargetCancelToken1 = null
  20679. return;
  20680. } else {
  20681. _iindex++
  20682. //对话还在继续
  20683. let _text = "";
  20684. _text = _eData.replaceAll("'", "");
  20685. if (_allText == "") {
  20686. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20687. } else {
  20688. _allText += _text;
  20689. }
  20690. _mdText = _allText + "_";
  20691. _mdText = _mdText.replace(/\\n/g, "\n");
  20692. _mdText = _mdText.replace(/\\/g, "");
  20693. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20694. //转化返回的回复流数据
  20695. if(_iindex == 10){
  20696. this.targetCourseText = _mdText;
  20697. _iindex = 0
  20698. }
  20699. if(this.targetTextLoading){
  20700. this.targetTextLoading = false
  20701. }
  20702. // 处理流数据
  20703. }
  20704. // this.$forceUpdate();
  20705. };
  20706. },
  20707. async aitargetTextDetail2(msg) {
  20708. let _this = this
  20709. let fileid = []
  20710. if(_this.mubiaoInfoData.length){
  20711. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  20712. if(_this.mubiaoInfoData[i].fileid){
  20713. fileid.push(_this.mubiaoInfoData[i].fileid)
  20714. }else {
  20715. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  20716. if(_fileid){
  20717. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20718. _this.$forceUpdate();
  20719. if(_fileid != 1){
  20720. fileid.push(_fileid)
  20721. }
  20722. }
  20723. }
  20724. }
  20725. }
  20726. _this.targetTextLoading2 = true
  20727. _this.ttargetTextLoading2 = true
  20728. let sub = []
  20729. if (_this.courseTypeId.length) {
  20730. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20731. let _sid = _this.courseTypeId[i]
  20732. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20733. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20734. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20735. }
  20736. }
  20737. }
  20738. }
  20739. let mclass = []
  20740. if (_this.courseTypeId.length) {
  20741. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20742. let _sid = _this.courseTypeId[i]
  20743. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20744. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20745. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20746. }
  20747. }
  20748. }
  20749. }
  20750. if(sub.length){
  20751. let _fileid = _this.importFileid(sub)
  20752. fileid = [...fileid, ..._fileid]
  20753. }
  20754. let messages = `NOTICE
  20755. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20756. 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.
  20757. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20758. Instruction: Based on the context, follow "Format example", write content.
  20759. #Context
  20760. ## 参考资料
  20761. 课程标题:${this.courseName}
  20762. ${sub.length ? '学科:' + sub.join(",") : ''}
  20763. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20764. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  20765. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20766. ## 要求
  20767. ${msg}
  20768. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20769. let _uuid = uuidv4();
  20770. // let params = JSON.stringify({
  20771. // // "model": "Chat",
  20772. // model: 'gpt-3.5-turbo',
  20773. // temperature: 0.1,
  20774. // max_tokens: 4096,
  20775. // top_p: 1,
  20776. // frequency_penalty: 0,
  20777. // presence_penalty: 0,
  20778. // messages: [{
  20779. // content: messages,
  20780. // role: 'user'
  20781. // }],
  20782. // uid: _uuid,
  20783. // mind_map_question: "",
  20784. // })
  20785. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  20786. let params = {
  20787. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20788. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20789. session_name: _uuid,
  20790. userId: _this.userid,
  20791. uid: _uuid,
  20792. file_ids: fileid.length ? [...fileid] : '',
  20793. model: 'gpt-4o-2024-08-06',
  20794. temperature: 0.1,
  20795. }
  20796. // let params = JSON.stringify({
  20797. // message: {
  20798. // anthropic_version: "bedrock-2023-05-31",
  20799. // max_tokens: 4096,
  20800. // temperature: 0.1,
  20801. // top_p: 1,
  20802. // messages: [{
  20803. // "role": "user",
  20804. // "content": messages
  20805. // }] ,
  20806. // },
  20807. // uid: _uuid,
  20808. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20809. // });
  20810. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20811. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  20812. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20813. console.log(response);
  20814. // let data = response.data.FunctionResponse
  20815. // if (data.choices && data.choices.length && data.choices[0].message) {
  20816. // _this.courseText = data.choices[0].message.content
  20817. // }
  20818. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20819. } else {
  20820. _this.$message.warning(response.data.FunctionResponse.result);
  20821. }
  20822. _this.isTargetCancelToken2 = null
  20823. }).catch(function (error) {
  20824. _this.targetTextLoading2 = false
  20825. _this.ttargetTextLoading2 = false
  20826. _this.isTargetCancelToken2 = null
  20827. console.log(error);
  20828. });
  20829. await _this.aitargetTextDetail2getAiContent(_uuid)
  20830. },
  20831. importFileid(sub){
  20832. // file-SNthYVubrHGg4HjFcp3FPkZq 英语
  20833. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养
  20834. // file-nkAUyRCEMncICGuFBC1WXnM1 科学素养内涵
  20835. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文
  20836. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学核心素养
  20837. // file-35koyXrFO2T4FsrQe4qXm0io 数学素养内涵
  20838. let _sub = converter(sub.join(","))
  20839. let fileid = []
  20840. if(_sub.indexOf(converter('STEM')) != -1){
  20841. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  20842. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  20843. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  20844. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  20845. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  20846. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  20847. }
  20848. if(_sub.indexOf(converter('语文')) != -1){
  20849. if(fileid.indexOf('file-aQmfmgrwdrHa9sCTTZkjvK7Z') == -1){
  20850. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  20851. }
  20852. }
  20853. if(_sub.indexOf(converter('数学')) != -1){
  20854. if(fileid.indexOf('file-G1bRfSFnQaQtzA3c8dLshg0a') == -1){
  20855. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  20856. }
  20857. if(fileid.indexOf('file-35koyXrFO2T4FsrQe4qXm0io') == -1){
  20858. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  20859. }
  20860. }
  20861. if(_sub.indexOf(converter('英语')) != -1){
  20862. if(fileid.indexOf('file-SNthYVubrHGg4HjFcp3FPkZq') == -1){
  20863. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  20864. }
  20865. }
  20866. if(_sub.indexOf(converter('科学')) != -1){
  20867. if(fileid.indexOf('file-QOKhi8i84T8eR6DYhb9TaTlG') == -1){
  20868. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  20869. }
  20870. if(fileid.indexOf('file-nkAUyRCEMncICGuFBC1WXnM1') == -1){
  20871. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  20872. }
  20873. }
  20874. return fileid
  20875. },
  20876. async aitargetTextDetail22(msg,msg2) {
  20877. let _this = this
  20878. let fileid = []
  20879. _this.targetTextLoading2 = true
  20880. _this.ttargetTextLoading2 = true
  20881. let sub = []
  20882. if (_this.courseTypeId.length) {
  20883. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20884. let _sid = _this.courseTypeId[i]
  20885. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20886. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20887. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20888. }
  20889. }
  20890. }
  20891. }
  20892. let mclass = []
  20893. if (_this.courseTypeId.length) {
  20894. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20895. let _sid = _this.courseTypeId[i]
  20896. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20897. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20898. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20899. }
  20900. }
  20901. }
  20902. }
  20903. if(!msg2 && sub.length){
  20904. let _fileid = _this.importFileid(sub)
  20905. fileid = [...fileid, ..._fileid]
  20906. }
  20907. let messages = `NOTICE
  20908. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20909. 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.
  20910. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20911. Instruction: Based on the context, follow "Format example", write content.
  20912. #Context
  20913. ## 参考资料
  20914. 课程标题:${this.courseName}
  20915. ${sub.length ? '学科:' + sub.join(",") : ''}
  20916. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20917. 课程目标:${msg2}
  20918. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  20919. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20920. ## 要求
  20921. ${msg}
  20922. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20923. let _uuid = uuidv4();
  20924. // let params = JSON.stringify({
  20925. // // "model": "Chat",
  20926. // model: 'gpt-3.5-turbo',
  20927. // temperature: 0.1,
  20928. // max_tokens: 4096,
  20929. // top_p: 1,
  20930. // frequency_penalty: 0,
  20931. // presence_penalty: 0,
  20932. // messages: [{
  20933. // content: messages,
  20934. // role: 'user'
  20935. // }],
  20936. // uid: _uuid,
  20937. // mind_map_question: "",
  20938. // })
  20939. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  20940. let params = {
  20941. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20942. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20943. session_name: _uuid,
  20944. userId: _this.userid,
  20945. uid: _uuid,
  20946. file_ids: fileid.length ? [...fileid] : '',
  20947. model: 'gpt-4o-2024-08-06',
  20948. temperature: 0.1,
  20949. }
  20950. // let params = JSON.stringify({
  20951. // message: {
  20952. // anthropic_version: "bedrock-2023-05-31",
  20953. // max_tokens: 4096,
  20954. // temperature: 0.1,
  20955. // top_p: 1,
  20956. // messages: [{
  20957. // "role": "user",
  20958. // "content": messages
  20959. // }] ,
  20960. // },
  20961. // uid: _uuid,
  20962. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20963. // });
  20964. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20965. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  20966. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20967. console.log(response);
  20968. // let data = response.data.FunctionResponse
  20969. // if (data.choices && data.choices.length && data.choices[0].message) {
  20970. // _this.courseText = data.choices[0].message.content
  20971. // }
  20972. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20973. } else {
  20974. _this.$message.warning(response.data.FunctionResponse.result);
  20975. }
  20976. _this.isTargetCancelToken2 = null
  20977. }).catch(function (error) {
  20978. _this.targetTextLoading2 = false
  20979. _this.ttargetTextLoading2 = false
  20980. _this.isTargetCancelToken2 = null
  20981. console.log(error);
  20982. });
  20983. await _this.aitargetTextDetail2getAiContent(_uuid)
  20984. },
  20985. aitargetTextDetail2getAiContent(_uid) {
  20986. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20987. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20988. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20989. let _allText = "";
  20990. let _mdText = "";
  20991. let _iindex = 0
  20992. this.isTargetCancelSource2.onmessage = _e => {
  20993. let _eData = JSON.parse(_e.data).content;
  20994. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20995. //对话已经完成
  20996. _mdText = _mdText.replace("_", "");
  20997. this.isTargetCancelSource2.close();
  20998. this.isTargetCancelSource2 = null;
  20999. this.targetCourseText2 = _mdText;
  21000. this.targetTextLoading2 = false
  21001. this.ttargetTextLoading2 = false
  21002. this.targetCourseText2B = false
  21003. this.isTargetCancelToken2 = null
  21004. return;
  21005. } else {
  21006. _iindex++
  21007. //对话还在继续
  21008. let _text = "";
  21009. _text = _eData.replaceAll("'", "");
  21010. if (_allText == "") {
  21011. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21012. } else {
  21013. _allText += _text;
  21014. }
  21015. _mdText = _allText + "_";
  21016. _mdText = _mdText.replace(/\\n/g, "\n");
  21017. _mdText = _mdText.replace(/\\/g, "");
  21018. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21019. //转化返回的回复流数据
  21020. if(_iindex == 10){
  21021. this.targetCourseText2 = _mdText;
  21022. _iindex = 0
  21023. }
  21024. if(this.targetTextLoading2){
  21025. this.targetTextLoading2 = false
  21026. }
  21027. // 处理流数据
  21028. }
  21029. // this.$forceUpdate();
  21030. };
  21031. },
  21032. async aitargetTextDetail3(msg) {
  21033. let _this = this
  21034. let fileid = []
  21035. if(_this.mubiaoInfoData.length){
  21036. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21037. if(_this.mubiaoInfoData[i].fileid){
  21038. fileid.push(_this.mubiaoInfoData[i].fileid)
  21039. }else {
  21040. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21041. if(_fileid){
  21042. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21043. _this.$forceUpdate();
  21044. if(_fileid != 1){
  21045. fileid.push(_fileid)
  21046. }
  21047. }
  21048. }
  21049. }
  21050. }
  21051. _this.targetTextLoading2 = true
  21052. _this.ttargetTextLoading2 = true
  21053. let sub = []
  21054. if (_this.courseTypeId.length) {
  21055. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21056. let _sid = _this.courseTypeId[i]
  21057. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21058. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21059. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21060. }
  21061. }
  21062. }
  21063. }
  21064. let mclass = []
  21065. if (_this.courseTypeId.length) {
  21066. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21067. let _sid = _this.courseTypeId[i]
  21068. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21069. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21070. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21071. }
  21072. }
  21073. }
  21074. }
  21075. if(sub.length){
  21076. let _fileid = _this.importFileid(sub)
  21077. fileid = [...fileid, ..._fileid]
  21078. }
  21079. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21080. let messages = `${msg}`
  21081. let _uuid = uuidv4();
  21082. // let params = JSON.stringify({
  21083. // // "model": "Chat",
  21084. // model: 'gpt-3.5-turbo',
  21085. // temperature: 0.1,
  21086. // max_tokens: 4096,
  21087. // top_p: 1,
  21088. // frequency_penalty: 0,
  21089. // presence_penalty: 0,
  21090. // messages: [{
  21091. // content: messages,
  21092. // role: 'user'
  21093. // }],
  21094. // uid: _uuid,
  21095. // mind_map_question: "",
  21096. // })
  21097. let params = {
  21098. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21099. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21100. session_name: _uuid,
  21101. userId: _this.userid,
  21102. uid: _uuid,
  21103. file_ids: fileid.length ? [...fileid] : '',
  21104. model: 'gpt-4o-2024-08-06',
  21105. temperature: 0.1,
  21106. }
  21107. // let params = JSON.stringify({
  21108. // message: {
  21109. // anthropic_version: "bedrock-2023-05-31",
  21110. // max_tokens: 4096,
  21111. // temperature: 0.1,
  21112. // top_p: 1,
  21113. // messages: [{
  21114. // "role": "user",
  21115. // "content": messages
  21116. // }] ,
  21117. // },
  21118. // uid: _uuid,
  21119. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21120. // });
  21121. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21122. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  21123. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21124. console.log(response);
  21125. // let data = response.data.FunctionResponse
  21126. // if (data.choices && data.choices.length && data.choices[0].message) {
  21127. // _this.courseText = data.choices[0].message.content
  21128. // }
  21129. console.log(response);
  21130. let data = response.data.FunctionResponse
  21131. // if (data.choices && data.choices.length && data.choices[0].message) {
  21132. // console.log(data.choices[0].message.content);
  21133. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  21134. // _this.$forceUpdate()
  21135. // }
  21136. if (data.message) {
  21137. console.log('返回回来的目标:',data.message);
  21138. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  21139. }
  21140. _this.isTargetCancelToken2 = null
  21141. }).catch(function (error) {
  21142. _this.targetTextLoading2 = false
  21143. _this.ttargetTextLoading2 = false
  21144. _this.isTargetCancelToken2 = null
  21145. console.log(error);
  21146. });
  21147. },
  21148. againEva(msg, i, k) {
  21149. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  21150. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  21151. return;
  21152. }
  21153. if (this.ruleLoading[i]) {
  21154. this.ruleLoading[i][k] = true
  21155. } else {
  21156. this.ruleLoading[i] = []
  21157. this.ruleLoading[i][k] = true
  21158. }
  21159. let message = `NOTICE
  21160. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  21161. 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.
  21162. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21163. Instruction: Based on the context, follow "Format example", write content.
  21164. #Context
  21165. ##要求
  21166. ${msg}
  21167. ##制定标准资料
  21168. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value}
  21169. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  21170. # Format example
  21171. ==
  21172. 0 星,作业内容与作业要求无关;
  21173. 1 星,没有识别问题和需求;
  21174. 2 星,问题或需求没有被清晰理解或准确识别;
  21175. 3 星,问题或需求的一部分被识别;
  21176. 4 星,问题或需求的大部分被识别;
  21177. 5 星,问题或需求都被识别。
  21178. ==
  21179. `
  21180. // let params = {
  21181. // // "model": "Chat",
  21182. // model: 'gpt-4o-2024-08-06',
  21183. // // model: "gpt-4o",
  21184. // temperature: 0.1,
  21185. // max_tokens: 4096,
  21186. // top_p: 1,
  21187. // frequency_penalty: 0,
  21188. // presence_penalty: 0,
  21189. // messages: [
  21190. // {
  21191. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  21192. // role: "user"
  21193. // }
  21194. // ],
  21195. // stream: false,
  21196. // uid: this.userid,
  21197. // mind_map_question: ""
  21198. // };
  21199. // this.ajax
  21200. // .post("https://gpt4.cocorobo.cn/chat", params)
  21201. // .then(response => {
  21202. // let data = response.data.FunctionResponse;
  21203. // console.log("data", data);
  21204. // if (data.choices && data.choices.length && data.choices[0].message) {
  21205. // let content = data.choices[0].message.content;
  21206. // var regex = new RegExp('==([^=]+)==');
  21207. // let match = content.match(regex);
  21208. // if (match) {
  21209. // content = match[1].trim().replaceAll(' ', '');
  21210. // // 获取匹配到的内容并去除两端空格
  21211. // console.log('contentInsideDoubleEquals', content);
  21212. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21213. // console.log("未有星级。");
  21214. // this.againEva(msg, i, k)
  21215. // return
  21216. // }
  21217. // //  return
  21218. // } else {
  21219. // console.log("未找到匹配的内容。");
  21220. // this.againEva(msg, i, k)
  21221. // return
  21222. // }
  21223. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21224. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21225. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21226. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21227. // this.$forceUpdate();
  21228. // this.ruleLoading[i][k] = false
  21229. // }else{
  21230. // this.ruleLoading[i][k] = false
  21231. // }
  21232. // })
  21233. // .catch(error => {
  21234. // console.log(error);
  21235. // this.ruleLoading[i][k] = false
  21236. // });
  21237. let parm = {
  21238. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21239. message: [{"type":"text", "text":message.replaceAll('\n', " ").replaceAll('*', "")}],
  21240. session_name: uuidv4(),
  21241. userId: this.userid,
  21242. file_ids: [],
  21243. model: 'gpt-4o-2024-08-06',
  21244. temperature: 0.1,
  21245. }
  21246. this.ajax
  21247. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21248. .then(async (response) => {
  21249. console.log(response);
  21250. let data = response.data.FunctionResponse
  21251. if (data.message) {
  21252. console.log(data.message);
  21253. let content = data.message;
  21254. var regex = new RegExp('==([^=]+)==');
  21255. let match = content.match(regex);
  21256. if (match) {
  21257. content = match[1].trim().replaceAll(' ', '');
  21258. // 获取匹配到的内容并去除两端空格
  21259. console.log('contentInsideDoubleEquals', content);
  21260. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21261. console.log("未有星级。");
  21262. this.againEva(msg, i, k)
  21263. return
  21264. }
  21265. //  return
  21266. } else {
  21267. console.log("未找到匹配的内容。");
  21268. this.againEva(msg, i, k)
  21269. return
  21270. }
  21271. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21272. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21273. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21274. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21275. this.$forceUpdate();
  21276. this.ruleLoading[i][k] = false
  21277. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  21278. }else {
  21279. this.ruleLoading[i][k] = false
  21280. }
  21281. })
  21282. .catch((error) => {
  21283. this.ruleLoading[i][k] = false
  21284. console.log(error);
  21285. });
  21286. },
  21287. async aiSearchFile(messages, callback) {
  21288. let _this = this
  21289. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21290. console.log('fileid=========',fileid)
  21291. // let params = JSON.stringify({
  21292. // // "model": "Chat",
  21293. // model: 'gpt-3.5-turbo',
  21294. // temperature: 0.1,
  21295. // max_tokens: 4096,
  21296. // top_p: 1,
  21297. // frequency_penalty: 0,
  21298. // presence_penalty: 0,
  21299. // messages: [{
  21300. // content: messages,
  21301. // role: 'user'
  21302. // }],
  21303. // stream: false,
  21304. // uid: this.userid,
  21305. // mind_map_question: "",
  21306. // })
  21307. // // let params = JSON.stringify({
  21308. // // message: {
  21309. // // anthropic_version: "bedrock-2023-05-31",
  21310. // // max_tokens: 4096,
  21311. // // temperature: 0.1,
  21312. // // top_p: 1,
  21313. // // messages: [{
  21314. // // content: messages,
  21315. // // role: 'user'
  21316. // // }], //
  21317. // // },
  21318. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21319. // // });
  21320. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21321. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21322. // console.log(response);
  21323. // let data = response.data.FunctionResponse
  21324. // if (data.choices && data.choices.length && data.choices[0].message) {
  21325. // console.log(data.choices[0].message.content);
  21326. // let dArray = JSON.parse(data.choices[0].message.content)
  21327. // _this.dArray = dArray
  21328. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21329. // for (var i = 0; i < dArray.length; i++) {
  21330. // let _task = dArray[i]
  21331. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21332. // task: _task.task,
  21333. // taskDetail: "",
  21334. // taskDetail2: _task.detail,
  21335. // taskDetail3: "",
  21336. // chapterData: [],
  21337. // toolText: "",
  21338. // toolChoose: [
  21339. // {
  21340. // tool: [],
  21341. // toolDetail: "",
  21342. // toolType: 0,
  21343. // askCount: 1,
  21344. // askTitle: "",
  21345. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21346. // },
  21347. // ],
  21348. // isShowTools: false,
  21349. // askCount: 1,
  21350. // isFold: 0,
  21351. // askTitle: "",
  21352. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21353. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21354. // homeworkList: [],
  21355. // })
  21356. // }
  21357. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21358. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21359. // _this.$forceUpdate();
  21360. // }
  21361. // // if (data.result) {
  21362. // // console.log(data.result);
  21363. // // let dArray = JSON.parse(data.result)
  21364. // // _this.dArray = dArray
  21365. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  21366. // // for (var i = 0; i < dArray.length; i++) {
  21367. // // let _task = dArray[i]
  21368. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21369. // // task: _task.task,
  21370. // // taskDetail: "",
  21371. // // taskDetail2: _task.detail,
  21372. // // taskDetail3: "",
  21373. // // chapterData: [],
  21374. // // toolText: "",
  21375. // // toolChoose: [
  21376. // // {
  21377. // // tool: [],
  21378. // // toolDetail: "",
  21379. // // toolType: 0,
  21380. // // askCount: 1,
  21381. // // askTitle: "",
  21382. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21383. // // },
  21384. // // ],
  21385. // // isShowTools: false,
  21386. // // askCount: 1,
  21387. // // isFold: 1,
  21388. // // askTitle: "",
  21389. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21390. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  21391. // // homeworkList: [],
  21392. // // })
  21393. // // }
  21394. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21395. // // _this.$forceUpdate();
  21396. // // }
  21397. // callback ? callback() : ''
  21398. // }).catch(function (error) {
  21399. // _this.loading = false
  21400. // console.log(error);
  21401. // });
  21402. this.isFileCancelToken = this.ajax.setCancelSource();
  21403. let parm = {
  21404. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21405. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21406. session_name: uuidv4(),
  21407. userId: this.userid,
  21408. file_ids: fileid.length ? [...fileid] : '',
  21409. model: 'gpt-4o-2024-08-06',
  21410. temperature: 0.1,
  21411. }
  21412. this.ajax
  21413. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  21414. .then((response) => {
  21415. console.log(response);
  21416. let data = response.data.FunctionResponse
  21417. if (data.message) {
  21418. console.log(data.message);
  21419. let dArray = []
  21420. try {
  21421. let regex2 = new RegExp("/([{,])(\w+):/g")
  21422. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":'))
  21423. } catch (error) {
  21424. // callback ? callback() : ''
  21425. console.log("error_________________" + error);
  21426. try {
  21427. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21428. let match = data.message.match(regex);
  21429. dArray = JSON.parse(match[0]);
  21430. } catch (error) {
  21431. callback ? callback() : ''
  21432. _this.$message.error("生成的json格式错误,请重新点击获取")
  21433. console.log("error_________________" + error);
  21434. }
  21435. }
  21436. for(let i = 0; i < dArray.length; i++){
  21437. let content = dArray[i].content
  21438. let name = '参考资料'+(i+1)
  21439. let md = new MarkdownIt();
  21440. let _html = content ? md.render(content) : ''
  21441. setTimeout(()=>{
  21442. if(i == (dArray.length - 1)){
  21443. _this.generate2(name, _html, i, callback)
  21444. }else {
  21445. _this.generate2(name, _html, i)
  21446. }
  21447. }, 500 * i)
  21448. }
  21449. _this.isFileCancelToken = null
  21450. _this.$forceUpdate();
  21451. }
  21452. })
  21453. .catch((error) => {
  21454. callback ? callback() : ''
  21455. _this.isFileCancelToken = null
  21456. console.log(error);
  21457. });
  21458. },
  21459. createFileid(url) {
  21460. let _this = this
  21461. return new Promise((resolve, reject) => {
  21462. try {
  21463. _this.ajax
  21464. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  21465. url: url,
  21466. })
  21467. .then((res) => {
  21468. let _data = res.data.FunctionResponse;
  21469. if (_data.result && _data.result.id) {
  21470. resolve(_data.result.id)
  21471. }else {
  21472. resolve(1)
  21473. }
  21474. }).catch(function (error) {
  21475. resolve(1)
  21476. });
  21477. }catch (e){
  21478. resolve(1)
  21479. }
  21480. });
  21481. }
  21482. },
  21483. beforeDestroy() {
  21484. clearTimeout(this.timer);
  21485. this.timer = null;
  21486. clearInterval(this.timer2);
  21487. this.timer2 = null;
  21488. clearInterval(this.pasteTimer);
  21489. this.pasteTimer = null;
  21490. },
  21491. beforeRouteLeave(to, from, next) {
  21492. clearTimeout(this.timer);
  21493. this.timer = null;
  21494. clearInterval(this.timer2);
  21495. this.timer2 = null;
  21496. clearInterval(this.pasteTimer);
  21497. this.pasteTimer = null;
  21498. next();
  21499. },
  21500. created() {
  21501. this.getStudent();
  21502. this.getTeacher();
  21503. this.getClass();
  21504. this.selectGrage();
  21505. this.getTemplate();
  21506. this.getTipsTemplate();
  21507. // this.selectType();
  21508. this.selectEva();
  21509. if(this.istemplate == 1){
  21510. this.isOutline = true
  21511. this.isOutline2 = true
  21512. this.courseTextBool = true
  21513. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  21514. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  21515. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  21516. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  21517. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  21518. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  21519. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  21520. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  21521. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  21522. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  21523. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  21524. }
  21525. this.loading = false;
  21526. this.timer2 = setInterval(() => {
  21527. this.selectEva();
  21528. }, 5000);
  21529. this.pasteTimer = setInterval(() => {
  21530. this.getPaste();
  21531. }, 1000);
  21532. setTimeout(() => {
  21533. // this.selectAllType();
  21534. this.selectCourseDetail();
  21535. }, 500);
  21536. let _this = this;
  21537. window.pasteStage = function (json) {
  21538. _this.pasteStage(json);
  21539. };
  21540. window.pasteTask = function (json) {
  21541. _this.pasteTask(json);
  21542. };
  21543. },
  21544. };
  21545. </script>
  21546. <style scoped>
  21547. @media screen and (max-width: 1280px) {
  21548. .mbCss {
  21549. flex-direction: column !important;
  21550. }
  21551. .pjCss {
  21552. width: 100% !important;
  21553. }
  21554. .evaCss {
  21555. width: 100% !important;
  21556. margin-top: 10px;
  21557. }
  21558. }
  21559. .el-table>>>.even_row {
  21560. background-color: #f1f1f1 !important;
  21561. }
  21562. .dialog_diy>>>.el-dialog__header {
  21563. background: #3c3c3c !important;
  21564. padding: 15px 20px;
  21565. }
  21566. .dialog_diy>>>.el-dialog__title {
  21567. color: #fff;
  21568. }
  21569. .dialog_diy>>>.el-dialog__headerbtn {
  21570. top: 19px;
  21571. }
  21572. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  21573. color: #fff;
  21574. }
  21575. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  21576. color: #fff;
  21577. }
  21578. .dialog_diy>>>.el-dialog__body,
  21579. .dialog_diy>>>.el-dialog__footer {
  21580. background: #fafafa;
  21581. }
  21582. .dialog_diy3>>>.el-dialog__body,
  21583. .dialog_diy3>>>.el-dialog__footer {
  21584. background: #eee !important;
  21585. }
  21586. .dialog_diy3>>>.el-dialog__body {
  21587. padding: 20px 20px;
  21588. }
  21589. .dialog_diyStage>>>.el-dialog__body {
  21590. padding: 10px;
  21591. }
  21592. .source_diy>>>.el-dialog {
  21593. height: 100% !important;
  21594. margin: 0 auto !important;
  21595. }
  21596. .source_diy>>>.el-dialog__body {
  21597. height: calc(100% - 185px);
  21598. overflow: auto;
  21599. background: #e6eaf0;
  21600. }
  21601. .source_diy>>>.el-dialog__footer {
  21602. background: #e6eaf0 !important;
  21603. }
  21604. .left {
  21605. border-right: 1px solid rgb(60, 94, 143);
  21606. display: flex;
  21607. flex-direction: column;
  21608. align-items: center;
  21609. min-height: 600px;
  21610. width: 385px;
  21611. height: 80%;
  21612. }
  21613. .tips {
  21614. color: rgb(128, 128, 128);
  21615. font-size: 12px;
  21616. width: 270px;
  21617. margin: 40px;
  21618. }
  21619. .pb_content {
  21620. height: 100% !important;
  21621. /* margin: 0 20px 0 20px; */
  21622. }
  21623. .pb_content_body {
  21624. width: 100% !important;
  21625. height: 100%;
  21626. display: flex;
  21627. }
  21628. .info_solid {
  21629. width: 270px;
  21630. height: 30px;
  21631. border-left: 1px solid #bdbdbd;
  21632. margin: 10px 0px 10px 30px;
  21633. }
  21634. .info_steps {
  21635. width: 270px;
  21636. font-size: 0.875rem;
  21637. display: flex;
  21638. align-items: center;
  21639. }
  21640. .info_steps span:nth-child(1) {
  21641. width: 30px;
  21642. height: 30px;
  21643. background: rgba(0, 0, 0, 0.38);
  21644. display: block;
  21645. color: #fff;
  21646. border-radius: 40px;
  21647. text-align: center;
  21648. line-height: 30px;
  21649. }
  21650. .steps_active {
  21651. background: #3d67bc !important;
  21652. }
  21653. .info_steps span:nth-child(2) {
  21654. margin-left: 5px;
  21655. }
  21656. .right {
  21657. height: 100%;
  21658. width: 100%;
  21659. display: flex;
  21660. overflow: hidden;
  21661. flex-direction: column;
  21662. }
  21663. .leftBar{
  21664. width: 290px;
  21665. height: calc(100% - 50px);
  21666. overflow: auto;
  21667. border-radius: 5px;
  21668. margin: 25px auto;
  21669. box-sizing: border-box;
  21670. margin-right: 10px;
  21671. }
  21672. .basic_box {
  21673. margin: 0 auto;
  21674. position: relative;
  21675. padding: 0 20px 0 20px;
  21676. }
  21677. .basic_box_success {
  21678. width: 100%;
  21679. min-height: 455px;
  21680. padding: 50px 0;
  21681. position: relative;
  21682. text-align: center;
  21683. border-bottom: 1px solid #bfbfbf;
  21684. box-sizing: border-box;
  21685. display: flex;
  21686. align-items: center;
  21687. flex-direction: column;
  21688. justify-content: center;
  21689. }
  21690. .info_title {
  21691. font-size: 1.5em;
  21692. margin-right: 25px;
  21693. /* margin: 20px 30px 20px 30px; */
  21694. }
  21695. .bInfo_title {
  21696. text-align: left;
  21697. margin: 10px 0;
  21698. }
  21699. .small_title {
  21700. font-size: 14px;
  21701. line-height: 40px;
  21702. }
  21703. .chapter_beizhu {
  21704. font-size: 12px;
  21705. font-weight: bold;
  21706. float: right;
  21707. color: rgb(128, 128, 128);
  21708. margin-top: 5px;
  21709. }
  21710. .chapter_uploadBox1 {
  21711. text-align: left;
  21712. background-color: rgb(242, 242, 242);
  21713. width: 100%;
  21714. height: 67px;
  21715. padding: 0px 15px;
  21716. border-radius: 8px;
  21717. overflow: hidden;
  21718. font-size: 16px;
  21719. box-sizing: border-box;
  21720. position: relative;
  21721. }
  21722. .chapter_add {
  21723. width: 100%;
  21724. height: 32px;
  21725. margin-top: 15px;
  21726. cursor: pointer;
  21727. }
  21728. .chapter_add_l {
  21729. margin-left: 5px;
  21730. width: 30px;
  21731. height: 30px;
  21732. float: left;
  21733. border: 1px solid #aaa;
  21734. color: #aaa;
  21735. border-radius: 50%;
  21736. font-size: 25px;
  21737. text-align: center;
  21738. }
  21739. .chapter_add_r {
  21740. font-size: 18px;
  21741. height: 40px;
  21742. line-height: 30px;
  21743. text-indent: 10px;
  21744. color: #aaa;
  21745. }
  21746. .chapter_add_r span {
  21747. font-size: 12px;
  21748. color: rgb(204, 204, 204);
  21749. }
  21750. .chapter_add_input {
  21751. display: none;
  21752. }
  21753. .line {
  21754. width: 85%;
  21755. margin: 0 auto;
  21756. border-top: 1px solid #e5e5e5;
  21757. margin-top: 20px;
  21758. }
  21759. .info_btnBox {
  21760. width: calc(100%);
  21761. display: flex;
  21762. justify-content: center;
  21763. height: 80px;
  21764. align-items: center;
  21765. background: #fff;
  21766. margin: 0 auto;
  21767. border-top: 2px solid rgb(228, 232, 237);
  21768. box-sizing: border-box;
  21769. }
  21770. .info_btnBox2 {
  21771. width: calc(100%);
  21772. display: flex;
  21773. justify-content: center;
  21774. height: 20px;
  21775. align-items: center;
  21776. background: #fff;
  21777. margin: 0 auto;
  21778. border-top: 2px solid rgb(228, 232, 237);
  21779. box-sizing: border-box;
  21780. overflow: hidden;
  21781. cursor: pointer;
  21782. }
  21783. .info_btnBox3 {
  21784. width: calc(100%);
  21785. display: flex;
  21786. justify-content: flex-end;
  21787. padding: 0 20px;
  21788. height: 60px;
  21789. align-items: center;
  21790. background: unset;
  21791. margin: 0 auto;
  21792. /* border-top: 1px solid rgb(228, 232, 237); */
  21793. box-sizing: border-box;
  21794. overflow: hidden;
  21795. cursor: pointer;
  21796. background: #fff;
  21797. border-radius: 10px;
  21798. }
  21799. .info_btn+.info_btn {
  21800. margin-left: 15px;
  21801. }
  21802. .info_btn,
  21803. .teacherWord {
  21804. color: #fff;
  21805. background-color: #0f7eff;
  21806. padding: 8px 24px;
  21807. font-size: 0.9375rem;
  21808. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  21809. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  21810. min-width: 64px;
  21811. font-weight: 500;
  21812. border-radius: 4px;
  21813. box-sizing: border-box;
  21814. border: none;
  21815. cursor: pointer;
  21816. }
  21817. .teacherWord {
  21818. width: 105px !important;
  21819. text-align: center !important;
  21820. line-height: 36px !important;
  21821. padding: 0 !important;
  21822. font-size: 14px !important;
  21823. margin: 10px 0 !important;
  21824. }
  21825. .template_box {
  21826. display: flex;
  21827. flex-wrap: wrap;
  21828. }
  21829. .wordTeacher {
  21830. display: flex;
  21831. flex-direction: column;
  21832. width: 100px;
  21833. height: 100px;
  21834. text-align: center;
  21835. font-size: 13px;
  21836. margin: 0 20px 20px 0;
  21837. background: #f0f4fa;
  21838. position: relative;
  21839. border-radius: 5px;
  21840. align-items: center;
  21841. justify-content: center;
  21842. border: 1px solid #cad1dc;
  21843. color: #0e1e33;
  21844. /* padding: 25px 0px; */
  21845. cursor: pointer;
  21846. }
  21847. .wordTeacher::after {
  21848. content: "";
  21849. display: block;
  21850. position: absolute;
  21851. width: 15px;
  21852. height: 15px;
  21853. right: 10px;
  21854. top: 10px;
  21855. background-image: url(../../../assets/icon/new/choose_a.png);
  21856. background-size: 100% 100%;
  21857. }
  21858. .wordTeacherA::after {
  21859. background-image: url(../../../assets/icon/new/choose_b.png);
  21860. }
  21861. .wordTeacher:nth-child(5n) {
  21862. margin-right: 0px;
  21863. }
  21864. .wordPic {
  21865. margin: 0 auto;
  21866. width: 30px;
  21867. height: 30px;
  21868. cursor: pointer;
  21869. }
  21870. .deleteWord {
  21871. width: 22px;
  21872. height: 22px;
  21873. position: absolute;
  21874. right: 5px;
  21875. top: -15px;
  21876. cursor: pointer;
  21877. display: none;
  21878. z-index: 999;
  21879. }
  21880. .wordPic>img,
  21881. .deleteWord>img,
  21882. .addToolImg>img {
  21883. width: 100%;
  21884. height: 100%;
  21885. }
  21886. .info_btn:hover {
  21887. background-color: #4f7cd5 !important;
  21888. }
  21889. .cru_selectBox {
  21890. display: flex;
  21891. margin: 15px 0;
  21892. flex-wrap: nowrap;
  21893. white-space: nowrap;
  21894. overflow: auto;
  21895. position: relative;
  21896. height: 40px;
  21897. max-width: calc(100% - 175px);
  21898. }
  21899. .cru_selectBox::-webkit-scrollbar {
  21900. /*滚动条整体样式*/
  21901. width: 6px;
  21902. /*高宽分别对应横竖滚动条的尺寸*/
  21903. height: 6px;
  21904. }
  21905. /*定义滚动条轨道 内阴影+圆角*/
  21906. .cru_selectBox::-webkit-scrollbar-track {
  21907. border-radius: 10px;
  21908. background-color: #eee;
  21909. }
  21910. /*定义滑块 内阴影+圆角*/
  21911. .cru_selectBox::-webkit-scrollbar-thumb {
  21912. border-radius: 10px;
  21913. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  21914. background-color: rgba(0, 0, 0, 0.1);
  21915. }
  21916. .cru_line {
  21917. position: absolute;
  21918. bottom: 0px;
  21919. transition: all 0.5s;
  21920. left: 0px;
  21921. width: 50px;
  21922. height: 4px;
  21923. left: 10px;
  21924. border-radius: 2px;
  21925. background: #3681fc;
  21926. }
  21927. .cru_select {
  21928. font-size: 18px;
  21929. margin-right: 20px;
  21930. margin-left: 5px;
  21931. cursor: pointer;
  21932. color: #0e1e33;
  21933. }
  21934. .cru_select:hover {
  21935. color: #3681fc !important;
  21936. }
  21937. .cru_selected {
  21938. color: #3681fc !important;
  21939. font-weight: bold;
  21940. }
  21941. .chapter_box {
  21942. margin-top: 10px;
  21943. width: 100%;
  21944. padding: 10px 20px;
  21945. background: #fff;
  21946. border-radius: 8px;
  21947. box-sizing: border-box;
  21948. }
  21949. .chapter_contentbox {
  21950. display: flex;
  21951. align-items: center;
  21952. /* margin-top: 15px; */
  21953. }
  21954. .chapter_contentbox .cc_title {
  21955. margin: 0px;
  21956. color: black;
  21957. display: block;
  21958. white-space: nowrap;
  21959. overflow: hidden;
  21960. text-overflow: ellipsis;
  21961. margin-right: 20px;
  21962. font-size: 18px;
  21963. height: 20px;
  21964. line-height: 22px;
  21965. min-width: fit-content;
  21966. display: flex;
  21967. }
  21968. .chapter_contentbox .cc_title::before {
  21969. content: "";
  21970. height: 100%;
  21971. width: 3px;
  21972. background: #3681fc;
  21973. border-radius: 3px;
  21974. opacity: 1;
  21975. display: block;
  21976. margin-right: 10px;
  21977. }
  21978. .chapter_contentbox .cc_input {
  21979. width: 100%;
  21980. display: flex;
  21981. }
  21982. .show_taskD {
  21983. min-width: fit-content;
  21984. margin-left: 10px;
  21985. display: flex;
  21986. align-items: center;
  21987. font-size: 14px;
  21988. cursor: pointer;
  21989. color: #717c8d;
  21990. }
  21991. .show_taskD>img {
  21992. width: 15px;
  21993. margin-right: 5px;
  21994. transition: 0.2s all;
  21995. transform: rotate(-90deg);
  21996. }
  21997. .show_taskD.show>img {
  21998. transform: rotate(0deg);
  21999. }
  22000. .show_toolD {
  22001. min-width: fit-content;
  22002. margin-left: 10px;
  22003. display: flex;
  22004. align-items: center;
  22005. font-size: 14px;
  22006. cursor: pointer;
  22007. color: #717c8d;
  22008. /* position: absolute;
  22009. right: 45px;
  22010. top: 5px; */
  22011. }
  22012. .show_toolD>img {
  22013. width: 15px;
  22014. margin-right: 5px;
  22015. transition: 0.2s all;
  22016. transform: rotate(-90deg);
  22017. }
  22018. .show_toolD.show>img {
  22019. transform: rotate(0deg);
  22020. }
  22021. .remove {
  22022. background-image: url("../../../assets/icon/new/delete_u.png");
  22023. cursor: pointer;
  22024. opacity: 0.5;
  22025. width: 30px;
  22026. min-width: 30px;
  22027. height: 30px;
  22028. background-size: 100% 100%;
  22029. background-repeat: no-repeat;
  22030. margin-left: 10px;
  22031. }
  22032. .remove1 {
  22033. background-image: url("../../../assets/remove1.png");
  22034. background-repeat: no-repeat;
  22035. background-position: 5px 10px;
  22036. width: 40px;
  22037. height: 50px;
  22038. cursor: pointer;
  22039. margin-left: 10px;
  22040. }
  22041. .binfo_input {
  22042. width: 100%;
  22043. margin: 0;
  22044. padding: 12px 14px;
  22045. display: block;
  22046. min-width: 0;
  22047. outline: none;
  22048. box-sizing: border-box;
  22049. background: none;
  22050. border: none;
  22051. border-radius: 4px;
  22052. background: #fff;
  22053. font-size: 16px;
  22054. resize: none;
  22055. font-family: "Microsoft YaHei";
  22056. min-height: 48px;
  22057. /* border: 1px solid #3682fc00; */
  22058. border: 1.5px solid #cad1dc;
  22059. }
  22060. .binfo_textarea {
  22061. border: 1.5px solid #cad1dc;
  22062. font-size: 16px;
  22063. resize: none;
  22064. /* background: #f6f6f6; */
  22065. font-family: "Microsoft YaHei";
  22066. }
  22067. .binfo_input:focus-visible {
  22068. border: 1.5px solid #3681fc !important;
  22069. }
  22070. .time {
  22071. display: flex;
  22072. margin: 35px 0 80px 0;
  22073. }
  22074. .chapter_btnbox {
  22075. width: 160px;
  22076. border-radius: 5px;
  22077. border: 2px dashed gray;
  22078. display: flex;
  22079. padding: 8px 50px;
  22080. align-items: center;
  22081. justify-content: center;
  22082. margin: 30px auto 0;
  22083. cursor: pointer;
  22084. }
  22085. .icon_add {
  22086. position: relative;
  22087. width: 24px;
  22088. padding-top: 20px;
  22089. border-radius: 100%;
  22090. border-width: 2px;
  22091. border-style: solid;
  22092. border-color: gray;
  22093. }
  22094. .icon_add i:nth-child(1) {
  22095. position: absolute;
  22096. left: 50%;
  22097. top: 50%;
  22098. height: 60%;
  22099. transform: translate(-50%, -50%);
  22100. border-width: 1px;
  22101. border-style: solid;
  22102. border-color: inherit;
  22103. }
  22104. .icon_add i:nth-child(2) {
  22105. position: absolute;
  22106. top: 50%;
  22107. left: 50%;
  22108. width: 60%;
  22109. transform: translate(-50%, -50%);
  22110. border-width: 1px;
  22111. border-style: solid;
  22112. border-color: inherit;
  22113. }
  22114. .chapter_btn_w {
  22115. font-size: 0.9375rem;
  22116. font-weight: bold;
  22117. color: gray;
  22118. margin-left: 20px;
  22119. }
  22120. .disUoloadSty>>>.el-icon-plus {
  22121. display: none !important;
  22122. /* 上传按钮隐藏 */
  22123. }
  22124. .imgLeft {
  22125. margin: 15px 0;
  22126. }
  22127. .add_info_box {
  22128. margin: 0 0 0 auto;
  22129. display: flex;
  22130. flex-wrap: wrap;
  22131. }
  22132. .add_info_box button {
  22133. margin: 0 5px 10px 0;
  22134. }
  22135. .add_info_box2 {
  22136. display: flex;
  22137. align-items: center;
  22138. flex-wrap: wrap;
  22139. }
  22140. .add_info_box2::after {
  22141. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  22142. color: red;
  22143. font-size: 14px;
  22144. margin-bottom: 10px;
  22145. }
  22146. .add_chapters_box {
  22147. text-align: left;
  22148. background-color: #fff;
  22149. width: 100%;
  22150. border-radius: 4px;
  22151. font-size: 16px;
  22152. box-sizing: border-box;
  22153. position: relative;
  22154. padding: 0 15px;
  22155. height: auto;
  22156. overflow-y: auto;
  22157. overflow-x: hidden;
  22158. border: 1px solid #cad1dc;
  22159. }
  22160. .add_chapters_box.add_c_none {
  22161. display: flex;
  22162. justify-content: center;
  22163. align-items: center;
  22164. padding: 15px;
  22165. }
  22166. .add_c_none>img {
  22167. width: 25px;
  22168. }
  22169. .add_chapters_box.add_c_none>span {
  22170. font-size: 14px;
  22171. font-weight: 400;
  22172. margin: 0 0 5px 5px;
  22173. }
  22174. .homework_box {
  22175. display: flex;
  22176. align-items: flex-start;
  22177. flex-wrap: wrap;
  22178. margin: 15px 0 0 0;
  22179. flex-direction: column;
  22180. align-content: flex-start;
  22181. }
  22182. .course_homework {
  22183. display: flex;
  22184. justify-content: center;
  22185. flex-direction: row;
  22186. align-items: center;
  22187. margin: 0 10px 0 0;
  22188. }
  22189. .course_homework>>>.el-input__inner {
  22190. width: 140px;
  22191. margin-left: 15px;
  22192. }
  22193. .chapter_upload_move {
  22194. position: relative;
  22195. background-color: #fff;
  22196. position: absolute;
  22197. width: 100%;
  22198. top: 0px;
  22199. left: 0px;
  22200. border: 1px solid #eee;
  22201. border-radius: 5px;
  22202. transition: width 2s;
  22203. -moz-transition: width 2s;
  22204. -webkit-transition: width 2s;
  22205. -o-transition: width 2s;
  22206. }
  22207. .chapter_upload_l_i {
  22208. background-image: url("../../../assets/icon.png");
  22209. background-position: 3px -165px;
  22210. width: 30px;
  22211. height: 30px;
  22212. margin: 10px auto 0 auto;
  22213. }
  22214. .course_input_box {
  22215. display: flex;
  22216. margin-right: 20px;
  22217. width: 100%;
  22218. align-items: center;
  22219. position: relative;
  22220. }
  22221. .course_input_box>.binfo_input {
  22222. width: calc(100% - 0 - 200px - 20px);
  22223. margin: 0 10px;
  22224. }
  22225. .bb_courseIcon {
  22226. width: 57px;
  22227. height: 45px;
  22228. background: #f0f4fa;
  22229. border-radius: 5px 0px 0px 5px;
  22230. display: flex;
  22231. align-items: center;
  22232. justify-content: center;
  22233. border-right: 1.5px solid rgb(202, 209, 220);
  22234. box-sizing: border-box;
  22235. position: absolute;
  22236. left: 1.5px;
  22237. }
  22238. .bb_courseIcon>img {
  22239. width: 25px;
  22240. height: auto;
  22241. }
  22242. .big_box {
  22243. /* margin-top: 20px; */
  22244. display: flex;
  22245. justify-content: space-between;
  22246. /* border-bottom: 1px solid #E0E2ED; */
  22247. }
  22248. .left_first {
  22249. display: flex;
  22250. flex-direction: column;
  22251. flex-wrap: nowrap;
  22252. width: calc(100% - 310px);
  22253. padding: 20px;
  22254. box-sizing: border-box;
  22255. background: #fff;
  22256. border-radius: 5px;
  22257. }
  22258. .right_first {
  22259. width: 300px;
  22260. display: flex;
  22261. align-items: center;
  22262. justify-content: center;
  22263. /* border-left: 1px solid #E0E2ED; */
  22264. box-sizing: border-box;
  22265. padding: 20px;
  22266. flex-direction: column;
  22267. background: #fff;
  22268. border-radius: 5px;
  22269. }
  22270. .ai_box {
  22271. width: 204px;
  22272. display: flex;
  22273. justify-content: flex-end;
  22274. margin-bottom: 15px;
  22275. }
  22276. .ai_content {
  22277. display: flex;
  22278. align-items: center;
  22279. font-size: 14px;
  22280. padding: 7px 20px;
  22281. box-sizing: border-box;
  22282. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  22283. border-radius: 12px;
  22284. font-weight: 700;
  22285. cursor: pointer;
  22286. }
  22287. .ai_content>img {
  22288. width: 40px;
  22289. margin-right: 5px;
  22290. }
  22291. .c_info_title {
  22292. padding: 15px 0 15px 0;
  22293. font-size: 16px;
  22294. font-weight: bold;
  22295. margin: 0 0 0 20px;
  22296. box-sizing: border-box;
  22297. display: flex;
  22298. align-items: center;
  22299. line-height: 20px;
  22300. }
  22301. .c_info_title::before {
  22302. content: "";
  22303. display: block;
  22304. width: 3px;
  22305. height: 20px;
  22306. background: #0061ff;
  22307. border-radius: 3px;
  22308. margin: 0 5px 0 0;
  22309. }
  22310. .right_title {
  22311. height: 30px;
  22312. padding: 15px 0 15px 20px;
  22313. border-bottom: 1px solid #f2f2f2;
  22314. font-size: 1.5em;
  22315. font-weight: bold;
  22316. color: #0f7eff;
  22317. margin: 0 auto;
  22318. }
  22319. .people {
  22320. border: 1px solid rgb(229 229 229);
  22321. /* height: 495px; */
  22322. height: 350px;
  22323. border-radius: 5px;
  22324. width: 100%;
  22325. overflow: auto;
  22326. }
  22327. .people_top {
  22328. display: flex;
  22329. width: 100%;
  22330. /* justify-content: space-between; */
  22331. /* align-items: center; */
  22332. flex-direction: column;
  22333. padding: 10px 10px 0;
  22334. box-sizing: border-box;
  22335. }
  22336. .people_nav,
  22337. .people_top_right {
  22338. /* padding: 20px 0 0 20px; */
  22339. }
  22340. .people_top_right {
  22341. height: 40px;
  22342. margin-bottom: 10px;
  22343. }
  22344. .people_search {
  22345. display: flex;
  22346. position: relative;
  22347. }
  22348. .people_search>>>.el-input__inner {
  22349. /* height: 25px; */
  22350. width: 100%;
  22351. }
  22352. .search_img {
  22353. width: 20px;
  22354. height: 20px;
  22355. position: absolute;
  22356. right: 10px;
  22357. top: 50%;
  22358. transform: translateY(-50%);
  22359. }
  22360. .search_img>img {
  22361. width: 100%;
  22362. height: 100%;
  22363. }
  22364. .people_name {
  22365. display: flex;
  22366. justify-content: flex-start;
  22367. padding: 20px 10px;
  22368. flex-direction: column;
  22369. flex-wrap: wrap;
  22370. }
  22371. .p_box {
  22372. position: relative;
  22373. }
  22374. .people_name>>>.el-checkbox {
  22375. width: 100%;
  22376. display: flex;
  22377. align-items: center;
  22378. margin-bottom: 10px;
  22379. }
  22380. .people_name>>>.el-checkbox__label {
  22381. text-overflow: ellipsis;
  22382. overflow: hidden;
  22383. width: calc(100%);
  22384. }
  22385. .people_name2>>>.el-checkbox__label {
  22386. width: calc(100% - 130px);
  22387. }
  22388. .inviteCode {
  22389. position: absolute;
  22390. right: 30px;
  22391. color: #237ade;
  22392. top: 0;
  22393. cursor: pointer;
  22394. font-size: 13px;
  22395. }
  22396. .noneInvite {
  22397. color: #a8a8a8;
  22398. }
  22399. .inviteImg {
  22400. position: absolute;
  22401. right: 5px;
  22402. top: 0;
  22403. width: 20px;
  22404. }
  22405. .right_img {
  22406. width: 150px;
  22407. height: 150px;
  22408. margin: 0 auto;
  22409. }
  22410. .right_img>img {
  22411. width: 100%;
  22412. height: 100%;
  22413. }
  22414. .number {
  22415. margin-top: 20px;
  22416. color: #4aa6ff;
  22417. text-decoration: underline;
  22418. }
  22419. .success_button {
  22420. display: flex;
  22421. text-align: center;
  22422. margin: 5% 0 auto;
  22423. flex-direction: row;
  22424. justify-content: center;
  22425. }
  22426. .look_course {
  22427. margin-right: 40px;
  22428. background: #3d67bc;
  22429. width: 200px;
  22430. height: 35px;
  22431. line-height: 35px;
  22432. color: #fff;
  22433. text-align: center;
  22434. font-size: 14px;
  22435. border-radius: 5px;
  22436. cursor: pointer;
  22437. }
  22438. .attend_others {
  22439. width: 250px;
  22440. background: #4fb13c;
  22441. height: 35px;
  22442. line-height: 35px;
  22443. color: #fff;
  22444. text-align: center;
  22445. font-size: 14px;
  22446. border-radius: 5px;
  22447. cursor: pointer;
  22448. }
  22449. .dialog_diy2>>>.el-dialog__body {
  22450. text-align: center;
  22451. }
  22452. .write_togother {
  22453. position: absolute;
  22454. right: 45px;
  22455. display: flex;
  22456. top: 5%;
  22457. }
  22458. .write_people {
  22459. font-size: 14px;
  22460. line-height: 50px;
  22461. padding-right: 10px;
  22462. }
  22463. .end_write {
  22464. background: #3d67bc;
  22465. color: #fff;
  22466. width: 100px;
  22467. height: 35px;
  22468. line-height: 35px;
  22469. text-align: center;
  22470. font-size: 14px;
  22471. border-radius: 5px;
  22472. cursor: pointer;
  22473. }
  22474. .chapter_upload+.chapter_upload {
  22475. /* margin-top: 15px; */
  22476. border-top: 1px solid #e7ebf1;
  22477. }
  22478. .chapter_upload {
  22479. height: 45px;
  22480. position: relative;
  22481. display: flex;
  22482. align-items: center;
  22483. width: 100%;
  22484. min-height: 45px;
  22485. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  22486. /* border-radius: 4px; */
  22487. /* overflow: hidden; */
  22488. box-sizing: border-box;
  22489. }
  22490. .chapter_upload_drag {
  22491. position: absolute;
  22492. cursor: pointer;
  22493. width: 16px;
  22494. height: 16px;
  22495. left: -9px;
  22496. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  22497. background-size: 100% 100%;
  22498. z-index: 10;
  22499. display: none;
  22500. }
  22501. .isNavStage>.chapter_upload_drag {
  22502. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  22503. }
  22504. .chapter_upload_t {
  22505. background-color: #fff;
  22506. position: absolute;
  22507. height: 100%;
  22508. top: 0px;
  22509. left: 0px;
  22510. box-sizing: border-box;
  22511. }
  22512. .chapter_upload_o {
  22513. width: 100%;
  22514. height: 100%;
  22515. position: relative;
  22516. z-index: 1;
  22517. }
  22518. .chapter_upload_ic {
  22519. margin: 0 15px 0px auto;
  22520. display: flex;
  22521. align-items: center;
  22522. }
  22523. .chapter_upload_ic_l {
  22524. width: 50px;
  22525. height: 50px;
  22526. float: left;
  22527. }
  22528. .chapter_upload_ic_l div {
  22529. width: 30px;
  22530. height: 35px;
  22531. background: url("../../../assets/icon/icon.png");
  22532. }
  22533. .chapter_upload_ic_edit {
  22534. height: 100%;
  22535. display: flex;
  22536. align-items: center;
  22537. cursor: pointer;
  22538. margin: 0 10px 0 0;
  22539. }
  22540. .chapter_upload_ic_edit div {
  22541. width: 18px;
  22542. height: 18px;
  22543. background-image: url("../../../assets/icon/new/edit_u.png");
  22544. background-size: 100% 100%;
  22545. }
  22546. .chapter_upload_ic_check {
  22547. height: 100%;
  22548. display: flex;
  22549. align-items: center;
  22550. cursor: pointer;
  22551. margin: 0 10px 0 0;
  22552. }
  22553. .chapter_upload_ic_check div {
  22554. width: 18px;
  22555. height: 18px;
  22556. background-image: url("../../../assets/icon/course/lookeye.svg");
  22557. background-size: 100% 100%;
  22558. }
  22559. .chapter_upload_ic_r {
  22560. height: 100%;
  22561. display: flex;
  22562. align-items: center;
  22563. cursor: pointer;
  22564. }
  22565. .chapter_upload_ic_r div {
  22566. width: 18px;
  22567. height: 18px;
  22568. background-image: url("../../../assets/icon/new/delete_u.png");
  22569. background-size: 100% 100%;
  22570. }
  22571. .chapter_upload_n {
  22572. display: flex;
  22573. text-indent: 10px;
  22574. text-decoration: none;
  22575. text-overflow: ellipsis;
  22576. white-space: nowrap;
  22577. overflow: hidden;
  22578. width: 55%;
  22579. margin-left: 10px;
  22580. cursor: pointer;
  22581. margin-top: 2px;
  22582. align-items: center;
  22583. }
  22584. .chapter_upload_l_i2,
  22585. .chapter_upload_l_i3,
  22586. .chapter_upload_l_i8,
  22587. .chapter_upload_l_i6,
  22588. .chapter_upload_l_i12,
  22589. .chapter_upload_l_i14,
  22590. .chapter_upload_l_i13 {
  22591. width: 15px;
  22592. height: 15px;
  22593. background-size: 100% 100%;
  22594. }
  22595. .chapter_upload_l_i2 {
  22596. background-image: url("../../../assets/icon/new/u_word.png");
  22597. }
  22598. .chapter_upload_l_i3 {
  22599. background-image: url("../../../assets/icon/new/u_video.png");
  22600. }
  22601. .chapter_upload_l_i8 {
  22602. background-image: url("../../../assets/icon/new/u_url.png");
  22603. }
  22604. .chapter_upload_l_i14 {
  22605. background-image: url("../../../assets/icon/new/u_source.png");
  22606. }
  22607. .chapter_upload_l_i6 {
  22608. background-image: url("../../../assets/icon/new/u_picture.png");
  22609. }
  22610. .chapter_upload_l_i12 {
  22611. background-image: url("../../../assets/icon/new/u_word.png");
  22612. }
  22613. .chapter_upload_l_i13 {
  22614. background-image: url("../../../assets/icon/new/u_img.png");
  22615. }
  22616. .chapter_upload_noSee {
  22617. background-image: url("../../../assets/icon/new/u_noUpload.png");
  22618. width: 18px;
  22619. height: 18px;
  22620. background-size: 100% 100%;
  22621. display: block;
  22622. margin-right: 10px;
  22623. }
  22624. .chapter_upload_ud {
  22625. display: flex;
  22626. flex-direction: row;
  22627. justify-content: center;
  22628. margin: 0 10px 0 0;
  22629. }
  22630. .chapter_upload_ud>.chapter_upload_up {
  22631. margin-bottom: 0;
  22632. margin-right: 10px;
  22633. }
  22634. .chapter_upload_down,
  22635. .chapter_upload_up {
  22636. width: 20px;
  22637. height: 20px;
  22638. background: #e4eaf2;
  22639. cursor: pointer;
  22640. margin: 0 auto;
  22641. border-radius: 5px;
  22642. display: flex;
  22643. justify-content: center;
  22644. align-items: center;
  22645. }
  22646. .chapter_upload_up::after,
  22647. .chapter_upload_down::after {
  22648. content: "";
  22649. background-image: url("../../../assets/icon/new/downBtn.png");
  22650. width: 13px;
  22651. height: 13px;
  22652. background-size: 100% 100%;
  22653. display: block;
  22654. }
  22655. .chapter_upload_up::after {
  22656. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  22657. }
  22658. .chapter_upload_up {
  22659. margin-bottom: 5px;
  22660. }
  22661. .chapter_upload_ud2 {
  22662. display: flex;
  22663. flex-direction: row;
  22664. justify-content: center;
  22665. margin: 0 10px 0 0;
  22666. }
  22667. .chapter_upload_ud2>.chapter_upload_up2 {
  22668. margin-bottom: 0;
  22669. margin-right: 10px;
  22670. }
  22671. .chapter_upload_down2,
  22672. .chapter_upload_up2 {
  22673. cursor: pointer;
  22674. margin: 0 auto;
  22675. border-radius: 5px;
  22676. display: flex;
  22677. justify-content: center;
  22678. align-items: center;
  22679. color: #717c8d;
  22680. font-size: 14px;
  22681. }
  22682. .chapter_upload_up2 {
  22683. margin-right: 10px;
  22684. }
  22685. .chapter_upload_up2::before,
  22686. .chapter_upload_down2::before {
  22687. content: "";
  22688. background-image: url("../../../assets/icon/new/c_down.png");
  22689. width: 14px;
  22690. height: 14px;
  22691. background-size: 100% 100%;
  22692. display: block;
  22693. margin-right: 5px;
  22694. }
  22695. .chapter_upload_up2::before {
  22696. background-image: url("../../../assets/icon/new/c_up.png") !important;
  22697. }
  22698. .addWordStyle {
  22699. display: flex;
  22700. flex-direction: row;
  22701. justify-content: flex-start;
  22702. overflow-x: auto;
  22703. white-space: nowrap;
  22704. flex-wrap: wrap;
  22705. }
  22706. /* table 样式 */
  22707. .cont>>>table {
  22708. border-top: 1px solid #ccc;
  22709. border-left: 1px solid #ccc;
  22710. }
  22711. .cont>>>table td,
  22712. .cont>>>table th {
  22713. border-bottom: 1px solid #ccc;
  22714. border-right: 1px solid #ccc;
  22715. /* padding: 20px 5px; */
  22716. padding: 5px 10px;
  22717. max-width: 0px;
  22718. height: 30px;
  22719. vertical-align: baseline;
  22720. }
  22721. .cont>>>table th {
  22722. border-bottom: 2px solid #ccc;
  22723. text-align: center;
  22724. }
  22725. /* blockquote 样式 */
  22726. .cont>>>blockquote {
  22727. display: block;
  22728. border-left: 8px solid #d0e5f2;
  22729. padding: 5px 10px;
  22730. margin: 10px 0;
  22731. line-height: 1.4;
  22732. font-size: 100%;
  22733. background-color: #f1f1f1;
  22734. }
  22735. /* code 样式 */
  22736. .cont>>>code {
  22737. display: inline-block;
  22738. /* *display: inline; */
  22739. zoom: 1;
  22740. background-color: #f1f1f1;
  22741. border-radius: 3px;
  22742. padding: 3px 5px;
  22743. margin: 0 3px;
  22744. }
  22745. .cont>>>pre code {
  22746. display: block;
  22747. }
  22748. /* ul ol 样式 */
  22749. .cont>>>ul,
  22750. ol {
  22751. margin: 10px 0 10px 20px;
  22752. }
  22753. .wordbox {
  22754. display: flex;
  22755. flex-wrap: wrap;
  22756. cursor: pointer;
  22757. width: 100%;
  22758. }
  22759. .checkword {
  22760. width: 22px;
  22761. height: 22px;
  22762. margin: 10px auto 0;
  22763. cursor: pointer;
  22764. }
  22765. .checkword img {
  22766. width: 100%;
  22767. }
  22768. .stepBg {
  22769. display: flex;
  22770. justify-content: space-between;
  22771. align-items: center;
  22772. background: #fff;
  22773. width: calc(100%);
  22774. margin: 0 auto;
  22775. }
  22776. .stepBorder {
  22777. height: 3px !important;
  22778. background: #cad1dc;
  22779. width: 100px !important;
  22780. margin: 0 15px !important;
  22781. position: relative;
  22782. }
  22783. .border-active {
  22784. background: #3681fc !important;
  22785. }
  22786. .border-active::before,
  22787. .border-active::after {
  22788. border-color: #3681fc !important;
  22789. }
  22790. .stepBorder::before,
  22791. .stepBorder::after {
  22792. content: "";
  22793. width: 9px;
  22794. height: 9px;
  22795. background: #ffffff;
  22796. opacity: 1;
  22797. border: 2px solid #acb4bf;
  22798. display: block;
  22799. box-sizing: border-box;
  22800. border-radius: 50%;
  22801. position: absolute;
  22802. top: 50%;
  22803. transform: translateY(-50%);
  22804. }
  22805. .stepBorder::after {
  22806. right: -9px;
  22807. }
  22808. .stepTop {
  22809. width: 100%;
  22810. /* border-radius: 10px; */
  22811. display: flex;
  22812. justify-content: center;
  22813. align-items: center;
  22814. flex-wrap: nowrap;
  22815. background: #fff;
  22816. /* top: 18%; */
  22817. height: 80px;
  22818. border-bottom: 2px solid rgb(228, 232, 237);
  22819. box-sizing: border-box;
  22820. }
  22821. .stepTop2 {
  22822. width: 100%;
  22823. /* border-radius: 10px; */
  22824. display: flex;
  22825. justify-content: center;
  22826. align-items: center;
  22827. flex-wrap: nowrap;
  22828. background: #fff;
  22829. /* top: 18%; */
  22830. height: 20px;
  22831. border-bottom: 2px solid rgb(228, 232, 237);
  22832. box-sizing: border-box;
  22833. overflow: hidden;
  22834. cursor: pointer;
  22835. }
  22836. .stepTop>div img {
  22837. width: 100%;
  22838. }
  22839. .stepTop>div {
  22840. height: 50px;
  22841. width: 180px;
  22842. cursor: pointer;
  22843. margin: 10px 0;
  22844. border-radius: 10px;
  22845. }
  22846. .first,
  22847. .second,
  22848. .third,
  22849. .four {
  22850. background: #3681fc;
  22851. height: 90px;
  22852. color: #fff;
  22853. display: flex;
  22854. flex-direction: row;
  22855. align-items: center;
  22856. justify-content: center;
  22857. }
  22858. .first>div:nth-child(1),
  22859. .second>div:nth-child(1),
  22860. .third>div:nth-child(1),
  22861. .four>div:nth-child(1) {
  22862. margin: 5px 10px 0 0;
  22863. width: 2rem;
  22864. }
  22865. .firstNo,
  22866. .secondNo,
  22867. .thirdNo,
  22868. .fourNo {
  22869. background: #e7e7e7;
  22870. color: #adadad;
  22871. display: flex;
  22872. flex-direction: row;
  22873. align-items: center;
  22874. justify-content: center;
  22875. }
  22876. .firstNo>div:nth-child(1),
  22877. .secondNo>div:nth-child(1),
  22878. .thirdNo>div:nth-child(1),
  22879. .fourNo>div:nth-child(1) {
  22880. margin: 5px 10px 0 0;
  22881. width: 2rem;
  22882. }
  22883. .uploadWidth>>>.el-upload {
  22884. width: 60px;
  22885. height: 60px;
  22886. position: relative;
  22887. }
  22888. .addPeople {
  22889. background: #fa6060;
  22890. width: 150px;
  22891. height: 40px;
  22892. color: #fff;
  22893. border-radius: 5px;
  22894. text-align: center;
  22895. line-height: 40px;
  22896. font-size: 14px;
  22897. cursor: pointer;
  22898. }
  22899. .kcImg {
  22900. width: 60px;
  22901. margin-left: 10px;
  22902. }
  22903. .zyImg {
  22904. width: 55px;
  22905. margin: 0 10px;
  22906. }
  22907. .deleteZy {
  22908. width: 20px;
  22909. position: absolute;
  22910. top: 5px;
  22911. right: 5px;
  22912. cursor: pointer;
  22913. }
  22914. .kcImg>img,
  22915. .zyImg>img,
  22916. .deleteZy>img {
  22917. width: 100%;
  22918. height: 100%;
  22919. }
  22920. .zyBox {
  22921. display: flex;
  22922. flex-direction: row;
  22923. align-items: center;
  22924. background: #67d37d;
  22925. color: #fff;
  22926. width: 210px;
  22927. margin: 20px 20px 0 0;
  22928. border-radius: 10px;
  22929. height: 70px;
  22930. position: relative;
  22931. }
  22932. .upCss {
  22933. display: flex;
  22934. flex-direction: row;
  22935. justify-content: flex-start;
  22936. }
  22937. .upCss>>>.el-icon-plus {
  22938. position: none !important;
  22939. width: 200px;
  22940. height: 100px;
  22941. display: flex;
  22942. flex-wrap: nowrap;
  22943. flex-direction: column;
  22944. align-items: center;
  22945. justify-content: center;
  22946. border: 1px dashed #ccc;
  22947. min-width: 78px;
  22948. min-height: 100px;
  22949. z-index: 999;
  22950. }
  22951. .upCss>>>.el-upload-list__item-name {
  22952. width: 100px;
  22953. white-space: nowrap;
  22954. overflow: hidden;
  22955. text-overflow: ellipsis;
  22956. }
  22957. .upCss>>>.el-upload-list__item .el-icon-close {
  22958. font-size: 20px;
  22959. z-index: 9999;
  22960. }
  22961. .addStageImg {
  22962. min-width: 20px;
  22963. min-height: 20px;
  22964. width: 20px;
  22965. height: 20px;
  22966. cursor: pointer;
  22967. }
  22968. .addHW {
  22969. width: 28px;
  22970. height: 28px;
  22971. cursor: pointer;
  22972. }
  22973. .addStageImg>img,
  22974. .addHW>img {
  22975. width: 100%;
  22976. height: 100%;
  22977. }
  22978. .addNewPP>>>.el-dialog__body {
  22979. padding: 5px 20px;
  22980. }
  22981. .addNewPP>>>.el-dialog {
  22982. margin-top: 5vh !important;
  22983. }
  22984. .addNewPP2>>>.el-dialog__body {
  22985. padding: 5px 0;
  22986. }
  22987. .addNewPP2>>>.el-dialog {
  22988. margin-top: 5vh !important;
  22989. }
  22990. .isHeight {
  22991. height: 680px;
  22992. }
  22993. .toolChoose {
  22994. display: flex;
  22995. /* width: 100%; */
  22996. flex-direction: row;
  22997. flex-wrap: wrap;
  22998. }
  22999. .tool,
  23000. .isToolChoose {
  23001. display: flex;
  23002. flex-direction: column;
  23003. flex-wrap: nowrap;
  23004. width: fit-content;
  23005. margin: 10px 0 10px 0;
  23006. align-items: center;
  23007. border: 2px solid #dbdbdb00;
  23008. padding: 10px 20px;
  23009. border-radius: 5px;
  23010. cursor: pointer;
  23011. /* box-shadow: 0 0 2px 0px #dedede; */
  23012. position: relative;
  23013. box-sizing: border-box;
  23014. }
  23015. .tool:hover {
  23016. border: 2px solid #a5c7ff;
  23017. }
  23018. .tool:hover>.noCTool {
  23019. display: block;
  23020. opacity: 0.5;
  23021. }
  23022. .isToolChoose {
  23023. border: 2px solid #438aff !important;
  23024. box-shadow: 0 0 2px 0px #438aff;
  23025. opacity: 1 !important;
  23026. }
  23027. .isCTool,
  23028. .noCTool {
  23029. width: 30px;
  23030. height: 30px;
  23031. position: absolute;
  23032. top: -4px;
  23033. right: -4px;
  23034. }
  23035. .noCTool {
  23036. display: none;
  23037. }
  23038. .isCTool>img,
  23039. .noCTool>img {
  23040. width: 100%;
  23041. height: 100%;
  23042. }
  23043. .tool+.tool {
  23044. margin-right: 10px;
  23045. }
  23046. .whiteBIcon {
  23047. width: 80px;
  23048. cursor: pointer;
  23049. display: flex;
  23050. flex-direction: column;
  23051. flex-wrap: nowrap;
  23052. align-items: center;
  23053. font-size: 14px;
  23054. }
  23055. .whiteBIcon>img,
  23056. .toolIcon>img,
  23057. .arrow>img {
  23058. width: 100%;
  23059. height: 100%;
  23060. }
  23061. .check img {
  23062. width: 20px;
  23063. height: 20px;
  23064. }
  23065. .whiteBIcon>img {
  23066. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  23067. border-radius: 15px;
  23068. }
  23069. .whiteBIcon>div:nth-child(2) {
  23070. height: 20px;
  23071. line-height: 20px;
  23072. }
  23073. .check {
  23074. /* width: 20px;
  23075. height: 20px; */
  23076. cursor: pointer;
  23077. margin: 10px 0 0;
  23078. }
  23079. .checkDiv {
  23080. display: flex;
  23081. align-items: center;
  23082. }
  23083. .checkDiv span {
  23084. margin-left: 5px;
  23085. color: #858585;
  23086. }
  23087. .customWidth>>>.el-dialog {
  23088. min-width: 600px !important;
  23089. }
  23090. .CollaborativeCss {
  23091. width: 100%;
  23092. display: flex;
  23093. justify-content: center;
  23094. align-items: center;
  23095. box-sizing: border-box;
  23096. padding: 10px 0;
  23097. cursor: pointer;
  23098. }
  23099. .CollaborativeCss >>> .el-tooltip {
  23100. overflow: hidden;
  23101. white-space: nowrap;
  23102. text-overflow: ellipsis;
  23103. }
  23104. .CollaborativeCss2 {
  23105. background: #e0eafb;
  23106. color: #3681fc;
  23107. font-weight: 700;
  23108. border-radius: 5px;
  23109. }
  23110. .a_addBox {
  23111. margin: 10px 0;
  23112. background: #fff;
  23113. padding: 15px;
  23114. /* max-height: 600px; */
  23115. overflow: auto;
  23116. }
  23117. .a_add_box {
  23118. border-bottom: 2px solid #eee;
  23119. padding-bottom: 25px;
  23120. }
  23121. .a_add_head {
  23122. display: flex;
  23123. align-items: center;
  23124. justify-content: space-between;
  23125. margin: 10px 0 0 0;
  23126. font-size: 18px;
  23127. }
  23128. .a_add_checkType {
  23129. margin-top: 10px;
  23130. display: flex;
  23131. font-size: 14px;
  23132. align-items: center;
  23133. }
  23134. .a_add_checkType span {
  23135. box-sizing: border-box;
  23136. padding: 0 0 5px 0;
  23137. cursor: pointer;
  23138. }
  23139. .a_add_checkType span+span {
  23140. margin-left: 10px;
  23141. }
  23142. .a_add_checkType .active {
  23143. border-bottom: 2px solid #409eff;
  23144. color: #409eff;
  23145. }
  23146. .a_add_head .a_add_head_input {
  23147. /* width: 540px; */
  23148. width: 100%;
  23149. }
  23150. .a_add_head .a_add_head_div {
  23151. display: flex;
  23152. align-items: center;
  23153. justify-content: space-between;
  23154. }
  23155. .a_add_body {
  23156. display: flex;
  23157. /* align-items: center; */
  23158. align-items: flex-end;
  23159. }
  23160. .a_add_input {
  23161. display: flex;
  23162. align-items: center;
  23163. flex-wrap: wrap;
  23164. }
  23165. .a_add_input_choice {
  23166. flex-direction: column;
  23167. margin-right: 10px;
  23168. }
  23169. .a_add_input_choice>>>.el-radio {
  23170. display: flex;
  23171. align-items: center;
  23172. flex-direction: row-reverse;
  23173. margin: 30px 0 0 0;
  23174. position: relative;
  23175. }
  23176. .a_add_input_choice>>>.el-checkbox {
  23177. display: flex;
  23178. align-items: center;
  23179. flex-direction: row-reverse;
  23180. margin: 30px 0 0 0;
  23181. position: relative;
  23182. }
  23183. .width100 {
  23184. width: 100%;
  23185. }
  23186. .a_add_input .a_add_persent {
  23187. width: 100%;
  23188. }
  23189. .a_add_persent_div {
  23190. width: 100%;
  23191. display: flex;
  23192. align-items: center;
  23193. }
  23194. .a_add_persent_div span {
  23195. margin: 5px 0;
  23196. }
  23197. .a_add_persent_div span:nth-child(1) {
  23198. width: 30%;
  23199. }
  23200. .a_add_persent_div span:nth-child(2) {
  23201. width: 7%;
  23202. }
  23203. .a_add_persent_div span:nth-child(3) {
  23204. width: 40%;
  23205. }
  23206. .a_add_body_div {
  23207. display: flex;
  23208. align-items: center;
  23209. justify-content: center;
  23210. /* flex-direction: column; */
  23211. position: absolute;
  23212. right: -20px;
  23213. transform: translateX(100%);
  23214. }
  23215. .a_add_body_div>>>.el-button--primary {
  23216. background: #466b99;
  23217. border: none;
  23218. }
  23219. .all_choose {
  23220. display: flex;
  23221. flex-direction: row;
  23222. align-items: flex-start;
  23223. width: 100%;
  23224. }
  23225. .all_choose+.all_choose {
  23226. /* margin-top: 10px */
  23227. }
  23228. .all_choose>span {
  23229. min-width: fit-content;
  23230. display: block;
  23231. white-space: nowrap;
  23232. overflow: hidden;
  23233. text-overflow: ellipsis;
  23234. margin-right: 20px;
  23235. font-weight: bold;
  23236. font-size: 14px;
  23237. }
  23238. .all_choose>>>.el-checkbox-group {
  23239. display: flex;
  23240. flex-direction: row;
  23241. width: 100%;
  23242. flex-wrap: wrap;
  23243. align-content: center;
  23244. justify-content: flex-start;
  23245. align-items: center;
  23246. margin-top: 3px;
  23247. }
  23248. .all_choose>.el-checkbox-group>>>.el-checkbox {
  23249. margin-bottom: 10px;
  23250. display: flex;
  23251. flex-direction: row;
  23252. align-items: center;
  23253. margin-right: 10px;
  23254. }
  23255. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  23256. min-width: 80px;
  23257. overflow: hidden;
  23258. width: 80px;
  23259. text-overflow: ellipsis;
  23260. white-space: nowrap;
  23261. }
  23262. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  23263. width: auto;
  23264. }
  23265. .choose>div:nth-child(3)>span {
  23266. /* letter-spacing: 0 !important; */
  23267. }
  23268. .choose {
  23269. display: flex;
  23270. flex-direction: column;
  23271. flex-wrap: nowrap;
  23272. height: 100%;
  23273. justify-content: space-evenly;
  23274. align-items: flex-start;
  23275. }
  23276. .both {
  23277. display: flex;
  23278. flex-direction: row;
  23279. flex-wrap: wrap;
  23280. width: 100%;
  23281. align-items: center;
  23282. justify-content: flex-start;
  23283. margin: 15px 0;
  23284. }
  23285. .notice>>>.el-dialog {
  23286. width: 500px !important;
  23287. text-align: center;
  23288. }
  23289. .notice>>>.el-button {
  23290. margin-top: 20px;
  23291. }
  23292. .whiteBg {
  23293. /* background: #fff; */
  23294. border-radius: 10px;
  23295. }
  23296. .wb_j_box {
  23297. display: flex;
  23298. width: 100%;
  23299. padding: 0 20px 0;
  23300. box-sizing: border-box;
  23301. }
  23302. .wb_j_box_content {
  23303. width: calc(100% - 55% - 100px);
  23304. display: flex;
  23305. align-items: center;
  23306. }
  23307. .wb_j_box_p_box {
  23308. max-width: calc(100% - 200px);
  23309. word-break: break-all;
  23310. overflow: hidden;
  23311. margin: 0 0 0 10px;
  23312. font-size: 14px;
  23313. color: #6e6e6e;
  23314. z-index: 999;
  23315. }
  23316. .chooseWho {
  23317. display: flex;
  23318. width: 410px;
  23319. flex-direction: row;
  23320. flex-wrap: nowrap;
  23321. justify-content: space-between;
  23322. padding-bottom: 10px;
  23323. }
  23324. .chooseWho>div {
  23325. cursor: pointer;
  23326. padding-bottom: 10px;
  23327. font-weight: bold;
  23328. }
  23329. .isChooseActive {
  23330. color: #3e88f4;
  23331. border-bottom: 2px solid #2f80f3;
  23332. }
  23333. .toolSort {
  23334. display: flex;
  23335. flex-direction: row;
  23336. flex-wrap: wrap;
  23337. justify-content: flex-start;
  23338. align-items: flex-start;
  23339. }
  23340. .toolSort>div {
  23341. margin-right: 10px;
  23342. }
  23343. .tools {
  23344. width: 100%;
  23345. display: flex;
  23346. flex-direction: column;
  23347. flex-wrap: nowrap;
  23348. align-items: flex-start;
  23349. }
  23350. .leftTools,
  23351. .rightTools {
  23352. width: 50%;
  23353. }
  23354. .leftTools+.leftTools {
  23355. border-top: 1px solid #dbdbdb;
  23356. padding-top: 30px;
  23357. }
  23358. .rightTools {
  23359. display: flex;
  23360. flex-direction: row;
  23361. flex-wrap: nowrap;
  23362. justify-content: space-around;
  23363. }
  23364. .firstToolList {
  23365. display: flex;
  23366. flex-direction: column;
  23367. flex-wrap: nowrap;
  23368. align-items: center;
  23369. }
  23370. .iconList {
  23371. display: flex;
  23372. flex-direction: row;
  23373. flex-wrap: wrap;
  23374. justify-content: flex-start;
  23375. align-items: center;
  23376. margin: 20px 0 5px 0;
  23377. width: 240px;
  23378. min-width: 240px;
  23379. }
  23380. .iconTool {
  23381. display: flex;
  23382. flex-direction: column;
  23383. flex-wrap: nowrap;
  23384. align-items: center;
  23385. justify-content: flex-start;
  23386. margin: 15px 10px;
  23387. }
  23388. .toolIcon {
  23389. width: 50px;
  23390. }
  23391. .taskBorder {
  23392. /* border: 1px solid #CAD1DC; */
  23393. border-radius: 10px;
  23394. margin-top: 10px;
  23395. min-height: 670px;
  23396. position: relative;
  23397. background: #fff;
  23398. padding: 20px;
  23399. overflow: hidden;
  23400. box-sizing: border-box;
  23401. }
  23402. .smallTaskBorder {
  23403. height: 405px;
  23404. min-height: 405px !important;
  23405. overflow: hidden;
  23406. }
  23407. /* .taskBorder>div {
  23408. padding: 30px 30px 10px;
  23409. } */
  23410. .addTaskBorder {
  23411. /* border: 2px solid #5E9AFC; */
  23412. border-radius: 8px;
  23413. margin-top: 10px;
  23414. cursor: pointer;
  23415. /* height: 50px;
  23416. line-height: 50px; */
  23417. background: #fff;
  23418. padding: 15px 0;
  23419. display: flex;
  23420. align-items: center;
  23421. justify-content: center;
  23422. }
  23423. /* .addTaskBorder>div {
  23424. margin: 0 auto;
  23425. display: flex;
  23426. align-items: center;
  23427. justify-content: center;
  23428. }
  23429. .addTaskBorder>div>img {
  23430. width: 20px;
  23431. }
  23432. .addTaskBorder>div>span {
  23433. font-size: 16px;
  23434. margin-left: 10px;
  23435. color: #5E9AFC;
  23436. } */
  23437. .funBlock {
  23438. display: flex;
  23439. padding: 15px 0;
  23440. flex-direction: row;
  23441. justify-content: center;
  23442. align-items: center;
  23443. position: absolute;
  23444. right: 0;
  23445. bottom: 0;
  23446. background: #fff;
  23447. width: 100%;
  23448. height: 60px;
  23449. z-index: 9;
  23450. }
  23451. .fold {
  23452. display: flex;
  23453. margin: 0 20px;
  23454. flex-direction: row;
  23455. align-items: center;
  23456. cursor: pointer;
  23457. color: #2b7bff;
  23458. }
  23459. .arrow {
  23460. margin-right: 8px;
  23461. width: 16px;
  23462. height: 16px;
  23463. min-width: 16px;
  23464. min-height: 16px;
  23465. background-size: 100% 100%;
  23466. display: block;
  23467. background-image: url(../../../assets/icon/new/u_up.png);
  23468. /* border-left: 7px solid transparent;
  23469. border-bottom: 7px solid #717C8D;
  23470. border-top: 0px solid transparent;
  23471. border-right: 7px solid transparent; */
  23472. /* box-sizing: border-box; */
  23473. transition: all 0.3s;
  23474. }
  23475. .arrowZ {
  23476. transform: rotate(180deg);
  23477. }
  23478. .addToolFun {
  23479. display: flex;
  23480. width: 150px;
  23481. flex-direction: row;
  23482. align-items: center;
  23483. justify-content: center;
  23484. border: 2px dashed #cad1dc;
  23485. border-radius: 5px;
  23486. height: 50px;
  23487. margin: 35px auto 0;
  23488. cursor: pointer;
  23489. }
  23490. .addToolFun2 {
  23491. display: flex;
  23492. width: 150px;
  23493. border: 2px dashed #cad1dc;
  23494. flex-direction: row;
  23495. align-items: center;
  23496. justify-content: center;
  23497. border-radius: 5px;
  23498. height: 50px;
  23499. margin: 0 auto 0;
  23500. cursor: pointer;
  23501. }
  23502. .addToolFun2>div,
  23503. .addToolFun>div {
  23504. display: flex;
  23505. line-height: 50px;
  23506. }
  23507. .addToolImg {
  23508. width: 20px;
  23509. height: 20px;
  23510. margin-right: 10px;
  23511. }
  23512. .addToolsDia>>>.el-dialog__body {
  23513. padding: 20px;
  23514. }
  23515. .addToolsDia>>>.el-dialog__body>.toolChoose {
  23516. padding: 0;
  23517. }
  23518. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  23519. padding: 0;
  23520. border-bottom: none;
  23521. margin-bottom: 0;
  23522. }
  23523. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  23524. width: 100%;
  23525. }
  23526. .lineCss>>>.el-form-item__label {
  23527. width: auto !important;
  23528. }
  23529. .lineCss>>>.el-form-item__content {
  23530. margin-left: 50px !important;
  23531. }
  23532. .newSteps {
  23533. display: flex;
  23534. width: 100% !important;
  23535. /* height: 80px; */
  23536. cursor: pointer;
  23537. margin: 10px 0;
  23538. border-radius: 10px;
  23539. flex-direction: row;
  23540. align-content: center;
  23541. justify-content: center;
  23542. align-items: center;
  23543. margin: 0 !important;
  23544. }
  23545. /* 评价样式 */
  23546. .elist_css {
  23547. padding-bottom: 75px !important;
  23548. }
  23549. .elist_title {
  23550. margin-bottom: 10px;
  23551. }
  23552. .elist_input {
  23553. width: 100%;
  23554. }
  23555. .elist_input_box {
  23556. display: flex;
  23557. align-items: center;
  23558. flex-wrap: wrap;
  23559. }
  23560. .elist_input_box+.elist_input_box {
  23561. margin-top: 30px;
  23562. }
  23563. .elist_input .elist_input_box input {
  23564. font: inherit;
  23565. color: currentColor;
  23566. width: 100%;
  23567. /* max-width: calc(100% - 385px); */
  23568. max-width: calc(100% - 150px);
  23569. padding: 8px 14px;
  23570. display: block;
  23571. min-width: 0;
  23572. outline: none;
  23573. border: 1px solid rgba(0, 0, 0, 0.23);
  23574. border-radius: 4px;
  23575. box-sizing: border-box;
  23576. background: #fff;
  23577. margin: 0 20px 0 0;
  23578. }
  23579. .elist_input .elist_input_box span {
  23580. height: 36px;
  23581. line-height: 36px;
  23582. color: rgb(82, 82, 82);
  23583. min-width: 80px;
  23584. }
  23585. .elist_input .elist_input_box .remove {
  23586. height: 20px;
  23587. width: 20px;
  23588. min-height: 20px;
  23589. min-width: 20px;
  23590. background-size: 100% 100%;
  23591. background-position: unset;
  23592. margin-left: 5px;
  23593. }
  23594. .elist_input_box>>>.el-rate {
  23595. display: flex;
  23596. height: 36px;
  23597. align-items: center;
  23598. }
  23599. .elist_input_box .elist_inptu_text {
  23600. width: 100%;
  23601. display: flex;
  23602. align-items: center;
  23603. margin-top: 10px;
  23604. }
  23605. .elist_input_box .elist_inptu_text input {
  23606. /* width: 500px; */
  23607. width: 100%;
  23608. max-width: unset;
  23609. }
  23610. .elist_input_box>>>.el-rate__icon {
  23611. font-size: 24px;
  23612. }
  23613. .elist_btn {
  23614. margin-top: 10px;
  23615. }
  23616. .lineTitle {
  23617. /* margin-top: 15px; */
  23618. width: 110px;
  23619. font-size: 16px;
  23620. display: flex;
  23621. align-items: center;
  23622. line-height: 20px;
  23623. }
  23624. .lineTitle::before {
  23625. content: "";
  23626. display: block;
  23627. width: 3px;
  23628. height: 20px;
  23629. background: #0061ff;
  23630. border-radius: 3px;
  23631. margin: 0 5px 0 0;
  23632. }
  23633. .clineTitle::before {
  23634. content: "";
  23635. display: block;
  23636. min-width: 10px;
  23637. width: 10px;
  23638. height: 10px;
  23639. background: #0061ff;
  23640. border-radius: 50%;
  23641. margin: 0 5px 0 0;
  23642. }
  23643. .courseTop {
  23644. display: flex;
  23645. flex-direction: row;
  23646. justify-content: space-between;
  23647. align-items: center;
  23648. width: calc(100% - 40px);
  23649. margin: 0 auto;
  23650. padding: 10px 0;
  23651. }
  23652. .stepsNav {
  23653. display: flex;
  23654. flex-direction: row;
  23655. justify-content: flex-start;
  23656. align-items: center;
  23657. }
  23658. .stepsWord {
  23659. font-size: 18px;
  23660. color: #fff;
  23661. font-weight: bold;
  23662. margin-left: auto;
  23663. background: rgb(15, 126, 255);
  23664. border-radius: 5px;
  23665. padding: 3px 25px;
  23666. box-sizing: border-box;
  23667. }
  23668. .stepBox {
  23669. width: calc(100% - 40px);
  23670. height: calc(100% - 50px);
  23671. overflow: hidden;
  23672. border-radius: 5px;
  23673. margin: 0 auto;
  23674. }
  23675. .rightBox {
  23676. width: calc(100%);
  23677. background: #f0f2f5;
  23678. /* border-radius: 10px; */
  23679. overflow: auto;
  23680. height: calc(100% - 150px);
  23681. margin: 0 auto;
  23682. position: relative;
  23683. box-sizing: border-box;
  23684. }
  23685. .e_add_top {
  23686. display: flex;
  23687. justify-content: space-between;
  23688. background: #fff;
  23689. position: absolute;
  23690. right: 20px;
  23691. height: 50px;
  23692. align-items: center;
  23693. }
  23694. .e_add_title2 {
  23695. display: flex;
  23696. align-items: center;
  23697. }
  23698. .e_add_title2 span {
  23699. width: 40px;
  23700. }
  23701. .e_add_title {
  23702. display: flex;
  23703. align-items: center;
  23704. color: #b8b8b8;
  23705. font-size: 18px;
  23706. position: relative;
  23707. height: 40px;
  23708. }
  23709. .e_add_title span {
  23710. margin-right: 10px;
  23711. }
  23712. .e_add_title .el_input {
  23713. width: 300px;
  23714. }
  23715. .e_add_title>>>.el-input__inner {
  23716. width: 400px;
  23717. }
  23718. .e_add_btn {}
  23719. .e_add_content {
  23720. display: flex;
  23721. width: 100%;
  23722. }
  23723. .e_add_list {
  23724. background: #fff;
  23725. height: 500px;
  23726. width: 210px;
  23727. position: relative;
  23728. margin: 15px 5px 0 0;
  23729. flex-shrink: 0;
  23730. display: flex;
  23731. flex-direction: column;
  23732. }
  23733. .e_add_list_title {
  23734. font-size: 20px;
  23735. width: 100%;
  23736. box-sizing: border-box;
  23737. padding: 15px 40px;
  23738. text-align: center;
  23739. border-bottom: 1px solid #eaeaea;
  23740. position: relative;
  23741. display: flex;
  23742. align-items: center;
  23743. justify-content: center;
  23744. height: 57px;
  23745. background: #f6f6f6;
  23746. }
  23747. .e_add_list_title span {
  23748. overflow: hidden;
  23749. white-space: nowrap;
  23750. text-overflow: ellipsis;
  23751. }
  23752. .e_add_list_title img {
  23753. position: absolute;
  23754. right: 15px;
  23755. width: 25px;
  23756. cursor: pointer;
  23757. top: 50%;
  23758. transform: translateY(-50%);
  23759. }
  23760. .e_add_list_body {
  23761. height: calc(100% - 187px);
  23762. overflow: auto;
  23763. }
  23764. .e_add_list_child {
  23765. width: 100%;
  23766. display: flex;
  23767. align-items: center;
  23768. justify-content: center;
  23769. position: relative;
  23770. box-sizing: border-box;
  23771. padding: 15px 40px;
  23772. text-align: center;
  23773. }
  23774. .e_add_list_child span {
  23775. overflow: hidden;
  23776. white-space: nowrap;
  23777. text-overflow: ellipsis;
  23778. cursor: pointer;
  23779. }
  23780. .e_add_list_child img {
  23781. position: absolute;
  23782. right: 10px;
  23783. width: 21px;
  23784. cursor: pointer;
  23785. top: 50%;
  23786. transform: translateY(-50%);
  23787. }
  23788. .e_add_list_child+.e_add_list_child {
  23789. border-top: 1px solid #eaeaea;
  23790. }
  23791. .e_add_list_child .active {
  23792. color: #409eff;
  23793. }
  23794. .e_add_list_btn {
  23795. position: absolute;
  23796. bottom: 0;
  23797. height: 50px;
  23798. background: rgb(120, 120, 254);
  23799. width: 100%;
  23800. color: #fff;
  23801. font-size: 16px;
  23802. text-align: center;
  23803. line-height: 50px;
  23804. cursor: pointer;
  23805. }
  23806. .e_add_list_detail {
  23807. position: absolute;
  23808. bottom: 0;
  23809. height: 130px;
  23810. background: rgb(120, 120, 254);
  23811. width: 100%;
  23812. color: #fff;
  23813. font-size: 16px;
  23814. display: flex;
  23815. align-items: center;
  23816. justify-content: center;
  23817. }
  23818. .e_add_list_detail textarea {
  23819. height: 90%;
  23820. width: 95%;
  23821. border: none;
  23822. resize: none;
  23823. outline: none;
  23824. padding: 5px;
  23825. box-sizing: border-box;
  23826. }
  23827. .e_add_list_pbox {
  23828. width: 100%;
  23829. }
  23830. .e_add_list_pbox_title {
  23831. height: 50px;
  23832. background: #fff;
  23833. display: flex;
  23834. align-items: center;
  23835. width: 100%;
  23836. box-sizing: border-box;
  23837. padding: 0 20px;
  23838. flex-direction: row;
  23839. flex-wrap: wrap;
  23840. }
  23841. .type_title {
  23842. font-size: 18px;
  23843. font-weight: 700;
  23844. }
  23845. .type_content {
  23846. font-size: 16px;
  23847. margin-left: 30px;
  23848. }
  23849. .type_content span+span {
  23850. margin-left: 20px;
  23851. }
  23852. .type_content span {
  23853. cursor: pointer;
  23854. padding-bottom: 5px;
  23855. box-sizing: border-box;
  23856. }
  23857. .type_content .active {
  23858. color: #409eff;
  23859. border-bottom: 2px solid #409eff;
  23860. }
  23861. .e_add_list_pbox_content {
  23862. height: calc(100% - 50px);
  23863. display: flex;
  23864. align-items: center;
  23865. width: 100%;
  23866. background: #fff;
  23867. }
  23868. .mbCss {
  23869. width: 100%;
  23870. display: flex;
  23871. flex-direction: row;
  23872. flex-wrap: nowrap;
  23873. align-content: center;
  23874. align-items: flex-start;
  23875. justify-content: flex-start;
  23876. }
  23877. .pjCss {
  23878. /* width: 42%; */
  23879. width: calc(100% - 55%);
  23880. display: flex;
  23881. flex-direction: column;
  23882. flex-wrap: nowrap;
  23883. align-items: flex-start;
  23884. }
  23885. .e_box {
  23886. /* display: flex; */
  23887. flex-wrap: wrap;
  23888. max-height: 500px;
  23889. align-items: flex-start;
  23890. overflow: auto;
  23891. width: 100%;
  23892. }
  23893. .e_card {
  23894. border: 1px solid #ccc;
  23895. background: #fff;
  23896. margin-right: 20px;
  23897. width: 270px;
  23898. display: flex;
  23899. flex-direction: column;
  23900. align-items: center;
  23901. border-radius: 5px;
  23902. margin-top: 10px;
  23903. text-align: center;
  23904. }
  23905. .e_card_picture {
  23906. margin: 10px 0;
  23907. }
  23908. .e_card_picture>img {
  23909. width: 50px;
  23910. }
  23911. .e_card_name {
  23912. width: 100%;
  23913. padding: 0 10px;
  23914. box-sizing: border-box;
  23915. margin-bottom: 10px;
  23916. overflow: hidden;
  23917. text-overflow: ellipsis;
  23918. white-space: nowrap;
  23919. }
  23920. .e_card_time {
  23921. width: 100%;
  23922. padding: 0 10px;
  23923. box-sizing: border-box;
  23924. font-size: 15px;
  23925. color: #c3c3c3;
  23926. margin-bottom: 10px;
  23927. }
  23928. .e_card_btn {
  23929. height: 40px;
  23930. display: flex;
  23931. align-items: center;
  23932. width: 100%;
  23933. background: rgb(244, 244, 244);
  23934. }
  23935. .e_card_btn:hover {
  23936. background: rgb(221 221 221);
  23937. }
  23938. .e_card_btn span {
  23939. flex: 1 1 auto;
  23940. text-align: center;
  23941. cursor: pointer;
  23942. }
  23943. .addEva {
  23944. border: 1px solid #ccc;
  23945. background: #fff;
  23946. margin-right: 20px;
  23947. width: 270px;
  23948. height: 149px;
  23949. display: flex;
  23950. flex-direction: column;
  23951. align-items: center;
  23952. border-radius: 5px;
  23953. margin-top: 10px;
  23954. text-align: center;
  23955. cursor: pointer;
  23956. justify-content: center;
  23957. }
  23958. .addEva>img {
  23959. width: 50px;
  23960. object-fit: cover;
  23961. }
  23962. .uploadFm {
  23963. border: 1px dashed #ccc;
  23964. width: 100%;
  23965. height: 140px;
  23966. position: relative;
  23967. cursor: pointer;
  23968. display: flex;
  23969. flex-direction: column;
  23970. justify-content: center;
  23971. align-items: center;
  23972. font-size: 14px;
  23973. color: #6e6e6e;
  23974. position: relative;
  23975. }
  23976. .cover_p {
  23977. width: 100% !important;
  23978. height: 100%;
  23979. object-fit: cover;
  23980. }
  23981. .uploadFm2:hover .cover_mask {
  23982. display: flex !important;
  23983. }
  23984. .cover_mask {
  23985. display: none;
  23986. width: 100%;
  23987. height: 100%;
  23988. position: absolute;
  23989. background: #00000054;
  23990. align-items: center;
  23991. justify-content: center;
  23992. flex-direction: column;
  23993. }
  23994. .cover_mask>img {
  23995. width: 30px;
  23996. }
  23997. .cover_mask>span {
  23998. color: #fff;
  23999. font-size: 12px;
  24000. }
  24001. .uploadFm>img {
  24002. width: 50px;
  24003. }
  24004. .fileCss {
  24005. width: 100%;
  24006. display: flex;
  24007. flex-direction: row;
  24008. flex-wrap: nowrap;
  24009. justify-content: space-around;
  24010. align-items: center;
  24011. padding-top: 15px;
  24012. }
  24013. .fileCss>div {
  24014. display: flex;
  24015. flex-direction: column;
  24016. align-items: center;
  24017. }
  24018. .fileCss .spanName {
  24019. margin-top: 10px;
  24020. }
  24021. .sysPicBox {
  24022. display: flex;
  24023. flex-direction: row;
  24024. flex-wrap: wrap;
  24025. align-content: flex-start;
  24026. height: 435px;
  24027. overflow: auto;
  24028. position: relative;
  24029. }
  24030. .picNone {
  24031. position: absolute;
  24032. left: 50%;
  24033. top: 45%;
  24034. transform: translate(-50%, -50%);
  24035. width: fit-content;
  24036. color: #9c9c9c;
  24037. }
  24038. .sysPic {
  24039. width: 200px;
  24040. height: 115px;
  24041. margin: 0 20px 20px 0;
  24042. cursor: pointer;
  24043. }
  24044. .sysPic>img,
  24045. .isSysPic>img,
  24046. .deletePic>img {
  24047. width: 100%;
  24048. height: 100%;
  24049. object-fit: cover;
  24050. }
  24051. .isSysPic {
  24052. width: 200px;
  24053. height: 115px;
  24054. position: relative;
  24055. }
  24056. .deletePic {
  24057. width: 20px;
  24058. height: 20px;
  24059. position: absolute;
  24060. top: 0;
  24061. right: 0;
  24062. cursor: pointer;
  24063. }
  24064. .select_box1 {
  24065. height: 100%;
  24066. }
  24067. .select_box1_img {
  24068. background: #fff;
  24069. border-radius: 5px;
  24070. padding: 15px;
  24071. box-sizing: border-box;
  24072. margin-bottom: 20px;
  24073. }
  24074. .select_box1_title {
  24075. padding: 0 0 15px 0;
  24076. border-bottom: 1px solid #eee;
  24077. margin-bottom: 15px;
  24078. }
  24079. .select_box1_title span:nth-child(1) {
  24080. font-size: 16px;
  24081. margin-right: 20px;
  24082. color: #000;
  24083. }
  24084. .select_box1_title span:nth-child(2) {
  24085. font-size: 14px;
  24086. color: rgb(112, 112, 112);
  24087. }
  24088. .select_box1_add_img {}
  24089. .select_box1_select {
  24090. background: #fff;
  24091. border-radius: 5px;
  24092. padding: 15px;
  24093. box-sizing: border-box;
  24094. height: calc(100% - 200px);
  24095. overflow: auto;
  24096. }
  24097. .select_box2 {
  24098. height: 100%;
  24099. }
  24100. .select_box2_title {
  24101. background: #fff;
  24102. border-radius: 5px;
  24103. padding: 5px 10px;
  24104. box-sizing: border-box;
  24105. margin-bottom: 10px;
  24106. }
  24107. .select_box2_box {
  24108. display: flex;
  24109. height: calc(100% - 30px);
  24110. }
  24111. .select_box2_img {
  24112. width: calc(100% - 310px);
  24113. height: 100%;
  24114. overflow: auto;
  24115. background: #fff;
  24116. border-radius: 5px;
  24117. }
  24118. .select_box2_img img {
  24119. width: 100%;
  24120. }
  24121. .select_box2_answer {
  24122. background: #fff;
  24123. margin-left: 10px;
  24124. border-radius: 5px;
  24125. width: 300px;
  24126. overflow: auto;
  24127. height: 100%;
  24128. display: flex;
  24129. flex-direction: column;
  24130. align-items: center;
  24131. padding-top: 10px;
  24132. box-sizing: border-box;
  24133. }
  24134. .select_box2_answer_box {
  24135. margin: 0 0 10px 0;
  24136. width: 85%;
  24137. }
  24138. .rate_textarea {
  24139. font: inherit;
  24140. color: currentColor;
  24141. width: 100%;
  24142. padding: 8px 14px;
  24143. display: block;
  24144. min-width: 0;
  24145. outline: none;
  24146. border: 1px solid rgba(0, 0, 0, 0.23);
  24147. border-radius: 4px;
  24148. box-sizing: border-box;
  24149. background: #fff;
  24150. margin: 0 20px 0 0;
  24151. resize: none;
  24152. }
  24153. .select_answer_title {
  24154. text-align: left;
  24155. width: 85%;
  24156. margin-bottom: 10px;
  24157. font-size: 18px;
  24158. color: #8e8e8e;
  24159. }
  24160. .mask {
  24161. background-color: rgb(0 0 0 / 30%);
  24162. /* position: fixed; */
  24163. position: absolute;
  24164. top: 0;
  24165. left: 0;
  24166. width: 100%;
  24167. height: 100%;
  24168. z-index: 90;
  24169. display: flex;
  24170. align-items: center;
  24171. justify-content: center;
  24172. }
  24173. .progressBox {
  24174. width: 300px;
  24175. height: 150px;
  24176. background: #fff;
  24177. border-radius: 10px;
  24178. box-shadow: 0 0 6px 1px #bfbfbf;
  24179. display: flex;
  24180. align-items: center;
  24181. justify-content: center;
  24182. flex-direction: column;
  24183. position: relative;
  24184. color: #6c6c6c;
  24185. }
  24186. .progressBox>>>.el-progress-bar__outer {
  24187. background-color: #d1dfff !important;
  24188. }
  24189. .progressBox .lbox {
  24190. height: 50px;
  24191. font-size: 19px;
  24192. display: flex;
  24193. align-items: center;
  24194. color: #747474;
  24195. }
  24196. .progressBox .lbox img {
  24197. width: 40px;
  24198. margin-right: 20px;
  24199. }
  24200. .closeCss {
  24201. position: absolute;
  24202. top: 8px;
  24203. right: 8px;
  24204. cursor: pointer;
  24205. width: 20px;
  24206. height: 20px;
  24207. }
  24208. .closeCss>img {
  24209. width: 100%;
  24210. height: 100%;
  24211. }
  24212. .updateTips::before {
  24213. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  24214. font-size: 14px;
  24215. margin-left: 20px;
  24216. font-weight: 400;
  24217. color: #ff3a3a;
  24218. margin-bottom: 10px;
  24219. display: block;
  24220. }
  24221. .updateMask {
  24222. width: 100%;
  24223. z-index: 3;
  24224. top: 0;
  24225. position: absolute;
  24226. /* background-color: rgba(0,0,0,.3); */
  24227. }
  24228. .t_j_box {
  24229. display: flex;
  24230. }
  24231. .t_j_box span:nth-child(1) {
  24232. width: 15%;
  24233. overflow: hidden;
  24234. margin-right: 10px;
  24235. text-overflow: ellipsis;
  24236. white-space: nowrap;
  24237. }
  24238. .t_j_box span:nth-child(2) {
  24239. width: 30%;
  24240. overflow: hidden;
  24241. text-overflow: ellipsis;
  24242. margin-right: 10px;
  24243. }
  24244. .t_j_box span:nth-child(3) {
  24245. max-width: calc(55% - 20px);
  24246. overflow: hidden;
  24247. text-overflow: ellipsis;
  24248. }
  24249. .sentenBox {
  24250. background: #fff;
  24251. height: 600px;
  24252. overflow: auto;
  24253. background-image: url("../../../assets/icon/conSentences/csBg.png");
  24254. background-position: 102%;
  24255. background-repeat: no-repeat;
  24256. background-size: 60%;
  24257. }
  24258. .sentenBox>.sentenContent {
  24259. padding-bottom: 10px;
  24260. width: 97%;
  24261. margin: 0 auto;
  24262. }
  24263. .sentenBox>.sentenContent+.sentenContent {
  24264. border-top: 1px solid #cbcbcb;
  24265. }
  24266. .addSen {
  24267. background: #409efe;
  24268. width: 90px;
  24269. color: #fff;
  24270. height: 35px;
  24271. text-align: center;
  24272. line-height: 35px;
  24273. border-radius: 5px;
  24274. float: right;
  24275. margin: 10px 20px 0 0;
  24276. cursor: pointer;
  24277. }
  24278. .sentenTop {
  24279. display: flex;
  24280. flex-direction: row;
  24281. flex-wrap: nowrap;
  24282. align-items: center;
  24283. }
  24284. .sentenTop::before {
  24285. content: attr(index);
  24286. background: #3681fc;
  24287. border-radius: 50%;
  24288. color: #fff;
  24289. width: 25px;
  24290. height: 25px;
  24291. min-width: 25px;
  24292. min-height: 25px;
  24293. text-align: center;
  24294. line-height: 25px;
  24295. margin-right: 5px;
  24296. }
  24297. .sentenTop>div:nth-child(2) {
  24298. width: 300px;
  24299. margin: 0 15px;
  24300. }
  24301. .sentenTop>div:nth-child(3) {
  24302. background: #409efe;
  24303. color: #fff;
  24304. width: 65px;
  24305. height: 35px;
  24306. text-align: center;
  24307. line-height: 35px;
  24308. border-radius: 5px;
  24309. cursor: pointer;
  24310. }
  24311. .cardList {
  24312. padding: 30px 0 20px 0;
  24313. display: flex;
  24314. flex-direction: row;
  24315. flex-wrap: wrap;
  24316. align-items: center;
  24317. box-sizing: border-box;
  24318. border-bottom: 1px solid #f4f4f4;
  24319. width: 98%;
  24320. margin: 0 auto;
  24321. }
  24322. .rightCardList {
  24323. display: flex;
  24324. flex-wrap: wrap;
  24325. }
  24326. .cardBox {
  24327. display: flex;
  24328. flex-direction: row;
  24329. flex-wrap: wrap;
  24330. align-items: center;
  24331. align-content: center;
  24332. }
  24333. .isCard,
  24334. .isCard1 {
  24335. width: auto;
  24336. padding: 0 20px;
  24337. height: 65px;
  24338. text-align: center;
  24339. line-height: 65px;
  24340. font-size: 14px;
  24341. cursor: pointer;
  24342. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  24343. background-size: 100% 100%;
  24344. position: relative;
  24345. z-index: 99;
  24346. }
  24347. .isCard1 {
  24348. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  24349. }
  24350. .isCard:hover .deleteWord {
  24351. display: block;
  24352. }
  24353. .isCard>div:nth-child(1),
  24354. .isCard1>div:nth-child(1) {
  24355. white-space: nowrap;
  24356. overflow: hidden;
  24357. text-overflow: ellipsis;
  24358. width: 100%;
  24359. margin: 0 auto;
  24360. }
  24361. .card {
  24362. width: 140px;
  24363. height: 65px;
  24364. }
  24365. .card>img {
  24366. width: 100%;
  24367. height: 100%;
  24368. }
  24369. .rightCardBox {
  24370. width: 98%;
  24371. margin: 10px auto 0;
  24372. }
  24373. .rightCardBox>div:nth-child(1) {
  24374. margin-bottom: 10px;
  24375. }
  24376. .cardCss {
  24377. display: flex;
  24378. flex-direction: column;
  24379. flex-wrap: nowrap;
  24380. align-items: center;
  24381. border-bottom: 3px solid #b4c3d3;
  24382. padding: 0 0 5px 0;
  24383. /* margin-right: 10px; */
  24384. }
  24385. .cardCss>div:nth-child(2) {
  24386. background: #5b7b9d;
  24387. color: #fff;
  24388. width: 20px;
  24389. height: 20px;
  24390. border-radius: 50%;
  24391. text-align: center;
  24392. line-height: 20px;
  24393. }
  24394. .sentenTopBox {
  24395. display: flex;
  24396. flex-direction: row;
  24397. flex-wrap: nowrap;
  24398. align-items: center;
  24399. justify-content: space-between;
  24400. padding: 55px 0 0 20px;
  24401. box-sizing: border-box;
  24402. width: 85%;
  24403. }
  24404. .rb_c_ai_box,
  24405. .stepsBottom {
  24406. width: 100%;
  24407. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  24408. /* background: #f7f7f7; */
  24409. border-radius: 10px;
  24410. overflow: hidden;
  24411. /* height: 100%; */
  24412. height: calc(100% - 55px);
  24413. }
  24414. .navTop {
  24415. background: #53749b;
  24416. color: #fff;
  24417. height: 40px;
  24418. line-height: 40px;
  24419. padding-left: 15px;
  24420. font-size: 18px;
  24421. }
  24422. .navBottom {
  24423. /* background: #6b91b7; */
  24424. height: 100%;
  24425. overflow: auto;
  24426. padding: 10px 0;
  24427. }
  24428. .navStage {
  24429. display: flex;
  24430. flex-direction: row;
  24431. flex-wrap: nowrap;
  24432. align-items: center;
  24433. padding: 10px 10px 10px 0;
  24434. cursor: pointer;
  24435. background: #ffffff;
  24436. width: 95%;
  24437. margin: 5px auto 5px;
  24438. box-sizing: border-box;
  24439. border-radius: 5px;
  24440. flex-wrap: wrap;
  24441. position: relative;
  24442. }
  24443. .navStage:hover>.chapter_upload_drag {
  24444. display: block;
  24445. }
  24446. .navTask:hover>.chapter_upload_drag {
  24447. display: block;
  24448. }
  24449. .chapter_upload:hover>.chapter_upload_drag {
  24450. display: block;
  24451. }
  24452. .navStage::before {
  24453. content: "";
  24454. display: block;
  24455. width: 16px;
  24456. height: 16px;
  24457. background-image: url(../../../assets/icon/new/icon_stage.png);
  24458. background-size: 100%;
  24459. margin-left: 25px;
  24460. }
  24461. .navStage .chapter_unit_open {
  24462. content: "";
  24463. display: block;
  24464. width: 16px;
  24465. height: 16px;
  24466. background-image: url(../../../assets/icon/new/down.png);
  24467. transform: rotate(-90deg);
  24468. background-size: 100%;
  24469. margin-left: 10px;
  24470. transition: all 0.5s;
  24471. }
  24472. .isNavStageOpen .chapter_unit_open {
  24473. transform: rotate(0deg);
  24474. }
  24475. .isNavStage {
  24476. background: #0061ff;
  24477. }
  24478. .isNavStage::before {
  24479. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  24480. }
  24481. .isNavStage .chapter_unit_open {
  24482. background-image: url(../../../assets/icon/new/downC.png);
  24483. }
  24484. .isNavStage .nt_taskName {
  24485. font-weight: bold !important;
  24486. color: #ffffff !important;
  24487. }
  24488. .isNavStage .nt_taskTitle {
  24489. font-weight: bold !important;
  24490. color: #fff !important;
  24491. }
  24492. .navStage .nt_taskBox {
  24493. width: calc(100% - 68px);
  24494. padding: 0 0 0 5px;
  24495. box-sizing: border-box;
  24496. box-sizing: border-box;
  24497. display: flex;
  24498. flex-direction: row;
  24499. flex-wrap: nowrap;
  24500. align-items: baseline;
  24501. }
  24502. .navStage .nt_taskTitle {
  24503. color: #060e17;
  24504. line-height: 25px;
  24505. font-size: 16px;
  24506. }
  24507. .navStage .nt_taskName {
  24508. max-width: calc(100% - 82px);
  24509. white-space: nowrap;
  24510. overflow: hidden;
  24511. text-overflow: ellipsis;
  24512. font-size: 16px;
  24513. color: #060e17;
  24514. }
  24515. .navTask {
  24516. display: flex;
  24517. flex-direction: row;
  24518. flex-wrap: nowrap;
  24519. align-items: center;
  24520. padding: 10px 10px 10px 0;
  24521. cursor: pointer;
  24522. background: #ffffff;
  24523. width: 95%;
  24524. margin: 5px auto 5px;
  24525. box-sizing: border-box;
  24526. border-radius: 5px;
  24527. flex-wrap: wrap;
  24528. position: relative;
  24529. }
  24530. .navTask .chapter_upload_open {
  24531. content: "";
  24532. display: block;
  24533. width: 16px;
  24534. height: 16px;
  24535. background-image: url(../../../assets/icon/new/icon_arrow.png);
  24536. background-size: 100%;
  24537. margin-left: 23px;
  24538. }
  24539. .noImage .chapter_upload_open {
  24540. display: none;
  24541. background-image: unset !important;
  24542. }
  24543. .isNavOpen .chapter_upload_open {
  24544. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  24545. transform: rotate(90deg);
  24546. }
  24547. .isNavTask .chapter_upload_open {
  24548. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  24549. transform: rotate(-90deg);
  24550. }
  24551. .isNavTask.isNavOpen .chapter_upload_open {
  24552. transform: rotate(0deg);
  24553. }
  24554. .dragOverTop {
  24555. border-top: 2px solid #0061ff !important;
  24556. border-radius: 0 !important;
  24557. margin-top: 10px;
  24558. }
  24559. .dragOverBottom {
  24560. border-bottom: 2px solid #0061ff !important;
  24561. border-radius: 0 !important;
  24562. margin-top: 10px;
  24563. }
  24564. .dragOverTop2 {
  24565. border-top: 2px solid #0061ff !important;
  24566. border-radius: 0 !important;
  24567. }
  24568. .dragOverBottom2 {
  24569. border-bottom: 2px solid #0061ff !important;
  24570. border-radius: 0 !important;
  24571. }
  24572. .isNavTask {
  24573. /* background: #3681FC; */
  24574. background: #eef3fb;
  24575. }
  24576. .isNavTask>.chapter_upload_drag {
  24577. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  24578. }
  24579. .isNavTask .nt_taskName {
  24580. /* color: #fff !important; */
  24581. font-weight: bold !important;
  24582. color: #0061ff !important;
  24583. }
  24584. .isNavTask .nt_taskTitle {
  24585. /* color: #AECCFE !important; */
  24586. font-weight: bold !important;
  24587. color: #0061ff !important;
  24588. }
  24589. .navTask .nt_taskBox {
  24590. width: calc(100% - 40px);
  24591. padding: 0 0 0 5px;
  24592. box-sizing: border-box;
  24593. box-sizing: border-box;
  24594. display: flex;
  24595. flex-direction: row;
  24596. flex-wrap: nowrap;
  24597. align-items: baseline;
  24598. }
  24599. .navTask .nt_taskTitle {
  24600. /* color: #717C8D; */
  24601. color: #060e17;
  24602. line-height: 25px;
  24603. font-size: 16px;
  24604. /* min-width: 66px; */
  24605. }
  24606. .navTask .nt_taskName {
  24607. /* color: #fff; */
  24608. /* max-width: 130px; */
  24609. /* width: 100%; */
  24610. max-width: calc(100% - 66px);
  24611. font-size: 16px;
  24612. color: #060e17;
  24613. /* color: #0E1E33; */
  24614. }
  24615. .navTask .nt_taskName span {
  24616. width: 100%;
  24617. white-space: nowrap;
  24618. overflow: hidden;
  24619. text-overflow: ellipsis;
  24620. display: block;
  24621. }
  24622. .gjBox {
  24623. width: calc(100% - 25px);
  24624. padding: 0 0 0 0;
  24625. box-sizing: border-box;
  24626. border-left: 1px solid #cad1dc;
  24627. margin-left: 25px;
  24628. }
  24629. .gjBox>div {
  24630. display: flex;
  24631. align-items: center;
  24632. }
  24633. .gjBox>div::before {
  24634. content: "";
  24635. height: 1px;
  24636. width: 10px;
  24637. background: #cad1dc;
  24638. display: block;
  24639. margin-right: 5px;
  24640. }
  24641. .gjCss {
  24642. display: flex;
  24643. flex-direction: row;
  24644. flex-wrap: nowrap;
  24645. align-items: center;
  24646. padding: 15px 0;
  24647. box-sizing: border-box;
  24648. font-size: 14px;
  24649. cursor: pointer;
  24650. }
  24651. .isGjCss {
  24652. color: #0061ff;
  24653. }
  24654. .groupBox {}
  24655. .groupContent+.groupContent {
  24656. margin-top: 30px;
  24657. }
  24658. .groupTitle {
  24659. font-size: 24px;
  24660. color: rgb(80, 80, 80);
  24661. margin-bottom: 20px;
  24662. }
  24663. .groupName {
  24664. display: flex;
  24665. align-items: center;
  24666. }
  24667. .groupn {
  24668. font-size: 15px;
  24669. margin-right: 10px;
  24670. }
  24671. .groupName+.groupName {
  24672. margin-top: 15px;
  24673. }
  24674. .groupBtn {
  24675. margin-left: 10px;
  24676. }
  24677. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  24678. text-align: left;
  24679. }
  24680. .radioBox>div {
  24681. margin: 10px 0 0 10px;
  24682. }
  24683. .radioBox>>>.el-radio__input,
  24684. .radioBox>>>.el-checkbox__inner {
  24685. margin-left: 10px;
  24686. }
  24687. .radioBox>>>.el-radio__label,
  24688. .radioBox>>>.el-checkbox__label {
  24689. display: flex;
  24690. align-items: center;
  24691. }
  24692. .inImg {
  24693. width: 50px;
  24694. }
  24695. .inImg>img {
  24696. width: 100%;
  24697. height: 100%;
  24698. object-fit: cover;
  24699. }
  24700. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  24701. height: auto;
  24702. padding: 10px;
  24703. margin: 0;
  24704. }
  24705. .upCss>>>.el-upload-list {
  24706. width: 100%;
  24707. }
  24708. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  24709. width: 100%;
  24710. height: 120px;
  24711. object-fit: contain;
  24712. background: unset;
  24713. margin-left: 0;
  24714. }
  24715. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  24716. display: none;
  24717. }
  24718. .tcMember+.tcMember::before {
  24719. content: "、";
  24720. }
  24721. .xzUpImg {
  24722. width: 25px;
  24723. height: 25px;
  24724. min-width: 25px;
  24725. min-height: 25px;
  24726. cursor: pointer;
  24727. margin: 0 10px;
  24728. }
  24729. .xzUpImg>img {
  24730. width: 100%;
  24731. height: 100%;
  24732. }
  24733. .closeCss {
  24734. position: absolute;
  24735. top: 8px;
  24736. right: 8px;
  24737. cursor: pointer;
  24738. width: 20px;
  24739. height: 20px;
  24740. }
  24741. .closeCss>img {
  24742. width: 100%;
  24743. height: 100%;
  24744. }
  24745. .moveBtn {
  24746. display: flex;
  24747. flex-direction: row;
  24748. flex-wrap: nowrap;
  24749. align-items: center;
  24750. width: 55px;
  24751. }
  24752. .timuUpImg {
  24753. display: flex;
  24754. flex-direction: row;
  24755. align-items: center;
  24756. width: 100%;
  24757. margin-right: 10px;
  24758. }
  24759. .timuUpImg>div:nth-child(1) {
  24760. margin-right: 10px;
  24761. display: flex;
  24762. align-items: center;
  24763. width: 100%;
  24764. }
  24765. .timuImgBox {
  24766. margin: 10px 0;
  24767. display: flex;
  24768. flex-direction: column;
  24769. flex-wrap: wrap;
  24770. align-items: flex-start;
  24771. }
  24772. .timuImg {
  24773. width: 100px;
  24774. margin: 5px 0;
  24775. cursor: pointer;
  24776. position: relative;
  24777. }
  24778. .timuImg:hover .deleteWord {
  24779. display: block;
  24780. }
  24781. .deleteWord {
  24782. width: 25px;
  24783. height: 25px;
  24784. position: absolute;
  24785. right: -5px;
  24786. top: -5px;
  24787. cursor: pointer;
  24788. display: none;
  24789. }
  24790. .timuImg>img,
  24791. .deleteWord>img {
  24792. width: 100%;
  24793. height: 100%;
  24794. object-fit: cover;
  24795. }
  24796. .e_add_delete {
  24797. cursor: pointer;
  24798. margin-left: 10px;
  24799. }
  24800. .pType_box {
  24801. margin-top: 30px;
  24802. align-items: flex-end;
  24803. }
  24804. .noneBox {
  24805. height: 200px;
  24806. width: 100%;
  24807. display: flex;
  24808. align-items: center;
  24809. justify-content: center;
  24810. flex-direction: column;
  24811. /* margin-top: 150px; */
  24812. }
  24813. .noneBox>img {
  24814. width: 95px;
  24815. }
  24816. .noneBox>span {
  24817. margin-top: 10px;
  24818. color: #717c8d;
  24819. }
  24820. .rb_c_box {
  24821. width: 100%;
  24822. height: 100%;
  24823. display: flex;
  24824. /* padding: 20px; */
  24825. box-sizing: border-box;
  24826. justify-content: space-between;
  24827. }
  24828. .rb_c_box_left {
  24829. height: 100%;
  24830. background: #fff;
  24831. width: 270px;
  24832. min-width: 270px;
  24833. border-radius: 8px;
  24834. margin-right: 10px;
  24835. }
  24836. .rb_c_box_right {
  24837. height: 100%;
  24838. width: calc(100%);
  24839. overflow: hidden;
  24840. }
  24841. .rb_c_box_btn {
  24842. display: flex;
  24843. justify-content: flex-start;
  24844. height: 50px;
  24845. align-items: center;
  24846. }
  24847. .rb_c_box_right>.basic_box {
  24848. /* background: #fff; */
  24849. border-radius: 0;
  24850. height: calc(100% - 0px);
  24851. overflow: auto;
  24852. padding: 0;
  24853. }
  24854. .textarea_css {
  24855. display: block;
  24856. resize: none;
  24857. padding: 10px 15px;
  24858. line-height: 1.5;
  24859. box-sizing: border-box;
  24860. width: 100%;
  24861. font-size: 14px;
  24862. color: #606266;
  24863. background-color: #fff;
  24864. background-image: none;
  24865. border: 1px solid #dcdfe6;
  24866. border-radius: 4px;
  24867. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  24868. outline: none;
  24869. overflow: hidden;
  24870. height: 46px;
  24871. font-family: "Microsoft YaHei";
  24872. }
  24873. .textarea_css::-webkit-input-placeholder {
  24874. color: #c0c4cc;
  24875. }
  24876. .textarea_css:focus {
  24877. border-color: #409eff;
  24878. outline: 0;
  24879. }
  24880. .addEditor>>>.text {
  24881. height: auto;
  24882. min-height: 100px;
  24883. }
  24884. .addEditor>>>.w-e-text-container {
  24885. min-height: 100px;
  24886. }
  24887. .moveBtn2 {
  24888. flex-direction: column;
  24889. width: fit-content;
  24890. margin: 0 10px 0 10px;
  24891. }
  24892. .moveBtn2 .chapter_upload_down,
  24893. .moveBtn2 .chapter_upload_up {
  24894. width: 16px;
  24895. height: 16px;
  24896. }
  24897. .moveBtn2 .chapter_upload_up::after,
  24898. .moveBtn2 .chapter_upload_down::after {
  24899. width: 10px;
  24900. height: 10px;
  24901. }
  24902. .fullStyle>>>.el-dialog__body {
  24903. height: calc(100% - 125px) !important;
  24904. box-sizing: border-box;
  24905. }
  24906. .fullStyle1>>>.el-dialog__body {
  24907. height: auto !important;
  24908. }
  24909. .fullStyle>>>.el-dialog {
  24910. width: 100% !important;
  24911. max-width: 100% !important;
  24912. height: 100% !important;
  24913. margin: 0 !important;
  24914. }
  24915. .fullStyle {
  24916. width: 100% !important;
  24917. max-width: 100% !important;
  24918. height: 100% !important;
  24919. margin: 0 auto !important;
  24920. }
  24921. .wb_j_box_btn {
  24922. width: calc(100% - 30px);
  24923. display: flex;
  24924. height: 40px;
  24925. border: 1.5px solid #cad1dc;
  24926. border-radius: 4px;
  24927. box-sizing: border-box;
  24928. align-items: center;
  24929. font-size: 14px;
  24930. cursor: pointer;
  24931. overflow: hidden;
  24932. }
  24933. .wb_j_box_btn:hover {
  24934. border: 1.5px solid #0061ff;
  24935. }
  24936. .wb_j_box_title {
  24937. background: #f0f4fa;
  24938. height: 100%;
  24939. line-height: 40px;
  24940. width: 90px;
  24941. text-align: center;
  24942. color: #060e17;
  24943. border-right: 1.5px solid #cad1dc;
  24944. box-sizing: border-box;
  24945. }
  24946. .wb_j_box_btn_c {
  24947. width: calc(100% - 90px);
  24948. padding: 0 35px 0 10px;
  24949. box-sizing: border-box;
  24950. position: relative;
  24951. }
  24952. .wb_j_box_span {
  24953. width: 100%;
  24954. overflow: hidden;
  24955. white-space: nowrap;
  24956. text-overflow: ellipsis;
  24957. word-wrap: break-word;
  24958. color: #717c8d;
  24959. }
  24960. .wb_j_box_arrow {
  24961. content: "";
  24962. width: 14px;
  24963. height: 14px;
  24964. background: url(../../../assets/icon/new/u_arrow.png);
  24965. background-size: 100% 100%;
  24966. position: absolute;
  24967. right: 12px;
  24968. top: 50%;
  24969. transform: translateY(-50%);
  24970. }
  24971. .check_classBox {
  24972. height: 400px;
  24973. display: flex;
  24974. border-top: 1.5px solid #e7ebf1;
  24975. border-bottom: 1.5px solid #e7ebf1;
  24976. }
  24977. .check_class_right {
  24978. width: 130px;
  24979. border-right: 1px solid #e7ebf1;
  24980. display: flex;
  24981. align-items: center;
  24982. flex-direction: column;
  24983. height: 100%;
  24984. overflow: auto;
  24985. padding: 15px 0;
  24986. box-sizing: border-box;
  24987. }
  24988. .check_class {
  24989. width: 85%;
  24990. border-radius: 5px;
  24991. height: 30px;
  24992. min-height: 30px;
  24993. line-height: 30px;
  24994. text-align: center;
  24995. padding: 0 10px;
  24996. box-sizing: border-box;
  24997. cursor: pointer;
  24998. white-space: nowrap;
  24999. overflow: hidden;
  25000. text-overflow: ellipsis;
  25001. }
  25002. .check_class.activeX {
  25003. background: #e0eafb;
  25004. color: #3681fc;
  25005. font-weight: 700;
  25006. }
  25007. .check_class+.check_class {
  25008. margin-top: 15px;
  25009. }
  25010. .check_class_left {
  25011. background: #fafafa;
  25012. width: calc(100% - 130px);
  25013. padding: 15px;
  25014. box-sizing: border-box;
  25015. }
  25016. .check_class_all_box {
  25017. display: flex;
  25018. margin-bottom: 10px;
  25019. }
  25020. .all_check {
  25021. display: flex;
  25022. align-items: center;
  25023. padding: 2px 0 0;
  25024. margin-left: 10px;
  25025. }
  25026. .all_check>>>.el-checkbox__label {
  25027. line-height: 18px;
  25028. }
  25029. .check_class_left_title {
  25030. font-size: 16px;
  25031. font-weight: 700;
  25032. }
  25033. .check_class_item {
  25034. display: flex;
  25035. flex-wrap: wrap;
  25036. height: calc(100% - 45px);
  25037. overflow: auto;
  25038. justify-content: flex-start;
  25039. align-items: flex-start;
  25040. align-content: flex-start;
  25041. }
  25042. .class_item:first-child {
  25043. /* margin: 0 15px 15px 67px; */
  25044. }
  25045. .class_item {
  25046. margin: 0 15px 15px 0;
  25047. }
  25048. .class_item:hover>>>.el-checkbox__label {
  25049. color: #409eff;
  25050. }
  25051. .class_item>>>.el-checkbox__label {
  25052. color: #0e1e33;
  25053. }
  25054. .class_item:hover>>>.el-checkbox__inner {
  25055. border-color: #409eff;
  25056. }
  25057. .class_item>>>.el-checkbox,
  25058. .class_item>>>.el-checkbox__input {
  25059. display: flex;
  25060. align-items: center;
  25061. }
  25062. .taskTitle {
  25063. font-size: 20px;
  25064. font-weight: bold;
  25065. margin-bottom: 35px;
  25066. }
  25067. .taskTitle:after {
  25068. content: "";
  25069. width: 100%;
  25070. display: block;
  25071. height: 1px;
  25072. background: #cad1dc;
  25073. position: absolute;
  25074. left: 0;
  25075. margin: 15px 0 0;
  25076. }
  25077. .eva_btn_box {
  25078. margin: 20px 0px 0 0;
  25079. display: flex;
  25080. flex-direction: row;
  25081. flex-wrap: nowrap;
  25082. align-items: center;
  25083. justify-content: space-between;
  25084. width: 100%;
  25085. }
  25086. .eva_btn_left_box {
  25087. display: flex;
  25088. flex-direction: row;
  25089. flex-wrap: nowrap;
  25090. align-items: center;
  25091. }
  25092. .addTypeChoose {
  25093. display: flex;
  25094. flex-direction: row;
  25095. flex-wrap: nowrap;
  25096. align-items: center;
  25097. margin: 15px 0;
  25098. }
  25099. .addTypeBox {
  25100. display: flex;
  25101. flex-direction: column;
  25102. flex-wrap: nowrap;
  25103. align-items: center;
  25104. }
  25105. .addTypeChoose {
  25106. display: flex;
  25107. flex-direction: row;
  25108. flex-wrap: nowrap;
  25109. align-items: center;
  25110. margin: 15px 0;
  25111. }
  25112. .buchong_box {
  25113. background: #E0EAFB66;
  25114. width: calc(100% - 20px);
  25115. min-height: 50px;
  25116. display: flex;
  25117. align-items: center;
  25118. justify-content: center;
  25119. margin: 0 auto;
  25120. }
  25121. .outline {
  25122. width: calc(100% - 40px);
  25123. margin: 0 auto;
  25124. }
  25125. .task_outline {
  25126. width: calc(100% - 40px);
  25127. margin: 0 auto;
  25128. }
  25129. .outline_box+.outline_box {
  25130. margin: 30px 0 0px;
  25131. }
  25132. .outline_task {
  25133. display: flex;
  25134. align-items: center;
  25135. margin-bottom: 10px;
  25136. }
  25137. .outline_btn{
  25138. display: flex;
  25139. align-items: center;
  25140. min-width: fit-content;
  25141. margin-left: 10px;
  25142. }
  25143. .outline_task .title {
  25144. font-size: 18px;
  25145. font-weight: bold;
  25146. min-width: 80px;
  25147. }
  25148. .op_task_box,
  25149. .op_tool_box,
  25150. .outline_detail {
  25151. position: relative;
  25152. }
  25153. .op_task_box:hover .op_box,
  25154. .op_tool_box:hover .op_box,
  25155. .outline_detail:hover .op_box {
  25156. display: flex
  25157. }
  25158. .op_box {
  25159. position: absolute;
  25160. bottom: 10px;
  25161. display: none;
  25162. align-items: center;
  25163. justify-content: space-between;
  25164. width: calc(100% - 20px);
  25165. left: 50%;
  25166. transform: translateX(-50%);
  25167. }
  25168. .op_box .op_remark {
  25169. color: #8E8E8E;
  25170. font-size: 14px;
  25171. }
  25172. .rb_c_nav {
  25173. width: calc(100% - 20px);
  25174. margin: 15px auto 0;
  25175. font-size: 18px;
  25176. }
  25177. .rb_c_nav span {
  25178. cursor: pointer;
  25179. }
  25180. .rb_c_nav span+span {
  25181. margin-left: 10px;
  25182. }
  25183. .rb_c_nav span.active {
  25184. color: #0061FF
  25185. }
  25186. .text_panel>>>.text {
  25187. height: 400px;
  25188. }
  25189. .markBox{
  25190. padding: 20px 14px;
  25191. line-height: 29px;
  25192. font-size: 16px;
  25193. background: #f4f4f4;
  25194. border-radius: 5px;
  25195. }
  25196. .info_box_t{
  25197. display: flex;
  25198. align-items: center;
  25199. }
  25200. .info_box_t + .info_box_t{
  25201. margin-top: 10px;
  25202. }
  25203. .info_box_t_box{
  25204. display: flex;
  25205. align-items: center;
  25206. }
  25207. .info_box_t_box + .info_box_t_box{
  25208. margin-left: 10px;
  25209. }
  25210. .info_box_t_box > span{
  25211. width: fit-content
  25212. }
  25213. .info_box_t_box > input{
  25214. width: 150px !important;
  25215. margin: 0 5px 0 0;
  25216. }
  25217. .mode_box{
  25218. display: flex;
  25219. align-items: center;
  25220. }
  25221. .mode_box > span{
  25222. padding: 0px 5px;
  25223. cursor: pointer;
  25224. }
  25225. .mode_box > span.active{
  25226. color: #409eff;
  25227. }
  25228. .chapter_upload_check {
  25229. width: 15px;
  25230. height: 15px;
  25231. cursor: pointer;
  25232. background-image: url('../../../assets/icon/check.png');
  25233. background-size: 100% 100%;
  25234. }
  25235. .chapter_upload_check.checked{
  25236. background-image: url('../../../assets/icon/checked.png');
  25237. }
  25238. .ruleBtn {
  25239. width: fit-content;
  25240. height: 36px;
  25241. line-height: 36px;
  25242. cursor: pointer;
  25243. color: #0061FF;
  25244. }
  25245. .stopBtn{
  25246. z-index: 999999;
  25247. position: absolute;
  25248. left: 50%;
  25249. top: calc(50% + 70px);
  25250. transform: translateX(-50%);
  25251. }
  25252. .rateSwitch >>> .el-switch__label.is-active {
  25253. color: #0061FF;
  25254. }
  25255. .rateSwitch >>> .el-switch__label--left{
  25256. display: flex;
  25257. align-items: center;
  25258. }
  25259. .rateSwitch >>> .el-switch__label--left::before{
  25260. content: "";
  25261. width: 14px;
  25262. height: 14px;
  25263. min-width: 14px;
  25264. min-height: 14px;
  25265. background-size: 100% 100%;
  25266. display: block;
  25267. margin-right: 7px;
  25268. background-image: url(../../../assets/icon/new/u_op.png);
  25269. }
  25270. </style>