addCourse.vue 951 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  5. <div class="courseTop">
  6. <div class="stepsNav">
  7. <el-breadcrumb separator-class="el-icon-arrow-right">
  8. <el-breadcrumb-item :to="{
  9. path:
  10. '/course?userid=' +
  11. userid +
  12. '&oid=' +
  13. oid +
  14. '&org=' +
  15. org +
  16. '&role=' +
  17. role,
  18. }">课程管理</el-breadcrumb-item>
  19. <el-breadcrumb-item>
  20. <span style="color: rgb(15, 126, 255)">添加课程</span>
  21. </el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  25. </div>
  26. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  27. <!-- @mouseenter="stepDisplay(true)"
  28. @mouseleave="stepDisplay(false)" -->
  29. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  30. <div class="stepBg" v-if="false">
  31. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  32. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  33. <div>
  34. <img src="../../../assets/icon/first.png" alt />
  35. </div>
  36. <div>填写基本信息</div>
  37. </div>
  38. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/firstNo.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  45. </div>
  46. <!-- <div
  47. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  48. class="second"
  49. @click="navSteps(2)"
  50. >
  51. <div style="margin: 5px 10px 0 0; width: 2rem">
  52. <img src="../../../assets/icon/second.png" alt />
  53. </div>
  54. <div>选择课程模板</div>
  55. </div>
  56. <div
  57. v-else-if="cidType === 0 && isStepDisplay"
  58. class="secondNo"
  59. @click="navSteps(2)"
  60. >
  61. <div>
  62. <img src="../../../assets/icon/secondNo.png" alt />
  63. </div>
  64. <div>选择课程模板</div>
  65. </div> -->
  66. <!-- <div
  67. v-if="isStepDisplay"
  68. class="stepBorder"
  69. :class="{ 'border-active': steps > 2 }"
  70. ></div> -->
  71. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  72. <div>
  73. <img src="../../../assets/icon/third.png" alt />
  74. </div>
  75. <div>上传课程内容</div>
  76. </div>
  77. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/thirdNo.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  84. <div v-if="steps > 3 && isStepDisplay" class="four">
  85. <div>
  86. <img src="../../../assets/icon/four.png" alt />
  87. </div>
  88. <div>上传完成</div>
  89. </div>
  90. <div v-else-if="isStepDisplay" class="fourNo">
  91. <div>
  92. <img src="../../../assets/icon/fourNo.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  99. style="padding: 0" :style="{
  100. height:
  101. !isStepDisplay && !isBtnDisplay
  102. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  103. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  104. }">
  105. <div class="updateMask" :style="{
  106. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  107. }" v-if="cid && userid != courseUserid && role != '1'"></div>
  108. <div class="whiteBg" style="background: unset; padding: 0">
  109. <div>
  110. <div class="basic_box" style="padding: 0">
  111. <div class="big_box">
  112. <div class="left_first">
  113. <div :class="{
  114. updateTips:
  115. cid && userid != courseUserid && role != '1',
  116. }">
  117. <div style="width: 100%">
  118. <div class="course_input_box">
  119. <div class="bb_courseIcon">
  120. <img src="../../../assets/icon/new/course.png" />
  121. </div>
  122. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  123. border: 1.5px solid rgb(202, 209, 220);
  124. margin: 0px 10px 0px 0px;
  125. border-radius: 5px;
  126. font-weight: 600;
  127. padding: 12px 14px 12px 71px;
  128. " @change="setCover" />
  129. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  130. style="justify-content: center; min-width: 150px"></el-switch>
  131. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  132. style="justify-content: center; min-width: 175px"></el-switch>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  179. style="justify-content: center; min-width: 175px"></el-switch>
  180. </div>
  181. <div class="info_box_t_box">
  182. <span>AI生成模式:</span>
  183. <div class="mode_box">
  184. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  185. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  186. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  187. </div>
  188. </div>
  189. </div>
  190. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  191. <div class="info_box_t_box">
  192. <span>课程节数:</span>
  193. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  194. <span>节</span>
  195. </div>
  196. <div class="info_box_t_box">
  197. <span>课程时长:</span>
  198. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  199. <span>min</span>
  200. </div>
  201. </div> -->
  202. </div>
  203. <div class="right_first" v-loading="imageloading2">
  204. <!-- <div class="ai_box">
  205. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  206. </div> -->
  207. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  208. 上传封面
  209. </div>
  210. <div style="width: 100%">
  211. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  212. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  213. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  214. <div v-if="cover.length == 0">点击添加封面</div>
  215. <div class="cover_mask">
  216. <img src="../../../assets/icon/new/cover_update.png" /><span
  217. style="margin-top: 5px">修改封面</span>
  218. </div>
  219. </div>
  220. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  221. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  222. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  223. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  224. <i class="el-icon-plus"></i>
  225. </el-upload> -->
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  233. <div class="whiteBg" style="border-radius: 0">
  234. <div class="c_info_title">
  235. 课程权限设置
  236. </div>
  237. <div class="wb_j_box">
  238. <div class="wb_j_box_content">
  239. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  240. (dialogVisibleClass = true),
  241. (classSearch = ''),
  242. (gradeId = ''),
  243. getClass()
  244. ">添加班级</button>
  245. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  246. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  247. getClassC(tc) }}</span>
  248. </div> -->
  249. <div class="wb_j_box_btn" @click="
  250. (dialogVisibleClass = true),
  251. (classSearch = ''),
  252. (gradeId = ''),
  253. getClass()
  254. ">
  255. <div class="wb_j_box_title">授课班级</div>
  256. <div class="wb_j_box_btn_c">
  257. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  258. v-if="checkboxList2.length" popper-class="text_tooltip2">
  259. <div class="wb_j_box_span">
  260. {{ getListClassC(checkboxList2) }}
  261. </div>
  262. </el-tooltip>
  263. <div v-else class="wb_j_box_span">请选择授课班级</div>
  264. <div class="wb_j_box_arrow"></div>
  265. </div>
  266. </div>
  267. </div>
  268. <div class="wb_j_box_content">
  269. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  270. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  271. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  272. checkBoolean
  273. ? checkboxList3
  274. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  275. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  276. </div> -->
  277. <div class="wb_j_box_btn" @click="openMember">
  278. <div class="wb_j_box_title">协同人员</div>
  279. <div class="wb_j_box_btn_c">
  280. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  281. v-if="checkboxList3.length" popper-class="text_tooltip2">
  282. <div class="wb_j_box_span">
  283. {{ getListMan2(checkboxList3) }}
  284. </div>
  285. </el-tooltip>
  286. <div v-else class="wb_j_box_span">请选择协同人员</div>
  287. <div class="wb_j_box_arrow"></div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  294. <div class="c_info_title">目标管理</div>
  295. <div style="margin: 0 auto; padding: 0 20px">
  296. <div style="
  297. width: 95%;
  298. min-height: 200px;
  299. border: 1px solid #cad1dc;
  300. border-radius: 4px;
  301. position: relative;
  302. ">
  303. <div class="e_add_top">
  304. <div class="e_add_title">
  305. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  306. 清除
  307. </button>
  308. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  309. 添加
  310. </button>
  311. <!-- <span>当前使用目标管理</span>
  312. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  313. <img
  314. src="../../../assets/line.png"
  315. class="cru_line"
  316. style="
  317. width: 125px;
  318. height: 20px;
  319. bottom: -10px;
  320. left: 155px;
  321. "
  322. /> -->
  323. </div>
  324. <div style="
  325. display: flex;
  326. flex-direction: row;
  327. align-items: center;
  328. ">
  329. <!-- <el-button
  330. type="primary"
  331. size="small"
  332. @click="dialogVisiblemb = true"
  333. >添加目标管理</el-button
  334. >
  335. <el-button
  336. type="primary"
  337. size="small"
  338. @click="deleteEva()"
  339. >清除内容</el-button
  340. > -->
  341. <!-- <div class="e_add_delete" @click="deleteEva()">
  342. <img src="../../../assets/icon/delete.png" alt="" />
  343. </div> -->
  344. </div>
  345. </div>
  346. <div v-if="evalua == ''">
  347. <div class="noneBox">
  348. <img src="../../../assets/icon/new/eva_none.png" />
  349. <span>请添加目标管理</span>
  350. </div>
  351. </div>
  352. <div class="e_add_content" v-else>
  353. <div class="e_add_list_pbox">
  354. <div class="e_add_list_pbox_title">
  355. <span class="type_title">切换模式</span>
  356. <div class="type_content">
  357. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  358. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  359. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  360. </div>
  361. </div>
  362. <div class="e_add_list_pbox_content">
  363. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  364. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  365. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  366. v-if="typeMode == 3">
  367. </SeeBoard>
  368. </div>
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  376. <div style="position: relative;
  377. background: #fff;
  378. box-sizing: border-box;
  379. padding: 1px 20px 10px;
  380. width: 100%;
  381. border-radius: 10px;">
  382. <div style="
  383. display: flex;
  384. flex-direction: row;
  385. justify-content: space-between;
  386. align-items: center;
  387. " :style="{
  388. margin: true
  389. ? '20px 0 10px'
  390. : '20px 0 0',
  391. }">
  392. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  393. 已有教案
  394. <div class="add_info_box" style="margin: 0 0 0 auto">
  395. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  396. 上传已有教案
  397. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  398. beforeUploadInfo2(
  399. $event,
  400. 14
  401. )
  402. " />
  403. </button>
  404. <button class="c_pub_button_add" @click="clickGenTT">
  405. 一键智能总结生成
  406. </button>
  407. </div>
  408. </div>
  409. </div>
  410. <div>
  411. <div class="add_chapters_box add_c_none" v-if="
  412. teacherInfoData &&
  413. teacherInfoData.length == 0
  414. ">
  415. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  416. </div>
  417. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  418. <div @dragstart="
  419. dragStart(item1, index1, 0)
  420. " @dragover.prevent="
  421. dragOver(index1, 0)
  422. " @dragend="dragEnd()" :draggable="isdrag ==
  423. 'chapter-' + 0 + '-' + index1
  424. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  425. getChapterData(
  426. $event,
  427. index1,
  428. item1.type
  429. )
  430. " :class="{
  431. dragOverTop2:
  432. newIndex === index1 &&
  433. typeIndex ==
  434. 'chapter-' +
  435. 0 +
  436. '-' +
  437. index1 &&
  438. oldIndex > index1 &&
  439. dragType == 'drag',
  440. dragOverBottom2:
  441. newIndex === index1 &&
  442. typeIndex ==
  443. 'chapter-' +
  444. 0 +
  445. '-' +
  446. index1 &&
  447. oldIndex < index1 &&
  448. dragType == 'drag',
  449. }">
  450. <div class="chapter_upload_o" style="
  451. position: relative;
  452. display: flex;
  453. align-items: center;
  454. ">
  455. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  456. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  457. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  458. </div>
  459. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  460. </div>
  461. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  462. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  463. </div>
  464. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  465. </div>
  466. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  467. </div>
  468. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  469. </div>
  470. </div>
  471. <div class="chapter_upload_n">
  472. <input readonly="true" v-if="
  473. item1.type == 2 ||
  474. item1.type == 3 ||
  475. item1.type == 12 ||
  476. item1.type == 13 ||
  477. item1.type == 7
  478. " :placeholder="item1.name" style="
  479. border: none;
  480. outline: none;
  481. width: 80%;
  482. minwidth: 215px;
  483. z-index: 99;
  484. font-size: 14px;
  485. white-space: nowrap;
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. " />
  489. </div>
  490. <div class="chapter_upload_ic">
  491. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  492. <div class="chapter_upload_ic_r" @click.stop="
  493. deleteTeacherInfoData(
  494. $event,
  495. index1
  496. )
  497. ">
  498. <div></div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. <div v-if="
  506. teacherinfoproVisible
  507. " class="mask">
  508. <div class="progressBox">
  509. <div class="lbox">
  510. <img src="../../../assets/loading.gif" />上传中,请稍后
  511. </div>
  512. <div style="margin-bottom: 10px">
  513. <span>{{
  514. teacherinfoisFinishSize
  515. }}M</span>
  516. /
  517. <span>{{
  518. teacherinfoisAllSize
  519. }}M</span>
  520. </div>
  521. <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  522. ? teacherinfoprogress
  523. : 0
  524. " style="width: 80%"></el-progress>
  525. </div>
  526. </div>
  527. </div>
  528. </div>
  529. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  530. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  531. <div class="c_info_title">
  532. 已有教案摘要
  533. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  534. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  535. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  536. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  537. </el-tooltip>
  538. </div>
  539. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  540. <div style="width: calc(100%);" class='op_task_box'>
  541. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  542. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  543. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  544. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  545. <div class="op_box">
  546. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  547. <div style="display: flex;">
  548. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  549. <div class="r_pub_button_op"
  550. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  551. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  552. </el-tooltip>
  553. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  561. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  562. <div class="c_info_title">
  563. 课程目标
  564. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  565. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  566. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  567. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  568.                   </el-tooltip>
  569. </div>
  570. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  571. <div style="width: calc(100%);" class='op_task_box'>
  572. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  573. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  574. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  575. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  576. <div class="op_box">
  577. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  578. <div style="display: flex;">
  579. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  580. <div class="r_pub_button_op"
  581. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  582. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  583. </el-tooltip>
  584. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  592. <div style="position: relative;
  593. background: #fff;
  594. box-sizing: border-box;
  595. padding: 1px 20px 10px;
  596. width: 100%;
  597. border-radius: 10px;">
  598. <div style="
  599. display: flex;
  600. flex-direction: row;
  601. justify-content: space-between;
  602. align-items: center;
  603. " :style="{
  604. margin: true
  605. ? '20px 0 10px'
  606. : '20px 0 0',
  607. }">
  608. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  609. 系统推荐参考资料
  610. <div class="add_info_box" style="margin: 0 0 0 auto">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  613. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  614. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  615.  </el-tooltip>
  616. </div>
  617. </div>
  618. </div>
  619. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  620. <div class="add_chapters_box add_c_none" v-if="
  621. cankaoInfoData &&
  622. cankaoInfoData.length == 0
  623. ">
  624. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  625. </div>
  626. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  627. <div @dragstart="
  628. dragStart(item1, index1, 0)
  629. " @dragover.prevent="
  630. dragOver(index1, 0)
  631. " @dragend="dragEnd()" :draggable="isdrag ==
  632. 'chapter-' + 0 + '-' + index1
  633. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  634. getChapterData(
  635. $event,
  636. index1,
  637. item1.type
  638. )
  639. " :class="{
  640. dragOverTop2:
  641. newIndex === index1 &&
  642. typeIndex ==
  643. 'chapter-' +
  644. 0 +
  645. '-' +
  646. index1 &&
  647. oldIndex > index1 &&
  648. dragType == 'drag',
  649. dragOverBottom2:
  650. newIndex === index1 &&
  651. typeIndex ==
  652. 'chapter-' +
  653. 0 +
  654. '-' +
  655. index1 &&
  656. oldIndex < index1 &&
  657. dragType == 'drag',
  658. }">
  659. <div class="chapter_upload_o" style="
  660. position: relative;
  661. display: flex;
  662. align-items: center;
  663. ">
  664. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  665. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  666. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  667. </div>
  668. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  669. </div>
  670. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  671. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  672. </div>
  673. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  674. </div>
  675. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  676. </div>
  677. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  678. </div>
  679. </div>
  680. <div class="chapter_upload_n">
  681. <input readonly="true" v-if="
  682. item1.type == 2 ||
  683. item1.type == 3 ||
  684. item1.type == 12 ||
  685. item1.type == 13 ||
  686. item1.type == 7
  687. " :placeholder="item1.name" style="
  688. border: none;
  689. outline: none;
  690. width: 80%;
  691. minwidth: 215px;
  692. z-index: 99;
  693. font-size: 14px;
  694. white-space: nowrap;
  695. overflow: hidden;
  696. text-overflow: ellipsis;
  697. " />
  698. </div>
  699. <div class="chapter_upload_ic">
  700. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  701. <div class="chapter_upload_ic_r" @click.stop="
  702. deleteCankaoInfoData(
  703. $event,
  704. index1
  705. )
  706. ">
  707. <div></div>
  708. </div>
  709. </div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  717. <div style="position: relative;
  718. background: #fff;
  719. box-sizing: border-box;
  720. padding: 1px 20px 10px;
  721. width: 100%;
  722. border-radius: 10px;">
  723. <div style="
  724. display: flex;
  725. flex-direction: row;
  726. justify-content: space-between;
  727. align-items: center;
  728. " :style="{
  729. margin: true
  730. ? '20px 0 10px'
  731. : '20px 0 0',
  732. }">
  733. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  734. 知识库
  735. <div class="add_info_box" style="margin: 0 0 0 auto">
  736. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  737. 上传补充资料
  738. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  739. beforeUploadInfo2(
  740. $event,
  741. 15
  742. )
  743. " />
  744. </button>
  745. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  746. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  747. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  748. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  749.  </el-tooltip>
  750. </div>
  751. </div>
  752. </div>
  753. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  754. <div class="add_chapters_box add_c_none" v-if="
  755. infoData2 &&
  756. infoData2.length == 0
  757. ">
  758. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  759. </div>
  760. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  761. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  762. getChapterData(
  763. $event,
  764. index1,
  765. item1.type
  766. )
  767. " >
  768. <div class="chapter_upload_o" style="
  769. position: relative;
  770. display: flex;
  771. align-items: center;
  772. ">
  773. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  774. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  775. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  776. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  777. </div>
  778. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  779. </div>
  780. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  781. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  782. </div>
  783. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  784. </div>
  785. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  786. </div>
  787. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  788. </div>
  789. </div>
  790. <div class="chapter_upload_n">
  791. <input readonly="true" v-if="
  792. item1.type == 2 ||
  793. item1.type == 3 ||
  794. item1.type == 12 ||
  795. item1.type == 13 ||
  796. item1.type == 7
  797. " :placeholder="item1.name" @click.stop="
  798. checkChpater2($event, index1 )
  799. " style="
  800. border: none;
  801. outline: none;
  802. width: 80%;
  803. minwidth: 215px;
  804. z-index: 99;
  805. font-size: 14px;
  806. white-space: nowrap;
  807. overflow: hidden;
  808. text-overflow: ellipsis;
  809. " />
  810. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  811. border: none;
  812. outline: none;
  813. width: 80%;
  814. white-space: nowrap;
  815. overflow: hidden;
  816. text-overflow: ellipsis;
  817. " readonly="true" @click="
  818. selectAttText(index1)
  819. " />
  820. <input :placeholder="item1.title ? item1.title : '链接'
  821. " v-if="item1.type == 8" style="
  822. border: none;
  823. outline: none;
  824. width: 80%;
  825. white-space: nowrap;
  826. overflow: hidden;
  827. text-overflow: ellipsis;
  828. " readonly="true" @click="selectLine(index1)" />
  829. <input :placeholder="item1.title ? item1.title : '链接'
  830. " v-if="item1.type == 14" style="
  831. border: none;
  832. outline: none;
  833. width: 80%;
  834. white-space: nowrap;
  835. overflow: hidden;
  836. text-overflow: ellipsis;
  837. " readonly="true" @click="
  838. openUpdateSource(index1)
  839. " />
  840. </div>
  841. <div class="chapter_upload_ic">
  842. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  843. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  844. checkChpater2($event, index1 )
  845. ">
  846. <div></div>
  847. </div>
  848. <div class="chapter_upload_ic_r" @click.stop="
  849. deleteInfoData2(
  850. $event,
  851. index1
  852. )
  853. ">
  854. <div></div>
  855. </div>
  856. </div>
  857. </div>
  858. </div>
  859. </div>
  860. </div>
  861. <div v-if="
  862. infoproVisible
  863. " class="mask">
  864. <div class="progressBox">
  865. <div class="lbox">
  866. <img src="../../../assets/loading.gif" />上传中,请稍后
  867. </div>
  868. <div style="margin-bottom: 10px">
  869. <span>{{
  870. infoisFinishSize
  871. }}M</span>
  872. /
  873. <span>{{
  874. infoisAllSize
  875. }}M</span>
  876. </div>
  877. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  878. ? infoprogress
  879. : 0
  880. " style="width: 80%"></el-progress>
  881. </div>
  882. </div>
  883. </div>
  884. </div>
  885. <div class="whiteBg" 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))">
  886. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  887. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  888. 课程简要描述
  889. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  890. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  891. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  892. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  893. </el-tooltip>
  894. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;">生成概况和目标</button>
  895. </div>
  896. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  897. <div style="width: calc(100%);" class='op_task_box'>
  898. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  899. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  900. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  901. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  902. <div class="op_box">
  903. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  904. <div style="display: flex;">
  905. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  906. <div class="r_pub_button_op"
  907. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  908. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  909. </el-tooltip>
  910. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
  911. </div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. </div>
  917. <div class="whiteBg" 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)">
  918. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  919. <div class="c_info_title">
  920. 课程目标
  921. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  922. <button class="c_pub_button_confirm" style="margin: 0px 20px 0px auto;"
  923. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  924. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标</button>
  925. </el-tooltip>
  926. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  927. <button class="c_pub_button_confirm" style="margin: 0 20px 0 0;"
  928. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  929. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标2</button>
  930. </el-tooltip>
  931. </div>
  932. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  933. <div style="width: calc(100%);" class='op_task_box'>
  934. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  935. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  936. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  937. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  938. <div class="op_box">
  939. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  940. <div style="display: flex;">
  941. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  942. <div class="r_pub_button_op"
  943. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  944. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  945. </el-tooltip>
  946. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  947. </div>
  948. </div>
  949. </div>
  950. </div>
  951. </div>
  952. </div>
  953. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  954. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  955. <div class="c_info_title">
  956. 补充资料
  957. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  958. </div>
  959. <div class="buchong_box">
  960. <span>暂时还没有内容,快去添加吧~</span>
  961. </div>
  962. </div> -->
  963. <div style="position: relative;
  964. background: #fff;
  965. box-sizing: border-box;
  966. padding: 1px 20px 10px;
  967. width: 100%;
  968. border-radius: 10px;">
  969. <div style="
  970. display: flex;
  971. flex-direction: row;
  972. justify-content: space-between;
  973. align-items: center;
  974. " :style="{
  975. margin: true
  976. ? '20px 0 10px'
  977. : '20px 0 0',
  978. }">
  979. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  980. 补充资料
  981. <div class="add_info_box" style="margin: 0 0 0 auto">
  982. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  983. 上传补充资料
  984. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  985. beforeUploadInfo2(
  986. $event,
  987. 13
  988. )
  989. " />
  990. </button>
  991. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  992. 图文
  993. </button>
  994. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  995. 链接
  996. </button>
  997. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  998. 代码
  999. </button>
  1000. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1001. 资源
  1002. </button> -->
  1003. </div>
  1004. </div>
  1005. </div>
  1006. <div>
  1007. <div class="add_chapters_box add_c_none" v-if="
  1008. infoData &&
  1009. infoData.length == 0
  1010. ">
  1011. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1012. </div>
  1013. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1014. <div @dragstart="
  1015. dragStart(item1, index1, 0)
  1016. " @dragover.prevent="
  1017. dragOver(index1, 0)
  1018. " @dragend="dragEnd()" :draggable="isdrag ==
  1019. 'chapter-' + 0 + '-' + index1
  1020. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1021. getChapterData(
  1022. $event,
  1023. index1,
  1024. item1.type
  1025. )
  1026. " :class="{
  1027. dragOverTop2:
  1028. newIndex === index1 &&
  1029. typeIndex ==
  1030. 'chapter-' +
  1031. 0 +
  1032. '-' +
  1033. index1 &&
  1034. oldIndex > index1 &&
  1035. dragType == 'drag',
  1036. dragOverBottom2:
  1037. newIndex === index1 &&
  1038. typeIndex ==
  1039. 'chapter-' +
  1040. 0 +
  1041. '-' +
  1042. index1 &&
  1043. oldIndex < index1 &&
  1044. dragType == 'drag',
  1045. }">
  1046. <!-- <div @mousedown="
  1047. isdrag =
  1048. 'chapter-' + 0 + '-' + index1
  1049. " @mouseup="isdrag = ''" @touchstart="
  1050. isdrag =
  1051. 'chapter-' + 0 + '-' + index1
  1052. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1053. <div class="chapter_upload_o" style="
  1054. position: relative;
  1055. display: flex;
  1056. align-items: center;
  1057. ">
  1058. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1059. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1060. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1061. </div>
  1062. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1063. </div>
  1064. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1065. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1066. </div>
  1067. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1068. </div>
  1069. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1070. </div>
  1071. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1072. </div>
  1073. </div>
  1074. <div class="chapter_upload_n">
  1075. <input readonly="true" v-if="
  1076. item1.type == 2 ||
  1077. item1.type == 3 ||
  1078. item1.type == 12 ||
  1079. item1.type == 13 ||
  1080. item1.type == 7
  1081. " :placeholder="item1.name" @click="
  1082. updataVideoT(
  1083. $event,
  1084. index1
  1085. )
  1086. " style="
  1087. border: none;
  1088. outline: none;
  1089. width: 80%;
  1090. minwidth: 215px;
  1091. z-index: 99;
  1092. font-size: 14px;
  1093. white-space: nowrap;
  1094. overflow: hidden;
  1095. text-overflow: ellipsis;
  1096. " />
  1097. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1098. border: none;
  1099. outline: none;
  1100. width: 80%;
  1101. white-space: nowrap;
  1102. overflow: hidden;
  1103. text-overflow: ellipsis;
  1104. " readonly="true" @click="
  1105. selectAttText(index1)
  1106. " />
  1107. <input :placeholder="item1.title ? item1.title : '链接'
  1108. " v-if="item1.type == 8" style="
  1109. border: none;
  1110. outline: none;
  1111. width: 80%;
  1112. white-space: nowrap;
  1113. overflow: hidden;
  1114. text-overflow: ellipsis;
  1115. " readonly="true" @click="selectLine(index1)" />
  1116. <input :placeholder="item1.title ? item1.title : '链接'
  1117. " v-if="item1.type == 14" style="
  1118. border: none;
  1119. outline: none;
  1120. width: 80%;
  1121. white-space: nowrap;
  1122. overflow: hidden;
  1123. text-overflow: ellipsis;
  1124. " readonly="true" @click="
  1125. openUpdateSource(index1)
  1126. " />
  1127. </div>
  1128. <div class="chapter_upload_ic">
  1129. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1130. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1131. <div class="chapter_upload_up" @click="
  1132. upCd(
  1133. $event,
  1134. index1
  1135. )
  1136. "></div>
  1137. <div class="chapter_upload_down" @click="
  1138. downCd(
  1139. $event,
  1140. index1
  1141. )
  1142. "></div>
  1143. </div>
  1144. <div class="chapter_upload_ic_edit" v-if="
  1145. item1.type == 2 ||
  1146. item1.type == 3 ||
  1147. item1.type == 12 ||
  1148. item1.type == 13 ||
  1149. item1.type == 7
  1150. " @click.stop="
  1151. updataVideoT(
  1152. $event,
  1153. index1
  1154. )
  1155. ">
  1156. <div></div>
  1157. </div>
  1158. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1159. selectAttText(index1)
  1160. ">
  1161. <div></div>
  1162. </div>
  1163. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1164. @click="selectLine(index1)">
  1165. <div></div>
  1166. </div>
  1167. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1168. openUpdateSource(index1)
  1169. ">
  1170. <div></div>
  1171. </div> -->
  1172. <div class="chapter_upload_ic_r" @click.stop="
  1173. deleteInfoData(
  1174. $event,
  1175. index1
  1176. )
  1177. ">
  1178. <div></div>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. </div>
  1183. </div>
  1184. </div>
  1185. <div v-if="
  1186. infoproVisible
  1187. " class="mask">
  1188. <div class="progressBox">
  1189. <!-- <div id="closePro" class="closeCss">
  1190. <img src="../../../../assets/icon/close.png" alt />
  1191. </div> -->
  1192. <div class="lbox">
  1193. <img src="../../../assets/loading.gif" />上传中,请稍后
  1194. </div>
  1195. <div style="margin-bottom: 10px">
  1196. <span>{{
  1197. infoisFinishSize
  1198. }}M</span>
  1199. /
  1200. <span>{{
  1201. infoisAllSize
  1202. }}M</span>
  1203. </div>
  1204. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1205. ? infoprogress
  1206. : 0
  1207. " style="width: 80%"></el-progress>
  1208. </div>
  1209. </div>
  1210. </div>
  1211. </div>
  1212. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1213. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1214. <div class="c_info_title">
  1215. 补充描述
  1216. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1217. </div>
  1218. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1219. <div style="width: calc(100%)">
  1220. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1221. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. </div>
  1226. <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">
  1227. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1228. <div class="c_info_title">
  1229. 课程大纲
  1230. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1231. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1232. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1233. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1234. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1235. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1236. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1237. </el-tooltip>
  1238. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1239. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1240. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1241. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1242. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1243. </div>
  1244. <div class="task_outline">
  1245. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1246. <div class="outline_task">
  1247. <div class="title">任务{{ index + 1 }}</div>
  1248. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1249. v-model="item.task" />
  1250. <div class="outline_btn">
  1251. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1252. <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>
  1253. </el-tooltip>
  1254. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1255. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1256. <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>
  1257. </div>
  1258. </div>
  1259. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1260. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1261. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1262. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1263. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1264. <div class="op_box">
  1265. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1266. <div style="display: flex;">
  1267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1268. <div class="r_pub_button_op"
  1269. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1270. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1271. </el-tooltip>
  1272. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1273. item.isTask3 ? '确定' : '编辑'}}</div>
  1274. </div>
  1275. </div>
  1276. </div>
  1277. </div>
  1278. </div>
  1279. </div>
  1280. </div>
  1281. <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)">
  1282. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1283. <div class="c_info_title">
  1284. 概念群
  1285. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1286. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1287. </div>
  1288. <div class="task_outline">
  1289. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1290. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1291. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1292. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1293. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1294. <div class="op_box">
  1295. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1296. <div style="display: flex;">
  1297. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1298. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1299. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1300. </el-tooltip>
  1301. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1302. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1303. </div>
  1304. </div>
  1305. </div>
  1306. </div>
  1307. </div>
  1308. </div>
  1309. <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)">
  1310. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1311. <div class="c_info_title">
  1312. 问题链
  1313. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1314. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1315. </div>
  1316. <div class="task_outline">
  1317. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1318. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1319. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1320. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1321. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1322. <div class="op_box">
  1323. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1324. <div style="display: flex;">
  1325. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1326. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1327. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1328. </el-tooltip>
  1329. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1330. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1331. </div>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. </div>
  1337. <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)">
  1338. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1339. <div class="c_info_title">
  1340. 目标层
  1341. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1342. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1343. </div>
  1344. <div class="task_outline">
  1345. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1346. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1347. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1348. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1349. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1350. <div class="op_box">
  1351. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1352. <div style="display: flex;">
  1353. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1354. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1355. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1356. </el-tooltip>
  1357. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1358. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1359. </div>
  1360. </div>
  1361. </div>
  1362. </div>
  1363. </div>
  1364. </div>
  1365. <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)">
  1366. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1367. <div class="c_info_title">
  1368. 任务簇
  1369. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1370. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1371. </div>
  1372. <div class="task_outline">
  1373. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1374. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1375. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1376. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1377. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1378. <div class="op_box">
  1379. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1380. <div style="display: flex;">
  1381. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1382. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1383. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1384. </el-tooltip>
  1385. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1386. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1387. </div>
  1388. </div>
  1389. </div>
  1390. </div>
  1391. </div>
  1392. </div>
  1393. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1394. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1395. <div class="c_info_title">
  1396. 教案
  1397. <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'">
  1398. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1399. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1400. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1401. </el-tooltip>
  1402. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1403. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1404. <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'">
  1405. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1406. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1407. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1408. </el-tooltip>
  1409. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1410. </div>
  1411. <div class="task_outline">
  1412. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1413. <div class="outline_task">
  1414. <div class="title">任务{{ index + 1 }}</div>
  1415. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1416. v-model="item.task" />
  1417. </div>
  1418. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1419. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1420. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1421. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1422. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1423. <div class="op_box">
  1424. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1425. <div style="display: flex;">
  1426. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1427. <div class="r_pub_button_op"
  1428. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1429. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1430. </el-tooltip>
  1431. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1432. item.isTask3 ? '确定' : '编辑'}}</div>
  1433. </div>
  1434. </div>
  1435. </div>
  1436. </div>
  1437. </div>
  1438. </div>
  1439. </div>
  1440. <div class="info_btnBox3" v-if="istemplate != 1">
  1441. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1442. goTo(
  1443. '/course?userid=' +
  1444. userid +
  1445. '&oid=' +
  1446. oid +
  1447. '&org=' +
  1448. org +
  1449. '&role=' +
  1450. role
  1451. )
  1452. ">
  1453. 返回课程
  1454. </button>
  1455. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1456. {{ steps == 4 ? "返回课程" : "上一步" }}
  1457. </button>
  1458. <button class="c_pub_button_confirm" v-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1459. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1460. </button>
  1461. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1462. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  1463. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1464. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1465. pub_btn_next_img: steps != 3,
  1466. pub_btn_finish_img: steps == 3,
  1467. }">
  1468. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1469. </button>
  1470. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1471. @contextmenu.prevent="nextSteps(1)" :class="{
  1472. pub_btn_next_img: steps != 3,
  1473. pub_btn_finish_img: steps == 3,
  1474. }">
  1475. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1476. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1477. : "下一步" }}
  1478. </button>
  1479. </el-tooltip>
  1480. </div>
  1481. </div>
  1482. <div class="rightBox" v-if="steps == 2" :style="{
  1483. height:
  1484. !isStepDisplay && !isBtnDisplay
  1485. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1486. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1487. }">
  1488. <div class="basic_box" style="
  1489. padding: 20px 30px 0px !important;
  1490. box-sizing: border-box;
  1491. height: calc(100% - 80px);
  1492. overflow: auto;
  1493. background: #fff;
  1494. ">
  1495. <!-- <div
  1496. style="
  1497. color: #b8b8b8;
  1498. background: #fff;
  1499. width: 26%;
  1500. height: 40px;
  1501. border-radius: 15px;
  1502. padding-left: 20px;
  1503. line-height: 40px;
  1504. font-size: 17px;
  1505. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1506. "
  1507. >-->
  1508. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1509. 请选择合适的课程模板
  1510. </div>
  1511. <div class="wordbox">
  1512. <div class="wordTeacher" @click="checkTemplate2()">
  1513. <div class="wordPic">
  1514. <img src="../../../assets/icon/new/template_none.png" alt />
  1515. </div>
  1516. <div style="
  1517. margin-top: 10px;
  1518. line-height: 19px;
  1519. overflow: hidden;
  1520. text-overflow: ellipsis;
  1521. white-space: nowrap;
  1522. padding: 0 20px;
  1523. ">
  1524. 空白模板
  1525. </div>
  1526. </div>
  1527. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1528. <div class="wordPic">
  1529. <img src="../../../assets/icon/new/template.png" alt />
  1530. </div>
  1531. <div style="
  1532. margin-top: 10px;
  1533. line-height: 19px;
  1534. overflow: hidden;
  1535. text-overflow: ellipsis;
  1536. white-space: nowrap;
  1537. padding: 0 20px;
  1538. ">
  1539. {{ aa.title }}
  1540. </div>
  1541. </div>
  1542. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1543. <div class="wordPic">
  1544. <img src="../../../assets/icon/new/template.png" alt />
  1545. </div>
  1546. <div style="
  1547. margin-top: 10px;
  1548. line-height: 19px;
  1549. overflow: hidden;
  1550. text-overflow: ellipsis;
  1551. white-space: nowrap;
  1552. padding: 0 20px;
  1553. ">
  1554. 简易模板
  1555. </div>
  1556. </div>
  1557. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1558. <div class="wordPic">
  1559. <img src="../../../assets/icon/new/template.png" alt />
  1560. </div>
  1561. <div style="
  1562. margin-top: 10px;
  1563. line-height: 19px;
  1564. overflow: hidden;
  1565. text-overflow: ellipsis;
  1566. white-space: nowrap;
  1567. padding: 0 20px;
  1568. ">
  1569. 智能粘贴模式
  1570. </div>
  1571. </div>
  1572. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1573. <div class="wordPic">
  1574. <img src="../../../assets/icon/wordMub.png" alt />
  1575. </div>
  1576. <div style="
  1577. margin-top: 10px;
  1578. line-height: 19px;
  1579. overflow: hidden;
  1580. text-overflow: ellipsis;
  1581. white-space: nowrap;
  1582. padding: 0 20px;
  1583. ">
  1584. 未来小学课程设计
  1585. </div>
  1586. </div> -->
  1587. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1588. <div class="wordPic">
  1589. <img src="../../../assets/icon/wordMub.png" alt />
  1590. </div>
  1591. <div style="
  1592. margin-top: 10px;
  1593. line-height: 19px;
  1594. overflow: hidden;
  1595. text-overflow: ellipsis;
  1596. white-space: nowrap;
  1597. padding: 0 20px;
  1598. ">
  1599. 我的课程
  1600. </div>
  1601. </div> -->
  1602. </div>
  1603. </div>
  1604. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1605. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1606. goTo(
  1607. '/course?userid=' +
  1608. userid +
  1609. '&oid=' +
  1610. oid +
  1611. '&org=' +
  1612. org +
  1613. '&role=' +
  1614. role
  1615. )
  1616. ">
  1617. 返回课程
  1618. </button>
  1619. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1620. {{ steps == 4 ? "返回课程" : "上一步" }}
  1621. </button>
  1622. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1623. pub_btn_next_img: steps != 3,
  1624. pub_btn_finish_img: steps == 3,
  1625. }">
  1626. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1627. </button>
  1628. </div>
  1629. </div>
  1630. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1631. height:
  1632. !isStepDisplay && !isBtnDisplay
  1633. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1634. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1635. }">
  1636. <div class="rb_c_box">
  1637. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1638. <div class="rb_c_nav">
  1639. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1640. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1641. </div>
  1642. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1643. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1644. position: istemplate == 1 ? 'sticky' : 'unset',
  1645. top: istemplate == 1 ? '0' : 'unset'
  1646. }">
  1647. <!-- <div class="navTop">辅助导航</div> -->
  1648. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1649. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1650. <div class="nt_taskBox" style="width: 100%;">
  1651. <div class="nt_taskTitle"
  1652. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1653. unitIndex + 1 }}</div>
  1654. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1655. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1656. <span>{{ unitJson[unitIndex].dyName }}</span>
  1657. </el-tooltip>
  1658. </div>
  1659. </div>
  1660. </div> -->
  1661. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1662. .taskJson" :key="tIndex" :class="{
  1663. dragOverTop:
  1664. newIndex === tIndex &&
  1665. typeIndex == 'task-' + tIndex &&
  1666. oldIndex > tIndex &&
  1667. dragType == 'task',
  1668. dragOverBottom:
  1669. newIndex === tIndex &&
  1670. typeIndex == 'task-' + tIndex &&
  1671. oldIndex < tIndex &&
  1672. dragType == 'task',
  1673. }">
  1674. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1675. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1676. class="navTask" :class="{
  1677. isNavTask:
  1678. isClickColor > 0 && isClickColor == tIndex + 1,
  1679. isNavOpen: t.toolOpen,
  1680. }">
  1681. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1682. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1683. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1684. class="chapter_upload_drag"></div>
  1685. <div class="nt_taskBox">
  1686. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1687. <div class="nt_taskName">
  1688. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1689. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1690. </el-tooltip>
  1691. </div>
  1692. </div>
  1693. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1694. 1
  1695. ">
  1696. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1697. @click.stop="taskMove(1, tIndex)"></div>
  1698. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1699. @click.stop="taskMove(2, tIndex)"></div>
  1700. </div> -->
  1701. </div>
  1702. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1703. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1704. @click="jumpGj(tIndex, toolIndex2)">
  1705. <div class="gjCss" :class="{
  1706. isGjCss:
  1707. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1708. }">
  1709. <div>工具{{ toolIndex2 + 1 }}:</div>
  1710. <div>
  1711. {{
  1712. toolsData[tool.tool[0]] &&
  1713. toolsData[tool.tool[0]].name
  1714. }}
  1715. </div>
  1716. </div>
  1717. </div>
  1718. </div>
  1719. </div>
  1720. </div>
  1721. <div class="navBottom" v-if="courseState == 1">
  1722. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1723. dragOverTop:
  1724. newIndex === stageIndex &&
  1725. typeIndex == 'Unit-' + stageIndex &&
  1726. oldIndex > stageIndex &&
  1727. dragType == 'Unit',
  1728. dragOverBottom:
  1729. newIndex === stageIndex &&
  1730. typeIndex == 'Unit-' + stageIndex &&
  1731. oldIndex < stageIndex &&
  1732. dragType == 'Unit',
  1733. }">
  1734. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1735. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1736. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1737. isNavStage: stageIndex == unitIndex,
  1738. isNavStageOpen: stage.toolOpen,
  1739. }">
  1740. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1741. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1742. class="chapter_upload_drag"></div>
  1743. <div class="nt_taskBox">
  1744. <div class="nt_taskTitle">
  1745. 第{{ stageIndex + 1 }}阶段:
  1746. </div>
  1747. <div class="nt_taskName">
  1748. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1749. " placement="top">
  1750. <span>{{
  1751. stage.dyName ? stage.dyName : "未命名阶段"
  1752. }}</span>
  1753. </el-tooltip>
  1754. </div>
  1755. </div>
  1756. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1757. </div>
  1758. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1759. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1760. dragOverTop:
  1761. newIndex === tIndex &&
  1762. typeIndex == 'task-' + tIndex &&
  1763. ((oldIndex > tIndex &&
  1764. stageIndex == checkUnitIndex) ||
  1765. (oldIndex == tIndex &&
  1766. stageIndex == checkUnitIndex &&
  1767. checkUnitIndex != oldUnitIndex)) &&
  1768. dragType == 'task',
  1769. dragOverBottom:
  1770. newIndex === tIndex &&
  1771. typeIndex == 'task-' + tIndex &&
  1772. oldIndex < tIndex &&
  1773. stageIndex == checkUnitIndex &&
  1774. dragType == 'task',
  1775. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1776. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1777. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1778. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1779. isNavTask:
  1780. isClickColor > 0 &&
  1781. isClickColor == tIndex + 1 &&
  1782. stageIndex == unitIndex,
  1783. isNavOpen: t.toolOpen,
  1784. }">
  1785. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1786. <div @mousedown="
  1787. isdrag = 'task-' + stageIndex + '-' + tIndex
  1788. " @mouseup="isdrag = ''" @touchstart="
  1789. isdrag = 'task-' + stageIndex + '-' + tIndex
  1790. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1791. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1792. <div class="nt_taskTitle">
  1793. 任务{{ tIndex + 1 }}:
  1794. </div>
  1795. <div class="nt_taskName">
  1796. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1797. <span>{{
  1798. t.task ? t.task : "未命名任务"
  1799. }}</span>
  1800. </el-tooltip>
  1801. </div>
  1802. </div>
  1803. </div>
  1804. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1805. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1806. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1807. <div class="gjCss" :class="{
  1808. isGjCss:
  1809. toolIndexType ==
  1810. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1811. }">
  1812. <div>工具{{ toolIndex2 + 1 }}:</div>
  1813. <div>
  1814. {{
  1815. toolsData[tool.tool[0]] &&
  1816. toolsData[tool.tool[0]].name
  1817. }}
  1818. </div>
  1819. </div>
  1820. </div>
  1821. </div>
  1822. </div>
  1823. </div>
  1824. </div>
  1825. </div>
  1826. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1827. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1828. </div>
  1829. </div>
  1830. <div class="rb_c_box_right">
  1831. <!-- <div class="rb_c_box_btn">
  1832. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1833. </div> -->
  1834. <div class="basic_box" ref="unitBox">
  1835. <div v-if="false" style="
  1836. display: flex;
  1837. flex-direction: row;
  1838. align-items: center;
  1839. position: sticky;
  1840. top: 0;
  1841. z-index: 99;
  1842. width: 100%;
  1843. padding: 0 20px 0 20px;
  1844. box-sizing: border-box;
  1845. background: #fff;
  1846. border-radius: 8px;
  1847. ">
  1848. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1849. <div class="cru_selectBox" :style="{
  1850. maxWidth: isPasteTask
  1851. ? 'calc(100% - 335px)'
  1852. : 'calc(100% - 190px)',
  1853. }" v-if="courseState == 1">
  1854. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1855. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1856. <!-- item.dyName ? item.dyName : -->
  1857. <span v-if="
  1858. unitJson[unitJson.length - 1].easy == 4 ||
  1859. unitJson[unitJson.length - 1].easy == 6
  1860. ">{{
  1861. item.dyName
  1862. ? item.dyName
  1863. : "第" + (index + 1) + "阶段"
  1864. }}</span>
  1865. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1866. </div>
  1867. <div class="cru_line" :style="{
  1868. left: offsetLetfPx + 'px',
  1869. }"></div>
  1870. </div>
  1871. <div class="addStageImg" @click="addunit()" v-if="
  1872. !(unitJson[unitJson.length - 1].easy == 4) &&
  1873. !(unitJson[unitJson.length - 1].easy == 6) &&
  1874. courseState == 1
  1875. ">
  1876. <img src="../../../assets/icon/new/addStage.png" alt />
  1877. </div>
  1878. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1879. v-if="courseState == 2" style="margin: 15px 0">
  1880. 新建阶段
  1881. </button>
  1882. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1883. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1884. 阶段顺序
  1885. </button>
  1886. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1887. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1888. 智能粘贴
  1889. </button>
  1890. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1891. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1892. }" style="padding: 0 12px">
  1893. 选择课程模板
  1894. </button>
  1895. </div>
  1896. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1897. :key="index">
  1898. <div v-if="courseState == 4" style="position: relative;
  1899. background: #fff;
  1900. box-sizing: border-box;
  1901. padding: 1px 20px 10px;
  1902. width: 100%;
  1903. border-radius: 10px;">
  1904. <div style="
  1905. display: flex;
  1906. flex-direction: row;
  1907. justify-content: space-between;
  1908. align-items: center;
  1909. " :style="{
  1910. margin: !item.taskJson[0].isFoldchapter
  1911. ? '20px 0 10px'
  1912. : '20px 0 0',
  1913. }">
  1914. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1915. 学习内容
  1916. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1917. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1918. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  1919. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  1920. </el-tooltip>
  1921. </div>
  1922. </div>
  1923. <div>
  1924. <div class="add_chapters_box add_c_none" v-if="
  1925. item.taskJson[0].chapterData &&
  1926. item.taskJson[0].chapterData.length == 0
  1927. ">
  1928. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1929. </div>
  1930. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1931. <div @dragstart="
  1932. dragStart(item1, index1, 0)
  1933. " @dragover.prevent="
  1934. dragOver(index1, 0)
  1935. " @dragend="dragEnd()" :draggable="isdrag ==
  1936. 'chapter-' + 0 + '-' + index1
  1937. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1938. :key="item1.id" @click="
  1939. getChapterData(
  1940. $event,
  1941. unitIndex,
  1942. index,
  1943. index1,
  1944. item1.type
  1945. )
  1946. " :class="{
  1947. dragOverTop2:
  1948. newIndex === index1 &&
  1949. typeIndex ==
  1950. 'chapter-' +
  1951. 0 +
  1952. '-' +
  1953. index1 &&
  1954. oldIndex > index1 &&
  1955. dragType == 'drag',
  1956. dragOverBottom2:
  1957. newIndex === index1 &&
  1958. typeIndex ==
  1959. 'chapter-' +
  1960. 0 +
  1961. '-' +
  1962. index1 &&
  1963. oldIndex < index1 &&
  1964. dragType == 'drag',
  1965. }">
  1966. <div @mousedown="
  1967. isdrag =
  1968. 'chapter-' + 0 + '-' + index1
  1969. " @mouseup="isdrag = ''" @touchstart="
  1970. isdrag =
  1971. 'chapter-' + 0 + '-' + index1
  1972. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1973. <div class="chapter_upload_o" style="
  1974. position: relative;
  1975. display: flex;
  1976. align-items: center;
  1977. ">
  1978. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1979. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1980. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1981. </div>
  1982. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1983. </div>
  1984. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1985. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1986. </div>
  1987. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1988. </div>
  1989. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1990. </div>
  1991. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1992. </div>
  1993. </div>
  1994. <div class="chapter_upload_n">
  1995. <input readonly="true" v-if="
  1996. item1.type == 2 ||
  1997. item1.type == 3 ||
  1998. item1.type == 12 ||
  1999. item1.type == 13 ||
  2000. item1.type == 7
  2001. " :placeholder="item1.name" @click="
  2002. updataVideoT(
  2003. $event,
  2004. unitIndex,
  2005. 0,
  2006. index1
  2007. )
  2008. " style="
  2009. border: none;
  2010. outline: none;
  2011. width: 80%;
  2012. minwidth: 215px;
  2013. z-index: 99;
  2014. font-size: 14px;
  2015. white-space: nowrap;
  2016. overflow: hidden;
  2017. text-overflow: ellipsis;
  2018. " />
  2019. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2020. border: none;
  2021. outline: none;
  2022. width: 80%;
  2023. white-space: nowrap;
  2024. overflow: hidden;
  2025. text-overflow: ellipsis;
  2026. " readonly="true" @click="
  2027. selectAttText(0, index1)
  2028. " />
  2029. <input :placeholder="item1.title ? item1.title : '链接'
  2030. " v-if="item1.type == 8" style="
  2031. border: none;
  2032. outline: none;
  2033. width: 80%;
  2034. white-space: nowrap;
  2035. overflow: hidden;
  2036. text-overflow: ellipsis;
  2037. " readonly="true" @click="selectLine(0, index1)" />
  2038. <input :placeholder="item1.title ? item1.title : '链接'
  2039. " v-if="item1.type == 14" style="
  2040. border: none;
  2041. outline: none;
  2042. width: 80%;
  2043. white-space: nowrap;
  2044. overflow: hidden;
  2045. text-overflow: ellipsis;
  2046. " readonly="true" @click="
  2047. openUpdateSource(0, index1)
  2048. " />
  2049. </div>
  2050. <div class="chapter_upload_ic">
  2051. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2052. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2053. checkChpater( $event, unitIndex, 0, index1 )
  2054. ">
  2055. <div></div>
  2056. </div>
  2057. <div class="chapter_upload_ud" style="z-index: 99">
  2058. <div class="chapter_upload_up" @click="
  2059. upCd(
  2060. $event,
  2061. unitIndex,
  2062. index,
  2063. 0,
  2064. index1
  2065. )
  2066. "></div>
  2067. <div class="chapter_upload_down" @click="
  2068. downCd(
  2069. $event,
  2070. unitIndex,
  2071. index,
  2072. 0,
  2073. index1
  2074. )
  2075. "></div>
  2076. </div>
  2077. <div class="chapter_upload_ic_edit" v-if="
  2078. item1.type == 2 ||
  2079. item1.type == 3 ||
  2080. item1.type == 12 ||
  2081. item1.type == 13 ||
  2082. item1.type == 7
  2083. " @click.stop="
  2084. updataVideoT(
  2085. $event,
  2086. unitIndex,
  2087. 0,
  2088. index1
  2089. )
  2090. ">
  2091. <div></div>
  2092. </div>
  2093. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2094. selectAttText(0, index1)
  2095. ">
  2096. <div></div>
  2097. </div>
  2098. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2099. @click="selectLine(0, index1)">
  2100. <div></div>
  2101. </div>
  2102. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2103. openUpdateSource(0, index1)
  2104. ">
  2105. <div></div>
  2106. </div>
  2107. <div class="chapter_upload_ic_r" @click.stop="
  2108. deleteChapterData(
  2109. $event,
  2110. unitIndex,
  2111. index,
  2112. index1,
  2113. 0
  2114. )
  2115. ">
  2116. <div></div>
  2117. </div>
  2118. </div>
  2119. </div>
  2120. </div>
  2121. </div>
  2122. </div>
  2123. <div class="add_info_box" style="margin: 10px 0 0">
  2124. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2125. 文件
  2126. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  2127. beforeUpload2(
  2128. $event,
  2129. unitIndex,
  2130. 13,
  2131. 0
  2132. )
  2133. " />
  2134. </button>
  2135. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2136. 图文
  2137. </button>
  2138. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2139. 链接
  2140. </button>
  2141. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2142. 代码
  2143. </button>
  2144. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2145. 资源
  2146. </button>
  2147. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2148. AI生成PPT
  2149. </button>
  2150. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2151. AI生成教案
  2152. </button>
  2153. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2154. 智能检索视频
  2155. </button>
  2156. </div>
  2157. <div v-if="
  2158. unitJson[unitIndex].chapterInfo[0].taskJson[
  2159. 0
  2160. ].proVisible
  2161. " class="mask">
  2162. <div class="progressBox">
  2163. <!-- <div id="closePro" class="closeCss">
  2164. <img src="../../../../assets/icon/close.png" alt />
  2165. </div> -->
  2166. <div class="lbox">
  2167. <img src="../../../assets/loading.gif" />上传中,请稍后
  2168. </div>
  2169. <div style="margin-bottom: 10px">
  2170. <span>{{
  2171. unitJson[unitIndex].chapterInfo[0].taskJson[
  2172. 0
  2173. ].isFinishSize
  2174. }}M</span>
  2175. /
  2176. <span>{{
  2177. unitJson[unitIndex].chapterInfo[0].taskJson[
  2178. 0
  2179. ].isAllSize
  2180. }}M</span>
  2181. </div>
  2182. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2183. 0
  2184. ].progress
  2185. ? unitJson[unitIndex].chapterInfo[0]
  2186. .taskJson[0].progress
  2187. : 0
  2188. " style="width: 80%"></el-progress>
  2189. </div>
  2190. </div>
  2191. </div>
  2192. <div class="chapter_box" v-if="courseState == 1">
  2193. <div class="chapter_contentbox">
  2194. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2195. <div class="cc_input">
  2196. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2197. v-model="unitJson[unitIndex].dyName" />
  2198. </div>
  2199. <div class="remove" v-if="
  2200. (unitJson.length > 1 || courseState != 2) &&
  2201. !(unitJson[unitJson.length - 1].easy == 4) &&
  2202. !(unitJson[unitJson.length - 1].easy == 6)
  2203. " @click="deleteUnit(unitIndex)"></div>
  2204. </div>
  2205. </div>
  2206. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2207. margin: 50px 0px 10px;
  2208. font-size: 1.5em;
  2209. font-weight: 700;
  2210. color: #0f7eff;
  2211. ">
  2212. 添加任务
  2213. </div> -->
  2214. <div class="taskBorder" :style="{
  2215. minHeight: unitJson[unitIndex].easy && 'unset',
  2216. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2217. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2218. <div style="background: #fff; border-radius: 5px">
  2219. <div class="taskTitle">
  2220. <div style="display: flex;width: 100%;justify-content: space-between;">
  2221. <span>任务{{ itemTaskIndex + 1 }}</span>
  2222. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2223. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2224. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2225. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2226. </el-tooltip>
  2227. </div>
  2228. </div>
  2229. <!-- padding: 20px; -->
  2230. <div v-if="unitJson[unitIndex].easy != 1">
  2231. <div :style="{
  2232. marginBottom:
  2233. unitJson[unitIndex].easy == 3 ||
  2234. (unitJson[unitIndex].easy == 5 &&
  2235. itemTask.taskType == 1)
  2236. ? '75px'
  2237. : '0',
  2238. }">
  2239. <div style="
  2240. display: flex;
  2241. margin: 0px 0 20px;
  2242. flex-direction: row;
  2243. justify-content: flex-start;
  2244. align-items: center;
  2245. ">
  2246. <div class="lineTitle">任务概述</div>
  2247. </div>
  2248. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2249. flex-direction: row;
  2250. justify-content: flex-start;
  2251. align-items: center;
  2252. margin: 0;
  2253. ">
  2254. <!-- <div class="cc_title">
  2255. 任务{{ itemTaskIndex + 1 }}
  2256. </div> -->
  2257. <div class="cc_input">
  2258. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2259. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2260. itemTaskIndex
  2261. ].task
  2262. " />
  2263. </div>
  2264. <div class="remove" v-if="
  2265. item.taskJson.length > 1 &&
  2266. (!unitJson[unitIndex].easy ||
  2267. unitJson[unitIndex].easy == 6)
  2268. " @click="deleteTask(itemTaskIndex)"></div>
  2269. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2270. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2271. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2272. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2273. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2274. </div> -->
  2275. </div>
  2276. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2277. display: flex;
  2278. margin: 20px 0;
  2279. flex-direction: row;
  2280. justify-content: flex-start;
  2281. align-items: center;
  2282. ">
  2283. <div class="lineTitle">任务描述</div>
  2284. </div> && !itemTask.isFold2-->
  2285. <div v-if="
  2286. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2287. -1
  2288. " style="margin-top: 20px" class="op_task_box"
  2289. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2290. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2291. itemTaskIndex
  2292. ].taskDetail
  2293. " @change="change"></editor-bar> -->
  2294. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2295. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2296. itemTaskIndex
  2297. ].taskDetail
  2298. "></textarea>
  2299. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2300. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2301. itemTaskIndex
  2302. ].taskDetail
  2303. "></textarea> -->
  2304. <div class="op_box">
  2305. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2306. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2307. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2308. itemTaskIndex
  2309. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2310. itemTaskIndex
  2311. ], itemTaskIndex)">智能优化</div>
  2312. </el-tooltip>
  2313. </div>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. <div
  2318. style="position: relative"
  2319. v-if="courseState == 5"
  2320. >
  2321. <div
  2322. style="
  2323. display: flex;
  2324. flex-direction: row;
  2325. justify-content: space-between;
  2326. align-items: center;
  2327. "
  2328. :style="{
  2329. margin: !itemTask.isFoldchapter
  2330. ? '20px 0 10px'
  2331. : '20px 0 0',
  2332. }"
  2333. >
  2334. <div
  2335. style="margin-bottom: 10px"
  2336. class="lineTitle clineTitle"
  2337. >
  2338. 学习内容
  2339. </div>
  2340. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2341. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2342. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2343. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2344. <!-- <div class="line"></div> -->
  2345. </div>
  2346. <!-- v-if="!itemTask.isFoldchapter" -->
  2347. <div>
  2348. <div
  2349. class="add_chapters_box add_c_none"
  2350. v-if="
  2351. itemTask.chapterData &&
  2352. itemTask.chapterData.length == 0
  2353. "
  2354. >
  2355. <img
  2356. src="../../../assets/icon/new/c_none.png"
  2357. alt
  2358. /><span>请添加学习内容</span>
  2359. </div>
  2360. <div
  2361. v-else
  2362. class="add_chapters_box"
  2363. style="display: flex; flex-direction: column"
  2364. >
  2365. <div
  2366. @dragstart="
  2367. dragStart(item1, index1, itemTaskIndex)
  2368. "
  2369. @dragover.prevent="
  2370. dragOver(index1, itemTaskIndex)
  2371. "
  2372. @dragend="dragEnd()"
  2373. :draggable="
  2374. isdrag ==
  2375. 'chapter-' + itemTaskIndex + '-' + index1
  2376. "
  2377. class="chapter_upload"
  2378. v-for="(item1, index1) in itemTask.chapterData"
  2379. :key="item1.id"
  2380. @click="
  2381. getChapterData(
  2382. $event,
  2383. unitIndex,
  2384. index,
  2385. index1,
  2386. item1.type
  2387. )
  2388. "
  2389. :class="{
  2390. dragOverTop2:
  2391. newIndex === index1 &&
  2392. typeIndex ==
  2393. 'chapter-' +
  2394. itemTaskIndex +
  2395. '-' +
  2396. index1 &&
  2397. oldIndex > index1 &&
  2398. dragType == 'drag',
  2399. dragOverBottom2:
  2400. newIndex === index1 &&
  2401. typeIndex ==
  2402. 'chapter-' +
  2403. itemTaskIndex +
  2404. '-' +
  2405. index1 &&
  2406. oldIndex < index1 &&
  2407. dragType == 'drag',
  2408. }"
  2409. >
  2410. <div
  2411. @mousedown="
  2412. isdrag =
  2413. 'chapter-' + itemTaskIndex + '-' + index1
  2414. "
  2415. @mouseup="isdrag = ''"
  2416. @touchstart="
  2417. isdrag =
  2418. 'chapter-' + itemTaskIndex + '-' + index1
  2419. "
  2420. @touchend="isdrag = ''"
  2421. class="chapter_upload_drag"
  2422. ></div>
  2423. <div
  2424. class="chapter_upload_o"
  2425. style="
  2426. position: relative;
  2427. display: flex;
  2428. align-items: center;
  2429. "
  2430. >
  2431. <div
  2432. class="chapter_upload_l"
  2433. style="padding: 1px 0 0 10px"
  2434. >
  2435. <div
  2436. v-if="item1.type == 2"
  2437. class="chapter_upload_l_i2"
  2438. ></div>
  2439. <div
  2440. v-if="item1.type == 3"
  2441. class="chapter_upload_l_i3"
  2442. style="margin-left: 1px"
  2443. ></div>
  2444. <div
  2445. v-if="item1.type == 6"
  2446. class="chapter_upload_l_i6"
  2447. style="margin-left: 1px"
  2448. ></div>
  2449. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2450. <div
  2451. v-if="item1.type == 8"
  2452. class="chapter_upload_l_i8"
  2453. style="margin-left: 1px"
  2454. ></div>
  2455. <div
  2456. v-if="item1.type == 14"
  2457. class="chapter_upload_l_i14"
  2458. style="margin-left: 1px"
  2459. ></div>
  2460. <div
  2461. v-if="item1.type == 12"
  2462. class="chapter_upload_l_i12"
  2463. style="margin-left: 1px"
  2464. ></div>
  2465. <div
  2466. v-if="item1.type == 13"
  2467. class="chapter_upload_l_i13"
  2468. style="margin-left: 1px"
  2469. ></div>
  2470. </div>
  2471. <div class="chapter_upload_n">
  2472. <input
  2473. readonly="true"
  2474. v-if="
  2475. item1.type == 2 ||
  2476. item1.type == 3 ||
  2477. item1.type == 12 ||
  2478. item1.type == 13 ||
  2479. item1.type == 7
  2480. "
  2481. :placeholder="item1.name"
  2482. @click="
  2483. updataVideoT(
  2484. $event,
  2485. unitIndex,
  2486. itemTaskIndex,
  2487. index1
  2488. )
  2489. "
  2490. style="
  2491. border: none;
  2492. outline: none;
  2493. width: 80%;
  2494. minwidth: 215px;
  2495. z-index: 99;
  2496. font-size: 14px;
  2497. white-space: nowrap;
  2498. overflow: hidden;
  2499. text-overflow: ellipsis;
  2500. "
  2501. />
  2502. <input
  2503. :placeholder="item1.name"
  2504. v-if="item1.type == 6"
  2505. style="
  2506. border: none;
  2507. outline: none;
  2508. width: 80%;
  2509. white-space: nowrap;
  2510. overflow: hidden;
  2511. text-overflow: ellipsis;
  2512. "
  2513. readonly="true"
  2514. @click="
  2515. selectAttText(itemTaskIndex, index1)
  2516. "
  2517. />
  2518. <input
  2519. :placeholder="
  2520. item1.title ? item1.title : '链接'
  2521. "
  2522. v-if="item1.type == 8"
  2523. style="
  2524. border: none;
  2525. outline: none;
  2526. width: 80%;
  2527. white-space: nowrap;
  2528. overflow: hidden;
  2529. text-overflow: ellipsis;
  2530. "
  2531. readonly="true"
  2532. @click="selectLine(itemTaskIndex, index1)"
  2533. />
  2534. <input
  2535. :placeholder="
  2536. item1.title ? item1.title : '链接'
  2537. "
  2538. v-if="item1.type == 14"
  2539. style="
  2540. border: none;
  2541. outline: none;
  2542. width: 80%;
  2543. white-space: nowrap;
  2544. overflow: hidden;
  2545. text-overflow: ellipsis;
  2546. "
  2547. readonly="true"
  2548. @click="
  2549. openUpdateSource(itemTaskIndex, index1)
  2550. "
  2551. />
  2552. </div>
  2553. <div class="chapter_upload_ic">
  2554. <div
  2555. class="chapter_upload_noSee"
  2556. v-if="item1.type == 12"
  2557. ></div>
  2558. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2559. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2560. ">
  2561. <div></div>
  2562. </div>
  2563. <div
  2564. class="chapter_upload_ud"
  2565. style="z-index: 99"
  2566. >
  2567. <div
  2568. class="chapter_upload_up"
  2569. @click="
  2570. upCd(
  2571. $event,
  2572. unitIndex,
  2573. index,
  2574. itemTaskIndex,
  2575. index1
  2576. )
  2577. "
  2578. ></div>
  2579. <div
  2580. class="chapter_upload_down"
  2581. @click="
  2582. downCd(
  2583. $event,
  2584. unitIndex,
  2585. index,
  2586. itemTaskIndex,
  2587. index1
  2588. )
  2589. "
  2590. ></div>
  2591. </div>
  2592. <div
  2593. class="chapter_upload_ic_edit"
  2594. v-if="
  2595. item1.type == 2 ||
  2596. item1.type == 3 ||
  2597. item1.type == 12 ||
  2598. item1.type == 13 ||
  2599. item1.type == 7
  2600. "
  2601. @click.stop="
  2602. updataVideoT(
  2603. $event,
  2604. unitIndex,
  2605. itemTaskIndex,
  2606. index1
  2607. )
  2608. "
  2609. >
  2610. <div></div>
  2611. </div>
  2612. <div
  2613. class="chapter_upload_ic_edit"
  2614. v-if="item1.type == 6"
  2615. @click="
  2616. selectAttText(itemTaskIndex, index1)
  2617. "
  2618. >
  2619. <div></div>
  2620. </div>
  2621. <div
  2622. class="chapter_upload_ic_edit"
  2623. v-if="item1.type == 8"
  2624. @click="selectLine(itemTaskIndex, index1)"
  2625. >
  2626. <div></div>
  2627. </div>
  2628. <div
  2629. class="chapter_upload_ic_edit"
  2630. v-if="item1.type == 14"
  2631. @click="
  2632. openUpdateSource(itemTaskIndex, index1)
  2633. "
  2634. >
  2635. <div></div>
  2636. </div>
  2637. <div
  2638. class="chapter_upload_ic_r"
  2639. @click.stop="
  2640. deleteChapterData(
  2641. $event,
  2642. unitIndex,
  2643. index,
  2644. index1,
  2645. itemTaskIndex
  2646. )
  2647. "
  2648. >
  2649. <div></div>
  2650. </div>
  2651. </div>
  2652. </div>
  2653. </div>
  2654. </div>
  2655. </div>
  2656. <!-- v-if="!itemTask.isFoldchapter" -->
  2657. <div class="add_info_box" style="margin: 10px 0 0">
  2658. <button
  2659. class="c_pub_button_add pub_btn_add_img"
  2660. @click="addImg($event)"
  2661. >
  2662. 文件
  2663. <input
  2664. type="file"
  2665. accept="*"
  2666. style="display: none"
  2667. v-if="inputShow"
  2668. @change="
  2669. beforeUpload2(
  2670. $event,
  2671. unitIndex,
  2672. 13,
  2673. itemTaskIndex
  2674. )
  2675. "
  2676. />
  2677. </button>
  2678. <button
  2679. class="c_pub_button_add pub_btn_add_img"
  2680. @click="addAttText(itemTaskIndex)"
  2681. >
  2682. 图文
  2683. </button>
  2684. <button
  2685. class="c_pub_button_add pub_btn_add_img"
  2686. @click="openLine(itemTaskIndex)"
  2687. >
  2688. 链接
  2689. </button>
  2690. <button
  2691. class="c_pub_button_add pub_btn_add_img"
  2692. @click="pasteLine(itemTaskIndex)"
  2693. >
  2694. 代码
  2695. </button>
  2696. <button
  2697. class="c_pub_button_add pub_btn_add_img"
  2698. @click="openSource(itemTaskIndex)"
  2699. >
  2700. 资源
  2701. </button>
  2702. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2703. AI生成PPT
  2704. </button>
  2705. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2706. AI生成教案
  2707. </button>
  2708. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2709. 智能检索视频
  2710. </button>
  2711. </div>
  2712. <div
  2713. v-if="
  2714. unitJson[unitIndex].chapterInfo[0].taskJson[
  2715. itemTaskIndex
  2716. ].proVisible
  2717. "
  2718. class="mask"
  2719. >
  2720. <div class="progressBox">
  2721. <!-- <div id="closePro" class="closeCss">
  2722. <img src="../../../../assets/icon/close.png" alt />
  2723. </div> -->
  2724. <div class="lbox">
  2725. <img
  2726. src="../../../assets/loading.gif"
  2727. />上传中,请稍后
  2728. </div>
  2729. <div style="margin-bottom: 10px">
  2730. <span
  2731. >{{
  2732. unitJson[unitIndex].chapterInfo[0].taskJson[
  2733. itemTaskIndex
  2734. ].isFinishSize
  2735. }}M</span
  2736. >
  2737. /
  2738. <span
  2739. >{{
  2740. unitJson[unitIndex].chapterInfo[0].taskJson[
  2741. itemTaskIndex
  2742. ].isAllSize
  2743. }}M</span
  2744. >
  2745. </div>
  2746. <el-progress
  2747. :text-inside="true"
  2748. :stroke-width="20"
  2749. :percentage="
  2750. unitJson[unitIndex].chapterInfo[0].taskJson[
  2751. itemTaskIndex
  2752. ].progress
  2753. ? unitJson[unitIndex].chapterInfo[0]
  2754. .taskJson[itemTaskIndex].progress
  2755. : 0
  2756. "
  2757. style="width: 80%"
  2758. ></el-progress>
  2759. </div>
  2760. </div>
  2761. </div>
  2762. <div v-if="
  2763. unitJson[unitIndex].easy == 1 ||
  2764. (unitJson[unitIndex].easy == 5 &&
  2765. itemTask.taskType == 2)
  2766. ">
  2767. <div>
  2768. <div class="add_chapters_box add_c_none" v-if="
  2769. itemTask.chapterData &&
  2770. itemTask.chapterData.length == 0
  2771. ">
  2772. <img src="../../../assets/icon/new/c_none.png" alt />
  2773. </div>
  2774. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2775. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2776. dragOver(index1, itemTaskIndex)
  2777. " @dragend="dragEnd()" :draggable="isdrag ==
  2778. 'chapter-' + itemTaskIndex + '-' + index1
  2779. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2780. :key="item1.id" @click="
  2781. getChapterData(
  2782. $event,
  2783. unitIndex,
  2784. index,
  2785. index1,
  2786. item1.type
  2787. )
  2788. " :class="{
  2789. dragOverTop2:
  2790. newIndex === index1 &&
  2791. typeIndex ==
  2792. 'chapter-' +
  2793. itemTaskIndex +
  2794. '-' +
  2795. index1 &&
  2796. oldIndex > index1,
  2797. dragOverBottom2:
  2798. newIndex === index1 &&
  2799. typeIndex ==
  2800. 'chapter-' +
  2801. itemTaskIndex +
  2802. '-' +
  2803. index1 &&
  2804. oldIndex < index1,
  2805. }">
  2806. <div @mousedown="
  2807. isdrag =
  2808. 'chapter-' + itemTaskIndex + '-' + index1
  2809. " @mouseup="isdrag = ''" @touchstart="
  2810. isdrag =
  2811. 'chapter-' + itemTaskIndex + '-' + index1
  2812. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2813. <div class="chapter_upload_t" style="width: 100%"></div>
  2814. <div class="chapter_upload_o" style="
  2815. position: relative;
  2816. display: flex;
  2817. align-items: center;
  2818. ">
  2819. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2820. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2821. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2822. </div>
  2823. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2824. </div>
  2825. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2826. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2827. </div>
  2828. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2829. </div>
  2830. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2831. </div>
  2832. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2833. </div>
  2834. </div>
  2835. <div class="chapter_upload_n">
  2836. <span style="
  2837. font-size: 14px;
  2838. color: rgb(109, 109, 109);
  2839. height: 14px;
  2840. line-height: 14px;
  2841. " v-if="
  2842. item1.type == 2 ||
  2843. item1.type == 3 ||
  2844. item1.type == 7
  2845. ">{{ item1.text }}-</span>
  2846. <input readonly="true" v-if="
  2847. item1.type == 2 ||
  2848. item1.type == 3 ||
  2849. item1.type == 7
  2850. " :placeholder="item1.name" @click="
  2851. updataVideoT(
  2852. $event,
  2853. unitIndex,
  2854. itemTaskIndex,
  2855. index1
  2856. )
  2857. " style="
  2858. border: none;
  2859. outline: none;
  2860. width: 80%;
  2861. minwidth: 215px;
  2862. z-index: 99;
  2863. font-size: 14px;
  2864. white-space: nowrap;
  2865. overflow: hidden;
  2866. text-overflow: ellipsis;
  2867. " />
  2868. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2869. border: none;
  2870. outline: none;
  2871. width: 80%;
  2872. white-space: nowrap;
  2873. overflow: hidden;
  2874. text-overflow: ellipsis;
  2875. " readonly="true" @click="
  2876. selectAttText(itemTaskIndex, index1)
  2877. " />
  2878. <input :placeholder="item1.title ? item1.title : '链接'
  2879. " v-if="item1.type == 8 || item1.type == 14" style="
  2880. border: none;
  2881. outline: none;
  2882. width: 80%;
  2883. white-space: nowrap;
  2884. overflow: hidden;
  2885. text-overflow: ellipsis;
  2886. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  2887. </div>
  2888. <div class="chapter_upload_ic">
  2889. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2890. <div class="chapter_upload_ud" style="z-index: 99">
  2891. <div class="chapter_upload_up" @click="
  2892. upCd(
  2893. $event,
  2894. unitIndex,
  2895. index,
  2896. itemTaskIndex,
  2897. index1
  2898. )
  2899. "></div>
  2900. <div class="chapter_upload_down" @click="
  2901. downCd(
  2902. $event,
  2903. unitIndex,
  2904. index,
  2905. itemTaskIndex,
  2906. index1
  2907. )
  2908. "></div>
  2909. </div>
  2910. <div class="chapter_upload_ic_edit" v-if="
  2911. item1.type == 2 ||
  2912. item1.type == 3 ||
  2913. item1.type == 12 ||
  2914. item1.type == 13 ||
  2915. item1.type == 7
  2916. " @click.stop="
  2917. updataVideoT(
  2918. $event,
  2919. unitIndex,
  2920. itemTaskIndex,
  2921. index1
  2922. )
  2923. ">
  2924. <div></div>
  2925. </div>
  2926. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2927. selectAttText(itemTaskIndex, index1)
  2928. ">
  2929. <div></div>
  2930. </div>
  2931. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2932. @click="selectLine(itemTaskIndex, index1)">
  2933. <div></div>
  2934. </div>
  2935. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2936. openUpdateSource(itemTaskIndex, index1)
  2937. ">
  2938. <div></div>
  2939. </div>
  2940. <div class="chapter_upload_ic_r" @click.stop="
  2941. deleteChapterData(
  2942. $event,
  2943. unitIndex,
  2944. index,
  2945. index1,
  2946. itemTaskIndex
  2947. )
  2948. ">
  2949. <div></div>
  2950. </div>
  2951. </div>
  2952. </div>
  2953. </div>
  2954. </div>
  2955. </div>
  2956. <div class="add_info_box" style="margin: 10px 0 0">
  2957. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2958. <span style="color: red">*</span>
  2959. 教学设计
  2960. <input type="file"
  2961. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2962. style="display: none" v-if="inputShow" @change="
  2963. beforeUpload3(
  2964. $event,
  2965. unitIndex,
  2966. 3,
  2967. itemTaskIndex,
  2968. '教学设计'
  2969. )
  2970. " />
  2971. </button>
  2972. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2973. <span style="color: red">*</span>
  2974. 教学课件
  2975. <input type="file"
  2976. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2977. style="display: none" v-if="inputShow" @change="
  2978. beforeUpload3(
  2979. $event,
  2980. unitIndex,
  2981. 3,
  2982. itemTaskIndex,
  2983. '教学课件'
  2984. )
  2985. " />
  2986. </button>
  2987. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2988. 教学视频
  2989. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  2990. style="display: none" v-if="inputShow" @change="
  2991. beforeUpload3(
  2992. $event,
  2993. unitIndex,
  2994. 2,
  2995. itemTaskIndex,
  2996. '教学视频'
  2997. )
  2998. " />
  2999. </button>
  3000. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3001. 教学音频
  3002. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3003. beforeUpload3(
  3004. $event,
  3005. unitIndex,
  3006. 2,
  3007. itemTaskIndex,
  3008. '教学音频'
  3009. )
  3010. " />
  3011. </button>
  3012. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3013. 学习单
  3014. <input type="file"
  3015. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3016. style="display: none" v-if="inputShow" @change="
  3017. beforeUpload3(
  3018. $event,
  3019. unitIndex,
  3020. 3,
  3021. itemTaskIndex,
  3022. '学习单'
  3023. )
  3024. " />
  3025. </button>
  3026. </div>
  3027. <div v-if="
  3028. unitJson[unitIndex].chapterInfo[0].taskJson[
  3029. itemTaskIndex
  3030. ].proVisible
  3031. " class="mask">
  3032. <div class="progressBox">
  3033. <!-- <div id="closePro" class="closeCss">
  3034. <img src="../../../../assets/icon/close.png" alt />
  3035. </div> -->
  3036. <div class="lbox">
  3037. <img src="../../../assets/loading.gif" />上传中,请稍后
  3038. </div>
  3039. <div style="margin-bottom: 10px">
  3040. <span>{{
  3041. unitJson[unitIndex].chapterInfo[0].taskJson[
  3042. itemTaskIndex
  3043. ].isFinishSize
  3044. }}M</span>
  3045. /
  3046. <span>{{
  3047. unitJson[unitIndex].chapterInfo[0].taskJson[
  3048. itemTaskIndex
  3049. ].isAllSize
  3050. }}M</span>
  3051. </div>
  3052. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3053. itemTaskIndex
  3054. ].progress
  3055. ? unitJson[unitIndex].chapterInfo[0]
  3056. .taskJson[itemTaskIndex].progress
  3057. : 0
  3058. " style="width: 80%"></el-progress>
  3059. </div>
  3060. </div>
  3061. </div>
  3062. </div>
  3063. <!-- padding: 20px; -->
  3064. <div style="
  3065. background: #fff;
  3066. border-radius: 5px;
  3067. margin-top: 15px;
  3068. ">
  3069. <div v-if="
  3070. unitJson[unitIndex].easy != 3 &&
  3071. !(
  3072. unitJson[unitIndex].easy == 5 &&
  3073. itemTask.taskType == 1
  3074. )
  3075. " style="
  3076. flex-direction: row;
  3077. justify-content: flex-start;
  3078. align-items: center;
  3079. ">
  3080. <div style="
  3081. display: flex;
  3082. flex-direction: row;
  3083. align-items: center;
  3084. margin: 5px 0 20px;
  3085. ">
  3086. <div class="lineTitle clineTitle">
  3087. {{
  3088. !unitJson[unitIndex].easy ||
  3089. unitJson[unitIndex].easy == 6 ||
  3090. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3091. -1
  3092. ? "练习内容"
  3093. : "评价内容"
  3094. }}
  3095. </div>
  3096. <!-- <div class="line" style="width: 90%"></div> -->
  3097. </div>
  3098. </div>
  3099. <div v-if="
  3100. unitJson[unitIndex].easy == 6 ||
  3101. !unitJson[unitIndex].easy
  3102. " class="toolChoose">
  3103. <div class="tools">
  3104. <div class="leftTools" style="width: 100%" v-for="(
  3105. itemTool, toolIndex
  3106. ) in itemTask.toolChoose" :key="toolIndex">
  3107. <div style="
  3108. display: flex;
  3109. flex-direction: row;
  3110. align-items: baseline;
  3111. flex-wrap: nowrap;
  3112. justify-content: flex-start;
  3113. position: relative;
  3114. ">
  3115. <div style="margin-right: 20px; font-weight: bold"
  3116. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3117. 工具 {{ toolIndex + 1 }} :
  3118. </div>
  3119. <div class="chooseWho">
  3120. <div :class="itemTool.toolType == 0
  3121. ? 'isChooseActive'
  3122. : ''
  3123. " @click="
  3124. (itemTool.toolType = 0),
  3125. (itemTool.isFold3 = false),
  3126. $forceUpdate()
  3127. ">
  3128. 互动类
  3129. </div>
  3130. <div :class="itemTool.toolType == 1
  3131. ? 'isChooseActive'
  3132. : ''
  3133. " @click="
  3134. (itemTool.toolType = 1),
  3135. (itemTool.isFold3 = false),
  3136. $forceUpdate()
  3137. ">
  3138. 思维类
  3139. </div>
  3140. <div :class="itemTool.toolType == 6
  3141. ? 'isChooseActive'
  3142. : ''
  3143. " @click="
  3144. (itemTool.toolType = 6),
  3145. (itemTool.isFold3 = false),
  3146. $forceUpdate()
  3147. ">
  3148. 协作类
  3149. </div>
  3150. <div :class="itemTool.toolType == 2
  3151. ? 'isChooseActive'
  3152. : ''
  3153. " @click="
  3154. (itemTool.toolType = 2),
  3155. (itemTool.isFold3 = false),
  3156. $forceUpdate()
  3157. ">
  3158. 测评类
  3159. </div>
  3160. <div :class="itemTool.toolType == 7
  3161. ? 'isChooseActive'
  3162. : ''
  3163. " @click="
  3164. (itemTool.toolType = 7),
  3165. (itemTool.isFold3 = false),
  3166. $forceUpdate()
  3167. ">
  3168. 评价类
  3169. </div>
  3170. <div :class="itemTool.toolType == 3
  3171. ? 'isChooseActive'
  3172. : ''
  3173. " @click="
  3174. (itemTool.toolType = 3),
  3175. (itemTool.isFold3 = false),
  3176. $forceUpdate()
  3177. ">
  3178. 编程类
  3179. </div>
  3180. <div :class="itemTool.toolType == 5
  3181. ? 'isChooseActive'
  3182. : ''
  3183. " @click="
  3184. (itemTool.toolType = 5),
  3185. (itemTool.isFold3 = false),
  3186. $forceUpdate()
  3187. ">
  3188. 学科类
  3189. </div>
  3190. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3191. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3192. 其他
  3193. </div> -->
  3194. </div>
  3195. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3196. margin:
  3197. itemTask.toolChoose.length > 1
  3198. ? '0px 35px 0px auto'
  3199. : '0 0 0 auto',
  3200. }" v-if="itemTask.toolChoose.length > 1">
  3201. <div class="chapter_upload_up2" @click.stop="
  3202. upTool(
  3203. $event,
  3204. unitIndex,
  3205. itemTaskIndex,
  3206. toolIndex
  3207. )
  3208. ">
  3209. 上移
  3210. </div>
  3211. <div class="chapter_upload_down2" @click.stop="
  3212. downTool(
  3213. $event,
  3214. unitIndex,
  3215. itemTaskIndex,
  3216. toolIndex
  3217. )
  3218. ">
  3219. 下移
  3220. </div>
  3221. </div>
  3222. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3223. @click="fold3(itemTaskIndex, toolIndex)"
  3224. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3225. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3226. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3227. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3228. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3229. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3230. v-if="itemTask.toolChoose.length > 1" style="
  3231. position: absolute;
  3232. right: 0;
  3233. top: -5px;
  3234. "></div>
  3235. </div>
  3236. <!-- v-show="!itemTool.isFold3" -->
  3237. <div style="min-height: 163px">
  3238. <div class="toolSort" v-if="itemTool.toolType == 0">
  3239. <!-- <div class="tool">
  3240. <div
  3241. class="whiteBIcon"
  3242. @click="addTools(8, itemTaskIndex, toolIndex)"
  3243. >
  3244. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3245. <div style="margin: 5px 0">素材库</div>
  3246. </div>
  3247. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3248. <img
  3249. src="../../../assets/icon/checkNo.png"
  3250. alt
  3251. v-if="itemTool.tool.indexOf(8) == -1"
  3252. />
  3253. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3254. alt /><span>已选择</span></div>
  3255. </div>
  3256. </div>-->
  3257. <!-- <div class="tool">
  3258. <div
  3259. class="whiteBIcon"
  3260. @click="addTools(17, itemTaskIndex, toolIndex)"
  3261. >
  3262. <img
  3263. src="../../../assets/icon/secondToolList/library.png"
  3264. alt
  3265. />
  3266. <div style="margin: 5px 0">学习资料</div>
  3267. </div>
  3268. <div
  3269. class="check"
  3270. @click="addTools(17, itemTaskIndex, toolIndex)"
  3271. >
  3272. <img
  3273. src="../../../assets/icon/checkNo.png"
  3274. alt
  3275. v-if="itemTool.tool.indexOf(17) == -1"
  3276. />
  3277. <img
  3278. src="../../../assets/icon/checkedIs.png"
  3279. alt
  3280. v-else
  3281. />
  3282. </div>10
  3283. </div> -->
  3284. <div class="tool" :class="{
  3285. isToolChoose:
  3286. itemTool.tool.indexOf(10) != -1,
  3287. }" @click="
  3288. addTools(10, itemTaskIndex, toolIndex)
  3289. ">
  3290. <div class="whiteBIcon" @click.stop="
  3291. openTools(itemTaskIndex, 10, toolIndex)
  3292. ">
  3293. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3294. <div style="margin: 5px 0">倒计时</div>
  3295. </div>
  3296. <div class="noCTool">
  3297. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3298. </div>
  3299. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3301. </div>
  3302. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3303. <img src="../../../assets/icon/checkNo.png" alt
  3304. v-if="itemTool.tool.indexOf(10) == -1" />
  3305. <div class="checkDiv" v-else>
  3306. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3307. </div>
  3308. </div> -->
  3309. </div>
  3310. <div class="tool" :class="{
  3311. isToolChoose:
  3312. itemTool.tool.indexOf(65) != -1,
  3313. }" @click="
  3314. addTools(65, itemTaskIndex, toolIndex)
  3315. ">
  3316. <div class="whiteBIcon" @click.stop="
  3317. addTools(65, itemTaskIndex, toolIndex)
  3318. ">
  3319. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3320. <div style="margin: 5px 0">挑人</div>
  3321. </div>
  3322. <div class="noCTool">
  3323. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3324. </div>
  3325. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3326. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3327. </div>
  3328. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3329. <img src="../../../assets/icon/checkNo.png" alt
  3330. v-if="itemTool.tool.indexOf(65) == -1" />
  3331. <div class="checkDiv" v-else>
  3332. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3333. </div>
  3334. </div> -->
  3335. </div>
  3336. <!-- <div class="tool">
  3337. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3338. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3339. <div style="margin: 5px 0">学生分组</div>
  3340. </div>
  3341. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3342. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3343. <div class="checkDiv" v-else>
  3344. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3345. </div>
  3346. </div>
  3347. </div> -->
  3348. <!-- <div class="tool">
  3349. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3350. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3351. <div style="margin: 5px 0">交互视频</div>
  3352. </div>
  3353. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3354. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3355. <div class="checkDiv" v-else>
  3356. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3357. </div>
  3358. </div>
  3359. </div> -->
  3360. </div>
  3361. <div class="toolSort" v-if="itemTool.toolType == 1">
  3362. <div class="tool" :class="{
  3363. isToolChoose:
  3364. itemTool.tool.indexOf(7) != -1,
  3365. }" @click="
  3366. addTools(7, itemTaskIndex, toolIndex)
  3367. ">
  3368. <div class="whiteBIcon" @click.stop="
  3369. addTools(7, itemTaskIndex, toolIndex)
  3370. ">
  3371. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3372. <div style="margin: 5px 0">思维网格</div>
  3373. </div>
  3374. <div class="noCTool">
  3375. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3376. </div>
  3377. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3378. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3379. </div>
  3380. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3381. <img src="../../../assets/icon/checkNo.png" alt
  3382. v-if="itemTool.tool.indexOf(7) == -1" />
  3383. <div class="checkDiv" v-else>
  3384. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3385. </div>
  3386. </div> -->
  3387. </div>
  3388. <div class="tool" :class="{
  3389. isToolChoose:
  3390. itemTool.tool.indexOf(1) != -1,
  3391. }" @click="
  3392. addTools(1, itemTaskIndex, toolIndex)
  3393. ">
  3394. <div class="whiteBIcon" @click.stop="
  3395. openTools(itemTaskIndex, 1, toolIndex)
  3396. ">
  3397. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3398. <div style="margin: 5px 0">电子白板</div>
  3399. </div>
  3400. <div class="noCTool">
  3401. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3402. </div>
  3403. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3404. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3405. </div>
  3406. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3407. <img src="../../../assets/icon/checkNo.png" alt
  3408. v-if="itemTool.tool.indexOf(1) == -1" />
  3409. <div class="checkDiv" v-else>
  3410. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3411. </div>
  3412. </div> -->
  3413. </div>
  3414. <!-- <div class="tool">
  3415. <div
  3416. class="whiteBIcon"
  3417. @click="addTools(2, itemTaskIndex, toolIndex)"
  3418. >
  3419. <img
  3420. src="../../../assets/icon/secondToolList/note.png"
  3421. alt
  3422. />
  3423. <div style="margin: 5px 0">便签</div>
  3424. </div>
  3425. <div
  3426. class="check"
  3427. @click="addTools(2, itemTaskIndex, toolIndex)"
  3428. >
  3429. <img
  3430. src="../../../assets/icon/checkNo.png"
  3431. alt
  3432. v-if="itemTool.tool.indexOf(2) == -1"
  3433. />
  3434. <div class="checkDiv" v-else>
  3435. <img
  3436. src="../../../assets/icon/checkedIs.png"
  3437. alt
  3438. /><span>已选择</span>
  3439. </div>
  3440. </div>
  3441. </div> -->
  3442. <!-- <div class="tool">
  3443. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3444. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3445. <div style="margin: 5px 0">协同文档</div>
  3446. </div>
  3447. <div
  3448. class="check"
  3449. @click="addTools(6, itemTaskIndex, toolIndex)"
  3450. >
  3451. <img
  3452. src="../../../assets/icon/checkNo.png"
  3453. alt
  3454. v-if="itemTool.tool.indexOf(6) == -1"
  3455. />
  3456. <div class="checkDiv" v-else>
  3457. <img
  3458. src="../../../assets/icon/checkedIs.png"
  3459. alt
  3460. /><span>已选择</span>
  3461. </div>
  3462. </div>
  3463. </div> -->
  3464. <div class="tool" :class="{
  3465. isToolChoose:
  3466. itemTool.tool.indexOf(52) != -1,
  3467. }" @click="
  3468. addTools(52, itemTaskIndex, toolIndex)
  3469. ">
  3470. <div class="whiteBIcon" @click.stop="
  3471. openTools(itemTaskIndex, 52, toolIndex)
  3472. ">
  3473. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3474. <div style="margin: 5px 0">文档</div>
  3475. </div>
  3476. <div class="noCTool">
  3477. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3478. </div>
  3479. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3480. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3481. </div>
  3482. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3483. <img src="../../../assets/icon/checkNo.png" alt
  3484. v-if="itemTool.tool.indexOf(52) == -1" />
  3485. <div class="checkDiv" v-else>
  3486. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3487. </div>
  3488. </div> -->
  3489. </div>
  3490. <div class="tool" :class="{
  3491. isToolChoose:
  3492. itemTool.tool.indexOf(3) != -1,
  3493. }" @click="
  3494. addTools(3, itemTaskIndex, toolIndex)
  3495. ">
  3496. <div class="whiteBIcon" @click.stop="
  3497. openTools(itemTaskIndex, 3, toolIndex)
  3498. ">
  3499. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3500. <div style="margin: 5px 0">思维导图</div>
  3501. </div>
  3502. <div class="noCTool">
  3503. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3504. </div>
  3505. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3506. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3507. </div>
  3508. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3509. <img src="../../../assets/icon/checkNo.png" alt
  3510. v-if="itemTool.tool.indexOf(3) == -1" />
  3511. <div class="checkDiv" v-else>
  3512. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3513. </div>
  3514. </div> -->
  3515. </div>
  3516. <div class="tool" :class="{
  3517. isToolChoose:
  3518. itemTool.tool.indexOf(48) != -1,
  3519. }" @click="
  3520. addTools(48, itemTaskIndex, toolIndex)
  3521. ">
  3522. <div class="whiteBIcon" @click.stop="
  3523. openTools(itemTaskIndex, 48, toolIndex)
  3524. ">
  3525. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3526. <div style="margin: 5px 0">表格</div>
  3527. </div>
  3528. <div class="noCTool">
  3529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3530. </div>
  3531. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3532. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3533. </div>
  3534. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3535. <img src="../../../assets/icon/checkNo.png" alt
  3536. v-if="itemTool.tool.indexOf(48) == -1" />
  3537. <div class="checkDiv" v-else>
  3538. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3539. </div>
  3540. </div> -->
  3541. </div>
  3542. </div>
  3543. <div class="toolSort" v-if="itemTool.toolType == 6">
  3544. <div class="tool" :class="{
  3545. isToolChoose:
  3546. itemTool.tool.indexOf(49) != -1,
  3547. }" @click="
  3548. addTools(49, itemTaskIndex, toolIndex)
  3549. ">
  3550. <div class="whiteBIcon" @click.stop="
  3551. openTools(itemTaskIndex, 49, toolIndex)
  3552. ">
  3553. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3554. <div style="margin: 5px 0">学生分组</div>
  3555. </div>
  3556. <div class="noCTool">
  3557. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3558. </div>
  3559. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3560. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3561. </div>
  3562. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3563. <img src="../../../assets/icon/checkNo.png" alt
  3564. v-if="itemTool.tool.indexOf(49) == -1" />
  3565. <div class="checkDiv" v-else>
  3566. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3567. </div>
  3568. </div> -->
  3569. </div>
  3570. </div>
  3571. <div class="toolSort" v-if="itemTool.toolType == 2">
  3572. <!-- <div class="tool">
  3573. <div
  3574. class="whiteBIcon"
  3575. @click="addTools(5, itemTaskIndex, toolIndex)"
  3576. >
  3577. <img
  3578. src="../../../assets/icon/thirdToolList/score.png"
  3579. alt
  3580. />
  3581. <div style="margin: 5px 0">量规评分</div>
  3582. </div>
  3583. <div
  3584. class="check"
  3585. @click="addTools(5, itemTaskIndex, toolIndex)"
  3586. >
  3587. <img
  3588. src="../../../assets/icon/checkNo.png"
  3589. alt
  3590. v-if="itemTool.tool.indexOf(5) == -1"
  3591. />
  3592. <img
  3593. src="../../../assets/icon/checkedIs.png"
  3594. alt
  3595. v-else
  3596. />
  3597. </div>
  3598. </div>-->
  3599. <div class="tool" :class="{
  3600. isToolChoose:
  3601. itemTool.tool.indexOf(4) != -1,
  3602. }" @click="
  3603. addTools(4, itemTaskIndex, toolIndex)
  3604. ">
  3605. <div class="whiteBIcon" @click.stop="
  3606. openTools(itemTaskIndex, 4, toolIndex)
  3607. ">
  3608. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3609. <div style="margin: 5px 0">问卷调查</div>
  3610. </div>
  3611. <div class="noCTool">
  3612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3613. </div>
  3614. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3615. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3616. </div>
  3617. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3618. <img src="../../../assets/icon/checkNo.png" alt
  3619. v-if="itemTool.tool.indexOf(4) == -1" />
  3620. <div class="checkDiv" v-else>
  3621. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3622. </div>
  3623. </div> -->
  3624. </div>
  3625. <div class="tool" :class="{
  3626. isToolChoose:
  3627. itemTool.tool.indexOf(45) != -1,
  3628. }" @click="
  3629. addTools(45, itemTaskIndex, toolIndex)
  3630. ">
  3631. <div class="whiteBIcon" @click="
  3632. openTools(itemTaskIndex, 45, toolIndex)
  3633. ">
  3634. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3635. <div style="margin: 5px 0">选择题</div>
  3636. </div>
  3637. <div class="noCTool">
  3638. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3639. </div>
  3640. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3641. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3642. </div>
  3643. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3644. <img src="../../../assets/icon/checkNo.png" alt
  3645. v-if="itemTool.tool.indexOf(45) == -1" />
  3646. <div class="checkDiv" v-else>
  3647. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3648. </div>
  3649. </div> -->
  3650. </div>
  3651. <div class="tool" :class="{
  3652. isToolChoose:
  3653. itemTool.tool.indexOf(15) != -1,
  3654. }" @click="
  3655. addTools(15, itemTaskIndex, toolIndex)
  3656. ">
  3657. <div class="whiteBIcon" @click.stop="
  3658. openTools(itemTaskIndex, 15, toolIndex)
  3659. ">
  3660. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3661. <div style="margin: 5px 0">问答</div>
  3662. </div>
  3663. <div class="noCTool">
  3664. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3665. </div>
  3666. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3667. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3668. </div>
  3669. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3670. <img src="../../../assets/icon/checkNo.png" alt
  3671. v-if="itemTool.tool.indexOf(15) == -1" />
  3672. <div class="checkDiv" v-else>
  3673. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3674. </div>
  3675. </div> -->
  3676. </div>
  3677. <div class="tool" :class="{
  3678. isToolChoose:
  3679. itemTool.tool.indexOf(16) != -1,
  3680. }" @click="
  3681. addTools(16, itemTaskIndex, toolIndex)
  3682. ">
  3683. <div class="whiteBIcon" @click.stop="
  3684. addTools(16, itemTaskIndex, toolIndex)
  3685. ">
  3686. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3687. <div style="margin: 5px 0">作业提交</div>
  3688. </div>
  3689. <div class="noCTool">
  3690. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3691. </div>
  3692. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3693. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3694. </div>
  3695. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3696. <img src="../../../assets/icon/checkNo.png" alt
  3697. v-if="itemTool.tool.indexOf(16) == -1" />
  3698. <div class="checkDiv" v-else>
  3699. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3700. </div>
  3701. </div> -->
  3702. </div>
  3703. <div class="tool" :class="{
  3704. isToolChoose:
  3705. itemTool.tool.indexOf(50) != -1,
  3706. }" @click="
  3707. addTools(50, itemTaskIndex, toolIndex)
  3708. ">
  3709. <div class="whiteBIcon" @click.stop="
  3710. addTools(50, itemTaskIndex, toolIndex)
  3711. ">
  3712. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3713. <div style="margin: 5px 0">批量上传</div>
  3714. </div>
  3715. <div class="noCTool">
  3716. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3717. </div>
  3718. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3719. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3720. </div>
  3721. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3722. <img src="../../../assets/icon/checkNo.png" alt
  3723. v-if="itemTool.tool.indexOf(50) == -1" />
  3724. <div class="checkDiv" v-else>
  3725. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3726. </div>
  3727. </div> -->
  3728. </div>
  3729. <!-- <div class="tool">
  3730. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3731. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3732. <div style="margin: 5px 0">个人评价</div>
  3733. </div>
  3734. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3735. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3736. <div class="checkDiv" v-else>
  3737. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3738. </div>
  3739. </div>
  3740. </div> -->
  3741. <div class="tool" :class="{
  3742. isToolChoose:
  3743. itemTool.tool.indexOf(41) != -1,
  3744. }" @click="
  3745. addTools(41, itemTaskIndex, toolIndex)
  3746. ">
  3747. <div class="whiteBIcon" @click.stop="
  3748. openTools(itemTaskIndex, 41, toolIndex)
  3749. ">
  3750. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3751. <div style="margin: 5px 0">选择匹配</div>
  3752. </div>
  3753. <div class="noCTool">
  3754. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3755. </div>
  3756. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3758. </div>
  3759. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3760. <img src="../../../assets/icon/checkNo.png" alt
  3761. v-if="itemTool.tool.indexOf(41) == -1" />
  3762. <div class="checkDiv" v-else>
  3763. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3764. </div>
  3765. </div> -->
  3766. </div>
  3767. <div class="tool" :class="{
  3768. isToolChoose:
  3769. itemTool.tool.indexOf(47) != -1,
  3770. }" @click="
  3771. addTools(47, itemTaskIndex, toolIndex)
  3772. ">
  3773. <div class="whiteBIcon" @click.stop="
  3774. openTools(itemTaskIndex, 47, toolIndex)
  3775. ">
  3776. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3777. <div style="margin: 5px 0">排序</div>
  3778. </div>
  3779. <div class="noCTool">
  3780. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3781. </div>
  3782. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3783. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3784. </div>
  3785. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3786. <img src="../../../assets/icon/checkNo.png" alt
  3787. v-if="itemTool.tool.indexOf(47) == -1" />
  3788. <div class="checkDiv" v-else>
  3789. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3790. </div>
  3791. </div> -->
  3792. </div>
  3793. <!-- <div class="tool">
  3794. <div
  3795. class="whiteBIcon"
  3796. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3797. >
  3798. <img
  3799. src="../../../assets/icon/thirdToolList/mp3.png"
  3800. alt
  3801. />
  3802. <div style="margin: 5px 0">上传音频</div>
  3803. </div>
  3804. <div
  3805. class="check"
  3806. @click="addTools(42, itemTaskIndex, toolIndex)"
  3807. >
  3808. <img
  3809. src="../../../assets/icon/checkNo.png"
  3810. alt
  3811. v-if="itemTool.tool.indexOf(42) == -1"
  3812. />
  3813. <img
  3814. src="../../../assets/icon/checkedIs.png"
  3815. alt
  3816. v-else
  3817. />
  3818. </div>
  3819. </div> -->
  3820. </div>
  3821. <div class="toolSort" v-if="itemTool.toolType == 3">
  3822. <div class="tool" :class="{
  3823. isToolChoose:
  3824. itemTool.tool.indexOf(18) != -1,
  3825. }" @click="
  3826. addTools(18, itemTaskIndex, toolIndex)
  3827. ">
  3828. <div class="whiteBIcon" @click.stop="
  3829. addTools(18, itemTaskIndex, toolIndex)
  3830. ">
  3831. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3832. <div style="margin: 5px 0">训练平台</div>
  3833. </div>
  3834. <div class="noCTool">
  3835. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3836. </div>
  3837. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3838. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3839. </div>
  3840. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3841. <img src="../../../assets/icon/checkNo.png" alt
  3842. v-if="itemTool.tool.indexOf(18) == -1" />
  3843. <div class="checkDiv" v-else>
  3844. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3845. </div>
  3846. </div> -->
  3847. </div>
  3848. <div class="tool" :class="{
  3849. isToolChoose:
  3850. itemTool.tool.indexOf(21) != -1,
  3851. }" @click="
  3852. addTools(21, itemTaskIndex, toolIndex)
  3853. ">
  3854. <div class="whiteBIcon" @click.stop="
  3855. addTools(21, itemTaskIndex, toolIndex)
  3856. ">
  3857. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  3858. <div style="margin: 5px 0">
  3859. AIoT Blockly
  3860. </div>
  3861. </div>
  3862. <div class="noCTool">
  3863. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3864. </div>
  3865. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  3866. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3867. </div>
  3868. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  3869. <img src="../../../assets/icon/checkNo.png" alt
  3870. v-if="itemTool.tool.indexOf(21) == -1" />
  3871. <div class="checkDiv" v-else>
  3872. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3873. </div>
  3874. </div> -->
  3875. </div>
  3876. <!-- <div class="tool">
  3877. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  3878. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  3879. <div style="margin: 5px 0">AI体验</div>
  3880. </div>
  3881. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  3882. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  3883. <div class="checkDiv" v-else>
  3884. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3885. </div>
  3886. </div>
  3887. </div> -->
  3888. <div class="tool" :class="{
  3889. isToolChoose:
  3890. itemTool.tool.indexOf(23) != -1,
  3891. }" @click="
  3892. addTools(23, itemTaskIndex, toolIndex)
  3893. ">
  3894. <div class="whiteBIcon" @click.stop="
  3895. addTools(23, itemTaskIndex, toolIndex)
  3896. ">
  3897. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  3898. <div style="margin: 5px 0">AI Python</div>
  3899. </div>
  3900. <div class="noCTool">
  3901. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3902. </div>
  3903. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  3904. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3905. </div>
  3906. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  3907. <img src="../../../assets/icon/checkNo.png" alt
  3908. v-if="itemTool.tool.indexOf(23) == -1" />
  3909. <div class="checkDiv" v-else>
  3910. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3911. </div>
  3912. </div> -->
  3913. </div>
  3914. <div class="tool" :class="{
  3915. isToolChoose:
  3916. itemTool.tool.indexOf(24) != -1,
  3917. }" @click="
  3918. addTools(24, itemTaskIndex, toolIndex)
  3919. ">
  3920. <div class="whiteBIcon" @click.stop="
  3921. addTools(24, itemTaskIndex, toolIndex)
  3922. ">
  3923. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  3924. <div style="margin: 5px 0">
  3925. AI Blockly
  3926. </div>
  3927. </div>
  3928. <div class="noCTool">
  3929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3930. </div>
  3931. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  3932. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3933. </div>
  3934. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  3935. <img src="../../../assets/icon/checkNo.png" alt
  3936. v-if="itemTool.tool.indexOf(24) == -1" />
  3937. <div class="checkDiv" v-else>
  3938. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3939. </div>
  3940. </div> -->
  3941. </div>
  3942. <div class="tool" :class="{
  3943. isToolChoose:
  3944. itemTool.tool.indexOf(32) != -1,
  3945. }" @click="
  3946. addTools(32, itemTaskIndex, toolIndex)
  3947. ">
  3948. <div class="whiteBIcon" @click.stop="
  3949. addTools(32, itemTaskIndex, toolIndex)
  3950. ">
  3951. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  3952. <div style="margin: 5px 0">源码编辑</div>
  3953. </div>
  3954. <div class="noCTool">
  3955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3956. </div>
  3957. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  3958. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3959. </div>
  3960. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  3961. <img src="../../../assets/icon/checkNo.png" alt
  3962. v-if="itemTool.tool.indexOf(32) == -1" />
  3963. <div class="checkDiv" v-else>
  3964. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3965. </div>
  3966. </div> -->
  3967. </div>
  3968. <div class="tool" :class="{
  3969. isToolChoose:
  3970. itemTool.tool.indexOf(57) != -1,
  3971. }" @click="
  3972. addTools(57, itemTaskIndex, toolIndex)
  3973. ">
  3974. <div class="whiteBIcon" @click.stop="
  3975. openTools(itemTaskIndex, 57, toolIndex)
  3976. ">
  3977. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  3978. <div style="margin: 5px 0">CocoPi</div>
  3979. </div>
  3980. <div class="noCTool">
  3981. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3982. </div>
  3983. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  3984. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3985. </div>
  3986. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  3987. <img src="../../../assets/icon/checkNo.png" alt
  3988. v-if="itemTool.tool.indexOf(57) == -1" />
  3989. <div class="checkDiv" v-else>
  3990. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3991. </div>
  3992. </div> -->
  3993. </div>
  3994. <div class="tool" :class="{
  3995. isToolChoose:
  3996. itemTool.tool.indexOf(63) != -1,
  3997. }" @click="
  3998. addTools(63, itemTaskIndex, toolIndex)
  3999. ">
  4000. <div class="whiteBIcon" @click.stop="
  4001. addTools(63, itemTaskIndex, toolIndex)
  4002. ">
  4003. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4004. <div style="margin: 5px 0">海龟编程</div>
  4005. </div>
  4006. <div class="noCTool">
  4007. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4008. </div>
  4009. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4010. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4011. </div>
  4012. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4013. <img src="../../../assets/icon/checkNo.png" alt
  4014. v-if="itemTool.tool.indexOf(63) == -1" />
  4015. <div class="checkDiv" v-else>
  4016. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4017. </div>
  4018. </div> -->
  4019. </div>
  4020. <div class="tool" :class="{
  4021. isToolChoose:
  4022. itemTool.tool.indexOf(71) != -1,
  4023. }" @click="
  4024. addTools(71, itemTaskIndex, toolIndex)
  4025. ">
  4026. <div class="whiteBIcon" @click.stop="
  4027. addTools(71, itemTaskIndex, toolIndex)
  4028. ">
  4029. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4030. <div style="margin: 5px 0">AI智能体</div>
  4031. </div>
  4032. <div class="noCTool">
  4033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4034. </div>
  4035. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4036. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4037. </div>
  4038. </div>
  4039. </div>
  4040. <div class="toolSort" v-if="itemTool.toolType == 7">
  4041. <div class="tool" :class="{
  4042. isToolChoose:
  4043. itemTool.tool.indexOf(40) != -1,
  4044. }" @click.stop="
  4045. addTools(40, itemTaskIndex, toolIndex)
  4046. ">
  4047. <div class="whiteBIcon" @click.stop="
  4048. openTools(itemTaskIndex, 40, toolIndex)
  4049. ">
  4050. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4051. <div style="margin: 5px 0">个人评价</div>
  4052. </div>
  4053. <div class="noCTool">
  4054. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4055. </div>
  4056. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4057. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4058. </div>
  4059. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4060. <img src="../../../assets/icon/checkNo.png" alt
  4061. v-if="itemTool.tool.indexOf(40) == -1" />
  4062. <div class="checkDiv" v-else>
  4063. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4064. </div>
  4065. </div> -->
  4066. </div>
  4067. </div>
  4068. <div class="toolSort" v-if="itemTool.toolType == 5">
  4069. <div class="tool" :class="{
  4070. isToolChoose:
  4071. itemTool.tool.indexOf(28) != -1,
  4072. }" @click="
  4073. addTools(28, itemTaskIndex, toolIndex)
  4074. ">
  4075. <div class="whiteBIcon" @click.stop="
  4076. addTools(28, itemTaskIndex, toolIndex)
  4077. ">
  4078. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4079. <div style="margin: 5px 0">翻译</div>
  4080. </div>
  4081. <div class="noCTool">
  4082. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4083. </div>
  4084. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4085. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4086. </div>
  4087. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4088. <img src="../../../assets/icon/checkNo.png" alt
  4089. v-if="itemTool.tool.indexOf(28) == -1" />
  4090. <div class="checkDiv" v-else>
  4091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4092. </div>
  4093. </div> -->
  4094. </div>
  4095. <div class="tool" :class="{
  4096. isToolChoose:
  4097. itemTool.tool.indexOf(31) != -1,
  4098. }" @click="
  4099. addTools(31, itemTaskIndex, toolIndex)
  4100. ">
  4101. <div class="whiteBIcon" @click.stop="
  4102. addTools(31, itemTaskIndex, toolIndex)
  4103. ">
  4104. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4105. <div style="margin: 5px 0">数字画板</div>
  4106. </div>
  4107. <div class="noCTool">
  4108. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4109. </div>
  4110. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4111. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4112. </div>
  4113. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4114. <img src="../../../assets/icon/checkNo.png" alt
  4115. v-if="itemTool.tool.indexOf(31) == -1" />
  4116. <div class="checkDiv" v-else>
  4117. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4118. </div>
  4119. </div> -->
  4120. </div>
  4121. <div class="tool" :class="{
  4122. isToolChoose:
  4123. itemTool.tool.indexOf(39) != -1,
  4124. }" @click="
  4125. addTools(39, itemTaskIndex, toolIndex)
  4126. ">
  4127. <div class="whiteBIcon" @click.stop="
  4128. addTools(39, itemTaskIndex, toolIndex)
  4129. ">
  4130. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4131. <div style="margin: 5px 0">GeoGebra</div>
  4132. </div>
  4133. <div class="noCTool">
  4134. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4135. </div>
  4136. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4137. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4138. </div>
  4139. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4140. <img src="../../../assets/icon/checkNo.png" alt
  4141. v-if="itemTool.tool.indexOf(39) == -1" />
  4142. <div class="checkDiv" v-else>
  4143. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4144. </div>
  4145. </div> -->
  4146. </div>
  4147. <div class="tool" :class="{
  4148. isToolChoose:
  4149. itemTool.tool.indexOf(66) != -1,
  4150. }" @click="
  4151. addTools(66, itemTaskIndex, toolIndex)
  4152. ">
  4153. <div class="whiteBIcon" @click.stop="
  4154. addTools(66, itemTaskIndex, toolIndex)
  4155. ">
  4156. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4157. <div style="margin: 5px 0">公式编辑</div>
  4158. </div>
  4159. <div class="noCTool">
  4160. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4161. </div>
  4162. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4163. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4164. </div>
  4165. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4166. <img src="../../../assets/icon/checkNo.png" alt
  4167. v-if="itemTool.tool.indexOf(66) == -1" />
  4168. <div class="checkDiv" v-else>
  4169. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4170. </div>
  4171. </div> -->
  4172. </div>
  4173. <!-- <div class="tool">
  4174. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4175. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4176. <div style="margin: 5px 0">分子结构</div>
  4177. </div>
  4178. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4179. <img src="../../../assets/icon/checkNo.png" alt
  4180. v-if="itemTool.tool.indexOf(67) == -1" />
  4181. <div class="checkDiv" v-else>
  4182. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4183. </div>
  4184. </div>
  4185. </div> -->
  4186. <div class="tool" :class="{
  4187. isToolChoose:
  4188. itemTool.tool.indexOf(68) != -1,
  4189. }" @click="
  4190. addTools(68, itemTaskIndex, toolIndex)
  4191. ">
  4192. <div class="whiteBIcon" @click.stop="
  4193. addTools(68, itemTaskIndex, toolIndex)
  4194. ">
  4195. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4196. <div style="margin: 5px 0">时间轴</div>
  4197. </div>
  4198. <div class="noCTool">
  4199. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4200. </div>
  4201. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4202. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4203. </div>
  4204. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4205. <img src="../../../assets/icon/checkNo.png" alt
  4206. v-if="itemTool.tool.indexOf(68) == -1" />
  4207. <div class="checkDiv" v-else>
  4208. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4209. </div>
  4210. </div> -->
  4211. </div>
  4212. <div class="tool" :class="{
  4213. isToolChoose:
  4214. itemTool.tool.indexOf(69) != -1,
  4215. }" @click="
  4216. addTools(69, itemTaskIndex, toolIndex)
  4217. ">
  4218. <div class="whiteBIcon" @click.stop="
  4219. openTools(itemTaskIndex, 69, toolIndex)
  4220. ">
  4221. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4222. <div style="margin: 5px 0">英语写作</div>
  4223. </div>
  4224. <div class="noCTool">
  4225. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4226. </div>
  4227. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4228. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4229. </div>
  4230. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4231. <img src="../../../assets/icon/checkNo.png" alt
  4232. v-if="itemTool.tool.indexOf(4) == -1" />
  4233. <div class="checkDiv" v-else>
  4234. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4235. </div>
  4236. </div> -->
  4237. </div>
  4238. <div class="tool" :class="{
  4239. isToolChoose:
  4240. itemTool.tool.indexOf(70) != -1,
  4241. }" @click="
  4242. addTools(70, itemTaskIndex, toolIndex)
  4243. ">
  4244. <div class="whiteBIcon" @click.stop="
  4245. openTools(itemTaskIndex, 70, toolIndex)
  4246. ">
  4247. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4248. <div style="margin: 5px 0">英语口语</div>
  4249. </div>
  4250. <div class="noCTool">
  4251. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4252. </div>
  4253. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4254. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4255. </div>
  4256. </div>
  4257. <!-- <div class="tool">
  4258. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4259. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4260. <div style="margin: 5px 0">翻译</div>
  4261. </div>
  4262. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4263. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4264. <div class="checkDiv" v-else>
  4265. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4266. </div>
  4267. </div>
  4268. </div>
  4269. <div class="tool">
  4270. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4271. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4272. <div style="margin: 5px 0">魔盒识字</div>
  4273. </div>
  4274. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4275. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4276. <div class="checkDiv" v-else>
  4277. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4278. </div>
  4279. </div>
  4280. </div>
  4281. <div class="tool">
  4282. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4283. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4284. <div style="margin: 5px 0">24点</div>
  4285. </div>
  4286. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4287. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4288. <div class="checkDiv" v-else>
  4289. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4290. </div>
  4291. </div>
  4292. </div>
  4293. <div class="tool">
  4294. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4295. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4296. <div style="margin: 5px 0">数学画板</div>
  4297. </div>
  4298. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4299. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -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">
  4306. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4307. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4308. <div style="margin: 5px 0">GeoGebra</div>
  4309. </div>
  4310. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4311. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4312. <div class="checkDiv" v-else>
  4313. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4314. </div>
  4315. </div>
  4316. </div>
  4317. <div class="tool">
  4318. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4319. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4320. <div style="margin: 5px 0">模拟驾驶</div>
  4321. </div>
  4322. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4323. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4324. <div class="checkDiv" v-else>
  4325. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4326. </div>
  4327. </div>
  4328. </div>
  4329. <div class="tool">
  4330. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4331. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4332. <div style="margin: 5px 0">路径搜索</div>
  4333. </div>
  4334. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4335. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4336. <div class="checkDiv" v-else>
  4337. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4338. </div>
  4339. </div>
  4340. </div>
  4341. <div class="tool">
  4342. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4343. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4344. <div style="margin: 5px 0">深度学习</div>
  4345. </div>
  4346. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4347. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4348. <div class="checkDiv" v-else>
  4349. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4350. </div>
  4351. </div>
  4352. </div>
  4353. <div class="tool">
  4354. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4355. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4356. <div style="margin: 5px 0">全历史</div>
  4357. </div>
  4358. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4359. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4360. <div class="checkDiv" v-else>
  4361. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4362. </div>
  4363. </div>
  4364. </div>
  4365. </div>
  4366. <div class="toolSort" v-if="itemTool.toolType == 4">
  4367. <div class="tool">
  4368. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4369. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4370. <div style="margin: 5px 0">课程设计</div>
  4371. </div>
  4372. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4373. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4374. <div class="checkDiv" v-else>
  4375. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4376. </div>
  4377. </div>
  4378. </div>
  4379. <div class="tool">
  4380. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4381. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4382. <div style="margin: 5px 0">目标管理</div>
  4383. </div>
  4384. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4385. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4386. <div class="checkDiv" v-else>
  4387. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4388. </div>
  4389. </div>
  4390. </div> -->
  4391. <!-- <div class="tool">
  4392. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4393. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4394. <div style="margin: 5px 0">汉字宫</div>
  4395. </div>
  4396. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4397. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4398. <div class="checkDiv" v-else>
  4399. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4400. </div>
  4401. </div>
  4402. </div> -->
  4403. </div>
  4404. </div>
  4405. <!-- v-show="!itemTool.isFold3" -->
  4406. <div class="op_tool_box"
  4407. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4408. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4409. class="binfo_input" style="
  4410. margin: 0 0 20px 0;
  4411. width: 100% !important;
  4412. " v-model="itemTool.toolDetail"></textarea>
  4413. <div class="op_box">
  4414. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4415. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4416. <div class="r_pub_button_op"
  4417. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4418. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4419. 智能优化</div>
  4420.                              
  4421. </el-tooltip>
  4422. </div>
  4423. </div>
  4424. </div>
  4425. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4426. <div class="addToolImg">
  4427. <img src="../../../assets/icon/add.png" alt />
  4428. </div>
  4429. <div>添加工具</div>
  4430. </div> -->
  4431. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4432. margin: 0 auto;
  4433. padding: 0 30px;
  4434. height: 45px;
  4435. ">
  4436. 添加工具
  4437. </button>
  4438. </div>
  4439. </div>
  4440. <div v-else-if="
  4441. unitJson[unitIndex].easy == 2 ||
  4442. unitJson[unitIndex].easy == 4
  4443. " class="toolChoose" style="padding: 0 0 40px">
  4444. <div class="tools">
  4445. <div class="leftTools" style="width: 100%" v-for="(
  4446. itemTool, toolIndex
  4447. ) in itemTask.toolChoose" :key="toolIndex">
  4448. <div>
  4449. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4450. margin: 0 0 20px 0;
  4451. width: 100% !important;
  4452. " v-model="itemTool.toolDetail"></textarea>
  4453. </div>
  4454. <div style="
  4455. display: flex;
  4456. flex-direction: row;
  4457. align-items: baseline;
  4458. flex-wrap: nowrap;
  4459. justify-content: flex-start;
  4460. position: relative;
  4461. ">
  4462. <div style="margin-right: 20px; font-weight: bold"
  4463. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4464. 工具 {{ toolIndex + 1 }} :
  4465. </div>
  4466. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4467. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4468. </div>
  4469. <div style="min-height: 163px">
  4470. <div class="toolSort">
  4471. <div class="tool">
  4472. <div class="whiteBIcon" @click="
  4473. openTools(itemTaskIndex, 1, toolIndex)
  4474. ">
  4475. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4476. <div style="margin: 5px 0">电子白板</div>
  4477. </div>
  4478. <div class="check" @click="
  4479. addTools(1, itemTaskIndex, toolIndex)
  4480. ">
  4481. <img src="../../../assets/icon/checkNo.png" alt
  4482. v-if="itemTool.tool.indexOf(1) == -1" />
  4483. <div class="checkDiv" v-else>
  4484. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4485. </div>
  4486. </div>
  4487. </div>
  4488. <div class="tool">
  4489. <div class="whiteBIcon" @click="
  4490. openTools(itemTaskIndex, 52, toolIndex)
  4491. ">
  4492. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4493. <div style="margin: 5px 0">文档</div>
  4494. </div>
  4495. <div class="check" @click="
  4496. addTools(52, itemTaskIndex, toolIndex)
  4497. ">
  4498. <img src="../../../assets/icon/checkNo.png" alt
  4499. v-if="itemTool.tool.indexOf(52) == -1" />
  4500. <div class="checkDiv" v-else>
  4501. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4502. </div>
  4503. </div>
  4504. </div>
  4505. <div class="tool">
  4506. <div class="whiteBIcon" @click="
  4507. openTools(itemTaskIndex, 3, toolIndex)
  4508. ">
  4509. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4510. <div style="margin: 5px 0">思维导图</div>
  4511. </div>
  4512. <div class="check" @click="
  4513. addTools(3, itemTaskIndex, toolIndex)
  4514. ">
  4515. <img src="../../../assets/icon/checkNo.png" alt
  4516. v-if="itemTool.tool.indexOf(3) == -1" />
  4517. <div class="checkDiv" v-else>
  4518. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4519. </div>
  4520. </div>
  4521. </div>
  4522. <div class="tool">
  4523. <div class="whiteBIcon" @click="
  4524. openTools(itemTaskIndex, 4, toolIndex)
  4525. ">
  4526. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4527. <div style="margin: 5px 0">问卷调查</div>
  4528. </div>
  4529. <div class="check" @click="
  4530. addTools(4, itemTaskIndex, toolIndex)
  4531. ">
  4532. <img src="../../../assets/icon/checkNo.png" alt
  4533. v-if="itemTool.tool.indexOf(4) == -1" />
  4534. <div class="checkDiv" v-else>
  4535. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4536. </div>
  4537. </div>
  4538. </div>
  4539. <div class="tool">
  4540. <div class="whiteBIcon" @click="
  4541. openTools(itemTaskIndex, 45, toolIndex)
  4542. ">
  4543. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4544. <div style="margin: 5px 0">选择题</div>
  4545. </div>
  4546. <div class="check" @click="
  4547. addTools(45, itemTaskIndex, toolIndex)
  4548. ">
  4549. <img src="../../../assets/icon/checkNo.png" alt
  4550. v-if="itemTool.tool.indexOf(45) == -1" />
  4551. <div class="checkDiv" v-else>
  4552. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4553. </div>
  4554. </div>
  4555. </div>
  4556. <div class="tool">
  4557. <div class="whiteBIcon" @click="
  4558. openTools(itemTaskIndex, 15, toolIndex)
  4559. ">
  4560. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4561. <div style="margin: 5px 0">问答</div>
  4562. </div>
  4563. <div class="check" @click="
  4564. addTools(15, itemTaskIndex, toolIndex)
  4565. ">
  4566. <img src="../../../assets/icon/checkNo.png" alt
  4567. v-if="itemTool.tool.indexOf(15) == -1" />
  4568. <div class="checkDiv" v-else>
  4569. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4570. </div>
  4571. </div>
  4572. </div>
  4573. <div class="tool">
  4574. <div class="whiteBIcon" @click="
  4575. addTools(16, itemTaskIndex, toolIndex)
  4576. ">
  4577. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4578. <div style="margin: 5px 0">作业提交</div>
  4579. </div>
  4580. <div class="check" @click="
  4581. addTools(16, itemTaskIndex, toolIndex)
  4582. ">
  4583. <img src="../../../assets/icon/checkNo.png" alt
  4584. v-if="itemTool.tool.indexOf(16) == -1" />
  4585. <div class="checkDiv" v-else>
  4586. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4587. </div>
  4588. </div>
  4589. </div>
  4590. <div class="tool">
  4591. <div class="whiteBIcon" @click="
  4592. openTools(itemTaskIndex, 50, toolIndex)
  4593. ">
  4594. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4595. <div style="margin: 5px 0">批量上传</div>
  4596. </div>
  4597. <div class="check" @click="
  4598. addTools(50, itemTaskIndex, toolIndex)
  4599. ">
  4600. <img src="../../../assets/icon/checkNo.png" alt
  4601. v-if="itemTool.tool.indexOf(50) == -1" />
  4602. <div class="checkDiv" v-else>
  4603. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4604. </div>
  4605. </div>
  4606. </div>
  4607. <div class="tool">
  4608. <div class="whiteBIcon" @click="
  4609. openTools(itemTaskIndex, 41, toolIndex)
  4610. ">
  4611. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4612. <div style="margin: 5px 0">选择匹配</div>
  4613. </div>
  4614. <div class="check" @click="
  4615. addTools(41, itemTaskIndex, toolIndex)
  4616. ">
  4617. <img src="../../../assets/icon/checkNo.png" alt
  4618. v-if="itemTool.tool.indexOf(41) == -1" />
  4619. <div class="checkDiv" v-else>
  4620. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4621. </div>
  4622. </div>
  4623. </div>
  4624. <div class="tool">
  4625. <div class="whiteBIcon" @click="
  4626. openTools(itemTaskIndex, 47, toolIndex)
  4627. ">
  4628. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4629. <div style="margin: 5px 0">排序</div>
  4630. </div>
  4631. <div class="check" @click="
  4632. addTools(47, itemTaskIndex, toolIndex)
  4633. ">
  4634. <img src="../../../assets/icon/checkNo.png" alt
  4635. v-if="itemTool.tool.indexOf(47) == -1" />
  4636. <div class="checkDiv" v-else>
  4637. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4638. </div>
  4639. </div>
  4640. </div>
  4641. <div class="tool">
  4642. <div class="whiteBIcon" @click="
  4643. openTools(itemTaskIndex, 48, toolIndex)
  4644. ">
  4645. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4646. <div style="margin: 5px 0">表格</div>
  4647. </div>
  4648. <div class="check" @click="
  4649. addTools(48, itemTaskIndex, toolIndex)
  4650. ">
  4651. <img src="../../../assets/icon/checkNo.png" alt
  4652. v-if="itemTool.tool.indexOf(48) == -1" />
  4653. <div class="checkDiv" v-else>
  4654. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4655. </div>
  4656. </div>
  4657. </div>
  4658. </div>
  4659. </div>
  4660. </div>
  4661. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4662. <div class="addToolImg">
  4663. <img src="../../../assets/icon/add.png" alt />
  4664. </div>
  4665. <div>添加工具</div>
  4666. </div> -->
  4667. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4668. style="margin: 35px auto 20px">
  4669. 添加工具
  4670. </button>
  4671. </div>
  4672. </div>
  4673. <div v-else-if="
  4674. unitJson[unitIndex].easy == 1 ||
  4675. (unitJson[unitIndex].easy == 5 &&
  4676. itemTask.taskType == 2)
  4677. " class="toolChoose" style="padding: 0 0 40px">
  4678. <div class="tools">
  4679. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4680. itemTool, toolIndex
  4681. ) in itemTask.toolChoose" :key="toolIndex">
  4682. <div style="min-height: 163px">
  4683. <div class="toolSort">
  4684. <div class="tool">
  4685. <div class="whiteBIcon" @click="
  4686. openTools(itemTaskIndex, 50, toolIndex)
  4687. ">
  4688. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4689. <div style="margin: 5px 0">批量上传</div>
  4690. </div>
  4691. <div class="check" @click="
  4692. addTools(50, itemTaskIndex, toolIndex)
  4693. ">
  4694. <img src="../../../assets/icon/checkNo.png" alt
  4695. v-if="itemTool.tool.indexOf(50) == -1" />
  4696. <div class="checkDiv" v-else>
  4697. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4698. </div>
  4699. </div>
  4700. </div>
  4701. </div>
  4702. </div>
  4703. </div>
  4704. </div>
  4705. </div>
  4706. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4707. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4708. <div class="elist_title">
  4709. <div style="
  4710. display: flex;
  4711. flex-direction: row;
  4712. align-items: center;
  4713. margin: 20px 0;
  4714. ">
  4715. <div class="lineTitle clineTitle">评价设置</div>
  4716. <div style="margin-left:auto;display: flex;">
  4717. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4718. <div class="r_pub_button_op"
  4719. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4720. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4721. </el-tooltip>
  4722. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4723. <div class="r_pub_button_op" style="margin-left:10px;"
  4724. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4725. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4726. </el-tooltip>
  4727. </div>
  4728. <!-- <div class="line" style="width: 90%"></div> -->
  4729. </div>
  4730. </div>
  4731. <div class="mbCss">
  4732. <div class="pjCss" :style="{
  4733. width: itemTask.isEvaFold
  4734. ? 'calc(100% - 55%)'
  4735. : 'calc(100% - 120px)',
  4736. }">
  4737. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  4738. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  4739. <div class="elist_inptu_text">
  4740. <span>目标:</span>
  4741. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  4742. <el-switch
  4743. style="margin-left: auto;"
  4744. v-model="itemTask.eList[eIndex].isai"
  4745. active-text="人工评分"
  4746. inactive-text="AI评分"
  4747. active-value="2"
  4748. inactive-value="1">
  4749. </el-switch>
  4750. </div>
  4751. <div class="elist_inptu_text">
  4752. <span>评价维度:</span>
  4753. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  4754. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  4755. <!-- </el-tooltip> -->
  4756. <!-- <span>评星等级:</span>
  4757. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  4758. disabled></el-rate> -->
  4759. <div class="remove" @click="
  4760. deletEList(
  4761. unitIndex,
  4762. itemTaskIndex,
  4763. eIndex
  4764. )
  4765. "></div>
  4766. </div>
  4767. <div class="elist_inptu_text">
  4768. <span>维度描述:</span>
  4769. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  4770. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  4771. <!-- </el-tooltip> -->
  4772. </div>
  4773. <div class="elist_inptu_text" v-if="evalua">
  4774. <span>目标:</span>
  4775. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  4776. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  4777. @change="forceUpdate()">
  4778. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  4779. :value="e.name">
  4780. </el-option>
  4781. </el-select> -->
  4782. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  4783. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  4784. </div>
  4785. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  4786. <span>细则:</span>
  4787. <div style="width: calc(100%);">
  4788. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  4789. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  4790. <div class="ruleBtn"
  4791. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  4792. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  4793. </el-tooltip>
  4794. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  4795. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  4796. <div class="op_box">
  4797. <div class="op_remark"></div>
  4798. <div style="display: flex;">
  4799. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4800. <div class="r_pub_button_op"
  4801. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  4802. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  4803. </el-tooltip>
  4804. </div>
  4805. </div>
  4806. </div>
  4807. </div>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  4812. style="margin: 35px 35px 0 0">
  4813. <div class="addToolImg">
  4814. <img src="../../../assets/icon/add.png" alt />
  4815. </div>
  4816. <div>添加</div>
  4817. </div> -->
  4818. <div class="eva_btn_box">
  4819. <div class="eva_btn_left_box">
  4820. <button class="c_pub_button_add pub_btn_eval_img"
  4821. @click="addEList(unitIndex, itemTaskIndex)">
  4822. 添加
  4823. </button>
  4824. <button class="c_pub_button_add pub_btn_eval_source_img"
  4825. @click="openEList(unitIndex, itemTaskIndex)">
  4826. 资源
  4827. </button>
  4828. </div>
  4829. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  4830. v-if="itemTask.eList && itemTask.eList.length">
  4831. 添加资源模板
  4832. </button>
  4833. </div>
  4834. </div>
  4835. <div v-if="evalua" style="
  4836. border: 1px solid #e5e5e5;
  4837. box-shadow: 3px 1px 15px 3px #e0e0e0;
  4838. " :style="{
  4839. width: itemTask.isEvaFold ? '55%' : '116px',
  4840. }" class="evaCss">
  4841. <!-- <div class="e_add_top">
  4842. <div class="e_add_title">
  4843. <span>当前使用目标管理</span>
  4844. <span>{{ eTitle }}</span>
  4845. <img src="../../../assets/line.png" class="cru_line" style="
  4846. width: 125px;
  4847. height: 20px;
  4848. bottom: -10px;
  4849. left: 155px;
  4850. " />
  4851. </div>
  4852. </div> -->
  4853. <div class="e_add_content" style="width: 100%">
  4854. <div class="e_add_list_pbox" style="width: 100%">
  4855. <div class="e_add_list_pbox_title">
  4856. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  4857. <div class="type_content" v-if="itemTask.isEvaFold">
  4858. <span :class="{ active: typeMode == 1 }"
  4859. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  4860. <span :class="{ active: typeMode == 2 }"
  4861. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  4862. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  4863. </div>
  4864. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  4865. @click="foldEva(itemTaskIndex)">
  4866. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  4867. </div>
  4868. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  4869. @click="foldEva(itemTaskIndex)">
  4870. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  4871. </div>
  4872. </div>
  4873. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  4874. style="min-height: 200px">
  4875. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  4876. " v-if="typeMode == 1"></Mind>
  4877. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  4878. </Sunburst>
  4879. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  4880. v-if="typeMode == 3"></SeeBoard>
  4881. </div>
  4882. </div>
  4883. </div>
  4884. </div>
  4885. </div>
  4886. </div>
  4887. <div class="funBlock" style="padding: 0">
  4888. <div class="fold" @click="fold(itemTaskIndex, $event)">
  4889. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  4890. <div>
  4891. {{
  4892. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  4893. }}
  4894. </div>
  4895. </div>
  4896. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  4897. <div>展开</div>
  4898. <div class="arrow">
  4899. <img src="../../../assets/icon/expand.png" alt />
  4900. </div>
  4901. </div> -->
  4902. </div>
  4903. </div>
  4904. </div>
  4905. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  4906. <!-- <div>
  4907. <img src="../../../../assets/icon/new/addStage.png" alt />
  4908. <span>添加任务</span>
  4909. </div> -->
  4910. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  4911. 添加任务
  4912. </button>
  4913. </div>
  4914. </div>
  4915. <div class="info_btnBox3">
  4916. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  4917. goTo(
  4918. '/course?userid=' +
  4919. userid +
  4920. '&oid=' +
  4921. oid +
  4922. '&org=' +
  4923. org +
  4924. '&role=' +
  4925. role
  4926. )
  4927. ">
  4928. 返回课程
  4929. </button>
  4930. <button class="c_pub_button_return pub_btn_last_img"
  4931. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  4932. {{ steps == 4 ? "返回课程" : "上一步" }}
  4933. </button>
  4934. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  4935. pub_btn_next_img: steps != 3,
  4936. pub_btn_finish_img: steps == 3,
  4937. }">
  4938. {{ steps == 3 ? "确认上传" : "下一步" }}
  4939. </button>
  4940. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  4941. '修改模板' : '保存模板'}}</button>
  4942. </div>
  4943. </div>
  4944. </div>
  4945. </div>
  4946. </div>
  4947. <div style="
  4948. width: calc(100% - 20px);
  4949. background: rgb(255, 255, 255);
  4950. border-radius: 10px;
  4951. " v-if="steps == 4">
  4952. <div class="basic_box_success">
  4953. <div class="right_img">
  4954. <img src="../../../assets/icon/right.png" alt />
  4955. </div>
  4956. <div style="font-weight: bold">成功</div>
  4957. <!-- <div>您的课程编号</div>
  4958. <div class="number">{{ number }}</div>-->
  4959. <!-- <div class="success_button">
  4960. <div class="look_course" @click="isNoFinsh">
  4961. 邀请老师协同编辑
  4962. </div>
  4963. <div class="attend_others" @click="goCourse">预览课程</div>
  4964. </div> -->
  4965. </div>
  4966. </div>
  4967. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  4968. @mouseleave="btnDisplay(false)" v-if="false">
  4969. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  4970. goTo(
  4971. '/course?userid=' +
  4972. userid +
  4973. '&oid=' +
  4974. oid +
  4975. '&org=' +
  4976. org +
  4977. '&role=' +
  4978. role
  4979. )
  4980. ">
  4981. 返回课程
  4982. </button>
  4983. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  4984. @click="lastSteps">
  4985. {{ steps == 4 ? "返回课程" : "上一步" }}
  4986. </button>
  4987. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  4988. pub_btn_next_img: steps != 3,
  4989. pub_btn_finish_img: steps == 3,
  4990. }">
  4991. {{ steps == 3 ? "确认上传" : "下一步" }}
  4992. </button>
  4993. </div>
  4994. </div>
  4995. </div>
  4996. <div class="leftBar" v-if="istemplate == 1">
  4997. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4998. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4999. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5000. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5001. <!-- <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/> -->
  5002. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5003. <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'"/>
  5004. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5005. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5006. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5007. <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'"/>
  5008. <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'"/>
  5009. <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'"/>
  5010. <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'"/>
  5011. <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'"/>
  5012. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5013. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5014. @setAiJson="setAiJson" /> -->
  5015. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5016. @setAiJson="setAiJson" />
  5017. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5018. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5019. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5020. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5021. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5022. </div>
  5023. </div>
  5024. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5025. class="dialog_diy2 customWidth">
  5026. <div>请复制该链接邀请协同编辑</div>
  5027. <div>http://www.boomyon.com/index-zhang.com</div>
  5028. <span slot="footer" class="dialog-footer">
  5029. <el-button type="primary">复制链接分享</el-button>
  5030. <el-button @click="dialogVisible = false">取消</el-button>
  5031. </span>
  5032. </el-dialog>
  5033. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5034. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5035. <el-form>
  5036. <el-form-item label="文档标题">
  5037. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5038. </el-form-item>
  5039. <div>文档简介</div>
  5040. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5041. </el-form>
  5042. <span slot="footer" class="dialog-footer">
  5043. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5044. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5045. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5046. </span>
  5047. </el-dialog>
  5048. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5049. :before-close="handleClose" class="dialog_diy">
  5050. <el-form>
  5051. <el-form-item label="文档标题">
  5052. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5053. </el-form-item>
  5054. <div>文档内容</div>
  5055. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5056. </el-form>
  5057. <span slot="footer" class="dialog-footer">
  5058. <el-button @click="clearChoose">取 消</el-button>
  5059. <el-button type="primary" @click="wordNext()">确定</el-button>
  5060. </span>
  5061. </el-dialog>
  5062. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5063. :before-close="handleClose" class="dialog_diy">
  5064. <el-form>
  5065. <el-form-item label="文本标题">
  5066. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5067. placeholder="请输入文本标题..."></el-input>
  5068. </el-form-item>
  5069. <!-- <div>富文本内容</div> -->
  5070. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5071. </el-form>
  5072. <span slot="footer" class="dialog-footer">
  5073. <el-button @click="clearAttText">取 消</el-button>
  5074. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5075. </span>
  5076. </el-dialog>
  5077. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5078. :before-close="handleClose" class="dialog_diy lineCss">
  5079. <el-form>
  5080. <el-form-item label="标题" :label-width="formLabelWidth">
  5081. <span>
  5082. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5083. </span>
  5084. </el-form-item>
  5085. <el-form-item label="链接" :label-width="formLabelWidth">
  5086. <span>
  5087. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5088. </span>
  5089. </el-form-item>
  5090. </el-form>
  5091. <span slot="footer" class="dialog-footer">
  5092. <el-button @click="clearLine">取 消</el-button>
  5093. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5094. </span>
  5095. </el-dialog>
  5096. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5097. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5098. <div>
  5099. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5100. </div>
  5101. <span slot="footer" class="dialog-footer">
  5102. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5103. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5104. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5105. </span>
  5106. </el-dialog>
  5107. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5108. :before-close="handleClose" class="addNewPP customWidth">
  5109. <div class="people">
  5110. <div class="people_top">
  5111. <div class="people_nav">选择成员</div>
  5112. <div class="people_top_right">
  5113. <div class="people_search">
  5114. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5115. <div class="search_img" @click="searchStudent">
  5116. <img src="../../../assets/icon/search.png" alt />
  5117. </div>
  5118. </div>
  5119. </div>
  5120. </div>
  5121. <el-checkbox-group v-model="checkboxList" class="people_name">
  5122. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5123. "暂无学生可选" }}</el-checkbox>
  5124. </el-checkbox-group>
  5125. </div>
  5126. <span slot="footer" class="dialog-footer">
  5127. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5128. <el-button type="primary" @click="isAddPP">确定</el-button>
  5129. </span>
  5130. </el-dialog>
  5131. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5132. :before-close="handleClose" class="addNewPP2">
  5133. <div class="check_classBox">
  5134. <div class="check_class_right">
  5135. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5136. 全部
  5137. </div>
  5138. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5139. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5140. {{ item.name }}
  5141. </div>
  5142. </el-tooltip>
  5143. </div>
  5144. <div class="check_class_left">
  5145. <div class="check_class_all_box">
  5146. <div class="check_class_left_title">选择班级</div>
  5147. <div style="display: flex; align-items: center; margin-left: auto">
  5148. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5149. </div>
  5150. </div>
  5151. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5152. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5153. </div> -->
  5154. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5155. v-if="grade2.length">
  5156. <div v-for="item in grade2" :key="item.id" class="class_item">
  5157. <el-checkbox :label="item.id">
  5158. {{ item.name }}
  5159. </el-checkbox>
  5160. </div>
  5161. </el-checkbox-group>
  5162. <div v-if="!grade2.length">暂无数据</div>
  5163. </div>
  5164. </div>
  5165. <span slot="footer" class="dialog-footer">
  5166. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5167. <el-button type="primary" @click="isAddClass">确定</el-button>
  5168. </span>
  5169. </el-dialog>
  5170. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5171. :before-close="handleClose" class="addNewPP customWidth">
  5172. <div style="display: flex;justify-content: space-between;">
  5173. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5174. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5175. 全部
  5176. </div>
  5177. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5178. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5179. <el-tooltip placement="top" :content="i.name">
  5180. <span>{{i.name}}</span>
  5181. </el-tooltip>
  5182. </div>
  5183. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5184. 其他
  5185. </div>
  5186. </div>
  5187. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5188. <div class="people">
  5189. <div class="people_top">
  5190. <div class="people_top_right">
  5191. <div class="people_search">
  5192. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5193. <div class="search_img" @click="getTeacher(collid)">
  5194. <img src="../../../assets/icon/search.png" alt />
  5195. </div>
  5196. </div>
  5197. </div>
  5198. <div class="people_nav" style="display: flex; align-items: center">
  5199. <div class="check_class_left_title">选择成员</div>
  5200. <div style="display: flex; align-items: center; margin-left: auto">
  5201. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5202. </div>
  5203. </div>
  5204. </div>
  5205. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5206. @change="InviteChange2">
  5207. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5208. <div class="t_j_box">
  5209. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5210. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5211. </el-tooltip>
  5212. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5213. <span>{{ item.username.split('@')[0] }}</span>
  5214. </el-tooltip>
  5215. <el-tooltip placement="top" :content="item.school">
  5216. <span>{{ item.school }}</span>
  5217. </el-tooltip>
  5218. </div>
  5219. </el-checkbox>
  5220. </el-checkbox-group>
  5221. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5222. </div>
  5223. </div>
  5224. </div>
  5225. <span slot="footer" class="dialog-footer">
  5226. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5227. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5228. </span>
  5229. </el-dialog>
  5230. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5231. closePan(4);
  5232. }
  5233. " class="dialog_diy fullStyle">
  5234. <div style="height: 100%">
  5235. <div class="a_add_title" style="
  5236. display: flex;
  5237. flex-direction: row;
  5238. align-items: center;
  5239. justify-content: center;
  5240. ">
  5241. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5242. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5243. </div>
  5244. <div class="a_addBox" style="height: calc(100% - 50px)">
  5245. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5246. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5247. <div class="a_add_checkType">
  5248. <span :class="{
  5249. active:
  5250. askJson.askJson[index1].type == '1' ||
  5251. !askJson.askJson[index1].type,
  5252. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5253. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5254. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5255. </div>
  5256. <div class="a_add_head">
  5257. <div style="
  5258. display: flex;
  5259. align-items: center;
  5260. width: 100%;
  5261. margin-right: 20px;
  5262. ">
  5263. <span style="min-width: fit-content">{{
  5264. index1 + 1 + "、"
  5265. }}</span>
  5266. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5267. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5268. $forceUpdate();
  5269. }
  5270. "></textarea>
  5271. </div>
  5272. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5273. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5274. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5275. </div>
  5276. <div class="a_add_head_div">
  5277. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5278. </el-button>
  5279. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5280. </div>
  5281. </div>
  5282. <div class="a_add_body">
  5283. <div class="a_add_input" style="flex-direction: column">
  5284. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5285. margin: 20px 10px 0 0;
  5286. display: flex;
  5287. align-items: center;
  5288. position: relative;
  5289. ">
  5290. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5291. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5292. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5293. @change="() => {
  5294. $forceUpdate();
  5295. }
  5296. "></textarea>
  5297. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5298. v-if="askJson.askJson[index1].askItem != 1">
  5299. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5300. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5301. </div>
  5302. <div class="a_add_body_div">
  5303. <el-button type="primary" size="small"
  5304. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5305. <el-button type="primary" size="small" @click="
  5306. deletecheckList(askJson.askJson[index1], checkIndex)
  5307. " v-if="askJson.askJson[index1].askItem != 1">删除
  5308. </el-button>
  5309. </div>
  5310. </div>
  5311. </div>
  5312. <!-- <div class="a_add_body_div">
  5313. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5314. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5315. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5316. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5317. </el-button>
  5318. </div> -->
  5319. </div>
  5320. </div>
  5321. </div>
  5322. </div>
  5323. <span slot="footer" class="dialog-footer">
  5324. <el-button @click="closePan(4)">取 消</el-button>
  5325. <el-button type="primary" @click="addAsk">确 定</el-button>
  5326. </span>
  5327. </el-dialog>
  5328. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5329. closePan(45);
  5330. }
  5331. " class="dialog_diy fullStyle">
  5332. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5333. <!-- <div class="a_add_title" style="
  5334. display: flex;
  5335. flex-direction: row;
  5336. align-items: center;
  5337. justify-content: center;
  5338. ">
  5339. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5340. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5341. </div> -->
  5342. <div class="a_addBox" style="height: 100%">
  5343. <div style="
  5344. font-size: 16px;
  5345. color: #c7c7c7;
  5346. display: flex;
  5347. align-items: center;
  5348. justify-content: flex-end;
  5349. ">
  5350. <!-- 请输入题目内容 -->
  5351. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5352. 智能生成
  5353. </button>
  5354. <!-- 请输入题目内容 -->
  5355. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5356. v-if="isPasteChoice">
  5357. 智能粘贴
  5358. </button>
  5359. </div>
  5360. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5361. <div class="a_add_checkType">
  5362. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5363. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5364. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5365. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5366. </div>
  5367. <div class="a_add_head">
  5368. <div class="timuUpImg">
  5369. <div style="display: flex; align-items: center">
  5370. <span style="min-width: fit-content">{{
  5371. index1 + 1 + "、"
  5372. }}</span>
  5373. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5374. placeholder="请输入题目">
  5375. </el-input> -->
  5376. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5377. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5378. $forceUpdate();
  5379. }
  5380. "></textarea>
  5381. </div>
  5382. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5383. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5384. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5385. </div>
  5386. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5387. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5388. <input type="file" accept="image/*" style="display: none"
  5389. @change="beforeUploadTiMu($event, index1)" />
  5390. </div>
  5391. </div>
  5392. <div class="a_add_head_div">
  5393. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5394. </el-button>
  5395. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5396. </div>
  5397. </div>
  5398. <div class="timuImgBox" v-if="
  5399. testJson.testJson[index1].timuList &&
  5400. testJson.testJson[index1].timuList.length
  5401. ">
  5402. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5403. @click.stop="previewImg(timg.src)">
  5404. <img :src="timg.src" alt="" />
  5405. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5406. <img src="../../../assets/icon/delete.png" alt="" />
  5407. </div>
  5408. </div>
  5409. </div>
  5410. <div class="a_add_body">
  5411. <div class="a_add_input a_add_input_choice">
  5412. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5413. @change="() => {
  5414. $forceUpdate();
  5415. }
  5416. ">
  5417. <div class="radioBox">
  5418. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5419. .testItem" :key="checkIndex" :label="checkIndex">
  5420. <div style="margin-right: 10px">
  5421. 选项{{ checkIndex + 1 }}
  5422. </div>
  5423. <div style="margin-right: 10px; width: 300px" v-if="
  5424. testJson.testJson[index1].checkList[checkIndex] &&
  5425. testJson.testJson[index1].checkList[checkIndex]
  5426. .imgType &&
  5427. testJson.testJson[index1].checkList[checkIndex]
  5428. .imgType == 1
  5429. ">
  5430. <div class="inImg" @click.stop="
  5431. previewImg(
  5432. testJson.testJson[index1].checkList[checkIndex]
  5433. .src
  5434. )
  5435. ">
  5436. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5437. .src
  5438. " lazy />
  5439. <!-- <img :src="
  5440. testJson.testJson[index1].checkList[checkIndex]
  5441. .src
  5442. " alt="" /> -->
  5443. </div>
  5444. </div>
  5445. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5446. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5447. $forceUpdate();
  5448. }
  5449. "></textarea>
  5450. <div class="xzUpImg" @click.stop="addImg($event)">
  5451. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5452. <input type="file" accept="image/*" style="display: none"
  5453. @change="beforeUploadTi($event, index1, checkIndex)" />
  5454. </div>
  5455. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5456. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5457. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5458. </div>
  5459. <div class="a_add_body_div">
  5460. <el-button type="primary" size="small" @click.stop="
  5461. addTcheckList(testJson.testJson[index1], checkIndex)
  5462. ">添加</el-button>
  5463. <el-button type="primary" size="small" @click.stop="
  5464. deleteTcheckList(
  5465. testJson.testJson[index1],
  5466. checkIndex
  5467. )
  5468. " v-if="testJson.testJson[index1].testItem != 1">删除
  5469. </el-button>
  5470. </div>
  5471. </el-radio>
  5472. </div>
  5473. </el-radio-group>
  5474. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5475. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5476. $forceUpdate();
  5477. }
  5478. ">
  5479. <div class="radioBox">
  5480. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5481. .testItem" :key="checkIndex1" :label="checkIndex1">
  5482. <div style="margin-right: 10px">
  5483. 选项{{ checkIndex1 + 1 }}
  5484. </div>
  5485. <div style="margin-right: 10px; width: 300px" v-if="
  5486. testJson.testJson[index1].checkList[checkIndex1] &&
  5487. testJson.testJson[index1].checkList[checkIndex1]
  5488. .imgType &&
  5489. testJson.testJson[index1].checkList[checkIndex1]
  5490. .imgType == 1
  5491. ">
  5492. <div class="inImg" @click.stop="
  5493. previewImg(
  5494. testJson.testJson[index1].checkList[checkIndex1]
  5495. .src
  5496. )
  5497. ">
  5498. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5499. .src
  5500. " lazy />
  5501. <!-- <img :src="
  5502. testJson.testJson[index1].checkList[checkIndex1]
  5503. .src
  5504. " alt="" /> -->
  5505. </div>
  5506. </div>
  5507. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5508. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5509. $forceUpdate();
  5510. }
  5511. "></textarea>
  5512. <div class="xzUpImg" @click.stop="addImg($event)">
  5513. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5514. <input type="file" accept="image/*" style="display: none"
  5515. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5516. </div>
  5517. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5518. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5519. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5520. </div>
  5521. <div class="a_add_body_div">
  5522. <el-button type="primary" size="small" @click.stop="
  5523. addTcheckList(
  5524. testJson.testJson[index1],
  5525. checkIndex1
  5526. )
  5527. ">添加</el-button>
  5528. <el-button type="primary" size="small" @click.stop="
  5529. deleteTcheckList(
  5530. testJson.testJson[index1],
  5531. checkIndex1
  5532. )
  5533. " v-if="testJson.testJson[index1].testItem != 1">删除
  5534. </el-button>
  5535. </div>
  5536. </el-checkbox>
  5537. </div>
  5538. </el-checkbox-group>
  5539. </div>
  5540. <!-- <div class="a_add_body_div">
  5541. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  5542. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  5543. v-if="testJson.testJson[index1].testItem != 1">删除
  5544. </el-button>
  5545. </div> -->
  5546. </div>
  5547. </div>
  5548. </div>
  5549. </div>
  5550. <span slot="footer" class="dialog-footer">
  5551. <el-button @click="closePan(45)">取 消</el-button>
  5552. <el-button type="primary" @click="addTest">确 定</el-button>
  5553. </span>
  5554. </el-dialog>
  5555. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  5556. :before-close="handleClose" class="dialog_diy addToolsDia">
  5557. <div class="toolChoose">
  5558. <div class="tools">
  5559. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  5560. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  5561. <div style="
  5562. display: flex;
  5563. flex-direction: row;
  5564. align-items: baseline;
  5565. flex-wrap: nowrap;
  5566. justify-content: flex-start;
  5567. position: relative;
  5568. ">
  5569. <div class="chooseWho">
  5570. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  5571. 互动类
  5572. </div>
  5573. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  5574. 思维类
  5575. </div>
  5576. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5577. 评价类
  5578. </div>
  5579. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5580. 其他
  5581. </div>
  5582. </div>
  5583. </div>
  5584. <div style="min-height: 163px">
  5585. <div class="toolSort" v-if="chapToolsType == 0">
  5586. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  5587. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  5588. <img src="../../../assets/icon/secondToolList/library.png" alt />
  5589. <div style="margin: 5px 0">素材库</div>
  5590. </div>
  5591. <div class="noCTool">
  5592. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5593. </div>
  5594. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  5595. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5596. </div>
  5597. <!-- <div class="check" @click="chapAddTools(8)">
  5598. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  5599. <div class="checkDiv" v-else>
  5600. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5601. </div>
  5602. </div> -->
  5603. </div>
  5604. </div>
  5605. <div class="toolSort" v-if="chapToolsType == 1">
  5606. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  5607. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  5608. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  5609. <div style="margin: 5px 0">思维网格</div>
  5610. </div>
  5611. <div class="noCTool">
  5612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5613. </div>
  5614. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  5615. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5616. </div>
  5617. <!-- <div class="check" @click="chapAddTools(7)">
  5618. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  5619. <div class="checkDiv" v-else>
  5620. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5621. </div>
  5622. </div> -->
  5623. </div>
  5624. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  5625. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  5626. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  5627. <div style="margin: 5px 0">电子白板</div>
  5628. </div>
  5629. <div class="noCTool">
  5630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5631. </div>
  5632. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  5633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5634. </div>
  5635. <!-- <div class="check" @click="chapAddTools(1)">
  5636. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  5637. <div class="checkDiv" v-else>
  5638. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5639. </div>
  5640. </div> -->
  5641. </div>
  5642. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  5643. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  5644. <img src="../../../assets/icon/secondToolList/note.png" alt />
  5645. <div style="margin: 5px 0">便签</div>
  5646. </div>
  5647. <div class="noCTool">
  5648. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5649. </div>
  5650. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  5651. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5652. </div>
  5653. <!-- <div class="check" @click="chapAddTools(2)">
  5654. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  5655. <div class="checkDiv" v-else>
  5656. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5657. </div>
  5658. </div> -->
  5659. </div>
  5660. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  5661. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  5662. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  5663. <div style="margin: 5px 0">协同文档</div>
  5664. </div>
  5665. <div class="noCTool">
  5666. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5667. </div>
  5668. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  5669. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5670. </div>
  5671. <!-- <div class="check" @click="chapAddTools(6)">
  5672. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  5673. <div class="checkDiv" v-else>
  5674. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5675. </div>
  5676. </div> -->
  5677. </div>
  5678. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  5679. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  5680. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  5681. <div style="margin: 5px 0">思维导图</div>
  5682. </div>
  5683. <div class="noCTool">
  5684. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5685. </div>
  5686. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  5687. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5688. </div>
  5689. <!-- <div class="check" @click="chapAddTools(3)">
  5690. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  5691. <div class="checkDiv" v-else>
  5692. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5693. </div>
  5694. </div> -->
  5695. </div>
  5696. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  5697. @click="chapAddTools(31)">
  5698. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  5699. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5700. <div style="margin: 5px 0">数学画板</div>
  5701. </div>
  5702. <div class="noCTool">
  5703. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5704. </div>
  5705. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  5706. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5707. </div>
  5708. <!-- <div class="check" @click="chapAddTools(31)">
  5709. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  5710. <div class="checkDiv" v-else>
  5711. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5712. </div>
  5713. </div> -->
  5714. </div>
  5715. </div>
  5716. <div class="toolSort" v-if="chapToolsType == 2">
  5717. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  5718. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  5719. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  5720. <div style="margin: 5px 0">量规评分</div>
  5721. </div>
  5722. <div class="noCTool">
  5723. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5724. </div>
  5725. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  5726. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5727. </div>
  5728. <!-- <div class="check" @click="chapAddTools(5)">
  5729. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  5730. <div class="checkDiv" v-else>
  5731. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5732. </div>
  5733. </div> -->
  5734. </div>
  5735. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  5736. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  5737. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  5738. <div style="margin: 5px 0">问卷调查</div>
  5739. </div>
  5740. <div class="noCTool">
  5741. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5742. </div>
  5743. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  5744. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5745. </div>
  5746. <!-- <div class="check" @click="chapAddTools(4)">
  5747. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  5748. <div class="checkDiv" v-else>
  5749. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5750. </div>
  5751. </div> -->
  5752. </div>
  5753. </div>
  5754. </div>
  5755. <div>
  5756. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  5757. v-model="itemTools.toolDetail" />
  5758. </div>
  5759. </div>
  5760. </div>
  5761. </div>
  5762. <span slot="footer" class="dialog-footer">
  5763. <el-button @click="dialogVisible4 = false">取 消</el-button>
  5764. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  5765. </span>
  5766. </el-dialog>
  5767. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  5768. closePan(15);
  5769. }
  5770. " class="dialog_diy">
  5771. <div>
  5772. <div class="a_add_title" style="
  5773. display: flex;
  5774. flex-direction: column;
  5775. align-items: flex-start;
  5776. justify-content: center;
  5777. ">
  5778. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5779. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  5780. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  5781. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  5782. </div>
  5783. </div>
  5784. <span slot="footer" class="dialog-footer">
  5785. <el-button @click="closePan(15)">取 消</el-button>
  5786. <el-button type="primary" @click="addAnswer">确 定</el-button>
  5787. </span>
  5788. </el-dialog>
  5789. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  5790. :before-close="handleClose" class="dialog_diy">
  5791. <div>
  5792. <div class="a_add_title" style="
  5793. display: flex;
  5794. flex-direction: column;
  5795. align-items: flex-start;
  5796. justify-content: center;
  5797. ">
  5798. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5799. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  5800. </div>
  5801. </div>
  5802. <span slot="footer" class="dialog-footer">
  5803. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  5804. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  5805. </span>
  5806. </el-dialog>
  5807. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  5808. :before-close="handleClose" class="dialog_diy">
  5809. <div>
  5810. <div class="fileCss" style="padding-top: 20px">
  5811. <div>
  5812. <button class="info_btn" @click="addImg($event)">
  5813. 选择本地文件
  5814. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  5815. </button>
  5816. <div class="spanName">选择本地文件</div>
  5817. </div>
  5818. <!-- <div>
  5819. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  5820. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  5821. <img :src="cover[0].url" alt="" />
  5822. <div class="deletePic" @click="deleteSysPic">
  5823. <img src="../../../assets/icon/delete.png" alt="" />
  5824. </div>
  5825. </div>
  5826. <div class="spanName">选择系统文件</div>
  5827. </div> -->
  5828. <div>
  5829. <el-button @click="(searchImageValue = courseName), resetImage()"
  5830. v-if="isSysPic2 == false">选择网络文件</el-button>
  5831. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  5832. <img :src="cover[0].url" alt="" />
  5833. <div class="deletePic" @click="deleteSysPic">
  5834. <img src="../../../assets/icon/delete.png" alt="" />
  5835. </div>
  5836. </div>
  5837. <div class="spanName">选择网络文件</div>
  5838. </div>
  5839. </div>
  5840. <!-- <div class="fileCss">
  5841. </div> -->
  5842. </div>
  5843. <span slot="footer" class="dialog-footer">
  5844. <el-button @click="choosePicVisible = false">取 消</el-button>
  5845. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  5846. </span>
  5847. </el-dialog>
  5848. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  5849. :before-close="handleClose" class="dialog_diy">
  5850. <div class="cru_selectBox" style="margin: 0">
  5851. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  5852. 绘画
  5853. </div>
  5854. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  5855. 科技
  5856. </div>
  5857. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  5858. 人文
  5859. </div>
  5860. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  5861. 艺术
  5862. </div>
  5863. </div>
  5864. <div class="sysPicBox">
  5865. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  5866. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  5867. </div>
  5868. </div>
  5869. </el-dialog>
  5870. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  5871. :before-close="handleClose" class="dialog_diy">
  5872. <div>
  5873. <div class="people_top_right" style="display: flex; align-items: center">
  5874. <div style="position: relative; width: 100%">
  5875. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  5876. @keyup.enter.native="resetImage()"></el-input>
  5877. <div class="search_img" @click="resetImage" style="right: 10px">
  5878. <img src="../../../assets/icon/search.png" alt />
  5879. </div>
  5880. </div>
  5881. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  5882. </div>
  5883. <div class="sysPicBox" v-loading="imageloading">
  5884. <div class="picNone" v-if="!imageList.length">
  5885. 请输入关键词搜索图片
  5886. </div>
  5887. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  5888. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  5889. </div>
  5890. </div>
  5891. </div>
  5892. </el-dialog>
  5893. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  5894. closePan(41);
  5895. }
  5896. " class="dialog_diy dialog_diy3 fullStyle">
  5897. <div v-if="selectJson" style="height: 100%">
  5898. <div class="select_box1" v-if="selectSteps == 1">
  5899. <div class="select_box1_img">
  5900. <div class="select_box1_title">
  5901. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  5902. </div>
  5903. <div class="select_box1_add_img">
  5904. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  5905. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  5906. <img src="../../../assets/icon/addPoster.png" alt="" />
  5907. </div>
  5908. <div class="isSysPic" v-else>
  5909. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5910. <div class="deletePic" @click="deleteSelectPic">
  5911. <img src="../../../assets/icon/delete.png" alt="" />
  5912. </div>
  5913. </div>
  5914. </div>
  5915. </div>
  5916. <div class="select_box1_select">
  5917. <div class="select_box1_title">
  5918. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  5919. </div>
  5920. <div class="select_box1_select_box">
  5921. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  5922. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  5923. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  5924. <div class="select_box1_select_box_add">
  5925. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  5926. 添加</el-button>
  5927. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  5928. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  5929. </div>
  5930. </div>
  5931. </div>
  5932. </div>
  5933. <div v-if="selectSteps == 2" style="height: 100%">
  5934. <div class="select_box2">
  5935. <div class="select_box2_title">设置每道题目的正确选项</div>
  5936. <div class="select_box2_box">
  5937. <div class="select_box2_img">
  5938. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5939. </div>
  5940. <div class="select_box2_answer">
  5941. <div class="select_answer_title">根据题目选择对应答案</div>
  5942. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  5943. <span>{{ checkIndex + 1 }}、</span>
  5944. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  5945. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  5946. </el-option>
  5947. </el-select>
  5948. </div>
  5949. </div>
  5950. </div>
  5951. </div>
  5952. </div>
  5953. </div>
  5954. <span slot="footer" class="dialog-footer">
  5955. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  5956. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  5957. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  5958. </span>
  5959. </el-dialog>
  5960. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  5961. :before-close="handleClose" class="dialog_diy">
  5962. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  5963. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  5964. <div class="pjCss" style="width: 100%">
  5965. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  5966. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  5967. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  5968. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  5969. <div class="remove" @click="deletRateList(eIndex)"></div>
  5970. <div style="width: 100%; display: flex">
  5971. <span style="min-width: 100px; text-align: right">评星等级:</span>
  5972. <el-rate v-model="eItem.score" disabled></el-rate>
  5973. </div>
  5974. <div class="elist_inptu_text" style="align-items: flex-start">
  5975. <span style="min-width: 100px; text-align: right">描述:</span>
  5976. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  5977. </div>
  5978. </div>
  5979. </div>
  5980. <div class="addToolFun" @click="addRateList()">
  5981. <div class="addToolImg">
  5982. <img src="../../../assets/icon/add.png" alt />
  5983. </div>
  5984. <div>添加</div>
  5985. </div>
  5986. </div>
  5987. </div>
  5988. <span slot="footer" class="dialog-footer">
  5989. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  5990. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  5991. </span>
  5992. </el-dialog>
  5993. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  5994. closePan(47);
  5995. }
  5996. " class="dialog_diy dialog_diy3 fullStyle">
  5997. <div style="height: 100%">
  5998. <div class="sentenBox" style="height: 100%">
  5999. <div class="addSen" @click="addSt">添加题目</div>
  6000. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6001. <div class="sentenTopBox">
  6002. <div class="sentenTop" :index="stIndex + 1">
  6003. <div>题目设置</div>
  6004. <div>
  6005. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6006. </div>
  6007. <div @click="addSen(stIndex)">添加</div>
  6008. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6009. </div>
  6010. </div>
  6011. <div class="cardList">
  6012. <div v-if="st.addSentence.length > 0" class="cardBox">
  6013. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6014. @click="setRightAnswer(s, stIndex, sIndex)">
  6015. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6016. <div>{{ s }}</div>
  6017. </el-tooltip>
  6018. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6019. <img src="../../../assets/icon/delete.png" alt="" />
  6020. </div>
  6021. </div>
  6022. </div>
  6023. <div class="card">
  6024. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6025. </div>
  6026. </div>
  6027. <div class="rightCardBox">
  6028. <div>正确顺序</div>
  6029. <div class="rightCardList">
  6030. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6031. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6032. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6033. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6034. <div>{{ r }}</div>
  6035. </el-tooltip>
  6036. </div>
  6037. <div>{{ rIndex + 1 }}</div>
  6038. </div>
  6039. </div>
  6040. <div class="card" v-if="st.rightAnswer.length == 0">
  6041. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6042. </div>
  6043. <div class="card" v-else>
  6044. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6045. </div>
  6046. </div>
  6047. </div>
  6048. </div>
  6049. </div>
  6050. </div>
  6051. <span slot="footer" class="dialog-footer">
  6052. <el-button @click="closePan(47)">取 消</el-button>
  6053. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6054. </span>
  6055. </el-dialog>
  6056. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6057. :before-close="handleClose" class="dialog_diy">
  6058. <el-form>
  6059. <!-- <el-form-item label="文本标题">
  6060. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6061. </el-form-item> -->
  6062. <div>表格内容</div>
  6063. <Table v-model="tableJson.text" @change="change"></Table>
  6064. </el-form>
  6065. <span slot="footer" class="dialog-footer">
  6066. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6067. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6068. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6069. </span>
  6070. </el-dialog>
  6071. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6072. :before-close="handleClose" class="dialog_diy">
  6073. <el-form>
  6074. <!-- <el-form-item label="文本标题">
  6075. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6076. </el-form-item> -->
  6077. <div>文档内容</div>
  6078. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6079. </el-form>
  6080. <span slot="footer" class="dialog-footer">
  6081. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6082. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6083. </span>
  6084. </el-dialog>
  6085. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6086. :before-close="handleClose" class="dialog_diy">
  6087. <div style="
  6088. width: 100%;
  6089. display: flex;
  6090. flex-direction: row;
  6091. flex-wrap: nowrap;
  6092. align-items: center;
  6093. justify-content: center;
  6094. ">
  6095. <div>班级:</div>
  6096. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6097. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6098. </el-option>
  6099. </el-select>
  6100. </div>
  6101. <span slot="footer" class="dialog-footer">
  6102. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6103. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6104. </span>
  6105. </el-dialog>
  6106. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6107. :before-close="handleClose" class="dialog_diy">
  6108. <div style="
  6109. width: 100%;
  6110. display: flex;
  6111. flex-direction: row;
  6112. flex-wrap: nowrap;
  6113. align-items: center;
  6114. justify-content: center;
  6115. ">
  6116. <div>随机码:</div>
  6117. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6118. </div>
  6119. <span slot="footer" class="dialog-footer">
  6120. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6121. <el-button type="primary" @click="addInvite">确定</el-button>
  6122. </span>
  6123. </el-dialog>
  6124. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6125. :before-close="handleClose" class="dialog_diy">
  6126. <div>
  6127. <div style="margin-bottom: 20px; color: #999">
  6128. 提示:点击“+”或“-”修改倒计时时长。
  6129. </div>
  6130. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6131. </div>
  6132. <span slot="footer" class="dialog-footer">
  6133. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6134. <el-button type="primary" @click="addPreTime">确定</el-button>
  6135. </span>
  6136. </el-dialog>
  6137. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6138. :before-close="handleClose" class="dialog_diy">
  6139. <div>
  6140. <div style="
  6141. width: 100%;
  6142. display: flex;
  6143. flex-direction: row;
  6144. flex-wrap: nowrap;
  6145. align-content: center;
  6146. align-items: center;
  6147. justify-content: space-between;
  6148. ">
  6149. <div style="
  6150. display: flex;
  6151. flex-flow: row nowrap;
  6152. align-items: flex-start;
  6153. width: 100%;
  6154. flex-direction: column;
  6155. flex-wrap: nowrap;
  6156. position: relative;
  6157. ">
  6158. <div class="e_box">
  6159. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6160. <div class="e_card_picture">
  6161. <img src="../../../assets/e_picture.png" />
  6162. </div>
  6163. <div class="e_card_name">
  6164. <span>{{ item.title }}</span>
  6165. </div>
  6166. <div class="e_card_btn">
  6167. <span @click="checkEva(item.id, 2)">导入</span>
  6168. </div>
  6169. </div> -->
  6170. <!-- <div class="addEva" @click="openT">
  6171. <img src="../../../assets/icon/addEva.png" alt="" />
  6172. </div> -->
  6173. <div style="
  6174. display: flex;
  6175. justify-content: flex-end;
  6176. margin-bottom: 10px;
  6177. ">
  6178. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6179. </div>
  6180. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6181. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6182. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6183. </el-table-column>
  6184. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6185. </el-table-column>
  6186. <el-table-column label="操作" width="250px">
  6187. <template slot-scope="scope">
  6188. <div class="btnBox">
  6189. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6190. </div>
  6191. </template>
  6192. </el-table-column>
  6193. </el-table>
  6194. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6195. 暂无数据
  6196. </div>
  6197. </div>
  6198. </div>
  6199. </div>
  6200. </div>
  6201. <span slot="footer" class="dialog-footer">
  6202. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6203. </span>
  6204. </el-dialog>
  6205. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6206. :before-close="handleClose" class="dialog_diy">
  6207. <div class="groupBox">
  6208. <div v-if="groupJson.group" class="groupContent">
  6209. <div class="groupTitle">请设置小组数量及名称</div>
  6210. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6211. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6212. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6213. <div class="groupBtn">
  6214. <el-button type="primary" size="small" @click="addGroup(index)"
  6215. v-if="groupJson.group.length - 1 == index">
  6216. 添加</el-button>
  6217. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6218. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6219. </div>
  6220. </div>
  6221. </div>
  6222. <div class="groupContent">
  6223. <div class="groupTitle">请设置每组人数</div>
  6224. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6225. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6226. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6227. @change="numberPan"></el-input>
  6228. </div>
  6229. </div>
  6230. <span slot="footer" class="dialog-footer">
  6231. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6232. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6233. </span>
  6234. </el-dialog>
  6235. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6236. :before-close="handleClose" class="dialog_diy">
  6237. <div style="
  6238. width: 100%;
  6239. display: flex;
  6240. flex-direction: row;
  6241. flex-wrap: nowrap;
  6242. align-items: center;
  6243. justify-content: center;
  6244. ">
  6245. <div style="min-width: fit-content">文件名称:</div>
  6246. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6247. </div>
  6248. <span slot="footer" class="dialog-footer">
  6249. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6250. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6251. </span>
  6252. </el-dialog>
  6253. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6254. closePan(69);
  6255. }
  6256. " class="dialog_diy fullStyle fullStyle1">
  6257. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6258. <span slot="footer" class="dialog-footer">
  6259. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6260. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6261. </span>
  6262. </el-dialog>
  6263. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6264. :before-close="handleClose" class="dialog_diy">
  6265. <div class="template_box">
  6266. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6267. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6268. <div class="wordPic">
  6269. <img src="../../../assets/icon/new/course_template.png" alt />
  6270. </div>
  6271. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6272. <div style="
  6273. margin-top: 10px;
  6274. line-height: 19px;
  6275. overflow: hidden;
  6276. text-overflow: ellipsis;
  6277. white-space: nowrap;
  6278. padding: 0 10px;
  6279. box-sizing: border-box;
  6280. width: 100%;
  6281. ">
  6282. {{ aa.title }}
  6283. </div>
  6284. </el-tooltip>
  6285. </div>
  6286. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6287. :class="{ wordTeacherA: ctJson.id == 1 }">
  6288. <div class="wordPic">
  6289. <img src="../../../assets/icon/new/course_template.png" alt />
  6290. </div>
  6291. <div style="
  6292. margin-top: 10px;
  6293. line-height: 19px;
  6294. overflow: hidden;
  6295. text-overflow: ellipsis;
  6296. white-space: nowrap;
  6297. padding: 0 20px;
  6298. ">
  6299. 简易模板
  6300. </div>
  6301. </div>
  6302. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6303. :class="{ wordTeacherA: ctJson.id == 2 }">
  6304. <div class="wordPic">
  6305. <img src="../../../assets/icon/new/course_template.png" alt />
  6306. </div>
  6307. <div style="
  6308. margin-top: 10px;
  6309. line-height: 19px;
  6310. overflow: hidden;
  6311. text-overflow: ellipsis;
  6312. white-space: nowrap;
  6313. padding: 0 20px;
  6314. ">
  6315. 智能粘贴模式
  6316. </div>
  6317. </div>
  6318. </div>
  6319. <span slot="footer" class="dialog-footer">
  6320. <el-button @click="templateDialog = false">取 消</el-button>
  6321. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6322. </span>
  6323. </el-dialog>
  6324. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6325. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6326. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6327. <div class="change_stageBox">
  6328. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6329. <div class="nt_taskBox">
  6330. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6331. <div class="nt_taskName">
  6332. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6333. <span>{{ t.dyName }}</span>
  6334. </el-tooltip>
  6335. </div>
  6336. </div>
  6337. <div class="moveBtn" v-if="unitJson3.length > 1">
  6338. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6339. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6340. </div>
  6341. </div>
  6342. </div>
  6343. <span slot="footer" class="dialog-footer">
  6344. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6345. <el-button type="primary" @click="updateChange">确定</el-button>
  6346. </span>
  6347. </el-dialog>
  6348. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6349. :before-close="handleClose" class="dialog_diy">
  6350. <div class="addTypeChoose" style="justify-content: center">
  6351. <div style="min-width: 100px">模板名称:</div>
  6352. <el-input v-model="templateName" style="width: 200px"></el-input>
  6353. </div>
  6354. <div class="addTypeBox">
  6355. <div class="addTypeChoose">
  6356. <div style="min-width: 100px">选择一级分类:</div>
  6357. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6358. style="width: 200px">
  6359. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6360. </el-option>
  6361. </el-select>
  6362. </div>
  6363. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6364. <div style="min-width: 100px">选择二级分类:</div>
  6365. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6366. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6367. </el-option>
  6368. </el-select>
  6369. </div>
  6370. </div>
  6371. <span slot="footer" class="dialog-footer">
  6372. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6373. <el-button @click="close()">关 闭</el-button>
  6374. </span>
  6375. </el-dialog>
  6376. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6377. </evaBox>
  6378. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6379. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6380. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" @aiConfirm="aiConfirm" :clickType="clickType">
  6381. </aiDialog>
  6382. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6383. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6384. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6385. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6386. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6387. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6388. </div>
  6389. </template>
  6390. <script>
  6391. import "../../../common/aws-sdk-2.235.1.min.js";
  6392. import { tools as toolsData } from "../../../common/tools.js";
  6393. // import "../../../common/aws-sdk-2.99.0.min.js";
  6394. import $ from "jquery";
  6395. import EditorBar from "../../../components/tools/wangEnduit";
  6396. import Table from "../../../components/tools/table";
  6397. import Mind from "../../tools/jsmind2";
  6398. import Time from "../../tools/time.vue";
  6399. import Sunburst from "../../tools/sunburst";
  6400. import SeeBoard from "../../tools/seeBoard";
  6401. import weilaiData from "../components/weilai.js";
  6402. import sourceDialog from "../teacherSource/dialog.vue";
  6403. import interVideo from "../interVideo/index.vue";
  6404. import englishRight from "../components/englishRight.vue";
  6405. import evaBox from "../evaBox/index.vue";
  6406. import EnglishVoice from "../EnglishVoice/index.vue";
  6407. import aiBox from './aiBox.vue'
  6408. import aiDialog from './aiDialog'
  6409. import aiTips from './aiTips.vue'
  6410. import tipsDialog from './tipsDialog.vue'
  6411. import { v4 as uuidv4 } from "uuid";
  6412. import MarkdownIt from "markdown-it";
  6413. import aiCreateDialog from './aiCreateDialog.vue'
  6414. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6415. import wpdf from "../test/file/wPdf2.vue";
  6416. import wOffice from "../test/file/wOffice.vue";
  6417. var OpenCC = require("opencc-js");
  6418. let converter = OpenCC.Converter({
  6419. from:'hk',
  6420. to:'cn'
  6421. })
  6422. export default {
  6423. components: {
  6424. EditorBar,
  6425. Mind,
  6426. Time,
  6427. Sunburst,
  6428. SeeBoard,
  6429. Table,
  6430. sourceDialog,
  6431. interVideo,
  6432. englishRight,
  6433. evaBox,
  6434. EnglishVoice,
  6435. aiBox,
  6436. aiDialog,
  6437. aiTips,
  6438. tipsDialog,
  6439. aiCreateDialog,
  6440. aiCreateVideoDialog,
  6441. wpdf,
  6442. wOffice,
  6443. },
  6444. data() {
  6445. return {
  6446. checkAll: false,
  6447. checkAll2: false,
  6448. chooseType: 1,
  6449. checkedCities: [],
  6450. isIndeterminate: true,
  6451. isIndeterminate2: true,
  6452. isSysPic: false,
  6453. isSysPic2: false,
  6454. steps: 1,
  6455. stepsNav: 1,
  6456. nbOrder: 0,
  6457. courseId: "",
  6458. chapToolsType: 0,
  6459. chapTools: [
  6460. {
  6461. tools: [],
  6462. toolDetail: "",
  6463. },
  6464. ],
  6465. line: "",
  6466. lineTitle: "",
  6467. sysPic: [],
  6468. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6469. sentenceList2: [],
  6470. isPushTitleList: [],
  6471. lineCount: 0,
  6472. lineType: 0,
  6473. chapCount: 0,
  6474. courseName: "",
  6475. isTeacherSee: false,
  6476. courseText: "",
  6477. textLoading: false,
  6478. ttextLoading: false,
  6479. courseText2: "",
  6480. preTime: 0,
  6481. formLabelWidth: "100px",
  6482. choosePicVisible: false,
  6483. sysPicVisible: false,
  6484. sysPicVisible2: false,
  6485. uploadLoading1: false,
  6486. noneBtnImg: false,
  6487. updateBoolean2: false,
  6488. unitIndex: 0,
  6489. taskCount: 0,
  6490. dialogVisible: false,
  6491. dialogVisible1: false,
  6492. dialogVisible2: false,
  6493. dialogVisible3: false,
  6494. dialogVisible4: false,
  6495. dialogVisible5: false,
  6496. dialogVisible6: false,
  6497. dialogVisible7: false,
  6498. dialogVisible8: false,
  6499. dialogVisible9: false,
  6500. dialogVisibleClass: false,
  6501. dialogVisibleMember: false,
  6502. dialogVisibleMp3: false,
  6503. dialogVisibleSelect: false,
  6504. dialogVisibleSentence: false,
  6505. dialogVisibleRate: false,
  6506. dialogVisibleChoice: false,
  6507. dialogVisiblemb: false,
  6508. dialogVisibleInvite: false,
  6509. dialogVisibleSource: false,
  6510. dialogVisibleVideo: false,
  6511. dialogVisibleStageChange: false,
  6512. dialogVisibleupdataVideoT: false,
  6513. englishDialogVisible: false,
  6514. templateDialog: false,
  6515. ctJson: {},
  6516. isClickColor: 1,
  6517. toolIndexType: "",
  6518. publicTool: 0,
  6519. searchPeople: "",
  6520. searchTN: "",
  6521. collid: '',
  6522. CollLoading: false,
  6523. userid: this.$route.query.userid,
  6524. oid: this.$route.query.oid,
  6525. org: this.$route.query.org,
  6526. role: this.$route.query.role,
  6527. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6528. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6529. dialogVisibleTable: false,
  6530. dialogVisibleWord: false,
  6531. tableJson: { text: "" },
  6532. wordJson: { text: "" },
  6533. dialogVisibleMoreUpload: false,
  6534. dialogVisiblePreTime: false,
  6535. uploadJson: [],
  6536. classJuri: [],
  6537. gradeList: [],
  6538. cover: [], //课程封面
  6539. myWord: [],
  6540. evaJuri: [],
  6541. evalua: "",
  6542. targetArray: [],
  6543. eTitle: "",
  6544. eJson: {},
  6545. fid: "", //一级
  6546. sid: "", //二级
  6547. tid: "", //二级
  6548. typeMode: 3,
  6549. eJSONNum: 0,
  6550. data: {
  6551. meta: {
  6552. name: "example",
  6553. author: "dd@163.com",
  6554. version: "0.2",
  6555. },
  6556. format: "node_array",
  6557. data: [{ id: "root", isroot: true, topic: "" }],
  6558. },
  6559. askJson: {
  6560. askCount: 1,
  6561. askTitle: "",
  6562. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6563. },
  6564. askJson2: {},
  6565. testJson: {},
  6566. testJson2: {},
  6567. selectJson: {},
  6568. selectJson2: {},
  6569. rateJson: [],
  6570. unitJson2: [],
  6571. unitJson3: [],
  6572. unitJson: [
  6573. {
  6574. dyName: "", //单元标题
  6575. chapterInfo: [
  6576. {
  6577. isread: false,
  6578. chapterid: this.guid(),
  6579. title: "",
  6580. courseName: "",
  6581. taskJson: [
  6582. {
  6583. task: "",
  6584. taskDetail: "",
  6585. chapterData: [],
  6586. toolText: "",
  6587. toolChoose: [
  6588. {
  6589. tool: [],
  6590. toolDetail: "",
  6591. toolType: 0,
  6592. askCount: 1,
  6593. askTitle: "",
  6594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6595. },
  6596. ],
  6597. isShowTools: false,
  6598. askCount: 1,
  6599. isFold: 1,
  6600. askTitle: "",
  6601. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6602. checkJson: [{ checkCount: [], checkPerent: [] }],
  6603. homeworkList: [],
  6604. },
  6605. ],
  6606. itemCount: 1,
  6607. fileList1: [],
  6608. video: [],
  6609. testData: [],
  6610. pData: [],
  6611. templateArray: [],
  6612. },
  6613. ],
  6614. },
  6615. ],
  6616. templateArray: [],
  6617. studentJuri: [],
  6618. teacherJuri: [],
  6619. CollaborativeTeaList: [],
  6620. checkboxList: [],
  6621. checkboxList2: [],
  6622. checkboxList3: [],
  6623. classSearch: "",
  6624. gradeId: "",
  6625. number: "",
  6626. tTitle: "",
  6627. tdetail: "",
  6628. templateC: {},
  6629. AttText: {},
  6630. AttTextType: 0,
  6631. AttTextIndex: 0,
  6632. cTemplate: "",
  6633. CourseType: [],
  6634. CourseType1: [],
  6635. CourseType2: [],
  6636. CourseTypeJson: {},
  6637. CourseTypeJson1: {},
  6638. courseTypeId: [],
  6639. courseTypeId1: [],
  6640. courseTypeSon: [],
  6641. clearArray: [],
  6642. pTypeCheck: [],
  6643. pTypeCheckName: [],
  6644. loading: false,
  6645. toolType: 0,
  6646. inputShow: true,
  6647. inputShow2: true,
  6648. toolIndex: 0,
  6649. cidType: 0,
  6650. answerQ: "",
  6651. answerQ2: "",
  6652. grade: [],
  6653. grade2: [],
  6654. courseUserid: "",
  6655. timer: null,
  6656. timer2: null,
  6657. pasteTimer: null,
  6658. checkId: "",
  6659. isDelete: 1,
  6660. addindex: 0,
  6661. selectSteps: 1,
  6662. groupJson: {},
  6663. dialogVisibleGroup: false,
  6664. rightBoxHeight: 0,
  6665. ManAarray: [],
  6666. checkBoolean: false,
  6667. inviteCode: [],
  6668. inviteId: "",
  6669. icode: "",
  6670. easyArray: [2, 4],
  6671. sourceData: {},
  6672. updateSourcePan: false,
  6673. videoJson: {},
  6674. isBtnDisplay: false,
  6675. isStepDisplay: false,
  6676. isPasteStage: false,
  6677. isPasteTask: false,
  6678. isPasteChoice: false,
  6679. imageList: [],
  6680. imageloading: false,
  6681. imageloading2: false,
  6682. searchImageValue: "",
  6683. ppage: 1,
  6684. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  6685. oldIndex: 0,
  6686. dragType: "",
  6687. oldUnitIndex: 0,
  6688. oldData: null,
  6689. newIndex: "",
  6690. englishList: {},
  6691. typeIndex: "",
  6692. courseState: 5,
  6693. taskJSONa: [
  6694. {
  6695. task: "",
  6696. taskDetail: "",
  6697. chapterData: [],
  6698. toolText: "",
  6699. toolChoose: [
  6700. {
  6701. tool: [],
  6702. toolDetail: "",
  6703. toolType: 0,
  6704. askCount: 1,
  6705. askTitle: "",
  6706. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6707. },
  6708. ],
  6709. isShowTools: false,
  6710. askCount: 1,
  6711. isFold: 1,
  6712. askTitle: "",
  6713. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6714. checkJson: [{ checkCount: [], checkPerent: [] }],
  6715. homeworkList: [],
  6716. },
  6717. ],
  6718. checkUnitIndex: 0,
  6719. isdrag: "",
  6720. evaIndex: "",
  6721. evatIndex: "",
  6722. evaBoxDialog: false,
  6723. EnglishVoiceDialog: false,
  6724. englishVoiceJson: {},
  6725. cetIndex: "",
  6726. cettIndex: "",
  6727. cetBoxDialog: false,
  6728. templateName: "",
  6729. setTypeJson: {
  6730. one: "",
  6731. two: "",
  6732. },
  6733. twoJson: [],
  6734. oneJson: [],
  6735. updateKey: 1,
  6736. isOutline: false,
  6737. isOutline2: false,
  6738. infoData: [],
  6739. infoproVisible: false,
  6740. infoisFinishSize: 0,
  6741. infoisAllSize: 0,
  6742. infoprogress: 0,
  6743. taskDetailLoading: [],
  6744. ttaskDetailLoading: [],
  6745. taskDetailLoading2: [],
  6746. ttaskDetailLoading2: [],
  6747. taskDetailLoading3: [],
  6748. ttaskDetailLoading3: [],
  6749. taskDetailLoading4: [],
  6750. taskDetailLoading5: [],
  6751. ttaskDetailLoading5: [],
  6752. dArray: [],
  6753. dialogVisibleAiD: false,
  6754. aitype: "",
  6755. aiJson: {
  6756. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  6757. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  6758. "aiTask": "请根据<教学任务教案>。",
  6759. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  6760. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  6761. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  6762. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  6763. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  6764. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  6765. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  6766. },
  6767. aiText: "",
  6768. aiText2: "",
  6769. aiCallBack: "",
  6770. aiIndex: "",
  6771. clickType: 1,
  6772. promptShow: false,
  6773. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  6774. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  6775. dialogVisibleTips: false,
  6776. tipsJson: {},
  6777. cpote:{
  6778. cpote1: '',
  6779. cpote2: '',
  6780. cpote3: '',
  6781. cpote4: '',
  6782. },
  6783. cpoteLoading:{
  6784. cpote1: false,
  6785. cpote2: false,
  6786. cpote3: false,
  6787. cpote4: false,
  6788. },
  6789. cpotetLoading:{
  6790. cpote1: false,
  6791. cpote2: false,
  6792. cpote3: false,
  6793. cpote4: false,
  6794. },
  6795. cpoteType: 0,
  6796. dialogVisibleAiCreate: false,
  6797. dialogVisibleAiCreateVideo: false,
  6798. teacherText: [],
  6799. isFileSearch: true,
  6800. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  6801. 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'],
  6802. courseJie:1,
  6803. courseTime:45,
  6804. allTextArray: [],
  6805. dialogVisiblePdf: false,
  6806. dialogVisibleOffice: false,
  6807. wurl: "",
  6808. choiceLoading: false,
  6809. teacherInfoData: [],
  6810. teacherinfoproVisible: false,
  6811. teacherinfoisFinishSize: 0,
  6812. teacherinfoisAllSize: 0,
  6813. teacherinfoprogress: 0,
  6814. teacherCourseText: "",
  6815. teacherTextLoading: false,
  6816. tteacherTextLoading: false,
  6817. targetCourseText: "",
  6818. targetTextLoading: false,
  6819. ttargetTextLoading: false,
  6820. cankaoInfoData: [],
  6821. fileSLoading: false,
  6822. infoData2: [],
  6823. isuseT: false,
  6824. mode: 1,
  6825. targetCourseText2: "",
  6826. targetTextLoading2: false,
  6827. ttargetTextLoading2: false,
  6828. courseTextBool: false,
  6829. teacherCourseTextB: true,
  6830. targetCourseTextB: true,
  6831. courseTextB: true,
  6832. targetCourseText2B: true,
  6833. // 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'],
  6834. yiKeTemplateArray:[],
  6835. taskLoading: [],
  6836. ruleLoading: [],
  6837. };
  6838. },
  6839. directives: {
  6840. autoHeight: {
  6841. update(el, binding) {
  6842. const { value } = binding;
  6843. if (value && typeof value === "number") {
  6844. el.style.height = `${value}px`;
  6845. } else {
  6846. el.style.height = "auto";
  6847. }
  6848. },
  6849. componentUpdated(el) {
  6850. el.style.height = `${el.scrollHeight + 25}px`;
  6851. },
  6852. },
  6853. },
  6854. computed: {
  6855. // rightBoxHeight: function () {
  6856. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  6857. // },
  6858. offsetLetfPx: function () {
  6859. //addnum可以直接在模板语法里面用,相当于data内的值
  6860. return (
  6861. $(".cru_select")[this.unitIndex] &&
  6862. $(".cru_select")[this.unitIndex].offsetLeft + 5
  6863. );
  6864. },
  6865. getMan2() {
  6866. return function (people) {
  6867. let _people = people;
  6868. let _people2 = "";
  6869. if (this.ManAarray.length) {
  6870. for (var i = 0; i < this.ManAarray.length; i++) {
  6871. if (this.ManAarray[i].userid == people) {
  6872. _people2 = this.ManAarray[i].name;
  6873. break;
  6874. }
  6875. }
  6876. }
  6877. if (people == this.courseUserid) {
  6878. return "";
  6879. }
  6880. return this.ManAarray.length ? _people2 : "";
  6881. };
  6882. },
  6883. getListMan2() {
  6884. return function (list) {
  6885. let _people2 = [];
  6886. if (this.ManAarray.length) {
  6887. for (var j = 0; j < list.length; j++) {
  6888. let people = list[j];
  6889. for (var i = 0; i < this.ManAarray.length; i++) {
  6890. if (
  6891. this.ManAarray[i].userid == people &&
  6892. people != this.courseUserid
  6893. ) {
  6894. _people2.push(this.ManAarray[i].name);
  6895. break;
  6896. }
  6897. }
  6898. }
  6899. }
  6900. return this.ManAarray.length ? _people2.join("、") : "";
  6901. };
  6902. },
  6903. isInvite() {
  6904. return function (cid) {
  6905. let array = [];
  6906. for (var i = 0; i < this.inviteCode.length; i++) {
  6907. array.push(this.inviteCode[i].cid);
  6908. }
  6909. return array.indexOf(cid) != -1;
  6910. };
  6911. },
  6912. getInviteCodeC() {
  6913. return function (cid) {
  6914. let array = [];
  6915. for (var i = 0; i < this.inviteCode.length; i++) {
  6916. array.push(this.inviteCode[i].cid);
  6917. }
  6918. return this.inviteCode[array.indexOf(cid)].ic;
  6919. };
  6920. },
  6921. getClassC() {
  6922. return function (c) {
  6923. let _c2 = "";
  6924. if (this.grade.length) {
  6925. for (var i = 0; i < this.grade.length; i++) {
  6926. if (this.grade[i].id == c) {
  6927. _c2 = this.grade[i].name;
  6928. break;
  6929. }
  6930. }
  6931. }
  6932. return this.grade.length ? _c2 : "";
  6933. };
  6934. },
  6935. getListClassC() {
  6936. return function (list) {
  6937. let _c2 = [];
  6938. if (this.grade.length) {
  6939. for (var j = 0; j < list.length; j++) {
  6940. let c = list[j];
  6941. for (var i = 0; i < this.grade.length; i++) {
  6942. if (this.grade[i].id == c) {
  6943. _c2.push(this.grade[i].name);
  6944. break;
  6945. }
  6946. }
  6947. }
  6948. }
  6949. return this.grade.length ? _c2.join("、") : "";
  6950. };
  6951. },
  6952. MarkdownT() {
  6953. return function (c) {
  6954. let md = new MarkdownIt();
  6955. return c
  6956. ? md.render(c) : "";
  6957. };
  6958. },
  6959. panOutline(){
  6960. return function () {
  6961. let count = 0;
  6962. for(var i = 0; i < this.unitJson.length; i++){
  6963. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6964. for(var j = 0; j < _task.length; j++){
  6965. if(_task[j].taskDetail2){
  6966. count++
  6967. }
  6968. }
  6969. }
  6970. return count;
  6971. };
  6972. },
  6973. panTeacher(){
  6974. return function () {
  6975. let count = 0;
  6976. for(var i = 0; i < this.unitJson.length; i++){
  6977. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6978. for(var j = 0; j < _task.length; j++){
  6979. if(_task[j].taskDetail3){
  6980. count++
  6981. }
  6982. }
  6983. }
  6984. return count;
  6985. };
  6986. },
  6987. dataCheckPan(){
  6988. return function (fileid) {
  6989. for(let i = 0; i < this.infoData.length; i++){
  6990. if(this.infoData[i].fileid == fileid){
  6991. return true
  6992. }
  6993. }
  6994. return false;
  6995. };
  6996. }
  6997. },
  6998. watch: {
  6999. unitIndex(newValue, oldValue) {
  7000. // return;
  7001. if (this.isDelete == 2) {
  7002. this.isDelete = 1;
  7003. return;
  7004. }
  7005. if (this.cid != "") {
  7006. let _unitIndex = oldValue;
  7007. if (
  7008. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7009. JSON.stringify(this.unitJson[_unitIndex])
  7010. ) {
  7011. this.$refs.rightboxR.scrollTop = 0;
  7012. return;
  7013. }
  7014. let cPan = 1;
  7015. for (
  7016. var j = 0;
  7017. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7018. j++
  7019. ) {
  7020. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7021. j
  7022. ].proVisible = false;
  7023. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7024. j
  7025. ].proVisible2 = false;
  7026. if (
  7027. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7028. .length > 1
  7029. ) {
  7030. for (
  7031. var z = 0;
  7032. z <
  7033. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7034. .length;
  7035. z++
  7036. ) {
  7037. if (
  7038. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7039. .toolChoose[z].tool.length
  7040. ) {
  7041. this.$message.error("请把工具添加完整");
  7042. cPan = 2;
  7043. break;
  7044. }
  7045. }
  7046. }
  7047. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7048. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7049. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7050. (ele) => {
  7051. return ele.value != "";
  7052. }
  7053. );
  7054. }
  7055. }
  7056. if (cPan == 2) {
  7057. this.unitIndex = oldValue;
  7058. return;
  7059. }
  7060. for (var i = 0; i < this.unitJson.length; i++) {
  7061. if (this.addindex != i) {
  7062. delete this.unitJson[i].isUpdate;
  7063. }
  7064. }
  7065. this.$refs.rightboxR.scrollTop = 0;
  7066. this.addindex = -1;
  7067. let params = [
  7068. {
  7069. cid: this.cid,
  7070. chapters: JSON.stringify(this.unitJson),
  7071. uid: this.userid,
  7072. unitIndex: _unitIndex,
  7073. },
  7074. ];
  7075. this.ajax
  7076. .post(this.$store.state.api + "updateWorkNew4", params)
  7077. .then((res) => {
  7078. // this.$message({
  7079. // message: "修改成功",
  7080. // type: "success",
  7081. // });
  7082. // this.courseId = this.cid;
  7083. this.addtips()
  7084. })
  7085. .catch((err) => {
  7086. this.$message.error("网络不佳");
  7087. console.error(err);
  7088. });
  7089. }
  7090. },
  7091. steps(newValue, old) {
  7092. if (newValue == 4) {
  7093. let cPan = 1;
  7094. for (var i = 0; i < this.unitJson.length; i++) {
  7095. for (
  7096. var j = 0;
  7097. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7098. j++
  7099. ) {
  7100. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7101. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7102. if (
  7103. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7104. ) {
  7105. for (
  7106. var z = 0;
  7107. z <
  7108. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7109. z++
  7110. ) {
  7111. if (
  7112. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7113. .tool.length
  7114. ) {
  7115. this.$message.error("请把工具添加完整");
  7116. cPan = 2;
  7117. break;
  7118. }
  7119. }
  7120. }
  7121. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7122. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7123. i
  7124. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7125. return ele.value != "";
  7126. });
  7127. }
  7128. }
  7129. }
  7130. this.inputShow = true;
  7131. if (cPan == 2) {
  7132. this.steps = old;
  7133. return;
  7134. }
  7135. this.goTo(
  7136. "/course?userid=" +
  7137. this.userid +
  7138. "&oid=" +
  7139. this.oid +
  7140. "&org=" +
  7141. this.org +
  7142. "&role=" +
  7143. this.role
  7144. );
  7145. }
  7146. },
  7147. },
  7148. methods: {
  7149. tableRowClassName({ row, rowIndex }) {
  7150. if ((rowIndex + 1) % 2 === 0) {
  7151. return "even_row";
  7152. } else {
  7153. return "";
  7154. }
  7155. },
  7156. close() {
  7157. this.cetIndex = "";
  7158. this.cettIndex = "";
  7159. this.templateName = "";
  7160. this.cetBoxDialog = false;
  7161. },
  7162. openAI() {
  7163. top.postMessage({ tools: "64" }, "*");
  7164. },
  7165. setMan() {
  7166. // let teacherJuri = this.teacherJuri2;
  7167. this.ManAarray = [];
  7168. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7169. if (_user.indexOf(this.userid) == -1) {
  7170. _user.push(this.userid);
  7171. }
  7172. if (_user.indexOf(this.courseUserid) == -1) {
  7173. _user.push(this.courseUserid);
  7174. }
  7175. let params = {
  7176. uid: _user.join(","),
  7177. };
  7178. this.ajax
  7179. .get(this.$store.state.api + "getAllUserById", params)
  7180. .then((res) => {
  7181. let teacherJuri = res.data[0];
  7182. this.ManAarray = teacherJuri;
  7183. })
  7184. .catch((err) => {
  7185. console.error(err);
  7186. });
  7187. },
  7188. previewImg(url) {
  7189. this.$hevueImgPreview(url);
  7190. },
  7191. btnDisplay(bool) {
  7192. this.isBtnDisplay = bool;
  7193. },
  7194. stepDisplay(bool) {
  7195. this.isStepDisplay = bool;
  7196. },
  7197. scrollChange() {
  7198. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7199. },
  7200. addHw(e) {
  7201. var el = e.currentTarget;
  7202. el.getElementsByTagName("input")[0].click();
  7203. },
  7204. change(val) {
  7205. if (this.dialogVisible1) {
  7206. this.tdetail = val;
  7207. } else if (this.dialogVisible6) {
  7208. this.AttText.text = val;
  7209. } else if (this.dialogVisible2) {
  7210. this.cTemplate = val;
  7211. } else if (this.dialogVisibleTable) {
  7212. this.tableJson.text = val;
  7213. }
  7214. this.$forceUpdate();
  7215. console.log(val);
  7216. },
  7217. change2(val) {
  7218. console.log(val);
  7219. this.$forceUpdate();
  7220. },
  7221. handleClose(done) {
  7222. done();
  7223. },
  7224. closePan(tool) {
  7225. if (tool == 15) {
  7226. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7227. this.dialogVisible8 = false;
  7228. } else {
  7229. this.closeConfirm(tool);
  7230. }
  7231. } else if (tool == 4) {
  7232. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7233. this.dialogVisible5 = false;
  7234. } else {
  7235. this.closeConfirm(tool);
  7236. }
  7237. } else if (tool == 45) {
  7238. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7239. this.dialogVisibleChoice = false;
  7240. } else {
  7241. this.closeConfirm(tool);
  7242. }
  7243. } else if (tool == 41) {
  7244. if (
  7245. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7246. ) {
  7247. this.dialogVisibleSelect = false;
  7248. } else {
  7249. this.closeConfirm(tool);
  7250. }
  7251. } else if (tool == 47) {
  7252. if (
  7253. JSON.stringify(this.sentenceList) ==
  7254. JSON.stringify(this.sentenceList2)
  7255. ) {
  7256. this.dialogVisibleSentence = false;
  7257. } else {
  7258. this.closeConfirm(tool);
  7259. }
  7260. } else if (tool == 69) {
  7261. if (
  7262. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7263. ) {
  7264. this.englishDialogVisible = false;
  7265. } else {
  7266. this.closeConfirm(tool);
  7267. }
  7268. }
  7269. },
  7270. closeConfirm(tool) {
  7271. this.$confirm("是否保存已编辑内容?", "提示", {
  7272. confirmButtonText: "保存",
  7273. cancelButtonText: "不保存",
  7274. type: "warning",
  7275. })
  7276. .then(() => {
  7277. if (tool == 15) {
  7278. this.addAnswer();
  7279. } else if (tool == 4) {
  7280. this.addAsk();
  7281. } else if (tool == 45) {
  7282. this.addTest();
  7283. } else if (tool == 41) {
  7284. this.addSelectAnswer();
  7285. } else if (tool == 47) {
  7286. this.addSentenceTool();
  7287. } else if (tool == 69) {
  7288. this.addEnglish();
  7289. }
  7290. })
  7291. .catch(() => {
  7292. if (tool == 15) {
  7293. this.dialogVisible8 = false;
  7294. } else if (tool == 4) {
  7295. this.dialogVisible5 = false;
  7296. } else if (tool == 45) {
  7297. this.dialogVisibleChoice = false;
  7298. } else if (tool == 41) {
  7299. this.dialogVisibleSelect = false;
  7300. } else if (tool == 47) {
  7301. this.dialogVisibleSentence = false;
  7302. } else if (tool == 69) {
  7303. this.englishDialogVisible = false;
  7304. }
  7305. });
  7306. },
  7307. addEnglish(jsonType) {
  7308. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7309. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7310. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7311. if (
  7312. this.englishList.engTitle == "" ||
  7313. this.englishList.englishText == ""
  7314. ) {
  7315. this.$message.error("请将内容填写完整!");
  7316. return;
  7317. }
  7318. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7319. this.taskCount
  7320. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7321. this.englishList = {};
  7322. if (jsonType && jsonType == 1) {
  7323. this.englishDialogVisible = true;
  7324. } else {
  7325. this.englishDialogVisible = false;
  7326. }
  7327. if (
  7328. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7329. .toolChoose[this.toolIndex].tool != 69
  7330. ) {
  7331. this.addTools(69, this.taskCount, this.toolIndex);
  7332. }
  7333. },
  7334. imgChange2(i, j) {
  7335. var _tmp = this.testJson.testJson[i].checkList[j];
  7336. this.noneBtnImg = _tmp.length >= 1;
  7337. },
  7338. imgChange3(i) {
  7339. var _tmp = this.testJson.testJson[i];
  7340. this.noneBtnImg = _tmp.length >= 1;
  7341. },
  7342. imgChange1(file, fileList, type, itemTaskIndex) {
  7343. if (type == 1) {
  7344. var _tmp = this.cover;
  7345. } else if (
  7346. type == 2 ||
  7347. type == 3 ||
  7348. type == 6 ||
  7349. type == 7 ||
  7350. type == 8
  7351. ) {
  7352. var _tmp =
  7353. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7354. .chapterData;
  7355. } else if (type == 4) {
  7356. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7357. } else {
  7358. var _tmp =
  7359. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7360. .homeworkList;
  7361. }
  7362. this.noneBtnImg = _tmp.length >= 1;
  7363. },
  7364. goTo(path) {
  7365. this.$router.push(path);
  7366. },
  7367. guid() {
  7368. var _num,
  7369. i,
  7370. _guid = "";
  7371. for (i = 0; i < 32; i++) {
  7372. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7373. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7374. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7375. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7376. _guid += "-";
  7377. }
  7378. }
  7379. return _guid;
  7380. },
  7381. retrunCourse() {
  7382. if(this.istemplate == 1){
  7383. this.goTo(
  7384. "/course?userid=" +
  7385. this.userid +
  7386. "&oid=" +
  7387. this.oid +
  7388. "&org=" +
  7389. this.org +
  7390. "&role=" +
  7391. this.role
  7392. );
  7393. return
  7394. }
  7395. this.$confirm("是否保存已编辑内容?", "提示", {
  7396. confirmButtonText: "保存",
  7397. cancelButtonText: "不保存",
  7398. distinguishCancelAndClose: true,
  7399. type: "warning",
  7400. })
  7401. .then(() => {
  7402. if (this.taskLoading.length) {
  7403. let _pan = 1
  7404. for(var k = 0; k < this.taskLoading.length; k++){
  7405. if(this.taskLoading[k]){
  7406. this.$message({
  7407. message: `请等待任务${k+1}回答完毕后再保存`,
  7408. type: "warning"
  7409. });
  7410. _pan = 2
  7411. }
  7412. }
  7413. if(_pan == 2){
  7414. return
  7415. }
  7416. }
  7417. if (this.cid == "" || this.cid == undefined) {
  7418. if (this.courseName == "") {
  7419. this.$message.error("请补充填写课程名称");
  7420. return;
  7421. } else {
  7422. this.addWork();
  7423. }
  7424. this.steps = 4;
  7425. } else {
  7426. if (this.courseName == "") {
  7427. this.$message.error("请补充填写课程名称");
  7428. return;
  7429. } else {
  7430. if (this.userid != this.courseUserid && this.role != "1") {
  7431. this.updateWork2();
  7432. } else {
  7433. this.updateWork();
  7434. }
  7435. this.steps = 4;
  7436. }
  7437. }
  7438. })
  7439. .catch((v) => {
  7440. console.log(v);
  7441. if (v == "cancel") {
  7442. this.goTo(
  7443. "/course?userid=" +
  7444. this.userid +
  7445. "&oid=" +
  7446. this.oid +
  7447. "&org=" +
  7448. this.org +
  7449. "&role=" +
  7450. this.role
  7451. );
  7452. }
  7453. });
  7454. },
  7455. lastSteps() {
  7456. if (this.steps == 4) {
  7457. this.goTo(
  7458. "/course?userid=" +
  7459. this.userid +
  7460. "&oid=" +
  7461. this.oid +
  7462. "&org=" +
  7463. this.org +
  7464. "&role=" +
  7465. this.role
  7466. );
  7467. } else {
  7468. // if (this.cidType == 0) {
  7469. // this.steps--;
  7470. // if (this.steps == 1) {
  7471. // setTimeout(() => {
  7472. // this.checkEva(this.checkId);
  7473. // setTimeout(() => {
  7474. // this.checkEva(this.checkId);
  7475. // }, 100);
  7476. // }, 100);
  7477. // }
  7478. // } else {
  7479. if (this.steps == 3) {
  7480. this.steps = 1;
  7481. setTimeout(() => {
  7482. this.checkEva(this.checkId);
  7483. setTimeout(() => {
  7484. this.checkEva(this.checkId);
  7485. }, 100);
  7486. }, 100);
  7487. }
  7488. // }
  7489. }
  7490. },
  7491. navSteps(s) {
  7492. if (this.courseName == "") {
  7493. this.$message.error("请补充填写课程名称");
  7494. return;
  7495. }
  7496. if (this.cidType == 0) {
  7497. if (this.steps == 1) {
  7498. if (this.cid == "" || this.cid == undefined) {
  7499. this.addWork();
  7500. } else {
  7501. if (this.userid != this.courseUserid && this.role != "1") {
  7502. this.updateWork2();
  7503. } else {
  7504. this.updateWork();
  7505. }
  7506. }
  7507. }
  7508. if (s == 1) {
  7509. this.steps = 1;
  7510. setTimeout(() => {
  7511. this.checkEva(this.checkId);
  7512. setTimeout(() => {
  7513. this.checkEva(this.checkId);
  7514. }, 100);
  7515. }, 100);
  7516. }
  7517. if (s == 2) {
  7518. this.steps = 2;
  7519. }
  7520. if (s == 3) {
  7521. this.cTemplate = this.templateC.content;
  7522. this.dialogVisible2 = false;
  7523. this.steps = 3;
  7524. this.isClickColor = 1;
  7525. this.unitJson[
  7526. this.unitIndex
  7527. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7528. this.$forceUpdate();
  7529. setTimeout(() => {
  7530. this.checkEva(this.checkId);
  7531. setTimeout(() => {
  7532. this.checkEva(this.checkId);
  7533. }, 100);
  7534. }, 1000);
  7535. }
  7536. } else {
  7537. if (this.steps == 1) {
  7538. if (this.cid == "" || this.cid == undefined) {
  7539. this.addWork();
  7540. } else {
  7541. if (this.userid != this.courseUserid && this.role != "1") {
  7542. this.updateWork2();
  7543. } else {
  7544. this.updateWork();
  7545. }
  7546. }
  7547. }
  7548. if (s == 1) {
  7549. this.steps = 1;
  7550. setTimeout(() => {
  7551. this.checkEva(this.checkId);
  7552. setTimeout(() => {
  7553. this.checkEva(this.checkId);
  7554. }, 100);
  7555. }, 100);
  7556. }
  7557. if (s == 3) {
  7558. this.cTemplate = this.templateC.content;
  7559. this.dialogVisible2 = false;
  7560. this.steps = 3;
  7561. this.isClickColor = 1;
  7562. this.unitJson[
  7563. this.unitIndex
  7564. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7565. this.$forceUpdate();
  7566. setTimeout(() => {
  7567. this.checkEva(this.checkId);
  7568. setTimeout(() => {
  7569. this.checkEva(this.checkId);
  7570. }, 100);
  7571. }, 1000);
  7572. }
  7573. }
  7574. this.$refs.stepBox.scrollTop = 0;
  7575. },
  7576. nextSteps(clickType) {
  7577. // if (this.cidType == 1) {
  7578. if (this.steps == 1) {
  7579. if (this.courseName != "") {
  7580. 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) {
  7581. // this.$message({
  7582. // message: "请回答完毕后再次发送",
  7583. // type: "warning"
  7584. // });
  7585. if(this.ttaskDetailLoading5.length){
  7586. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  7587. this.$message({
  7588. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7589. type: "warning"
  7590. });
  7591. }
  7592. if(this.ttaskDetailLoading.length){
  7593. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  7594. this.$message({
  7595. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7596. type: "warning"
  7597. });
  7598. }
  7599. if(this.cpotetLoading.cpote1){
  7600. this.$message({
  7601. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  7602. type: "warning"
  7603. });
  7604. }
  7605. if(this.cpotetLoading.cpote2){
  7606. this.$message({
  7607. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  7608. type: "warning"
  7609. });
  7610. }
  7611. if(this.cpotetLoading.cpote3){
  7612. this.$message({
  7613. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  7614. type: "warning"
  7615. });
  7616. }
  7617. if(this.cpotetLoading.cpote4){
  7618. this.$message({
  7619. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  7620. type: "warning"
  7621. });
  7622. }
  7623. return;
  7624. }
  7625. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  7626. if(!this.courseText && !this.teacherCourseText){
  7627. this.$message.error("请生成简要描述后再生成大纲");
  7628. return;
  7629. }
  7630. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  7631. this.openAiDialog(clickType, 'aiOutline2')
  7632. }else {
  7633. this.openAiDialog(clickType, 'aiOutline')
  7634. }
  7635. return;
  7636. }
  7637. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  7638. let _type = ''
  7639. if(this.cpoteType == 0){
  7640. _type = 'aiCpote1'
  7641. }else if(this.cpoteType == 1){
  7642. _type = 'aiCpote2'
  7643. }else if(this.cpoteType == 2){
  7644. _type = 'aiCpote3'
  7645. }else if(this.cpoteType == 3){
  7646. _type = 'aiCpote4'
  7647. }
  7648. this.cpoteType++
  7649. this.openAiDialog(clickType, _type)
  7650. return;
  7651. }
  7652. // if (!this.isOutline2) {
  7653. // this.openAiDialog(clickType, 'aiTeacher')
  7654. // return;
  7655. // }
  7656. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  7657. this.openAiDialog(clickType, 'aiTeacher3')
  7658. return;
  7659. }
  7660. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  7661. this.openAiDialog(clickType, 'aiTeacher2')
  7662. return;
  7663. }
  7664. let _pan2 = 1
  7665. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  7666. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  7667. _pan2 = 2
  7668. this.$message.error(`请完善任务${k+1}的课程大纲`)
  7669. break;
  7670. }
  7671. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  7672. _pan2 = 2
  7673. this.$message.error(`请完善任务${k+1}的课程教案`)
  7674. break;
  7675. }
  7676. }
  7677. if(_pan2 == 2){
  7678. return;
  7679. }
  7680. const functionA = () => {
  7681. setTimeout(() => {
  7682. this.loading = false
  7683. this.steps = 3;
  7684. }, 0)
  7685. this.isClickColor = 1;
  7686. this.unitJson[
  7687. this.unitIndex
  7688. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7689. this.$forceUpdate();
  7690. setTimeout(() => {
  7691. this.checkEva(this.checkId);
  7692. setTimeout(() => {
  7693. this.checkEva(this.checkId);
  7694. }, 100);
  7695. }, 1000);
  7696. if (this.cid == "" || this.cid == undefined) {
  7697. this.addWork();
  7698. } else {
  7699. if (this.userid != this.courseUserid && this.role != "1") {
  7700. this.updateWork2();
  7701. } else {
  7702. this.updateWork();
  7703. }
  7704. }
  7705. }
  7706. if (this.cid) {
  7707. this.loading = true
  7708. } else {
  7709. this.openAiDialog(clickType, "aiTask2", 'all')
  7710. }
  7711. functionA()
  7712. } else {
  7713. this.$message.error("请补充填写课程名称");
  7714. return;
  7715. }
  7716. } else if (this.steps == 3) {
  7717. if (this.taskLoading.length) {
  7718. let _pan = 1
  7719. for(var k = 0; k < this.taskLoading.length; k++){
  7720. if(this.taskLoading[k]){
  7721. this.$message({
  7722. message: `请等待任务${k+1}回答完毕后再上传`,
  7723. type: "warning"
  7724. });
  7725. _pan = 2
  7726. }
  7727. }
  7728. if(_pan == 2){
  7729. return
  7730. }
  7731. }
  7732. if (this.cid == "" || this.cid == undefined) {
  7733. if (this.courseName == "") {
  7734. this.$message.error("请补充填写课程名称");
  7735. return;
  7736. } else {
  7737. this.addWork();
  7738. this.steps++;
  7739. }
  7740. } else {
  7741. if (this.courseName == "") {
  7742. this.$message.error("请补充填写课程名称");
  7743. return;
  7744. } else {
  7745. if (this.userid != this.courseUserid && this.role != "1") {
  7746. this.updateWork2();
  7747. } else {
  7748. this.updateWork();
  7749. }
  7750. this.steps++;
  7751. }
  7752. }
  7753. }
  7754. // } else {
  7755. // if (this.steps == 1) {
  7756. // if (this.courseName != "") {
  7757. // if (this.cid == "" || this.cid == undefined) {
  7758. // this.addWork();
  7759. // } else {
  7760. // if (this.userid != this.courseUserid && this.role != "1") {
  7761. // // this.updateWork2();
  7762. // } else {
  7763. // this.updateWork();
  7764. // }
  7765. // }
  7766. // this.steps++;
  7767. // } else {
  7768. // this.$message.error("请补充填写课程名称");
  7769. // return;
  7770. // }
  7771. // } else if (this.steps == 2) {
  7772. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  7773. // this.cTemplate = this.templateC.content;
  7774. // }
  7775. // this.dialogVisible2 = false;
  7776. // this.steps++;
  7777. // setTimeout(() => {
  7778. // this.checkEva(this.checkId);
  7779. // setTimeout(() => {
  7780. // this.checkEva(this.checkId);
  7781. // }, 100);
  7782. // }, 1000);
  7783. // } else if (this.steps == 3) {
  7784. // if (this.cid == "" || this.cid == undefined) {
  7785. // if (this.courseName == "") {
  7786. // this.$message.error("请补充填写课程名称");
  7787. // return;
  7788. // } else {
  7789. // this.addWork();
  7790. // this.steps++;
  7791. // }
  7792. // } else {
  7793. // if (this.courseName == "") {
  7794. // this.$message.error("请补充填写课程名称");
  7795. // return;
  7796. // } else {
  7797. // if (this.userid != this.courseUserid && this.role != "1") {
  7798. // this.updateWork2();
  7799. // } else {
  7800. // this.updateWork();
  7801. // }
  7802. // this.steps++;
  7803. // }
  7804. // }
  7805. // }
  7806. // }
  7807. this.$refs.stepBox.scrollTop = 0;
  7808. },
  7809. unitSet(i) {
  7810. if (this.unitIndex == i) {
  7811. return;
  7812. }
  7813. this.unitIndex = i;
  7814. this.isClickColor = 1;
  7815. // this.$refs.rightboxR.scrollTop = 0;
  7816. this.$refs.unitBox.scrollTop = 0;
  7817. },
  7818. panUnitJson() {
  7819. let _unitIndex = this.unitIndex;
  7820. let cPan = 1;
  7821. for (
  7822. var j = 0;
  7823. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7824. j++
  7825. ) {
  7826. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  7827. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7828. j
  7829. ].proVisible2 = false;
  7830. if (
  7831. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7832. .length > 1
  7833. ) {
  7834. for (
  7835. var z = 0;
  7836. z <
  7837. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7838. .length;
  7839. z++
  7840. ) {
  7841. if (
  7842. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  7843. z
  7844. ].tool.length
  7845. ) {
  7846. this.$message.error("请把工具添加完整");
  7847. cPan = 2;
  7848. break;
  7849. }
  7850. }
  7851. }
  7852. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7853. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7854. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7855. (ele) => {
  7856. return ele.value != "";
  7857. }
  7858. );
  7859. }
  7860. }
  7861. return cPan;
  7862. },
  7863. unitOpen(i) {
  7864. if (this.unitJson[i].toolOpen) {
  7865. this.unitJson[i].toolOpen = false;
  7866. } else {
  7867. this.unitJson[i].toolOpen = true;
  7868. }
  7869. this.updateWork();
  7870. this.$forceUpdate();
  7871. },
  7872. unitSet2(i) {
  7873. if (this.panUnitJson() == 2) {
  7874. return;
  7875. }
  7876. // if(this.unitJson[i].toolOpen){
  7877. // this.unitJson[i].toolOpen = false
  7878. // this.updateWork()
  7879. // this.$forceUpdate()
  7880. // return
  7881. // }else {
  7882. this.unitJson[i].toolOpen = true;
  7883. // }
  7884. this.$forceUpdate();
  7885. if (this.unitIndex == i) {
  7886. return;
  7887. }
  7888. this.unitIndex = i;
  7889. this.isClickColor = 1;
  7890. // this.$refs.rightboxR.scrollTop = 0;
  7891. this.$refs.unitBox.scrollTop = 0;
  7892. },
  7893. updateCourseState(i) {
  7894. let params = [
  7895. {
  7896. cid: this.cid,
  7897. state: i,
  7898. },
  7899. ];
  7900. this.ajax
  7901. .post(this.$store.state.api + "updateCourseMode", params)
  7902. .then((res) => {
  7903. this.courseState = i;
  7904. })
  7905. .catch((err) => {
  7906. this.$message.error("网络不佳");
  7907. console.error(err);
  7908. });
  7909. },
  7910. addtips(){
  7911. let params = [
  7912. {
  7913. cid: this.cid,
  7914. tips: JSON.stringify(this.aiJson),
  7915. tid: this.templateid
  7916. },
  7917. ];
  7918. this.ajax
  7919. .post(this.$store.state.api + "addTips", params)
  7920. .then((res) => {
  7921. })
  7922. .catch((err) => {
  7923. this.$message.error("网络不佳");
  7924. console.error(err);
  7925. });
  7926. },
  7927. openSaveTips(){
  7928. this.dialogVisibleTips = true
  7929. },
  7930. time() {
  7931. if (!this.now) {
  7932. this.now = new Date().getTime();
  7933. return true;
  7934. } else {
  7935. let time = new Date().getTime();
  7936. if (time - this.now > 3000) {
  7937. this.now = time;
  7938. return true;
  7939. } else {
  7940. return false;
  7941. }
  7942. }
  7943. },
  7944. deleteUnit(i) {
  7945. var _this = this;
  7946. if (i == 0 && _this.unitJson.length == 1) {
  7947. _this
  7948. .$confirm("确定切换成任务模式吗?", "提示", {
  7949. confirmButtonText: "确定",
  7950. cancelButtonText: "取消",
  7951. type: "warning",
  7952. })
  7953. .then(() => {
  7954. _this.unitJson[i].dyName = "";
  7955. // _this.updateCourseState(2);
  7956. })
  7957. .catch(() => {
  7958. return;
  7959. });
  7960. } else {
  7961. _this
  7962. .$confirm("确定删除此阶段吗?", "提示", {
  7963. confirmButtonText: "确定",
  7964. cancelButtonText: "取消",
  7965. type: "warning",
  7966. })
  7967. .then(() => {
  7968. _this.isDelete = 2;
  7969. // _this.unitIndex = _this.unitIndex - 1;
  7970. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  7971. // _this.$message.success("删除成功");
  7972. })
  7973. .catch(() => {
  7974. return;
  7975. });
  7976. }
  7977. },
  7978. deleteWork(chapid) {
  7979. let params = [
  7980. {
  7981. cid: this.cid,
  7982. chapters: JSON.stringify(this.unitJson),
  7983. uid: this.userid,
  7984. chapid: chapid,
  7985. },
  7986. ];
  7987. this.ajax
  7988. .post(this.$store.state.api + "deleteWork", params)
  7989. .then((res) => {
  7990. this.$message({
  7991. message: "删除成功",
  7992. type: "success",
  7993. });
  7994. let task = JSON.parse(
  7995. JSON.stringify(
  7996. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  7997. )
  7998. );
  7999. this.unitJson.splice(this.unitIndex, 1);
  8000. if (this.unitIndex == 0) {
  8001. this.unitIndex = 0;
  8002. } else {
  8003. this.unitIndex = this.unitIndex - 1;
  8004. }
  8005. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8006. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8007. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8008. ...task,
  8009. ];
  8010. }
  8011. })
  8012. .catch((err) => {
  8013. this.$message.error("网络不佳");
  8014. console.error(err);
  8015. });
  8016. },
  8017. deleteTool(itemTaskIndex, i) {
  8018. var _this = this;
  8019. if (_this.time()) {
  8020. _this
  8021. .$confirm("确定删除此工具吗?", "提示", {
  8022. confirmButtonText: "确定",
  8023. cancelButtonText: "取消",
  8024. type: "warning",
  8025. })
  8026. .then(() => {
  8027. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8028. itemTaskIndex
  8029. ].toolChoose.splice(i, 1);
  8030. _this.$message.success("删除成功");
  8031. })
  8032. .catch(() => {
  8033. return;
  8034. });
  8035. }
  8036. },
  8037. deleteSentence(i) {
  8038. var _this = this;
  8039. _this
  8040. .$confirm("确定删除此题目吗?", "提示", {
  8041. confirmButtonText: "确定",
  8042. cancelButtonText: "取消",
  8043. type: "warning",
  8044. })
  8045. .then(() => {
  8046. _this.sentenceList.splice(i, 1);
  8047. _this.$message.success("删除成功");
  8048. })
  8049. .catch(() => {
  8050. return;
  8051. });
  8052. },
  8053. deleteS(s, i, j) {
  8054. this.sentenceList[i].addSentence.splice(j, 1);
  8055. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8056. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8057. this.sentenceList[i].rightAnswer.splice(a, 1);
  8058. }
  8059. },
  8060. openT() {
  8061. top.postMessage({ tools: "25" }, "*");
  8062. },
  8063. deleteTask(i) {
  8064. var _this = this;
  8065. if (_this.time()) {
  8066. _this
  8067. .$confirm(
  8068. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8069. 1 ==
  8070. i
  8071. ? "确定删除此任务吗?"
  8072. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8073. "提示",
  8074. {
  8075. confirmButtonText: "确定",
  8076. cancelButtonText: "取消",
  8077. type: "warning",
  8078. }
  8079. )
  8080. .then(() => {
  8081. if (i == 0 && _this.courseState == 4) {
  8082. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8083. i + 1
  8084. ].chapterData = JSON.parse(
  8085. JSON.stringify(
  8086. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8087. .chapterData
  8088. )
  8089. );
  8090. }
  8091. _this.$forceUpdate();
  8092. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8093. i,
  8094. 1
  8095. );
  8096. _this.$message.success("删除成功");
  8097. })
  8098. .catch(() => {
  8099. return;
  8100. });
  8101. }
  8102. },
  8103. deleteTask2(i) {
  8104. var _this = this;
  8105. if (_this.time()) {
  8106. _this
  8107. .$confirm(
  8108. "确定删除此任务吗?",
  8109. "提示",
  8110. {
  8111. confirmButtonText: "确定",
  8112. cancelButtonText: "取消",
  8113. type: "warning",
  8114. }
  8115. )
  8116. .then(() => {
  8117. if (i == 0 && _this.courseState == 4) {
  8118. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8119. i + 1
  8120. ].chapterData = JSON.parse(
  8121. JSON.stringify(
  8122. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8123. .chapterData
  8124. )
  8125. );
  8126. }
  8127. _this.$forceUpdate();
  8128. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8129. i,
  8130. 1
  8131. );
  8132. _this.$message.success("删除成功");
  8133. })
  8134. .catch(() => {
  8135. return;
  8136. });
  8137. }
  8138. },
  8139. handlePictureCardPreview(file) {
  8140. this.dialogImageUrl = file.url;
  8141. },
  8142. clean(i, c) {
  8143. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8144. },
  8145. handle_remove1(file, fileList, type) {
  8146. var _tmp = this.cover;
  8147. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8148. // if (_tmp[i].uid == file.uid) {
  8149. // _tmp.splice(i, 1);
  8150. // break;
  8151. // }
  8152. // this.cover = _tmp;
  8153. // }
  8154. this.cover = [];
  8155. this.noneBtnImg = this.cover.length >= 1;
  8156. this.isSysPic = false;
  8157. this.isSysPic2 = false;
  8158. this.$forceUpdate();
  8159. },
  8160. addImg(e) {
  8161. var el = e.currentTarget;
  8162. el.getElementsByTagName("input")[0].click();
  8163. e.target.value = "";
  8164. },
  8165. addChaptersTools(i) {
  8166. this.chapTools = [
  8167. {
  8168. tools: [],
  8169. toolDetail: "",
  8170. },
  8171. ];
  8172. this.chapCount = i;
  8173. this.dialogVisible4 = true;
  8174. },
  8175. isNoFinsh() {
  8176. this.$message.warning("功能正在开发中");
  8177. },
  8178. addAttText(i) {
  8179. this.AttText = {
  8180. title: "",
  8181. text: "",
  8182. };
  8183. this.taskCount = i;
  8184. this.AttTextType = 0;
  8185. this.$forceUpdate();
  8186. this.dialogVisible6 = true;
  8187. setTimeout(() => {
  8188. this.$refs["fuInput"].focus();
  8189. }, 100);
  8190. },
  8191. openLine(i) {
  8192. this.line = "";
  8193. this.lineCount = i;
  8194. this.lineType = 0;
  8195. this.$forceUpdate();
  8196. this.dialogVisible7 = true;
  8197. },
  8198. pasteLine(i) {
  8199. navigator.clipboard
  8200. .readText()
  8201. .then((v) => {
  8202. console.log("获取剪贴板成功:", v);
  8203. const html = v;
  8204. const regex = /src="(.*?)"/g;
  8205. const match = regex.exec(html);
  8206. if (match && match[1]) {
  8207. console.log(match[1]);
  8208. this.$message.success("粘贴成功");
  8209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8210. i
  8211. ].chapterData.unshift({
  8212. name: "链接",
  8213. title: "嵌入代码",
  8214. url: match[1],
  8215. type: 8,
  8216. });
  8217. } else {
  8218. // console.log("未找到包含 src 属性的 iframe");
  8219. this.$message.error(
  8220. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8221. );
  8222. }
  8223. })
  8224. .catch((v) => {
  8225. console.log("获取剪贴板失败: ", v);
  8226. });
  8227. },
  8228. openSource(i) {
  8229. this.lineCount = i;
  8230. this.sourceData = {};
  8231. this.dialogVisibleSource = true;
  8232. this.updateSourcePan = false;
  8233. },
  8234. openAiCreate(i){
  8235. this.lineCount = i;
  8236. this.dialogVisibleAiCreate = true;
  8237. },
  8238. createAiPpt(json){
  8239. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8240. this.dialogVisibleAiCreate = false;
  8241. },
  8242. openAiCreateVideo(i){
  8243. this.lineCount = i;
  8244. this.dialogVisibleAiCreateVideo = true;
  8245. },
  8246. createAiVideo(json){
  8247. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8248. // this.dialogVisibleAiCreateVideo = false;
  8249. },
  8250. async createTeacherAn(index){
  8251. this.lineCount = index;
  8252. this.loading = true
  8253. let md = new MarkdownIt();
  8254. if(this.courseState == 4){
  8255. if(index == 0 || index){
  8256. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8257. let name = _task.task+'-教案'
  8258. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8259. await this.generate(name, _html, 0)
  8260. }else {
  8261. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8262. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8263. let name = _task.task+'-教案'
  8264. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8265. await this.generate(name, _html, 0)
  8266. }
  8267. }
  8268. }else if(this.courseState == 5){
  8269. if(index == 0 || index){
  8270. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8271. let name = _task.task+'-教案'
  8272. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8273. await this.generate(name, _html, index)
  8274. }else {
  8275. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8276. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8277. let name = _task.task+'-教案'
  8278. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8279. await this.generate(name, _html, i)
  8280. }
  8281. }
  8282. }
  8283. },
  8284. async generate(a, html, index) {
  8285. // 将html文件中需要用到的数据挂载到store上
  8286. const content = `<!DOCTYPE html>
  8287. <html lang="en">
  8288. <head>
  8289. <meta charset="UTF-8">
  8290. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8291. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8292. <title>${a}</title>
  8293. <style>
  8294. table {
  8295. border-collapse: collapse; /* 折叠边框 */
  8296. width: 100%;
  8297. }
  8298. th, td {
  8299. border: 1px solid black; /* 线条样式 */
  8300. padding: 8px;
  8301. text-align: left;
  8302. }
  8303. </style>
  8304. </head>
  8305. <body>
  8306. ${html}
  8307. </body>
  8308. </html>`;
  8309. // debugger
  8310. let dname = a + ".doc";
  8311. // 创建文件流
  8312. // 创建bolb实例时,内容一定要放在[]中
  8313. const blob = new Blob([content], {
  8314. type: "text/plain;charset='utf-8'",
  8315. });
  8316. const file = new File([blob], dname, { type: 'application/msword' });
  8317. await this.beforeUploadHtml(file, index)
  8318. },
  8319. beforeUploadHtml(event, index) {
  8320. var file = event;
  8321. var credentials = {
  8322. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8323. secretAccessKey: "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",
  8324. }; //秘钥形式的登录上传
  8325. window.AWS.config.update(credentials);
  8326. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8327. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8328. var _this = this;
  8329. if (file) {
  8330. var params = {
  8331. Key:
  8332. file.name.split(".")[0] +
  8333. new Date().getTime() +
  8334. "." +
  8335. file.name.split(".")[file.name.split(".").length - 1],
  8336. ContentType: file.type,
  8337. Body: file,
  8338. "Access-Control-Allow-Credentials": "*",
  8339. ACL: "public-read",
  8340. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8341. var options = {
  8342. partSize: 2048 * 1024 * 1024,
  8343. queueSize: 2,
  8344. leavePartsOnError: true,
  8345. };
  8346. bucket
  8347. .upload(params, options)
  8348. .on("httpUploadProgress", function (evt) {
  8349. //这里可以写进度条
  8350. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8351. })
  8352. .send(function (err, data) {
  8353. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8354. _this.loading = false
  8355. }
  8356. if(_this.courseState == 5){
  8357. _this.loading = false
  8358. }
  8359. if (err) {
  8360. _this.$message.error("上传失败");
  8361. } else {
  8362. let _index = 0
  8363. if(_this.lineCount == 0 || _this.lineCount){
  8364. _index = _this.lineCount
  8365. }else {
  8366. _index = index
  8367. }
  8368. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8369.                   name: file.name,
  8370.                   url: data.Location,
  8371.                   type: 3,
  8372.                 })
  8373. console.log(data.Location);
  8374. }
  8375. });
  8376. }
  8377. },
  8378. async generate2(a, html, index, callback) {
  8379. // 将html文件中需要用到的数据挂载到store上
  8380. const content = `<!DOCTYPE html>
  8381. <html lang="en">
  8382. <head>
  8383. <meta charset="UTF-8">
  8384. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8385. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8386. <title>${a}</title>
  8387. <style>
  8388. table {
  8389. border-collapse: collapse; /* 折叠边框 */
  8390. width: 100%;
  8391. }
  8392. th, td {
  8393. border: 1px solid black; /* 线条样式 */
  8394. padding: 8px;
  8395. text-align: left;
  8396. }
  8397. </style>
  8398. </head>
  8399. <body>
  8400. ${html}
  8401. </body>
  8402. </html>`;
  8403. // debugger
  8404. let dname = a + ".doc";
  8405. // 创建文件流
  8406. // 创建bolb实例时,内容一定要放在[]中
  8407. const blob = new Blob([content], {
  8408. type: "text/plain;charset='utf-8'",
  8409. });
  8410. const file = new File([blob], dname, { type: 'application/msword' });
  8411. await this.beforeUploadHtml2(file, index, callback)
  8412. },
  8413. beforeUploadHtml2(event, index, callback) {
  8414. var file = event;
  8415. var credentials = {
  8416. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8417. secretAccessKey: "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",
  8418. }; //秘钥形式的登录上传
  8419. window.AWS.config.update(credentials);
  8420. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8421. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8422. var _this = this;
  8423. if (file) {
  8424. var params = {
  8425. Key:
  8426. file.name.split(".")[0] +
  8427. new Date().getTime() +
  8428. "." +
  8429. file.name.split(".")[file.name.split(".").length - 1],
  8430. ContentType: file.type,
  8431. Body: file,
  8432. "Access-Control-Allow-Credentials": "*",
  8433. ACL: "public-read",
  8434. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8435. var options = {
  8436. partSize: 2048 * 1024 * 1024,
  8437. queueSize: 2,
  8438. leavePartsOnError: true,
  8439. };
  8440. bucket
  8441. .upload(params, options)
  8442. .on("httpUploadProgress", function (evt) {
  8443. //这里可以写进度条
  8444. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8445. })
  8446. .send(async function (err, data) {
  8447. if(_this.courseState == 5){
  8448. _this.loading = false
  8449. }
  8450. if (err) {
  8451. callback ? callback() : ''
  8452. _this.$message.error("上传失败");
  8453. } else {
  8454. let fileid = await _this.createFileid(data.Location)
  8455. // _this.cankaoInfoData.push({
  8456. //                   name: file.name,
  8457. //                   url: data.Location,
  8458. //                   type: 3,
  8459. // fileid: fileid,
  8460. //   })
  8461. _this.infoData2.push({
  8462.                   name: file.name,
  8463.                   url: data.Location,
  8464.                   type: 3,
  8465. fileid: fileid,
  8466.   })
  8467. console.log(data.Location);
  8468. callback ? callback() : ''
  8469. }
  8470. });
  8471. }
  8472. },
  8473. addSource() {
  8474. if (!Object.keys(this.sourceData).length) {
  8475. this.$message.error("请选择要上传的资源");
  8476. return;
  8477. }
  8478. let keys = Object.keys(this.sourceData);
  8479. for (var i = 0; i < keys.length; i++) {
  8480. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8481. this.lineCount
  8482. ].chapterData.unshift({
  8483. name: "链接",
  8484. title: this.sourceData[keys[i]].name,
  8485. url: this.sourceData[keys[i]].url,
  8486. type: 14,
  8487. id: keys[i],
  8488. });
  8489. }
  8490. this.$forceUpdate();
  8491. this.dialogVisibleSource = false;
  8492. },
  8493. updateSource() {
  8494. if (!Object.keys(this.sourceData).length) {
  8495. this.$message.error("请选择要上传的资源");
  8496. return;
  8497. }
  8498. let keys = Object.keys(this.sourceData);
  8499. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8500. this.taskCount
  8501. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  8502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8503. this.taskCount
  8504. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  8505. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8506. this.taskCount
  8507. ].chapterData[this.lineCount].id = keys[0];
  8508. this.updateSourcePan = false;
  8509. this.$forceUpdate();
  8510. this.dialogVisibleSource = false;
  8511. },
  8512. deleteM(i, j) {
  8513. this.testJson.testJson[i].timuList.splice(j, 1);
  8514. },
  8515. beforeUploadTiMu(event, i) {
  8516. const loading = this.openLoading();
  8517. var file = event.target.files[0];
  8518. var credentials = {
  8519. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8520. secretAccessKey: "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",
  8521. }; //秘钥形式的登录上传
  8522. window.AWS.config.update(credentials);
  8523. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8524. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8525. var _this = this;
  8526. if (file) {
  8527. var params = {
  8528. Key:
  8529. file.name.split(".")[0] +
  8530. new Date().getTime() +
  8531. "." +
  8532. file.name.split(".")[file.name.split(".").length - 1],
  8533. ContentType: file.type,
  8534. Body: file,
  8535. "Access-Control-Allow-Credentials": "*",
  8536. ACL: "public-read",
  8537. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8538. var options = {
  8539. partSize: 2048 * 1024 * 1024,
  8540. queueSize: 2,
  8541. leavePartsOnError: true,
  8542. };
  8543. bucket
  8544. .upload(params, options)
  8545. .on("httpUploadProgress", function (evt) {
  8546. //这里可以写进度条
  8547. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8548. })
  8549. .send(function (err, data) {
  8550. loading.close();
  8551. if (err) {
  8552. _this.$message.error("上传失败");
  8553. } else {
  8554. if (_this.testJson.testJson[i].timuList) {
  8555. _this.testJson.testJson[i].timuList.push({
  8556. src: data.Location,
  8557. });
  8558. } else {
  8559. _this.testJson.testJson[i].timuList = [];
  8560. _this.testJson.testJson[i].timuList.push({
  8561. src: data.Location,
  8562. });
  8563. }
  8564. _this.imgChange3(i);
  8565. _this.$forceUpdate();
  8566. }
  8567. });
  8568. }
  8569. },
  8570. beforeUploadTi(event, i, j) {
  8571. const loading = this.openLoading();
  8572. var file = event.target.files[0];
  8573. var credentials = {
  8574. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8575. secretAccessKey: "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",
  8576. }; //秘钥形式的登录上传
  8577. window.AWS.config.update(credentials);
  8578. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8579. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8580. var _this = this;
  8581. if (file) {
  8582. var params = {
  8583. Key:
  8584. file.name.split(".")[0] +
  8585. new Date().getTime() +
  8586. "." +
  8587. file.name.split(".")[file.name.split(".").length - 1],
  8588. ContentType: file.type,
  8589. Body: file,
  8590. "Access-Control-Allow-Credentials": "*",
  8591. ACL: "public-read",
  8592. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8593. var options = {
  8594. partSize: 2048 * 1024 * 1024,
  8595. queueSize: 2,
  8596. leavePartsOnError: true,
  8597. };
  8598. bucket
  8599. .upload(params, options)
  8600. .on("httpUploadProgress", function (evt) {
  8601. //这里可以写进度条
  8602. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8603. })
  8604. .send(function (err, data) {
  8605. loading.close();
  8606. if (err) {
  8607. _this.$message.error("上传失败");
  8608. } else {
  8609. _this.testJson.testJson[i].checkList[j] = {};
  8610. _this.testJson.testJson[i].checkList[j].src = data.Location;
  8611. _this.testJson.testJson[i].checkList[j].imgType = 1;
  8612. _this.imgChange2(i, j);
  8613. _this.$forceUpdate();
  8614. }
  8615. });
  8616. }
  8617. },
  8618. beforeUpload1(event, type) {
  8619. // const loading = this.openLoading();
  8620. var file = event.target.files[0];
  8621. var credentials = {
  8622. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8623. secretAccessKey: "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",
  8624. }; //秘钥形式的登录上传
  8625. window.AWS.config.update(credentials);
  8626. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8627. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8628. var _this = this;
  8629. if (file) {
  8630. var params = {
  8631. Key:
  8632. file.name.split(".")[0] +
  8633. new Date().getTime() +
  8634. "." +
  8635. file.name.split(".")[file.name.split(".").length - 1],
  8636. ContentType: file.type,
  8637. Body: file,
  8638. "Access-Control-Allow-Credentials": "*",
  8639. ACL: "public-read",
  8640. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8641. var options = {
  8642. partSize: 2048 * 1024 * 1024,
  8643. queueSize: 2,
  8644. leavePartsOnError: true,
  8645. };
  8646. bucket
  8647. .upload(params, options)
  8648. .on("httpUploadProgress", function (evt) {
  8649. //这里可以写进度条
  8650. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8651. })
  8652. .send(function (err, data) {
  8653. // loading.close();
  8654. if (err) {
  8655. // var a = _this.$refs.upload1.uploadFiles;
  8656. // a.splice(a.length - 1, a.length);
  8657. _this.$message.error("上传失败");
  8658. } else {
  8659. // _this.cover.push({
  8660. // name: file.name,
  8661. // url: data.Location,
  8662. // uid: file.uid,
  8663. // });
  8664. _this.cover = [
  8665. {
  8666. name: file.name,
  8667. url: data.Location,
  8668. uid: file.uid,
  8669. },
  8670. ];
  8671. _this.imgChange1(null, null, 1, null);
  8672. _this.choosePicVisible = false;
  8673. console.log(data.Location);
  8674. }
  8675. });
  8676. }
  8677. },
  8678. beforeUploadSelect(event, type) {
  8679. // const loading = this.openLoading();
  8680. var file = event.target.files[0];
  8681. var credentials = {
  8682. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8683. secretAccessKey: "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",
  8684. }; //秘钥形式的登录上传
  8685. window.AWS.config.update(credentials);
  8686. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8687. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8688. var _this = this;
  8689. if (file) {
  8690. var params = {
  8691. Key:
  8692. file.name.split(".")[0] +
  8693. new Date().getTime() +
  8694. "." +
  8695. file.name.split(".")[file.name.split(".").length - 1],
  8696. ContentType: file.type,
  8697. Body: file,
  8698. "Access-Control-Allow-Credentials": "*",
  8699. ACL: "public-read",
  8700. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8701. var options = {
  8702. partSize: 2048 * 1024 * 1024,
  8703. queueSize: 2,
  8704. leavePartsOnError: true,
  8705. };
  8706. bucket
  8707. .upload(params, options)
  8708. .on("httpUploadProgress", function (evt) {
  8709. //这里可以写进度条
  8710. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8711. })
  8712. .send(function (err, data) {
  8713. // loading.close();
  8714. if (err) {
  8715. _this.$message.error("上传失败");
  8716. } else {
  8717. _this.selectJson.url = data.Location;
  8718. console.log(data.Location);
  8719. }
  8720. });
  8721. }
  8722. },
  8723. chooseSysPic(p) {
  8724. this.cover = [];
  8725. setTimeout(() => {
  8726. this.cover[0] = {
  8727. name: "系统图片.png",
  8728. url: p,
  8729. };
  8730. this.imgChange1(null, null, 1, null);
  8731. this.$forceUpdate();
  8732. }, 0);
  8733. this.isSysPic = true;
  8734. this.isSysPic2 = false;
  8735. this.sysPicVisible = false;
  8736. this.$forceUpdate();
  8737. },
  8738. chooseSysPic2(p) {
  8739. this.cover = [];
  8740. setTimeout(() => {
  8741. this.cover[0] = {
  8742. name: "网络图片.png",
  8743. url: p,
  8744. };
  8745. this.imgChange1(null, null, 1, null);
  8746. this.$forceUpdate();
  8747. }, 0);
  8748. this.isSysPic2 = true;
  8749. this.isSysPic = false;
  8750. this.sysPicVisible2 = false;
  8751. this.$forceUpdate();
  8752. },
  8753. beforeUpload(data) {
  8754. this.$refs.upload1.uploadFiles;
  8755. this.uploadLoading1 = true;
  8756. var file = data.file;
  8757. var credentials = {
  8758. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8759. secretAccessKey: "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",
  8760. }; //秘钥形式的登录上传
  8761. window.AWS.config.update(credentials);
  8762. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8763. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8764. var _this = this;
  8765. if (file) {
  8766. var params = {
  8767. Key:
  8768. file.name.split(".")[0] +
  8769. new Date().getTime() +
  8770. "." +
  8771. file.name.split(".")[file.name.split(".").length - 1],
  8772. ContentType: file.type,
  8773. Body: file,
  8774. "Access-Control-Allow-Credentials": "*",
  8775. ACL: "public-read",
  8776. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8777. var options = {
  8778. partSize: 2048 * 1024 * 1024,
  8779. queueSize: 2,
  8780. leavePartsOnError: true,
  8781. };
  8782. bucket
  8783. .upload(params, options)
  8784. .on("httpUploadProgress", function (evt) {
  8785. //这里可以写进度条
  8786. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8787. })
  8788. .send(function (err, data) {
  8789. _this.uploadLoading1 = false;
  8790. if (err) {
  8791. // var a = _this.$refs.upload1.uploadFiles;
  8792. // a.splice(a.length - 1, a.length);
  8793. _this.$message.error("上传失败");
  8794. } else {
  8795. //上传成功处理
  8796. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  8797. name: file.name,
  8798. url: data.Location,
  8799. uid: file.uid,
  8800. });
  8801. _this.imgChange();
  8802. console.log(data.Location);
  8803. }
  8804. });
  8805. }
  8806. },
  8807. onExceed() {
  8808. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  8809. },
  8810. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  8811. // const loading = this.openLoading();
  8812. var file = event.target.files[0];
  8813. var credentials = {
  8814. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8815. secretAccessKey: "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",
  8816. }; //秘钥形式的登录上传
  8817. window.AWS.config.update(credentials);
  8818. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8819. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8820. var _this = this;
  8821. if (type == 3) {
  8822. var b = [
  8823. "DOC",
  8824. "DOCX",
  8825. "DOCM",
  8826. "DOTM",
  8827. "DOTX",
  8828. "PPTX",
  8829. "PPSX",
  8830. "PPT",
  8831. "PPS",
  8832. "PPTM",
  8833. "POTM",
  8834. "PPAM",
  8835. "POTX",
  8836. "PPSM",
  8837. ];
  8838. if (
  8839. b.indexOf(
  8840. file.name
  8841. .split(".")
  8842. [file.name.split(".").length - 1].toLocaleUpperCase()
  8843. ) != -1
  8844. ) {
  8845. if (file.size / 1024 / 1024 > 80) {
  8846. this.$message.error("上传文件大于80兆,请重新选择文件!");
  8847. this.inputShow = true;
  8848. // var a = _this.$refs.upload1.uploadFiles;
  8849. // a.splice(a.length - 1, a.length);
  8850. // loading.close();
  8851. return;
  8852. }
  8853. } else if (
  8854. file.name
  8855. .split(".")
  8856. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  8857. ) {
  8858. if (file.size / 1024 / 1024 > 80) {
  8859. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  8860. this.inputShow = true;
  8861. // var a = _this.$refs.upload1.uploadFiles;
  8862. // a.splice(a.length - 1, a.length);
  8863. // loading.close();
  8864. return;
  8865. }
  8866. }
  8867. }
  8868. this.inputShow = false;
  8869. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8870. itemTaskIndex
  8871. ].progress = 0;
  8872. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8873. itemTaskIndex
  8874. ].proVisible = true;
  8875. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8876. itemTaskIndex
  8877. ].isFinishSize = 0;
  8878. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8879. itemTaskIndex
  8880. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  8881. _this.$forceUpdate();
  8882. if (file) {
  8883. var params = {
  8884. Key:
  8885. file.name.split(".")[0] +
  8886. new Date().getTime() +
  8887. "." +
  8888. file.name.split(".")[file.name.split(".").length - 1],
  8889. ContentType: file.type,
  8890. Body: file,
  8891. "Access-Control-Allow-Credentials": "*",
  8892. ACL: "public-read",
  8893. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8894. var options = {
  8895. partSize: 2048 * 1024 * 1024,
  8896. queueSize: 2,
  8897. leavePartsOnError: true,
  8898. };
  8899. bucket
  8900. .upload(params, options)
  8901. .on("httpUploadProgress", function (evt) {
  8902. //这里可以写进度条
  8903. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8904. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8905. itemTaskIndex
  8906. ].progress = parseInt((evt.loaded / evt.total) * 100);
  8907. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8908. itemTaskIndex
  8909. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  8910. _this.$forceUpdate();
  8911. })
  8912. .send(function (err, data) {
  8913. // loading.close();
  8914. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8915. itemTaskIndex
  8916. ].progress = 100;
  8917. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8918. itemTaskIndex
  8919. ].isFinishSize =
  8920. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8921. itemTaskIndex
  8922. ].isAllSize;
  8923. _this.$forceUpdate();
  8924. setTimeout(() => {
  8925. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8926. itemTaskIndex
  8927. ].proVisible = false;
  8928. _this.$forceUpdate();
  8929. }, 1000);
  8930. _this.inputShow = true;
  8931. if (err) {
  8932. // var a = _this.$refs.upload1.uploadFiles;
  8933. // a.splice(a.length - 1, a.length);
  8934. _this.$message.error("上传失败");
  8935. } else {
  8936. if (type == 13) {
  8937. let _type = 2;
  8938. var imgA = [
  8939. "png",
  8940. "jpg",
  8941. "jpeg",
  8942. "bmp",
  8943. "gif",
  8944. "webp",
  8945. "psd",
  8946. "svg",
  8947. "tiff",
  8948. ];
  8949. var fileA = [
  8950. "PDF",
  8951. "DOC",
  8952. "DOCX",
  8953. "DOCM",
  8954. "DOTM",
  8955. "DOTX",
  8956. "PPTX",
  8957. "PPSX",
  8958. "PPT",
  8959. "PPS",
  8960. "PPTM",
  8961. "POTM",
  8962. "PPAM",
  8963. "POTX",
  8964. "PPSM",
  8965. "XLSX",
  8966. "XLS",
  8967. ];
  8968. var videoA = [
  8969. "AVI",
  8970. "NAVI",
  8971. "MPEG",
  8972. "ASF",
  8973. "MOV",
  8974. "WMV",
  8975. "3GP",
  8976. "RM",
  8977. "RMVB",
  8978. "FLV",
  8979. "F4V",
  8980. "H.264",
  8981. "H.265",
  8982. "REAL VIDEO",
  8983. "MKV",
  8984. "WebM",
  8985. "HDDVD",
  8986. "MP4",
  8987. "MPG",
  8988. "M4V",
  8989. "MGV",
  8990. "OGV",
  8991. "QTM",
  8992. "STR",
  8993. "AMC",
  8994. "DVX",
  8995. "EVO",
  8996. "DAT",
  8997. "OGG",
  8998. "OGM",
  8999. ];
  9000. if (
  9001. fileA.indexOf(
  9002. data.Location.split(".")[
  9003. data.Location.split(".").length - 1
  9004. ].toLocaleUpperCase()
  9005. ) != -1
  9006. ) {
  9007. _type = 3;
  9008. } else if (
  9009. videoA.indexOf(
  9010. data.Location.split(".")[
  9011. data.Location.split(".").length - 1
  9012. ].toLocaleUpperCase()
  9013. ) != -1
  9014. ) {
  9015. _type = 2;
  9016. } else if (
  9017. imgA.indexOf(
  9018. data.Location.split(".")[
  9019. data.Location.split(".").length - 1
  9020. ].toLocaleLowerCase()
  9021. ) != -1
  9022. ) {
  9023. _type = 13;
  9024. } else {
  9025. _type = 12;
  9026. }
  9027. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9028. itemTaskIndex
  9029. ].chapterData.unshift({
  9030. name: file.name,
  9031. url: data.Location,
  9032. uid: file.uid,
  9033. type: _type,
  9034. });
  9035. _this.imgChange1(null, null, _type, itemTaskIndex);
  9036. } else if (type == 2 || type == 3 || type == 12) {
  9037. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9038. itemTaskIndex
  9039. ].chapterData.unshift({
  9040. name: file.name,
  9041. url: data.Location,
  9042. uid: file.uid,
  9043. type: type,
  9044. });
  9045. _this.imgChange1(null, null, type, itemTaskIndex);
  9046. } else if (type == 4) {
  9047. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9048. itemTaskIndex
  9049. ].fileList1.push({
  9050. name: file.name,
  9051. url: data.Location,
  9052. uid: file.uid,
  9053. });
  9054. _this.imgChange1(null, null, type, itemTaskIndex);
  9055. } else if (type == 5) {
  9056. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9057. itemTaskIndex
  9058. ].homeworkList.push({
  9059. name: file.name,
  9060. url: data.Location,
  9061. uid: file.uid,
  9062. });
  9063. _this.imgChange1(null, null, type, itemTaskIndex);
  9064. }
  9065. console.log(data.Location);
  9066. }
  9067. });
  9068. }
  9069. },
  9070. beforeUploadInfo2(event, type) {
  9071. // const loading = this.openLoading();
  9072. var file = event.target.files[0];
  9073. var credentials = {
  9074. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9075. secretAccessKey: "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",
  9076. }; //秘钥形式的登录上传
  9077. window.AWS.config.update(credentials);
  9078. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9079. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9080. var _this = this;
  9081. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9082. if (
  9083. xianObj.indexOf(
  9084. file.name
  9085. .split(".")
  9086. [file.name.split(".").length - 1].toLocaleUpperCase()
  9087. ) == -1
  9088. ) {
  9089. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9090. this.inputShow = true;
  9091. // var a = _this.$refs.upload1.uploadFiles;
  9092. // a.splice(a.length - 1, a.length);
  9093. // loading.close();
  9094. return;
  9095. }
  9096. if (type == 3) {
  9097. var b = [
  9098. "DOC",
  9099. "DOCX",
  9100. "DOCM",
  9101. "DOTM",
  9102. "DOTX",
  9103. "PPTX",
  9104. "PPSX",
  9105. "PPT",
  9106. "PPS",
  9107. "PPTM",
  9108. "POTM",
  9109. "PPAM",
  9110. "POTX",
  9111. "PPSM",
  9112. ];
  9113. if (
  9114. b.indexOf(
  9115. file.name
  9116. .split(".")
  9117. [file.name.split(".").length - 1].toLocaleUpperCase()
  9118. ) != -1
  9119. ) {
  9120. if (file.size / 1024 / 1024 > 80) {
  9121. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9122. this.inputShow = true;
  9123. // var a = _this.$refs.upload1.uploadFiles;
  9124. // a.splice(a.length - 1, a.length);
  9125. // loading.close();
  9126. return;
  9127. }
  9128. } else if (
  9129. file.name
  9130. .split(".")
  9131. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9132. ) {
  9133. if (file.size / 1024 / 1024 > 80) {
  9134. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9135. this.inputShow = true;
  9136. // var a = _this.$refs.upload1.uploadFiles;
  9137. // a.splice(a.length - 1, a.length);
  9138. // loading.close();
  9139. return;
  9140. }
  9141. }
  9142. }
  9143. this.inputShow = false;
  9144. if(type == 14){
  9145. _this.teacherinfoprogress = 0;
  9146. _this.teacherinfoproVisible = true;
  9147. _this.teacherinfoisFinishSize = 0;
  9148. _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9149. }else{
  9150. _this.infoprogress = 0;
  9151. _this.infoproVisible = true;
  9152. _this.infoisFinishSize = 0;
  9153. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9154. }
  9155. _this.$forceUpdate();
  9156. if (file) {
  9157. var params = {
  9158. Key:
  9159. file.name.split(".")[0] +
  9160. new Date().getTime() +
  9161. "." +
  9162. file.name.split(".")[file.name.split(".").length - 1],
  9163. ContentType: file.type,
  9164. Body: file,
  9165. "Access-Control-Allow-Credentials": "*",
  9166. ACL: "public-read",
  9167. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9168. var options = {
  9169. partSize: 2048 * 1024 * 1024,
  9170. queueSize: 2,
  9171. leavePartsOnError: true,
  9172. };
  9173. bucket
  9174. .upload(params, options)
  9175. .on("httpUploadProgress", function (evt) {
  9176. //这里可以写进度条
  9177. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9178. if(type == 14){
  9179. _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9180. _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9181. }else {
  9182. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9183. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9184. }
  9185. _this.$forceUpdate();
  9186. })
  9187. .send(async function (err, data) {
  9188. // loading.close();
  9189. if(type == 14){
  9190. _this.teacherinfoprogress = 100;
  9191. _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9192. }else {
  9193. _this.infoprogress = 100;
  9194. _this.infoisFinishSize = _this.infoisAllSize;
  9195. }
  9196. _this.$forceUpdate();
  9197. _this.inputShow = true;
  9198. if (err) {
  9199. setTimeout(() => {
  9200. if(type == 14){
  9201. _this.teacherinfoproVisible = false;
  9202. }else{
  9203. _this.infoproVisible = false;
  9204. }
  9205. _this.$forceUpdate();
  9206. }, 1000);
  9207. // var a = _this.$refs.upload1.uploadFiles;
  9208. // a.splice(a.length - 1, a.length);
  9209. _this.$message.error("上传失败");
  9210. } else {
  9211. let fileid = await _this.createFileid(data.Location)
  9212. if(fileid){
  9213. if(type == 14){
  9214. _this.teacherinfoproVisible = false;
  9215. }else{
  9216. _this.infoproVisible = false;
  9217. }
  9218. _this.$forceUpdate();
  9219. }
  9220. var imgA = [
  9221. "png",
  9222. "jpg",
  9223. "jpeg",
  9224. "bmp",
  9225. "gif",
  9226. "webp",
  9227. "psd",
  9228. "svg",
  9229. "tiff",
  9230. ];
  9231. var fileA = [
  9232. "PDF",
  9233. "DOC",
  9234. "DOCX",
  9235. "DOCM",
  9236. "DOTM",
  9237. "DOTX",
  9238. "PPTX",
  9239. "PPSX",
  9240. "PPT",
  9241. "PPS",
  9242. "PPTM",
  9243. "POTM",
  9244. "PPAM",
  9245. "POTX",
  9246. "PPSM",
  9247. "XLSX",
  9248. "XLS",
  9249. ];
  9250. var videoA = [
  9251. "AVI",
  9252. "NAVI",
  9253. "MPEG",
  9254. "ASF",
  9255. "MOV",
  9256. "WMV",
  9257. "3GP",
  9258. "RM",
  9259. "RMVB",
  9260. "FLV",
  9261. "F4V",
  9262. "H.264",
  9263. "H.265",
  9264. "REAL VIDEO",
  9265. "MKV",
  9266. "WebM",
  9267. "HDDVD",
  9268. "MP4",
  9269. "MPG",
  9270. "M4V",
  9271. "MGV",
  9272. "OGV",
  9273. "QTM",
  9274. "STR",
  9275. "AMC",
  9276. "DVX",
  9277. "EVO",
  9278. "DAT",
  9279. "OGG",
  9280. "OGM",
  9281. ];
  9282. let _type = 2;
  9283. if (
  9284. fileA.indexOf(
  9285. data.Location.split(".")[
  9286. data.Location.split(".").length - 1
  9287. ].toLocaleUpperCase()
  9288. ) != -1
  9289. ) {
  9290. _type = 3;
  9291. } else if (
  9292. videoA.indexOf(
  9293. data.Location.split(".")[
  9294. data.Location.split(".").length - 1
  9295. ].toLocaleUpperCase()
  9296. ) != -1
  9297. ) {
  9298. _type = 2;
  9299. } else if (
  9300. imgA.indexOf(
  9301. data.Location.split(".")[
  9302. data.Location.split(".").length - 1
  9303. ].toLocaleLowerCase()
  9304. ) != -1
  9305. ) {
  9306. _type = 13;
  9307. } else {
  9308. _type = 12;
  9309. }
  9310. if (type == 13) {
  9311. _this.infoData.push({
  9312. name: file.name,
  9313. url: data.Location,
  9314. uid: file.uid,
  9315. type: _type,
  9316. fileid: fileid,
  9317. });
  9318. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9319. name: file.name,
  9320. url: data.Location,
  9321. uid: file.uid,
  9322. type: _type,
  9323. fileid: fileid,
  9324. })
  9325. }else if (type == 14) {
  9326. _this.teacherInfoData.push({
  9327. name: file.name,
  9328. url: data.Location,
  9329. uid: file.uid,
  9330. type: _type,
  9331. fileid: fileid,
  9332. });
  9333. _this.infoData2.push({
  9334. name: file.name,
  9335. url: data.Location,
  9336. uid: file.uid,
  9337. type: _type,
  9338. fileid: fileid,
  9339. });
  9340. }else if (type == 15) {
  9341. _this.infoData2.push({
  9342. name: file.name,
  9343. url: data.Location,
  9344. uid: file.uid,
  9345. type: _type,
  9346. fileid: fileid,
  9347. });
  9348. _this.infoData.push({
  9349. name: file.name,
  9350. url: data.Location,
  9351. uid: file.uid,
  9352. type: _type,
  9353. fileid: fileid,
  9354. });
  9355. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9356. name: file.name,
  9357. url: data.Location,
  9358. uid: file.uid,
  9359. type: _type,
  9360. fileid: fileid,
  9361. })
  9362. }
  9363. console.log(data.Location);
  9364. console.log(fileid);
  9365. }
  9366. });
  9367. }
  9368. },
  9369. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  9370. // const loading = this.openLoading();
  9371. var file = event.target.files[0];
  9372. var credentials = {
  9373. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9374. secretAccessKey: "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",
  9375. }; //秘钥形式的登录上传
  9376. window.AWS.config.update(credentials);
  9377. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9378. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9379. var _this = this;
  9380. if (type == 3) {
  9381. var b = [
  9382. "DOC",
  9383. "DOCX",
  9384. "DOCM",
  9385. "DOTM",
  9386. "DOTX",
  9387. "PPTX",
  9388. "PPSX",
  9389. "PPT",
  9390. "PPS",
  9391. "PPTM",
  9392. "POTM",
  9393. "PPAM",
  9394. "POTX",
  9395. "PPSM",
  9396. ];
  9397. if (
  9398. b.indexOf(
  9399. file.name
  9400. .split(".")
  9401. [file.name.split(".").length - 1].toLocaleUpperCase()
  9402. ) != -1
  9403. ) {
  9404. if (file.size / 1024 / 1024 > 80) {
  9405. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9406. this.inputShow = true;
  9407. // var a = _this.$refs.upload1.uploadFiles;
  9408. // a.splice(a.length - 1, a.length);
  9409. // loading.close();
  9410. return;
  9411. }
  9412. } else if (
  9413. file.name
  9414. .split(".")
  9415. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9416. ) {
  9417. if (file.size / 1024 / 1024 > 80) {
  9418. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9419. this.inputShow = true;
  9420. // var a = _this.$refs.upload1.uploadFiles;
  9421. // a.splice(a.length - 1, a.length);
  9422. // loading.close();
  9423. return;
  9424. }
  9425. }
  9426. }
  9427. this.inputShow = false;
  9428. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9429. itemTaskIndex
  9430. ].progress = 0;
  9431. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9432. itemTaskIndex
  9433. ].proVisible = true;
  9434. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9435. itemTaskIndex
  9436. ].isFinishSize = 0;
  9437. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9438. itemTaskIndex
  9439. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9440. _this.$forceUpdate();
  9441. if (file) {
  9442. var params = {
  9443. Key:
  9444. file.name.split(".")[0] +
  9445. new Date().getTime() +
  9446. "." +
  9447. file.name.split(".")[file.name.split(".").length - 1],
  9448. ContentType: file.type,
  9449. Body: file,
  9450. "Access-Control-Allow-Credentials": "*",
  9451. ACL: "public-read",
  9452. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9453. var options = {
  9454. partSize: 2048 * 1024 * 1024,
  9455. queueSize: 2,
  9456. leavePartsOnError: true,
  9457. };
  9458. bucket
  9459. .upload(params, options)
  9460. .on("httpUploadProgress", function (evt) {
  9461. //这里可以写进度条
  9462. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9463. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9464. itemTaskIndex
  9465. ].progress = parseInt((evt.loaded / evt.total) * 100);
  9466. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9467. itemTaskIndex
  9468. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9469. _this.$forceUpdate();
  9470. })
  9471. .send(function (err, data) {
  9472. // loading.close();
  9473. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9474. itemTaskIndex
  9475. ].progress = 100;
  9476. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9477. itemTaskIndex
  9478. ].isFinishSize =
  9479. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9480. itemTaskIndex
  9481. ].isAllSize;
  9482. _this.$forceUpdate();
  9483. setTimeout(() => {
  9484. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9485. itemTaskIndex
  9486. ].proVisible = false;
  9487. _this.$forceUpdate();
  9488. }, 1000);
  9489. _this.inputShow = true;
  9490. if (err) {
  9491. // var a = _this.$refs.upload1.uploadFiles;
  9492. // a.splice(a.length - 1, a.length);
  9493. _this.$message.error("上传失败");
  9494. } else {
  9495. if (type == 2 || type == 3) {
  9496. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9497. itemTaskIndex
  9498. ].chapterData.unshift({
  9499. name: file.name,
  9500. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9501. // itemTaskIndex
  9502. // ].chapterData.length+1),
  9503. url: data.Location,
  9504. uid: file.uid,
  9505. type: type,
  9506. text: string,
  9507. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9508. // itemTaskIndex
  9509. // ].chapterData.length + 1),
  9510. });
  9511. _this.imgChange1(null, null, type, itemTaskIndex);
  9512. } else if (type == 4) {
  9513. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9514. itemTaskIndex
  9515. ].fileList1.push({
  9516. name: file.name,
  9517. url: data.Location,
  9518. uid: file.uid,
  9519. });
  9520. _this.imgChange1(null, null, type, itemTaskIndex);
  9521. } else if (type == 5) {
  9522. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9523. itemTaskIndex
  9524. ].homeworkList.push({
  9525. name: file.name,
  9526. url: data.Location,
  9527. uid: file.uid,
  9528. });
  9529. _this.imgChange1(null, null, type, itemTaskIndex);
  9530. }
  9531. console.log(data.Location);
  9532. }
  9533. });
  9534. }
  9535. },
  9536. addunit() {
  9537. this.unitJson.push({
  9538. dyName: "", //单元标题
  9539. isUpdate: 1,
  9540. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  9541. chapterInfo: [
  9542. {
  9543. isread: false,
  9544. chapterid: this.guid(),
  9545. title: "",
  9546. courseName: "",
  9547. taskJson: [
  9548. {
  9549. task: "",
  9550. taskDetail: "",
  9551. chapterData: [],
  9552. toolText: "",
  9553. toolChoose: [
  9554. {
  9555. tool: [],
  9556. toolDetail: "",
  9557. toolType: 0,
  9558. askCount: 1,
  9559. askTitle: "",
  9560. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9561. },
  9562. ],
  9563. isShowTools: false,
  9564. askCount: 1,
  9565. isFold: 1,
  9566. askTitle: "",
  9567. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9568. checkJson: [{ checkCount: [], checkPerent: [] }],
  9569. homeworkList: [],
  9570. },
  9571. ],
  9572. itemCount: 1,
  9573. fileList1: [],
  9574. video: [],
  9575. testData: [],
  9576. pData: [],
  9577. templateArray: [],
  9578. },
  9579. ],
  9580. });
  9581. this.addindex = this.unitJson.length - 1;
  9582. setTimeout(() => {
  9583. this.unitIndex = this.unitJson.length - 1;
  9584. setTimeout(() => {
  9585. console.log(this.$refs.dyInput);
  9586. this.$refs.dyInput[0].focus();
  9587. }, 100);
  9588. this.unitSet(this.unitIndex);
  9589. }, 0);
  9590. },
  9591. addToolFun(itemTaskIndex) {
  9592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9593. itemTaskIndex
  9594. ].toolChoose.push({
  9595. tool: [],
  9596. toolDetail: "",
  9597. toolType: 0,
  9598. askCount: 1,
  9599. askTitle: "",
  9600. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9601. });
  9602. },
  9603. addTaskBorder() {
  9604. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  9605. task: "",
  9606. taskDetail: "",
  9607. chapterData: [],
  9608. toolText: "",
  9609. toolChoose: [
  9610. {
  9611. tool: [],
  9612. toolDetail: "",
  9613. toolType: 0,
  9614. askCount: 1,
  9615. askTitle: "",
  9616. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9617. },
  9618. ],
  9619. isShowTools: false,
  9620. askCount: 1,
  9621. isFold: 1, //任务收起状态
  9622. askTitle: "",
  9623. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9624. checkJson: [{ checkCount: [], checkPerent: [] }],
  9625. homeworkList: [],
  9626. });
  9627. setTimeout(() => {
  9628. this.checkEva(this.checkId);
  9629. setTimeout(() => {
  9630. this.checkEva(this.checkId);
  9631. }, 100);
  9632. }, 100);
  9633. },
  9634. addTaskBorder2(type, index) {
  9635. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  9636. this.$message({
  9637. message: "有大纲在生成请生成完之后才能使用此功能",
  9638. type: "warning"
  9639. });
  9640. return;
  9641. }
  9642. if(type == 1){
  9643. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  9644. task: "",
  9645. isTask2: true,
  9646. isTask3: true,
  9647. taskDetail: "",
  9648. chapterData: [],
  9649. toolText: "",
  9650. toolChoose: [
  9651. {
  9652. tool: [],
  9653. toolDetail: "",
  9654. toolType: 0,
  9655. askCount: 1,
  9656. askTitle: "",
  9657. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9658. },
  9659. ],
  9660. isShowTools: false,
  9661. askCount: 1,
  9662. isFold: 0, //任务收起状态
  9663. askTitle: "",
  9664. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9665. checkJson: [{ checkCount: [], checkPerent: [] }],
  9666. homeworkList: [],
  9667. })
  9668. }else if(type == 2){
  9669. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  9670. task: "",
  9671. isTask2: true,
  9672. isTask3: true,
  9673. taskDetail: "",
  9674. chapterData: [],
  9675. toolText: "",
  9676. toolChoose: [
  9677. {
  9678. tool: [],
  9679. toolDetail: "",
  9680. toolType: 0,
  9681. askCount: 1,
  9682. askTitle: "",
  9683. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9684. },
  9685. ],
  9686. isShowTools: false,
  9687. askCount: 1,
  9688. isFold: 0, //任务收起状态
  9689. askTitle: "",
  9690. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9691. checkJson: [{ checkCount: [], checkPerent: [] }],
  9692. homeworkList: [],
  9693. })
  9694. }
  9695. setTimeout(() => {
  9696. this.checkEva(this.checkId);
  9697. setTimeout(() => {
  9698. this.checkEva(this.checkId);
  9699. }, 100);
  9700. }, 100);
  9701. },
  9702. add(e, i) {
  9703. var el = e.currentTarget;
  9704. el.getElementsByTagName("input")[0].click();
  9705. },
  9706. fold(i, e) {
  9707. if (
  9708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  9709. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  9710. ) {
  9711. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  9712. } else {
  9713. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  9714. }
  9715. },
  9716. fold2(i) {
  9717. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  9718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9719. i
  9720. ].isFold2 = false;
  9721. } else {
  9722. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  9723. }
  9724. this.$forceUpdate();
  9725. },
  9726. foldEva(i) {
  9727. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  9728. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9729. i
  9730. ].isEvaFold = false;
  9731. } else {
  9732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9733. i
  9734. ].isEvaFold = true;
  9735. setTimeout(() => {
  9736. this.checkEva(this.checkId);
  9737. setTimeout(() => {
  9738. this.checkEva(this.checkId);
  9739. }, 500);
  9740. }, 0);
  9741. }
  9742. this.$forceUpdate();
  9743. },
  9744. foldC(i) {
  9745. if (
  9746. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  9747. ) {
  9748. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9749. i
  9750. ].isFoldchapter = false;
  9751. } else {
  9752. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9753. i
  9754. ].isFoldchapter = true;
  9755. }
  9756. this.$forceUpdate();
  9757. },
  9758. fold3(i, ti) {
  9759. if (
  9760. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  9761. .isFold3
  9762. ) {
  9763. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9764. ti
  9765. ].isFold3 = false;
  9766. } else {
  9767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9768. ti
  9769. ].isFold3 = true;
  9770. }
  9771. this.$forceUpdate();
  9772. },
  9773. deleteHomeworkBox(unitIndex, index, i) {
  9774. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  9775. this.taskCount
  9776. ].homeworkList.splice(i, 1);
  9777. },
  9778. getStudent() {
  9779. let params = {
  9780. oid: this.oid,
  9781. cu: "",
  9782. cn: this.searchPeople,
  9783. };
  9784. this.ajax
  9785. .get(this.$store.state.api + "selectStudentAdd", params)
  9786. .then((res) => {
  9787. this.studentJuri = res.data[0];
  9788. })
  9789. .catch((err) => {
  9790. this.isLoading = false;
  9791. console.error(err);
  9792. });
  9793. },
  9794. // 添加协同成员其他选项按钮
  9795. getTeacherCopy(){
  9796. this.CollLoading=true
  9797. this.collid = ''
  9798. this.collid = '1xpz'
  9799. let params = {
  9800. oid:
  9801. this.org && this.org != "undefined" && this.org != "null"
  9802. ? this.org
  9803. : this.oid,
  9804. cu: "",
  9805. cn: this.searchTN,
  9806. coll: ''
  9807. };
  9808. this.ajax
  9809. .get(
  9810. this.$store.state.api +
  9811. (this.org && this.org != "undefined" && this.org != "null"
  9812. ? "selectCollaborativeMembersOrg"
  9813. : "selectCollaborativeMembers"),
  9814. params
  9815. )
  9816. .then((res) => {
  9817. let teacherJuri = res.data[0];
  9818. this.CollaborativeTeaList = res.data[1];
  9819. for (var i = 0; i < teacherJuri.length; i++) {
  9820. if (teacherJuri[i].userid == this.userid) {
  9821. teacherJuri.splice(i, 1);
  9822. break;
  9823. }
  9824. }
  9825. this.teacherJuri = teacherJuri.filter((i,index)=>{
  9826. return (i.cclassid == '' || i.cclassid == null)
  9827. })
  9828. console.log(' this.teacherJuri', this.teacherJuri);
  9829. let _check = [];
  9830. let _check2 = [];
  9831. for (var i = 0; i < this.teacherJuri.length; i++) {
  9832. var gid = this.teacherJuri[i].userid;
  9833. _check.push(gid);
  9834. }
  9835. for (var i = 0; i < this.checkboxList3.length; i++) {
  9836. var _id = this.checkboxList3[i];
  9837. if (_check.indexOf(_id) !== -1) {
  9838. _check2.push(_id);
  9839. }
  9840. }
  9841. if (_check2.length==0 && _check.length==0) {
  9842. }else{
  9843. this.checkAll2 = _check2.length === _check.length;
  9844. }
  9845. this.CollLoading=false
  9846. })
  9847. .catch((err) => {
  9848. console.error(err);
  9849. this.CollLoading=false
  9850. });
  9851. },
  9852. getTeacher(val) {
  9853. this.CollLoading=true
  9854. this.collid = ''
  9855. this.collid = !val ? '' : val
  9856. let params = {
  9857. oid:
  9858. this.org && this.org != "undefined" && this.org != "null"
  9859. ? this.org
  9860. : this.oid,
  9861. cu: "",
  9862. cn: this.searchTN,
  9863. coll: this.collid
  9864. };
  9865. this.ajax
  9866. .get(
  9867. this.$store.state.api +
  9868. (this.org && this.org != "undefined" && this.org != "null"
  9869. ? "selectCollaborativeMembersOrg"
  9870. : "selectCollaborativeMembers"),
  9871. params
  9872. )
  9873. .then((res) => {
  9874. let teacherJuri = res.data[0];
  9875. this.CollaborativeTeaList = res.data[1];
  9876. for (var i = 0; i < teacherJuri.length; i++) {
  9877. if (teacherJuri[i].userid == this.userid) {
  9878. teacherJuri.splice(i, 1);
  9879. break;
  9880. }
  9881. }
  9882. this.teacherJuri = teacherJuri;
  9883. let _check = [];
  9884. let _check2 = [];
  9885. for (var i = 0; i < this.teacherJuri.length; i++) {
  9886. var gid = this.teacherJuri[i].userid;
  9887. _check.push(gid);
  9888. }
  9889. for (var i = 0; i < this.checkboxList3.length; i++) {
  9890. var _id = this.checkboxList3[i];
  9891. if (_check.indexOf(_id) !== -1) {
  9892. _check2.push(_id);
  9893. }
  9894. }
  9895. if (_check2.length==0 && _check.length==0) {
  9896. }else{
  9897. this.checkAll2 = _check2.length === _check.length;
  9898. }
  9899. this.CollLoading=false
  9900. })
  9901. .catch((err) => {
  9902. console.error(err);
  9903. this.CollLoading=false
  9904. });
  9905. },
  9906. searchStudent() {
  9907. this.getStudent();
  9908. },
  9909. selectGrage() {
  9910. let params = {
  9911. oid: this.oid,
  9912. };
  9913. this.ajax
  9914. .get(this.$store.state.api + "selectGrageBySchool", params)
  9915. .then((res) => {
  9916. this.gradeList = res.data[0];
  9917. })
  9918. .catch((err) => {
  9919. this.isLoading = false;
  9920. console.error(err);
  9921. });
  9922. },
  9923. //获取班级列表
  9924. getClass() {
  9925. let params = {
  9926. oid: this.oid,
  9927. gid: this.gradeId,
  9928. cn: this.classSearch,
  9929. };
  9930. this.ajax
  9931. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  9932. .then((res) => {
  9933. if (!this.grade.length) {
  9934. this.grade = res.data[0];
  9935. }
  9936. this.grade2 = res.data[0];
  9937. this.classJuri = res.data[0];
  9938. let _check = [];
  9939. let _check2 = [];
  9940. for (var i = 0; i < this.grade2.length; i++) {
  9941. var gid = this.grade2[i].id;
  9942. _check.push(gid);
  9943. }
  9944. for (var i = 0; i < this.checkboxList2.length; i++) {
  9945. var _id = this.checkboxList2[i];
  9946. if (_check.indexOf(_id) !== -1) {
  9947. _check2.push(_id);
  9948. }
  9949. }
  9950. this.checkAll = _check2.length === _check.length;
  9951. })
  9952. .catch((err) => {
  9953. this.isLoading = false;
  9954. console.error(err);
  9955. });
  9956. },
  9957. CourseType2Change(val) {
  9958. this.pTypeCheck = [];
  9959. for (var i = 0; i < this.CourseType2.length; i++) {
  9960. let typeA = this.CourseType2[i];
  9961. if (val.indexOf(typeA.name) != -1) {
  9962. this.pTypeCheck.push(...typeA.id);
  9963. }
  9964. }
  9965. },
  9966. getChapterData(e, i, j, ic, type) {
  9967. e.stopPropagation();
  9968. this.updataC = true;
  9969. this.icc = ic;
  9970. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  9971. console.log("还不能下载图片喔");
  9972. }
  9973. },
  9974. deleteChapterData(e, i, j, ic, taskI) {
  9975. e.stopPropagation();
  9976. let _this = this;
  9977. _this
  9978. .$confirm("确定删除此项?", "提示", {
  9979. confirmButtonText: "确定",
  9980. cancelButtonText: "取消",
  9981. type: "warning",
  9982. })
  9983. .then(() => {
  9984. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  9985. ic,
  9986. 1
  9987. );
  9988. })
  9989. .catch(() => {
  9990. return;
  9991. });
  9992. },
  9993. checkInfoData(fileid, file){
  9994. let type = 1
  9995. let index = 0
  9996. for(let i = 0; i < this.infoData.length; i++){
  9997. if(this.infoData[i].fileid == fileid){
  9998. type = 2
  9999. index = i
  10000. }
  10001. }
  10002. if(type == 2){
  10003. this.infoData.splice(index, 1)
  10004. }else {
  10005. this.infoData.push({...file})
  10006. }
  10007. },
  10008. deleteInfoData(e, ic) {
  10009. e.stopPropagation();
  10010. let _this = this;
  10011. _this
  10012. .$confirm("确定删除此项?", "提示", {
  10013. confirmButtonText: "确定",
  10014. cancelButtonText: "取消",
  10015. type: "warning",
  10016. })
  10017. .then(() => {
  10018. _this.infoData.splice(
  10019. ic,
  10020. 1
  10021. );
  10022. })
  10023. .catch(() => {
  10024. return;
  10025. });
  10026. },
  10027. deleteInfoData2(e, ic) {
  10028. e.stopPropagation();
  10029. let _this = this;
  10030. _this
  10031. .$confirm("确定删除此项?", "提示", {
  10032. confirmButtonText: "确定",
  10033. cancelButtonText: "取消",
  10034. type: "warning",
  10035. })
  10036. .then(() => {
  10037. _this.infoData2.splice(
  10038. ic,
  10039. 1
  10040. );
  10041. })
  10042. .catch(() => {
  10043. return;
  10044. });
  10045. },
  10046. deleteCankaoInfoData(e, ic) {
  10047. e.stopPropagation();
  10048. let _this = this;
  10049. _this
  10050. .$confirm("确定删除此项?", "提示", {
  10051. confirmButtonText: "确定",
  10052. cancelButtonText: "取消",
  10053. type: "warning",
  10054. })
  10055. .then(() => {
  10056. _this.cankaoInfoData.splice(
  10057. ic,
  10058. 1
  10059. );
  10060. })
  10061. .catch(() => {
  10062. return;
  10063. });
  10064. },
  10065. deleteTeacherInfoData(e, ic) {
  10066. e.stopPropagation();
  10067. let _this = this;
  10068. _this
  10069. .$confirm("确定删除此项?", "提示", {
  10070. confirmButtonText: "确定",
  10071. cancelButtonText: "取消",
  10072. type: "warning",
  10073. })
  10074. .then(() => {
  10075. _this.teacherInfoData.splice(
  10076. ic,
  10077. 1
  10078. );
  10079. })
  10080. .catch(() => {
  10081. return;
  10082. });
  10083. },
  10084. updataVideoT(e, i, j, ic) {
  10085. // e.stopPropagation();
  10086. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10087. // ic
  10088. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10089. this.line =
  10090. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10091. this.taskCount = j;
  10092. this.lineCount = ic;
  10093. this.dialogVisibleupdataVideoT = true;
  10094. this.$forceUpdate();
  10095. },
  10096. checkChpater(e, i, j, ic){
  10097. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10098. if(type == 3){
  10099. var fileA = [
  10100. "DOC",
  10101. "DOCX",
  10102. "DOCM",
  10103. "DOTM",
  10104. "DOTX",
  10105. "PPTX",
  10106. "PPSX",
  10107. "PPT",
  10108. "PPS",
  10109. "PPTM",
  10110. "POTM",
  10111. "PPAM",
  10112. "POTX",
  10113. "PPSM",
  10114. "XLSX",
  10115. "XLS"
  10116. ];
  10117. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10118. if (
  10119. fileA.indexOf(
  10120. url.split(".")[
  10121. url.split(".").length - 1
  10122. ].toLocaleUpperCase()
  10123. ) != -1
  10124. ) {
  10125. this.dialogVisibleOffice = true
  10126. this.wurl = url
  10127. } else if (
  10128. "pdf".indexOf(
  10129. url.split(".")[
  10130. url.split(".").length - 1
  10131. ].toLocaleLowerCase()
  10132. ) != -1
  10133. ) {
  10134. this.dialogVisiblePdf = true
  10135. this.wurl = url
  10136. }
  10137. }
  10138. },
  10139. checkChpater2(e, ic){
  10140. let type = this.infoData2[ic].type
  10141. if(type == 3){
  10142. var fileA = [
  10143. "DOC",
  10144. "DOCX",
  10145. "DOCM",
  10146. "DOTM",
  10147. "DOTX",
  10148. "PPTX",
  10149. "PPSX",
  10150. "PPT",
  10151. "PPS",
  10152. "PPTM",
  10153. "POTM",
  10154. "PPAM",
  10155. "POTX",
  10156. "PPSM",
  10157. "XLSX",
  10158. "XLS"
  10159. ];
  10160. let url = this.infoData2[ic].url
  10161. if (
  10162. fileA.indexOf(
  10163. url.split(".")[
  10164. url.split(".").length - 1
  10165. ].toLocaleUpperCase()
  10166. ) != -1
  10167. ) {
  10168. this.dialogVisibleOffice = true
  10169. this.wurl = url
  10170. } else if (
  10171. "pdf".indexOf(
  10172. url.split(".")[
  10173. url.split(".").length - 1
  10174. ].toLocaleLowerCase()
  10175. ) != -1
  10176. ) {
  10177. this.dialogVisiblePdf = true
  10178. this.wurl = url
  10179. }
  10180. }
  10181. },
  10182. updataVideoC() {
  10183. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10184. this.taskCount
  10185. ].chapterData[this.lineCount].name = JSON.parse(
  10186. JSON.stringify(this.line)
  10187. );
  10188. this.dialogVisibleupdataVideoT = false;
  10189. this.$forceUpdate();
  10190. },
  10191. upCd(e, i, j, taskCount, ic) {
  10192. e.stopPropagation();
  10193. if (ic == 0) {
  10194. return;
  10195. }
  10196. var a = JSON.parse(
  10197. JSON.stringify(
  10198. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10199. ic - 1
  10200. ]
  10201. )
  10202. );
  10203. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  10204. JSON.parse(
  10205. JSON.stringify(
  10206. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10207. )
  10208. );
  10209. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10210. this.$forceUpdate();
  10211. },
  10212. downCd(e, i, j, taskCount, ic) {
  10213. e.stopPropagation();
  10214. if (
  10215. ic ==
  10216. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  10217. 1
  10218. ) {
  10219. return;
  10220. }
  10221. var a = JSON.parse(
  10222. JSON.stringify(
  10223. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10224. ic + 1
  10225. ]
  10226. )
  10227. );
  10228. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  10229. JSON.parse(
  10230. JSON.stringify(
  10231. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10232. )
  10233. );
  10234. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10235. this.$forceUpdate();
  10236. },
  10237. async upTool(e, i, j, tooli) {
  10238. e.stopPropagation();
  10239. if (tooli == 0) {
  10240. return;
  10241. }
  10242. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  10243. let count2 = await this.getWorksCount(3, i, j, tooli);
  10244. if (count1 > 0 || count2 > 0) {
  10245. this.$confirm(
  10246. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10247. "提示",
  10248. {
  10249. confirmButtonText: "确定",
  10250. cancelButtonText: "取消",
  10251. type: "warning",
  10252. }
  10253. )
  10254. .then(() => {
  10255. var a = JSON.parse(
  10256. JSON.stringify(
  10257. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10258. tooli - 1
  10259. ]
  10260. )
  10261. );
  10262. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10263. JSON.parse(
  10264. JSON.stringify(
  10265. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10266. )
  10267. );
  10268. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10269. this.$forceUpdate();
  10270. })
  10271. .catch(() => {
  10272. return;
  10273. });
  10274. } else {
  10275. var a = JSON.parse(
  10276. JSON.stringify(
  10277. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  10278. )
  10279. );
  10280. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10281. JSON.parse(
  10282. JSON.stringify(
  10283. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10284. )
  10285. );
  10286. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10287. this.$forceUpdate();
  10288. }
  10289. },
  10290. async downTool(e, i, j, tooli) {
  10291. e.stopPropagation();
  10292. if (
  10293. tooli ==
  10294. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  10295. ) {
  10296. return;
  10297. }
  10298. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  10299. let count2 = await this.getWorksCount(3, i, j, tooli);
  10300. if (count1 > 0 || count2 > 0) {
  10301. this.$confirm(
  10302. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10303. "提示",
  10304. {
  10305. confirmButtonText: "确定",
  10306. cancelButtonText: "取消",
  10307. type: "warning",
  10308. }
  10309. )
  10310. .then(() => {
  10311. var a = JSON.parse(
  10312. JSON.stringify(
  10313. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10314. tooli + 1
  10315. ]
  10316. )
  10317. );
  10318. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10319. JSON.parse(
  10320. JSON.stringify(
  10321. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10322. )
  10323. );
  10324. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10325. this.$forceUpdate();
  10326. })
  10327. .catch(() => {
  10328. return;
  10329. });
  10330. } else {
  10331. var a = JSON.parse(
  10332. JSON.stringify(
  10333. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  10334. )
  10335. );
  10336. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10337. JSON.parse(
  10338. JSON.stringify(
  10339. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10340. )
  10341. );
  10342. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10343. this.$forceUpdate();
  10344. }
  10345. },
  10346. addWork(type) {
  10347. if(type == 2 && this.courseName == "") {
  10348. this.$message.error("请补充填写课程名称");
  10349. return;
  10350. }
  10351. let cPan = 1;
  10352. for (var i = 0; i < this.unitJson.length; i++) {
  10353. for (
  10354. var j = 0;
  10355. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10356. j++
  10357. ) {
  10358. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10359. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10360. if (
  10361. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10362. ) {
  10363. for (
  10364. var z = 0;
  10365. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10366. z++
  10367. ) {
  10368. if (
  10369. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10370. .length
  10371. ) {
  10372. this.$message.error("请把工具添加完整");
  10373. cPan = 2;
  10374. break;
  10375. }
  10376. }
  10377. }
  10378. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10379. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10380. i
  10381. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10382. return ele.value != "";
  10383. });
  10384. }
  10385. }
  10386. }
  10387. this.inputShow = true;
  10388. if (cPan == 2) {
  10389. this.steps--;
  10390. return;
  10391. }
  10392. for (var i = 0; i < this.unitJson.length; i++) {
  10393. delete this.unitJson[i].isUpdate;
  10394. }
  10395. if(!this.targetCourseText2){
  10396. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  10397. }
  10398. let params = [
  10399. {
  10400. uid: this.userid,
  10401. title: this.courseName,
  10402. brief: this.courseText,
  10403. cover:
  10404. this.cover.length > 0
  10405. ? JSON.stringify(this.cover)
  10406. : JSON.stringify([
  10407. {
  10408. name: "noBanner.jpg",
  10409. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10410. uid: 1656409780264,
  10411. status: "success",
  10412. },
  10413. ]),
  10414. evaId: this.evalua,
  10415. astudent:
  10416. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10417. see: this.isTeacherSee == true ? 1 : 0,
  10418. chapters: JSON.stringify(this.unitJson),
  10419. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  10420. courseType: JSON.stringify(this.courseTypeId),
  10421. ateacher:
  10422. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10423. inviteCode: JSON.stringify(this.inviteCode),
  10424. refile: JSON.stringify(this.infoData),
  10425. reBrief: this.courseText2,
  10426. cpote: JSON.stringify(this.cpote),
  10427. setting: JSON.stringify({
  10428. courseJie: this.courseJie,
  10429. courseTime: this.courseTime,
  10430. teacherInfoData: this.teacherInfoData,
  10431. teacherCourseText: this.teacherCourseText,
  10432. targetCourseText: this.targetCourseText,
  10433. cankaoInfoData: this.cankaoInfoData,
  10434. infoData2: this.infoData2,
  10435. isuseT: this.isuseT,
  10436. mode: this.mode,
  10437. targetCourseText2: this.targetCourseText2,
  10438. }),
  10439. iresearch: this.isFileSearch ? 1 : 2,
  10440. },
  10441. ];
  10442. this.ajax
  10443. .post(this.$store.state.api + "addWorkNew2AI3", params)
  10444. .then((res) => {
  10445. console.log(this.steps);
  10446. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10447. this.$message({
  10448. message: "新增成功",
  10449. type: "success",
  10450. });
  10451. }
  10452. this.number = res.data.ordernumber;
  10453. this.courseId = res.data.courseId;
  10454. this.cid = res.data.courseId;
  10455. this.courseUserid = this.userid;
  10456. this.islogin = true;
  10457. // this.updateCourseState(4);
  10458. this.updateCourseState(5);
  10459. this.addtips()
  10460. if(type == 2){
  10461. this.retrunCourse()
  10462. }
  10463. })
  10464. .catch((err) => {
  10465. this.$message.error("网络不佳");
  10466. console.error(err);
  10467. });
  10468. },
  10469. goCourse() {
  10470. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  10471. },
  10472. updateWork2() {
  10473. let _unitIndex = this.unitIndex;
  10474. let cPan = 1;
  10475. for (
  10476. var j = 0;
  10477. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10478. j++
  10479. ) {
  10480. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10481. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10482. j
  10483. ].proVisible2 = false;
  10484. if (
  10485. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10486. .length > 1
  10487. ) {
  10488. for (
  10489. var z = 0;
  10490. z <
  10491. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10492. .length;
  10493. z++
  10494. ) {
  10495. if (
  10496. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10497. z
  10498. ].tool.length
  10499. ) {
  10500. this.$message.error("请把工具添加完整");
  10501. cPan = 2;
  10502. break;
  10503. }
  10504. }
  10505. }
  10506. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10507. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10508. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10509. (ele) => {
  10510. return ele.value != "";
  10511. }
  10512. );
  10513. }
  10514. }
  10515. this.inputShow = true;
  10516. if (cPan == 2) {
  10517. this.steps--;
  10518. return;
  10519. }
  10520. let params = [
  10521. {
  10522. cid: this.cid,
  10523. chapters: JSON.stringify(this.unitJson),
  10524. uid: this.userid,
  10525. unitIndex: _unitIndex,
  10526. },
  10527. ];
  10528. this.ajax
  10529. .post(this.$store.state.api + "updateWorkNew4", params)
  10530. .then((res) => {
  10531. this.$message({
  10532. message: "修改成功",
  10533. type: "success",
  10534. });
  10535. this.courseId = this.cid;
  10536. this.addtips();
  10537. })
  10538. .catch((err) => {
  10539. this.$message.error("网络不佳");
  10540. console.error(err);
  10541. });
  10542. },
  10543. updateWork3(unitIndex) {
  10544. let _unitIndex = unitIndex;
  10545. let cPan = 1;
  10546. for (
  10547. var j = 0;
  10548. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10549. j++
  10550. ) {
  10551. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10552. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10553. j
  10554. ].proVisible2 = false;
  10555. if (
  10556. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10557. .length > 1
  10558. ) {
  10559. for (
  10560. var z = 0;
  10561. z <
  10562. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10563. .length;
  10564. z++
  10565. ) {
  10566. if (
  10567. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10568. z
  10569. ].tool.length
  10570. ) {
  10571. this.$message.error("请把工具添加完整");
  10572. cPan = 2;
  10573. break;
  10574. }
  10575. }
  10576. }
  10577. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10578. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10579. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10580. (ele) => {
  10581. return ele.value != "";
  10582. }
  10583. );
  10584. }
  10585. }
  10586. this.inputShow = true;
  10587. if (cPan == 2) {
  10588. this.steps--;
  10589. return;
  10590. }
  10591. let params = [
  10592. {
  10593. cid: this.cid,
  10594. chapters: JSON.stringify(this.unitJson),
  10595. uid: this.userid,
  10596. unitIndex: _unitIndex,
  10597. },
  10598. ];
  10599. this.ajax
  10600. .post(this.$store.state.api + "updateWorkNew4", params)
  10601. .then((res) => {
  10602. // this.$message({
  10603. // message: "修改成功",
  10604. // type: "success",
  10605. // });
  10606. this.courseId = this.cid;
  10607. this.addtips()
  10608. })
  10609. .catch((err) => {
  10610. this.$message.error("网络不佳");
  10611. console.error(err);
  10612. });
  10613. },
  10614. updateWork() {
  10615. let cPan = 1;
  10616. for (var i = 0; i < this.unitJson.length; i++) {
  10617. for (
  10618. var j = 0;
  10619. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10620. j++
  10621. ) {
  10622. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10623. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10624. if (
  10625. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10626. ) {
  10627. for (
  10628. var z = 0;
  10629. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10630. z++
  10631. ) {
  10632. if (
  10633. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10634. .length
  10635. ) {
  10636. this.$message.error("请把工具添加完整");
  10637. cPan = 2;
  10638. break;
  10639. }
  10640. }
  10641. }
  10642. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10643. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10644. i
  10645. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10646. return ele.value != "";
  10647. });
  10648. }
  10649. }
  10650. }
  10651. this.inputShow = true;
  10652. if (cPan == 2) {
  10653. this.steps--;
  10654. return;
  10655. }
  10656. for (var i = 0; i < this.unitJson.length; i++) {
  10657. delete this.unitJson[i].isUpdate;
  10658. }
  10659. if(!this.targetCourseText2){
  10660. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  10661. }
  10662. let params = [
  10663. {
  10664. cid: this.cid,
  10665. title: this.courseName,
  10666. brief: this.courseText,
  10667. cover:
  10668. this.cover.length > 0
  10669. ? JSON.stringify(this.cover)
  10670. : JSON.stringify([
  10671. {
  10672. name: "noBanner.jpg",
  10673. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10674. uid: 1656409780264,
  10675. status: "success",
  10676. },
  10677. ]),
  10678. evaId: this.evalua,
  10679. astudent:
  10680. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10681. see: this.isTeacherSee == true ? 1 : 0,
  10682. chapters: JSON.stringify(this.unitJson),
  10683. template: this.myWord != "undefined" ? this.myWord : [],
  10684. uid: this.userid,
  10685. courseType: JSON.stringify(this.courseTypeId),
  10686. ateacher:
  10687. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10688. inviteCode: JSON.stringify(this.inviteCode),
  10689. refile: JSON.stringify(this.infoData),
  10690. reBrief: this.courseText2,
  10691. cpote: JSON.stringify(this.cpote),
  10692. setting: JSON.stringify({
  10693. courseJie: this.courseJie,
  10694. courseTime: this.courseTime,
  10695. teacherInfoData: this.teacherInfoData,
  10696. teacherCourseText: this.teacherCourseText,
  10697. targetCourseText: this.targetCourseText,
  10698. cankaoInfoData: this.cankaoInfoData,
  10699. infoData2: this.infoData2,
  10700. isuseT: this.isuseT,
  10701. mode: this.mode,
  10702. targetCourseText2: this.targetCourseText2,
  10703. }),
  10704. iresearch: this.isFileSearch ? 1 : 2,
  10705. },
  10706. ];
  10707. this.ajax
  10708. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  10709. .then((res) => {
  10710. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10711. if (this.cidType == 1) {
  10712. this.$message({
  10713. message: "修改成功",
  10714. type: "success",
  10715. });
  10716. } else {
  10717. this.$message({
  10718. message: "新增成功",
  10719. type: "success",
  10720. });
  10721. }
  10722. }
  10723. this.number = this.nbOrder;
  10724. this.courseId = this.cid;
  10725. this.addtips()
  10726. })
  10727. .catch((err) => {
  10728. this.$message.error("网络不佳");
  10729. console.error(err);
  10730. });
  10731. },
  10732. insertWord() {
  10733. this.dialogVisible1 = true;
  10734. this.updateBoolean2 = false;
  10735. this.tTitle = "";
  10736. this.tdetail = "";
  10737. },
  10738. addWord() {
  10739. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  10740. name: this.tTitle,
  10741. content: this.tdetail,
  10742. uid: this.guid(),
  10743. });
  10744. this.dialogVisible1 = false;
  10745. },
  10746. upWord() { },
  10747. selectWord(uid, i, c) {
  10748. this.dialogVisible1 = true;
  10749. this.updateBoolean2 = true;
  10750. if (
  10751. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  10752. ) {
  10753. this.tTitle =
  10754. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  10755. this.tdetail =
  10756. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  10757. }
  10758. },
  10759. isAddPP() {
  10760. if (this.checkboxList.length > 0) {
  10761. this.$message({
  10762. message: "添加成功",
  10763. type: "success",
  10764. });
  10765. this.dialogVisible3 = false;
  10766. } else {
  10767. this.$message({
  10768. message: "请添加课程成员",
  10769. type: "error",
  10770. });
  10771. }
  10772. },
  10773. isAddClass() {
  10774. this.dialogVisibleClass = false;
  10775. },
  10776. isAddPPTeacher() {
  10777. this.dialogVisibleMember = false;
  10778. this.setMan();
  10779. },
  10780. getTipsTemplate(){
  10781. if(this.templateid){
  10782. let params = {
  10783. id: this.templateid
  10784. }
  10785. this.ajax
  10786. .get(this.$store.state.api + "selectTipsTemplateById", params)
  10787. .then((res) => {
  10788. if(res.data[0].length){
  10789. this.tipsJson = res.data[0][0]
  10790. this.aiJson = JSON.parse(res.data[0][0].tips)
  10791. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10792. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10793. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10794. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10795. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  10796. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10797. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  10798. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  10799. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  10800. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  10801. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  10802. }
  10803. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  10804. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  10805. // }
  10806. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  10807. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10808. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10809. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10810. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  10811. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  10812. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  10813. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10814. // }
  10815. this.$forceUpdate();
  10816. }
  10817. })
  10818. .catch((err) => { });
  10819. }
  10820. },
  10821. getTemplate() {
  10822. this.ajax
  10823. .get(this.$store.state.api + "getCourseTemplateT", "")
  10824. .then((res) => {
  10825. this.templateArray = res.data[0];
  10826. this.getTemplateOid();
  10827. this.$forceUpdate();
  10828. })
  10829. .catch((err) => { });
  10830. },
  10831. getTemplateOid() {
  10832. let params = {
  10833. oid: this.oid,
  10834. };
  10835. this.ajax
  10836. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10837. .then((res) => {
  10838. if (res.data[0].length) {
  10839. this.templateArray = [...res.data[0], ...this.templateArray];
  10840. }
  10841. this.getTemplateOrg();
  10842. this.$forceUpdate();
  10843. })
  10844. .catch((err) => { });
  10845. },
  10846. getTemplateOrg() {
  10847. let params = {
  10848. oid: this.org,
  10849. };
  10850. this.ajax
  10851. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10852. .then((res) => {
  10853. if (res.data[0].length) {
  10854. this.templateArray = [...res.data[0], ...this.templateArray];
  10855. }
  10856. this.$forceUpdate();
  10857. })
  10858. .catch((err) => { });
  10859. },
  10860. clearChoose() {
  10861. this.clearArray.splice(this.templateC.id, 1);
  10862. this.dialogVisible2 = false;
  10863. },
  10864. clearAttText() {
  10865. this.AttText = {
  10866. title: "",
  10867. text: "",
  10868. };
  10869. this.dialogVisible6 = false;
  10870. },
  10871. clearLine() {
  10872. this.line = "";
  10873. this.dialogVisible7 = false;
  10874. },
  10875. openTemplate() {
  10876. this.ctJson = {};
  10877. this.templateDialog = true;
  10878. },
  10879. checkctJson(json) {
  10880. if (this.ctJson.id == json.id) {
  10881. this.ctJson = {};
  10882. } else {
  10883. this.ctJson = json;
  10884. }
  10885. },
  10886. addTemplate(res) {
  10887. let _this = this;
  10888. let _res = [];
  10889. if (res.id == 1) {
  10890. _res = [
  10891. {
  10892. dyName: "", //单元标题
  10893. easy: 1,
  10894. chapterInfo: [
  10895. {
  10896. isread: false,
  10897. chapterid: this.guid(),
  10898. title: "",
  10899. courseName: "",
  10900. taskJson: [
  10901. {
  10902. task: "",
  10903. taskDetail: "",
  10904. chapterData: [],
  10905. toolText: "",
  10906. toolChoose: [
  10907. {
  10908. tool: [],
  10909. toolDetail: "",
  10910. toolType: 0,
  10911. askCount: 1,
  10912. askTitle: "",
  10913. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10914. },
  10915. ],
  10916. isShowTools: false,
  10917. askCount: 1,
  10918. isFold: 1,
  10919. askTitle: "",
  10920. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10921. checkJson: [{ checkCount: [], checkPerent: [] }],
  10922. homeworkList: [],
  10923. },
  10924. ],
  10925. itemCount: 1,
  10926. fileList1: [],
  10927. video: [],
  10928. testData: [],
  10929. pData: [],
  10930. templateArray: [],
  10931. },
  10932. ],
  10933. },
  10934. ];
  10935. this.updateCourseState(1);
  10936. } else if (res.id == 2) {
  10937. let stageData = [];
  10938. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10939. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10940. if (!iframe && !iframe2) {
  10941. this.$message.error("请使用AI共创生成");
  10942. return;
  10943. }
  10944. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10945. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10946. if (
  10947. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  10948. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  10949. ) {
  10950. this.$message.error("请使用AI共创生成");
  10951. return;
  10952. }
  10953. stageData = copyData
  10954. ? copyData.stageData
  10955. : copyData2
  10956. ? copyData2.stageData
  10957. : [""];
  10958. for (var i = 0; i < stageData.length; i++) {
  10959. _res.push({
  10960. dyName: stageData[i], //单元标题
  10961. chapterInfo: [
  10962. {
  10963. isread: false,
  10964. chapterid: this.guid(),
  10965. title: "",
  10966. courseName: "",
  10967. taskJson: [
  10968. {
  10969. task: "",
  10970. taskDetail: "",
  10971. chapterData: [],
  10972. toolText: "",
  10973. toolChoose: [
  10974. {
  10975. tool: [],
  10976. toolDetail: "",
  10977. toolType: 0,
  10978. askCount: 1,
  10979. askTitle: "",
  10980. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10981. },
  10982. ],
  10983. isShowTools: false,
  10984. askCount: 1,
  10985. isFold: 1,
  10986. askTitle: "",
  10987. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10988. checkJson: [{ checkCount: [], checkPerent: [] }],
  10989. homeworkList: [],
  10990. },
  10991. ],
  10992. itemCount: 1,
  10993. fileList1: [],
  10994. video: [],
  10995. testData: [],
  10996. pData: [],
  10997. templateArray: [],
  10998. },
  10999. ],
  11000. });
  11001. }
  11002. this.updateCourseState(1);
  11003. } else if (!Object.keys(res).length) {
  11004. this.$message.error("请选择模板");
  11005. retrun;
  11006. } else {
  11007. _res = JSON.parse(res.chapters);
  11008. this.updateCourseState(parseInt(res.state));
  11009. }
  11010. _this
  11011. .$confirm(
  11012. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11013. "提示",
  11014. {
  11015. confirmButtonText: "确定",
  11016. cancelButtonText: "取消",
  11017. type: "warning",
  11018. }
  11019. )
  11020. .then(() => {
  11021. _this.unitJson = _res;
  11022. _this.updateWork();
  11023. // _this.steps++;
  11024. _this.templateDialog = false;
  11025. setTimeout(() => {
  11026. this.checkEva(this.checkId);
  11027. setTimeout(() => {
  11028. this.checkEva(this.checkId);
  11029. }, 100);
  11030. }, 1000);
  11031. })
  11032. .catch(() => {
  11033. return;
  11034. });
  11035. },
  11036. checkTemplate(res) {
  11037. let _this = this;
  11038. _this
  11039. .$confirm(
  11040. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11041. "提示",
  11042. {
  11043. confirmButtonText: "确定",
  11044. cancelButtonText: "取消",
  11045. type: "warning",
  11046. }
  11047. )
  11048. .then(() => {
  11049. _this.unitJson = JSON.parse(res.chapters);
  11050. _this.steps++;
  11051. setTimeout(() => {
  11052. this.checkEva(this.checkId);
  11053. setTimeout(() => {
  11054. this.checkEva(this.checkId);
  11055. }, 100);
  11056. }, 1000);
  11057. })
  11058. .catch(() => {
  11059. return;
  11060. });
  11061. },
  11062. checkTemplate1(w) {
  11063. this.steps++;
  11064. },
  11065. checkTemplate2() {
  11066. let _this = this;
  11067. _this
  11068. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11069. confirmButtonText: "确定",
  11070. cancelButtonText: "取消",
  11071. type: "warning",
  11072. })
  11073. .then(() => {
  11074. _this.unitIndex = 0;
  11075. _this.unitJson = [
  11076. {
  11077. dyName: "", //单元标题
  11078. chapterInfo: [
  11079. {
  11080. isread: false,
  11081. chapterid: this.guid(),
  11082. title: "",
  11083. courseName: "",
  11084. taskJson: [
  11085. {
  11086. task: "",
  11087. taskDetail: "",
  11088. chapterData: [],
  11089. toolText: "",
  11090. toolChoose: [
  11091. {
  11092. tool: [],
  11093. toolDetail: "",
  11094. toolType: 0,
  11095. askCount: 1,
  11096. askTitle: "",
  11097. askJson: [
  11098. { askstitle: "", askItem: 1, checkList: [] },
  11099. ],
  11100. },
  11101. ],
  11102. isShowTools: false,
  11103. askCount: 1,
  11104. isFold: 1,
  11105. askTitle: "",
  11106. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11107. checkJson: [{ checkCount: [], checkPerent: [] }],
  11108. homeworkList: [],
  11109. },
  11110. ],
  11111. itemCount: 1,
  11112. fileList1: [],
  11113. video: [],
  11114. testData: [],
  11115. pData: [],
  11116. templateArray: [],
  11117. },
  11118. ],
  11119. },
  11120. ];
  11121. this.steps++;
  11122. setTimeout(() => {
  11123. this.checkEva(this.checkId);
  11124. setTimeout(() => {
  11125. this.checkEva(this.checkId);
  11126. }, 100);
  11127. }, 1000);
  11128. this.updateWork();
  11129. })
  11130. .catch(() => {
  11131. return;
  11132. });
  11133. },
  11134. checkTemplate3() {
  11135. let _this = this;
  11136. _this
  11137. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11138. confirmButtonText: "确定",
  11139. cancelButtonText: "取消",
  11140. type: "warning",
  11141. })
  11142. .then(() => {
  11143. _this.unitIndex = 0;
  11144. _this.unitJson = [
  11145. {
  11146. dyName: "", //单元标题
  11147. easy: 1,
  11148. chapterInfo: [
  11149. {
  11150. isread: false,
  11151. chapterid: this.guid(),
  11152. title: "",
  11153. courseName: "",
  11154. taskJson: [
  11155. {
  11156. task: "",
  11157. taskDetail: "",
  11158. chapterData: [],
  11159. toolText: "",
  11160. toolChoose: [
  11161. {
  11162. tool: [],
  11163. toolDetail: "",
  11164. toolType: 0,
  11165. askCount: 1,
  11166. askTitle: "",
  11167. askJson: [
  11168. { askstitle: "", askItem: 1, checkList: [] },
  11169. ],
  11170. },
  11171. ],
  11172. isShowTools: false,
  11173. askCount: 1,
  11174. isFold: 1,
  11175. askTitle: "",
  11176. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11177. checkJson: [{ checkCount: [], checkPerent: [] }],
  11178. homeworkList: [],
  11179. },
  11180. ],
  11181. itemCount: 1,
  11182. fileList1: [],
  11183. video: [],
  11184. testData: [],
  11185. pData: [],
  11186. templateArray: [],
  11187. },
  11188. ],
  11189. },
  11190. ];
  11191. // this.steps++;
  11192. this.updateWork();
  11193. })
  11194. .catch(() => {
  11195. return;
  11196. });
  11197. },
  11198. checkTemplate4() {
  11199. let _this = this;
  11200. _this
  11201. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  11202. confirmButtonText: "确定",
  11203. cancelButtonText: "取消",
  11204. type: "warning",
  11205. })
  11206. .then(() => {
  11207. _this.unitIndex = 0;
  11208. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  11209. this.steps++;
  11210. this.updateWork();
  11211. })
  11212. .catch(() => {
  11213. return;
  11214. });
  11215. },
  11216. wordNext() {
  11217. this.dialogVisible2 = false;
  11218. },
  11219. isAddOrUpdateAttText() {
  11220. if (this.AttTextType == 0) {
  11221. this.addAttTextMessage();
  11222. } else {
  11223. this.updateAttText();
  11224. }
  11225. },
  11226. isAddOrUpdateLine() {
  11227. if (!this.lineTitle) {
  11228. this.$message.error("请填写链接标题");
  11229. return;
  11230. }
  11231. if (this.lineType == 0) {
  11232. this.addLine();
  11233. } else {
  11234. this.updateLine();
  11235. }
  11236. },
  11237. addAttTextMessage() {
  11238. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11239. this.taskCount
  11240. ].chapterData.unshift({
  11241. name: this.AttText.title,
  11242. url: this.AttText.text,
  11243. type: 6,
  11244. });
  11245. this.imgChange1(null, null, 6, this.taskCount);
  11246. this.dialogVisible6 = false;
  11247. },
  11248. selectAttText(itemTaskIndex, i) {
  11249. this.AttText.title =
  11250. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11251. itemTaskIndex
  11252. ].chapterData[i].name;
  11253. this.AttText.text =
  11254. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11255. itemTaskIndex
  11256. ].chapterData[i].url;
  11257. this.taskCount = itemTaskIndex;
  11258. this.AttTextIndex = i;
  11259. this.AttTextType = 1;
  11260. this.dialogVisible6 = true;
  11261. },
  11262. updateAttText() {
  11263. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11264. this.taskCount
  11265. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  11266. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11267. this.taskCount
  11268. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  11269. this.dialogVisible6 = false;
  11270. },
  11271. addLine() {
  11272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11273. this.lineCount
  11274. ].chapterData.unshift({
  11275. name: "链接",
  11276. title: this.lineTitle,
  11277. url: this.line,
  11278. type: 8,
  11279. });
  11280. this.imgChange1(null, null, 8, this.lineCount);
  11281. this.dialogVisible7 = false;
  11282. },
  11283. selectLine(itemTaskIndex, i) {
  11284. this.line =
  11285. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11286. itemTaskIndex
  11287. ].chapterData[i].url;
  11288. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11289. itemTaskIndex
  11290. ].chapterData[i].title
  11291. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11292. .chapterData[i].title
  11293. : "";
  11294. this.taskCount = itemTaskIndex;
  11295. this.lineCount = i;
  11296. this.lineType = 1;
  11297. this.dialogVisible7 = true;
  11298. },
  11299. openUpdateSource(itemTaskIndex, i) {
  11300. this.sourceData = {};
  11301. let source =
  11302. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11303. .chapterData[i];
  11304. this.sourceData[source.id] = {};
  11305. this.sourceData[source.id].name = source.title;
  11306. this.sourceData[source.id].url = source.url;
  11307. this.dialogVisibleSource = true;
  11308. this.updateSourcePan = true;
  11309. this.taskCount = itemTaskIndex;
  11310. this.lineCount = i;
  11311. },
  11312. updateLine() {
  11313. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11314. this.taskCount
  11315. ].chapterData[this.lineCount].url = this.line;
  11316. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11317. this.taskCount
  11318. ].chapterData[this.lineCount].title = this.lineTitle;
  11319. this.dialogVisible7 = false;
  11320. },
  11321. addPP() {
  11322. this.dialogVisible3 = true;
  11323. },
  11324. goTo(path) {
  11325. this.$router.push(path);
  11326. },
  11327. openTools(itemTaskIndex, i, toolIndex) {
  11328. this.toolIndex = toolIndex;
  11329. this.taskCount = itemTaskIndex;
  11330. if (i == 4) {
  11331. if (toolIndex == null) {
  11332. var a =
  11333. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11334. .chapterData;
  11335. for (var i = 0; i < a.length; i++) {
  11336. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  11337. this.askJson =
  11338. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11339. itemTaskIndex
  11340. ].chapterData[i].askJson;
  11341. }
  11342. }
  11343. } else {
  11344. this.askJson = JSON.parse(
  11345. JSON.stringify(
  11346. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11347. itemTaskIndex
  11348. ].toolChoose[toolIndex]
  11349. )
  11350. );
  11351. }
  11352. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  11353. this.dialogVisible5 = true;
  11354. } else if (i == 45) {
  11355. if (
  11356. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11357. .toolChoose[toolIndex].testJson
  11358. ) {
  11359. this.testJson = JSON.parse(
  11360. JSON.stringify(
  11361. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11362. itemTaskIndex
  11363. ].toolChoose[toolIndex].testJson
  11364. )
  11365. );
  11366. } else {
  11367. var testJson = {
  11368. testCount: 1,
  11369. testTitle: "",
  11370. testJson: [
  11371. {
  11372. teststitle: "",
  11373. testItem: 1,
  11374. checkList: [],
  11375. timuList: [],
  11376. answer: [],
  11377. type: "1",
  11378. },
  11379. ],
  11380. };
  11381. this.testJson = testJson;
  11382. }
  11383. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  11384. this.dialogVisibleChoice = true;
  11385. } else if (i == 47) {
  11386. if (
  11387. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11388. .toolChoose[toolIndex].sentenceList
  11389. ) {
  11390. this.sentenceList = JSON.parse(
  11391. JSON.stringify(
  11392. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11393. itemTaskIndex
  11394. ].toolChoose[toolIndex].sentenceList
  11395. )
  11396. );
  11397. } else {
  11398. var sentenceList = [
  11399. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  11400. ];
  11401. this.sentenceList = sentenceList;
  11402. }
  11403. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  11404. this.dialogVisibleSentence = true;
  11405. } else if (i == 48) {
  11406. if (
  11407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11408. .toolChoose[toolIndex].tableJson
  11409. ) {
  11410. this.tableJson = JSON.parse(
  11411. JSON.stringify(
  11412. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11413. itemTaskIndex
  11414. ].toolChoose[toolIndex].tableJson
  11415. )
  11416. );
  11417. } else {
  11418. var tableJson = { text: "" };
  11419. this.tableJson = tableJson;
  11420. }
  11421. this.dialogVisibleTable = true;
  11422. } else if (i == 52) {
  11423. if (
  11424. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11425. .toolChoose[toolIndex].wordJson
  11426. ) {
  11427. this.wordJson = JSON.parse(
  11428. JSON.stringify(
  11429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11430. itemTaskIndex
  11431. ].toolChoose[toolIndex].wordJson
  11432. )
  11433. );
  11434. } else {
  11435. var wordJson = { text: "" };
  11436. this.wordJson = wordJson;
  11437. }
  11438. this.dialogVisibleWord = true;
  11439. // else if (i == 50) {
  11440. // if (
  11441. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11442. // .toolChoose[toolIndex].uploadJson
  11443. // ) {
  11444. // this.uploadJson = JSON.parse(
  11445. // JSON.stringify(
  11446. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11447. // itemTaskIndex
  11448. // ].toolChoose[toolIndex].uploadJson
  11449. // )
  11450. // );
  11451. // } else {
  11452. // var uploadJson = [];
  11453. // this.uploadJson = uploadJson;
  11454. // }
  11455. // this.dialogVisibleMoreUpload = true;
  11456. // }
  11457. } else if (i == 10) {
  11458. if (
  11459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11460. .toolChoose[toolIndex].preTime
  11461. ) {
  11462. this.preTime = JSON.parse(
  11463. JSON.stringify(
  11464. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11465. itemTaskIndex
  11466. ].toolChoose[toolIndex].preTime
  11467. )
  11468. );
  11469. } else {
  11470. var preTime = 0;
  11471. this.preTime = preTime;
  11472. }
  11473. this.dialogVisiblePreTime = true;
  11474. } else if (i == 49) {
  11475. if (
  11476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11477. .toolChoose[toolIndex].groupJson
  11478. ) {
  11479. this.groupJson = JSON.parse(
  11480. JSON.stringify(
  11481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11482. itemTaskIndex
  11483. ].toolChoose[toolIndex].groupJson
  11484. )
  11485. );
  11486. } else {
  11487. var groupJson = {
  11488. group: [{ name: "第1组" }],
  11489. number: undefined,
  11490. islock: 1,
  11491. };
  11492. this.groupJson = groupJson;
  11493. }
  11494. this.dialogVisibleGroup = true;
  11495. } else if (i == 62) {
  11496. if (
  11497. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11498. .toolChoose[toolIndex].videoJson
  11499. ) {
  11500. this.videoJson = JSON.parse(
  11501. JSON.stringify(
  11502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11503. itemTaskIndex
  11504. ].toolChoose[toolIndex].videoJson
  11505. )
  11506. );
  11507. } else {
  11508. var videoJson = {
  11509. video: "",
  11510. setting: [],
  11511. };
  11512. this.videoJson = videoJson;
  11513. }
  11514. this.dialogVisibleVideo = true;
  11515. } else if (i == 15) {
  11516. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11517. itemTaskIndex
  11518. ].toolChoose[toolIndex].answerQ
  11519. ? JSON.parse(
  11520. JSON.stringify(
  11521. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11522. itemTaskIndex
  11523. ].toolChoose[toolIndex].answerQ
  11524. )
  11525. )
  11526. : "";
  11527. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  11528. this.dialogVisible8 = true;
  11529. } else if (i == 40) {
  11530. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11531. itemTaskIndex
  11532. ].toolChoose[toolIndex].rateJson
  11533. ? JSON.parse(
  11534. JSON.stringify(
  11535. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11536. itemTaskIndex
  11537. ].toolChoose[toolIndex].rateJson
  11538. )
  11539. )
  11540. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  11541. this.selectSteps = 1;
  11542. this.dialogVisibleRate = true;
  11543. } else if (i == 42) {
  11544. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11545. itemTaskIndex
  11546. ].toolChoose[toolIndex].answerQ
  11547. ? JSON.parse(
  11548. JSON.stringify(
  11549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11550. itemTaskIndex
  11551. ].toolChoose[toolIndex].answerQ
  11552. )
  11553. )
  11554. : "";
  11555. this.dialogVisibleMp3 = true;
  11556. } else if (i == 41) {
  11557. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11558. itemTaskIndex
  11559. ].toolChoose[toolIndex].selectJson
  11560. ? JSON.parse(
  11561. JSON.stringify(
  11562. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11563. itemTaskIndex
  11564. ].toolChoose[toolIndex].selectJson
  11565. )
  11566. )
  11567. : { url: "", select: [], answer: [] };
  11568. this.selectSteps = 1;
  11569. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  11570. this.dialogVisibleSelect = true;
  11571. } else if (i == 3) {
  11572. top.postMessage(
  11573. {
  11574. tools: "3y",
  11575. cid: this.cid,
  11576. stage: this.unitIndex,
  11577. task: itemTaskIndex,
  11578. tool: toolIndex,
  11579. },
  11580. "*"
  11581. );
  11582. } else if (i == 1) {
  11583. top.postMessage(
  11584. {
  11585. tools: "1y",
  11586. cid: this.cid,
  11587. stage: this.unitIndex,
  11588. task: itemTaskIndex,
  11589. tool: toolIndex,
  11590. },
  11591. "*"
  11592. );
  11593. } else if (i == 57) {
  11594. top.postMessage(
  11595. {
  11596. tools: "57y",
  11597. cid: this.cid,
  11598. stage: this.unitIndex,
  11599. task: itemTaskIndex,
  11600. tool: toolIndex,
  11601. },
  11602. "*"
  11603. );
  11604. } else if (i == 69) {
  11605. this.englishList = {};
  11606. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  11607. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  11608. ? JSON.parse(
  11609. JSON.stringify(
  11610. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11611. itemTaskIndex
  11612. ].toolChoose[toolIndex].englishList
  11613. )
  11614. )
  11615. : {};
  11616. this.$forceUpdate();
  11617. this.englishDialogVisible = true;
  11618. } else if (i == 70) {
  11619. this.englishVoiceJson = {};
  11620. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  11621. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  11622. ? JSON.parse(
  11623. JSON.stringify(
  11624. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11625. itemTaskIndex
  11626. ].toolChoose[toolIndex].englishVoiceJson
  11627. )
  11628. )
  11629. : {
  11630. title: '',
  11631. detail: '',
  11632. array: []
  11633. };
  11634. // {
  11635. // time: "",
  11636. // class: "",
  11637. // difficulty: 0,
  11638. // topic: "",
  11639. // isShow: false,
  11640. // eva: 0,
  11641. // aiEva: {
  11642. // isAiEva: false,
  11643. // aiEvaChoose: [],
  11644. // },
  11645. // allfType: [],
  11646. // englishJson: {},
  11647. // };
  11648. this.$forceUpdate();
  11649. this.EnglishVoiceDialog = true;
  11650. }
  11651. },
  11652. setEnglishVoiceJson(val) {
  11653. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11654. this.taskCount
  11655. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  11656. JSON.stringify(val)
  11657. );
  11658. this.$forceUpdate();
  11659. if (
  11660. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11661. .toolChoose[this.toolIndex].tool != 70
  11662. ) {
  11663. this.addTools(70, this.taskCount, this.toolIndex);
  11664. }
  11665. },
  11666. chapAddTools(i) {
  11667. if (this.chapTools[0].tools.length == 0) {
  11668. this.chapTools[0].tools.push(i);
  11669. } else {
  11670. if (this.chapTools[0].tools.indexOf(i) != -1) {
  11671. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  11672. } else {
  11673. this.chapTools[0].tools.push(i);
  11674. }
  11675. }
  11676. this.$forceUpdate();
  11677. },
  11678. addChaptersDataTools() {
  11679. if (this.chapTools[0].tools.indexOf(4) != -1) {
  11680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11681. this.chapCount
  11682. ].chapterData.unshift({
  11683. name: this.chapTools[0].toolDetail,
  11684. url: this.chapTools[0].tools,
  11685. type: 7,
  11686. askJson: this.askJson,
  11687. });
  11688. } else {
  11689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11690. this.chapCount
  11691. ].chapterData.unshift({
  11692. name: this.chapTools[0].toolDetail,
  11693. url: this.chapTools[0].tools,
  11694. type: 7,
  11695. });
  11696. }
  11697. this.imgChange1(null, null, 7, this.chapCount);
  11698. this.dialogVisible4 = false;
  11699. },
  11700. addTools(i, itemTaskIndex, toolIndex) {
  11701. // if (
  11702. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11703. // .toolChoose[toolIndex].tool.length == 0
  11704. // ) {
  11705. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11706. // itemTaskIndex
  11707. // ].toolChoose[toolIndex].tool.push(i);
  11708. // } else {
  11709. // if (
  11710. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11711. // itemTaskIndex
  11712. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11713. // ) {
  11714. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11715. // itemTaskIndex
  11716. // ].toolChoose[toolIndex].tool.splice(
  11717. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11718. // itemTaskIndex
  11719. // ].toolChoose[toolIndex].tool.indexOf(i),
  11720. // 1
  11721. // );
  11722. // } else {
  11723. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11724. // itemTaskIndex
  11725. // ].toolChoose[toolIndex].tool.push(i);
  11726. // }
  11727. // console.log(
  11728. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11729. // .toolChoose[toolIndex].tool
  11730. // );
  11731. // }
  11732. if (i == 4) {
  11733. if (
  11734. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11735. .toolChoose[toolIndex].askJson.askTitle == "" ||
  11736. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11737. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  11738. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11739. .toolChoose[toolIndex].askJson[0].checkList < 2
  11740. ) {
  11741. this.openTools(itemTaskIndex, 4, toolIndex);
  11742. // this.$message({
  11743. // message: "请填写完整问卷内容",
  11744. // type: "error",
  11745. // });
  11746. return;
  11747. }
  11748. }
  11749. if (i == 45) {
  11750. if (
  11751. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11752. .toolChoose[toolIndex].testJson ||
  11753. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11754. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  11755. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11756. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  11757. ) {
  11758. this.openTools(itemTaskIndex, 45, toolIndex);
  11759. // this.$message({
  11760. // message: "请填写完整问卷内容",
  11761. // type: "error",
  11762. // });
  11763. return;
  11764. }
  11765. }
  11766. if (i == 47) {
  11767. if (
  11768. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11769. .toolChoose[toolIndex].sentenceList ||
  11770. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11771. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  11772. ) {
  11773. this.openTools(itemTaskIndex, 47, toolIndex);
  11774. return;
  11775. }
  11776. }
  11777. if (i == 69) {
  11778. if (
  11779. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11780. .toolChoose[toolIndex].englishList
  11781. ) {
  11782. this.openTools(itemTaskIndex, 69, toolIndex);
  11783. return;
  11784. }
  11785. }
  11786. if (i == 70) {
  11787. if (
  11788. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11789. .toolChoose[toolIndex].englishVoiceJson
  11790. ) {
  11791. this.openTools(itemTaskIndex, 70, toolIndex);
  11792. return;
  11793. }
  11794. }
  11795. // if (i == 48) {
  11796. // if (
  11797. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11798. // .toolChoose[toolIndex].tableJson
  11799. // ) {
  11800. // this.openTools(itemTaskIndex, 48, toolIndex);
  11801. // return;
  11802. // }
  11803. // }
  11804. // if (i == 50) {
  11805. // if (
  11806. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11807. // .toolChoose[toolIndex].uploadJson
  11808. // ) {
  11809. // this.openTools(itemTaskIndex, 50, toolIndex);
  11810. // return;
  11811. // }
  11812. // }
  11813. if (i == 49) {
  11814. if (
  11815. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11816. .toolChoose[toolIndex].groupJson
  11817. ) {
  11818. this.openTools(itemTaskIndex, 49, toolIndex);
  11819. return;
  11820. }
  11821. }
  11822. if (i == 62) {
  11823. if (
  11824. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11825. .toolChoose[toolIndex].videoJson
  11826. ) {
  11827. this.openTools(itemTaskIndex, 62, toolIndex);
  11828. return;
  11829. }
  11830. }
  11831. if (i == 15) {
  11832. if (
  11833. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11834. .toolChoose[toolIndex].answerQ ||
  11835. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11836. .toolChoose[toolIndex].answerQ == ""
  11837. ) {
  11838. this.openTools(itemTaskIndex, 15, toolIndex);
  11839. // this.$message({
  11840. // message: "请填写问答内容",
  11841. // type: "error",
  11842. // });
  11843. return;
  11844. }
  11845. }
  11846. if (i == 40) {
  11847. if (
  11848. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11849. .toolChoose[toolIndex].rateJson ||
  11850. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11851. .toolChoose[toolIndex].rateJson.length
  11852. ) {
  11853. this.openTools(itemTaskIndex, 40, toolIndex);
  11854. return;
  11855. }
  11856. }
  11857. if (i == 41) {
  11858. if (
  11859. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11860. .toolChoose[toolIndex].selectJson ||
  11861. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11862. .toolChoose[toolIndex].selectJson.url == "" ||
  11863. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11864. .toolChoose[toolIndex].selectJson.select.length ||
  11865. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11866. .toolChoose[toolIndex].selectJson.answer.length
  11867. ) {
  11868. this.openTools(itemTaskIndex, 41, toolIndex);
  11869. return;
  11870. }
  11871. }
  11872. if (i == 42) {
  11873. if (
  11874. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11875. .toolChoose[toolIndex].answerQ ||
  11876. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11877. .toolChoose[toolIndex].answerQ == ""
  11878. ) {
  11879. this.openTools(itemTaskIndex, 42, toolIndex);
  11880. return;
  11881. }
  11882. }
  11883. if (
  11884. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11885. .toolChoose[toolIndex].tool.length > 0
  11886. ) {
  11887. if (
  11888. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11889. itemTaskIndex
  11890. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11891. ) {
  11892. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11893. itemTaskIndex
  11894. ].toolChoose[toolIndex].tool.splice(
  11895. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11896. itemTaskIndex
  11897. ].toolChoose[toolIndex].tool.indexOf(i),
  11898. 1
  11899. );
  11900. } else {
  11901. // this.$message({
  11902. // message: "每个工具只能添加一个",
  11903. // type: "error",
  11904. // });
  11905. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11906. itemTaskIndex
  11907. ].toolChoose[toolIndex].tool = [];
  11908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11909. itemTaskIndex
  11910. ].toolChoose[toolIndex].tool.push(i);
  11911. }
  11912. } else {
  11913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11914. itemTaskIndex
  11915. ].toolChoose[toolIndex].tool.push(i);
  11916. }
  11917. this.$forceUpdate();
  11918. },
  11919. addAskList(index) {
  11920. this.askJson.askJson.splice(index + 1, 0, {
  11921. askstitle: "",
  11922. askItem: 1,
  11923. checkList: [],
  11924. });
  11925. this.askJson.askCount++;
  11926. },
  11927. addTestList(index) {
  11928. this.testJson.testJson.splice(index + 1, 0, {
  11929. teststitle: "",
  11930. testItem: 1,
  11931. checkList: [],
  11932. timuList: [],
  11933. answer: [],
  11934. type: "1",
  11935. });
  11936. this.testJson.testCount++;
  11937. },
  11938. deleteAskList(index) {
  11939. if (
  11940. !this.askJson.askJson[index].askstitle &&
  11941. this.askJson.askJson[index].askItem == 1 &&
  11942. !this.askJson.askJson[index].checkList[0]
  11943. ) {
  11944. this.askJson.askJson.splice(index, 1);
  11945. this.askJson.askCount--;
  11946. } else {
  11947. let _this = this;
  11948. _this
  11949. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11950. confirmButtonText: "确定",
  11951. cancelButtonText: "取消",
  11952. type: "warning",
  11953. })
  11954. .then(() => {
  11955. _this.askJson.askJson.splice(index, 1);
  11956. _this.askJson.askCount--;
  11957. })
  11958. .catch(() => {
  11959. return;
  11960. });
  11961. }
  11962. },
  11963. deleteTestList(index) {
  11964. if (
  11965. !this.testJson.testJson[index].teststitle &&
  11966. this.testJson.testJson[index].testItem == 1 &&
  11967. !this.testJson.testJson[index].checkList[0]
  11968. ) {
  11969. this.testJson.testJson.splice(index, 1);
  11970. this.testJson.testCount--;
  11971. } else {
  11972. let _this = this;
  11973. _this
  11974. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11975. confirmButtonText: "确定",
  11976. cancelButtonText: "取消",
  11977. type: "warning",
  11978. })
  11979. .then(() => {
  11980. _this.testJson.testJson.splice(index, 1);
  11981. _this.testJson.testCount--;
  11982. })
  11983. .catch(() => {
  11984. return;
  11985. });
  11986. }
  11987. },
  11988. askMove(type, index) {
  11989. if (type == 1) {
  11990. if (index > 0) {
  11991. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  11992. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  11993. this.askJson.askJson[index - 1] = b;
  11994. this.askJson.askJson[index] = a;
  11995. }
  11996. } else {
  11997. if (index < this.askJson.askJson.length - 1) {
  11998. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  11999. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12000. this.askJson.askJson[index + 1] = b;
  12001. this.askJson.askJson[index] = a;
  12002. }
  12003. }
  12004. this.$forceUpdate();
  12005. },
  12006. checkMove(type, index, checkIndex) {
  12007. if (type == 1) {
  12008. if (checkIndex > 0) {
  12009. let a = JSON.parse(
  12010. JSON.stringify(
  12011. this.askJson.askJson[index].checkList[checkIndex - 1]
  12012. )
  12013. );
  12014. let b = JSON.parse(
  12015. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12016. );
  12017. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12018. this.askJson.askJson[index].checkList[checkIndex] = a;
  12019. }
  12020. } else {
  12021. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12022. let a = JSON.parse(
  12023. JSON.stringify(
  12024. this.askJson.askJson[index].checkList[checkIndex + 1]
  12025. )
  12026. );
  12027. let b = JSON.parse(
  12028. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12029. );
  12030. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12031. this.askJson.askJson[index].checkList[checkIndex] = a;
  12032. }
  12033. }
  12034. this.$forceUpdate();
  12035. },
  12036. testMove(type, index) {
  12037. if (type == 1) {
  12038. if (index > 0) {
  12039. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12040. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12041. this.testJson.testJson[index - 1] = b;
  12042. this.testJson.testJson[index] = a;
  12043. }
  12044. } else {
  12045. if (index < this.testJson.testJson.length - 1) {
  12046. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12047. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12048. this.testJson.testJson[index + 1] = b;
  12049. this.testJson.testJson[index] = a;
  12050. }
  12051. }
  12052. this.$forceUpdate();
  12053. },
  12054. tcheckMove(type, index, checkIndex) {
  12055. if (type == 1) {
  12056. if (checkIndex > 0) {
  12057. let a = JSON.parse(
  12058. JSON.stringify(
  12059. this.testJson.testJson[index].checkList[checkIndex - 1]
  12060. )
  12061. );
  12062. let b = JSON.parse(
  12063. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12064. );
  12065. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12066. this.testJson.testJson[index].checkList[checkIndex] = a;
  12067. }
  12068. } else {
  12069. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12070. let a = JSON.parse(
  12071. JSON.stringify(
  12072. this.testJson.testJson[index].checkList[checkIndex + 1]
  12073. )
  12074. );
  12075. let b = JSON.parse(
  12076. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12077. );
  12078. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12079. this.testJson.testJson[index].checkList[checkIndex] = a;
  12080. }
  12081. }
  12082. this.$forceUpdate();
  12083. },
  12084. addcheckList(json, index) {
  12085. // json.checkList.length++;
  12086. json.checkList.splice(index + 1, 0, "");
  12087. json.askItem++;
  12088. this.$forceUpdate();
  12089. },
  12090. deletecheckList(json, index) {
  12091. // json.checkList.length--;
  12092. json.checkList.splice(index, 1);
  12093. json.askItem--;
  12094. this.$forceUpdate();
  12095. },
  12096. addTcheckList(json, index) {
  12097. // json.checkList.length++;
  12098. json.checkList.splice(index + 1, 0, "");
  12099. json.testItem++;
  12100. this.$forceUpdate();
  12101. },
  12102. deleteTcheckList(json, index) {
  12103. // json.checkList.length--;
  12104. json.checkList.splice(index, 1);
  12105. json.testItem--;
  12106. this.$forceUpdate();
  12107. },
  12108. checkTestType(type, json) {
  12109. json.type = type;
  12110. setTimeout(() => {
  12111. json.answer = [];
  12112. }, 100);
  12113. },
  12114. checkAskType(type, json) {
  12115. json.type = type;
  12116. // json.checkList = [];
  12117. this.$forceUpdate();
  12118. },
  12119. addSelectList(json) {
  12120. json.select.push("");
  12121. json.answer.push("");
  12122. },
  12123. deleteSelectList(json) {
  12124. // json.select.length--;
  12125. // json.answer.length--;
  12126. json.select.splice(json.select.length - 1, 1);
  12127. json.answer.splice(json.answer.length - 1, 1);
  12128. },
  12129. addAsk() {
  12130. if (this.askJson.askTitle === "") {
  12131. this.$message.error("标题不能为空!");
  12132. return;
  12133. }
  12134. var aj = this.askJson.askJson;
  12135. var b = 1;
  12136. for (var i = 0; i < aj.length; i++) {
  12137. if (aj[i].askstitle === "") {
  12138. var a = 1;
  12139. for (let index = 0; index < aj[i].askItem; index++) {
  12140. const element = aj[i].checkList[index]
  12141. ? aj[i].checkList[index]
  12142. : "";
  12143. if (element != "") {
  12144. b++;
  12145. this.$message.error(`请将题目${i + 1}填写完整。`);
  12146. return;
  12147. } else {
  12148. a++;
  12149. }
  12150. }
  12151. if (b == 1) {
  12152. this.$message.error("至少填写一个问题");
  12153. return;
  12154. }
  12155. } else if (aj[i].askstitle != "") {
  12156. for (let index = 0; index < aj[i].askItem; index++) {
  12157. const element = aj[i].checkList[index]
  12158. ? aj[i].checkList[index]
  12159. : "";
  12160. var index = 0;
  12161. for (var z = 0; z < aj[i].checkList.length; z++) {
  12162. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12163. if (checkC != "") {
  12164. index++;
  12165. } else {
  12166. this.$message.error(`题目${i + 1}选项不能为空!`);
  12167. return;
  12168. }
  12169. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12170. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12171. if (checkC == checkC2) {
  12172. this.$message.error(
  12173. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12174. );
  12175. return;
  12176. }
  12177. }
  12178. }
  12179. b++;
  12180. if (index < 2) {
  12181. this.$message.error("每道题目至少需要设置2个选项。");
  12182. return;
  12183. }
  12184. }
  12185. }
  12186. }
  12187. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  12188. var elc = el.checkList.filter((element) => {
  12189. return element != "";
  12190. });
  12191. return el.askstitle != "" && elc.length != 0;
  12192. });
  12193. if (!this.dialogVisible4) {
  12194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12195. this.taskCount
  12196. ].toolChoose[this.toolIndex] = this.askJson;
  12197. }
  12198. this.dialogVisible5 = false;
  12199. if (
  12200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12201. .toolChoose[this.toolIndex].tool != 4
  12202. ) {
  12203. this.addTools(4, this.taskCount, this.toolIndex);
  12204. }
  12205. },
  12206. addTest() {
  12207. // if (this.testJson.testTitle === "") {
  12208. // this.$message.error("标题不能为空!");
  12209. // return;
  12210. // }
  12211. var aj = this.testJson.testJson;
  12212. var b = 1;
  12213. for (var i = 0; i < aj.length; i++) {
  12214. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  12215. var a = 1;
  12216. for (let index = 0; index < aj[i].testItem; index++) {
  12217. const element = aj[i].checkList[index]
  12218. ? aj[i].checkList[index]
  12219. : "";
  12220. if (element != "") {
  12221. b++;
  12222. this.$message.error(`请将题目${i + 1}填写完整。`);
  12223. return;
  12224. } else {
  12225. a++;
  12226. }
  12227. }
  12228. if (b == 1) {
  12229. this.$message.error("至少填写一个问题");
  12230. return;
  12231. }
  12232. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  12233. for (let index = 0; index < aj[i].testItem; index++) {
  12234. const element = aj[i].checkList[index]
  12235. ? aj[i].checkList[index]
  12236. : "";
  12237. var index = 0;
  12238. for (var z = 0; z < aj[i].checkList.length; z++) {
  12239. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12240. if (checkC != "") {
  12241. index++;
  12242. } else {
  12243. this.$message.error(`题目${i + 1}选项不能为空!`);
  12244. return;
  12245. }
  12246. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12247. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12248. if (checkC == checkC2) {
  12249. this.$message.error(
  12250. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12251. );
  12252. return;
  12253. }
  12254. }
  12255. }
  12256. b++;
  12257. if (index < 2) {
  12258. this.$message.error("每道题目至少需要设置2个选项。");
  12259. return;
  12260. }
  12261. if (
  12262. (aj[i].type == "2" && !aj[i].answer.length) ||
  12263. (aj[i].type == "1" &&
  12264. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  12265. (aj[i].answer !== 0 && !aj[i].answer)))
  12266. ) {
  12267. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  12268. return;
  12269. }
  12270. }
  12271. }
  12272. }
  12273. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12274. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12275. var elc = el.checkList.filter((element) => {
  12276. return element != "";
  12277. });
  12278. return (
  12279. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  12280. );
  12281. });
  12282. isTestJson.testCount = isTestJson.testJson.length;
  12283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12284. this.taskCount
  12285. ].toolChoose[this.toolIndex].testJson = isTestJson;
  12286. this.dialogVisibleChoice = false;
  12287. if (
  12288. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12289. .toolChoose[this.toolIndex].tool != 45
  12290. ) {
  12291. this.addTools(45, this.taskCount, this.toolIndex);
  12292. }
  12293. },
  12294. addVideoJson(videoJson) {
  12295. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12296. this.taskCount
  12297. ].toolChoose[this.toolIndex].videoJson = videoJson;
  12298. this.dialogVisibleVideo = false;
  12299. if (
  12300. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12301. .toolChoose[this.toolIndex].tool != 62
  12302. ) {
  12303. this.addTools(62, this.taskCount, this.toolIndex);
  12304. }
  12305. },
  12306. //自动获取剪贴板
  12307. pasteOption() {
  12308. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12309. if (!iframe) {
  12310. this.$message.error("请使用AI共创生成题目");
  12311. return;
  12312. }
  12313. let copyData = iframe.contentWindow.copyData;
  12314. if (!copyData || !copyData.selectData.length) {
  12315. this.$message.error("请使用AI共创生成题目");
  12316. return;
  12317. }
  12318. let selectData = copyData.selectData;
  12319. for (var i = 0; i < selectData.length; i++) {
  12320. let answer = 0;
  12321. switch (selectData[i].answer[0]) {
  12322. case "A":
  12323. answer = 0;
  12324. break;
  12325. case "B":
  12326. answer = 1;
  12327. break;
  12328. case "C":
  12329. answer = 2;
  12330. break;
  12331. case "D":
  12332. answer = 3;
  12333. break;
  12334. case "E":
  12335. answer = 4;
  12336. break;
  12337. default:
  12338. break;
  12339. }
  12340. this.testJson.testJson.push({
  12341. teststitle: selectData[i].subject,
  12342. testItem: selectData[i].options.length,
  12343. checkList: selectData[i].options,
  12344. timuList: [],
  12345. answer: answer,
  12346. type: "1",
  12347. });
  12348. this.testJson.testCount++;
  12349. }
  12350. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12351. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12352. var elc = el.checkList.filter((element) => {
  12353. return element != "";
  12354. });
  12355. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  12356. });
  12357. isTestJson.testCount = isTestJson.testJson.length;
  12358. if (!isTestJson.testCount) {
  12359. return;
  12360. }
  12361. this.testJson = isTestJson;
  12362. this.$forceUpdate();
  12363. },
  12364. pasteTask(taskJson) {
  12365. let stageTasksData = [];
  12366. if (taskJson) {
  12367. stageTasksData = taskJson;
  12368. } else {
  12369. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12370. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12371. if (!iframe && !iframe2) {
  12372. this.$message.error("请使用AI共创生成");
  12373. return;
  12374. }
  12375. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12376. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12377. if (
  12378. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  12379. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  12380. ) {
  12381. this.$message.error("请使用AI共创生成");
  12382. return;
  12383. }
  12384. stageTasksData = copyData
  12385. ? copyData.tasksData
  12386. : copyData2
  12387. ? copyData2.tasksData
  12388. : [{ taskName: "", taskDecs: "" }];
  12389. }
  12390. let taskA = [];
  12391. let tasks = stageTasksData;
  12392. for (var j = 0; j < tasks.length; j++) {
  12393. taskA.push({
  12394. task: tasks[j].taskName,
  12395. taskDetail: tasks[j].taskDecs,
  12396. chapterData: [],
  12397. toolText: "",
  12398. toolChoose: [
  12399. {
  12400. tool: [],
  12401. toolDetail: "",
  12402. toolType: 0,
  12403. askCount: 1,
  12404. askTitle: "",
  12405. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12406. },
  12407. ],
  12408. isShowTools: false,
  12409. askCount: 1,
  12410. isFold: 1,
  12411. askTitle: "",
  12412. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12413. checkJson: [{ checkCount: [], checkPerent: [] }],
  12414. homeworkList: [],
  12415. });
  12416. }
  12417. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  12418. this.$forceUpdate();
  12419. },
  12420. pasteStage(stageJson) {
  12421. let stageData = [];
  12422. if (stageJson) {
  12423. stageData = stageJson;
  12424. } else {
  12425. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12426. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12427. if (!iframe && !iframe2) {
  12428. this.$message.error("请使用AI共创生成");
  12429. return;
  12430. }
  12431. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12432. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12433. if (
  12434. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12435. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12436. ) {
  12437. this.$message.error("请使用AI共创生成");
  12438. return;
  12439. }
  12440. stageData = copyData
  12441. ? copyData.stageData
  12442. : copyData2
  12443. ? copyData2.stageData
  12444. : [""];
  12445. }
  12446. let stage = [];
  12447. for (var i = 0; i < stageData.length; i++) {
  12448. stage.push({
  12449. dyName: stageData[i], //单元标题
  12450. chapterInfo: [
  12451. {
  12452. isread: false,
  12453. chapterid: this.guid(),
  12454. title: "",
  12455. courseName: "",
  12456. taskJson: [
  12457. {
  12458. task: "",
  12459. taskDetail: "",
  12460. chapterData: [],
  12461. toolText: "",
  12462. toolChoose: [
  12463. {
  12464. tool: [],
  12465. toolDetail: "",
  12466. toolType: 0,
  12467. askCount: 1,
  12468. askTitle: "",
  12469. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12470. },
  12471. ],
  12472. isShowTools: false,
  12473. askCount: 1,
  12474. isFold: 1,
  12475. askTitle: "",
  12476. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12477. checkJson: [{ checkCount: [], checkPerent: [] }],
  12478. homeworkList: [],
  12479. },
  12480. ],
  12481. itemCount: 1,
  12482. fileList1: [],
  12483. video: [],
  12484. testData: [],
  12485. pData: [],
  12486. templateArray: [],
  12487. },
  12488. ],
  12489. });
  12490. }
  12491. let _this = this;
  12492. if (stageJson) {
  12493. if (!_this.cid) {
  12494. _this.unitJson = stage;
  12495. } else {
  12496. _this.unitIndex = 0;
  12497. _this.unitJson = stage;
  12498. _this.updateWork();
  12499. }
  12500. } else {
  12501. _this
  12502. .$confirm(
  12503. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  12504. "提示",
  12505. {
  12506. confirmButtonText: "确定",
  12507. cancelButtonText: "取消",
  12508. type: "warning",
  12509. }
  12510. )
  12511. .then(() => {
  12512. _this.unitIndex = 0;
  12513. _this.unitJson = stage;
  12514. // _this.steps++;
  12515. _this.updateWork();
  12516. })
  12517. .catch(() => {
  12518. return;
  12519. });
  12520. }
  12521. },
  12522. openStageBox() {
  12523. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  12524. this.dialogVisibleStageChange = true;
  12525. },
  12526. updateChange() {
  12527. this.$confirm(
  12528. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  12529. "提示",
  12530. {
  12531. confirmButtonText: "确定",
  12532. cancelButtonText: "取消",
  12533. type: "warning",
  12534. }
  12535. )
  12536. .then(() => {
  12537. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  12538. this.updateWork();
  12539. this.dialogVisibleStageChange = false;
  12540. })
  12541. .catch(() => {
  12542. return;
  12543. });
  12544. },
  12545. addAnswer() {
  12546. if (this.answerQ == "") {
  12547. this.$message.error("请输入您想要问的问题");
  12548. return;
  12549. }
  12550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12551. this.taskCount
  12552. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12553. this.dialogVisible8 = false;
  12554. if (
  12555. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12556. .toolChoose[this.toolIndex].tool != 15
  12557. ) {
  12558. this.addTools(15, this.taskCount, this.toolIndex);
  12559. }
  12560. },
  12561. addMp3Answer() {
  12562. if (this.answerQ == "") {
  12563. this.$message.error("请输入您想要回答的问题");
  12564. return;
  12565. }
  12566. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12567. this.taskCount
  12568. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12569. this.dialogVisibleMp3 = false;
  12570. },
  12571. addRateAnswer() {
  12572. var a = 1;
  12573. for (var i = 0; i < this.rateJson.length; i++) {
  12574. if (this.rateJson[i].value == "") {
  12575. a = 2;
  12576. break;
  12577. }
  12578. }
  12579. if (a == 2) {
  12580. this.$message.error("请把评价信息填写完整");
  12581. return;
  12582. }
  12583. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12584. this.taskCount
  12585. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  12586. this.dialogVisibleRate = false;
  12587. if (
  12588. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12589. .toolChoose[this.toolIndex].tool != 40
  12590. ) {
  12591. this.addTools(40, this.taskCount, this.toolIndex);
  12592. }
  12593. },
  12594. addSelectAnswer() {
  12595. if (this.selectJson.url == "") {
  12596. this.$message.error("请上传题目");
  12597. return;
  12598. }
  12599. if (!this.selectJson.select.length) {
  12600. this.$message.error("请添加选项");
  12601. return;
  12602. }
  12603. if (!this.selectJson.answer.length) {
  12604. this.$message.error("请设置答案");
  12605. return;
  12606. }
  12607. var a = 1;
  12608. for (var i = 0; i < this.selectJson.answer.length; i++) {
  12609. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  12610. a = 2;
  12611. }
  12612. }
  12613. if (a == 2) {
  12614. this.$message.error("请设置答案");
  12615. return;
  12616. }
  12617. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12618. this.taskCount
  12619. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  12620. this.dialogVisibleSelect = false;
  12621. if (
  12622. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12623. .toolChoose[this.toolIndex].tool != 41
  12624. ) {
  12625. this.addTools(41, this.taskCount, this.toolIndex);
  12626. }
  12627. },
  12628. nextSelectSteps() {
  12629. if (this.selectJson.url == "") {
  12630. this.$message.error("请上传题目");
  12631. return;
  12632. }
  12633. if (!this.selectJson.select.length) {
  12634. this.$message.error("请添加选项");
  12635. return;
  12636. } else {
  12637. for (var z = 0; z < this.selectJson.select.length; z++) {
  12638. let checkC = this.selectJson.select[z];
  12639. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  12640. let checkC2 = this.selectJson.select[z2];
  12641. if (checkC == checkC2) {
  12642. this.$message.error(
  12643. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12644. );
  12645. return;
  12646. }
  12647. }
  12648. }
  12649. }
  12650. var a = 1;
  12651. for (var i = 0; i < this.selectJson.select.length; i++) {
  12652. if (!this.selectJson.select[i]) {
  12653. a = 2;
  12654. }
  12655. }
  12656. if (a == 2) {
  12657. this.$message.error("添加的选项不能为空");
  12658. return;
  12659. }
  12660. this.selectSteps++;
  12661. },
  12662. selectCourseDetail() {
  12663. if (this.cid == "" || this.cid == undefined) {
  12664. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  12665. this.isTeacherSee = true;
  12666. }
  12667. console.log("这是新增课程");
  12668. this.selectAllType();
  12669. } else {
  12670. this.isOutline = true
  12671. this.isOutline2 = true
  12672. this.cpoteType = 4
  12673. this.cidType = 1;
  12674. let params = {
  12675. cid: this.cid,
  12676. };
  12677. this.ajax
  12678. .get(this.$store.state.api + "select_course_detail", params)
  12679. .then((res) => {
  12680. this.unitJson = JSON.parse(res.data[0][0].chapters);
  12681. this.courseState = res.data[0][0].state;
  12682. for (var j = 0; j < this.unitJson.length; j++) {
  12683. for (
  12684. var k = 0;
  12685. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  12686. k++
  12687. ) {
  12688. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  12689. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12690. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12691. : [];
  12692. let _chapterData = [];
  12693. for (
  12694. var c = 0;
  12695. c <
  12696. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  12697. .length;
  12698. c++
  12699. ) {
  12700. if (
  12701. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12702. ) {
  12703. _chapterData.push(
  12704. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12705. );
  12706. }
  12707. }
  12708. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  12709. _chapterData;
  12710. }
  12711. }
  12712. this.$forceUpdate();
  12713. this.courseName = res.data[0][0].title;
  12714. this.courseText = res.data[0][0].brief;
  12715. this.courseText2 = res.data[0][0].reBrief;
  12716. this.evalua = res.data[0][0].evaId;
  12717. this.cover = JSON.parse(res.data[0][0].cover);
  12718. this.noneBtnImg = this.cover.length >= 1;
  12719. if (res.data[0][0].refile) {
  12720. this.infoData = JSON.parse(res.data[0][0].refile)
  12721. }
  12722. // this.checkboxList =
  12723. // res.data[0][0].course_student.length > 0
  12724. // ? JSON.parse(res.data[0][0].course_student)
  12725. // : [];
  12726. this.checkboxList2 = res.data[0][0].juri
  12727. ? res.data[0][0].juri.split(",")
  12728. : [];
  12729. this.inviteCode = [];
  12730. for (var i = 0; i < res.data[2].length; i++) {
  12731. this.inviteCode.push({
  12732. cid: res.data[2][i].classid,
  12733. ic: res.data[2][i].code,
  12734. });
  12735. }
  12736. this.checkboxList3 = res.data[0][0].course_teacher
  12737. ? res.data[0][0].course_teacher.split(",")
  12738. : [];
  12739. // this.isTeacherSee =
  12740. // res.data[0][0].is_teacher_look == 0 ? true : false;
  12741. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12742. this.myWord = res.data[0][0].template;
  12743. this.templateC.id = "123";
  12744. this.courseUserid = res.data[0][0].userid;
  12745. // if(this.courseUserid == this.userid){
  12746. // this.InviteChange(this.checkboxList2)
  12747. // }
  12748. this.nbOrder = res.data[0][0].ordernumber;
  12749. this.courseTypeId = [];
  12750. for (var i = 0; i < res.data[1].length; i++) {
  12751. this.courseTypeId.push(res.data[1][i].typeid);
  12752. }
  12753. console.log(this.courseTypeId);
  12754. // if (this.timer) clearInterval(this.timer);
  12755. if (this.timer) clearTimeout(this.timer);
  12756. this.timer = null;
  12757. // this.timer = setInterval(() => {
  12758. if(res.data[3].length){
  12759. try {
  12760. this.aiJson = JSON.parse(res.data[3][0].tips);
  12761. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12762. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12763. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12764. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12765. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12766. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12767. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12768. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12769. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12770. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12771. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12772. }
  12773. this.templateid = res.data[3][0].template;
  12774. }catch(error){
  12775. console.error(error)
  12776. }
  12777. }
  12778. if(res.data[0][0].cpote){
  12779. try {
  12780. this.cpote = JSON.parse(res.data[0][0].cpote);
  12781. }catch(error){
  12782. console.error(error)
  12783. }
  12784. }
  12785. if(res.data[0][0].setting){
  12786. try {
  12787. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12788. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12789. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12790. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12791. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12792. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12793. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12794. 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;
  12795. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12796. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12797. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12798. this.courseTextBool = true
  12799. }
  12800. if(!this.teacherCourseText && !this.teacherCourseText){
  12801. this.isuseT = false
  12802. }
  12803. }catch(error){
  12804. console.error(error)
  12805. }
  12806. }
  12807. if(this.courseText){
  12808. this.courseTextB = false
  12809. }
  12810. if(this.teacherCourseText){
  12811. this.teacherCourseTextB = false
  12812. }
  12813. if(this.targetCourseText){
  12814. this.targetCourseTextB = false
  12815. }
  12816. if(this.targetCourseText2){
  12817. this.targetCourseText2B = false
  12818. }
  12819. this.isFileSearch = res.data[0][0].iresearch == 1
  12820. this.seleteCourseUpdate();
  12821. this.setMan();
  12822. this.selectAllType();
  12823. this.unitJson[
  12824. this.unitIndex
  12825. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12826. // }, 5000);
  12827. this.$forceUpdate();
  12828. setTimeout(() => {
  12829. this.checkEva(this.evalua);
  12830. setTimeout(() => {
  12831. this.checkEva(this.evalua);
  12832. }, 100);
  12833. }, 100);
  12834. })
  12835. .catch((err) => {
  12836. console.error(err);
  12837. });
  12838. }
  12839. if(this.aiId){
  12840. let params = {
  12841. cid: this.aiId,
  12842. };
  12843. this.ajax
  12844. .get(this.$store.state.api + "select_course_detail", params)
  12845. .then((res) => {
  12846. let _unitJson = JSON.parse(res.data[0][0].chapters);
  12847. let fileInfo = []
  12848. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  12849. for(var i = 0; i < _unitJson.length; i++){
  12850. let tasks = _unitJson[i].chapterInfo[0].taskJson
  12851. for(var j = 0; j < tasks.length; j++){
  12852. let _infoData = tasks[j].chapterData.filter(el => {
  12853. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  12854. })
  12855. if(_infoData.length){
  12856. fileInfo = [...fileInfo, ..._infoData]
  12857. }
  12858. }
  12859. }
  12860. this.infoData = fileInfo
  12861. this.$forceUpdate();
  12862. this.courseName = res.data[0][0].title;
  12863. this.courseText = res.data[0][0].brief;
  12864. this.courseText2 = res.data[0][0].reBrief;
  12865. this.cover = JSON.parse(res.data[0][0].cover);
  12866. this.noneBtnImg = this.cover.length >= 1;
  12867. this.checkboxList2 = res.data[0][0].juri
  12868. ? res.data[0][0].juri.split(",")
  12869. : [];
  12870. this.inviteCode = [];
  12871. for (var i = 0; i < res.data[2].length; i++) {
  12872. this.inviteCode.push({
  12873. cid: res.data[2][i].classid,
  12874. ic: res.data[2][i].code,
  12875. });
  12876. }
  12877. this.checkboxList3 = res.data[0][0].course_teacher
  12878. ? res.data[0][0].course_teacher.split(",")
  12879. : [];
  12880. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12881. this.myWord = res.data[0][0].template;
  12882. this.templateC.id = "123";
  12883. this.courseTypeId = [];
  12884. for (var i = 0; i < res.data[1].length; i++) {
  12885. this.courseTypeId.push(res.data[1][i].typeid);
  12886. }
  12887. console.log(this.courseTypeId);
  12888. if(res.data[3].length){
  12889. try {
  12890. this.aiJson = JSON.parse(res.data[3][0].tips);
  12891. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12892. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12893. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12894. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12895. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12896. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12897. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12898. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12899. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12900. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12901. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12902. }
  12903. this.templateid = res.data[3][0].template;
  12904. }catch(error){
  12905. console.error(error)
  12906. }
  12907. }
  12908. if(res.data[0][0].cpote){
  12909. try {
  12910. this.cpote = JSON.parse(res.data[0][0].cpote);
  12911. }catch(error){
  12912. console.error(error)
  12913. }
  12914. }
  12915. if(res.data[0][0].setting){
  12916. try {
  12917. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12918. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12919. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12920. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12921. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12922. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12923. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12924. 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;
  12925. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12926. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12927. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12928. this.courseTextBool = true
  12929. }
  12930. if(!this.teacherCourseText && !this.teacherCourseText){
  12931. this.isuseT = false
  12932. }
  12933. }catch(error){
  12934. console.error(error)
  12935. }
  12936. }
  12937. if(this.courseText){
  12938. this.courseTextB = false
  12939. }
  12940. if(this.teacherCourseText){
  12941. this.teacherCourseTextB = false
  12942. }
  12943. if(this.targetCourseText){
  12944. this.targetCourseTextB = false
  12945. }
  12946. if(this.targetCourseText2){
  12947. this.targetCourseText2B = false
  12948. }
  12949. this.setMan();
  12950. this.unitJson[
  12951. this.unitIndex
  12952. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12953. this.$forceUpdate();
  12954. setTimeout(() => {
  12955. this.checkEva(this.evalua);
  12956. setTimeout(() => {
  12957. this.checkEva(this.evalua);
  12958. }, 100);
  12959. }, 100);
  12960. })
  12961. .catch((err) => {
  12962. console.error(err);
  12963. });
  12964. }
  12965. // if(this.cidType != 1 && this.templateid == ''){
  12966. // this.promptShow = true
  12967. // }
  12968. },
  12969. seleteCourseUpdate() {
  12970. let params = {
  12971. cid: this.cid,
  12972. };
  12973. this.ajax
  12974. .get(this.$store.state.api + "select_course_detail", params)
  12975. .then((res) => {
  12976. // console.log(this.unitJson);
  12977. let unitJson = JSON.parse(res.data[0][0].chapters);
  12978. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  12979. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  12980. let _unitJson = [];
  12981. let _chapAarry = [];
  12982. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  12983. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  12984. let index = 1;
  12985. let chapindex;
  12986. if (_unitJson2.length > unitJson.length) {
  12987. for (let c = 0; c < _unitJson2.length; c++) {
  12988. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  12989. }
  12990. for (let j = 0; j < unitJson.length; j++) {
  12991. let count = 0;
  12992. for (let k = 0; k < _unitJson2.length; k++) {
  12993. if (
  12994. unitJson[j].chapterInfo[0].chapterid ==
  12995. _unitJson2[k].chapterInfo[0].chapterid
  12996. ) {
  12997. count++;
  12998. _chapAarry.splice(
  12999. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13000. 1
  13001. );
  13002. _unitJson.push(unitJson[j]);
  13003. break;
  13004. }
  13005. }
  13006. // if(count === 0){
  13007. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13008. // }
  13009. }
  13010. for (let k = 0; k < _unitJson2.length; k++) {
  13011. if (_unitJson2[k].isUpdate == 1) {
  13012. _chapAarry.splice(
  13013. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13014. 1
  13015. );
  13016. _unitJson.push(_unitJson2[k]);
  13017. }
  13018. }
  13019. console.log(_chapAarry);
  13020. for (let d = 0; d < _unitJson2.length; d++) {
  13021. if (
  13022. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13023. ) {
  13024. if (_unitIndex == d) {
  13025. index = 2;
  13026. }
  13027. chapindex = d;
  13028. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13029. }
  13030. }
  13031. } else {
  13032. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13033. }
  13034. for (let i = 0; i < unitJson.length; i++) {
  13035. if (
  13036. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13037. _unitJson[i].chapterInfo[0].chapterid !=
  13038. unitJson[i].chapterInfo[0].chapterid
  13039. ) {
  13040. if (i == _unitJson.length - 1) {
  13041. // this.unitIndex++
  13042. _unitIndex2++;
  13043. }
  13044. _unitJson.splice(i, 0, unitJson[i]);
  13045. } else if (i > _unitJson.length - 1) {
  13046. _unitJson.push(unitJson[i]);
  13047. } else if (
  13048. _unitJson[i].chapterInfo[0].chapterid ==
  13049. unitJson[i].chapterInfo[0].chapterid
  13050. ) {
  13051. _unitJson[i] = unitJson[i];
  13052. }
  13053. // if (i == _unitIndex) {
  13054. // continue;
  13055. // } else
  13056. }
  13057. if (_chapAarry.length && index != 2) {
  13058. if (chapindex < _unitIndex) {
  13059. this.isDelete = 2;
  13060. // this.unitIndex--;
  13061. _unitIndex2--;
  13062. } else if (
  13063. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13064. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13065. ) {
  13066. this.isDelete = 2;
  13067. for (let n = 0; n < _unitJson.length; n++) {
  13068. if (
  13069. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13070. _unitJson[n].chapterInfo[0].chapterid
  13071. ) {
  13072. // this.unitIndex = n;
  13073. _unitIndex2 = n;
  13074. _unitJson[n] = _unitJson2[_unitIndex];
  13075. break;
  13076. }
  13077. }
  13078. }
  13079. } else if (index != 2) {
  13080. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13081. _unitJson2[_unitIndex];
  13082. for (
  13083. var ci = 0;
  13084. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13085. ci++
  13086. ) {
  13087. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13088. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13089. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13090. .toolChoose
  13091. : [];
  13092. let _chapterData = [];
  13093. for (
  13094. var c = 0;
  13095. c <
  13096. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13097. .length;
  13098. c++
  13099. ) {
  13100. if (
  13101. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13102. .chapterData[c]
  13103. ) {
  13104. _chapterData.push(
  13105. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13106. .chapterData[c]
  13107. );
  13108. }
  13109. }
  13110. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13111. _chapterData;
  13112. }
  13113. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13114. }
  13115. if (index == 1) {
  13116. this.unitJson = _unitJson;
  13117. this.$forceUpdate();
  13118. setTimeout(() => {
  13119. if (this.unitIndex != _unitIndex2) {
  13120. this.isDelete = 2;
  13121. this.unitIndex = _unitIndex2;
  13122. }
  13123. }, 0);
  13124. this.timer = setTimeout(() => {
  13125. this.seleteCourseUpdate();
  13126. }, 1000);
  13127. } else if (index == 2) {
  13128. let _this = this;
  13129. _this
  13130. .$confirm(
  13131. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13132. "提示",
  13133. {
  13134. confirmButtonText: "需要",
  13135. cancelButtonText: "取消",
  13136. type: "warning",
  13137. }
  13138. )
  13139. .then(() => {
  13140. if (_this.time()) {
  13141. _this.restoreWork(
  13142. _chapAarry[0],
  13143. _unitJson,
  13144. chapindex,
  13145. _unitJson2,
  13146. _unitIndex2
  13147. );
  13148. }
  13149. })
  13150. .catch(() => {
  13151. _this.unitJson = _unitJson;
  13152. _this.$forceUpdate();
  13153. setTimeout(() => {
  13154. if (this.unitIndex != _unitIndex2) {
  13155. this.isDelete = 2;
  13156. this.unitIndex = _unitIndex2;
  13157. }
  13158. }, 0);
  13159. _this.timer = setTimeout(() => {
  13160. _this.seleteCourseUpdate();
  13161. }, 1000);
  13162. });
  13163. }
  13164. // 在复制操作之前记录滚动位置
  13165. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13166. // 执行复制操作
  13167. // 复制操作完成后恢复滚动位置
  13168. this.$nextTick(() => {
  13169. if (this.$refs.scrollContainer) {
  13170. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13171. }
  13172. });
  13173. })
  13174. .catch((err) => {
  13175. console.error(err);
  13176. });
  13177. },
  13178. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  13179. let params = [
  13180. {
  13181. cid: this.cid,
  13182. chapters: JSON.stringify(this.unitJson),
  13183. uid: this.userid,
  13184. chapid: chapid,
  13185. },
  13186. ];
  13187. this.ajax
  13188. .post(this.$store.state.api + "restoreWork", params)
  13189. .then((res) => {
  13190. this.$message({
  13191. message: "恢复成功",
  13192. type: "success",
  13193. });
  13194. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  13195. this.unitJson = unitJson;
  13196. this.$forceUpdate();
  13197. setTimeout(() => {
  13198. if (this.unitIndex != unitIndex2) {
  13199. this.isDelete = 2;
  13200. this.unitIndex = unitIndex2;
  13201. }
  13202. }, 0);
  13203. this.timer = setTimeout(() => {
  13204. this.seleteCourseUpdate();
  13205. }, 1000);
  13206. })
  13207. .catch((err) => {
  13208. this.$message.error("网络不佳");
  13209. console.error(err);
  13210. });
  13211. },
  13212. getTypeName() {
  13213. console.log(this.courseTypeId);
  13214. this.$forceUpdate();
  13215. },
  13216. selectAllType() {
  13217. let params = {
  13218. org: this.org && this.org != "" ? this.org : "",
  13219. oid: this.oid && this.oid != "" ? this.oid : "",
  13220. };
  13221. this.ajax
  13222. .get(this.$store.state.api + "selectAllType", params)
  13223. .then((res) => {
  13224. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13225. res.data[0] = [...res.data[0], ...res.data[4]];
  13226. }
  13227. this.CourseType = res.data;
  13228. this.CourseType2 = [
  13229. { name: "智见课程", id: [] },
  13230. { name: "智行课程", id: [] },
  13231. { name: "智创课程", id: [] },
  13232. ];
  13233. for (var cti = 0; cti < res.data[0].length; cti++) {
  13234. if (
  13235. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13236. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  13237. ) {
  13238. this.CourseType2[0].id.push(res.data[0][cti].id);
  13239. } else if (
  13240. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  13241. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13242. ) {
  13243. this.CourseType2[1].id.push(res.data[0][cti].id);
  13244. } else if (
  13245. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13246. ) {
  13247. this.CourseType2[2].id.push(res.data[0][cti].id);
  13248. }
  13249. if (
  13250. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13251. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  13252. ) {
  13253. res.data[0][cti].name = "年级";
  13254. } else if (
  13255. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  13256. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13257. ) {
  13258. res.data[0][cti].name = "学科";
  13259. } else if (
  13260. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13261. ) {
  13262. res.data[0][cti].name = "主题";
  13263. }
  13264. }
  13265. let _courseTypeId = [];
  13266. for (var i = 0; i < res.data[0].length; i++) {
  13267. if (!this.cid) {
  13268. this.courseTypeId[res.data[0][i].id] = [];
  13269. }
  13270. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  13271. // }
  13272. this.CourseTypeJson[res.data[0][i].id] = [];
  13273. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13274. if (res.data[0][i].name == "栏目") {
  13275. this.CourseType[0][i].name = "主题";
  13276. }
  13277. }
  13278. if (res.data[2].length == 0 && res.data[3].length == 0) {
  13279. for (var j = 0; j < res.data[1].length; j++) {
  13280. if (
  13281. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  13282. _courseTypeId.indexOf(res.data[1][j].id) == -1
  13283. ) {
  13284. _courseTypeId.push(res.data[1][j].id);
  13285. }
  13286. if (res.data[0][i].id == res.data[1][j].pid) {
  13287. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13288. }
  13289. }
  13290. } else {
  13291. if (res.data[2].length > 0) {
  13292. for (var j = 0; j < res.data[2].length; j++) {
  13293. if (
  13294. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  13295. _courseTypeId.indexOf(res.data[2][j].id) == -1
  13296. ) {
  13297. _courseTypeId.push(res.data[2][j].id);
  13298. }
  13299. if (res.data[0][i].id == res.data[2][j].pid) {
  13300. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  13301. }
  13302. }
  13303. }
  13304. if (res.data[3].length > 0) {
  13305. for (var j = 0; j < res.data[3].length; j++) {
  13306. if (
  13307. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  13308. _courseTypeId.indexOf(res.data[3][j].id) == -1
  13309. ) {
  13310. _courseTypeId.push(res.data[3][j].id);
  13311. }
  13312. if (res.data[0][i].id == res.data[3][j].pid) {
  13313. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  13314. }
  13315. }
  13316. }
  13317. }
  13318. }
  13319. this.courseTypeId = _courseTypeId;
  13320. })
  13321. .catch((err) => {
  13322. console.error(err);
  13323. });
  13324. },
  13325. selectType() {
  13326. this.ajax
  13327. .get(this.$store.state.api + "selectType")
  13328. .then((res) => {
  13329. this.CourseType = res.data;
  13330. for (var i = 0; i < res.data[0].length; i++) {
  13331. if (!this.cid) {
  13332. this.courseTypeId[res.data[0][i].id] = "";
  13333. }
  13334. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13335. if (res.data[0][i].name == "栏目") {
  13336. this.CourseType[0][i].name = "主题";
  13337. }
  13338. }
  13339. for (var j = 0; j < res.data[1].length; j++) {
  13340. if (res.data[0][i].id == res.data[1][j].pid) {
  13341. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13342. this.CourseTypeJson[res.data[0][i].id] = [];
  13343. }
  13344. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13345. }
  13346. }
  13347. }
  13348. this.selectTypeByOid();
  13349. this.selectTypeByOrg();
  13350. })
  13351. .catch((err) => {
  13352. console.error(err);
  13353. });
  13354. },
  13355. selectTypeByOid() {
  13356. let params = {
  13357. oid: this.oid,
  13358. };
  13359. this.ajax
  13360. .get(this.$store.state.api + "selectTypeByOid", params)
  13361. .then((res) => {
  13362. for (var i = 0; i < res.data[0].length; i++) {
  13363. for (var j = 0; j < res.data[1].length; j++) {
  13364. if (res.data[0][i].id == res.data[1][j].pid) {
  13365. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13366. this.CourseTypeJson[res.data[0][i].id] = [];
  13367. }
  13368. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13369. }
  13370. }
  13371. }
  13372. })
  13373. .catch((err) => {
  13374. console.error(err);
  13375. });
  13376. },
  13377. selectTypeByOrg() {
  13378. let params = {
  13379. oid: this.org,
  13380. };
  13381. this.ajax
  13382. .get(this.$store.state.api + "selectTypeByOrg", params)
  13383. .then((res) => {
  13384. for (var i = 0; i < res.data[0].length; i++) {
  13385. for (var j = 0; j < res.data[1].length; j++) {
  13386. if (res.data[0][i].id == res.data[1][j].pid) {
  13387. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13388. this.CourseTypeJson[res.data[0][i].id] = [];
  13389. }
  13390. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13391. }
  13392. }
  13393. }
  13394. this.$forceUpdate();
  13395. })
  13396. .catch((err) => {
  13397. console.error(err);
  13398. });
  13399. },
  13400. OtherMb(type, task) {
  13401. if (task === 0 || task) {
  13402. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13403. task
  13404. ].isEvaFold = true;
  13405. }
  13406. this.typeMode = type;
  13407. setTimeout(() => {
  13408. this.checkEva(this.checkId);
  13409. setTimeout(() => {
  13410. this.checkEva(this.checkId);
  13411. }, 100);
  13412. }, 100);
  13413. },
  13414. openMember() {
  13415. this.searchTN = "";
  13416. this.getTeacher();
  13417. this.dialogVisibleMember = true;
  13418. },
  13419. checkEva(id, type) {
  13420. this.dialogVisiblemb = false;
  13421. this.selectEva();
  13422. if (this.evalua != id && type == 2) {
  13423. this.$message.success("导入成功");
  13424. setTimeout(() => {
  13425. this.checkEva(id);
  13426. }, 100);
  13427. }
  13428. this.evalua = id;
  13429. this.checkId = id;
  13430. if (this.evalua != "") {
  13431. for (var i = 0; i < this.evaJuri.length; i++) {
  13432. if (this.evalua == this.evaJuri[i].id) {
  13433. this.eTitle = this.evaJuri[i].title;
  13434. this.eJson = JSON.parse(this.evaJuri[i].content);
  13435. }
  13436. }
  13437. this.data.data = [];
  13438. this.$forceUpdate();
  13439. setTimeout(() => {
  13440. this.setMindData();
  13441. }, 1000);
  13442. }
  13443. },
  13444. deleteEva() {
  13445. let _this = this;
  13446. if (_this.evalua == "") {
  13447. this.$message.warning("内容已经清空了,请勿重复清空");
  13448. return;
  13449. }
  13450. _this
  13451. .$confirm("确定删除此目标吗?", "提示", {
  13452. confirmButtonText: "确定",
  13453. cancelButtonText: "取消",
  13454. type: "warning",
  13455. })
  13456. .then(() => {
  13457. _this.evalua = "";
  13458. _this.checkId = "";
  13459. _this.eTitle = "";
  13460. let _unitJson = _this.unitJson;
  13461. for (var i = 0; i < _unitJson.length; i++) {
  13462. let _task = _unitJson[i].chapterInfo[0].taskJson;
  13463. for (var j = 0; j < _task.length; j++) {
  13464. let _eList = _task[j].eList;
  13465. for (var k = 0; k < _eList.length; k++) {
  13466. delete _eList[k].target;
  13467. }
  13468. }
  13469. }
  13470. _this.$forceUpdate();
  13471. if (_this.cid) {
  13472. _this.updateWork();
  13473. }
  13474. })
  13475. .catch(() => {
  13476. return;
  13477. });
  13478. },
  13479. selectEva() {
  13480. let params = {
  13481. oid: this.oid,
  13482. };
  13483. this.ajax
  13484. .get(this.$store.state.api + "selectAllEvaluation", params)
  13485. .then((res) => {
  13486. this.evaJuri = res.data[0];
  13487. // 在复制操作之前记录滚动位置
  13488. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13489. // 执行复制操作
  13490. // 复制操作完成后恢复滚动位置
  13491. this.$nextTick(() => {
  13492. if (this.$refs.scrollContainer) {
  13493. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13494. }
  13495. });
  13496. })
  13497. .catch((err) => {
  13498. console.error(err);
  13499. });
  13500. },
  13501. setMindData() {
  13502. let targetArray = [];
  13503. this.data.data = [];
  13504. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  13505. let _eJson = Object.keys(this.eJson);
  13506. let _e = this.eJson;
  13507. for (let i = 0; i < _eJson.length; i++) {
  13508. let element = _e[_eJson[i]];
  13509. this.data.data.push({
  13510. id: element.id,
  13511. parentid: "root",
  13512. topic: element.name,
  13513. });
  13514. // targetArray.push({
  13515. // id: element.id,
  13516. // parentid: "root",
  13517. // name: element.name,
  13518. // });
  13519. targetArray.push({
  13520. value: element.name,
  13521. label: element.name,
  13522. children: [],
  13523. });
  13524. let _eJsonc = Object.keys(element.child);
  13525. let _e2 = element.child;
  13526. for (let j = 0; j < _eJsonc.length; j++) {
  13527. let _ec = _e2[_eJsonc[j]];
  13528. this.data.data.push({
  13529. id: _ec.id,
  13530. parentid: element.id,
  13531. topic: _ec.name,
  13532. });
  13533. // targetArray.push({
  13534. // id: _ec.id,
  13535. // parentid: element.id,
  13536. // name: _ec.name,
  13537. // });
  13538. targetArray[i].children.push({
  13539. value: _ec.name,
  13540. label: _ec.name,
  13541. children: [],
  13542. });
  13543. let _eJsonz = Object.keys(_ec.child);
  13544. let _e3 = _ec.child;
  13545. for (let z = 0; z < _eJsonz.length; z++) {
  13546. let _ez = _e3[_eJsonz[z]];
  13547. this.data.data.push({
  13548. id: _ez.id,
  13549. parentid: _ec.id,
  13550. topic: _ez.name,
  13551. });
  13552. // targetArray.push({
  13553. // id: _ez.id,
  13554. // parentid: _ec.id,
  13555. // name: _ez.name,
  13556. // });
  13557. targetArray[i].children[j].children.push({
  13558. value: _ez.name,
  13559. label: _ez.name,
  13560. });
  13561. }
  13562. }
  13563. }
  13564. this.targetArray = targetArray;
  13565. this.$forceUpdate();
  13566. },
  13567. /*添加评价 */
  13568. addEList(index, tIndex) {
  13569. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  13570. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  13571. value: "",
  13572. detail: "",
  13573. score: 5,
  13574. })
  13575. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  13576. { value: "", detail: "", score: 5 },
  13577. ]);
  13578. this.$forceUpdate();
  13579. },
  13580. openEList(index, tIndex) {
  13581. this.evaIndex = index;
  13582. this.evatIndex = tIndex;
  13583. this.evaBoxDialog = true;
  13584. },
  13585. addCET(index, tIndex) {
  13586. this.cetIndex = index;
  13587. this.cettIndex = tIndex;
  13588. this.selectAllType1();
  13589. },
  13590. addCETemplate() {
  13591. var array =
  13592. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  13593. .eList;
  13594. let params = [
  13595. {
  13596. uid: this.userid,
  13597. n: this.templateName,
  13598. json: JSON.stringify(array),
  13599. t: 1,
  13600. oid: this.oid,
  13601. },
  13602. ];
  13603. this.ajax
  13604. .post(this.$store.state.api + "addCETShare", params)
  13605. .then((res) => {
  13606. this.addTypeByCET(res.data[0][0].id);
  13607. })
  13608. .catch((err) => {
  13609. this.$message.error("网络不佳");
  13610. console.error(err);
  13611. });
  13612. },
  13613. addTypeByCET(id) {
  13614. if (this.setTypeJson.two == "") {
  13615. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  13616. return;
  13617. }
  13618. let params = {
  13619. cid: id,
  13620. };
  13621. this.ajax
  13622. .get(this.$store.state.api + "deleteCETLabel", params)
  13623. .then((res) => {
  13624. for (var i = 0; i < 2; i++) {
  13625. let tid = "";
  13626. if (i == 0) {
  13627. tid = this.setTypeJson.one;
  13628. } else {
  13629. tid = this.setTypeJson.two;
  13630. }
  13631. let params = [
  13632. {
  13633. cid: id,
  13634. tid: tid,
  13635. uid: this.userid,
  13636. },
  13637. ];
  13638. this.ajax
  13639. .post(this.$store.state.api + "addCETLabel", params)
  13640. .then((res) => {
  13641. this.$message({
  13642. message: "添加成功",
  13643. type: "success",
  13644. });
  13645. this.close();
  13646. })
  13647. .catch((err) => {
  13648. this.$message.error("网络不佳");
  13649. console.error(err);
  13650. });
  13651. }
  13652. })
  13653. .catch((err) => {
  13654. this.$message.error("网络不佳");
  13655. console.error(err);
  13656. });
  13657. },
  13658. updateEvaJson(array) {
  13659. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  13660. this.evatIndex
  13661. ].eList = array;
  13662. },
  13663. forceUpdate() {
  13664. this.$forceUpdate();
  13665. },
  13666. deletEList(index, tIndex, eIndex) {
  13667. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  13668. eIndex,
  13669. 1
  13670. );
  13671. this.$forceUpdate();
  13672. },
  13673. getChoosePic(t) {
  13674. this.chooseType = t;
  13675. this.getAllBanner();
  13676. },
  13677. getAllBanner() {
  13678. this.sysPicVisible = true;
  13679. let params = {
  13680. t: this.chooseType,
  13681. };
  13682. this.ajax
  13683. .get(this.$store.state.api + "selectAllBanner", params)
  13684. .then((res) => {
  13685. this.sysPic = res.data[0];
  13686. })
  13687. .catch((err) => {
  13688. console.error(err);
  13689. });
  13690. },
  13691. // getClass() {
  13692. // let params = {
  13693. // oid: this.oid,
  13694. // };
  13695. // this.ajax
  13696. // .get(this.$store.state.api + "selectClassBySchool", params)
  13697. // .then((res) => {
  13698. // this.classJuri = res.data[0];
  13699. // })
  13700. // .catch((err) => {
  13701. // console.error(err);
  13702. // });
  13703. // },
  13704. deleteSysPic() {
  13705. this.cover = [];
  13706. this.isSysPic = false;
  13707. this.isSysPic2 = false;
  13708. },
  13709. deleteSelectPic() {
  13710. this.selectJson.url = "";
  13711. },
  13712. setEListStar() {
  13713. this.$forceUpdate();
  13714. },
  13715. deletRateList(i) {
  13716. this.rateJson.splice(i, 1);
  13717. },
  13718. addRateList() {
  13719. this.rateJson.push({ detail: "", score: 5, value: "" });
  13720. },
  13721. addSt() {
  13722. this.sentenceList.push({
  13723. sentenceTitle: "",
  13724. addSentence: [],
  13725. rightAnswer: [],
  13726. });
  13727. },
  13728. addSen(i) {
  13729. if (!this.sentenceList[i].sentenceTitle) {
  13730. this.$message.error("请填写卡片内容!");
  13731. return;
  13732. }
  13733. if (this.sentenceList[i].sentenceTitle.length > 10) {
  13734. this.$message.error("卡片内容字数不能超过10位");
  13735. return;
  13736. }
  13737. if (
  13738. this.sentenceList[i].addSentence.indexOf(
  13739. this.sentenceList[i].sentenceTitle
  13740. ) !== -1
  13741. ) {
  13742. this.$message.error("不能添加重复的卡片内容!");
  13743. return;
  13744. }
  13745. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  13746. // this.isPushTitleList.push(this.sentenceTitle);
  13747. this.sentenceList[i].sentenceTitle = "";
  13748. },
  13749. setRightAnswer(s, i, j) {
  13750. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  13751. this.sentenceList[i].rightAnswer.push(s);
  13752. }
  13753. },
  13754. returnCard(r, i, j) {
  13755. this.sentenceList[i].rightAnswer.splice(j, 1);
  13756. },
  13757. addSentenceTool() {
  13758. for (var i = 0; i < this.sentenceList.length; i++) {
  13759. if (this.sentenceList[i].rightAnswer.length == 0) {
  13760. this.$message.error(`请将题目${i + 1}设置完整。`);
  13761. return;
  13762. }
  13763. if (
  13764. this.sentenceList[i].addSentence.length !=
  13765. this.sentenceList[i].rightAnswer.length
  13766. ) {
  13767. this.$message.error(`请将题目${i + 1}设置完整。`);
  13768. return;
  13769. }
  13770. }
  13771. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13772. this.taskCount
  13773. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  13774. this.sentenceList = [
  13775. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13776. ];
  13777. this.dialogVisibleSentence = false;
  13778. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13779. // itemTaskIndex
  13780. // ].toolChoose[toolIndex].tool = [];
  13781. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13782. // itemTaskIndex
  13783. // ].toolChoose[toolIndex].tool.push(i);
  13784. if (
  13785. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13786. .toolChoose[this.toolIndex].tool != 47
  13787. ) {
  13788. this.addTools(47, this.taskCount, this.toolIndex);
  13789. }
  13790. },
  13791. addTableJson() {
  13792. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  13793. // this.$message.error("请将信息填写完整!");
  13794. // return;
  13795. // }
  13796. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13797. this.taskCount
  13798. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  13799. // this.tableJson = [{ text: "" }];
  13800. // this.dialogVisibleTable = false;
  13801. this.$message.success("上传成功");
  13802. if (
  13803. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13804. .toolChoose[this.toolIndex].tool != 48
  13805. ) {
  13806. this.addTools(48, this.taskCount, this.toolIndex);
  13807. }
  13808. },
  13809. addWordJson() {
  13810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13811. this.taskCount
  13812. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  13813. // this.wordJson = [{ text: "" }];
  13814. // this.dialogVisibleWord = false;
  13815. this.$message.success("上传成功");
  13816. if (
  13817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13818. .toolChoose[this.toolIndex].tool != 52
  13819. ) {
  13820. this.addTools(52, this.taskCount, this.toolIndex);
  13821. }
  13822. },
  13823. addMoreUpload() {
  13824. if (this.uploadJson.length == 0) {
  13825. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13826. this.taskCount
  13827. ].toolChoose[this.toolIndex].uploadJson = [];
  13828. } else {
  13829. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13830. this.taskCount
  13831. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  13832. }
  13833. this.uploadJson = [];
  13834. this.dialogVisibleMoreUpload = false;
  13835. if (
  13836. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13837. .toolChoose[this.toolIndex].tool != 50
  13838. ) {
  13839. this.addTools(50, this.taskCount, this.toolIndex);
  13840. }
  13841. },
  13842. addPreTime() {
  13843. if (this.preTime == 0) {
  13844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13845. this.taskCount
  13846. ].toolChoose[this.toolIndex].preTime = 0;
  13847. } else {
  13848. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13849. this.taskCount
  13850. ].toolChoose[this.toolIndex].preTime = this.preTime;
  13851. }
  13852. this.preTime = 0;
  13853. this.dialogVisiblePreTime = false;
  13854. if (
  13855. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13856. .toolChoose[this.toolIndex].tool != 10
  13857. ) {
  13858. this.addTools(10, this.taskCount, this.toolIndex);
  13859. }
  13860. },
  13861. goToTask(i) {
  13862. this.toolIndexType = "";
  13863. if (this.isClickColor == i + 1) {
  13864. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13865. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13866. // } else {
  13867. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13868. i
  13869. ].toolOpen = true;
  13870. // }
  13871. this.$forceUpdate();
  13872. return;
  13873. }
  13874. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13875. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13876. // } else {
  13877. document.querySelectorAll(".basic_box")[0].scrollTop =
  13878. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13879. this.isClickColor = i + 1;
  13880. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13881. // }
  13882. this.$forceUpdate();
  13883. },
  13884. taskOpen(i, stageIndex) {
  13885. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13886. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  13887. } else {
  13888. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13889. }
  13890. this.updateWork3(stageIndex);
  13891. this.$forceUpdate();
  13892. },
  13893. goToTask2(i, stage) {
  13894. this.toolIndexType = "";
  13895. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  13896. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13897. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13898. // } else {
  13899. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13900. i
  13901. ].toolOpen = true;
  13902. // }
  13903. this.$forceUpdate();
  13904. return;
  13905. }
  13906. if (this.unitIndex != stage) {
  13907. if (this.panUnitJson() == 2) {
  13908. return;
  13909. }
  13910. this.unitSet(stage);
  13911. }
  13912. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13913. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13914. // } else {
  13915. document.querySelectorAll(".basic_box")[0].scrollTop =
  13916. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13917. this.isClickColor = i + 1;
  13918. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13919. // }
  13920. this.$forceUpdate();
  13921. },
  13922. taskMove(type, index) {
  13923. this.$confirm(
  13924. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  13925. "提示",
  13926. {
  13927. confirmButtonText: "确定",
  13928. cancelButtonText: "取消",
  13929. type: "warning",
  13930. }
  13931. )
  13932. .then(() => {
  13933. if (type == 1) {
  13934. if (index > 0) {
  13935. let a = JSON.parse(
  13936. JSON.stringify(
  13937. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13938. index - 1
  13939. ]
  13940. )
  13941. );
  13942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  13943. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13944. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13945. }
  13946. } else {
  13947. if (
  13948. index <
  13949. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  13950. ) {
  13951. let a = JSON.parse(
  13952. JSON.stringify(
  13953. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13954. index + 1
  13955. ]
  13956. )
  13957. );
  13958. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  13959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13960. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13961. }
  13962. }
  13963. this.$forceUpdate();
  13964. })
  13965. .catch(() => {
  13966. return;
  13967. });
  13968. },
  13969. stageMove(type, index) {
  13970. if (type == 1) {
  13971. if (index > 0) {
  13972. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  13973. let acid = JSON.parse(
  13974. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  13975. );
  13976. let bcid = JSON.parse(
  13977. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13978. );
  13979. this.unitJson3[index - 1] = this.unitJson3[index];
  13980. this.unitJson3[index] = a;
  13981. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  13982. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13983. }
  13984. } else {
  13985. if (index < this.unitJson3.length - 1) {
  13986. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  13987. let acid = JSON.parse(
  13988. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  13989. );
  13990. let bcid = JSON.parse(
  13991. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13992. );
  13993. this.unitJson3[index + 1] = this.unitJson3[index];
  13994. this.unitJson3[index] = a;
  13995. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  13996. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13997. }
  13998. }
  13999. this.$forceUpdate();
  14000. },
  14001. addGroup(i) {
  14002. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14003. this.groupJson.group.push({
  14004. name: "第" + (this.groupJson.group.length + 1) + "组",
  14005. });
  14006. },
  14007. deleteGroup(i) {
  14008. this.groupJson.group.splice(i, 1);
  14009. },
  14010. numberPan() {
  14011. if (
  14012. /[^\d]/.test(this.groupJson.number) ||
  14013. this.groupJson.number < 2 ||
  14014. this.groupJson.number > 10
  14015. ) {
  14016. this.$message.error("请输入2-10的数字");
  14017. this.groupJson.number = "";
  14018. }
  14019. },
  14020. numberPanJie() {
  14021. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  14022. this.$message.error('请输入大于1的数字')
  14023. this.courseJie = 1
  14024. }
  14025. },
  14026. numberPanTime() {
  14027. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  14028. this.$message.error('请输入大于1的数字')
  14029. this.courseTime = 1
  14030. }
  14031. },
  14032. addGroupJson() {
  14033. for (var i = 0; i < this.groupJson.group.length; i++) {
  14034. if (!this.groupJson.group[i].name) {
  14035. this.$message.error("请将信息填写完整!");
  14036. return;
  14037. }
  14038. }
  14039. if (!this.groupJson.number) {
  14040. this.$message.error("请将信息填写完整!");
  14041. return;
  14042. }
  14043. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14044. this.taskCount
  14045. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14046. JSON.stringify(this.groupJson)
  14047. );
  14048. this.dialogVisibleGroup = false;
  14049. this.groupJson = {};
  14050. if (
  14051. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14052. .toolChoose[this.toolIndex].tool != 49
  14053. ) {
  14054. this.addTools(49, this.taskCount, this.toolIndex);
  14055. }
  14056. },
  14057. updateTime(preTime) {
  14058. this.preTime = preTime;
  14059. },
  14060. InviteChange(val) {
  14061. console.log(val);
  14062. let _check = [];
  14063. let _check2 = [];
  14064. for (var i = 0; i < this.grade2.length; i++) {
  14065. var gid = this.grade2[i].id;
  14066. _check.push(gid);
  14067. }
  14068. for (var i = 0; i < this.checkboxList2.length; i++) {
  14069. var _id = this.checkboxList2[i];
  14070. if (_check.indexOf(_id) !== -1) {
  14071. _check2.push(_id);
  14072. }
  14073. }
  14074. this.checkAll = _check2.length === _check.length;
  14075. return;
  14076. let array = JSON.parse(JSON.stringify(val));
  14077. this.inviteCode = this.inviteCode.filter((el) => {
  14078. if (val.indexOf(el.cid) != -1) {
  14079. array.splice(array.indexOf(el.cid), 1);
  14080. return el;
  14081. }
  14082. });
  14083. for (var i = 0; i < array.length; i++) {
  14084. this.getInviteCode(array[i]);
  14085. }
  14086. },
  14087. InviteChange2(val) {
  14088. console.log(val);
  14089. let _check = [];
  14090. let _check2 = [];
  14091. for (var i = 0; i < this.teacherJuri.length; i++) {
  14092. var gid = this.teacherJuri[i].userid;
  14093. _check.push(gid);
  14094. }
  14095. for (var i = 0; i < this.checkboxList3.length; i++) {
  14096. var _id = this.checkboxList3[i];
  14097. if (_check.indexOf(_id) !== -1) {
  14098. _check2.push(_id);
  14099. }
  14100. }
  14101. this.checkAll2 = _check2.length === _check.length;
  14102. this.setMan();
  14103. return;
  14104. let array = JSON.parse(JSON.stringify(val));
  14105. this.inviteCode = this.inviteCode.filter((el) => {
  14106. if (val.indexOf(el.cid) != -1) {
  14107. array.splice(array.indexOf(el.cid), 1);
  14108. return el;
  14109. }
  14110. });
  14111. for (var i = 0; i < array.length; i++) {
  14112. this.getInviteCode(array[i]);
  14113. }
  14114. },
  14115. handleCheckAllChange(val) {
  14116. if (val) {
  14117. for (var i = 0; i < this.grade2.length; i++) {
  14118. var gid = this.grade2[i].id;
  14119. if (this.checkboxList2.indexOf(gid) === -1) {
  14120. this.checkboxList2.push(gid);
  14121. }
  14122. }
  14123. } else {
  14124. let _check = [];
  14125. let _check2 = [];
  14126. for (var i = 0; i < this.grade2.length; i++) {
  14127. var gid = this.grade2[i].id;
  14128. _check.push(gid);
  14129. }
  14130. for (var i = 0; i < this.checkboxList2.length; i++) {
  14131. var _id = this.checkboxList2[i];
  14132. if (_check.indexOf(_id) === -1) {
  14133. _check2.push(_id);
  14134. }
  14135. }
  14136. this.checkboxList2 = _check2;
  14137. }
  14138. this.isIndeterminate = false;
  14139. },
  14140. handleCheckAllChange2(val) {
  14141. if (val) {
  14142. for (var i = 0; i < this.teacherJuri.length; i++) {
  14143. var gid = this.teacherJuri[i].userid;
  14144. if (this.checkboxList3.indexOf(gid) === -1) {
  14145. this.checkboxList3.push(gid);
  14146. }
  14147. }
  14148. } else {
  14149. let _check = [];
  14150. let _check2 = [];
  14151. for (var i = 0; i < this.teacherJuri.length; i++) {
  14152. var gid = this.teacherJuri[i].userid;
  14153. _check.push(gid);
  14154. }
  14155. for (var i = 0; i < this.checkboxList3.length; i++) {
  14156. var _id = this.checkboxList3[i];
  14157. if (_check.indexOf(_id) === -1) {
  14158. _check2.push(_id);
  14159. }
  14160. }
  14161. this.checkboxList3 = _check2;
  14162. }
  14163. this.isIndeterminate2 = false;
  14164. },
  14165. async getInviteCode(cid) {
  14166. let code = this.randomNumber();
  14167. let params = {
  14168. code: code,
  14169. oid: this.oid,
  14170. };
  14171. let type = 1;
  14172. for (var i = 0; i < this.inviteCode.length; i++) {
  14173. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  14174. type = 2;
  14175. }
  14176. }
  14177. if (type == 2) {
  14178. this.getInviteCode(cid);
  14179. return;
  14180. }
  14181. const res = await this.ajax.get(
  14182. this.$store.state.api + "selectInviteCode2",
  14183. params
  14184. );
  14185. if (
  14186. res.data.length &&
  14187. res.data[0].length &&
  14188. res.data[0][0].courseId != this.cid
  14189. ) {
  14190. this.getInviteCode(cid);
  14191. return;
  14192. }
  14193. let array = [];
  14194. for (var i = 0; i < this.inviteCode.length; i++) {
  14195. array.push(this.inviteCode[i].cid);
  14196. }
  14197. if (array.indexOf(cid) != -1) {
  14198. this.inviteCode[array.indexOf(cid)].ic = code;
  14199. } else {
  14200. this.inviteCode.push({ cid: cid, ic: code });
  14201. }
  14202. },
  14203. OpenInviteD(cid) {
  14204. let array = [];
  14205. this.icode = "";
  14206. for (var i = 0; i < this.inviteCode.length; i++) {
  14207. array.push(this.inviteCode[i].cid);
  14208. }
  14209. if (array.indexOf(cid) != -1) {
  14210. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  14211. }
  14212. this.inviteId = cid;
  14213. this.dialogVisibleInvite = true;
  14214. },
  14215. addInvite() {
  14216. let reg = /^[A-Za-z0-9]{4,}$/;
  14217. if (!reg.test(this.icode)) {
  14218. this.$message.error("请输入至少四位数字或英文组合的随机码");
  14219. return;
  14220. }
  14221. let type = 1;
  14222. for (var i = 0; i < this.inviteCode.length; i++) {
  14223. if (
  14224. this.inviteCode[i].cid != this.inviteId &&
  14225. this.icode == this.inviteCode[i].ic
  14226. ) {
  14227. type = 2;
  14228. }
  14229. }
  14230. if (type == 2) {
  14231. this.$message.error("已有此随机码,不能重复");
  14232. return;
  14233. }
  14234. let params = {
  14235. code: this.icode,
  14236. oid: this.oid,
  14237. };
  14238. this.ajax
  14239. .get(this.$store.state.api + "selectInviteCode", params)
  14240. .then((res) => {
  14241. if (
  14242. res.data.length &&
  14243. res.data[0].length &&
  14244. res.data[0][0].courseId != this.cid
  14245. ) {
  14246. this.$message.error("已有此随机码,不能重复");
  14247. return;
  14248. }
  14249. let array = [];
  14250. for (var i = 0; i < this.inviteCode.length; i++) {
  14251. array.push(this.inviteCode[i].cid);
  14252. }
  14253. if (array.indexOf(this.inviteId) != -1) {
  14254. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  14255. } else {
  14256. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  14257. }
  14258. this.icode = "";
  14259. this.dialogVisibleInvite = false;
  14260. })
  14261. .catch((err) => {
  14262. console.error(err);
  14263. });
  14264. },
  14265. randomNumber() {
  14266. // 随机生成两位数
  14267. // let num = Math.floor(Math.random() * 900) + 100;
  14268. // 生成 0 到 99 之间的随机整数
  14269. const randomNumber = Math.floor(Math.random() * 100);
  14270. // 如果随机数小于 10,补上前导零
  14271. const num =
  14272. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  14273. // 随机生成两个大写字母
  14274. let letters = "";
  14275. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  14276. for (let i = 0; i < 3; i++) {
  14277. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  14278. }
  14279. // 随机生成两位数字和字母的组合
  14280. let mix = "";
  14281. let chars =
  14282. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  14283. for (let i = 0; i < 3; i++) {
  14284. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  14285. mix += char;
  14286. }
  14287. // 随机选择一种类型
  14288. let type = Math.floor(Math.random() * 3);
  14289. return num;
  14290. // 根据类型输出结果
  14291. switch (type) {
  14292. case 0:
  14293. console.log(num); // 输出两位数
  14294. return num;
  14295. case 1:
  14296. console.log(letters); // 输出两个大写字母
  14297. return letters;
  14298. case 2:
  14299. console.log(mix); // 输出两位数字和字母的组合
  14300. return mix;
  14301. }
  14302. },
  14303. getPaste() {
  14304. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14305. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14306. if (!iframe && !iframe2) {
  14307. return;
  14308. }
  14309. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14310. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14311. if (copyData && copyData.stageData && copyData.stageData.length) {
  14312. this.isPasteStage = true;
  14313. }
  14314. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  14315. this.isPasteStage = true;
  14316. }
  14317. if (copyData && copyData.selectData.length) {
  14318. this.isPasteChoice = true;
  14319. }
  14320. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  14321. this.isPasteTask = true;
  14322. }
  14323. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  14324. this.isPasteTask = true;
  14325. }
  14326. },
  14327. setCover() {
  14328. var _this = this;
  14329. if(_this.cover.length){
  14330. return;
  14331. }
  14332. _this.imageloading2 = true
  14333. _this.ajax
  14334. .post("https://gpt.cocorobo.cn/search_image", {
  14335. page: _this.ppage,
  14336. pagesize: 9,
  14337. query: _this.courseName,
  14338. })
  14339. .then(function (response) {
  14340. // console.log(response.data.data);
  14341. var data = response.data.FunctionResponse.result;
  14342. _this.cover = [];
  14343.       setTimeout(() => {
  14344.         _this.cover[0] = {
  14345.           name: "网络图片.png",
  14346.           url: data[0].thumbnail
  14347.         };
  14348.         _this.imgChange1(null, null, 1, null);
  14349.         _this.$forceUpdate();
  14350.       }, 0);
  14351. _this.imageloading2 = false
  14352. })
  14353. .catch(function (error) {
  14354. _this.imageloading2 = false
  14355. console.log(error);
  14356. });
  14357. },
  14358. searchImage() {
  14359. var _this = this;
  14360. _this.imageList = [];
  14361. if (!_this.searchImageValue) {
  14362. _this.sysPicVisible2 = true;
  14363. return;
  14364. }
  14365. _this.imageloading = true;
  14366. _this.ajax
  14367. .post("https://gpt.cocorobo.cn/search_image", {
  14368. page: _this.ppage,
  14369. pagesize: 9,
  14370. query: _this.searchImageValue,
  14371. })
  14372. .then(function (response) {
  14373. // console.log(response.data.data);
  14374. var data = response.data.FunctionResponse.result;
  14375. for (var i = 0; i < data.length; i++) {
  14376. _this.imageList.push({ url: data[i].thumbnail });
  14377. }
  14378. _this.imageloading = false;
  14379. })
  14380. .catch(function (error) {
  14381. console.log(error);
  14382. });
  14383. _this.sysPicVisible2 = true;
  14384. },
  14385. changePicture() {
  14386. this.ppage++;
  14387. this.searchImage();
  14388. },
  14389. resetImage() {
  14390. this.ppage = 1;
  14391. this.searchImage();
  14392. },
  14393. jumpGj(i, j) {
  14394. if (i + 1 != this.isClickColor) {
  14395. this.isClickColor = i + 1;
  14396. }
  14397. var a = document.scrollingElement;
  14398. this.toolIndexType = `gj${i}${j}`;
  14399. let target = document.querySelector(`#gj${i}${j}`);
  14400. if (target) {
  14401. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14402. setTimeout(() => {
  14403. target.scrollIntoView(true);
  14404. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14405. j
  14406. ].isFold3 = false;
  14407. setTimeout(() => {
  14408. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14409. }, 0);
  14410. }, 0);
  14411. }
  14412. },
  14413. jumpGj2(i, j, k) {
  14414. if (this.unitIndex != k) {
  14415. if (this.panUnitJson() == 2) {
  14416. return;
  14417. }
  14418. this.unitSet(k);
  14419. }
  14420. setTimeout(() => {
  14421. if (i + 1 != this.isClickColor) {
  14422. this.isClickColor = i + 1;
  14423. }
  14424. var a = document.scrollingElement;
  14425. this.toolIndexType = `gj${i}${j}${k}`;
  14426. let target = document.querySelector(`#gj${i}${j}`);
  14427. if (target) {
  14428. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14429. setTimeout(() => {
  14430. target.scrollIntoView(true);
  14431. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14432. j
  14433. ].isFold3 = false;
  14434. setTimeout(() => {
  14435. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14436. }, 0);
  14437. }, 0);
  14438. }
  14439. }, 0);
  14440. },
  14441. dragStart(val, i, j) {
  14442. console.log(this.taskCount);
  14443. this.dragType = "drag";
  14444. this.taskCount = j;
  14445. this.oldIndex = i;
  14446. this.oldData = val;
  14447. },
  14448. dragOver(i, j) {
  14449. this.typeIndex = "chapter-" + j + "-" + i;
  14450. this.newIndex = i;
  14451. },
  14452. dragEnd() {
  14453. if (this.dragType != "drag") {
  14454. this.typeIndex = "";
  14455. this.newIndex = "";
  14456. this.dragType = "";
  14457. this.isdrag = "";
  14458. return;
  14459. }
  14460. console.log(this.taskCount);
  14461. let newItems = [
  14462. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14463. .chapterData,
  14464. ];
  14465. // 删除老的节点
  14466. newItems.splice(this.oldIndex, 1);
  14467. // 在列表中目标位置增加新的节点
  14468. newItems.splice(this.newIndex, 0, this.oldData);
  14469. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14470. this.taskCount
  14471. ].chapterData = [...newItems];
  14472. this.typeIndex = "";
  14473. this.newIndex = "";
  14474. this.dragType = "";
  14475. this.isdrag = "";
  14476. this.$forceUpdate();
  14477. },
  14478. dragTaskStart(val, i, j) {
  14479. this.dragType = "task";
  14480. this.oldIndex = i;
  14481. this.oldData = val;
  14482. this.oldUnitIndex = j;
  14483. },
  14484. dragTaskOver(i, j) {
  14485. this.typeIndex = "task-" + i;
  14486. this.newIndex = i;
  14487. this.checkUnitIndex = j;
  14488. },
  14489. async dragTaskEnd() {
  14490. if (this.dragType != "task") {
  14491. this.newIndex = "";
  14492. this.dragType = "";
  14493. this.typeIndex = "";
  14494. this.checkUnitIndex = "";
  14495. this.isdrag = "";
  14496. return;
  14497. }
  14498. if (
  14499. this.newIndex == this.oldIndex &&
  14500. this.oldUnitIndex == this.checkUnitIndex
  14501. ) {
  14502. this.newIndex = "";
  14503. this.dragType = "";
  14504. this.typeIndex = "";
  14505. this.checkUnitIndex = "";
  14506. this.isdrag = "";
  14507. return;
  14508. }
  14509. let count1 = await this.getWorksCount(
  14510. 2,
  14511. this.checkUnitIndex,
  14512. this.newIndex,
  14513. 0
  14514. );
  14515. let count2 = await this.getWorksCount(
  14516. 2,
  14517. this.oldUnitIndex,
  14518. this.oldIndex,
  14519. 0
  14520. );
  14521. if (count1 > 0 || count2 > 0) {
  14522. this.$confirm(
  14523. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14524. "提示",
  14525. {
  14526. confirmButtonText: "确定",
  14527. cancelButtonText: "取消",
  14528. type: "warning",
  14529. }
  14530. )
  14531. .then(() => {
  14532. if (this.oldUnitIndex != this.checkUnitIndex) {
  14533. let newItems = [
  14534. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14535. ];
  14536. // 删除老的节点
  14537. newItems.splice(this.oldIndex, 1);
  14538. // 在列表中目标位置增加新的节点
  14539. let newItems2 = [
  14540. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14541. ];
  14542. newItems2.splice(this.newIndex, 0, this.oldData);
  14543. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14544. ...newItems,
  14545. ];
  14546. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14547. ...newItems2,
  14548. ];
  14549. } else {
  14550. let newItems = [
  14551. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14552. ];
  14553. let chapterData = []
  14554. if (this.oldIndex == 0) {
  14555. chapterData = newItems[this.oldIndex].chapterData
  14556. newItems[this.oldIndex].chapterData = []
  14557. } else if (this.newIndex == 0) {
  14558. chapterData = newItems[this.newIndex].chapterData
  14559. newItems[this.oldIndex].chapterData = []
  14560. }
  14561. // 删除老的节点
  14562. newItems.splice(this.oldIndex, 1);
  14563. // 在列表中目标位置增加新的节点
  14564. newItems.splice(this.newIndex, 0, this.oldData);
  14565. if (this.oldIndex == 0 || this.newIndex == 0) {
  14566. newItems[0].chapterData = chapterData
  14567. }
  14568. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14569. ...newItems,
  14570. ];
  14571. }
  14572. this.typeIndex = "";
  14573. this.newIndex = "";
  14574. this.dragType = "";
  14575. this.checkUnitIndex = "";
  14576. this.isdrag = "";
  14577. this.updateWork();
  14578. this.$forceUpdate();
  14579. })
  14580. .catch(() => {
  14581. this.newIndex = "";
  14582. this.dragType = "";
  14583. this.typeIndex = "";
  14584. this.checkUnitIndex = "";
  14585. this.isdrag = "";
  14586. return;
  14587. });
  14588. } else {
  14589. if (this.oldUnitIndex != this.checkUnitIndex) {
  14590. let newItems = [
  14591. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14592. ];
  14593. // 删除老的节点
  14594. newItems.splice(this.oldIndex, 1);
  14595. // 在列表中目标位置增加新的节点
  14596. let newItems2 = [
  14597. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14598. ];
  14599. newItems2.splice(this.newIndex, 0, this.oldData);
  14600. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14601. ...newItems,
  14602. ];
  14603. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14604. ...newItems2,
  14605. ];
  14606. } else {
  14607. let newItems = [
  14608. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14609. ];
  14610. let chapterData = []
  14611. if (this.oldIndex == 0) {
  14612. chapterData = newItems[this.oldIndex].chapterData
  14613. newItems[this.oldIndex].chapterData = []
  14614. } else if (this.newIndex == 0) {
  14615. chapterData = newItems[this.newIndex].chapterData
  14616. newItems[this.oldIndex].chapterData = []
  14617. }
  14618. // 删除老的节点
  14619. newItems.splice(this.oldIndex, 1);
  14620. // 在列表中目标位置增加新的节点
  14621. newItems.splice(this.newIndex, 0, this.oldData);
  14622. if (this.oldIndex == 0 || this.newIndex == 0) {
  14623. newItems[0].chapterData = chapterData
  14624. }
  14625. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14626. ...newItems,
  14627. ];
  14628. }
  14629. this.typeIndex = "";
  14630. this.newIndex = "";
  14631. this.dragType = "";
  14632. this.checkUnitIndex = "";
  14633. this.isdrag = "";
  14634. this.updateWork();
  14635. this.$forceUpdate();
  14636. }
  14637. },
  14638. dragUnitStart(val, i) {
  14639. this.dragType = "Unit";
  14640. this.oldIndex = i;
  14641. this.oldData = val;
  14642. },
  14643. dragUnitOver(i) {
  14644. this.typeIndex = "Unit-" + i;
  14645. this.newIndex = i;
  14646. console.log(i, this.unitJson[i].toolOpen);
  14647. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  14648. this.unitJson[i].toolOpen = true;
  14649. this.updateWork();
  14650. this.$forceUpdate();
  14651. }
  14652. },
  14653. async dragUnitEnd() {
  14654. if (this.dragType != "Unit") {
  14655. this.newIndex = "";
  14656. this.dragType = "";
  14657. this.typeIndex = "";
  14658. this.isdrag = "";
  14659. return;
  14660. }
  14661. if (this.newIndex == this.oldIndex) {
  14662. this.newIndex = "";
  14663. this.dragType = "";
  14664. this.typeIndex = "";
  14665. this.isdrag = "";
  14666. return;
  14667. }
  14668. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  14669. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  14670. console.log(count1, count2);
  14671. if (count1 > 0 || count2 > 0) {
  14672. this.$confirm(
  14673. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14674. "提示",
  14675. {
  14676. confirmButtonText: "确定",
  14677. cancelButtonText: "取消",
  14678. type: "warning",
  14679. }
  14680. )
  14681. .then(() => {
  14682. let newItems = [...this.unitJson];
  14683. // 删除老的节点
  14684. newItems.splice(this.oldIndex, 1);
  14685. // 在列表中目标位置增加新的节点
  14686. newItems.splice(this.newIndex, 0, this.oldData);
  14687. this.unitJson = [...newItems];
  14688. this.typeIndex = "";
  14689. this.newIndex = "";
  14690. this.dragType = "";
  14691. this.isdrag = "";
  14692. this.updateWork();
  14693. this.$forceUpdate();
  14694. })
  14695. .catch(() => {
  14696. this.newIndex = "";
  14697. this.dragType = "";
  14698. this.typeIndex = "";
  14699. this.isdrag = "";
  14700. return;
  14701. });
  14702. } else {
  14703. let newItems = [...this.unitJson];
  14704. // 删除老的节点
  14705. newItems.splice(this.oldIndex, 1);
  14706. // 在列表中目标位置增加新的节点
  14707. newItems.splice(this.newIndex, 0, this.oldData);
  14708. this.unitJson = [...newItems];
  14709. this.typeIndex = "";
  14710. this.newIndex = "";
  14711. this.dragType = "";
  14712. this.isdrag = "";
  14713. this.updateWork();
  14714. this.$forceUpdate();
  14715. }
  14716. },
  14717. getWorksCount(type, stage, task, tool) {
  14718. return new Promise((resolve, reject) => {
  14719. let params = [
  14720. {
  14721. cid: this.cid,
  14722. stage: stage,
  14723. task: task,
  14724. tool: tool,
  14725. type: type,
  14726. },
  14727. ];
  14728. this.ajax
  14729. .post(this.$store.state.api + "getCourseWorkCount", params)
  14730. .then((res) => {
  14731. let count = res.data[0][0].count;
  14732. resolve(count);
  14733. })
  14734. .catch((err) => {
  14735. resolve(0);
  14736. this.$message.error("网络不佳");
  14737. console.error(err);
  14738. });
  14739. });
  14740. },
  14741. getTwoType(id) {
  14742. this.twoJson = [];
  14743. var array = this.CourseTypeJson1[
  14744. "3f8eed32-aba9-11ee-b534-005056b86db5"
  14745. ].filter((e) => {
  14746. return e.ppid == id;
  14747. });
  14748. this.twoJson = array;
  14749. this.$forceUpdate();
  14750. },
  14751. ctype() {
  14752. this.oneJson =
  14753. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  14754. },
  14755. selectAllType1() {
  14756. this.CourseType1 = [];
  14757. this.CourseTypeJson1 = {};
  14758. this.courseTypeId1 = {};
  14759. this.$forceUpdate();
  14760. let params = {
  14761. org: this.org && this.org != "" ? this.org : "",
  14762. oid: this.oid && this.oid != "" ? this.oid : "",
  14763. };
  14764. this.ajax
  14765. .get(this.$store.state.api + "selectAllEvaType", params)
  14766. .then((res) => {
  14767. this.CourseType1 = res.data;
  14768. for (var i = 0; i < res.data[0].length; i++) {
  14769. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  14770. res.data[0][i].name = "一级分类";
  14771. } else if (
  14772. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  14773. ) {
  14774. res.data[0][i].name = "二级分类";
  14775. }
  14776. if (!this.cid) {
  14777. this.courseTypeId1[res.data[0][i].id] = [];
  14778. }
  14779. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  14780. this.CourseTypeJson1[res.data[0][i].id] = [];
  14781. }
  14782. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  14783. for (var j = 0; j < res.data[1].length; j++) {
  14784. if (res.data[0][i].id == res.data[1][j].pid) {
  14785. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14786. }
  14787. }
  14788. // } else {
  14789. if (res.data[2].length > 0) {
  14790. for (var j = 0; j < res.data[2].length; j++) {
  14791. if (res.data[0][i].id == res.data[2][j].pid) {
  14792. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14793. }
  14794. }
  14795. }
  14796. if (res.data[3].length > 0) {
  14797. for (var j = 0; j < res.data[3].length; j++) {
  14798. if (res.data[0][i].id == res.data[3][j].pid) {
  14799. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14800. }
  14801. }
  14802. }
  14803. // }
  14804. }
  14805. this.ctype();
  14806. this.cetBoxDialog = true;
  14807. })
  14808. .catch((err) => {
  14809. console.error(err);
  14810. });
  14811. },
  14812. setAiJson(pan,string,string2){
  14813. if(pan == 'aiTeacher2'){
  14814. this.aiJson['teacherDetail2'] = string
  14815. }else if(pan == 'aiRateRuleA'){
  14816. this.aiJson['aiRateRule'] = string
  14817. }else if(pan == 'aiOutline2'){
  14818. this.aiJson['aiOutlineTask'] = string
  14819. this.aiJson['aiOutlineDetail'] = string2
  14820. this.aiText2 = ''
  14821. }else if(pan == 'aiTeacher3'){
  14822. this.aiJson['aiCpoteTask'] = string
  14823. this.aiJson['teacherDetail2'] = string2
  14824. this.aiText2 = ''
  14825. }else if(pan == 'aiTask2'){
  14826. this.aiJson['aiTask'] = string
  14827. }else if(pan == 'aiteacherTextDetail'){
  14828. this.aiJson['aiAbstract'] = string
  14829. }else if(pan == 'aitargetTextDetail'){
  14830. this.aiJson['aiTarget'] = string
  14831. }else if(pan == 'aitargetTextDetail2'){
  14832. this.aiJson['aiTarget2'] = string
  14833. }else if(pan == 'aitargetTextDetail3'){
  14834. this.aiJson['aiTargetGet'] = string
  14835. this.aiJson['aiTarget2'] = string2
  14836. }else {
  14837. this.aiJson[pan] = string
  14838. }
  14839. this.$forceUpdate();
  14840. },
  14841. editTask3(index){
  14842. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  14843. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  14844. }else {
  14845. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  14846. }
  14847. this.$forceUpdate();
  14848. },
  14849. editTask2(index){
  14850. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  14851. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  14852. }else {
  14853. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  14854. }
  14855. this.$forceUpdate();
  14856. },
  14857. openRule(i, k){
  14858. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  14859. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  14860. }else {
  14861. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  14862. }
  14863. this.$forceUpdate();
  14864. },
  14865. editCpote(index){
  14866. if(this.cpote[index]){
  14867. this.cpote[index] = false
  14868. }else {
  14869. this.cpote[index] = true
  14870. }
  14871. this.$forceUpdate();
  14872. },
  14873. clickGenTT(){
  14874. if(!this.teacherInfoData.length){
  14875. this.$message.error("请上传教案");
  14876. return;
  14877. }
  14878. this.openAiDialog(2, 'aiteacherTextDetail',1)
  14879. setTimeout(() => {
  14880. this.openAiDialog(2, 'aitargetTextDetail',1)
  14881. }, 500);
  14882. },
  14883. clickGenTT2(){
  14884. if (this.courseName == "") {
  14885. this.$message.error("请补充填写课程名称");
  14886. return;
  14887. }
  14888. this.openAiDialog(2, 'aiDetail',1)
  14889. setTimeout(() => {
  14890. this.openAiDialog(2, 'aitargetTextDetail2',1)
  14891. }, 500);
  14892. this.courseTextBool = true
  14893. },
  14894. openAiDialog2(clickType, type, callback, index, tindex){
  14895. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  14896. confirmButtonText: "确定",
  14897. cancelButtonText: "取消",
  14898. type: "warning",
  14899. })
  14900. .then(() => {
  14901. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  14902. // this.openAiDialog(clickType, 'aiTeacher')
  14903. // }else {
  14904. this.openAiDialog(clickType, type, callback, index, tindex)
  14905. // }
  14906. })
  14907. .catch(() => {
  14908. });
  14909. },
  14910. openAiDialog(clickType, type, callback, index, tindex) {
  14911. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  14912. this.$message.error("您没有权限修改/查看提示词");
  14913. return;
  14914. }
  14915. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  14916. this.$message.error("请上传教案");
  14917. return;
  14918. }
  14919. if (this.courseName == "") {
  14920. this.$message.error("请补充填写课程名称");
  14921. return;
  14922. }
  14923. this.aiText2 = ''
  14924. this.clickType = clickType
  14925. let sub = []
  14926. if (this.courseTypeId.length) {
  14927. for (var i = 0; i < this.courseTypeId.length; i++) {
  14928. let _sid = this.courseTypeId[i]
  14929. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14930. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  14931. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  14932. }
  14933. }
  14934. }
  14935. }
  14936. let mclass = []
  14937. if (this.courseTypeId.length) {
  14938. for (var i = 0; i < this.courseTypeId.length; i++) {
  14939. let _sid = this.courseTypeId[i]
  14940. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14941. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  14942. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  14943. }
  14944. }
  14945. }
  14946. }
  14947. if (type == "aiDetail") {
  14948. if (this.ttextLoading) {
  14949. this.$message({
  14950. message: "请回答完毕后再次发送",
  14951. type: "warning"
  14952. });
  14953. return;
  14954. }
  14955. this.aitype = "aiDetail"
  14956. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  14957. this.aiText = this.aiJson.aiDetail
  14958. this.aiCallBack = callback
  14959. } else if (type == "aiOutline") {
  14960. this.aitype = "aiOutline"
  14961. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14962. this.aiText = this.aiJson.aiOutline
  14963. } else if (type == "aiOutline2") {
  14964. this.aitype = "aiOutline2"
  14965. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14966. this.aiText = this.aiJson.aiOutlineTask
  14967. this.aiText2 = this.aiJson.aiOutlineDetail
  14968. } else if (type == "aiOutlineDetail2") {
  14969. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  14970. this.$message({
  14971. message: "请回答完毕后再次发送",
  14972. type: "warning"
  14973. });
  14974. return;
  14975. }
  14976. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  14977. this.$message.error('请输入任务名称')
  14978. return;
  14979. }
  14980. this.aitype = type
  14981. this.aiCallBack = callback
  14982. this.aiText = this.aiJson.aiOutlineDetail2
  14983. } else if (type == "aiTask") {
  14984. this.aitype = "aiTask"
  14985. var _text = ""
  14986. for (var i = 0; i < this.teacherText.length; i++) {
  14987. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  14988. }
  14989. // this.aiText = `请根据${_text}。`
  14990. this.aiText = this.aiJson.aiTask
  14991. this.aiCallBack = callback
  14992. } else if (type == "aiTask2") {
  14993. if (this.taskLoading[callback]) {
  14994. this.$message({
  14995. message: "请回答完毕后再次发送",
  14996. type: "warning"
  14997. });
  14998. return;
  14999. }
  15000. this.aitype = "aiTask2"
  15001. this.aiText = this.aiJson.aiTask
  15002. this.aiCallBack = callback
  15003. } else if (type == "aiDetail1") {
  15004. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  15005. this.$message({
  15006. message: "请回答完毕后再次发送",
  15007. type: "warning"
  15008. });
  15009. return;
  15010. }
  15011. this.aitype = "aiDetail1"
  15012. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  15013. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  15014. this.aiText = this.aiJson.aiDetail1
  15015. this.aiCallBack = callback
  15016. this.aiIndex = index
  15017. } else if (type == "aiDetail2") {
  15018. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  15019. this.$message({
  15020. message: "请回答完毕后再次发送",
  15021. type: "warning"
  15022. });
  15023. return;
  15024. }
  15025. this.aitype = "aiDetail2"
  15026. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  15027. this.aiText = this.aiJson.aiDetail2
  15028. this.aiCallBack = callback
  15029. this.aiIndex = index
  15030. } else if (type == "aiDetail3") {
  15031. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  15032. this.$message({
  15033. message: "请回答完毕后再次发送",
  15034. type: "warning"
  15035. });
  15036. return;
  15037. }
  15038. this.aitype = "aiDetail3"
  15039. this.aiText = this.aiJson.aiDetail3
  15040. this.aiIndex = index + '-' + tindex
  15041. } else if (type == "aiDetail4") {
  15042. var _text = ""
  15043. for (var i = 0; i < callback.length; i++) {
  15044. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15045. }
  15046. this.aitype = "aiDetail4"
  15047. this.aiText = this.aiJson.aiDetail4
  15048. this.aiIndex = index
  15049. } else if (type == "aiTeacher") {
  15050. this.aitype = "aiTeacher"
  15051. var _text = ""
  15052. for (var i = 0; i < this.dArray.length; i++) {
  15053. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15054. }
  15055. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15056. this.aiText = this.aiJson.aiTeacher
  15057. this.aiCallBack = callback
  15058. } else if (type == "aiTeacher2") {
  15059. this.aitype = "aiTeacher2"
  15060. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15061. } else if (type == "aiTeacher3") {
  15062. this.aitype = type
  15063. this.aiText = this.aiJson.aiCpoteTask
  15064. this.aiText2 = this.aiJson.teacherDetail2
  15065. } else if (type == "teacherDetail") {
  15066. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15067. this.$message({
  15068. message: "请回答完毕后再次发送",
  15069. type: "warning"
  15070. });
  15071. return;
  15072. }
  15073. this.aitype = "teacherDetail"
  15074. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15075. this.aiText = this.aiJson.teacherDetail
  15076. this.aiCallBack = callback
  15077. this.aiIndex = index
  15078. } else if (type == "teacherDetail2") {
  15079. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15080. this.$message({
  15081. message: "请回答完毕后再次发送",
  15082. type: "warning"
  15083. });
  15084. return;
  15085. }
  15086. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15087. this.$message.error('请输入任务名称')
  15088. return;
  15089. }
  15090. this.aitype = "teacherDetail2"
  15091. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15092. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15093. this.aiCallBack = callback
  15094. this.aiIndex = index
  15095. } else if (type == "aiCpote1") {
  15096. if (this.cpotetLoading.cpote1) {
  15097. this.$message({
  15098. message: "请回答完毕后再次发送",
  15099. type: "warning"
  15100. });
  15101. return;
  15102. }
  15103. this.aitype = "aiCpote1"
  15104. this.aiText = this.aiJson.cpote1
  15105. this.aiCallBack = callback
  15106. } else if (type == "aiCpote2") {
  15107. if (this.cpotetLoading.cpote2) {
  15108. this.$message({
  15109. message: "请回答完毕后再次发送",
  15110. type: "warning"
  15111. });
  15112. return;
  15113. }
  15114. this.aitype = "aiCpote2"
  15115. this.aiText = this.aiJson.cpote2
  15116. this.aiCallBack = callback
  15117. } else if (type == "aiCpote3") {
  15118. if (this.cpotetLoading.cpote3) {
  15119. this.$message({
  15120. message: "请回答完毕后再次发送",
  15121. type: "warning"
  15122. });
  15123. return;
  15124. }
  15125. this.aitype = "aiCpote3"
  15126. this.aiText = this.aiJson.cpote3
  15127. this.aiCallBack = callback
  15128. } else if (type == "aiCpote4") {
  15129. if (this.cpotetLoading.cpote4) {
  15130. this.$message({
  15131. message: "请回答完毕后再次发送",
  15132. type: "warning"
  15133. });
  15134. return;
  15135. }
  15136. this.aitype = "aiCpote4"
  15137. this.aiText = this.aiJson.cpote4
  15138. this.aiCallBack = callback
  15139. } else if (type == 'aiteacherTextDetail'){
  15140. if (this.tteacherTextLoading) {
  15141. this.$message({
  15142. message: "请回答完毕后再次发送",
  15143. type: "warning"
  15144. });
  15145. return;
  15146. }
  15147. this.aitype = type
  15148. this.aiText = this.aiJson.aiAbstract
  15149. this.aiCallBack = callback
  15150. } else if (type == 'aitargetTextDetail'){
  15151. if (this.ttargetTextLoading) {
  15152. this.$message({
  15153. message: "请回答完毕后再次发送",
  15154. type: "warning"
  15155. });
  15156. return;
  15157. }
  15158. this.aitype = type
  15159. this.aiText = this.aiJson.aiTarget
  15160. this.aiCallBack = callback
  15161. } else if (type == 'aitargetTextDetail2'){
  15162. if (this.ttargetTextLoading2) {
  15163. this.$message({
  15164. message: "请回答完毕后再次发送",
  15165. type: "warning"
  15166. });
  15167. return;
  15168. }
  15169. this.aitype = type
  15170. this.aiText = this.aiJson.aiTarget2
  15171. this.aiCallBack = callback
  15172. } else if (type == 'aitargetTextDetail3'){
  15173. if (this.ttargetTextLoading2) {
  15174. this.$message({
  15175. message: "请回答完毕后再次发送",
  15176. type: "warning"
  15177. });
  15178. return;
  15179. }
  15180. this.aitype = type
  15181. this.aiText = this.aiJson.aiTargetGet
  15182. this.aiText2 = this.aiJson.aiTarget2
  15183. this. aiCallBack= callback
  15184. } else if (type == 'aiSearchFile'){
  15185. if(this.fileSLoading) {
  15186. this.$message({
  15187. message: "请回答完毕后再次发送",
  15188. type: "warning"
  15189. });
  15190. return;
  15191. }
  15192. this.aitype = type
  15193. this.aiText = this.aiJson.aiSearchFile
  15194. } else if (type == 'aiRateRule'){
  15195. this.aitype = type
  15196. this.aiText = this.aiJson.aiRateRule
  15197. this.aiCallBack = [callback, index]
  15198. } else if (type == 'aiRateRuleA'){
  15199. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  15200. confirmButtonText: "生成所有",
  15201. cancelButtonText: "仅生成该任务",
  15202. distinguishCancelAndClose: true,
  15203. type: "warning",
  15204. })
  15205. .then(() => {
  15206. this.aitype = type
  15207. this.aiText = this.aiJson.aiRateRule
  15208. this.aiCallBack = [1,callback]
  15209. this.dialogVisibleAiD = true
  15210. }).catch((v) => {
  15211. console.log(v);
  15212. if (v == "cancel") {
  15213. this.aitype = type
  15214. this.aiText = this.aiJson.aiRateRule
  15215. this.aiCallBack = [2,callback]
  15216. this.dialogVisibleAiD = true
  15217. }
  15218. })
  15219. }
  15220. if(type != 'aiRateRuleA'){
  15221. this.dialogVisibleAiD = true
  15222. }
  15223. },
  15224. async aiConfirm(msg,msg2) {
  15225. let sub = []
  15226. if (this.courseTypeId.length) {
  15227. for (var i = 0; i < this.courseTypeId.length; i++) {
  15228. let _sid = this.courseTypeId[i]
  15229. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15230. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15231. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15232. }
  15233. }
  15234. }
  15235. }
  15236. let mclass = []
  15237. if (this.courseTypeId.length) {
  15238. for (var i = 0; i < this.courseTypeId.length; i++) {
  15239. let _sid = this.courseTypeId[i]
  15240. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15241. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15242. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15243. }
  15244. }
  15245. }
  15246. }
  15247. let url = []
  15248. if (this.infoData.length) {
  15249. for (var i = 0; i < this.infoData.length; i++) {
  15250. url.push(this.infoData[i].url)
  15251. }
  15252. }
  15253. if (this.aitype == "aiDetail") {
  15254. this.detailYou(msg)
  15255. } else if (this.aitype == "aiOutline") {
  15256. this.loading = true
  15257. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15258. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15259. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  15260. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  15261. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15262. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15263. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15264. let message = `NOTICE
  15265. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15266. 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.
  15267. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15268. Instruction: Based on the context, follow "Format example", write content.
  15269. # Context
  15270. ## 要求
  15271. ${msg} 以及##参考资料
  15272. ## 参考资料
  15273. 课程名字:${this.courseName}
  15274. ${courseText ? '课程简要描述:' + courseText : ''}
  15275. ${sub.length ? '学科:' + sub.join(",") : ''}
  15276. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15277. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15278. detail输出不要输出成json,文本或者markdown都可以
  15279. # Format example
  15280. [{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"}]`
  15281. this.aiGet2(message, () => {
  15282. this.loading = false
  15283. this.isOutline = true
  15284. })
  15285. } else if (this.aitype == "aiOutline2") {
  15286. this.loading = true
  15287. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15288. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15289. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15290. let message = `NOTICE
  15291. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15292. 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.
  15293. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15294. Instruction: Based on the context, follow "Format example", write content.
  15295. # Context
  15296. ## 要求
  15297. ${msg} 以及##参考资料
  15298. ## 参考资料
  15299. 课程名字:${this.courseName}
  15300. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  15301. ${sub.length ? '学科:' + sub.join(",") : ''}
  15302. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15303. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15304. # Format example
  15305. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15306. this.aiGetTask2(message, () => {
  15307. this.loading = false
  15308. this.isOutline = true
  15309. })
  15310. } else if (this.aitype == "aiOutlineDetail2") {
  15311. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  15312. } else if (this.aitype == "aiTask") {
  15313. var _text = ""
  15314. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15315. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15316. }
  15317. let message = `NOTICE
  15318. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15319. 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.
  15320. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15321. Instruction: Based on the context, follow "Format example", write content.
  15322. # Context
  15323. ## 要求
  15324. ${msg} 为**每个教学任务分别输出**以下内容。
  15325.  
  15326. ${(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','') : ''}
  15327. ## 参考资料
  15328. 教学任务教案:${_text}
  15329. ## 格式要求
  15330. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  15331. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15332. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  15333. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15334. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15335. 出现选择题和问答题的概率提高
  15336. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  15337.  
  15338. # Format example
  15339. [{"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":"工具描述"}]}]`
  15340. this.loading = true
  15341. this.aiGet3(message, this.aiCallBack)
  15342. } else if (this.aitype == "aiTask2") {
  15343. if(this.aiCallBack == 'all'){
  15344. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  15345. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15346. let message = `NOTICE
  15347. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15348. 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.
  15349. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15350. Instruction: Based on the context, follow "Format example", write content.
  15351. # Context
  15352. ## 要求
  15353. ${msg} 为教学任务分别输出以下内容。
  15354.  
  15355. ${(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','') : ''}
  15356. ## 参考资料
  15357. 教学任务教案:${_text}
  15358. ## 格式要求
  15359. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15360. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  15361. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15362. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15363. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15364.  
  15365. # Format example
  15366. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15367. this.taskLoading[_task] = true
  15368. this.aiGet32(message, _task)
  15369. }
  15370. }else{
  15371. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15372. let message = `NOTICE
  15373. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15374. 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.
  15375. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15376. Instruction: Based on the context, follow "Format example", write content.
  15377. # Context
  15378. ## 要求
  15379. ${msg} 为教学任务分别输出以下内容。
  15380.  
  15381. ${(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','') : ''}
  15382. ## 参考资料
  15383. 教学任务教案:${_text}
  15384. ## 格式要求
  15385. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15386. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  15387. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15388. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15389. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15390.  
  15391. # Format example
  15392. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15393. this.taskLoading[this.aiCallBack] = true
  15394. this.aiGet32(message, this.aiCallBack)
  15395. }
  15396. } else if (this.aitype == "aiDetail1") {
  15397. this.aiDetail(msg, this.aiIndex)
  15398. } else if (this.aitype == "aiDetail2") {
  15399. this.aiDetail2(msg, this.aiIndex)
  15400. } else if (this.aitype == "aiDetail3") {
  15401. let _index = this.aiIndex.split('-')
  15402. this.aiDetail3(msg, _index[0], _index[1])
  15403. } else if (this.aitype == "aiDetail4") {
  15404. this.aiDetail4(msg, this.aiIndex)
  15405. } else if (this.aitype == "teacherDetail") {
  15406. this.aiDetail5(msg, this.aiIndex)
  15407. } else if (this.aitype == "teacherDetail2") {
  15408. this.aiDetail52(msg, this.aiIndex)
  15409. } else if (this.aitype == "aiCpote1") {
  15410. this.aiCpote(msg, this.aiCallBack)
  15411. } else if (this.aitype == "aiCpote2") {
  15412. this.aiCpote(msg, this.aiCallBack)
  15413. } else if (this.aitype == "aiCpote3") {
  15414. this.aiCpote(msg, this.aiCallBack)
  15415. } else if (this.aitype == "aiCpote4") {
  15416. this.aiCpote(msg, this.aiCallBack)
  15417. } else if (this.aitype == "aiTeacher") {
  15418. this.loading = true
  15419. var _text = ""
  15420. for (var i = 0; i < this.dArray.length; i++) {
  15421. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15422. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15423. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15424. let message = ` NOTICE
  15425. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15426. 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.
  15427. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15428. Instruction: Based on the context, follow "Format example", write content.
  15429. # Context
  15430. ## 要求
  15431. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  15432. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  15433. ${(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','') : ''}
  15434. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15435. ## Format example
  15436. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  15437. this.aiGet4(message, () => {
  15438. this.loading = false
  15439. this.isOutline2 = true
  15440. })
  15441. } else if (this.aitype == "aiTeacher2"){
  15442. this.isOutline2 = true
  15443. setTimeout(()=>{
  15444. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15445. this.aiDetail52(msg, i)
  15446. }
  15447. }, 0)
  15448. } else if (this.aitype == "aiTeacher3"){
  15449. this.loading = true
  15450. let message = `NOTICE
  15451. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15452. 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.
  15453. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15454. Instruction: Based on the context, follow "Format example", write content.
  15455. # Context
  15456. ## 要求
  15457. ${msg} 以及##参考资料
  15458. ## 参考资料
  15459. 任务簇:${this.cpote.cpote4}
  15460. # Format example
  15461. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15462. this.aiGetTask3(message, () => {
  15463. this.loading = false
  15464. this.isOutline2 = true
  15465. })
  15466. } else if (this.aitype == "aiteacherTextDetail") {
  15467. this.aiteacherTextDetail(msg)
  15468. } else if (this.aitype == "aitargetTextDetail") {
  15469. this.aitargetTextDetail(msg)
  15470. } else if (this.aitype == "aitargetTextDetail2") {
  15471. this.aitargetTextDetail2(msg)
  15472. } else if (this.aitype == "aitargetTextDetail3") {
  15473. this.aitargetTextDetail3(msg)
  15474. } else if (this.aitype == 'aiSearchFile'){
  15475. let messages = `NOTICE
  15476. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15477. 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.
  15478. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15479. Instruction: Based on the context, follow "Format example", write content.
  15480. ## 参考资料
  15481. 关键词:${this.courseName}
  15482. # Context
  15483. ## 要求
  15484. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  15485. # Format example
  15486. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  15487. this.fileSLoading = true
  15488. this.aiSearchFile(messages,()=>{
  15489. this.fileSLoading = false
  15490. })
  15491. } else if (this.aitype == 'aiRateRule'){
  15492. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  15493. } else if (this.aitype == 'aiRateRuleA'){
  15494. if(this.aiCallBack[0] == 1){
  15495. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15496. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  15497. for(var k = 0; k < task.eList.length; k++){
  15498. if(!task.eList[k].rule){
  15499. this.againEva(msg, i, k)
  15500. }
  15501. }
  15502. }
  15503. }else if(this.aiCallBack[0] == 2){
  15504. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  15505. for(var k = 0; k < task.eList.length; k++){
  15506. if(!task.eList[k].rule){
  15507. this.againEva(msg, this.aiCallBack[1], k)
  15508. }
  15509. }
  15510. }
  15511. }
  15512. this.setAiJson(this.aitype, msg, msg2)
  15513. },
  15514. detailYou(message) {
  15515. this.textLoading = true
  15516. this.ttextLoading = true
  15517. let sub = []
  15518. if (this.courseTypeId.length) {
  15519. for (var i = 0; i < this.courseTypeId.length; i++) {
  15520. let _sid = this.courseTypeId[i]
  15521. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15522. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15523. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15524. }
  15525. }
  15526. }
  15527. }
  15528. let mclass = []
  15529. if (this.courseTypeId.length) {
  15530. for (var i = 0; i < this.courseTypeId.length; i++) {
  15531. let _sid = this.courseTypeId[i]
  15532. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15533. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15534. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15535. }
  15536. }
  15537. }
  15538. }
  15539. let url = []
  15540. if (this.infoData.length) {
  15541. for (var i = 0; i < this.infoData.length; i++) {
  15542. url.push(this.infoData[i].url)
  15543. }
  15544. }
  15545. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15546. // --------
  15547. // ## 补充参考资料
  15548. // 补充资料:${url.join(",")}
  15549. // 补充描述:${this.courseText2} ##补充参考资料和
  15550. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15551. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15552. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15553. let msg = `NOTICE
  15554. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  15555. 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.
  15556. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15557. Instruction: Based on the context, follow "Format example", write content.
  15558. #Context
  15559. ## 参考资料
  15560. 课程名字:${this.courseName}
  15561. ${sub.length ? '学科:' + sub.join(",") : ''}
  15562. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15563. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  15564. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  15565. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  15566. ## 要求
  15567. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  15568. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  15569. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  15570. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  15571. this.aiGet(msg)
  15572. },
  15573. setUnitJson() {
  15574. 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 }] }
  15575. this.$forceUpdate()
  15576. },
  15577. async aiGet(messages) {
  15578. let _this = this
  15579. let fileid = []
  15580. if(!this.yiKeTemplateArray.includes(this.templateid)){
  15581. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  15582. if(_this.cankaoInfoData[i].fileid){
  15583. fileid.push(_this.cankaoInfoData[i].fileid)
  15584. }else {
  15585. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  15586. if(_fileid){
  15587. _this.cankaoInfoData[i].fileid = _fileid
  15588. _this.$forceUpdate();
  15589. fileid.push(_fileid)
  15590. }
  15591. }
  15592. }
  15593. if(this.mode == 1){
  15594. for (var i = 0; i < _this.infoData.length; i++) {
  15595. if(_this.infoData[i].fileid){
  15596. fileid.push(_this.infoData[i].fileid)
  15597. }else {
  15598. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15599. if(_fileid){
  15600. _this.infoData[i].fileid = _fileid
  15601. _this.$forceUpdate();
  15602. fileid.push(_fileid)
  15603. }
  15604. }
  15605. }
  15606. }
  15607. } else {
  15608. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15609. if (_this.infoData.length) {
  15610. for (var i = 0; i < _this.infoData.length; i++) {
  15611. if(_this.infoData[i].fileid){
  15612. fileid.push(_this.infoData[i].fileid)
  15613. }else {
  15614. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15615. if(_fileid){
  15616. _this.infoData[i].fileid = _fileid
  15617. _this.$forceUpdate();
  15618. fileid.push(_fileid)
  15619. }
  15620. }
  15621. }
  15622. }
  15623. }
  15624. let _uuid = uuidv4();
  15625. // let params = JSON.stringify({
  15626. // // "model": "Chat",
  15627. // model: 'gpt-3.5-turbo',
  15628. // temperature: 0,
  15629. // max_tokens: 4096,
  15630. // top_p: 1,
  15631. // frequency_penalty: 0,
  15632. // presence_penalty: 0,
  15633. // messages: [{
  15634. // content: messages,
  15635. // role: 'user'
  15636. // }],
  15637. // uid: _uuid,
  15638. // mind_map_question: "",
  15639. // })
  15640. let params = {
  15641. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15642. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15643. session_name: _uuid,
  15644. userId: _this.userid,
  15645. uid: _uuid,
  15646. file_ids: fileid.length ? [...fileid] : '',
  15647. model: 'gpt-4o-2024-08-06',
  15648. }
  15649. // let params = JSON.stringify({
  15650. // message: {
  15651. // anthropic_version: "bedrock-2023-05-31",
  15652. // max_tokens: 4096,
  15653. // temperature: 0,
  15654. // top_p: 1,
  15655. // messages: [{
  15656. // "role": "user",
  15657. // "content": messages
  15658. // }] ,
  15659. // },
  15660. // uid: _uuid,
  15661. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15662. // });
  15663. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15664. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15665. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15666. console.log(response);
  15667. // let data = response.data.FunctionResponse
  15668. // if (data.choices && data.choices.length && data.choices[0].message) {
  15669. // _this.courseText = data.choices[0].message.content
  15670. // }
  15671. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15672. } else {
  15673. _this.$message.warning(response.data.FunctionResponse.result);
  15674. }
  15675. }).catch(function (error) {
  15676. _this.textLoading = false
  15677. _this.ttextLoading = false
  15678. console.log(error);
  15679. });
  15680. await _this.aiGetgetAiContent(_uuid)
  15681. },
  15682. aiGetgetAiContent(_uid) {
  15683. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15684. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15685. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15686. let _allText = "";
  15687. let _mdText = "";
  15688. let _iindex = 0
  15689. _source.onmessage = _e => {
  15690. let _eData = JSON.parse(_e.data).content;
  15691. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15692. //对话已经完成
  15693. _mdText = _mdText.replace("_", "");
  15694. _source.close();
  15695. this.courseText = _mdText;
  15696. this.textLoading = false
  15697. this.ttextLoading = false
  15698. this.courseTextB = false
  15699. return;
  15700. } else {
  15701. _iindex++
  15702. //对话还在继续
  15703. let _text = "";
  15704. _text = _eData.replaceAll("'", "");
  15705. if (_allText == "") {
  15706. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15707. } else {
  15708. _allText += _text;
  15709. }
  15710. _mdText = _allText + "_";
  15711. _mdText = _mdText.replace(/\\n/g, "\n");
  15712. _mdText = _mdText.replace(/\\/g, "");
  15713. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15714. //转化返回的回复流数据
  15715. if(_iindex == 10){
  15716. this.courseText = _mdText;
  15717. _iindex = 0
  15718. }
  15719. this.textLoading = false
  15720. // 处理流数据
  15721. }
  15722. // this.$forceUpdate();
  15723. };
  15724. },
  15725. async aiGet2(messages, callback) {
  15726. let _this = this
  15727. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15728. if (_this.infoData.length) {
  15729. for (var i = 0; i < _this.infoData.length; i++) {
  15730. if(_this.infoData[i].fileid){
  15731. fileid.push(_this.infoData[i].fileid)
  15732. }else {
  15733. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15734. if(_fileid){
  15735. _this.infoData[i].fileid = _fileid
  15736. _this.$forceUpdate();
  15737. fileid.push(_fileid)
  15738. }
  15739. }
  15740. }
  15741. }
  15742. console.log('fileid=========',fileid)
  15743. // let params = JSON.stringify({
  15744. // // "model": "Chat",
  15745. // model: 'gpt-3.5-turbo',
  15746. // temperature: 0,
  15747. // max_tokens: 4096,
  15748. // top_p: 1,
  15749. // frequency_penalty: 0,
  15750. // presence_penalty: 0,
  15751. // messages: [{
  15752. // content: messages,
  15753. // role: 'user'
  15754. // }],
  15755. // stream: false,
  15756. // uid: this.userid,
  15757. // mind_map_question: "",
  15758. // })
  15759. // // let params = JSON.stringify({
  15760. // // message: {
  15761. // // anthropic_version: "bedrock-2023-05-31",
  15762. // // max_tokens: 4096,
  15763. // // temperature: 0,
  15764. // // top_p: 1,
  15765. // // messages: [{
  15766. // // content: messages,
  15767. // // role: 'user'
  15768. // // }], //
  15769. // // },
  15770. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15771. // // });
  15772. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15773. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  15774. // console.log(response);
  15775. // let data = response.data.FunctionResponse
  15776. // if (data.choices && data.choices.length && data.choices[0].message) {
  15777. // console.log(data.choices[0].message.content);
  15778. // let dArray = JSON.parse(data.choices[0].message.content)
  15779. // _this.dArray = dArray
  15780. // _this.unitJson[0].chapterInfo[0].taskJson = []
  15781. // for (var i = 0; i < dArray.length; i++) {
  15782. // let _task = dArray[i]
  15783. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15784. // task: _task.task,
  15785. // taskDetail: "",
  15786. // taskDetail2: _task.detail,
  15787. // taskDetail3: "",
  15788. // chapterData: [],
  15789. // toolText: "",
  15790. // toolChoose: [
  15791. // {
  15792. // tool: [],
  15793. // toolDetail: "",
  15794. // toolType: 0,
  15795. // askCount: 1,
  15796. // askTitle: "",
  15797. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15798. // },
  15799. // ],
  15800. // isShowTools: false,
  15801. // askCount: 1,
  15802. // isFold: 0,
  15803. // askTitle: "",
  15804. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15805. // checkJson: [{ checkCount: [], checkPerent: [] }],
  15806. // homeworkList: [],
  15807. // })
  15808. // }
  15809. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  15810. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15811. // _this.$forceUpdate();
  15812. // }
  15813. // // if (data.result) {
  15814. // // console.log(data.result);
  15815. // // let dArray = JSON.parse(data.result)
  15816. // // _this.dArray = dArray
  15817. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  15818. // // for (var i = 0; i < dArray.length; i++) {
  15819. // // let _task = dArray[i]
  15820. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15821. // // task: _task.task,
  15822. // // taskDetail: "",
  15823. // // taskDetail2: _task.detail,
  15824. // // taskDetail3: "",
  15825. // // chapterData: [],
  15826. // // toolText: "",
  15827. // // toolChoose: [
  15828. // // {
  15829. // // tool: [],
  15830. // // toolDetail: "",
  15831. // // toolType: 0,
  15832. // // askCount: 1,
  15833. // // askTitle: "",
  15834. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15835. // // },
  15836. // // ],
  15837. // // isShowTools: false,
  15838. // // askCount: 1,
  15839. // // isFold: 1,
  15840. // // askTitle: "",
  15841. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15842. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  15843. // // homeworkList: [],
  15844. // // })
  15845. // // }
  15846. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15847. // // _this.$forceUpdate();
  15848. // // }
  15849. // callback ? callback() : ''
  15850. // }).catch(function (error) {
  15851. // _this.loading = false
  15852. // console.log(error);
  15853. // });
  15854. let parm = {
  15855. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  15856. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15857. session_name: uuidv4(),
  15858. userId: this.userid,
  15859. file_ids: fileid.length ? [...fileid] : '',
  15860. model: 'gpt-4o-2024-08-06',
  15861. }
  15862. this.ajax
  15863. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  15864. .then((response) => {
  15865. console.log(response);
  15866. let data = response.data.FunctionResponse
  15867. if (data.message) {
  15868. console.log(data.message);
  15869. let dArray = {}
  15870. try {
  15871. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15872. } catch (error) {
  15873. console.log("error_________________" + error);
  15874. try {
  15875. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15876. let match = data.message.match(regex);
  15877. dArray = JSON.parse(match[0]);
  15878. // var message = data.message;
  15879. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  15880. // var jsonEnd = message.indexOf("```", jsonStart);
  15881. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  15882. // dArray = JSON.parse(jsonString);
  15883. } catch (error) {
  15884. try {
  15885. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15886. let match = data.message.match(regex);
  15887. // eval("var aaa = " + match[0])
  15888. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  15889. } catch (error) {
  15890. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  15891. _this.aiGet2(messages, callback);
  15892. console.log("error_________________" + error);
  15893. }
  15894. console.log("error_________________" + error);
  15895. }
  15896. }
  15897. _this.dArray = dArray
  15898. console.log(dArray)
  15899. if(_this.panOutline() > 0){
  15900. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15901. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  15902. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  15903. }
  15904. for (var i = 0; i < dArray.length; i++) {
  15905. let _task = dArray[i]
  15906. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15907. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  15908. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  15909. }else {
  15910. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15911. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15912. taskDetail: "",
  15913. taskDetail2: _task.detail,
  15914. taskDetail3: "",
  15915. chapterData: [],
  15916. toolText: "",
  15917. toolChoose: [
  15918. {
  15919. tool: [],
  15920. toolDetail: "",
  15921. toolType: 0,
  15922. askCount: 1,
  15923. askTitle: "",
  15924. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15925. },
  15926. ],
  15927. isShowTools: false,
  15928. askCount: 1,
  15929. isFold: 0,
  15930. askTitle: "",
  15931. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15932. checkJson: [{ checkCount: [], checkPerent: [] }],
  15933. homeworkList: [],
  15934. })
  15935. }
  15936. }
  15937. }else {
  15938. _this.unitJson[0].chapterInfo[0].taskJson = []
  15939. for (var i = 0; i < dArray.length; i++) {
  15940. let _task = dArray[i]
  15941. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15942. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15943. taskDetail: "",
  15944. taskDetail2: _task.detail,
  15945. taskDetail3: "",
  15946. chapterData: [],
  15947. toolText: "",
  15948. toolChoose: [
  15949. {
  15950. tool: [],
  15951. toolDetail: "",
  15952. toolType: 0,
  15953. askCount: 1,
  15954. askTitle: "",
  15955. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15956. },
  15957. ],
  15958. isShowTools: false,
  15959. askCount: 1,
  15960. isFold: 0,
  15961. askTitle: "",
  15962. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15963. checkJson: [{ checkCount: [], checkPerent: [] }],
  15964. homeworkList: [],
  15965. })
  15966. }
  15967. }
  15968. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  15969. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15970. _this.$forceUpdate();
  15971. }
  15972. callback ? callback() : ''
  15973. })
  15974. .catch((error) => {
  15975. _this.loading = false
  15976. console.log(error);
  15977. });
  15978. },
  15979. async aiGetTask2(messages, callback) {
  15980. let _this = this
  15981. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15982. if (_this.infoData.length) {
  15983. for (var i = 0; i < _this.infoData.length; i++) {
  15984. if(_this.infoData[i].fileid){
  15985. fileid.push(_this.infoData[i].fileid)
  15986. }else {
  15987. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15988. if(_fileid){
  15989. _this.infoData[i].fileid = _fileid
  15990. _this.$forceUpdate();
  15991. fileid.push(_fileid)
  15992. }
  15993. }
  15994. }
  15995. }
  15996. console.log('fileid=========',fileid)
  15997. // let params = JSON.stringify({
  15998. // // "model": "Chat",
  15999. // model: 'gpt-3.5-turbo',
  16000. // temperature: 0,
  16001. // max_tokens: 4096,
  16002. // top_p: 1,
  16003. // frequency_penalty: 0,
  16004. // presence_penalty: 0,
  16005. // messages: [{
  16006. // content: messages,
  16007. // role: 'user'
  16008. // }],
  16009. // stream: false,
  16010. // uid: this.userid,
  16011. // mind_map_question: "",
  16012. // })
  16013. // // let params = JSON.stringify({
  16014. // // message: {
  16015. // // anthropic_version: "bedrock-2023-05-31",
  16016. // // max_tokens: 4096,
  16017. // // temperature: 0,
  16018. // // top_p: 1,
  16019. // // messages: [{
  16020. // // content: messages,
  16021. // // role: 'user'
  16022. // // }], //
  16023. // // },
  16024. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16025. // // });
  16026. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16027. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16028. // console.log(response);
  16029. // let data = response.data.FunctionResponse
  16030. // if (data.choices && data.choices.length && data.choices[0].message) {
  16031. // console.log(data.choices[0].message.content);
  16032. // let dArray = JSON.parse(data.choices[0].message.content)
  16033. // _this.dArray = dArray
  16034. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16035. // for (var i = 0; i < dArray.length; i++) {
  16036. // let _task = dArray[i]
  16037. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16038. // task: _task.task,
  16039. // taskDetail: "",
  16040. // taskDetail2: _task.detail,
  16041. // taskDetail3: "",
  16042. // chapterData: [],
  16043. // toolText: "",
  16044. // toolChoose: [
  16045. // {
  16046. // tool: [],
  16047. // toolDetail: "",
  16048. // toolType: 0,
  16049. // askCount: 1,
  16050. // askTitle: "",
  16051. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16052. // },
  16053. // ],
  16054. // isShowTools: false,
  16055. // askCount: 1,
  16056. // isFold: 0,
  16057. // askTitle: "",
  16058. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16059. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16060. // homeworkList: [],
  16061. // })
  16062. // }
  16063. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16064. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16065. // _this.$forceUpdate();
  16066. // }
  16067. // // if (data.result) {
  16068. // // console.log(data.result);
  16069. // // let dArray = JSON.parse(data.result)
  16070. // // _this.dArray = dArray
  16071. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16072. // // for (var i = 0; i < dArray.length; i++) {
  16073. // // let _task = dArray[i]
  16074. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16075. // // task: _task.task,
  16076. // // taskDetail: "",
  16077. // // taskDetail2: _task.detail,
  16078. // // taskDetail3: "",
  16079. // // chapterData: [],
  16080. // // toolText: "",
  16081. // // toolChoose: [
  16082. // // {
  16083. // // tool: [],
  16084. // // toolDetail: "",
  16085. // // toolType: 0,
  16086. // // askCount: 1,
  16087. // // askTitle: "",
  16088. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16089. // // },
  16090. // // ],
  16091. // // isShowTools: false,
  16092. // // askCount: 1,
  16093. // // isFold: 1,
  16094. // // askTitle: "",
  16095. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16096. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16097. // // homeworkList: [],
  16098. // // })
  16099. // // }
  16100. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16101. // // _this.$forceUpdate();
  16102. // // }
  16103. // callback ? callback() : ''
  16104. // }).catch(function (error) {
  16105. // _this.loading = false
  16106. // console.log(error);
  16107. // });
  16108. let parm = {
  16109. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16110. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16111. session_name: uuidv4(),
  16112. userId: this.userid,
  16113. file_ids: fileid.length ? [...fileid] : '',
  16114. model: 'gpt-4o-2024-08-06',
  16115. }
  16116. this.ajax
  16117. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16118. .then((response) => {
  16119. console.log(response);
  16120. let data = response.data.FunctionResponse
  16121. if (data.message) {
  16122. console.log(data.message);
  16123. let dArray = {}
  16124. try {
  16125. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16126. } catch (error) {
  16127. console.log("error_________________" + error);
  16128. try {
  16129. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16130. let match = data.message.match(regex);
  16131. dArray = JSON.parse(match[0]);
  16132. // var message = data.message;
  16133. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16134. // var jsonEnd = message.indexOf("```", jsonStart);
  16135. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16136. // dArray = JSON.parse(jsonString);
  16137. } catch (error) {
  16138. try {
  16139. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16140. let match = data.message.match(regex);
  16141. // eval("var aaa = " + match[0])
  16142. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16143. } catch (error) {
  16144. console.log("error_________________" + error);
  16145. }
  16146. console.log("error_________________" + error);
  16147. }
  16148. }
  16149. _this.dArray = dArray
  16150. if(_this.panOutline() > 0){
  16151. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16152. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16153. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16154. }
  16155. for (var i = 0; i < dArray.length; i++) {
  16156. let _task = dArray[i]
  16157. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16158. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16159. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16160. }else {
  16161. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16162. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16163. taskDetail: "",
  16164. taskDetail2: "",
  16165. taskDetail3: "",
  16166. chapterData: [],
  16167. toolText: "",
  16168. toolChoose: [
  16169. {
  16170. tool: [],
  16171. toolDetail: "",
  16172. toolType: 0,
  16173. askCount: 1,
  16174. askTitle: "",
  16175. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16176. },
  16177. ],
  16178. isShowTools: false,
  16179. askCount: 1,
  16180. isFold: 0,
  16181. askTitle: "",
  16182. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16183. checkJson: [{ checkCount: [], checkPerent: [] }],
  16184. homeworkList: [],
  16185. })
  16186. }
  16187. }
  16188. }else {
  16189. _this.unitJson[0].chapterInfo[0].taskJson = []
  16190. for (var i = 0; i < dArray.length; i++) {
  16191. let _task = dArray[i]
  16192. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16193. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16194. taskDetail: "",
  16195. taskDetail2: "",
  16196. taskDetail3: "",
  16197. chapterData: [],
  16198. toolText: "",
  16199. toolChoose: [
  16200. {
  16201. tool: [],
  16202. toolDetail: "",
  16203. toolType: 0,
  16204. askCount: 1,
  16205. askTitle: "",
  16206. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16207. },
  16208. ],
  16209. isShowTools: false,
  16210. askCount: 1,
  16211. isFold: 0,
  16212. askTitle: "",
  16213. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16214. checkJson: [{ checkCount: [], checkPerent: [] }],
  16215. homeworkList: [],
  16216. })
  16217. }
  16218. }
  16219. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16220. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16221. _this.$forceUpdate();
  16222. setTimeout(()=>{
  16223. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16224. this.aiOutlineDetail('', i)
  16225. }
  16226. }, 0)
  16227. }
  16228. callback ? callback() : ''
  16229. })
  16230. .catch((error) => {
  16231. _this.loading = false
  16232. console.log(error);
  16233. });
  16234. },
  16235. async aiGetTask3(messages, callback) {
  16236. let _this = this
  16237. // let params = JSON.stringify({
  16238. // // "model": "Chat",
  16239. // model: 'gpt-3.5-turbo',
  16240. // temperature: 0,
  16241. // max_tokens: 4096,
  16242. // top_p: 1,
  16243. // frequency_penalty: 0,
  16244. // presence_penalty: 0,
  16245. // messages: [{
  16246. // content: messages,
  16247. // role: 'user'
  16248. // }],
  16249. // stream: false,
  16250. // uid: this.userid,
  16251. // mind_map_question: "",
  16252. // })
  16253. // // let params = JSON.stringify({
  16254. // // message: {
  16255. // // anthropic_version: "bedrock-2023-05-31",
  16256. // // max_tokens: 4096,
  16257. // // temperature: 0,
  16258. // // top_p: 1,
  16259. // // messages: [{
  16260. // // content: messages,
  16261. // // role: 'user'
  16262. // // }], //
  16263. // // },
  16264. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16265. // // });
  16266. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16267. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16268. // console.log(response);
  16269. // let data = response.data.FunctionResponse
  16270. // if (data.choices && data.choices.length && data.choices[0].message) {
  16271. // console.log(data.choices[0].message.content);
  16272. // let dArray = JSON.parse(data.choices[0].message.content)
  16273. // _this.dArray = dArray
  16274. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16275. // for (var i = 0; i < dArray.length; i++) {
  16276. // let _task = dArray[i]
  16277. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16278. // task: _task.task,
  16279. // taskDetail: "",
  16280. // taskDetail2: _task.detail,
  16281. // taskDetail3: "",
  16282. // chapterData: [],
  16283. // toolText: "",
  16284. // toolChoose: [
  16285. // {
  16286. // tool: [],
  16287. // toolDetail: "",
  16288. // toolType: 0,
  16289. // askCount: 1,
  16290. // askTitle: "",
  16291. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16292. // },
  16293. // ],
  16294. // isShowTools: false,
  16295. // askCount: 1,
  16296. // isFold: 0,
  16297. // askTitle: "",
  16298. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16299. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16300. // homeworkList: [],
  16301. // })
  16302. // }
  16303. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16304. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16305. // _this.$forceUpdate();
  16306. // }
  16307. // // if (data.result) {
  16308. // // console.log(data.result);
  16309. // // let dArray = JSON.parse(data.result)
  16310. // // _this.dArray = dArray
  16311. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16312. // // for (var i = 0; i < dArray.length; i++) {
  16313. // // let _task = dArray[i]
  16314. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16315. // // task: _task.task,
  16316. // // taskDetail: "",
  16317. // // taskDetail2: _task.detail,
  16318. // // taskDetail3: "",
  16319. // // chapterData: [],
  16320. // // toolText: "",
  16321. // // toolChoose: [
  16322. // // {
  16323. // // tool: [],
  16324. // // toolDetail: "",
  16325. // // toolType: 0,
  16326. // // askCount: 1,
  16327. // // askTitle: "",
  16328. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16329. // // },
  16330. // // ],
  16331. // // isShowTools: false,
  16332. // // askCount: 1,
  16333. // // isFold: 1,
  16334. // // askTitle: "",
  16335. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16336. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16337. // // homeworkList: [],
  16338. // // })
  16339. // // }
  16340. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16341. // // _this.$forceUpdate();
  16342. // // }
  16343. // callback ? callback() : ''
  16344. // }).catch(function (error) {
  16345. // _this.loading = false
  16346. // console.log(error);
  16347. // });
  16348. let parm = {
  16349. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16350. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16351. session_name: uuidv4(),
  16352. userId: this.userid,
  16353. file_ids: '',
  16354. model: 'gpt-4o-2024-08-06',
  16355. }
  16356. this.ajax
  16357. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16358. .then((response) => {
  16359. console.log(response);
  16360. let data = response.data.FunctionResponse
  16361. if (data.message) {
  16362. console.log(data.message);
  16363. let dArray = {}
  16364. try {
  16365. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16366. } catch (error) {
  16367. console.log("error_________________" + error);
  16368. try {
  16369. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16370. let match = data.message.match(regex);
  16371. dArray = JSON.parse(match[0]);
  16372. // var message = data.message;
  16373. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16374. // var jsonEnd = message.indexOf("```", jsonStart);
  16375. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16376. // dArray = JSON.parse(jsonString);
  16377. } catch (error) {
  16378. try {
  16379. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16380. let match = data.message.match(regex);
  16381. // eval("var aaa = " + match[0])
  16382. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16383. } catch (error) {
  16384. console.log("error_________________" + error);
  16385. }
  16386. console.log("error_________________" + error);
  16387. }
  16388. }
  16389. _this.dArray = dArray
  16390. if(_this.panOutline() > 0){
  16391. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16392. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16393. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  16394. }
  16395. for (var i = 0; i < dArray.length; i++) {
  16396. let _task = dArray[i]
  16397. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16398. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16399. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16400. }else {
  16401. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16402. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16403. taskDetail: "",
  16404. taskDetail2: "",
  16405. taskDetail3: "",
  16406. chapterData: [],
  16407. toolText: "",
  16408. toolChoose: [
  16409. {
  16410. tool: [],
  16411. toolDetail: "",
  16412. toolType: 0,
  16413. askCount: 1,
  16414. askTitle: "",
  16415. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16416. },
  16417. ],
  16418. isShowTools: false,
  16419. askCount: 1,
  16420. isFold: 0,
  16421. askTitle: "",
  16422. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16423. checkJson: [{ checkCount: [], checkPerent: [] }],
  16424. homeworkList: [],
  16425. })
  16426. }
  16427. }
  16428. }else {
  16429. _this.unitJson[0].chapterInfo[0].taskJson = []
  16430. for (var i = 0; i < dArray.length; i++) {
  16431. let _task = dArray[i]
  16432. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16433. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16434. taskDetail: "",
  16435. taskDetail2: "",
  16436. taskDetail3: "",
  16437. chapterData: [],
  16438. toolText: "",
  16439. toolChoose: [
  16440. {
  16441. tool: [],
  16442. toolDetail: "",
  16443. toolType: 0,
  16444. askCount: 1,
  16445. askTitle: "",
  16446. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16447. },
  16448. ],
  16449. isShowTools: false,
  16450. askCount: 1,
  16451. isFold: 0,
  16452. askTitle: "",
  16453. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16454. checkJson: [{ checkCount: [], checkPerent: [] }],
  16455. homeworkList: [],
  16456. })
  16457. }
  16458. }
  16459. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16460. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16461. _this.$forceUpdate();
  16462. setTimeout(()=>{
  16463. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16464. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  16465. }
  16466. }, 0)
  16467. }
  16468. callback ? callback() : ''
  16469. })
  16470. .catch((error) => {
  16471. _this.loading = false
  16472. console.log(error);
  16473. });
  16474. },
  16475. async aiGet3(messages, callback) {
  16476. let _this = this
  16477. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16478. if (_this.infoData.length) {
  16479. for (var i = 0; i < _this.infoData.length; i++) {
  16480. if(_this.infoData[i].fileid){
  16481. fileid.push(_this.infoData[i].fileid)
  16482. }else {
  16483. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16484. if(_fileid){
  16485. _this.infoData[i].fileid = _fileid
  16486. _this.$forceUpdate();
  16487. fileid.push(_fileid)
  16488. }
  16489. }
  16490. }
  16491. }
  16492. // let params = JSON.stringify({
  16493. // // "model": "Chat",
  16494. // model: 'gpt-3.5-turbo',
  16495. // temperature: 0,
  16496. // max_tokens: 4096,
  16497. // top_p: 1,
  16498. // frequency_penalty: 0,
  16499. // presence_penalty: 0,
  16500. // messages: [{
  16501. // content: messages,
  16502. // role: 'user'
  16503. // }],
  16504. // stream: false,
  16505. // uid: this.userid,
  16506. // mind_map_question: "",
  16507. // })
  16508. // // let params = JSON.stringify({
  16509. // // message: {
  16510. // // anthropic_version: "bedrock-2023-05-31",
  16511. // // max_tokens: 4096,
  16512. // // temperature: 0,
  16513. // // top_p: 1,
  16514. // // messages: [{
  16515. // // content: messages,
  16516. // // role: 'user'
  16517. // // }], //
  16518. // // },
  16519. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16520. // // });
  16521. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16522. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16523. // console.log(response);
  16524. // let data = response.data.FunctionResponse
  16525. // if (data.choices && data.choices.length && data.choices[0].message) {
  16526. // console.log(data.choices[0].message.content);
  16527. // let tArray = JSON.parse(data.choices[0].message.content)
  16528. // // _this.unitJson[0].chapterInfo[0].task = []
  16529. // let toolsJson = {
  16530. // "电子白板": { tool: 1, type: 1 },
  16531. // "文档": { tool: 52, type: 1 },
  16532. // "思维导图": { tool: 3, type: 1 },
  16533. // "表格": { tool: 48, type: 1 },
  16534. // "作业提交": { tool: 16, type: 2 }
  16535. // }
  16536. // for (var i = 0; i < tArray.length; i++) {
  16537. // let _task = tArray[i]
  16538. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16539. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16540. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16541. // if (_task.toolChoose.length) {
  16542. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16543. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16544. // {
  16545. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16546. // toolDetail: _task.toolChoose[j].detail,
  16547. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16548. // askCount: 1,
  16549. // askTitle: "",
  16550. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16551. // },
  16552. // )
  16553. // }
  16554. // } else {
  16555. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16556. // {
  16557. // tool: [],
  16558. // toolDetail: "",
  16559. // toolType: 0,
  16560. // askCount: 1,
  16561. // askTitle: "",
  16562. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16563. // },
  16564. // )
  16565. // }
  16566. // }
  16567. // // if (_this.infoData.length) {
  16568. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16569. // // }
  16570. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16571. // _this.$forceUpdate();
  16572. // }
  16573. // // if (data.result) {
  16574. // // console.log(data.result);
  16575. // // let tArray = JSON.parse(data.result)
  16576. // // // _this.unitJson[0].chapterInfo[0].task = []
  16577. // // let toolsJson = {
  16578. // // "电子白板": { tool: 1, type: 1 },
  16579. // // "文档": { tool: 52, type: 1 },
  16580. // // "思维导图": { tool: 3, type: 1 },
  16581. // // "表格": { tool: 48, type: 1 },
  16582. // // "作业提交": { tool: 16, type: 2 }
  16583. // // }
  16584. // // for (var i = 0; i < tArray.length; i++) {
  16585. // // let _task = tArray[i]
  16586. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16587. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16588. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16589. // // if (_task.toolChoose.length) {
  16590. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16591. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16592. // // {
  16593. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16594. // // toolDetail: _task.toolChoose[j].detail,
  16595. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16596. // // askCount: 1,
  16597. // // askTitle: "",
  16598. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16599. // // },
  16600. // // )
  16601. // // }
  16602. // // } else {
  16603. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16604. // // {
  16605. // // tool: [],
  16606. // // toolDetail: "",
  16607. // // toolType: 0,
  16608. // // askCount: 1,
  16609. // // askTitle: "",
  16610. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16611. // // },
  16612. // // )
  16613. // // }
  16614. // // }
  16615. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16616. // // _this.$forceUpdate();
  16617. // // }
  16618. // callback ? callback() : ''
  16619. // }).catch(function (error) {
  16620. // _this.loading = false
  16621. // console.log(error);
  16622. // });
  16623. let parm = {
  16624. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16625. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16626. session_name: uuidv4(),
  16627. userId: this.userid,
  16628. file_ids: fileid.length ? [...fileid] : '',
  16629. model: 'gpt-4o-2024-08-06',
  16630. }
  16631. this.ajax
  16632. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16633. .then(async (response) => {
  16634. console.log(response);
  16635. let data = response.data.FunctionResponse
  16636. if (data.message) {
  16637. console.log(data.message);
  16638. let tArray = {}
  16639. try {
  16640. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16641. } catch (error) {
  16642. console.log("error_________________" + error);
  16643. try {
  16644. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16645. let match = data.message.match(regex);
  16646. tArray = JSON.parse(match[0]);
  16647. // var message = data.message;
  16648. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16649. // var jsonEnd = message.indexOf("```", jsonStart);
  16650. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16651. // tArray = JSON.parse(jsonString);
  16652. } catch (error) {
  16653. try {
  16654. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16655. let match = data.message.match(regex);
  16656. // eval("var aaa = " + match[0])
  16657. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16658. } catch (error) {
  16659. console.log("error_________________" + error);
  16660. }
  16661. console.log("error_________________" + error);
  16662. }
  16663. }
  16664. let toolsJson = {
  16665. "电子白板": { tool: 1, type: 1 },
  16666. "文档": { tool: 52, type: 1 },
  16667. "思维导图": { tool: 3, type: 1 },
  16668. "表格": { tool: 48, type: 1 },
  16669. "作业提交": { tool: 16, type: 2 },
  16670. "问答": { tool: 15, type: 2 },
  16671. "选择题": { tool: 45, type: 2 },
  16672. }
  16673. // answerQ:"sssssssssssssss"
  16674. for (var i = 0; i < tArray.length; i++) {
  16675. let _task = tArray[i]
  16676. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16677. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16678. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16679. if (_task.toolChoose.length) {
  16680. for (var j = 0; j < _task.toolChoose.length; j++) {
  16681. let _json = {
  16682. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  16683. toolDetail: _task.toolChoose[j].detail,
  16684. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16685. askCount: 1,
  16686. askTitle: "",
  16687. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16688. }
  16689. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16690. let answerQ = await _this.aiCreateQuestion(15, i)
  16691. _json.answerQ = answerQ.answerQ
  16692. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16693. let testJson = await _this.aiCreateQuestion(45, i)
  16694. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16695. }
  16696. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  16697. }
  16698. } else {
  16699. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16700. {
  16701. tool: [],
  16702. toolDetail: "",
  16703. toolType: 0,
  16704. askCount: 1,
  16705. askTitle: "",
  16706. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16707. },
  16708. )
  16709. }
  16710. }
  16711. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16712. _this.$forceUpdate();
  16713. _this.createTeacherAn();
  16714. }
  16715. callback ? callback() : ''
  16716. })
  16717. .catch((error) => {
  16718. _this.loading = false
  16719. console.log(error);
  16720. });
  16721. },
  16722. async aiGet32(messages, index) {
  16723. let _this = this
  16724. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16725. if (_this.infoData.length) {
  16726. for (var i = 0; i < _this.infoData.length; i++) {
  16727. if(_this.infoData[i].fileid){
  16728. fileid.push(_this.infoData[i].fileid)
  16729. }else {
  16730. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16731. if(_fileid){
  16732. _this.infoData[i].fileid = _fileid
  16733. _this.$forceUpdate();
  16734. fileid.push(_fileid)
  16735. }
  16736. }
  16737. }
  16738. }
  16739. // let params = JSON.stringify({
  16740. // // "model": "Chat",
  16741. // model: 'gpt-3.5-turbo',
  16742. // temperature: 0,
  16743. // max_tokens: 4096,
  16744. // top_p: 1,
  16745. // frequency_penalty: 0,
  16746. // presence_penalty: 0,
  16747. // messages: [{
  16748. // content: messages,
  16749. // role: 'user'
  16750. // }],
  16751. // stream: false,
  16752. // uid: this.userid,
  16753. // mind_map_question: "",
  16754. // })
  16755. // // let params = JSON.stringify({
  16756. // // message: {
  16757. // // anthropic_version: "bedrock-2023-05-31",
  16758. // // max_tokens: 4096,
  16759. // // temperature: 0,
  16760. // // top_p: 1,
  16761. // // messages: [{
  16762. // // content: messages,
  16763. // // role: 'user'
  16764. // // }], //
  16765. // // },
  16766. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16767. // // });
  16768. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16769. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16770. // console.log(response);
  16771. // let data = response.data.FunctionResponse
  16772. // if (data.choices && data.choices.length && data.choices[0].message) {
  16773. // console.log(data.choices[0].message.content);
  16774. // let tArray = JSON.parse(data.choices[0].message.content)
  16775. // // _this.unitJson[0].chapterInfo[0].task = []
  16776. // let toolsJson = {
  16777. // "电子白板": { tool: 1, type: 1 },
  16778. // "文档": { tool: 52, type: 1 },
  16779. // "思维导图": { tool: 3, type: 1 },
  16780. // "表格": { tool: 48, type: 1 },
  16781. // "作业提交": { tool: 16, type: 2 }
  16782. // }
  16783. // for (var i = 0; i < tArray.length; i++) {
  16784. // let _task = tArray[i]
  16785. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16786. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16787. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16788. // if (_task.toolChoose.length) {
  16789. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16790. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16791. // {
  16792. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16793. // toolDetail: _task.toolChoose[j].detail,
  16794. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16795. // askCount: 1,
  16796. // askTitle: "",
  16797. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16798. // },
  16799. // )
  16800. // }
  16801. // } else {
  16802. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16803. // {
  16804. // tool: [],
  16805. // toolDetail: "",
  16806. // toolType: 0,
  16807. // askCount: 1,
  16808. // askTitle: "",
  16809. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16810. // },
  16811. // )
  16812. // }
  16813. // }
  16814. // // if (_this.infoData.length) {
  16815. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16816. // // }
  16817. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16818. // _this.$forceUpdate();
  16819. // }
  16820. // // if (data.result) {
  16821. // // console.log(data.result);
  16822. // // let tArray = JSON.parse(data.result)
  16823. // // // _this.unitJson[0].chapterInfo[0].task = []
  16824. // // let toolsJson = {
  16825. // // "电子白板": { tool: 1, type: 1 },
  16826. // // "文档": { tool: 52, type: 1 },
  16827. // // "思维导图": { tool: 3, type: 1 },
  16828. // // "表格": { tool: 48, type: 1 },
  16829. // // "作业提交": { tool: 16, type: 2 }
  16830. // // }
  16831. // // for (var i = 0; i < tArray.length; i++) {
  16832. // // let _task = tArray[i]
  16833. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16834. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16835. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16836. // // if (_task.toolChoose.length) {
  16837. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16838. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16839. // // {
  16840. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16841. // // toolDetail: _task.toolChoose[j].detail,
  16842. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16843. // // askCount: 1,
  16844. // // askTitle: "",
  16845. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16846. // // },
  16847. // // )
  16848. // // }
  16849. // // } else {
  16850. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16851. // // {
  16852. // // tool: [],
  16853. // // toolDetail: "",
  16854. // // toolType: 0,
  16855. // // askCount: 1,
  16856. // // askTitle: "",
  16857. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16858. // // },
  16859. // // )
  16860. // // }
  16861. // // }
  16862. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16863. // // _this.$forceUpdate();
  16864. // // }
  16865. // callback ? callback() : ''
  16866. // }).catch(function (error) {
  16867. // _this.loading = false
  16868. // console.log(error);
  16869. // });
  16870. let parm = {
  16871. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16872. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16873. session_name: uuidv4(),
  16874. userId: this.userid,
  16875. file_ids: fileid.length ? [...fileid] : '',
  16876. model: 'gpt-4o-2024-08-06',
  16877. }
  16878. this.ajax
  16879. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16880. .then(async (response) => {
  16881. console.log(response);
  16882. let data = response.data.FunctionResponse
  16883. if (data.message) {
  16884. console.log(data.message);
  16885. let tArray = {}
  16886. try {
  16887. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16888. } catch (error) {
  16889. console.log("error_________________" + error);
  16890. try {
  16891. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16892. let match = data.message.match(regex);
  16893. tArray = JSON.parse(match[0]);
  16894. // var message = data.message;
  16895. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16896. // var jsonEnd = message.indexOf("```", jsonStart);
  16897. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16898. // tArray = JSON.parse(jsonString);
  16899. } catch (error) {
  16900. try {
  16901. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16902. let match = data.message.match(regex);
  16903. // eval("var aaa = " + match[0])
  16904. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16905. } catch (error) {
  16906. console.log("error_________________" + error);
  16907. }
  16908. console.log("error_________________" + error);
  16909. }
  16910. }
  16911. let toolsJson = {
  16912. "电子白板": { tool: 1, type: 1 },
  16913. "文档": { tool: 52, type: 1 },
  16914. "思维导图": { tool: 3, type: 1 },
  16915. "表格": { tool: 48, type: 1 },
  16916. "作业提交": { tool: 16, type: 2 },
  16917. "问答": { tool: 15, type: 2 },
  16918. "选择题": { tool: 45, type: 2 },
  16919. }
  16920. // answerQ:"sssssssssssssss"
  16921. // for (var i = 0; i < tArray.length; i++) {
  16922. let _task = tArray
  16923. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  16924. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  16925. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  16926. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  16927. console.log("error_________________JSON不对重新生成");
  16928. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16929. _this.aiGet32(messages, index)
  16930. return;
  16931. }
  16932. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  16933. if (_task.toolChoose && _task.toolChoose.length) {
  16934. for (var j = 0; j < _task.toolChoose.length; j++) {
  16935. let _json = {
  16936. tool: [],
  16937. toolDetail: _task.toolChoose[j].detail,
  16938. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16939. askCount: 1,
  16940. askTitle: "",
  16941. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16942. }
  16943. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16944. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16945. let answerQ = await _this.aiCreateQuestion(15, index)
  16946. // _json.answerQ = answerQ.answerQ
  16947. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  16948. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16949. let testJson = await _this.aiCreateQuestion(45, index)
  16950. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16951. _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}
  16952. }
  16953. _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]
  16954. _this.$forceUpdate();
  16955. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16956. }
  16957. } else {
  16958. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  16959. {
  16960. tool: [],
  16961. toolDetail: "",
  16962. toolType: 0,
  16963. askCount: 1,
  16964. askTitle: "",
  16965. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16966. },
  16967. )
  16968. }
  16969. // }
  16970. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16971. _this.$forceUpdate();
  16972. _this.createTeacherAn(index);
  16973. }
  16974. // callback ? callback() : ''
  16975. _this.taskLoading[index] = false
  16976. })
  16977. .catch((error) => {
  16978. // _this.loading = false
  16979. _this.taskLoading[index] = false
  16980. console.log(error);
  16981. });
  16982. },
  16983. async aiCreateQuestion(type, task) {
  16984. let _this = this
  16985. return new Promise((resolve, reject) => {
  16986. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16987. if (_this.infoData.length) {
  16988. for (var i = 0; i < _this.infoData.length; i++) {
  16989. if(_this.infoData[i].fileid){
  16990. fileid.push(_this.infoData[i].fileid)
  16991. }
  16992. }
  16993. }
  16994. let sub = []
  16995. let mclass = []
  16996. if (this.courseTypeId.length) {
  16997. for (var i = 0; i < this.courseTypeId.length; i++) {
  16998. let _sid = this.courseTypeId[i]
  16999. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17000. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17001. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17002. }
  17003. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17004. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17005. }
  17006. }
  17007. }
  17008. }
  17009. let messages = ""
  17010. if(type == 15){
  17011. messages = `NOTICE
  17012. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17013. 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.
  17014. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17015. Instruction: Based on the context, follow "Format example", write content.
  17016. # Context
  17017. ## 任务
  17018. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17019. ## 限制
  17020. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17021. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17022. ## 课程简介
  17023. 课程名字:${_this.courseName}
  17024. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17025. ${sub.length ? '学科:' + sub.join(",") : ''}
  17026. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17027. ## 教案
  17028. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17029. # Format example
  17030. {answerQ:"问题"}
  17031. `
  17032. }else if(type == 45){
  17033. messages = `NOTICE
  17034. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17035. 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.
  17036. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17037. Instruction: Based on the context, follow "Format example", write content.
  17038. # Context
  17039. ## 任务
  17040. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17041. ## 限制
  17042. - 生成题目禁止重复。
  17043. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17044. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17045. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17046. ## 课程简介
  17047. 课程名字:${_this.courseName}
  17048. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17049. ${sub.length ? '学科:' + sub.join(",") : ''}
  17050. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17051. ## 教案
  17052. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17053. # Format example
  17054. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17055. `
  17056. }
  17057. let parm = {
  17058. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17059. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17060. session_name: uuidv4(),
  17061. userId: this.userid,
  17062. file_ids: fileid.length ? [...fileid] : '',
  17063. model: 'gpt-4o-2024-08-06',
  17064. }
  17065. this.ajax
  17066. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17067. .then((response) => {
  17068. console.log(response);
  17069. let data = response.data.FunctionResponse
  17070. if (data.message) {
  17071. console.log(data.message);
  17072. try {
  17073. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17074. let tArray = {}
  17075. try {
  17076. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17077. } catch (error) {
  17078. console.log("error_________________" + error);
  17079. try {
  17080. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17081. let match = data.message.match(regex);
  17082. tArray = JSON.parse(match[0]);
  17083. // var message = data.message;
  17084. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17085. // var jsonEnd = message.indexOf("```", jsonStart);
  17086. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17087. // tArray = JSON.parse(jsonString);
  17088. } catch (error) {
  17089. try {
  17090. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17091. let match = data.message.match(regex);
  17092. // eval("var aaa = " + match[0])
  17093. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17094. } catch (error) {
  17095. console.log("error_________________" + error);
  17096. }
  17097. console.log("error_________________" + error);
  17098. }
  17099. }
  17100. resolve(tArray)
  17101. } catch (error) {
  17102. if(type == 15){
  17103. resolve({answerQ: "题目"})
  17104. }else if(type == 45){
  17105. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17106. }
  17107. }
  17108. }else if(type == 15){
  17109. resolve({answerQ: "题目"})
  17110. }else if(type == 45){
  17111. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17112. }
  17113. })
  17114. .catch((error) => {
  17115. if(type == 15){
  17116. resolve({answerQ: "题目"})
  17117. }else if(type == 45){
  17118. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17119. }
  17120. console.log(error);
  17121. });
  17122. });
  17123. },
  17124. async aiChoice(type){
  17125. if(type == 45){
  17126. this.choiceLoading = true
  17127. }
  17128. let _this = this
  17129. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17130. if (_this.infoData.length) {
  17131. for (var i = 0; i < _this.infoData.length; i++) {
  17132. if(_this.infoData[i].fileid){
  17133. fileid.push(_this.infoData[i].fileid)
  17134. }
  17135. }
  17136. }
  17137. let sub = []
  17138. let mclass = []
  17139. if (this.courseTypeId.length) {
  17140. for (var i = 0; i < this.courseTypeId.length; i++) {
  17141. let _sid = this.courseTypeId[i]
  17142. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17143. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17144. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17145. }
  17146. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17147. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17148. }
  17149. }
  17150. }
  17151. }
  17152. let messages = ""
  17153. if(type == 15){
  17154. messages = `NOTICE
  17155. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17156. 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.
  17157. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17158. Instruction: Based on the context, follow "Format example", write content.
  17159. # Context
  17160. ## 任务
  17161. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17162. ## 限制
  17163. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17164. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17165. ## 课程简介
  17166. 课程名字:${_this.courseName}
  17167. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17168. ${sub.length ? '学科:' + sub.join(",") : ''}
  17169. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17170. ## 教案
  17171. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17172. # Format example
  17173. {answerQ:"问题"}
  17174. `
  17175. }else if(type == 45){
  17176. messages = `NOTICE
  17177. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17178. 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.
  17179. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17180. Instruction: Based on the context, follow "Format example", write content.
  17181. # Context
  17182. ## 任务
  17183. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17184. ## 限制
  17185. - 生成题目禁止重复。
  17186. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17187. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17188. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17189. ## 课程简介
  17190. 课程名字:${_this.courseName}
  17191. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17192. ${sub.length ? '学科:' + sub.join(",") : ''}
  17193. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17194. ## 教案
  17195. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17196. # Format example
  17197. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17198. `
  17199. }
  17200. let parm = {
  17201. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17202. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17203. session_name: uuidv4(),
  17204. userId: this.userid,
  17205. file_ids: fileid.length ? [...fileid] : '',
  17206. model: 'gpt-4o-2024-08-06',
  17207. }
  17208. this.ajax
  17209. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17210. .then((response) => {
  17211. console.log(response);
  17212. let data = response.data.FunctionResponse
  17213. if (data.message) {
  17214. console.log(data.message);
  17215. try {
  17216. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17217. let tArray = {}
  17218. try {
  17219. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17220. } catch (error) {
  17221. console.log("error_________________" + error);
  17222. try {
  17223. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17224. let match = data.message.match(regex);
  17225. tArray = JSON.parse(match[0]);
  17226. // var message = data.message;
  17227. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17228. // var jsonEnd = message.indexOf("```", jsonStart);
  17229. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17230. // tArray = JSON.parse(jsonString);
  17231. } catch (error) {
  17232. try {
  17233. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17234. let match = data.message.match(regex);
  17235. // eval("var aaa = " + match[0])
  17236. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17237. } catch (error) {
  17238. console.log("error_________________" + error);
  17239. }
  17240. console.log("error_________________" + error);
  17241. }
  17242. }
  17243. if(type == 45){
  17244. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  17245. }
  17246. } catch (error) {
  17247. if(type == 15){
  17248. {answerQ: "题目"}
  17249. }else if(type == 45){
  17250. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17251. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17252. }
  17253. _this.choiceLoading = false
  17254. }
  17255. }else if(type == 15){
  17256. {answerQ: "题目"}
  17257. }else if(type == 45){
  17258. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17259. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17260. }
  17261. _this.choiceLoading = false
  17262. }).catch((error) => {
  17263. if(type == 15){
  17264. {answerQ: "题目"}
  17265. }else if(type == 45){
  17266. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17267. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17268. }
  17269. console.log(error);
  17270. _this.choiceLoading = false
  17271. });
  17272. },
  17273. async aiGet4(messages, callback, clickType) {
  17274. let _this = this
  17275. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17276. if (_this.infoData.length) {
  17277. for (var i = 0; i < _this.infoData.length; i++) {
  17278. if(_this.infoData[i].fileid){
  17279. fileid.push(_this.infoData[i].fileid)
  17280. }else {
  17281. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17282. if(_fileid){
  17283. _this.infoData[i].fileid = _fileid
  17284. _this.$forceUpdate();
  17285. fileid.push(_fileid)
  17286. }
  17287. }
  17288. }
  17289. }
  17290. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17291. if(_this.cankaoInfoData[i].fileid){
  17292. fileid.push(_this.cankaoInfoData[i].fileid)
  17293. }else {
  17294. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17295. if(_fileid){
  17296. _this.cankaoInfoData[i].fileid = _fileid
  17297. _this.$forceUpdate();
  17298. fileid.push(_fileid)
  17299. }
  17300. }
  17301. }
  17302. // let params = JSON.stringify({
  17303. // // "model": "Chat",
  17304. // model: 'gpt-3.5-turbo',
  17305. // temperature: 0,
  17306. // max_tokens: 4096,
  17307. // top_p: 1,
  17308. // frequency_penalty: 0,
  17309. // presence_penalty: 0,
  17310. // messages: [{
  17311. // content: messages,
  17312. // role: 'user'
  17313. // }],
  17314. // stream: false,
  17315. // uid: this.userid,
  17316. // mind_map_question: "",
  17317. // })
  17318. // // let params = JSON.stringify({
  17319. // // message: {
  17320. // // anthropic_version: "bedrock-2023-05-31",
  17321. // // max_tokens: 4096,
  17322. // // temperature: 0,
  17323. // // top_p: 1,
  17324. // // messages: [{
  17325. // // content: messages,
  17326. // // role: 'user'
  17327. // // }], //
  17328. // // },
  17329. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17330. // // });
  17331. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17332. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17333. // console.log(response);
  17334. // let data = response.data.FunctionResponse
  17335. // if (data.choices && data.choices.length && data.choices[0].message) {
  17336. // console.log(data.choices[0].message.content);
  17337. // let dArray = JSON.parse(data.choices[0].message.content)
  17338. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  17339. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  17340. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17341. // for (var i = 0; i < dArray.length; i++) {
  17342. // let _task = dArray[i]
  17343. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17344. // task: _task.task,
  17345. // taskDetail: "",
  17346. // taskDetail2: "",
  17347. // taskDetail3: _task.detail,
  17348. // chapterData: [],
  17349. // toolText: "",
  17350. // toolChoose: [
  17351. // {
  17352. // tool: [],
  17353. // toolDetail: "",
  17354. // toolType: 0,
  17355. // askCount: 1,
  17356. // askTitle: "",
  17357. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17358. // },
  17359. // ],
  17360. // isShowTools: false,
  17361. // askCount: 1,
  17362. // isFold: 0,
  17363. // askTitle: "",
  17364. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17365. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17366. // homeworkList: [],
  17367. // })
  17368. // }
  17369. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17370. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17371. // _this.$forceUpdate();
  17372. // } else {
  17373. // for (var i = 0; i < dArray.length; i++) {
  17374. // let _task = dArray[i]
  17375. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17376. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17377. // }else {
  17378. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17379. // task: _task.task,
  17380. // taskDetail: "",
  17381. // taskDetail2: "",
  17382. // taskDetail3: _task.detail,
  17383. // chapterData: [],
  17384. // toolText: "",
  17385. // toolChoose: [
  17386. // {
  17387. // tool: [],
  17388. // toolDetail: "",
  17389. // toolType: 0,
  17390. // askCount: 1,
  17391. // askTitle: "",
  17392. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17393. // },
  17394. // ],
  17395. // isShowTools: false,
  17396. // askCount: 1,
  17397. // isFold: 0,
  17398. // askTitle: "",
  17399. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17400. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17401. // homeworkList: [],
  17402. // }
  17403. // }
  17404. // }
  17405. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17406. // _this.$forceUpdate();
  17407. // }
  17408. // }
  17409. // // if (data.result) {
  17410. // // console.log(data.result);
  17411. // // let dArray = JSON.parse(data.result)
  17412. // // _this.teacherText = JSON.parse(data.result)
  17413. // // for (var i = 0; i < dArray.length; i++) {
  17414. // // let _task = dArray[i]
  17415. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17416. // // }
  17417. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17418. // // _this.$forceUpdate();
  17419. // // }
  17420. // callback ? callback() : ''
  17421. // _this.loading = false
  17422. // }).catch(function (error) {
  17423. // _this.loading = false
  17424. // console.log(error);
  17425. // });
  17426. let parm = {
  17427. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17428. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17429. session_name: uuidv4(),
  17430. userId: this.userid,
  17431. file_ids: fileid.length ? [...fileid] : '',
  17432. model: 'gpt-4o-2024-08-06',
  17433. }
  17434. this.ajax
  17435. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17436. .then((response) => {
  17437. console.log(response);
  17438. let data = response.data.FunctionResponse
  17439. if (data.message) {
  17440. console.log(data.message);
  17441. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17442. let dArray = []
  17443. try {
  17444. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17445. } catch (error) {
  17446. console.log("error_________________" + error);
  17447. try {
  17448. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17449. let match = data.message.match(regex);
  17450. dArray = JSON.parse(match[0]);
  17451. // var message = data.message;
  17452. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17453. // var jsonEnd = message.indexOf("```", jsonStart);
  17454. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17455. // dArray = JSON.parse(jsonString);
  17456. } catch (error) {
  17457. _this.aiGet4(messages, callback)
  17458. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17459. console.log("error_________________" + error);
  17460. return;
  17461. console.log("error_________________" + error);
  17462. _this.loading = false
  17463. }
  17464. }
  17465. try {
  17466. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  17467. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  17468. if(_this.panTeacher() > 0){
  17469. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17470. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17471. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17472. }
  17473. for (var i = 0; i < dArray.length; i++) {
  17474. let _task = dArray[i]
  17475. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17476. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  17477. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17478. }else {
  17479. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17480. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17481. taskDetail: "",
  17482. taskDetail2: "",
  17483. taskDetail3: _task.detail,
  17484. chapterData: [],
  17485. toolText: "",
  17486. toolChoose: [
  17487. {
  17488. tool: [],
  17489. toolDetail: "",
  17490. toolType: 0,
  17491. askCount: 1,
  17492. askTitle: "",
  17493. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17494. },
  17495. ],
  17496. isShowTools: false,
  17497. askCount: 1,
  17498. isFold: 0,
  17499. askTitle: "",
  17500. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17501. checkJson: [{ checkCount: [], checkPerent: [] }],
  17502. homeworkList: [],
  17503. })
  17504. }
  17505. }
  17506. }else {
  17507. _this.unitJson[0].chapterInfo[0].taskJson = []
  17508. for (var i = 0; i < dArray.length; i++) {
  17509. let _task = dArray[i]
  17510. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17511. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17512. taskDetail: "",
  17513. taskDetail2: "",
  17514. taskDetail3: _task.detail,
  17515. chapterData: [],
  17516. toolText: "",
  17517. toolChoose: [
  17518. {
  17519. tool: [],
  17520. toolDetail: "",
  17521. toolType: 0,
  17522. askCount: 1,
  17523. askTitle: "",
  17524. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17525. },
  17526. ],
  17527. isShowTools: false,
  17528. askCount: 1,
  17529. isFold: 0,
  17530. askTitle: "",
  17531. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17532. checkJson: [{ checkCount: [], checkPerent: [] }],
  17533. homeworkList: [],
  17534. })
  17535. }
  17536. }
  17537. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17538. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17539. _this.$forceUpdate();
  17540. } else {
  17541. for (var i = 0; i < dArray.length; i++) {
  17542. let _task = dArray[i]
  17543. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17544. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17545. }else {
  17546. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17547. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17548. taskDetail: "",
  17549. taskDetail2: "",
  17550. taskDetail3: _task.detail,
  17551. chapterData: [],
  17552. toolText: "",
  17553. toolChoose: [
  17554. {
  17555. tool: [],
  17556. toolDetail: "",
  17557. toolType: 0,
  17558. askCount: 1,
  17559. askTitle: "",
  17560. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17561. },
  17562. ],
  17563. isShowTools: false,
  17564. askCount: 1,
  17565. isFold: 0,
  17566. askTitle: "",
  17567. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17568. checkJson: [{ checkCount: [], checkPerent: [] }],
  17569. homeworkList: [],
  17570. }
  17571. }
  17572. }
  17573. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17574. _this.$forceUpdate();
  17575. }
  17576. } catch (error) {
  17577. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17578. _this.aiGet4(messages, callback)
  17579. console.log("error_________________" + error);
  17580. return;
  17581. // _this.loading = false
  17582. }
  17583. }
  17584. callback ? callback() : ''
  17585. })
  17586. .catch((error) => {
  17587. _this.loading = false
  17588. console.log(error);
  17589. });
  17590. },
  17591. async aiDetail(msg, index) {
  17592. let _this = this
  17593. const _tindex = 'task-' + index
  17594. const _tindex2 = index
  17595. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17596. if (_this.infoData.length) {
  17597. for (var i = 0; i < _this.infoData.length; i++) {
  17598. if(_this.infoData[i].fileid){
  17599. fileid.push(_this.infoData[i].fileid)
  17600. }else {
  17601. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17602. if(_fileid){
  17603. _this.infoData[i].fileid = _fileid
  17604. _this.$forceUpdate();
  17605. fileid.push(_fileid)
  17606. }
  17607. }
  17608. }
  17609. }
  17610. let url = []
  17611. if (this.infoData.length) {
  17612. for (var i = 0; i < this.infoData.length; i++) {
  17613. url.push(this.infoData[i].url)
  17614. }
  17615. }
  17616. let messages = `NOTICE
  17617. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  17618. 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.
  17619. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17620. Instruction: Based on the context, follow "Format example", write content.
  17621. #Context
  17622. ## 要求
  17623. ${msg}
  17624. ## 参考信息
  17625. 任务名称:${_this.aiCallBack.task}
  17626. ## 优化内容
  17627. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  17628. // -------- #补充参考资料和
  17629. // ## 补充参考资料
  17630. // - 补充资料:${url.join(",")}
  17631. // - 补充描述:${_this.courseText2}
  17632. _this.taskDetailLoading.push(_tindex)
  17633. _this.ttaskDetailLoading.push(_tindex)
  17634. let _uuid = uuidv4();
  17635. // let params = JSON.stringify({
  17636. // // "model": "Chat",
  17637. // model: 'gpt-3.5-turbo',
  17638. // temperature: 0,
  17639. // max_tokens: 4096,
  17640. // top_p: 1,
  17641. // frequency_penalty: 0,
  17642. // presence_penalty: 0,
  17643. // messages: [{
  17644. // content: messages,
  17645. // role: 'user'
  17646. // }],
  17647. // uid: _uuid,
  17648. // mind_map_question: "",
  17649. // })
  17650. let params = {
  17651. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17652. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17653. session_name: _uuid,
  17654. userId: _this.userid,
  17655. uid: _uuid,
  17656. file_ids: fileid.length ? [...fileid] : '',
  17657. model: 'gpt-4o-2024-08-06',
  17658. }
  17659. // let params = JSON.stringify({
  17660. // message: {
  17661. // anthropic_version: "bedrock-2023-05-31",
  17662. // max_tokens: 4096,
  17663. // temperature: 0,
  17664. // top_p: 1,
  17665. // messages: [{
  17666. // "role": "user",
  17667. // "content": messages
  17668. // }] ,
  17669. // },
  17670. // uid: _uuid,
  17671. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17672. // });
  17673. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17674. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17675. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17676. console.log(response);
  17677. // let data = response.data.FunctionResponse
  17678. // if (data.choices && data.choices.length && data.choices[0].message) {
  17679. // console.log(data.choices[0].message.content);
  17680. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17681. // _this.$forceUpdate()
  17682. // }
  17683. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17684. } else {
  17685. _this.$message.warning(response.data.FunctionResponse.result);
  17686. }
  17687. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17688. }).catch(function (error) {
  17689. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17690. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17691. console.log(error);
  17692. });
  17693. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  17694. },
  17695. aiDetailgetAiContent(_uid, loading, _tindex2) {
  17696. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17697. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17698. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17699. let _allText = "";
  17700. let _mdText = "";
  17701. let _iindex = 0
  17702. _source.onmessage = _e => {
  17703. let _eData = JSON.parse(_e.data).content;
  17704. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17705. //对话已经完成
  17706. _mdText = _mdText.replace("_", "");
  17707. _source.close();
  17708. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17709. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17710. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17711. return;
  17712. } else {
  17713. _iindex++
  17714. //对话还在继续
  17715. let _text = "";
  17716. _text = _eData.replaceAll("'", "");
  17717. if (_allText == "") {
  17718. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17719. } else {
  17720. _allText += _text;
  17721. }
  17722. _mdText = _allText + "_";
  17723. _mdText = _mdText.replace(/\\n/g, "\n");
  17724. _mdText = _mdText.replace(/\\/g, "");
  17725. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17726. //转化返回的回复流数据.
  17727. if(_iindex == 10){
  17728. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17729. _iindex = 0
  17730. }
  17731. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17732. // 处理流数据
  17733. }
  17734. // this.$forceUpdate();
  17735. };
  17736. },
  17737. async aiOutlineDetail(msg, index) {
  17738. let _this = this
  17739. const _tindex = 'task-' + index
  17740. const _tindex2 = index
  17741. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17742. if (_this.infoData.length) {
  17743. for (var i = 0; i < _this.infoData.length; i++) {
  17744. if(_this.infoData[i].fileid){
  17745. fileid.push(_this.infoData[i].fileid)
  17746. }else {
  17747. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17748. if(_fileid){
  17749. _this.infoData[i].fileid = _fileid
  17750. _this.$forceUpdate();
  17751. fileid.push(_fileid)
  17752. }
  17753. }
  17754. }
  17755. }
  17756. let url = []
  17757. if (this.infoData.length) {
  17758. for (var i = 0; i < this.infoData.length; i++) {
  17759. url.push(this.infoData[i].url)
  17760. }
  17761. }
  17762. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17763. let messages = `NOTICE
  17764. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17765. 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.
  17766. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17767. Instruction: Based on the context, follow "Format example", write content.
  17768. #Context
  17769. ## 要求
  17770. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  17771. ## 参考信息
  17772. 课程名字:${_this.courseName}
  17773. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17774. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17775. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17776. # Format example
  17777. 教学目标:教学目标。
  17778. 任务设计:任务设计。
  17779. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17780. `
  17781. // -------- #补充参考资料和
  17782. // ## 补充参考资料
  17783. // - 补充资料:${url.join(",")}
  17784. // - 补充描述:${_this.courseText2}
  17785. _this.taskDetailLoading.push(_tindex)
  17786. _this.ttaskDetailLoading.push(_tindex)
  17787. let _uuid = uuidv4();
  17788. // let params = JSON.stringify({
  17789. // // "model": "Chat",
  17790. // model: 'gpt-3.5-turbo',
  17791. // temperature: 0,
  17792. // max_tokens: 4096,
  17793. // top_p: 1,
  17794. // frequency_penalty: 0,
  17795. // presence_penalty: 0,
  17796. // messages: [{
  17797. // content: messages,
  17798. // role: 'user'
  17799. // }],
  17800. // uid: _uuid,
  17801. // mind_map_question: "",
  17802. // })
  17803. let params = {
  17804. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17805. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17806. session_name: _uuid,
  17807. userId: _this.userid,
  17808. uid: _uuid,
  17809. file_ids: fileid.length ? [...fileid] : '',
  17810. model: 'gpt-4o-2024-08-06',
  17811. }
  17812. // let params = JSON.stringify({
  17813. // message: {
  17814. // anthropic_version: "bedrock-2023-05-31",
  17815. // max_tokens: 4096,
  17816. // temperature: 0,
  17817. // top_p: 1,
  17818. // messages: [{
  17819. // "role": "user",
  17820. // "content": messages
  17821. // }] ,
  17822. // },
  17823. // uid: _uuid,
  17824. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17825. // });
  17826. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17827. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17828. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17829. console.log(response);
  17830. // let data = response.data.FunctionResponse
  17831. // if (data.choices && data.choices.length && data.choices[0].message) {
  17832. // console.log(data.choices[0].message.content);
  17833. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17834. // _this.$forceUpdate()
  17835. // }
  17836. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17837. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17838. } else {
  17839. _this.$message.warning(response.data.FunctionResponse.result);
  17840. }
  17841. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17842. }).catch(function (error) {
  17843. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17844. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17845. console.log(error);
  17846. });
  17847. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17848. },
  17849. async aiOutlineDetail2(msg, index) {
  17850. let _this = this
  17851. const _tindex = 'task-' + index
  17852. const _tindex2 = index
  17853. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17854. if (_this.infoData.length) {
  17855. for (var i = 0; i < _this.infoData.length; i++) {
  17856. if(_this.infoData[i].fileid){
  17857. fileid.push(_this.infoData[i].fileid)
  17858. }else {
  17859. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17860. if(_fileid){
  17861. _this.infoData[i].fileid = _fileid
  17862. _this.$forceUpdate();
  17863. fileid.push(_fileid)
  17864. }
  17865. }
  17866. }
  17867. }
  17868. let url = []
  17869. if (this.infoData.length) {
  17870. for (var i = 0; i < this.infoData.length; i++) {
  17871. url.push(this.infoData[i].url)
  17872. }
  17873. }
  17874. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17875. let taskArray = []
  17876. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  17877. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  17878. if(k != index){
  17879. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  17880. }
  17881. }
  17882. let messages = `NOTICE
  17883. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17884. 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.
  17885. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17886. Instruction: Based on the context, follow "Format example", write content.
  17887. #Context
  17888. ## 要求
  17889. ${msg}
  17890. ## 参考信息
  17891. 课程名字:${_this.courseName}
  17892. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17893. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17894. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17895. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  17896. # Format example
  17897. 教学目标:教学目标。
  17898. 任务设计:任务设计。
  17899. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17900. `
  17901. // -------- #补充参考资料和
  17902. // ## 补充参考资料
  17903. // - 补充资料:${url.join(",")}
  17904. // - 补充描述:${_this.courseText2}
  17905. _this.taskDetailLoading.push(_tindex)
  17906. _this.ttaskDetailLoading.push(_tindex)
  17907. let _uuid = uuidv4();
  17908. // let params = JSON.stringify({
  17909. // // "model": "Chat",
  17910. // model: 'gpt-3.5-turbo',
  17911. // temperature: 0,
  17912. // max_tokens: 4096,
  17913. // top_p: 1,
  17914. // frequency_penalty: 0,
  17915. // presence_penalty: 0,
  17916. // messages: [{
  17917. // content: messages,
  17918. // role: 'user'
  17919. // }],
  17920. // uid: _uuid,
  17921. // mind_map_question: "",
  17922. // })
  17923. let params = {
  17924. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17925. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17926. session_name: _uuid,
  17927. userId: _this.userid,
  17928. uid: _uuid,
  17929. file_ids: fileid.length ? [...fileid] : '',
  17930. model: 'gpt-4o-2024-08-06',
  17931. }
  17932. // let params = JSON.stringify({
  17933. // message: {
  17934. // anthropic_version: "bedrock-2023-05-31",
  17935. // max_tokens: 4096,
  17936. // temperature: 0,
  17937. // top_p: 1,
  17938. // messages: [{
  17939. // "role": "user",
  17940. // "content": messages
  17941. // }] ,
  17942. // },
  17943. // uid: _uuid,
  17944. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17945. // });
  17946. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17947. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17948. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17949. console.log(response);
  17950. // let data = response.data.FunctionResponse
  17951. // if (data.choices && data.choices.length && data.choices[0].message) {
  17952. // console.log(data.choices[0].message.content);
  17953. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17954. // _this.$forceUpdate()
  17955. // }
  17956. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17957. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17958. } else {
  17959. _this.$message.warning(response.data.FunctionResponse.result);
  17960. }
  17961. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17962. }).catch(function (error) {
  17963. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17964. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17965. console.log(error);
  17966. });
  17967. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17968. },
  17969. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  17970. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17971. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17972. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17973. let _allText = "";
  17974. let _mdText = "";
  17975. let _iindex = 0
  17976. _source.onmessage = _e => {
  17977. let _eData = JSON.parse(_e.data).content;
  17978. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17979. //对话已经完成
  17980. _mdText = _mdText.replace("_", "");
  17981. _source.close();
  17982. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17983. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  17984. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  17985. }
  17986. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17987. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17988. return;
  17989. } else {
  17990. _iindex++
  17991. //对话还在继续
  17992. let _text = "";
  17993. _text = _eData.replaceAll("'", "");
  17994. if (_allText == "") {
  17995. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17996. } else {
  17997. _allText += _text;
  17998. }
  17999. _mdText = _allText + "_";
  18000. _mdText = _mdText.replace(/\\n/g, "\n");
  18001. _mdText = _mdText.replace(/\\/g, "");
  18002. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18003. //转化返回的回复流数据.
  18004. if(_iindex == 10){
  18005. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  18006. _iindex = 0
  18007. }
  18008. if(this.taskDetailLoading.indexOf(loading) !== -1){
  18009. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  18010. }
  18011. // 处理流数据
  18012. }
  18013. // this.$forceUpdate();
  18014. };
  18015. },
  18016. async aiDetail2(msg, index) {
  18017. let _this = this
  18018. const _tindex = 'task-' + index
  18019. const _tindex2 = index
  18020. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18021. if (_this.infoData.length) {
  18022. for (var i = 0; i < _this.infoData.length; i++) {
  18023. if(_this.infoData[i].fileid){
  18024. fileid.push(_this.infoData[i].fileid)
  18025. }else {
  18026. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18027. if(_fileid){
  18028. _this.infoData[i].fileid = _fileid
  18029. _this.$forceUpdate();
  18030. fileid.push(_fileid)
  18031. }
  18032. }
  18033. }
  18034. }
  18035. let messages = `NOTICE
  18036. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18037. 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.
  18038. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18039. Instruction: Based on the context, follow "Format example", write content.
  18040. #Context
  18041. ## 要求
  18042. ${msg}
  18043. ## 参考资料
  18044. 任务名字: ${_this.aiCallBack.task}
  18045. ## 优化信息
  18046. ${_this.aiCallBack.taskDetail}
  18047. # Format example
  18048. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  18049. _this.taskDetailLoading2.push(_tindex)
  18050. _this.ttaskDetailLoading2.push(_tindex)
  18051. let _uuid = uuidv4();
  18052. // let params = JSON.stringify({
  18053. // // "model": "Chat",
  18054. // model: 'gpt-3.5-turbo',
  18055. // temperature: 0,
  18056. // max_tokens: 4096,
  18057. // top_p: 1,
  18058. // frequency_penalty: 0,
  18059. // presence_penalty: 0,
  18060. // messages: [{
  18061. // content: messages,
  18062. // role: 'user'
  18063. // }],
  18064. // uid: _uuid,
  18065. // mind_map_question: "",
  18066. // })
  18067. let params = {
  18068. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18069. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  18070. session_name: _uuid,
  18071. userId: _this.userid,
  18072. uid: _uuid,
  18073. file_ids: fileid.length ? [...fileid] : '',
  18074. model: 'gpt-4o-2024-08-06',
  18075. }
  18076. // let params = JSON.stringify({
  18077. // message: {
  18078. // anthropic_version: "bedrock-2023-05-31",
  18079. // max_tokens: 4096,
  18080. // temperature: 0,
  18081. // top_p: 1,
  18082. // messages: [{
  18083. // "role": "user",
  18084. // "content": messages
  18085. // }] ,
  18086. // },
  18087. // uid: _uuid,
  18088. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18089. // });
  18090. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18091. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18092. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18093. console.log(response);
  18094. // let data = response.data.FunctionResponse
  18095. // if (data.choices && data.choices.length && data.choices[0].message) {
  18096. // console.log(data.choices[0].message.content);
  18097. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18098. // _this.$forceUpdate()
  18099. // }
  18100. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18101. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18102. } else {
  18103. _this.$message.warning(response.data.FunctionResponse.result);
  18104. }
  18105. }).catch(function (error) {
  18106. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  18107. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  18108. console.log(error);
  18109. });
  18110. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  18111. },
  18112. aiDetail2getAiContent(_uid, loading, _tindex2) {
  18113. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18114. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18115. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18116. let _allText = "";
  18117. let _mdText = "";
  18118. let _iindex = 0
  18119. _source.onmessage = _e => {
  18120. let _eData = JSON.parse(_e.data).content;
  18121. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18122. //对话已经完成
  18123. _mdText = _mdText.replace("_", "");
  18124. _source.close();
  18125. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18126. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18127. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  18128. return;
  18129. } else {
  18130. _iindex++
  18131. //对话还在继续
  18132. let _text = "";
  18133. _text = _eData.replaceAll("'", "");
  18134. if (_allText == "") {
  18135. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18136. } else {
  18137. _allText += _text;
  18138. }
  18139. _mdText = _allText + "_";
  18140. _mdText = _mdText.replace(/\\n/g, "\n");
  18141. _mdText = _mdText.replace(/\\/g, "");
  18142. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18143. //转化返回的回复流数据
  18144. if(_iindex == 10){
  18145. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18146. _iindex = 0
  18147. }
  18148. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18149. // 处理流数据
  18150. }
  18151. // this.$forceUpdate();
  18152. };
  18153. },
  18154. async aiDetail3(msg, index, tindex) {
  18155. let _this = this
  18156. const _tindex = 'task-' + index + tindex
  18157. const _tindex2 = index
  18158. const _tindex3 = tindex
  18159. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18160. if (_this.infoData.length) {
  18161. for (var i = 0; i < _this.infoData.length; i++) {
  18162. if(_this.infoData[i].fileid){
  18163. fileid.push(_this.infoData[i].fileid)
  18164. }else {
  18165. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18166. if(_fileid){
  18167. _this.infoData[i].fileid = _fileid
  18168. _this.$forceUpdate();
  18169. fileid.push(_fileid)
  18170. }
  18171. }
  18172. }
  18173. }
  18174. // **重点考虑该任务及工具名和工具内容的情况下*
  18175. let messages = `NOTICE
  18176. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18177. 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.
  18178. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18179. Instruction: Based on the context, follow "Format example", write content.
  18180. #Context
  18181. ## 参考内容
  18182. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18183. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18184. 工具名称:${_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 : '无'}
  18185. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  18186. ## 要求
  18187. ${msg} 输出格式和内容要求参考#格式与要求
  18188. # Format example
  18189. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  18190. _this.taskDetailLoading3.push(_tindex)
  18191. _this.ttaskDetailLoading3.push(_tindex)
  18192. let _uuid = uuidv4();
  18193. // let params = JSON.stringify({
  18194. // // "model": "Chat",
  18195. // model: 'gpt-3.5-turbo',
  18196. // temperature: 0,
  18197. // max_tokens: 4096,
  18198. // top_p: 1,
  18199. // frequency_penalty: 0,
  18200. // presence_penalty: 0,
  18201. // messages: [{
  18202. // content: messages,
  18203. // role: 'user'
  18204. // }],
  18205. // uid: _uuid,
  18206. // mind_map_question: "",
  18207. // })
  18208. let params = {
  18209. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18210. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18211. session_name: _uuid,
  18212. userId: _this.userid,
  18213. uid: _uuid,
  18214. file_ids: fileid.length ? [...fileid] : '',
  18215. model: 'gpt-4o-2024-08-06',
  18216. }
  18217. // let params = JSON.stringify({
  18218. // message: {
  18219. // anthropic_version: "bedrock-2023-05-31",
  18220. // max_tokens: 4096,
  18221. // temperature: 0,
  18222. // top_p: 1,
  18223. // messages: [{
  18224. // "role": "user",
  18225. // "content": messages
  18226. // }] ,
  18227. // },
  18228. // uid: _uuid,
  18229. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18230. // });
  18231. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18232. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18233. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18234. console.log(response);
  18235. let data = response.data.FunctionResponse
  18236. // if (data.choices && data.choices.length && data.choices[0].message) {
  18237. // console.log(data.choices[0].message.content);
  18238. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  18239. // _this.$forceUpdate()
  18240. // }
  18241. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18242. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18243. } else {
  18244. _this.$message.warning(response.data.FunctionResponse.result);
  18245. }
  18246. }).catch(function (error) {
  18247. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18248. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  18249. console.log(error);
  18250. });
  18251. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  18252. },
  18253. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  18254. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18255. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18256. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18257. let _allText = "";
  18258. let _mdText = "";
  18259. let _iindex = 0
  18260. _source.onmessage = _e => {
  18261. let _eData = JSON.parse(_e.data).content;
  18262. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18263. //对话已经完成
  18264. _mdText = _mdText.replace("_", "");
  18265. _source.close();
  18266. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18267. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18268. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  18269. return;
  18270. } else {
  18271. _iindex++
  18272. //对话还在继续
  18273. let _text = "";
  18274. _text = _eData.replaceAll("'", "");
  18275. if (_allText == "") {
  18276. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18277. } else {
  18278. _allText += _text;
  18279. }
  18280. _mdText = _allText + "_";
  18281. _mdText = _mdText.replace(/\\n/g, "\n");
  18282. _mdText = _mdText.replace(/\\/g, "");
  18283. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18284. //转化返回的回复流数据
  18285. if(_iindex == 10){
  18286. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18287. _iindex = 0
  18288. }
  18289. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18290. // 处理流数据
  18291. }
  18292. // this.$forceUpdate();
  18293. };
  18294. },
  18295. async aiDetail4(msg, index) {
  18296. if (!msg.length) {
  18297. this.$message.error("请添加评价后才能优化")
  18298. return
  18299. }
  18300. let _this = this
  18301. const _tindex = 'task-' + index
  18302. const _tindex2 = index
  18303. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18304. if (_this.infoData.length) {
  18305. for (var i = 0; i < _this.infoData.length; i++) {
  18306. if(_this.infoData[i].fileid){
  18307. fileid.push(_this.infoData[i].fileid)
  18308. }else {
  18309. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18310. if(_fileid){
  18311. _this.infoData[i].fileid = _fileid
  18312. _this.$forceUpdate();
  18313. fileid.push(_fileid)
  18314. }
  18315. }
  18316. }
  18317. }
  18318. var _text = ""
  18319. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  18320. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  18321. }
  18322. // **重点考虑该任务详情**
  18323. let messages = `
  18324. 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.
  18325. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18326. #Context
  18327. ## 参考内容
  18328. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18329. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18330. 评价设计:${_text}
  18331. ## 要求
  18332. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  18333. # 格式与要求
  18334. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18335. # Format example
  18336. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  18337. _this.taskDetailLoading4.push(_tindex)
  18338. // let params = JSON.stringify({
  18339. // // "model": "Chat",
  18340. // model: 'gpt-3.5-turbo',
  18341. // temperature: 0,
  18342. // max_tokens: 4096,
  18343. // top_p: 1,
  18344. // frequency_penalty: 0,
  18345. // presence_penalty: 0,
  18346. // messages: [{
  18347. // content: messages,
  18348. // role: 'user'
  18349. // }],
  18350. // stream: false,
  18351. // uid: this.userid,
  18352. // mind_map_question: "",
  18353. // })
  18354. let params = {
  18355. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18356. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18357. session_name: uuidv4(),
  18358. userId: _this.userid,
  18359. file_ids: fileid.length ? [...fileid] : '',
  18360. model: 'gpt-4o-2024-08-06',
  18361. }
  18362. // let params = JSON.stringify({
  18363. // message: {
  18364. // anthropic_version: "bedrock-2023-05-31",
  18365. // max_tokens: 4096,
  18366. // temperature: 0,
  18367. // top_p: 1,
  18368. // messages: [{
  18369. // content: messages,
  18370. // role: 'user'
  18371. // }], //
  18372. // },
  18373. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18374. // });
  18375. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18376. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  18377. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18378. console.log(response);
  18379. let data = response.data.FunctionResponse
  18380. // if (data.choices && data.choices.length && data.choices[0].message) {
  18381. // console.log(data.choices[0].message.content);
  18382. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  18383. // _this.$forceUpdate()
  18384. // }
  18385. if (data.message) {
  18386. console.log(data.message);
  18387. try {
  18388. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  18389. } catch (e) {
  18390. console.log("error_________________" + e);
  18391. // _this.$message.error(data.message)
  18392. try {
  18393. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18394. let match = data.message.match(regex);
  18395. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  18396. // var message = data.message;
  18397. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18398. // var jsonEnd = message.indexOf("```", jsonStart);
  18399. // if (jsonStart !== -1 && jsonEnd !== -1) {
  18400. // var jsonString = message
  18401. // .substring(jsonStart, jsonEnd)
  18402. // .trim();
  18403. // var _data2 = JSON.parse(jsonString);
  18404. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  18405. // }
  18406. } catch (error) {
  18407. }
  18408. }
  18409. _this.$forceUpdate()
  18410. }
  18411. // if (data.result) {
  18412. // console.log(data.result);
  18413. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  18414. // _this.$forceUpdate()
  18415. // }
  18416. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18417. }).catch(function (error) {
  18418. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18419. console.log(error);
  18420. });
  18421. },
  18422. async aiDetail5(msg, index) {
  18423. let _this = this
  18424. const _tindex = 'task-' + index
  18425. const _tindex2 = index
  18426. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18427. if (_this.infoData.length) {
  18428. for (var i = 0; i < _this.infoData.length; i++) {
  18429. if(_this.infoData[i].fileid){
  18430. fileid.push(_this.infoData[i].fileid)
  18431. }else {
  18432. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18433. if(_fileid){
  18434. _this.infoData[i].fileid = _fileid
  18435. _this.$forceUpdate();
  18436. fileid.push(_fileid)
  18437. }
  18438. }
  18439. }
  18440. }
  18441. let url = []
  18442. if (this.infoData.length) {
  18443. for (var i = 0; i < this.infoData.length; i++) {
  18444. url.push(this.infoData[i].url)
  18445. }
  18446. }
  18447. var _text = ""
  18448. var _text2 = ""
  18449. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18450. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18451. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18452. }
  18453. let messages = `
  18454. 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.
  18455. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18456. --------
  18457. ## 要求
  18458. ${msg}
  18459. -------
  18460. ## 本教案描述
  18461. ${_this.aiCallBack}
  18462. -------
  18463. ## 课程大纲
  18464. ${_text}
  18465. -------
  18466. ## 其他教学任务教案
  18467. ${_text2}`
  18468. // ## 补充参考资料
  18469. // - 补充资料:${url.join(",")}
  18470. // - 补充描述:${this.courseText2}
  18471. _this.taskDetailLoading5.push(_tindex)
  18472. _this.ttaskDetailLoading5.push(_tindex)
  18473. let _uuid = uuidv4();
  18474. // let params = JSON.stringify({
  18475. // // "model": "Chat",
  18476. // model: 'gpt-3.5-turbo',
  18477. // temperature: 0,
  18478. // max_tokens: 4096,
  18479. // top_p: 1,
  18480. // frequency_penalty: 0,
  18481. // presence_penalty: 0,
  18482. // messages: [{
  18483. // content: messages,
  18484. // role: 'user'
  18485. // }],
  18486. // uid: _uuid,
  18487. // mind_map_question: "",
  18488. // })
  18489. let params = {
  18490. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18491. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18492. session_name: _uuid,
  18493. userId: _this.userid,
  18494. uid: _uuid,
  18495. file_ids: fileid.length ? [...fileid] : '',
  18496. model: 'gpt-4o-2024-08-06',
  18497. }
  18498. // let params = JSON.stringify({
  18499. // message: {
  18500. // anthropic_version: "bedrock-2023-05-31",
  18501. // max_tokens: 4096,
  18502. // temperature: 0,
  18503. // top_p: 1,
  18504. // messages: [{
  18505. // "role": "user",
  18506. // "content": messages
  18507. // }] ,
  18508. // },
  18509. // uid: _uuid,
  18510. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18511. // });
  18512. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18513. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18514. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18515. console.log(response);
  18516. // let data = response.data.FunctionResponse
  18517. // if (data.choices && data.choices.length && data.choices[0].message) {
  18518. // console.log(data.choices[0].message.content);
  18519. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18520. // _this.$forceUpdate()
  18521. // }
  18522. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18523. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18524. } else {
  18525. _this.$message.warning(response.data.FunctionResponse.result);
  18526. }
  18527. }).catch(function (error) {
  18528. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18529. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18530. console.log(error);
  18531. });
  18532. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  18533. },
  18534. aiDetail5getAiContent(_uid, loading, _tindex2) {
  18535. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18536. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18537. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18538. let _allText = "";
  18539. let _mdText = "";
  18540. let _iindex = 0
  18541. _source.onmessage = _e => {
  18542. let _eData = JSON.parse(_e.data).content;
  18543. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18544. //对话已经完成
  18545. _mdText = _mdText.replace("_", "");
  18546. _source.close();
  18547. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18548. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18549. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18550. return;
  18551. } else {
  18552. _iindex++
  18553. //对话还在继续
  18554. let _text = "";
  18555. _text = _eData.replaceAll("'", "");
  18556. if (_allText == "") {
  18557. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18558. } else {
  18559. _allText += _text;
  18560. }
  18561. _mdText = _allText + "_";
  18562. _mdText = _mdText.replace(/\\n/g, "\n");
  18563. _mdText = _mdText.replace(/\\/g, "");
  18564. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18565. //转化返回的回复流数据
  18566. if(_iindex == 10){
  18567. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18568. _iindex = 0
  18569. }
  18570. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18571. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18572. }
  18573. // 处理流数据
  18574. }
  18575. // this.$forceUpdate();
  18576. };
  18577. },
  18578. async aiDetail52(msg, index) {
  18579. let _this = this
  18580. const _tindex = 'task-' + index
  18581. const _tindex2 = index
  18582. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18583. if (_this.infoData.length) {
  18584. for (var i = 0; i < _this.infoData.length; i++) {
  18585. if(_this.infoData[i].fileid){
  18586. fileid.push(_this.infoData[i].fileid)
  18587. }else {
  18588. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18589. if(_fileid){
  18590. _this.infoData[i].fileid = _fileid
  18591. _this.$forceUpdate();
  18592. fileid.push(_fileid)
  18593. }
  18594. }
  18595. }
  18596. }
  18597. let url = []
  18598. if (this.infoData.length) {
  18599. for (var i = 0; i < this.infoData.length; i++) {
  18600. url.push(this.infoData[i].url)
  18601. }
  18602. }
  18603. let messages = `NOTICE
  18604. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18605. 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.
  18606. #Context
  18607. ## 要求
  18608. ${msg}
  18609. ## 补充描述
  18610. 课程简要描述:${_this.courseText}
  18611. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18612. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  18613. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18614. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18615. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18616. `
  18617. // ## 补充参考资料
  18618. // - 补充资料:${url.join(",")}
  18619. // - 补充描述:${this.courseText2}
  18620. _this.taskDetailLoading5.push(_tindex)
  18621. _this.ttaskDetailLoading5.push(_tindex)
  18622. let _uuid = uuidv4();
  18623. // let params = JSON.stringify({
  18624. // // "model": "Chat",
  18625. // model: 'gpt-3.5-turbo',
  18626. // temperature: 0,
  18627. // max_tokens: 4096,
  18628. // top_p: 1,
  18629. // frequency_penalty: 0,
  18630. // presence_penalty: 0,
  18631. // messages: [{
  18632. // content: messages,
  18633. // role: 'user'
  18634. // }],
  18635. // uid: _uuid,
  18636. // mind_map_question: "",
  18637. // })
  18638. let params = {
  18639. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18640. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18641. session_name: _uuid,
  18642. userId: _this.userid,
  18643. uid: _uuid,
  18644. file_ids: fileid.length ? [...fileid] : '',
  18645. model: 'gpt-4o-2024-08-06',
  18646. }
  18647. // let params = JSON.stringify({
  18648. // message: {
  18649. // anthropic_version: "bedrock-2023-05-31",
  18650. // max_tokens: 4096,
  18651. // temperature: 0,
  18652. // top_p: 1,
  18653. // messages: [{
  18654. // "role": "user",
  18655. // "content": messages
  18656. // }] ,
  18657. // },
  18658. // uid: _uuid,
  18659. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18660. // });
  18661. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18662. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18663. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18664. console.log(response);
  18665. // let data = response.data.FunctionResponse
  18666. // if (data.choices && data.choices.length && data.choices[0].message) {
  18667. // console.log(data.choices[0].message.content);
  18668. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18669. // _this.$forceUpdate()
  18670. // }
  18671. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18672. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18673. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  18674. } else {
  18675. _this.$message.warning(response.data.FunctionResponse.result);
  18676. }
  18677. }).catch(function (error) {
  18678. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18679. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18680. console.log(error);
  18681. });
  18682. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  18683. },
  18684. aiDetail52getAiContent(_uid, loading, _tindex2) {
  18685. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18686. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18687. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18688. let _allText = "";
  18689. let _mdText = "";
  18690. this.allTextArray[_tindex2] = ""
  18691. let _iindex = 0
  18692. _source.onmessage = async (_e) => {
  18693. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  18694. let _eData = JSON.parse(_e.data).content;
  18695. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18696. //对话已经完成
  18697. _mdText = _mdText.replace("_", "");
  18698. _source.close();
  18699. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18700. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18701. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18702. return;
  18703. } else {
  18704. _iindex++
  18705. //对话还在继续
  18706. let _text = "";
  18707. _text = _eData.replaceAll("'", "");
  18708. if (_allText == "") {
  18709. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18710. } else {
  18711. _allText += _text;
  18712. }
  18713. _mdText = _allText + "_";
  18714. _mdText = _mdText.replace(/\\n/g, "\n");
  18715. _mdText = _mdText.replace(/\\/g, "");
  18716. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18717. //转化返回的回复流数据
  18718. if(_iindex == 10){
  18719. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18720. _iindex = 0
  18721. }
  18722. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18723. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18724. }
  18725. // 处理流数据
  18726. }
  18727. };
  18728. },
  18729. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  18730. let _mdText = "";
  18731. let _eData = JSON.parse(_e.data).content;
  18732. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18733. //对话已经完成
  18734. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  18735. _source.close();
  18736. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18737. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18738. return;
  18739. } else {
  18740. //对话还在继续
  18741. let _text = "";
  18742. _text = _eData.replaceAll("'", "");
  18743. if (this.allTextArray[_tindex2] == "") {
  18744. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18745. } else {
  18746. this.allTextArray[_tindex2] += _text;
  18747. }
  18748. _mdText = this.allTextArray[_tindex2] + "_";
  18749. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  18750. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  18751. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  18752. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  18753. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18754. // 处理流数据
  18755. }
  18756. },
  18757. async aiCpote(msg, callback) {
  18758. let _this = this
  18759. let _index = _this.aitype.replace("aiC","c")
  18760. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18761. if (_this.infoData.length) {
  18762. for (var i = 0; i < _this.infoData.length; i++) {
  18763. if(_this.infoData[i].fileid){
  18764. fileid.push(_this.infoData[i].fileid)
  18765. }else {
  18766. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18767. if(_fileid){
  18768. _this.infoData[i].fileid = _fileid
  18769. _this.$forceUpdate();
  18770. fileid.push(_fileid)
  18771. }
  18772. }
  18773. }
  18774. }
  18775. let sub = []
  18776. if (this.courseTypeId.length) {
  18777. for (var i = 0; i < this.courseTypeId.length; i++) {
  18778. let _sid = this.courseTypeId[i]
  18779. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18780. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18781. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18782. }
  18783. }
  18784. }
  18785. }
  18786. let mclass = []
  18787. if (this.courseTypeId.length) {
  18788. for (var i = 0; i < this.courseTypeId.length; i++) {
  18789. let _sid = this.courseTypeId[i]
  18790. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18791. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18792. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18793. }
  18794. }
  18795. }
  18796. }
  18797. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18798. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  18799. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18800. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18801. let messages = `NOTICE
  18802. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18803. 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.
  18804. ${msg}
  18805. ## 课程简介
  18806. 课程名字:${this.courseName}
  18807. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18808. ${sub.length ? '学科:' + sub.join(",") : ''}
  18809. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18810. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18811. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  18812. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  18813. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  18814. _this.cpoteLoading[_index] = true
  18815. _this.cpotetLoading[_index] = true
  18816. let _uuid = uuidv4();
  18817. // let params = JSON.stringify({
  18818. // // "model": "Chat",
  18819. // model: 'gpt-3.5-turbo',
  18820. // temperature: 0,
  18821. // max_tokens: 4096,
  18822. // top_p: 1,
  18823. // frequency_penalty: 0,
  18824. // presence_penalty: 0,
  18825. // messages: [{
  18826. // content: messages,
  18827. // role: 'user'
  18828. // }],
  18829. // uid: _uuid,
  18830. // mind_map_question: "",
  18831. // })
  18832. let params = {
  18833. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18834. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18835. session_name: _uuid,
  18836. userId: _this.userid,
  18837. uid: _uuid,
  18838. file_ids: fileid.length ? [...fileid] : '',
  18839. model: 'gpt-4o-2024-08-06',
  18840. }
  18841. // let params = JSON.stringify({
  18842. // message: {
  18843. // anthropic_version: "bedrock-2023-05-31",
  18844. // max_tokens: 4096,
  18845. // temperature: 0,
  18846. // top_p: 1,
  18847. // messages: [{
  18848. // "role": "user",
  18849. // "content": messages
  18850. // }] ,
  18851. // },
  18852. // uid: _uuid,
  18853. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18854. // });
  18855. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18856. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18857. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18858. console.log(response);
  18859. // let data = response.data.FunctionResponse
  18860. // if (data.choices && data.choices.length && data.choices[0].message) {
  18861. // console.log(data.choices[0].message.content);
  18862. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18863. // _this.$forceUpdate()
  18864. // }
  18865. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18866. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18867. } else {
  18868. _this.$message.warning(response.data.FunctionResponse.result);
  18869. }
  18870. }).catch(function (error) {
  18871. _this.cpoteLoading[_index] = false
  18872. _this.cpotetLoading[_index] = false
  18873. callback ? callback() : ''
  18874. console.log(error);
  18875. });
  18876. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  18877. },
  18878. aiCpotegetAiContent(_uid, loading, callback) {
  18879. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18880. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18881. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18882. let _allText = "";
  18883. let _mdText = "";
  18884. let _iindex = 0
  18885. _source.onmessage = _e => {
  18886. let _eData = JSON.parse(_e.data).content;
  18887. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18888. //对话已经完成
  18889. _mdText = _mdText.replace("_", "");
  18890. _source.close();
  18891. this.cpote[loading] = _mdText;
  18892. this.cpoteLoading[loading] = false
  18893. this.cpotetLoading[loading] = false
  18894. callback ? callback() : ''
  18895. return;
  18896. } else {
  18897. _iindex++
  18898. //对话还在继续
  18899. let _text = "";
  18900. _text = _eData.replaceAll("'", "");
  18901. if (_allText == "") {
  18902. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18903. } else {
  18904. _allText += _text;
  18905. }
  18906. _mdText = _allText + "_";
  18907. _mdText = _mdText.replace(/\\n/g, "\n");
  18908. _mdText = _mdText.replace(/\\/g, "");
  18909. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18910. //转化返回的回复流数据
  18911. if(_iindex == 10){
  18912. this.cpote[loading] = _mdText;
  18913. _iindex = 0
  18914. }
  18915. this.cpoteLoading[loading] = false
  18916. // 处理流数据
  18917. }
  18918. // this.$forceUpdate();
  18919. };
  18920. },
  18921. async aiteacherTextDetail(msg) {
  18922. let _this = this
  18923. let fileid = []
  18924. if (_this.teacherInfoData.length) {
  18925. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  18926. if(_this.teacherInfoData[i].fileid){
  18927. fileid.push(_this.teacherInfoData[i].fileid)
  18928. }else {
  18929. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  18930. if(_fileid){
  18931. _this.teacherInfoData[i].fileid = _fileid
  18932. _this.$forceUpdate();
  18933. fileid.push(_fileid)
  18934. }
  18935. }
  18936. }
  18937. }
  18938. _this.teacherTextLoading = true
  18939. _this.tteacherTextLoading = true
  18940. let sub = []
  18941. if (_this.courseTypeId.length) {
  18942. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18943. let _sid = _this.courseTypeId[i]
  18944. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18945. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18946. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18947. }
  18948. }
  18949. }
  18950. }
  18951. let mclass = []
  18952. if (_this.courseTypeId.length) {
  18953. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18954. let _sid = _this.courseTypeId[i]
  18955. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18956. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18957. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18958. }
  18959. }
  18960. }
  18961. }
  18962. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18963. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18964. let messages = `NOTICE
  18965. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  18966. 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.
  18967. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18968. Instruction: Based on the context, follow "Format example", write content.
  18969. #Context
  18970. ## 参考资料
  18971. 课程名字:${this.courseName}
  18972. ${sub.length ? '学科:' + sub.join(",") : ''}
  18973. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18974. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  18975. ## 要求
  18976. ${msg}
  18977. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  18978. let _uuid = uuidv4();
  18979. // let params = JSON.stringify({
  18980. // // "model": "Chat",
  18981. // model: 'gpt-3.5-turbo',
  18982. // temperature: 0,
  18983. // max_tokens: 4096,
  18984. // top_p: 1,
  18985. // frequency_penalty: 0,
  18986. // presence_penalty: 0,
  18987. // messages: [{
  18988. // content: messages,
  18989. // role: 'user'
  18990. // }],
  18991. // uid: _uuid,
  18992. // mind_map_question: "",
  18993. // })
  18994. let params = {
  18995. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18996. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18997. session_name: _uuid,
  18998. userId: _this.userid,
  18999. uid: _uuid,
  19000. file_ids: fileid.length ? [...fileid] : '',
  19001. model: 'gpt-4o-2024-08-06',
  19002. }
  19003. // let params = JSON.stringify({
  19004. // message: {
  19005. // anthropic_version: "bedrock-2023-05-31",
  19006. // max_tokens: 4096,
  19007. // temperature: 0,
  19008. // top_p: 1,
  19009. // messages: [{
  19010. // "role": "user",
  19011. // "content": messages
  19012. // }] ,
  19013. // },
  19014. // uid: _uuid,
  19015. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19016. // });
  19017. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19018. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19019. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19020. console.log(response);
  19021. // let data = response.data.FunctionResponse
  19022. // if (data.choices && data.choices.length && data.choices[0].message) {
  19023. // _this.courseText = data.choices[0].message.content
  19024. // }
  19025. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19026. } else {
  19027. _this.$message.warning(response.data.FunctionResponse.result);
  19028. }
  19029. }).catch(function (error) {
  19030. _this.teacherTextLoading = false
  19031. _this.tteacherTextLoading = false
  19032. console.log(error);
  19033. });
  19034. await _this.aiteacherTextDetailgetAiContent(_uuid)
  19035. },
  19036. aiteacherTextDetailgetAiContent(_uid) {
  19037. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19038. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19039. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19040. let _allText = "";
  19041. let _mdText = "";
  19042. let _iindex = 0
  19043. _source.onmessage = _e => {
  19044. let _eData = JSON.parse(_e.data).content;
  19045. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19046. //对话已经完成
  19047. _mdText = _mdText.replace("_", "");
  19048. _source.close();
  19049. this.teacherCourseText = _mdText;
  19050. this.teacherTextLoading = false
  19051. this.tteacherTextLoading = false
  19052. this.teacherCourseTextB = false
  19053. return;
  19054. } else {
  19055. _iindex++
  19056. //对话还在继续
  19057. let _text = "";
  19058. _text = _eData.replaceAll("'", "");
  19059. if (_allText == "") {
  19060. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19061. } else {
  19062. _allText += _text;
  19063. }
  19064. _mdText = _allText + "_";
  19065. _mdText = _mdText.replace(/\\n/g, "\n");
  19066. _mdText = _mdText.replace(/\\/g, "");
  19067. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19068. //转化返回的回复流数据
  19069. if(_iindex == 10){
  19070. this.teacherCourseText = _mdText;
  19071. _iindex = 0
  19072. }
  19073. if(this.teacherTextLoading){
  19074. this.teacherTextLoading = false
  19075. }
  19076. // 处理流数据
  19077. }
  19078. // this.$forceUpdate();
  19079. };
  19080. },
  19081. async aitargetTextDetail(msg) {
  19082. let _this = this
  19083. let fileid = []
  19084. if (_this.teacherInfoData.length) {
  19085. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  19086. if(_this.teacherInfoData[i].fileid){
  19087. fileid.push(_this.teacherInfoData[i].fileid)
  19088. }else {
  19089. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  19090. if(_fileid){
  19091. _this.teacherInfoData[i].fileid = _fileid
  19092. _this.$forceUpdate();
  19093. fileid.push(_fileid)
  19094. }
  19095. }
  19096. }
  19097. }
  19098. _this.targetTextLoading = true
  19099. _this.ttargetTextLoading = true
  19100. let sub = []
  19101. if (_this.courseTypeId.length) {
  19102. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19103. let _sid = _this.courseTypeId[i]
  19104. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19105. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19106. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19107. }
  19108. }
  19109. }
  19110. }
  19111. let mclass = []
  19112. if (_this.courseTypeId.length) {
  19113. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19114. let _sid = _this.courseTypeId[i]
  19115. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19116. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19117. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19118. }
  19119. }
  19120. }
  19121. }
  19122. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19123. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19124. let messages = `NOTICE
  19125. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19126. 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.
  19127. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19128. Instruction: Based on the context, follow "Format example", write content.
  19129. #Context
  19130. ## 参考资料
  19131. 课程名字:${this.courseName}
  19132. ${sub.length ? '学科:' + sub.join(",") : ''}
  19133. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19134. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19135. ## 要求
  19136. ${msg}
  19137. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19138. let _uuid = uuidv4();
  19139. // let params = JSON.stringify({
  19140. // // "model": "Chat",
  19141. // model: 'gpt-3.5-turbo',
  19142. // temperature: 0,
  19143. // max_tokens: 4096,
  19144. // top_p: 1,
  19145. // frequency_penalty: 0,
  19146. // presence_penalty: 0,
  19147. // messages: [{
  19148. // content: messages,
  19149. // role: 'user'
  19150. // }],
  19151. // uid: _uuid,
  19152. // mind_map_question: "",
  19153. // })
  19154. let params = {
  19155. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19156. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19157. session_name: _uuid,
  19158. userId: _this.userid,
  19159. uid: _uuid,
  19160. file_ids: fileid.length ? [...fileid] : '',
  19161. model: 'gpt-4o-2024-08-06',
  19162. }
  19163. // let params = JSON.stringify({
  19164. // message: {
  19165. // anthropic_version: "bedrock-2023-05-31",
  19166. // max_tokens: 4096,
  19167. // temperature: 0,
  19168. // top_p: 1,
  19169. // messages: [{
  19170. // "role": "user",
  19171. // "content": messages
  19172. // }] ,
  19173. // },
  19174. // uid: _uuid,
  19175. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19176. // });
  19177. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19178. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19179. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19180. console.log(response);
  19181. // let data = response.data.FunctionResponse
  19182. // if (data.choices && data.choices.length && data.choices[0].message) {
  19183. // _this.courseText = data.choices[0].message.content
  19184. // }
  19185. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19186. } else {
  19187. _this.$message.warning(response.data.FunctionResponse.result);
  19188. }
  19189. }).catch(function (error) {
  19190. _this.targetTextLoading = false
  19191. _this.ttargetTextLoading = false
  19192. console.log(error);
  19193. });
  19194. await _this.aitargetTextDetailgetAiContent(_uuid)
  19195. },
  19196. aitargetTextDetailgetAiContent(_uid) {
  19197. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19198. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19199. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19200. let _allText = "";
  19201. let _mdText = "";
  19202. let _iindex = 0
  19203. _source.onmessage = _e => {
  19204. let _eData = JSON.parse(_e.data).content;
  19205. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19206. //对话已经完成
  19207. _mdText = _mdText.replace("_", "");
  19208. _source.close();
  19209. this.targetCourseText = _mdText;
  19210. this.targetTextLoading = false
  19211. this.ttargetTextLoading = false
  19212. this.targetCourseTextB = false
  19213. return;
  19214. } else {
  19215. _iindex++
  19216. //对话还在继续
  19217. let _text = "";
  19218. _text = _eData.replaceAll("'", "");
  19219. if (_allText == "") {
  19220. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19221. } else {
  19222. _allText += _text;
  19223. }
  19224. _mdText = _allText + "_";
  19225. _mdText = _mdText.replace(/\\n/g, "\n");
  19226. _mdText = _mdText.replace(/\\/g, "");
  19227. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19228. //转化返回的回复流数据
  19229. if(_iindex == 10){
  19230. this.targetCourseText = _mdText;
  19231. _iindex = 0
  19232. }
  19233. if(this.targetTextLoading){
  19234. this.targetTextLoading = false
  19235. }
  19236. // 处理流数据
  19237. }
  19238. // this.$forceUpdate();
  19239. };
  19240. },
  19241. async aitargetTextDetail2(msg) {
  19242. let _this = this
  19243. let fileid = ['file-okF1PSRw4VYjRl81SykkxWSo'] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid
  19244. _this.targetTextLoading2 = true
  19245. _this.ttargetTextLoading2 = true
  19246. let sub = []
  19247. if (_this.courseTypeId.length) {
  19248. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19249. let _sid = _this.courseTypeId[i]
  19250. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19251. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19252. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19253. }
  19254. }
  19255. }
  19256. }
  19257. let mclass = []
  19258. if (_this.courseTypeId.length) {
  19259. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19260. let _sid = _this.courseTypeId[i]
  19261. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19262. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19263. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19264. }
  19265. }
  19266. }
  19267. }
  19268. let messages = `NOTICE
  19269. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19270. 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.
  19271. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19272. Instruction: Based on the context, follow "Format example", write content.
  19273. #Context
  19274. ## 参考资料
  19275. 课程标题:${this.courseName}
  19276. ${sub.length ? '学科:' + sub.join(",") : ''}
  19277. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19278. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  19279. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19280. ## 要求
  19281. ${msg}
  19282. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19283. let _uuid = uuidv4();
  19284. // let params = JSON.stringify({
  19285. // // "model": "Chat",
  19286. // model: 'gpt-3.5-turbo',
  19287. // temperature: 0,
  19288. // max_tokens: 4096,
  19289. // top_p: 1,
  19290. // frequency_penalty: 0,
  19291. // presence_penalty: 0,
  19292. // messages: [{
  19293. // content: messages,
  19294. // role: 'user'
  19295. // }],
  19296. // uid: _uuid,
  19297. // mind_map_question: "",
  19298. // })
  19299. let params = {
  19300. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19301. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19302. session_name: _uuid,
  19303. userId: _this.userid,
  19304. uid: _uuid,
  19305. file_ids: fileid.length ? [...fileid] : '',
  19306. model: 'gpt-4o-2024-08-06',
  19307. }
  19308. // let params = JSON.stringify({
  19309. // message: {
  19310. // anthropic_version: "bedrock-2023-05-31",
  19311. // max_tokens: 4096,
  19312. // temperature: 0,
  19313. // top_p: 1,
  19314. // messages: [{
  19315. // "role": "user",
  19316. // "content": messages
  19317. // }] ,
  19318. // },
  19319. // uid: _uuid,
  19320. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19321. // });
  19322. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19323. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19324. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19325. console.log(response);
  19326. // let data = response.data.FunctionResponse
  19327. // if (data.choices && data.choices.length && data.choices[0].message) {
  19328. // _this.courseText = data.choices[0].message.content
  19329. // }
  19330. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19331. } else {
  19332. _this.$message.warning(response.data.FunctionResponse.result);
  19333. }
  19334. }).catch(function (error) {
  19335. _this.targetTextLoading2 = false
  19336. _this.ttargetTextLoading2 = false
  19337. console.log(error);
  19338. });
  19339. await _this.aitargetTextDetail2getAiContent(_uuid)
  19340. },
  19341. async aitargetTextDetail22(msg,msg2) {
  19342. let _this = this
  19343. let fileid = [] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid 'file-okF1PSRw4VYjRl81SykkxWSo' 目标
  19344. _this.targetTextLoading2 = true
  19345. _this.ttargetTextLoading2 = true
  19346. let sub = []
  19347. if (_this.courseTypeId.length) {
  19348. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19349. let _sid = _this.courseTypeId[i]
  19350. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19351. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19352. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19353. }
  19354. }
  19355. }
  19356. }
  19357. let mclass = []
  19358. if (_this.courseTypeId.length) {
  19359. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19360. let _sid = _this.courseTypeId[i]
  19361. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19362. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19363. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19364. }
  19365. }
  19366. }
  19367. }
  19368. let messages = `NOTICE
  19369. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19370. 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.
  19371. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19372. Instruction: Based on the context, follow "Format example", write content.
  19373. #Context
  19374. ## 参考资料
  19375. 课程标题:${this.courseName}
  19376. ${sub.length ? '学科:' + sub.join(",") : ''}
  19377. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19378. 课程目标:${msg2}
  19379. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  19380. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19381. ## 要求
  19382. ${msg}
  19383. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19384. let _uuid = uuidv4();
  19385. // let params = JSON.stringify({
  19386. // // "model": "Chat",
  19387. // model: 'gpt-3.5-turbo',
  19388. // temperature: 0,
  19389. // max_tokens: 4096,
  19390. // top_p: 1,
  19391. // frequency_penalty: 0,
  19392. // presence_penalty: 0,
  19393. // messages: [{
  19394. // content: messages,
  19395. // role: 'user'
  19396. // }],
  19397. // uid: _uuid,
  19398. // mind_map_question: "",
  19399. // })
  19400. let params = {
  19401. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19402. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19403. session_name: _uuid,
  19404. userId: _this.userid,
  19405. uid: _uuid,
  19406. file_ids: fileid.length ? [...fileid] : '',
  19407. model: 'gpt-4o-2024-08-06',
  19408. }
  19409. // let params = JSON.stringify({
  19410. // message: {
  19411. // anthropic_version: "bedrock-2023-05-31",
  19412. // max_tokens: 4096,
  19413. // temperature: 0,
  19414. // top_p: 1,
  19415. // messages: [{
  19416. // "role": "user",
  19417. // "content": messages
  19418. // }] ,
  19419. // },
  19420. // uid: _uuid,
  19421. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19422. // });
  19423. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19424. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19425. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19426. console.log(response);
  19427. // let data = response.data.FunctionResponse
  19428. // if (data.choices && data.choices.length && data.choices[0].message) {
  19429. // _this.courseText = data.choices[0].message.content
  19430. // }
  19431. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19432. } else {
  19433. _this.$message.warning(response.data.FunctionResponse.result);
  19434. }
  19435. }).catch(function (error) {
  19436. _this.targetTextLoading2 = false
  19437. _this.ttargetTextLoading2 = false
  19438. console.log(error);
  19439. });
  19440. await _this.aitargetTextDetail2getAiContent(_uuid)
  19441. },
  19442. aitargetTextDetail2getAiContent(_uid) {
  19443. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19444. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19445. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19446. let _allText = "";
  19447. let _mdText = "";
  19448. let _iindex = 0
  19449. _source.onmessage = _e => {
  19450. let _eData = JSON.parse(_e.data).content;
  19451. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19452. //对话已经完成
  19453. _mdText = _mdText.replace("_", "");
  19454. _source.close();
  19455. this.targetCourseText2 = _mdText;
  19456. this.targetTextLoading2 = false
  19457. this.ttargetTextLoading2 = false
  19458. this.targetCourseText2B = false
  19459. return;
  19460. } else {
  19461. _iindex++
  19462. //对话还在继续
  19463. let _text = "";
  19464. _text = _eData.replaceAll("'", "");
  19465. if (_allText == "") {
  19466. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19467. } else {
  19468. _allText += _text;
  19469. }
  19470. _mdText = _allText + "_";
  19471. _mdText = _mdText.replace(/\\n/g, "\n");
  19472. _mdText = _mdText.replace(/\\/g, "");
  19473. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19474. //转化返回的回复流数据
  19475. if(_iindex == 10){
  19476. this.targetCourseText2 = _mdText;
  19477. _iindex = 0
  19478. }
  19479. if(this.targetTextLoading2){
  19480. this.targetTextLoading2 = false
  19481. }
  19482. // 处理流数据
  19483. }
  19484. // this.$forceUpdate();
  19485. };
  19486. },
  19487. async aitargetTextDetail3(msg) {
  19488. let _this = this
  19489. let fileid = ['file-okF1PSRw4VYjRl81SykkxWSo'] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid
  19490. _this.targetTextLoading2 = true
  19491. _this.ttargetTextLoading2 = true
  19492. let sub = []
  19493. if (_this.courseTypeId.length) {
  19494. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19495. let _sid = _this.courseTypeId[i]
  19496. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19497. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19498. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19499. }
  19500. }
  19501. }
  19502. }
  19503. let mclass = []
  19504. if (_this.courseTypeId.length) {
  19505. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19506. let _sid = _this.courseTypeId[i]
  19507. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19508. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19509. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19510. }
  19511. }
  19512. }
  19513. }
  19514. let messages = `${msg}`
  19515. let _uuid = uuidv4();
  19516. // let params = JSON.stringify({
  19517. // // "model": "Chat",
  19518. // model: 'gpt-3.5-turbo',
  19519. // temperature: 0,
  19520. // max_tokens: 4096,
  19521. // top_p: 1,
  19522. // frequency_penalty: 0,
  19523. // presence_penalty: 0,
  19524. // messages: [{
  19525. // content: messages,
  19526. // role: 'user'
  19527. // }],
  19528. // uid: _uuid,
  19529. // mind_map_question: "",
  19530. // })
  19531. let params = {
  19532. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19533. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19534. session_name: _uuid,
  19535. userId: _this.userid,
  19536. uid: _uuid,
  19537. file_ids: fileid.length ? [...fileid] : '',
  19538. model: 'gpt-4o-2024-08-06',
  19539. }
  19540. // let params = JSON.stringify({
  19541. // message: {
  19542. // anthropic_version: "bedrock-2023-05-31",
  19543. // max_tokens: 4096,
  19544. // temperature: 0,
  19545. // top_p: 1,
  19546. // messages: [{
  19547. // "role": "user",
  19548. // "content": messages
  19549. // }] ,
  19550. // },
  19551. // uid: _uuid,
  19552. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19553. // });
  19554. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19555. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  19556. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19557. console.log(response);
  19558. // let data = response.data.FunctionResponse
  19559. // if (data.choices && data.choices.length && data.choices[0].message) {
  19560. // _this.courseText = data.choices[0].message.content
  19561. // }
  19562. console.log(response);
  19563. let data = response.data.FunctionResponse
  19564. // if (data.choices && data.choices.length && data.choices[0].message) {
  19565. // console.log(data.choices[0].message.content);
  19566. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  19567. // _this.$forceUpdate()
  19568. // }
  19569. if (data.message) {
  19570. console.log('返回回来的目标:',data.message);
  19571. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  19572. }
  19573. }).catch(function (error) {
  19574. _this.targetTextLoading2 = false
  19575. _this.ttargetTextLoading2 = false
  19576. console.log(error);
  19577. });
  19578. },
  19579. againEva(msg, i, k) {
  19580. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  19581. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  19582. return;
  19583. }
  19584. if (this.ruleLoading[i]) {
  19585. this.ruleLoading[i][k] = true
  19586. } else {
  19587. this.ruleLoading[i] = []
  19588. this.ruleLoading[i][k] = true
  19589. }
  19590. let message = `NOTICE
  19591. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  19592. 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.
  19593. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19594. Instruction: Based on the context, follow "Format example", write content.
  19595. #Context
  19596. ##要求
  19597. ${msg}
  19598. ##制定标准资料
  19599. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value}
  19600. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  19601. # Format example
  19602. ==
  19603. 0 星,作业内容与作业要求无关;
  19604. 1 星,没有识别问题和需求;
  19605. 2 星,问题或需求没有被清晰理解或准确识别;
  19606. 3 星,问题或需求的一部分被识别;
  19607. 4 星,问题或需求的大部分被识别;
  19608. 5 星,问题或需求都被识别。
  19609. ==
  19610. `
  19611. // let params = {
  19612. // // "model": "Chat",
  19613. // model: 'gpt-4o-2024-08-06',
  19614. // // model: "gpt-4o",
  19615. // temperature: 0,
  19616. // max_tokens: 4096,
  19617. // top_p: 1,
  19618. // frequency_penalty: 0,
  19619. // presence_penalty: 0,
  19620. // messages: [
  19621. // {
  19622. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  19623. // role: "user"
  19624. // }
  19625. // ],
  19626. // stream: false,
  19627. // uid: this.userid,
  19628. // mind_map_question: ""
  19629. // };
  19630. // this.ajax
  19631. // .post("https://gpt4.cocorobo.cn/chat", params)
  19632. // .then(response => {
  19633. // let data = response.data.FunctionResponse;
  19634. // console.log("data", data);
  19635. // if (data.choices && data.choices.length && data.choices[0].message) {
  19636. // let content = data.choices[0].message.content;
  19637. // var regex = new RegExp('==([^=]+)==');
  19638. // let match = content.match(regex);
  19639. // if (match) {
  19640. // content = match[1].trim().replaceAll(' ', '');
  19641. // // 获取匹配到的内容并去除两端空格
  19642. // console.log('contentInsideDoubleEquals', content);
  19643. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  19644. // console.log("未有星级。");
  19645. // this.againEva(msg, i, k)
  19646. // return
  19647. // }
  19648. // //  return
  19649. // } else {
  19650. // console.log("未找到匹配的内容。");
  19651. // this.againEva(msg, i, k)
  19652. // return
  19653. // }
  19654. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  19655. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19656. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19657. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  19658. // this.$forceUpdate();
  19659. // this.ruleLoading[i][k] = false
  19660. // }else{
  19661. // this.ruleLoading[i][k] = false
  19662. // }
  19663. // })
  19664. // .catch(error => {
  19665. // console.log(error);
  19666. // this.ruleLoading[i][k] = false
  19667. // });
  19668. let parm = {
  19669. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19670. message: [{"type":"text", "text":message.replaceAll('\n', " ").replaceAll('*', "")}],
  19671. session_name: uuidv4(),
  19672. userId: this.userid,
  19673. file_ids: [],
  19674. model: 'gpt-4o-2024-08-06',
  19675. }
  19676. this.ajax
  19677. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19678. .then(async (response) => {
  19679. console.log(response);
  19680. let data = response.data.FunctionResponse
  19681. if (data.message) {
  19682. console.log(data.message);
  19683. let content = data.message;
  19684. var regex = new RegExp('==([^=]+)==');
  19685. let match = content.match(regex);
  19686. if (match) {
  19687. content = match[1].trim().replaceAll(' ', '');
  19688. // 获取匹配到的内容并去除两端空格
  19689. console.log('contentInsideDoubleEquals', content);
  19690. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  19691. console.log("未有星级。");
  19692. this.againEva(msg, i, k)
  19693. return
  19694. }
  19695. //  return
  19696. } else {
  19697. console.log("未找到匹配的内容。");
  19698. this.againEva(msg, i, k)
  19699. return
  19700. }
  19701. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  19702. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19703. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19704. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  19705. this.$forceUpdate();
  19706. this.ruleLoading[i][k] = false
  19707. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  19708. }else {
  19709. this.ruleLoading[i][k] = false
  19710. }
  19711. })
  19712. .catch((error) => {
  19713. this.ruleLoading[i][k] = false
  19714. console.log(error);
  19715. });
  19716. },
  19717. async aiSearchFile(messages, callback) {
  19718. let _this = this
  19719. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19720. console.log('fileid=========',fileid)
  19721. // let params = JSON.stringify({
  19722. // // "model": "Chat",
  19723. // model: 'gpt-3.5-turbo',
  19724. // temperature: 0,
  19725. // max_tokens: 4096,
  19726. // top_p: 1,
  19727. // frequency_penalty: 0,
  19728. // presence_penalty: 0,
  19729. // messages: [{
  19730. // content: messages,
  19731. // role: 'user'
  19732. // }],
  19733. // stream: false,
  19734. // uid: this.userid,
  19735. // mind_map_question: "",
  19736. // })
  19737. // // let params = JSON.stringify({
  19738. // // message: {
  19739. // // anthropic_version: "bedrock-2023-05-31",
  19740. // // max_tokens: 4096,
  19741. // // temperature: 0,
  19742. // // top_p: 1,
  19743. // // messages: [{
  19744. // // content: messages,
  19745. // // role: 'user'
  19746. // // }], //
  19747. // // },
  19748. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19749. // // });
  19750. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19751. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19752. // console.log(response);
  19753. // let data = response.data.FunctionResponse
  19754. // if (data.choices && data.choices.length && data.choices[0].message) {
  19755. // console.log(data.choices[0].message.content);
  19756. // let dArray = JSON.parse(data.choices[0].message.content)
  19757. // _this.dArray = dArray
  19758. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19759. // for (var i = 0; i < dArray.length; i++) {
  19760. // let _task = dArray[i]
  19761. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19762. // task: _task.task,
  19763. // taskDetail: "",
  19764. // taskDetail2: _task.detail,
  19765. // taskDetail3: "",
  19766. // chapterData: [],
  19767. // toolText: "",
  19768. // toolChoose: [
  19769. // {
  19770. // tool: [],
  19771. // toolDetail: "",
  19772. // toolType: 0,
  19773. // askCount: 1,
  19774. // askTitle: "",
  19775. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19776. // },
  19777. // ],
  19778. // isShowTools: false,
  19779. // askCount: 1,
  19780. // isFold: 0,
  19781. // askTitle: "",
  19782. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19783. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19784. // homeworkList: [],
  19785. // })
  19786. // }
  19787. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19788. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19789. // _this.$forceUpdate();
  19790. // }
  19791. // // if (data.result) {
  19792. // // console.log(data.result);
  19793. // // let dArray = JSON.parse(data.result)
  19794. // // _this.dArray = dArray
  19795. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19796. // // for (var i = 0; i < dArray.length; i++) {
  19797. // // let _task = dArray[i]
  19798. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19799. // // task: _task.task,
  19800. // // taskDetail: "",
  19801. // // taskDetail2: _task.detail,
  19802. // // taskDetail3: "",
  19803. // // chapterData: [],
  19804. // // toolText: "",
  19805. // // toolChoose: [
  19806. // // {
  19807. // // tool: [],
  19808. // // toolDetail: "",
  19809. // // toolType: 0,
  19810. // // askCount: 1,
  19811. // // askTitle: "",
  19812. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19813. // // },
  19814. // // ],
  19815. // // isShowTools: false,
  19816. // // askCount: 1,
  19817. // // isFold: 1,
  19818. // // askTitle: "",
  19819. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19820. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19821. // // homeworkList: [],
  19822. // // })
  19823. // // }
  19824. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19825. // // _this.$forceUpdate();
  19826. // // }
  19827. // callback ? callback() : ''
  19828. // }).catch(function (error) {
  19829. // _this.loading = false
  19830. // console.log(error);
  19831. // });
  19832. let parm = {
  19833. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19834. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19835. session_name: uuidv4(),
  19836. userId: this.userid,
  19837. file_ids: fileid.length ? [...fileid] : '',
  19838. model: 'gpt-4o-2024-08-06',
  19839. }
  19840. this.ajax
  19841. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19842. .then((response) => {
  19843. console.log(response);
  19844. let data = response.data.FunctionResponse
  19845. if (data.message) {
  19846. console.log(data.message);
  19847. let dArray = []
  19848. try {
  19849. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19850. } catch (error) {
  19851. // callback ? callback() : ''
  19852. console.log("error_________________" + error);
  19853. try {
  19854. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19855. let match = data.message.match(regex);
  19856. dArray = JSON.parse(match[0]);
  19857. } catch (error) {
  19858. callback ? callback() : ''
  19859. _this.$message.error("生成的json格式错误,请重新点击获取")
  19860. console.log("error_________________" + error);
  19861. }
  19862. }
  19863. for(let i = 0; i < dArray.length; i++){
  19864. let content = dArray[i].content
  19865. let name = '参考资料'+(i+1)
  19866. let md = new MarkdownIt();
  19867. let _html = content ? md.render(content) : ''
  19868. setTimeout(()=>{
  19869. if(i == (dArray.length - 1)){
  19870. _this.generate2(name, _html, i, callback)
  19871. }else {
  19872. _this.generate2(name, _html, i)
  19873. }
  19874. }, 500 * i)
  19875. }
  19876. _this.$forceUpdate();
  19877. }
  19878. })
  19879. .catch((error) => {
  19880. callback ? callback() : ''
  19881. console.log(error);
  19882. });
  19883. },
  19884. createFileid(url) {
  19885. let _this = this
  19886. return new Promise((resolve, reject) => {
  19887. try {
  19888. _this.ajax
  19889. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  19890. url: url,
  19891. })
  19892. .then((res) => {
  19893. let _data = res.data.FunctionResponse;
  19894. if (_data.result && _data.result.id) {
  19895. resolve(_data.result.id)
  19896. }
  19897. }).catch(function (error) {
  19898. resolve('')
  19899. });
  19900. }catch (e){
  19901. resolve()
  19902. }
  19903. });
  19904. }
  19905. },
  19906. beforeDestroy() {
  19907. clearTimeout(this.timer);
  19908. this.timer = null;
  19909. clearInterval(this.timer2);
  19910. this.timer2 = null;
  19911. clearInterval(this.pasteTimer);
  19912. this.pasteTimer = null;
  19913. },
  19914. beforeRouteLeave(to, from, next) {
  19915. clearTimeout(this.timer);
  19916. this.timer = null;
  19917. clearInterval(this.timer2);
  19918. this.timer2 = null;
  19919. clearInterval(this.pasteTimer);
  19920. this.pasteTimer = null;
  19921. next();
  19922. },
  19923. created() {
  19924. this.getStudent();
  19925. this.getTeacher();
  19926. this.getClass();
  19927. this.selectGrage();
  19928. this.getTemplate();
  19929. this.getTipsTemplate();
  19930. // this.selectType();
  19931. this.selectEva();
  19932. if(this.istemplate == 1){
  19933. this.isOutline = true
  19934. this.isOutline2 = true
  19935. this.courseTextBool = true
  19936. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  19937. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  19938. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  19939. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  19940. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  19941. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  19942. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  19943. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  19944. }
  19945. this.loading = false;
  19946. this.timer2 = setInterval(() => {
  19947. this.selectEva();
  19948. }, 5000);
  19949. this.pasteTimer = setInterval(() => {
  19950. this.getPaste();
  19951. }, 1000);
  19952. setTimeout(() => {
  19953. // this.selectAllType();
  19954. this.selectCourseDetail();
  19955. }, 500);
  19956. let _this = this;
  19957. window.pasteStage = function (json) {
  19958. _this.pasteStage(json);
  19959. };
  19960. window.pasteTask = function (json) {
  19961. _this.pasteTask(json);
  19962. };
  19963. },
  19964. };
  19965. </script>
  19966. <style scoped>
  19967. @media screen and (max-width: 1280px) {
  19968. .mbCss {
  19969. flex-direction: column !important;
  19970. }
  19971. .pjCss {
  19972. width: 100% !important;
  19973. }
  19974. .evaCss {
  19975. width: 100% !important;
  19976. margin-top: 10px;
  19977. }
  19978. }
  19979. .el-table>>>.even_row {
  19980. background-color: #f1f1f1 !important;
  19981. }
  19982. .dialog_diy>>>.el-dialog__header {
  19983. background: #3c3c3c !important;
  19984. padding: 15px 20px;
  19985. }
  19986. .dialog_diy>>>.el-dialog__title {
  19987. color: #fff;
  19988. }
  19989. .dialog_diy>>>.el-dialog__headerbtn {
  19990. top: 19px;
  19991. }
  19992. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  19993. color: #fff;
  19994. }
  19995. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  19996. color: #fff;
  19997. }
  19998. .dialog_diy>>>.el-dialog__body,
  19999. .dialog_diy>>>.el-dialog__footer {
  20000. background: #fafafa;
  20001. }
  20002. .dialog_diy3>>>.el-dialog__body,
  20003. .dialog_diy3>>>.el-dialog__footer {
  20004. background: #eee !important;
  20005. }
  20006. .dialog_diy3>>>.el-dialog__body {
  20007. padding: 20px 20px;
  20008. }
  20009. .dialog_diyStage>>>.el-dialog__body {
  20010. padding: 10px;
  20011. }
  20012. .source_diy>>>.el-dialog {
  20013. height: 100% !important;
  20014. margin: 0 auto !important;
  20015. }
  20016. .source_diy>>>.el-dialog__body {
  20017. height: calc(100% - 185px);
  20018. overflow: auto;
  20019. background: #e6eaf0;
  20020. }
  20021. .source_diy>>>.el-dialog__footer {
  20022. background: #e6eaf0 !important;
  20023. }
  20024. .left {
  20025. border-right: 1px solid rgb(60, 94, 143);
  20026. display: flex;
  20027. flex-direction: column;
  20028. align-items: center;
  20029. min-height: 600px;
  20030. width: 385px;
  20031. height: 80%;
  20032. }
  20033. .tips {
  20034. color: rgb(128, 128, 128);
  20035. font-size: 12px;
  20036. width: 270px;
  20037. margin: 40px;
  20038. }
  20039. .pb_content {
  20040. height: 100% !important;
  20041. /* margin: 0 20px 0 20px; */
  20042. }
  20043. .pb_content_body {
  20044. width: 100% !important;
  20045. height: 100%;
  20046. display: flex;
  20047. }
  20048. .info_solid {
  20049. width: 270px;
  20050. height: 30px;
  20051. border-left: 1px solid #bdbdbd;
  20052. margin: 10px 0px 10px 30px;
  20053. }
  20054. .info_steps {
  20055. width: 270px;
  20056. font-size: 0.875rem;
  20057. display: flex;
  20058. align-items: center;
  20059. }
  20060. .info_steps span:nth-child(1) {
  20061. width: 30px;
  20062. height: 30px;
  20063. background: rgba(0, 0, 0, 0.38);
  20064. display: block;
  20065. color: #fff;
  20066. border-radius: 40px;
  20067. text-align: center;
  20068. line-height: 30px;
  20069. }
  20070. .steps_active {
  20071. background: #3d67bc !important;
  20072. }
  20073. .info_steps span:nth-child(2) {
  20074. margin-left: 5px;
  20075. }
  20076. .right {
  20077. height: 100%;
  20078. width: 100%;
  20079. display: flex;
  20080. overflow: hidden;
  20081. flex-direction: column;
  20082. }
  20083. .leftBar{
  20084. width: 290px;
  20085. height: calc(100% - 50px);
  20086. overflow: auto;
  20087. border-radius: 5px;
  20088. margin: 25px auto;
  20089. box-sizing: border-box;
  20090. margin-right: 10px;
  20091. }
  20092. .basic_box {
  20093. margin: 0 auto;
  20094. position: relative;
  20095. padding: 0 20px 0 20px;
  20096. }
  20097. .basic_box_success {
  20098. width: 100%;
  20099. min-height: 455px;
  20100. padding: 50px 0;
  20101. position: relative;
  20102. text-align: center;
  20103. border-bottom: 1px solid #bfbfbf;
  20104. box-sizing: border-box;
  20105. display: flex;
  20106. align-items: center;
  20107. flex-direction: column;
  20108. justify-content: center;
  20109. }
  20110. .info_title {
  20111. font-size: 1.5em;
  20112. margin-right: 25px;
  20113. /* margin: 20px 30px 20px 30px; */
  20114. }
  20115. .bInfo_title {
  20116. text-align: left;
  20117. margin: 10px 0;
  20118. }
  20119. .small_title {
  20120. font-size: 14px;
  20121. line-height: 40px;
  20122. }
  20123. .chapter_beizhu {
  20124. font-size: 12px;
  20125. font-weight: bold;
  20126. float: right;
  20127. color: rgb(128, 128, 128);
  20128. margin-top: 5px;
  20129. }
  20130. .chapter_uploadBox1 {
  20131. text-align: left;
  20132. background-color: rgb(242, 242, 242);
  20133. width: 100%;
  20134. height: 67px;
  20135. padding: 0px 15px;
  20136. border-radius: 8px;
  20137. overflow: hidden;
  20138. font-size: 16px;
  20139. box-sizing: border-box;
  20140. position: relative;
  20141. }
  20142. .chapter_add {
  20143. width: 100%;
  20144. height: 32px;
  20145. margin-top: 15px;
  20146. cursor: pointer;
  20147. }
  20148. .chapter_add_l {
  20149. margin-left: 5px;
  20150. width: 30px;
  20151. height: 30px;
  20152. float: left;
  20153. border: 1px solid #aaa;
  20154. color: #aaa;
  20155. border-radius: 50%;
  20156. font-size: 25px;
  20157. text-align: center;
  20158. }
  20159. .chapter_add_r {
  20160. font-size: 18px;
  20161. height: 40px;
  20162. line-height: 30px;
  20163. text-indent: 10px;
  20164. color: #aaa;
  20165. }
  20166. .chapter_add_r span {
  20167. font-size: 12px;
  20168. color: rgb(204, 204, 204);
  20169. }
  20170. .chapter_add_input {
  20171. display: none;
  20172. }
  20173. .line {
  20174. width: 85%;
  20175. margin: 0 auto;
  20176. border-top: 1px solid #e5e5e5;
  20177. margin-top: 20px;
  20178. }
  20179. .info_btnBox {
  20180. width: calc(100%);
  20181. display: flex;
  20182. justify-content: center;
  20183. height: 80px;
  20184. align-items: center;
  20185. background: #fff;
  20186. margin: 0 auto;
  20187. border-top: 2px solid rgb(228, 232, 237);
  20188. box-sizing: border-box;
  20189. }
  20190. .info_btnBox2 {
  20191. width: calc(100%);
  20192. display: flex;
  20193. justify-content: center;
  20194. height: 20px;
  20195. align-items: center;
  20196. background: #fff;
  20197. margin: 0 auto;
  20198. border-top: 2px solid rgb(228, 232, 237);
  20199. box-sizing: border-box;
  20200. overflow: hidden;
  20201. cursor: pointer;
  20202. }
  20203. .info_btnBox3 {
  20204. width: calc(100%);
  20205. display: flex;
  20206. justify-content: flex-end;
  20207. padding: 0 20px;
  20208. height: 60px;
  20209. align-items: center;
  20210. background: unset;
  20211. margin: 0 auto;
  20212. /* border-top: 1px solid rgb(228, 232, 237); */
  20213. box-sizing: border-box;
  20214. overflow: hidden;
  20215. cursor: pointer;
  20216. background: #fff;
  20217. border-radius: 10px;
  20218. }
  20219. .info_btn+.info_btn {
  20220. margin-left: 15px;
  20221. }
  20222. .info_btn,
  20223. .teacherWord {
  20224. color: #fff;
  20225. background-color: #0f7eff;
  20226. padding: 8px 24px;
  20227. font-size: 0.9375rem;
  20228. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  20229. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  20230. min-width: 64px;
  20231. font-weight: 500;
  20232. border-radius: 4px;
  20233. box-sizing: border-box;
  20234. border: none;
  20235. cursor: pointer;
  20236. }
  20237. .teacherWord {
  20238. width: 105px !important;
  20239. text-align: center !important;
  20240. line-height: 36px !important;
  20241. padding: 0 !important;
  20242. font-size: 14px !important;
  20243. margin: 10px 0 !important;
  20244. }
  20245. .template_box {
  20246. display: flex;
  20247. flex-wrap: wrap;
  20248. }
  20249. .wordTeacher {
  20250. display: flex;
  20251. flex-direction: column;
  20252. width: 100px;
  20253. height: 100px;
  20254. text-align: center;
  20255. font-size: 13px;
  20256. margin: 0 20px 20px 0;
  20257. background: #f0f4fa;
  20258. position: relative;
  20259. border-radius: 5px;
  20260. align-items: center;
  20261. justify-content: center;
  20262. border: 1px solid #cad1dc;
  20263. color: #0e1e33;
  20264. /* padding: 25px 0px; */
  20265. cursor: pointer;
  20266. }
  20267. .wordTeacher::after {
  20268. content: "";
  20269. display: block;
  20270. position: absolute;
  20271. width: 15px;
  20272. height: 15px;
  20273. right: 10px;
  20274. top: 10px;
  20275. background-image: url(../../../assets/icon/new/choose_a.png);
  20276. background-size: 100% 100%;
  20277. }
  20278. .wordTeacherA::after {
  20279. background-image: url(../../../assets/icon/new/choose_b.png);
  20280. }
  20281. .wordTeacher:nth-child(5n) {
  20282. margin-right: 0px;
  20283. }
  20284. .wordPic {
  20285. margin: 0 auto;
  20286. width: 30px;
  20287. height: 30px;
  20288. cursor: pointer;
  20289. }
  20290. .deleteWord {
  20291. width: 22px;
  20292. height: 22px;
  20293. position: absolute;
  20294. right: 5px;
  20295. top: -15px;
  20296. cursor: pointer;
  20297. display: none;
  20298. z-index: 999;
  20299. }
  20300. .wordPic>img,
  20301. .deleteWord>img,
  20302. .addToolImg>img {
  20303. width: 100%;
  20304. height: 100%;
  20305. }
  20306. .info_btn:hover {
  20307. background-color: #4f7cd5 !important;
  20308. }
  20309. .cru_selectBox {
  20310. display: flex;
  20311. margin: 15px 0;
  20312. flex-wrap: nowrap;
  20313. white-space: nowrap;
  20314. overflow: auto;
  20315. position: relative;
  20316. height: 40px;
  20317. max-width: calc(100% - 175px);
  20318. }
  20319. .cru_selectBox::-webkit-scrollbar {
  20320. /*滚动条整体样式*/
  20321. width: 6px;
  20322. /*高宽分别对应横竖滚动条的尺寸*/
  20323. height: 6px;
  20324. }
  20325. /*定义滚动条轨道 内阴影+圆角*/
  20326. .cru_selectBox::-webkit-scrollbar-track {
  20327. border-radius: 10px;
  20328. background-color: #eee;
  20329. }
  20330. /*定义滑块 内阴影+圆角*/
  20331. .cru_selectBox::-webkit-scrollbar-thumb {
  20332. border-radius: 10px;
  20333. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  20334. background-color: rgba(0, 0, 0, 0.1);
  20335. }
  20336. .cru_line {
  20337. position: absolute;
  20338. bottom: 0px;
  20339. transition: all 0.5s;
  20340. left: 0px;
  20341. width: 50px;
  20342. height: 4px;
  20343. left: 10px;
  20344. border-radius: 2px;
  20345. background: #3681fc;
  20346. }
  20347. .cru_select {
  20348. font-size: 18px;
  20349. margin-right: 20px;
  20350. margin-left: 5px;
  20351. cursor: pointer;
  20352. color: #0e1e33;
  20353. }
  20354. .cru_select:hover {
  20355. color: #3681fc !important;
  20356. }
  20357. .cru_selected {
  20358. color: #3681fc !important;
  20359. font-weight: bold;
  20360. }
  20361. .chapter_box {
  20362. margin-top: 10px;
  20363. width: 100%;
  20364. padding: 10px 20px;
  20365. background: #fff;
  20366. border-radius: 8px;
  20367. box-sizing: border-box;
  20368. }
  20369. .chapter_contentbox {
  20370. display: flex;
  20371. align-items: center;
  20372. /* margin-top: 15px; */
  20373. }
  20374. .chapter_contentbox .cc_title {
  20375. margin: 0px;
  20376. color: black;
  20377. display: block;
  20378. white-space: nowrap;
  20379. overflow: hidden;
  20380. text-overflow: ellipsis;
  20381. margin-right: 20px;
  20382. font-size: 18px;
  20383. height: 20px;
  20384. line-height: 22px;
  20385. min-width: fit-content;
  20386. display: flex;
  20387. }
  20388. .chapter_contentbox .cc_title::before {
  20389. content: "";
  20390. height: 100%;
  20391. width: 3px;
  20392. background: #3681fc;
  20393. border-radius: 3px;
  20394. opacity: 1;
  20395. display: block;
  20396. margin-right: 10px;
  20397. }
  20398. .chapter_contentbox .cc_input {
  20399. width: 100%;
  20400. display: flex;
  20401. }
  20402. .show_taskD {
  20403. min-width: fit-content;
  20404. margin-left: 10px;
  20405. display: flex;
  20406. align-items: center;
  20407. font-size: 14px;
  20408. cursor: pointer;
  20409. color: #717c8d;
  20410. }
  20411. .show_taskD>img {
  20412. width: 15px;
  20413. margin-right: 5px;
  20414. transition: 0.2s all;
  20415. transform: rotate(-90deg);
  20416. }
  20417. .show_taskD.show>img {
  20418. transform: rotate(0deg);
  20419. }
  20420. .show_toolD {
  20421. min-width: fit-content;
  20422. margin-left: 10px;
  20423. display: flex;
  20424. align-items: center;
  20425. font-size: 14px;
  20426. cursor: pointer;
  20427. color: #717c8d;
  20428. /* position: absolute;
  20429. right: 45px;
  20430. top: 5px; */
  20431. }
  20432. .show_toolD>img {
  20433. width: 15px;
  20434. margin-right: 5px;
  20435. transition: 0.2s all;
  20436. transform: rotate(-90deg);
  20437. }
  20438. .show_toolD.show>img {
  20439. transform: rotate(0deg);
  20440. }
  20441. .remove {
  20442. background-image: url("../../../assets/icon/new/delete_u.png");
  20443. cursor: pointer;
  20444. opacity: 0.5;
  20445. width: 30px;
  20446. min-width: 30px;
  20447. height: 30px;
  20448. background-size: 100% 100%;
  20449. background-repeat: no-repeat;
  20450. margin-left: 10px;
  20451. }
  20452. .remove1 {
  20453. background-image: url("../../../assets/remove1.png");
  20454. background-repeat: no-repeat;
  20455. background-position: 5px 10px;
  20456. width: 40px;
  20457. height: 50px;
  20458. cursor: pointer;
  20459. margin-left: 10px;
  20460. }
  20461. .binfo_input {
  20462. width: 100%;
  20463. margin: 0;
  20464. padding: 12px 14px;
  20465. display: block;
  20466. min-width: 0;
  20467. outline: none;
  20468. box-sizing: border-box;
  20469. background: none;
  20470. border: none;
  20471. border-radius: 4px;
  20472. background: #fff;
  20473. font-size: 16px;
  20474. resize: none;
  20475. font-family: "Microsoft YaHei";
  20476. min-height: 48px;
  20477. /* border: 1px solid #3682fc00; */
  20478. border: 1.5px solid #cad1dc;
  20479. }
  20480. .binfo_textarea {
  20481. border: 1.5px solid #cad1dc;
  20482. font-size: 16px;
  20483. resize: none;
  20484. /* background: #f6f6f6; */
  20485. font-family: "Microsoft YaHei";
  20486. }
  20487. .binfo_input:focus-visible {
  20488. border: 1.5px solid #3681fc !important;
  20489. }
  20490. .time {
  20491. display: flex;
  20492. margin: 35px 0 80px 0;
  20493. }
  20494. .chapter_btnbox {
  20495. width: 160px;
  20496. border-radius: 5px;
  20497. border: 2px dashed gray;
  20498. display: flex;
  20499. padding: 8px 50px;
  20500. align-items: center;
  20501. justify-content: center;
  20502. margin: 30px auto 0;
  20503. cursor: pointer;
  20504. }
  20505. .icon_add {
  20506. position: relative;
  20507. width: 24px;
  20508. padding-top: 20px;
  20509. border-radius: 100%;
  20510. border-width: 2px;
  20511. border-style: solid;
  20512. border-color: gray;
  20513. }
  20514. .icon_add i:nth-child(1) {
  20515. position: absolute;
  20516. left: 50%;
  20517. top: 50%;
  20518. height: 60%;
  20519. transform: translate(-50%, -50%);
  20520. border-width: 1px;
  20521. border-style: solid;
  20522. border-color: inherit;
  20523. }
  20524. .icon_add i:nth-child(2) {
  20525. position: absolute;
  20526. top: 50%;
  20527. left: 50%;
  20528. width: 60%;
  20529. transform: translate(-50%, -50%);
  20530. border-width: 1px;
  20531. border-style: solid;
  20532. border-color: inherit;
  20533. }
  20534. .chapter_btn_w {
  20535. font-size: 0.9375rem;
  20536. font-weight: bold;
  20537. color: gray;
  20538. margin-left: 20px;
  20539. }
  20540. .disUoloadSty>>>.el-icon-plus {
  20541. display: none !important;
  20542. /* 上传按钮隐藏 */
  20543. }
  20544. .imgLeft {
  20545. margin: 15px 0;
  20546. }
  20547. .add_info_box {
  20548. margin: 0 0 0 auto;
  20549. display: flex;
  20550. flex-wrap: wrap;
  20551. }
  20552. .add_info_box button {
  20553. margin: 0 5px 10px 0;
  20554. }
  20555. .add_info_box2 {
  20556. display: flex;
  20557. align-items: center;
  20558. flex-wrap: wrap;
  20559. }
  20560. .add_info_box2::after {
  20561. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  20562. color: red;
  20563. font-size: 14px;
  20564. margin-bottom: 10px;
  20565. }
  20566. .add_chapters_box {
  20567. text-align: left;
  20568. background-color: #fff;
  20569. width: 100%;
  20570. border-radius: 4px;
  20571. font-size: 16px;
  20572. box-sizing: border-box;
  20573. position: relative;
  20574. padding: 0 15px;
  20575. height: auto;
  20576. overflow-y: auto;
  20577. overflow-x: hidden;
  20578. border: 1px solid #cad1dc;
  20579. }
  20580. .add_chapters_box.add_c_none {
  20581. display: flex;
  20582. justify-content: center;
  20583. align-items: center;
  20584. padding: 15px;
  20585. }
  20586. .add_c_none>img {
  20587. width: 25px;
  20588. }
  20589. .add_chapters_box.add_c_none>span {
  20590. font-size: 14px;
  20591. font-weight: 400;
  20592. margin: 0 0 5px 5px;
  20593. }
  20594. .homework_box {
  20595. display: flex;
  20596. align-items: flex-start;
  20597. flex-wrap: wrap;
  20598. margin: 15px 0 0 0;
  20599. flex-direction: column;
  20600. align-content: flex-start;
  20601. }
  20602. .course_homework {
  20603. display: flex;
  20604. justify-content: center;
  20605. flex-direction: row;
  20606. align-items: center;
  20607. margin: 0 10px 0 0;
  20608. }
  20609. .course_homework>>>.el-input__inner {
  20610. width: 140px;
  20611. margin-left: 15px;
  20612. }
  20613. .chapter_upload_move {
  20614. position: relative;
  20615. background-color: #fff;
  20616. position: absolute;
  20617. width: 100%;
  20618. top: 0px;
  20619. left: 0px;
  20620. border: 1px solid #eee;
  20621. border-radius: 5px;
  20622. transition: width 2s;
  20623. -moz-transition: width 2s;
  20624. -webkit-transition: width 2s;
  20625. -o-transition: width 2s;
  20626. }
  20627. .chapter_upload_l_i {
  20628. background-image: url("../../../assets/icon.png");
  20629. background-position: 3px -165px;
  20630. width: 30px;
  20631. height: 30px;
  20632. margin: 10px auto 0 auto;
  20633. }
  20634. .course_input_box {
  20635. display: flex;
  20636. margin-right: 20px;
  20637. width: 100%;
  20638. align-items: center;
  20639. position: relative;
  20640. }
  20641. .course_input_box>.binfo_input {
  20642. width: calc(100% - 0 - 200px - 20px);
  20643. margin: 0 10px;
  20644. }
  20645. .bb_courseIcon {
  20646. width: 57px;
  20647. height: 45px;
  20648. background: #f0f4fa;
  20649. border-radius: 5px 0px 0px 5px;
  20650. display: flex;
  20651. align-items: center;
  20652. justify-content: center;
  20653. border-right: 1.5px solid rgb(202, 209, 220);
  20654. box-sizing: border-box;
  20655. position: absolute;
  20656. left: 1.5px;
  20657. }
  20658. .bb_courseIcon>img {
  20659. width: 25px;
  20660. height: auto;
  20661. }
  20662. .big_box {
  20663. /* margin-top: 20px; */
  20664. display: flex;
  20665. justify-content: space-between;
  20666. /* border-bottom: 1px solid #E0E2ED; */
  20667. }
  20668. .left_first {
  20669. display: flex;
  20670. flex-direction: column;
  20671. flex-wrap: nowrap;
  20672. width: calc(100% - 310px);
  20673. padding: 20px;
  20674. box-sizing: border-box;
  20675. background: #fff;
  20676. border-radius: 5px;
  20677. }
  20678. .right_first {
  20679. width: 300px;
  20680. display: flex;
  20681. align-items: center;
  20682. justify-content: center;
  20683. /* border-left: 1px solid #E0E2ED; */
  20684. box-sizing: border-box;
  20685. padding: 20px;
  20686. flex-direction: column;
  20687. background: #fff;
  20688. border-radius: 5px;
  20689. }
  20690. .ai_box {
  20691. width: 204px;
  20692. display: flex;
  20693. justify-content: flex-end;
  20694. margin-bottom: 15px;
  20695. }
  20696. .ai_content {
  20697. display: flex;
  20698. align-items: center;
  20699. font-size: 14px;
  20700. padding: 7px 20px;
  20701. box-sizing: border-box;
  20702. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  20703. border-radius: 12px;
  20704. font-weight: 700;
  20705. cursor: pointer;
  20706. }
  20707. .ai_content>img {
  20708. width: 40px;
  20709. margin-right: 5px;
  20710. }
  20711. .c_info_title {
  20712. padding: 15px 0 15px 0;
  20713. font-size: 16px;
  20714. font-weight: bold;
  20715. margin: 0 0 0 20px;
  20716. box-sizing: border-box;
  20717. display: flex;
  20718. align-items: center;
  20719. line-height: 20px;
  20720. }
  20721. .c_info_title::before {
  20722. content: "";
  20723. display: block;
  20724. width: 3px;
  20725. height: 20px;
  20726. background: #0061ff;
  20727. border-radius: 3px;
  20728. margin: 0 5px 0 0;
  20729. }
  20730. .right_title {
  20731. height: 30px;
  20732. padding: 15px 0 15px 20px;
  20733. border-bottom: 1px solid #f2f2f2;
  20734. font-size: 1.5em;
  20735. font-weight: bold;
  20736. color: #0f7eff;
  20737. margin: 0 auto;
  20738. }
  20739. .people {
  20740. border: 1px solid rgb(229 229 229);
  20741. /* height: 495px; */
  20742. height: 350px;
  20743. border-radius: 5px;
  20744. width: 100%;
  20745. overflow: auto;
  20746. }
  20747. .people_top {
  20748. display: flex;
  20749. width: 100%;
  20750. /* justify-content: space-between; */
  20751. /* align-items: center; */
  20752. flex-direction: column;
  20753. padding: 10px 10px 0;
  20754. box-sizing: border-box;
  20755. }
  20756. .people_nav,
  20757. .people_top_right {
  20758. /* padding: 20px 0 0 20px; */
  20759. }
  20760. .people_top_right {
  20761. height: 40px;
  20762. margin-bottom: 10px;
  20763. }
  20764. .people_search {
  20765. display: flex;
  20766. position: relative;
  20767. }
  20768. .people_search>>>.el-input__inner {
  20769. /* height: 25px; */
  20770. width: 100%;
  20771. }
  20772. .search_img {
  20773. width: 20px;
  20774. height: 20px;
  20775. position: absolute;
  20776. right: 10px;
  20777. top: 50%;
  20778. transform: translateY(-50%);
  20779. }
  20780. .search_img>img {
  20781. width: 100%;
  20782. height: 100%;
  20783. }
  20784. .people_name {
  20785. display: flex;
  20786. justify-content: flex-start;
  20787. padding: 20px 10px;
  20788. flex-direction: column;
  20789. flex-wrap: wrap;
  20790. }
  20791. .p_box {
  20792. position: relative;
  20793. }
  20794. .people_name>>>.el-checkbox {
  20795. width: 100%;
  20796. display: flex;
  20797. align-items: center;
  20798. margin-bottom: 10px;
  20799. }
  20800. .people_name>>>.el-checkbox__label {
  20801. text-overflow: ellipsis;
  20802. overflow: hidden;
  20803. width: calc(100%);
  20804. }
  20805. .people_name2>>>.el-checkbox__label {
  20806. width: calc(100% - 130px);
  20807. }
  20808. .inviteCode {
  20809. position: absolute;
  20810. right: 30px;
  20811. color: #237ade;
  20812. top: 0;
  20813. cursor: pointer;
  20814. font-size: 13px;
  20815. }
  20816. .noneInvite {
  20817. color: #a8a8a8;
  20818. }
  20819. .inviteImg {
  20820. position: absolute;
  20821. right: 5px;
  20822. top: 0;
  20823. width: 20px;
  20824. }
  20825. .right_img {
  20826. width: 150px;
  20827. height: 150px;
  20828. margin: 0 auto;
  20829. }
  20830. .right_img>img {
  20831. width: 100%;
  20832. height: 100%;
  20833. }
  20834. .number {
  20835. margin-top: 20px;
  20836. color: #4aa6ff;
  20837. text-decoration: underline;
  20838. }
  20839. .success_button {
  20840. display: flex;
  20841. text-align: center;
  20842. margin: 5% 0 auto;
  20843. flex-direction: row;
  20844. justify-content: center;
  20845. }
  20846. .look_course {
  20847. margin-right: 40px;
  20848. background: #3d67bc;
  20849. width: 200px;
  20850. height: 35px;
  20851. line-height: 35px;
  20852. color: #fff;
  20853. text-align: center;
  20854. font-size: 14px;
  20855. border-radius: 5px;
  20856. cursor: pointer;
  20857. }
  20858. .attend_others {
  20859. width: 250px;
  20860. background: #4fb13c;
  20861. height: 35px;
  20862. line-height: 35px;
  20863. color: #fff;
  20864. text-align: center;
  20865. font-size: 14px;
  20866. border-radius: 5px;
  20867. cursor: pointer;
  20868. }
  20869. .dialog_diy2>>>.el-dialog__body {
  20870. text-align: center;
  20871. }
  20872. .write_togother {
  20873. position: absolute;
  20874. right: 45px;
  20875. display: flex;
  20876. top: 5%;
  20877. }
  20878. .write_people {
  20879. font-size: 14px;
  20880. line-height: 50px;
  20881. padding-right: 10px;
  20882. }
  20883. .end_write {
  20884. background: #3d67bc;
  20885. color: #fff;
  20886. width: 100px;
  20887. height: 35px;
  20888. line-height: 35px;
  20889. text-align: center;
  20890. font-size: 14px;
  20891. border-radius: 5px;
  20892. cursor: pointer;
  20893. }
  20894. .chapter_upload+.chapter_upload {
  20895. /* margin-top: 15px; */
  20896. border-top: 1px solid #e7ebf1;
  20897. }
  20898. .chapter_upload {
  20899. height: 45px;
  20900. position: relative;
  20901. display: flex;
  20902. align-items: center;
  20903. width: 100%;
  20904. min-height: 45px;
  20905. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  20906. /* border-radius: 4px; */
  20907. /* overflow: hidden; */
  20908. box-sizing: border-box;
  20909. }
  20910. .chapter_upload_drag {
  20911. position: absolute;
  20912. cursor: pointer;
  20913. width: 16px;
  20914. height: 16px;
  20915. left: -9px;
  20916. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  20917. background-size: 100% 100%;
  20918. z-index: 10;
  20919. display: none;
  20920. }
  20921. .isNavStage>.chapter_upload_drag {
  20922. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  20923. }
  20924. .chapter_upload_t {
  20925. background-color: #fff;
  20926. position: absolute;
  20927. height: 100%;
  20928. top: 0px;
  20929. left: 0px;
  20930. box-sizing: border-box;
  20931. }
  20932. .chapter_upload_o {
  20933. width: 100%;
  20934. height: 100%;
  20935. position: relative;
  20936. z-index: 1;
  20937. }
  20938. .chapter_upload_ic {
  20939. margin: 0 15px 0px auto;
  20940. display: flex;
  20941. align-items: center;
  20942. }
  20943. .chapter_upload_ic_l {
  20944. width: 50px;
  20945. height: 50px;
  20946. float: left;
  20947. }
  20948. .chapter_upload_ic_l div {
  20949. width: 30px;
  20950. height: 35px;
  20951. background: url("../../../assets/icon/icon.png");
  20952. }
  20953. .chapter_upload_ic_edit {
  20954. height: 100%;
  20955. display: flex;
  20956. align-items: center;
  20957. cursor: pointer;
  20958. margin: 0 10px 0 0;
  20959. }
  20960. .chapter_upload_ic_edit div {
  20961. width: 18px;
  20962. height: 18px;
  20963. background-image: url("../../../assets/icon/new/edit_u.png");
  20964. background-size: 100% 100%;
  20965. }
  20966. .chapter_upload_ic_check {
  20967. height: 100%;
  20968. display: flex;
  20969. align-items: center;
  20970. cursor: pointer;
  20971. margin: 0 10px 0 0;
  20972. }
  20973. .chapter_upload_ic_check div {
  20974. width: 18px;
  20975. height: 18px;
  20976. background-image: url("../../../assets/icon/course/lookeye.svg");
  20977. background-size: 100% 100%;
  20978. }
  20979. .chapter_upload_ic_r {
  20980. height: 100%;
  20981. display: flex;
  20982. align-items: center;
  20983. cursor: pointer;
  20984. }
  20985. .chapter_upload_ic_r div {
  20986. width: 18px;
  20987. height: 18px;
  20988. background-image: url("../../../assets/icon/new/delete_u.png");
  20989. background-size: 100% 100%;
  20990. }
  20991. .chapter_upload_n {
  20992. display: flex;
  20993. text-indent: 10px;
  20994. text-decoration: none;
  20995. text-overflow: ellipsis;
  20996. white-space: nowrap;
  20997. overflow: hidden;
  20998. width: 55%;
  20999. margin-left: 10px;
  21000. cursor: pointer;
  21001. margin-top: 2px;
  21002. align-items: center;
  21003. }
  21004. .chapter_upload_l_i2,
  21005. .chapter_upload_l_i3,
  21006. .chapter_upload_l_i8,
  21007. .chapter_upload_l_i6,
  21008. .chapter_upload_l_i12,
  21009. .chapter_upload_l_i14,
  21010. .chapter_upload_l_i13 {
  21011. width: 15px;
  21012. height: 15px;
  21013. background-size: 100% 100%;
  21014. }
  21015. .chapter_upload_l_i2 {
  21016. background-image: url("../../../assets/icon/new/u_word.png");
  21017. }
  21018. .chapter_upload_l_i3 {
  21019. background-image: url("../../../assets/icon/new/u_video.png");
  21020. }
  21021. .chapter_upload_l_i8 {
  21022. background-image: url("../../../assets/icon/new/u_url.png");
  21023. }
  21024. .chapter_upload_l_i14 {
  21025. background-image: url("../../../assets/icon/new/u_source.png");
  21026. }
  21027. .chapter_upload_l_i6 {
  21028. background-image: url("../../../assets/icon/new/u_picture.png");
  21029. }
  21030. .chapter_upload_l_i12 {
  21031. background-image: url("../../../assets/icon/new/u_word.png");
  21032. }
  21033. .chapter_upload_l_i13 {
  21034. background-image: url("../../../assets/icon/new/u_img.png");
  21035. }
  21036. .chapter_upload_noSee {
  21037. background-image: url("../../../assets/icon/new/u_noUpload.png");
  21038. width: 18px;
  21039. height: 18px;
  21040. background-size: 100% 100%;
  21041. display: block;
  21042. margin-right: 10px;
  21043. }
  21044. .chapter_upload_ud {
  21045. display: flex;
  21046. flex-direction: row;
  21047. justify-content: center;
  21048. margin: 0 10px 0 0;
  21049. }
  21050. .chapter_upload_ud>.chapter_upload_up {
  21051. margin-bottom: 0;
  21052. margin-right: 10px;
  21053. }
  21054. .chapter_upload_down,
  21055. .chapter_upload_up {
  21056. width: 20px;
  21057. height: 20px;
  21058. background: #e4eaf2;
  21059. cursor: pointer;
  21060. margin: 0 auto;
  21061. border-radius: 5px;
  21062. display: flex;
  21063. justify-content: center;
  21064. align-items: center;
  21065. }
  21066. .chapter_upload_up::after,
  21067. .chapter_upload_down::after {
  21068. content: "";
  21069. background-image: url("../../../assets/icon/new/downBtn.png");
  21070. width: 13px;
  21071. height: 13px;
  21072. background-size: 100% 100%;
  21073. display: block;
  21074. }
  21075. .chapter_upload_up::after {
  21076. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  21077. }
  21078. .chapter_upload_up {
  21079. margin-bottom: 5px;
  21080. }
  21081. .chapter_upload_ud2 {
  21082. display: flex;
  21083. flex-direction: row;
  21084. justify-content: center;
  21085. margin: 0 10px 0 0;
  21086. }
  21087. .chapter_upload_ud2>.chapter_upload_up2 {
  21088. margin-bottom: 0;
  21089. margin-right: 10px;
  21090. }
  21091. .chapter_upload_down2,
  21092. .chapter_upload_up2 {
  21093. cursor: pointer;
  21094. margin: 0 auto;
  21095. border-radius: 5px;
  21096. display: flex;
  21097. justify-content: center;
  21098. align-items: center;
  21099. color: #717c8d;
  21100. font-size: 14px;
  21101. }
  21102. .chapter_upload_up2 {
  21103. margin-right: 10px;
  21104. }
  21105. .chapter_upload_up2::before,
  21106. .chapter_upload_down2::before {
  21107. content: "";
  21108. background-image: url("../../../assets/icon/new/c_down.png");
  21109. width: 14px;
  21110. height: 14px;
  21111. background-size: 100% 100%;
  21112. display: block;
  21113. margin-right: 5px;
  21114. }
  21115. .chapter_upload_up2::before {
  21116. background-image: url("../../../assets/icon/new/c_up.png") !important;
  21117. }
  21118. .addWordStyle {
  21119. display: flex;
  21120. flex-direction: row;
  21121. justify-content: flex-start;
  21122. overflow-x: auto;
  21123. white-space: nowrap;
  21124. flex-wrap: wrap;
  21125. }
  21126. /* table 样式 */
  21127. .cont>>>table {
  21128. border-top: 1px solid #ccc;
  21129. border-left: 1px solid #ccc;
  21130. }
  21131. .cont>>>table td,
  21132. .cont>>>table th {
  21133. border-bottom: 1px solid #ccc;
  21134. border-right: 1px solid #ccc;
  21135. /* padding: 20px 5px; */
  21136. padding: 5px 10px;
  21137. max-width: 0px;
  21138. height: 30px;
  21139. vertical-align: baseline;
  21140. }
  21141. .cont>>>table th {
  21142. border-bottom: 2px solid #ccc;
  21143. text-align: center;
  21144. }
  21145. /* blockquote 样式 */
  21146. .cont>>>blockquote {
  21147. display: block;
  21148. border-left: 8px solid #d0e5f2;
  21149. padding: 5px 10px;
  21150. margin: 10px 0;
  21151. line-height: 1.4;
  21152. font-size: 100%;
  21153. background-color: #f1f1f1;
  21154. }
  21155. /* code 样式 */
  21156. .cont>>>code {
  21157. display: inline-block;
  21158. /* *display: inline; */
  21159. zoom: 1;
  21160. background-color: #f1f1f1;
  21161. border-radius: 3px;
  21162. padding: 3px 5px;
  21163. margin: 0 3px;
  21164. }
  21165. .cont>>>pre code {
  21166. display: block;
  21167. }
  21168. /* ul ol 样式 */
  21169. .cont>>>ul,
  21170. ol {
  21171. margin: 10px 0 10px 20px;
  21172. }
  21173. .wordbox {
  21174. display: flex;
  21175. flex-wrap: wrap;
  21176. cursor: pointer;
  21177. width: 100%;
  21178. }
  21179. .checkword {
  21180. width: 22px;
  21181. height: 22px;
  21182. margin: 10px auto 0;
  21183. cursor: pointer;
  21184. }
  21185. .checkword img {
  21186. width: 100%;
  21187. }
  21188. .stepBg {
  21189. display: flex;
  21190. justify-content: space-between;
  21191. align-items: center;
  21192. background: #fff;
  21193. width: calc(100%);
  21194. margin: 0 auto;
  21195. }
  21196. .stepBorder {
  21197. height: 3px !important;
  21198. background: #cad1dc;
  21199. width: 100px !important;
  21200. margin: 0 15px !important;
  21201. position: relative;
  21202. }
  21203. .border-active {
  21204. background: #3681fc !important;
  21205. }
  21206. .border-active::before,
  21207. .border-active::after {
  21208. border-color: #3681fc !important;
  21209. }
  21210. .stepBorder::before,
  21211. .stepBorder::after {
  21212. content: "";
  21213. width: 9px;
  21214. height: 9px;
  21215. background: #ffffff;
  21216. opacity: 1;
  21217. border: 2px solid #acb4bf;
  21218. display: block;
  21219. box-sizing: border-box;
  21220. border-radius: 50%;
  21221. position: absolute;
  21222. top: 50%;
  21223. transform: translateY(-50%);
  21224. }
  21225. .stepBorder::after {
  21226. right: -9px;
  21227. }
  21228. .stepTop {
  21229. width: 100%;
  21230. /* border-radius: 10px; */
  21231. display: flex;
  21232. justify-content: center;
  21233. align-items: center;
  21234. flex-wrap: nowrap;
  21235. background: #fff;
  21236. /* top: 18%; */
  21237. height: 80px;
  21238. border-bottom: 2px solid rgb(228, 232, 237);
  21239. box-sizing: border-box;
  21240. }
  21241. .stepTop2 {
  21242. width: 100%;
  21243. /* border-radius: 10px; */
  21244. display: flex;
  21245. justify-content: center;
  21246. align-items: center;
  21247. flex-wrap: nowrap;
  21248. background: #fff;
  21249. /* top: 18%; */
  21250. height: 20px;
  21251. border-bottom: 2px solid rgb(228, 232, 237);
  21252. box-sizing: border-box;
  21253. overflow: hidden;
  21254. cursor: pointer;
  21255. }
  21256. .stepTop>div img {
  21257. width: 100%;
  21258. }
  21259. .stepTop>div {
  21260. height: 50px;
  21261. width: 180px;
  21262. cursor: pointer;
  21263. margin: 10px 0;
  21264. border-radius: 10px;
  21265. }
  21266. .first,
  21267. .second,
  21268. .third,
  21269. .four {
  21270. background: #3681fc;
  21271. height: 90px;
  21272. color: #fff;
  21273. display: flex;
  21274. flex-direction: row;
  21275. align-items: center;
  21276. justify-content: center;
  21277. }
  21278. .first>div:nth-child(1),
  21279. .second>div:nth-child(1),
  21280. .third>div:nth-child(1),
  21281. .four>div:nth-child(1) {
  21282. margin: 5px 10px 0 0;
  21283. width: 2rem;
  21284. }
  21285. .firstNo,
  21286. .secondNo,
  21287. .thirdNo,
  21288. .fourNo {
  21289. background: #e7e7e7;
  21290. color: #adadad;
  21291. display: flex;
  21292. flex-direction: row;
  21293. align-items: center;
  21294. justify-content: center;
  21295. }
  21296. .firstNo>div:nth-child(1),
  21297. .secondNo>div:nth-child(1),
  21298. .thirdNo>div:nth-child(1),
  21299. .fourNo>div:nth-child(1) {
  21300. margin: 5px 10px 0 0;
  21301. width: 2rem;
  21302. }
  21303. .uploadWidth>>>.el-upload {
  21304. width: 60px;
  21305. height: 60px;
  21306. position: relative;
  21307. }
  21308. .addPeople {
  21309. background: #fa6060;
  21310. width: 150px;
  21311. height: 40px;
  21312. color: #fff;
  21313. border-radius: 5px;
  21314. text-align: center;
  21315. line-height: 40px;
  21316. font-size: 14px;
  21317. cursor: pointer;
  21318. }
  21319. .kcImg {
  21320. width: 60px;
  21321. margin-left: 10px;
  21322. }
  21323. .zyImg {
  21324. width: 55px;
  21325. margin: 0 10px;
  21326. }
  21327. .deleteZy {
  21328. width: 20px;
  21329. position: absolute;
  21330. top: 5px;
  21331. right: 5px;
  21332. cursor: pointer;
  21333. }
  21334. .kcImg>img,
  21335. .zyImg>img,
  21336. .deleteZy>img {
  21337. width: 100%;
  21338. height: 100%;
  21339. }
  21340. .zyBox {
  21341. display: flex;
  21342. flex-direction: row;
  21343. align-items: center;
  21344. background: #67d37d;
  21345. color: #fff;
  21346. width: 210px;
  21347. margin: 20px 20px 0 0;
  21348. border-radius: 10px;
  21349. height: 70px;
  21350. position: relative;
  21351. }
  21352. .upCss {
  21353. display: flex;
  21354. flex-direction: row;
  21355. justify-content: flex-start;
  21356. }
  21357. .upCss>>>.el-icon-plus {
  21358. position: none !important;
  21359. width: 200px;
  21360. height: 100px;
  21361. display: flex;
  21362. flex-wrap: nowrap;
  21363. flex-direction: column;
  21364. align-items: center;
  21365. justify-content: center;
  21366. border: 1px dashed #ccc;
  21367. min-width: 78px;
  21368. min-height: 100px;
  21369. z-index: 999;
  21370. }
  21371. .upCss>>>.el-upload-list__item-name {
  21372. width: 100px;
  21373. white-space: nowrap;
  21374. overflow: hidden;
  21375. text-overflow: ellipsis;
  21376. }
  21377. .upCss>>>.el-upload-list__item .el-icon-close {
  21378. font-size: 20px;
  21379. z-index: 9999;
  21380. }
  21381. .addStageImg {
  21382. min-width: 20px;
  21383. min-height: 20px;
  21384. width: 20px;
  21385. height: 20px;
  21386. cursor: pointer;
  21387. }
  21388. .addHW {
  21389. width: 28px;
  21390. height: 28px;
  21391. cursor: pointer;
  21392. }
  21393. .addStageImg>img,
  21394. .addHW>img {
  21395. width: 100%;
  21396. height: 100%;
  21397. }
  21398. .addNewPP>>>.el-dialog__body {
  21399. padding: 5px 20px;
  21400. }
  21401. .addNewPP>>>.el-dialog {
  21402. margin-top: 5vh !important;
  21403. }
  21404. .addNewPP2>>>.el-dialog__body {
  21405. padding: 5px 0;
  21406. }
  21407. .addNewPP2>>>.el-dialog {
  21408. margin-top: 5vh !important;
  21409. }
  21410. .isHeight {
  21411. height: 680px;
  21412. }
  21413. .toolChoose {
  21414. display: flex;
  21415. /* width: 100%; */
  21416. flex-direction: row;
  21417. flex-wrap: wrap;
  21418. }
  21419. .tool,
  21420. .isToolChoose {
  21421. display: flex;
  21422. flex-direction: column;
  21423. flex-wrap: nowrap;
  21424. width: fit-content;
  21425. margin: 10px 0 10px 0;
  21426. align-items: center;
  21427. border: 2px solid #dbdbdb00;
  21428. padding: 10px 20px;
  21429. border-radius: 5px;
  21430. cursor: pointer;
  21431. /* box-shadow: 0 0 2px 0px #dedede; */
  21432. position: relative;
  21433. box-sizing: border-box;
  21434. }
  21435. .tool:hover {
  21436. border: 2px solid #a5c7ff;
  21437. }
  21438. .tool:hover>.noCTool {
  21439. display: block;
  21440. opacity: 0.5;
  21441. }
  21442. .isToolChoose {
  21443. border: 2px solid #438aff !important;
  21444. box-shadow: 0 0 2px 0px #438aff;
  21445. opacity: 1 !important;
  21446. }
  21447. .isCTool,
  21448. .noCTool {
  21449. width: 30px;
  21450. height: 30px;
  21451. position: absolute;
  21452. top: -4px;
  21453. right: -4px;
  21454. }
  21455. .noCTool {
  21456. display: none;
  21457. }
  21458. .isCTool>img,
  21459. .noCTool>img {
  21460. width: 100%;
  21461. height: 100%;
  21462. }
  21463. .tool+.tool {
  21464. margin-right: 10px;
  21465. }
  21466. .whiteBIcon {
  21467. width: 80px;
  21468. cursor: pointer;
  21469. display: flex;
  21470. flex-direction: column;
  21471. flex-wrap: nowrap;
  21472. align-items: center;
  21473. font-size: 14px;
  21474. }
  21475. .whiteBIcon>img,
  21476. .toolIcon>img,
  21477. .arrow>img {
  21478. width: 100%;
  21479. height: 100%;
  21480. }
  21481. .check img {
  21482. width: 20px;
  21483. height: 20px;
  21484. }
  21485. .whiteBIcon>img {
  21486. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  21487. border-radius: 15px;
  21488. }
  21489. .whiteBIcon>div:nth-child(2) {
  21490. height: 20px;
  21491. line-height: 20px;
  21492. }
  21493. .check {
  21494. /* width: 20px;
  21495. height: 20px; */
  21496. cursor: pointer;
  21497. margin: 10px 0 0;
  21498. }
  21499. .checkDiv {
  21500. display: flex;
  21501. align-items: center;
  21502. }
  21503. .checkDiv span {
  21504. margin-left: 5px;
  21505. color: #858585;
  21506. }
  21507. .customWidth>>>.el-dialog {
  21508. min-width: 600px !important;
  21509. }
  21510. .CollaborativeCss {
  21511. width: 100%;
  21512. display: flex;
  21513. justify-content: center;
  21514. align-items: center;
  21515. box-sizing: border-box;
  21516. padding: 10px 0;
  21517. cursor: pointer;
  21518. }
  21519. .CollaborativeCss >>> .el-tooltip {
  21520. overflow: hidden;
  21521. white-space: nowrap;
  21522. text-overflow: ellipsis;
  21523. }
  21524. .CollaborativeCss2 {
  21525. background: #e0eafb;
  21526. color: #3681fc;
  21527. font-weight: 700;
  21528. border-radius: 5px;
  21529. }
  21530. .a_addBox {
  21531. margin: 10px 0;
  21532. background: #fff;
  21533. padding: 15px;
  21534. /* max-height: 600px; */
  21535. overflow: auto;
  21536. }
  21537. .a_add_box {
  21538. border-bottom: 2px solid #eee;
  21539. padding-bottom: 25px;
  21540. }
  21541. .a_add_head {
  21542. display: flex;
  21543. align-items: center;
  21544. justify-content: space-between;
  21545. margin: 10px 0 0 0;
  21546. font-size: 18px;
  21547. }
  21548. .a_add_checkType {
  21549. margin-top: 10px;
  21550. display: flex;
  21551. font-size: 14px;
  21552. align-items: center;
  21553. }
  21554. .a_add_checkType span {
  21555. box-sizing: border-box;
  21556. padding: 0 0 5px 0;
  21557. cursor: pointer;
  21558. }
  21559. .a_add_checkType span+span {
  21560. margin-left: 10px;
  21561. }
  21562. .a_add_checkType .active {
  21563. border-bottom: 2px solid #409eff;
  21564. color: #409eff;
  21565. }
  21566. .a_add_head .a_add_head_input {
  21567. /* width: 540px; */
  21568. width: 100%;
  21569. }
  21570. .a_add_head .a_add_head_div {
  21571. display: flex;
  21572. align-items: center;
  21573. justify-content: space-between;
  21574. }
  21575. .a_add_body {
  21576. display: flex;
  21577. /* align-items: center; */
  21578. align-items: flex-end;
  21579. }
  21580. .a_add_input {
  21581. display: flex;
  21582. align-items: center;
  21583. flex-wrap: wrap;
  21584. }
  21585. .a_add_input_choice {
  21586. flex-direction: column;
  21587. margin-right: 10px;
  21588. }
  21589. .a_add_input_choice>>>.el-radio {
  21590. display: flex;
  21591. align-items: center;
  21592. flex-direction: row-reverse;
  21593. margin: 30px 0 0 0;
  21594. position: relative;
  21595. }
  21596. .a_add_input_choice>>>.el-checkbox {
  21597. display: flex;
  21598. align-items: center;
  21599. flex-direction: row-reverse;
  21600. margin: 30px 0 0 0;
  21601. position: relative;
  21602. }
  21603. .width100 {
  21604. width: 100%;
  21605. }
  21606. .a_add_input .a_add_persent {
  21607. width: 100%;
  21608. }
  21609. .a_add_persent_div {
  21610. width: 100%;
  21611. display: flex;
  21612. align-items: center;
  21613. }
  21614. .a_add_persent_div span {
  21615. margin: 5px 0;
  21616. }
  21617. .a_add_persent_div span:nth-child(1) {
  21618. width: 30%;
  21619. }
  21620. .a_add_persent_div span:nth-child(2) {
  21621. width: 7%;
  21622. }
  21623. .a_add_persent_div span:nth-child(3) {
  21624. width: 40%;
  21625. }
  21626. .a_add_body_div {
  21627. display: flex;
  21628. align-items: center;
  21629. justify-content: center;
  21630. /* flex-direction: column; */
  21631. position: absolute;
  21632. right: -20px;
  21633. transform: translateX(100%);
  21634. }
  21635. .a_add_body_div>>>.el-button--primary {
  21636. background: #466b99;
  21637. border: none;
  21638. }
  21639. .all_choose {
  21640. display: flex;
  21641. flex-direction: row;
  21642. align-items: flex-start;
  21643. width: 100%;
  21644. }
  21645. .all_choose+.all_choose {
  21646. /* margin-top: 10px */
  21647. }
  21648. .all_choose>span {
  21649. min-width: fit-content;
  21650. display: block;
  21651. white-space: nowrap;
  21652. overflow: hidden;
  21653. text-overflow: ellipsis;
  21654. margin-right: 20px;
  21655. font-weight: bold;
  21656. font-size: 14px;
  21657. }
  21658. .all_choose>>>.el-checkbox-group {
  21659. display: flex;
  21660. flex-direction: row;
  21661. width: 100%;
  21662. flex-wrap: wrap;
  21663. align-content: center;
  21664. justify-content: flex-start;
  21665. align-items: center;
  21666. margin-top: 3px;
  21667. }
  21668. .all_choose>.el-checkbox-group>>>.el-checkbox {
  21669. margin-bottom: 10px;
  21670. display: flex;
  21671. flex-direction: row;
  21672. align-items: center;
  21673. margin-right: 10px;
  21674. }
  21675. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  21676. min-width: 80px;
  21677. overflow: hidden;
  21678. width: 80px;
  21679. text-overflow: ellipsis;
  21680. white-space: nowrap;
  21681. }
  21682. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  21683. width: auto;
  21684. }
  21685. .choose>div:nth-child(3)>span {
  21686. /* letter-spacing: 0 !important; */
  21687. }
  21688. .choose {
  21689. display: flex;
  21690. flex-direction: column;
  21691. flex-wrap: nowrap;
  21692. height: 100%;
  21693. justify-content: space-evenly;
  21694. align-items: flex-start;
  21695. }
  21696. .both {
  21697. display: flex;
  21698. flex-direction: row;
  21699. flex-wrap: wrap;
  21700. width: 100%;
  21701. align-items: center;
  21702. justify-content: flex-start;
  21703. margin: 15px 0;
  21704. }
  21705. .notice>>>.el-dialog {
  21706. width: 500px !important;
  21707. text-align: center;
  21708. }
  21709. .notice>>>.el-button {
  21710. margin-top: 20px;
  21711. }
  21712. .whiteBg {
  21713. /* background: #fff; */
  21714. border-radius: 10px;
  21715. }
  21716. .wb_j_box {
  21717. display: flex;
  21718. width: 100%;
  21719. padding: 0 20px 0;
  21720. box-sizing: border-box;
  21721. }
  21722. .wb_j_box_content {
  21723. width: calc(100% - 55% - 100px);
  21724. display: flex;
  21725. align-items: center;
  21726. }
  21727. .wb_j_box_p_box {
  21728. max-width: calc(100% - 200px);
  21729. word-break: break-all;
  21730. overflow: hidden;
  21731. margin: 0 0 0 10px;
  21732. font-size: 14px;
  21733. color: #6e6e6e;
  21734. z-index: 999;
  21735. }
  21736. .chooseWho {
  21737. display: flex;
  21738. width: 410px;
  21739. flex-direction: row;
  21740. flex-wrap: nowrap;
  21741. justify-content: space-between;
  21742. padding-bottom: 10px;
  21743. }
  21744. .chooseWho>div {
  21745. cursor: pointer;
  21746. padding-bottom: 10px;
  21747. font-weight: bold;
  21748. }
  21749. .isChooseActive {
  21750. color: #3e88f4;
  21751. border-bottom: 2px solid #2f80f3;
  21752. }
  21753. .toolSort {
  21754. display: flex;
  21755. flex-direction: row;
  21756. flex-wrap: wrap;
  21757. justify-content: flex-start;
  21758. align-items: flex-start;
  21759. }
  21760. .toolSort>div {
  21761. margin-right: 10px;
  21762. }
  21763. .tools {
  21764. width: 100%;
  21765. display: flex;
  21766. flex-direction: column;
  21767. flex-wrap: nowrap;
  21768. align-items: flex-start;
  21769. }
  21770. .leftTools,
  21771. .rightTools {
  21772. width: 50%;
  21773. }
  21774. .leftTools+.leftTools {
  21775. border-top: 1px solid #dbdbdb;
  21776. padding-top: 30px;
  21777. }
  21778. .rightTools {
  21779. display: flex;
  21780. flex-direction: row;
  21781. flex-wrap: nowrap;
  21782. justify-content: space-around;
  21783. }
  21784. .firstToolList {
  21785. display: flex;
  21786. flex-direction: column;
  21787. flex-wrap: nowrap;
  21788. align-items: center;
  21789. }
  21790. .iconList {
  21791. display: flex;
  21792. flex-direction: row;
  21793. flex-wrap: wrap;
  21794. justify-content: flex-start;
  21795. align-items: center;
  21796. margin: 20px 0 5px 0;
  21797. width: 240px;
  21798. min-width: 240px;
  21799. }
  21800. .iconTool {
  21801. display: flex;
  21802. flex-direction: column;
  21803. flex-wrap: nowrap;
  21804. align-items: center;
  21805. justify-content: flex-start;
  21806. margin: 15px 10px;
  21807. }
  21808. .toolIcon {
  21809. width: 50px;
  21810. }
  21811. .taskBorder {
  21812. /* border: 1px solid #CAD1DC; */
  21813. border-radius: 10px;
  21814. margin-top: 10px;
  21815. min-height: 670px;
  21816. position: relative;
  21817. background: #fff;
  21818. padding: 20px;
  21819. overflow: hidden;
  21820. box-sizing: border-box;
  21821. }
  21822. .smallTaskBorder {
  21823. height: 405px;
  21824. min-height: 405px !important;
  21825. overflow: hidden;
  21826. }
  21827. /* .taskBorder>div {
  21828. padding: 30px 30px 10px;
  21829. } */
  21830. .addTaskBorder {
  21831. /* border: 2px solid #5E9AFC; */
  21832. border-radius: 8px;
  21833. margin-top: 10px;
  21834. cursor: pointer;
  21835. /* height: 50px;
  21836. line-height: 50px; */
  21837. background: #fff;
  21838. padding: 15px 0;
  21839. display: flex;
  21840. align-items: center;
  21841. justify-content: center;
  21842. }
  21843. /* .addTaskBorder>div {
  21844. margin: 0 auto;
  21845. display: flex;
  21846. align-items: center;
  21847. justify-content: center;
  21848. }
  21849. .addTaskBorder>div>img {
  21850. width: 20px;
  21851. }
  21852. .addTaskBorder>div>span {
  21853. font-size: 16px;
  21854. margin-left: 10px;
  21855. color: #5E9AFC;
  21856. } */
  21857. .funBlock {
  21858. display: flex;
  21859. padding: 15px 0;
  21860. flex-direction: row;
  21861. justify-content: center;
  21862. align-items: center;
  21863. position: absolute;
  21864. right: 0;
  21865. bottom: 0;
  21866. background: #fff;
  21867. width: 100%;
  21868. height: 60px;
  21869. z-index: 9;
  21870. }
  21871. .fold {
  21872. display: flex;
  21873. margin: 0 20px;
  21874. flex-direction: row;
  21875. align-items: center;
  21876. cursor: pointer;
  21877. color: #2b7bff;
  21878. }
  21879. .arrow {
  21880. margin-right: 8px;
  21881. width: 16px;
  21882. height: 16px;
  21883. min-width: 16px;
  21884. min-height: 16px;
  21885. background-size: 100% 100%;
  21886. display: block;
  21887. background-image: url(../../../assets/icon/new/u_up.png);
  21888. /* border-left: 7px solid transparent;
  21889. border-bottom: 7px solid #717C8D;
  21890. border-top: 0px solid transparent;
  21891. border-right: 7px solid transparent; */
  21892. /* box-sizing: border-box; */
  21893. transition: all 0.3s;
  21894. }
  21895. .arrowZ {
  21896. transform: rotate(180deg);
  21897. }
  21898. .addToolFun {
  21899. display: flex;
  21900. width: 150px;
  21901. flex-direction: row;
  21902. align-items: center;
  21903. justify-content: center;
  21904. border: 2px dashed #cad1dc;
  21905. border-radius: 5px;
  21906. height: 50px;
  21907. margin: 35px auto 0;
  21908. cursor: pointer;
  21909. }
  21910. .addToolFun2 {
  21911. display: flex;
  21912. width: 150px;
  21913. border: 2px dashed #cad1dc;
  21914. flex-direction: row;
  21915. align-items: center;
  21916. justify-content: center;
  21917. border-radius: 5px;
  21918. height: 50px;
  21919. margin: 0 auto 0;
  21920. cursor: pointer;
  21921. }
  21922. .addToolFun2>div,
  21923. .addToolFun>div {
  21924. display: flex;
  21925. line-height: 50px;
  21926. }
  21927. .addToolImg {
  21928. width: 20px;
  21929. height: 20px;
  21930. margin-right: 10px;
  21931. }
  21932. .addToolsDia>>>.el-dialog__body {
  21933. padding: 20px;
  21934. }
  21935. .addToolsDia>>>.el-dialog__body>.toolChoose {
  21936. padding: 0;
  21937. }
  21938. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  21939. padding: 0;
  21940. border-bottom: none;
  21941. margin-bottom: 0;
  21942. }
  21943. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  21944. width: 100%;
  21945. }
  21946. .lineCss>>>.el-form-item__label {
  21947. width: auto !important;
  21948. }
  21949. .lineCss>>>.el-form-item__content {
  21950. margin-left: 50px !important;
  21951. }
  21952. .newSteps {
  21953. display: flex;
  21954. width: 100% !important;
  21955. /* height: 80px; */
  21956. cursor: pointer;
  21957. margin: 10px 0;
  21958. border-radius: 10px;
  21959. flex-direction: row;
  21960. align-content: center;
  21961. justify-content: center;
  21962. align-items: center;
  21963. margin: 0 !important;
  21964. }
  21965. /* 评价样式 */
  21966. .elist_css {
  21967. padding-bottom: 75px !important;
  21968. }
  21969. .elist_title {
  21970. margin-bottom: 10px;
  21971. }
  21972. .elist_input {
  21973. width: 100%;
  21974. }
  21975. .elist_input_box {
  21976. display: flex;
  21977. align-items: center;
  21978. flex-wrap: wrap;
  21979. }
  21980. .elist_input_box+.elist_input_box {
  21981. margin-top: 30px;
  21982. }
  21983. .elist_input .elist_input_box input {
  21984. font: inherit;
  21985. color: currentColor;
  21986. width: 100%;
  21987. /* max-width: calc(100% - 385px); */
  21988. max-width: calc(100% - 150px);
  21989. padding: 8px 14px;
  21990. display: block;
  21991. min-width: 0;
  21992. outline: none;
  21993. border: 1px solid rgba(0, 0, 0, 0.23);
  21994. border-radius: 4px;
  21995. box-sizing: border-box;
  21996. background: #fff;
  21997. margin: 0 20px 0 0;
  21998. }
  21999. .elist_input .elist_input_box span {
  22000. height: 36px;
  22001. line-height: 36px;
  22002. color: rgb(82, 82, 82);
  22003. min-width: 80px;
  22004. }
  22005. .elist_input .elist_input_box .remove {
  22006. height: 20px;
  22007. width: 20px;
  22008. min-height: 20px;
  22009. min-width: 20px;
  22010. background-size: 100% 100%;
  22011. background-position: unset;
  22012. margin-left: 5px;
  22013. }
  22014. .elist_input_box>>>.el-rate {
  22015. display: flex;
  22016. height: 36px;
  22017. align-items: center;
  22018. }
  22019. .elist_input_box .elist_inptu_text {
  22020. width: 100%;
  22021. display: flex;
  22022. align-items: center;
  22023. margin-top: 10px;
  22024. }
  22025. .elist_input_box .elist_inptu_text input {
  22026. /* width: 500px; */
  22027. width: 100%;
  22028. max-width: unset;
  22029. }
  22030. .elist_input_box>>>.el-rate__icon {
  22031. font-size: 24px;
  22032. }
  22033. .elist_btn {
  22034. margin-top: 10px;
  22035. }
  22036. .lineTitle {
  22037. /* margin-top: 15px; */
  22038. width: 110px;
  22039. font-size: 16px;
  22040. display: flex;
  22041. align-items: center;
  22042. line-height: 20px;
  22043. }
  22044. .lineTitle::before {
  22045. content: "";
  22046. display: block;
  22047. width: 3px;
  22048. height: 20px;
  22049. background: #0061ff;
  22050. border-radius: 3px;
  22051. margin: 0 5px 0 0;
  22052. }
  22053. .clineTitle::before {
  22054. content: "";
  22055. display: block;
  22056. min-width: 10px;
  22057. width: 10px;
  22058. height: 10px;
  22059. background: #0061ff;
  22060. border-radius: 50%;
  22061. margin: 0 5px 0 0;
  22062. }
  22063. .courseTop {
  22064. display: flex;
  22065. flex-direction: row;
  22066. justify-content: space-between;
  22067. align-items: center;
  22068. width: calc(100% - 40px);
  22069. margin: 0 auto;
  22070. padding: 10px 0;
  22071. }
  22072. .stepsNav {
  22073. display: flex;
  22074. flex-direction: row;
  22075. justify-content: flex-start;
  22076. align-items: center;
  22077. }
  22078. .stepsWord {
  22079. font-size: 18px;
  22080. color: #fff;
  22081. font-weight: bold;
  22082. margin-left: auto;
  22083. background: rgb(15, 126, 255);
  22084. border-radius: 5px;
  22085. padding: 3px 25px;
  22086. box-sizing: border-box;
  22087. }
  22088. .stepBox {
  22089. width: calc(100% - 40px);
  22090. height: calc(100% - 50px);
  22091. overflow: hidden;
  22092. border-radius: 5px;
  22093. margin: 0 auto;
  22094. }
  22095. .rightBox {
  22096. width: calc(100%);
  22097. background: #f0f2f5;
  22098. /* border-radius: 10px; */
  22099. overflow: auto;
  22100. height: calc(100% - 150px);
  22101. margin: 0 auto;
  22102. position: relative;
  22103. box-sizing: border-box;
  22104. }
  22105. .e_add_top {
  22106. display: flex;
  22107. justify-content: space-between;
  22108. background: #fff;
  22109. position: absolute;
  22110. right: 20px;
  22111. height: 50px;
  22112. align-items: center;
  22113. }
  22114. .e_add_title2 {
  22115. display: flex;
  22116. align-items: center;
  22117. }
  22118. .e_add_title2 span {
  22119. width: 40px;
  22120. }
  22121. .e_add_title {
  22122. display: flex;
  22123. align-items: center;
  22124. color: #b8b8b8;
  22125. font-size: 18px;
  22126. position: relative;
  22127. height: 40px;
  22128. }
  22129. .e_add_title span {
  22130. margin-right: 10px;
  22131. }
  22132. .e_add_title .el_input {
  22133. width: 300px;
  22134. }
  22135. .e_add_title>>>.el-input__inner {
  22136. width: 400px;
  22137. }
  22138. .e_add_btn {}
  22139. .e_add_content {
  22140. display: flex;
  22141. width: 100%;
  22142. }
  22143. .e_add_list {
  22144. background: #fff;
  22145. height: 500px;
  22146. width: 210px;
  22147. position: relative;
  22148. margin: 15px 5px 0 0;
  22149. flex-shrink: 0;
  22150. display: flex;
  22151. flex-direction: column;
  22152. }
  22153. .e_add_list_title {
  22154. font-size: 20px;
  22155. width: 100%;
  22156. box-sizing: border-box;
  22157. padding: 15px 40px;
  22158. text-align: center;
  22159. border-bottom: 1px solid #eaeaea;
  22160. position: relative;
  22161. display: flex;
  22162. align-items: center;
  22163. justify-content: center;
  22164. height: 57px;
  22165. background: #f6f6f6;
  22166. }
  22167. .e_add_list_title span {
  22168. overflow: hidden;
  22169. white-space: nowrap;
  22170. text-overflow: ellipsis;
  22171. }
  22172. .e_add_list_title img {
  22173. position: absolute;
  22174. right: 15px;
  22175. width: 25px;
  22176. cursor: pointer;
  22177. top: 50%;
  22178. transform: translateY(-50%);
  22179. }
  22180. .e_add_list_body {
  22181. height: calc(100% - 187px);
  22182. overflow: auto;
  22183. }
  22184. .e_add_list_child {
  22185. width: 100%;
  22186. display: flex;
  22187. align-items: center;
  22188. justify-content: center;
  22189. position: relative;
  22190. box-sizing: border-box;
  22191. padding: 15px 40px;
  22192. text-align: center;
  22193. }
  22194. .e_add_list_child span {
  22195. overflow: hidden;
  22196. white-space: nowrap;
  22197. text-overflow: ellipsis;
  22198. cursor: pointer;
  22199. }
  22200. .e_add_list_child img {
  22201. position: absolute;
  22202. right: 10px;
  22203. width: 21px;
  22204. cursor: pointer;
  22205. top: 50%;
  22206. transform: translateY(-50%);
  22207. }
  22208. .e_add_list_child+.e_add_list_child {
  22209. border-top: 1px solid #eaeaea;
  22210. }
  22211. .e_add_list_child .active {
  22212. color: #409eff;
  22213. }
  22214. .e_add_list_btn {
  22215. position: absolute;
  22216. bottom: 0;
  22217. height: 50px;
  22218. background: rgb(120, 120, 254);
  22219. width: 100%;
  22220. color: #fff;
  22221. font-size: 16px;
  22222. text-align: center;
  22223. line-height: 50px;
  22224. cursor: pointer;
  22225. }
  22226. .e_add_list_detail {
  22227. position: absolute;
  22228. bottom: 0;
  22229. height: 130px;
  22230. background: rgb(120, 120, 254);
  22231. width: 100%;
  22232. color: #fff;
  22233. font-size: 16px;
  22234. display: flex;
  22235. align-items: center;
  22236. justify-content: center;
  22237. }
  22238. .e_add_list_detail textarea {
  22239. height: 90%;
  22240. width: 95%;
  22241. border: none;
  22242. resize: none;
  22243. outline: none;
  22244. padding: 5px;
  22245. box-sizing: border-box;
  22246. }
  22247. .e_add_list_pbox {
  22248. width: 100%;
  22249. }
  22250. .e_add_list_pbox_title {
  22251. height: 50px;
  22252. background: #fff;
  22253. display: flex;
  22254. align-items: center;
  22255. width: 100%;
  22256. box-sizing: border-box;
  22257. padding: 0 20px;
  22258. flex-direction: row;
  22259. flex-wrap: wrap;
  22260. }
  22261. .type_title {
  22262. font-size: 18px;
  22263. font-weight: 700;
  22264. }
  22265. .type_content {
  22266. font-size: 16px;
  22267. margin-left: 30px;
  22268. }
  22269. .type_content span+span {
  22270. margin-left: 20px;
  22271. }
  22272. .type_content span {
  22273. cursor: pointer;
  22274. padding-bottom: 5px;
  22275. box-sizing: border-box;
  22276. }
  22277. .type_content .active {
  22278. color: #409eff;
  22279. border-bottom: 2px solid #409eff;
  22280. }
  22281. .e_add_list_pbox_content {
  22282. height: calc(100% - 50px);
  22283. display: flex;
  22284. align-items: center;
  22285. width: 100%;
  22286. background: #fff;
  22287. }
  22288. .mbCss {
  22289. width: 100%;
  22290. display: flex;
  22291. flex-direction: row;
  22292. flex-wrap: nowrap;
  22293. align-content: center;
  22294. align-items: flex-start;
  22295. justify-content: flex-start;
  22296. }
  22297. .pjCss {
  22298. /* width: 42%; */
  22299. width: calc(100% - 55%);
  22300. display: flex;
  22301. flex-direction: column;
  22302. flex-wrap: nowrap;
  22303. align-items: flex-start;
  22304. }
  22305. .e_box {
  22306. /* display: flex; */
  22307. flex-wrap: wrap;
  22308. max-height: 500px;
  22309. align-items: flex-start;
  22310. overflow: auto;
  22311. width: 100%;
  22312. }
  22313. .e_card {
  22314. border: 1px solid #ccc;
  22315. background: #fff;
  22316. margin-right: 20px;
  22317. width: 270px;
  22318. display: flex;
  22319. flex-direction: column;
  22320. align-items: center;
  22321. border-radius: 5px;
  22322. margin-top: 10px;
  22323. text-align: center;
  22324. }
  22325. .e_card_picture {
  22326. margin: 10px 0;
  22327. }
  22328. .e_card_picture>img {
  22329. width: 50px;
  22330. }
  22331. .e_card_name {
  22332. width: 100%;
  22333. padding: 0 10px;
  22334. box-sizing: border-box;
  22335. margin-bottom: 10px;
  22336. overflow: hidden;
  22337. text-overflow: ellipsis;
  22338. white-space: nowrap;
  22339. }
  22340. .e_card_time {
  22341. width: 100%;
  22342. padding: 0 10px;
  22343. box-sizing: border-box;
  22344. font-size: 15px;
  22345. color: #c3c3c3;
  22346. margin-bottom: 10px;
  22347. }
  22348. .e_card_btn {
  22349. height: 40px;
  22350. display: flex;
  22351. align-items: center;
  22352. width: 100%;
  22353. background: rgb(244, 244, 244);
  22354. }
  22355. .e_card_btn:hover {
  22356. background: rgb(221 221 221);
  22357. }
  22358. .e_card_btn span {
  22359. flex: 1 1 auto;
  22360. text-align: center;
  22361. cursor: pointer;
  22362. }
  22363. .addEva {
  22364. border: 1px solid #ccc;
  22365. background: #fff;
  22366. margin-right: 20px;
  22367. width: 270px;
  22368. height: 149px;
  22369. display: flex;
  22370. flex-direction: column;
  22371. align-items: center;
  22372. border-radius: 5px;
  22373. margin-top: 10px;
  22374. text-align: center;
  22375. cursor: pointer;
  22376. justify-content: center;
  22377. }
  22378. .addEva>img {
  22379. width: 50px;
  22380. object-fit: cover;
  22381. }
  22382. .uploadFm {
  22383. border: 1px dashed #ccc;
  22384. width: 100%;
  22385. height: 140px;
  22386. position: relative;
  22387. cursor: pointer;
  22388. display: flex;
  22389. flex-direction: column;
  22390. justify-content: center;
  22391. align-items: center;
  22392. font-size: 14px;
  22393. color: #6e6e6e;
  22394. position: relative;
  22395. }
  22396. .cover_p {
  22397. width: 100% !important;
  22398. height: 100%;
  22399. object-fit: cover;
  22400. }
  22401. .uploadFm2:hover .cover_mask {
  22402. display: flex !important;
  22403. }
  22404. .cover_mask {
  22405. display: none;
  22406. width: 100%;
  22407. height: 100%;
  22408. position: absolute;
  22409. background: #00000054;
  22410. align-items: center;
  22411. justify-content: center;
  22412. flex-direction: column;
  22413. }
  22414. .cover_mask>img {
  22415. width: 30px;
  22416. }
  22417. .cover_mask>span {
  22418. color: #fff;
  22419. font-size: 12px;
  22420. }
  22421. .uploadFm>img {
  22422. width: 50px;
  22423. }
  22424. .fileCss {
  22425. width: 100%;
  22426. display: flex;
  22427. flex-direction: row;
  22428. flex-wrap: nowrap;
  22429. justify-content: space-around;
  22430. align-items: center;
  22431. padding-top: 15px;
  22432. }
  22433. .fileCss>div {
  22434. display: flex;
  22435. flex-direction: column;
  22436. align-items: center;
  22437. }
  22438. .fileCss .spanName {
  22439. margin-top: 10px;
  22440. }
  22441. .sysPicBox {
  22442. display: flex;
  22443. flex-direction: row;
  22444. flex-wrap: wrap;
  22445. align-content: flex-start;
  22446. height: 435px;
  22447. overflow: auto;
  22448. position: relative;
  22449. }
  22450. .picNone {
  22451. position: absolute;
  22452. left: 50%;
  22453. top: 45%;
  22454. transform: translate(-50%, -50%);
  22455. width: fit-content;
  22456. color: #9c9c9c;
  22457. }
  22458. .sysPic {
  22459. width: 200px;
  22460. height: 115px;
  22461. margin: 0 20px 20px 0;
  22462. cursor: pointer;
  22463. }
  22464. .sysPic>img,
  22465. .isSysPic>img,
  22466. .deletePic>img {
  22467. width: 100%;
  22468. height: 100%;
  22469. object-fit: cover;
  22470. }
  22471. .isSysPic {
  22472. width: 200px;
  22473. height: 115px;
  22474. position: relative;
  22475. }
  22476. .deletePic {
  22477. width: 20px;
  22478. height: 20px;
  22479. position: absolute;
  22480. top: 0;
  22481. right: 0;
  22482. cursor: pointer;
  22483. }
  22484. .select_box1 {
  22485. height: 100%;
  22486. }
  22487. .select_box1_img {
  22488. background: #fff;
  22489. border-radius: 5px;
  22490. padding: 15px;
  22491. box-sizing: border-box;
  22492. margin-bottom: 20px;
  22493. }
  22494. .select_box1_title {
  22495. padding: 0 0 15px 0;
  22496. border-bottom: 1px solid #eee;
  22497. margin-bottom: 15px;
  22498. }
  22499. .select_box1_title span:nth-child(1) {
  22500. font-size: 16px;
  22501. margin-right: 20px;
  22502. color: #000;
  22503. }
  22504. .select_box1_title span:nth-child(2) {
  22505. font-size: 14px;
  22506. color: rgb(112, 112, 112);
  22507. }
  22508. .select_box1_add_img {}
  22509. .select_box1_select {
  22510. background: #fff;
  22511. border-radius: 5px;
  22512. padding: 15px;
  22513. box-sizing: border-box;
  22514. height: calc(100% - 200px);
  22515. overflow: auto;
  22516. }
  22517. .select_box2 {
  22518. height: 100%;
  22519. }
  22520. .select_box2_title {
  22521. background: #fff;
  22522. border-radius: 5px;
  22523. padding: 5px 10px;
  22524. box-sizing: border-box;
  22525. margin-bottom: 10px;
  22526. }
  22527. .select_box2_box {
  22528. display: flex;
  22529. height: calc(100% - 30px);
  22530. }
  22531. .select_box2_img {
  22532. width: calc(100% - 310px);
  22533. height: 100%;
  22534. overflow: auto;
  22535. background: #fff;
  22536. border-radius: 5px;
  22537. }
  22538. .select_box2_img img {
  22539. width: 100%;
  22540. }
  22541. .select_box2_answer {
  22542. background: #fff;
  22543. margin-left: 10px;
  22544. border-radius: 5px;
  22545. width: 300px;
  22546. overflow: auto;
  22547. height: 100%;
  22548. display: flex;
  22549. flex-direction: column;
  22550. align-items: center;
  22551. padding-top: 10px;
  22552. box-sizing: border-box;
  22553. }
  22554. .select_box2_answer_box {
  22555. margin: 0 0 10px 0;
  22556. width: 85%;
  22557. }
  22558. .rate_textarea {
  22559. font: inherit;
  22560. color: currentColor;
  22561. width: 100%;
  22562. padding: 8px 14px;
  22563. display: block;
  22564. min-width: 0;
  22565. outline: none;
  22566. border: 1px solid rgba(0, 0, 0, 0.23);
  22567. border-radius: 4px;
  22568. box-sizing: border-box;
  22569. background: #fff;
  22570. margin: 0 20px 0 0;
  22571. resize: none;
  22572. }
  22573. .select_answer_title {
  22574. text-align: left;
  22575. width: 85%;
  22576. margin-bottom: 10px;
  22577. font-size: 18px;
  22578. color: #8e8e8e;
  22579. }
  22580. .mask {
  22581. background-color: rgb(0 0 0 / 30%);
  22582. /* position: fixed; */
  22583. position: absolute;
  22584. top: 0;
  22585. left: 0;
  22586. width: 100%;
  22587. height: 100%;
  22588. z-index: 90;
  22589. display: flex;
  22590. align-items: center;
  22591. justify-content: center;
  22592. }
  22593. .progressBox {
  22594. width: 300px;
  22595. height: 150px;
  22596. background: #fff;
  22597. border-radius: 10px;
  22598. box-shadow: 0 0 6px 1px #bfbfbf;
  22599. display: flex;
  22600. align-items: center;
  22601. justify-content: center;
  22602. flex-direction: column;
  22603. position: relative;
  22604. color: #6c6c6c;
  22605. }
  22606. .progressBox>>>.el-progress-bar__outer {
  22607. background-color: #d1dfff !important;
  22608. }
  22609. .progressBox .lbox {
  22610. height: 50px;
  22611. font-size: 19px;
  22612. display: flex;
  22613. align-items: center;
  22614. color: #747474;
  22615. }
  22616. .progressBox .lbox img {
  22617. width: 40px;
  22618. margin-right: 20px;
  22619. }
  22620. .closeCss {
  22621. position: absolute;
  22622. top: 8px;
  22623. right: 8px;
  22624. cursor: pointer;
  22625. width: 20px;
  22626. height: 20px;
  22627. }
  22628. .closeCss>img {
  22629. width: 100%;
  22630. height: 100%;
  22631. }
  22632. .updateTips::before {
  22633. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  22634. font-size: 14px;
  22635. margin-left: 20px;
  22636. font-weight: 400;
  22637. color: #ff3a3a;
  22638. margin-bottom: 10px;
  22639. display: block;
  22640. }
  22641. .updateMask {
  22642. width: 100%;
  22643. z-index: 3;
  22644. top: 0;
  22645. position: absolute;
  22646. /* background-color: rgba(0,0,0,.3); */
  22647. }
  22648. .t_j_box {
  22649. display: flex;
  22650. }
  22651. .t_j_box span:nth-child(1) {
  22652. width: 15%;
  22653. overflow: hidden;
  22654. margin-right: 10px;
  22655. text-overflow: ellipsis;
  22656. white-space: nowrap;
  22657. }
  22658. .t_j_box span:nth-child(2) {
  22659. width: 30%;
  22660. overflow: hidden;
  22661. text-overflow: ellipsis;
  22662. margin-right: 10px;
  22663. }
  22664. .t_j_box span:nth-child(3) {
  22665. max-width: calc(55% - 20px);
  22666. overflow: hidden;
  22667. text-overflow: ellipsis;
  22668. }
  22669. .sentenBox {
  22670. background: #fff;
  22671. height: 600px;
  22672. overflow: auto;
  22673. background-image: url("../../../assets/icon/conSentences/csBg.png");
  22674. background-position: 102%;
  22675. background-repeat: no-repeat;
  22676. background-size: 60%;
  22677. }
  22678. .sentenBox>.sentenContent {
  22679. padding-bottom: 10px;
  22680. width: 97%;
  22681. margin: 0 auto;
  22682. }
  22683. .sentenBox>.sentenContent+.sentenContent {
  22684. border-top: 1px solid #cbcbcb;
  22685. }
  22686. .addSen {
  22687. background: #409efe;
  22688. width: 90px;
  22689. color: #fff;
  22690. height: 35px;
  22691. text-align: center;
  22692. line-height: 35px;
  22693. border-radius: 5px;
  22694. float: right;
  22695. margin: 10px 20px 0 0;
  22696. cursor: pointer;
  22697. }
  22698. .sentenTop {
  22699. display: flex;
  22700. flex-direction: row;
  22701. flex-wrap: nowrap;
  22702. align-items: center;
  22703. }
  22704. .sentenTop::before {
  22705. content: attr(index);
  22706. background: #3681fc;
  22707. border-radius: 50%;
  22708. color: #fff;
  22709. width: 25px;
  22710. height: 25px;
  22711. min-width: 25px;
  22712. min-height: 25px;
  22713. text-align: center;
  22714. line-height: 25px;
  22715. margin-right: 5px;
  22716. }
  22717. .sentenTop>div:nth-child(2) {
  22718. width: 300px;
  22719. margin: 0 15px;
  22720. }
  22721. .sentenTop>div:nth-child(3) {
  22722. background: #409efe;
  22723. color: #fff;
  22724. width: 65px;
  22725. height: 35px;
  22726. text-align: center;
  22727. line-height: 35px;
  22728. border-radius: 5px;
  22729. cursor: pointer;
  22730. }
  22731. .cardList {
  22732. padding: 30px 0 20px 0;
  22733. display: flex;
  22734. flex-direction: row;
  22735. flex-wrap: wrap;
  22736. align-items: center;
  22737. box-sizing: border-box;
  22738. border-bottom: 1px solid #f4f4f4;
  22739. width: 98%;
  22740. margin: 0 auto;
  22741. }
  22742. .rightCardList {
  22743. display: flex;
  22744. flex-wrap: wrap;
  22745. }
  22746. .cardBox {
  22747. display: flex;
  22748. flex-direction: row;
  22749. flex-wrap: wrap;
  22750. align-items: center;
  22751. align-content: center;
  22752. }
  22753. .isCard,
  22754. .isCard1 {
  22755. width: auto;
  22756. padding: 0 20px;
  22757. height: 65px;
  22758. text-align: center;
  22759. line-height: 65px;
  22760. font-size: 14px;
  22761. cursor: pointer;
  22762. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  22763. background-size: 100% 100%;
  22764. position: relative;
  22765. z-index: 99;
  22766. }
  22767. .isCard1 {
  22768. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  22769. }
  22770. .isCard:hover .deleteWord {
  22771. display: block;
  22772. }
  22773. .isCard>div:nth-child(1),
  22774. .isCard1>div:nth-child(1) {
  22775. white-space: nowrap;
  22776. overflow: hidden;
  22777. text-overflow: ellipsis;
  22778. width: 100%;
  22779. margin: 0 auto;
  22780. }
  22781. .card {
  22782. width: 140px;
  22783. height: 65px;
  22784. }
  22785. .card>img {
  22786. width: 100%;
  22787. height: 100%;
  22788. }
  22789. .rightCardBox {
  22790. width: 98%;
  22791. margin: 10px auto 0;
  22792. }
  22793. .rightCardBox>div:nth-child(1) {
  22794. margin-bottom: 10px;
  22795. }
  22796. .cardCss {
  22797. display: flex;
  22798. flex-direction: column;
  22799. flex-wrap: nowrap;
  22800. align-items: center;
  22801. border-bottom: 3px solid #b4c3d3;
  22802. padding: 0 0 5px 0;
  22803. /* margin-right: 10px; */
  22804. }
  22805. .cardCss>div:nth-child(2) {
  22806. background: #5b7b9d;
  22807. color: #fff;
  22808. width: 20px;
  22809. height: 20px;
  22810. border-radius: 50%;
  22811. text-align: center;
  22812. line-height: 20px;
  22813. }
  22814. .sentenTopBox {
  22815. display: flex;
  22816. flex-direction: row;
  22817. flex-wrap: nowrap;
  22818. align-items: center;
  22819. justify-content: space-between;
  22820. padding: 55px 0 0 20px;
  22821. box-sizing: border-box;
  22822. width: 85%;
  22823. }
  22824. .rb_c_ai_box,
  22825. .stepsBottom {
  22826. width: 100%;
  22827. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  22828. /* background: #f7f7f7; */
  22829. border-radius: 10px;
  22830. overflow: hidden;
  22831. /* height: 100%; */
  22832. height: calc(100% - 55px);
  22833. }
  22834. .navTop {
  22835. background: #53749b;
  22836. color: #fff;
  22837. height: 40px;
  22838. line-height: 40px;
  22839. padding-left: 15px;
  22840. font-size: 18px;
  22841. }
  22842. .navBottom {
  22843. /* background: #6b91b7; */
  22844. height: 100%;
  22845. overflow: auto;
  22846. padding: 10px 0;
  22847. }
  22848. .navStage {
  22849. display: flex;
  22850. flex-direction: row;
  22851. flex-wrap: nowrap;
  22852. align-items: center;
  22853. padding: 10px 10px 10px 0;
  22854. cursor: pointer;
  22855. background: #ffffff;
  22856. width: 95%;
  22857. margin: 5px auto 5px;
  22858. box-sizing: border-box;
  22859. border-radius: 5px;
  22860. flex-wrap: wrap;
  22861. position: relative;
  22862. }
  22863. .navStage:hover>.chapter_upload_drag {
  22864. display: block;
  22865. }
  22866. .navTask:hover>.chapter_upload_drag {
  22867. display: block;
  22868. }
  22869. .chapter_upload:hover>.chapter_upload_drag {
  22870. display: block;
  22871. }
  22872. .navStage::before {
  22873. content: "";
  22874. display: block;
  22875. width: 16px;
  22876. height: 16px;
  22877. background-image: url(../../../assets/icon/new/icon_stage.png);
  22878. background-size: 100%;
  22879. margin-left: 25px;
  22880. }
  22881. .navStage .chapter_unit_open {
  22882. content: "";
  22883. display: block;
  22884. width: 16px;
  22885. height: 16px;
  22886. background-image: url(../../../assets/icon/new/down.png);
  22887. transform: rotate(-90deg);
  22888. background-size: 100%;
  22889. margin-left: 10px;
  22890. transition: all 0.5s;
  22891. }
  22892. .isNavStageOpen .chapter_unit_open {
  22893. transform: rotate(0deg);
  22894. }
  22895. .isNavStage {
  22896. background: #0061ff;
  22897. }
  22898. .isNavStage::before {
  22899. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  22900. }
  22901. .isNavStage .chapter_unit_open {
  22902. background-image: url(../../../assets/icon/new/downC.png);
  22903. }
  22904. .isNavStage .nt_taskName {
  22905. font-weight: bold !important;
  22906. color: #ffffff !important;
  22907. }
  22908. .isNavStage .nt_taskTitle {
  22909. font-weight: bold !important;
  22910. color: #fff !important;
  22911. }
  22912. .navStage .nt_taskBox {
  22913. width: calc(100% - 68px);
  22914. padding: 0 0 0 5px;
  22915. box-sizing: border-box;
  22916. box-sizing: border-box;
  22917. display: flex;
  22918. flex-direction: row;
  22919. flex-wrap: nowrap;
  22920. align-items: baseline;
  22921. }
  22922. .navStage .nt_taskTitle {
  22923. color: #060e17;
  22924. line-height: 25px;
  22925. font-size: 16px;
  22926. }
  22927. .navStage .nt_taskName {
  22928. max-width: calc(100% - 82px);
  22929. white-space: nowrap;
  22930. overflow: hidden;
  22931. text-overflow: ellipsis;
  22932. font-size: 16px;
  22933. color: #060e17;
  22934. }
  22935. .navTask {
  22936. display: flex;
  22937. flex-direction: row;
  22938. flex-wrap: nowrap;
  22939. align-items: center;
  22940. padding: 10px 10px 10px 0;
  22941. cursor: pointer;
  22942. background: #ffffff;
  22943. width: 95%;
  22944. margin: 5px auto 5px;
  22945. box-sizing: border-box;
  22946. border-radius: 5px;
  22947. flex-wrap: wrap;
  22948. position: relative;
  22949. }
  22950. .navTask .chapter_upload_open {
  22951. content: "";
  22952. display: block;
  22953. width: 16px;
  22954. height: 16px;
  22955. background-image: url(../../../assets/icon/new/icon_arrow.png);
  22956. background-size: 100%;
  22957. margin-left: 23px;
  22958. }
  22959. .noImage .chapter_upload_open {
  22960. display: none;
  22961. background-image: unset !important;
  22962. }
  22963. .isNavOpen .chapter_upload_open {
  22964. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  22965. transform: rotate(90deg);
  22966. }
  22967. .isNavTask .chapter_upload_open {
  22968. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  22969. transform: rotate(-90deg);
  22970. }
  22971. .isNavTask.isNavOpen .chapter_upload_open {
  22972. transform: rotate(0deg);
  22973. }
  22974. .dragOverTop {
  22975. border-top: 2px solid #0061ff !important;
  22976. border-radius: 0 !important;
  22977. margin-top: 10px;
  22978. }
  22979. .dragOverBottom {
  22980. border-bottom: 2px solid #0061ff !important;
  22981. border-radius: 0 !important;
  22982. margin-top: 10px;
  22983. }
  22984. .dragOverTop2 {
  22985. border-top: 2px solid #0061ff !important;
  22986. border-radius: 0 !important;
  22987. }
  22988. .dragOverBottom2 {
  22989. border-bottom: 2px solid #0061ff !important;
  22990. border-radius: 0 !important;
  22991. }
  22992. .isNavTask {
  22993. /* background: #3681FC; */
  22994. background: #eef3fb;
  22995. }
  22996. .isNavTask>.chapter_upload_drag {
  22997. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  22998. }
  22999. .isNavTask .nt_taskName {
  23000. /* color: #fff !important; */
  23001. font-weight: bold !important;
  23002. color: #0061ff !important;
  23003. }
  23004. .isNavTask .nt_taskTitle {
  23005. /* color: #AECCFE !important; */
  23006. font-weight: bold !important;
  23007. color: #0061ff !important;
  23008. }
  23009. .navTask .nt_taskBox {
  23010. width: calc(100% - 40px);
  23011. padding: 0 0 0 5px;
  23012. box-sizing: border-box;
  23013. box-sizing: border-box;
  23014. display: flex;
  23015. flex-direction: row;
  23016. flex-wrap: nowrap;
  23017. align-items: baseline;
  23018. }
  23019. .navTask .nt_taskTitle {
  23020. /* color: #717C8D; */
  23021. color: #060e17;
  23022. line-height: 25px;
  23023. font-size: 16px;
  23024. /* min-width: 66px; */
  23025. }
  23026. .navTask .nt_taskName {
  23027. /* color: #fff; */
  23028. /* max-width: 130px; */
  23029. /* width: 100%; */
  23030. max-width: calc(100% - 66px);
  23031. font-size: 16px;
  23032. color: #060e17;
  23033. /* color: #0E1E33; */
  23034. }
  23035. .navTask .nt_taskName span {
  23036. width: 100%;
  23037. white-space: nowrap;
  23038. overflow: hidden;
  23039. text-overflow: ellipsis;
  23040. display: block;
  23041. }
  23042. .gjBox {
  23043. width: calc(100% - 25px);
  23044. padding: 0 0 0 0;
  23045. box-sizing: border-box;
  23046. border-left: 1px solid #cad1dc;
  23047. margin-left: 25px;
  23048. }
  23049. .gjBox>div {
  23050. display: flex;
  23051. align-items: center;
  23052. }
  23053. .gjBox>div::before {
  23054. content: "";
  23055. height: 1px;
  23056. width: 10px;
  23057. background: #cad1dc;
  23058. display: block;
  23059. margin-right: 5px;
  23060. }
  23061. .gjCss {
  23062. display: flex;
  23063. flex-direction: row;
  23064. flex-wrap: nowrap;
  23065. align-items: center;
  23066. padding: 15px 0;
  23067. box-sizing: border-box;
  23068. font-size: 14px;
  23069. cursor: pointer;
  23070. }
  23071. .isGjCss {
  23072. color: #0061ff;
  23073. }
  23074. .groupBox {}
  23075. .groupContent+.groupContent {
  23076. margin-top: 30px;
  23077. }
  23078. .groupTitle {
  23079. font-size: 24px;
  23080. color: rgb(80, 80, 80);
  23081. margin-bottom: 20px;
  23082. }
  23083. .groupName {
  23084. display: flex;
  23085. align-items: center;
  23086. }
  23087. .groupn {
  23088. font-size: 15px;
  23089. margin-right: 10px;
  23090. }
  23091. .groupName+.groupName {
  23092. margin-top: 15px;
  23093. }
  23094. .groupBtn {
  23095. margin-left: 10px;
  23096. }
  23097. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  23098. text-align: left;
  23099. }
  23100. .radioBox>div {
  23101. margin: 10px 0 0 10px;
  23102. }
  23103. .radioBox>>>.el-radio__input,
  23104. .radioBox>>>.el-checkbox__inner {
  23105. margin-left: 10px;
  23106. }
  23107. .radioBox>>>.el-radio__label,
  23108. .radioBox>>>.el-checkbox__label {
  23109. display: flex;
  23110. align-items: center;
  23111. }
  23112. .inImg {
  23113. width: 50px;
  23114. }
  23115. .inImg>img {
  23116. width: 100%;
  23117. height: 100%;
  23118. object-fit: cover;
  23119. }
  23120. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  23121. height: auto;
  23122. padding: 10px;
  23123. margin: 0;
  23124. }
  23125. .upCss>>>.el-upload-list {
  23126. width: 100%;
  23127. }
  23128. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  23129. width: 100%;
  23130. height: 120px;
  23131. object-fit: contain;
  23132. background: unset;
  23133. margin-left: 0;
  23134. }
  23135. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  23136. display: none;
  23137. }
  23138. .tcMember+.tcMember::before {
  23139. content: "、";
  23140. }
  23141. .xzUpImg {
  23142. width: 25px;
  23143. height: 25px;
  23144. min-width: 25px;
  23145. min-height: 25px;
  23146. cursor: pointer;
  23147. margin: 0 10px;
  23148. }
  23149. .xzUpImg>img {
  23150. width: 100%;
  23151. height: 100%;
  23152. }
  23153. .closeCss {
  23154. position: absolute;
  23155. top: 8px;
  23156. right: 8px;
  23157. cursor: pointer;
  23158. width: 20px;
  23159. height: 20px;
  23160. }
  23161. .closeCss>img {
  23162. width: 100%;
  23163. height: 100%;
  23164. }
  23165. .moveBtn {
  23166. display: flex;
  23167. flex-direction: row;
  23168. flex-wrap: nowrap;
  23169. align-items: center;
  23170. width: 55px;
  23171. }
  23172. .timuUpImg {
  23173. display: flex;
  23174. flex-direction: row;
  23175. align-items: center;
  23176. width: 100%;
  23177. margin-right: 10px;
  23178. }
  23179. .timuUpImg>div:nth-child(1) {
  23180. margin-right: 10px;
  23181. display: flex;
  23182. align-items: center;
  23183. width: 100%;
  23184. }
  23185. .timuImgBox {
  23186. margin: 10px 0;
  23187. display: flex;
  23188. flex-direction: column;
  23189. flex-wrap: wrap;
  23190. align-items: flex-start;
  23191. }
  23192. .timuImg {
  23193. width: 100px;
  23194. margin: 5px 0;
  23195. cursor: pointer;
  23196. position: relative;
  23197. }
  23198. .timuImg:hover .deleteWord {
  23199. display: block;
  23200. }
  23201. .deleteWord {
  23202. width: 25px;
  23203. height: 25px;
  23204. position: absolute;
  23205. right: -5px;
  23206. top: -5px;
  23207. cursor: pointer;
  23208. display: none;
  23209. }
  23210. .timuImg>img,
  23211. .deleteWord>img {
  23212. width: 100%;
  23213. height: 100%;
  23214. object-fit: cover;
  23215. }
  23216. .e_add_delete {
  23217. cursor: pointer;
  23218. margin-left: 10px;
  23219. }
  23220. .pType_box {
  23221. margin-top: 30px;
  23222. align-items: flex-end;
  23223. }
  23224. .noneBox {
  23225. height: 200px;
  23226. width: 100%;
  23227. display: flex;
  23228. align-items: center;
  23229. justify-content: center;
  23230. flex-direction: column;
  23231. /* margin-top: 150px; */
  23232. }
  23233. .noneBox>img {
  23234. width: 95px;
  23235. }
  23236. .noneBox>span {
  23237. margin-top: 10px;
  23238. color: #717c8d;
  23239. }
  23240. .rb_c_box {
  23241. width: 100%;
  23242. height: 100%;
  23243. display: flex;
  23244. /* padding: 20px; */
  23245. box-sizing: border-box;
  23246. justify-content: space-between;
  23247. }
  23248. .rb_c_box_left {
  23249. height: 100%;
  23250. background: #fff;
  23251. width: 270px;
  23252. min-width: 270px;
  23253. border-radius: 8px;
  23254. margin-right: 10px;
  23255. }
  23256. .rb_c_box_right {
  23257. height: 100%;
  23258. width: calc(100%);
  23259. overflow: hidden;
  23260. }
  23261. .rb_c_box_btn {
  23262. display: flex;
  23263. justify-content: flex-start;
  23264. height: 50px;
  23265. align-items: center;
  23266. }
  23267. .rb_c_box_right>.basic_box {
  23268. /* background: #fff; */
  23269. border-radius: 0;
  23270. height: calc(100% - 0px);
  23271. overflow: auto;
  23272. padding: 0;
  23273. }
  23274. .textarea_css {
  23275. display: block;
  23276. resize: none;
  23277. padding: 10px 15px;
  23278. line-height: 1.5;
  23279. box-sizing: border-box;
  23280. width: 100%;
  23281. font-size: 14px;
  23282. color: #606266;
  23283. background-color: #fff;
  23284. background-image: none;
  23285. border: 1px solid #dcdfe6;
  23286. border-radius: 4px;
  23287. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  23288. outline: none;
  23289. overflow: hidden;
  23290. height: 46px;
  23291. font-family: "Microsoft YaHei";
  23292. }
  23293. .textarea_css::-webkit-input-placeholder {
  23294. color: #c0c4cc;
  23295. }
  23296. .textarea_css:focus {
  23297. border-color: #409eff;
  23298. outline: 0;
  23299. }
  23300. .addEditor>>>.text {
  23301. height: auto;
  23302. min-height: 100px;
  23303. }
  23304. .addEditor>>>.w-e-text-container {
  23305. min-height: 100px;
  23306. }
  23307. .moveBtn2 {
  23308. flex-direction: column;
  23309. width: fit-content;
  23310. margin: 0 10px 0 10px;
  23311. }
  23312. .moveBtn2 .chapter_upload_down,
  23313. .moveBtn2 .chapter_upload_up {
  23314. width: 16px;
  23315. height: 16px;
  23316. }
  23317. .moveBtn2 .chapter_upload_up::after,
  23318. .moveBtn2 .chapter_upload_down::after {
  23319. width: 10px;
  23320. height: 10px;
  23321. }
  23322. .fullStyle>>>.el-dialog__body {
  23323. height: calc(100% - 125px) !important;
  23324. box-sizing: border-box;
  23325. }
  23326. .fullStyle1>>>.el-dialog__body {
  23327. height: auto !important;
  23328. }
  23329. .fullStyle>>>.el-dialog {
  23330. width: 100% !important;
  23331. max-width: 100% !important;
  23332. height: 100% !important;
  23333. margin: 0 !important;
  23334. }
  23335. .fullStyle {
  23336. width: 100% !important;
  23337. max-width: 100% !important;
  23338. height: 100% !important;
  23339. margin: 0 auto !important;
  23340. }
  23341. .wb_j_box_btn {
  23342. width: calc(100% - 30px);
  23343. display: flex;
  23344. height: 40px;
  23345. border: 1.5px solid #cad1dc;
  23346. border-radius: 4px;
  23347. box-sizing: border-box;
  23348. align-items: center;
  23349. font-size: 14px;
  23350. cursor: pointer;
  23351. overflow: hidden;
  23352. }
  23353. .wb_j_box_btn:hover {
  23354. border: 1.5px solid #0061ff;
  23355. }
  23356. .wb_j_box_title {
  23357. background: #f0f4fa;
  23358. height: 100%;
  23359. line-height: 40px;
  23360. width: 90px;
  23361. text-align: center;
  23362. color: #060e17;
  23363. border-right: 1.5px solid #cad1dc;
  23364. box-sizing: border-box;
  23365. }
  23366. .wb_j_box_btn_c {
  23367. width: calc(100% - 90px);
  23368. padding: 0 35px 0 10px;
  23369. box-sizing: border-box;
  23370. position: relative;
  23371. }
  23372. .wb_j_box_span {
  23373. width: 100%;
  23374. overflow: hidden;
  23375. white-space: nowrap;
  23376. text-overflow: ellipsis;
  23377. word-wrap: break-word;
  23378. color: #717c8d;
  23379. }
  23380. .wb_j_box_arrow {
  23381. content: "";
  23382. width: 14px;
  23383. height: 14px;
  23384. background: url(../../../assets/icon/new/u_arrow.png);
  23385. background-size: 100% 100%;
  23386. position: absolute;
  23387. right: 12px;
  23388. top: 50%;
  23389. transform: translateY(-50%);
  23390. }
  23391. .check_classBox {
  23392. height: 400px;
  23393. display: flex;
  23394. border-top: 1.5px solid #e7ebf1;
  23395. border-bottom: 1.5px solid #e7ebf1;
  23396. }
  23397. .check_class_right {
  23398. width: 130px;
  23399. border-right: 1px solid #e7ebf1;
  23400. display: flex;
  23401. align-items: center;
  23402. flex-direction: column;
  23403. height: 100%;
  23404. overflow: auto;
  23405. padding: 15px 0;
  23406. box-sizing: border-box;
  23407. }
  23408. .check_class {
  23409. width: 85%;
  23410. border-radius: 5px;
  23411. height: 30px;
  23412. min-height: 30px;
  23413. line-height: 30px;
  23414. text-align: center;
  23415. padding: 0 10px;
  23416. box-sizing: border-box;
  23417. cursor: pointer;
  23418. white-space: nowrap;
  23419. overflow: hidden;
  23420. text-overflow: ellipsis;
  23421. }
  23422. .check_class.activeX {
  23423. background: #e0eafb;
  23424. color: #3681fc;
  23425. font-weight: 700;
  23426. }
  23427. .check_class+.check_class {
  23428. margin-top: 15px;
  23429. }
  23430. .check_class_left {
  23431. background: #fafafa;
  23432. width: calc(100% - 130px);
  23433. padding: 15px;
  23434. box-sizing: border-box;
  23435. }
  23436. .check_class_all_box {
  23437. display: flex;
  23438. margin-bottom: 10px;
  23439. }
  23440. .all_check {
  23441. display: flex;
  23442. align-items: center;
  23443. padding: 2px 0 0;
  23444. margin-left: 10px;
  23445. }
  23446. .all_check>>>.el-checkbox__label {
  23447. line-height: 18px;
  23448. }
  23449. .check_class_left_title {
  23450. font-size: 16px;
  23451. font-weight: 700;
  23452. }
  23453. .check_class_item {
  23454. display: flex;
  23455. flex-wrap: wrap;
  23456. height: calc(100% - 45px);
  23457. overflow: auto;
  23458. justify-content: flex-start;
  23459. align-items: flex-start;
  23460. align-content: flex-start;
  23461. }
  23462. .class_item:first-child {
  23463. /* margin: 0 15px 15px 67px; */
  23464. }
  23465. .class_item {
  23466. margin: 0 15px 15px 0;
  23467. }
  23468. .class_item:hover>>>.el-checkbox__label {
  23469. color: #409eff;
  23470. }
  23471. .class_item>>>.el-checkbox__label {
  23472. color: #0e1e33;
  23473. }
  23474. .class_item:hover>>>.el-checkbox__inner {
  23475. border-color: #409eff;
  23476. }
  23477. .class_item>>>.el-checkbox,
  23478. .class_item>>>.el-checkbox__input {
  23479. display: flex;
  23480. align-items: center;
  23481. }
  23482. .taskTitle {
  23483. font-size: 20px;
  23484. font-weight: bold;
  23485. margin-bottom: 35px;
  23486. }
  23487. .taskTitle:after {
  23488. content: "";
  23489. width: 100%;
  23490. display: block;
  23491. height: 1px;
  23492. background: #cad1dc;
  23493. position: absolute;
  23494. left: 0;
  23495. margin: 15px 0 0;
  23496. }
  23497. .eva_btn_box {
  23498. margin: 20px 0px 0 0;
  23499. display: flex;
  23500. flex-direction: row;
  23501. flex-wrap: nowrap;
  23502. align-items: center;
  23503. justify-content: space-between;
  23504. width: 100%;
  23505. }
  23506. .eva_btn_left_box {
  23507. display: flex;
  23508. flex-direction: row;
  23509. flex-wrap: nowrap;
  23510. align-items: center;
  23511. }
  23512. .addTypeChoose {
  23513. display: flex;
  23514. flex-direction: row;
  23515. flex-wrap: nowrap;
  23516. align-items: center;
  23517. margin: 15px 0;
  23518. }
  23519. .addTypeBox {
  23520. display: flex;
  23521. flex-direction: column;
  23522. flex-wrap: nowrap;
  23523. align-items: center;
  23524. }
  23525. .addTypeChoose {
  23526. display: flex;
  23527. flex-direction: row;
  23528. flex-wrap: nowrap;
  23529. align-items: center;
  23530. margin: 15px 0;
  23531. }
  23532. .buchong_box {
  23533. background: #E0EAFB66;
  23534. width: calc(100% - 20px);
  23535. min-height: 50px;
  23536. display: flex;
  23537. align-items: center;
  23538. justify-content: center;
  23539. margin: 0 auto;
  23540. }
  23541. .outline {
  23542. width: calc(100% - 40px);
  23543. margin: 0 auto;
  23544. }
  23545. .task_outline {
  23546. width: calc(100% - 40px);
  23547. margin: 0 auto;
  23548. }
  23549. .outline_box+.outline_box {
  23550. margin: 30px 0 0px;
  23551. }
  23552. .outline_task {
  23553. display: flex;
  23554. align-items: center;
  23555. margin-bottom: 10px;
  23556. }
  23557. .outline_btn{
  23558. display: flex;
  23559. align-items: center;
  23560. min-width: fit-content;
  23561. margin-left: 10px;
  23562. }
  23563. .outline_task .title {
  23564. font-size: 18px;
  23565. font-weight: bold;
  23566. min-width: 80px;
  23567. }
  23568. .op_task_box,
  23569. .op_tool_box,
  23570. .outline_detail {
  23571. position: relative;
  23572. }
  23573. .op_task_box:hover .op_box,
  23574. .op_tool_box:hover .op_box,
  23575. .outline_detail:hover .op_box {
  23576. display: flex
  23577. }
  23578. .op_box {
  23579. position: absolute;
  23580. bottom: 10px;
  23581. display: none;
  23582. align-items: center;
  23583. justify-content: space-between;
  23584. width: calc(100% - 20px);
  23585. left: 50%;
  23586. transform: translateX(-50%);
  23587. }
  23588. .op_box .op_remark {
  23589. color: #8E8E8E;
  23590. font-size: 14px;
  23591. }
  23592. .rb_c_nav {
  23593. width: calc(100% - 20px);
  23594. margin: 15px auto 0;
  23595. font-size: 18px;
  23596. }
  23597. .rb_c_nav span {
  23598. cursor: pointer;
  23599. }
  23600. .rb_c_nav span+span {
  23601. margin-left: 10px;
  23602. }
  23603. .rb_c_nav span.active {
  23604. color: #0061FF
  23605. }
  23606. .text_panel>>>.text {
  23607. height: 400px;
  23608. }
  23609. .markBox{
  23610. padding: 20px 14px;
  23611. line-height: 29px;
  23612. font-size: 16px;
  23613. background: #f4f4f4;
  23614. border-radius: 5px;
  23615. }
  23616. .info_box_t{
  23617. display: flex;
  23618. align-items: center;
  23619. }
  23620. .info_box_t + .info_box_t{
  23621. margin-top: 10px;
  23622. }
  23623. .info_box_t_box{
  23624. display: flex;
  23625. align-items: center;
  23626. }
  23627. .info_box_t_box + .info_box_t_box{
  23628. margin-left: 10px;
  23629. }
  23630. .info_box_t_box > span{
  23631. width: fit-content
  23632. }
  23633. .info_box_t_box > input{
  23634. width: 150px !important;
  23635. margin: 0 5px 0 0;
  23636. }
  23637. .mode_box{
  23638. display: flex;
  23639. align-items: center;
  23640. }
  23641. .mode_box > span{
  23642. padding: 0px 5px;
  23643. cursor: pointer;
  23644. }
  23645. .mode_box > span.active{
  23646. color: #409eff;
  23647. }
  23648. .chapter_upload_check {
  23649. width: 15px;
  23650. height: 15px;
  23651. cursor: pointer;
  23652. background-image: url('../../../assets/icon/check.png');
  23653. background-size: 100% 100%;
  23654. }
  23655. .chapter_upload_check.checked{
  23656. background-image: url('../../../assets/icon/checked.png');
  23657. }
  23658. .ruleBtn {
  23659. height: 36px;
  23660. line-height: 36px;
  23661. cursor: pointer;
  23662. color: #0061FF;
  23663. }
  23664. </style>