addCourse.vue 780 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181
  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="templatePan.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>课程节数:</span>
  179. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  180. <span>节</span>
  181. </div>
  182. <div class="info_box_t_box">
  183. <span>课程时长:</span>
  184. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  185. <span>min</span>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="right_first" v-loading="imageloading2">
  190. <!-- <div class="ai_box">
  191. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  192. </div> -->
  193. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  194. 上传封面
  195. </div>
  196. <div style="width: 100%">
  197. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  198. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  199. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  200. <div v-if="cover.length == 0">点击添加封面</div>
  201. <div class="cover_mask">
  202. <img src="../../../assets/icon/new/cover_update.png" /><span
  203. style="margin-top: 5px">修改封面</span>
  204. </div>
  205. </div>
  206. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  207. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  208. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  209. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  210. <i class="el-icon-plus"></i>
  211. </el-upload> -->
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  219. <div class="whiteBg" style="border-radius: 0">
  220. <div class="c_info_title">
  221. 课程权限设置
  222. </div>
  223. <div class="wb_j_box">
  224. <div class="wb_j_box_content">
  225. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  226. (dialogVisibleClass = true),
  227. (classSearch = ''),
  228. (gradeId = ''),
  229. getClass()
  230. ">添加班级</button>
  231. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  232. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  233. getClassC(tc) }}</span>
  234. </div> -->
  235. <div class="wb_j_box_btn" @click="
  236. (dialogVisibleClass = true),
  237. (classSearch = ''),
  238. (gradeId = ''),
  239. getClass()
  240. ">
  241. <div class="wb_j_box_title">授课班级</div>
  242. <div class="wb_j_box_btn_c">
  243. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  244. v-if="checkboxList2.length" popper-class="text_tooltip2">
  245. <div class="wb_j_box_span">
  246. {{ getListClassC(checkboxList2) }}
  247. </div>
  248. </el-tooltip>
  249. <div v-else class="wb_j_box_span">请选择授课班级</div>
  250. <div class="wb_j_box_arrow"></div>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="wb_j_box_content">
  255. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  256. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  257. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  258. checkBoolean
  259. ? checkboxList3
  260. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  261. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  262. </div> -->
  263. <div class="wb_j_box_btn" @click="openMember">
  264. <div class="wb_j_box_title">协同人员</div>
  265. <div class="wb_j_box_btn_c">
  266. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  267. v-if="checkboxList3.length" popper-class="text_tooltip2">
  268. <div class="wb_j_box_span">
  269. {{ getListMan2(checkboxList3) }}
  270. </div>
  271. </el-tooltip>
  272. <div v-else class="wb_j_box_span">请选择协同人员</div>
  273. <div class="wb_j_box_arrow"></div>
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  280. <div class="c_info_title">目标管理</div>
  281. <div style="margin: 0 auto; padding: 0 20px">
  282. <div style="
  283. width: 95%;
  284. min-height: 200px;
  285. border: 1px solid #cad1dc;
  286. border-radius: 4px;
  287. position: relative;
  288. ">
  289. <div class="e_add_top">
  290. <div class="e_add_title">
  291. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  292. 清除
  293. </button>
  294. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  295. 添加
  296. </button>
  297. <!-- <span>当前使用目标管理</span>
  298. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  299. <img
  300. src="../../../assets/line.png"
  301. class="cru_line"
  302. style="
  303. width: 125px;
  304. height: 20px;
  305. bottom: -10px;
  306. left: 155px;
  307. "
  308. /> -->
  309. </div>
  310. <div style="
  311. display: flex;
  312. flex-direction: row;
  313. align-items: center;
  314. ">
  315. <!-- <el-button
  316. type="primary"
  317. size="small"
  318. @click="dialogVisiblemb = true"
  319. >添加目标管理</el-button
  320. >
  321. <el-button
  322. type="primary"
  323. size="small"
  324. @click="deleteEva()"
  325. >清除内容</el-button
  326. > -->
  327. <!-- <div class="e_add_delete" @click="deleteEva()">
  328. <img src="../../../assets/icon/delete.png" alt="" />
  329. </div> -->
  330. </div>
  331. </div>
  332. <div v-if="evalua == ''">
  333. <div class="noneBox">
  334. <img src="../../../assets/icon/new/eva_none.png" />
  335. <span>请添加目标管理</span>
  336. </div>
  337. </div>
  338. <div class="e_add_content" v-else>
  339. <div class="e_add_list_pbox">
  340. <div class="e_add_list_pbox_title">
  341. <span class="type_title">切换模式</span>
  342. <div class="type_content">
  343. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  344. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  345. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  346. </div>
  347. </div>
  348. <div class="e_add_list_pbox_content">
  349. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  350. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  351. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  352. v-if="typeMode == 3">
  353. </SeeBoard>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等...">
  362. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  363. <div class="c_info_title">
  364. 课程简要描述
  365. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  366. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  367. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  368. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  369.                   </el-tooltip>
  370. </div>
  371. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  372. <div style="width: calc(100%);" class='op_task_box'>
  373. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  374. placeholder="请输入课程简要描述"></textarea>
  375. <div class="op_box">
  376. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  377. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  378. <div class="r_pub_button_op"
  379. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  380. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  381. </el-tooltip>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;">
  388. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  389. <div class="c_info_title">
  390. 补充资料
  391. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  392. </div>
  393. <div class="buchong_box">
  394. <span>暂时还没有内容,快去添加吧~</span>
  395. </div>
  396. </div> -->
  397. <div style="position: relative;
  398. background: #fff;
  399. box-sizing: border-box;
  400. padding: 1px 20px 10px;
  401. width: 100%;
  402. border-radius: 10px;">
  403. <div style="
  404. display: flex;
  405. flex-direction: row;
  406. justify-content: space-between;
  407. align-items: center;
  408. " :style="{
  409. margin: true
  410. ? '20px 0 10px'
  411. : '20px 0 0',
  412. }">
  413. <div style="margin-bottom: 10px;width:100%" class="lineTitle">
  414. 补充资料
  415. <div class="add_info_box" style="margin: 0 0 0 auto">
  416. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  417. 上传补充资料
  418. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  419. beforeUploadInfo2(
  420. $event,
  421. 13
  422. )
  423. " />
  424. </button>
  425. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  426. 图文
  427. </button>
  428. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  429. 链接
  430. </button>
  431. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  432. 代码
  433. </button>
  434. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  435. 资源
  436. </button> -->
  437. </div>
  438. </div>
  439. </div>
  440. <div>
  441. <div class="add_chapters_box add_c_none" v-if="
  442. infoData &&
  443. infoData.length == 0
  444. ">
  445. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  446. </div>
  447. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  448. <div @dragstart="
  449. dragStart(item1, index1, 0)
  450. " @dragover.prevent="
  451. dragOver(index1, 0)
  452. " @dragend="dragEnd()" :draggable="isdrag ==
  453. 'chapter-' + 0 + '-' + index1
  454. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  455. getChapterData(
  456. $event,
  457. index1,
  458. item1.type
  459. )
  460. " :class="{
  461. dragOverTop2:
  462. newIndex === index1 &&
  463. typeIndex ==
  464. 'chapter-' +
  465. 0 +
  466. '-' +
  467. index1 &&
  468. oldIndex > index1 &&
  469. dragType == 'drag',
  470. dragOverBottom2:
  471. newIndex === index1 &&
  472. typeIndex ==
  473. 'chapter-' +
  474. 0 +
  475. '-' +
  476. index1 &&
  477. oldIndex < index1 &&
  478. dragType == 'drag',
  479. }">
  480. <!-- <div @mousedown="
  481. isdrag =
  482. 'chapter-' + 0 + '-' + index1
  483. " @mouseup="isdrag = ''" @touchstart="
  484. isdrag =
  485. 'chapter-' + 0 + '-' + index1
  486. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  487. <div class="chapter_upload_o" style="
  488. position: relative;
  489. display: flex;
  490. align-items: center;
  491. ">
  492. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  493. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  494. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  495. </div>
  496. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  497. </div>
  498. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  499. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  500. </div>
  501. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  502. </div>
  503. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  504. </div>
  505. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  506. </div>
  507. </div>
  508. <div class="chapter_upload_n">
  509. <input readonly="true" v-if="
  510. item1.type == 2 ||
  511. item1.type == 3 ||
  512. item1.type == 12 ||
  513. item1.type == 13 ||
  514. item1.type == 7
  515. " :placeholder="item1.name" @click="
  516. updataVideoT(
  517. $event,
  518. index1
  519. )
  520. " style="
  521. border: none;
  522. outline: none;
  523. width: 80%;
  524. minwidth: 215px;
  525. z-index: 99;
  526. font-size: 14px;
  527. white-space: nowrap;
  528. overflow: hidden;
  529. text-overflow: ellipsis;
  530. " />
  531. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  532. border: none;
  533. outline: none;
  534. width: 80%;
  535. white-space: nowrap;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. " readonly="true" @click="
  539. selectAttText(index1)
  540. " />
  541. <input :placeholder="item1.title ? item1.title : '链接'
  542. " v-if="item1.type == 8" style="
  543. border: none;
  544. outline: none;
  545. width: 80%;
  546. white-space: nowrap;
  547. overflow: hidden;
  548. text-overflow: ellipsis;
  549. " readonly="true" @click="selectLine(index1)" />
  550. <input :placeholder="item1.title ? item1.title : '链接'
  551. " v-if="item1.type == 14" style="
  552. border: none;
  553. outline: none;
  554. width: 80%;
  555. white-space: nowrap;
  556. overflow: hidden;
  557. text-overflow: ellipsis;
  558. " readonly="true" @click="
  559. openUpdateSource(index1)
  560. " />
  561. </div>
  562. <div class="chapter_upload_ic">
  563. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  564. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  565. <div class="chapter_upload_up" @click="
  566. upCd(
  567. $event,
  568. index1
  569. )
  570. "></div>
  571. <div class="chapter_upload_down" @click="
  572. downCd(
  573. $event,
  574. index1
  575. )
  576. "></div>
  577. </div>
  578. <div class="chapter_upload_ic_edit" v-if="
  579. item1.type == 2 ||
  580. item1.type == 3 ||
  581. item1.type == 12 ||
  582. item1.type == 13 ||
  583. item1.type == 7
  584. " @click.stop="
  585. updataVideoT(
  586. $event,
  587. index1
  588. )
  589. ">
  590. <div></div>
  591. </div>
  592. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  593. selectAttText(index1)
  594. ">
  595. <div></div>
  596. </div>
  597. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  598. @click="selectLine(index1)">
  599. <div></div>
  600. </div>
  601. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  602. openUpdateSource(index1)
  603. ">
  604. <div></div>
  605. </div> -->
  606. <div class="chapter_upload_ic_r" @click.stop="
  607. deleteInfoData(
  608. $event,
  609. index1
  610. )
  611. ">
  612. <div></div>
  613. </div>
  614. </div>
  615. </div>
  616. </div>
  617. </div>
  618. </div>
  619. <div v-if="
  620. infoproVisible
  621. " class="mask">
  622. <div class="progressBox">
  623. <!-- <div id="closePro" class="closeCss">
  624. <img src="../../../../assets/icon/close.png" alt />
  625. </div> -->
  626. <div class="lbox">
  627. <img src="../../../assets/loading.gif" />上传中,请稍后
  628. </div>
  629. <div style="margin-bottom: 10px">
  630. <span>{{
  631. infoisFinishSize
  632. }}M</span>
  633. /
  634. <span>{{
  635. infoisAllSize
  636. }}M</span>
  637. </div>
  638. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  639. ? infoprogress
  640. : 0
  641. " style="width: 80%"></el-progress>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  647. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  648. <div class="c_info_title">
  649. 补充描述
  650. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  651. </div>
  652. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  653. <div style="width: calc(100%)">
  654. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  655. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  656. </div>
  657. </div>
  658. </div>
  659. </div>
  660. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && isOutline">
  661. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  662. <div class="c_info_title">
  663. 课程大纲
  664. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  665. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  666. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  667. @click="openAiDialog(2, 'aiOutline')">生成大纲</button>
  668. </el-tooltip>
  669. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  670. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">重新生成大纲</button>
  671. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  672. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">重新生成大纲</button>
  673. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  674. </div>
  675. <div class="task_outline">
  676. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  677. <div class="outline_task">
  678. <div class="title">任务{{ index + 1 }}</div>
  679. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  680. v-model="item.task" />
  681. </div>
  682. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  683. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  684. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  685. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  686. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  687. <div class="op_box">
  688. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  689. <div style="display: flex;">
  690. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  691. <div class="r_pub_button_op"
  692. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  693. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  694. </el-tooltip>
  695. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  696. item.isTask3 ? '确定' : '编辑'}}</div>
  697. </div>
  698. </div>
  699. </div>
  700. </div>
  701. </div>
  702. </div>
  703. </div>
  704. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
  705. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  706. <div class="c_info_title">
  707. 概念群
  708. </div>
  709. <div class="task_outline">
  710. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  711. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  712. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  713. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  714. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  715. <div class="op_box">
  716. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  717. <div style="display: flex;">
  718. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  719. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  720. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  721. </el-tooltip>
  722. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  723. cpote.cpote1s ? '确定' : '编辑'}}</div>
  724. </div>
  725. </div>
  726. </div>
  727. </div>
  728. </div>
  729. </div>
  730. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
  731. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  732. <div class="c_info_title">
  733. 问题链
  734. </div>
  735. <div class="task_outline">
  736. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  737. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  738. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  739. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  740. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  741. <div class="op_box">
  742. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  743. <div style="display: flex;">
  744. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  745. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  746. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  747. </el-tooltip>
  748. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  749. cpote.cpote2s ? '确定' : '编辑'}}</div>
  750. </div>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. </div>
  756. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
  757. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  758. <div class="c_info_title">
  759. 目标层
  760. </div>
  761. <div class="task_outline">
  762. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  763. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  764. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  765. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  766. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  767. <div class="op_box">
  768. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  769. <div style="display: flex;">
  770. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  771. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  772. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  773. </el-tooltip>
  774. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  775. cpote.cpote3s ? '确定' : '编辑'}}</div>
  776. </div>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. </div>
  782. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
  783. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  784. <div class="c_info_title">
  785. 任务簇
  786. </div>
  787. <div class="task_outline">
  788. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  789. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  790. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  791. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  792. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  793. <div class="op_box">
  794. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  795. <div style="display: flex;">
  796. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  797. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  798. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  799. </el-tooltip>
  800. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  801. cpote.cpote4s ? '确定' : '编辑'}}</div>
  802. </div>
  803. </div>
  804. </div>
  805. </div>
  806. </div>
  807. </div>
  808. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  809. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  810. <div class="c_info_title">
  811. 教案
  812. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length">
  813. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  814. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  815. @click="openAiDialog(2, 'aiTeacher2')" v-if="istemplate == 1 && dArray.length">生成教案</button>
  816. </el-tooltip>
  817. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  818. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0">重新生成教案</button>
  819. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  820. </div>
  821. <div class="task_outline">
  822. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  823. <div class="outline_task">
  824. <div class="title">任务{{ index + 1 }}</div>
  825. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  826. v-model="item.task" />
  827. </div>
  828. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  829. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  830. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  831. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  832. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  833. <div class="op_box">
  834. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  835. <div style="display: flex;">
  836. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  837. <div class="r_pub_button_op"
  838. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  839. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  840. </el-tooltip>
  841. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  842. item.isTask3 ? '确定' : '编辑'}}</div>
  843. </div>
  844. </div>
  845. </div>
  846. </div>
  847. </div>
  848. </div>
  849. </div>
  850. <div class="info_btnBox3" v-if="istemplate != 1">
  851. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  852. goTo(
  853. '/course?userid=' +
  854. userid +
  855. '&oid=' +
  856. oid +
  857. '&org=' +
  858. org +
  859. '&role=' +
  860. role
  861. )
  862. ">
  863. 返回课程
  864. </button>
  865. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  866. {{ steps == 4 ? "返回课程" : "上一步" }}
  867. </button>
  868. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  869. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  870. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5'" :class="{
  871. pub_btn_next_img: steps != 3,
  872. pub_btn_finish_img: steps == 3,
  873. }">
  874. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  875. </button>
  876. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  877. @contextmenu.prevent="nextSteps(1)" :class="{
  878. pub_btn_next_img: steps != 3,
  879. pub_btn_finish_img: steps == 3,
  880. }">
  881. {{ steps == 3 ? "确认上传" : (templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && cpoteType < 4) ?
  882. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  883. : "下一步" }}
  884. </button>
  885. </el-tooltip>
  886. </div>
  887. </div>
  888. <div class="rightBox" v-if="steps == 2" :style="{
  889. height:
  890. !isStepDisplay && !isBtnDisplay
  891. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  892. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  893. }">
  894. <div class="basic_box" style="
  895. padding: 20px 30px 0px !important;
  896. box-sizing: border-box;
  897. height: calc(100% - 80px);
  898. overflow: auto;
  899. background: #fff;
  900. ">
  901. <!-- <div
  902. style="
  903. color: #b8b8b8;
  904. background: #fff;
  905. width: 26%;
  906. height: 40px;
  907. border-radius: 15px;
  908. padding-left: 20px;
  909. line-height: 40px;
  910. font-size: 17px;
  911. box-shadow: 0px 1px 2px 2px #e0e0e0;
  912. "
  913. >-->
  914. <div class="right_title" style="border: none; margin: 0; padding: 0">
  915. 请选择合适的课程模板
  916. </div>
  917. <div class="wordbox">
  918. <div class="wordTeacher" @click="checkTemplate2()">
  919. <div class="wordPic">
  920. <img src="../../../assets/icon/new/template_none.png" alt />
  921. </div>
  922. <div style="
  923. margin-top: 10px;
  924. line-height: 19px;
  925. overflow: hidden;
  926. text-overflow: ellipsis;
  927. white-space: nowrap;
  928. padding: 0 20px;
  929. ">
  930. 空白模板
  931. </div>
  932. </div>
  933. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  934. <div class="wordPic">
  935. <img src="../../../assets/icon/new/template.png" alt />
  936. </div>
  937. <div style="
  938. margin-top: 10px;
  939. line-height: 19px;
  940. overflow: hidden;
  941. text-overflow: ellipsis;
  942. white-space: nowrap;
  943. padding: 0 20px;
  944. ">
  945. {{ aa.title }}
  946. </div>
  947. </div>
  948. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  949. <div class="wordPic">
  950. <img src="../../../assets/icon/new/template.png" alt />
  951. </div>
  952. <div style="
  953. margin-top: 10px;
  954. line-height: 19px;
  955. overflow: hidden;
  956. text-overflow: ellipsis;
  957. white-space: nowrap;
  958. padding: 0 20px;
  959. ">
  960. 简易模板
  961. </div>
  962. </div>
  963. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  964. <div class="wordPic">
  965. <img src="../../../assets/icon/new/template.png" alt />
  966. </div>
  967. <div style="
  968. margin-top: 10px;
  969. line-height: 19px;
  970. overflow: hidden;
  971. text-overflow: ellipsis;
  972. white-space: nowrap;
  973. padding: 0 20px;
  974. ">
  975. 智能粘贴模式
  976. </div>
  977. </div>
  978. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  979. <div class="wordPic">
  980. <img src="../../../assets/icon/wordMub.png" alt />
  981. </div>
  982. <div style="
  983. margin-top: 10px;
  984. line-height: 19px;
  985. overflow: hidden;
  986. text-overflow: ellipsis;
  987. white-space: nowrap;
  988. padding: 0 20px;
  989. ">
  990. 未来小学课程设计
  991. </div>
  992. </div> -->
  993. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  994. <div class="wordPic">
  995. <img src="../../../assets/icon/wordMub.png" alt />
  996. </div>
  997. <div style="
  998. margin-top: 10px;
  999. line-height: 19px;
  1000. overflow: hidden;
  1001. text-overflow: ellipsis;
  1002. white-space: nowrap;
  1003. padding: 0 20px;
  1004. ">
  1005. 我的课程
  1006. </div>
  1007. </div> -->
  1008. </div>
  1009. </div>
  1010. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1011. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1012. goTo(
  1013. '/course?userid=' +
  1014. userid +
  1015. '&oid=' +
  1016. oid +
  1017. '&org=' +
  1018. org +
  1019. '&role=' +
  1020. role
  1021. )
  1022. ">
  1023. 返回课程
  1024. </button>
  1025. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1026. {{ steps == 4 ? "返回课程" : "上一步" }}
  1027. </button>
  1028. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1029. pub_btn_next_img: steps != 3,
  1030. pub_btn_finish_img: steps == 3,
  1031. }">
  1032. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1033. </button>
  1034. </div>
  1035. </div>
  1036. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1037. height:
  1038. !isStepDisplay && !isBtnDisplay
  1039. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1040. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1041. }">
  1042. <div class="rb_c_box">
  1043. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1044. <div class="rb_c_nav">
  1045. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1046. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1047. </div>
  1048. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1049. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1050. position: istemplate == 1 ? 'sticky' : 'unset',
  1051. top: istemplate == 1 ? '0' : 'unset'
  1052. }">
  1053. <!-- <div class="navTop">辅助导航</div> -->
  1054. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1055. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1056. <div class="nt_taskBox" style="width: 100%;">
  1057. <div class="nt_taskTitle"
  1058. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1059. unitIndex + 1 }}</div>
  1060. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1061. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1062. <span>{{ unitJson[unitIndex].dyName }}</span>
  1063. </el-tooltip>
  1064. </div>
  1065. </div>
  1066. </div> -->
  1067. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1068. .taskJson" :key="tIndex" :class="{
  1069. dragOverTop:
  1070. newIndex === tIndex &&
  1071. typeIndex == 'task-' + tIndex &&
  1072. oldIndex > tIndex &&
  1073. dragType == 'task',
  1074. dragOverBottom:
  1075. newIndex === tIndex &&
  1076. typeIndex == 'task-' + tIndex &&
  1077. oldIndex < tIndex &&
  1078. dragType == 'task',
  1079. }">
  1080. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1081. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1082. class="navTask" :class="{
  1083. isNavTask:
  1084. isClickColor > 0 && isClickColor == tIndex + 1,
  1085. isNavOpen: t.toolOpen,
  1086. }">
  1087. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1088. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1089. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1090. class="chapter_upload_drag"></div>
  1091. <div class="nt_taskBox">
  1092. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1093. <div class="nt_taskName">
  1094. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1095. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1096. </el-tooltip>
  1097. </div>
  1098. </div>
  1099. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1100. 1
  1101. ">
  1102. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1103. @click.stop="taskMove(1, tIndex)"></div>
  1104. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1105. @click.stop="taskMove(2, tIndex)"></div>
  1106. </div> -->
  1107. </div>
  1108. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1109. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1110. @click="jumpGj(tIndex, toolIndex2)">
  1111. <div class="gjCss" :class="{
  1112. isGjCss:
  1113. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1114. }">
  1115. <div>工具{{ toolIndex2 + 1 }}:</div>
  1116. <div>
  1117. {{
  1118. toolsData[tool.tool[0]] &&
  1119. toolsData[tool.tool[0]].name
  1120. }}
  1121. </div>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. </div>
  1127. <div class="navBottom" v-if="courseState == 1">
  1128. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1129. dragOverTop:
  1130. newIndex === stageIndex &&
  1131. typeIndex == 'Unit-' + stageIndex &&
  1132. oldIndex > stageIndex &&
  1133. dragType == 'Unit',
  1134. dragOverBottom:
  1135. newIndex === stageIndex &&
  1136. typeIndex == 'Unit-' + stageIndex &&
  1137. oldIndex < stageIndex &&
  1138. dragType == 'Unit',
  1139. }">
  1140. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1141. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1142. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1143. isNavStage: stageIndex == unitIndex,
  1144. isNavStageOpen: stage.toolOpen,
  1145. }">
  1146. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1147. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1148. class="chapter_upload_drag"></div>
  1149. <div class="nt_taskBox">
  1150. <div class="nt_taskTitle">
  1151. 第{{ stageIndex + 1 }}阶段:
  1152. </div>
  1153. <div class="nt_taskName">
  1154. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1155. " placement="top">
  1156. <span>{{
  1157. stage.dyName ? stage.dyName : "未命名阶段"
  1158. }}</span>
  1159. </el-tooltip>
  1160. </div>
  1161. </div>
  1162. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1163. </div>
  1164. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1165. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1166. dragOverTop:
  1167. newIndex === tIndex &&
  1168. typeIndex == 'task-' + tIndex &&
  1169. ((oldIndex > tIndex &&
  1170. stageIndex == checkUnitIndex) ||
  1171. (oldIndex == tIndex &&
  1172. stageIndex == checkUnitIndex &&
  1173. checkUnitIndex != oldUnitIndex)) &&
  1174. dragType == 'task',
  1175. dragOverBottom:
  1176. newIndex === tIndex &&
  1177. typeIndex == 'task-' + tIndex &&
  1178. oldIndex < tIndex &&
  1179. stageIndex == checkUnitIndex &&
  1180. dragType == 'task',
  1181. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1182. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1183. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1184. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1185. isNavTask:
  1186. isClickColor > 0 &&
  1187. isClickColor == tIndex + 1 &&
  1188. stageIndex == unitIndex,
  1189. isNavOpen: t.toolOpen,
  1190. }">
  1191. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1192. <div @mousedown="
  1193. isdrag = 'task-' + stageIndex + '-' + tIndex
  1194. " @mouseup="isdrag = ''" @touchstart="
  1195. isdrag = 'task-' + stageIndex + '-' + tIndex
  1196. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1197. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1198. <div class="nt_taskTitle">
  1199. 任务{{ tIndex + 1 }}:
  1200. </div>
  1201. <div class="nt_taskName">
  1202. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1203. <span>{{
  1204. t.task ? t.task : "未命名任务"
  1205. }}</span>
  1206. </el-tooltip>
  1207. </div>
  1208. </div>
  1209. </div>
  1210. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1211. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1212. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1213. <div class="gjCss" :class="{
  1214. isGjCss:
  1215. toolIndexType ==
  1216. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1217. }">
  1218. <div>工具{{ toolIndex2 + 1 }}:</div>
  1219. <div>
  1220. {{
  1221. toolsData[tool.tool[0]] &&
  1222. toolsData[tool.tool[0]].name
  1223. }}
  1224. </div>
  1225. </div>
  1226. </div>
  1227. </div>
  1228. </div>
  1229. </div>
  1230. </div>
  1231. </div>
  1232. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1233. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1234. </div>
  1235. </div>
  1236. <div class="rb_c_box_right">
  1237. <!-- <div class="rb_c_box_btn">
  1238. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1239. </div> -->
  1240. <div class="basic_box" ref="unitBox">
  1241. <div v-if="false" style="
  1242. display: flex;
  1243. flex-direction: row;
  1244. align-items: center;
  1245. position: sticky;
  1246. top: 0;
  1247. z-index: 99;
  1248. width: 100%;
  1249. padding: 0 20px 0 20px;
  1250. box-sizing: border-box;
  1251. background: #fff;
  1252. border-radius: 8px;
  1253. ">
  1254. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1255. <div class="cru_selectBox" :style="{
  1256. maxWidth: isPasteTask
  1257. ? 'calc(100% - 335px)'
  1258. : 'calc(100% - 190px)',
  1259. }" v-if="courseState == 1">
  1260. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1261. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1262. <!-- item.dyName ? item.dyName : -->
  1263. <span v-if="
  1264. unitJson[unitJson.length - 1].easy == 4 ||
  1265. unitJson[unitJson.length - 1].easy == 6
  1266. ">{{
  1267. item.dyName
  1268. ? item.dyName
  1269. : "第" + (index + 1) + "阶段"
  1270. }}</span>
  1271. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1272. </div>
  1273. <div class="cru_line" :style="{
  1274. left: offsetLetfPx + 'px',
  1275. }"></div>
  1276. </div>
  1277. <div class="addStageImg" @click="addunit()" v-if="
  1278. !(unitJson[unitJson.length - 1].easy == 4) &&
  1279. !(unitJson[unitJson.length - 1].easy == 6) &&
  1280. courseState == 1
  1281. ">
  1282. <img src="../../../assets/icon/new/addStage.png" alt />
  1283. </div>
  1284. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1285. v-if="courseState == 2" style="margin: 15px 0">
  1286. 新建阶段
  1287. </button>
  1288. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1289. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1290. 阶段顺序
  1291. </button>
  1292. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1293. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1294. 智能粘贴
  1295. </button>
  1296. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1297. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1298. }" style="padding: 0 12px">
  1299. 选择课程模板
  1300. </button>
  1301. </div>
  1302. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1303. :key="index">
  1304. <div v-if="courseState == 4" style="position: relative;
  1305. background: #fff;
  1306. box-sizing: border-box;
  1307. padding: 1px 20px 10px;
  1308. width: 100%;
  1309. border-radius: 10px;">
  1310. <div style="
  1311. display: flex;
  1312. flex-direction: row;
  1313. justify-content: space-between;
  1314. align-items: center;
  1315. " :style="{
  1316. margin: !item.taskJson[0].isFoldchapter
  1317. ? '20px 0 10px'
  1318. : '20px 0 0',
  1319. }">
  1320. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1321. 学习内容
  1322. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1323. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1324. @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
  1325. @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
  1326. </el-tooltip>
  1327. </div>
  1328. </div>
  1329. <div>
  1330. <div class="add_chapters_box add_c_none" v-if="
  1331. item.taskJson[0].chapterData &&
  1332. item.taskJson[0].chapterData.length == 0
  1333. ">
  1334. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1335. </div>
  1336. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1337. <div @dragstart="
  1338. dragStart(item1, index1, 0)
  1339. " @dragover.prevent="
  1340. dragOver(index1, 0)
  1341. " @dragend="dragEnd()" :draggable="isdrag ==
  1342. 'chapter-' + 0 + '-' + index1
  1343. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1344. :key="item1.id" @click="
  1345. getChapterData(
  1346. $event,
  1347. unitIndex,
  1348. index,
  1349. index1,
  1350. item1.type
  1351. )
  1352. " :class="{
  1353. dragOverTop2:
  1354. newIndex === index1 &&
  1355. typeIndex ==
  1356. 'chapter-' +
  1357. 0 +
  1358. '-' +
  1359. index1 &&
  1360. oldIndex > index1 &&
  1361. dragType == 'drag',
  1362. dragOverBottom2:
  1363. newIndex === index1 &&
  1364. typeIndex ==
  1365. 'chapter-' +
  1366. 0 +
  1367. '-' +
  1368. index1 &&
  1369. oldIndex < index1 &&
  1370. dragType == 'drag',
  1371. }">
  1372. <div @mousedown="
  1373. isdrag =
  1374. 'chapter-' + 0 + '-' + index1
  1375. " @mouseup="isdrag = ''" @touchstart="
  1376. isdrag =
  1377. 'chapter-' + 0 + '-' + index1
  1378. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1379. <div class="chapter_upload_o" style="
  1380. position: relative;
  1381. display: flex;
  1382. align-items: center;
  1383. ">
  1384. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1385. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1386. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1387. </div>
  1388. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1389. </div>
  1390. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1391. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1392. </div>
  1393. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1394. </div>
  1395. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1396. </div>
  1397. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1398. </div>
  1399. </div>
  1400. <div class="chapter_upload_n">
  1401. <input readonly="true" v-if="
  1402. item1.type == 2 ||
  1403. item1.type == 3 ||
  1404. item1.type == 12 ||
  1405. item1.type == 13 ||
  1406. item1.type == 7
  1407. " :placeholder="item1.name" @click="
  1408. updataVideoT(
  1409. $event,
  1410. unitIndex,
  1411. 0,
  1412. index1
  1413. )
  1414. " style="
  1415. border: none;
  1416. outline: none;
  1417. width: 80%;
  1418. minwidth: 215px;
  1419. z-index: 99;
  1420. font-size: 14px;
  1421. white-space: nowrap;
  1422. overflow: hidden;
  1423. text-overflow: ellipsis;
  1424. " />
  1425. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1426. border: none;
  1427. outline: none;
  1428. width: 80%;
  1429. white-space: nowrap;
  1430. overflow: hidden;
  1431. text-overflow: ellipsis;
  1432. " readonly="true" @click="
  1433. selectAttText(0, index1)
  1434. " />
  1435. <input :placeholder="item1.title ? item1.title : '链接'
  1436. " v-if="item1.type == 8" style="
  1437. border: none;
  1438. outline: none;
  1439. width: 80%;
  1440. white-space: nowrap;
  1441. overflow: hidden;
  1442. text-overflow: ellipsis;
  1443. " readonly="true" @click="selectLine(0, index1)" />
  1444. <input :placeholder="item1.title ? item1.title : '链接'
  1445. " v-if="item1.type == 14" style="
  1446. border: none;
  1447. outline: none;
  1448. width: 80%;
  1449. white-space: nowrap;
  1450. overflow: hidden;
  1451. text-overflow: ellipsis;
  1452. " readonly="true" @click="
  1453. openUpdateSource(0, index1)
  1454. " />
  1455. </div>
  1456. <div class="chapter_upload_ic">
  1457. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1458. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1459. checkChpater( $event, unitIndex, 0, index1 )
  1460. ">
  1461. <div></div>
  1462. </div>
  1463. <div class="chapter_upload_ud" style="z-index: 99">
  1464. <div class="chapter_upload_up" @click="
  1465. upCd(
  1466. $event,
  1467. unitIndex,
  1468. index,
  1469. 0,
  1470. index1
  1471. )
  1472. "></div>
  1473. <div class="chapter_upload_down" @click="
  1474. downCd(
  1475. $event,
  1476. unitIndex,
  1477. index,
  1478. 0,
  1479. index1
  1480. )
  1481. "></div>
  1482. </div>
  1483. <div class="chapter_upload_ic_edit" v-if="
  1484. item1.type == 2 ||
  1485. item1.type == 3 ||
  1486. item1.type == 12 ||
  1487. item1.type == 13 ||
  1488. item1.type == 7
  1489. " @click.stop="
  1490. updataVideoT(
  1491. $event,
  1492. unitIndex,
  1493. 0,
  1494. index1
  1495. )
  1496. ">
  1497. <div></div>
  1498. </div>
  1499. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1500. selectAttText(0, index1)
  1501. ">
  1502. <div></div>
  1503. </div>
  1504. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1505. @click="selectLine(0, index1)">
  1506. <div></div>
  1507. </div>
  1508. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1509. openUpdateSource(0, index1)
  1510. ">
  1511. <div></div>
  1512. </div>
  1513. <div class="chapter_upload_ic_r" @click.stop="
  1514. deleteChapterData(
  1515. $event,
  1516. unitIndex,
  1517. index,
  1518. index1,
  1519. 0
  1520. )
  1521. ">
  1522. <div></div>
  1523. </div>
  1524. </div>
  1525. </div>
  1526. </div>
  1527. </div>
  1528. </div>
  1529. <div class="add_info_box" style="margin: 10px 0 0">
  1530. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1531. 文件
  1532. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  1533. beforeUpload2(
  1534. $event,
  1535. unitIndex,
  1536. 13,
  1537. 0
  1538. )
  1539. " />
  1540. </button>
  1541. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1542. 图文
  1543. </button>
  1544. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1545. 链接
  1546. </button>
  1547. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1548. 代码
  1549. </button>
  1550. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1551. 资源
  1552. </button>
  1553. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  1554. AI生成PPT
  1555. </button>
  1556. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  1557. AI生成教案
  1558. </button>
  1559. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  1560. 智能检索视频
  1561. </button>
  1562. </div>
  1563. <div v-if="
  1564. unitJson[unitIndex].chapterInfo[0].taskJson[
  1565. 0
  1566. ].proVisible
  1567. " class="mask">
  1568. <div class="progressBox">
  1569. <!-- <div id="closePro" class="closeCss">
  1570. <img src="../../../../assets/icon/close.png" alt />
  1571. </div> -->
  1572. <div class="lbox">
  1573. <img src="../../../assets/loading.gif" />上传中,请稍后
  1574. </div>
  1575. <div style="margin-bottom: 10px">
  1576. <span>{{
  1577. unitJson[unitIndex].chapterInfo[0].taskJson[
  1578. 0
  1579. ].isFinishSize
  1580. }}M</span>
  1581. /
  1582. <span>{{
  1583. unitJson[unitIndex].chapterInfo[0].taskJson[
  1584. 0
  1585. ].isAllSize
  1586. }}M</span>
  1587. </div>
  1588. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  1589. 0
  1590. ].progress
  1591. ? unitJson[unitIndex].chapterInfo[0]
  1592. .taskJson[0].progress
  1593. : 0
  1594. " style="width: 80%"></el-progress>
  1595. </div>
  1596. </div>
  1597. </div>
  1598. <div class="chapter_box" v-if="courseState == 1">
  1599. <div class="chapter_contentbox">
  1600. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  1601. <div class="cc_input">
  1602. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  1603. v-model="unitJson[unitIndex].dyName" />
  1604. </div>
  1605. <div class="remove" v-if="
  1606. (unitJson.length > 1 || courseState != 2) &&
  1607. !(unitJson[unitJson.length - 1].easy == 4) &&
  1608. !(unitJson[unitJson.length - 1].easy == 6)
  1609. " @click="deleteUnit(unitIndex)"></div>
  1610. </div>
  1611. </div>
  1612. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  1613. margin: 50px 0px 10px;
  1614. font-size: 1.5em;
  1615. font-weight: 700;
  1616. color: #0f7eff;
  1617. ">
  1618. 添加任务
  1619. </div> -->
  1620. <div class="taskBorder" :style="{
  1621. minHeight: unitJson[unitIndex].easy && 'unset',
  1622. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  1623. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
  1624. <div style="background: #fff; border-radius: 5px">
  1625. <div class="taskTitle">
  1626. <div style="display: flex;width: 100%;justify-content: space-between;">
  1627. <span>任务{{ itemTaskIndex + 1 }}</span>
  1628. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && courseState == 5">
  1629. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1630. @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
  1631. @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
  1632. </el-tooltip>
  1633. </div>
  1634. </div>
  1635. <!-- padding: 20px; -->
  1636. <div v-if="unitJson[unitIndex].easy != 1">
  1637. <div :style="{
  1638. marginBottom:
  1639. unitJson[unitIndex].easy == 3 ||
  1640. (unitJson[unitIndex].easy == 5 &&
  1641. itemTask.taskType == 1)
  1642. ? '75px'
  1643. : '0',
  1644. }">
  1645. <div style="
  1646. display: flex;
  1647. margin: 0px 0 20px;
  1648. flex-direction: row;
  1649. justify-content: flex-start;
  1650. align-items: center;
  1651. ">
  1652. <div class="lineTitle">任务概述</div>
  1653. </div>
  1654. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  1655. flex-direction: row;
  1656. justify-content: flex-start;
  1657. align-items: center;
  1658. margin: 0;
  1659. ">
  1660. <!-- <div class="cc_title">
  1661. 任务{{ itemTaskIndex + 1 }}
  1662. </div> -->
  1663. <div class="cc_input">
  1664. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1665. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1666. itemTaskIndex
  1667. ].task
  1668. " />
  1669. </div>
  1670. <div class="remove" v-if="
  1671. item.taskJson.length > 1 &&
  1672. (!unitJson[unitIndex].easy ||
  1673. unitJson[unitIndex].easy == 6)
  1674. " @click="deleteTask(itemTaskIndex)"></div>
  1675. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  1676. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  1677. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  1678. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  1679. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  1680. </div> -->
  1681. </div>
  1682. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  1683. display: flex;
  1684. margin: 20px 0;
  1685. flex-direction: row;
  1686. justify-content: flex-start;
  1687. align-items: center;
  1688. ">
  1689. <div class="lineTitle">任务描述</div>
  1690. </div> && !itemTask.isFold2-->
  1691. <div v-if="
  1692. easyArray.indexOf(unitJson[unitIndex].easy) ==
  1693. -1
  1694. " style="margin-top: 20px" class="op_task_box"
  1695. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1696. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1697. itemTaskIndex
  1698. ].taskDetail
  1699. " @change="change"></editor-bar> -->
  1700. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1701. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1702. itemTaskIndex
  1703. ].taskDetail
  1704. "></textarea>
  1705. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  1706. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1707. itemTaskIndex
  1708. ].taskDetail
  1709. "></textarea> -->
  1710. <div class="op_box">
  1711. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1712. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1713. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1714. itemTaskIndex
  1715. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1716. itemTaskIndex
  1717. ], itemTaskIndex)">智能优化</div>
  1718. </el-tooltip>
  1719. </div>
  1720. </div>
  1721. </div>
  1722. </div>
  1723. <div
  1724. style="position: relative"
  1725. v-if="courseState == 5"
  1726. >
  1727. <div
  1728. style="
  1729. display: flex;
  1730. flex-direction: row;
  1731. justify-content: space-between;
  1732. align-items: center;
  1733. "
  1734. :style="{
  1735. margin: !itemTask.isFoldchapter
  1736. ? '20px 0 10px'
  1737. : '20px 0 0',
  1738. }"
  1739. >
  1740. <div
  1741. style="margin-bottom: 10px"
  1742. class="lineTitle clineTitle"
  1743. >
  1744. 学习内容
  1745. </div>
  1746. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  1747. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  1748. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  1749. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  1750. <!-- <div class="line"></div> -->
  1751. </div>
  1752. <!-- v-if="!itemTask.isFoldchapter" -->
  1753. <div>
  1754. <div
  1755. class="add_chapters_box add_c_none"
  1756. v-if="
  1757. itemTask.chapterData &&
  1758. itemTask.chapterData.length == 0
  1759. "
  1760. >
  1761. <img
  1762. src="../../../assets/icon/new/c_none.png"
  1763. alt
  1764. /><span>请添加学习内容</span>
  1765. </div>
  1766. <div
  1767. v-else
  1768. class="add_chapters_box"
  1769. style="display: flex; flex-direction: column"
  1770. >
  1771. <div
  1772. @dragstart="
  1773. dragStart(item1, index1, itemTaskIndex)
  1774. "
  1775. @dragover.prevent="
  1776. dragOver(index1, itemTaskIndex)
  1777. "
  1778. @dragend="dragEnd()"
  1779. :draggable="
  1780. isdrag ==
  1781. 'chapter-' + itemTaskIndex + '-' + index1
  1782. "
  1783. class="chapter_upload"
  1784. v-for="(item1, index1) in itemTask.chapterData"
  1785. :key="item1.id"
  1786. @click="
  1787. getChapterData(
  1788. $event,
  1789. unitIndex,
  1790. index,
  1791. index1,
  1792. item1.type
  1793. )
  1794. "
  1795. :class="{
  1796. dragOverTop2:
  1797. newIndex === index1 &&
  1798. typeIndex ==
  1799. 'chapter-' +
  1800. itemTaskIndex +
  1801. '-' +
  1802. index1 &&
  1803. oldIndex > index1 &&
  1804. dragType == 'drag',
  1805. dragOverBottom2:
  1806. newIndex === index1 &&
  1807. typeIndex ==
  1808. 'chapter-' +
  1809. itemTaskIndex +
  1810. '-' +
  1811. index1 &&
  1812. oldIndex < index1 &&
  1813. dragType == 'drag',
  1814. }"
  1815. >
  1816. <div
  1817. @mousedown="
  1818. isdrag =
  1819. 'chapter-' + itemTaskIndex + '-' + index1
  1820. "
  1821. @mouseup="isdrag = ''"
  1822. @touchstart="
  1823. isdrag =
  1824. 'chapter-' + itemTaskIndex + '-' + index1
  1825. "
  1826. @touchend="isdrag = ''"
  1827. class="chapter_upload_drag"
  1828. ></div>
  1829. <div
  1830. class="chapter_upload_o"
  1831. style="
  1832. position: relative;
  1833. display: flex;
  1834. align-items: center;
  1835. "
  1836. >
  1837. <div
  1838. class="chapter_upload_l"
  1839. style="padding: 1px 0 0 10px"
  1840. >
  1841. <div
  1842. v-if="item1.type == 2"
  1843. class="chapter_upload_l_i2"
  1844. ></div>
  1845. <div
  1846. v-if="item1.type == 3"
  1847. class="chapter_upload_l_i3"
  1848. style="margin-left: 1px"
  1849. ></div>
  1850. <div
  1851. v-if="item1.type == 6"
  1852. class="chapter_upload_l_i6"
  1853. style="margin-left: 1px"
  1854. ></div>
  1855. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1856. <div
  1857. v-if="item1.type == 8"
  1858. class="chapter_upload_l_i8"
  1859. style="margin-left: 1px"
  1860. ></div>
  1861. <div
  1862. v-if="item1.type == 14"
  1863. class="chapter_upload_l_i14"
  1864. style="margin-left: 1px"
  1865. ></div>
  1866. <div
  1867. v-if="item1.type == 12"
  1868. class="chapter_upload_l_i12"
  1869. style="margin-left: 1px"
  1870. ></div>
  1871. <div
  1872. v-if="item1.type == 13"
  1873. class="chapter_upload_l_i13"
  1874. style="margin-left: 1px"
  1875. ></div>
  1876. </div>
  1877. <div class="chapter_upload_n">
  1878. <input
  1879. readonly="true"
  1880. v-if="
  1881. item1.type == 2 ||
  1882. item1.type == 3 ||
  1883. item1.type == 12 ||
  1884. item1.type == 13 ||
  1885. item1.type == 7
  1886. "
  1887. :placeholder="item1.name"
  1888. @click="
  1889. updataVideoT(
  1890. $event,
  1891. unitIndex,
  1892. itemTaskIndex,
  1893. index1
  1894. )
  1895. "
  1896. style="
  1897. border: none;
  1898. outline: none;
  1899. width: 80%;
  1900. minwidth: 215px;
  1901. z-index: 99;
  1902. font-size: 14px;
  1903. white-space: nowrap;
  1904. overflow: hidden;
  1905. text-overflow: ellipsis;
  1906. "
  1907. />
  1908. <input
  1909. :placeholder="item1.name"
  1910. v-if="item1.type == 6"
  1911. style="
  1912. border: none;
  1913. outline: none;
  1914. width: 80%;
  1915. white-space: nowrap;
  1916. overflow: hidden;
  1917. text-overflow: ellipsis;
  1918. "
  1919. readonly="true"
  1920. @click="
  1921. selectAttText(itemTaskIndex, index1)
  1922. "
  1923. />
  1924. <input
  1925. :placeholder="
  1926. item1.title ? item1.title : '链接'
  1927. "
  1928. v-if="item1.type == 8"
  1929. style="
  1930. border: none;
  1931. outline: none;
  1932. width: 80%;
  1933. white-space: nowrap;
  1934. overflow: hidden;
  1935. text-overflow: ellipsis;
  1936. "
  1937. readonly="true"
  1938. @click="selectLine(itemTaskIndex, index1)"
  1939. />
  1940. <input
  1941. :placeholder="
  1942. item1.title ? item1.title : '链接'
  1943. "
  1944. v-if="item1.type == 14"
  1945. style="
  1946. border: none;
  1947. outline: none;
  1948. width: 80%;
  1949. white-space: nowrap;
  1950. overflow: hidden;
  1951. text-overflow: ellipsis;
  1952. "
  1953. readonly="true"
  1954. @click="
  1955. openUpdateSource(itemTaskIndex, index1)
  1956. "
  1957. />
  1958. </div>
  1959. <div class="chapter_upload_ic">
  1960. <div
  1961. class="chapter_upload_noSee"
  1962. v-if="item1.type == 12"
  1963. ></div>
  1964. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1965. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  1966. ">
  1967. <div></div>
  1968. </div>
  1969. <div
  1970. class="chapter_upload_ud"
  1971. style="z-index: 99"
  1972. >
  1973. <div
  1974. class="chapter_upload_up"
  1975. @click="
  1976. upCd(
  1977. $event,
  1978. unitIndex,
  1979. index,
  1980. itemTaskIndex,
  1981. index1
  1982. )
  1983. "
  1984. ></div>
  1985. <div
  1986. class="chapter_upload_down"
  1987. @click="
  1988. downCd(
  1989. $event,
  1990. unitIndex,
  1991. index,
  1992. itemTaskIndex,
  1993. index1
  1994. )
  1995. "
  1996. ></div>
  1997. </div>
  1998. <div
  1999. class="chapter_upload_ic_edit"
  2000. v-if="
  2001. item1.type == 2 ||
  2002. item1.type == 3 ||
  2003. item1.type == 12 ||
  2004. item1.type == 13 ||
  2005. item1.type == 7
  2006. "
  2007. @click.stop="
  2008. updataVideoT(
  2009. $event,
  2010. unitIndex,
  2011. itemTaskIndex,
  2012. index1
  2013. )
  2014. "
  2015. >
  2016. <div></div>
  2017. </div>
  2018. <div
  2019. class="chapter_upload_ic_edit"
  2020. v-if="item1.type == 6"
  2021. @click="
  2022. selectAttText(itemTaskIndex, index1)
  2023. "
  2024. >
  2025. <div></div>
  2026. </div>
  2027. <div
  2028. class="chapter_upload_ic_edit"
  2029. v-if="item1.type == 8"
  2030. @click="selectLine(itemTaskIndex, index1)"
  2031. >
  2032. <div></div>
  2033. </div>
  2034. <div
  2035. class="chapter_upload_ic_edit"
  2036. v-if="item1.type == 14"
  2037. @click="
  2038. openUpdateSource(itemTaskIndex, index1)
  2039. "
  2040. >
  2041. <div></div>
  2042. </div>
  2043. <div
  2044. class="chapter_upload_ic_r"
  2045. @click.stop="
  2046. deleteChapterData(
  2047. $event,
  2048. unitIndex,
  2049. index,
  2050. index1,
  2051. itemTaskIndex
  2052. )
  2053. "
  2054. >
  2055. <div></div>
  2056. </div>
  2057. </div>
  2058. </div>
  2059. </div>
  2060. </div>
  2061. </div>
  2062. <!-- v-if="!itemTask.isFoldchapter" -->
  2063. <div class="add_info_box" style="margin: 10px 0 0">
  2064. <button
  2065. class="c_pub_button_add pub_btn_add_img"
  2066. @click="addImg($event)"
  2067. >
  2068. 文件
  2069. <input
  2070. type="file"
  2071. accept="*"
  2072. style="display: none"
  2073. v-if="inputShow"
  2074. @change="
  2075. beforeUpload2(
  2076. $event,
  2077. unitIndex,
  2078. 13,
  2079. itemTaskIndex
  2080. )
  2081. "
  2082. />
  2083. </button>
  2084. <button
  2085. class="c_pub_button_add pub_btn_add_img"
  2086. @click="addAttText(itemTaskIndex)"
  2087. >
  2088. 图文
  2089. </button>
  2090. <button
  2091. class="c_pub_button_add pub_btn_add_img"
  2092. @click="openLine(itemTaskIndex)"
  2093. >
  2094. 链接
  2095. </button>
  2096. <button
  2097. class="c_pub_button_add pub_btn_add_img"
  2098. @click="pasteLine(itemTaskIndex)"
  2099. >
  2100. 代码
  2101. </button>
  2102. <button
  2103. class="c_pub_button_add pub_btn_add_img"
  2104. @click="openSource(itemTaskIndex)"
  2105. >
  2106. 资源
  2107. </button>
  2108. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2109. AI生成PPT
  2110. </button>
  2111. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2112. AI生成教案
  2113. </button>
  2114. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2115. 智能检索视频
  2116. </button>
  2117. </div>
  2118. <div
  2119. v-if="
  2120. unitJson[unitIndex].chapterInfo[0].taskJson[
  2121. itemTaskIndex
  2122. ].proVisible
  2123. "
  2124. class="mask"
  2125. >
  2126. <div class="progressBox">
  2127. <!-- <div id="closePro" class="closeCss">
  2128. <img src="../../../../assets/icon/close.png" alt />
  2129. </div> -->
  2130. <div class="lbox">
  2131. <img
  2132. src="../../../assets/loading.gif"
  2133. />上传中,请稍后
  2134. </div>
  2135. <div style="margin-bottom: 10px">
  2136. <span
  2137. >{{
  2138. unitJson[unitIndex].chapterInfo[0].taskJson[
  2139. itemTaskIndex
  2140. ].isFinishSize
  2141. }}M</span
  2142. >
  2143. /
  2144. <span
  2145. >{{
  2146. unitJson[unitIndex].chapterInfo[0].taskJson[
  2147. itemTaskIndex
  2148. ].isAllSize
  2149. }}M</span
  2150. >
  2151. </div>
  2152. <el-progress
  2153. :text-inside="true"
  2154. :stroke-width="20"
  2155. :percentage="
  2156. unitJson[unitIndex].chapterInfo[0].taskJson[
  2157. itemTaskIndex
  2158. ].progress
  2159. ? unitJson[unitIndex].chapterInfo[0]
  2160. .taskJson[itemTaskIndex].progress
  2161. : 0
  2162. "
  2163. style="width: 80%"
  2164. ></el-progress>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. <div v-if="
  2169. unitJson[unitIndex].easy == 1 ||
  2170. (unitJson[unitIndex].easy == 5 &&
  2171. itemTask.taskType == 2)
  2172. ">
  2173. <div>
  2174. <div class="add_chapters_box add_c_none" v-if="
  2175. itemTask.chapterData &&
  2176. itemTask.chapterData.length == 0
  2177. ">
  2178. <img src="../../../assets/icon/new/c_none.png" alt />
  2179. </div>
  2180. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2181. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2182. dragOver(index1, itemTaskIndex)
  2183. " @dragend="dragEnd()" :draggable="isdrag ==
  2184. 'chapter-' + itemTaskIndex + '-' + index1
  2185. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2186. :key="item1.id" @click="
  2187. getChapterData(
  2188. $event,
  2189. unitIndex,
  2190. index,
  2191. index1,
  2192. item1.type
  2193. )
  2194. " :class="{
  2195. dragOverTop2:
  2196. newIndex === index1 &&
  2197. typeIndex ==
  2198. 'chapter-' +
  2199. itemTaskIndex +
  2200. '-' +
  2201. index1 &&
  2202. oldIndex > index1,
  2203. dragOverBottom2:
  2204. newIndex === index1 &&
  2205. typeIndex ==
  2206. 'chapter-' +
  2207. itemTaskIndex +
  2208. '-' +
  2209. index1 &&
  2210. oldIndex < index1,
  2211. }">
  2212. <div @mousedown="
  2213. isdrag =
  2214. 'chapter-' + itemTaskIndex + '-' + index1
  2215. " @mouseup="isdrag = ''" @touchstart="
  2216. isdrag =
  2217. 'chapter-' + itemTaskIndex + '-' + index1
  2218. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2219. <div class="chapter_upload_t" style="width: 100%"></div>
  2220. <div class="chapter_upload_o" style="
  2221. position: relative;
  2222. display: flex;
  2223. align-items: center;
  2224. ">
  2225. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2226. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2227. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2228. </div>
  2229. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2230. </div>
  2231. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2232. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2233. </div>
  2234. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2235. </div>
  2236. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2237. </div>
  2238. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2239. </div>
  2240. </div>
  2241. <div class="chapter_upload_n">
  2242. <span style="
  2243. font-size: 14px;
  2244. color: rgb(109, 109, 109);
  2245. height: 14px;
  2246. line-height: 14px;
  2247. " v-if="
  2248. item1.type == 2 ||
  2249. item1.type == 3 ||
  2250. item1.type == 7
  2251. ">{{ item1.text }}-</span>
  2252. <input readonly="true" v-if="
  2253. item1.type == 2 ||
  2254. item1.type == 3 ||
  2255. item1.type == 7
  2256. " :placeholder="item1.name" @click="
  2257. updataVideoT(
  2258. $event,
  2259. unitIndex,
  2260. itemTaskIndex,
  2261. index1
  2262. )
  2263. " style="
  2264. border: none;
  2265. outline: none;
  2266. width: 80%;
  2267. minwidth: 215px;
  2268. z-index: 99;
  2269. font-size: 14px;
  2270. white-space: nowrap;
  2271. overflow: hidden;
  2272. text-overflow: ellipsis;
  2273. " />
  2274. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2275. border: none;
  2276. outline: none;
  2277. width: 80%;
  2278. white-space: nowrap;
  2279. overflow: hidden;
  2280. text-overflow: ellipsis;
  2281. " readonly="true" @click="
  2282. selectAttText(itemTaskIndex, index1)
  2283. " />
  2284. <input :placeholder="item1.title ? item1.title : '链接'
  2285. " v-if="item1.type == 8 || item1.type == 14" style="
  2286. border: none;
  2287. outline: none;
  2288. width: 80%;
  2289. white-space: nowrap;
  2290. overflow: hidden;
  2291. text-overflow: ellipsis;
  2292. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  2293. </div>
  2294. <div class="chapter_upload_ic">
  2295. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2296. <div class="chapter_upload_ud" style="z-index: 99">
  2297. <div class="chapter_upload_up" @click="
  2298. upCd(
  2299. $event,
  2300. unitIndex,
  2301. index,
  2302. itemTaskIndex,
  2303. index1
  2304. )
  2305. "></div>
  2306. <div class="chapter_upload_down" @click="
  2307. downCd(
  2308. $event,
  2309. unitIndex,
  2310. index,
  2311. itemTaskIndex,
  2312. index1
  2313. )
  2314. "></div>
  2315. </div>
  2316. <div class="chapter_upload_ic_edit" v-if="
  2317. item1.type == 2 ||
  2318. item1.type == 3 ||
  2319. item1.type == 12 ||
  2320. item1.type == 13 ||
  2321. item1.type == 7
  2322. " @click.stop="
  2323. updataVideoT(
  2324. $event,
  2325. unitIndex,
  2326. itemTaskIndex,
  2327. index1
  2328. )
  2329. ">
  2330. <div></div>
  2331. </div>
  2332. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2333. selectAttText(itemTaskIndex, index1)
  2334. ">
  2335. <div></div>
  2336. </div>
  2337. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2338. @click="selectLine(itemTaskIndex, index1)">
  2339. <div></div>
  2340. </div>
  2341. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2342. openUpdateSource(itemTaskIndex, index1)
  2343. ">
  2344. <div></div>
  2345. </div>
  2346. <div class="chapter_upload_ic_r" @click.stop="
  2347. deleteChapterData(
  2348. $event,
  2349. unitIndex,
  2350. index,
  2351. index1,
  2352. itemTaskIndex
  2353. )
  2354. ">
  2355. <div></div>
  2356. </div>
  2357. </div>
  2358. </div>
  2359. </div>
  2360. </div>
  2361. </div>
  2362. <div class="add_info_box" style="margin: 10px 0 0">
  2363. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2364. <span style="color: red">*</span>
  2365. 教学设计
  2366. <input type="file"
  2367. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2368. style="display: none" v-if="inputShow" @change="
  2369. beforeUpload3(
  2370. $event,
  2371. unitIndex,
  2372. 3,
  2373. itemTaskIndex,
  2374. '教学设计'
  2375. )
  2376. " />
  2377. </button>
  2378. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2379. <span style="color: red">*</span>
  2380. 教学课件
  2381. <input type="file"
  2382. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2383. style="display: none" v-if="inputShow" @change="
  2384. beforeUpload3(
  2385. $event,
  2386. unitIndex,
  2387. 3,
  2388. itemTaskIndex,
  2389. '教学课件'
  2390. )
  2391. " />
  2392. </button>
  2393. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2394. 教学视频
  2395. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  2396. style="display: none" v-if="inputShow" @change="
  2397. beforeUpload3(
  2398. $event,
  2399. unitIndex,
  2400. 2,
  2401. itemTaskIndex,
  2402. '教学视频'
  2403. )
  2404. " />
  2405. </button>
  2406. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2407. 教学音频
  2408. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  2409. beforeUpload3(
  2410. $event,
  2411. unitIndex,
  2412. 2,
  2413. itemTaskIndex,
  2414. '教学音频'
  2415. )
  2416. " />
  2417. </button>
  2418. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2419. 学习单
  2420. <input type="file"
  2421. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2422. style="display: none" v-if="inputShow" @change="
  2423. beforeUpload3(
  2424. $event,
  2425. unitIndex,
  2426. 3,
  2427. itemTaskIndex,
  2428. '学习单'
  2429. )
  2430. " />
  2431. </button>
  2432. </div>
  2433. <div v-if="
  2434. unitJson[unitIndex].chapterInfo[0].taskJson[
  2435. itemTaskIndex
  2436. ].proVisible
  2437. " class="mask">
  2438. <div class="progressBox">
  2439. <!-- <div id="closePro" class="closeCss">
  2440. <img src="../../../../assets/icon/close.png" alt />
  2441. </div> -->
  2442. <div class="lbox">
  2443. <img src="../../../assets/loading.gif" />上传中,请稍后
  2444. </div>
  2445. <div style="margin-bottom: 10px">
  2446. <span>{{
  2447. unitJson[unitIndex].chapterInfo[0].taskJson[
  2448. itemTaskIndex
  2449. ].isFinishSize
  2450. }}M</span>
  2451. /
  2452. <span>{{
  2453. unitJson[unitIndex].chapterInfo[0].taskJson[
  2454. itemTaskIndex
  2455. ].isAllSize
  2456. }}M</span>
  2457. </div>
  2458. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2459. itemTaskIndex
  2460. ].progress
  2461. ? unitJson[unitIndex].chapterInfo[0]
  2462. .taskJson[itemTaskIndex].progress
  2463. : 0
  2464. " style="width: 80%"></el-progress>
  2465. </div>
  2466. </div>
  2467. </div>
  2468. </div>
  2469. <!-- padding: 20px; -->
  2470. <div style="
  2471. background: #fff;
  2472. border-radius: 5px;
  2473. margin-top: 15px;
  2474. ">
  2475. <div v-if="
  2476. unitJson[unitIndex].easy != 3 &&
  2477. !(
  2478. unitJson[unitIndex].easy == 5 &&
  2479. itemTask.taskType == 1
  2480. )
  2481. " style="
  2482. flex-direction: row;
  2483. justify-content: flex-start;
  2484. align-items: center;
  2485. ">
  2486. <div style="
  2487. display: flex;
  2488. flex-direction: row;
  2489. align-items: center;
  2490. margin: 5px 0 20px;
  2491. ">
  2492. <div class="lineTitle clineTitle">
  2493. {{
  2494. !unitJson[unitIndex].easy ||
  2495. unitJson[unitIndex].easy == 6 ||
  2496. easyArray.indexOf(unitJson[unitIndex].easy) !=
  2497. -1
  2498. ? "练习内容"
  2499. : "评价内容"
  2500. }}
  2501. </div>
  2502. <!-- <div class="line" style="width: 90%"></div> -->
  2503. </div>
  2504. </div>
  2505. <div v-if="
  2506. unitJson[unitIndex].easy == 6 ||
  2507. !unitJson[unitIndex].easy
  2508. " class="toolChoose">
  2509. <div class="tools">
  2510. <div class="leftTools" style="width: 100%" v-for="(
  2511. itemTool, toolIndex
  2512. ) in itemTask.toolChoose" :key="toolIndex">
  2513. <div style="
  2514. display: flex;
  2515. flex-direction: row;
  2516. align-items: baseline;
  2517. flex-wrap: nowrap;
  2518. justify-content: flex-start;
  2519. position: relative;
  2520. ">
  2521. <div style="margin-right: 20px; font-weight: bold"
  2522. :id="'gj' + itemTaskIndex + '' + toolIndex">
  2523. 工具 {{ toolIndex + 1 }} :
  2524. </div>
  2525. <div class="chooseWho">
  2526. <div :class="itemTool.toolType == 0
  2527. ? 'isChooseActive'
  2528. : ''
  2529. " @click="
  2530. (itemTool.toolType = 0),
  2531. (itemTool.isFold3 = false),
  2532. $forceUpdate()
  2533. ">
  2534. 互动类
  2535. </div>
  2536. <div :class="itemTool.toolType == 1
  2537. ? 'isChooseActive'
  2538. : ''
  2539. " @click="
  2540. (itemTool.toolType = 1),
  2541. (itemTool.isFold3 = false),
  2542. $forceUpdate()
  2543. ">
  2544. 思维类
  2545. </div>
  2546. <div :class="itemTool.toolType == 6
  2547. ? 'isChooseActive'
  2548. : ''
  2549. " @click="
  2550. (itemTool.toolType = 6),
  2551. (itemTool.isFold3 = false),
  2552. $forceUpdate()
  2553. ">
  2554. 协作类
  2555. </div>
  2556. <div :class="itemTool.toolType == 2
  2557. ? 'isChooseActive'
  2558. : ''
  2559. " @click="
  2560. (itemTool.toolType = 2),
  2561. (itemTool.isFold3 = false),
  2562. $forceUpdate()
  2563. ">
  2564. 测评类
  2565. </div>
  2566. <div :class="itemTool.toolType == 7
  2567. ? 'isChooseActive'
  2568. : ''
  2569. " @click="
  2570. (itemTool.toolType = 7),
  2571. (itemTool.isFold3 = false),
  2572. $forceUpdate()
  2573. ">
  2574. 评价类
  2575. </div>
  2576. <div :class="itemTool.toolType == 3
  2577. ? 'isChooseActive'
  2578. : ''
  2579. " @click="
  2580. (itemTool.toolType = 3),
  2581. (itemTool.isFold3 = false),
  2582. $forceUpdate()
  2583. ">
  2584. 编程类
  2585. </div>
  2586. <div :class="itemTool.toolType == 5
  2587. ? 'isChooseActive'
  2588. : ''
  2589. " @click="
  2590. (itemTool.toolType = 5),
  2591. (itemTool.isFold3 = false),
  2592. $forceUpdate()
  2593. ">
  2594. 学科类
  2595. </div>
  2596. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  2597. " @click="(itemTool.toolType = 4), $forceUpdate()">
  2598. 其他
  2599. </div> -->
  2600. </div>
  2601. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  2602. margin:
  2603. itemTask.toolChoose.length > 1
  2604. ? '0px 35px 0px auto'
  2605. : '0 0 0 auto',
  2606. }" v-if="itemTask.toolChoose.length > 1">
  2607. <div class="chapter_upload_up2" @click.stop="
  2608. upTool(
  2609. $event,
  2610. unitIndex,
  2611. itemTaskIndex,
  2612. toolIndex
  2613. )
  2614. ">
  2615. 上移
  2616. </div>
  2617. <div class="chapter_upload_down2" @click.stop="
  2618. downTool(
  2619. $event,
  2620. unitIndex,
  2621. itemTaskIndex,
  2622. toolIndex
  2623. )
  2624. ">
  2625. 下移
  2626. </div>
  2627. </div>
  2628. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  2629. @click="fold3(itemTaskIndex, toolIndex)"
  2630. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2631. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  2632. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  2633. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2634. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  2635. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  2636. v-if="itemTask.toolChoose.length > 1" style="
  2637. position: absolute;
  2638. right: 0;
  2639. top: -5px;
  2640. "></div>
  2641. </div>
  2642. <!-- v-show="!itemTool.isFold3" -->
  2643. <div style="min-height: 163px">
  2644. <div class="toolSort" v-if="itemTool.toolType == 0">
  2645. <!-- <div class="tool">
  2646. <div
  2647. class="whiteBIcon"
  2648. @click="addTools(8, itemTaskIndex, toolIndex)"
  2649. >
  2650. <img src="../../../assets/icon/secondToolList/library.png" alt />
  2651. <div style="margin: 5px 0">素材库</div>
  2652. </div>
  2653. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  2654. <img
  2655. src="../../../assets/icon/checkNo.png"
  2656. alt
  2657. v-if="itemTool.tool.indexOf(8) == -1"
  2658. />
  2659. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  2660. alt /><span>已选择</span></div>
  2661. </div>
  2662. </div>-->
  2663. <!-- <div class="tool">
  2664. <div
  2665. class="whiteBIcon"
  2666. @click="addTools(17, itemTaskIndex, toolIndex)"
  2667. >
  2668. <img
  2669. src="../../../assets/icon/secondToolList/library.png"
  2670. alt
  2671. />
  2672. <div style="margin: 5px 0">学习资料</div>
  2673. </div>
  2674. <div
  2675. class="check"
  2676. @click="addTools(17, itemTaskIndex, toolIndex)"
  2677. >
  2678. <img
  2679. src="../../../assets/icon/checkNo.png"
  2680. alt
  2681. v-if="itemTool.tool.indexOf(17) == -1"
  2682. />
  2683. <img
  2684. src="../../../assets/icon/checkedIs.png"
  2685. alt
  2686. v-else
  2687. />
  2688. </div>10
  2689. </div> -->
  2690. <div class="tool" :class="{
  2691. isToolChoose:
  2692. itemTool.tool.indexOf(10) != -1,
  2693. }" @click="
  2694. addTools(10, itemTaskIndex, toolIndex)
  2695. ">
  2696. <div class="whiteBIcon" @click.stop="
  2697. openTools(itemTaskIndex, 10, toolIndex)
  2698. ">
  2699. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  2700. <div style="margin: 5px 0">倒计时</div>
  2701. </div>
  2702. <div class="noCTool">
  2703. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2704. </div>
  2705. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  2706. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2707. </div>
  2708. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  2709. <img src="../../../assets/icon/checkNo.png" alt
  2710. v-if="itemTool.tool.indexOf(10) == -1" />
  2711. <div class="checkDiv" v-else>
  2712. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2713. </div>
  2714. </div> -->
  2715. </div>
  2716. <div class="tool" :class="{
  2717. isToolChoose:
  2718. itemTool.tool.indexOf(65) != -1,
  2719. }" @click="
  2720. addTools(65, itemTaskIndex, toolIndex)
  2721. ">
  2722. <div class="whiteBIcon" @click.stop="
  2723. addTools(65, itemTaskIndex, toolIndex)
  2724. ">
  2725. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  2726. <div style="margin: 5px 0">挑人</div>
  2727. </div>
  2728. <div class="noCTool">
  2729. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2730. </div>
  2731. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  2732. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2733. </div>
  2734. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  2735. <img src="../../../assets/icon/checkNo.png" alt
  2736. v-if="itemTool.tool.indexOf(65) == -1" />
  2737. <div class="checkDiv" v-else>
  2738. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2739. </div>
  2740. </div> -->
  2741. </div>
  2742. <!-- <div class="tool">
  2743. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  2744. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2745. <div style="margin: 5px 0">学生分组</div>
  2746. </div>
  2747. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2748. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  2749. <div class="checkDiv" v-else>
  2750. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2751. </div>
  2752. </div>
  2753. </div> -->
  2754. <!-- <div class="tool">
  2755. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  2756. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  2757. <div style="margin: 5px 0">交互视频</div>
  2758. </div>
  2759. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  2760. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  2761. <div class="checkDiv" v-else>
  2762. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2763. </div>
  2764. </div>
  2765. </div> -->
  2766. </div>
  2767. <div class="toolSort" v-if="itemTool.toolType == 1">
  2768. <div class="tool" :class="{
  2769. isToolChoose:
  2770. itemTool.tool.indexOf(7) != -1,
  2771. }" @click="
  2772. addTools(7, itemTaskIndex, toolIndex)
  2773. ">
  2774. <div class="whiteBIcon" @click.stop="
  2775. addTools(7, itemTaskIndex, toolIndex)
  2776. ">
  2777. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  2778. <div style="margin: 5px 0">思维网格</div>
  2779. </div>
  2780. <div class="noCTool">
  2781. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2782. </div>
  2783. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  2784. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2785. </div>
  2786. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  2787. <img src="../../../assets/icon/checkNo.png" alt
  2788. v-if="itemTool.tool.indexOf(7) == -1" />
  2789. <div class="checkDiv" v-else>
  2790. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2791. </div>
  2792. </div> -->
  2793. </div>
  2794. <div class="tool" :class="{
  2795. isToolChoose:
  2796. itemTool.tool.indexOf(1) != -1,
  2797. }" @click="
  2798. addTools(1, itemTaskIndex, toolIndex)
  2799. ">
  2800. <div class="whiteBIcon" @click.stop="
  2801. openTools(itemTaskIndex, 1, toolIndex)
  2802. ">
  2803. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  2804. <div style="margin: 5px 0">电子白板</div>
  2805. </div>
  2806. <div class="noCTool">
  2807. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2808. </div>
  2809. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  2810. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2811. </div>
  2812. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  2813. <img src="../../../assets/icon/checkNo.png" alt
  2814. v-if="itemTool.tool.indexOf(1) == -1" />
  2815. <div class="checkDiv" v-else>
  2816. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2817. </div>
  2818. </div> -->
  2819. </div>
  2820. <!-- <div class="tool">
  2821. <div
  2822. class="whiteBIcon"
  2823. @click="addTools(2, itemTaskIndex, toolIndex)"
  2824. >
  2825. <img
  2826. src="../../../assets/icon/secondToolList/note.png"
  2827. alt
  2828. />
  2829. <div style="margin: 5px 0">便签</div>
  2830. </div>
  2831. <div
  2832. class="check"
  2833. @click="addTools(2, itemTaskIndex, toolIndex)"
  2834. >
  2835. <img
  2836. src="../../../assets/icon/checkNo.png"
  2837. alt
  2838. v-if="itemTool.tool.indexOf(2) == -1"
  2839. />
  2840. <div class="checkDiv" v-else>
  2841. <img
  2842. src="../../../assets/icon/checkedIs.png"
  2843. alt
  2844. /><span>已选择</span>
  2845. </div>
  2846. </div>
  2847. </div> -->
  2848. <!-- <div class="tool">
  2849. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  2850. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  2851. <div style="margin: 5px 0">协同文档</div>
  2852. </div>
  2853. <div
  2854. class="check"
  2855. @click="addTools(6, itemTaskIndex, toolIndex)"
  2856. >
  2857. <img
  2858. src="../../../assets/icon/checkNo.png"
  2859. alt
  2860. v-if="itemTool.tool.indexOf(6) == -1"
  2861. />
  2862. <div class="checkDiv" v-else>
  2863. <img
  2864. src="../../../assets/icon/checkedIs.png"
  2865. alt
  2866. /><span>已选择</span>
  2867. </div>
  2868. </div>
  2869. </div> -->
  2870. <div class="tool" :class="{
  2871. isToolChoose:
  2872. itemTool.tool.indexOf(52) != -1,
  2873. }" @click="
  2874. addTools(52, itemTaskIndex, toolIndex)
  2875. ">
  2876. <div class="whiteBIcon" @click.stop="
  2877. openTools(itemTaskIndex, 52, toolIndex)
  2878. ">
  2879. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  2880. <div style="margin: 5px 0">文档</div>
  2881. </div>
  2882. <div class="noCTool">
  2883. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2884. </div>
  2885. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  2886. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2887. </div>
  2888. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  2889. <img src="../../../assets/icon/checkNo.png" alt
  2890. v-if="itemTool.tool.indexOf(52) == -1" />
  2891. <div class="checkDiv" v-else>
  2892. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2893. </div>
  2894. </div> -->
  2895. </div>
  2896. <div class="tool" :class="{
  2897. isToolChoose:
  2898. itemTool.tool.indexOf(3) != -1,
  2899. }" @click="
  2900. addTools(3, itemTaskIndex, toolIndex)
  2901. ">
  2902. <div class="whiteBIcon" @click.stop="
  2903. openTools(itemTaskIndex, 3, toolIndex)
  2904. ">
  2905. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  2906. <div style="margin: 5px 0">思维导图</div>
  2907. </div>
  2908. <div class="noCTool">
  2909. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2910. </div>
  2911. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  2912. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2913. </div>
  2914. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  2915. <img src="../../../assets/icon/checkNo.png" alt
  2916. v-if="itemTool.tool.indexOf(3) == -1" />
  2917. <div class="checkDiv" v-else>
  2918. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2919. </div>
  2920. </div> -->
  2921. </div>
  2922. <div class="tool" :class="{
  2923. isToolChoose:
  2924. itemTool.tool.indexOf(48) != -1,
  2925. }" @click="
  2926. addTools(48, itemTaskIndex, toolIndex)
  2927. ">
  2928. <div class="whiteBIcon" @click.stop="
  2929. openTools(itemTaskIndex, 48, toolIndex)
  2930. ">
  2931. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  2932. <div style="margin: 5px 0">表格</div>
  2933. </div>
  2934. <div class="noCTool">
  2935. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2936. </div>
  2937. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  2938. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2939. </div>
  2940. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  2941. <img src="../../../assets/icon/checkNo.png" alt
  2942. v-if="itemTool.tool.indexOf(48) == -1" />
  2943. <div class="checkDiv" v-else>
  2944. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2945. </div>
  2946. </div> -->
  2947. </div>
  2948. </div>
  2949. <div class="toolSort" v-if="itemTool.toolType == 6">
  2950. <div class="tool" :class="{
  2951. isToolChoose:
  2952. itemTool.tool.indexOf(49) != -1,
  2953. }" @click="
  2954. addTools(49, itemTaskIndex, toolIndex)
  2955. ">
  2956. <div class="whiteBIcon" @click.stop="
  2957. openTools(itemTaskIndex, 49, toolIndex)
  2958. ">
  2959. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2960. <div style="margin: 5px 0">学生分组</div>
  2961. </div>
  2962. <div class="noCTool">
  2963. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2964. </div>
  2965. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  2966. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2967. </div>
  2968. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2969. <img src="../../../assets/icon/checkNo.png" alt
  2970. v-if="itemTool.tool.indexOf(49) == -1" />
  2971. <div class="checkDiv" v-else>
  2972. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2973. </div>
  2974. </div> -->
  2975. </div>
  2976. </div>
  2977. <div class="toolSort" v-if="itemTool.toolType == 2">
  2978. <!-- <div class="tool">
  2979. <div
  2980. class="whiteBIcon"
  2981. @click="addTools(5, itemTaskIndex, toolIndex)"
  2982. >
  2983. <img
  2984. src="../../../assets/icon/thirdToolList/score.png"
  2985. alt
  2986. />
  2987. <div style="margin: 5px 0">量规评分</div>
  2988. </div>
  2989. <div
  2990. class="check"
  2991. @click="addTools(5, itemTaskIndex, toolIndex)"
  2992. >
  2993. <img
  2994. src="../../../assets/icon/checkNo.png"
  2995. alt
  2996. v-if="itemTool.tool.indexOf(5) == -1"
  2997. />
  2998. <img
  2999. src="../../../assets/icon/checkedIs.png"
  3000. alt
  3001. v-else
  3002. />
  3003. </div>
  3004. </div>-->
  3005. <div class="tool" :class="{
  3006. isToolChoose:
  3007. itemTool.tool.indexOf(4) != -1,
  3008. }" @click="
  3009. addTools(4, itemTaskIndex, toolIndex)
  3010. ">
  3011. <div class="whiteBIcon" @click.stop="
  3012. openTools(itemTaskIndex, 4, toolIndex)
  3013. ">
  3014. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3015. <div style="margin: 5px 0">问卷调查</div>
  3016. </div>
  3017. <div class="noCTool">
  3018. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3019. </div>
  3020. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3021. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3022. </div>
  3023. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3024. <img src="../../../assets/icon/checkNo.png" alt
  3025. v-if="itemTool.tool.indexOf(4) == -1" />
  3026. <div class="checkDiv" v-else>
  3027. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3028. </div>
  3029. </div> -->
  3030. </div>
  3031. <div class="tool" :class="{
  3032. isToolChoose:
  3033. itemTool.tool.indexOf(45) != -1,
  3034. }" @click="
  3035. addTools(45, itemTaskIndex, toolIndex)
  3036. ">
  3037. <div class="whiteBIcon" @click="
  3038. openTools(itemTaskIndex, 45, toolIndex)
  3039. ">
  3040. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3041. <div style="margin: 5px 0">选择题</div>
  3042. </div>
  3043. <div class="noCTool">
  3044. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3045. </div>
  3046. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3047. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3048. </div>
  3049. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3050. <img src="../../../assets/icon/checkNo.png" alt
  3051. v-if="itemTool.tool.indexOf(45) == -1" />
  3052. <div class="checkDiv" v-else>
  3053. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3054. </div>
  3055. </div> -->
  3056. </div>
  3057. <div class="tool" :class="{
  3058. isToolChoose:
  3059. itemTool.tool.indexOf(15) != -1,
  3060. }" @click="
  3061. addTools(15, itemTaskIndex, toolIndex)
  3062. ">
  3063. <div class="whiteBIcon" @click.stop="
  3064. openTools(itemTaskIndex, 15, toolIndex)
  3065. ">
  3066. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3067. <div style="margin: 5px 0">问答</div>
  3068. </div>
  3069. <div class="noCTool">
  3070. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3071. </div>
  3072. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3073. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3074. </div>
  3075. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3076. <img src="../../../assets/icon/checkNo.png" alt
  3077. v-if="itemTool.tool.indexOf(15) == -1" />
  3078. <div class="checkDiv" v-else>
  3079. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3080. </div>
  3081. </div> -->
  3082. </div>
  3083. <div class="tool" :class="{
  3084. isToolChoose:
  3085. itemTool.tool.indexOf(16) != -1,
  3086. }" @click="
  3087. addTools(16, itemTaskIndex, toolIndex)
  3088. ">
  3089. <div class="whiteBIcon" @click.stop="
  3090. addTools(16, itemTaskIndex, toolIndex)
  3091. ">
  3092. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3093. <div style="margin: 5px 0">作业提交</div>
  3094. </div>
  3095. <div class="noCTool">
  3096. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3097. </div>
  3098. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3099. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3100. </div>
  3101. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3102. <img src="../../../assets/icon/checkNo.png" alt
  3103. v-if="itemTool.tool.indexOf(16) == -1" />
  3104. <div class="checkDiv" v-else>
  3105. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3106. </div>
  3107. </div> -->
  3108. </div>
  3109. <div class="tool" :class="{
  3110. isToolChoose:
  3111. itemTool.tool.indexOf(50) != -1,
  3112. }" @click="
  3113. addTools(50, itemTaskIndex, toolIndex)
  3114. ">
  3115. <div class="whiteBIcon" @click.stop="
  3116. addTools(50, itemTaskIndex, toolIndex)
  3117. ">
  3118. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3119. <div style="margin: 5px 0">批量上传</div>
  3120. </div>
  3121. <div class="noCTool">
  3122. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3123. </div>
  3124. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3125. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3126. </div>
  3127. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3128. <img src="../../../assets/icon/checkNo.png" alt
  3129. v-if="itemTool.tool.indexOf(50) == -1" />
  3130. <div class="checkDiv" v-else>
  3131. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3132. </div>
  3133. </div> -->
  3134. </div>
  3135. <!-- <div class="tool">
  3136. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3137. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3138. <div style="margin: 5px 0">个人评价</div>
  3139. </div>
  3140. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3141. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3142. <div class="checkDiv" v-else>
  3143. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3144. </div>
  3145. </div>
  3146. </div> -->
  3147. <div class="tool" :class="{
  3148. isToolChoose:
  3149. itemTool.tool.indexOf(41) != -1,
  3150. }" @click="
  3151. addTools(41, itemTaskIndex, toolIndex)
  3152. ">
  3153. <div class="whiteBIcon" @click.stop="
  3154. openTools(itemTaskIndex, 41, toolIndex)
  3155. ">
  3156. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3157. <div style="margin: 5px 0">选择匹配</div>
  3158. </div>
  3159. <div class="noCTool">
  3160. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3161. </div>
  3162. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3163. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3164. </div>
  3165. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3166. <img src="../../../assets/icon/checkNo.png" alt
  3167. v-if="itemTool.tool.indexOf(41) == -1" />
  3168. <div class="checkDiv" v-else>
  3169. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3170. </div>
  3171. </div> -->
  3172. </div>
  3173. <div class="tool" :class="{
  3174. isToolChoose:
  3175. itemTool.tool.indexOf(47) != -1,
  3176. }" @click="
  3177. addTools(47, itemTaskIndex, toolIndex)
  3178. ">
  3179. <div class="whiteBIcon" @click.stop="
  3180. openTools(itemTaskIndex, 47, toolIndex)
  3181. ">
  3182. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3183. <div style="margin: 5px 0">排序</div>
  3184. </div>
  3185. <div class="noCTool">
  3186. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3187. </div>
  3188. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3189. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3190. </div>
  3191. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3192. <img src="../../../assets/icon/checkNo.png" alt
  3193. v-if="itemTool.tool.indexOf(47) == -1" />
  3194. <div class="checkDiv" v-else>
  3195. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3196. </div>
  3197. </div> -->
  3198. </div>
  3199. <!-- <div class="tool">
  3200. <div
  3201. class="whiteBIcon"
  3202. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3203. >
  3204. <img
  3205. src="../../../assets/icon/thirdToolList/mp3.png"
  3206. alt
  3207. />
  3208. <div style="margin: 5px 0">上传音频</div>
  3209. </div>
  3210. <div
  3211. class="check"
  3212. @click="addTools(42, itemTaskIndex, toolIndex)"
  3213. >
  3214. <img
  3215. src="../../../assets/icon/checkNo.png"
  3216. alt
  3217. v-if="itemTool.tool.indexOf(42) == -1"
  3218. />
  3219. <img
  3220. src="../../../assets/icon/checkedIs.png"
  3221. alt
  3222. v-else
  3223. />
  3224. </div>
  3225. </div> -->
  3226. </div>
  3227. <div class="toolSort" v-if="itemTool.toolType == 3">
  3228. <div class="tool" :class="{
  3229. isToolChoose:
  3230. itemTool.tool.indexOf(18) != -1,
  3231. }" @click="
  3232. addTools(18, itemTaskIndex, toolIndex)
  3233. ">
  3234. <div class="whiteBIcon" @click.stop="
  3235. addTools(18, itemTaskIndex, toolIndex)
  3236. ">
  3237. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3238. <div style="margin: 5px 0">训练平台</div>
  3239. </div>
  3240. <div class="noCTool">
  3241. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3242. </div>
  3243. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3244. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3245. </div>
  3246. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3247. <img src="../../../assets/icon/checkNo.png" alt
  3248. v-if="itemTool.tool.indexOf(18) == -1" />
  3249. <div class="checkDiv" v-else>
  3250. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3251. </div>
  3252. </div> -->
  3253. </div>
  3254. <div class="tool" :class="{
  3255. isToolChoose:
  3256. itemTool.tool.indexOf(21) != -1,
  3257. }" @click="
  3258. addTools(21, itemTaskIndex, toolIndex)
  3259. ">
  3260. <div class="whiteBIcon" @click.stop="
  3261. addTools(21, itemTaskIndex, toolIndex)
  3262. ">
  3263. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  3264. <div style="margin: 5px 0">
  3265. AIoT Blockly
  3266. </div>
  3267. </div>
  3268. <div class="noCTool">
  3269. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3270. </div>
  3271. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  3272. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3273. </div>
  3274. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  3275. <img src="../../../assets/icon/checkNo.png" alt
  3276. v-if="itemTool.tool.indexOf(21) == -1" />
  3277. <div class="checkDiv" v-else>
  3278. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3279. </div>
  3280. </div> -->
  3281. </div>
  3282. <!-- <div class="tool">
  3283. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  3284. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  3285. <div style="margin: 5px 0">AI体验</div>
  3286. </div>
  3287. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  3288. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  3289. <div class="checkDiv" v-else>
  3290. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3291. </div>
  3292. </div>
  3293. </div> -->
  3294. <div class="tool" :class="{
  3295. isToolChoose:
  3296. itemTool.tool.indexOf(23) != -1,
  3297. }" @click="
  3298. addTools(23, itemTaskIndex, toolIndex)
  3299. ">
  3300. <div class="whiteBIcon" @click.stop="
  3301. addTools(23, itemTaskIndex, toolIndex)
  3302. ">
  3303. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  3304. <div style="margin: 5px 0">AI Python</div>
  3305. </div>
  3306. <div class="noCTool">
  3307. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3308. </div>
  3309. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  3310. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3311. </div>
  3312. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  3313. <img src="../../../assets/icon/checkNo.png" alt
  3314. v-if="itemTool.tool.indexOf(23) == -1" />
  3315. <div class="checkDiv" v-else>
  3316. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3317. </div>
  3318. </div> -->
  3319. </div>
  3320. <div class="tool" :class="{
  3321. isToolChoose:
  3322. itemTool.tool.indexOf(24) != -1,
  3323. }" @click="
  3324. addTools(24, itemTaskIndex, toolIndex)
  3325. ">
  3326. <div class="whiteBIcon" @click.stop="
  3327. addTools(24, itemTaskIndex, toolIndex)
  3328. ">
  3329. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  3330. <div style="margin: 5px 0">
  3331. AI Blockly
  3332. </div>
  3333. </div>
  3334. <div class="noCTool">
  3335. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3336. </div>
  3337. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  3338. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3339. </div>
  3340. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  3341. <img src="../../../assets/icon/checkNo.png" alt
  3342. v-if="itemTool.tool.indexOf(24) == -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" :class="{
  3349. isToolChoose:
  3350. itemTool.tool.indexOf(32) != -1,
  3351. }" @click="
  3352. addTools(32, itemTaskIndex, toolIndex)
  3353. ">
  3354. <div class="whiteBIcon" @click.stop="
  3355. addTools(32, itemTaskIndex, toolIndex)
  3356. ">
  3357. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  3358. <div style="margin: 5px 0">源码编辑</div>
  3359. </div>
  3360. <div class="noCTool">
  3361. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3362. </div>
  3363. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  3364. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3365. </div>
  3366. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  3367. <img src="../../../assets/icon/checkNo.png" alt
  3368. v-if="itemTool.tool.indexOf(32) == -1" />
  3369. <div class="checkDiv" v-else>
  3370. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3371. </div>
  3372. </div> -->
  3373. </div>
  3374. <div class="tool" :class="{
  3375. isToolChoose:
  3376. itemTool.tool.indexOf(57) != -1,
  3377. }" @click="
  3378. addTools(57, itemTaskIndex, toolIndex)
  3379. ">
  3380. <div class="whiteBIcon" @click.stop="
  3381. openTools(itemTaskIndex, 57, toolIndex)
  3382. ">
  3383. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  3384. <div style="margin: 5px 0">CocoPi</div>
  3385. </div>
  3386. <div class="noCTool">
  3387. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3388. </div>
  3389. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  3390. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3391. </div>
  3392. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  3393. <img src="../../../assets/icon/checkNo.png" alt
  3394. v-if="itemTool.tool.indexOf(57) == -1" />
  3395. <div class="checkDiv" v-else>
  3396. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3397. </div>
  3398. </div> -->
  3399. </div>
  3400. <div class="tool" :class="{
  3401. isToolChoose:
  3402. itemTool.tool.indexOf(63) != -1,
  3403. }" @click="
  3404. addTools(63, itemTaskIndex, toolIndex)
  3405. ">
  3406. <div class="whiteBIcon" @click.stop="
  3407. addTools(63, itemTaskIndex, toolIndex)
  3408. ">
  3409. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  3410. <div style="margin: 5px 0">海龟编程</div>
  3411. </div>
  3412. <div class="noCTool">
  3413. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3414. </div>
  3415. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  3416. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3417. </div>
  3418. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  3419. <img src="../../../assets/icon/checkNo.png" alt
  3420. v-if="itemTool.tool.indexOf(63) == -1" />
  3421. <div class="checkDiv" v-else>
  3422. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3423. </div>
  3424. </div> -->
  3425. </div>
  3426. <div class="tool" :class="{
  3427. isToolChoose:
  3428. itemTool.tool.indexOf(71) != -1,
  3429. }" @click="
  3430. addTools(71, itemTaskIndex, toolIndex)
  3431. ">
  3432. <div class="whiteBIcon" @click.stop="
  3433. addTools(71, itemTaskIndex, toolIndex)
  3434. ">
  3435. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  3436. <div style="margin: 5px 0">AI智能体</div>
  3437. </div>
  3438. <div class="noCTool">
  3439. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3440. </div>
  3441. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  3442. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3443. </div>
  3444. </div>
  3445. </div>
  3446. <div class="toolSort" v-if="itemTool.toolType == 7">
  3447. <div class="tool" :class="{
  3448. isToolChoose:
  3449. itemTool.tool.indexOf(40) != -1,
  3450. }" @click.stop="
  3451. addTools(40, itemTaskIndex, toolIndex)
  3452. ">
  3453. <div class="whiteBIcon" @click.stop="
  3454. openTools(itemTaskIndex, 40, toolIndex)
  3455. ">
  3456. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3457. <div style="margin: 5px 0">个人评价</div>
  3458. </div>
  3459. <div class="noCTool">
  3460. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3461. </div>
  3462. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  3463. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3464. </div>
  3465. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3466. <img src="../../../assets/icon/checkNo.png" alt
  3467. v-if="itemTool.tool.indexOf(40) == -1" />
  3468. <div class="checkDiv" v-else>
  3469. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3470. </div>
  3471. </div> -->
  3472. </div>
  3473. </div>
  3474. <div class="toolSort" v-if="itemTool.toolType == 5">
  3475. <div class="tool" :class="{
  3476. isToolChoose:
  3477. itemTool.tool.indexOf(28) != -1,
  3478. }" @click="
  3479. addTools(28, itemTaskIndex, toolIndex)
  3480. ">
  3481. <div class="whiteBIcon" @click.stop="
  3482. addTools(28, itemTaskIndex, toolIndex)
  3483. ">
  3484. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3485. <div style="margin: 5px 0">翻译</div>
  3486. </div>
  3487. <div class="noCTool">
  3488. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3489. </div>
  3490. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  3491. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3492. </div>
  3493. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3494. <img src="../../../assets/icon/checkNo.png" alt
  3495. v-if="itemTool.tool.indexOf(28) == -1" />
  3496. <div class="checkDiv" v-else>
  3497. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3498. </div>
  3499. </div> -->
  3500. </div>
  3501. <div class="tool" :class="{
  3502. isToolChoose:
  3503. itemTool.tool.indexOf(31) != -1,
  3504. }" @click="
  3505. addTools(31, itemTaskIndex, toolIndex)
  3506. ">
  3507. <div class="whiteBIcon" @click.stop="
  3508. addTools(31, itemTaskIndex, toolIndex)
  3509. ">
  3510. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3511. <div style="margin: 5px 0">数字画板</div>
  3512. </div>
  3513. <div class="noCTool">
  3514. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3515. </div>
  3516. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  3517. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3518. </div>
  3519. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3520. <img src="../../../assets/icon/checkNo.png" alt
  3521. v-if="itemTool.tool.indexOf(31) == -1" />
  3522. <div class="checkDiv" v-else>
  3523. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3524. </div>
  3525. </div> -->
  3526. </div>
  3527. <div class="tool" :class="{
  3528. isToolChoose:
  3529. itemTool.tool.indexOf(39) != -1,
  3530. }" @click="
  3531. addTools(39, itemTaskIndex, toolIndex)
  3532. ">
  3533. <div class="whiteBIcon" @click.stop="
  3534. addTools(39, itemTaskIndex, toolIndex)
  3535. ">
  3536. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3537. <div style="margin: 5px 0">GeoGebra</div>
  3538. </div>
  3539. <div class="noCTool">
  3540. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3541. </div>
  3542. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  3543. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3544. </div>
  3545. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3546. <img src="../../../assets/icon/checkNo.png" alt
  3547. v-if="itemTool.tool.indexOf(39) == -1" />
  3548. <div class="checkDiv" v-else>
  3549. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3550. </div>
  3551. </div> -->
  3552. </div>
  3553. <div class="tool" :class="{
  3554. isToolChoose:
  3555. itemTool.tool.indexOf(66) != -1,
  3556. }" @click="
  3557. addTools(66, itemTaskIndex, toolIndex)
  3558. ">
  3559. <div class="whiteBIcon" @click.stop="
  3560. addTools(66, itemTaskIndex, toolIndex)
  3561. ">
  3562. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  3563. <div style="margin: 5px 0">公式编辑</div>
  3564. </div>
  3565. <div class="noCTool">
  3566. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3567. </div>
  3568. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  3569. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3570. </div>
  3571. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  3572. <img src="../../../assets/icon/checkNo.png" alt
  3573. v-if="itemTool.tool.indexOf(66) == -1" />
  3574. <div class="checkDiv" v-else>
  3575. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3576. </div>
  3577. </div> -->
  3578. </div>
  3579. <!-- <div class="tool">
  3580. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  3581. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  3582. <div style="margin: 5px 0">分子结构</div>
  3583. </div>
  3584. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  3585. <img src="../../../assets/icon/checkNo.png" alt
  3586. v-if="itemTool.tool.indexOf(67) == -1" />
  3587. <div class="checkDiv" v-else>
  3588. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3589. </div>
  3590. </div>
  3591. </div> -->
  3592. <div class="tool" :class="{
  3593. isToolChoose:
  3594. itemTool.tool.indexOf(68) != -1,
  3595. }" @click="
  3596. addTools(68, itemTaskIndex, toolIndex)
  3597. ">
  3598. <div class="whiteBIcon" @click.stop="
  3599. addTools(68, itemTaskIndex, toolIndex)
  3600. ">
  3601. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  3602. <div style="margin: 5px 0">时间轴</div>
  3603. </div>
  3604. <div class="noCTool">
  3605. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3606. </div>
  3607. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  3608. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3609. </div>
  3610. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  3611. <img src="../../../assets/icon/checkNo.png" alt
  3612. v-if="itemTool.tool.indexOf(68) == -1" />
  3613. <div class="checkDiv" v-else>
  3614. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3615. </div>
  3616. </div> -->
  3617. </div>
  3618. <div class="tool" :class="{
  3619. isToolChoose:
  3620. itemTool.tool.indexOf(69) != -1,
  3621. }" @click="
  3622. addTools(69, itemTaskIndex, toolIndex)
  3623. ">
  3624. <div class="whiteBIcon" @click.stop="
  3625. openTools(itemTaskIndex, 69, toolIndex)
  3626. ">
  3627. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  3628. <div style="margin: 5px 0">英语写作</div>
  3629. </div>
  3630. <div class="noCTool">
  3631. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3632. </div>
  3633. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  3634. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3635. </div>
  3636. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3637. <img src="../../../assets/icon/checkNo.png" alt
  3638. v-if="itemTool.tool.indexOf(4) == -1" />
  3639. <div class="checkDiv" v-else>
  3640. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3641. </div>
  3642. </div> -->
  3643. </div>
  3644. <div class="tool" :class="{
  3645. isToolChoose:
  3646. itemTool.tool.indexOf(70) != -1,
  3647. }" @click="
  3648. addTools(70, itemTaskIndex, toolIndex)
  3649. ">
  3650. <div class="whiteBIcon" @click.stop="
  3651. openTools(itemTaskIndex, 70, toolIndex)
  3652. ">
  3653. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  3654. <div style="margin: 5px 0">英语口语</div>
  3655. </div>
  3656. <div class="noCTool">
  3657. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3658. </div>
  3659. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  3660. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3661. </div>
  3662. </div>
  3663. <!-- <div class="tool">
  3664. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  3665. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3666. <div style="margin: 5px 0">翻译</div>
  3667. </div>
  3668. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3669. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  3670. <div class="checkDiv" v-else>
  3671. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3672. </div>
  3673. </div>
  3674. </div>
  3675. <div class="tool">
  3676. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  3677. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  3678. <div style="margin: 5px 0">魔盒识字</div>
  3679. </div>
  3680. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  3681. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  3682. <div class="checkDiv" v-else>
  3683. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3684. </div>
  3685. </div>
  3686. </div>
  3687. <div class="tool">
  3688. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  3689. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  3690. <div style="margin: 5px 0">24点</div>
  3691. </div>
  3692. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  3693. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  3694. <div class="checkDiv" v-else>
  3695. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3696. </div>
  3697. </div>
  3698. </div>
  3699. <div class="tool">
  3700. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  3701. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3702. <div style="margin: 5px 0">数学画板</div>
  3703. </div>
  3704. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3705. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  3706. <div class="checkDiv" v-else>
  3707. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3708. </div>
  3709. </div>
  3710. </div>
  3711. <div class="tool">
  3712. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  3713. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3714. <div style="margin: 5px 0">GeoGebra</div>
  3715. </div>
  3716. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3717. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  3718. <div class="checkDiv" v-else>
  3719. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3720. </div>
  3721. </div>
  3722. </div>
  3723. <div class="tool">
  3724. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  3725. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  3726. <div style="margin: 5px 0">模拟驾驶</div>
  3727. </div>
  3728. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  3729. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  3730. <div class="checkDiv" v-else>
  3731. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3732. </div>
  3733. </div>
  3734. </div>
  3735. <div class="tool">
  3736. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  3737. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  3738. <div style="margin: 5px 0">路径搜索</div>
  3739. </div>
  3740. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  3741. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  3742. <div class="checkDiv" v-else>
  3743. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3744. </div>
  3745. </div>
  3746. </div>
  3747. <div class="tool">
  3748. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  3749. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  3750. <div style="margin: 5px 0">深度学习</div>
  3751. </div>
  3752. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  3753. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  3754. <div class="checkDiv" v-else>
  3755. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3756. </div>
  3757. </div>
  3758. </div>
  3759. <div class="tool">
  3760. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  3761. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  3762. <div style="margin: 5px 0">全历史</div>
  3763. </div>
  3764. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  3765. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  3766. <div class="checkDiv" v-else>
  3767. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3768. </div>
  3769. </div>
  3770. </div>
  3771. </div>
  3772. <div class="toolSort" v-if="itemTool.toolType == 4">
  3773. <div class="tool">
  3774. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  3775. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  3776. <div style="margin: 5px 0">课程设计</div>
  3777. </div>
  3778. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  3779. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  3780. <div class="checkDiv" v-else>
  3781. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3782. </div>
  3783. </div>
  3784. </div>
  3785. <div class="tool">
  3786. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  3787. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  3788. <div style="margin: 5px 0">目标管理</div>
  3789. </div>
  3790. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  3791. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  3792. <div class="checkDiv" v-else>
  3793. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3794. </div>
  3795. </div>
  3796. </div> -->
  3797. <!-- <div class="tool">
  3798. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  3799. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  3800. <div style="margin: 5px 0">汉字宫</div>
  3801. </div>
  3802. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  3803. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  3804. <div class="checkDiv" v-else>
  3805. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3806. </div>
  3807. </div>
  3808. </div> -->
  3809. </div>
  3810. </div>
  3811. <!-- v-show="!itemTool.isFold3" -->
  3812. <div class="op_tool_box"
  3813. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3814. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  3815. class="binfo_input" style="
  3816. margin: 0 0 20px 0;
  3817. width: 100% !important;
  3818. " v-model="itemTool.toolDetail"></textarea>
  3819. <div class="op_box">
  3820. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  3821. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3822. <div class="r_pub_button_op"
  3823. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  3824. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  3825. 智能优化</div>
  3826.                              
  3827. </el-tooltip>
  3828. </div>
  3829. </div>
  3830. </div>
  3831. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  3832. <div class="addToolImg">
  3833. <img src="../../../assets/icon/add.png" alt />
  3834. </div>
  3835. <div>添加工具</div>
  3836. </div> -->
  3837. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  3838. margin: 0 auto;
  3839. padding: 0 30px;
  3840. height: 45px;
  3841. ">
  3842. 添加工具
  3843. </button>
  3844. </div>
  3845. </div>
  3846. <div v-else-if="
  3847. unitJson[unitIndex].easy == 2 ||
  3848. unitJson[unitIndex].easy == 4
  3849. " class="toolChoose" style="padding: 0 0 40px">
  3850. <div class="tools">
  3851. <div class="leftTools" style="width: 100%" v-for="(
  3852. itemTool, toolIndex
  3853. ) in itemTask.toolChoose" :key="toolIndex">
  3854. <div>
  3855. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  3856. margin: 0 0 20px 0;
  3857. width: 100% !important;
  3858. " v-model="itemTool.toolDetail"></textarea>
  3859. </div>
  3860. <div style="
  3861. display: flex;
  3862. flex-direction: row;
  3863. align-items: baseline;
  3864. flex-wrap: nowrap;
  3865. justify-content: flex-start;
  3866. position: relative;
  3867. ">
  3868. <div style="margin-right: 20px; font-weight: bold"
  3869. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3870. 工具 {{ toolIndex + 1 }} :
  3871. </div>
  3872. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3873. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  3874. </div>
  3875. <div style="min-height: 163px">
  3876. <div class="toolSort">
  3877. <div class="tool">
  3878. <div class="whiteBIcon" @click="
  3879. openTools(itemTaskIndex, 1, toolIndex)
  3880. ">
  3881. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3882. <div style="margin: 5px 0">电子白板</div>
  3883. </div>
  3884. <div class="check" @click="
  3885. addTools(1, itemTaskIndex, toolIndex)
  3886. ">
  3887. <img src="../../../assets/icon/checkNo.png" alt
  3888. v-if="itemTool.tool.indexOf(1) == -1" />
  3889. <div class="checkDiv" v-else>
  3890. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3891. </div>
  3892. </div>
  3893. </div>
  3894. <div class="tool">
  3895. <div class="whiteBIcon" @click="
  3896. openTools(itemTaskIndex, 52, toolIndex)
  3897. ">
  3898. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3899. <div style="margin: 5px 0">文档</div>
  3900. </div>
  3901. <div class="check" @click="
  3902. addTools(52, itemTaskIndex, toolIndex)
  3903. ">
  3904. <img src="../../../assets/icon/checkNo.png" alt
  3905. v-if="itemTool.tool.indexOf(52) == -1" />
  3906. <div class="checkDiv" v-else>
  3907. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3908. </div>
  3909. </div>
  3910. </div>
  3911. <div class="tool">
  3912. <div class="whiteBIcon" @click="
  3913. openTools(itemTaskIndex, 3, toolIndex)
  3914. ">
  3915. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3916. <div style="margin: 5px 0">思维导图</div>
  3917. </div>
  3918. <div class="check" @click="
  3919. addTools(3, itemTaskIndex, toolIndex)
  3920. ">
  3921. <img src="../../../assets/icon/checkNo.png" alt
  3922. v-if="itemTool.tool.indexOf(3) == -1" />
  3923. <div class="checkDiv" v-else>
  3924. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3925. </div>
  3926. </div>
  3927. </div>
  3928. <div class="tool">
  3929. <div class="whiteBIcon" @click="
  3930. openTools(itemTaskIndex, 4, toolIndex)
  3931. ">
  3932. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3933. <div style="margin: 5px 0">问卷调查</div>
  3934. </div>
  3935. <div class="check" @click="
  3936. addTools(4, itemTaskIndex, toolIndex)
  3937. ">
  3938. <img src="../../../assets/icon/checkNo.png" alt
  3939. v-if="itemTool.tool.indexOf(4) == -1" />
  3940. <div class="checkDiv" v-else>
  3941. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3942. </div>
  3943. </div>
  3944. </div>
  3945. <div class="tool">
  3946. <div class="whiteBIcon" @click="
  3947. openTools(itemTaskIndex, 45, toolIndex)
  3948. ">
  3949. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3950. <div style="margin: 5px 0">选择题</div>
  3951. </div>
  3952. <div class="check" @click="
  3953. addTools(45, itemTaskIndex, toolIndex)
  3954. ">
  3955. <img src="../../../assets/icon/checkNo.png" alt
  3956. v-if="itemTool.tool.indexOf(45) == -1" />
  3957. <div class="checkDiv" v-else>
  3958. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3959. </div>
  3960. </div>
  3961. </div>
  3962. <div class="tool">
  3963. <div class="whiteBIcon" @click="
  3964. openTools(itemTaskIndex, 15, toolIndex)
  3965. ">
  3966. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3967. <div style="margin: 5px 0">问答</div>
  3968. </div>
  3969. <div class="check" @click="
  3970. addTools(15, itemTaskIndex, toolIndex)
  3971. ">
  3972. <img src="../../../assets/icon/checkNo.png" alt
  3973. v-if="itemTool.tool.indexOf(15) == -1" />
  3974. <div class="checkDiv" v-else>
  3975. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3976. </div>
  3977. </div>
  3978. </div>
  3979. <div class="tool">
  3980. <div class="whiteBIcon" @click="
  3981. addTools(16, itemTaskIndex, toolIndex)
  3982. ">
  3983. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3984. <div style="margin: 5px 0">作业提交</div>
  3985. </div>
  3986. <div class="check" @click="
  3987. addTools(16, itemTaskIndex, toolIndex)
  3988. ">
  3989. <img src="../../../assets/icon/checkNo.png" alt
  3990. v-if="itemTool.tool.indexOf(16) == -1" />
  3991. <div class="checkDiv" v-else>
  3992. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3993. </div>
  3994. </div>
  3995. </div>
  3996. <div class="tool">
  3997. <div class="whiteBIcon" @click="
  3998. openTools(itemTaskIndex, 50, toolIndex)
  3999. ">
  4000. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4001. <div style="margin: 5px 0">批量上传</div>
  4002. </div>
  4003. <div class="check" @click="
  4004. addTools(50, itemTaskIndex, toolIndex)
  4005. ">
  4006. <img src="../../../assets/icon/checkNo.png" alt
  4007. v-if="itemTool.tool.indexOf(50) == -1" />
  4008. <div class="checkDiv" v-else>
  4009. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4010. </div>
  4011. </div>
  4012. </div>
  4013. <div class="tool">
  4014. <div class="whiteBIcon" @click="
  4015. openTools(itemTaskIndex, 41, toolIndex)
  4016. ">
  4017. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4018. <div style="margin: 5px 0">选择匹配</div>
  4019. </div>
  4020. <div class="check" @click="
  4021. addTools(41, itemTaskIndex, toolIndex)
  4022. ">
  4023. <img src="../../../assets/icon/checkNo.png" alt
  4024. v-if="itemTool.tool.indexOf(41) == -1" />
  4025. <div class="checkDiv" v-else>
  4026. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4027. </div>
  4028. </div>
  4029. </div>
  4030. <div class="tool">
  4031. <div class="whiteBIcon" @click="
  4032. openTools(itemTaskIndex, 47, toolIndex)
  4033. ">
  4034. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4035. <div style="margin: 5px 0">排序</div>
  4036. </div>
  4037. <div class="check" @click="
  4038. addTools(47, itemTaskIndex, toolIndex)
  4039. ">
  4040. <img src="../../../assets/icon/checkNo.png" alt
  4041. v-if="itemTool.tool.indexOf(47) == -1" />
  4042. <div class="checkDiv" v-else>
  4043. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4044. </div>
  4045. </div>
  4046. </div>
  4047. <div class="tool">
  4048. <div class="whiteBIcon" @click="
  4049. openTools(itemTaskIndex, 48, toolIndex)
  4050. ">
  4051. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4052. <div style="margin: 5px 0">表格</div>
  4053. </div>
  4054. <div class="check" @click="
  4055. addTools(48, itemTaskIndex, toolIndex)
  4056. ">
  4057. <img src="../../../assets/icon/checkNo.png" alt
  4058. v-if="itemTool.tool.indexOf(48) == -1" />
  4059. <div class="checkDiv" v-else>
  4060. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4061. </div>
  4062. </div>
  4063. </div>
  4064. </div>
  4065. </div>
  4066. </div>
  4067. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4068. <div class="addToolImg">
  4069. <img src="../../../assets/icon/add.png" alt />
  4070. </div>
  4071. <div>添加工具</div>
  4072. </div> -->
  4073. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4074. style="margin: 35px auto 20px">
  4075. 添加工具
  4076. </button>
  4077. </div>
  4078. </div>
  4079. <div v-else-if="
  4080. unitJson[unitIndex].easy == 1 ||
  4081. (unitJson[unitIndex].easy == 5 &&
  4082. itemTask.taskType == 2)
  4083. " class="toolChoose" style="padding: 0 0 40px">
  4084. <div class="tools">
  4085. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4086. itemTool, toolIndex
  4087. ) in itemTask.toolChoose" :key="toolIndex">
  4088. <div style="min-height: 163px">
  4089. <div class="toolSort">
  4090. <div class="tool">
  4091. <div class="whiteBIcon" @click="
  4092. openTools(itemTaskIndex, 50, toolIndex)
  4093. ">
  4094. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4095. <div style="margin: 5px 0">批量上传</div>
  4096. </div>
  4097. <div class="check" @click="
  4098. addTools(50, itemTaskIndex, toolIndex)
  4099. ">
  4100. <img src="../../../assets/icon/checkNo.png" alt
  4101. v-if="itemTool.tool.indexOf(50) == -1" />
  4102. <div class="checkDiv" v-else>
  4103. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4104. </div>
  4105. </div>
  4106. </div>
  4107. </div>
  4108. </div>
  4109. </div>
  4110. </div>
  4111. </div>
  4112. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4113. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4114. <div class="elist_title">
  4115. <div style="
  4116. display: flex;
  4117. flex-direction: row;
  4118. align-items: center;
  4119. margin: 20px 0;
  4120. ">
  4121. <div class="lineTitle clineTitle">评价设置</div>
  4122. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4123. <div class="r_pub_button_op" style="margin-left:auto;"
  4124. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4125. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4126. </el-tooltip>
  4127. <!-- <div class="line" style="width: 90%"></div> -->
  4128. </div>
  4129. </div>
  4130. <div class="mbCss">
  4131. <div class="pjCss" :style="{
  4132. width: itemTask.isEvaFold
  4133. ? 'calc(100% - 55%)'
  4134. : 'calc(100% - 120px)',
  4135. }">
  4136. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  4137. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  4138. <span>评价维度:</span>
  4139. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  4140. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  4141. <!-- </el-tooltip> -->
  4142. <!-- <span>评星等级:</span>
  4143. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  4144. disabled></el-rate> -->
  4145. <div class="remove" @click="
  4146. deletEList(
  4147. unitIndex,
  4148. itemTaskIndex,
  4149. eIndex
  4150. )
  4151. "></div>
  4152. <div class="elist_inptu_text">
  4153. <span>维度描述:</span>
  4154. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  4155. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  4156. <!-- </el-tooltip> -->
  4157. </div>
  4158. <div class="elist_inptu_text" v-if="evalua">
  4159. <span>目标:</span>
  4160. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  4161. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  4162. @change="forceUpdate()">
  4163. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  4164. :value="e.name">
  4165. </el-option>
  4166. </el-select> -->
  4167. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  4168. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  4169. </div>
  4170. </div>
  4171. </div>
  4172. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  4173. style="margin: 35px 35px 0 0">
  4174. <div class="addToolImg">
  4175. <img src="../../../assets/icon/add.png" alt />
  4176. </div>
  4177. <div>添加</div>
  4178. </div> -->
  4179. <div class="eva_btn_box">
  4180. <div class="eva_btn_left_box">
  4181. <button class="c_pub_button_add pub_btn_eval_img"
  4182. @click="addEList(unitIndex, itemTaskIndex)">
  4183. 添加
  4184. </button>
  4185. <button class="c_pub_button_add pub_btn_eval_source_img"
  4186. @click="openEList(unitIndex, itemTaskIndex)">
  4187. 资源
  4188. </button>
  4189. </div>
  4190. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  4191. v-if="itemTask.eList && itemTask.eList.length">
  4192. 添加资源模板
  4193. </button>
  4194. </div>
  4195. </div>
  4196. <div v-if="evalua" style="
  4197. border: 1px solid #e5e5e5;
  4198. box-shadow: 3px 1px 15px 3px #e0e0e0;
  4199. " :style="{
  4200. width: itemTask.isEvaFold ? '55%' : '116px',
  4201. }" class="evaCss">
  4202. <!-- <div class="e_add_top">
  4203. <div class="e_add_title">
  4204. <span>当前使用目标管理</span>
  4205. <span>{{ eTitle }}</span>
  4206. <img src="../../../assets/line.png" class="cru_line" style="
  4207. width: 125px;
  4208. height: 20px;
  4209. bottom: -10px;
  4210. left: 155px;
  4211. " />
  4212. </div>
  4213. </div> -->
  4214. <div class="e_add_content" style="width: 100%">
  4215. <div class="e_add_list_pbox" style="width: 100%">
  4216. <div class="e_add_list_pbox_title">
  4217. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  4218. <div class="type_content" v-if="itemTask.isEvaFold">
  4219. <span :class="{ active: typeMode == 1 }"
  4220. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  4221. <span :class="{ active: typeMode == 2 }"
  4222. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  4223. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  4224. </div>
  4225. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  4226. @click="foldEva(itemTaskIndex)">
  4227. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  4228. </div>
  4229. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  4230. @click="foldEva(itemTaskIndex)">
  4231. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  4232. </div>
  4233. </div>
  4234. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  4235. style="min-height: 200px">
  4236. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  4237. " v-if="typeMode == 1"></Mind>
  4238. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  4239. </Sunburst>
  4240. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  4241. v-if="typeMode == 3"></SeeBoard>
  4242. </div>
  4243. </div>
  4244. </div>
  4245. </div>
  4246. </div>
  4247. </div>
  4248. <div class="funBlock" style="padding: 0">
  4249. <div class="fold" @click="fold(itemTaskIndex, $event)">
  4250. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  4251. <div>
  4252. {{
  4253. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  4254. }}
  4255. </div>
  4256. </div>
  4257. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  4258. <div>展开</div>
  4259. <div class="arrow">
  4260. <img src="../../../assets/icon/expand.png" alt />
  4261. </div>
  4262. </div> -->
  4263. </div>
  4264. </div>
  4265. </div>
  4266. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  4267. <!-- <div>
  4268. <img src="../../../../assets/icon/new/addStage.png" alt />
  4269. <span>添加任务</span>
  4270. </div> -->
  4271. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  4272. 添加任务
  4273. </button>
  4274. </div>
  4275. </div>
  4276. <div class="info_btnBox3">
  4277. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  4278. goTo(
  4279. '/course?userid=' +
  4280. userid +
  4281. '&oid=' +
  4282. oid +
  4283. '&org=' +
  4284. org +
  4285. '&role=' +
  4286. role
  4287. )
  4288. ">
  4289. 返回课程
  4290. </button>
  4291. <button class="c_pub_button_return pub_btn_last_img"
  4292. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  4293. {{ steps == 4 ? "返回课程" : "上一步" }}
  4294. </button>
  4295. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  4296. pub_btn_next_img: steps != 3,
  4297. pub_btn_finish_img: steps == 3,
  4298. }">
  4299. {{ steps == 3 ? "确认上传" : "下一步" }}
  4300. </button>
  4301. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  4302. '修改模板' : '保存模板'}}</button>
  4303. </div>
  4304. </div>
  4305. </div>
  4306. </div>
  4307. </div>
  4308. <div style="
  4309. width: calc(100% - 20px);
  4310. background: rgb(255, 255, 255);
  4311. border-radius: 10px;
  4312. " v-if="steps == 4">
  4313. <div class="basic_box_success">
  4314. <div class="right_img">
  4315. <img src="../../../assets/icon/right.png" alt />
  4316. </div>
  4317. <div style="font-weight: bold">成功</div>
  4318. <!-- <div>您的课程编号</div>
  4319. <div class="number">{{ number }}</div>-->
  4320. <!-- <div class="success_button">
  4321. <div class="look_course" @click="isNoFinsh">
  4322. 邀请老师协同编辑
  4323. </div>
  4324. <div class="attend_others" @click="goCourse">预览课程</div>
  4325. </div> -->
  4326. </div>
  4327. </div>
  4328. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  4329. @mouseleave="btnDisplay(false)" v-if="false">
  4330. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  4331. goTo(
  4332. '/course?userid=' +
  4333. userid +
  4334. '&oid=' +
  4335. oid +
  4336. '&org=' +
  4337. org +
  4338. '&role=' +
  4339. role
  4340. )
  4341. ">
  4342. 返回课程
  4343. </button>
  4344. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  4345. @click="lastSteps">
  4346. {{ steps == 4 ? "返回课程" : "上一步" }}
  4347. </button>
  4348. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  4349. pub_btn_next_img: steps != 3,
  4350. pub_btn_finish_img: steps == 3,
  4351. }">
  4352. {{ steps == 3 ? "确认上传" : "下一步" }}
  4353. </button>
  4354. </div>
  4355. </div>
  4356. </div>
  4357. <div class="leftBar" v-if="istemplate == 1">
  4358. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  4359. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" />
  4360. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" />
  4361. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  4362. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  4363. @setAiJson="setAiJson" /> -->
  4364. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  4365. @setAiJson="setAiJson" />
  4366. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  4367. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  4368. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  4369. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  4370. </div>
  4371. </div>
  4372. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  4373. class="dialog_diy2 customWidth">
  4374. <div>请复制该链接邀请协同编辑</div>
  4375. <div>http://www.boomyon.com/index-zhang.com</div>
  4376. <span slot="footer" class="dialog-footer">
  4377. <el-button type="primary">复制链接分享</el-button>
  4378. <el-button @click="dialogVisible = false">取消</el-button>
  4379. </span>
  4380. </el-dialog>
  4381. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  4382. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  4383. <el-form>
  4384. <el-form-item label="文档标题">
  4385. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  4386. </el-form-item>
  4387. <div>文档简介</div>
  4388. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  4389. </el-form>
  4390. <span slot="footer" class="dialog-footer">
  4391. <el-button @click="dialogVisible1 = false">取 消</el-button>
  4392. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  4393. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  4394. </span>
  4395. </el-dialog>
  4396. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  4397. :before-close="handleClose" class="dialog_diy">
  4398. <el-form>
  4399. <el-form-item label="文档标题">
  4400. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  4401. </el-form-item>
  4402. <div>文档内容</div>
  4403. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  4404. </el-form>
  4405. <span slot="footer" class="dialog-footer">
  4406. <el-button @click="clearChoose">取 消</el-button>
  4407. <el-button type="primary" @click="wordNext()">确定</el-button>
  4408. </span>
  4409. </el-dialog>
  4410. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  4411. :before-close="handleClose" class="dialog_diy">
  4412. <el-form>
  4413. <el-form-item label="文本标题">
  4414. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  4415. placeholder="请输入文本标题..."></el-input>
  4416. </el-form-item>
  4417. <!-- <div>富文本内容</div> -->
  4418. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  4419. </el-form>
  4420. <span slot="footer" class="dialog-footer">
  4421. <el-button @click="clearAttText">取 消</el-button>
  4422. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  4423. </span>
  4424. </el-dialog>
  4425. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  4426. :before-close="handleClose" class="dialog_diy lineCss">
  4427. <el-form>
  4428. <el-form-item label="标题" :label-width="formLabelWidth">
  4429. <span>
  4430. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  4431. </span>
  4432. </el-form-item>
  4433. <el-form-item label="链接" :label-width="formLabelWidth">
  4434. <span>
  4435. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  4436. </span>
  4437. </el-form-item>
  4438. </el-form>
  4439. <span slot="footer" class="dialog-footer">
  4440. <el-button @click="clearLine">取 消</el-button>
  4441. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  4442. </span>
  4443. </el-dialog>
  4444. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  4445. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  4446. <div>
  4447. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  4448. </div>
  4449. <span slot="footer" class="dialog-footer">
  4450. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  4451. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  4452. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  4453. </span>
  4454. </el-dialog>
  4455. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  4456. :before-close="handleClose" class="addNewPP customWidth">
  4457. <div class="people">
  4458. <div class="people_top">
  4459. <div class="people_nav">选择成员</div>
  4460. <div class="people_top_right">
  4461. <div class="people_search">
  4462. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  4463. <div class="search_img" @click="searchStudent">
  4464. <img src="../../../assets/icon/search.png" alt />
  4465. </div>
  4466. </div>
  4467. </div>
  4468. </div>
  4469. <el-checkbox-group v-model="checkboxList" class="people_name">
  4470. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  4471. "暂无学生可选" }}</el-checkbox>
  4472. </el-checkbox-group>
  4473. </div>
  4474. <span slot="footer" class="dialog-footer">
  4475. <el-button @click="dialogVisible3 = false">取 消</el-button>
  4476. <el-button type="primary" @click="isAddPP">确定</el-button>
  4477. </span>
  4478. </el-dialog>
  4479. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  4480. :before-close="handleClose" class="addNewPP2">
  4481. <div class="check_classBox">
  4482. <div class="check_class_right">
  4483. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  4484. 全部
  4485. </div>
  4486. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  4487. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  4488. {{ item.name }}
  4489. </div>
  4490. </el-tooltip>
  4491. </div>
  4492. <div class="check_class_left">
  4493. <div class="check_class_all_box">
  4494. <div class="check_class_left_title">选择班级</div>
  4495. <div style="display: flex; align-items: center; margin-left: auto">
  4496. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  4497. </div>
  4498. </div>
  4499. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  4500. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  4501. </div> -->
  4502. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  4503. v-if="grade2.length">
  4504. <div v-for="item in grade2" :key="item.id" class="class_item">
  4505. <el-checkbox :label="item.id">
  4506. {{ item.name }}
  4507. </el-checkbox>
  4508. </div>
  4509. </el-checkbox-group>
  4510. <div v-if="!grade2.length">暂无数据</div>
  4511. </div>
  4512. </div>
  4513. <span slot="footer" class="dialog-footer">
  4514. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  4515. <el-button type="primary" @click="isAddClass">确定</el-button>
  4516. </span>
  4517. </el-dialog>
  4518. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  4519. :before-close="handleClose" class="addNewPP customWidth">
  4520. <div style="display: flex;justify-content: space-between;">
  4521. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  4522. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  4523. 全部
  4524. </div>
  4525. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  4526. v-for="(i) in CollaborativeTeaList" :key="i.id">
  4527. <el-tooltip placement="top" :content="i.name">
  4528. <span>{{i.name}}</span>
  4529. </el-tooltip>
  4530. </div>
  4531. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  4532. 其他
  4533. </div>
  4534. </div>
  4535. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  4536. <div class="people">
  4537. <div class="people_top">
  4538. <div class="people_top_right">
  4539. <div class="people_search">
  4540. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  4541. <div class="search_img" @click="getTeacher(collid)">
  4542. <img src="../../../assets/icon/search.png" alt />
  4543. </div>
  4544. </div>
  4545. </div>
  4546. <div class="people_nav" style="display: flex; align-items: center">
  4547. <div class="check_class_left_title">选择成员</div>
  4548. <div style="display: flex; align-items: center; margin-left: auto">
  4549. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  4550. </div>
  4551. </div>
  4552. </div>
  4553. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  4554. @change="InviteChange2">
  4555. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  4556. <div class="t_j_box">
  4557. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  4558. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  4559. </el-tooltip>
  4560. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  4561. <span>{{ item.username.split('@')[0] }}</span>
  4562. </el-tooltip>
  4563. <el-tooltip placement="top" :content="item.school">
  4564. <span>{{ item.school }}</span>
  4565. </el-tooltip>
  4566. </div>
  4567. </el-checkbox>
  4568. </el-checkbox-group>
  4569. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  4570. </div>
  4571. </div>
  4572. </div>
  4573. <span slot="footer" class="dialog-footer">
  4574. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  4575. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  4576. </span>
  4577. </el-dialog>
  4578. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  4579. closePan(4);
  4580. }
  4581. " class="dialog_diy fullStyle">
  4582. <div style="height: 100%">
  4583. <div class="a_add_title" style="
  4584. display: flex;
  4585. flex-direction: row;
  4586. align-items: center;
  4587. justify-content: center;
  4588. ">
  4589. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  4590. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4591. </div>
  4592. <div class="a_addBox" style="height: calc(100% - 50px)">
  4593. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  4594. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  4595. <div class="a_add_checkType">
  4596. <span :class="{
  4597. active:
  4598. askJson.askJson[index1].type == '1' ||
  4599. !askJson.askJson[index1].type,
  4600. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  4601. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  4602. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  4603. </div>
  4604. <div class="a_add_head">
  4605. <div style="
  4606. display: flex;
  4607. align-items: center;
  4608. width: 100%;
  4609. margin-right: 20px;
  4610. ">
  4611. <span style="min-width: fit-content">{{
  4612. index1 + 1 + "、"
  4613. }}</span>
  4614. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4615. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  4616. $forceUpdate();
  4617. }
  4618. "></textarea>
  4619. </div>
  4620. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  4621. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  4622. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  4623. </div>
  4624. <div class="a_add_head_div">
  4625. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  4626. </el-button>
  4627. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  4628. </div>
  4629. </div>
  4630. <div class="a_add_body">
  4631. <div class="a_add_input" style="flex-direction: column">
  4632. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  4633. margin: 20px 10px 0 0;
  4634. display: flex;
  4635. align-items: center;
  4636. position: relative;
  4637. ">
  4638. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  4639. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4640. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  4641. @change="() => {
  4642. $forceUpdate();
  4643. }
  4644. "></textarea>
  4645. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  4646. v-if="askJson.askJson[index1].askItem != 1">
  4647. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  4648. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  4649. </div>
  4650. <div class="a_add_body_div">
  4651. <el-button type="primary" size="small"
  4652. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  4653. <el-button type="primary" size="small" @click="
  4654. deletecheckList(askJson.askJson[index1], checkIndex)
  4655. " v-if="askJson.askJson[index1].askItem != 1">删除
  4656. </el-button>
  4657. </div>
  4658. </div>
  4659. </div>
  4660. <!-- <div class="a_add_body_div">
  4661. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  4662. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  4663. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  4664. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  4665. </el-button>
  4666. </div> -->
  4667. </div>
  4668. </div>
  4669. </div>
  4670. </div>
  4671. <span slot="footer" class="dialog-footer">
  4672. <el-button @click="closePan(4)">取 消</el-button>
  4673. <el-button type="primary" @click="addAsk">确 定</el-button>
  4674. </span>
  4675. </el-dialog>
  4676. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  4677. closePan(45);
  4678. }
  4679. " class="dialog_diy fullStyle">
  4680. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  4681. <!-- <div class="a_add_title" style="
  4682. display: flex;
  4683. flex-direction: row;
  4684. align-items: center;
  4685. justify-content: center;
  4686. ">
  4687. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  4688. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4689. </div> -->
  4690. <div class="a_addBox" style="height: 100%">
  4691. <div style="
  4692. font-size: 16px;
  4693. color: #c7c7c7;
  4694. display: flex;
  4695. align-items: center;
  4696. justify-content: flex-end;
  4697. ">
  4698. <!-- 请输入题目内容 -->
  4699. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  4700. 智能生成
  4701. </button>
  4702. <!-- 请输入题目内容 -->
  4703. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  4704. v-if="isPasteChoice">
  4705. 智能粘贴
  4706. </button>
  4707. </div>
  4708. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  4709. <div class="a_add_checkType">
  4710. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  4711. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  4712. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  4713. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  4714. </div>
  4715. <div class="a_add_head">
  4716. <div class="timuUpImg">
  4717. <div style="display: flex; align-items: center">
  4718. <span style="min-width: fit-content">{{
  4719. index1 + 1 + "、"
  4720. }}</span>
  4721. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  4722. placeholder="请输入题目">
  4723. </el-input> -->
  4724. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4725. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  4726. $forceUpdate();
  4727. }
  4728. "></textarea>
  4729. </div>
  4730. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  4731. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  4732. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  4733. </div>
  4734. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  4735. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4736. <input type="file" accept="image/*" style="display: none"
  4737. @change="beforeUploadTiMu($event, index1)" />
  4738. </div>
  4739. </div>
  4740. <div class="a_add_head_div">
  4741. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  4742. </el-button>
  4743. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  4744. </div>
  4745. </div>
  4746. <div class="timuImgBox" v-if="
  4747. testJson.testJson[index1].timuList &&
  4748. testJson.testJson[index1].timuList.length
  4749. ">
  4750. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  4751. @click.stop="previewImg(timg.src)">
  4752. <img :src="timg.src" alt="" />
  4753. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  4754. <img src="../../../assets/icon/delete.png" alt="" />
  4755. </div>
  4756. </div>
  4757. </div>
  4758. <div class="a_add_body">
  4759. <div class="a_add_input a_add_input_choice">
  4760. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  4761. @change="() => {
  4762. $forceUpdate();
  4763. }
  4764. ">
  4765. <div class="radioBox">
  4766. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  4767. .testItem" :key="checkIndex" :label="checkIndex">
  4768. <div style="margin-right: 10px">
  4769. 选项{{ checkIndex + 1 }}
  4770. </div>
  4771. <div style="margin-right: 10px; width: 300px" v-if="
  4772. testJson.testJson[index1].checkList[checkIndex] &&
  4773. testJson.testJson[index1].checkList[checkIndex]
  4774. .imgType &&
  4775. testJson.testJson[index1].checkList[checkIndex]
  4776. .imgType == 1
  4777. ">
  4778. <div class="inImg" @click.stop="
  4779. previewImg(
  4780. testJson.testJson[index1].checkList[checkIndex]
  4781. .src
  4782. )
  4783. ">
  4784. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  4785. .src
  4786. " lazy />
  4787. <!-- <img :src="
  4788. testJson.testJson[index1].checkList[checkIndex]
  4789. .src
  4790. " alt="" /> -->
  4791. </div>
  4792. </div>
  4793. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  4794. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4795. $forceUpdate();
  4796. }
  4797. "></textarea>
  4798. <div class="xzUpImg" @click.stop="addImg($event)">
  4799. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4800. <input type="file" accept="image/*" style="display: none"
  4801. @change="beforeUploadTi($event, index1, checkIndex)" />
  4802. </div>
  4803. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4804. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  4805. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  4806. </div>
  4807. <div class="a_add_body_div">
  4808. <el-button type="primary" size="small" @click.stop="
  4809. addTcheckList(testJson.testJson[index1], checkIndex)
  4810. ">添加</el-button>
  4811. <el-button type="primary" size="small" @click.stop="
  4812. deleteTcheckList(
  4813. testJson.testJson[index1],
  4814. checkIndex
  4815. )
  4816. " v-if="testJson.testJson[index1].testItem != 1">删除
  4817. </el-button>
  4818. </div>
  4819. </el-radio>
  4820. </div>
  4821. </el-radio-group>
  4822. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  4823. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  4824. $forceUpdate();
  4825. }
  4826. ">
  4827. <div class="radioBox">
  4828. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  4829. .testItem" :key="checkIndex1" :label="checkIndex1">
  4830. <div style="margin-right: 10px">
  4831. 选项{{ checkIndex1 + 1 }}
  4832. </div>
  4833. <div style="margin-right: 10px; width: 300px" v-if="
  4834. testJson.testJson[index1].checkList[checkIndex1] &&
  4835. testJson.testJson[index1].checkList[checkIndex1]
  4836. .imgType &&
  4837. testJson.testJson[index1].checkList[checkIndex1]
  4838. .imgType == 1
  4839. ">
  4840. <div class="inImg" @click.stop="
  4841. previewImg(
  4842. testJson.testJson[index1].checkList[checkIndex1]
  4843. .src
  4844. )
  4845. ">
  4846. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  4847. .src
  4848. " lazy />
  4849. <!-- <img :src="
  4850. testJson.testJson[index1].checkList[checkIndex1]
  4851. .src
  4852. " alt="" /> -->
  4853. </div>
  4854. </div>
  4855. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  4856. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4857. $forceUpdate();
  4858. }
  4859. "></textarea>
  4860. <div class="xzUpImg" @click.stop="addImg($event)">
  4861. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4862. <input type="file" accept="image/*" style="display: none"
  4863. @change="beforeUploadTi($event, index1, checkIndex1)" />
  4864. </div>
  4865. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4866. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  4867. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  4868. </div>
  4869. <div class="a_add_body_div">
  4870. <el-button type="primary" size="small" @click.stop="
  4871. addTcheckList(
  4872. testJson.testJson[index1],
  4873. checkIndex1
  4874. )
  4875. ">添加</el-button>
  4876. <el-button type="primary" size="small" @click.stop="
  4877. deleteTcheckList(
  4878. testJson.testJson[index1],
  4879. checkIndex1
  4880. )
  4881. " v-if="testJson.testJson[index1].testItem != 1">删除
  4882. </el-button>
  4883. </div>
  4884. </el-checkbox>
  4885. </div>
  4886. </el-checkbox-group>
  4887. </div>
  4888. <!-- <div class="a_add_body_div">
  4889. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  4890. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  4891. v-if="testJson.testJson[index1].testItem != 1">删除
  4892. </el-button>
  4893. </div> -->
  4894. </div>
  4895. </div>
  4896. </div>
  4897. </div>
  4898. <span slot="footer" class="dialog-footer">
  4899. <el-button @click="closePan(45)">取 消</el-button>
  4900. <el-button type="primary" @click="addTest">确 定</el-button>
  4901. </span>
  4902. </el-dialog>
  4903. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  4904. :before-close="handleClose" class="dialog_diy addToolsDia">
  4905. <div class="toolChoose">
  4906. <div class="tools">
  4907. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  4908. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  4909. <div style="
  4910. display: flex;
  4911. flex-direction: row;
  4912. align-items: baseline;
  4913. flex-wrap: nowrap;
  4914. justify-content: flex-start;
  4915. position: relative;
  4916. ">
  4917. <div class="chooseWho">
  4918. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  4919. 互动类
  4920. </div>
  4921. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  4922. 思维类
  4923. </div>
  4924. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4925. 评价类
  4926. </div>
  4927. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4928. 其他
  4929. </div>
  4930. </div>
  4931. </div>
  4932. <div style="min-height: 163px">
  4933. <div class="toolSort" v-if="chapToolsType == 0">
  4934. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  4935. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  4936. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4937. <div style="margin: 5px 0">素材库</div>
  4938. </div>
  4939. <div class="noCTool">
  4940. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4941. </div>
  4942. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  4943. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4944. </div>
  4945. <!-- <div class="check" @click="chapAddTools(8)">
  4946. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  4947. <div class="checkDiv" v-else>
  4948. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4949. </div>
  4950. </div> -->
  4951. </div>
  4952. </div>
  4953. <div class="toolSort" v-if="chapToolsType == 1">
  4954. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  4955. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  4956. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4957. <div style="margin: 5px 0">思维网格</div>
  4958. </div>
  4959. <div class="noCTool">
  4960. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4961. </div>
  4962. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  4963. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4964. </div>
  4965. <!-- <div class="check" @click="chapAddTools(7)">
  4966. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  4967. <div class="checkDiv" v-else>
  4968. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4969. </div>
  4970. </div> -->
  4971. </div>
  4972. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  4973. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  4974. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4975. <div style="margin: 5px 0">电子白板</div>
  4976. </div>
  4977. <div class="noCTool">
  4978. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4979. </div>
  4980. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  4981. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4982. </div>
  4983. <!-- <div class="check" @click="chapAddTools(1)">
  4984. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  4985. <div class="checkDiv" v-else>
  4986. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4987. </div>
  4988. </div> -->
  4989. </div>
  4990. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  4991. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  4992. <img src="../../../assets/icon/secondToolList/note.png" alt />
  4993. <div style="margin: 5px 0">便签</div>
  4994. </div>
  4995. <div class="noCTool">
  4996. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4997. </div>
  4998. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  4999. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5000. </div>
  5001. <!-- <div class="check" @click="chapAddTools(2)">
  5002. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  5003. <div class="checkDiv" v-else>
  5004. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5005. </div>
  5006. </div> -->
  5007. </div>
  5008. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  5009. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  5010. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  5011. <div style="margin: 5px 0">协同文档</div>
  5012. </div>
  5013. <div class="noCTool">
  5014. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5015. </div>
  5016. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  5017. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5018. </div>
  5019. <!-- <div class="check" @click="chapAddTools(6)">
  5020. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  5021. <div class="checkDiv" v-else>
  5022. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5023. </div>
  5024. </div> -->
  5025. </div>
  5026. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  5027. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  5028. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  5029. <div style="margin: 5px 0">思维导图</div>
  5030. </div>
  5031. <div class="noCTool">
  5032. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5033. </div>
  5034. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  5035. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5036. </div>
  5037. <!-- <div class="check" @click="chapAddTools(3)">
  5038. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  5039. <div class="checkDiv" v-else>
  5040. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5041. </div>
  5042. </div> -->
  5043. </div>
  5044. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  5045. @click="chapAddTools(31)">
  5046. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  5047. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5048. <div style="margin: 5px 0">数学画板</div>
  5049. </div>
  5050. <div class="noCTool">
  5051. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5052. </div>
  5053. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  5054. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5055. </div>
  5056. <!-- <div class="check" @click="chapAddTools(31)">
  5057. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  5058. <div class="checkDiv" v-else>
  5059. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5060. </div>
  5061. </div> -->
  5062. </div>
  5063. </div>
  5064. <div class="toolSort" v-if="chapToolsType == 2">
  5065. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  5066. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  5067. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  5068. <div style="margin: 5px 0">量规评分</div>
  5069. </div>
  5070. <div class="noCTool">
  5071. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5072. </div>
  5073. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  5074. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5075. </div>
  5076. <!-- <div class="check" @click="chapAddTools(5)">
  5077. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  5078. <div class="checkDiv" v-else>
  5079. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5080. </div>
  5081. </div> -->
  5082. </div>
  5083. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  5084. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  5085. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  5086. <div style="margin: 5px 0">问卷调查</div>
  5087. </div>
  5088. <div class="noCTool">
  5089. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5090. </div>
  5091. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  5092. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5093. </div>
  5094. <!-- <div class="check" @click="chapAddTools(4)">
  5095. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  5096. <div class="checkDiv" v-else>
  5097. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5098. </div>
  5099. </div> -->
  5100. </div>
  5101. </div>
  5102. </div>
  5103. <div>
  5104. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  5105. v-model="itemTools.toolDetail" />
  5106. </div>
  5107. </div>
  5108. </div>
  5109. </div>
  5110. <span slot="footer" class="dialog-footer">
  5111. <el-button @click="dialogVisible4 = false">取 消</el-button>
  5112. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  5113. </span>
  5114. </el-dialog>
  5115. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  5116. closePan(15);
  5117. }
  5118. " class="dialog_diy">
  5119. <div>
  5120. <div class="a_add_title" style="
  5121. display: flex;
  5122. flex-direction: column;
  5123. align-items: flex-start;
  5124. justify-content: center;
  5125. ">
  5126. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5127. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  5128. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  5129. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  5130. </div>
  5131. </div>
  5132. <span slot="footer" class="dialog-footer">
  5133. <el-button @click="closePan(15)">取 消</el-button>
  5134. <el-button type="primary" @click="addAnswer">确 定</el-button>
  5135. </span>
  5136. </el-dialog>
  5137. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  5138. :before-close="handleClose" class="dialog_diy">
  5139. <div>
  5140. <div class="a_add_title" style="
  5141. display: flex;
  5142. flex-direction: column;
  5143. align-items: flex-start;
  5144. justify-content: center;
  5145. ">
  5146. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5147. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  5148. </div>
  5149. </div>
  5150. <span slot="footer" class="dialog-footer">
  5151. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  5152. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  5153. </span>
  5154. </el-dialog>
  5155. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  5156. :before-close="handleClose" class="dialog_diy">
  5157. <div>
  5158. <div class="fileCss" style="padding-top: 20px">
  5159. <div>
  5160. <button class="info_btn" @click="addImg($event)">
  5161. 选择本地文件
  5162. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  5163. </button>
  5164. <div class="spanName">选择本地文件</div>
  5165. </div>
  5166. <!-- <div>
  5167. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  5168. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  5169. <img :src="cover[0].url" alt="" />
  5170. <div class="deletePic" @click="deleteSysPic">
  5171. <img src="../../../assets/icon/delete.png" alt="" />
  5172. </div>
  5173. </div>
  5174. <div class="spanName">选择系统文件</div>
  5175. </div> -->
  5176. <div>
  5177. <el-button @click="(searchImageValue = courseName), resetImage()"
  5178. v-if="isSysPic2 == false">选择网络文件</el-button>
  5179. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  5180. <img :src="cover[0].url" alt="" />
  5181. <div class="deletePic" @click="deleteSysPic">
  5182. <img src="../../../assets/icon/delete.png" alt="" />
  5183. </div>
  5184. </div>
  5185. <div class="spanName">选择网络文件</div>
  5186. </div>
  5187. </div>
  5188. <!-- <div class="fileCss">
  5189. </div> -->
  5190. </div>
  5191. <span slot="footer" class="dialog-footer">
  5192. <el-button @click="choosePicVisible = false">取 消</el-button>
  5193. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  5194. </span>
  5195. </el-dialog>
  5196. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  5197. :before-close="handleClose" class="dialog_diy">
  5198. <div class="cru_selectBox" style="margin: 0">
  5199. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  5200. 绘画
  5201. </div>
  5202. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  5203. 科技
  5204. </div>
  5205. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  5206. 人文
  5207. </div>
  5208. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  5209. 艺术
  5210. </div>
  5211. </div>
  5212. <div class="sysPicBox">
  5213. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  5214. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  5215. </div>
  5216. </div>
  5217. </el-dialog>
  5218. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  5219. :before-close="handleClose" class="dialog_diy">
  5220. <div>
  5221. <div class="people_top_right" style="display: flex; align-items: center">
  5222. <div style="position: relative; width: 100%">
  5223. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  5224. @keyup.enter.native="resetImage()"></el-input>
  5225. <div class="search_img" @click="resetImage" style="right: 10px">
  5226. <img src="../../../assets/icon/search.png" alt />
  5227. </div>
  5228. </div>
  5229. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  5230. </div>
  5231. <div class="sysPicBox" v-loading="imageloading">
  5232. <div class="picNone" v-if="!imageList.length">
  5233. 请输入关键词搜索图片
  5234. </div>
  5235. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  5236. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  5237. </div>
  5238. </div>
  5239. </div>
  5240. </el-dialog>
  5241. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  5242. closePan(41);
  5243. }
  5244. " class="dialog_diy dialog_diy3 fullStyle">
  5245. <div v-if="selectJson" style="height: 100%">
  5246. <div class="select_box1" v-if="selectSteps == 1">
  5247. <div class="select_box1_img">
  5248. <div class="select_box1_title">
  5249. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  5250. </div>
  5251. <div class="select_box1_add_img">
  5252. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  5253. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  5254. <img src="../../../assets/icon/addPoster.png" alt="" />
  5255. </div>
  5256. <div class="isSysPic" v-else>
  5257. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5258. <div class="deletePic" @click="deleteSelectPic">
  5259. <img src="../../../assets/icon/delete.png" alt="" />
  5260. </div>
  5261. </div>
  5262. </div>
  5263. </div>
  5264. <div class="select_box1_select">
  5265. <div class="select_box1_title">
  5266. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  5267. </div>
  5268. <div class="select_box1_select_box">
  5269. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  5270. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  5271. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  5272. <div class="select_box1_select_box_add">
  5273. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  5274. 添加</el-button>
  5275. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  5276. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  5277. </div>
  5278. </div>
  5279. </div>
  5280. </div>
  5281. <div v-if="selectSteps == 2" style="height: 100%">
  5282. <div class="select_box2">
  5283. <div class="select_box2_title">设置每道题目的正确选项</div>
  5284. <div class="select_box2_box">
  5285. <div class="select_box2_img">
  5286. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5287. </div>
  5288. <div class="select_box2_answer">
  5289. <div class="select_answer_title">根据题目选择对应答案</div>
  5290. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  5291. <span>{{ checkIndex + 1 }}、</span>
  5292. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  5293. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  5294. </el-option>
  5295. </el-select>
  5296. </div>
  5297. </div>
  5298. </div>
  5299. </div>
  5300. </div>
  5301. </div>
  5302. <span slot="footer" class="dialog-footer">
  5303. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  5304. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  5305. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  5306. </span>
  5307. </el-dialog>
  5308. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  5309. :before-close="handleClose" class="dialog_diy">
  5310. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  5311. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  5312. <div class="pjCss" style="width: 100%">
  5313. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  5314. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  5315. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  5316. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  5317. <div class="remove" @click="deletRateList(eIndex)"></div>
  5318. <div style="width: 100%; display: flex">
  5319. <span style="min-width: 100px; text-align: right">评星等级:</span>
  5320. <el-rate v-model="eItem.score" disabled></el-rate>
  5321. </div>
  5322. <div class="elist_inptu_text" style="align-items: flex-start">
  5323. <span style="min-width: 100px; text-align: right">描述:</span>
  5324. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  5325. </div>
  5326. </div>
  5327. </div>
  5328. <div class="addToolFun" @click="addRateList()">
  5329. <div class="addToolImg">
  5330. <img src="../../../assets/icon/add.png" alt />
  5331. </div>
  5332. <div>添加</div>
  5333. </div>
  5334. </div>
  5335. </div>
  5336. <span slot="footer" class="dialog-footer">
  5337. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  5338. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  5339. </span>
  5340. </el-dialog>
  5341. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  5342. closePan(47);
  5343. }
  5344. " class="dialog_diy dialog_diy3 fullStyle">
  5345. <div style="height: 100%">
  5346. <div class="sentenBox" style="height: 100%">
  5347. <div class="addSen" @click="addSt">添加题目</div>
  5348. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  5349. <div class="sentenTopBox">
  5350. <div class="sentenTop" :index="stIndex + 1">
  5351. <div>题目设置</div>
  5352. <div>
  5353. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  5354. </div>
  5355. <div @click="addSen(stIndex)">添加</div>
  5356. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  5357. </div>
  5358. </div>
  5359. <div class="cardList">
  5360. <div v-if="st.addSentence.length > 0" class="cardBox">
  5361. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  5362. @click="setRightAnswer(s, stIndex, sIndex)">
  5363. <el-tooltip class="item" effect="light" :content="s" placement="top">
  5364. <div>{{ s }}</div>
  5365. </el-tooltip>
  5366. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  5367. <img src="../../../assets/icon/delete.png" alt="" />
  5368. </div>
  5369. </div>
  5370. </div>
  5371. <div class="card">
  5372. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  5373. </div>
  5374. </div>
  5375. <div class="rightCardBox">
  5376. <div>正确顺序</div>
  5377. <div class="rightCardList">
  5378. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  5379. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  5380. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  5381. <el-tooltip class="item" effect="light" :content="r" placement="top">
  5382. <div>{{ r }}</div>
  5383. </el-tooltip>
  5384. </div>
  5385. <div>{{ rIndex + 1 }}</div>
  5386. </div>
  5387. </div>
  5388. <div class="card" v-if="st.rightAnswer.length == 0">
  5389. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  5390. </div>
  5391. <div class="card" v-else>
  5392. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  5393. </div>
  5394. </div>
  5395. </div>
  5396. </div>
  5397. </div>
  5398. </div>
  5399. <span slot="footer" class="dialog-footer">
  5400. <el-button @click="closePan(47)">取 消</el-button>
  5401. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  5402. </span>
  5403. </el-dialog>
  5404. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  5405. :before-close="handleClose" class="dialog_diy">
  5406. <el-form>
  5407. <!-- <el-form-item label="文本标题">
  5408. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  5409. </el-form-item> -->
  5410. <div>表格内容</div>
  5411. <Table v-model="tableJson.text" @change="change"></Table>
  5412. </el-form>
  5413. <span slot="footer" class="dialog-footer">
  5414. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  5415. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  5416. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  5417. </span>
  5418. </el-dialog>
  5419. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  5420. :before-close="handleClose" class="dialog_diy">
  5421. <el-form>
  5422. <!-- <el-form-item label="文本标题">
  5423. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  5424. </el-form-item> -->
  5425. <div>文档内容</div>
  5426. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  5427. </el-form>
  5428. <span slot="footer" class="dialog-footer">
  5429. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  5430. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  5431. </span>
  5432. </el-dialog>
  5433. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  5434. :before-close="handleClose" class="dialog_diy">
  5435. <div style="
  5436. width: 100%;
  5437. display: flex;
  5438. flex-direction: row;
  5439. flex-wrap: nowrap;
  5440. align-items: center;
  5441. justify-content: center;
  5442. ">
  5443. <div>班级:</div>
  5444. <el-select multiple v-model="uploadJson" placeholder="请选择">
  5445. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  5446. </el-option>
  5447. </el-select>
  5448. </div>
  5449. <span slot="footer" class="dialog-footer">
  5450. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  5451. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  5452. </span>
  5453. </el-dialog>
  5454. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  5455. :before-close="handleClose" class="dialog_diy">
  5456. <div style="
  5457. width: 100%;
  5458. display: flex;
  5459. flex-direction: row;
  5460. flex-wrap: nowrap;
  5461. align-items: center;
  5462. justify-content: center;
  5463. ">
  5464. <div>随机码:</div>
  5465. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  5466. </div>
  5467. <span slot="footer" class="dialog-footer">
  5468. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  5469. <el-button type="primary" @click="addInvite">确定</el-button>
  5470. </span>
  5471. </el-dialog>
  5472. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  5473. :before-close="handleClose" class="dialog_diy">
  5474. <div>
  5475. <div style="margin-bottom: 20px; color: #999">
  5476. 提示:点击“+”或“-”修改倒计时时长。
  5477. </div>
  5478. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  5479. </div>
  5480. <span slot="footer" class="dialog-footer">
  5481. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  5482. <el-button type="primary" @click="addPreTime">确定</el-button>
  5483. </span>
  5484. </el-dialog>
  5485. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  5486. :before-close="handleClose" class="dialog_diy">
  5487. <div>
  5488. <div style="
  5489. width: 100%;
  5490. display: flex;
  5491. flex-direction: row;
  5492. flex-wrap: nowrap;
  5493. align-content: center;
  5494. align-items: center;
  5495. justify-content: space-between;
  5496. ">
  5497. <div style="
  5498. display: flex;
  5499. flex-flow: row nowrap;
  5500. align-items: flex-start;
  5501. width: 100%;
  5502. flex-direction: column;
  5503. flex-wrap: nowrap;
  5504. position: relative;
  5505. ">
  5506. <div class="e_box">
  5507. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  5508. <div class="e_card_picture">
  5509. <img src="../../../assets/e_picture.png" />
  5510. </div>
  5511. <div class="e_card_name">
  5512. <span>{{ item.title }}</span>
  5513. </div>
  5514. <div class="e_card_btn">
  5515. <span @click="checkEva(item.id, 2)">导入</span>
  5516. </div>
  5517. </div> -->
  5518. <!-- <div class="addEva" @click="openT">
  5519. <img src="../../../assets/icon/addEva.png" alt="" />
  5520. </div> -->
  5521. <div style="
  5522. display: flex;
  5523. justify-content: flex-end;
  5524. margin-bottom: 10px;
  5525. ">
  5526. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  5527. </div>
  5528. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  5529. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  5530. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  5531. </el-table-column>
  5532. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  5533. </el-table-column>
  5534. <el-table-column label="操作" width="250px">
  5535. <template slot-scope="scope">
  5536. <div class="btnBox">
  5537. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  5538. </div>
  5539. </template>
  5540. </el-table-column>
  5541. </el-table>
  5542. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  5543. 暂无数据
  5544. </div>
  5545. </div>
  5546. </div>
  5547. </div>
  5548. </div>
  5549. <span slot="footer" class="dialog-footer">
  5550. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  5551. </span>
  5552. </el-dialog>
  5553. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  5554. :before-close="handleClose" class="dialog_diy">
  5555. <div class="groupBox">
  5556. <div v-if="groupJson.group" class="groupContent">
  5557. <div class="groupTitle">请设置小组数量及名称</div>
  5558. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  5559. <span class="groupn">第{{ index + 1 }}组名称:</span>
  5560. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  5561. <div class="groupBtn">
  5562. <el-button type="primary" size="small" @click="addGroup(index)"
  5563. v-if="groupJson.group.length - 1 == index">
  5564. 添加</el-button>
  5565. <el-button type="primary" size="small" @click="deleteGroup(index)"
  5566. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  5567. </div>
  5568. </div>
  5569. </div>
  5570. <div class="groupContent">
  5571. <div class="groupTitle">请设置每组人数</div>
  5572. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  5573. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  5574. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  5575. @change="numberPan"></el-input>
  5576. </div>
  5577. </div>
  5578. <span slot="footer" class="dialog-footer">
  5579. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  5580. <el-button type="primary" @click="addGroupJson">确定</el-button>
  5581. </span>
  5582. </el-dialog>
  5583. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  5584. :before-close="handleClose" class="dialog_diy">
  5585. <div style="
  5586. width: 100%;
  5587. display: flex;
  5588. flex-direction: row;
  5589. flex-wrap: nowrap;
  5590. align-items: center;
  5591. justify-content: center;
  5592. ">
  5593. <div style="min-width: fit-content">文件名称:</div>
  5594. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  5595. </div>
  5596. <span slot="footer" class="dialog-footer">
  5597. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  5598. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  5599. </span>
  5600. </el-dialog>
  5601. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  5602. closePan(69);
  5603. }
  5604. " class="dialog_diy fullStyle fullStyle1">
  5605. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  5606. <span slot="footer" class="dialog-footer">
  5607. <el-button @click="englishDialogVisible = false">取 消</el-button>
  5608. <el-button type="primary" @click="addEnglish">确 定</el-button>
  5609. </span>
  5610. </el-dialog>
  5611. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  5612. :before-close="handleClose" class="dialog_diy">
  5613. <div class="template_box">
  5614. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  5615. :class="{ wordTeacherA: ctJson.id == aa.id }">
  5616. <div class="wordPic">
  5617. <img src="../../../assets/icon/new/course_template.png" alt />
  5618. </div>
  5619. <el-tooltip effect="dark" :content="aa.title" placement="top">
  5620. <div style="
  5621. margin-top: 10px;
  5622. line-height: 19px;
  5623. overflow: hidden;
  5624. text-overflow: ellipsis;
  5625. white-space: nowrap;
  5626. padding: 0 10px;
  5627. box-sizing: border-box;
  5628. width: 100%;
  5629. ">
  5630. {{ aa.title }}
  5631. </div>
  5632. </el-tooltip>
  5633. </div>
  5634. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  5635. :class="{ wordTeacherA: ctJson.id == 1 }">
  5636. <div class="wordPic">
  5637. <img src="../../../assets/icon/new/course_template.png" alt />
  5638. </div>
  5639. <div style="
  5640. margin-top: 10px;
  5641. line-height: 19px;
  5642. overflow: hidden;
  5643. text-overflow: ellipsis;
  5644. white-space: nowrap;
  5645. padding: 0 20px;
  5646. ">
  5647. 简易模板
  5648. </div>
  5649. </div>
  5650. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  5651. :class="{ wordTeacherA: ctJson.id == 2 }">
  5652. <div class="wordPic">
  5653. <img src="../../../assets/icon/new/course_template.png" alt />
  5654. </div>
  5655. <div style="
  5656. margin-top: 10px;
  5657. line-height: 19px;
  5658. overflow: hidden;
  5659. text-overflow: ellipsis;
  5660. white-space: nowrap;
  5661. padding: 0 20px;
  5662. ">
  5663. 智能粘贴模式
  5664. </div>
  5665. </div>
  5666. </div>
  5667. <span slot="footer" class="dialog-footer">
  5668. <el-button @click="templateDialog = false">取 消</el-button>
  5669. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  5670. </span>
  5671. </el-dialog>
  5672. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  5673. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  5674. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  5675. <div class="change_stageBox">
  5676. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  5677. <div class="nt_taskBox">
  5678. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  5679. <div class="nt_taskName">
  5680. <el-tooltip effect="light" :content="t.dyName" placement="top">
  5681. <span>{{ t.dyName }}</span>
  5682. </el-tooltip>
  5683. </div>
  5684. </div>
  5685. <div class="moveBtn" v-if="unitJson3.length > 1">
  5686. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  5687. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  5688. </div>
  5689. </div>
  5690. </div>
  5691. <span slot="footer" class="dialog-footer">
  5692. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  5693. <el-button type="primary" @click="updateChange">确定</el-button>
  5694. </span>
  5695. </el-dialog>
  5696. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  5697. :before-close="handleClose" class="dialog_diy">
  5698. <div class="addTypeChoose" style="justify-content: center">
  5699. <div style="min-width: 100px">模板名称:</div>
  5700. <el-input v-model="templateName" style="width: 200px"></el-input>
  5701. </div>
  5702. <div class="addTypeBox">
  5703. <div class="addTypeChoose">
  5704. <div style="min-width: 100px">选择一级分类:</div>
  5705. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  5706. style="width: 200px">
  5707. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  5708. </el-option>
  5709. </el-select>
  5710. </div>
  5711. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  5712. <div style="min-width: 100px">选择二级分类:</div>
  5713. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  5714. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  5715. </el-option>
  5716. </el-select>
  5717. </div>
  5718. </div>
  5719. <span slot="footer" class="dialog-footer">
  5720. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  5721. <el-button @click="close()">关 闭</el-button>
  5722. </span>
  5723. </el-dialog>
  5724. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  5725. </evaBox>
  5726. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  5727. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  5728. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
  5729. </aiDialog>
  5730. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  5731. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  5732. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  5733. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  5734. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  5735. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  5736. </div>
  5737. </template>
  5738. <script>
  5739. import "../../../common/aws-sdk-2.235.1.min.js";
  5740. import { tools as toolsData } from "../../../common/tools.js";
  5741. // import "../../../common/aws-sdk-2.99.0.min.js";
  5742. import $ from "jquery";
  5743. import EditorBar from "../../../components/tools/wangEnduit";
  5744. import Table from "../../../components/tools/table";
  5745. import Mind from "../../tools/jsmind2";
  5746. import Time from "../../tools/time.vue";
  5747. import Sunburst from "../../tools/sunburst";
  5748. import SeeBoard from "../../tools/seeBoard";
  5749. import weilaiData from "../components/weilai.js";
  5750. import sourceDialog from "../teacherSource/dialog.vue";
  5751. import interVideo from "../interVideo/index.vue";
  5752. import englishRight from "../components/englishRight.vue";
  5753. import evaBox from "../evaBox/index.vue";
  5754. import EnglishVoice from "../EnglishVoice/index.vue";
  5755. import aiBox from './aiBox.vue'
  5756. import aiDialog from './aiDialog'
  5757. import aiTips from './aiTips.vue'
  5758. import tipsDialog from './tipsDialog.vue'
  5759. import { v4 as uuidv4 } from "uuid";
  5760. import MarkdownIt from "markdown-it";
  5761. import aiCreateDialog from './aiCreateDialog.vue'
  5762. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  5763. import wpdf from "../test/file/wPdf2.vue";
  5764. import wOffice from "../test/file/wOffice.vue";
  5765. var OpenCC = require("opencc-js");
  5766. let converter = OpenCC.Converter({
  5767. from:'hk',
  5768. to:'cn'
  5769. })
  5770. export default {
  5771. components: {
  5772. EditorBar,
  5773. Mind,
  5774. Time,
  5775. Sunburst,
  5776. SeeBoard,
  5777. Table,
  5778. sourceDialog,
  5779. interVideo,
  5780. englishRight,
  5781. evaBox,
  5782. EnglishVoice,
  5783. aiBox,
  5784. aiDialog,
  5785. aiTips,
  5786. tipsDialog,
  5787. aiCreateDialog,
  5788. aiCreateVideoDialog,
  5789. wpdf,
  5790. wOffice,
  5791. },
  5792. data() {
  5793. return {
  5794. checkAll: false,
  5795. checkAll2: false,
  5796. chooseType: 1,
  5797. checkedCities: [],
  5798. isIndeterminate: true,
  5799. isIndeterminate2: true,
  5800. isSysPic: false,
  5801. isSysPic2: false,
  5802. steps: 1,
  5803. stepsNav: 1,
  5804. nbOrder: 0,
  5805. courseId: "",
  5806. chapToolsType: 0,
  5807. chapTools: [
  5808. {
  5809. tools: [],
  5810. toolDetail: "",
  5811. },
  5812. ],
  5813. line: "",
  5814. lineTitle: "",
  5815. sysPic: [],
  5816. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  5817. sentenceList2: [],
  5818. isPushTitleList: [],
  5819. lineCount: 0,
  5820. lineType: 0,
  5821. chapCount: 0,
  5822. courseName: "",
  5823. isTeacherSee: false,
  5824. courseText: "",
  5825. textLoading: false,
  5826. ttextLoading: false,
  5827. courseText2: "",
  5828. preTime: 0,
  5829. formLabelWidth: "100px",
  5830. choosePicVisible: false,
  5831. sysPicVisible: false,
  5832. sysPicVisible2: false,
  5833. uploadLoading1: false,
  5834. noneBtnImg: false,
  5835. updateBoolean2: false,
  5836. unitIndex: 0,
  5837. taskCount: 0,
  5838. dialogVisible: false,
  5839. dialogVisible1: false,
  5840. dialogVisible2: false,
  5841. dialogVisible3: false,
  5842. dialogVisible4: false,
  5843. dialogVisible5: false,
  5844. dialogVisible6: false,
  5845. dialogVisible7: false,
  5846. dialogVisible8: false,
  5847. dialogVisible9: false,
  5848. dialogVisibleClass: false,
  5849. dialogVisibleMember: false,
  5850. dialogVisibleMp3: false,
  5851. dialogVisibleSelect: false,
  5852. dialogVisibleSentence: false,
  5853. dialogVisibleRate: false,
  5854. dialogVisibleChoice: false,
  5855. dialogVisiblemb: false,
  5856. dialogVisibleInvite: false,
  5857. dialogVisibleSource: false,
  5858. dialogVisibleVideo: false,
  5859. dialogVisibleStageChange: false,
  5860. dialogVisibleupdataVideoT: false,
  5861. englishDialogVisible: false,
  5862. templateDialog: false,
  5863. ctJson: {},
  5864. isClickColor: 1,
  5865. toolIndexType: "",
  5866. publicTool: 0,
  5867. searchPeople: "",
  5868. searchTN: "",
  5869. collid: '',
  5870. CollLoading: false,
  5871. userid: this.$route.query.userid,
  5872. oid: this.$route.query.oid,
  5873. org: this.$route.query.org,
  5874. role: this.$route.query.role,
  5875. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  5876. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  5877. dialogVisibleTable: false,
  5878. dialogVisibleWord: false,
  5879. tableJson: { text: "" },
  5880. wordJson: { text: "" },
  5881. dialogVisibleMoreUpload: false,
  5882. dialogVisiblePreTime: false,
  5883. uploadJson: [],
  5884. classJuri: [],
  5885. gradeList: [],
  5886. cover: [], //课程封面
  5887. myWord: [],
  5888. evaJuri: [],
  5889. evalua: "",
  5890. targetArray: [],
  5891. eTitle: "",
  5892. eJson: {},
  5893. fid: "", //一级
  5894. sid: "", //二级
  5895. tid: "", //二级
  5896. typeMode: 1,
  5897. eJSONNum: 0,
  5898. data: {
  5899. meta: {
  5900. name: "example",
  5901. author: "dd@163.com",
  5902. version: "0.2",
  5903. },
  5904. format: "node_array",
  5905. data: [{ id: "root", isroot: true, topic: "" }],
  5906. },
  5907. askJson: {
  5908. askCount: 1,
  5909. askTitle: "",
  5910. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5911. },
  5912. askJson2: {},
  5913. testJson: {},
  5914. testJson2: {},
  5915. selectJson: {},
  5916. selectJson2: {},
  5917. rateJson: [],
  5918. unitJson2: [],
  5919. unitJson3: [],
  5920. unitJson: [
  5921. {
  5922. dyName: "", //单元标题
  5923. chapterInfo: [
  5924. {
  5925. isread: false,
  5926. chapterid: this.guid(),
  5927. title: "",
  5928. courseName: "",
  5929. taskJson: [
  5930. {
  5931. task: "",
  5932. taskDetail: "",
  5933. chapterData: [],
  5934. toolText: "",
  5935. toolChoose: [
  5936. {
  5937. tool: [],
  5938. toolDetail: "",
  5939. toolType: 0,
  5940. askCount: 1,
  5941. askTitle: "",
  5942. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5943. },
  5944. ],
  5945. isShowTools: false,
  5946. askCount: 1,
  5947. isFold: 1,
  5948. askTitle: "",
  5949. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5950. checkJson: [{ checkCount: [], checkPerent: [] }],
  5951. homeworkList: [],
  5952. },
  5953. ],
  5954. itemCount: 1,
  5955. fileList1: [],
  5956. video: [],
  5957. testData: [],
  5958. pData: [],
  5959. templateArray: [],
  5960. },
  5961. ],
  5962. },
  5963. ],
  5964. templateArray: [],
  5965. studentJuri: [],
  5966. teacherJuri: [],
  5967. CollaborativeTeaList: [],
  5968. checkboxList: [],
  5969. checkboxList2: [],
  5970. checkboxList3: [],
  5971. classSearch: "",
  5972. gradeId: "",
  5973. number: "",
  5974. tTitle: "",
  5975. tdetail: "",
  5976. templateC: {},
  5977. AttText: {},
  5978. AttTextType: 0,
  5979. AttTextIndex: 0,
  5980. cTemplate: "",
  5981. CourseType: [],
  5982. CourseType1: [],
  5983. CourseType2: [],
  5984. CourseTypeJson: {},
  5985. CourseTypeJson1: {},
  5986. courseTypeId: [],
  5987. courseTypeId1: [],
  5988. courseTypeSon: [],
  5989. clearArray: [],
  5990. pTypeCheck: [],
  5991. pTypeCheckName: [],
  5992. loading: false,
  5993. toolType: 0,
  5994. inputShow: true,
  5995. inputShow2: true,
  5996. toolIndex: 0,
  5997. cidType: 0,
  5998. answerQ: "",
  5999. answerQ2: "",
  6000. grade: [],
  6001. grade2: [],
  6002. courseUserid: "",
  6003. timer: null,
  6004. timer2: null,
  6005. pasteTimer: null,
  6006. checkId: "",
  6007. isDelete: 1,
  6008. addindex: 0,
  6009. selectSteps: 1,
  6010. groupJson: {},
  6011. dialogVisibleGroup: false,
  6012. rightBoxHeight: 0,
  6013. ManAarray: [],
  6014. checkBoolean: false,
  6015. inviteCode: [],
  6016. inviteId: "",
  6017. icode: "",
  6018. easyArray: [2, 4],
  6019. sourceData: {},
  6020. updateSourcePan: false,
  6021. videoJson: {},
  6022. isBtnDisplay: false,
  6023. isStepDisplay: false,
  6024. isPasteStage: false,
  6025. isPasteTask: false,
  6026. isPasteChoice: false,
  6027. imageList: [],
  6028. imageloading: false,
  6029. imageloading2: false,
  6030. searchImageValue: "",
  6031. ppage: 1,
  6032. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  6033. oldIndex: 0,
  6034. dragType: "",
  6035. oldUnitIndex: 0,
  6036. oldData: null,
  6037. newIndex: "",
  6038. englishList: {},
  6039. typeIndex: "",
  6040. courseState: 5,
  6041. taskJSONa: [
  6042. {
  6043. task: "",
  6044. taskDetail: "",
  6045. chapterData: [],
  6046. toolText: "",
  6047. toolChoose: [
  6048. {
  6049. tool: [],
  6050. toolDetail: "",
  6051. toolType: 0,
  6052. askCount: 1,
  6053. askTitle: "",
  6054. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6055. },
  6056. ],
  6057. isShowTools: false,
  6058. askCount: 1,
  6059. isFold: 1,
  6060. askTitle: "",
  6061. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6062. checkJson: [{ checkCount: [], checkPerent: [] }],
  6063. homeworkList: [],
  6064. },
  6065. ],
  6066. checkUnitIndex: 0,
  6067. isdrag: "",
  6068. evaIndex: "",
  6069. evatIndex: "",
  6070. evaBoxDialog: false,
  6071. EnglishVoiceDialog: false,
  6072. englishVoiceJson: {},
  6073. cetIndex: "",
  6074. cettIndex: "",
  6075. cetBoxDialog: false,
  6076. templateName: "",
  6077. setTypeJson: {
  6078. one: "",
  6079. two: "",
  6080. },
  6081. twoJson: [],
  6082. oneJson: [],
  6083. updateKey: 1,
  6084. isOutline: false,
  6085. isOutline2: false,
  6086. infoData: [],
  6087. infoproVisible: false,
  6088. infoisFinishSize: 0,
  6089. infoisAllSize: 0,
  6090. infoprogress: 0,
  6091. taskDetailLoading: [],
  6092. ttaskDetailLoading: [],
  6093. taskDetailLoading2: [],
  6094. ttaskDetailLoading2: [],
  6095. taskDetailLoading3: [],
  6096. ttaskDetailLoading3: [],
  6097. taskDetailLoading4: [],
  6098. taskDetailLoading5: [],
  6099. ttaskDetailLoading5: [],
  6100. dArray: [],
  6101. dialogVisibleAiD: false,
  6102. aitype: "",
  6103. aiJson: {
  6104. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  6105. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  6106. "aiTask": "请根据<教学任务教案>。",
  6107. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  6108. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  6109. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  6110. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  6111. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  6112. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  6113. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  6114. },
  6115. aiText: "",
  6116. aiCallBack: "",
  6117. aiIndex: "",
  6118. clickType: 1,
  6119. promptShow: false,
  6120. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  6121. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  6122. dialogVisibleTips: false,
  6123. tipsJson: {},
  6124. cpote:{
  6125. cpote1: '',
  6126. cpote2: '',
  6127. cpote3: '',
  6128. cpote4: '',
  6129. },
  6130. cpoteLoading:{
  6131. cpote1: false,
  6132. cpote2: false,
  6133. cpote3: false,
  6134. cpote4: false,
  6135. },
  6136. cpotetLoading:{
  6137. cpote1: false,
  6138. cpote2: false,
  6139. cpote3: false,
  6140. cpote4: false,
  6141. },
  6142. cpoteType: 0,
  6143. dialogVisibleAiCreate: false,
  6144. dialogVisibleAiCreateVideo: false,
  6145. teacherText: [],
  6146. isFileSearch: true,
  6147. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  6148. 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'],
  6149. courseJie:1,
  6150. courseTime:45,
  6151. allTextArray: [],
  6152. dialogVisiblePdf: false,
  6153. dialogVisibleOffice: false,
  6154. wurl: "",
  6155. choiceLoading: false,
  6156. };
  6157. },
  6158. directives: {
  6159. autoHeight: {
  6160. update(el, binding) {
  6161. const { value } = binding;
  6162. if (value && typeof value === "number") {
  6163. el.style.height = `${value}px`;
  6164. } else {
  6165. el.style.height = "auto";
  6166. }
  6167. },
  6168. componentUpdated(el) {
  6169. el.style.height = `${el.scrollHeight + 25}px`;
  6170. },
  6171. },
  6172. },
  6173. computed: {
  6174. // rightBoxHeight: function () {
  6175. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  6176. // },
  6177. offsetLetfPx: function () {
  6178. //addnum可以直接在模板语法里面用,相当于data内的值
  6179. return (
  6180. $(".cru_select")[this.unitIndex] &&
  6181. $(".cru_select")[this.unitIndex].offsetLeft + 5
  6182. );
  6183. },
  6184. getMan2() {
  6185. return function (people) {
  6186. let _people = people;
  6187. let _people2 = "";
  6188. if (this.ManAarray.length) {
  6189. for (var i = 0; i < this.ManAarray.length; i++) {
  6190. if (this.ManAarray[i].userid == people) {
  6191. _people2 = this.ManAarray[i].name;
  6192. break;
  6193. }
  6194. }
  6195. }
  6196. if (people == this.courseUserid) {
  6197. return "";
  6198. }
  6199. return this.ManAarray.length ? _people2 : "";
  6200. };
  6201. },
  6202. getListMan2() {
  6203. return function (list) {
  6204. let _people2 = [];
  6205. if (this.ManAarray.length) {
  6206. for (var j = 0; j < list.length; j++) {
  6207. let people = list[j];
  6208. for (var i = 0; i < this.ManAarray.length; i++) {
  6209. if (
  6210. this.ManAarray[i].userid == people &&
  6211. people != this.courseUserid
  6212. ) {
  6213. _people2.push(this.ManAarray[i].name);
  6214. break;
  6215. }
  6216. }
  6217. }
  6218. }
  6219. return this.ManAarray.length ? _people2.join("、") : "";
  6220. };
  6221. },
  6222. isInvite() {
  6223. return function (cid) {
  6224. let array = [];
  6225. for (var i = 0; i < this.inviteCode.length; i++) {
  6226. array.push(this.inviteCode[i].cid);
  6227. }
  6228. return array.indexOf(cid) != -1;
  6229. };
  6230. },
  6231. getInviteCodeC() {
  6232. return function (cid) {
  6233. let array = [];
  6234. for (var i = 0; i < this.inviteCode.length; i++) {
  6235. array.push(this.inviteCode[i].cid);
  6236. }
  6237. return this.inviteCode[array.indexOf(cid)].ic;
  6238. };
  6239. },
  6240. getClassC() {
  6241. return function (c) {
  6242. let _c2 = "";
  6243. if (this.grade.length) {
  6244. for (var i = 0; i < this.grade.length; i++) {
  6245. if (this.grade[i].id == c) {
  6246. _c2 = this.grade[i].name;
  6247. break;
  6248. }
  6249. }
  6250. }
  6251. return this.grade.length ? _c2 : "";
  6252. };
  6253. },
  6254. getListClassC() {
  6255. return function (list) {
  6256. let _c2 = [];
  6257. if (this.grade.length) {
  6258. for (var j = 0; j < list.length; j++) {
  6259. let c = list[j];
  6260. for (var i = 0; i < this.grade.length; i++) {
  6261. if (this.grade[i].id == c) {
  6262. _c2.push(this.grade[i].name);
  6263. break;
  6264. }
  6265. }
  6266. }
  6267. }
  6268. return this.grade.length ? _c2.join("、") : "";
  6269. };
  6270. },
  6271. MarkdownT() {
  6272. return function (c) {
  6273. let md = new MarkdownIt();
  6274. return c
  6275. ? md.render(c) : "";
  6276. };
  6277. },
  6278. panOutline(){
  6279. return function () {
  6280. let count = 0;
  6281. for(var i = 0; i < this.unitJson.length; i++){
  6282. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6283. for(var j = 0; j < _task.length; j++){
  6284. if(_task[j].taskDetail2){
  6285. count++
  6286. }
  6287. }
  6288. }
  6289. return count;
  6290. };
  6291. },
  6292. panTeacher(){
  6293. return function () {
  6294. let count = 0;
  6295. for(var i = 0; i < this.unitJson.length; i++){
  6296. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6297. for(var j = 0; j < _task.length; j++){
  6298. if(_task[j].taskDetail3){
  6299. count++
  6300. }
  6301. }
  6302. }
  6303. return count;
  6304. };
  6305. },
  6306. },
  6307. watch: {
  6308. unitIndex(newValue, oldValue) {
  6309. // return;
  6310. if (this.isDelete == 2) {
  6311. this.isDelete = 1;
  6312. return;
  6313. }
  6314. if (this.cid != "") {
  6315. let _unitIndex = oldValue;
  6316. if (
  6317. JSON.stringify(this.unitJson2[_unitIndex]) ==
  6318. JSON.stringify(this.unitJson[_unitIndex])
  6319. ) {
  6320. this.$refs.rightboxR.scrollTop = 0;
  6321. return;
  6322. }
  6323. let cPan = 1;
  6324. for (
  6325. var j = 0;
  6326. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  6327. j++
  6328. ) {
  6329. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  6330. j
  6331. ].proVisible = false;
  6332. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  6333. j
  6334. ].proVisible2 = false;
  6335. if (
  6336. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6337. .length > 1
  6338. ) {
  6339. for (
  6340. var z = 0;
  6341. z <
  6342. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6343. .length;
  6344. z++
  6345. ) {
  6346. if (
  6347. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  6348. .toolChoose[z].tool.length
  6349. ) {
  6350. this.$message.error("请把工具添加完整");
  6351. cPan = 2;
  6352. break;
  6353. }
  6354. }
  6355. }
  6356. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  6357. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  6358. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  6359. (ele) => {
  6360. return ele.value != "";
  6361. }
  6362. );
  6363. }
  6364. }
  6365. if (cPan == 2) {
  6366. this.unitIndex = oldValue;
  6367. return;
  6368. }
  6369. for (var i = 0; i < this.unitJson.length; i++) {
  6370. if (this.addindex != i) {
  6371. delete this.unitJson[i].isUpdate;
  6372. }
  6373. }
  6374. this.$refs.rightboxR.scrollTop = 0;
  6375. this.addindex = -1;
  6376. let params = [
  6377. {
  6378. cid: this.cid,
  6379. chapters: JSON.stringify(this.unitJson),
  6380. uid: this.userid,
  6381. unitIndex: _unitIndex,
  6382. },
  6383. ];
  6384. this.ajax
  6385. .post(this.$store.state.api + "updateWorkNew4", params)
  6386. .then((res) => {
  6387. // this.$message({
  6388. // message: "修改成功",
  6389. // type: "success",
  6390. // });
  6391. // this.courseId = this.cid;
  6392. this.addtips()
  6393. })
  6394. .catch((err) => {
  6395. this.$message.error("网络不佳");
  6396. console.error(err);
  6397. });
  6398. }
  6399. },
  6400. steps(newValue, old) {
  6401. if (newValue == 4) {
  6402. let cPan = 1;
  6403. for (var i = 0; i < this.unitJson.length; i++) {
  6404. for (
  6405. var j = 0;
  6406. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  6407. j++
  6408. ) {
  6409. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  6410. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  6411. if (
  6412. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  6413. ) {
  6414. for (
  6415. var z = 0;
  6416. z <
  6417. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  6418. z++
  6419. ) {
  6420. if (
  6421. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  6422. .tool.length
  6423. ) {
  6424. this.$message.error("请把工具添加完整");
  6425. cPan = 2;
  6426. break;
  6427. }
  6428. }
  6429. }
  6430. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  6431. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  6432. i
  6433. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  6434. return ele.value != "";
  6435. });
  6436. }
  6437. }
  6438. }
  6439. this.inputShow = true;
  6440. if (cPan == 2) {
  6441. this.steps = old;
  6442. return;
  6443. }
  6444. this.goTo(
  6445. "/course?userid=" +
  6446. this.userid +
  6447. "&oid=" +
  6448. this.oid +
  6449. "&org=" +
  6450. this.org +
  6451. "&role=" +
  6452. this.role
  6453. );
  6454. }
  6455. },
  6456. },
  6457. methods: {
  6458. tableRowClassName({ row, rowIndex }) {
  6459. if ((rowIndex + 1) % 2 === 0) {
  6460. return "even_row";
  6461. } else {
  6462. return "";
  6463. }
  6464. },
  6465. close() {
  6466. this.cetIndex = "";
  6467. this.cettIndex = "";
  6468. this.templateName = "";
  6469. this.cetBoxDialog = false;
  6470. },
  6471. openAI() {
  6472. top.postMessage({ tools: "64" }, "*");
  6473. },
  6474. setMan() {
  6475. // let teacherJuri = this.teacherJuri2;
  6476. this.ManAarray = [];
  6477. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  6478. if (_user.indexOf(this.userid) == -1) {
  6479. _user.push(this.userid);
  6480. }
  6481. if (_user.indexOf(this.courseUserid) == -1) {
  6482. _user.push(this.courseUserid);
  6483. }
  6484. let params = {
  6485. uid: _user.join(","),
  6486. };
  6487. this.ajax
  6488. .get(this.$store.state.api + "getAllUserById", params)
  6489. .then((res) => {
  6490. let teacherJuri = res.data[0];
  6491. this.ManAarray = teacherJuri;
  6492. })
  6493. .catch((err) => {
  6494. console.error(err);
  6495. });
  6496. },
  6497. previewImg(url) {
  6498. this.$hevueImgPreview(url);
  6499. },
  6500. btnDisplay(bool) {
  6501. this.isBtnDisplay = bool;
  6502. },
  6503. stepDisplay(bool) {
  6504. this.isStepDisplay = bool;
  6505. },
  6506. scrollChange() {
  6507. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  6508. },
  6509. addHw(e) {
  6510. var el = e.currentTarget;
  6511. el.getElementsByTagName("input")[0].click();
  6512. },
  6513. change(val) {
  6514. if (this.dialogVisible1) {
  6515. this.tdetail = val;
  6516. } else if (this.dialogVisible6) {
  6517. this.AttText.text = val;
  6518. } else if (this.dialogVisible2) {
  6519. this.cTemplate = val;
  6520. } else if (this.dialogVisibleTable) {
  6521. this.tableJson.text = val;
  6522. }
  6523. this.$forceUpdate();
  6524. console.log(val);
  6525. },
  6526. change2(val) {
  6527. console.log(val);
  6528. this.$forceUpdate();
  6529. },
  6530. handleClose(done) {
  6531. done();
  6532. },
  6533. closePan(tool) {
  6534. if (tool == 15) {
  6535. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  6536. this.dialogVisible8 = false;
  6537. } else {
  6538. this.closeConfirm(tool);
  6539. }
  6540. } else if (tool == 4) {
  6541. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  6542. this.dialogVisible5 = false;
  6543. } else {
  6544. this.closeConfirm(tool);
  6545. }
  6546. } else if (tool == 45) {
  6547. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  6548. this.dialogVisibleChoice = false;
  6549. } else {
  6550. this.closeConfirm(tool);
  6551. }
  6552. } else if (tool == 41) {
  6553. if (
  6554. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  6555. ) {
  6556. this.dialogVisibleSelect = false;
  6557. } else {
  6558. this.closeConfirm(tool);
  6559. }
  6560. } else if (tool == 47) {
  6561. if (
  6562. JSON.stringify(this.sentenceList) ==
  6563. JSON.stringify(this.sentenceList2)
  6564. ) {
  6565. this.dialogVisibleSentence = false;
  6566. } else {
  6567. this.closeConfirm(tool);
  6568. }
  6569. } else if (tool == 69) {
  6570. if (
  6571. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  6572. ) {
  6573. this.englishDialogVisible = false;
  6574. } else {
  6575. this.closeConfirm(tool);
  6576. }
  6577. }
  6578. },
  6579. closeConfirm(tool) {
  6580. this.$confirm("是否保存已编辑内容?", "提示", {
  6581. confirmButtonText: "保存",
  6582. cancelButtonText: "不保存",
  6583. type: "warning",
  6584. })
  6585. .then(() => {
  6586. if (tool == 15) {
  6587. this.addAnswer();
  6588. } else if (tool == 4) {
  6589. this.addAsk();
  6590. } else if (tool == 45) {
  6591. this.addTest();
  6592. } else if (tool == 41) {
  6593. this.addSelectAnswer();
  6594. } else if (tool == 47) {
  6595. this.addSentenceTool();
  6596. } else if (tool == 69) {
  6597. this.addEnglish();
  6598. }
  6599. })
  6600. .catch(() => {
  6601. if (tool == 15) {
  6602. this.dialogVisible8 = false;
  6603. } else if (tool == 4) {
  6604. this.dialogVisible5 = false;
  6605. } else if (tool == 45) {
  6606. this.dialogVisibleChoice = false;
  6607. } else if (tool == 41) {
  6608. this.dialogVisibleSelect = false;
  6609. } else if (tool == 47) {
  6610. this.dialogVisibleSentence = false;
  6611. } else if (tool == 69) {
  6612. this.englishDialogVisible = false;
  6613. }
  6614. });
  6615. },
  6616. addEnglish(jsonType) {
  6617. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  6618. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  6619. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  6620. if (
  6621. this.englishList.engTitle == "" ||
  6622. this.englishList.englishText == ""
  6623. ) {
  6624. this.$message.error("请将内容填写完整!");
  6625. return;
  6626. }
  6627. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6628. this.taskCount
  6629. ].toolChoose[this.toolIndex].englishList = this.englishList;
  6630. this.englishList = {};
  6631. if (jsonType && jsonType == 1) {
  6632. this.englishDialogVisible = true;
  6633. } else {
  6634. this.englishDialogVisible = false;
  6635. }
  6636. if (
  6637. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  6638. .toolChoose[this.toolIndex].tool != 69
  6639. ) {
  6640. this.addTools(69, this.taskCount, this.toolIndex);
  6641. }
  6642. },
  6643. imgChange2(i, j) {
  6644. var _tmp = this.testJson.testJson[i].checkList[j];
  6645. this.noneBtnImg = _tmp.length >= 1;
  6646. },
  6647. imgChange3(i) {
  6648. var _tmp = this.testJson.testJson[i];
  6649. this.noneBtnImg = _tmp.length >= 1;
  6650. },
  6651. imgChange1(file, fileList, type, itemTaskIndex) {
  6652. if (type == 1) {
  6653. var _tmp = this.cover;
  6654. } else if (
  6655. type == 2 ||
  6656. type == 3 ||
  6657. type == 6 ||
  6658. type == 7 ||
  6659. type == 8
  6660. ) {
  6661. var _tmp =
  6662. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6663. .chapterData;
  6664. } else if (type == 4) {
  6665. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  6666. } else {
  6667. var _tmp =
  6668. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6669. .homeworkList;
  6670. }
  6671. this.noneBtnImg = _tmp.length >= 1;
  6672. },
  6673. goTo(path) {
  6674. this.$router.push(path);
  6675. },
  6676. guid() {
  6677. var _num,
  6678. i,
  6679. _guid = "";
  6680. for (i = 0; i < 32; i++) {
  6681. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  6682. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  6683. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  6684. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  6685. _guid += "-";
  6686. }
  6687. }
  6688. return _guid;
  6689. },
  6690. retrunCourse() {
  6691. if(this.istemplate == 1){
  6692. this.goTo(
  6693. "/course?userid=" +
  6694. this.userid +
  6695. "&oid=" +
  6696. this.oid +
  6697. "&org=" +
  6698. this.org +
  6699. "&role=" +
  6700. this.role
  6701. );
  6702. return
  6703. }
  6704. this.$confirm("是否保存已编辑内容?", "提示", {
  6705. confirmButtonText: "保存",
  6706. cancelButtonText: "不保存",
  6707. distinguishCancelAndClose: true,
  6708. type: "warning",
  6709. })
  6710. .then(() => {
  6711. if (this.cid == "" || this.cid == undefined) {
  6712. if (this.courseName == "") {
  6713. this.$message.error("请补充填写课程名称");
  6714. return;
  6715. } else {
  6716. this.addWork();
  6717. }
  6718. this.steps = 4;
  6719. } else {
  6720. if (this.courseName == "") {
  6721. this.$message.error("请补充填写课程名称");
  6722. return;
  6723. } else {
  6724. if (this.userid != this.courseUserid && this.role != "1") {
  6725. this.updateWork2();
  6726. } else {
  6727. this.updateWork();
  6728. }
  6729. this.steps = 4;
  6730. }
  6731. }
  6732. })
  6733. .catch((v) => {
  6734. console.log(v);
  6735. if (v == "cancel") {
  6736. this.goTo(
  6737. "/course?userid=" +
  6738. this.userid +
  6739. "&oid=" +
  6740. this.oid +
  6741. "&org=" +
  6742. this.org +
  6743. "&role=" +
  6744. this.role
  6745. );
  6746. }
  6747. });
  6748. },
  6749. lastSteps() {
  6750. if (this.steps == 4) {
  6751. this.goTo(
  6752. "/course?userid=" +
  6753. this.userid +
  6754. "&oid=" +
  6755. this.oid +
  6756. "&org=" +
  6757. this.org +
  6758. "&role=" +
  6759. this.role
  6760. );
  6761. } else {
  6762. // if (this.cidType == 0) {
  6763. // this.steps--;
  6764. // if (this.steps == 1) {
  6765. // setTimeout(() => {
  6766. // this.checkEva(this.checkId);
  6767. // setTimeout(() => {
  6768. // this.checkEva(this.checkId);
  6769. // }, 100);
  6770. // }, 100);
  6771. // }
  6772. // } else {
  6773. if (this.steps == 3) {
  6774. this.steps = 1;
  6775. setTimeout(() => {
  6776. this.checkEva(this.checkId);
  6777. setTimeout(() => {
  6778. this.checkEva(this.checkId);
  6779. }, 100);
  6780. }, 100);
  6781. }
  6782. // }
  6783. }
  6784. },
  6785. navSteps(s) {
  6786. if (this.courseName == "") {
  6787. this.$message.error("请补充填写课程名称");
  6788. return;
  6789. }
  6790. if (this.cidType == 0) {
  6791. if (this.steps == 1) {
  6792. if (this.cid == "" || this.cid == undefined) {
  6793. this.addWork();
  6794. } else {
  6795. if (this.userid != this.courseUserid && this.role != "1") {
  6796. this.updateWork2();
  6797. } else {
  6798. this.updateWork();
  6799. }
  6800. }
  6801. }
  6802. if (s == 1) {
  6803. this.steps = 1;
  6804. setTimeout(() => {
  6805. this.checkEva(this.checkId);
  6806. setTimeout(() => {
  6807. this.checkEva(this.checkId);
  6808. }, 100);
  6809. }, 100);
  6810. }
  6811. if (s == 2) {
  6812. this.steps = 2;
  6813. }
  6814. if (s == 3) {
  6815. this.cTemplate = this.templateC.content;
  6816. this.dialogVisible2 = false;
  6817. this.steps = 3;
  6818. this.isClickColor = 1;
  6819. this.unitJson[
  6820. this.unitIndex
  6821. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6822. this.$forceUpdate();
  6823. setTimeout(() => {
  6824. this.checkEva(this.checkId);
  6825. setTimeout(() => {
  6826. this.checkEva(this.checkId);
  6827. }, 100);
  6828. }, 1000);
  6829. }
  6830. } else {
  6831. if (this.steps == 1) {
  6832. if (this.cid == "" || this.cid == undefined) {
  6833. this.addWork();
  6834. } else {
  6835. if (this.userid != this.courseUserid && this.role != "1") {
  6836. this.updateWork2();
  6837. } else {
  6838. this.updateWork();
  6839. }
  6840. }
  6841. }
  6842. if (s == 1) {
  6843. this.steps = 1;
  6844. setTimeout(() => {
  6845. this.checkEva(this.checkId);
  6846. setTimeout(() => {
  6847. this.checkEva(this.checkId);
  6848. }, 100);
  6849. }, 100);
  6850. }
  6851. if (s == 3) {
  6852. this.cTemplate = this.templateC.content;
  6853. this.dialogVisible2 = false;
  6854. this.steps = 3;
  6855. this.isClickColor = 1;
  6856. this.unitJson[
  6857. this.unitIndex
  6858. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6859. this.$forceUpdate();
  6860. setTimeout(() => {
  6861. this.checkEva(this.checkId);
  6862. setTimeout(() => {
  6863. this.checkEva(this.checkId);
  6864. }, 100);
  6865. }, 1000);
  6866. }
  6867. }
  6868. this.$refs.stepBox.scrollTop = 0;
  6869. },
  6870. nextSteps(clickType) {
  6871. // if (this.cidType == 1) {
  6872. if (this.steps == 1) {
  6873. if (this.courseName != "") {
  6874. 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) {
  6875. this.$message({
  6876. message: "请回答完毕后再次发送",
  6877. type: "warning"
  6878. });
  6879. return;
  6880. }
  6881. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && !this.isOutline) {
  6882. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  6883. this.openAiDialog(clickType, 'aiOutline2')
  6884. }else {
  6885. this.openAiDialog(clickType, 'aiOutline')
  6886. }
  6887. return;
  6888. }
  6889. if(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && this.cpoteType != 4){
  6890. let _type = ''
  6891. if(this.cpoteType == 0){
  6892. _type = 'aiCpote1'
  6893. }else if(this.cpoteType == 1){
  6894. _type = 'aiCpote2'
  6895. }else if(this.cpoteType == 2){
  6896. _type = 'aiCpote3'
  6897. }else if(this.cpoteType == 3){
  6898. _type = 'aiCpote4'
  6899. }
  6900. this.cpoteType++
  6901. this.openAiDialog(clickType, _type)
  6902. return;
  6903. }
  6904. // if (!this.isOutline2) {
  6905. // this.openAiDialog(clickType, 'aiTeacher')
  6906. // return;
  6907. // }
  6908. if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6909. this.openAiDialog(clickType, 'aiTeacher')
  6910. return;
  6911. }
  6912. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6913. this.openAiDialog(clickType, 'aiTeacher2')
  6914. return;
  6915. }
  6916. const functionA = () => {
  6917. setTimeout(() => {
  6918. this.loading = false
  6919. this.steps = 3;
  6920. }, 0)
  6921. this.isClickColor = 1;
  6922. this.unitJson[
  6923. this.unitIndex
  6924. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6925. this.$forceUpdate();
  6926. setTimeout(() => {
  6927. this.checkEva(this.checkId);
  6928. setTimeout(() => {
  6929. this.checkEva(this.checkId);
  6930. }, 100);
  6931. }, 1000);
  6932. if (this.cid == "" || this.cid == undefined) {
  6933. this.addWork();
  6934. } else {
  6935. if (this.userid != this.courseUserid && this.role != "1") {
  6936. this.updateWork2();
  6937. } else {
  6938. this.updateWork();
  6939. }
  6940. }
  6941. }
  6942. if (this.cid) {
  6943. this.loading = true
  6944. functionA()
  6945. } else {
  6946. this.openAiDialog(clickType, "aiTask", functionA)
  6947. }
  6948. } else {
  6949. this.$message.error("请补充填写课程名称");
  6950. return;
  6951. }
  6952. } else if (this.steps == 3) {
  6953. if (this.cid == "" || this.cid == undefined) {
  6954. if (this.courseName == "") {
  6955. this.$message.error("请补充填写课程名称");
  6956. return;
  6957. } else {
  6958. this.addWork();
  6959. this.steps++;
  6960. }
  6961. } else {
  6962. if (this.courseName == "") {
  6963. this.$message.error("请补充填写课程名称");
  6964. return;
  6965. } else {
  6966. if (this.userid != this.courseUserid && this.role != "1") {
  6967. this.updateWork2();
  6968. } else {
  6969. this.updateWork();
  6970. }
  6971. this.steps++;
  6972. }
  6973. }
  6974. }
  6975. // } else {
  6976. // if (this.steps == 1) {
  6977. // if (this.courseName != "") {
  6978. // if (this.cid == "" || this.cid == undefined) {
  6979. // this.addWork();
  6980. // } else {
  6981. // if (this.userid != this.courseUserid && this.role != "1") {
  6982. // // this.updateWork2();
  6983. // } else {
  6984. // this.updateWork();
  6985. // }
  6986. // }
  6987. // this.steps++;
  6988. // } else {
  6989. // this.$message.error("请补充填写课程名称");
  6990. // return;
  6991. // }
  6992. // } else if (this.steps == 2) {
  6993. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  6994. // this.cTemplate = this.templateC.content;
  6995. // }
  6996. // this.dialogVisible2 = false;
  6997. // this.steps++;
  6998. // setTimeout(() => {
  6999. // this.checkEva(this.checkId);
  7000. // setTimeout(() => {
  7001. // this.checkEva(this.checkId);
  7002. // }, 100);
  7003. // }, 1000);
  7004. // } else if (this.steps == 3) {
  7005. // if (this.cid == "" || this.cid == undefined) {
  7006. // if (this.courseName == "") {
  7007. // this.$message.error("请补充填写课程名称");
  7008. // return;
  7009. // } else {
  7010. // this.addWork();
  7011. // this.steps++;
  7012. // }
  7013. // } else {
  7014. // if (this.courseName == "") {
  7015. // this.$message.error("请补充填写课程名称");
  7016. // return;
  7017. // } else {
  7018. // if (this.userid != this.courseUserid && this.role != "1") {
  7019. // this.updateWork2();
  7020. // } else {
  7021. // this.updateWork();
  7022. // }
  7023. // this.steps++;
  7024. // }
  7025. // }
  7026. // }
  7027. // }
  7028. this.$refs.stepBox.scrollTop = 0;
  7029. },
  7030. unitSet(i) {
  7031. if (this.unitIndex == i) {
  7032. return;
  7033. }
  7034. this.unitIndex = i;
  7035. this.isClickColor = 1;
  7036. // this.$refs.rightboxR.scrollTop = 0;
  7037. this.$refs.unitBox.scrollTop = 0;
  7038. },
  7039. panUnitJson() {
  7040. let _unitIndex = this.unitIndex;
  7041. let cPan = 1;
  7042. for (
  7043. var j = 0;
  7044. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7045. j++
  7046. ) {
  7047. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  7048. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7049. j
  7050. ].proVisible2 = false;
  7051. if (
  7052. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7053. .length > 1
  7054. ) {
  7055. for (
  7056. var z = 0;
  7057. z <
  7058. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7059. .length;
  7060. z++
  7061. ) {
  7062. if (
  7063. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  7064. z
  7065. ].tool.length
  7066. ) {
  7067. this.$message.error("请把工具添加完整");
  7068. cPan = 2;
  7069. break;
  7070. }
  7071. }
  7072. }
  7073. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7074. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7075. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7076. (ele) => {
  7077. return ele.value != "";
  7078. }
  7079. );
  7080. }
  7081. }
  7082. return cPan;
  7083. },
  7084. unitOpen(i) {
  7085. if (this.unitJson[i].toolOpen) {
  7086. this.unitJson[i].toolOpen = false;
  7087. } else {
  7088. this.unitJson[i].toolOpen = true;
  7089. }
  7090. this.updateWork();
  7091. this.$forceUpdate();
  7092. },
  7093. unitSet2(i) {
  7094. if (this.panUnitJson() == 2) {
  7095. return;
  7096. }
  7097. // if(this.unitJson[i].toolOpen){
  7098. // this.unitJson[i].toolOpen = false
  7099. // this.updateWork()
  7100. // this.$forceUpdate()
  7101. // return
  7102. // }else {
  7103. this.unitJson[i].toolOpen = true;
  7104. // }
  7105. this.$forceUpdate();
  7106. if (this.unitIndex == i) {
  7107. return;
  7108. }
  7109. this.unitIndex = i;
  7110. this.isClickColor = 1;
  7111. // this.$refs.rightboxR.scrollTop = 0;
  7112. this.$refs.unitBox.scrollTop = 0;
  7113. },
  7114. updateCourseState(i) {
  7115. let params = [
  7116. {
  7117. cid: this.cid,
  7118. state: i,
  7119. },
  7120. ];
  7121. this.ajax
  7122. .post(this.$store.state.api + "updateCourseMode", params)
  7123. .then((res) => {
  7124. this.courseState = i;
  7125. })
  7126. .catch((err) => {
  7127. this.$message.error("网络不佳");
  7128. console.error(err);
  7129. });
  7130. },
  7131. addtips(){
  7132. let params = [
  7133. {
  7134. cid: this.cid,
  7135. tips: JSON.stringify(this.aiJson),
  7136. tid: this.templateid
  7137. },
  7138. ];
  7139. this.ajax
  7140. .post(this.$store.state.api + "addTips", params)
  7141. .then((res) => {
  7142. })
  7143. .catch((err) => {
  7144. this.$message.error("网络不佳");
  7145. console.error(err);
  7146. });
  7147. },
  7148. openSaveTips(){
  7149. this.dialogVisibleTips = true
  7150. },
  7151. time() {
  7152. if (!this.now) {
  7153. this.now = new Date().getTime();
  7154. return true;
  7155. } else {
  7156. let time = new Date().getTime();
  7157. if (time - this.now > 3000) {
  7158. this.now = time;
  7159. return true;
  7160. } else {
  7161. return false;
  7162. }
  7163. }
  7164. },
  7165. deleteUnit(i) {
  7166. var _this = this;
  7167. if (i == 0 && _this.unitJson.length == 1) {
  7168. _this
  7169. .$confirm("确定切换成任务模式吗?", "提示", {
  7170. confirmButtonText: "确定",
  7171. cancelButtonText: "取消",
  7172. type: "warning",
  7173. })
  7174. .then(() => {
  7175. _this.unitJson[i].dyName = "";
  7176. // _this.updateCourseState(2);
  7177. })
  7178. .catch(() => {
  7179. return;
  7180. });
  7181. } else {
  7182. _this
  7183. .$confirm("确定删除此阶段吗?", "提示", {
  7184. confirmButtonText: "确定",
  7185. cancelButtonText: "取消",
  7186. type: "warning",
  7187. })
  7188. .then(() => {
  7189. _this.isDelete = 2;
  7190. // _this.unitIndex = _this.unitIndex - 1;
  7191. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  7192. // _this.$message.success("删除成功");
  7193. })
  7194. .catch(() => {
  7195. return;
  7196. });
  7197. }
  7198. },
  7199. deleteWork(chapid) {
  7200. let params = [
  7201. {
  7202. cid: this.cid,
  7203. chapters: JSON.stringify(this.unitJson),
  7204. uid: this.userid,
  7205. chapid: chapid,
  7206. },
  7207. ];
  7208. this.ajax
  7209. .post(this.$store.state.api + "deleteWork", params)
  7210. .then((res) => {
  7211. this.$message({
  7212. message: "删除成功",
  7213. type: "success",
  7214. });
  7215. let task = JSON.parse(
  7216. JSON.stringify(
  7217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  7218. )
  7219. );
  7220. this.unitJson.splice(this.unitIndex, 1);
  7221. if (this.unitIndex == 0) {
  7222. this.unitIndex = 0;
  7223. } else {
  7224. this.unitIndex = this.unitIndex - 1;
  7225. }
  7226. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  7227. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  7228. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  7229. ...task,
  7230. ];
  7231. }
  7232. })
  7233. .catch((err) => {
  7234. this.$message.error("网络不佳");
  7235. console.error(err);
  7236. });
  7237. },
  7238. deleteTool(itemTaskIndex, i) {
  7239. var _this = this;
  7240. if (_this.time()) {
  7241. _this
  7242. .$confirm("确定删除此工具吗?", "提示", {
  7243. confirmButtonText: "确定",
  7244. cancelButtonText: "取消",
  7245. type: "warning",
  7246. })
  7247. .then(() => {
  7248. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7249. itemTaskIndex
  7250. ].toolChoose.splice(i, 1);
  7251. _this.$message.success("删除成功");
  7252. })
  7253. .catch(() => {
  7254. return;
  7255. });
  7256. }
  7257. },
  7258. deleteSentence(i) {
  7259. var _this = this;
  7260. _this
  7261. .$confirm("确定删除此题目吗?", "提示", {
  7262. confirmButtonText: "确定",
  7263. cancelButtonText: "取消",
  7264. type: "warning",
  7265. })
  7266. .then(() => {
  7267. _this.sentenceList.splice(i, 1);
  7268. _this.$message.success("删除成功");
  7269. })
  7270. .catch(() => {
  7271. return;
  7272. });
  7273. },
  7274. deleteS(s, i, j) {
  7275. this.sentenceList[i].addSentence.splice(j, 1);
  7276. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  7277. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  7278. this.sentenceList[i].rightAnswer.splice(a, 1);
  7279. }
  7280. },
  7281. openT() {
  7282. top.postMessage({ tools: "25" }, "*");
  7283. },
  7284. deleteTask(i) {
  7285. var _this = this;
  7286. if (_this.time()) {
  7287. _this
  7288. .$confirm(
  7289. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  7290. 1 ==
  7291. i
  7292. ? "确定删除此任务吗?"
  7293. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  7294. "提示",
  7295. {
  7296. confirmButtonText: "确定",
  7297. cancelButtonText: "取消",
  7298. type: "warning",
  7299. }
  7300. )
  7301. .then(() => {
  7302. if (i == 0) {
  7303. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7304. i + 1
  7305. ].chapterData = JSON.parse(
  7306. JSON.stringify(
  7307. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  7308. .chapterData
  7309. )
  7310. );
  7311. }
  7312. _this.$forceUpdate();
  7313. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  7314. i,
  7315. 1
  7316. );
  7317. _this.$message.success("删除成功");
  7318. })
  7319. .catch(() => {
  7320. return;
  7321. });
  7322. }
  7323. },
  7324. handlePictureCardPreview(file) {
  7325. this.dialogImageUrl = file.url;
  7326. },
  7327. clean(i, c) {
  7328. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  7329. },
  7330. handle_remove1(file, fileList, type) {
  7331. var _tmp = this.cover;
  7332. // for (var i = 0, len = _tmp.length; i < len; i++) {
  7333. // if (_tmp[i].uid == file.uid) {
  7334. // _tmp.splice(i, 1);
  7335. // break;
  7336. // }
  7337. // this.cover = _tmp;
  7338. // }
  7339. this.cover = [];
  7340. this.noneBtnImg = this.cover.length >= 1;
  7341. this.isSysPic = false;
  7342. this.isSysPic2 = false;
  7343. this.$forceUpdate();
  7344. },
  7345. addImg(e) {
  7346. var el = e.currentTarget;
  7347. el.getElementsByTagName("input")[0].click();
  7348. e.target.value = "";
  7349. },
  7350. addChaptersTools(i) {
  7351. this.chapTools = [
  7352. {
  7353. tools: [],
  7354. toolDetail: "",
  7355. },
  7356. ];
  7357. this.chapCount = i;
  7358. this.dialogVisible4 = true;
  7359. },
  7360. isNoFinsh() {
  7361. this.$message.warning("功能正在开发中");
  7362. },
  7363. addAttText(i) {
  7364. this.AttText = {
  7365. title: "",
  7366. text: "",
  7367. };
  7368. this.taskCount = i;
  7369. this.AttTextType = 0;
  7370. this.$forceUpdate();
  7371. this.dialogVisible6 = true;
  7372. setTimeout(() => {
  7373. this.$refs["fuInput"].focus();
  7374. }, 100);
  7375. },
  7376. openLine(i) {
  7377. this.line = "";
  7378. this.lineCount = i;
  7379. this.lineType = 0;
  7380. this.$forceUpdate();
  7381. this.dialogVisible7 = true;
  7382. },
  7383. pasteLine(i) {
  7384. navigator.clipboard
  7385. .readText()
  7386. .then((v) => {
  7387. console.log("获取剪贴板成功:", v);
  7388. const html = v;
  7389. const regex = /src="(.*?)"/g;
  7390. const match = regex.exec(html);
  7391. if (match && match[1]) {
  7392. console.log(match[1]);
  7393. this.$message.success("粘贴成功");
  7394. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7395. i
  7396. ].chapterData.push({
  7397. name: "链接",
  7398. title: "嵌入代码",
  7399. url: match[1],
  7400. type: 8,
  7401. });
  7402. } else {
  7403. // console.log("未找到包含 src 属性的 iframe");
  7404. this.$message.error(
  7405. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  7406. );
  7407. }
  7408. })
  7409. .catch((v) => {
  7410. console.log("获取剪贴板失败: ", v);
  7411. });
  7412. },
  7413. openSource(i) {
  7414. this.lineCount = i;
  7415. this.sourceData = {};
  7416. this.dialogVisibleSource = true;
  7417. this.updateSourcePan = false;
  7418. },
  7419. openAiCreate(i){
  7420. this.lineCount = i;
  7421. this.dialogVisibleAiCreate = true;
  7422. },
  7423. createAiPpt(json){
  7424. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.push(json);
  7425. this.dialogVisibleAiCreate = false;
  7426. },
  7427. openAiCreateVideo(i){
  7428. this.lineCount = i;
  7429. this.dialogVisibleAiCreateVideo = true;
  7430. },
  7431. createAiVideo(json){
  7432. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.push(json);
  7433. // this.dialogVisibleAiCreateVideo = false;
  7434. },
  7435. async createTeacherAn(index){
  7436. this.lineCount = index;
  7437. this.loading = true
  7438. let md = new MarkdownIt();
  7439. if(this.courseState == 4){
  7440. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  7441. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  7442. let name = _task.task+'-教案'
  7443. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  7444. await this.generate(name, _html, i)
  7445. }
  7446. }else if(this.courseState == 5){
  7447. if(index == 0 || index){
  7448. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  7449. let name = _task.task+'-教案'
  7450. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  7451. await this.generate(name, _html, index)
  7452. }else {
  7453. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  7454. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  7455. let name = _task.task+'-教案'
  7456. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  7457. await this.generate(name, _html, i)
  7458. }
  7459. }
  7460. }
  7461. },
  7462. async generate(a, html, index) {
  7463. // 将html文件中需要用到的数据挂载到store上
  7464. const content = `<!DOCTYPE html>
  7465. <html lang="en">
  7466. <head>
  7467. <meta charset="UTF-8">
  7468. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7469. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7470. <title>${a}</title>
  7471. <style>
  7472. </style>
  7473. </head>
  7474. <body>
  7475. ${html}
  7476. </body>
  7477. </html>`;
  7478. // debugger
  7479. let dname = a + ".doc";
  7480. // 创建文件流
  7481. // 创建bolb实例时,内容一定要放在[]中
  7482. const blob = new Blob([content], {
  7483. type: "text/plain;charset='utf-8'",
  7484. });
  7485. const file = new File([blob], dname, { type: 'application/msword' });
  7486. await this.beforeUploadHtml(file, index)
  7487. },
  7488. beforeUploadHtml(event, index) {
  7489. var file = event;
  7490. var credentials = {
  7491. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7492. secretAccessKey: "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",
  7493. }; //秘钥形式的登录上传
  7494. window.AWS.config.update(credentials);
  7495. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7496. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7497. var _this = this;
  7498. if (file) {
  7499. var params = {
  7500. Key:
  7501. file.name.split(".")[0] +
  7502. new Date().getTime() +
  7503. "." +
  7504. file.name.split(".")[file.name.split(".").length - 1],
  7505. ContentType: file.type,
  7506. Body: file,
  7507. "Access-Control-Allow-Credentials": "*",
  7508. ACL: "public-read",
  7509. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7510. var options = {
  7511. partSize: 2048 * 1024 * 1024,
  7512. queueSize: 2,
  7513. leavePartsOnError: true,
  7514. };
  7515. bucket
  7516. .upload(params, options)
  7517. .on("httpUploadProgress", function (evt) {
  7518. //这里可以写进度条
  7519. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7520. })
  7521. .send(function (err, data) {
  7522. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  7523. _this.loading = false
  7524. }
  7525. if(_this.courseState == 5){
  7526. _this.loading = false
  7527. }
  7528. if (err) {
  7529. _this.$message.error("上传失败");
  7530. } else {
  7531. let _index = 0
  7532. if(_this.lineCount == 0 || _this.lineCount){
  7533. _index = _this.lineCount
  7534. }else {
  7535. _index = index
  7536. }
  7537. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.push({
  7538.                   name: file.name,
  7539.                   url: data.Location,
  7540.                   type: 3,
  7541.                 })
  7542. console.log(data.Location);
  7543. }
  7544. });
  7545. }
  7546. },
  7547. addSource() {
  7548. if (!Object.keys(this.sourceData).length) {
  7549. this.$message.error("请选择要上传的资源");
  7550. return;
  7551. }
  7552. let keys = Object.keys(this.sourceData);
  7553. for (var i = 0; i < keys.length; i++) {
  7554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7555. this.lineCount
  7556. ].chapterData.push({
  7557. name: "链接",
  7558. title: this.sourceData[keys[i]].name,
  7559. url: this.sourceData[keys[i]].url,
  7560. type: 14,
  7561. id: keys[i],
  7562. });
  7563. }
  7564. this.$forceUpdate();
  7565. this.dialogVisibleSource = false;
  7566. },
  7567. updateSource() {
  7568. if (!Object.keys(this.sourceData).length) {
  7569. this.$message.error("请选择要上传的资源");
  7570. return;
  7571. }
  7572. let keys = Object.keys(this.sourceData);
  7573. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7574. this.taskCount
  7575. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  7576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7577. this.taskCount
  7578. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  7579. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7580. this.taskCount
  7581. ].chapterData[this.lineCount].id = keys[0];
  7582. this.updateSourcePan = false;
  7583. this.$forceUpdate();
  7584. this.dialogVisibleSource = false;
  7585. },
  7586. deleteM(i, j) {
  7587. this.testJson.testJson[i].timuList.splice(j, 1);
  7588. },
  7589. beforeUploadTiMu(event, i) {
  7590. const loading = this.openLoading();
  7591. var file = event.target.files[0];
  7592. var credentials = {
  7593. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7594. secretAccessKey: "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",
  7595. }; //秘钥形式的登录上传
  7596. window.AWS.config.update(credentials);
  7597. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7598. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7599. var _this = this;
  7600. if (file) {
  7601. var params = {
  7602. Key:
  7603. file.name.split(".")[0] +
  7604. new Date().getTime() +
  7605. "." +
  7606. file.name.split(".")[file.name.split(".").length - 1],
  7607. ContentType: file.type,
  7608. Body: file,
  7609. "Access-Control-Allow-Credentials": "*",
  7610. ACL: "public-read",
  7611. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7612. var options = {
  7613. partSize: 2048 * 1024 * 1024,
  7614. queueSize: 2,
  7615. leavePartsOnError: true,
  7616. };
  7617. bucket
  7618. .upload(params, options)
  7619. .on("httpUploadProgress", function (evt) {
  7620. //这里可以写进度条
  7621. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7622. })
  7623. .send(function (err, data) {
  7624. loading.close();
  7625. if (err) {
  7626. _this.$message.error("上传失败");
  7627. } else {
  7628. if (_this.testJson.testJson[i].timuList) {
  7629. _this.testJson.testJson[i].timuList.push({
  7630. src: data.Location,
  7631. });
  7632. } else {
  7633. _this.testJson.testJson[i].timuList = [];
  7634. _this.testJson.testJson[i].timuList.push({
  7635. src: data.Location,
  7636. });
  7637. }
  7638. _this.imgChange3(i);
  7639. _this.$forceUpdate();
  7640. }
  7641. });
  7642. }
  7643. },
  7644. beforeUploadTi(event, i, j) {
  7645. const loading = this.openLoading();
  7646. var file = event.target.files[0];
  7647. var credentials = {
  7648. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7649. secretAccessKey: "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",
  7650. }; //秘钥形式的登录上传
  7651. window.AWS.config.update(credentials);
  7652. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7653. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7654. var _this = this;
  7655. if (file) {
  7656. var params = {
  7657. Key:
  7658. file.name.split(".")[0] +
  7659. new Date().getTime() +
  7660. "." +
  7661. file.name.split(".")[file.name.split(".").length - 1],
  7662. ContentType: file.type,
  7663. Body: file,
  7664. "Access-Control-Allow-Credentials": "*",
  7665. ACL: "public-read",
  7666. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7667. var options = {
  7668. partSize: 2048 * 1024 * 1024,
  7669. queueSize: 2,
  7670. leavePartsOnError: true,
  7671. };
  7672. bucket
  7673. .upload(params, options)
  7674. .on("httpUploadProgress", function (evt) {
  7675. //这里可以写进度条
  7676. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7677. })
  7678. .send(function (err, data) {
  7679. loading.close();
  7680. if (err) {
  7681. _this.$message.error("上传失败");
  7682. } else {
  7683. _this.testJson.testJson[i].checkList[j] = {};
  7684. _this.testJson.testJson[i].checkList[j].src = data.Location;
  7685. _this.testJson.testJson[i].checkList[j].imgType = 1;
  7686. _this.imgChange2(i, j);
  7687. _this.$forceUpdate();
  7688. }
  7689. });
  7690. }
  7691. },
  7692. beforeUpload1(event, type) {
  7693. // const loading = this.openLoading();
  7694. var file = event.target.files[0];
  7695. var credentials = {
  7696. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7697. secretAccessKey: "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",
  7698. }; //秘钥形式的登录上传
  7699. window.AWS.config.update(credentials);
  7700. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7701. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7702. var _this = this;
  7703. if (file) {
  7704. var params = {
  7705. Key:
  7706. file.name.split(".")[0] +
  7707. new Date().getTime() +
  7708. "." +
  7709. file.name.split(".")[file.name.split(".").length - 1],
  7710. ContentType: file.type,
  7711. Body: file,
  7712. "Access-Control-Allow-Credentials": "*",
  7713. ACL: "public-read",
  7714. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7715. var options = {
  7716. partSize: 2048 * 1024 * 1024,
  7717. queueSize: 2,
  7718. leavePartsOnError: true,
  7719. };
  7720. bucket
  7721. .upload(params, options)
  7722. .on("httpUploadProgress", function (evt) {
  7723. //这里可以写进度条
  7724. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7725. })
  7726. .send(function (err, data) {
  7727. // loading.close();
  7728. if (err) {
  7729. // var a = _this.$refs.upload1.uploadFiles;
  7730. // a.splice(a.length - 1, a.length);
  7731. _this.$message.error("上传失败");
  7732. } else {
  7733. // _this.cover.push({
  7734. // name: file.name,
  7735. // url: data.Location,
  7736. // uid: file.uid,
  7737. // });
  7738. _this.cover = [
  7739. {
  7740. name: file.name,
  7741. url: data.Location,
  7742. uid: file.uid,
  7743. },
  7744. ];
  7745. _this.imgChange1(null, null, 1, null);
  7746. _this.choosePicVisible = false;
  7747. console.log(data.Location);
  7748. }
  7749. });
  7750. }
  7751. },
  7752. beforeUploadSelect(event, type) {
  7753. // const loading = this.openLoading();
  7754. var file = event.target.files[0];
  7755. var credentials = {
  7756. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7757. secretAccessKey: "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",
  7758. }; //秘钥形式的登录上传
  7759. window.AWS.config.update(credentials);
  7760. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7761. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7762. var _this = this;
  7763. if (file) {
  7764. var params = {
  7765. Key:
  7766. file.name.split(".")[0] +
  7767. new Date().getTime() +
  7768. "." +
  7769. file.name.split(".")[file.name.split(".").length - 1],
  7770. ContentType: file.type,
  7771. Body: file,
  7772. "Access-Control-Allow-Credentials": "*",
  7773. ACL: "public-read",
  7774. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7775. var options = {
  7776. partSize: 2048 * 1024 * 1024,
  7777. queueSize: 2,
  7778. leavePartsOnError: true,
  7779. };
  7780. bucket
  7781. .upload(params, options)
  7782. .on("httpUploadProgress", function (evt) {
  7783. //这里可以写进度条
  7784. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7785. })
  7786. .send(function (err, data) {
  7787. // loading.close();
  7788. if (err) {
  7789. _this.$message.error("上传失败");
  7790. } else {
  7791. _this.selectJson.url = data.Location;
  7792. console.log(data.Location);
  7793. }
  7794. });
  7795. }
  7796. },
  7797. chooseSysPic(p) {
  7798. this.cover = [];
  7799. setTimeout(() => {
  7800. this.cover[0] = {
  7801. name: "系统图片.png",
  7802. url: p,
  7803. };
  7804. this.imgChange1(null, null, 1, null);
  7805. this.$forceUpdate();
  7806. }, 0);
  7807. this.isSysPic = true;
  7808. this.isSysPic2 = false;
  7809. this.sysPicVisible = false;
  7810. this.$forceUpdate();
  7811. },
  7812. chooseSysPic2(p) {
  7813. this.cover = [];
  7814. setTimeout(() => {
  7815. this.cover[0] = {
  7816. name: "网络图片.png",
  7817. url: p,
  7818. };
  7819. this.imgChange1(null, null, 1, null);
  7820. this.$forceUpdate();
  7821. }, 0);
  7822. this.isSysPic2 = true;
  7823. this.isSysPic = false;
  7824. this.sysPicVisible2 = false;
  7825. this.$forceUpdate();
  7826. },
  7827. beforeUpload(data) {
  7828. this.$refs.upload1.uploadFiles;
  7829. this.uploadLoading1 = true;
  7830. var file = data.file;
  7831. var credentials = {
  7832. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7833. secretAccessKey: "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",
  7834. }; //秘钥形式的登录上传
  7835. window.AWS.config.update(credentials);
  7836. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7837. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7838. var _this = this;
  7839. if (file) {
  7840. var params = {
  7841. Key:
  7842. file.name.split(".")[0] +
  7843. new Date().getTime() +
  7844. "." +
  7845. file.name.split(".")[file.name.split(".").length - 1],
  7846. ContentType: file.type,
  7847. Body: file,
  7848. "Access-Control-Allow-Credentials": "*",
  7849. ACL: "public-read",
  7850. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7851. var options = {
  7852. partSize: 2048 * 1024 * 1024,
  7853. queueSize: 2,
  7854. leavePartsOnError: true,
  7855. };
  7856. bucket
  7857. .upload(params, options)
  7858. .on("httpUploadProgress", function (evt) {
  7859. //这里可以写进度条
  7860. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7861. })
  7862. .send(function (err, data) {
  7863. _this.uploadLoading1 = false;
  7864. if (err) {
  7865. // var a = _this.$refs.upload1.uploadFiles;
  7866. // a.splice(a.length - 1, a.length);
  7867. _this.$message.error("上传失败");
  7868. } else {
  7869. //上传成功处理
  7870. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  7871. name: file.name,
  7872. url: data.Location,
  7873. uid: file.uid,
  7874. });
  7875. _this.imgChange();
  7876. console.log(data.Location);
  7877. }
  7878. });
  7879. }
  7880. },
  7881. onExceed() {
  7882. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  7883. },
  7884. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  7885. // const loading = this.openLoading();
  7886. var file = event.target.files[0];
  7887. var credentials = {
  7888. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7889. secretAccessKey: "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",
  7890. }; //秘钥形式的登录上传
  7891. window.AWS.config.update(credentials);
  7892. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7893. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7894. var _this = this;
  7895. if (type == 3) {
  7896. var b = [
  7897. "DOC",
  7898. "DOCX",
  7899. "DOCM",
  7900. "DOTM",
  7901. "DOTX",
  7902. "PPTX",
  7903. "PPSX",
  7904. "PPT",
  7905. "PPS",
  7906. "PPTM",
  7907. "POTM",
  7908. "PPAM",
  7909. "POTX",
  7910. "PPSM",
  7911. ];
  7912. if (
  7913. b.indexOf(
  7914. file.name
  7915. .split(".")
  7916. [file.name.split(".").length - 1].toLocaleUpperCase()
  7917. ) != -1
  7918. ) {
  7919. if (file.size / 1024 / 1024 > 80) {
  7920. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7921. this.inputShow = true;
  7922. // var a = _this.$refs.upload1.uploadFiles;
  7923. // a.splice(a.length - 1, a.length);
  7924. // loading.close();
  7925. return;
  7926. }
  7927. } else if (
  7928. file.name
  7929. .split(".")
  7930. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7931. ) {
  7932. if (file.size / 1024 / 1024 > 80) {
  7933. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7934. this.inputShow = true;
  7935. // var a = _this.$refs.upload1.uploadFiles;
  7936. // a.splice(a.length - 1, a.length);
  7937. // loading.close();
  7938. return;
  7939. }
  7940. }
  7941. }
  7942. this.inputShow = false;
  7943. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7944. itemTaskIndex
  7945. ].progress = 0;
  7946. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7947. itemTaskIndex
  7948. ].proVisible = true;
  7949. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7950. itemTaskIndex
  7951. ].isFinishSize = 0;
  7952. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7953. itemTaskIndex
  7954. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  7955. _this.$forceUpdate();
  7956. if (file) {
  7957. var params = {
  7958. Key:
  7959. file.name.split(".")[0] +
  7960. new Date().getTime() +
  7961. "." +
  7962. file.name.split(".")[file.name.split(".").length - 1],
  7963. ContentType: file.type,
  7964. Body: file,
  7965. "Access-Control-Allow-Credentials": "*",
  7966. ACL: "public-read",
  7967. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7968. var options = {
  7969. partSize: 2048 * 1024 * 1024,
  7970. queueSize: 2,
  7971. leavePartsOnError: true,
  7972. };
  7973. bucket
  7974. .upload(params, options)
  7975. .on("httpUploadProgress", function (evt) {
  7976. //这里可以写进度条
  7977. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7978. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7979. itemTaskIndex
  7980. ].progress = parseInt((evt.loaded / evt.total) * 100);
  7981. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7982. itemTaskIndex
  7983. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7984. _this.$forceUpdate();
  7985. })
  7986. .send(function (err, data) {
  7987. // loading.close();
  7988. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7989. itemTaskIndex
  7990. ].progress = 100;
  7991. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7992. itemTaskIndex
  7993. ].isFinishSize =
  7994. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7995. itemTaskIndex
  7996. ].isAllSize;
  7997. _this.$forceUpdate();
  7998. setTimeout(() => {
  7999. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8000. itemTaskIndex
  8001. ].proVisible = false;
  8002. _this.$forceUpdate();
  8003. }, 1000);
  8004. _this.inputShow = true;
  8005. if (err) {
  8006. // var a = _this.$refs.upload1.uploadFiles;
  8007. // a.splice(a.length - 1, a.length);
  8008. _this.$message.error("上传失败");
  8009. } else {
  8010. if (type == 13) {
  8011. let _type = 2;
  8012. var imgA = [
  8013. "png",
  8014. "jpg",
  8015. "jpeg",
  8016. "bmp",
  8017. "gif",
  8018. "webp",
  8019. "psd",
  8020. "svg",
  8021. "tiff",
  8022. ];
  8023. var fileA = [
  8024. "PDF",
  8025. "DOC",
  8026. "DOCX",
  8027. "DOCM",
  8028. "DOTM",
  8029. "DOTX",
  8030. "PPTX",
  8031. "PPSX",
  8032. "PPT",
  8033. "PPS",
  8034. "PPTM",
  8035. "POTM",
  8036. "PPAM",
  8037. "POTX",
  8038. "PPSM",
  8039. "XLSX",
  8040. "XLS",
  8041. ];
  8042. var videoA = [
  8043. "AVI",
  8044. "NAVI",
  8045. "MPEG",
  8046. "ASF",
  8047. "MOV",
  8048. "WMV",
  8049. "3GP",
  8050. "RM",
  8051. "RMVB",
  8052. "FLV",
  8053. "F4V",
  8054. "H.264",
  8055. "H.265",
  8056. "REAL VIDEO",
  8057. "MKV",
  8058. "WebM",
  8059. "HDDVD",
  8060. "MP4",
  8061. "MPG",
  8062. "M4V",
  8063. "MGV",
  8064. "OGV",
  8065. "QTM",
  8066. "STR",
  8067. "AMC",
  8068. "DVX",
  8069. "EVO",
  8070. "DAT",
  8071. "OGG",
  8072. "OGM",
  8073. ];
  8074. if (
  8075. fileA.indexOf(
  8076. data.Location.split(".")[
  8077. data.Location.split(".").length - 1
  8078. ].toLocaleUpperCase()
  8079. ) != -1
  8080. ) {
  8081. _type = 3;
  8082. } else if (
  8083. videoA.indexOf(
  8084. data.Location.split(".")[
  8085. data.Location.split(".").length - 1
  8086. ].toLocaleUpperCase()
  8087. ) != -1
  8088. ) {
  8089. _type = 2;
  8090. } else if (
  8091. imgA.indexOf(
  8092. data.Location.split(".")[
  8093. data.Location.split(".").length - 1
  8094. ].toLocaleLowerCase()
  8095. ) != -1
  8096. ) {
  8097. _type = 13;
  8098. } else {
  8099. _type = 12;
  8100. }
  8101. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8102. itemTaskIndex
  8103. ].chapterData.push({
  8104. name: file.name,
  8105. url: data.Location,
  8106. uid: file.uid,
  8107. type: _type,
  8108. });
  8109. _this.imgChange1(null, null, _type, itemTaskIndex);
  8110. } else if (type == 2 || type == 3 || type == 12) {
  8111. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8112. itemTaskIndex
  8113. ].chapterData.push({
  8114. name: file.name,
  8115. url: data.Location,
  8116. uid: file.uid,
  8117. type: type,
  8118. });
  8119. _this.imgChange1(null, null, type, itemTaskIndex);
  8120. } else if (type == 4) {
  8121. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8122. itemTaskIndex
  8123. ].fileList1.push({
  8124. name: file.name,
  8125. url: data.Location,
  8126. uid: file.uid,
  8127. });
  8128. _this.imgChange1(null, null, type, itemTaskIndex);
  8129. } else if (type == 5) {
  8130. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8131. itemTaskIndex
  8132. ].homeworkList.push({
  8133. name: file.name,
  8134. url: data.Location,
  8135. uid: file.uid,
  8136. });
  8137. _this.imgChange1(null, null, type, itemTaskIndex);
  8138. }
  8139. console.log(data.Location);
  8140. }
  8141. });
  8142. }
  8143. },
  8144. beforeUploadInfo2(event, type) {
  8145. // const loading = this.openLoading();
  8146. var file = event.target.files[0];
  8147. var credentials = {
  8148. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8149. secretAccessKey: "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",
  8150. }; //秘钥形式的登录上传
  8151. window.AWS.config.update(credentials);
  8152. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8153. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8154. var _this = this;
  8155. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  8156. if (
  8157. xianObj.indexOf(
  8158. file.name
  8159. .split(".")
  8160. [file.name.split(".").length - 1].toLocaleUpperCase()
  8161. ) == -1
  8162. ) {
  8163. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  8164. this.inputShow = true;
  8165. // var a = _this.$refs.upload1.uploadFiles;
  8166. // a.splice(a.length - 1, a.length);
  8167. // loading.close();
  8168. return;
  8169. }
  8170. if (type == 3) {
  8171. var b = [
  8172. "DOC",
  8173. "DOCX",
  8174. "DOCM",
  8175. "DOTM",
  8176. "DOTX",
  8177. "PPTX",
  8178. "PPSX",
  8179. "PPT",
  8180. "PPS",
  8181. "PPTM",
  8182. "POTM",
  8183. "PPAM",
  8184. "POTX",
  8185. "PPSM",
  8186. ];
  8187. if (
  8188. b.indexOf(
  8189. file.name
  8190. .split(".")
  8191. [file.name.split(".").length - 1].toLocaleUpperCase()
  8192. ) != -1
  8193. ) {
  8194. if (file.size / 1024 / 1024 > 80) {
  8195. this.$message.error("上传文件大于80兆,请重新选择文件!");
  8196. this.inputShow = true;
  8197. // var a = _this.$refs.upload1.uploadFiles;
  8198. // a.splice(a.length - 1, a.length);
  8199. // loading.close();
  8200. return;
  8201. }
  8202. } else if (
  8203. file.name
  8204. .split(".")
  8205. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  8206. ) {
  8207. if (file.size / 1024 / 1024 > 80) {
  8208. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  8209. this.inputShow = true;
  8210. // var a = _this.$refs.upload1.uploadFiles;
  8211. // a.splice(a.length - 1, a.length);
  8212. // loading.close();
  8213. return;
  8214. }
  8215. }
  8216. }
  8217. this.inputShow = false;
  8218. _this.infoprogress = 0;
  8219. _this.infoproVisible = true;
  8220. _this.infoisFinishSize = 0;
  8221. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  8222. _this.$forceUpdate();
  8223. if (file) {
  8224. var params = {
  8225. Key:
  8226. file.name.split(".")[0] +
  8227. new Date().getTime() +
  8228. "." +
  8229. file.name.split(".")[file.name.split(".").length - 1],
  8230. ContentType: file.type,
  8231. Body: file,
  8232. "Access-Control-Allow-Credentials": "*",
  8233. ACL: "public-read",
  8234. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8235. var options = {
  8236. partSize: 2048 * 1024 * 1024,
  8237. queueSize: 2,
  8238. leavePartsOnError: true,
  8239. };
  8240. bucket
  8241. .upload(params, options)
  8242. .on("httpUploadProgress", function (evt) {
  8243. //这里可以写进度条
  8244. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8245. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  8246. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  8247. _this.$forceUpdate();
  8248. })
  8249. .send(async function (err, data) {
  8250. // loading.close();
  8251. _this.infoprogress = 100;
  8252. _this.infoisFinishSize = _this.infoisAllSize;
  8253. _this.$forceUpdate();
  8254. _this.inputShow = true;
  8255. if (err) {
  8256. setTimeout(() => {
  8257. _this.infoproVisible = false;
  8258. _this.$forceUpdate();
  8259. }, 1000);
  8260. // var a = _this.$refs.upload1.uploadFiles;
  8261. // a.splice(a.length - 1, a.length);
  8262. _this.$message.error("上传失败");
  8263. } else {
  8264. let fileid = await _this.createFileid(data.Location)
  8265. if(fileid){
  8266. _this.infoproVisible = false;
  8267. _this.$forceUpdate();
  8268. }
  8269. if (type == 13) {
  8270. let _type = 2;
  8271. var imgA = [
  8272. "png",
  8273. "jpg",
  8274. "jpeg",
  8275. "bmp",
  8276. "gif",
  8277. "webp",
  8278. "psd",
  8279. "svg",
  8280. "tiff",
  8281. ];
  8282. var fileA = [
  8283. "PDF",
  8284. "DOC",
  8285. "DOCX",
  8286. "DOCM",
  8287. "DOTM",
  8288. "DOTX",
  8289. "PPTX",
  8290. "PPSX",
  8291. "PPT",
  8292. "PPS",
  8293. "PPTM",
  8294. "POTM",
  8295. "PPAM",
  8296. "POTX",
  8297. "PPSM",
  8298. "XLSX",
  8299. "XLS",
  8300. ];
  8301. var videoA = [
  8302. "AVI",
  8303. "NAVI",
  8304. "MPEG",
  8305. "ASF",
  8306. "MOV",
  8307. "WMV",
  8308. "3GP",
  8309. "RM",
  8310. "RMVB",
  8311. "FLV",
  8312. "F4V",
  8313. "H.264",
  8314. "H.265",
  8315. "REAL VIDEO",
  8316. "MKV",
  8317. "WebM",
  8318. "HDDVD",
  8319. "MP4",
  8320. "MPG",
  8321. "M4V",
  8322. "MGV",
  8323. "OGV",
  8324. "QTM",
  8325. "STR",
  8326. "AMC",
  8327. "DVX",
  8328. "EVO",
  8329. "DAT",
  8330. "OGG",
  8331. "OGM",
  8332. ];
  8333. if (
  8334. fileA.indexOf(
  8335. data.Location.split(".")[
  8336. data.Location.split(".").length - 1
  8337. ].toLocaleUpperCase()
  8338. ) != -1
  8339. ) {
  8340. _type = 3;
  8341. } else if (
  8342. videoA.indexOf(
  8343. data.Location.split(".")[
  8344. data.Location.split(".").length - 1
  8345. ].toLocaleUpperCase()
  8346. ) != -1
  8347. ) {
  8348. _type = 2;
  8349. } else if (
  8350. imgA.indexOf(
  8351. data.Location.split(".")[
  8352. data.Location.split(".").length - 1
  8353. ].toLocaleLowerCase()
  8354. ) != -1
  8355. ) {
  8356. _type = 13;
  8357. } else {
  8358. _type = 12;
  8359. }
  8360. _this.infoData.push({
  8361. name: file.name,
  8362. url: data.Location,
  8363. uid: file.uid,
  8364. type: _type,
  8365. fileid: fileid,
  8366. });
  8367. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  8368. name: file.name,
  8369. url: data.Location,
  8370. uid: file.uid,
  8371. type: _type,
  8372. fileid: fileid,
  8373. })
  8374. } else if (type == 2 || type == 3 || type == 12) {
  8375. _this.infoData.push({
  8376. name: file.name,
  8377. url: data.Location,
  8378. uid: file.uid,
  8379. type: type,
  8380. fileid: fileid,
  8381. });
  8382. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  8383. name: file.name,
  8384. url: data.Location,
  8385. uid: file.uid,
  8386. type: type,
  8387. fileid: fileid,
  8388. })
  8389. }
  8390. console.log(data.Location);
  8391. console.log(fileid);
  8392. }
  8393. });
  8394. }
  8395. },
  8396. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  8397. // const loading = this.openLoading();
  8398. var file = event.target.files[0];
  8399. var credentials = {
  8400. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8401. secretAccessKey: "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",
  8402. }; //秘钥形式的登录上传
  8403. window.AWS.config.update(credentials);
  8404. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8405. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8406. var _this = this;
  8407. if (type == 3) {
  8408. var b = [
  8409. "DOC",
  8410. "DOCX",
  8411. "DOCM",
  8412. "DOTM",
  8413. "DOTX",
  8414. "PPTX",
  8415. "PPSX",
  8416. "PPT",
  8417. "PPS",
  8418. "PPTM",
  8419. "POTM",
  8420. "PPAM",
  8421. "POTX",
  8422. "PPSM",
  8423. ];
  8424. if (
  8425. b.indexOf(
  8426. file.name
  8427. .split(".")
  8428. [file.name.split(".").length - 1].toLocaleUpperCase()
  8429. ) != -1
  8430. ) {
  8431. if (file.size / 1024 / 1024 > 80) {
  8432. this.$message.error("上传文件大于80兆,请重新选择文件!");
  8433. this.inputShow = true;
  8434. // var a = _this.$refs.upload1.uploadFiles;
  8435. // a.splice(a.length - 1, a.length);
  8436. // loading.close();
  8437. return;
  8438. }
  8439. } else if (
  8440. file.name
  8441. .split(".")
  8442. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  8443. ) {
  8444. if (file.size / 1024 / 1024 > 80) {
  8445. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  8446. this.inputShow = true;
  8447. // var a = _this.$refs.upload1.uploadFiles;
  8448. // a.splice(a.length - 1, a.length);
  8449. // loading.close();
  8450. return;
  8451. }
  8452. }
  8453. }
  8454. this.inputShow = false;
  8455. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8456. itemTaskIndex
  8457. ].progress = 0;
  8458. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8459. itemTaskIndex
  8460. ].proVisible = true;
  8461. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8462. itemTaskIndex
  8463. ].isFinishSize = 0;
  8464. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8465. itemTaskIndex
  8466. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  8467. _this.$forceUpdate();
  8468. if (file) {
  8469. var params = {
  8470. Key:
  8471. file.name.split(".")[0] +
  8472. new Date().getTime() +
  8473. "." +
  8474. file.name.split(".")[file.name.split(".").length - 1],
  8475. ContentType: file.type,
  8476. Body: file,
  8477. "Access-Control-Allow-Credentials": "*",
  8478. ACL: "public-read",
  8479. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8480. var options = {
  8481. partSize: 2048 * 1024 * 1024,
  8482. queueSize: 2,
  8483. leavePartsOnError: true,
  8484. };
  8485. bucket
  8486. .upload(params, options)
  8487. .on("httpUploadProgress", function (evt) {
  8488. //这里可以写进度条
  8489. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8490. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8491. itemTaskIndex
  8492. ].progress = parseInt((evt.loaded / evt.total) * 100);
  8493. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8494. itemTaskIndex
  8495. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  8496. _this.$forceUpdate();
  8497. })
  8498. .send(function (err, data) {
  8499. // loading.close();
  8500. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8501. itemTaskIndex
  8502. ].progress = 100;
  8503. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8504. itemTaskIndex
  8505. ].isFinishSize =
  8506. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8507. itemTaskIndex
  8508. ].isAllSize;
  8509. _this.$forceUpdate();
  8510. setTimeout(() => {
  8511. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8512. itemTaskIndex
  8513. ].proVisible = false;
  8514. _this.$forceUpdate();
  8515. }, 1000);
  8516. _this.inputShow = true;
  8517. if (err) {
  8518. // var a = _this.$refs.upload1.uploadFiles;
  8519. // a.splice(a.length - 1, a.length);
  8520. _this.$message.error("上传失败");
  8521. } else {
  8522. if (type == 2 || type == 3) {
  8523. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8524. itemTaskIndex
  8525. ].chapterData.push({
  8526. name: file.name,
  8527. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8528. // itemTaskIndex
  8529. // ].chapterData.length+1),
  8530. url: data.Location,
  8531. uid: file.uid,
  8532. type: type,
  8533. text: string,
  8534. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8535. // itemTaskIndex
  8536. // ].chapterData.length + 1),
  8537. });
  8538. _this.imgChange1(null, null, type, itemTaskIndex);
  8539. } else if (type == 4) {
  8540. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8541. itemTaskIndex
  8542. ].fileList1.push({
  8543. name: file.name,
  8544. url: data.Location,
  8545. uid: file.uid,
  8546. });
  8547. _this.imgChange1(null, null, type, itemTaskIndex);
  8548. } else if (type == 5) {
  8549. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8550. itemTaskIndex
  8551. ].homeworkList.push({
  8552. name: file.name,
  8553. url: data.Location,
  8554. uid: file.uid,
  8555. });
  8556. _this.imgChange1(null, null, type, itemTaskIndex);
  8557. }
  8558. console.log(data.Location);
  8559. }
  8560. });
  8561. }
  8562. },
  8563. addunit() {
  8564. this.unitJson.push({
  8565. dyName: "", //单元标题
  8566. isUpdate: 1,
  8567. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  8568. chapterInfo: [
  8569. {
  8570. isread: false,
  8571. chapterid: this.guid(),
  8572. title: "",
  8573. courseName: "",
  8574. taskJson: [
  8575. {
  8576. task: "",
  8577. taskDetail: "",
  8578. chapterData: [],
  8579. toolText: "",
  8580. toolChoose: [
  8581. {
  8582. tool: [],
  8583. toolDetail: "",
  8584. toolType: 0,
  8585. askCount: 1,
  8586. askTitle: "",
  8587. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8588. },
  8589. ],
  8590. isShowTools: false,
  8591. askCount: 1,
  8592. isFold: 1,
  8593. askTitle: "",
  8594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8595. checkJson: [{ checkCount: [], checkPerent: [] }],
  8596. homeworkList: [],
  8597. },
  8598. ],
  8599. itemCount: 1,
  8600. fileList1: [],
  8601. video: [],
  8602. testData: [],
  8603. pData: [],
  8604. templateArray: [],
  8605. },
  8606. ],
  8607. });
  8608. this.addindex = this.unitJson.length - 1;
  8609. setTimeout(() => {
  8610. this.unitIndex = this.unitJson.length - 1;
  8611. setTimeout(() => {
  8612. console.log(this.$refs.dyInput);
  8613. this.$refs.dyInput[0].focus();
  8614. }, 100);
  8615. this.unitSet(this.unitIndex);
  8616. }, 0);
  8617. },
  8618. addToolFun(itemTaskIndex) {
  8619. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8620. itemTaskIndex
  8621. ].toolChoose.push({
  8622. tool: [],
  8623. toolDetail: "",
  8624. toolType: 0,
  8625. askCount: 1,
  8626. askTitle: "",
  8627. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8628. });
  8629. },
  8630. addTaskBorder() {
  8631. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  8632. task: "",
  8633. taskDetail: "",
  8634. chapterData: [],
  8635. toolText: "",
  8636. toolChoose: [
  8637. {
  8638. tool: [],
  8639. toolDetail: "",
  8640. toolType: 0,
  8641. askCount: 1,
  8642. askTitle: "",
  8643. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8644. },
  8645. ],
  8646. isShowTools: false,
  8647. askCount: 1,
  8648. isFold: 1, //任务收起状态
  8649. askTitle: "",
  8650. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8651. checkJson: [{ checkCount: [], checkPerent: [] }],
  8652. homeworkList: [],
  8653. });
  8654. setTimeout(() => {
  8655. this.checkEva(this.checkId);
  8656. setTimeout(() => {
  8657. this.checkEva(this.checkId);
  8658. }, 100);
  8659. }, 100);
  8660. },
  8661. add(e, i) {
  8662. var el = e.currentTarget;
  8663. el.getElementsByTagName("input")[0].click();
  8664. },
  8665. fold(i, e) {
  8666. if (
  8667. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0
  8668. ) {
  8669. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  8670. } else {
  8671. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  8672. }
  8673. },
  8674. fold2(i) {
  8675. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  8676. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8677. i
  8678. ].isFold2 = false;
  8679. } else {
  8680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  8681. }
  8682. this.$forceUpdate();
  8683. },
  8684. foldEva(i) {
  8685. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  8686. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8687. i
  8688. ].isEvaFold = false;
  8689. } else {
  8690. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8691. i
  8692. ].isEvaFold = true;
  8693. setTimeout(() => {
  8694. this.checkEva(this.checkId);
  8695. setTimeout(() => {
  8696. this.checkEva(this.checkId);
  8697. }, 500);
  8698. }, 0);
  8699. }
  8700. this.$forceUpdate();
  8701. },
  8702. foldC(i) {
  8703. if (
  8704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  8705. ) {
  8706. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8707. i
  8708. ].isFoldchapter = false;
  8709. } else {
  8710. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8711. i
  8712. ].isFoldchapter = true;
  8713. }
  8714. this.$forceUpdate();
  8715. },
  8716. fold3(i, ti) {
  8717. if (
  8718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  8719. .isFold3
  8720. ) {
  8721. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8722. ti
  8723. ].isFold3 = false;
  8724. } else {
  8725. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8726. ti
  8727. ].isFold3 = true;
  8728. }
  8729. this.$forceUpdate();
  8730. },
  8731. deleteHomeworkBox(unitIndex, index, i) {
  8732. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  8733. this.taskCount
  8734. ].homeworkList.splice(i, 1);
  8735. },
  8736. getStudent() {
  8737. let params = {
  8738. oid: this.oid,
  8739. cu: "",
  8740. cn: this.searchPeople,
  8741. };
  8742. this.ajax
  8743. .get(this.$store.state.api + "selectStudentAdd", params)
  8744. .then((res) => {
  8745. this.studentJuri = res.data[0];
  8746. })
  8747. .catch((err) => {
  8748. this.isLoading = false;
  8749. console.error(err);
  8750. });
  8751. },
  8752. // 添加协同成员其他选项按钮
  8753. getTeacherCopy(){
  8754. this.CollLoading=true
  8755. this.collid = ''
  8756. this.collid = '1xpz'
  8757. let params = {
  8758. oid:
  8759. this.org && this.org != "undefined" && this.org != "null"
  8760. ? this.org
  8761. : this.oid,
  8762. cu: "",
  8763. cn: this.searchTN,
  8764. coll: ''
  8765. };
  8766. this.ajax
  8767. .get(
  8768. this.$store.state.api +
  8769. (this.org && this.org != "undefined" && this.org != "null"
  8770. ? "selectCollaborativeMembersOrg"
  8771. : "selectCollaborativeMembers"),
  8772. params
  8773. )
  8774. .then((res) => {
  8775. let teacherJuri = res.data[0];
  8776. this.CollaborativeTeaList = res.data[1];
  8777. for (var i = 0; i < teacherJuri.length; i++) {
  8778. if (teacherJuri[i].userid == this.userid) {
  8779. teacherJuri.splice(i, 1);
  8780. break;
  8781. }
  8782. }
  8783. this.teacherJuri = teacherJuri.filter((i,index)=>{
  8784. return (i.cclassid == '' || i.cclassid == null)
  8785. })
  8786. console.log(' this.teacherJuri', this.teacherJuri);
  8787. let _check = [];
  8788. let _check2 = [];
  8789. for (var i = 0; i < this.teacherJuri.length; i++) {
  8790. var gid = this.teacherJuri[i].userid;
  8791. _check.push(gid);
  8792. }
  8793. for (var i = 0; i < this.checkboxList3.length; i++) {
  8794. var _id = this.checkboxList3[i];
  8795. if (_check.indexOf(_id) !== -1) {
  8796. _check2.push(_id);
  8797. }
  8798. }
  8799. if (_check2.length==0 && _check.length==0) {
  8800. }else{
  8801. this.checkAll2 = _check2.length === _check.length;
  8802. }
  8803. this.CollLoading=false
  8804. })
  8805. .catch((err) => {
  8806. console.error(err);
  8807. this.CollLoading=false
  8808. });
  8809. },
  8810. getTeacher(val) {
  8811. this.CollLoading=true
  8812. this.collid = ''
  8813. this.collid = !val ? '' : val
  8814. let params = {
  8815. oid:
  8816. this.org && this.org != "undefined" && this.org != "null"
  8817. ? this.org
  8818. : this.oid,
  8819. cu: "",
  8820. cn: this.searchTN,
  8821. coll: this.collid
  8822. };
  8823. this.ajax
  8824. .get(
  8825. this.$store.state.api +
  8826. (this.org && this.org != "undefined" && this.org != "null"
  8827. ? "selectCollaborativeMembersOrg"
  8828. : "selectCollaborativeMembers"),
  8829. params
  8830. )
  8831. .then((res) => {
  8832. let teacherJuri = res.data[0];
  8833. this.CollaborativeTeaList = res.data[1];
  8834. for (var i = 0; i < teacherJuri.length; i++) {
  8835. if (teacherJuri[i].userid == this.userid) {
  8836. teacherJuri.splice(i, 1);
  8837. break;
  8838. }
  8839. }
  8840. this.teacherJuri = teacherJuri;
  8841. let _check = [];
  8842. let _check2 = [];
  8843. for (var i = 0; i < this.teacherJuri.length; i++) {
  8844. var gid = this.teacherJuri[i].userid;
  8845. _check.push(gid);
  8846. }
  8847. for (var i = 0; i < this.checkboxList3.length; i++) {
  8848. var _id = this.checkboxList3[i];
  8849. if (_check.indexOf(_id) !== -1) {
  8850. _check2.push(_id);
  8851. }
  8852. }
  8853. if (_check2.length==0 && _check.length==0) {
  8854. }else{
  8855. this.checkAll2 = _check2.length === _check.length;
  8856. }
  8857. this.CollLoading=false
  8858. })
  8859. .catch((err) => {
  8860. console.error(err);
  8861. this.CollLoading=false
  8862. });
  8863. },
  8864. searchStudent() {
  8865. this.getStudent();
  8866. },
  8867. selectGrage() {
  8868. let params = {
  8869. oid: this.oid,
  8870. };
  8871. this.ajax
  8872. .get(this.$store.state.api + "selectGrageBySchool", params)
  8873. .then((res) => {
  8874. this.gradeList = res.data[0];
  8875. })
  8876. .catch((err) => {
  8877. this.isLoading = false;
  8878. console.error(err);
  8879. });
  8880. },
  8881. //获取班级列表
  8882. getClass() {
  8883. let params = {
  8884. oid: this.oid,
  8885. gid: this.gradeId,
  8886. cn: this.classSearch,
  8887. };
  8888. this.ajax
  8889. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  8890. .then((res) => {
  8891. if (!this.grade.length) {
  8892. this.grade = res.data[0];
  8893. }
  8894. this.grade2 = res.data[0];
  8895. this.classJuri = res.data[0];
  8896. let _check = [];
  8897. let _check2 = [];
  8898. for (var i = 0; i < this.grade2.length; i++) {
  8899. var gid = this.grade2[i].id;
  8900. _check.push(gid);
  8901. }
  8902. for (var i = 0; i < this.checkboxList2.length; i++) {
  8903. var _id = this.checkboxList2[i];
  8904. if (_check.indexOf(_id) !== -1) {
  8905. _check2.push(_id);
  8906. }
  8907. }
  8908. this.checkAll = _check2.length === _check.length;
  8909. })
  8910. .catch((err) => {
  8911. this.isLoading = false;
  8912. console.error(err);
  8913. });
  8914. },
  8915. CourseType2Change(val) {
  8916. this.pTypeCheck = [];
  8917. for (var i = 0; i < this.CourseType2.length; i++) {
  8918. let typeA = this.CourseType2[i];
  8919. if (val.indexOf(typeA.name) != -1) {
  8920. this.pTypeCheck.push(...typeA.id);
  8921. }
  8922. }
  8923. },
  8924. getChapterData(e, i, j, ic, type) {
  8925. e.stopPropagation();
  8926. this.updataC = true;
  8927. this.icc = ic;
  8928. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  8929. console.log("还不能下载图片喔");
  8930. }
  8931. },
  8932. deleteChapterData(e, i, j, ic, taskI) {
  8933. e.stopPropagation();
  8934. let _this = this;
  8935. _this
  8936. .$confirm("确定删除此项?", "提示", {
  8937. confirmButtonText: "确定",
  8938. cancelButtonText: "取消",
  8939. type: "warning",
  8940. })
  8941. .then(() => {
  8942. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  8943. ic,
  8944. 1
  8945. );
  8946. })
  8947. .catch(() => {
  8948. return;
  8949. });
  8950. },
  8951. deleteInfoData(e, ic) {
  8952. e.stopPropagation();
  8953. let _this = this;
  8954. _this
  8955. .$confirm("确定删除此项?", "提示", {
  8956. confirmButtonText: "确定",
  8957. cancelButtonText: "取消",
  8958. type: "warning",
  8959. })
  8960. .then(() => {
  8961. _this.infoData.splice(
  8962. ic,
  8963. 1
  8964. );
  8965. })
  8966. .catch(() => {
  8967. return;
  8968. });
  8969. },
  8970. updataVideoT(e, i, j, ic) {
  8971. // e.stopPropagation();
  8972. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  8973. // ic
  8974. // ].name = JSON.parse(JSON.stringify(e.target.value));
  8975. this.line =
  8976. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  8977. this.taskCount = j;
  8978. this.lineCount = ic;
  8979. this.dialogVisibleupdataVideoT = true;
  8980. this.$forceUpdate();
  8981. },
  8982. checkChpater(e, i, j, ic){
  8983. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  8984. if(type == 3){
  8985. var fileA = [
  8986. "DOC",
  8987. "DOCX",
  8988. "DOCM",
  8989. "DOTM",
  8990. "DOTX",
  8991. "PPTX",
  8992. "PPSX",
  8993. "PPT",
  8994. "PPS",
  8995. "PPTM",
  8996. "POTM",
  8997. "PPAM",
  8998. "POTX",
  8999. "PPSM",
  9000. "XLSX",
  9001. "XLS"
  9002. ];
  9003. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  9004. if (
  9005. fileA.indexOf(
  9006. url.split(".")[
  9007. url.split(".").length - 1
  9008. ].toLocaleUpperCase()
  9009. ) != -1
  9010. ) {
  9011. this.dialogVisibleOffice = true
  9012. this.wurl = url
  9013. } else if (
  9014. "pdf".indexOf(
  9015. url.split(".")[
  9016. url.split(".").length - 1
  9017. ].toLocaleLowerCase()
  9018. ) != -1
  9019. ) {
  9020. this.dialogVisiblePdf = true
  9021. this.wurl = url
  9022. }
  9023. }
  9024. },
  9025. updataVideoC() {
  9026. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9027. this.taskCount
  9028. ].chapterData[this.lineCount].name = JSON.parse(
  9029. JSON.stringify(this.line)
  9030. );
  9031. this.dialogVisibleupdataVideoT = false;
  9032. this.$forceUpdate();
  9033. },
  9034. upCd(e, i, j, taskCount, ic) {
  9035. e.stopPropagation();
  9036. if (ic == 0) {
  9037. return;
  9038. }
  9039. var a = JSON.parse(
  9040. JSON.stringify(
  9041. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  9042. ic - 1
  9043. ]
  9044. )
  9045. );
  9046. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  9047. JSON.parse(
  9048. JSON.stringify(
  9049. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  9050. )
  9051. );
  9052. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  9053. this.$forceUpdate();
  9054. },
  9055. downCd(e, i, j, taskCount, ic) {
  9056. e.stopPropagation();
  9057. if (
  9058. ic ==
  9059. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  9060. 1
  9061. ) {
  9062. return;
  9063. }
  9064. var a = JSON.parse(
  9065. JSON.stringify(
  9066. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  9067. ic + 1
  9068. ]
  9069. )
  9070. );
  9071. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  9072. JSON.parse(
  9073. JSON.stringify(
  9074. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  9075. )
  9076. );
  9077. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  9078. this.$forceUpdate();
  9079. },
  9080. async upTool(e, i, j, tooli) {
  9081. e.stopPropagation();
  9082. if (tooli == 0) {
  9083. return;
  9084. }
  9085. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  9086. let count2 = await this.getWorksCount(3, i, j, tooli);
  9087. if (count1 > 0 || count2 > 0) {
  9088. this.$confirm(
  9089. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  9090. "提示",
  9091. {
  9092. confirmButtonText: "确定",
  9093. cancelButtonText: "取消",
  9094. type: "warning",
  9095. }
  9096. )
  9097. .then(() => {
  9098. var a = JSON.parse(
  9099. JSON.stringify(
  9100. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  9101. tooli - 1
  9102. ]
  9103. )
  9104. );
  9105. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  9106. JSON.parse(
  9107. JSON.stringify(
  9108. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  9109. )
  9110. );
  9111. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  9112. this.$forceUpdate();
  9113. })
  9114. .catch(() => {
  9115. return;
  9116. });
  9117. } else {
  9118. var a = JSON.parse(
  9119. JSON.stringify(
  9120. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  9121. )
  9122. );
  9123. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  9124. JSON.parse(
  9125. JSON.stringify(
  9126. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  9127. )
  9128. );
  9129. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  9130. this.$forceUpdate();
  9131. }
  9132. },
  9133. async downTool(e, i, j, tooli) {
  9134. e.stopPropagation();
  9135. if (
  9136. tooli ==
  9137. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  9138. ) {
  9139. return;
  9140. }
  9141. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  9142. let count2 = await this.getWorksCount(3, i, j, tooli);
  9143. if (count1 > 0 || count2 > 0) {
  9144. this.$confirm(
  9145. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  9146. "提示",
  9147. {
  9148. confirmButtonText: "确定",
  9149. cancelButtonText: "取消",
  9150. type: "warning",
  9151. }
  9152. )
  9153. .then(() => {
  9154. var a = JSON.parse(
  9155. JSON.stringify(
  9156. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  9157. tooli + 1
  9158. ]
  9159. )
  9160. );
  9161. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  9162. JSON.parse(
  9163. JSON.stringify(
  9164. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  9165. )
  9166. );
  9167. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  9168. this.$forceUpdate();
  9169. })
  9170. .catch(() => {
  9171. return;
  9172. });
  9173. } else {
  9174. var a = JSON.parse(
  9175. JSON.stringify(
  9176. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  9177. )
  9178. );
  9179. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  9180. JSON.parse(
  9181. JSON.stringify(
  9182. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  9183. )
  9184. );
  9185. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  9186. this.$forceUpdate();
  9187. }
  9188. },
  9189. addWork(type) {
  9190. if(type == 2 && this.courseName == "") {
  9191. this.$message.error("请补充填写课程名称");
  9192. return;
  9193. }
  9194. let cPan = 1;
  9195. for (var i = 0; i < this.unitJson.length; i++) {
  9196. for (
  9197. var j = 0;
  9198. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  9199. j++
  9200. ) {
  9201. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  9202. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  9203. if (
  9204. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  9205. ) {
  9206. for (
  9207. var z = 0;
  9208. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  9209. z++
  9210. ) {
  9211. if (
  9212. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  9213. .length
  9214. ) {
  9215. this.$message.error("请把工具添加完整");
  9216. cPan = 2;
  9217. break;
  9218. }
  9219. }
  9220. }
  9221. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  9222. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  9223. i
  9224. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  9225. return ele.value != "";
  9226. });
  9227. }
  9228. }
  9229. }
  9230. this.inputShow = true;
  9231. if (cPan == 2) {
  9232. this.steps--;
  9233. return;
  9234. }
  9235. for (var i = 0; i < this.unitJson.length; i++) {
  9236. delete this.unitJson[i].isUpdate;
  9237. }
  9238. let params = [
  9239. {
  9240. uid: this.userid,
  9241. title: this.courseName,
  9242. brief: this.courseText,
  9243. cover:
  9244. this.cover.length > 0
  9245. ? JSON.stringify(this.cover)
  9246. : JSON.stringify([
  9247. {
  9248. name: "noBanner.jpg",
  9249. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  9250. uid: 1656409780264,
  9251. status: "success",
  9252. },
  9253. ]),
  9254. evaId: this.evalua,
  9255. astudent:
  9256. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  9257. see: this.isTeacherSee == true ? 1 : 0,
  9258. chapters: JSON.stringify(this.unitJson),
  9259. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  9260. courseType: JSON.stringify(this.courseTypeId),
  9261. ateacher:
  9262. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  9263. inviteCode: JSON.stringify(this.inviteCode),
  9264. refile: JSON.stringify(this.infoData),
  9265. reBrief: this.courseText2,
  9266. cpote: JSON.stringify(this.cpote),
  9267. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  9268. iresearch: this.isFileSearch ? 1 : 2,
  9269. },
  9270. ];
  9271. this.ajax
  9272. .post(this.$store.state.api + "addWorkNew2AI3", params)
  9273. .then((res) => {
  9274. console.log(this.steps);
  9275. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  9276. this.$message({
  9277. message: "新增成功",
  9278. type: "success",
  9279. });
  9280. }
  9281. this.number = res.data.ordernumber;
  9282. this.courseId = res.data.courseId;
  9283. this.cid = res.data.courseId;
  9284. this.courseUserid = this.userid;
  9285. this.islogin = true;
  9286. // this.updateCourseState(4);
  9287. this.updateCourseState(5);
  9288. this.addtips()
  9289. if(type == 2){
  9290. this.retrunCourse()
  9291. }
  9292. })
  9293. .catch((err) => {
  9294. this.$message.error("网络不佳");
  9295. console.error(err);
  9296. });
  9297. },
  9298. goCourse() {
  9299. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  9300. },
  9301. updateWork2() {
  9302. let _unitIndex = this.unitIndex;
  9303. let cPan = 1;
  9304. for (
  9305. var j = 0;
  9306. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9307. j++
  9308. ) {
  9309. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9310. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9311. j
  9312. ].proVisible2 = false;
  9313. if (
  9314. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9315. .length > 1
  9316. ) {
  9317. for (
  9318. var z = 0;
  9319. z <
  9320. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9321. .length;
  9322. z++
  9323. ) {
  9324. if (
  9325. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9326. z
  9327. ].tool.length
  9328. ) {
  9329. this.$message.error("请把工具添加完整");
  9330. cPan = 2;
  9331. break;
  9332. }
  9333. }
  9334. }
  9335. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9336. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9337. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9338. (ele) => {
  9339. return ele.value != "";
  9340. }
  9341. );
  9342. }
  9343. }
  9344. this.inputShow = true;
  9345. if (cPan == 2) {
  9346. this.steps--;
  9347. return;
  9348. }
  9349. let params = [
  9350. {
  9351. cid: this.cid,
  9352. chapters: JSON.stringify(this.unitJson),
  9353. uid: this.userid,
  9354. unitIndex: _unitIndex,
  9355. },
  9356. ];
  9357. this.ajax
  9358. .post(this.$store.state.api + "updateWorkNew4", params)
  9359. .then((res) => {
  9360. this.$message({
  9361. message: "修改成功",
  9362. type: "success",
  9363. });
  9364. this.courseId = this.cid;
  9365. this.addtips();
  9366. })
  9367. .catch((err) => {
  9368. this.$message.error("网络不佳");
  9369. console.error(err);
  9370. });
  9371. },
  9372. updateWork3(unitIndex) {
  9373. let _unitIndex = unitIndex;
  9374. let cPan = 1;
  9375. for (
  9376. var j = 0;
  9377. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9378. j++
  9379. ) {
  9380. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9381. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9382. j
  9383. ].proVisible2 = false;
  9384. if (
  9385. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9386. .length > 1
  9387. ) {
  9388. for (
  9389. var z = 0;
  9390. z <
  9391. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9392. .length;
  9393. z++
  9394. ) {
  9395. if (
  9396. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9397. z
  9398. ].tool.length
  9399. ) {
  9400. this.$message.error("请把工具添加完整");
  9401. cPan = 2;
  9402. break;
  9403. }
  9404. }
  9405. }
  9406. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9407. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9408. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9409. (ele) => {
  9410. return ele.value != "";
  9411. }
  9412. );
  9413. }
  9414. }
  9415. this.inputShow = true;
  9416. if (cPan == 2) {
  9417. this.steps--;
  9418. return;
  9419. }
  9420. let params = [
  9421. {
  9422. cid: this.cid,
  9423. chapters: JSON.stringify(this.unitJson),
  9424. uid: this.userid,
  9425. unitIndex: _unitIndex,
  9426. },
  9427. ];
  9428. this.ajax
  9429. .post(this.$store.state.api + "updateWorkNew4", params)
  9430. .then((res) => {
  9431. // this.$message({
  9432. // message: "修改成功",
  9433. // type: "success",
  9434. // });
  9435. this.courseId = this.cid;
  9436. this.addtips()
  9437. })
  9438. .catch((err) => {
  9439. this.$message.error("网络不佳");
  9440. console.error(err);
  9441. });
  9442. },
  9443. updateWork() {
  9444. let cPan = 1;
  9445. for (var i = 0; i < this.unitJson.length; i++) {
  9446. for (
  9447. var j = 0;
  9448. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  9449. j++
  9450. ) {
  9451. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  9452. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  9453. if (
  9454. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  9455. ) {
  9456. for (
  9457. var z = 0;
  9458. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  9459. z++
  9460. ) {
  9461. if (
  9462. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  9463. .length
  9464. ) {
  9465. this.$message.error("请把工具添加完整");
  9466. cPan = 2;
  9467. break;
  9468. }
  9469. }
  9470. }
  9471. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  9472. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  9473. i
  9474. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  9475. return ele.value != "";
  9476. });
  9477. }
  9478. }
  9479. }
  9480. this.inputShow = true;
  9481. if (cPan == 2) {
  9482. this.steps--;
  9483. return;
  9484. }
  9485. for (var i = 0; i < this.unitJson.length; i++) {
  9486. delete this.unitJson[i].isUpdate;
  9487. }
  9488. let params = [
  9489. {
  9490. cid: this.cid,
  9491. title: this.courseName,
  9492. brief: this.courseText,
  9493. cover:
  9494. this.cover.length > 0
  9495. ? JSON.stringify(this.cover)
  9496. : JSON.stringify([
  9497. {
  9498. name: "noBanner.jpg",
  9499. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  9500. uid: 1656409780264,
  9501. status: "success",
  9502. },
  9503. ]),
  9504. evaId: this.evalua,
  9505. astudent:
  9506. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  9507. see: this.isTeacherSee == true ? 1 : 0,
  9508. chapters: JSON.stringify(this.unitJson),
  9509. template: this.myWord != "undefined" ? this.myWord : [],
  9510. uid: this.userid,
  9511. courseType: JSON.stringify(this.courseTypeId),
  9512. ateacher:
  9513. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  9514. inviteCode: JSON.stringify(this.inviteCode),
  9515. refile: JSON.stringify(this.infoData),
  9516. reBrief: this.courseText2,
  9517. cpote: JSON.stringify(this.cpote),
  9518. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  9519. iresearch: this.isFileSearch ? 1 : 2,
  9520. },
  9521. ];
  9522. this.ajax
  9523. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  9524. .then((res) => {
  9525. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  9526. if (this.cidType == 1) {
  9527. this.$message({
  9528. message: "修改成功",
  9529. type: "success",
  9530. });
  9531. } else {
  9532. this.$message({
  9533. message: "新增成功",
  9534. type: "success",
  9535. });
  9536. }
  9537. }
  9538. this.number = this.nbOrder;
  9539. this.courseId = this.cid;
  9540. this.addtips()
  9541. })
  9542. .catch((err) => {
  9543. this.$message.error("网络不佳");
  9544. console.error(err);
  9545. });
  9546. },
  9547. insertWord() {
  9548. this.dialogVisible1 = true;
  9549. this.updateBoolean2 = false;
  9550. this.tTitle = "";
  9551. this.tdetail = "";
  9552. },
  9553. addWord() {
  9554. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  9555. name: this.tTitle,
  9556. content: this.tdetail,
  9557. uid: this.guid(),
  9558. });
  9559. this.dialogVisible1 = false;
  9560. },
  9561. upWord() { },
  9562. selectWord(uid, i, c) {
  9563. this.dialogVisible1 = true;
  9564. this.updateBoolean2 = true;
  9565. if (
  9566. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  9567. ) {
  9568. this.tTitle =
  9569. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  9570. this.tdetail =
  9571. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  9572. }
  9573. },
  9574. isAddPP() {
  9575. if (this.checkboxList.length > 0) {
  9576. this.$message({
  9577. message: "添加成功",
  9578. type: "success",
  9579. });
  9580. this.dialogVisible3 = false;
  9581. } else {
  9582. this.$message({
  9583. message: "请添加课程成员",
  9584. type: "error",
  9585. });
  9586. }
  9587. },
  9588. isAddClass() {
  9589. this.dialogVisibleClass = false;
  9590. },
  9591. isAddPPTeacher() {
  9592. this.dialogVisibleMember = false;
  9593. this.setMan();
  9594. },
  9595. getTipsTemplate(){
  9596. if(this.templateid){
  9597. let params = {
  9598. id: this.templateid
  9599. }
  9600. this.ajax
  9601. .get(this.$store.state.api + "selectTipsTemplateById", params)
  9602. .then((res) => {
  9603. if(res.data[0].length){
  9604. this.tipsJson = res.data[0][0]
  9605. this.aiJson = JSON.parse(res.data[0][0].tips)
  9606. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  9607. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9608. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  9609. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  9610. }
  9611. this.$forceUpdate();
  9612. }
  9613. })
  9614. .catch((err) => { });
  9615. }
  9616. },
  9617. getTemplate() {
  9618. this.ajax
  9619. .get(this.$store.state.api + "getCourseTemplateT", "")
  9620. .then((res) => {
  9621. this.templateArray = res.data[0];
  9622. this.getTemplateOid();
  9623. this.$forceUpdate();
  9624. })
  9625. .catch((err) => { });
  9626. },
  9627. getTemplateOid() {
  9628. let params = {
  9629. oid: this.oid,
  9630. };
  9631. this.ajax
  9632. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9633. .then((res) => {
  9634. if (res.data[0].length) {
  9635. this.templateArray = [...res.data[0], ...this.templateArray];
  9636. }
  9637. this.getTemplateOrg();
  9638. this.$forceUpdate();
  9639. })
  9640. .catch((err) => { });
  9641. },
  9642. getTemplateOrg() {
  9643. let params = {
  9644. oid: this.org,
  9645. };
  9646. this.ajax
  9647. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9648. .then((res) => {
  9649. if (res.data[0].length) {
  9650. this.templateArray = [...res.data[0], ...this.templateArray];
  9651. }
  9652. this.$forceUpdate();
  9653. })
  9654. .catch((err) => { });
  9655. },
  9656. clearChoose() {
  9657. this.clearArray.splice(this.templateC.id, 1);
  9658. this.dialogVisible2 = false;
  9659. },
  9660. clearAttText() {
  9661. this.AttText = {
  9662. title: "",
  9663. text: "",
  9664. };
  9665. this.dialogVisible6 = false;
  9666. },
  9667. clearLine() {
  9668. this.line = "";
  9669. this.dialogVisible7 = false;
  9670. },
  9671. openTemplate() {
  9672. this.ctJson = {};
  9673. this.templateDialog = true;
  9674. },
  9675. checkctJson(json) {
  9676. if (this.ctJson.id == json.id) {
  9677. this.ctJson = {};
  9678. } else {
  9679. this.ctJson = json;
  9680. }
  9681. },
  9682. addTemplate(res) {
  9683. let _this = this;
  9684. let _res = [];
  9685. if (res.id == 1) {
  9686. _res = [
  9687. {
  9688. dyName: "", //单元标题
  9689. easy: 1,
  9690. chapterInfo: [
  9691. {
  9692. isread: false,
  9693. chapterid: this.guid(),
  9694. title: "",
  9695. courseName: "",
  9696. taskJson: [
  9697. {
  9698. task: "",
  9699. taskDetail: "",
  9700. chapterData: [],
  9701. toolText: "",
  9702. toolChoose: [
  9703. {
  9704. tool: [],
  9705. toolDetail: "",
  9706. toolType: 0,
  9707. askCount: 1,
  9708. askTitle: "",
  9709. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9710. },
  9711. ],
  9712. isShowTools: false,
  9713. askCount: 1,
  9714. isFold: 1,
  9715. askTitle: "",
  9716. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9717. checkJson: [{ checkCount: [], checkPerent: [] }],
  9718. homeworkList: [],
  9719. },
  9720. ],
  9721. itemCount: 1,
  9722. fileList1: [],
  9723. video: [],
  9724. testData: [],
  9725. pData: [],
  9726. templateArray: [],
  9727. },
  9728. ],
  9729. },
  9730. ];
  9731. this.updateCourseState(1);
  9732. } else if (res.id == 2) {
  9733. let stageData = [];
  9734. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  9735. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  9736. if (!iframe && !iframe2) {
  9737. this.$message.error("请使用AI共创生成");
  9738. return;
  9739. }
  9740. let copyData = iframe ? iframe.contentWindow.copyData : false;
  9741. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  9742. if (
  9743. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  9744. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  9745. ) {
  9746. this.$message.error("请使用AI共创生成");
  9747. return;
  9748. }
  9749. stageData = copyData
  9750. ? copyData.stageData
  9751. : copyData2
  9752. ? copyData2.stageData
  9753. : [""];
  9754. for (var i = 0; i < stageData.length; i++) {
  9755. _res.push({
  9756. dyName: stageData[i], //单元标题
  9757. chapterInfo: [
  9758. {
  9759. isread: false,
  9760. chapterid: this.guid(),
  9761. title: "",
  9762. courseName: "",
  9763. taskJson: [
  9764. {
  9765. task: "",
  9766. taskDetail: "",
  9767. chapterData: [],
  9768. toolText: "",
  9769. toolChoose: [
  9770. {
  9771. tool: [],
  9772. toolDetail: "",
  9773. toolType: 0,
  9774. askCount: 1,
  9775. askTitle: "",
  9776. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9777. },
  9778. ],
  9779. isShowTools: false,
  9780. askCount: 1,
  9781. isFold: 1,
  9782. askTitle: "",
  9783. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9784. checkJson: [{ checkCount: [], checkPerent: [] }],
  9785. homeworkList: [],
  9786. },
  9787. ],
  9788. itemCount: 1,
  9789. fileList1: [],
  9790. video: [],
  9791. testData: [],
  9792. pData: [],
  9793. templateArray: [],
  9794. },
  9795. ],
  9796. });
  9797. }
  9798. this.updateCourseState(1);
  9799. } else if (!Object.keys(res).length) {
  9800. this.$message.error("请选择模板");
  9801. retrun;
  9802. } else {
  9803. _res = JSON.parse(res.chapters);
  9804. this.updateCourseState(parseInt(res.state));
  9805. }
  9806. _this
  9807. .$confirm(
  9808. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9809. "提示",
  9810. {
  9811. confirmButtonText: "确定",
  9812. cancelButtonText: "取消",
  9813. type: "warning",
  9814. }
  9815. )
  9816. .then(() => {
  9817. _this.unitJson = _res;
  9818. _this.updateWork();
  9819. // _this.steps++;
  9820. _this.templateDialog = false;
  9821. setTimeout(() => {
  9822. this.checkEva(this.checkId);
  9823. setTimeout(() => {
  9824. this.checkEva(this.checkId);
  9825. }, 100);
  9826. }, 1000);
  9827. })
  9828. .catch(() => {
  9829. return;
  9830. });
  9831. },
  9832. checkTemplate(res) {
  9833. let _this = this;
  9834. _this
  9835. .$confirm(
  9836. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9837. "提示",
  9838. {
  9839. confirmButtonText: "确定",
  9840. cancelButtonText: "取消",
  9841. type: "warning",
  9842. }
  9843. )
  9844. .then(() => {
  9845. _this.unitJson = JSON.parse(res.chapters);
  9846. _this.steps++;
  9847. setTimeout(() => {
  9848. this.checkEva(this.checkId);
  9849. setTimeout(() => {
  9850. this.checkEva(this.checkId);
  9851. }, 100);
  9852. }, 1000);
  9853. })
  9854. .catch(() => {
  9855. return;
  9856. });
  9857. },
  9858. checkTemplate1(w) {
  9859. this.steps++;
  9860. },
  9861. checkTemplate2() {
  9862. let _this = this;
  9863. _this
  9864. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  9865. confirmButtonText: "确定",
  9866. cancelButtonText: "取消",
  9867. type: "warning",
  9868. })
  9869. .then(() => {
  9870. _this.unitIndex = 0;
  9871. _this.unitJson = [
  9872. {
  9873. dyName: "", //单元标题
  9874. chapterInfo: [
  9875. {
  9876. isread: false,
  9877. chapterid: this.guid(),
  9878. title: "",
  9879. courseName: "",
  9880. taskJson: [
  9881. {
  9882. task: "",
  9883. taskDetail: "",
  9884. chapterData: [],
  9885. toolText: "",
  9886. toolChoose: [
  9887. {
  9888. tool: [],
  9889. toolDetail: "",
  9890. toolType: 0,
  9891. askCount: 1,
  9892. askTitle: "",
  9893. askJson: [
  9894. { askstitle: "", askItem: 1, checkList: [] },
  9895. ],
  9896. },
  9897. ],
  9898. isShowTools: false,
  9899. askCount: 1,
  9900. isFold: 1,
  9901. askTitle: "",
  9902. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9903. checkJson: [{ checkCount: [], checkPerent: [] }],
  9904. homeworkList: [],
  9905. },
  9906. ],
  9907. itemCount: 1,
  9908. fileList1: [],
  9909. video: [],
  9910. testData: [],
  9911. pData: [],
  9912. templateArray: [],
  9913. },
  9914. ],
  9915. },
  9916. ];
  9917. this.steps++;
  9918. setTimeout(() => {
  9919. this.checkEva(this.checkId);
  9920. setTimeout(() => {
  9921. this.checkEva(this.checkId);
  9922. }, 100);
  9923. }, 1000);
  9924. this.updateWork();
  9925. })
  9926. .catch(() => {
  9927. return;
  9928. });
  9929. },
  9930. checkTemplate3() {
  9931. let _this = this;
  9932. _this
  9933. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  9934. confirmButtonText: "确定",
  9935. cancelButtonText: "取消",
  9936. type: "warning",
  9937. })
  9938. .then(() => {
  9939. _this.unitIndex = 0;
  9940. _this.unitJson = [
  9941. {
  9942. dyName: "", //单元标题
  9943. easy: 1,
  9944. chapterInfo: [
  9945. {
  9946. isread: false,
  9947. chapterid: this.guid(),
  9948. title: "",
  9949. courseName: "",
  9950. taskJson: [
  9951. {
  9952. task: "",
  9953. taskDetail: "",
  9954. chapterData: [],
  9955. toolText: "",
  9956. toolChoose: [
  9957. {
  9958. tool: [],
  9959. toolDetail: "",
  9960. toolType: 0,
  9961. askCount: 1,
  9962. askTitle: "",
  9963. askJson: [
  9964. { askstitle: "", askItem: 1, checkList: [] },
  9965. ],
  9966. },
  9967. ],
  9968. isShowTools: false,
  9969. askCount: 1,
  9970. isFold: 1,
  9971. askTitle: "",
  9972. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9973. checkJson: [{ checkCount: [], checkPerent: [] }],
  9974. homeworkList: [],
  9975. },
  9976. ],
  9977. itemCount: 1,
  9978. fileList1: [],
  9979. video: [],
  9980. testData: [],
  9981. pData: [],
  9982. templateArray: [],
  9983. },
  9984. ],
  9985. },
  9986. ];
  9987. // this.steps++;
  9988. this.updateWork();
  9989. })
  9990. .catch(() => {
  9991. return;
  9992. });
  9993. },
  9994. checkTemplate4() {
  9995. let _this = this;
  9996. _this
  9997. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  9998. confirmButtonText: "确定",
  9999. cancelButtonText: "取消",
  10000. type: "warning",
  10001. })
  10002. .then(() => {
  10003. _this.unitIndex = 0;
  10004. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  10005. this.steps++;
  10006. this.updateWork();
  10007. })
  10008. .catch(() => {
  10009. return;
  10010. });
  10011. },
  10012. wordNext() {
  10013. this.dialogVisible2 = false;
  10014. },
  10015. isAddOrUpdateAttText() {
  10016. if (this.AttTextType == 0) {
  10017. this.addAttTextMessage();
  10018. } else {
  10019. this.updateAttText();
  10020. }
  10021. },
  10022. isAddOrUpdateLine() {
  10023. if (!this.lineTitle) {
  10024. this.$message.error("请填写链接标题");
  10025. return;
  10026. }
  10027. if (this.lineType == 0) {
  10028. this.addLine();
  10029. } else {
  10030. this.updateLine();
  10031. }
  10032. },
  10033. addAttTextMessage() {
  10034. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10035. this.taskCount
  10036. ].chapterData.push({
  10037. name: this.AttText.title,
  10038. url: this.AttText.text,
  10039. type: 6,
  10040. });
  10041. this.imgChange1(null, null, 6, this.taskCount);
  10042. this.dialogVisible6 = false;
  10043. },
  10044. selectAttText(itemTaskIndex, i) {
  10045. this.AttText.title =
  10046. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10047. itemTaskIndex
  10048. ].chapterData[i].name;
  10049. this.AttText.text =
  10050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10051. itemTaskIndex
  10052. ].chapterData[i].url;
  10053. this.taskCount = itemTaskIndex;
  10054. this.AttTextIndex = i;
  10055. this.AttTextType = 1;
  10056. this.dialogVisible6 = true;
  10057. },
  10058. updateAttText() {
  10059. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10060. this.taskCount
  10061. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  10062. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10063. this.taskCount
  10064. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  10065. this.dialogVisible6 = false;
  10066. },
  10067. addLine() {
  10068. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10069. this.lineCount
  10070. ].chapterData.push({
  10071. name: "链接",
  10072. title: this.lineTitle,
  10073. url: this.line,
  10074. type: 8,
  10075. });
  10076. this.imgChange1(null, null, 8, this.lineCount);
  10077. this.dialogVisible7 = false;
  10078. },
  10079. selectLine(itemTaskIndex, i) {
  10080. this.line =
  10081. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10082. itemTaskIndex
  10083. ].chapterData[i].url;
  10084. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10085. itemTaskIndex
  10086. ].chapterData[i].title
  10087. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10088. .chapterData[i].title
  10089. : "";
  10090. this.taskCount = itemTaskIndex;
  10091. this.lineCount = i;
  10092. this.lineType = 1;
  10093. this.dialogVisible7 = true;
  10094. },
  10095. openUpdateSource(itemTaskIndex, i) {
  10096. this.sourceData = {};
  10097. let source =
  10098. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10099. .chapterData[i];
  10100. this.sourceData[source.id] = {};
  10101. this.sourceData[source.id].name = source.title;
  10102. this.sourceData[source.id].url = source.url;
  10103. this.dialogVisibleSource = true;
  10104. this.updateSourcePan = true;
  10105. this.taskCount = itemTaskIndex;
  10106. this.lineCount = i;
  10107. },
  10108. updateLine() {
  10109. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10110. this.taskCount
  10111. ].chapterData[this.lineCount].url = this.line;
  10112. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10113. this.taskCount
  10114. ].chapterData[this.lineCount].title = this.lineTitle;
  10115. this.dialogVisible7 = false;
  10116. },
  10117. addPP() {
  10118. this.dialogVisible3 = true;
  10119. },
  10120. goTo(path) {
  10121. this.$router.push(path);
  10122. },
  10123. openTools(itemTaskIndex, i, toolIndex) {
  10124. this.toolIndex = toolIndex;
  10125. this.taskCount = itemTaskIndex;
  10126. if (i == 4) {
  10127. if (toolIndex == null) {
  10128. var a =
  10129. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10130. .chapterData;
  10131. for (var i = 0; i < a.length; i++) {
  10132. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  10133. this.askJson =
  10134. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10135. itemTaskIndex
  10136. ].chapterData[i].askJson;
  10137. }
  10138. }
  10139. } else {
  10140. this.askJson = JSON.parse(
  10141. JSON.stringify(
  10142. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10143. itemTaskIndex
  10144. ].toolChoose[toolIndex]
  10145. )
  10146. );
  10147. }
  10148. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  10149. this.dialogVisible5 = true;
  10150. } else if (i == 45) {
  10151. if (
  10152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10153. .toolChoose[toolIndex].testJson
  10154. ) {
  10155. this.testJson = JSON.parse(
  10156. JSON.stringify(
  10157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10158. itemTaskIndex
  10159. ].toolChoose[toolIndex].testJson
  10160. )
  10161. );
  10162. } else {
  10163. var testJson = {
  10164. testCount: 1,
  10165. testTitle: "",
  10166. testJson: [
  10167. {
  10168. teststitle: "",
  10169. testItem: 1,
  10170. checkList: [],
  10171. timuList: [],
  10172. answer: [],
  10173. type: "1",
  10174. },
  10175. ],
  10176. };
  10177. this.testJson = testJson;
  10178. }
  10179. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  10180. this.dialogVisibleChoice = true;
  10181. } else if (i == 47) {
  10182. if (
  10183. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10184. .toolChoose[toolIndex].sentenceList
  10185. ) {
  10186. this.sentenceList = JSON.parse(
  10187. JSON.stringify(
  10188. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10189. itemTaskIndex
  10190. ].toolChoose[toolIndex].sentenceList
  10191. )
  10192. );
  10193. } else {
  10194. var sentenceList = [
  10195. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  10196. ];
  10197. this.sentenceList = sentenceList;
  10198. }
  10199. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  10200. this.dialogVisibleSentence = true;
  10201. } else if (i == 48) {
  10202. if (
  10203. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10204. .toolChoose[toolIndex].tableJson
  10205. ) {
  10206. this.tableJson = JSON.parse(
  10207. JSON.stringify(
  10208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10209. itemTaskIndex
  10210. ].toolChoose[toolIndex].tableJson
  10211. )
  10212. );
  10213. } else {
  10214. var tableJson = { text: "" };
  10215. this.tableJson = tableJson;
  10216. }
  10217. this.dialogVisibleTable = true;
  10218. } else if (i == 52) {
  10219. if (
  10220. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10221. .toolChoose[toolIndex].wordJson
  10222. ) {
  10223. this.wordJson = JSON.parse(
  10224. JSON.stringify(
  10225. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10226. itemTaskIndex
  10227. ].toolChoose[toolIndex].wordJson
  10228. )
  10229. );
  10230. } else {
  10231. var wordJson = { text: "" };
  10232. this.wordJson = wordJson;
  10233. }
  10234. this.dialogVisibleWord = true;
  10235. // else if (i == 50) {
  10236. // if (
  10237. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10238. // .toolChoose[toolIndex].uploadJson
  10239. // ) {
  10240. // this.uploadJson = JSON.parse(
  10241. // JSON.stringify(
  10242. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10243. // itemTaskIndex
  10244. // ].toolChoose[toolIndex].uploadJson
  10245. // )
  10246. // );
  10247. // } else {
  10248. // var uploadJson = [];
  10249. // this.uploadJson = uploadJson;
  10250. // }
  10251. // this.dialogVisibleMoreUpload = true;
  10252. // }
  10253. } else if (i == 10) {
  10254. if (
  10255. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10256. .toolChoose[toolIndex].preTime
  10257. ) {
  10258. this.preTime = JSON.parse(
  10259. JSON.stringify(
  10260. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10261. itemTaskIndex
  10262. ].toolChoose[toolIndex].preTime
  10263. )
  10264. );
  10265. } else {
  10266. var preTime = 0;
  10267. this.preTime = preTime;
  10268. }
  10269. this.dialogVisiblePreTime = true;
  10270. } else if (i == 49) {
  10271. if (
  10272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10273. .toolChoose[toolIndex].groupJson
  10274. ) {
  10275. this.groupJson = JSON.parse(
  10276. JSON.stringify(
  10277. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10278. itemTaskIndex
  10279. ].toolChoose[toolIndex].groupJson
  10280. )
  10281. );
  10282. } else {
  10283. var groupJson = {
  10284. group: [{ name: "第1组" }],
  10285. number: undefined,
  10286. islock: 1,
  10287. };
  10288. this.groupJson = groupJson;
  10289. }
  10290. this.dialogVisibleGroup = true;
  10291. } else if (i == 62) {
  10292. if (
  10293. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10294. .toolChoose[toolIndex].videoJson
  10295. ) {
  10296. this.videoJson = JSON.parse(
  10297. JSON.stringify(
  10298. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10299. itemTaskIndex
  10300. ].toolChoose[toolIndex].videoJson
  10301. )
  10302. );
  10303. } else {
  10304. var videoJson = {
  10305. video: "",
  10306. setting: [],
  10307. };
  10308. this.videoJson = videoJson;
  10309. }
  10310. this.dialogVisibleVideo = true;
  10311. } else if (i == 15) {
  10312. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10313. itemTaskIndex
  10314. ].toolChoose[toolIndex].answerQ
  10315. ? JSON.parse(
  10316. JSON.stringify(
  10317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10318. itemTaskIndex
  10319. ].toolChoose[toolIndex].answerQ
  10320. )
  10321. )
  10322. : "";
  10323. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  10324. this.dialogVisible8 = true;
  10325. } else if (i == 40) {
  10326. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10327. itemTaskIndex
  10328. ].toolChoose[toolIndex].rateJson
  10329. ? JSON.parse(
  10330. JSON.stringify(
  10331. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10332. itemTaskIndex
  10333. ].toolChoose[toolIndex].rateJson
  10334. )
  10335. )
  10336. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  10337. this.selectSteps = 1;
  10338. this.dialogVisibleRate = true;
  10339. } else if (i == 42) {
  10340. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10341. itemTaskIndex
  10342. ].toolChoose[toolIndex].answerQ
  10343. ? JSON.parse(
  10344. JSON.stringify(
  10345. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10346. itemTaskIndex
  10347. ].toolChoose[toolIndex].answerQ
  10348. )
  10349. )
  10350. : "";
  10351. this.dialogVisibleMp3 = true;
  10352. } else if (i == 41) {
  10353. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10354. itemTaskIndex
  10355. ].toolChoose[toolIndex].selectJson
  10356. ? JSON.parse(
  10357. JSON.stringify(
  10358. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10359. itemTaskIndex
  10360. ].toolChoose[toolIndex].selectJson
  10361. )
  10362. )
  10363. : { url: "", select: [], answer: [] };
  10364. this.selectSteps = 1;
  10365. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  10366. this.dialogVisibleSelect = true;
  10367. } else if (i == 3) {
  10368. top.postMessage(
  10369. {
  10370. tools: "3y",
  10371. cid: this.cid,
  10372. stage: this.unitIndex,
  10373. task: itemTaskIndex,
  10374. tool: toolIndex,
  10375. },
  10376. "*"
  10377. );
  10378. } else if (i == 1) {
  10379. top.postMessage(
  10380. {
  10381. tools: "1y",
  10382. cid: this.cid,
  10383. stage: this.unitIndex,
  10384. task: itemTaskIndex,
  10385. tool: toolIndex,
  10386. },
  10387. "*"
  10388. );
  10389. } else if (i == 57) {
  10390. top.postMessage(
  10391. {
  10392. tools: "57y",
  10393. cid: this.cid,
  10394. stage: this.unitIndex,
  10395. task: itemTaskIndex,
  10396. tool: toolIndex,
  10397. },
  10398. "*"
  10399. );
  10400. } else if (i == 69) {
  10401. this.englishList = {};
  10402. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  10403. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  10404. ? JSON.parse(
  10405. JSON.stringify(
  10406. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10407. itemTaskIndex
  10408. ].toolChoose[toolIndex].englishList
  10409. )
  10410. )
  10411. : {};
  10412. this.$forceUpdate();
  10413. this.englishDialogVisible = true;
  10414. } else if (i == 70) {
  10415. this.englishVoiceJson = {};
  10416. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  10417. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  10418. ? JSON.parse(
  10419. JSON.stringify(
  10420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10421. itemTaskIndex
  10422. ].toolChoose[toolIndex].englishVoiceJson
  10423. )
  10424. )
  10425. : {
  10426. title: '',
  10427. detail: '',
  10428. array: []
  10429. };
  10430. // {
  10431. // time: "",
  10432. // class: "",
  10433. // difficulty: 0,
  10434. // topic: "",
  10435. // isShow: false,
  10436. // eva: 0,
  10437. // aiEva: {
  10438. // isAiEva: false,
  10439. // aiEvaChoose: [],
  10440. // },
  10441. // allfType: [],
  10442. // englishJson: {},
  10443. // };
  10444. this.$forceUpdate();
  10445. this.EnglishVoiceDialog = true;
  10446. }
  10447. },
  10448. setEnglishVoiceJson(val) {
  10449. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10450. this.taskCount
  10451. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  10452. JSON.stringify(val)
  10453. );
  10454. this.$forceUpdate();
  10455. if (
  10456. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10457. .toolChoose[this.toolIndex].tool != 70
  10458. ) {
  10459. this.addTools(70, this.taskCount, this.toolIndex);
  10460. }
  10461. },
  10462. chapAddTools(i) {
  10463. if (this.chapTools[0].tools.length == 0) {
  10464. this.chapTools[0].tools.push(i);
  10465. } else {
  10466. if (this.chapTools[0].tools.indexOf(i) != -1) {
  10467. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  10468. } else {
  10469. this.chapTools[0].tools.push(i);
  10470. }
  10471. }
  10472. this.$forceUpdate();
  10473. },
  10474. addChaptersDataTools() {
  10475. if (this.chapTools[0].tools.indexOf(4) != -1) {
  10476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10477. this.chapCount
  10478. ].chapterData.push({
  10479. name: this.chapTools[0].toolDetail,
  10480. url: this.chapTools[0].tools,
  10481. type: 7,
  10482. askJson: this.askJson,
  10483. });
  10484. } else {
  10485. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10486. this.chapCount
  10487. ].chapterData.push({
  10488. name: this.chapTools[0].toolDetail,
  10489. url: this.chapTools[0].tools,
  10490. type: 7,
  10491. });
  10492. }
  10493. this.imgChange1(null, null, 7, this.chapCount);
  10494. this.dialogVisible4 = false;
  10495. },
  10496. addTools(i, itemTaskIndex, toolIndex) {
  10497. // if (
  10498. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10499. // .toolChoose[toolIndex].tool.length == 0
  10500. // ) {
  10501. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10502. // itemTaskIndex
  10503. // ].toolChoose[toolIndex].tool.push(i);
  10504. // } else {
  10505. // if (
  10506. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10507. // itemTaskIndex
  10508. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  10509. // ) {
  10510. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10511. // itemTaskIndex
  10512. // ].toolChoose[toolIndex].tool.splice(
  10513. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10514. // itemTaskIndex
  10515. // ].toolChoose[toolIndex].tool.indexOf(i),
  10516. // 1
  10517. // );
  10518. // } else {
  10519. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10520. // itemTaskIndex
  10521. // ].toolChoose[toolIndex].tool.push(i);
  10522. // }
  10523. // console.log(
  10524. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10525. // .toolChoose[toolIndex].tool
  10526. // );
  10527. // }
  10528. if (i == 4) {
  10529. if (
  10530. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10531. .toolChoose[toolIndex].askJson.askTitle == "" ||
  10532. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10533. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  10534. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10535. .toolChoose[toolIndex].askJson[0].checkList < 2
  10536. ) {
  10537. this.openTools(itemTaskIndex, 4, toolIndex);
  10538. // this.$message({
  10539. // message: "请填写完整问卷内容",
  10540. // type: "error",
  10541. // });
  10542. return;
  10543. }
  10544. }
  10545. if (i == 45) {
  10546. if (
  10547. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10548. .toolChoose[toolIndex].testJson ||
  10549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10550. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  10551. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10552. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  10553. ) {
  10554. this.openTools(itemTaskIndex, 45, toolIndex);
  10555. // this.$message({
  10556. // message: "请填写完整问卷内容",
  10557. // type: "error",
  10558. // });
  10559. return;
  10560. }
  10561. }
  10562. if (i == 47) {
  10563. if (
  10564. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10565. .toolChoose[toolIndex].sentenceList ||
  10566. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10567. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  10568. ) {
  10569. this.openTools(itemTaskIndex, 47, toolIndex);
  10570. return;
  10571. }
  10572. }
  10573. if (i == 69) {
  10574. if (
  10575. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10576. .toolChoose[toolIndex].englishList
  10577. ) {
  10578. this.openTools(itemTaskIndex, 69, toolIndex);
  10579. return;
  10580. }
  10581. }
  10582. if (i == 70) {
  10583. if (
  10584. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10585. .toolChoose[toolIndex].englishVoiceJson
  10586. ) {
  10587. this.openTools(itemTaskIndex, 70, toolIndex);
  10588. return;
  10589. }
  10590. }
  10591. // if (i == 48) {
  10592. // if (
  10593. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10594. // .toolChoose[toolIndex].tableJson
  10595. // ) {
  10596. // this.openTools(itemTaskIndex, 48, toolIndex);
  10597. // return;
  10598. // }
  10599. // }
  10600. // if (i == 50) {
  10601. // if (
  10602. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10603. // .toolChoose[toolIndex].uploadJson
  10604. // ) {
  10605. // this.openTools(itemTaskIndex, 50, toolIndex);
  10606. // return;
  10607. // }
  10608. // }
  10609. if (i == 49) {
  10610. if (
  10611. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10612. .toolChoose[toolIndex].groupJson
  10613. ) {
  10614. this.openTools(itemTaskIndex, 49, toolIndex);
  10615. return;
  10616. }
  10617. }
  10618. if (i == 62) {
  10619. if (
  10620. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10621. .toolChoose[toolIndex].videoJson
  10622. ) {
  10623. this.openTools(itemTaskIndex, 62, toolIndex);
  10624. return;
  10625. }
  10626. }
  10627. if (i == 15) {
  10628. if (
  10629. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10630. .toolChoose[toolIndex].answerQ ||
  10631. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10632. .toolChoose[toolIndex].answerQ == ""
  10633. ) {
  10634. this.openTools(itemTaskIndex, 15, toolIndex);
  10635. // this.$message({
  10636. // message: "请填写问答内容",
  10637. // type: "error",
  10638. // });
  10639. return;
  10640. }
  10641. }
  10642. if (i == 40) {
  10643. if (
  10644. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10645. .toolChoose[toolIndex].rateJson ||
  10646. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10647. .toolChoose[toolIndex].rateJson.length
  10648. ) {
  10649. this.openTools(itemTaskIndex, 40, toolIndex);
  10650. return;
  10651. }
  10652. }
  10653. if (i == 41) {
  10654. if (
  10655. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10656. .toolChoose[toolIndex].selectJson ||
  10657. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10658. .toolChoose[toolIndex].selectJson.url == "" ||
  10659. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10660. .toolChoose[toolIndex].selectJson.select.length ||
  10661. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10662. .toolChoose[toolIndex].selectJson.answer.length
  10663. ) {
  10664. this.openTools(itemTaskIndex, 41, toolIndex);
  10665. return;
  10666. }
  10667. }
  10668. if (i == 42) {
  10669. if (
  10670. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10671. .toolChoose[toolIndex].answerQ ||
  10672. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10673. .toolChoose[toolIndex].answerQ == ""
  10674. ) {
  10675. this.openTools(itemTaskIndex, 42, toolIndex);
  10676. return;
  10677. }
  10678. }
  10679. if (
  10680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10681. .toolChoose[toolIndex].tool.length > 0
  10682. ) {
  10683. if (
  10684. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10685. itemTaskIndex
  10686. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  10687. ) {
  10688. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10689. itemTaskIndex
  10690. ].toolChoose[toolIndex].tool.splice(
  10691. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10692. itemTaskIndex
  10693. ].toolChoose[toolIndex].tool.indexOf(i),
  10694. 1
  10695. );
  10696. } else {
  10697. // this.$message({
  10698. // message: "每个工具只能添加一个",
  10699. // type: "error",
  10700. // });
  10701. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10702. itemTaskIndex
  10703. ].toolChoose[toolIndex].tool = [];
  10704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10705. itemTaskIndex
  10706. ].toolChoose[toolIndex].tool.push(i);
  10707. }
  10708. } else {
  10709. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10710. itemTaskIndex
  10711. ].toolChoose[toolIndex].tool.push(i);
  10712. }
  10713. this.$forceUpdate();
  10714. },
  10715. addAskList(index) {
  10716. this.askJson.askJson.splice(index + 1, 0, {
  10717. askstitle: "",
  10718. askItem: 1,
  10719. checkList: [],
  10720. });
  10721. this.askJson.askCount++;
  10722. },
  10723. addTestList(index) {
  10724. this.testJson.testJson.splice(index + 1, 0, {
  10725. teststitle: "",
  10726. testItem: 1,
  10727. checkList: [],
  10728. timuList: [],
  10729. answer: [],
  10730. type: "1",
  10731. });
  10732. this.testJson.testCount++;
  10733. },
  10734. deleteAskList(index) {
  10735. if (
  10736. !this.askJson.askJson[index].askstitle &&
  10737. this.askJson.askJson[index].askItem == 1 &&
  10738. !this.askJson.askJson[index].checkList[0]
  10739. ) {
  10740. this.askJson.askJson.splice(index, 1);
  10741. this.askJson.askCount--;
  10742. } else {
  10743. let _this = this;
  10744. _this
  10745. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10746. confirmButtonText: "确定",
  10747. cancelButtonText: "取消",
  10748. type: "warning",
  10749. })
  10750. .then(() => {
  10751. _this.askJson.askJson.splice(index, 1);
  10752. _this.askJson.askCount--;
  10753. })
  10754. .catch(() => {
  10755. return;
  10756. });
  10757. }
  10758. },
  10759. deleteTestList(index) {
  10760. if (
  10761. !this.testJson.testJson[index].teststitle &&
  10762. this.testJson.testJson[index].testItem == 1 &&
  10763. !this.testJson.testJson[index].checkList[0]
  10764. ) {
  10765. this.testJson.testJson.splice(index, 1);
  10766. this.testJson.testCount--;
  10767. } else {
  10768. let _this = this;
  10769. _this
  10770. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10771. confirmButtonText: "确定",
  10772. cancelButtonText: "取消",
  10773. type: "warning",
  10774. })
  10775. .then(() => {
  10776. _this.testJson.testJson.splice(index, 1);
  10777. _this.testJson.testCount--;
  10778. })
  10779. .catch(() => {
  10780. return;
  10781. });
  10782. }
  10783. },
  10784. askMove(type, index) {
  10785. if (type == 1) {
  10786. if (index > 0) {
  10787. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  10788. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10789. this.askJson.askJson[index - 1] = b;
  10790. this.askJson.askJson[index] = a;
  10791. }
  10792. } else {
  10793. if (index < this.askJson.askJson.length - 1) {
  10794. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  10795. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10796. this.askJson.askJson[index + 1] = b;
  10797. this.askJson.askJson[index] = a;
  10798. }
  10799. }
  10800. this.$forceUpdate();
  10801. },
  10802. checkMove(type, index, checkIndex) {
  10803. if (type == 1) {
  10804. if (checkIndex > 0) {
  10805. let a = JSON.parse(
  10806. JSON.stringify(
  10807. this.askJson.askJson[index].checkList[checkIndex - 1]
  10808. )
  10809. );
  10810. let b = JSON.parse(
  10811. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10812. );
  10813. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  10814. this.askJson.askJson[index].checkList[checkIndex] = a;
  10815. }
  10816. } else {
  10817. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  10818. let a = JSON.parse(
  10819. JSON.stringify(
  10820. this.askJson.askJson[index].checkList[checkIndex + 1]
  10821. )
  10822. );
  10823. let b = JSON.parse(
  10824. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10825. );
  10826. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  10827. this.askJson.askJson[index].checkList[checkIndex] = a;
  10828. }
  10829. }
  10830. this.$forceUpdate();
  10831. },
  10832. testMove(type, index) {
  10833. if (type == 1) {
  10834. if (index > 0) {
  10835. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  10836. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10837. this.testJson.testJson[index - 1] = b;
  10838. this.testJson.testJson[index] = a;
  10839. }
  10840. } else {
  10841. if (index < this.testJson.testJson.length - 1) {
  10842. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  10843. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10844. this.testJson.testJson[index + 1] = b;
  10845. this.testJson.testJson[index] = a;
  10846. }
  10847. }
  10848. this.$forceUpdate();
  10849. },
  10850. tcheckMove(type, index, checkIndex) {
  10851. if (type == 1) {
  10852. if (checkIndex > 0) {
  10853. let a = JSON.parse(
  10854. JSON.stringify(
  10855. this.testJson.testJson[index].checkList[checkIndex - 1]
  10856. )
  10857. );
  10858. let b = JSON.parse(
  10859. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10860. );
  10861. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  10862. this.testJson.testJson[index].checkList[checkIndex] = a;
  10863. }
  10864. } else {
  10865. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  10866. let a = JSON.parse(
  10867. JSON.stringify(
  10868. this.testJson.testJson[index].checkList[checkIndex + 1]
  10869. )
  10870. );
  10871. let b = JSON.parse(
  10872. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10873. );
  10874. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  10875. this.testJson.testJson[index].checkList[checkIndex] = a;
  10876. }
  10877. }
  10878. this.$forceUpdate();
  10879. },
  10880. addcheckList(json, index) {
  10881. // json.checkList.length++;
  10882. json.checkList.splice(index + 1, 0, "");
  10883. json.askItem++;
  10884. this.$forceUpdate();
  10885. },
  10886. deletecheckList(json, index) {
  10887. // json.checkList.length--;
  10888. json.checkList.splice(index, 1);
  10889. json.askItem--;
  10890. this.$forceUpdate();
  10891. },
  10892. addTcheckList(json, index) {
  10893. // json.checkList.length++;
  10894. json.checkList.splice(index + 1, 0, "");
  10895. json.testItem++;
  10896. this.$forceUpdate();
  10897. },
  10898. deleteTcheckList(json, index) {
  10899. // json.checkList.length--;
  10900. json.checkList.splice(index, 1);
  10901. json.testItem--;
  10902. this.$forceUpdate();
  10903. },
  10904. checkTestType(type, json) {
  10905. json.type = type;
  10906. setTimeout(() => {
  10907. json.answer = [];
  10908. }, 100);
  10909. },
  10910. checkAskType(type, json) {
  10911. json.type = type;
  10912. // json.checkList = [];
  10913. this.$forceUpdate();
  10914. },
  10915. addSelectList(json) {
  10916. json.select.push("");
  10917. json.answer.push("");
  10918. },
  10919. deleteSelectList(json) {
  10920. // json.select.length--;
  10921. // json.answer.length--;
  10922. json.select.splice(json.select.length - 1, 1);
  10923. json.answer.splice(json.answer.length - 1, 1);
  10924. },
  10925. addAsk() {
  10926. if (this.askJson.askTitle === "") {
  10927. this.$message.error("标题不能为空!");
  10928. return;
  10929. }
  10930. var aj = this.askJson.askJson;
  10931. var b = 1;
  10932. for (var i = 0; i < aj.length; i++) {
  10933. if (aj[i].askstitle === "") {
  10934. var a = 1;
  10935. for (let index = 0; index < aj[i].askItem; index++) {
  10936. const element = aj[i].checkList[index]
  10937. ? aj[i].checkList[index]
  10938. : "";
  10939. if (element != "") {
  10940. b++;
  10941. this.$message.error(`请将题目${i + 1}填写完整。`);
  10942. return;
  10943. } else {
  10944. a++;
  10945. }
  10946. }
  10947. if (b == 1) {
  10948. this.$message.error("至少填写一个问题");
  10949. return;
  10950. }
  10951. } else if (aj[i].askstitle != "") {
  10952. for (let index = 0; index < aj[i].askItem; index++) {
  10953. const element = aj[i].checkList[index]
  10954. ? aj[i].checkList[index]
  10955. : "";
  10956. var index = 0;
  10957. for (var z = 0; z < aj[i].checkList.length; z++) {
  10958. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  10959. if (checkC != "") {
  10960. index++;
  10961. } else {
  10962. this.$message.error(`题目${i + 1}选项不能为空!`);
  10963. return;
  10964. }
  10965. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  10966. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  10967. if (checkC == checkC2) {
  10968. this.$message.error(
  10969. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10970. );
  10971. return;
  10972. }
  10973. }
  10974. }
  10975. b++;
  10976. if (index < 2) {
  10977. this.$message.error("每道题目至少需要设置2个选项。");
  10978. return;
  10979. }
  10980. }
  10981. }
  10982. }
  10983. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  10984. var elc = el.checkList.filter((element) => {
  10985. return element != "";
  10986. });
  10987. return el.askstitle != "" && elc.length != 0;
  10988. });
  10989. if (!this.dialogVisible4) {
  10990. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10991. this.taskCount
  10992. ].toolChoose[this.toolIndex] = this.askJson;
  10993. }
  10994. this.dialogVisible5 = false;
  10995. if (
  10996. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10997. .toolChoose[this.toolIndex].tool != 4
  10998. ) {
  10999. this.addTools(4, this.taskCount, this.toolIndex);
  11000. }
  11001. },
  11002. addTest() {
  11003. // if (this.testJson.testTitle === "") {
  11004. // this.$message.error("标题不能为空!");
  11005. // return;
  11006. // }
  11007. var aj = this.testJson.testJson;
  11008. var b = 1;
  11009. for (var i = 0; i < aj.length; i++) {
  11010. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  11011. var a = 1;
  11012. for (let index = 0; index < aj[i].testItem; index++) {
  11013. const element = aj[i].checkList[index]
  11014. ? aj[i].checkList[index]
  11015. : "";
  11016. if (element != "") {
  11017. b++;
  11018. this.$message.error(`请将题目${i + 1}填写完整。`);
  11019. return;
  11020. } else {
  11021. a++;
  11022. }
  11023. }
  11024. if (b == 1) {
  11025. this.$message.error("至少填写一个问题");
  11026. return;
  11027. }
  11028. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  11029. for (let index = 0; index < aj[i].testItem; index++) {
  11030. const element = aj[i].checkList[index]
  11031. ? aj[i].checkList[index]
  11032. : "";
  11033. var index = 0;
  11034. for (var z = 0; z < aj[i].checkList.length; z++) {
  11035. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  11036. if (checkC != "") {
  11037. index++;
  11038. } else {
  11039. this.$message.error(`题目${i + 1}选项不能为空!`);
  11040. return;
  11041. }
  11042. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  11043. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  11044. if (checkC == checkC2) {
  11045. this.$message.error(
  11046. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  11047. );
  11048. return;
  11049. }
  11050. }
  11051. }
  11052. b++;
  11053. if (index < 2) {
  11054. this.$message.error("每道题目至少需要设置2个选项。");
  11055. return;
  11056. }
  11057. if (
  11058. (aj[i].type == "2" && !aj[i].answer.length) ||
  11059. (aj[i].type == "1" &&
  11060. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  11061. (aj[i].answer !== 0 && !aj[i].answer)))
  11062. ) {
  11063. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  11064. return;
  11065. }
  11066. }
  11067. }
  11068. }
  11069. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  11070. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  11071. var elc = el.checkList.filter((element) => {
  11072. return element != "";
  11073. });
  11074. return (
  11075. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  11076. );
  11077. });
  11078. isTestJson.testCount = isTestJson.testJson.length;
  11079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11080. this.taskCount
  11081. ].toolChoose[this.toolIndex].testJson = isTestJson;
  11082. this.dialogVisibleChoice = false;
  11083. if (
  11084. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11085. .toolChoose[this.toolIndex].tool != 45
  11086. ) {
  11087. this.addTools(45, this.taskCount, this.toolIndex);
  11088. }
  11089. },
  11090. addVideoJson(videoJson) {
  11091. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11092. this.taskCount
  11093. ].toolChoose[this.toolIndex].videoJson = videoJson;
  11094. this.dialogVisibleVideo = false;
  11095. if (
  11096. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11097. .toolChoose[this.toolIndex].tool != 62
  11098. ) {
  11099. this.addTools(62, this.taskCount, this.toolIndex);
  11100. }
  11101. },
  11102. //自动获取剪贴板
  11103. pasteOption() {
  11104. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11105. if (!iframe) {
  11106. this.$message.error("请使用AI共创生成题目");
  11107. return;
  11108. }
  11109. let copyData = iframe.contentWindow.copyData;
  11110. if (!copyData || !copyData.selectData.length) {
  11111. this.$message.error("请使用AI共创生成题目");
  11112. return;
  11113. }
  11114. let selectData = copyData.selectData;
  11115. for (var i = 0; i < selectData.length; i++) {
  11116. let answer = 0;
  11117. switch (selectData[i].answer[0]) {
  11118. case "A":
  11119. answer = 0;
  11120. break;
  11121. case "B":
  11122. answer = 1;
  11123. break;
  11124. case "C":
  11125. answer = 2;
  11126. break;
  11127. case "D":
  11128. answer = 3;
  11129. break;
  11130. case "E":
  11131. answer = 4;
  11132. break;
  11133. default:
  11134. break;
  11135. }
  11136. this.testJson.testJson.push({
  11137. teststitle: selectData[i].subject,
  11138. testItem: selectData[i].options.length,
  11139. checkList: selectData[i].options,
  11140. timuList: [],
  11141. answer: answer,
  11142. type: "1",
  11143. });
  11144. this.testJson.testCount++;
  11145. }
  11146. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  11147. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  11148. var elc = el.checkList.filter((element) => {
  11149. return element != "";
  11150. });
  11151. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  11152. });
  11153. isTestJson.testCount = isTestJson.testJson.length;
  11154. if (!isTestJson.testCount) {
  11155. return;
  11156. }
  11157. this.testJson = isTestJson;
  11158. this.$forceUpdate();
  11159. },
  11160. pasteTask(taskJson) {
  11161. let stageTasksData = [];
  11162. if (taskJson) {
  11163. stageTasksData = taskJson;
  11164. } else {
  11165. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11166. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11167. if (!iframe && !iframe2) {
  11168. this.$message.error("请使用AI共创生成");
  11169. return;
  11170. }
  11171. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11172. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11173. if (
  11174. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  11175. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  11176. ) {
  11177. this.$message.error("请使用AI共创生成");
  11178. return;
  11179. }
  11180. stageTasksData = copyData
  11181. ? copyData.tasksData
  11182. : copyData2
  11183. ? copyData2.tasksData
  11184. : [{ taskName: "", taskDecs: "" }];
  11185. }
  11186. let taskA = [];
  11187. let tasks = stageTasksData;
  11188. for (var j = 0; j < tasks.length; j++) {
  11189. taskA.push({
  11190. task: tasks[j].taskName,
  11191. taskDetail: tasks[j].taskDecs,
  11192. chapterData: [],
  11193. toolText: "",
  11194. toolChoose: [
  11195. {
  11196. tool: [],
  11197. toolDetail: "",
  11198. toolType: 0,
  11199. askCount: 1,
  11200. askTitle: "",
  11201. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11202. },
  11203. ],
  11204. isShowTools: false,
  11205. askCount: 1,
  11206. isFold: 1,
  11207. askTitle: "",
  11208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11209. checkJson: [{ checkCount: [], checkPerent: [] }],
  11210. homeworkList: [],
  11211. });
  11212. }
  11213. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  11214. this.$forceUpdate();
  11215. },
  11216. pasteStage(stageJson) {
  11217. let stageData = [];
  11218. if (stageJson) {
  11219. stageData = stageJson;
  11220. } else {
  11221. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11222. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11223. if (!iframe && !iframe2) {
  11224. this.$message.error("请使用AI共创生成");
  11225. return;
  11226. }
  11227. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11228. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11229. if (
  11230. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  11231. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  11232. ) {
  11233. this.$message.error("请使用AI共创生成");
  11234. return;
  11235. }
  11236. stageData = copyData
  11237. ? copyData.stageData
  11238. : copyData2
  11239. ? copyData2.stageData
  11240. : [""];
  11241. }
  11242. let stage = [];
  11243. for (var i = 0; i < stageData.length; i++) {
  11244. stage.push({
  11245. dyName: stageData[i], //单元标题
  11246. chapterInfo: [
  11247. {
  11248. isread: false,
  11249. chapterid: this.guid(),
  11250. title: "",
  11251. courseName: "",
  11252. taskJson: [
  11253. {
  11254. task: "",
  11255. taskDetail: "",
  11256. chapterData: [],
  11257. toolText: "",
  11258. toolChoose: [
  11259. {
  11260. tool: [],
  11261. toolDetail: "",
  11262. toolType: 0,
  11263. askCount: 1,
  11264. askTitle: "",
  11265. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11266. },
  11267. ],
  11268. isShowTools: false,
  11269. askCount: 1,
  11270. isFold: 1,
  11271. askTitle: "",
  11272. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11273. checkJson: [{ checkCount: [], checkPerent: [] }],
  11274. homeworkList: [],
  11275. },
  11276. ],
  11277. itemCount: 1,
  11278. fileList1: [],
  11279. video: [],
  11280. testData: [],
  11281. pData: [],
  11282. templateArray: [],
  11283. },
  11284. ],
  11285. });
  11286. }
  11287. let _this = this;
  11288. if (stageJson) {
  11289. if (!_this.cid) {
  11290. _this.unitJson = stage;
  11291. } else {
  11292. _this.unitIndex = 0;
  11293. _this.unitJson = stage;
  11294. _this.updateWork();
  11295. }
  11296. } else {
  11297. _this
  11298. .$confirm(
  11299. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  11300. "提示",
  11301. {
  11302. confirmButtonText: "确定",
  11303. cancelButtonText: "取消",
  11304. type: "warning",
  11305. }
  11306. )
  11307. .then(() => {
  11308. _this.unitIndex = 0;
  11309. _this.unitJson = stage;
  11310. // _this.steps++;
  11311. _this.updateWork();
  11312. })
  11313. .catch(() => {
  11314. return;
  11315. });
  11316. }
  11317. },
  11318. openStageBox() {
  11319. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  11320. this.dialogVisibleStageChange = true;
  11321. },
  11322. updateChange() {
  11323. this.$confirm(
  11324. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  11325. "提示",
  11326. {
  11327. confirmButtonText: "确定",
  11328. cancelButtonText: "取消",
  11329. type: "warning",
  11330. }
  11331. )
  11332. .then(() => {
  11333. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  11334. this.updateWork();
  11335. this.dialogVisibleStageChange = false;
  11336. })
  11337. .catch(() => {
  11338. return;
  11339. });
  11340. },
  11341. addAnswer() {
  11342. if (this.answerQ == "") {
  11343. this.$message.error("请输入您想要问的问题");
  11344. return;
  11345. }
  11346. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11347. this.taskCount
  11348. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  11349. this.dialogVisible8 = false;
  11350. if (
  11351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11352. .toolChoose[this.toolIndex].tool != 15
  11353. ) {
  11354. this.addTools(15, this.taskCount, this.toolIndex);
  11355. }
  11356. },
  11357. addMp3Answer() {
  11358. if (this.answerQ == "") {
  11359. this.$message.error("请输入您想要回答的问题");
  11360. return;
  11361. }
  11362. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11363. this.taskCount
  11364. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  11365. this.dialogVisibleMp3 = false;
  11366. },
  11367. addRateAnswer() {
  11368. var a = 1;
  11369. for (var i = 0; i < this.rateJson.length; i++) {
  11370. if (this.rateJson[i].value == "") {
  11371. a = 2;
  11372. break;
  11373. }
  11374. }
  11375. if (a == 2) {
  11376. this.$message.error("请把评价信息填写完整");
  11377. return;
  11378. }
  11379. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11380. this.taskCount
  11381. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  11382. this.dialogVisibleRate = false;
  11383. if (
  11384. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11385. .toolChoose[this.toolIndex].tool != 40
  11386. ) {
  11387. this.addTools(40, this.taskCount, this.toolIndex);
  11388. }
  11389. },
  11390. addSelectAnswer() {
  11391. if (this.selectJson.url == "") {
  11392. this.$message.error("请上传题目");
  11393. return;
  11394. }
  11395. if (!this.selectJson.select.length) {
  11396. this.$message.error("请添加选项");
  11397. return;
  11398. }
  11399. if (!this.selectJson.answer.length) {
  11400. this.$message.error("请设置答案");
  11401. return;
  11402. }
  11403. var a = 1;
  11404. for (var i = 0; i < this.selectJson.answer.length; i++) {
  11405. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  11406. a = 2;
  11407. }
  11408. }
  11409. if (a == 2) {
  11410. this.$message.error("请设置答案");
  11411. return;
  11412. }
  11413. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11414. this.taskCount
  11415. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  11416. this.dialogVisibleSelect = false;
  11417. if (
  11418. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11419. .toolChoose[this.toolIndex].tool != 41
  11420. ) {
  11421. this.addTools(41, this.taskCount, this.toolIndex);
  11422. }
  11423. },
  11424. nextSelectSteps() {
  11425. if (this.selectJson.url == "") {
  11426. this.$message.error("请上传题目");
  11427. return;
  11428. }
  11429. if (!this.selectJson.select.length) {
  11430. this.$message.error("请添加选项");
  11431. return;
  11432. } else {
  11433. for (var z = 0; z < this.selectJson.select.length; z++) {
  11434. let checkC = this.selectJson.select[z];
  11435. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  11436. let checkC2 = this.selectJson.select[z2];
  11437. if (checkC == checkC2) {
  11438. this.$message.error(
  11439. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  11440. );
  11441. return;
  11442. }
  11443. }
  11444. }
  11445. }
  11446. var a = 1;
  11447. for (var i = 0; i < this.selectJson.select.length; i++) {
  11448. if (!this.selectJson.select[i]) {
  11449. a = 2;
  11450. }
  11451. }
  11452. if (a == 2) {
  11453. this.$message.error("添加的选项不能为空");
  11454. return;
  11455. }
  11456. this.selectSteps++;
  11457. },
  11458. selectCourseDetail() {
  11459. if (this.cid == "" || this.cid == undefined) {
  11460. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  11461. this.isTeacherSee = true;
  11462. }
  11463. console.log("这是新增课程");
  11464. this.selectAllType();
  11465. } else {
  11466. this.isOutline = true
  11467. this.isOutline2 = true
  11468. this.cpoteType = 4
  11469. this.cidType = 1;
  11470. let params = {
  11471. cid: this.cid,
  11472. };
  11473. this.ajax
  11474. .get(this.$store.state.api + "select_course_detail", params)
  11475. .then((res) => {
  11476. this.unitJson = JSON.parse(res.data[0][0].chapters);
  11477. this.courseState = res.data[0][0].state;
  11478. for (var j = 0; j < this.unitJson.length; j++) {
  11479. for (
  11480. var k = 0;
  11481. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  11482. k++
  11483. ) {
  11484. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  11485. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  11486. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  11487. : [];
  11488. let _chapterData = [];
  11489. for (
  11490. var c = 0;
  11491. c <
  11492. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  11493. .length;
  11494. c++
  11495. ) {
  11496. if (
  11497. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  11498. ) {
  11499. _chapterData.push(
  11500. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  11501. );
  11502. }
  11503. }
  11504. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  11505. _chapterData;
  11506. }
  11507. }
  11508. this.$forceUpdate();
  11509. this.courseName = res.data[0][0].title;
  11510. this.courseText = res.data[0][0].brief;
  11511. this.courseText2 = res.data[0][0].reBrief;
  11512. this.evalua = res.data[0][0].evaId;
  11513. this.cover = JSON.parse(res.data[0][0].cover);
  11514. this.noneBtnImg = this.cover.length >= 1;
  11515. if (res.data[0][0].refile) {
  11516. this.infoData = JSON.parse(res.data[0][0].refile)
  11517. }
  11518. // this.checkboxList =
  11519. // res.data[0][0].course_student.length > 0
  11520. // ? JSON.parse(res.data[0][0].course_student)
  11521. // : [];
  11522. this.checkboxList2 = res.data[0][0].juri
  11523. ? res.data[0][0].juri.split(",")
  11524. : [];
  11525. this.inviteCode = [];
  11526. for (var i = 0; i < res.data[2].length; i++) {
  11527. this.inviteCode.push({
  11528. cid: res.data[2][i].classid,
  11529. ic: res.data[2][i].code,
  11530. });
  11531. }
  11532. this.checkboxList3 = res.data[0][0].course_teacher
  11533. ? res.data[0][0].course_teacher.split(",")
  11534. : [];
  11535. // this.isTeacherSee =
  11536. // res.data[0][0].is_teacher_look == 0 ? true : false;
  11537. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  11538. this.myWord = res.data[0][0].template;
  11539. this.templateC.id = "123";
  11540. this.courseUserid = res.data[0][0].userid;
  11541. // if(this.courseUserid == this.userid){
  11542. // this.InviteChange(this.checkboxList2)
  11543. // }
  11544. this.nbOrder = res.data[0][0].ordernumber;
  11545. this.courseTypeId = [];
  11546. for (var i = 0; i < res.data[1].length; i++) {
  11547. this.courseTypeId.push(res.data[1][i].typeid);
  11548. }
  11549. console.log(this.courseTypeId);
  11550. // if (this.timer) clearInterval(this.timer);
  11551. if (this.timer) clearTimeout(this.timer);
  11552. this.timer = null;
  11553. // this.timer = setInterval(() => {
  11554. if(res.data[3].length){
  11555. try {
  11556. this.aiJson = JSON.parse(res.data[3][0].tips);
  11557. this.templateid = res.data[3][0].template;
  11558. }catch(error){
  11559. console.error(error)
  11560. }
  11561. }
  11562. if(res.data[0][0].cpote){
  11563. try {
  11564. this.cpote = JSON.parse(res.data[0][0].cpote);
  11565. }catch(error){
  11566. console.error(error)
  11567. }
  11568. }
  11569. if(res.data[0][0].setting){
  11570. try {
  11571. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  11572. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  11573. }catch(error){
  11574. console.error(error)
  11575. }
  11576. }
  11577. this.isFileSearch = res.data[0][0].iresearch == 1
  11578. this.seleteCourseUpdate();
  11579. this.setMan();
  11580. this.selectAllType();
  11581. this.unitJson[
  11582. this.unitIndex
  11583. ].chapterInfo[0].taskJson[0].toolOpen = true;
  11584. // }, 5000);
  11585. this.$forceUpdate();
  11586. setTimeout(() => {
  11587. this.checkEva(this.evalua);
  11588. setTimeout(() => {
  11589. this.checkEva(this.evalua);
  11590. }, 100);
  11591. }, 100);
  11592. })
  11593. .catch((err) => {
  11594. console.error(err);
  11595. });
  11596. }
  11597. if(this.aiId){
  11598. let params = {
  11599. cid: this.aiId,
  11600. };
  11601. this.ajax
  11602. .get(this.$store.state.api + "select_course_detail", params)
  11603. .then((res) => {
  11604. let _unitJson = JSON.parse(res.data[0][0].chapters);
  11605. let fileInfo = []
  11606. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11607. for(var i = 0; i < _unitJson.length; i++){
  11608. let tasks = _unitJson[i].chapterInfo[0].taskJson
  11609. for(var j = 0; j < tasks.length; j++){
  11610. let _infoData = tasks[j].chapterData.filter(el => {
  11611. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  11612. })
  11613. if(_infoData.length){
  11614. fileInfo = [...fileInfo, ..._infoData]
  11615. }
  11616. }
  11617. }
  11618. this.infoData = fileInfo
  11619. this.$forceUpdate();
  11620. this.courseName = res.data[0][0].title;
  11621. this.courseText = res.data[0][0].brief;
  11622. this.courseText2 = res.data[0][0].reBrief;
  11623. this.cover = JSON.parse(res.data[0][0].cover);
  11624. this.noneBtnImg = this.cover.length >= 1;
  11625. this.checkboxList2 = res.data[0][0].juri
  11626. ? res.data[0][0].juri.split(",")
  11627. : [];
  11628. this.inviteCode = [];
  11629. for (var i = 0; i < res.data[2].length; i++) {
  11630. this.inviteCode.push({
  11631. cid: res.data[2][i].classid,
  11632. ic: res.data[2][i].code,
  11633. });
  11634. }
  11635. this.checkboxList3 = res.data[0][0].course_teacher
  11636. ? res.data[0][0].course_teacher.split(",")
  11637. : [];
  11638. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  11639. this.myWord = res.data[0][0].template;
  11640. this.templateC.id = "123";
  11641. this.courseTypeId = [];
  11642. for (var i = 0; i < res.data[1].length; i++) {
  11643. this.courseTypeId.push(res.data[1][i].typeid);
  11644. }
  11645. console.log(this.courseTypeId);
  11646. this.setMan();
  11647. this.unitJson[
  11648. this.unitIndex
  11649. ].chapterInfo[0].taskJson[0].toolOpen = true;
  11650. this.$forceUpdate();
  11651. setTimeout(() => {
  11652. this.checkEva(this.evalua);
  11653. setTimeout(() => {
  11654. this.checkEva(this.evalua);
  11655. }, 100);
  11656. }, 100);
  11657. })
  11658. .catch((err) => {
  11659. console.error(err);
  11660. });
  11661. }
  11662. // if(this.cidType != 1 && this.templateid == ''){
  11663. // this.promptShow = true
  11664. // }
  11665. },
  11666. seleteCourseUpdate() {
  11667. let params = {
  11668. cid: this.cid,
  11669. };
  11670. this.ajax
  11671. .get(this.$store.state.api + "select_course_detail", params)
  11672. .then((res) => {
  11673. // console.log(this.unitJson);
  11674. let unitJson = JSON.parse(res.data[0][0].chapters);
  11675. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  11676. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  11677. let _unitJson = [];
  11678. let _chapAarry = [];
  11679. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  11680. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  11681. let index = 1;
  11682. let chapindex;
  11683. if (_unitJson2.length > unitJson.length) {
  11684. for (let c = 0; c < _unitJson2.length; c++) {
  11685. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  11686. }
  11687. for (let j = 0; j < unitJson.length; j++) {
  11688. let count = 0;
  11689. for (let k = 0; k < _unitJson2.length; k++) {
  11690. if (
  11691. unitJson[j].chapterInfo[0].chapterid ==
  11692. _unitJson2[k].chapterInfo[0].chapterid
  11693. ) {
  11694. count++;
  11695. _chapAarry.splice(
  11696. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11697. 1
  11698. );
  11699. _unitJson.push(unitJson[j]);
  11700. break;
  11701. }
  11702. }
  11703. // if(count === 0){
  11704. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11705. // }
  11706. }
  11707. for (let k = 0; k < _unitJson2.length; k++) {
  11708. if (_unitJson2[k].isUpdate == 1) {
  11709. _chapAarry.splice(
  11710. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11711. 1
  11712. );
  11713. _unitJson.push(_unitJson2[k]);
  11714. }
  11715. }
  11716. console.log(_chapAarry);
  11717. for (let d = 0; d < _unitJson2.length; d++) {
  11718. if (
  11719. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  11720. ) {
  11721. if (_unitIndex == d) {
  11722. index = 2;
  11723. }
  11724. chapindex = d;
  11725. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11726. }
  11727. }
  11728. } else {
  11729. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  11730. }
  11731. for (let i = 0; i < unitJson.length; i++) {
  11732. if (
  11733. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  11734. _unitJson[i].chapterInfo[0].chapterid !=
  11735. unitJson[i].chapterInfo[0].chapterid
  11736. ) {
  11737. if (i == _unitJson.length - 1) {
  11738. // this.unitIndex++
  11739. _unitIndex2++;
  11740. }
  11741. _unitJson.splice(i, 0, unitJson[i]);
  11742. } else if (i > _unitJson.length - 1) {
  11743. _unitJson.push(unitJson[i]);
  11744. } else if (
  11745. _unitJson[i].chapterInfo[0].chapterid ==
  11746. unitJson[i].chapterInfo[0].chapterid
  11747. ) {
  11748. _unitJson[i] = unitJson[i];
  11749. }
  11750. // if (i == _unitIndex) {
  11751. // continue;
  11752. // } else
  11753. }
  11754. if (_chapAarry.length && index != 2) {
  11755. if (chapindex < _unitIndex) {
  11756. this.isDelete = 2;
  11757. // this.unitIndex--;
  11758. _unitIndex2--;
  11759. } else if (
  11760. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  11761. _unitJson[_unitIndex].chapterInfo[0].chapterid
  11762. ) {
  11763. this.isDelete = 2;
  11764. for (let n = 0; n < _unitJson.length; n++) {
  11765. if (
  11766. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  11767. _unitJson[n].chapterInfo[0].chapterid
  11768. ) {
  11769. // this.unitIndex = n;
  11770. _unitIndex2 = n;
  11771. _unitJson[n] = _unitJson2[_unitIndex];
  11772. break;
  11773. }
  11774. }
  11775. }
  11776. } else if (index != 2) {
  11777. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  11778. _unitJson2[_unitIndex];
  11779. for (
  11780. var ci = 0;
  11781. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  11782. ci++
  11783. ) {
  11784. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  11785. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  11786. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11787. .toolChoose
  11788. : [];
  11789. let _chapterData = [];
  11790. for (
  11791. var c = 0;
  11792. c <
  11793. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  11794. .length;
  11795. c++
  11796. ) {
  11797. if (
  11798. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11799. .chapterData[c]
  11800. ) {
  11801. _chapterData.push(
  11802. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11803. .chapterData[c]
  11804. );
  11805. }
  11806. }
  11807. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  11808. _chapterData;
  11809. }
  11810. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  11811. }
  11812. if (index == 1) {
  11813. this.unitJson = _unitJson;
  11814. this.$forceUpdate();
  11815. setTimeout(() => {
  11816. if (this.unitIndex != _unitIndex2) {
  11817. this.isDelete = 2;
  11818. this.unitIndex = _unitIndex2;
  11819. }
  11820. }, 0);
  11821. this.timer = setTimeout(() => {
  11822. this.seleteCourseUpdate();
  11823. }, 1000);
  11824. } else if (index == 2) {
  11825. let _this = this;
  11826. _this
  11827. .$confirm(
  11828. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  11829. "提示",
  11830. {
  11831. confirmButtonText: "需要",
  11832. cancelButtonText: "取消",
  11833. type: "warning",
  11834. }
  11835. )
  11836. .then(() => {
  11837. if (_this.time()) {
  11838. _this.restoreWork(
  11839. _chapAarry[0],
  11840. _unitJson,
  11841. chapindex,
  11842. _unitJson2,
  11843. _unitIndex2
  11844. );
  11845. }
  11846. })
  11847. .catch(() => {
  11848. _this.unitJson = _unitJson;
  11849. _this.$forceUpdate();
  11850. setTimeout(() => {
  11851. if (this.unitIndex != _unitIndex2) {
  11852. this.isDelete = 2;
  11853. this.unitIndex = _unitIndex2;
  11854. }
  11855. }, 0);
  11856. _this.timer = setTimeout(() => {
  11857. _this.seleteCourseUpdate();
  11858. }, 1000);
  11859. });
  11860. }
  11861. // 在复制操作之前记录滚动位置
  11862. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  11863. // 执行复制操作
  11864. // 复制操作完成后恢复滚动位置
  11865. this.$nextTick(() => {
  11866. if (this.$refs.scrollContainer) {
  11867. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  11868. }
  11869. });
  11870. })
  11871. .catch((err) => {
  11872. console.error(err);
  11873. });
  11874. },
  11875. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  11876. let params = [
  11877. {
  11878. cid: this.cid,
  11879. chapters: JSON.stringify(this.unitJson),
  11880. uid: this.userid,
  11881. chapid: chapid,
  11882. },
  11883. ];
  11884. this.ajax
  11885. .post(this.$store.state.api + "restoreWork", params)
  11886. .then((res) => {
  11887. this.$message({
  11888. message: "恢复成功",
  11889. type: "success",
  11890. });
  11891. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  11892. this.unitJson = unitJson;
  11893. this.$forceUpdate();
  11894. setTimeout(() => {
  11895. if (this.unitIndex != unitIndex2) {
  11896. this.isDelete = 2;
  11897. this.unitIndex = unitIndex2;
  11898. }
  11899. }, 0);
  11900. this.timer = setTimeout(() => {
  11901. this.seleteCourseUpdate();
  11902. }, 1000);
  11903. })
  11904. .catch((err) => {
  11905. this.$message.error("网络不佳");
  11906. console.error(err);
  11907. });
  11908. },
  11909. getTypeName() {
  11910. console.log(this.courseTypeId);
  11911. this.$forceUpdate();
  11912. },
  11913. selectAllType() {
  11914. let params = {
  11915. org: this.org && this.org != "" ? this.org : "",
  11916. oid: this.oid && this.oid != "" ? this.oid : "",
  11917. };
  11918. this.ajax
  11919. .get(this.$store.state.api + "selectAllType", params)
  11920. .then((res) => {
  11921. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11922. res.data[0] = [...res.data[0], ...res.data[4]];
  11923. }
  11924. this.CourseType = res.data;
  11925. this.CourseType2 = [
  11926. { name: "智见课程", id: [] },
  11927. { name: "智行课程", id: [] },
  11928. { name: "智创课程", id: [] },
  11929. ];
  11930. for (var cti = 0; cti < res.data[0].length; cti++) {
  11931. if (
  11932. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11933. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  11934. ) {
  11935. this.CourseType2[0].id.push(res.data[0][cti].id);
  11936. } else if (
  11937. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  11938. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11939. ) {
  11940. this.CourseType2[1].id.push(res.data[0][cti].id);
  11941. } else if (
  11942. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11943. ) {
  11944. this.CourseType2[2].id.push(res.data[0][cti].id);
  11945. }
  11946. if (
  11947. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11948. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  11949. ) {
  11950. res.data[0][cti].name = "年级";
  11951. } else if (
  11952. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  11953. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11954. ) {
  11955. res.data[0][cti].name = "学科";
  11956. } else if (
  11957. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11958. ) {
  11959. res.data[0][cti].name = "主题";
  11960. }
  11961. }
  11962. let _courseTypeId = [];
  11963. for (var i = 0; i < res.data[0].length; i++) {
  11964. if (!this.cid) {
  11965. this.courseTypeId[res.data[0][i].id] = [];
  11966. }
  11967. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  11968. // }
  11969. this.CourseTypeJson[res.data[0][i].id] = [];
  11970. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11971. if (res.data[0][i].name == "栏目") {
  11972. this.CourseType[0][i].name = "主题";
  11973. }
  11974. }
  11975. if (res.data[2].length == 0 && res.data[3].length == 0) {
  11976. for (var j = 0; j < res.data[1].length; j++) {
  11977. if (
  11978. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  11979. _courseTypeId.indexOf(res.data[1][j].id) == -1
  11980. ) {
  11981. _courseTypeId.push(res.data[1][j].id);
  11982. }
  11983. if (res.data[0][i].id == res.data[1][j].pid) {
  11984. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  11985. }
  11986. }
  11987. } else {
  11988. if (res.data[2].length > 0) {
  11989. for (var j = 0; j < res.data[2].length; j++) {
  11990. if (
  11991. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  11992. _courseTypeId.indexOf(res.data[2][j].id) == -1
  11993. ) {
  11994. _courseTypeId.push(res.data[2][j].id);
  11995. }
  11996. if (res.data[0][i].id == res.data[2][j].pid) {
  11997. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  11998. }
  11999. }
  12000. }
  12001. if (res.data[3].length > 0) {
  12002. for (var j = 0; j < res.data[3].length; j++) {
  12003. if (
  12004. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  12005. _courseTypeId.indexOf(res.data[3][j].id) == -1
  12006. ) {
  12007. _courseTypeId.push(res.data[3][j].id);
  12008. }
  12009. if (res.data[0][i].id == res.data[3][j].pid) {
  12010. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  12011. }
  12012. }
  12013. }
  12014. }
  12015. }
  12016. this.courseTypeId = _courseTypeId;
  12017. })
  12018. .catch((err) => {
  12019. console.error(err);
  12020. });
  12021. },
  12022. selectType() {
  12023. this.ajax
  12024. .get(this.$store.state.api + "selectType")
  12025. .then((res) => {
  12026. this.CourseType = res.data;
  12027. for (var i = 0; i < res.data[0].length; i++) {
  12028. if (!this.cid) {
  12029. this.courseTypeId[res.data[0][i].id] = "";
  12030. }
  12031. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  12032. if (res.data[0][i].name == "栏目") {
  12033. this.CourseType[0][i].name = "主题";
  12034. }
  12035. }
  12036. for (var j = 0; j < res.data[1].length; j++) {
  12037. if (res.data[0][i].id == res.data[1][j].pid) {
  12038. if (!this.CourseTypeJson[res.data[0][i].id]) {
  12039. this.CourseTypeJson[res.data[0][i].id] = [];
  12040. }
  12041. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  12042. }
  12043. }
  12044. }
  12045. this.selectTypeByOid();
  12046. this.selectTypeByOrg();
  12047. })
  12048. .catch((err) => {
  12049. console.error(err);
  12050. });
  12051. },
  12052. selectTypeByOid() {
  12053. let params = {
  12054. oid: this.oid,
  12055. };
  12056. this.ajax
  12057. .get(this.$store.state.api + "selectTypeByOid", params)
  12058. .then((res) => {
  12059. for (var i = 0; i < res.data[0].length; i++) {
  12060. for (var j = 0; j < res.data[1].length; j++) {
  12061. if (res.data[0][i].id == res.data[1][j].pid) {
  12062. if (!this.CourseTypeJson[res.data[0][i].id]) {
  12063. this.CourseTypeJson[res.data[0][i].id] = [];
  12064. }
  12065. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  12066. }
  12067. }
  12068. }
  12069. })
  12070. .catch((err) => {
  12071. console.error(err);
  12072. });
  12073. },
  12074. selectTypeByOrg() {
  12075. let params = {
  12076. oid: this.org,
  12077. };
  12078. this.ajax
  12079. .get(this.$store.state.api + "selectTypeByOrg", params)
  12080. .then((res) => {
  12081. for (var i = 0; i < res.data[0].length; i++) {
  12082. for (var j = 0; j < res.data[1].length; j++) {
  12083. if (res.data[0][i].id == res.data[1][j].pid) {
  12084. if (!this.CourseTypeJson[res.data[0][i].id]) {
  12085. this.CourseTypeJson[res.data[0][i].id] = [];
  12086. }
  12087. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  12088. }
  12089. }
  12090. }
  12091. this.$forceUpdate();
  12092. })
  12093. .catch((err) => {
  12094. console.error(err);
  12095. });
  12096. },
  12097. OtherMb(type, task) {
  12098. if (task === 0 || task) {
  12099. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12100. task
  12101. ].isEvaFold = true;
  12102. }
  12103. this.typeMode = type;
  12104. setTimeout(() => {
  12105. this.checkEva(this.checkId);
  12106. setTimeout(() => {
  12107. this.checkEva(this.checkId);
  12108. }, 100);
  12109. }, 100);
  12110. },
  12111. openMember() {
  12112. this.searchTN = "";
  12113. this.getTeacher();
  12114. this.dialogVisibleMember = true;
  12115. },
  12116. checkEva(id, type) {
  12117. this.dialogVisiblemb = false;
  12118. this.selectEva();
  12119. if (this.evalua != id && type == 2) {
  12120. this.$message.success("导入成功");
  12121. setTimeout(() => {
  12122. this.checkEva(id);
  12123. }, 100);
  12124. }
  12125. this.evalua = id;
  12126. this.checkId = id;
  12127. if (this.evalua != "") {
  12128. for (var i = 0; i < this.evaJuri.length; i++) {
  12129. if (this.evalua == this.evaJuri[i].id) {
  12130. this.eTitle = this.evaJuri[i].title;
  12131. this.eJson = JSON.parse(this.evaJuri[i].content);
  12132. }
  12133. }
  12134. this.data.data = [];
  12135. this.$forceUpdate();
  12136. setTimeout(() => {
  12137. this.setMindData();
  12138. }, 1000);
  12139. }
  12140. },
  12141. deleteEva() {
  12142. let _this = this;
  12143. if (_this.evalua == "") {
  12144. this.$message.warning("内容已经清空了,请勿重复清空");
  12145. return;
  12146. }
  12147. _this
  12148. .$confirm("确定删除此目标吗?", "提示", {
  12149. confirmButtonText: "确定",
  12150. cancelButtonText: "取消",
  12151. type: "warning",
  12152. })
  12153. .then(() => {
  12154. _this.evalua = "";
  12155. _this.checkId = "";
  12156. _this.eTitle = "";
  12157. let _unitJson = _this.unitJson;
  12158. for (var i = 0; i < _unitJson.length; i++) {
  12159. let _task = _unitJson[i].chapterInfo[0].taskJson;
  12160. for (var j = 0; j < _task.length; j++) {
  12161. let _eList = _task[j].eList;
  12162. for (var k = 0; k < _eList.length; k++) {
  12163. delete _eList[k].target;
  12164. }
  12165. }
  12166. }
  12167. _this.$forceUpdate();
  12168. if (_this.cid) {
  12169. _this.updateWork();
  12170. }
  12171. })
  12172. .catch(() => {
  12173. return;
  12174. });
  12175. },
  12176. selectEva() {
  12177. let params = {
  12178. oid: this.oid,
  12179. };
  12180. this.ajax
  12181. .get(this.$store.state.api + "selectAllEvaluation", params)
  12182. .then((res) => {
  12183. this.evaJuri = res.data[0];
  12184. // 在复制操作之前记录滚动位置
  12185. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  12186. // 执行复制操作
  12187. // 复制操作完成后恢复滚动位置
  12188. this.$nextTick(() => {
  12189. if (this.$refs.scrollContainer) {
  12190. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  12191. }
  12192. });
  12193. })
  12194. .catch((err) => {
  12195. console.error(err);
  12196. });
  12197. },
  12198. setMindData() {
  12199. let targetArray = [];
  12200. this.data.data = [];
  12201. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  12202. let _eJson = Object.keys(this.eJson);
  12203. let _e = this.eJson;
  12204. for (let i = 0; i < _eJson.length; i++) {
  12205. let element = _e[_eJson[i]];
  12206. this.data.data.push({
  12207. id: element.id,
  12208. parentid: "root",
  12209. topic: element.name,
  12210. });
  12211. // targetArray.push({
  12212. // id: element.id,
  12213. // parentid: "root",
  12214. // name: element.name,
  12215. // });
  12216. targetArray.push({
  12217. value: element.name,
  12218. label: element.name,
  12219. children: [],
  12220. });
  12221. let _eJsonc = Object.keys(element.child);
  12222. let _e2 = element.child;
  12223. for (let j = 0; j < _eJsonc.length; j++) {
  12224. let _ec = _e2[_eJsonc[j]];
  12225. this.data.data.push({
  12226. id: _ec.id,
  12227. parentid: element.id,
  12228. topic: _ec.name,
  12229. });
  12230. // targetArray.push({
  12231. // id: _ec.id,
  12232. // parentid: element.id,
  12233. // name: _ec.name,
  12234. // });
  12235. targetArray[i].children.push({
  12236. value: _ec.name,
  12237. label: _ec.name,
  12238. children: [],
  12239. });
  12240. let _eJsonz = Object.keys(_ec.child);
  12241. let _e3 = _ec.child;
  12242. for (let z = 0; z < _eJsonz.length; z++) {
  12243. let _ez = _e3[_eJsonz[z]];
  12244. this.data.data.push({
  12245. id: _ez.id,
  12246. parentid: _ec.id,
  12247. topic: _ez.name,
  12248. });
  12249. // targetArray.push({
  12250. // id: _ez.id,
  12251. // parentid: _ec.id,
  12252. // name: _ez.name,
  12253. // });
  12254. targetArray[i].children[j].children.push({
  12255. value: _ez.name,
  12256. label: _ez.name,
  12257. });
  12258. }
  12259. }
  12260. }
  12261. this.targetArray = targetArray;
  12262. this.$forceUpdate();
  12263. },
  12264. /*添加评价 */
  12265. addEList(index, tIndex) {
  12266. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  12267. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  12268. value: "",
  12269. detail: "",
  12270. score: 5,
  12271. })
  12272. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  12273. { value: "", detail: "", score: 5 },
  12274. ]);
  12275. this.$forceUpdate();
  12276. },
  12277. openEList(index, tIndex) {
  12278. this.evaIndex = index;
  12279. this.evatIndex = tIndex;
  12280. this.evaBoxDialog = true;
  12281. },
  12282. addCET(index, tIndex) {
  12283. this.cetIndex = index;
  12284. this.cettIndex = tIndex;
  12285. this.selectAllType1();
  12286. },
  12287. addCETemplate() {
  12288. var array =
  12289. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  12290. .eList;
  12291. let params = [
  12292. {
  12293. uid: this.userid,
  12294. n: this.templateName,
  12295. json: JSON.stringify(array),
  12296. t: 1,
  12297. oid: this.oid,
  12298. },
  12299. ];
  12300. this.ajax
  12301. .post(this.$store.state.api + "addCETShare", params)
  12302. .then((res) => {
  12303. this.addTypeByCET(res.data[0][0].id);
  12304. })
  12305. .catch((err) => {
  12306. this.$message.error("网络不佳");
  12307. console.error(err);
  12308. });
  12309. },
  12310. addTypeByCET(id) {
  12311. if (this.setTypeJson.two == "") {
  12312. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  12313. return;
  12314. }
  12315. let params = {
  12316. cid: id,
  12317. };
  12318. this.ajax
  12319. .get(this.$store.state.api + "deleteCETLabel", params)
  12320. .then((res) => {
  12321. for (var i = 0; i < 2; i++) {
  12322. let tid = "";
  12323. if (i == 0) {
  12324. tid = this.setTypeJson.one;
  12325. } else {
  12326. tid = this.setTypeJson.two;
  12327. }
  12328. let params = [
  12329. {
  12330. cid: id,
  12331. tid: tid,
  12332. uid: this.userid,
  12333. },
  12334. ];
  12335. this.ajax
  12336. .post(this.$store.state.api + "addCETLabel", params)
  12337. .then((res) => {
  12338. this.$message({
  12339. message: "添加成功",
  12340. type: "success",
  12341. });
  12342. this.close();
  12343. })
  12344. .catch((err) => {
  12345. this.$message.error("网络不佳");
  12346. console.error(err);
  12347. });
  12348. }
  12349. })
  12350. .catch((err) => {
  12351. this.$message.error("网络不佳");
  12352. console.error(err);
  12353. });
  12354. },
  12355. updateEvaJson(array) {
  12356. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  12357. this.evatIndex
  12358. ].eList = array;
  12359. },
  12360. forceUpdate() {
  12361. this.$forceUpdate();
  12362. },
  12363. deletEList(index, tIndex, eIndex) {
  12364. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  12365. eIndex,
  12366. 1
  12367. );
  12368. this.$forceUpdate();
  12369. },
  12370. getChoosePic(t) {
  12371. this.chooseType = t;
  12372. this.getAllBanner();
  12373. },
  12374. getAllBanner() {
  12375. this.sysPicVisible = true;
  12376. let params = {
  12377. t: this.chooseType,
  12378. };
  12379. this.ajax
  12380. .get(this.$store.state.api + "selectAllBanner", params)
  12381. .then((res) => {
  12382. this.sysPic = res.data[0];
  12383. })
  12384. .catch((err) => {
  12385. console.error(err);
  12386. });
  12387. },
  12388. // getClass() {
  12389. // let params = {
  12390. // oid: this.oid,
  12391. // };
  12392. // this.ajax
  12393. // .get(this.$store.state.api + "selectClassBySchool", params)
  12394. // .then((res) => {
  12395. // this.classJuri = res.data[0];
  12396. // })
  12397. // .catch((err) => {
  12398. // console.error(err);
  12399. // });
  12400. // },
  12401. deleteSysPic() {
  12402. this.cover = [];
  12403. this.isSysPic = false;
  12404. this.isSysPic2 = false;
  12405. },
  12406. deleteSelectPic() {
  12407. this.selectJson.url = "";
  12408. },
  12409. setEListStar() {
  12410. this.$forceUpdate();
  12411. },
  12412. deletRateList(i) {
  12413. this.rateJson.splice(i, 1);
  12414. },
  12415. addRateList() {
  12416. this.rateJson.push({ detail: "", score: 5, value: "" });
  12417. },
  12418. addSt() {
  12419. this.sentenceList.push({
  12420. sentenceTitle: "",
  12421. addSentence: [],
  12422. rightAnswer: [],
  12423. });
  12424. },
  12425. addSen(i) {
  12426. if (!this.sentenceList[i].sentenceTitle) {
  12427. this.$message.error("请填写卡片内容!");
  12428. return;
  12429. }
  12430. if (this.sentenceList[i].sentenceTitle.length > 10) {
  12431. this.$message.error("卡片内容字数不能超过10位");
  12432. return;
  12433. }
  12434. if (
  12435. this.sentenceList[i].addSentence.indexOf(
  12436. this.sentenceList[i].sentenceTitle
  12437. ) !== -1
  12438. ) {
  12439. this.$message.error("不能添加重复的卡片内容!");
  12440. return;
  12441. }
  12442. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  12443. // this.isPushTitleList.push(this.sentenceTitle);
  12444. this.sentenceList[i].sentenceTitle = "";
  12445. },
  12446. setRightAnswer(s, i, j) {
  12447. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  12448. this.sentenceList[i].rightAnswer.push(s);
  12449. }
  12450. },
  12451. returnCard(r, i, j) {
  12452. this.sentenceList[i].rightAnswer.splice(j, 1);
  12453. },
  12454. addSentenceTool() {
  12455. for (var i = 0; i < this.sentenceList.length; i++) {
  12456. if (this.sentenceList[i].rightAnswer.length == 0) {
  12457. this.$message.error(`请将题目${i + 1}设置完整。`);
  12458. return;
  12459. }
  12460. if (
  12461. this.sentenceList[i].addSentence.length !=
  12462. this.sentenceList[i].rightAnswer.length
  12463. ) {
  12464. this.$message.error(`请将题目${i + 1}设置完整。`);
  12465. return;
  12466. }
  12467. }
  12468. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12469. this.taskCount
  12470. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  12471. this.sentenceList = [
  12472. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12473. ];
  12474. this.dialogVisibleSentence = false;
  12475. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12476. // itemTaskIndex
  12477. // ].toolChoose[toolIndex].tool = [];
  12478. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12479. // itemTaskIndex
  12480. // ].toolChoose[toolIndex].tool.push(i);
  12481. if (
  12482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12483. .toolChoose[this.toolIndex].tool != 47
  12484. ) {
  12485. this.addTools(47, this.taskCount, this.toolIndex);
  12486. }
  12487. },
  12488. addTableJson() {
  12489. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  12490. // this.$message.error("请将信息填写完整!");
  12491. // return;
  12492. // }
  12493. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12494. this.taskCount
  12495. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  12496. // this.tableJson = [{ text: "" }];
  12497. // this.dialogVisibleTable = false;
  12498. this.$message.success("上传成功");
  12499. if (
  12500. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12501. .toolChoose[this.toolIndex].tool != 48
  12502. ) {
  12503. this.addTools(48, this.taskCount, this.toolIndex);
  12504. }
  12505. },
  12506. addWordJson() {
  12507. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12508. this.taskCount
  12509. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  12510. // this.wordJson = [{ text: "" }];
  12511. // this.dialogVisibleWord = false;
  12512. this.$message.success("上传成功");
  12513. if (
  12514. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12515. .toolChoose[this.toolIndex].tool != 52
  12516. ) {
  12517. this.addTools(52, this.taskCount, this.toolIndex);
  12518. }
  12519. },
  12520. addMoreUpload() {
  12521. if (this.uploadJson.length == 0) {
  12522. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12523. this.taskCount
  12524. ].toolChoose[this.toolIndex].uploadJson = [];
  12525. } else {
  12526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12527. this.taskCount
  12528. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  12529. }
  12530. this.uploadJson = [];
  12531. this.dialogVisibleMoreUpload = false;
  12532. if (
  12533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12534. .toolChoose[this.toolIndex].tool != 50
  12535. ) {
  12536. this.addTools(50, this.taskCount, this.toolIndex);
  12537. }
  12538. },
  12539. addPreTime() {
  12540. if (this.preTime == 0) {
  12541. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12542. this.taskCount
  12543. ].toolChoose[this.toolIndex].preTime = 0;
  12544. } else {
  12545. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12546. this.taskCount
  12547. ].toolChoose[this.toolIndex].preTime = this.preTime;
  12548. }
  12549. this.preTime = 0;
  12550. this.dialogVisiblePreTime = false;
  12551. if (
  12552. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12553. .toolChoose[this.toolIndex].tool != 10
  12554. ) {
  12555. this.addTools(10, this.taskCount, this.toolIndex);
  12556. }
  12557. },
  12558. goToTask(i) {
  12559. this.toolIndexType = "";
  12560. if (this.isClickColor == i + 1) {
  12561. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  12562. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  12563. // } else {
  12564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12565. i
  12566. ].toolOpen = true;
  12567. // }
  12568. this.$forceUpdate();
  12569. return;
  12570. }
  12571. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  12572. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  12573. // } else {
  12574. document.querySelectorAll(".basic_box")[0].scrollTop =
  12575. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  12576. this.isClickColor = i + 1;
  12577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  12578. // }
  12579. this.$forceUpdate();
  12580. },
  12581. taskOpen(i, stageIndex) {
  12582. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  12583. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  12584. } else {
  12585. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  12586. }
  12587. this.updateWork3(stageIndex);
  12588. this.$forceUpdate();
  12589. },
  12590. goToTask2(i, stage) {
  12591. this.toolIndexType = "";
  12592. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  12593. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  12594. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  12595. // } else {
  12596. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12597. i
  12598. ].toolOpen = true;
  12599. // }
  12600. this.$forceUpdate();
  12601. return;
  12602. }
  12603. if (this.unitIndex != stage) {
  12604. if (this.panUnitJson() == 2) {
  12605. return;
  12606. }
  12607. this.unitSet(stage);
  12608. }
  12609. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  12610. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  12611. // } else {
  12612. document.querySelectorAll(".basic_box")[0].scrollTop =
  12613. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  12614. this.isClickColor = i + 1;
  12615. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  12616. // }
  12617. this.$forceUpdate();
  12618. },
  12619. taskMove(type, index) {
  12620. this.$confirm(
  12621. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  12622. "提示",
  12623. {
  12624. confirmButtonText: "确定",
  12625. cancelButtonText: "取消",
  12626. type: "warning",
  12627. }
  12628. )
  12629. .then(() => {
  12630. if (type == 1) {
  12631. if (index > 0) {
  12632. let a = JSON.parse(
  12633. JSON.stringify(
  12634. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12635. index - 1
  12636. ]
  12637. )
  12638. );
  12639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  12640. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12641. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12642. }
  12643. } else {
  12644. if (
  12645. index <
  12646. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  12647. ) {
  12648. let a = JSON.parse(
  12649. JSON.stringify(
  12650. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12651. index + 1
  12652. ]
  12653. )
  12654. );
  12655. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  12656. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12657. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12658. }
  12659. }
  12660. this.$forceUpdate();
  12661. })
  12662. .catch(() => {
  12663. return;
  12664. });
  12665. },
  12666. stageMove(type, index) {
  12667. if (type == 1) {
  12668. if (index > 0) {
  12669. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  12670. let acid = JSON.parse(
  12671. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  12672. );
  12673. let bcid = JSON.parse(
  12674. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12675. );
  12676. this.unitJson3[index - 1] = this.unitJson3[index];
  12677. this.unitJson3[index] = a;
  12678. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  12679. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12680. }
  12681. } else {
  12682. if (index < this.unitJson3.length - 1) {
  12683. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  12684. let acid = JSON.parse(
  12685. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  12686. );
  12687. let bcid = JSON.parse(
  12688. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12689. );
  12690. this.unitJson3[index + 1] = this.unitJson3[index];
  12691. this.unitJson3[index] = a;
  12692. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  12693. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12694. }
  12695. }
  12696. this.$forceUpdate();
  12697. },
  12698. addGroup(i) {
  12699. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  12700. this.groupJson.group.push({
  12701. name: "第" + (this.groupJson.group.length + 1) + "组",
  12702. });
  12703. },
  12704. deleteGroup(i) {
  12705. this.groupJson.group.splice(i, 1);
  12706. },
  12707. numberPan() {
  12708. if (
  12709. /[^\d]/.test(this.groupJson.number) ||
  12710. this.groupJson.number < 2 ||
  12711. this.groupJson.number > 10
  12712. ) {
  12713. this.$message.error("请输入2-10的数字");
  12714. this.groupJson.number = "";
  12715. }
  12716. },
  12717. numberPanJie() {
  12718. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  12719. this.$message.error('请输入大于1的数字')
  12720. this.courseJie = 1
  12721. }
  12722. },
  12723. numberPanTime() {
  12724. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  12725. this.$message.error('请输入大于1的数字')
  12726. this.courseTime = 1
  12727. }
  12728. },
  12729. addGroupJson() {
  12730. for (var i = 0; i < this.groupJson.group.length; i++) {
  12731. if (!this.groupJson.group[i].name) {
  12732. this.$message.error("请将信息填写完整!");
  12733. return;
  12734. }
  12735. }
  12736. if (!this.groupJson.number) {
  12737. this.$message.error("请将信息填写完整!");
  12738. return;
  12739. }
  12740. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12741. this.taskCount
  12742. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  12743. JSON.stringify(this.groupJson)
  12744. );
  12745. this.dialogVisibleGroup = false;
  12746. this.groupJson = {};
  12747. if (
  12748. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12749. .toolChoose[this.toolIndex].tool != 49
  12750. ) {
  12751. this.addTools(49, this.taskCount, this.toolIndex);
  12752. }
  12753. },
  12754. updateTime(preTime) {
  12755. this.preTime = preTime;
  12756. },
  12757. InviteChange(val) {
  12758. console.log(val);
  12759. let _check = [];
  12760. let _check2 = [];
  12761. for (var i = 0; i < this.grade2.length; i++) {
  12762. var gid = this.grade2[i].id;
  12763. _check.push(gid);
  12764. }
  12765. for (var i = 0; i < this.checkboxList2.length; i++) {
  12766. var _id = this.checkboxList2[i];
  12767. if (_check.indexOf(_id) !== -1) {
  12768. _check2.push(_id);
  12769. }
  12770. }
  12771. this.checkAll = _check2.length === _check.length;
  12772. return;
  12773. let array = JSON.parse(JSON.stringify(val));
  12774. this.inviteCode = this.inviteCode.filter((el) => {
  12775. if (val.indexOf(el.cid) != -1) {
  12776. array.splice(array.indexOf(el.cid), 1);
  12777. return el;
  12778. }
  12779. });
  12780. for (var i = 0; i < array.length; i++) {
  12781. this.getInviteCode(array[i]);
  12782. }
  12783. },
  12784. InviteChange2(val) {
  12785. console.log(val);
  12786. let _check = [];
  12787. let _check2 = [];
  12788. for (var i = 0; i < this.teacherJuri.length; i++) {
  12789. var gid = this.teacherJuri[i].userid;
  12790. _check.push(gid);
  12791. }
  12792. for (var i = 0; i < this.checkboxList3.length; i++) {
  12793. var _id = this.checkboxList3[i];
  12794. if (_check.indexOf(_id) !== -1) {
  12795. _check2.push(_id);
  12796. }
  12797. }
  12798. this.checkAll2 = _check2.length === _check.length;
  12799. this.setMan();
  12800. return;
  12801. let array = JSON.parse(JSON.stringify(val));
  12802. this.inviteCode = this.inviteCode.filter((el) => {
  12803. if (val.indexOf(el.cid) != -1) {
  12804. array.splice(array.indexOf(el.cid), 1);
  12805. return el;
  12806. }
  12807. });
  12808. for (var i = 0; i < array.length; i++) {
  12809. this.getInviteCode(array[i]);
  12810. }
  12811. },
  12812. handleCheckAllChange(val) {
  12813. if (val) {
  12814. for (var i = 0; i < this.grade2.length; i++) {
  12815. var gid = this.grade2[i].id;
  12816. if (this.checkboxList2.indexOf(gid) === -1) {
  12817. this.checkboxList2.push(gid);
  12818. }
  12819. }
  12820. } else {
  12821. let _check = [];
  12822. let _check2 = [];
  12823. for (var i = 0; i < this.grade2.length; i++) {
  12824. var gid = this.grade2[i].id;
  12825. _check.push(gid);
  12826. }
  12827. for (var i = 0; i < this.checkboxList2.length; i++) {
  12828. var _id = this.checkboxList2[i];
  12829. if (_check.indexOf(_id) === -1) {
  12830. _check2.push(_id);
  12831. }
  12832. }
  12833. this.checkboxList2 = _check2;
  12834. }
  12835. this.isIndeterminate = false;
  12836. },
  12837. handleCheckAllChange2(val) {
  12838. if (val) {
  12839. for (var i = 0; i < this.teacherJuri.length; i++) {
  12840. var gid = this.teacherJuri[i].userid;
  12841. if (this.checkboxList3.indexOf(gid) === -1) {
  12842. this.checkboxList3.push(gid);
  12843. }
  12844. }
  12845. } else {
  12846. let _check = [];
  12847. let _check2 = [];
  12848. for (var i = 0; i < this.teacherJuri.length; i++) {
  12849. var gid = this.teacherJuri[i].userid;
  12850. _check.push(gid);
  12851. }
  12852. for (var i = 0; i < this.checkboxList3.length; i++) {
  12853. var _id = this.checkboxList3[i];
  12854. if (_check.indexOf(_id) === -1) {
  12855. _check2.push(_id);
  12856. }
  12857. }
  12858. this.checkboxList3 = _check2;
  12859. }
  12860. this.isIndeterminate2 = false;
  12861. },
  12862. async getInviteCode(cid) {
  12863. let code = this.randomNumber();
  12864. let params = {
  12865. code: code,
  12866. oid: this.oid,
  12867. };
  12868. let type = 1;
  12869. for (var i = 0; i < this.inviteCode.length; i++) {
  12870. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  12871. type = 2;
  12872. }
  12873. }
  12874. if (type == 2) {
  12875. this.getInviteCode(cid);
  12876. return;
  12877. }
  12878. const res = await this.ajax.get(
  12879. this.$store.state.api + "selectInviteCode2",
  12880. params
  12881. );
  12882. if (
  12883. res.data.length &&
  12884. res.data[0].length &&
  12885. res.data[0][0].courseId != this.cid
  12886. ) {
  12887. this.getInviteCode(cid);
  12888. return;
  12889. }
  12890. let array = [];
  12891. for (var i = 0; i < this.inviteCode.length; i++) {
  12892. array.push(this.inviteCode[i].cid);
  12893. }
  12894. if (array.indexOf(cid) != -1) {
  12895. this.inviteCode[array.indexOf(cid)].ic = code;
  12896. } else {
  12897. this.inviteCode.push({ cid: cid, ic: code });
  12898. }
  12899. },
  12900. OpenInviteD(cid) {
  12901. let array = [];
  12902. this.icode = "";
  12903. for (var i = 0; i < this.inviteCode.length; i++) {
  12904. array.push(this.inviteCode[i].cid);
  12905. }
  12906. if (array.indexOf(cid) != -1) {
  12907. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  12908. }
  12909. this.inviteId = cid;
  12910. this.dialogVisibleInvite = true;
  12911. },
  12912. addInvite() {
  12913. let reg = /^[A-Za-z0-9]{4,}$/;
  12914. if (!reg.test(this.icode)) {
  12915. this.$message.error("请输入至少四位数字或英文组合的随机码");
  12916. return;
  12917. }
  12918. let type = 1;
  12919. for (var i = 0; i < this.inviteCode.length; i++) {
  12920. if (
  12921. this.inviteCode[i].cid != this.inviteId &&
  12922. this.icode == this.inviteCode[i].ic
  12923. ) {
  12924. type = 2;
  12925. }
  12926. }
  12927. if (type == 2) {
  12928. this.$message.error("已有此随机码,不能重复");
  12929. return;
  12930. }
  12931. let params = {
  12932. code: this.icode,
  12933. oid: this.oid,
  12934. };
  12935. this.ajax
  12936. .get(this.$store.state.api + "selectInviteCode", params)
  12937. .then((res) => {
  12938. if (
  12939. res.data.length &&
  12940. res.data[0].length &&
  12941. res.data[0][0].courseId != this.cid
  12942. ) {
  12943. this.$message.error("已有此随机码,不能重复");
  12944. return;
  12945. }
  12946. let array = [];
  12947. for (var i = 0; i < this.inviteCode.length; i++) {
  12948. array.push(this.inviteCode[i].cid);
  12949. }
  12950. if (array.indexOf(this.inviteId) != -1) {
  12951. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  12952. } else {
  12953. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  12954. }
  12955. this.icode = "";
  12956. this.dialogVisibleInvite = false;
  12957. })
  12958. .catch((err) => {
  12959. console.error(err);
  12960. });
  12961. },
  12962. randomNumber() {
  12963. // 随机生成两位数
  12964. // let num = Math.floor(Math.random() * 900) + 100;
  12965. // 生成 0 到 99 之间的随机整数
  12966. const randomNumber = Math.floor(Math.random() * 100);
  12967. // 如果随机数小于 10,补上前导零
  12968. const num =
  12969. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  12970. // 随机生成两个大写字母
  12971. let letters = "";
  12972. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  12973. for (let i = 0; i < 3; i++) {
  12974. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  12975. }
  12976. // 随机生成两位数字和字母的组合
  12977. let mix = "";
  12978. let chars =
  12979. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  12980. for (let i = 0; i < 3; i++) {
  12981. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  12982. mix += char;
  12983. }
  12984. // 随机选择一种类型
  12985. let type = Math.floor(Math.random() * 3);
  12986. return num;
  12987. // 根据类型输出结果
  12988. switch (type) {
  12989. case 0:
  12990. console.log(num); // 输出两位数
  12991. return num;
  12992. case 1:
  12993. console.log(letters); // 输出两个大写字母
  12994. return letters;
  12995. case 2:
  12996. console.log(mix); // 输出两位数字和字母的组合
  12997. return mix;
  12998. }
  12999. },
  13000. getPaste() {
  13001. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13002. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13003. if (!iframe && !iframe2) {
  13004. return;
  13005. }
  13006. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13007. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13008. if (copyData && copyData.stageData && copyData.stageData.length) {
  13009. this.isPasteStage = true;
  13010. }
  13011. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  13012. this.isPasteStage = true;
  13013. }
  13014. if (copyData && copyData.selectData.length) {
  13015. this.isPasteChoice = true;
  13016. }
  13017. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  13018. this.isPasteTask = true;
  13019. }
  13020. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  13021. this.isPasteTask = true;
  13022. }
  13023. },
  13024. setCover() {
  13025. var _this = this;
  13026. if(_this.cover.length){
  13027. return;
  13028. }
  13029. _this.imageloading2 = true
  13030. _this.ajax
  13031. .post("https://gpt.cocorobo.cn/search_image", {
  13032. page: _this.ppage,
  13033. pagesize: 9,
  13034. query: _this.courseName,
  13035. })
  13036. .then(function (response) {
  13037. // console.log(response.data.data);
  13038. var data = response.data.FunctionResponse.result;
  13039. _this.cover = [];
  13040.       setTimeout(() => {
  13041.         _this.cover[0] = {
  13042.           name: "网络图片.png",
  13043.           url: data[0].thumbnail
  13044.         };
  13045.         _this.imgChange1(null, null, 1, null);
  13046.         _this.$forceUpdate();
  13047.       }, 0);
  13048. _this.imageloading2 = false
  13049. })
  13050. .catch(function (error) {
  13051. _this.imageloading2 = false
  13052. console.log(error);
  13053. });
  13054. },
  13055. searchImage() {
  13056. var _this = this;
  13057. _this.imageList = [];
  13058. if (!_this.searchImageValue) {
  13059. _this.sysPicVisible2 = true;
  13060. return;
  13061. }
  13062. _this.imageloading = true;
  13063. _this.ajax
  13064. .post("https://gpt.cocorobo.cn/search_image", {
  13065. page: _this.ppage,
  13066. pagesize: 9,
  13067. query: _this.searchImageValue,
  13068. })
  13069. .then(function (response) {
  13070. // console.log(response.data.data);
  13071. var data = response.data.FunctionResponse.result;
  13072. for (var i = 0; i < data.length; i++) {
  13073. _this.imageList.push({ url: data[i].thumbnail });
  13074. }
  13075. _this.imageloading = false;
  13076. })
  13077. .catch(function (error) {
  13078. console.log(error);
  13079. });
  13080. _this.sysPicVisible2 = true;
  13081. },
  13082. changePicture() {
  13083. this.ppage++;
  13084. this.searchImage();
  13085. },
  13086. resetImage() {
  13087. this.ppage = 1;
  13088. this.searchImage();
  13089. },
  13090. jumpGj(i, j) {
  13091. if (i + 1 != this.isClickColor) {
  13092. this.isClickColor = i + 1;
  13093. }
  13094. var a = document.scrollingElement;
  13095. this.toolIndexType = `gj${i}${j}`;
  13096. let target = document.querySelector(`#gj${i}${j}`);
  13097. if (target) {
  13098. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  13099. setTimeout(() => {
  13100. target.scrollIntoView(true);
  13101. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  13102. j
  13103. ].isFold3 = false;
  13104. setTimeout(() => {
  13105. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  13106. }, 0);
  13107. }, 0);
  13108. }
  13109. },
  13110. jumpGj2(i, j, k) {
  13111. if (this.unitIndex != k) {
  13112. if (this.panUnitJson() == 2) {
  13113. return;
  13114. }
  13115. this.unitSet(k);
  13116. }
  13117. setTimeout(() => {
  13118. if (i + 1 != this.isClickColor) {
  13119. this.isClickColor = i + 1;
  13120. }
  13121. var a = document.scrollingElement;
  13122. this.toolIndexType = `gj${i}${j}${k}`;
  13123. let target = document.querySelector(`#gj${i}${j}`);
  13124. if (target) {
  13125. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  13126. setTimeout(() => {
  13127. target.scrollIntoView(true);
  13128. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  13129. j
  13130. ].isFold3 = false;
  13131. setTimeout(() => {
  13132. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  13133. }, 0);
  13134. }, 0);
  13135. }
  13136. }, 0);
  13137. },
  13138. dragStart(val, i, j) {
  13139. console.log(this.taskCount);
  13140. this.dragType = "drag";
  13141. this.taskCount = j;
  13142. this.oldIndex = i;
  13143. this.oldData = val;
  13144. },
  13145. dragOver(i, j) {
  13146. this.typeIndex = "chapter-" + j + "-" + i;
  13147. this.newIndex = i;
  13148. },
  13149. dragEnd() {
  13150. if (this.dragType != "drag") {
  13151. this.typeIndex = "";
  13152. this.newIndex = "";
  13153. this.dragType = "";
  13154. this.isdrag = "";
  13155. return;
  13156. }
  13157. console.log(this.taskCount);
  13158. let newItems = [
  13159. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13160. .chapterData,
  13161. ];
  13162. // 删除老的节点
  13163. newItems.splice(this.oldIndex, 1);
  13164. // 在列表中目标位置增加新的节点
  13165. newItems.splice(this.newIndex, 0, this.oldData);
  13166. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13167. this.taskCount
  13168. ].chapterData = [...newItems];
  13169. this.typeIndex = "";
  13170. this.newIndex = "";
  13171. this.dragType = "";
  13172. this.isdrag = "";
  13173. this.$forceUpdate();
  13174. },
  13175. dragTaskStart(val, i, j) {
  13176. this.dragType = "task";
  13177. this.oldIndex = i;
  13178. this.oldData = val;
  13179. this.oldUnitIndex = j;
  13180. },
  13181. dragTaskOver(i, j) {
  13182. this.typeIndex = "task-" + i;
  13183. this.newIndex = i;
  13184. this.checkUnitIndex = j;
  13185. },
  13186. async dragTaskEnd() {
  13187. if (this.dragType != "task") {
  13188. this.newIndex = "";
  13189. this.dragType = "";
  13190. this.typeIndex = "";
  13191. this.checkUnitIndex = "";
  13192. this.isdrag = "";
  13193. return;
  13194. }
  13195. if (
  13196. this.newIndex == this.oldIndex &&
  13197. this.oldUnitIndex == this.checkUnitIndex
  13198. ) {
  13199. this.newIndex = "";
  13200. this.dragType = "";
  13201. this.typeIndex = "";
  13202. this.checkUnitIndex = "";
  13203. this.isdrag = "";
  13204. return;
  13205. }
  13206. let count1 = await this.getWorksCount(
  13207. 2,
  13208. this.checkUnitIndex,
  13209. this.newIndex,
  13210. 0
  13211. );
  13212. let count2 = await this.getWorksCount(
  13213. 2,
  13214. this.oldUnitIndex,
  13215. this.oldIndex,
  13216. 0
  13217. );
  13218. if (count1 > 0 || count2 > 0) {
  13219. this.$confirm(
  13220. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  13221. "提示",
  13222. {
  13223. confirmButtonText: "确定",
  13224. cancelButtonText: "取消",
  13225. type: "warning",
  13226. }
  13227. )
  13228. .then(() => {
  13229. if (this.oldUnitIndex != this.checkUnitIndex) {
  13230. let newItems = [
  13231. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  13232. ];
  13233. // 删除老的节点
  13234. newItems.splice(this.oldIndex, 1);
  13235. // 在列表中目标位置增加新的节点
  13236. let newItems2 = [
  13237. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  13238. ];
  13239. newItems2.splice(this.newIndex, 0, this.oldData);
  13240. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  13241. ...newItems,
  13242. ];
  13243. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  13244. ...newItems2,
  13245. ];
  13246. } else {
  13247. let newItems = [
  13248. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  13249. ];
  13250. let chapterData = []
  13251. if (this.oldIndex == 0) {
  13252. chapterData = newItems[this.oldIndex].chapterData
  13253. newItems[this.oldIndex].chapterData = []
  13254. } else if (this.newIndex == 0) {
  13255. chapterData = newItems[this.newIndex].chapterData
  13256. newItems[this.oldIndex].chapterData = []
  13257. }
  13258. // 删除老的节点
  13259. newItems.splice(this.oldIndex, 1);
  13260. // 在列表中目标位置增加新的节点
  13261. newItems.splice(this.newIndex, 0, this.oldData);
  13262. if (this.oldIndex == 0 || this.newIndex == 0) {
  13263. newItems[0].chapterData = chapterData
  13264. }
  13265. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  13266. ...newItems,
  13267. ];
  13268. }
  13269. this.typeIndex = "";
  13270. this.newIndex = "";
  13271. this.dragType = "";
  13272. this.checkUnitIndex = "";
  13273. this.isdrag = "";
  13274. this.updateWork();
  13275. this.$forceUpdate();
  13276. })
  13277. .catch(() => {
  13278. this.newIndex = "";
  13279. this.dragType = "";
  13280. this.typeIndex = "";
  13281. this.checkUnitIndex = "";
  13282. this.isdrag = "";
  13283. return;
  13284. });
  13285. } else {
  13286. if (this.oldUnitIndex != this.checkUnitIndex) {
  13287. let newItems = [
  13288. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  13289. ];
  13290. // 删除老的节点
  13291. newItems.splice(this.oldIndex, 1);
  13292. // 在列表中目标位置增加新的节点
  13293. let newItems2 = [
  13294. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  13295. ];
  13296. newItems2.splice(this.newIndex, 0, this.oldData);
  13297. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  13298. ...newItems,
  13299. ];
  13300. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  13301. ...newItems2,
  13302. ];
  13303. } else {
  13304. let newItems = [
  13305. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  13306. ];
  13307. let chapterData = []
  13308. if (this.oldIndex == 0) {
  13309. chapterData = newItems[this.oldIndex].chapterData
  13310. newItems[this.oldIndex].chapterData = []
  13311. } else if (this.newIndex == 0) {
  13312. chapterData = newItems[this.newIndex].chapterData
  13313. newItems[this.oldIndex].chapterData = []
  13314. }
  13315. // 删除老的节点
  13316. newItems.splice(this.oldIndex, 1);
  13317. // 在列表中目标位置增加新的节点
  13318. newItems.splice(this.newIndex, 0, this.oldData);
  13319. if (this.oldIndex == 0 || this.newIndex == 0) {
  13320. newItems[0].chapterData = chapterData
  13321. }
  13322. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  13323. ...newItems,
  13324. ];
  13325. }
  13326. this.typeIndex = "";
  13327. this.newIndex = "";
  13328. this.dragType = "";
  13329. this.checkUnitIndex = "";
  13330. this.isdrag = "";
  13331. this.updateWork();
  13332. this.$forceUpdate();
  13333. }
  13334. },
  13335. dragUnitStart(val, i) {
  13336. this.dragType = "Unit";
  13337. this.oldIndex = i;
  13338. this.oldData = val;
  13339. },
  13340. dragUnitOver(i) {
  13341. this.typeIndex = "Unit-" + i;
  13342. this.newIndex = i;
  13343. console.log(i, this.unitJson[i].toolOpen);
  13344. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  13345. this.unitJson[i].toolOpen = true;
  13346. this.updateWork();
  13347. this.$forceUpdate();
  13348. }
  13349. },
  13350. async dragUnitEnd() {
  13351. if (this.dragType != "Unit") {
  13352. this.newIndex = "";
  13353. this.dragType = "";
  13354. this.typeIndex = "";
  13355. this.isdrag = "";
  13356. return;
  13357. }
  13358. if (this.newIndex == this.oldIndex) {
  13359. this.newIndex = "";
  13360. this.dragType = "";
  13361. this.typeIndex = "";
  13362. this.isdrag = "";
  13363. return;
  13364. }
  13365. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  13366. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  13367. console.log(count1, count2);
  13368. if (count1 > 0 || count2 > 0) {
  13369. this.$confirm(
  13370. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13371. "提示",
  13372. {
  13373. confirmButtonText: "确定",
  13374. cancelButtonText: "取消",
  13375. type: "warning",
  13376. }
  13377. )
  13378. .then(() => {
  13379. let newItems = [...this.unitJson];
  13380. // 删除老的节点
  13381. newItems.splice(this.oldIndex, 1);
  13382. // 在列表中目标位置增加新的节点
  13383. newItems.splice(this.newIndex, 0, this.oldData);
  13384. this.unitJson = [...newItems];
  13385. this.typeIndex = "";
  13386. this.newIndex = "";
  13387. this.dragType = "";
  13388. this.isdrag = "";
  13389. this.updateWork();
  13390. this.$forceUpdate();
  13391. })
  13392. .catch(() => {
  13393. this.newIndex = "";
  13394. this.dragType = "";
  13395. this.typeIndex = "";
  13396. this.isdrag = "";
  13397. return;
  13398. });
  13399. } else {
  13400. let newItems = [...this.unitJson];
  13401. // 删除老的节点
  13402. newItems.splice(this.oldIndex, 1);
  13403. // 在列表中目标位置增加新的节点
  13404. newItems.splice(this.newIndex, 0, this.oldData);
  13405. this.unitJson = [...newItems];
  13406. this.typeIndex = "";
  13407. this.newIndex = "";
  13408. this.dragType = "";
  13409. this.isdrag = "";
  13410. this.updateWork();
  13411. this.$forceUpdate();
  13412. }
  13413. },
  13414. getWorksCount(type, stage, task, tool) {
  13415. return new Promise((resolve, reject) => {
  13416. let params = [
  13417. {
  13418. cid: this.cid,
  13419. stage: stage,
  13420. task: task,
  13421. tool: tool,
  13422. type: type,
  13423. },
  13424. ];
  13425. this.ajax
  13426. .post(this.$store.state.api + "getCourseWorkCount", params)
  13427. .then((res) => {
  13428. let count = res.data[0][0].count;
  13429. resolve(count);
  13430. })
  13431. .catch((err) => {
  13432. resolve(0);
  13433. this.$message.error("网络不佳");
  13434. console.error(err);
  13435. });
  13436. });
  13437. },
  13438. getTwoType(id) {
  13439. this.twoJson = [];
  13440. var array = this.CourseTypeJson1[
  13441. "3f8eed32-aba9-11ee-b534-005056b86db5"
  13442. ].filter((e) => {
  13443. return e.ppid == id;
  13444. });
  13445. this.twoJson = array;
  13446. this.$forceUpdate();
  13447. },
  13448. ctype() {
  13449. this.oneJson =
  13450. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  13451. },
  13452. selectAllType1() {
  13453. this.CourseType1 = [];
  13454. this.CourseTypeJson1 = {};
  13455. this.courseTypeId1 = {};
  13456. this.$forceUpdate();
  13457. let params = {
  13458. org: this.org && this.org != "" ? this.org : "",
  13459. oid: this.oid && this.oid != "" ? this.oid : "",
  13460. };
  13461. this.ajax
  13462. .get(this.$store.state.api + "selectAllEvaType", params)
  13463. .then((res) => {
  13464. this.CourseType1 = res.data;
  13465. for (var i = 0; i < res.data[0].length; i++) {
  13466. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  13467. res.data[0][i].name = "一级分类";
  13468. } else if (
  13469. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  13470. ) {
  13471. res.data[0][i].name = "二级分类";
  13472. }
  13473. if (!this.cid) {
  13474. this.courseTypeId1[res.data[0][i].id] = [];
  13475. }
  13476. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  13477. this.CourseTypeJson1[res.data[0][i].id] = [];
  13478. }
  13479. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  13480. for (var j = 0; j < res.data[1].length; j++) {
  13481. if (res.data[0][i].id == res.data[1][j].pid) {
  13482. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13483. }
  13484. }
  13485. // } else {
  13486. if (res.data[2].length > 0) {
  13487. for (var j = 0; j < res.data[2].length; j++) {
  13488. if (res.data[0][i].id == res.data[2][j].pid) {
  13489. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  13490. }
  13491. }
  13492. }
  13493. if (res.data[3].length > 0) {
  13494. for (var j = 0; j < res.data[3].length; j++) {
  13495. if (res.data[0][i].id == res.data[3][j].pid) {
  13496. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  13497. }
  13498. }
  13499. }
  13500. // }
  13501. }
  13502. this.ctype();
  13503. this.cetBoxDialog = true;
  13504. })
  13505. .catch((err) => {
  13506. console.error(err);
  13507. });
  13508. },
  13509. setAiJson(pan,string){
  13510. if(pan == 'aiTeacher2'){
  13511. this.aiJson['teacherDetail2'] = string
  13512. }else {
  13513. this.aiJson[pan] = string
  13514. }
  13515. this.$forceUpdate();
  13516. },
  13517. editTask3(index){
  13518. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  13519. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  13520. }else {
  13521. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  13522. }
  13523. this.$forceUpdate();
  13524. },
  13525. editTask2(index){
  13526. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  13527. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  13528. }else {
  13529. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  13530. }
  13531. this.$forceUpdate();
  13532. },
  13533. editCpote(index){
  13534. if(this.cpote[index]){
  13535. this.cpote[index] = false
  13536. }else {
  13537. this.cpote[index] = true
  13538. }
  13539. this.$forceUpdate();
  13540. },
  13541. openAiDialog2(clickType, type, callback, index, tindex){
  13542. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  13543. confirmButtonText: "确定",
  13544. cancelButtonText: "取消",
  13545. type: "warning",
  13546. })
  13547. .then(() => {
  13548. if (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && type == "aiTeacher2") {
  13549. this.openAiDialog(clickType, 'aiTeacher')
  13550. }else {
  13551. this.openAiDialog(clickType, type, callback, index, tindex)
  13552. }
  13553. })
  13554. .catch(() => {
  13555. });
  13556. },
  13557. openAiDialog(clickType, type, callback, index, tindex) {
  13558. if(clickType == 1 && this.tipsJson.istips == 1){
  13559. this.$message.error("您没有权限修改/查看提示词");
  13560. return;
  13561. }
  13562. if (this.courseName == "") {
  13563. this.$message.error("请补充填写课程名称");
  13564. return;
  13565. }
  13566. this.clickType = clickType
  13567. let sub = []
  13568. if (this.courseTypeId.length) {
  13569. for (var i = 0; i < this.courseTypeId.length; i++) {
  13570. let _sid = this.courseTypeId[i]
  13571. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13572. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13573. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13574. }
  13575. }
  13576. }
  13577. }
  13578. let mclass = []
  13579. if (this.courseTypeId.length) {
  13580. for (var i = 0; i < this.courseTypeId.length; i++) {
  13581. let _sid = this.courseTypeId[i]
  13582. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13583. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13584. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13585. }
  13586. }
  13587. }
  13588. }
  13589. if (type == "aiDetail") {
  13590. if (this.ttextLoading) {
  13591. this.$message({
  13592. message: "请回答完毕后再次发送",
  13593. type: "warning"
  13594. });
  13595. return;
  13596. }
  13597. this.aitype = "aiDetail"
  13598. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  13599. this.aiText = this.aiJson.aiDetail
  13600. this.aiCallback = callback
  13601. } else if (type == "aiOutline") {
  13602. this.aitype = "aiOutline"
  13603. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  13604. this.aiText = this.aiJson.aiOutline
  13605. } else if (type == "aiOutline2") {
  13606. this.aitype = "aiOutline2"
  13607. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  13608. this.aiText = this.aiJson.aiOutlineTask
  13609. } else if (type == "aiTask") {
  13610. this.aitype = "aiTask"
  13611. var _text = ""
  13612. for (var i = 0; i < this.teacherText.length; i++) {
  13613. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  13614. }
  13615. // this.aiText = `请根据${_text}。`
  13616. this.aiText = this.aiJson.aiTask
  13617. this.aiCallBack = callback
  13618. } else if (type == "aiDetail1") {
  13619. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  13620. this.$message({
  13621. message: "请回答完毕后再次发送",
  13622. type: "warning"
  13623. });
  13624. return;
  13625. }
  13626. this.aitype = "aiDetail1"
  13627. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  13628. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  13629. this.aiText = this.aiJson.aiDetail1
  13630. this.aiCallBack = callback
  13631. this.aiIndex = index
  13632. } else if (type == "aiDetail2") {
  13633. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  13634. this.$message({
  13635. message: "请回答完毕后再次发送",
  13636. type: "warning"
  13637. });
  13638. return;
  13639. }
  13640. this.aitype = "aiDetail2"
  13641. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  13642. this.aiText = this.aiJson.aiDetail2
  13643. this.aiCallBack = callback
  13644. this.aiIndex = index
  13645. } else if (type == "aiDetail3") {
  13646. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  13647. this.$message({
  13648. message: "请回答完毕后再次发送",
  13649. type: "warning"
  13650. });
  13651. return;
  13652. }
  13653. this.aitype = "aiDetail3"
  13654. this.aiText = this.aiJson.aiDetail3
  13655. this.aiIndex = index + '-' + tindex
  13656. } else if (type == "aiDetail4") {
  13657. var _text = ""
  13658. for (var i = 0; i < callback.length; i++) {
  13659. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  13660. }
  13661. this.aitype = "aiDetail4"
  13662. this.aiText = this.aiJson.aiDetail4
  13663. this.aiIndex = index
  13664. } else if (type == "aiTeacher") {
  13665. this.aitype = "aiTeacher"
  13666. var _text = ""
  13667. for (var i = 0; i < this.dArray.length; i++) {
  13668. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13669. }
  13670. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13671. this.aiText = this.aiJson.aiTeacher
  13672. this.aiCallBack = callback
  13673. } else if (type == "aiTeacher2") {
  13674. this.aitype = "aiTeacher2"
  13675. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13676. } else if (type == "teacherDetail") {
  13677. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13678. this.$message({
  13679. message: "请回答完毕后再次发送",
  13680. type: "warning"
  13681. });
  13682. return;
  13683. }
  13684. this.aitype = "teacherDetail"
  13685. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13686. this.aiText = this.aiJson.teacherDetail
  13687. this.aiCallBack = callback
  13688. this.aiIndex = index
  13689. } else if (type == "teacherDetail2") {
  13690. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13691. this.$message({
  13692. message: "请回答完毕后再次发送",
  13693. type: "warning"
  13694. });
  13695. return;
  13696. }
  13697. this.aitype = "teacherDetail2"
  13698. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13699. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13700. this.aiCallBack = callback
  13701. this.aiIndex = index
  13702. } else if (type == "aiCpote1") {
  13703. if (this.cpotetLoading.cpote1) {
  13704. this.$message({
  13705. message: "请回答完毕后再次发送",
  13706. type: "warning"
  13707. });
  13708. return;
  13709. }
  13710. this.aitype = "aiCpote1"
  13711. this.aiText = this.aiJson.cpote1
  13712. this.aiCallBack = callback
  13713. } else if (type == "aiCpote2") {
  13714. if (this.cpotetLoading.cpote2) {
  13715. this.$message({
  13716. message: "请回答完毕后再次发送",
  13717. type: "warning"
  13718. });
  13719. return;
  13720. }
  13721. this.aitype = "aiCpote2"
  13722. this.aiText = this.aiJson.cpote2
  13723. this.aiCallBack = callback
  13724. }
  13725. else if (type == "aiCpote3") {
  13726. if (this.cpotetLoading.cpote3) {
  13727. this.$message({
  13728. message: "请回答完毕后再次发送",
  13729. type: "warning"
  13730. });
  13731. return;
  13732. }
  13733. this.aitype = "aiCpote3"
  13734. this.aiText = this.aiJson.cpote3
  13735. this.aiCallBack = callback
  13736. } else if (type == "aiCpote4") {
  13737. if (this.cpotetLoading.cpote4) {
  13738. this.$message({
  13739. message: "请回答完毕后再次发送",
  13740. type: "warning"
  13741. });
  13742. return;
  13743. }
  13744. this.aitype = "aiCpote4"
  13745. this.aiText = this.aiJson.cpote4
  13746. this.aiCallBack = callback
  13747. }
  13748. this.dialogVisibleAiD = true
  13749. },
  13750. async aiConfirm(msg) {
  13751. let sub = []
  13752. if (this.courseTypeId.length) {
  13753. for (var i = 0; i < this.courseTypeId.length; i++) {
  13754. let _sid = this.courseTypeId[i]
  13755. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13756. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13757. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13758. }
  13759. }
  13760. }
  13761. }
  13762. let mclass = []
  13763. if (this.courseTypeId.length) {
  13764. for (var i = 0; i < this.courseTypeId.length; i++) {
  13765. let _sid = this.courseTypeId[i]
  13766. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13767. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13768. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13769. }
  13770. }
  13771. }
  13772. }
  13773. let url = []
  13774. if (this.infoData.length) {
  13775. for (var i = 0; i < this.infoData.length; i++) {
  13776. url.push(this.infoData[i].url)
  13777. }
  13778. }
  13779. if (this.aitype == "aiDetail") {
  13780. this.detailYou(msg)
  13781. } else if (this.aitype == "aiOutline") {
  13782. this.loading = true
  13783. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13784. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13785. let message = `NOTICE
  13786. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13787. 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.
  13788. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13789. Instruction: Based on the context, follow "Format example", write content.
  13790. # Context
  13791. ## 要求
  13792. ${msg} 以及##参考资料
  13793. ## 参考资料
  13794. 课程名字:${this.courseName}
  13795. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  13796. ${sub.length ? '学科:' + sub.join(",") : ''}
  13797. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13798. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13799. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13800. # Format example
  13801. [{"task": "任务名称1","detail": "任务设计和评价标准"},{"task": "任务名称2","detail": "任务设计和评价标准"}]`
  13802. this.aiGet2(message, () => {
  13803. this.loading = false
  13804. this.isOutline = true
  13805. })
  13806. } else if (this.aitype == "aiOutline2") {
  13807. this.loading = true
  13808. let message = `NOTICE
  13809. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13810. 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.
  13811. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13812. Instruction: Based on the context, follow "Format example", write content.
  13813. # Context
  13814. ## 要求
  13815. ${msg} 以及##参考资料
  13816. ## 参考资料
  13817. 课程名字:${this.courseName}
  13818. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  13819. ${sub.length ? '学科:' + sub.join(",") : ''}
  13820. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13821. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13822. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13823. # Format example
  13824. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  13825. this.aiGetTask2(message, () => {
  13826. this.loading = false
  13827. this.isOutline = true
  13828. })
  13829. } else if (this.aitype == "aiTask") {
  13830. var _text = ""
  13831. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13832. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  13833. }
  13834. let message = `NOTICE
  13835. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13836. 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.
  13837. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13838. Instruction: Based on the context, follow "Format example", write content.
  13839. # Context
  13840. ## 要求
  13841. ${msg} 为**每个教学任务分别输出**以下内容。
  13842.  
  13843. ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  13844. ## 格式要求
  13845. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson}个
  13846. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动
  13847. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  13848. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  13849. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  13850. 出现选择题和问答题的概率提高
  13851. ## 参考资料
  13852. 教学任务教案:${_text}
  13853.  
  13854. # Format example
  13855. [{"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":"工具描述"}]}]`
  13856. this.loading = true
  13857. this.aiGet3(message, this.aiCallBack)
  13858. } else if (this.aitype == "aiDetail1") {
  13859. this.aiDetail(msg, this.aiIndex)
  13860. } else if (this.aitype == "aiDetail2") {
  13861. this.aiDetail2(msg, this.aiIndex)
  13862. } else if (this.aitype == "aiDetail3") {
  13863. let _index = this.aiIndex.split('-')
  13864. this.aiDetail3(msg, _index[0], _index[1])
  13865. } else if (this.aitype == "aiDetail4") {
  13866. this.aiDetail4(msg, this.aiIndex)
  13867. } else if (this.aitype == "teacherDetail") {
  13868. this.aiDetail5(msg, this.aiIndex)
  13869. } else if (this.aitype == "teacherDetail2") {
  13870. this.aiDetail52(msg, this.aiIndex)
  13871. } else if (this.aitype == "aiCpote1") {
  13872. this.aiCpote(msg, this.aiCallBack)
  13873. } else if (this.aitype == "aiCpote2") {
  13874. this.aiCpote(msg, this.aiCallBack)
  13875. } else if (this.aitype == "aiCpote3") {
  13876. this.aiCpote(msg, this.aiCallBack)
  13877. } else if (this.aitype == "aiCpote4") {
  13878. this.aiCpote(msg, this.aiCallBack)
  13879. } else if (this.aitype == "aiTeacher") {
  13880. this.loading = true
  13881. var _text = ""
  13882. for (var i = 0; i < this.dArray.length; i++) {
  13883. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13884. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13885. let message = ` NOTICE
  13886. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13887. 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.
  13888. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13889. Instruction: Based on the context, follow "Format example", write content.
  13890. # Context
  13891. ## 要求
  13892. ${msg} 以及${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '##任务大纲' : '##目标层,##任务簇'}
  13893. ${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 任务大纲\n'+_text : ''}
  13894. ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  13895. ## Format example
  13896. [{"task": "任务名称1","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称2","detail": "教案输出为文本或markdown格式就行"}]`
  13897. this.aiGet4(message, () => {
  13898. this.loading = false
  13899. this.isOutline2 = true
  13900. })
  13901. } else if (this.aitype == "aiTeacher2"){
  13902. this.isOutline2 = true
  13903. setTimeout(()=>{
  13904. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13905. this.aiDetail52(msg, i)
  13906. }
  13907. }, 0)
  13908. }
  13909. this.setAiJson(this.aitype, msg)
  13910. },
  13911. detailYou(message) {
  13912. this.textLoading = true
  13913. this.ttextLoading = true
  13914. let sub = []
  13915. if (this.courseTypeId.length) {
  13916. for (var i = 0; i < this.courseTypeId.length; i++) {
  13917. let _sid = this.courseTypeId[i]
  13918. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13919. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13920. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13921. }
  13922. }
  13923. }
  13924. }
  13925. let mclass = []
  13926. if (this.courseTypeId.length) {
  13927. for (var i = 0; i < this.courseTypeId.length; i++) {
  13928. let _sid = this.courseTypeId[i]
  13929. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13930. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13931. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13932. }
  13933. }
  13934. }
  13935. }
  13936. let url = []
  13937. if (this.infoData.length) {
  13938. for (var i = 0; i < this.infoData.length; i++) {
  13939. url.push(this.infoData[i].url)
  13940. }
  13941. }
  13942. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13943. // --------
  13944. // ## 补充参考资料
  13945. // 补充资料:${url.join(",")}
  13946. // 补充描述:${this.courseText2} ##补充参考资料和
  13947. let msg = `NOTICE
  13948. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  13949. 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.
  13950. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13951. Instruction: Based on the context, follow "Format example", write content.
  13952. #Context
  13953. ## 参考资料
  13954. 课程名字:${this.courseName}
  13955. ${sub.length ? '学科:' + sub.join(",") : ''}
  13956. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13957. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13958. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13959. ${this.courseText && this.aiCallback == 2 ? '参考内容:'+this.courseText : ''}
  13960. ## 要求
  13961. ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品
  13962. ## Format example
  13963. 课程简要描述:课程内容的简单叙述。
  13964. 驱动性问题:1个驱动整个项目的问题。
  13965. 最终作品:对应解决驱动性问题的作品,可个人可团队。
  13966. ${this.courseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  13967. this.aiGet(msg)
  13968. },
  13969. setUnitJson() {
  13970. 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 }] }
  13971. this.$forceUpdate()
  13972. },
  13973. async aiGet(messages) {
  13974. let _this = this
  13975. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13976. if (_this.infoData.length) {
  13977. for (var i = 0; i < _this.infoData.length; i++) {
  13978. if(_this.infoData[i].fileid){
  13979. fileid.push(_this.infoData[i].fileid)
  13980. }else {
  13981. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13982. if(_fileid){
  13983. _this.infoData[i].fileid = _fileid
  13984. _this.$forceUpdate();
  13985. fileid.push(_fileid)
  13986. }
  13987. }
  13988. }
  13989. }
  13990. let _uuid = uuidv4();
  13991. // let params = JSON.stringify({
  13992. // // "model": "Chat",
  13993. // model: 'gpt-3.5-turbo',
  13994. // temperature: 0,
  13995. // max_tokens: 4096,
  13996. // top_p: 1,
  13997. // frequency_penalty: 0,
  13998. // presence_penalty: 0,
  13999. // messages: [{
  14000. // content: messages,
  14001. // role: 'user'
  14002. // }],
  14003. // uid: _uuid,
  14004. // mind_map_question: "",
  14005. // })
  14006. let params = {
  14007. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14008. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  14009. session_name: _uuid,
  14010. userId: _this.userid,
  14011. uid: _uuid,
  14012. file_ids: fileid.length ? [...fileid] : '',
  14013. }
  14014. // let params = JSON.stringify({
  14015. // message: {
  14016. // anthropic_version: "bedrock-2023-05-31",
  14017. // max_tokens: 4096,
  14018. // temperature: 0,
  14019. // top_p: 1,
  14020. // messages: [{
  14021. // "role": "user",
  14022. // "content": messages
  14023. // }] ,
  14024. // },
  14025. // uid: _uuid,
  14026. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14027. // });
  14028. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14029. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14030. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14031. console.log(response);
  14032. // let data = response.data.FunctionResponse
  14033. // if (data.choices && data.choices.length && data.choices[0].message) {
  14034. // _this.courseText = data.choices[0].message.content
  14035. // }
  14036. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14037. } else {
  14038. this.$message.warning(response.data.FunctionResponse.result);
  14039. }
  14040. }).catch(function (error) {
  14041. _this.textLoading = false
  14042. _this.ttextLoading = false
  14043. console.log(error);
  14044. });
  14045. await _this.aiGetgetAiContent(_uuid)
  14046. },
  14047. aiGetgetAiContent(_uid) {
  14048. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14049. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14050. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14051. let _allText = "";
  14052. let _mdText = "";
  14053. let _iindex = 0
  14054. _source.onmessage = _e => {
  14055. let _eData = JSON.parse(_e.data).content;
  14056. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14057. //对话已经完成
  14058. _mdText = _mdText.replace("_", "");
  14059. _source.close();
  14060. this.courseText = _mdText;
  14061. this.textLoading = false
  14062. this.ttextLoading = false
  14063. return;
  14064. } else {
  14065. _iindex++
  14066. //对话还在继续
  14067. let _text = "";
  14068. _text = _eData.replaceAll("'", "");
  14069. if (_allText == "") {
  14070. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14071. } else {
  14072. _allText += _text;
  14073. }
  14074. _mdText = _allText + "_";
  14075. _mdText = _mdText.replace(/\\n/g, "\n");
  14076. _mdText = _mdText.replace(/\\/g, "");
  14077. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14078. //转化返回的回复流数据
  14079. if(_iindex == 10){
  14080. this.courseText = _mdText;
  14081. _iindex = 0
  14082. }
  14083. this.textLoading = false
  14084. // 处理流数据
  14085. }
  14086. // this.$forceUpdate();
  14087. };
  14088. },
  14089. async aiGet2(messages, callback) {
  14090. let _this = this
  14091. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14092. if (_this.infoData.length) {
  14093. for (var i = 0; i < _this.infoData.length; i++) {
  14094. if(_this.infoData[i].fileid){
  14095. fileid.push(_this.infoData[i].fileid)
  14096. }else {
  14097. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14098. if(_fileid){
  14099. _this.infoData[i].fileid = _fileid
  14100. _this.$forceUpdate();
  14101. fileid.push(_fileid)
  14102. }
  14103. }
  14104. }
  14105. }
  14106. console.log('fileid=========',fileid)
  14107. // let params = JSON.stringify({
  14108. // // "model": "Chat",
  14109. // model: 'gpt-3.5-turbo',
  14110. // temperature: 0,
  14111. // max_tokens: 4096,
  14112. // top_p: 1,
  14113. // frequency_penalty: 0,
  14114. // presence_penalty: 0,
  14115. // messages: [{
  14116. // content: messages,
  14117. // role: 'user'
  14118. // }],
  14119. // stream: false,
  14120. // uid: this.userid,
  14121. // mind_map_question: "",
  14122. // })
  14123. // // let params = JSON.stringify({
  14124. // // message: {
  14125. // // anthropic_version: "bedrock-2023-05-31",
  14126. // // max_tokens: 4096,
  14127. // // temperature: 0,
  14128. // // top_p: 1,
  14129. // // messages: [{
  14130. // // content: messages,
  14131. // // role: 'user'
  14132. // // }], //
  14133. // // },
  14134. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14135. // // });
  14136. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14137. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14138. // console.log(response);
  14139. // let data = response.data.FunctionResponse
  14140. // if (data.choices && data.choices.length && data.choices[0].message) {
  14141. // console.log(data.choices[0].message.content);
  14142. // let dArray = JSON.parse(data.choices[0].message.content)
  14143. // _this.dArray = dArray
  14144. // _this.unitJson[0].chapterInfo[0].taskJson = []
  14145. // for (var i = 0; i < dArray.length; i++) {
  14146. // let _task = dArray[i]
  14147. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14148. // task: _task.task,
  14149. // taskDetail: "",
  14150. // taskDetail2: _task.detail,
  14151. // taskDetail3: "",
  14152. // chapterData: [],
  14153. // toolText: "",
  14154. // toolChoose: [
  14155. // {
  14156. // tool: [],
  14157. // toolDetail: "",
  14158. // toolType: 0,
  14159. // askCount: 1,
  14160. // askTitle: "",
  14161. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14162. // },
  14163. // ],
  14164. // isShowTools: false,
  14165. // askCount: 1,
  14166. // isFold: 2,
  14167. // askTitle: "",
  14168. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14169. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14170. // homeworkList: [],
  14171. // })
  14172. // }
  14173. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  14174. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14175. // _this.$forceUpdate();
  14176. // }
  14177. // // if (data.result) {
  14178. // // console.log(data.result);
  14179. // // let dArray = JSON.parse(data.result)
  14180. // // _this.dArray = dArray
  14181. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  14182. // // for (var i = 0; i < dArray.length; i++) {
  14183. // // let _task = dArray[i]
  14184. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14185. // // task: _task.task,
  14186. // // taskDetail: "",
  14187. // // taskDetail2: _task.detail,
  14188. // // taskDetail3: "",
  14189. // // chapterData: [],
  14190. // // toolText: "",
  14191. // // toolChoose: [
  14192. // // {
  14193. // // tool: [],
  14194. // // toolDetail: "",
  14195. // // toolType: 0,
  14196. // // askCount: 1,
  14197. // // askTitle: "",
  14198. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14199. // // },
  14200. // // ],
  14201. // // isShowTools: false,
  14202. // // askCount: 1,
  14203. // // isFold: 1,
  14204. // // askTitle: "",
  14205. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14206. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  14207. // // homeworkList: [],
  14208. // // })
  14209. // // }
  14210. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14211. // // _this.$forceUpdate();
  14212. // // }
  14213. // callback ? callback() : ''
  14214. // }).catch(function (error) {
  14215. // _this.loading = false
  14216. // console.log(error);
  14217. // });
  14218. let parm = {
  14219. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14220. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  14221. session_name: uuidv4(),
  14222. userId: this.userid,
  14223. file_ids: fileid.length ? [...fileid] : '',
  14224. }
  14225. this.ajax
  14226. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14227. .then((response) => {
  14228. console.log(response);
  14229. let data = response.data.FunctionResponse
  14230. if (data.message) {
  14231. console.log(data.message);
  14232. let dArray = {}
  14233. try {
  14234. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14235. } catch (error) {
  14236. console.log("error_________________" + error);
  14237. try {
  14238. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14239. let match = data.message.match(regex);
  14240. dArray = JSON.parse(match[0]);
  14241. // var message = data.message;
  14242. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14243. // var jsonEnd = message.indexOf("```", jsonStart);
  14244. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14245. // dArray = JSON.parse(jsonString);
  14246. } catch (error) {
  14247. console.log("error_________________" + error);
  14248. }
  14249. }
  14250. _this.dArray = dArray
  14251. if(_this.panOutline() > 0){
  14252. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  14253. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  14254. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  14255. }
  14256. for (var i = 0; i < dArray.length; i++) {
  14257. let _task = dArray[i]
  14258. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14259. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  14260. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  14261. }else {
  14262. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14263. task: _task.task,
  14264. taskDetail: "",
  14265. taskDetail2: _task.detail,
  14266. taskDetail3: "",
  14267. chapterData: [],
  14268. toolText: "",
  14269. toolChoose: [
  14270. {
  14271. tool: [],
  14272. toolDetail: "",
  14273. toolType: 0,
  14274. askCount: 1,
  14275. askTitle: "",
  14276. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14277. },
  14278. ],
  14279. isShowTools: false,
  14280. askCount: 1,
  14281. isFold: 2,
  14282. askTitle: "",
  14283. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14284. checkJson: [{ checkCount: [], checkPerent: [] }],
  14285. homeworkList: [],
  14286. })
  14287. }
  14288. }
  14289. }else {
  14290. _this.unitJson[0].chapterInfo[0].taskJson = []
  14291. for (var i = 0; i < dArray.length; i++) {
  14292. let _task = dArray[i]
  14293. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14294. task: _task.task,
  14295. taskDetail: "",
  14296. taskDetail2: _task.detail,
  14297. taskDetail3: "",
  14298. chapterData: [],
  14299. toolText: "",
  14300. toolChoose: [
  14301. {
  14302. tool: [],
  14303. toolDetail: "",
  14304. toolType: 0,
  14305. askCount: 1,
  14306. askTitle: "",
  14307. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14308. },
  14309. ],
  14310. isShowTools: false,
  14311. askCount: 1,
  14312. isFold: 2,
  14313. askTitle: "",
  14314. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14315. checkJson: [{ checkCount: [], checkPerent: [] }],
  14316. homeworkList: [],
  14317. })
  14318. }
  14319. }
  14320. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  14321. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14322. _this.$forceUpdate();
  14323. }
  14324. callback ? callback() : ''
  14325. })
  14326. .catch((error) => {
  14327. _this.loading = false
  14328. console.log(error);
  14329. });
  14330. },
  14331. async aiGetTask2(messages, callback) {
  14332. let _this = this
  14333. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14334. if (_this.infoData.length) {
  14335. for (var i = 0; i < _this.infoData.length; i++) {
  14336. if(_this.infoData[i].fileid){
  14337. fileid.push(_this.infoData[i].fileid)
  14338. }else {
  14339. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14340. if(_fileid){
  14341. _this.infoData[i].fileid = _fileid
  14342. _this.$forceUpdate();
  14343. fileid.push(_fileid)
  14344. }
  14345. }
  14346. }
  14347. }
  14348. console.log('fileid=========',fileid)
  14349. // let params = JSON.stringify({
  14350. // // "model": "Chat",
  14351. // model: 'gpt-3.5-turbo',
  14352. // temperature: 0,
  14353. // max_tokens: 4096,
  14354. // top_p: 1,
  14355. // frequency_penalty: 0,
  14356. // presence_penalty: 0,
  14357. // messages: [{
  14358. // content: messages,
  14359. // role: 'user'
  14360. // }],
  14361. // stream: false,
  14362. // uid: this.userid,
  14363. // mind_map_question: "",
  14364. // })
  14365. // // let params = JSON.stringify({
  14366. // // message: {
  14367. // // anthropic_version: "bedrock-2023-05-31",
  14368. // // max_tokens: 4096,
  14369. // // temperature: 0,
  14370. // // top_p: 1,
  14371. // // messages: [{
  14372. // // content: messages,
  14373. // // role: 'user'
  14374. // // }], //
  14375. // // },
  14376. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14377. // // });
  14378. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14379. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14380. // console.log(response);
  14381. // let data = response.data.FunctionResponse
  14382. // if (data.choices && data.choices.length && data.choices[0].message) {
  14383. // console.log(data.choices[0].message.content);
  14384. // let dArray = JSON.parse(data.choices[0].message.content)
  14385. // _this.dArray = dArray
  14386. // _this.unitJson[0].chapterInfo[0].taskJson = []
  14387. // for (var i = 0; i < dArray.length; i++) {
  14388. // let _task = dArray[i]
  14389. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14390. // task: _task.task,
  14391. // taskDetail: "",
  14392. // taskDetail2: _task.detail,
  14393. // taskDetail3: "",
  14394. // chapterData: [],
  14395. // toolText: "",
  14396. // toolChoose: [
  14397. // {
  14398. // tool: [],
  14399. // toolDetail: "",
  14400. // toolType: 0,
  14401. // askCount: 1,
  14402. // askTitle: "",
  14403. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14404. // },
  14405. // ],
  14406. // isShowTools: false,
  14407. // askCount: 1,
  14408. // isFold: 2,
  14409. // askTitle: "",
  14410. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14411. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14412. // homeworkList: [],
  14413. // })
  14414. // }
  14415. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  14416. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14417. // _this.$forceUpdate();
  14418. // }
  14419. // // if (data.result) {
  14420. // // console.log(data.result);
  14421. // // let dArray = JSON.parse(data.result)
  14422. // // _this.dArray = dArray
  14423. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  14424. // // for (var i = 0; i < dArray.length; i++) {
  14425. // // let _task = dArray[i]
  14426. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14427. // // task: _task.task,
  14428. // // taskDetail: "",
  14429. // // taskDetail2: _task.detail,
  14430. // // taskDetail3: "",
  14431. // // chapterData: [],
  14432. // // toolText: "",
  14433. // // toolChoose: [
  14434. // // {
  14435. // // tool: [],
  14436. // // toolDetail: "",
  14437. // // toolType: 0,
  14438. // // askCount: 1,
  14439. // // askTitle: "",
  14440. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14441. // // },
  14442. // // ],
  14443. // // isShowTools: false,
  14444. // // askCount: 1,
  14445. // // isFold: 1,
  14446. // // askTitle: "",
  14447. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14448. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  14449. // // homeworkList: [],
  14450. // // })
  14451. // // }
  14452. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14453. // // _this.$forceUpdate();
  14454. // // }
  14455. // callback ? callback() : ''
  14456. // }).catch(function (error) {
  14457. // _this.loading = false
  14458. // console.log(error);
  14459. // });
  14460. let parm = {
  14461. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14462. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  14463. session_name: uuidv4(),
  14464. userId: this.userid,
  14465. file_ids: fileid.length ? [...fileid] : '',
  14466. }
  14467. this.ajax
  14468. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14469. .then((response) => {
  14470. console.log(response);
  14471. let data = response.data.FunctionResponse
  14472. if (data.message) {
  14473. console.log(data.message);
  14474. let dArray = {}
  14475. try {
  14476. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14477. } catch (error) {
  14478. console.log("error_________________" + error);
  14479. try {
  14480. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14481. let match = data.message.match(regex);
  14482. dArray = JSON.parse(match[0]);
  14483. // var message = data.message;
  14484. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14485. // var jsonEnd = message.indexOf("```", jsonStart);
  14486. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14487. // dArray = JSON.parse(jsonString);
  14488. } catch (error) {
  14489. console.log("error_________________" + error);
  14490. }
  14491. }
  14492. _this.dArray = dArray
  14493. if(_this.panOutline() > 0){
  14494. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  14495. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  14496. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  14497. }
  14498. for (var i = 0; i < dArray.length; i++) {
  14499. let _task = dArray[i]
  14500. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14501. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  14502. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  14503. }else {
  14504. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14505. task: _task.task,
  14506. taskDetail: "",
  14507. taskDetail2: "",
  14508. taskDetail3: "",
  14509. chapterData: [],
  14510. toolText: "",
  14511. toolChoose: [
  14512. {
  14513. tool: [],
  14514. toolDetail: "",
  14515. toolType: 0,
  14516. askCount: 1,
  14517. askTitle: "",
  14518. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14519. },
  14520. ],
  14521. isShowTools: false,
  14522. askCount: 1,
  14523. isFold: 2,
  14524. askTitle: "",
  14525. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14526. checkJson: [{ checkCount: [], checkPerent: [] }],
  14527. homeworkList: [],
  14528. })
  14529. }
  14530. }
  14531. }else {
  14532. _this.unitJson[0].chapterInfo[0].taskJson = []
  14533. for (var i = 0; i < dArray.length; i++) {
  14534. let _task = dArray[i]
  14535. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14536. task: _task.task,
  14537. taskDetail: "",
  14538. taskDetail2: "",
  14539. taskDetail3: "",
  14540. chapterData: [],
  14541. toolText: "",
  14542. toolChoose: [
  14543. {
  14544. tool: [],
  14545. toolDetail: "",
  14546. toolType: 0,
  14547. askCount: 1,
  14548. askTitle: "",
  14549. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14550. },
  14551. ],
  14552. isShowTools: false,
  14553. askCount: 1,
  14554. isFold: 2,
  14555. askTitle: "",
  14556. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14557. checkJson: [{ checkCount: [], checkPerent: [] }],
  14558. homeworkList: [],
  14559. })
  14560. }
  14561. }
  14562. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  14563. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14564. _this.$forceUpdate();
  14565. setTimeout(()=>{
  14566. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  14567. this.aiOutlineDetail('', i)
  14568. }
  14569. }, 0)
  14570. }
  14571. callback ? callback() : ''
  14572. })
  14573. .catch((error) => {
  14574. _this.loading = false
  14575. console.log(error);
  14576. });
  14577. },
  14578. async aiGet3(messages, callback) {
  14579. let _this = this
  14580. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14581. if (_this.infoData.length) {
  14582. for (var i = 0; i < _this.infoData.length; i++) {
  14583. if(_this.infoData[i].fileid){
  14584. fileid.push(_this.infoData[i].fileid)
  14585. }else {
  14586. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14587. if(_fileid){
  14588. _this.infoData[i].fileid = _fileid
  14589. _this.$forceUpdate();
  14590. fileid.push(_fileid)
  14591. }
  14592. }
  14593. }
  14594. }
  14595. // let params = JSON.stringify({
  14596. // // "model": "Chat",
  14597. // model: 'gpt-3.5-turbo',
  14598. // temperature: 0,
  14599. // max_tokens: 4096,
  14600. // top_p: 1,
  14601. // frequency_penalty: 0,
  14602. // presence_penalty: 0,
  14603. // messages: [{
  14604. // content: messages,
  14605. // role: 'user'
  14606. // }],
  14607. // stream: false,
  14608. // uid: this.userid,
  14609. // mind_map_question: "",
  14610. // })
  14611. // // let params = JSON.stringify({
  14612. // // message: {
  14613. // // anthropic_version: "bedrock-2023-05-31",
  14614. // // max_tokens: 4096,
  14615. // // temperature: 0,
  14616. // // top_p: 1,
  14617. // // messages: [{
  14618. // // content: messages,
  14619. // // role: 'user'
  14620. // // }], //
  14621. // // },
  14622. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14623. // // });
  14624. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14625. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14626. // console.log(response);
  14627. // let data = response.data.FunctionResponse
  14628. // if (data.choices && data.choices.length && data.choices[0].message) {
  14629. // console.log(data.choices[0].message.content);
  14630. // let tArray = JSON.parse(data.choices[0].message.content)
  14631. // // _this.unitJson[0].chapterInfo[0].task = []
  14632. // let toolsJson = {
  14633. // "电子白板": { tool: 1, type: 1 },
  14634. // "文档": { tool: 52, type: 1 },
  14635. // "思维导图": { tool: 3, type: 1 },
  14636. // "表格": { tool: 48, type: 1 },
  14637. // "作业提交": { tool: 16, type: 2 }
  14638. // }
  14639. // for (var i = 0; i < tArray.length; i++) {
  14640. // let _task = tArray[i]
  14641. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  14642. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  14643. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  14644. // if (_task.toolChoose.length) {
  14645. // for (var j = 0; j < _task.toolChoose.length; j++) {
  14646. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  14647. // {
  14648. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  14649. // toolDetail: _task.toolChoose[j].detail,
  14650. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  14651. // askCount: 1,
  14652. // askTitle: "",
  14653. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14654. // },
  14655. // )
  14656. // }
  14657. // } else {
  14658. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  14659. // {
  14660. // tool: [],
  14661. // toolDetail: "",
  14662. // toolType: 0,
  14663. // askCount: 1,
  14664. // askTitle: "",
  14665. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14666. // },
  14667. // )
  14668. // }
  14669. // }
  14670. // // if (_this.infoData.length) {
  14671. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  14672. // // }
  14673. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14674. // _this.$forceUpdate();
  14675. // }
  14676. // // if (data.result) {
  14677. // // console.log(data.result);
  14678. // // let tArray = JSON.parse(data.result)
  14679. // // // _this.unitJson[0].chapterInfo[0].task = []
  14680. // // let toolsJson = {
  14681. // // "电子白板": { tool: 1, type: 1 },
  14682. // // "文档": { tool: 52, type: 1 },
  14683. // // "思维导图": { tool: 3, type: 1 },
  14684. // // "表格": { tool: 48, type: 1 },
  14685. // // "作业提交": { tool: 16, type: 2 }
  14686. // // }
  14687. // // for (var i = 0; i < tArray.length; i++) {
  14688. // // let _task = tArray[i]
  14689. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  14690. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  14691. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  14692. // // if (_task.toolChoose.length) {
  14693. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  14694. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  14695. // // {
  14696. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  14697. // // toolDetail: _task.toolChoose[j].detail,
  14698. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  14699. // // askCount: 1,
  14700. // // askTitle: "",
  14701. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14702. // // },
  14703. // // )
  14704. // // }
  14705. // // } else {
  14706. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  14707. // // {
  14708. // // tool: [],
  14709. // // toolDetail: "",
  14710. // // toolType: 0,
  14711. // // askCount: 1,
  14712. // // askTitle: "",
  14713. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14714. // // },
  14715. // // )
  14716. // // }
  14717. // // }
  14718. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14719. // // _this.$forceUpdate();
  14720. // // }
  14721. // callback ? callback() : ''
  14722. // }).catch(function (error) {
  14723. // _this.loading = false
  14724. // console.log(error);
  14725. // });
  14726. let parm = {
  14727. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14728. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  14729. session_name: uuidv4(),
  14730. userId: this.userid,
  14731. file_ids: fileid.length ? [...fileid] : '',
  14732. }
  14733. this.ajax
  14734. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14735. .then(async (response) => {
  14736. console.log(response);
  14737. let data = response.data.FunctionResponse
  14738. if (data.message) {
  14739. console.log(data.message);
  14740. let tArray = {}
  14741. try {
  14742. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14743. } catch (error) {
  14744. console.log("error_________________" + error);
  14745. try {
  14746. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14747. let match = data.message.match(regex);
  14748. tArray = JSON.parse(match[0]);
  14749. // var message = data.message;
  14750. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14751. // var jsonEnd = message.indexOf("```", jsonStart);
  14752. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14753. // tArray = JSON.parse(jsonString);
  14754. } catch (error) {
  14755. console.log("error_________________" + error);
  14756. }
  14757. }
  14758. let toolsJson = {
  14759. "电子白板": { tool: 1, type: 1 },
  14760. "文档": { tool: 52, type: 1 },
  14761. "思维导图": { tool: 3, type: 1 },
  14762. "表格": { tool: 48, type: 1 },
  14763. "作业提交": { tool: 16, type: 2 },
  14764. "问答": { tool: 15, type: 2 },
  14765. "选择题": { tool: 45, type: 2 },
  14766. }
  14767. // answerQ:"sssssssssssssss"
  14768. for (var i = 0; i < tArray.length; i++) {
  14769. let _task = tArray[i]
  14770. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  14771. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  14772. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  14773. if (_task.toolChoose.length) {
  14774. for (var j = 0; j < _task.toolChoose.length; j++) {
  14775. let _json = {
  14776. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  14777. toolDetail: _task.toolChoose[j].detail,
  14778. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  14779. askCount: 1,
  14780. askTitle: "",
  14781. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14782. }
  14783. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  14784. let answerQ = await _this.aiCreateQuestion(15, i)
  14785. _json.answerQ = answerQ.answerQ
  14786. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  14787. let testJson = await _this.aiCreateQuestion(45, i)
  14788. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  14789. }
  14790. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  14791. }
  14792. } else {
  14793. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  14794. {
  14795. tool: [],
  14796. toolDetail: "",
  14797. toolType: 0,
  14798. askCount: 1,
  14799. askTitle: "",
  14800. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14801. },
  14802. )
  14803. }
  14804. }
  14805. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14806. _this.$forceUpdate();
  14807. _this.createTeacherAn();
  14808. }
  14809. callback ? callback() : ''
  14810. })
  14811. .catch((error) => {
  14812. _this.loading = false
  14813. console.log(error);
  14814. });
  14815. },
  14816. async aiCreateQuestion(type, task) {
  14817. let _this = this
  14818. return new Promise((resolve, reject) => {
  14819. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14820. if (_this.infoData.length) {
  14821. for (var i = 0; i < _this.infoData.length; i++) {
  14822. if(_this.infoData[i].fileid){
  14823. fileid.push(_this.infoData[i].fileid)
  14824. }
  14825. }
  14826. }
  14827. let sub = []
  14828. let mclass = []
  14829. if (this.courseTypeId.length) {
  14830. for (var i = 0; i < this.courseTypeId.length; i++) {
  14831. let _sid = this.courseTypeId[i]
  14832. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14833. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  14834. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  14835. }
  14836. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  14837. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  14838. }
  14839. }
  14840. }
  14841. }
  14842. let messages = ""
  14843. if(type == 15){
  14844. messages = `NOTICE
  14845. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  14846. 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.
  14847. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  14848. Instruction: Based on the context, follow "Format example", write content.
  14849. # Context
  14850. ## 任务
  14851. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  14852. ## 限制
  14853. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  14854. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  14855. ## 课程简介
  14856. 课程名字:${_this.courseName}
  14857. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  14858. ${sub.length ? '学科:' + sub.join(",") : ''}
  14859. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  14860. ## 教案
  14861. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  14862. # Format example
  14863. {answerQ:"问题"}
  14864. `
  14865. }else if(type == 45){
  14866. messages = `NOTICE
  14867. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  14868. 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.
  14869. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  14870. Instruction: Based on the context, follow "Format example", write content.
  14871. # Context
  14872. ## 任务
  14873. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  14874. ## 限制
  14875. - 生成题目禁止重复。
  14876. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  14877. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  14878. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  14879. ## 课程简介
  14880. 课程名字:${_this.courseName}
  14881. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  14882. ${sub.length ? '学科:' + sub.join(",") : ''}
  14883. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  14884. ## 教案
  14885. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  14886. # Format example
  14887. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  14888. `
  14889. }
  14890. let parm = {
  14891. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14892. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  14893. session_name: uuidv4(),
  14894. userId: this.userid,
  14895. file_ids: fileid.length ? [...fileid] : '',
  14896. }
  14897. this.ajax
  14898. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14899. .then((response) => {
  14900. console.log(response);
  14901. let data = response.data.FunctionResponse
  14902. if (data.message) {
  14903. console.log(data.message);
  14904. try {
  14905. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14906. let tArray = {}
  14907. try {
  14908. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14909. } catch (error) {
  14910. console.log("error_________________" + error);
  14911. try {
  14912. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14913. let match = data.message.match(regex);
  14914. tArray = JSON.parse(match[0]);
  14915. // var message = data.message;
  14916. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14917. // var jsonEnd = message.indexOf("```", jsonStart);
  14918. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14919. // tArray = JSON.parse(jsonString);
  14920. } catch (error) {
  14921. console.log("error_________________" + error);
  14922. }
  14923. }
  14924. resolve(tArray)
  14925. } catch (error) {
  14926. if(type == 15){
  14927. resolve({answerQ: "题目"})
  14928. }else if(type == 45){
  14929. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  14930. }
  14931. }
  14932. }else if(type == 15){
  14933. resolve({answerQ: "题目"})
  14934. }else if(type == 45){
  14935. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  14936. }
  14937. })
  14938. .catch((error) => {
  14939. if(type == 15){
  14940. resolve({answerQ: "题目"})
  14941. }else if(type == 45){
  14942. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  14943. }
  14944. console.log(error);
  14945. });
  14946. });
  14947. },
  14948. async aiChoice(type){
  14949. if(type == 45){
  14950. this.choiceLoading = true
  14951. }
  14952. let _this = this
  14953. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14954. if (_this.infoData.length) {
  14955. for (var i = 0; i < _this.infoData.length; i++) {
  14956. if(_this.infoData[i].fileid){
  14957. fileid.push(_this.infoData[i].fileid)
  14958. }
  14959. }
  14960. }
  14961. let sub = []
  14962. let mclass = []
  14963. if (this.courseTypeId.length) {
  14964. for (var i = 0; i < this.courseTypeId.length; i++) {
  14965. let _sid = this.courseTypeId[i]
  14966. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14967. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  14968. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  14969. }
  14970. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  14971. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  14972. }
  14973. }
  14974. }
  14975. }
  14976. let messages = ""
  14977. if(type == 15){
  14978. messages = `NOTICE
  14979. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  14980. 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.
  14981. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  14982. Instruction: Based on the context, follow "Format example", write content.
  14983. # Context
  14984. ## 任务
  14985. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  14986. ## 限制
  14987. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  14988. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  14989. ## 课程简介
  14990. 课程名字:${_this.courseName}
  14991. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  14992. ${sub.length ? '学科:' + sub.join(",") : ''}
  14993. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  14994. ## 教案
  14995. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  14996. # Format example
  14997. {answerQ:"问题"}
  14998. `
  14999. }else if(type == 45){
  15000. messages = `NOTICE
  15001. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15002. 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.
  15003. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15004. Instruction: Based on the context, follow "Format example", write content.
  15005. # Context
  15006. ## 任务
  15007. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  15008. ## 限制
  15009. - 生成题目禁止重复。
  15010. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  15011. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  15012. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  15013. ## 课程简介
  15014. 课程名字:${_this.courseName}
  15015. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  15016. ${sub.length ? '学科:' + sub.join(",") : ''}
  15017. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15018. ## 教案
  15019. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  15020. # Format example
  15021. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  15022. `
  15023. }
  15024. let parm = {
  15025. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  15026. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15027. session_name: uuidv4(),
  15028. userId: this.userid,
  15029. file_ids: fileid.length ? [...fileid] : '',
  15030. }
  15031. this.ajax
  15032. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  15033. .then((response) => {
  15034. console.log(response);
  15035. let data = response.data.FunctionResponse
  15036. if (data.message) {
  15037. console.log(data.message);
  15038. try {
  15039. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15040. let tArray = {}
  15041. try {
  15042. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15043. } catch (error) {
  15044. console.log("error_________________" + error);
  15045. try {
  15046. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15047. let match = data.message.match(regex);
  15048. tArray = JSON.parse(match[0]);
  15049. // var message = data.message;
  15050. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  15051. // var jsonEnd = message.indexOf("```", jsonStart);
  15052. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  15053. // tArray = JSON.parse(jsonString);
  15054. } catch (error) {
  15055. console.log("error_________________" + error);
  15056. }
  15057. }
  15058. if(type == 45){
  15059. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  15060. }
  15061. } catch (error) {
  15062. if(type == 15){
  15063. {answerQ: "题目"}
  15064. }else if(type == 45){
  15065. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  15066. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  15067. }
  15068. _this.choiceLoading = false
  15069. }
  15070. }else if(type == 15){
  15071. {answerQ: "题目"}
  15072. }else if(type == 45){
  15073. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  15074. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  15075. }
  15076. _this.choiceLoading = false
  15077. }).catch((error) => {
  15078. if(type == 15){
  15079. {answerQ: "题目"}
  15080. }else if(type == 45){
  15081. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  15082. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  15083. }
  15084. console.log(error);
  15085. _this.choiceLoading = false
  15086. });
  15087. },
  15088. async aiGet4(messages, callback, clickType) {
  15089. let _this = this
  15090. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15091. if (_this.infoData.length) {
  15092. for (var i = 0; i < _this.infoData.length; i++) {
  15093. if(_this.infoData[i].fileid){
  15094. fileid.push(_this.infoData[i].fileid)
  15095. }else {
  15096. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15097. if(_fileid){
  15098. _this.infoData[i].fileid = _fileid
  15099. _this.$forceUpdate();
  15100. fileid.push(_fileid)
  15101. }
  15102. }
  15103. }
  15104. }
  15105. // let params = JSON.stringify({
  15106. // // "model": "Chat",
  15107. // model: 'gpt-3.5-turbo',
  15108. // temperature: 0,
  15109. // max_tokens: 4096,
  15110. // top_p: 1,
  15111. // frequency_penalty: 0,
  15112. // presence_penalty: 0,
  15113. // messages: [{
  15114. // content: messages,
  15115. // role: 'user'
  15116. // }],
  15117. // stream: false,
  15118. // uid: this.userid,
  15119. // mind_map_question: "",
  15120. // })
  15121. // // let params = JSON.stringify({
  15122. // // message: {
  15123. // // anthropic_version: "bedrock-2023-05-31",
  15124. // // max_tokens: 4096,
  15125. // // temperature: 0,
  15126. // // top_p: 1,
  15127. // // messages: [{
  15128. // // content: messages,
  15129. // // role: 'user'
  15130. // // }], //
  15131. // // },
  15132. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15133. // // });
  15134. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15135. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  15136. // console.log(response);
  15137. // let data = response.data.FunctionResponse
  15138. // if (data.choices && data.choices.length && data.choices[0].message) {
  15139. // console.log(data.choices[0].message.content);
  15140. // let dArray = JSON.parse(data.choices[0].message.content)
  15141. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  15142. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  15143. // _this.unitJson[0].chapterInfo[0].taskJson = []
  15144. // for (var i = 0; i < dArray.length; i++) {
  15145. // let _task = dArray[i]
  15146. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15147. // task: _task.task,
  15148. // taskDetail: "",
  15149. // taskDetail2: "",
  15150. // taskDetail3: _task.detail,
  15151. // chapterData: [],
  15152. // toolText: "",
  15153. // toolChoose: [
  15154. // {
  15155. // tool: [],
  15156. // toolDetail: "",
  15157. // toolType: 0,
  15158. // askCount: 1,
  15159. // askTitle: "",
  15160. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15161. // },
  15162. // ],
  15163. // isShowTools: false,
  15164. // askCount: 1,
  15165. // isFold: 2,
  15166. // askTitle: "",
  15167. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15168. // checkJson: [{ checkCount: [], checkPerent: [] }],
  15169. // homeworkList: [],
  15170. // })
  15171. // }
  15172. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  15173. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15174. // _this.$forceUpdate();
  15175. // } else {
  15176. // for (var i = 0; i < dArray.length; i++) {
  15177. // let _task = dArray[i]
  15178. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15179. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  15180. // }else {
  15181. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  15182. // task: _task.task,
  15183. // taskDetail: "",
  15184. // taskDetail2: "",
  15185. // taskDetail3: _task.detail,
  15186. // chapterData: [],
  15187. // toolText: "",
  15188. // toolChoose: [
  15189. // {
  15190. // tool: [],
  15191. // toolDetail: "",
  15192. // toolType: 0,
  15193. // askCount: 1,
  15194. // askTitle: "",
  15195. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15196. // },
  15197. // ],
  15198. // isShowTools: false,
  15199. // askCount: 1,
  15200. // isFold: 2,
  15201. // askTitle: "",
  15202. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15203. // checkJson: [{ checkCount: [], checkPerent: [] }],
  15204. // homeworkList: [],
  15205. // }
  15206. // }
  15207. // }
  15208. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15209. // _this.$forceUpdate();
  15210. // }
  15211. // }
  15212. // // if (data.result) {
  15213. // // console.log(data.result);
  15214. // // let dArray = JSON.parse(data.result)
  15215. // // _this.teacherText = JSON.parse(data.result)
  15216. // // for (var i = 0; i < dArray.length; i++) {
  15217. // // let _task = dArray[i]
  15218. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  15219. // // }
  15220. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15221. // // _this.$forceUpdate();
  15222. // // }
  15223. // callback ? callback() : ''
  15224. // _this.loading = false
  15225. // }).catch(function (error) {
  15226. // _this.loading = false
  15227. // console.log(error);
  15228. // });
  15229. let parm = {
  15230. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  15231. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15232. session_name: uuidv4(),
  15233. userId: this.userid,
  15234. file_ids: fileid.length ? [...fileid] : '',
  15235. }
  15236. this.ajax
  15237. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  15238. .then((response) => {
  15239. console.log(response);
  15240. let data = response.data.FunctionResponse
  15241. if (data.message) {
  15242. console.log(data.message);
  15243. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15244. let dArray = []
  15245. try {
  15246. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15247. } catch (error) {
  15248. console.log("error_________________" + error);
  15249. try {
  15250. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15251. let match = data.message.match(regex);
  15252. dArray = JSON.parse(match[0]);
  15253. // var message = data.message;
  15254. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  15255. // var jsonEnd = message.indexOf("```", jsonStart);
  15256. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  15257. // dArray = JSON.parse(jsonString);
  15258. } catch (error) {
  15259. _this.aiGet4(messages, callback)
  15260. console.log("error_________________" + error);
  15261. return;
  15262. console.log("error_________________" + error);
  15263. _this.loading = false
  15264. }
  15265. }
  15266. try {
  15267. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  15268. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  15269. if(_this.panTeacher() > 0){
  15270. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15271. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  15272. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  15273. }
  15274. for (var i = 0; i < dArray.length; i++) {
  15275. let _task = dArray[i]
  15276. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15277. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  15278. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  15279. }else {
  15280. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15281. task: _task.task,
  15282. taskDetail: "",
  15283. taskDetail2: "",
  15284. taskDetail3: _task.detail,
  15285. chapterData: [],
  15286. toolText: "",
  15287. toolChoose: [
  15288. {
  15289. tool: [],
  15290. toolDetail: "",
  15291. toolType: 0,
  15292. askCount: 1,
  15293. askTitle: "",
  15294. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15295. },
  15296. ],
  15297. isShowTools: false,
  15298. askCount: 1,
  15299. isFold: 2,
  15300. askTitle: "",
  15301. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15302. checkJson: [{ checkCount: [], checkPerent: [] }],
  15303. homeworkList: [],
  15304. })
  15305. }
  15306. }
  15307. }else {
  15308. _this.unitJson[0].chapterInfo[0].taskJson = []
  15309. for (var i = 0; i < dArray.length; i++) {
  15310. let _task = dArray[i]
  15311. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15312. task: _task.task,
  15313. taskDetail: "",
  15314. taskDetail2: "",
  15315. taskDetail3: _task.detail,
  15316. chapterData: [],
  15317. toolText: "",
  15318. toolChoose: [
  15319. {
  15320. tool: [],
  15321. toolDetail: "",
  15322. toolType: 0,
  15323. askCount: 1,
  15324. askTitle: "",
  15325. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15326. },
  15327. ],
  15328. isShowTools: false,
  15329. askCount: 1,
  15330. isFold: 2,
  15331. askTitle: "",
  15332. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15333. checkJson: [{ checkCount: [], checkPerent: [] }],
  15334. homeworkList: [],
  15335. })
  15336. }
  15337. }
  15338. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  15339. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15340. _this.$forceUpdate();
  15341. } else {
  15342. for (var i = 0; i < dArray.length; i++) {
  15343. let _task = dArray[i]
  15344. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15345. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  15346. }else {
  15347. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  15348. task: _task.task,
  15349. taskDetail: "",
  15350. taskDetail2: "",
  15351. taskDetail3: _task.detail,
  15352. chapterData: [],
  15353. toolText: "",
  15354. toolChoose: [
  15355. {
  15356. tool: [],
  15357. toolDetail: "",
  15358. toolType: 0,
  15359. askCount: 1,
  15360. askTitle: "",
  15361. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15362. },
  15363. ],
  15364. isShowTools: false,
  15365. askCount: 1,
  15366. isFold: 2,
  15367. askTitle: "",
  15368. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15369. checkJson: [{ checkCount: [], checkPerent: [] }],
  15370. homeworkList: [],
  15371. }
  15372. }
  15373. }
  15374. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15375. _this.$forceUpdate();
  15376. }
  15377. } catch (error) {
  15378. _this.aiGet4(messages, callback)
  15379. console.log("error_________________" + error);
  15380. return;
  15381. // _this.loading = false
  15382. }
  15383. }
  15384. callback ? callback() : ''
  15385. })
  15386. .catch((error) => {
  15387. _this.loading = false
  15388. console.log(error);
  15389. });
  15390. },
  15391. async aiDetail(msg, index) {
  15392. let _this = this
  15393. const _tindex = 'task-' + index
  15394. const _tindex2 = index
  15395. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15396. if (_this.infoData.length) {
  15397. for (var i = 0; i < _this.infoData.length; i++) {
  15398. if(_this.infoData[i].fileid){
  15399. fileid.push(_this.infoData[i].fileid)
  15400. }else {
  15401. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15402. if(_fileid){
  15403. _this.infoData[i].fileid = _fileid
  15404. _this.$forceUpdate();
  15405. fileid.push(_fileid)
  15406. }
  15407. }
  15408. }
  15409. }
  15410. let url = []
  15411. if (this.infoData.length) {
  15412. for (var i = 0; i < this.infoData.length; i++) {
  15413. url.push(this.infoData[i].url)
  15414. }
  15415. }
  15416. let messages = `NOTICE
  15417. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  15418. 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.
  15419. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15420. Instruction: Based on the context, follow "Format example", write content.
  15421. #Context
  15422. ## 要求
  15423. ${msg}
  15424. ## 参考信息
  15425. 任务名称:${_this.aiCallBack.task}
  15426. ## 优化内容
  15427. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  15428. // -------- #补充参考资料和
  15429. // ## 补充参考资料
  15430. // - 补充资料:${url.join(",")}
  15431. // - 补充描述:${_this.courseText2}
  15432. _this.taskDetailLoading.push(_tindex)
  15433. _this.ttaskDetailLoading.push(_tindex)
  15434. let _uuid = uuidv4();
  15435. // let params = JSON.stringify({
  15436. // // "model": "Chat",
  15437. // model: 'gpt-3.5-turbo',
  15438. // temperature: 0,
  15439. // max_tokens: 4096,
  15440. // top_p: 1,
  15441. // frequency_penalty: 0,
  15442. // presence_penalty: 0,
  15443. // messages: [{
  15444. // content: messages,
  15445. // role: 'user'
  15446. // }],
  15447. // uid: _uuid,
  15448. // mind_map_question: "",
  15449. // })
  15450. let params = {
  15451. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15452. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15453. session_name: _uuid,
  15454. userId: _this.userid,
  15455. uid: _uuid,
  15456. file_ids: fileid.length ? [...fileid] : '',
  15457. }
  15458. // let params = JSON.stringify({
  15459. // message: {
  15460. // anthropic_version: "bedrock-2023-05-31",
  15461. // max_tokens: 4096,
  15462. // temperature: 0,
  15463. // top_p: 1,
  15464. // messages: [{
  15465. // "role": "user",
  15466. // "content": messages
  15467. // }] ,
  15468. // },
  15469. // uid: _uuid,
  15470. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15471. // });
  15472. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15473. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15474. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15475. console.log(response);
  15476. // let data = response.data.FunctionResponse
  15477. // if (data.choices && data.choices.length && data.choices[0].message) {
  15478. // console.log(data.choices[0].message.content);
  15479. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  15480. // _this.$forceUpdate()
  15481. // }
  15482. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15483. } else {
  15484. this.$message.warning(response.data.FunctionResponse.result);
  15485. }
  15486. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15487. }).catch(function (error) {
  15488. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15489. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  15490. console.log(error);
  15491. });
  15492. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  15493. },
  15494. aiDetailgetAiContent(_uid, loading, _tindex2) {
  15495. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15496. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15497. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15498. let _allText = "";
  15499. let _mdText = "";
  15500. let _iindex = 0
  15501. _source.onmessage = _e => {
  15502. let _eData = JSON.parse(_e.data).content;
  15503. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15504. //对话已经完成
  15505. _mdText = _mdText.replace("_", "");
  15506. _source.close();
  15507. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  15508. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  15509. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  15510. return;
  15511. } else {
  15512. _iindex++
  15513. //对话还在继续
  15514. let _text = "";
  15515. _text = _eData.replaceAll("'", "");
  15516. if (_allText == "") {
  15517. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15518. } else {
  15519. _allText += _text;
  15520. }
  15521. _mdText = _allText + "_";
  15522. _mdText = _mdText.replace(/\\n/g, "\n");
  15523. _mdText = _mdText.replace(/\\/g, "");
  15524. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15525. //转化返回的回复流数据.
  15526. if(_iindex == 10){
  15527. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  15528. _iindex = 0
  15529. }
  15530. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  15531. // 处理流数据
  15532. }
  15533. // this.$forceUpdate();
  15534. };
  15535. },
  15536. async aiOutlineDetail(msg, index) {
  15537. let _this = this
  15538. const _tindex = 'task-' + index
  15539. const _tindex2 = index
  15540. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15541. if (_this.infoData.length) {
  15542. for (var i = 0; i < _this.infoData.length; i++) {
  15543. if(_this.infoData[i].fileid){
  15544. fileid.push(_this.infoData[i].fileid)
  15545. }else {
  15546. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15547. if(_fileid){
  15548. _this.infoData[i].fileid = _fileid
  15549. _this.$forceUpdate();
  15550. fileid.push(_fileid)
  15551. }
  15552. }
  15553. }
  15554. }
  15555. let url = []
  15556. if (this.infoData.length) {
  15557. for (var i = 0; i < this.infoData.length; i++) {
  15558. url.push(this.infoData[i].url)
  15559. }
  15560. }
  15561. let messages = `NOTICE
  15562. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  15563. 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.
  15564. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15565. Instruction: Based on the context, follow "Format example", write content.
  15566. #Context
  15567. ## 要求
  15568. ${_this.aiJson.aiOutlineDetail}
  15569. ## 参考信息
  15570. 课程名字:${_this.courseName}
  15571. 任务名称:${_this.aiCallBack.task}
  15572. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  15573. # Format example
  15574. 教学目标:教学目标。
  15575. 任务设计:任务设计。
  15576. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  15577. `
  15578. // -------- #补充参考资料和
  15579. // ## 补充参考资料
  15580. // - 补充资料:${url.join(",")}
  15581. // - 补充描述:${_this.courseText2}
  15582. _this.taskDetailLoading.push(_tindex)
  15583. _this.ttaskDetailLoading.push(_tindex)
  15584. let _uuid = uuidv4();
  15585. // let params = JSON.stringify({
  15586. // // "model": "Chat",
  15587. // model: 'gpt-3.5-turbo',
  15588. // temperature: 0,
  15589. // max_tokens: 4096,
  15590. // top_p: 1,
  15591. // frequency_penalty: 0,
  15592. // presence_penalty: 0,
  15593. // messages: [{
  15594. // content: messages,
  15595. // role: 'user'
  15596. // }],
  15597. // uid: _uuid,
  15598. // mind_map_question: "",
  15599. // })
  15600. let params = {
  15601. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15602. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15603. session_name: _uuid,
  15604. userId: _this.userid,
  15605. uid: _uuid,
  15606. file_ids: fileid.length ? [...fileid] : '',
  15607. }
  15608. // let params = JSON.stringify({
  15609. // message: {
  15610. // anthropic_version: "bedrock-2023-05-31",
  15611. // max_tokens: 4096,
  15612. // temperature: 0,
  15613. // top_p: 1,
  15614. // messages: [{
  15615. // "role": "user",
  15616. // "content": messages
  15617. // }] ,
  15618. // },
  15619. // uid: _uuid,
  15620. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15621. // });
  15622. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15623. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15624. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15625. console.log(response);
  15626. // let data = response.data.FunctionResponse
  15627. // if (data.choices && data.choices.length && data.choices[0].message) {
  15628. // console.log(data.choices[0].message.content);
  15629. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  15630. // _this.$forceUpdate()
  15631. // }
  15632. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15633. } else {
  15634. this.$message.warning(response.data.FunctionResponse.result);
  15635. }
  15636. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15637. }).catch(function (error) {
  15638. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15639. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  15640. console.log(error);
  15641. });
  15642. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  15643. },
  15644. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  15645. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15646. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15647. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15648. let _allText = "";
  15649. let _mdText = "";
  15650. let _iindex = 0
  15651. _source.onmessage = _e => {
  15652. let _eData = JSON.parse(_e.data).content;
  15653. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15654. //对话已经完成
  15655. _mdText = _mdText.replace("_", "");
  15656. _source.close();
  15657. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  15658. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  15659. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  15660. return;
  15661. } else {
  15662. _iindex++
  15663. //对话还在继续
  15664. let _text = "";
  15665. _text = _eData.replaceAll("'", "");
  15666. if (_allText == "") {
  15667. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15668. } else {
  15669. _allText += _text;
  15670. }
  15671. _mdText = _allText + "_";
  15672. _mdText = _mdText.replace(/\\n/g, "\n");
  15673. _mdText = _mdText.replace(/\\/g, "");
  15674. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15675. //转化返回的回复流数据.
  15676. if(_iindex == 10){
  15677. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  15678. _iindex = 0
  15679. }
  15680. if(this.taskDetailLoading.indexOf(loading) !== -1){
  15681. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  15682. }
  15683. // 处理流数据
  15684. }
  15685. // this.$forceUpdate();
  15686. };
  15687. },
  15688. async aiDetail2(msg, index) {
  15689. let _this = this
  15690. const _tindex = 'task-' + index
  15691. const _tindex2 = index
  15692. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15693. if (_this.infoData.length) {
  15694. for (var i = 0; i < _this.infoData.length; i++) {
  15695. if(_this.infoData[i].fileid){
  15696. fileid.push(_this.infoData[i].fileid)
  15697. }else {
  15698. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15699. if(_fileid){
  15700. _this.infoData[i].fileid = _fileid
  15701. _this.$forceUpdate();
  15702. fileid.push(_fileid)
  15703. }
  15704. }
  15705. }
  15706. }
  15707. let messages = `NOTICE
  15708. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  15709. 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.
  15710. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15711. Instruction: Based on the context, follow "Format example", write content.
  15712. #Context
  15713. ## 要求
  15714. ${msg}
  15715. ## 参考资料
  15716. 任务名字: ${_this.aiCallBack.task}
  15717. ## 优化信息
  15718. ${_this.aiCallBack.taskDetail}
  15719. # Format example
  15720. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  15721. _this.taskDetailLoading2.push(_tindex)
  15722. _this.ttaskDetailLoading2.push(_tindex)
  15723. let _uuid = uuidv4();
  15724. // let params = JSON.stringify({
  15725. // // "model": "Chat",
  15726. // model: 'gpt-3.5-turbo',
  15727. // temperature: 0,
  15728. // max_tokens: 4096,
  15729. // top_p: 1,
  15730. // frequency_penalty: 0,
  15731. // presence_penalty: 0,
  15732. // messages: [{
  15733. // content: messages,
  15734. // role: 'user'
  15735. // }],
  15736. // uid: _uuid,
  15737. // mind_map_question: "",
  15738. // })
  15739. let params = {
  15740. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15741. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  15742. session_name: _uuid,
  15743. userId: _this.userid,
  15744. uid: _uuid,
  15745. file_ids: fileid.length ? [...fileid] : '',
  15746. }
  15747. // let params = JSON.stringify({
  15748. // message: {
  15749. // anthropic_version: "bedrock-2023-05-31",
  15750. // max_tokens: 4096,
  15751. // temperature: 0,
  15752. // top_p: 1,
  15753. // messages: [{
  15754. // "role": "user",
  15755. // "content": messages
  15756. // }] ,
  15757. // },
  15758. // uid: _uuid,
  15759. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15760. // });
  15761. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15762. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15763. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15764. console.log(response);
  15765. // let data = response.data.FunctionResponse
  15766. // if (data.choices && data.choices.length && data.choices[0].message) {
  15767. // console.log(data.choices[0].message.content);
  15768. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  15769. // _this.$forceUpdate()
  15770. // }
  15771. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15772. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15773. } else {
  15774. this.$message.warning(response.data.FunctionResponse.result);
  15775. }
  15776. }).catch(function (error) {
  15777. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  15778. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  15779. console.log(error);
  15780. });
  15781. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  15782. },
  15783. aiDetail2getAiContent(_uid, loading, _tindex2) {
  15784. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15785. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15786. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15787. let _allText = "";
  15788. let _mdText = "";
  15789. let _iindex = 0
  15790. _source.onmessage = _e => {
  15791. let _eData = JSON.parse(_e.data).content;
  15792. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15793. //对话已经完成
  15794. _mdText = _mdText.replace("_", "");
  15795. _source.close();
  15796. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  15797. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  15798. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  15799. return;
  15800. } else {
  15801. _iindex++
  15802. //对话还在继续
  15803. let _text = "";
  15804. _text = _eData.replaceAll("'", "");
  15805. if (_allText == "") {
  15806. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15807. } else {
  15808. _allText += _text;
  15809. }
  15810. _mdText = _allText + "_";
  15811. _mdText = _mdText.replace(/\\n/g, "\n");
  15812. _mdText = _mdText.replace(/\\/g, "");
  15813. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15814. //转化返回的回复流数据
  15815. if(_iindex == 10){
  15816. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  15817. _iindex = 0
  15818. }
  15819. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  15820. // 处理流数据
  15821. }
  15822. // this.$forceUpdate();
  15823. };
  15824. },
  15825. async aiDetail3(msg, index, tindex) {
  15826. let _this = this
  15827. const _tindex = 'task-' + index + tindex
  15828. const _tindex2 = index
  15829. const _tindex3 = tindex
  15830. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15831. if (_this.infoData.length) {
  15832. for (var i = 0; i < _this.infoData.length; i++) {
  15833. if(_this.infoData[i].fileid){
  15834. fileid.push(_this.infoData[i].fileid)
  15835. }else {
  15836. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15837. if(_fileid){
  15838. _this.infoData[i].fileid = _fileid
  15839. _this.$forceUpdate();
  15840. fileid.push(_fileid)
  15841. }
  15842. }
  15843. }
  15844. }
  15845. // **重点考虑该任务及工具名和工具内容的情况下*
  15846. let messages = `NOTICE
  15847. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  15848. 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.
  15849. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15850. Instruction: Based on the context, follow "Format example", write content.
  15851. #Context
  15852. ## 参考内容
  15853. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  15854. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  15855. 工具名称:${_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 : '无'}
  15856. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  15857. ## 要求
  15858. ${msg} 输出格式和内容要求参考#格式与要求
  15859. # Format example
  15860. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  15861. _this.taskDetailLoading3.push(_tindex)
  15862. _this.ttaskDetailLoading3.push(_tindex)
  15863. let _uuid = uuidv4();
  15864. // let params = JSON.stringify({
  15865. // // "model": "Chat",
  15866. // model: 'gpt-3.5-turbo',
  15867. // temperature: 0,
  15868. // max_tokens: 4096,
  15869. // top_p: 1,
  15870. // frequency_penalty: 0,
  15871. // presence_penalty: 0,
  15872. // messages: [{
  15873. // content: messages,
  15874. // role: 'user'
  15875. // }],
  15876. // uid: _uuid,
  15877. // mind_map_question: "",
  15878. // })
  15879. let params = {
  15880. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15881. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15882. session_name: _uuid,
  15883. userId: _this.userid,
  15884. uid: _uuid,
  15885. file_ids: fileid.length ? [...fileid] : '',
  15886. }
  15887. // let params = JSON.stringify({
  15888. // message: {
  15889. // anthropic_version: "bedrock-2023-05-31",
  15890. // max_tokens: 4096,
  15891. // temperature: 0,
  15892. // top_p: 1,
  15893. // messages: [{
  15894. // "role": "user",
  15895. // "content": messages
  15896. // }] ,
  15897. // },
  15898. // uid: _uuid,
  15899. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15900. // });
  15901. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15902. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15903. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15904. console.log(response);
  15905. let data = response.data.FunctionResponse
  15906. // if (data.choices && data.choices.length && data.choices[0].message) {
  15907. // console.log(data.choices[0].message.content);
  15908. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  15909. // _this.$forceUpdate()
  15910. // }
  15911. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  15912. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15913. } else {
  15914. this.$message.warning(response.data.FunctionResponse.result);
  15915. }
  15916. }).catch(function (error) {
  15917. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  15918. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  15919. console.log(error);
  15920. });
  15921. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  15922. },
  15923. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  15924. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15925. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15926. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15927. let _allText = "";
  15928. let _mdText = "";
  15929. let _iindex = 0
  15930. _source.onmessage = _e => {
  15931. let _eData = JSON.parse(_e.data).content;
  15932. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15933. //对话已经完成
  15934. _mdText = _mdText.replace("_", "");
  15935. _source.close();
  15936. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  15937. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  15938. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  15939. return;
  15940. } else {
  15941. _iindex++
  15942. //对话还在继续
  15943. let _text = "";
  15944. _text = _eData.replaceAll("'", "");
  15945. if (_allText == "") {
  15946. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15947. } else {
  15948. _allText += _text;
  15949. }
  15950. _mdText = _allText + "_";
  15951. _mdText = _mdText.replace(/\\n/g, "\n");
  15952. _mdText = _mdText.replace(/\\/g, "");
  15953. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15954. //转化返回的回复流数据
  15955. if(_iindex == 10){
  15956. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  15957. _iindex = 0
  15958. }
  15959. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  15960. // 处理流数据
  15961. }
  15962. // this.$forceUpdate();
  15963. };
  15964. },
  15965. async aiDetail4(msg, index) {
  15966. if (!msg.length) {
  15967. this.$message.error("请添加评价后才能优化")
  15968. return
  15969. }
  15970. let _this = this
  15971. const _tindex = 'task-' + index
  15972. const _tindex2 = index
  15973. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15974. if (_this.infoData.length) {
  15975. for (var i = 0; i < _this.infoData.length; i++) {
  15976. if(_this.infoData[i].fileid){
  15977. fileid.push(_this.infoData[i].fileid)
  15978. }else {
  15979. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15980. if(_fileid){
  15981. _this.infoData[i].fileid = _fileid
  15982. _this.$forceUpdate();
  15983. fileid.push(_fileid)
  15984. }
  15985. }
  15986. }
  15987. }
  15988. var _text = ""
  15989. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  15990. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  15991. }
  15992. // **重点考虑该任务详情**
  15993. let messages = `
  15994. 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.
  15995. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  15996. #Context
  15997. ## 参考内容
  15998. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  15999. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  16000. 评价设计:${_text}
  16001. ## 要求
  16002. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  16003. # 格式与要求
  16004. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16005. # Format example
  16006. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  16007. _this.taskDetailLoading4.push(_tindex)
  16008. // let params = JSON.stringify({
  16009. // // "model": "Chat",
  16010. // model: 'gpt-3.5-turbo',
  16011. // temperature: 0,
  16012. // max_tokens: 4096,
  16013. // top_p: 1,
  16014. // frequency_penalty: 0,
  16015. // presence_penalty: 0,
  16016. // messages: [{
  16017. // content: messages,
  16018. // role: 'user'
  16019. // }],
  16020. // stream: false,
  16021. // uid: this.userid,
  16022. // mind_map_question: "",
  16023. // })
  16024. let params = {
  16025. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16026. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16027. session_name: uuidv4(),
  16028. userId: _this.userid,
  16029. file_ids: fileid.length ? [...fileid] : '',
  16030. }
  16031. // let params = JSON.stringify({
  16032. // message: {
  16033. // anthropic_version: "bedrock-2023-05-31",
  16034. // max_tokens: 4096,
  16035. // temperature: 0,
  16036. // top_p: 1,
  16037. // messages: [{
  16038. // content: messages,
  16039. // role: 'user'
  16040. // }], //
  16041. // },
  16042. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16043. // });
  16044. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16045. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  16046. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16047. console.log(response);
  16048. let data = response.data.FunctionResponse
  16049. // if (data.choices && data.choices.length && data.choices[0].message) {
  16050. // console.log(data.choices[0].message.content);
  16051. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  16052. // _this.$forceUpdate()
  16053. // }
  16054. if (data.message) {
  16055. console.log(data.message);
  16056. try {
  16057. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  16058. } catch (e) {
  16059. console.log("error_________________" + e);
  16060. // _this.$message.error(data.message)
  16061. try {
  16062. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16063. let match = data.message.match(regex);
  16064. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  16065. // var message = data.message;
  16066. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16067. // var jsonEnd = message.indexOf("```", jsonStart);
  16068. // if (jsonStart !== -1 && jsonEnd !== -1) {
  16069. // var jsonString = message
  16070. // .substring(jsonStart, jsonEnd)
  16071. // .trim();
  16072. // var _data2 = JSON.parse(jsonString);
  16073. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  16074. // }
  16075. } catch (error) {
  16076. }
  16077. }
  16078. _this.$forceUpdate()
  16079. }
  16080. // if (data.result) {
  16081. // console.log(data.result);
  16082. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  16083. // _this.$forceUpdate()
  16084. // }
  16085. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  16086. }).catch(function (error) {
  16087. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  16088. console.log(error);
  16089. });
  16090. },
  16091. async aiDetail5(msg, index) {
  16092. let _this = this
  16093. const _tindex = 'task-' + index
  16094. const _tindex2 = index
  16095. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16096. if (_this.infoData.length) {
  16097. for (var i = 0; i < _this.infoData.length; i++) {
  16098. if(_this.infoData[i].fileid){
  16099. fileid.push(_this.infoData[i].fileid)
  16100. }else {
  16101. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16102. if(_fileid){
  16103. _this.infoData[i].fileid = _fileid
  16104. _this.$forceUpdate();
  16105. fileid.push(_fileid)
  16106. }
  16107. }
  16108. }
  16109. }
  16110. let url = []
  16111. if (this.infoData.length) {
  16112. for (var i = 0; i < this.infoData.length; i++) {
  16113. url.push(this.infoData[i].url)
  16114. }
  16115. }
  16116. var _text = ""
  16117. var _text2 = ""
  16118. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16119. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16120. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16121. }
  16122. let messages = `
  16123. 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.
  16124. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  16125. --------
  16126. ## 要求
  16127. ${msg}
  16128. -------
  16129. ## 本教案描述
  16130. ${_this.aiCallBack}
  16131. -------
  16132. ## 课程大纲
  16133. ${_text}
  16134. -------
  16135. ## 其他教学任务教案
  16136. ${_text2}`
  16137. // ## 补充参考资料
  16138. // - 补充资料:${url.join(",")}
  16139. // - 补充描述:${this.courseText2}
  16140. _this.taskDetailLoading5.push(_tindex)
  16141. _this.ttaskDetailLoading5.push(_tindex)
  16142. let _uuid = uuidv4();
  16143. // let params = JSON.stringify({
  16144. // // "model": "Chat",
  16145. // model: 'gpt-3.5-turbo',
  16146. // temperature: 0,
  16147. // max_tokens: 4096,
  16148. // top_p: 1,
  16149. // frequency_penalty: 0,
  16150. // presence_penalty: 0,
  16151. // messages: [{
  16152. // content: messages,
  16153. // role: 'user'
  16154. // }],
  16155. // uid: _uuid,
  16156. // mind_map_question: "",
  16157. // })
  16158. let params = {
  16159. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16160. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16161. session_name: _uuid,
  16162. userId: _this.userid,
  16163. uid: _uuid,
  16164. file_ids: fileid.length ? [...fileid] : '',
  16165. }
  16166. // let params = JSON.stringify({
  16167. // message: {
  16168. // anthropic_version: "bedrock-2023-05-31",
  16169. // max_tokens: 4096,
  16170. // temperature: 0,
  16171. // top_p: 1,
  16172. // messages: [{
  16173. // "role": "user",
  16174. // "content": messages
  16175. // }] ,
  16176. // },
  16177. // uid: _uuid,
  16178. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16179. // });
  16180. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16181. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  16182. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16183. console.log(response);
  16184. // let data = response.data.FunctionResponse
  16185. // if (data.choices && data.choices.length && data.choices[0].message) {
  16186. // console.log(data.choices[0].message.content);
  16187. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  16188. // _this.$forceUpdate()
  16189. // }
  16190. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  16191. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16192. } else {
  16193. this.$message.warning(response.data.FunctionResponse.result);
  16194. }
  16195. }).catch(function (error) {
  16196. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  16197. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  16198. console.log(error);
  16199. });
  16200. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  16201. },
  16202. aiDetail5getAiContent(_uid, loading, _tindex2) {
  16203. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16204. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16205. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16206. let _allText = "";
  16207. let _mdText = "";
  16208. let _iindex = 0
  16209. _source.onmessage = _e => {
  16210. let _eData = JSON.parse(_e.data).content;
  16211. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16212. //对话已经完成
  16213. _mdText = _mdText.replace("_", "");
  16214. _source.close();
  16215. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  16216. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16217. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  16218. return;
  16219. } else {
  16220. _iindex++
  16221. //对话还在继续
  16222. let _text = "";
  16223. _text = _eData.replaceAll("'", "");
  16224. if (_allText == "") {
  16225. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16226. } else {
  16227. _allText += _text;
  16228. }
  16229. _mdText = _allText + "_";
  16230. _mdText = _mdText.replace(/\\n/g, "\n");
  16231. _mdText = _mdText.replace(/\\/g, "");
  16232. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16233. //转化返回的回复流数据
  16234. if(_iindex == 10){
  16235. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  16236. _iindex = 0
  16237. }
  16238. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  16239. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16240. }
  16241. // 处理流数据
  16242. }
  16243. // this.$forceUpdate();
  16244. };
  16245. },
  16246. async aiDetail52(msg, index) {
  16247. let _this = this
  16248. const _tindex = 'task-' + index
  16249. const _tindex2 = index
  16250. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16251. if (_this.infoData.length) {
  16252. for (var i = 0; i < _this.infoData.length; i++) {
  16253. if(_this.infoData[i].fileid){
  16254. fileid.push(_this.infoData[i].fileid)
  16255. }else {
  16256. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16257. if(_fileid){
  16258. _this.infoData[i].fileid = _fileid
  16259. _this.$forceUpdate();
  16260. fileid.push(_fileid)
  16261. }
  16262. }
  16263. }
  16264. }
  16265. let url = []
  16266. if (this.infoData.length) {
  16267. for (var i = 0; i < this.infoData.length; i++) {
  16268. url.push(this.infoData[i].url)
  16269. }
  16270. }
  16271. let messages = `NOTICE
  16272. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16273. 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.
  16274. #Context
  16275. ## 要求
  16276. ${msg}
  16277. ## 补充描述
  16278. 课程简要描述:${_this.courseText}
  16279. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  16280. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}`
  16281. // ## 补充参考资料
  16282. // - 补充资料:${url.join(",")}
  16283. // - 补充描述:${this.courseText2}
  16284. _this.taskDetailLoading5.push(_tindex)
  16285. _this.ttaskDetailLoading5.push(_tindex)
  16286. let _uuid = uuidv4();
  16287. // let params = JSON.stringify({
  16288. // // "model": "Chat",
  16289. // model: 'gpt-3.5-turbo',
  16290. // temperature: 0,
  16291. // max_tokens: 4096,
  16292. // top_p: 1,
  16293. // frequency_penalty: 0,
  16294. // presence_penalty: 0,
  16295. // messages: [{
  16296. // content: messages,
  16297. // role: 'user'
  16298. // }],
  16299. // uid: _uuid,
  16300. // mind_map_question: "",
  16301. // })
  16302. let params = {
  16303. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16304. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16305. session_name: _uuid,
  16306. userId: _this.userid,
  16307. uid: _uuid,
  16308. file_ids: fileid.length ? [...fileid] : '',
  16309. }
  16310. // let params = JSON.stringify({
  16311. // message: {
  16312. // anthropic_version: "bedrock-2023-05-31",
  16313. // max_tokens: 4096,
  16314. // temperature: 0,
  16315. // top_p: 1,
  16316. // messages: [{
  16317. // "role": "user",
  16318. // "content": messages
  16319. // }] ,
  16320. // },
  16321. // uid: _uuid,
  16322. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16323. // });
  16324. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16325. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  16326. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16327. console.log(response);
  16328. // let data = response.data.FunctionResponse
  16329. // if (data.choices && data.choices.length && data.choices[0].message) {
  16330. // console.log(data.choices[0].message.content);
  16331. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  16332. // _this.$forceUpdate()
  16333. // }
  16334. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  16335. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16336. } else {
  16337. this.$message.warning(response.data.FunctionResponse.result);
  16338. }
  16339. }).catch(function (error) {
  16340. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  16341. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  16342. console.log(error);
  16343. });
  16344. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  16345. },
  16346. aiDetail52getAiContent(_uid, loading, _tindex2) {
  16347. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16348. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16349. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16350. let _allText = "";
  16351. let _mdText = "";
  16352. this.allTextArray[_tindex2] = ""
  16353. let _iindex = 0
  16354. _source.onmessage = async (_e) => {
  16355. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  16356. let _eData = JSON.parse(_e.data).content;
  16357. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16358. //对话已经完成
  16359. _mdText = _mdText.replace("_", "");
  16360. _source.close();
  16361. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  16362. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16363. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  16364. return;
  16365. } else {
  16366. _iindex++
  16367. //对话还在继续
  16368. let _text = "";
  16369. _text = _eData.replaceAll("'", "");
  16370. if (_allText == "") {
  16371. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16372. } else {
  16373. _allText += _text;
  16374. }
  16375. _mdText = _allText + "_";
  16376. _mdText = _mdText.replace(/\\n/g, "\n");
  16377. _mdText = _mdText.replace(/\\/g, "");
  16378. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16379. //转化返回的回复流数据
  16380. if(_iindex == 10){
  16381. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  16382. _iindex = 0
  16383. }
  16384. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  16385. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16386. }
  16387. // 处理流数据
  16388. }
  16389. };
  16390. },
  16391. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  16392. let _mdText = "";
  16393. let _eData = JSON.parse(_e.data).content;
  16394. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16395. //对话已经完成
  16396. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  16397. _source.close();
  16398. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16399. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  16400. return;
  16401. } else {
  16402. //对话还在继续
  16403. let _text = "";
  16404. _text = _eData.replaceAll("'", "");
  16405. if (this.allTextArray[_tindex2] == "") {
  16406. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16407. } else {
  16408. this.allTextArray[_tindex2] += _text;
  16409. }
  16410. _mdText = this.allTextArray[_tindex2] + "_";
  16411. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  16412. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  16413. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  16414. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  16415. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  16416. // 处理流数据
  16417. }
  16418. },
  16419. async aiCpote(msg, callback) {
  16420. let _this = this
  16421. let _index = _this.aitype.replace("aiC","c")
  16422. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16423. if (_this.infoData.length) {
  16424. for (var i = 0; i < _this.infoData.length; i++) {
  16425. if(_this.infoData[i].fileid){
  16426. fileid.push(_this.infoData[i].fileid)
  16427. }else {
  16428. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16429. if(_fileid){
  16430. _this.infoData[i].fileid = _fileid
  16431. _this.$forceUpdate();
  16432. fileid.push(_fileid)
  16433. }
  16434. }
  16435. }
  16436. }
  16437. let sub = []
  16438. if (this.courseTypeId.length) {
  16439. for (var i = 0; i < this.courseTypeId.length; i++) {
  16440. let _sid = this.courseTypeId[i]
  16441. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16442. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16443. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16444. }
  16445. }
  16446. }
  16447. }
  16448. let mclass = []
  16449. if (this.courseTypeId.length) {
  16450. for (var i = 0; i < this.courseTypeId.length; i++) {
  16451. let _sid = this.courseTypeId[i]
  16452. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16453. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16454. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16455. }
  16456. }
  16457. }
  16458. }
  16459. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16460. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  16461. let messages = `NOTICE
  16462. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16463. 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.
  16464. ${msg}
  16465. ## 课程简介
  16466. 课程名字:${this.courseName}
  16467. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16468. ${sub.length ? '学科:' + sub.join(",") : ''}
  16469. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16470. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  16471. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  16472. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  16473. _this.cpoteLoading[_index] = true
  16474. _this.cpotetLoading[_index] = true
  16475. let _uuid = uuidv4();
  16476. // let params = JSON.stringify({
  16477. // // "model": "Chat",
  16478. // model: 'gpt-3.5-turbo',
  16479. // temperature: 0,
  16480. // max_tokens: 4096,
  16481. // top_p: 1,
  16482. // frequency_penalty: 0,
  16483. // presence_penalty: 0,
  16484. // messages: [{
  16485. // content: messages,
  16486. // role: 'user'
  16487. // }],
  16488. // uid: _uuid,
  16489. // mind_map_question: "",
  16490. // })
  16491. let params = {
  16492. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16493. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16494. session_name: _uuid,
  16495. userId: _this.userid,
  16496. uid: _uuid,
  16497. file_ids: fileid.length ? [...fileid] : '',
  16498. }
  16499. // let params = JSON.stringify({
  16500. // message: {
  16501. // anthropic_version: "bedrock-2023-05-31",
  16502. // max_tokens: 4096,
  16503. // temperature: 0,
  16504. // top_p: 1,
  16505. // messages: [{
  16506. // "role": "user",
  16507. // "content": messages
  16508. // }] ,
  16509. // },
  16510. // uid: _uuid,
  16511. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16512. // });
  16513. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16514. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  16515. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16516. console.log(response);
  16517. // let data = response.data.FunctionResponse
  16518. // if (data.choices && data.choices.length && data.choices[0].message) {
  16519. // console.log(data.choices[0].message.content);
  16520. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  16521. // _this.$forceUpdate()
  16522. // }
  16523. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  16524. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16525. } else {
  16526. this.$message.warning(response.data.FunctionResponse.result);
  16527. }
  16528. }).catch(function (error) {
  16529. _this.cpoteLoading[_index] = false
  16530. _this.cpotetLoading[_index] = false
  16531. callback ? callback() : ''
  16532. console.log(error);
  16533. });
  16534. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  16535. },
  16536. aiCpotegetAiContent(_uid, loading, callback) {
  16537. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16538. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16539. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16540. let _allText = "";
  16541. let _mdText = "";
  16542. let _iindex = 0
  16543. _source.onmessage = _e => {
  16544. let _eData = JSON.parse(_e.data).content;
  16545. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16546. //对话已经完成
  16547. _mdText = _mdText.replace("_", "");
  16548. _source.close();
  16549. this.cpote[loading] = _mdText;
  16550. this.cpoteLoading[loading] = false
  16551. this.cpotetLoading[loading] = false
  16552. callback ? callback() : ''
  16553. return;
  16554. } else {
  16555. _iindex++
  16556. //对话还在继续
  16557. let _text = "";
  16558. _text = _eData.replaceAll("'", "");
  16559. if (_allText == "") {
  16560. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16561. } else {
  16562. _allText += _text;
  16563. }
  16564. _mdText = _allText + "_";
  16565. _mdText = _mdText.replace(/\\n/g, "\n");
  16566. _mdText = _mdText.replace(/\\/g, "");
  16567. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16568. //转化返回的回复流数据
  16569. if(_iindex == 10){
  16570. this.cpote[loading] = _mdText;
  16571. _iindex = 0
  16572. }
  16573. this.cpoteLoading[loading] = false
  16574. // 处理流数据
  16575. }
  16576. // this.$forceUpdate();
  16577. };
  16578. },
  16579. createFileid(url) {
  16580. let _this = this
  16581. return new Promise((resolve, reject) => {
  16582. try {
  16583. _this.ajax
  16584. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  16585. url: url,
  16586. })
  16587. .then((res) => {
  16588. let _data = res.data.FunctionResponse;
  16589. if (_data.result && _data.result.id) {
  16590. resolve(_data.result.id)
  16591. }
  16592. }).catch(function (error) {
  16593. resolve('')
  16594. });
  16595. }catch (e){
  16596. resolve()
  16597. }
  16598. });
  16599. }
  16600. },
  16601. beforeDestroy() {
  16602. clearTimeout(this.timer);
  16603. this.timer = null;
  16604. clearInterval(this.timer2);
  16605. this.timer2 = null;
  16606. clearInterval(this.pasteTimer);
  16607. this.pasteTimer = null;
  16608. },
  16609. beforeRouteLeave(to, from, next) {
  16610. clearTimeout(this.timer);
  16611. this.timer = null;
  16612. clearInterval(this.timer2);
  16613. this.timer2 = null;
  16614. clearInterval(this.pasteTimer);
  16615. this.pasteTimer = null;
  16616. next();
  16617. },
  16618. created() {
  16619. this.getStudent();
  16620. this.getTeacher();
  16621. this.getClass();
  16622. this.selectGrage();
  16623. this.getTemplate();
  16624. this.getTipsTemplate();
  16625. // this.selectType();
  16626. this.selectEva();
  16627. if(this.istemplate == 1){
  16628. this.isOutline = true
  16629. this.isOutline2 = true
  16630. }
  16631. this.loading = false;
  16632. this.timer2 = setInterval(() => {
  16633. this.selectEva();
  16634. }, 5000);
  16635. this.pasteTimer = setInterval(() => {
  16636. this.getPaste();
  16637. }, 1000);
  16638. setTimeout(() => {
  16639. // this.selectAllType();
  16640. this.selectCourseDetail();
  16641. }, 500);
  16642. let _this = this;
  16643. window.pasteStage = function (json) {
  16644. _this.pasteStage(json);
  16645. };
  16646. window.pasteTask = function (json) {
  16647. _this.pasteTask(json);
  16648. };
  16649. },
  16650. };
  16651. </script>
  16652. <style scoped>
  16653. @media screen and (max-width: 1280px) {
  16654. .mbCss {
  16655. flex-direction: column !important;
  16656. }
  16657. .pjCss {
  16658. width: 100% !important;
  16659. }
  16660. .evaCss {
  16661. width: 100% !important;
  16662. margin-top: 10px;
  16663. }
  16664. }
  16665. .el-table>>>.even_row {
  16666. background-color: #f1f1f1 !important;
  16667. }
  16668. .dialog_diy>>>.el-dialog__header {
  16669. background: #3c3c3c !important;
  16670. padding: 15px 20px;
  16671. }
  16672. .dialog_diy>>>.el-dialog__title {
  16673. color: #fff;
  16674. }
  16675. .dialog_diy>>>.el-dialog__headerbtn {
  16676. top: 19px;
  16677. }
  16678. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  16679. color: #fff;
  16680. }
  16681. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  16682. color: #fff;
  16683. }
  16684. .dialog_diy>>>.el-dialog__body,
  16685. .dialog_diy>>>.el-dialog__footer {
  16686. background: #fafafa;
  16687. }
  16688. .dialog_diy3>>>.el-dialog__body,
  16689. .dialog_diy3>>>.el-dialog__footer {
  16690. background: #eee !important;
  16691. }
  16692. .dialog_diy3>>>.el-dialog__body {
  16693. padding: 20px 20px;
  16694. }
  16695. .dialog_diyStage>>>.el-dialog__body {
  16696. padding: 10px;
  16697. }
  16698. .source_diy>>>.el-dialog {
  16699. height: 100% !important;
  16700. margin: 0 auto !important;
  16701. }
  16702. .source_diy>>>.el-dialog__body {
  16703. height: calc(100% - 185px);
  16704. overflow: auto;
  16705. background: #e6eaf0;
  16706. }
  16707. .source_diy>>>.el-dialog__footer {
  16708. background: #e6eaf0 !important;
  16709. }
  16710. .left {
  16711. border-right: 1px solid rgb(60, 94, 143);
  16712. display: flex;
  16713. flex-direction: column;
  16714. align-items: center;
  16715. min-height: 600px;
  16716. width: 385px;
  16717. height: 80%;
  16718. }
  16719. .tips {
  16720. color: rgb(128, 128, 128);
  16721. font-size: 12px;
  16722. width: 270px;
  16723. margin: 40px;
  16724. }
  16725. .pb_content {
  16726. height: 100% !important;
  16727. /* margin: 0 20px 0 20px; */
  16728. }
  16729. .pb_content_body {
  16730. width: 100% !important;
  16731. height: 100%;
  16732. display: flex;
  16733. }
  16734. .info_solid {
  16735. width: 270px;
  16736. height: 30px;
  16737. border-left: 1px solid #bdbdbd;
  16738. margin: 10px 0px 10px 30px;
  16739. }
  16740. .info_steps {
  16741. width: 270px;
  16742. font-size: 0.875rem;
  16743. display: flex;
  16744. align-items: center;
  16745. }
  16746. .info_steps span:nth-child(1) {
  16747. width: 30px;
  16748. height: 30px;
  16749. background: rgba(0, 0, 0, 0.38);
  16750. display: block;
  16751. color: #fff;
  16752. border-radius: 40px;
  16753. text-align: center;
  16754. line-height: 30px;
  16755. }
  16756. .steps_active {
  16757. background: #3d67bc !important;
  16758. }
  16759. .info_steps span:nth-child(2) {
  16760. margin-left: 5px;
  16761. }
  16762. .right {
  16763. height: 100%;
  16764. width: 100%;
  16765. display: flex;
  16766. overflow: hidden;
  16767. flex-direction: column;
  16768. }
  16769. .leftBar{
  16770. width: 290px;
  16771. height: calc(100% - 50px);
  16772. overflow: auto;
  16773. border-radius: 5px;
  16774. margin: 25px auto;
  16775. box-sizing: border-box;
  16776. margin-right: 10px;
  16777. }
  16778. .basic_box {
  16779. margin: 0 auto;
  16780. position: relative;
  16781. padding: 0 20px 0 20px;
  16782. }
  16783. .basic_box_success {
  16784. width: 100%;
  16785. min-height: 455px;
  16786. padding: 50px 0;
  16787. position: relative;
  16788. text-align: center;
  16789. border-bottom: 1px solid #bfbfbf;
  16790. box-sizing: border-box;
  16791. display: flex;
  16792. align-items: center;
  16793. flex-direction: column;
  16794. justify-content: center;
  16795. }
  16796. .info_title {
  16797. font-size: 1.5em;
  16798. margin-right: 25px;
  16799. /* margin: 20px 30px 20px 30px; */
  16800. }
  16801. .bInfo_title {
  16802. text-align: left;
  16803. margin: 10px 0;
  16804. }
  16805. .small_title {
  16806. font-size: 14px;
  16807. line-height: 40px;
  16808. }
  16809. .chapter_beizhu {
  16810. font-size: 12px;
  16811. font-weight: bold;
  16812. float: right;
  16813. color: rgb(128, 128, 128);
  16814. margin-top: 5px;
  16815. }
  16816. .chapter_uploadBox1 {
  16817. text-align: left;
  16818. background-color: rgb(242, 242, 242);
  16819. width: 100%;
  16820. height: 67px;
  16821. padding: 0px 15px;
  16822. border-radius: 8px;
  16823. overflow: hidden;
  16824. font-size: 16px;
  16825. box-sizing: border-box;
  16826. position: relative;
  16827. }
  16828. .chapter_add {
  16829. width: 100%;
  16830. height: 32px;
  16831. margin-top: 15px;
  16832. cursor: pointer;
  16833. }
  16834. .chapter_add_l {
  16835. margin-left: 5px;
  16836. width: 30px;
  16837. height: 30px;
  16838. float: left;
  16839. border: 1px solid #aaa;
  16840. color: #aaa;
  16841. border-radius: 50%;
  16842. font-size: 25px;
  16843. text-align: center;
  16844. }
  16845. .chapter_add_r {
  16846. font-size: 18px;
  16847. height: 40px;
  16848. line-height: 30px;
  16849. text-indent: 10px;
  16850. color: #aaa;
  16851. }
  16852. .chapter_add_r span {
  16853. font-size: 12px;
  16854. color: rgb(204, 204, 204);
  16855. }
  16856. .chapter_add_input {
  16857. display: none;
  16858. }
  16859. .line {
  16860. width: 85%;
  16861. margin: 0 auto;
  16862. border-top: 1px solid #e5e5e5;
  16863. margin-top: 20px;
  16864. }
  16865. .info_btnBox {
  16866. width: calc(100%);
  16867. display: flex;
  16868. justify-content: center;
  16869. height: 80px;
  16870. align-items: center;
  16871. background: #fff;
  16872. margin: 0 auto;
  16873. border-top: 2px solid rgb(228, 232, 237);
  16874. box-sizing: border-box;
  16875. }
  16876. .info_btnBox2 {
  16877. width: calc(100%);
  16878. display: flex;
  16879. justify-content: center;
  16880. height: 20px;
  16881. align-items: center;
  16882. background: #fff;
  16883. margin: 0 auto;
  16884. border-top: 2px solid rgb(228, 232, 237);
  16885. box-sizing: border-box;
  16886. overflow: hidden;
  16887. cursor: pointer;
  16888. }
  16889. .info_btnBox3 {
  16890. width: calc(100%);
  16891. display: flex;
  16892. justify-content: flex-end;
  16893. padding: 0 20px;
  16894. height: 60px;
  16895. align-items: center;
  16896. background: unset;
  16897. margin: 0 auto;
  16898. /* border-top: 1px solid rgb(228, 232, 237); */
  16899. box-sizing: border-box;
  16900. overflow: hidden;
  16901. cursor: pointer;
  16902. background: #fff;
  16903. border-radius: 10px;
  16904. }
  16905. .info_btn+.info_btn {
  16906. margin-left: 15px;
  16907. }
  16908. .info_btn,
  16909. .teacherWord {
  16910. color: #fff;
  16911. background-color: #0f7eff;
  16912. padding: 8px 24px;
  16913. font-size: 0.9375rem;
  16914. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  16915. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  16916. min-width: 64px;
  16917. font-weight: 500;
  16918. border-radius: 4px;
  16919. box-sizing: border-box;
  16920. border: none;
  16921. cursor: pointer;
  16922. }
  16923. .teacherWord {
  16924. width: 105px !important;
  16925. text-align: center !important;
  16926. line-height: 36px !important;
  16927. padding: 0 !important;
  16928. font-size: 14px !important;
  16929. margin: 10px 0 !important;
  16930. }
  16931. .template_box {
  16932. display: flex;
  16933. flex-wrap: wrap;
  16934. }
  16935. .wordTeacher {
  16936. display: flex;
  16937. flex-direction: column;
  16938. width: 100px;
  16939. height: 100px;
  16940. text-align: center;
  16941. font-size: 13px;
  16942. margin: 0 20px 20px 0;
  16943. background: #f0f4fa;
  16944. position: relative;
  16945. border-radius: 5px;
  16946. align-items: center;
  16947. justify-content: center;
  16948. border: 1px solid #cad1dc;
  16949. color: #0e1e33;
  16950. /* padding: 25px 0px; */
  16951. cursor: pointer;
  16952. }
  16953. .wordTeacher::after {
  16954. content: "";
  16955. display: block;
  16956. position: absolute;
  16957. width: 15px;
  16958. height: 15px;
  16959. right: 10px;
  16960. top: 10px;
  16961. background-image: url(../../../assets/icon/new/choose_a.png);
  16962. background-size: 100% 100%;
  16963. }
  16964. .wordTeacherA::after {
  16965. background-image: url(../../../assets/icon/new/choose_b.png);
  16966. }
  16967. .wordTeacher:nth-child(5n) {
  16968. margin-right: 0px;
  16969. }
  16970. .wordPic {
  16971. margin: 0 auto;
  16972. width: 30px;
  16973. height: 30px;
  16974. cursor: pointer;
  16975. }
  16976. .deleteWord {
  16977. width: 22px;
  16978. height: 22px;
  16979. position: absolute;
  16980. right: 5px;
  16981. top: -15px;
  16982. cursor: pointer;
  16983. display: none;
  16984. z-index: 999;
  16985. }
  16986. .wordPic>img,
  16987. .deleteWord>img,
  16988. .addToolImg>img {
  16989. width: 100%;
  16990. height: 100%;
  16991. }
  16992. .info_btn:hover {
  16993. background-color: #4f7cd5 !important;
  16994. }
  16995. .cru_selectBox {
  16996. display: flex;
  16997. margin: 15px 0;
  16998. flex-wrap: nowrap;
  16999. white-space: nowrap;
  17000. overflow: auto;
  17001. position: relative;
  17002. height: 40px;
  17003. max-width: calc(100% - 175px);
  17004. }
  17005. .cru_selectBox::-webkit-scrollbar {
  17006. /*滚动条整体样式*/
  17007. width: 6px;
  17008. /*高宽分别对应横竖滚动条的尺寸*/
  17009. height: 6px;
  17010. }
  17011. /*定义滚动条轨道 内阴影+圆角*/
  17012. .cru_selectBox::-webkit-scrollbar-track {
  17013. border-radius: 10px;
  17014. background-color: #eee;
  17015. }
  17016. /*定义滑块 内阴影+圆角*/
  17017. .cru_selectBox::-webkit-scrollbar-thumb {
  17018. border-radius: 10px;
  17019. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  17020. background-color: rgba(0, 0, 0, 0.1);
  17021. }
  17022. .cru_line {
  17023. position: absolute;
  17024. bottom: 0px;
  17025. transition: all 0.5s;
  17026. left: 0px;
  17027. width: 50px;
  17028. height: 4px;
  17029. left: 10px;
  17030. border-radius: 2px;
  17031. background: #3681fc;
  17032. }
  17033. .cru_select {
  17034. font-size: 18px;
  17035. margin-right: 20px;
  17036. margin-left: 5px;
  17037. cursor: pointer;
  17038. color: #0e1e33;
  17039. }
  17040. .cru_select:hover {
  17041. color: #3681fc !important;
  17042. }
  17043. .cru_selected {
  17044. color: #3681fc !important;
  17045. font-weight: bold;
  17046. }
  17047. .chapter_box {
  17048. margin-top: 10px;
  17049. width: 100%;
  17050. padding: 10px 20px;
  17051. background: #fff;
  17052. border-radius: 8px;
  17053. box-sizing: border-box;
  17054. }
  17055. .chapter_contentbox {
  17056. display: flex;
  17057. align-items: center;
  17058. /* margin-top: 15px; */
  17059. }
  17060. .chapter_contentbox .cc_title {
  17061. margin: 0px;
  17062. color: black;
  17063. display: block;
  17064. white-space: nowrap;
  17065. overflow: hidden;
  17066. text-overflow: ellipsis;
  17067. margin-right: 20px;
  17068. font-size: 18px;
  17069. height: 20px;
  17070. line-height: 22px;
  17071. min-width: fit-content;
  17072. display: flex;
  17073. }
  17074. .chapter_contentbox .cc_title::before {
  17075. content: "";
  17076. height: 100%;
  17077. width: 3px;
  17078. background: #3681fc;
  17079. border-radius: 3px;
  17080. opacity: 1;
  17081. display: block;
  17082. margin-right: 10px;
  17083. }
  17084. .chapter_contentbox .cc_input {
  17085. width: 100%;
  17086. display: flex;
  17087. }
  17088. .show_taskD {
  17089. min-width: fit-content;
  17090. margin-left: 10px;
  17091. display: flex;
  17092. align-items: center;
  17093. font-size: 14px;
  17094. cursor: pointer;
  17095. color: #717c8d;
  17096. }
  17097. .show_taskD>img {
  17098. width: 15px;
  17099. margin-right: 5px;
  17100. transition: 0.2s all;
  17101. transform: rotate(-90deg);
  17102. }
  17103. .show_taskD.show>img {
  17104. transform: rotate(0deg);
  17105. }
  17106. .show_toolD {
  17107. min-width: fit-content;
  17108. margin-left: 10px;
  17109. display: flex;
  17110. align-items: center;
  17111. font-size: 14px;
  17112. cursor: pointer;
  17113. color: #717c8d;
  17114. /* position: absolute;
  17115. right: 45px;
  17116. top: 5px; */
  17117. }
  17118. .show_toolD>img {
  17119. width: 15px;
  17120. margin-right: 5px;
  17121. transition: 0.2s all;
  17122. transform: rotate(-90deg);
  17123. }
  17124. .show_toolD.show>img {
  17125. transform: rotate(0deg);
  17126. }
  17127. .remove {
  17128. background-image: url("../../../assets/icon/new/delete_u.png");
  17129. cursor: pointer;
  17130. opacity: 0.5;
  17131. width: 30px;
  17132. min-width: 30px;
  17133. height: 30px;
  17134. background-size: 100% 100%;
  17135. background-repeat: no-repeat;
  17136. margin-left: 10px;
  17137. }
  17138. .remove1 {
  17139. background-image: url("../../../assets/remove1.png");
  17140. background-repeat: no-repeat;
  17141. background-position: 5px 10px;
  17142. width: 40px;
  17143. height: 50px;
  17144. cursor: pointer;
  17145. margin-left: 10px;
  17146. }
  17147. .binfo_input {
  17148. width: 100%;
  17149. margin: 0;
  17150. padding: 12px 14px;
  17151. display: block;
  17152. min-width: 0;
  17153. outline: none;
  17154. box-sizing: border-box;
  17155. background: none;
  17156. border: none;
  17157. border-radius: 4px;
  17158. background: #fff;
  17159. font-size: 16px;
  17160. resize: none;
  17161. font-family: "Microsoft YaHei";
  17162. min-height: 48px;
  17163. /* border: 1px solid #3682fc00; */
  17164. border: 1.5px solid #cad1dc;
  17165. }
  17166. .binfo_textarea {
  17167. border: 1.5px solid #cad1dc;
  17168. font-size: 16px;
  17169. resize: none;
  17170. /* background: #f6f6f6; */
  17171. font-family: "Microsoft YaHei";
  17172. }
  17173. .binfo_input:focus-visible {
  17174. border: 1.5px solid #3681fc !important;
  17175. }
  17176. .time {
  17177. display: flex;
  17178. margin: 35px 0 80px 0;
  17179. }
  17180. .chapter_btnbox {
  17181. width: 160px;
  17182. border-radius: 5px;
  17183. border: 2px dashed gray;
  17184. display: flex;
  17185. padding: 8px 50px;
  17186. align-items: center;
  17187. justify-content: center;
  17188. margin: 30px auto 0;
  17189. cursor: pointer;
  17190. }
  17191. .icon_add {
  17192. position: relative;
  17193. width: 24px;
  17194. padding-top: 20px;
  17195. border-radius: 100%;
  17196. border-width: 2px;
  17197. border-style: solid;
  17198. border-color: gray;
  17199. }
  17200. .icon_add i:nth-child(1) {
  17201. position: absolute;
  17202. left: 50%;
  17203. top: 50%;
  17204. height: 60%;
  17205. transform: translate(-50%, -50%);
  17206. border-width: 1px;
  17207. border-style: solid;
  17208. border-color: inherit;
  17209. }
  17210. .icon_add i:nth-child(2) {
  17211. position: absolute;
  17212. top: 50%;
  17213. left: 50%;
  17214. width: 60%;
  17215. transform: translate(-50%, -50%);
  17216. border-width: 1px;
  17217. border-style: solid;
  17218. border-color: inherit;
  17219. }
  17220. .chapter_btn_w {
  17221. font-size: 0.9375rem;
  17222. font-weight: bold;
  17223. color: gray;
  17224. margin-left: 20px;
  17225. }
  17226. .disUoloadSty>>>.el-icon-plus {
  17227. display: none !important;
  17228. /* 上传按钮隐藏 */
  17229. }
  17230. .imgLeft {
  17231. margin: 15px 0;
  17232. }
  17233. .add_info_box {
  17234. margin: 0 0 0 auto;
  17235. display: flex;
  17236. flex-wrap: wrap;
  17237. }
  17238. .add_info_box button {
  17239. margin: 0 5px 10px 0;
  17240. }
  17241. .add_info_box2 {
  17242. display: flex;
  17243. align-items: center;
  17244. flex-wrap: wrap;
  17245. }
  17246. .add_info_box2::after {
  17247. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  17248. color: red;
  17249. font-size: 14px;
  17250. margin-bottom: 10px;
  17251. }
  17252. .add_chapters_box {
  17253. text-align: left;
  17254. background-color: #fff;
  17255. width: 100%;
  17256. border-radius: 4px;
  17257. font-size: 16px;
  17258. box-sizing: border-box;
  17259. position: relative;
  17260. padding: 0 15px;
  17261. height: auto;
  17262. overflow-y: auto;
  17263. overflow-x: hidden;
  17264. border: 1px solid #cad1dc;
  17265. }
  17266. .add_chapters_box.add_c_none {
  17267. display: flex;
  17268. justify-content: center;
  17269. align-items: center;
  17270. padding: 15px;
  17271. }
  17272. .add_c_none>img {
  17273. width: 25px;
  17274. }
  17275. .add_chapters_box.add_c_none>span {
  17276. font-size: 14px;
  17277. font-weight: 400;
  17278. margin: 0 0 5px 5px;
  17279. }
  17280. .homework_box {
  17281. display: flex;
  17282. align-items: flex-start;
  17283. flex-wrap: wrap;
  17284. margin: 15px 0 0 0;
  17285. flex-direction: column;
  17286. align-content: flex-start;
  17287. }
  17288. .course_homework {
  17289. display: flex;
  17290. justify-content: center;
  17291. flex-direction: row;
  17292. align-items: center;
  17293. margin: 0 10px 0 0;
  17294. }
  17295. .course_homework>>>.el-input__inner {
  17296. width: 140px;
  17297. margin-left: 15px;
  17298. }
  17299. .chapter_upload_move {
  17300. position: relative;
  17301. background-color: #fff;
  17302. position: absolute;
  17303. width: 100%;
  17304. top: 0px;
  17305. left: 0px;
  17306. border: 1px solid #eee;
  17307. border-radius: 5px;
  17308. transition: width 2s;
  17309. -moz-transition: width 2s;
  17310. -webkit-transition: width 2s;
  17311. -o-transition: width 2s;
  17312. }
  17313. .chapter_upload_l_i {
  17314. background-image: url("../../../assets/icon.png");
  17315. background-position: 3px -165px;
  17316. width: 30px;
  17317. height: 30px;
  17318. margin: 10px auto 0 auto;
  17319. }
  17320. .course_input_box {
  17321. display: flex;
  17322. margin-right: 20px;
  17323. width: 100%;
  17324. align-items: center;
  17325. position: relative;
  17326. }
  17327. .course_input_box>.binfo_input {
  17328. width: calc(100% - 0 - 200px - 20px);
  17329. margin: 0 10px;
  17330. }
  17331. .bb_courseIcon {
  17332. width: 57px;
  17333. height: 45px;
  17334. background: #f0f4fa;
  17335. border-radius: 5px 0px 0px 5px;
  17336. display: flex;
  17337. align-items: center;
  17338. justify-content: center;
  17339. border-right: 1.5px solid rgb(202, 209, 220);
  17340. box-sizing: border-box;
  17341. position: absolute;
  17342. left: 1.5px;
  17343. }
  17344. .bb_courseIcon>img {
  17345. width: 25px;
  17346. height: auto;
  17347. }
  17348. .big_box {
  17349. /* margin-top: 20px; */
  17350. display: flex;
  17351. justify-content: space-between;
  17352. /* border-bottom: 1px solid #E0E2ED; */
  17353. }
  17354. .left_first {
  17355. display: flex;
  17356. flex-direction: column;
  17357. flex-wrap: nowrap;
  17358. width: calc(100% - 310px);
  17359. padding: 20px;
  17360. box-sizing: border-box;
  17361. background: #fff;
  17362. border-radius: 5px;
  17363. }
  17364. .right_first {
  17365. width: 300px;
  17366. display: flex;
  17367. align-items: center;
  17368. justify-content: center;
  17369. /* border-left: 1px solid #E0E2ED; */
  17370. box-sizing: border-box;
  17371. padding: 20px;
  17372. flex-direction: column;
  17373. background: #fff;
  17374. border-radius: 5px;
  17375. }
  17376. .ai_box {
  17377. width: 204px;
  17378. display: flex;
  17379. justify-content: flex-end;
  17380. margin-bottom: 15px;
  17381. }
  17382. .ai_content {
  17383. display: flex;
  17384. align-items: center;
  17385. font-size: 14px;
  17386. padding: 7px 20px;
  17387. box-sizing: border-box;
  17388. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  17389. border-radius: 12px;
  17390. font-weight: 700;
  17391. cursor: pointer;
  17392. }
  17393. .ai_content>img {
  17394. width: 40px;
  17395. margin-right: 5px;
  17396. }
  17397. .c_info_title {
  17398. padding: 15px 0 15px 0;
  17399. font-size: 16px;
  17400. font-weight: bold;
  17401. margin: 0 0 0 20px;
  17402. box-sizing: border-box;
  17403. display: flex;
  17404. align-items: center;
  17405. line-height: 20px;
  17406. }
  17407. .c_info_title::before {
  17408. content: "";
  17409. display: block;
  17410. width: 3px;
  17411. height: 20px;
  17412. background: #0061ff;
  17413. border-radius: 3px;
  17414. margin: 0 5px 0 0;
  17415. }
  17416. .right_title {
  17417. height: 30px;
  17418. padding: 15px 0 15px 20px;
  17419. border-bottom: 1px solid #f2f2f2;
  17420. font-size: 1.5em;
  17421. font-weight: bold;
  17422. color: #0f7eff;
  17423. margin: 0 auto;
  17424. }
  17425. .people {
  17426. border: 1px solid rgb(229 229 229);
  17427. /* height: 495px; */
  17428. height: 350px;
  17429. border-radius: 5px;
  17430. width: 100%;
  17431. overflow: auto;
  17432. }
  17433. .people_top {
  17434. display: flex;
  17435. width: 100%;
  17436. /* justify-content: space-between; */
  17437. /* align-items: center; */
  17438. flex-direction: column;
  17439. padding: 10px 10px 0;
  17440. box-sizing: border-box;
  17441. }
  17442. .people_nav,
  17443. .people_top_right {
  17444. /* padding: 20px 0 0 20px; */
  17445. }
  17446. .people_top_right {
  17447. height: 40px;
  17448. margin-bottom: 10px;
  17449. }
  17450. .people_search {
  17451. display: flex;
  17452. position: relative;
  17453. }
  17454. .people_search>>>.el-input__inner {
  17455. /* height: 25px; */
  17456. width: 100%;
  17457. }
  17458. .search_img {
  17459. width: 20px;
  17460. height: 20px;
  17461. position: absolute;
  17462. right: 10px;
  17463. top: 50%;
  17464. transform: translateY(-50%);
  17465. }
  17466. .search_img>img {
  17467. width: 100%;
  17468. height: 100%;
  17469. }
  17470. .people_name {
  17471. display: flex;
  17472. justify-content: flex-start;
  17473. padding: 20px 10px;
  17474. flex-direction: column;
  17475. flex-wrap: wrap;
  17476. }
  17477. .p_box {
  17478. position: relative;
  17479. }
  17480. .people_name>>>.el-checkbox {
  17481. width: 100%;
  17482. display: flex;
  17483. align-items: center;
  17484. margin-bottom: 10px;
  17485. }
  17486. .people_name>>>.el-checkbox__label {
  17487. text-overflow: ellipsis;
  17488. overflow: hidden;
  17489. width: calc(100%);
  17490. }
  17491. .people_name2>>>.el-checkbox__label {
  17492. width: calc(100% - 130px);
  17493. }
  17494. .inviteCode {
  17495. position: absolute;
  17496. right: 30px;
  17497. color: #237ade;
  17498. top: 0;
  17499. cursor: pointer;
  17500. font-size: 13px;
  17501. }
  17502. .noneInvite {
  17503. color: #a8a8a8;
  17504. }
  17505. .inviteImg {
  17506. position: absolute;
  17507. right: 5px;
  17508. top: 0;
  17509. width: 20px;
  17510. }
  17511. .right_img {
  17512. width: 150px;
  17513. height: 150px;
  17514. margin: 0 auto;
  17515. }
  17516. .right_img>img {
  17517. width: 100%;
  17518. height: 100%;
  17519. }
  17520. .number {
  17521. margin-top: 20px;
  17522. color: #4aa6ff;
  17523. text-decoration: underline;
  17524. }
  17525. .success_button {
  17526. display: flex;
  17527. text-align: center;
  17528. margin: 5% 0 auto;
  17529. flex-direction: row;
  17530. justify-content: center;
  17531. }
  17532. .look_course {
  17533. margin-right: 40px;
  17534. background: #3d67bc;
  17535. width: 200px;
  17536. height: 35px;
  17537. line-height: 35px;
  17538. color: #fff;
  17539. text-align: center;
  17540. font-size: 14px;
  17541. border-radius: 5px;
  17542. cursor: pointer;
  17543. }
  17544. .attend_others {
  17545. width: 250px;
  17546. background: #4fb13c;
  17547. height: 35px;
  17548. line-height: 35px;
  17549. color: #fff;
  17550. text-align: center;
  17551. font-size: 14px;
  17552. border-radius: 5px;
  17553. cursor: pointer;
  17554. }
  17555. .dialog_diy2>>>.el-dialog__body {
  17556. text-align: center;
  17557. }
  17558. .write_togother {
  17559. position: absolute;
  17560. right: 45px;
  17561. display: flex;
  17562. top: 5%;
  17563. }
  17564. .write_people {
  17565. font-size: 14px;
  17566. line-height: 50px;
  17567. padding-right: 10px;
  17568. }
  17569. .end_write {
  17570. background: #3d67bc;
  17571. color: #fff;
  17572. width: 100px;
  17573. height: 35px;
  17574. line-height: 35px;
  17575. text-align: center;
  17576. font-size: 14px;
  17577. border-radius: 5px;
  17578. cursor: pointer;
  17579. }
  17580. .chapter_upload+.chapter_upload {
  17581. /* margin-top: 15px; */
  17582. border-top: 1px solid #e7ebf1;
  17583. }
  17584. .chapter_upload {
  17585. height: 45px;
  17586. position: relative;
  17587. display: flex;
  17588. align-items: center;
  17589. width: 100%;
  17590. min-height: 45px;
  17591. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  17592. /* border-radius: 4px; */
  17593. /* overflow: hidden; */
  17594. box-sizing: border-box;
  17595. }
  17596. .chapter_upload_drag {
  17597. position: absolute;
  17598. cursor: pointer;
  17599. width: 16px;
  17600. height: 16px;
  17601. left: -9px;
  17602. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  17603. background-size: 100% 100%;
  17604. z-index: 10;
  17605. display: none;
  17606. }
  17607. .isNavStage>.chapter_upload_drag {
  17608. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  17609. }
  17610. .chapter_upload_t {
  17611. background-color: #fff;
  17612. position: absolute;
  17613. height: 100%;
  17614. top: 0px;
  17615. left: 0px;
  17616. box-sizing: border-box;
  17617. }
  17618. .chapter_upload_o {
  17619. width: 100%;
  17620. height: 100%;
  17621. position: relative;
  17622. z-index: 1;
  17623. }
  17624. .chapter_upload_ic {
  17625. margin: 0 15px 0px auto;
  17626. display: flex;
  17627. align-items: center;
  17628. }
  17629. .chapter_upload_ic_l {
  17630. width: 50px;
  17631. height: 50px;
  17632. float: left;
  17633. }
  17634. .chapter_upload_ic_l div {
  17635. width: 30px;
  17636. height: 35px;
  17637. background: url("../../../assets/icon/icon.png");
  17638. }
  17639. .chapter_upload_ic_edit {
  17640. height: 100%;
  17641. display: flex;
  17642. align-items: center;
  17643. cursor: pointer;
  17644. margin: 0 10px 0 0;
  17645. }
  17646. .chapter_upload_ic_edit div {
  17647. width: 18px;
  17648. height: 18px;
  17649. background-image: url("../../../assets/icon/new/edit_u.png");
  17650. background-size: 100% 100%;
  17651. }
  17652. .chapter_upload_ic_check {
  17653. height: 100%;
  17654. display: flex;
  17655. align-items: center;
  17656. cursor: pointer;
  17657. margin: 0 10px 0 0;
  17658. }
  17659. .chapter_upload_ic_check div {
  17660. width: 18px;
  17661. height: 18px;
  17662. background-image: url("../../../assets/icon/course/lookeye.svg");
  17663. background-size: 100% 100%;
  17664. }
  17665. .chapter_upload_ic_r {
  17666. height: 100%;
  17667. display: flex;
  17668. align-items: center;
  17669. cursor: pointer;
  17670. }
  17671. .chapter_upload_ic_r div {
  17672. width: 18px;
  17673. height: 18px;
  17674. background-image: url("../../../assets/icon/new/delete_u.png");
  17675. background-size: 100% 100%;
  17676. }
  17677. .chapter_upload_n {
  17678. display: flex;
  17679. text-indent: 10px;
  17680. text-decoration: none;
  17681. text-overflow: ellipsis;
  17682. white-space: nowrap;
  17683. overflow: hidden;
  17684. width: 55%;
  17685. margin-left: 10px;
  17686. cursor: pointer;
  17687. margin-top: 2px;
  17688. align-items: center;
  17689. }
  17690. .chapter_upload_l_i2,
  17691. .chapter_upload_l_i3,
  17692. .chapter_upload_l_i8,
  17693. .chapter_upload_l_i6,
  17694. .chapter_upload_l_i12,
  17695. .chapter_upload_l_i14,
  17696. .chapter_upload_l_i13 {
  17697. width: 15px;
  17698. height: 15px;
  17699. background-size: 100% 100%;
  17700. }
  17701. .chapter_upload_l_i2 {
  17702. background-image: url("../../../assets/icon/new/u_word.png");
  17703. }
  17704. .chapter_upload_l_i3 {
  17705. background-image: url("../../../assets/icon/new/u_video.png");
  17706. }
  17707. .chapter_upload_l_i8 {
  17708. background-image: url("../../../assets/icon/new/u_url.png");
  17709. }
  17710. .chapter_upload_l_i14 {
  17711. background-image: url("../../../assets/icon/new/u_source.png");
  17712. }
  17713. .chapter_upload_l_i6 {
  17714. background-image: url("../../../assets/icon/new/u_picture.png");
  17715. }
  17716. .chapter_upload_l_i12 {
  17717. background-image: url("../../../assets/icon/new/u_word.png");
  17718. }
  17719. .chapter_upload_l_i13 {
  17720. background-image: url("../../../assets/icon/new/u_img.png");
  17721. }
  17722. .chapter_upload_noSee {
  17723. background-image: url("../../../assets/icon/new/u_noUpload.png");
  17724. width: 18px;
  17725. height: 18px;
  17726. background-size: 100% 100%;
  17727. display: block;
  17728. margin-right: 10px;
  17729. }
  17730. .chapter_upload_ud {
  17731. display: flex;
  17732. flex-direction: row;
  17733. justify-content: center;
  17734. margin: 0 10px 0 0;
  17735. }
  17736. .chapter_upload_ud>.chapter_upload_up {
  17737. margin-bottom: 0;
  17738. margin-right: 10px;
  17739. }
  17740. .chapter_upload_down,
  17741. .chapter_upload_up {
  17742. width: 20px;
  17743. height: 20px;
  17744. background: #e4eaf2;
  17745. cursor: pointer;
  17746. margin: 0 auto;
  17747. border-radius: 5px;
  17748. display: flex;
  17749. justify-content: center;
  17750. align-items: center;
  17751. }
  17752. .chapter_upload_up::after,
  17753. .chapter_upload_down::after {
  17754. content: "";
  17755. background-image: url("../../../assets/icon/new/downBtn.png");
  17756. width: 13px;
  17757. height: 13px;
  17758. background-size: 100% 100%;
  17759. display: block;
  17760. }
  17761. .chapter_upload_up::after {
  17762. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  17763. }
  17764. .chapter_upload_up {
  17765. margin-bottom: 5px;
  17766. }
  17767. .chapter_upload_ud2 {
  17768. display: flex;
  17769. flex-direction: row;
  17770. justify-content: center;
  17771. margin: 0 10px 0 0;
  17772. }
  17773. .chapter_upload_ud2>.chapter_upload_up2 {
  17774. margin-bottom: 0;
  17775. margin-right: 10px;
  17776. }
  17777. .chapter_upload_down2,
  17778. .chapter_upload_up2 {
  17779. cursor: pointer;
  17780. margin: 0 auto;
  17781. border-radius: 5px;
  17782. display: flex;
  17783. justify-content: center;
  17784. align-items: center;
  17785. color: #717c8d;
  17786. font-size: 14px;
  17787. }
  17788. .chapter_upload_up2 {
  17789. margin-right: 10px;
  17790. }
  17791. .chapter_upload_up2::before,
  17792. .chapter_upload_down2::before {
  17793. content: "";
  17794. background-image: url("../../../assets/icon/new/c_down.png");
  17795. width: 14px;
  17796. height: 14px;
  17797. background-size: 100% 100%;
  17798. display: block;
  17799. margin-right: 5px;
  17800. }
  17801. .chapter_upload_up2::before {
  17802. background-image: url("../../../assets/icon/new/c_up.png") !important;
  17803. }
  17804. .addWordStyle {
  17805. display: flex;
  17806. flex-direction: row;
  17807. justify-content: flex-start;
  17808. overflow-x: auto;
  17809. white-space: nowrap;
  17810. flex-wrap: wrap;
  17811. }
  17812. /* table 样式 */
  17813. .cont>>>table {
  17814. border-top: 1px solid #ccc;
  17815. border-left: 1px solid #ccc;
  17816. }
  17817. .cont>>>table td,
  17818. .cont>>>table th {
  17819. border-bottom: 1px solid #ccc;
  17820. border-right: 1px solid #ccc;
  17821. /* padding: 20px 5px; */
  17822. padding: 5px 10px;
  17823. max-width: 0px;
  17824. height: 30px;
  17825. vertical-align: baseline;
  17826. }
  17827. .cont>>>table th {
  17828. border-bottom: 2px solid #ccc;
  17829. text-align: center;
  17830. }
  17831. /* blockquote 样式 */
  17832. .cont>>>blockquote {
  17833. display: block;
  17834. border-left: 8px solid #d0e5f2;
  17835. padding: 5px 10px;
  17836. margin: 10px 0;
  17837. line-height: 1.4;
  17838. font-size: 100%;
  17839. background-color: #f1f1f1;
  17840. }
  17841. /* code 样式 */
  17842. .cont>>>code {
  17843. display: inline-block;
  17844. /* *display: inline; */
  17845. zoom: 1;
  17846. background-color: #f1f1f1;
  17847. border-radius: 3px;
  17848. padding: 3px 5px;
  17849. margin: 0 3px;
  17850. }
  17851. .cont>>>pre code {
  17852. display: block;
  17853. }
  17854. /* ul ol 样式 */
  17855. .cont>>>ul,
  17856. ol {
  17857. margin: 10px 0 10px 20px;
  17858. }
  17859. .wordbox {
  17860. display: flex;
  17861. flex-wrap: wrap;
  17862. cursor: pointer;
  17863. width: 100%;
  17864. }
  17865. .checkword {
  17866. width: 22px;
  17867. height: 22px;
  17868. margin: 10px auto 0;
  17869. cursor: pointer;
  17870. }
  17871. .checkword img {
  17872. width: 100%;
  17873. }
  17874. .stepBg {
  17875. display: flex;
  17876. justify-content: space-between;
  17877. align-items: center;
  17878. background: #fff;
  17879. width: calc(100%);
  17880. margin: 0 auto;
  17881. }
  17882. .stepBorder {
  17883. height: 3px !important;
  17884. background: #cad1dc;
  17885. width: 100px !important;
  17886. margin: 0 15px !important;
  17887. position: relative;
  17888. }
  17889. .border-active {
  17890. background: #3681fc !important;
  17891. }
  17892. .border-active::before,
  17893. .border-active::after {
  17894. border-color: #3681fc !important;
  17895. }
  17896. .stepBorder::before,
  17897. .stepBorder::after {
  17898. content: "";
  17899. width: 9px;
  17900. height: 9px;
  17901. background: #ffffff;
  17902. opacity: 1;
  17903. border: 2px solid #acb4bf;
  17904. display: block;
  17905. box-sizing: border-box;
  17906. border-radius: 50%;
  17907. position: absolute;
  17908. top: 50%;
  17909. transform: translateY(-50%);
  17910. }
  17911. .stepBorder::after {
  17912. right: -9px;
  17913. }
  17914. .stepTop {
  17915. width: 100%;
  17916. /* border-radius: 10px; */
  17917. display: flex;
  17918. justify-content: center;
  17919. align-items: center;
  17920. flex-wrap: nowrap;
  17921. background: #fff;
  17922. /* top: 18%; */
  17923. height: 80px;
  17924. border-bottom: 2px solid rgb(228, 232, 237);
  17925. box-sizing: border-box;
  17926. }
  17927. .stepTop2 {
  17928. width: 100%;
  17929. /* border-radius: 10px; */
  17930. display: flex;
  17931. justify-content: center;
  17932. align-items: center;
  17933. flex-wrap: nowrap;
  17934. background: #fff;
  17935. /* top: 18%; */
  17936. height: 20px;
  17937. border-bottom: 2px solid rgb(228, 232, 237);
  17938. box-sizing: border-box;
  17939. overflow: hidden;
  17940. cursor: pointer;
  17941. }
  17942. .stepTop>div img {
  17943. width: 100%;
  17944. }
  17945. .stepTop>div {
  17946. height: 50px;
  17947. width: 180px;
  17948. cursor: pointer;
  17949. margin: 10px 0;
  17950. border-radius: 10px;
  17951. }
  17952. .first,
  17953. .second,
  17954. .third,
  17955. .four {
  17956. background: #3681fc;
  17957. height: 90px;
  17958. color: #fff;
  17959. display: flex;
  17960. flex-direction: row;
  17961. align-items: center;
  17962. justify-content: center;
  17963. }
  17964. .first>div:nth-child(1),
  17965. .second>div:nth-child(1),
  17966. .third>div:nth-child(1),
  17967. .four>div:nth-child(1) {
  17968. margin: 5px 10px 0 0;
  17969. width: 2rem;
  17970. }
  17971. .firstNo,
  17972. .secondNo,
  17973. .thirdNo,
  17974. .fourNo {
  17975. background: #e7e7e7;
  17976. color: #adadad;
  17977. display: flex;
  17978. flex-direction: row;
  17979. align-items: center;
  17980. justify-content: center;
  17981. }
  17982. .firstNo>div:nth-child(1),
  17983. .secondNo>div:nth-child(1),
  17984. .thirdNo>div:nth-child(1),
  17985. .fourNo>div:nth-child(1) {
  17986. margin: 5px 10px 0 0;
  17987. width: 2rem;
  17988. }
  17989. .uploadWidth>>>.el-upload {
  17990. width: 60px;
  17991. height: 60px;
  17992. position: relative;
  17993. }
  17994. .addPeople {
  17995. background: #fa6060;
  17996. width: 150px;
  17997. height: 40px;
  17998. color: #fff;
  17999. border-radius: 5px;
  18000. text-align: center;
  18001. line-height: 40px;
  18002. font-size: 14px;
  18003. cursor: pointer;
  18004. }
  18005. .kcImg {
  18006. width: 60px;
  18007. margin-left: 10px;
  18008. }
  18009. .zyImg {
  18010. width: 55px;
  18011. margin: 0 10px;
  18012. }
  18013. .deleteZy {
  18014. width: 20px;
  18015. position: absolute;
  18016. top: 5px;
  18017. right: 5px;
  18018. cursor: pointer;
  18019. }
  18020. .kcImg>img,
  18021. .zyImg>img,
  18022. .deleteZy>img {
  18023. width: 100%;
  18024. height: 100%;
  18025. }
  18026. .zyBox {
  18027. display: flex;
  18028. flex-direction: row;
  18029. align-items: center;
  18030. background: #67d37d;
  18031. color: #fff;
  18032. width: 210px;
  18033. margin: 20px 20px 0 0;
  18034. border-radius: 10px;
  18035. height: 70px;
  18036. position: relative;
  18037. }
  18038. .upCss {
  18039. display: flex;
  18040. flex-direction: row;
  18041. justify-content: flex-start;
  18042. }
  18043. .upCss>>>.el-icon-plus {
  18044. position: none !important;
  18045. width: 200px;
  18046. height: 100px;
  18047. display: flex;
  18048. flex-wrap: nowrap;
  18049. flex-direction: column;
  18050. align-items: center;
  18051. justify-content: center;
  18052. border: 1px dashed #ccc;
  18053. min-width: 78px;
  18054. min-height: 100px;
  18055. z-index: 999;
  18056. }
  18057. .upCss>>>.el-upload-list__item-name {
  18058. width: 100px;
  18059. white-space: nowrap;
  18060. overflow: hidden;
  18061. text-overflow: ellipsis;
  18062. }
  18063. .upCss>>>.el-upload-list__item .el-icon-close {
  18064. font-size: 20px;
  18065. z-index: 9999;
  18066. }
  18067. .addStageImg {
  18068. min-width: 20px;
  18069. min-height: 20px;
  18070. width: 20px;
  18071. height: 20px;
  18072. cursor: pointer;
  18073. }
  18074. .addHW {
  18075. width: 28px;
  18076. height: 28px;
  18077. cursor: pointer;
  18078. }
  18079. .addStageImg>img,
  18080. .addHW>img {
  18081. width: 100%;
  18082. height: 100%;
  18083. }
  18084. .addNewPP>>>.el-dialog__body {
  18085. padding: 5px 20px;
  18086. }
  18087. .addNewPP>>>.el-dialog {
  18088. margin-top: 5vh !important;
  18089. }
  18090. .addNewPP2>>>.el-dialog__body {
  18091. padding: 5px 0;
  18092. }
  18093. .addNewPP2>>>.el-dialog {
  18094. margin-top: 5vh !important;
  18095. }
  18096. .isHeight {
  18097. height: 680px;
  18098. }
  18099. .toolChoose {
  18100. display: flex;
  18101. /* width: 100%; */
  18102. flex-direction: row;
  18103. flex-wrap: wrap;
  18104. }
  18105. .tool,
  18106. .isToolChoose {
  18107. display: flex;
  18108. flex-direction: column;
  18109. flex-wrap: nowrap;
  18110. width: fit-content;
  18111. margin: 10px 0 10px 0;
  18112. align-items: center;
  18113. border: 2px solid #dbdbdb00;
  18114. padding: 10px 20px;
  18115. border-radius: 5px;
  18116. cursor: pointer;
  18117. /* box-shadow: 0 0 2px 0px #dedede; */
  18118. position: relative;
  18119. box-sizing: border-box;
  18120. }
  18121. .tool:hover {
  18122. border: 2px solid #a5c7ff;
  18123. }
  18124. .tool:hover>.noCTool {
  18125. display: block;
  18126. opacity: 0.5;
  18127. }
  18128. .isToolChoose {
  18129. border: 2px solid #438aff !important;
  18130. box-shadow: 0 0 2px 0px #438aff;
  18131. opacity: 1 !important;
  18132. }
  18133. .isCTool,
  18134. .noCTool {
  18135. width: 30px;
  18136. height: 30px;
  18137. position: absolute;
  18138. top: -4px;
  18139. right: -4px;
  18140. }
  18141. .noCTool {
  18142. display: none;
  18143. }
  18144. .isCTool>img,
  18145. .noCTool>img {
  18146. width: 100%;
  18147. height: 100%;
  18148. }
  18149. .tool+.tool {
  18150. margin-right: 10px;
  18151. }
  18152. .whiteBIcon {
  18153. width: 80px;
  18154. cursor: pointer;
  18155. display: flex;
  18156. flex-direction: column;
  18157. flex-wrap: nowrap;
  18158. align-items: center;
  18159. font-size: 14px;
  18160. }
  18161. .whiteBIcon>img,
  18162. .toolIcon>img,
  18163. .arrow>img {
  18164. width: 100%;
  18165. height: 100%;
  18166. }
  18167. .check img {
  18168. width: 20px;
  18169. height: 20px;
  18170. }
  18171. .whiteBIcon>img {
  18172. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  18173. border-radius: 15px;
  18174. }
  18175. .whiteBIcon>div:nth-child(2) {
  18176. height: 20px;
  18177. line-height: 20px;
  18178. }
  18179. .check {
  18180. /* width: 20px;
  18181. height: 20px; */
  18182. cursor: pointer;
  18183. margin: 10px 0 0;
  18184. }
  18185. .checkDiv {
  18186. display: flex;
  18187. align-items: center;
  18188. }
  18189. .checkDiv span {
  18190. margin-left: 5px;
  18191. color: #858585;
  18192. }
  18193. .customWidth>>>.el-dialog {
  18194. min-width: 600px !important;
  18195. }
  18196. .CollaborativeCss {
  18197. width: 100%;
  18198. display: flex;
  18199. justify-content: center;
  18200. align-items: center;
  18201. box-sizing: border-box;
  18202. padding: 10px 0;
  18203. cursor: pointer;
  18204. }
  18205. .CollaborativeCss >>> .el-tooltip {
  18206. overflow: hidden;
  18207. white-space: nowrap;
  18208. text-overflow: ellipsis;
  18209. }
  18210. .CollaborativeCss2 {
  18211. background: #e0eafb;
  18212. color: #3681fc;
  18213. font-weight: 700;
  18214. border-radius: 5px;
  18215. }
  18216. .a_addBox {
  18217. margin: 10px 0;
  18218. background: #fff;
  18219. padding: 15px;
  18220. /* max-height: 600px; */
  18221. overflow: auto;
  18222. }
  18223. .a_add_box {
  18224. border-bottom: 2px solid #eee;
  18225. padding-bottom: 25px;
  18226. }
  18227. .a_add_head {
  18228. display: flex;
  18229. align-items: center;
  18230. justify-content: space-between;
  18231. margin: 10px 0 0 0;
  18232. font-size: 18px;
  18233. }
  18234. .a_add_checkType {
  18235. margin-top: 10px;
  18236. display: flex;
  18237. font-size: 14px;
  18238. align-items: center;
  18239. }
  18240. .a_add_checkType span {
  18241. box-sizing: border-box;
  18242. padding: 0 0 5px 0;
  18243. cursor: pointer;
  18244. }
  18245. .a_add_checkType span+span {
  18246. margin-left: 10px;
  18247. }
  18248. .a_add_checkType .active {
  18249. border-bottom: 2px solid #409eff;
  18250. color: #409eff;
  18251. }
  18252. .a_add_head .a_add_head_input {
  18253. /* width: 540px; */
  18254. width: 100%;
  18255. }
  18256. .a_add_head .a_add_head_div {
  18257. display: flex;
  18258. align-items: center;
  18259. justify-content: space-between;
  18260. }
  18261. .a_add_body {
  18262. display: flex;
  18263. /* align-items: center; */
  18264. align-items: flex-end;
  18265. }
  18266. .a_add_input {
  18267. display: flex;
  18268. align-items: center;
  18269. flex-wrap: wrap;
  18270. }
  18271. .a_add_input_choice {
  18272. flex-direction: column;
  18273. margin-right: 10px;
  18274. }
  18275. .a_add_input_choice>>>.el-radio {
  18276. display: flex;
  18277. align-items: center;
  18278. flex-direction: row-reverse;
  18279. margin: 30px 0 0 0;
  18280. position: relative;
  18281. }
  18282. .a_add_input_choice>>>.el-checkbox {
  18283. display: flex;
  18284. align-items: center;
  18285. flex-direction: row-reverse;
  18286. margin: 30px 0 0 0;
  18287. position: relative;
  18288. }
  18289. .width100 {
  18290. width: 100%;
  18291. }
  18292. .a_add_input .a_add_persent {
  18293. width: 100%;
  18294. }
  18295. .a_add_persent_div {
  18296. width: 100%;
  18297. display: flex;
  18298. align-items: center;
  18299. }
  18300. .a_add_persent_div span {
  18301. margin: 5px 0;
  18302. }
  18303. .a_add_persent_div span:nth-child(1) {
  18304. width: 30%;
  18305. }
  18306. .a_add_persent_div span:nth-child(2) {
  18307. width: 7%;
  18308. }
  18309. .a_add_persent_div span:nth-child(3) {
  18310. width: 40%;
  18311. }
  18312. .a_add_body_div {
  18313. display: flex;
  18314. align-items: center;
  18315. justify-content: center;
  18316. /* flex-direction: column; */
  18317. position: absolute;
  18318. right: -20px;
  18319. transform: translateX(100%);
  18320. }
  18321. .a_add_body_div>>>.el-button--primary {
  18322. background: #466b99;
  18323. border: none;
  18324. }
  18325. .all_choose {
  18326. display: flex;
  18327. flex-direction: row;
  18328. align-items: flex-start;
  18329. width: 100%;
  18330. }
  18331. .all_choose+.all_choose {
  18332. /* margin-top: 10px */
  18333. }
  18334. .all_choose>span {
  18335. min-width: fit-content;
  18336. display: block;
  18337. white-space: nowrap;
  18338. overflow: hidden;
  18339. text-overflow: ellipsis;
  18340. margin-right: 20px;
  18341. font-weight: bold;
  18342. font-size: 14px;
  18343. }
  18344. .all_choose>>>.el-checkbox-group {
  18345. display: flex;
  18346. flex-direction: row;
  18347. width: 100%;
  18348. flex-wrap: wrap;
  18349. align-content: center;
  18350. justify-content: flex-start;
  18351. align-items: center;
  18352. margin-top: 3px;
  18353. }
  18354. .all_choose>.el-checkbox-group>>>.el-checkbox {
  18355. margin-bottom: 10px;
  18356. display: flex;
  18357. flex-direction: row;
  18358. align-items: center;
  18359. margin-right: 10px;
  18360. }
  18361. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  18362. min-width: 80px;
  18363. overflow: hidden;
  18364. width: 80px;
  18365. text-overflow: ellipsis;
  18366. white-space: nowrap;
  18367. }
  18368. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  18369. width: auto;
  18370. }
  18371. .choose>div:nth-child(3)>span {
  18372. /* letter-spacing: 0 !important; */
  18373. }
  18374. .choose {
  18375. display: flex;
  18376. flex-direction: column;
  18377. flex-wrap: nowrap;
  18378. height: 100%;
  18379. justify-content: space-evenly;
  18380. align-items: flex-start;
  18381. }
  18382. .both {
  18383. display: flex;
  18384. flex-direction: row;
  18385. flex-wrap: wrap;
  18386. width: 100%;
  18387. align-items: center;
  18388. justify-content: flex-start;
  18389. margin: 15px 0;
  18390. }
  18391. .notice>>>.el-dialog {
  18392. width: 500px !important;
  18393. text-align: center;
  18394. }
  18395. .notice>>>.el-button {
  18396. margin-top: 20px;
  18397. }
  18398. .whiteBg {
  18399. /* background: #fff; */
  18400. border-radius: 10px;
  18401. }
  18402. .wb_j_box {
  18403. display: flex;
  18404. width: 100%;
  18405. padding: 0 20px 0;
  18406. box-sizing: border-box;
  18407. }
  18408. .wb_j_box_content {
  18409. width: calc(100% - 55% - 100px);
  18410. display: flex;
  18411. align-items: center;
  18412. }
  18413. .wb_j_box_p_box {
  18414. max-width: calc(100% - 200px);
  18415. word-break: break-all;
  18416. overflow: hidden;
  18417. margin: 0 0 0 10px;
  18418. font-size: 14px;
  18419. color: #6e6e6e;
  18420. z-index: 999;
  18421. }
  18422. .chooseWho {
  18423. display: flex;
  18424. width: 410px;
  18425. flex-direction: row;
  18426. flex-wrap: nowrap;
  18427. justify-content: space-between;
  18428. padding-bottom: 10px;
  18429. }
  18430. .chooseWho>div {
  18431. cursor: pointer;
  18432. padding-bottom: 10px;
  18433. font-weight: bold;
  18434. }
  18435. .isChooseActive {
  18436. color: #3e88f4;
  18437. border-bottom: 2px solid #2f80f3;
  18438. }
  18439. .toolSort {
  18440. display: flex;
  18441. flex-direction: row;
  18442. flex-wrap: wrap;
  18443. justify-content: flex-start;
  18444. align-items: flex-start;
  18445. }
  18446. .toolSort>div {
  18447. margin-right: 10px;
  18448. }
  18449. .tools {
  18450. width: 100%;
  18451. display: flex;
  18452. flex-direction: column;
  18453. flex-wrap: nowrap;
  18454. align-items: flex-start;
  18455. }
  18456. .leftTools,
  18457. .rightTools {
  18458. width: 50%;
  18459. }
  18460. .leftTools+.leftTools {
  18461. border-top: 1px solid #dbdbdb;
  18462. padding-top: 30px;
  18463. }
  18464. .rightTools {
  18465. display: flex;
  18466. flex-direction: row;
  18467. flex-wrap: nowrap;
  18468. justify-content: space-around;
  18469. }
  18470. .firstToolList {
  18471. display: flex;
  18472. flex-direction: column;
  18473. flex-wrap: nowrap;
  18474. align-items: center;
  18475. }
  18476. .iconList {
  18477. display: flex;
  18478. flex-direction: row;
  18479. flex-wrap: wrap;
  18480. justify-content: flex-start;
  18481. align-items: center;
  18482. margin: 20px 0 5px 0;
  18483. width: 240px;
  18484. min-width: 240px;
  18485. }
  18486. .iconTool {
  18487. display: flex;
  18488. flex-direction: column;
  18489. flex-wrap: nowrap;
  18490. align-items: center;
  18491. justify-content: flex-start;
  18492. margin: 15px 10px;
  18493. }
  18494. .toolIcon {
  18495. width: 50px;
  18496. }
  18497. .taskBorder {
  18498. /* border: 1px solid #CAD1DC; */
  18499. border-radius: 10px;
  18500. margin-top: 10px;
  18501. min-height: 670px;
  18502. position: relative;
  18503. background: #fff;
  18504. padding: 20px;
  18505. overflow: hidden;
  18506. box-sizing: border-box;
  18507. }
  18508. .smallTaskBorder {
  18509. height: 405px;
  18510. min-height: 405px !important;
  18511. overflow: hidden;
  18512. }
  18513. /* .taskBorder>div {
  18514. padding: 30px 30px 10px;
  18515. } */
  18516. .addTaskBorder {
  18517. /* border: 2px solid #5E9AFC; */
  18518. border-radius: 8px;
  18519. margin-top: 10px;
  18520. cursor: pointer;
  18521. /* height: 50px;
  18522. line-height: 50px; */
  18523. background: #fff;
  18524. padding: 15px 0;
  18525. display: flex;
  18526. align-items: center;
  18527. justify-content: center;
  18528. }
  18529. /* .addTaskBorder>div {
  18530. margin: 0 auto;
  18531. display: flex;
  18532. align-items: center;
  18533. justify-content: center;
  18534. }
  18535. .addTaskBorder>div>img {
  18536. width: 20px;
  18537. }
  18538. .addTaskBorder>div>span {
  18539. font-size: 16px;
  18540. margin-left: 10px;
  18541. color: #5E9AFC;
  18542. } */
  18543. .funBlock {
  18544. display: flex;
  18545. padding: 15px 0;
  18546. flex-direction: row;
  18547. justify-content: center;
  18548. align-items: center;
  18549. position: absolute;
  18550. right: 0;
  18551. bottom: 0;
  18552. background: #fff;
  18553. width: 100%;
  18554. height: 60px;
  18555. z-index: 9;
  18556. }
  18557. .fold {
  18558. display: flex;
  18559. margin: 0 20px;
  18560. flex-direction: row;
  18561. align-items: center;
  18562. cursor: pointer;
  18563. color: #2b7bff;
  18564. }
  18565. .arrow {
  18566. margin-right: 8px;
  18567. width: 16px;
  18568. height: 16px;
  18569. min-width: 16px;
  18570. min-height: 16px;
  18571. background-size: 100% 100%;
  18572. display: block;
  18573. background-image: url(../../../assets/icon/new/u_up.png);
  18574. /* border-left: 7px solid transparent;
  18575. border-bottom: 7px solid #717C8D;
  18576. border-top: 0px solid transparent;
  18577. border-right: 7px solid transparent; */
  18578. /* box-sizing: border-box; */
  18579. transition: all 0.3s;
  18580. }
  18581. .arrowZ {
  18582. transform: rotate(180deg);
  18583. }
  18584. .addToolFun {
  18585. display: flex;
  18586. width: 150px;
  18587. flex-direction: row;
  18588. align-items: center;
  18589. justify-content: center;
  18590. border: 2px dashed #cad1dc;
  18591. border-radius: 5px;
  18592. height: 50px;
  18593. margin: 35px auto 0;
  18594. cursor: pointer;
  18595. }
  18596. .addToolFun2 {
  18597. display: flex;
  18598. width: 150px;
  18599. border: 2px dashed #cad1dc;
  18600. flex-direction: row;
  18601. align-items: center;
  18602. justify-content: center;
  18603. border-radius: 5px;
  18604. height: 50px;
  18605. margin: 0 auto 0;
  18606. cursor: pointer;
  18607. }
  18608. .addToolFun2>div,
  18609. .addToolFun>div {
  18610. display: flex;
  18611. line-height: 50px;
  18612. }
  18613. .addToolImg {
  18614. width: 20px;
  18615. height: 20px;
  18616. margin-right: 10px;
  18617. }
  18618. .addToolsDia>>>.el-dialog__body {
  18619. padding: 20px;
  18620. }
  18621. .addToolsDia>>>.el-dialog__body>.toolChoose {
  18622. padding: 0;
  18623. }
  18624. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  18625. padding: 0;
  18626. border-bottom: none;
  18627. margin-bottom: 0;
  18628. }
  18629. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  18630. width: 100%;
  18631. }
  18632. .lineCss>>>.el-form-item__label {
  18633. width: auto !important;
  18634. }
  18635. .lineCss>>>.el-form-item__content {
  18636. margin-left: 50px !important;
  18637. }
  18638. .newSteps {
  18639. display: flex;
  18640. width: 100% !important;
  18641. /* height: 80px; */
  18642. cursor: pointer;
  18643. margin: 10px 0;
  18644. border-radius: 10px;
  18645. flex-direction: row;
  18646. align-content: center;
  18647. justify-content: center;
  18648. align-items: center;
  18649. margin: 0 !important;
  18650. }
  18651. /* 评价样式 */
  18652. .elist_css {
  18653. padding-bottom: 75px !important;
  18654. }
  18655. .elist_title {
  18656. margin-bottom: 10px;
  18657. }
  18658. .elist_input {
  18659. width: 100%;
  18660. }
  18661. .elist_input_box {
  18662. display: flex;
  18663. align-items: center;
  18664. flex-wrap: wrap;
  18665. }
  18666. .elist_input_box+.elist_input_box {
  18667. margin-top: 30px;
  18668. }
  18669. .elist_input .elist_input_box input {
  18670. font: inherit;
  18671. color: currentColor;
  18672. width: 100%;
  18673. /* max-width: calc(100% - 385px); */
  18674. max-width: calc(100% - 150px);
  18675. padding: 8px 14px;
  18676. display: block;
  18677. min-width: 0;
  18678. outline: none;
  18679. border: 1px solid rgba(0, 0, 0, 0.23);
  18680. border-radius: 4px;
  18681. box-sizing: border-box;
  18682. background: #fff;
  18683. margin: 0 20px 0 0;
  18684. }
  18685. .elist_input .elist_input_box span {
  18686. height: 36px;
  18687. line-height: 36px;
  18688. color: rgb(82, 82, 82);
  18689. min-width: 80px;
  18690. }
  18691. .elist_input .elist_input_box .remove {
  18692. height: 20px;
  18693. width: 20px;
  18694. min-height: 20px;
  18695. min-width: 20px;
  18696. background-size: 100% 100%;
  18697. background-position: unset;
  18698. margin-left: 5px;
  18699. }
  18700. .elist_input_box>>>.el-rate {
  18701. display: flex;
  18702. height: 36px;
  18703. align-items: center;
  18704. }
  18705. .elist_input_box .elist_inptu_text {
  18706. width: 100%;
  18707. display: flex;
  18708. align-items: center;
  18709. margin-top: 10px;
  18710. }
  18711. .elist_input_box .elist_inptu_text input {
  18712. /* width: 500px; */
  18713. width: 100%;
  18714. max-width: unset;
  18715. }
  18716. .elist_input_box>>>.el-rate__icon {
  18717. font-size: 24px;
  18718. }
  18719. .elist_btn {
  18720. margin-top: 10px;
  18721. }
  18722. .lineTitle {
  18723. /* margin-top: 15px; */
  18724. width: 110px;
  18725. font-size: 16px;
  18726. display: flex;
  18727. align-items: center;
  18728. line-height: 20px;
  18729. }
  18730. .lineTitle::before {
  18731. content: "";
  18732. display: block;
  18733. width: 3px;
  18734. height: 20px;
  18735. background: #0061ff;
  18736. border-radius: 3px;
  18737. margin: 0 5px 0 0;
  18738. }
  18739. .clineTitle::before {
  18740. content: "";
  18741. display: block;
  18742. min-width: 10px;
  18743. width: 10px;
  18744. height: 10px;
  18745. background: #0061ff;
  18746. border-radius: 50%;
  18747. margin: 0 5px 0 0;
  18748. }
  18749. .courseTop {
  18750. display: flex;
  18751. flex-direction: row;
  18752. justify-content: space-between;
  18753. align-items: center;
  18754. width: calc(100% - 40px);
  18755. margin: 0 auto;
  18756. padding: 10px 0;
  18757. }
  18758. .stepsNav {
  18759. display: flex;
  18760. flex-direction: row;
  18761. justify-content: flex-start;
  18762. align-items: center;
  18763. }
  18764. .stepsWord {
  18765. font-size: 18px;
  18766. color: #fff;
  18767. font-weight: bold;
  18768. margin-left: auto;
  18769. background: rgb(15, 126, 255);
  18770. border-radius: 5px;
  18771. padding: 3px 25px;
  18772. box-sizing: border-box;
  18773. }
  18774. .stepBox {
  18775. width: calc(100% - 40px);
  18776. height: calc(100% - 50px);
  18777. overflow: hidden;
  18778. border-radius: 5px;
  18779. margin: 0 auto;
  18780. }
  18781. .rightBox {
  18782. width: calc(100%);
  18783. background: #f0f2f5;
  18784. /* border-radius: 10px; */
  18785. overflow: auto;
  18786. height: calc(100% - 150px);
  18787. margin: 0 auto;
  18788. position: relative;
  18789. box-sizing: border-box;
  18790. }
  18791. .e_add_top {
  18792. display: flex;
  18793. justify-content: space-between;
  18794. background: #fff;
  18795. position: absolute;
  18796. right: 20px;
  18797. height: 50px;
  18798. align-items: center;
  18799. }
  18800. .e_add_title2 {
  18801. display: flex;
  18802. align-items: center;
  18803. }
  18804. .e_add_title2 span {
  18805. width: 40px;
  18806. }
  18807. .e_add_title {
  18808. display: flex;
  18809. align-items: center;
  18810. color: #b8b8b8;
  18811. font-size: 18px;
  18812. position: relative;
  18813. height: 40px;
  18814. }
  18815. .e_add_title span {
  18816. margin-right: 10px;
  18817. }
  18818. .e_add_title .el_input {
  18819. width: 300px;
  18820. }
  18821. .e_add_title>>>.el-input__inner {
  18822. width: 400px;
  18823. }
  18824. .e_add_btn {}
  18825. .e_add_content {
  18826. display: flex;
  18827. width: 100%;
  18828. }
  18829. .e_add_list {
  18830. background: #fff;
  18831. height: 500px;
  18832. width: 210px;
  18833. position: relative;
  18834. margin: 15px 5px 0 0;
  18835. flex-shrink: 0;
  18836. display: flex;
  18837. flex-direction: column;
  18838. }
  18839. .e_add_list_title {
  18840. font-size: 20px;
  18841. width: 100%;
  18842. box-sizing: border-box;
  18843. padding: 15px 40px;
  18844. text-align: center;
  18845. border-bottom: 1px solid #eaeaea;
  18846. position: relative;
  18847. display: flex;
  18848. align-items: center;
  18849. justify-content: center;
  18850. height: 57px;
  18851. background: #f6f6f6;
  18852. }
  18853. .e_add_list_title span {
  18854. overflow: hidden;
  18855. white-space: nowrap;
  18856. text-overflow: ellipsis;
  18857. }
  18858. .e_add_list_title img {
  18859. position: absolute;
  18860. right: 15px;
  18861. width: 25px;
  18862. cursor: pointer;
  18863. top: 50%;
  18864. transform: translateY(-50%);
  18865. }
  18866. .e_add_list_body {
  18867. height: calc(100% - 187px);
  18868. overflow: auto;
  18869. }
  18870. .e_add_list_child {
  18871. width: 100%;
  18872. display: flex;
  18873. align-items: center;
  18874. justify-content: center;
  18875. position: relative;
  18876. box-sizing: border-box;
  18877. padding: 15px 40px;
  18878. text-align: center;
  18879. }
  18880. .e_add_list_child span {
  18881. overflow: hidden;
  18882. white-space: nowrap;
  18883. text-overflow: ellipsis;
  18884. cursor: pointer;
  18885. }
  18886. .e_add_list_child img {
  18887. position: absolute;
  18888. right: 10px;
  18889. width: 21px;
  18890. cursor: pointer;
  18891. top: 50%;
  18892. transform: translateY(-50%);
  18893. }
  18894. .e_add_list_child+.e_add_list_child {
  18895. border-top: 1px solid #eaeaea;
  18896. }
  18897. .e_add_list_child .active {
  18898. color: #409eff;
  18899. }
  18900. .e_add_list_btn {
  18901. position: absolute;
  18902. bottom: 0;
  18903. height: 50px;
  18904. background: rgb(120, 120, 254);
  18905. width: 100%;
  18906. color: #fff;
  18907. font-size: 16px;
  18908. text-align: center;
  18909. line-height: 50px;
  18910. cursor: pointer;
  18911. }
  18912. .e_add_list_detail {
  18913. position: absolute;
  18914. bottom: 0;
  18915. height: 130px;
  18916. background: rgb(120, 120, 254);
  18917. width: 100%;
  18918. color: #fff;
  18919. font-size: 16px;
  18920. display: flex;
  18921. align-items: center;
  18922. justify-content: center;
  18923. }
  18924. .e_add_list_detail textarea {
  18925. height: 90%;
  18926. width: 95%;
  18927. border: none;
  18928. resize: none;
  18929. outline: none;
  18930. padding: 5px;
  18931. box-sizing: border-box;
  18932. }
  18933. .e_add_list_pbox {
  18934. width: 100%;
  18935. }
  18936. .e_add_list_pbox_title {
  18937. height: 50px;
  18938. background: #fff;
  18939. display: flex;
  18940. align-items: center;
  18941. width: 100%;
  18942. box-sizing: border-box;
  18943. padding: 0 20px;
  18944. flex-direction: row;
  18945. flex-wrap: wrap;
  18946. }
  18947. .type_title {
  18948. font-size: 18px;
  18949. font-weight: 700;
  18950. }
  18951. .type_content {
  18952. font-size: 16px;
  18953. margin-left: 30px;
  18954. }
  18955. .type_content span+span {
  18956. margin-left: 20px;
  18957. }
  18958. .type_content span {
  18959. cursor: pointer;
  18960. padding-bottom: 5px;
  18961. box-sizing: border-box;
  18962. }
  18963. .type_content .active {
  18964. color: #409eff;
  18965. border-bottom: 2px solid #409eff;
  18966. }
  18967. .e_add_list_pbox_content {
  18968. height: calc(100% - 50px);
  18969. display: flex;
  18970. align-items: center;
  18971. width: 100%;
  18972. background: #fff;
  18973. }
  18974. .mbCss {
  18975. width: 100%;
  18976. display: flex;
  18977. flex-direction: row;
  18978. flex-wrap: nowrap;
  18979. align-content: center;
  18980. align-items: flex-start;
  18981. justify-content: flex-start;
  18982. }
  18983. .pjCss {
  18984. /* width: 42%; */
  18985. width: calc(100% - 55%);
  18986. display: flex;
  18987. flex-direction: column;
  18988. flex-wrap: nowrap;
  18989. align-items: flex-start;
  18990. }
  18991. .e_box {
  18992. /* display: flex; */
  18993. flex-wrap: wrap;
  18994. max-height: 500px;
  18995. align-items: flex-start;
  18996. overflow: auto;
  18997. width: 100%;
  18998. }
  18999. .e_card {
  19000. border: 1px solid #ccc;
  19001. background: #fff;
  19002. margin-right: 20px;
  19003. width: 270px;
  19004. display: flex;
  19005. flex-direction: column;
  19006. align-items: center;
  19007. border-radius: 5px;
  19008. margin-top: 10px;
  19009. text-align: center;
  19010. }
  19011. .e_card_picture {
  19012. margin: 10px 0;
  19013. }
  19014. .e_card_picture>img {
  19015. width: 50px;
  19016. }
  19017. .e_card_name {
  19018. width: 100%;
  19019. padding: 0 10px;
  19020. box-sizing: border-box;
  19021. margin-bottom: 10px;
  19022. overflow: hidden;
  19023. text-overflow: ellipsis;
  19024. white-space: nowrap;
  19025. }
  19026. .e_card_time {
  19027. width: 100%;
  19028. padding: 0 10px;
  19029. box-sizing: border-box;
  19030. font-size: 15px;
  19031. color: #c3c3c3;
  19032. margin-bottom: 10px;
  19033. }
  19034. .e_card_btn {
  19035. height: 40px;
  19036. display: flex;
  19037. align-items: center;
  19038. width: 100%;
  19039. background: rgb(244, 244, 244);
  19040. }
  19041. .e_card_btn:hover {
  19042. background: rgb(221 221 221);
  19043. }
  19044. .e_card_btn span {
  19045. flex: 1 1 auto;
  19046. text-align: center;
  19047. cursor: pointer;
  19048. }
  19049. .addEva {
  19050. border: 1px solid #ccc;
  19051. background: #fff;
  19052. margin-right: 20px;
  19053. width: 270px;
  19054. height: 149px;
  19055. display: flex;
  19056. flex-direction: column;
  19057. align-items: center;
  19058. border-radius: 5px;
  19059. margin-top: 10px;
  19060. text-align: center;
  19061. cursor: pointer;
  19062. justify-content: center;
  19063. }
  19064. .addEva>img {
  19065. width: 50px;
  19066. object-fit: cover;
  19067. }
  19068. .uploadFm {
  19069. border: 1px dashed #ccc;
  19070. width: 100%;
  19071. height: 140px;
  19072. position: relative;
  19073. cursor: pointer;
  19074. display: flex;
  19075. flex-direction: column;
  19076. justify-content: center;
  19077. align-items: center;
  19078. font-size: 14px;
  19079. color: #6e6e6e;
  19080. position: relative;
  19081. }
  19082. .cover_p {
  19083. width: 100% !important;
  19084. height: 100%;
  19085. object-fit: cover;
  19086. }
  19087. .uploadFm2:hover .cover_mask {
  19088. display: flex !important;
  19089. }
  19090. .cover_mask {
  19091. display: none;
  19092. width: 100%;
  19093. height: 100%;
  19094. position: absolute;
  19095. background: #00000054;
  19096. align-items: center;
  19097. justify-content: center;
  19098. flex-direction: column;
  19099. }
  19100. .cover_mask>img {
  19101. width: 30px;
  19102. }
  19103. .cover_mask>span {
  19104. color: #fff;
  19105. font-size: 12px;
  19106. }
  19107. .uploadFm>img {
  19108. width: 50px;
  19109. }
  19110. .fileCss {
  19111. width: 100%;
  19112. display: flex;
  19113. flex-direction: row;
  19114. flex-wrap: nowrap;
  19115. justify-content: space-around;
  19116. align-items: center;
  19117. padding-top: 15px;
  19118. }
  19119. .fileCss>div {
  19120. display: flex;
  19121. flex-direction: column;
  19122. align-items: center;
  19123. }
  19124. .fileCss .spanName {
  19125. margin-top: 10px;
  19126. }
  19127. .sysPicBox {
  19128. display: flex;
  19129. flex-direction: row;
  19130. flex-wrap: wrap;
  19131. align-content: flex-start;
  19132. height: 435px;
  19133. overflow: auto;
  19134. position: relative;
  19135. }
  19136. .picNone {
  19137. position: absolute;
  19138. left: 50%;
  19139. top: 45%;
  19140. transform: translate(-50%, -50%);
  19141. width: fit-content;
  19142. color: #9c9c9c;
  19143. }
  19144. .sysPic {
  19145. width: 200px;
  19146. height: 115px;
  19147. margin: 0 20px 20px 0;
  19148. cursor: pointer;
  19149. }
  19150. .sysPic>img,
  19151. .isSysPic>img,
  19152. .deletePic>img {
  19153. width: 100%;
  19154. height: 100%;
  19155. object-fit: cover;
  19156. }
  19157. .isSysPic {
  19158. width: 200px;
  19159. height: 115px;
  19160. position: relative;
  19161. }
  19162. .deletePic {
  19163. width: 20px;
  19164. height: 20px;
  19165. position: absolute;
  19166. top: 0;
  19167. right: 0;
  19168. cursor: pointer;
  19169. }
  19170. .select_box1 {
  19171. height: 100%;
  19172. }
  19173. .select_box1_img {
  19174. background: #fff;
  19175. border-radius: 5px;
  19176. padding: 15px;
  19177. box-sizing: border-box;
  19178. margin-bottom: 20px;
  19179. }
  19180. .select_box1_title {
  19181. padding: 0 0 15px 0;
  19182. border-bottom: 1px solid #eee;
  19183. margin-bottom: 15px;
  19184. }
  19185. .select_box1_title span:nth-child(1) {
  19186. font-size: 16px;
  19187. margin-right: 20px;
  19188. color: #000;
  19189. }
  19190. .select_box1_title span:nth-child(2) {
  19191. font-size: 14px;
  19192. color: rgb(112, 112, 112);
  19193. }
  19194. .select_box1_add_img {}
  19195. .select_box1_select {
  19196. background: #fff;
  19197. border-radius: 5px;
  19198. padding: 15px;
  19199. box-sizing: border-box;
  19200. height: calc(100% - 200px);
  19201. overflow: auto;
  19202. }
  19203. .select_box2 {
  19204. height: 100%;
  19205. }
  19206. .select_box2_title {
  19207. background: #fff;
  19208. border-radius: 5px;
  19209. padding: 5px 10px;
  19210. box-sizing: border-box;
  19211. margin-bottom: 10px;
  19212. }
  19213. .select_box2_box {
  19214. display: flex;
  19215. height: calc(100% - 30px);
  19216. }
  19217. .select_box2_img {
  19218. width: calc(100% - 310px);
  19219. height: 100%;
  19220. overflow: auto;
  19221. background: #fff;
  19222. border-radius: 5px;
  19223. }
  19224. .select_box2_img img {
  19225. width: 100%;
  19226. }
  19227. .select_box2_answer {
  19228. background: #fff;
  19229. margin-left: 10px;
  19230. border-radius: 5px;
  19231. width: 300px;
  19232. overflow: auto;
  19233. height: 100%;
  19234. display: flex;
  19235. flex-direction: column;
  19236. align-items: center;
  19237. padding-top: 10px;
  19238. box-sizing: border-box;
  19239. }
  19240. .select_box2_answer_box {
  19241. margin: 0 0 10px 0;
  19242. width: 85%;
  19243. }
  19244. .rate_textarea {
  19245. font: inherit;
  19246. color: currentColor;
  19247. width: 100%;
  19248. padding: 8px 14px;
  19249. display: block;
  19250. min-width: 0;
  19251. outline: none;
  19252. border: 1px solid rgba(0, 0, 0, 0.23);
  19253. border-radius: 4px;
  19254. box-sizing: border-box;
  19255. background: #fff;
  19256. margin: 0 20px 0 0;
  19257. resize: none;
  19258. }
  19259. .select_answer_title {
  19260. text-align: left;
  19261. width: 85%;
  19262. margin-bottom: 10px;
  19263. font-size: 18px;
  19264. color: #8e8e8e;
  19265. }
  19266. .mask {
  19267. background-color: rgb(0 0 0 / 30%);
  19268. /* position: fixed; */
  19269. position: absolute;
  19270. top: 0;
  19271. left: 0;
  19272. width: 100%;
  19273. height: 100%;
  19274. z-index: 90;
  19275. display: flex;
  19276. align-items: center;
  19277. justify-content: center;
  19278. }
  19279. .progressBox {
  19280. width: 300px;
  19281. height: 150px;
  19282. background: #fff;
  19283. border-radius: 10px;
  19284. box-shadow: 0 0 6px 1px #bfbfbf;
  19285. display: flex;
  19286. align-items: center;
  19287. justify-content: center;
  19288. flex-direction: column;
  19289. position: relative;
  19290. color: #6c6c6c;
  19291. }
  19292. .progressBox>>>.el-progress-bar__outer {
  19293. background-color: #d1dfff !important;
  19294. }
  19295. .progressBox .lbox {
  19296. height: 50px;
  19297. font-size: 19px;
  19298. display: flex;
  19299. align-items: center;
  19300. color: #747474;
  19301. }
  19302. .progressBox .lbox img {
  19303. width: 40px;
  19304. margin-right: 20px;
  19305. }
  19306. .closeCss {
  19307. position: absolute;
  19308. top: 8px;
  19309. right: 8px;
  19310. cursor: pointer;
  19311. width: 20px;
  19312. height: 20px;
  19313. }
  19314. .closeCss>img {
  19315. width: 100%;
  19316. height: 100%;
  19317. }
  19318. .updateTips::before {
  19319. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  19320. font-size: 14px;
  19321. margin-left: 20px;
  19322. font-weight: 400;
  19323. color: #ff3a3a;
  19324. margin-bottom: 10px;
  19325. display: block;
  19326. }
  19327. .updateMask {
  19328. width: 100%;
  19329. z-index: 3;
  19330. top: 0;
  19331. position: absolute;
  19332. /* background-color: rgba(0,0,0,.3); */
  19333. }
  19334. .t_j_box {
  19335. display: flex;
  19336. }
  19337. .t_j_box span:nth-child(1) {
  19338. width: 15%;
  19339. overflow: hidden;
  19340. margin-right: 10px;
  19341. text-overflow: ellipsis;
  19342. white-space: nowrap;
  19343. }
  19344. .t_j_box span:nth-child(2) {
  19345. width: 30%;
  19346. overflow: hidden;
  19347. text-overflow: ellipsis;
  19348. margin-right: 10px;
  19349. }
  19350. .t_j_box span:nth-child(3) {
  19351. max-width: calc(55% - 20px);
  19352. overflow: hidden;
  19353. text-overflow: ellipsis;
  19354. }
  19355. .sentenBox {
  19356. background: #fff;
  19357. height: 600px;
  19358. overflow: auto;
  19359. background-image: url("../../../assets/icon/conSentences/csBg.png");
  19360. background-position: 102%;
  19361. background-repeat: no-repeat;
  19362. background-size: 60%;
  19363. }
  19364. .sentenBox>.sentenContent {
  19365. padding-bottom: 10px;
  19366. width: 97%;
  19367. margin: 0 auto;
  19368. }
  19369. .sentenBox>.sentenContent+.sentenContent {
  19370. border-top: 1px solid #cbcbcb;
  19371. }
  19372. .addSen {
  19373. background: #409efe;
  19374. width: 90px;
  19375. color: #fff;
  19376. height: 35px;
  19377. text-align: center;
  19378. line-height: 35px;
  19379. border-radius: 5px;
  19380. float: right;
  19381. margin: 10px 20px 0 0;
  19382. cursor: pointer;
  19383. }
  19384. .sentenTop {
  19385. display: flex;
  19386. flex-direction: row;
  19387. flex-wrap: nowrap;
  19388. align-items: center;
  19389. }
  19390. .sentenTop::before {
  19391. content: attr(index);
  19392. background: #3681fc;
  19393. border-radius: 50%;
  19394. color: #fff;
  19395. width: 25px;
  19396. height: 25px;
  19397. min-width: 25px;
  19398. min-height: 25px;
  19399. text-align: center;
  19400. line-height: 25px;
  19401. margin-right: 5px;
  19402. }
  19403. .sentenTop>div:nth-child(2) {
  19404. width: 300px;
  19405. margin: 0 15px;
  19406. }
  19407. .sentenTop>div:nth-child(3) {
  19408. background: #409efe;
  19409. color: #fff;
  19410. width: 65px;
  19411. height: 35px;
  19412. text-align: center;
  19413. line-height: 35px;
  19414. border-radius: 5px;
  19415. cursor: pointer;
  19416. }
  19417. .cardList {
  19418. padding: 30px 0 20px 0;
  19419. display: flex;
  19420. flex-direction: row;
  19421. flex-wrap: wrap;
  19422. align-items: center;
  19423. box-sizing: border-box;
  19424. border-bottom: 1px solid #f4f4f4;
  19425. width: 98%;
  19426. margin: 0 auto;
  19427. }
  19428. .rightCardList {
  19429. display: flex;
  19430. flex-wrap: wrap;
  19431. }
  19432. .cardBox {
  19433. display: flex;
  19434. flex-direction: row;
  19435. flex-wrap: wrap;
  19436. align-items: center;
  19437. align-content: center;
  19438. }
  19439. .isCard,
  19440. .isCard1 {
  19441. width: auto;
  19442. padding: 0 20px;
  19443. height: 65px;
  19444. text-align: center;
  19445. line-height: 65px;
  19446. font-size: 14px;
  19447. cursor: pointer;
  19448. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  19449. background-size: 100% 100%;
  19450. position: relative;
  19451. z-index: 99;
  19452. }
  19453. .isCard1 {
  19454. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  19455. }
  19456. .isCard:hover .deleteWord {
  19457. display: block;
  19458. }
  19459. .isCard>div:nth-child(1),
  19460. .isCard1>div:nth-child(1) {
  19461. white-space: nowrap;
  19462. overflow: hidden;
  19463. text-overflow: ellipsis;
  19464. width: 100%;
  19465. margin: 0 auto;
  19466. }
  19467. .card {
  19468. width: 140px;
  19469. height: 65px;
  19470. }
  19471. .card>img {
  19472. width: 100%;
  19473. height: 100%;
  19474. }
  19475. .rightCardBox {
  19476. width: 98%;
  19477. margin: 10px auto 0;
  19478. }
  19479. .rightCardBox>div:nth-child(1) {
  19480. margin-bottom: 10px;
  19481. }
  19482. .cardCss {
  19483. display: flex;
  19484. flex-direction: column;
  19485. flex-wrap: nowrap;
  19486. align-items: center;
  19487. border-bottom: 3px solid #b4c3d3;
  19488. padding: 0 0 5px 0;
  19489. /* margin-right: 10px; */
  19490. }
  19491. .cardCss>div:nth-child(2) {
  19492. background: #5b7b9d;
  19493. color: #fff;
  19494. width: 20px;
  19495. height: 20px;
  19496. border-radius: 50%;
  19497. text-align: center;
  19498. line-height: 20px;
  19499. }
  19500. .sentenTopBox {
  19501. display: flex;
  19502. flex-direction: row;
  19503. flex-wrap: nowrap;
  19504. align-items: center;
  19505. justify-content: space-between;
  19506. padding: 55px 0 0 20px;
  19507. box-sizing: border-box;
  19508. width: 85%;
  19509. }
  19510. .rb_c_ai_box,
  19511. .stepsBottom {
  19512. width: 100%;
  19513. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  19514. /* background: #f7f7f7; */
  19515. border-radius: 10px;
  19516. overflow: hidden;
  19517. /* height: 100%; */
  19518. height: calc(100% - 55px);
  19519. }
  19520. .navTop {
  19521. background: #53749b;
  19522. color: #fff;
  19523. height: 40px;
  19524. line-height: 40px;
  19525. padding-left: 15px;
  19526. font-size: 18px;
  19527. }
  19528. .navBottom {
  19529. /* background: #6b91b7; */
  19530. height: 100%;
  19531. overflow: auto;
  19532. padding: 10px 0;
  19533. }
  19534. .navStage {
  19535. display: flex;
  19536. flex-direction: row;
  19537. flex-wrap: nowrap;
  19538. align-items: center;
  19539. padding: 10px 10px 10px 0;
  19540. cursor: pointer;
  19541. background: #ffffff;
  19542. width: 95%;
  19543. margin: 5px auto 5px;
  19544. box-sizing: border-box;
  19545. border-radius: 5px;
  19546. flex-wrap: wrap;
  19547. position: relative;
  19548. }
  19549. .navStage:hover>.chapter_upload_drag {
  19550. display: block;
  19551. }
  19552. .navTask:hover>.chapter_upload_drag {
  19553. display: block;
  19554. }
  19555. .chapter_upload:hover>.chapter_upload_drag {
  19556. display: block;
  19557. }
  19558. .navStage::before {
  19559. content: "";
  19560. display: block;
  19561. width: 16px;
  19562. height: 16px;
  19563. background-image: url(../../../assets/icon/new/icon_stage.png);
  19564. background-size: 100%;
  19565. margin-left: 25px;
  19566. }
  19567. .navStage .chapter_unit_open {
  19568. content: "";
  19569. display: block;
  19570. width: 16px;
  19571. height: 16px;
  19572. background-image: url(../../../assets/icon/new/down.png);
  19573. transform: rotate(-90deg);
  19574. background-size: 100%;
  19575. margin-left: 10px;
  19576. transition: all 0.5s;
  19577. }
  19578. .isNavStageOpen .chapter_unit_open {
  19579. transform: rotate(0deg);
  19580. }
  19581. .isNavStage {
  19582. background: #0061ff;
  19583. }
  19584. .isNavStage::before {
  19585. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  19586. }
  19587. .isNavStage .chapter_unit_open {
  19588. background-image: url(../../../assets/icon/new/downC.png);
  19589. }
  19590. .isNavStage .nt_taskName {
  19591. font-weight: bold !important;
  19592. color: #ffffff !important;
  19593. }
  19594. .isNavStage .nt_taskTitle {
  19595. font-weight: bold !important;
  19596. color: #fff !important;
  19597. }
  19598. .navStage .nt_taskBox {
  19599. width: calc(100% - 68px);
  19600. padding: 0 0 0 5px;
  19601. box-sizing: border-box;
  19602. box-sizing: border-box;
  19603. display: flex;
  19604. flex-direction: row;
  19605. flex-wrap: nowrap;
  19606. align-items: baseline;
  19607. }
  19608. .navStage .nt_taskTitle {
  19609. color: #060e17;
  19610. line-height: 25px;
  19611. font-size: 16px;
  19612. }
  19613. .navStage .nt_taskName {
  19614. max-width: calc(100% - 82px);
  19615. white-space: nowrap;
  19616. overflow: hidden;
  19617. text-overflow: ellipsis;
  19618. font-size: 16px;
  19619. color: #060e17;
  19620. }
  19621. .navTask {
  19622. display: flex;
  19623. flex-direction: row;
  19624. flex-wrap: nowrap;
  19625. align-items: center;
  19626. padding: 10px 10px 10px 0;
  19627. cursor: pointer;
  19628. background: #ffffff;
  19629. width: 95%;
  19630. margin: 5px auto 5px;
  19631. box-sizing: border-box;
  19632. border-radius: 5px;
  19633. flex-wrap: wrap;
  19634. position: relative;
  19635. }
  19636. .navTask .chapter_upload_open {
  19637. content: "";
  19638. display: block;
  19639. width: 16px;
  19640. height: 16px;
  19641. background-image: url(../../../assets/icon/new/icon_arrow.png);
  19642. background-size: 100%;
  19643. margin-left: 23px;
  19644. }
  19645. .noImage .chapter_upload_open {
  19646. display: none;
  19647. background-image: unset !important;
  19648. }
  19649. .isNavOpen .chapter_upload_open {
  19650. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  19651. transform: rotate(90deg);
  19652. }
  19653. .isNavTask .chapter_upload_open {
  19654. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  19655. transform: rotate(-90deg);
  19656. }
  19657. .isNavTask.isNavOpen .chapter_upload_open {
  19658. transform: rotate(0deg);
  19659. }
  19660. .dragOverTop {
  19661. border-top: 2px solid #0061ff !important;
  19662. border-radius: 0 !important;
  19663. margin-top: 10px;
  19664. }
  19665. .dragOverBottom {
  19666. border-bottom: 2px solid #0061ff !important;
  19667. border-radius: 0 !important;
  19668. margin-top: 10px;
  19669. }
  19670. .dragOverTop2 {
  19671. border-top: 2px solid #0061ff !important;
  19672. border-radius: 0 !important;
  19673. }
  19674. .dragOverBottom2 {
  19675. border-bottom: 2px solid #0061ff !important;
  19676. border-radius: 0 !important;
  19677. }
  19678. .isNavTask {
  19679. /* background: #3681FC; */
  19680. background: #eef3fb;
  19681. }
  19682. .isNavTask>.chapter_upload_drag {
  19683. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  19684. }
  19685. .isNavTask .nt_taskName {
  19686. /* color: #fff !important; */
  19687. font-weight: bold !important;
  19688. color: #0061ff !important;
  19689. }
  19690. .isNavTask .nt_taskTitle {
  19691. /* color: #AECCFE !important; */
  19692. font-weight: bold !important;
  19693. color: #0061ff !important;
  19694. }
  19695. .navTask .nt_taskBox {
  19696. width: calc(100% - 40px);
  19697. padding: 0 0 0 5px;
  19698. box-sizing: border-box;
  19699. box-sizing: border-box;
  19700. display: flex;
  19701. flex-direction: row;
  19702. flex-wrap: nowrap;
  19703. align-items: baseline;
  19704. }
  19705. .navTask .nt_taskTitle {
  19706. /* color: #717C8D; */
  19707. color: #060e17;
  19708. line-height: 25px;
  19709. font-size: 16px;
  19710. /* min-width: 66px; */
  19711. }
  19712. .navTask .nt_taskName {
  19713. /* color: #fff; */
  19714. /* max-width: 130px; */
  19715. /* width: 100%; */
  19716. max-width: calc(100% - 66px);
  19717. font-size: 16px;
  19718. color: #060e17;
  19719. /* color: #0E1E33; */
  19720. }
  19721. .navTask .nt_taskName span {
  19722. width: 100%;
  19723. white-space: nowrap;
  19724. overflow: hidden;
  19725. text-overflow: ellipsis;
  19726. display: block;
  19727. }
  19728. .gjBox {
  19729. width: calc(100% - 25px);
  19730. padding: 0 0 0 0;
  19731. box-sizing: border-box;
  19732. border-left: 1px solid #cad1dc;
  19733. margin-left: 25px;
  19734. }
  19735. .gjBox>div {
  19736. display: flex;
  19737. align-items: center;
  19738. }
  19739. .gjBox>div::before {
  19740. content: "";
  19741. height: 1px;
  19742. width: 10px;
  19743. background: #cad1dc;
  19744. display: block;
  19745. margin-right: 5px;
  19746. }
  19747. .gjCss {
  19748. display: flex;
  19749. flex-direction: row;
  19750. flex-wrap: nowrap;
  19751. align-items: center;
  19752. padding: 15px 0;
  19753. box-sizing: border-box;
  19754. font-size: 14px;
  19755. cursor: pointer;
  19756. }
  19757. .isGjCss {
  19758. color: #0061ff;
  19759. }
  19760. .groupBox {}
  19761. .groupContent+.groupContent {
  19762. margin-top: 30px;
  19763. }
  19764. .groupTitle {
  19765. font-size: 24px;
  19766. color: rgb(80, 80, 80);
  19767. margin-bottom: 20px;
  19768. }
  19769. .groupName {
  19770. display: flex;
  19771. align-items: center;
  19772. }
  19773. .groupn {
  19774. font-size: 15px;
  19775. margin-right: 10px;
  19776. }
  19777. .groupName+.groupName {
  19778. margin-top: 15px;
  19779. }
  19780. .groupBtn {
  19781. margin-left: 10px;
  19782. }
  19783. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  19784. text-align: left;
  19785. }
  19786. .radioBox>div {
  19787. margin: 10px 0 0 10px;
  19788. }
  19789. .radioBox>>>.el-radio__input,
  19790. .radioBox>>>.el-checkbox__inner {
  19791. margin-left: 10px;
  19792. }
  19793. .radioBox>>>.el-radio__label,
  19794. .radioBox>>>.el-checkbox__label {
  19795. display: flex;
  19796. align-items: center;
  19797. }
  19798. .inImg {
  19799. width: 50px;
  19800. }
  19801. .inImg>img {
  19802. width: 100%;
  19803. height: 100%;
  19804. object-fit: cover;
  19805. }
  19806. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  19807. height: auto;
  19808. padding: 10px;
  19809. margin: 0;
  19810. }
  19811. .upCss>>>.el-upload-list {
  19812. width: 100%;
  19813. }
  19814. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  19815. width: 100%;
  19816. height: 120px;
  19817. object-fit: contain;
  19818. background: unset;
  19819. margin-left: 0;
  19820. }
  19821. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  19822. display: none;
  19823. }
  19824. .tcMember+.tcMember::before {
  19825. content: "、";
  19826. }
  19827. .xzUpImg {
  19828. width: 25px;
  19829. height: 25px;
  19830. min-width: 25px;
  19831. min-height: 25px;
  19832. cursor: pointer;
  19833. margin: 0 10px;
  19834. }
  19835. .xzUpImg>img {
  19836. width: 100%;
  19837. height: 100%;
  19838. }
  19839. .closeCss {
  19840. position: absolute;
  19841. top: 8px;
  19842. right: 8px;
  19843. cursor: pointer;
  19844. width: 20px;
  19845. height: 20px;
  19846. }
  19847. .closeCss>img {
  19848. width: 100%;
  19849. height: 100%;
  19850. }
  19851. .moveBtn {
  19852. display: flex;
  19853. flex-direction: row;
  19854. flex-wrap: nowrap;
  19855. align-items: center;
  19856. width: 55px;
  19857. }
  19858. .timuUpImg {
  19859. display: flex;
  19860. flex-direction: row;
  19861. align-items: center;
  19862. width: 100%;
  19863. margin-right: 10px;
  19864. }
  19865. .timuUpImg>div:nth-child(1) {
  19866. margin-right: 10px;
  19867. display: flex;
  19868. align-items: center;
  19869. width: 100%;
  19870. }
  19871. .timuImgBox {
  19872. margin: 10px 0;
  19873. display: flex;
  19874. flex-direction: column;
  19875. flex-wrap: wrap;
  19876. align-items: flex-start;
  19877. }
  19878. .timuImg {
  19879. width: 100px;
  19880. margin: 5px 0;
  19881. cursor: pointer;
  19882. position: relative;
  19883. }
  19884. .timuImg:hover .deleteWord {
  19885. display: block;
  19886. }
  19887. .deleteWord {
  19888. width: 25px;
  19889. height: 25px;
  19890. position: absolute;
  19891. right: -5px;
  19892. top: -5px;
  19893. cursor: pointer;
  19894. display: none;
  19895. }
  19896. .timuImg>img,
  19897. .deleteWord>img {
  19898. width: 100%;
  19899. height: 100%;
  19900. object-fit: cover;
  19901. }
  19902. .e_add_delete {
  19903. cursor: pointer;
  19904. margin-left: 10px;
  19905. }
  19906. .pType_box {
  19907. margin-top: 30px;
  19908. align-items: flex-end;
  19909. }
  19910. .noneBox {
  19911. height: 200px;
  19912. width: 100%;
  19913. display: flex;
  19914. align-items: center;
  19915. justify-content: center;
  19916. flex-direction: column;
  19917. /* margin-top: 150px; */
  19918. }
  19919. .noneBox>img {
  19920. width: 95px;
  19921. }
  19922. .noneBox>span {
  19923. margin-top: 10px;
  19924. color: #717c8d;
  19925. }
  19926. .rb_c_box {
  19927. width: 100%;
  19928. height: 100%;
  19929. display: flex;
  19930. /* padding: 20px; */
  19931. box-sizing: border-box;
  19932. justify-content: space-between;
  19933. }
  19934. .rb_c_box_left {
  19935. height: 100%;
  19936. background: #fff;
  19937. width: 270px;
  19938. min-width: 270px;
  19939. border-radius: 8px;
  19940. margin-right: 10px;
  19941. }
  19942. .rb_c_box_right {
  19943. height: 100%;
  19944. width: calc(100%);
  19945. overflow: hidden;
  19946. }
  19947. .rb_c_box_btn {
  19948. display: flex;
  19949. justify-content: flex-start;
  19950. height: 50px;
  19951. align-items: center;
  19952. }
  19953. .rb_c_box_right>.basic_box {
  19954. /* background: #fff; */
  19955. border-radius: 0;
  19956. height: calc(100% - 0px);
  19957. overflow: auto;
  19958. padding: 0;
  19959. }
  19960. .textarea_css {
  19961. display: block;
  19962. resize: none;
  19963. padding: 10px 15px;
  19964. line-height: 1.5;
  19965. box-sizing: border-box;
  19966. width: 100%;
  19967. font-size: 14px;
  19968. color: #606266;
  19969. background-color: #fff;
  19970. background-image: none;
  19971. border: 1px solid #dcdfe6;
  19972. border-radius: 4px;
  19973. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  19974. outline: none;
  19975. overflow: hidden;
  19976. height: 46px;
  19977. font-family: "Microsoft YaHei";
  19978. }
  19979. .textarea_css::-webkit-input-placeholder {
  19980. color: #c0c4cc;
  19981. }
  19982. .textarea_css:focus {
  19983. border-color: #409eff;
  19984. outline: 0;
  19985. }
  19986. .addEditor>>>.text {
  19987. height: auto;
  19988. min-height: 100px;
  19989. }
  19990. .addEditor>>>.w-e-text-container {
  19991. min-height: 100px;
  19992. }
  19993. .moveBtn2 {
  19994. flex-direction: column;
  19995. width: fit-content;
  19996. margin: 0 10px 0 10px;
  19997. }
  19998. .moveBtn2 .chapter_upload_down,
  19999. .moveBtn2 .chapter_upload_up {
  20000. width: 16px;
  20001. height: 16px;
  20002. }
  20003. .moveBtn2 .chapter_upload_up::after,
  20004. .moveBtn2 .chapter_upload_down::after {
  20005. width: 10px;
  20006. height: 10px;
  20007. }
  20008. .fullStyle>>>.el-dialog__body {
  20009. height: calc(100% - 125px) !important;
  20010. box-sizing: border-box;
  20011. }
  20012. .fullStyle1>>>.el-dialog__body {
  20013. height: auto !important;
  20014. }
  20015. .fullStyle>>>.el-dialog {
  20016. width: 100% !important;
  20017. max-width: 100% !important;
  20018. height: 100% !important;
  20019. margin: 0 !important;
  20020. }
  20021. .fullStyle {
  20022. width: 100% !important;
  20023. max-width: 100% !important;
  20024. height: 100% !important;
  20025. margin: 0 auto !important;
  20026. }
  20027. .wb_j_box_btn {
  20028. width: calc(100% - 30px);
  20029. display: flex;
  20030. height: 40px;
  20031. border: 1.5px solid #cad1dc;
  20032. border-radius: 4px;
  20033. box-sizing: border-box;
  20034. align-items: center;
  20035. font-size: 14px;
  20036. cursor: pointer;
  20037. overflow: hidden;
  20038. }
  20039. .wb_j_box_btn:hover {
  20040. border: 1.5px solid #0061ff;
  20041. }
  20042. .wb_j_box_title {
  20043. background: #f0f4fa;
  20044. height: 100%;
  20045. line-height: 40px;
  20046. width: 90px;
  20047. text-align: center;
  20048. color: #060e17;
  20049. border-right: 1.5px solid #cad1dc;
  20050. box-sizing: border-box;
  20051. }
  20052. .wb_j_box_btn_c {
  20053. width: calc(100% - 90px);
  20054. padding: 0 35px 0 10px;
  20055. box-sizing: border-box;
  20056. position: relative;
  20057. }
  20058. .wb_j_box_span {
  20059. width: 100%;
  20060. overflow: hidden;
  20061. white-space: nowrap;
  20062. text-overflow: ellipsis;
  20063. word-wrap: break-word;
  20064. color: #717c8d;
  20065. }
  20066. .wb_j_box_arrow {
  20067. content: "";
  20068. width: 14px;
  20069. height: 14px;
  20070. background: url(../../../assets/icon/new/u_arrow.png);
  20071. background-size: 100% 100%;
  20072. position: absolute;
  20073. right: 12px;
  20074. top: 50%;
  20075. transform: translateY(-50%);
  20076. }
  20077. .check_classBox {
  20078. height: 400px;
  20079. display: flex;
  20080. border-top: 1.5px solid #e7ebf1;
  20081. border-bottom: 1.5px solid #e7ebf1;
  20082. }
  20083. .check_class_right {
  20084. width: 130px;
  20085. border-right: 1px solid #e7ebf1;
  20086. display: flex;
  20087. align-items: center;
  20088. flex-direction: column;
  20089. height: 100%;
  20090. overflow: auto;
  20091. padding: 15px 0;
  20092. box-sizing: border-box;
  20093. }
  20094. .check_class {
  20095. width: 85%;
  20096. border-radius: 5px;
  20097. height: 30px;
  20098. min-height: 30px;
  20099. line-height: 30px;
  20100. text-align: center;
  20101. padding: 0 10px;
  20102. box-sizing: border-box;
  20103. cursor: pointer;
  20104. white-space: nowrap;
  20105. overflow: hidden;
  20106. text-overflow: ellipsis;
  20107. }
  20108. .check_class.activeX {
  20109. background: #e0eafb;
  20110. color: #3681fc;
  20111. font-weight: 700;
  20112. }
  20113. .check_class+.check_class {
  20114. margin-top: 15px;
  20115. }
  20116. .check_class_left {
  20117. background: #fafafa;
  20118. width: calc(100% - 130px);
  20119. padding: 15px;
  20120. box-sizing: border-box;
  20121. }
  20122. .check_class_all_box {
  20123. display: flex;
  20124. margin-bottom: 10px;
  20125. }
  20126. .all_check {
  20127. display: flex;
  20128. align-items: center;
  20129. padding: 2px 0 0;
  20130. margin-left: 10px;
  20131. }
  20132. .all_check>>>.el-checkbox__label {
  20133. line-height: 18px;
  20134. }
  20135. .check_class_left_title {
  20136. font-size: 16px;
  20137. font-weight: 700;
  20138. }
  20139. .check_class_item {
  20140. display: flex;
  20141. flex-wrap: wrap;
  20142. height: calc(100% - 45px);
  20143. overflow: auto;
  20144. justify-content: flex-start;
  20145. align-items: flex-start;
  20146. align-content: flex-start;
  20147. }
  20148. .class_item:first-child {
  20149. /* margin: 0 15px 15px 67px; */
  20150. }
  20151. .class_item {
  20152. margin: 0 15px 15px 0;
  20153. }
  20154. .class_item:hover>>>.el-checkbox__label {
  20155. color: #409eff;
  20156. }
  20157. .class_item>>>.el-checkbox__label {
  20158. color: #0e1e33;
  20159. }
  20160. .class_item:hover>>>.el-checkbox__inner {
  20161. border-color: #409eff;
  20162. }
  20163. .class_item>>>.el-checkbox,
  20164. .class_item>>>.el-checkbox__input {
  20165. display: flex;
  20166. align-items: center;
  20167. }
  20168. .taskTitle {
  20169. font-size: 20px;
  20170. font-weight: bold;
  20171. margin-bottom: 35px;
  20172. }
  20173. .taskTitle:after {
  20174. content: "";
  20175. width: 100%;
  20176. display: block;
  20177. height: 1px;
  20178. background: #cad1dc;
  20179. position: absolute;
  20180. left: 0;
  20181. margin: 15px 0 0;
  20182. }
  20183. .eva_btn_box {
  20184. margin: 20px 0px 0 0;
  20185. display: flex;
  20186. flex-direction: row;
  20187. flex-wrap: nowrap;
  20188. align-items: center;
  20189. justify-content: space-between;
  20190. width: 100%;
  20191. }
  20192. .eva_btn_left_box {
  20193. display: flex;
  20194. flex-direction: row;
  20195. flex-wrap: nowrap;
  20196. align-items: center;
  20197. }
  20198. .addTypeChoose {
  20199. display: flex;
  20200. flex-direction: row;
  20201. flex-wrap: nowrap;
  20202. align-items: center;
  20203. margin: 15px 0;
  20204. }
  20205. .addTypeBox {
  20206. display: flex;
  20207. flex-direction: column;
  20208. flex-wrap: nowrap;
  20209. align-items: center;
  20210. }
  20211. .addTypeChoose {
  20212. display: flex;
  20213. flex-direction: row;
  20214. flex-wrap: nowrap;
  20215. align-items: center;
  20216. margin: 15px 0;
  20217. }
  20218. .buchong_box {
  20219. background: #E0EAFB66;
  20220. width: calc(100% - 20px);
  20221. min-height: 50px;
  20222. display: flex;
  20223. align-items: center;
  20224. justify-content: center;
  20225. margin: 0 auto;
  20226. }
  20227. .outline {
  20228. width: calc(100% - 40px);
  20229. margin: 0 auto;
  20230. }
  20231. .task_outline {
  20232. width: calc(100% - 40px);
  20233. margin: 0 auto;
  20234. }
  20235. .outline_box+.outline_box {
  20236. margin: 30px 0 0px;
  20237. }
  20238. .outline_task {
  20239. display: flex;
  20240. align-items: center;
  20241. margin-bottom: 10px;
  20242. }
  20243. .outline_task .title {
  20244. font-size: 18px;
  20245. font-weight: bold;
  20246. min-width: 80px;
  20247. }
  20248. .op_task_box,
  20249. .op_tool_box,
  20250. .outline_detail {
  20251. position: relative;
  20252. }
  20253. .op_task_box:hover .op_box,
  20254. .op_tool_box:hover .op_box,
  20255. .outline_detail:hover .op_box {
  20256. display: flex
  20257. }
  20258. .op_box {
  20259. position: absolute;
  20260. bottom: 10px;
  20261. display: none;
  20262. align-items: center;
  20263. justify-content: space-between;
  20264. width: calc(100% - 20px);
  20265. left: 50%;
  20266. transform: translateX(-50%);
  20267. }
  20268. .op_box .op_remark {
  20269. color: #8E8E8E;
  20270. font-size: 14px;
  20271. }
  20272. .rb_c_nav {
  20273. width: calc(100% - 20px);
  20274. margin: 15px auto 0;
  20275. font-size: 18px;
  20276. }
  20277. .rb_c_nav span {
  20278. cursor: pointer;
  20279. }
  20280. .rb_c_nav span+span {
  20281. margin-left: 10px;
  20282. }
  20283. .rb_c_nav span.active {
  20284. color: #0061FF
  20285. }
  20286. .text_panel>>>.text {
  20287. height: 400px;
  20288. }
  20289. .markBox{
  20290. padding: 20px 14px;
  20291. line-height: 29px;
  20292. font-size: 16px;
  20293. background: #f4f4f4;
  20294. border-radius: 5px;
  20295. }
  20296. .info_box_t{
  20297. display: flex;
  20298. align-items: center;
  20299. }
  20300. .info_box_t_box{
  20301. display: flex;
  20302. align-items: center;
  20303. }
  20304. .info_box_t_box + .info_box_t_box{
  20305. margin-left: 10px;
  20306. }
  20307. .info_box_t_box > span{
  20308. width: fit-content
  20309. }
  20310. .info_box_t_box > input{
  20311. width: 150px !important;
  20312. margin: 0 5px 0 0;
  20313. }
  20314. </style>