addCourse.vue 715 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748
  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')"
  368. @click="openAiDialog(2, 'aiDetail')">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%)">
  373. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  374. placeholder="请输入课程简要描述"></textarea>
  375. </div>
  376. </div>
  377. </div>
  378. </div>
  379. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;">
  380. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  381. <div class="c_info_title">
  382. 补充资料
  383. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  384. </div>
  385. <div class="buchong_box">
  386. <span>暂时还没有内容,快去添加吧~</span>
  387. </div>
  388. </div> -->
  389. <div style="position: relative;
  390. background: #fff;
  391. box-sizing: border-box;
  392. padding: 1px 20px 10px;
  393. width: 100%;
  394. border-radius: 10px;">
  395. <div style="
  396. display: flex;
  397. flex-direction: row;
  398. justify-content: space-between;
  399. align-items: center;
  400. " :style="{
  401. margin: true
  402. ? '20px 0 10px'
  403. : '20px 0 0',
  404. }">
  405. <div style="margin-bottom: 10px;width:100%" class="lineTitle">
  406. 补充资料
  407. <div class="add_info_box" style="margin: 0 0 0 auto">
  408. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  409. 上传补充资料
  410. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  411. beforeUploadInfo2(
  412. $event,
  413. 13
  414. )
  415. " />
  416. </button>
  417. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  418. 图文
  419. </button>
  420. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  421. 链接
  422. </button>
  423. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  424. 代码
  425. </button>
  426. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  427. 资源
  428. </button> -->
  429. </div>
  430. </div>
  431. </div>
  432. <div>
  433. <div class="add_chapters_box add_c_none" v-if="
  434. infoData &&
  435. infoData.length == 0
  436. ">
  437. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  438. </div>
  439. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  440. <div @dragstart="
  441. dragStart(item1, index1, 0)
  442. " @dragover.prevent="
  443. dragOver(index1, 0)
  444. " @dragend="dragEnd()" :draggable="isdrag ==
  445. 'chapter-' + 0 + '-' + index1
  446. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  447. getChapterData(
  448. $event,
  449. index1,
  450. item1.type
  451. )
  452. " :class="{
  453. dragOverTop2:
  454. newIndex === index1 &&
  455. typeIndex ==
  456. 'chapter-' +
  457. 0 +
  458. '-' +
  459. index1 &&
  460. oldIndex > index1 &&
  461. dragType == 'drag',
  462. dragOverBottom2:
  463. newIndex === index1 &&
  464. typeIndex ==
  465. 'chapter-' +
  466. 0 +
  467. '-' +
  468. index1 &&
  469. oldIndex < index1 &&
  470. dragType == 'drag',
  471. }">
  472. <!-- <div @mousedown="
  473. isdrag =
  474. 'chapter-' + 0 + '-' + index1
  475. " @mouseup="isdrag = ''" @touchstart="
  476. isdrag =
  477. 'chapter-' + 0 + '-' + index1
  478. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  479. <div class="chapter_upload_o" style="
  480. position: relative;
  481. display: flex;
  482. align-items: center;
  483. ">
  484. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  485. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  486. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  487. </div>
  488. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  489. </div>
  490. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  491. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  494. </div>
  495. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  496. </div>
  497. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  498. </div>
  499. </div>
  500. <div class="chapter_upload_n">
  501. <input readonly="true" v-if="
  502. item1.type == 2 ||
  503. item1.type == 3 ||
  504. item1.type == 12 ||
  505. item1.type == 13 ||
  506. item1.type == 7
  507. " :placeholder="item1.name" @click="
  508. updataVideoT(
  509. $event,
  510. index1
  511. )
  512. " style="
  513. border: none;
  514. outline: none;
  515. width: 80%;
  516. minwidth: 215px;
  517. z-index: 99;
  518. font-size: 14px;
  519. white-space: nowrap;
  520. overflow: hidden;
  521. text-overflow: ellipsis;
  522. " />
  523. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  524. border: none;
  525. outline: none;
  526. width: 80%;
  527. white-space: nowrap;
  528. overflow: hidden;
  529. text-overflow: ellipsis;
  530. " readonly="true" @click="
  531. selectAttText(index1)
  532. " />
  533. <input :placeholder="item1.title ? item1.title : '链接'
  534. " v-if="item1.type == 8" style="
  535. border: none;
  536. outline: none;
  537. width: 80%;
  538. white-space: nowrap;
  539. overflow: hidden;
  540. text-overflow: ellipsis;
  541. " readonly="true" @click="selectLine(index1)" />
  542. <input :placeholder="item1.title ? item1.title : '链接'
  543. " v-if="item1.type == 14" style="
  544. border: none;
  545. outline: none;
  546. width: 80%;
  547. white-space: nowrap;
  548. overflow: hidden;
  549. text-overflow: ellipsis;
  550. " readonly="true" @click="
  551. openUpdateSource(index1)
  552. " />
  553. </div>
  554. <div class="chapter_upload_ic">
  555. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  556. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  557. <div class="chapter_upload_up" @click="
  558. upCd(
  559. $event,
  560. index1
  561. )
  562. "></div>
  563. <div class="chapter_upload_down" @click="
  564. downCd(
  565. $event,
  566. index1
  567. )
  568. "></div>
  569. </div>
  570. <div class="chapter_upload_ic_edit" v-if="
  571. item1.type == 2 ||
  572. item1.type == 3 ||
  573. item1.type == 12 ||
  574. item1.type == 13 ||
  575. item1.type == 7
  576. " @click.stop="
  577. updataVideoT(
  578. $event,
  579. index1
  580. )
  581. ">
  582. <div></div>
  583. </div>
  584. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  585. selectAttText(index1)
  586. ">
  587. <div></div>
  588. </div>
  589. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  590. @click="selectLine(index1)">
  591. <div></div>
  592. </div>
  593. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  594. openUpdateSource(index1)
  595. ">
  596. <div></div>
  597. </div> -->
  598. <div class="chapter_upload_ic_r" @click.stop="
  599. deleteInfoData(
  600. $event,
  601. index1
  602. )
  603. ">
  604. <div></div>
  605. </div>
  606. </div>
  607. </div>
  608. </div>
  609. </div>
  610. </div>
  611. <div v-if="
  612. infoproVisible
  613. " class="mask">
  614. <div class="progressBox">
  615. <!-- <div id="closePro" class="closeCss">
  616. <img src="../../../../assets/icon/close.png" alt />
  617. </div> -->
  618. <div class="lbox">
  619. <img src="../../../assets/loading.gif" />上传中,请稍后
  620. </div>
  621. <div style="margin-bottom: 10px">
  622. <span>{{
  623. infoisFinishSize
  624. }}M</span>
  625. /
  626. <span>{{
  627. infoisAllSize
  628. }}M</span>
  629. </div>
  630. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  631. ? infoprogress
  632. : 0
  633. " style="width: 80%"></el-progress>
  634. </div>
  635. </div>
  636. </div>
  637. </div>
  638. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="false">
  639. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  640. <div class="c_info_title">
  641. 补充描述
  642. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  643. </div>
  644. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  645. <div style="width: calc(100%)">
  646. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  647. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  648. </div>
  649. </div>
  650. </div>
  651. </div>
  652. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && isOutline">
  653. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  654. <div class="c_info_title">
  655. 课程大纲
  656. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  657. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  658. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  659. @click="openAiDialog(2, 'aiOutline')">生成大纲</button>
  660. </el-tooltip>
  661. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  662. </div>
  663. <div class="task_outline">
  664. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  665. <div class="outline_task">
  666. <div class="title">任务{{ index + 1 }}</div>
  667. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  668. v-model="item.task" />
  669. </div>
  670. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  671. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  672. placeholder="请输入任务描述" v-model="item.taskDetail2"></textarea>
  673. <div class="op_box">
  674. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  675. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  676. <div class="r_pub_button_op"
  677. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  678. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  679. </el-tooltip>
  680. </div>
  681. </div>
  682. </div>
  683. </div>
  684. </div>
  685. </div>
  686. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
  687. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  688. <div class="c_info_title">
  689. 概念群
  690. </div>
  691. <div class="task_outline">
  692. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  693. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  694. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  695. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  696. <div class="op_box">
  697. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  698. <div style="display: flex;">
  699. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  700. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  701. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  702. </el-tooltip>
  703. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  704. cpote.cpote1s ? '确定' : '编辑'}}</div>
  705. </div>
  706. </div>
  707. </div>
  708. </div>
  709. </div>
  710. </div>
  711. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
  712. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  713. <div class="c_info_title">
  714. 问题链
  715. </div>
  716. <div class="task_outline">
  717. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  718. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  719. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  720. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  721. <div class="op_box">
  722. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  723. <div style="display: flex;">
  724. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  725. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  726. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  727. </el-tooltip>
  728. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  729. cpote.cpote2s ? '确定' : '编辑'}}</div>
  730. </div>
  731. </div>
  732. </div>
  733. </div>
  734. </div>
  735. </div>
  736. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
  737. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  738. <div class="c_info_title">
  739. 目标层
  740. </div>
  741. <div class="task_outline">
  742. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  743. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  744. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  745. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  746. <div class="op_box">
  747. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  748. <div style="display: flex;">
  749. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  750. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  751. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  752. </el-tooltip>
  753. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  754. cpote.cpote3s ? '确定' : '编辑'}}</div>
  755. </div>
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. </div>
  761. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
  762. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  763. <div class="c_info_title">
  764. 任务簇
  765. </div>
  766. <div class="task_outline">
  767. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  768. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  769. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  770. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  771. <div class="op_box">
  772. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  773. <div style="display: flex;">
  774. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  775. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  776. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  777. </el-tooltip>
  778. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  779. cpote.cpote4s ? '确定' : '编辑'}}</div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. </div>
  786. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  787. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  788. <div class="c_info_title">
  789. 教案
  790. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length">
  791. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  792. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  793. @click="openAiDialog(2, 'aiTeacher2')" v-if="istemplate == 1 && dArray.length">生成教案</button>
  794. </el-tooltip>
  795. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  796. </div>
  797. <div class="task_outline">
  798. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  799. <div class="outline_task">
  800. <div class="title">任务{{ index + 1 }}</div>
  801. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  802. v-model="item.task" />
  803. </div>
  804. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  805. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  806. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  807. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  808. <div class="op_box">
  809. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  810. <div style="display: flex;">
  811. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  812. <div class="r_pub_button_op"
  813. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  814. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  815. </el-tooltip>
  816. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  817. item.isTask3 ? '确定' : '编辑'}}</div>
  818. </div>
  819. </div>
  820. </div>
  821. </div>
  822. </div>
  823. </div>
  824. </div>
  825. <div class="info_btnBox3" v-if="istemplate != 1">
  826. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  827. goTo(
  828. '/course?userid=' +
  829. userid +
  830. '&oid=' +
  831. oid +
  832. '&org=' +
  833. org +
  834. '&role=' +
  835. role
  836. )
  837. ">
  838. 返回课程
  839. </button>
  840. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  841. {{ steps == 4 ? "返回课程" : "上一步" }}
  842. </button>
  843. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  844. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  845. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5'" :class="{
  846. pub_btn_next_img: steps != 3,
  847. pub_btn_finish_img: steps == 3,
  848. }">
  849. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  850. </button>
  851. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  852. @contextmenu.prevent="nextSteps(1)" :class="{
  853. pub_btn_next_img: steps != 3,
  854. pub_btn_finish_img: steps == 3,
  855. }">
  856. {{ steps == 3 ? "确认上传" : (templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && cpoteType < 4) ?
  857. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  858. : "下一步" }}
  859. </button>
  860. </el-tooltip>
  861. </div>
  862. </div>
  863. <div class="rightBox" v-if="steps == 2" :style="{
  864. height:
  865. !isStepDisplay && !isBtnDisplay
  866. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  867. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  868. }">
  869. <div class="basic_box" style="
  870. padding: 20px 30px 0px !important;
  871. box-sizing: border-box;
  872. height: calc(100% - 80px);
  873. overflow: auto;
  874. background: #fff;
  875. ">
  876. <!-- <div
  877. style="
  878. color: #b8b8b8;
  879. background: #fff;
  880. width: 26%;
  881. height: 40px;
  882. border-radius: 15px;
  883. padding-left: 20px;
  884. line-height: 40px;
  885. font-size: 17px;
  886. box-shadow: 0px 1px 2px 2px #e0e0e0;
  887. "
  888. >-->
  889. <div class="right_title" style="border: none; margin: 0; padding: 0">
  890. 请选择合适的课程模板
  891. </div>
  892. <div class="wordbox">
  893. <div class="wordTeacher" @click="checkTemplate2()">
  894. <div class="wordPic">
  895. <img src="../../../assets/icon/new/template_none.png" alt />
  896. </div>
  897. <div style="
  898. margin-top: 10px;
  899. line-height: 19px;
  900. overflow: hidden;
  901. text-overflow: ellipsis;
  902. white-space: nowrap;
  903. padding: 0 20px;
  904. ">
  905. 空白模板
  906. </div>
  907. </div>
  908. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  909. <div class="wordPic">
  910. <img src="../../../assets/icon/new/template.png" alt />
  911. </div>
  912. <div style="
  913. margin-top: 10px;
  914. line-height: 19px;
  915. overflow: hidden;
  916. text-overflow: ellipsis;
  917. white-space: nowrap;
  918. padding: 0 20px;
  919. ">
  920. {{ aa.title }}
  921. </div>
  922. </div>
  923. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  924. <div class="wordPic">
  925. <img src="../../../assets/icon/new/template.png" alt />
  926. </div>
  927. <div style="
  928. margin-top: 10px;
  929. line-height: 19px;
  930. overflow: hidden;
  931. text-overflow: ellipsis;
  932. white-space: nowrap;
  933. padding: 0 20px;
  934. ">
  935. 简易模板
  936. </div>
  937. </div>
  938. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  939. <div class="wordPic">
  940. <img src="../../../assets/icon/new/template.png" alt />
  941. </div>
  942. <div style="
  943. margin-top: 10px;
  944. line-height: 19px;
  945. overflow: hidden;
  946. text-overflow: ellipsis;
  947. white-space: nowrap;
  948. padding: 0 20px;
  949. ">
  950. 智能粘贴模式
  951. </div>
  952. </div>
  953. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  954. <div class="wordPic">
  955. <img src="../../../assets/icon/wordMub.png" alt />
  956. </div>
  957. <div style="
  958. margin-top: 10px;
  959. line-height: 19px;
  960. overflow: hidden;
  961. text-overflow: ellipsis;
  962. white-space: nowrap;
  963. padding: 0 20px;
  964. ">
  965. 未来小学课程设计
  966. </div>
  967. </div> -->
  968. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  969. <div class="wordPic">
  970. <img src="../../../assets/icon/wordMub.png" alt />
  971. </div>
  972. <div style="
  973. margin-top: 10px;
  974. line-height: 19px;
  975. overflow: hidden;
  976. text-overflow: ellipsis;
  977. white-space: nowrap;
  978. padding: 0 20px;
  979. ">
  980. 我的课程
  981. </div>
  982. </div> -->
  983. </div>
  984. </div>
  985. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  986. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  987. goTo(
  988. '/course?userid=' +
  989. userid +
  990. '&oid=' +
  991. oid +
  992. '&org=' +
  993. org +
  994. '&role=' +
  995. role
  996. )
  997. ">
  998. 返回课程
  999. </button>
  1000. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1001. {{ steps == 4 ? "返回课程" : "上一步" }}
  1002. </button>
  1003. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1004. pub_btn_next_img: steps != 3,
  1005. pub_btn_finish_img: steps == 3,
  1006. }">
  1007. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1008. </button>
  1009. </div>
  1010. </div>
  1011. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1012. height:
  1013. !isStepDisplay && !isBtnDisplay
  1014. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1015. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1016. }">
  1017. <div class="rb_c_box">
  1018. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1019. <div class="rb_c_nav">
  1020. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1021. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1022. </div>
  1023. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1024. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1025. position: istemplate == 1 ? 'sticky' : 'unset',
  1026. top: istemplate == 1 ? '0' : 'unset'
  1027. }">
  1028. <!-- <div class="navTop">辅助导航</div> -->
  1029. <div class="navBottom" v-if="courseState == 4">
  1030. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1031. <div class="nt_taskBox" style="width: 100%;">
  1032. <div class="nt_taskTitle"
  1033. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1034. unitIndex + 1 }}</div>
  1035. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1036. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1037. <span>{{ unitJson[unitIndex].dyName }}</span>
  1038. </el-tooltip>
  1039. </div>
  1040. </div>
  1041. </div> -->
  1042. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1043. .taskJson" :key="tIndex" :class="{
  1044. dragOverTop:
  1045. newIndex === tIndex &&
  1046. typeIndex == 'task-' + tIndex &&
  1047. oldIndex > tIndex &&
  1048. dragType == 'task',
  1049. dragOverBottom:
  1050. newIndex === tIndex &&
  1051. typeIndex == 'task-' + tIndex &&
  1052. oldIndex < tIndex &&
  1053. dragType == 'task',
  1054. }">
  1055. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1056. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1057. class="navTask" :class="{
  1058. isNavTask:
  1059. isClickColor > 0 && isClickColor == tIndex + 1,
  1060. isNavOpen: t.toolOpen,
  1061. }">
  1062. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1063. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1064. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1065. class="chapter_upload_drag"></div>
  1066. <div class="nt_taskBox">
  1067. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1068. <div class="nt_taskName">
  1069. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1070. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1071. </el-tooltip>
  1072. </div>
  1073. </div>
  1074. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1075. 1
  1076. ">
  1077. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1078. @click.stop="taskMove(1, tIndex)"></div>
  1079. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1080. @click.stop="taskMove(2, tIndex)"></div>
  1081. </div> -->
  1082. </div>
  1083. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1084. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1085. @click="jumpGj(tIndex, toolIndex2)">
  1086. <div class="gjCss" :class="{
  1087. isGjCss:
  1088. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1089. }">
  1090. <div>工具{{ toolIndex2 + 1 }}:</div>
  1091. <div>
  1092. {{
  1093. toolsData[tool.tool[0]] &&
  1094. toolsData[tool.tool[0]].name
  1095. }}
  1096. </div>
  1097. </div>
  1098. </div>
  1099. </div>
  1100. </div>
  1101. </div>
  1102. <div class="navBottom" v-if="courseState == 1">
  1103. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1104. dragOverTop:
  1105. newIndex === stageIndex &&
  1106. typeIndex == 'Unit-' + stageIndex &&
  1107. oldIndex > stageIndex &&
  1108. dragType == 'Unit',
  1109. dragOverBottom:
  1110. newIndex === stageIndex &&
  1111. typeIndex == 'Unit-' + stageIndex &&
  1112. oldIndex < stageIndex &&
  1113. dragType == 'Unit',
  1114. }">
  1115. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1116. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1117. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1118. isNavStage: stageIndex == unitIndex,
  1119. isNavStageOpen: stage.toolOpen,
  1120. }">
  1121. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1122. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1123. class="chapter_upload_drag"></div>
  1124. <div class="nt_taskBox">
  1125. <div class="nt_taskTitle">
  1126. 第{{ stageIndex + 1 }}阶段:
  1127. </div>
  1128. <div class="nt_taskName">
  1129. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1130. " placement="top">
  1131. <span>{{
  1132. stage.dyName ? stage.dyName : "未命名阶段"
  1133. }}</span>
  1134. </el-tooltip>
  1135. </div>
  1136. </div>
  1137. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1138. </div>
  1139. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1140. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1141. dragOverTop:
  1142. newIndex === tIndex &&
  1143. typeIndex == 'task-' + tIndex &&
  1144. ((oldIndex > tIndex &&
  1145. stageIndex == checkUnitIndex) ||
  1146. (oldIndex == tIndex &&
  1147. stageIndex == checkUnitIndex &&
  1148. checkUnitIndex != oldUnitIndex)) &&
  1149. dragType == 'task',
  1150. dragOverBottom:
  1151. newIndex === tIndex &&
  1152. typeIndex == 'task-' + tIndex &&
  1153. oldIndex < tIndex &&
  1154. stageIndex == checkUnitIndex &&
  1155. dragType == 'task',
  1156. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1157. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1158. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1159. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1160. isNavTask:
  1161. isClickColor > 0 &&
  1162. isClickColor == tIndex + 1 &&
  1163. stageIndex == unitIndex,
  1164. isNavOpen: t.toolOpen,
  1165. }">
  1166. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1167. <div @mousedown="
  1168. isdrag = 'task-' + stageIndex + '-' + tIndex
  1169. " @mouseup="isdrag = ''" @touchstart="
  1170. isdrag = 'task-' + stageIndex + '-' + tIndex
  1171. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1172. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1173. <div class="nt_taskTitle">
  1174. 任务{{ tIndex + 1 }}:
  1175. </div>
  1176. <div class="nt_taskName">
  1177. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1178. <span>{{
  1179. t.task ? t.task : "未命名任务"
  1180. }}</span>
  1181. </el-tooltip>
  1182. </div>
  1183. </div>
  1184. </div>
  1185. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1186. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1187. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1188. <div class="gjCss" :class="{
  1189. isGjCss:
  1190. toolIndexType ==
  1191. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1192. }">
  1193. <div>工具{{ toolIndex2 + 1 }}:</div>
  1194. <div>
  1195. {{
  1196. toolsData[tool.tool[0]] &&
  1197. toolsData[tool.tool[0]].name
  1198. }}
  1199. </div>
  1200. </div>
  1201. </div>
  1202. </div>
  1203. </div>
  1204. </div>
  1205. </div>
  1206. </div>
  1207. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1208. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1209. </div>
  1210. </div>
  1211. <div class="rb_c_box_right">
  1212. <!-- <div class="rb_c_box_btn">
  1213. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1214. </div> -->
  1215. <div class="basic_box" ref="unitBox">
  1216. <div v-if="false" style="
  1217. display: flex;
  1218. flex-direction: row;
  1219. align-items: center;
  1220. position: sticky;
  1221. top: 0;
  1222. z-index: 99;
  1223. width: 100%;
  1224. padding: 0 20px 0 20px;
  1225. box-sizing: border-box;
  1226. background: #fff;
  1227. border-radius: 8px;
  1228. ">
  1229. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1230. <div class="cru_selectBox" :style="{
  1231. maxWidth: isPasteTask
  1232. ? 'calc(100% - 335px)'
  1233. : 'calc(100% - 190px)',
  1234. }" v-if="courseState == 1">
  1235. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1236. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1237. <!-- item.dyName ? item.dyName : -->
  1238. <span v-if="
  1239. unitJson[unitJson.length - 1].easy == 4 ||
  1240. unitJson[unitJson.length - 1].easy == 6
  1241. ">{{
  1242. item.dyName
  1243. ? item.dyName
  1244. : "第" + (index + 1) + "阶段"
  1245. }}</span>
  1246. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1247. </div>
  1248. <div class="cru_line" :style="{
  1249. left: offsetLetfPx + 'px',
  1250. }"></div>
  1251. </div>
  1252. <div class="addStageImg" @click="addunit()" v-if="
  1253. !(unitJson[unitJson.length - 1].easy == 4) &&
  1254. !(unitJson[unitJson.length - 1].easy == 6) &&
  1255. courseState == 1
  1256. ">
  1257. <img src="../../../assets/icon/new/addStage.png" alt />
  1258. </div>
  1259. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1260. v-if="courseState == 2" style="margin: 15px 0">
  1261. 新建阶段
  1262. </button>
  1263. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1264. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1265. 阶段顺序
  1266. </button>
  1267. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1268. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1269. 智能粘贴
  1270. </button>
  1271. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1272. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1273. }" style="padding: 0 12px">
  1274. 选择课程模板
  1275. </button>
  1276. </div>
  1277. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1278. :key="index">
  1279. <div style="position: relative;
  1280. background: #fff;
  1281. box-sizing: border-box;
  1282. padding: 1px 20px 10px;
  1283. width: 100%;
  1284. border-radius: 10px;">
  1285. <div style="
  1286. display: flex;
  1287. flex-direction: row;
  1288. justify-content: space-between;
  1289. align-items: center;
  1290. " :style="{
  1291. margin: !item.taskJson[0].isFoldchapter
  1292. ? '20px 0 10px'
  1293. : '20px 0 0',
  1294. }">
  1295. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1296. 学习内容
  1297. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1298. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1299. @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
  1300. @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
  1301. </el-tooltip>
  1302. </div>
  1303. </div>
  1304. <div>
  1305. <div class="add_chapters_box add_c_none" v-if="
  1306. item.taskJson[0].chapterData &&
  1307. item.taskJson[0].chapterData.length == 0
  1308. ">
  1309. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1310. </div>
  1311. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1312. <div @dragstart="
  1313. dragStart(item1, index1, 0)
  1314. " @dragover.prevent="
  1315. dragOver(index1, 0)
  1316. " @dragend="dragEnd()" :draggable="isdrag ==
  1317. 'chapter-' + 0 + '-' + index1
  1318. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1319. :key="item1.id" @click="
  1320. getChapterData(
  1321. $event,
  1322. unitIndex,
  1323. index,
  1324. index1,
  1325. item1.type
  1326. )
  1327. " :class="{
  1328. dragOverTop2:
  1329. newIndex === index1 &&
  1330. typeIndex ==
  1331. 'chapter-' +
  1332. 0 +
  1333. '-' +
  1334. index1 &&
  1335. oldIndex > index1 &&
  1336. dragType == 'drag',
  1337. dragOverBottom2:
  1338. newIndex === index1 &&
  1339. typeIndex ==
  1340. 'chapter-' +
  1341. 0 +
  1342. '-' +
  1343. index1 &&
  1344. oldIndex < index1 &&
  1345. dragType == 'drag',
  1346. }">
  1347. <div @mousedown="
  1348. isdrag =
  1349. 'chapter-' + 0 + '-' + index1
  1350. " @mouseup="isdrag = ''" @touchstart="
  1351. isdrag =
  1352. 'chapter-' + 0 + '-' + index1
  1353. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1354. <div class="chapter_upload_o" style="
  1355. position: relative;
  1356. display: flex;
  1357. align-items: center;
  1358. ">
  1359. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1360. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1361. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1362. </div>
  1363. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1364. </div>
  1365. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1366. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1367. </div>
  1368. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1369. </div>
  1370. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1371. </div>
  1372. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1373. </div>
  1374. </div>
  1375. <div class="chapter_upload_n">
  1376. <input readonly="true" v-if="
  1377. item1.type == 2 ||
  1378. item1.type == 3 ||
  1379. item1.type == 12 ||
  1380. item1.type == 13 ||
  1381. item1.type == 7
  1382. " :placeholder="item1.name" @click="
  1383. updataVideoT(
  1384. $event,
  1385. unitIndex,
  1386. 0,
  1387. index1
  1388. )
  1389. " style="
  1390. border: none;
  1391. outline: none;
  1392. width: 80%;
  1393. minwidth: 215px;
  1394. z-index: 99;
  1395. font-size: 14px;
  1396. white-space: nowrap;
  1397. overflow: hidden;
  1398. text-overflow: ellipsis;
  1399. " />
  1400. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1401. border: none;
  1402. outline: none;
  1403. width: 80%;
  1404. white-space: nowrap;
  1405. overflow: hidden;
  1406. text-overflow: ellipsis;
  1407. " readonly="true" @click="
  1408. selectAttText(0, index1)
  1409. " />
  1410. <input :placeholder="item1.title ? item1.title : '链接'
  1411. " v-if="item1.type == 8" style="
  1412. border: none;
  1413. outline: none;
  1414. width: 80%;
  1415. white-space: nowrap;
  1416. overflow: hidden;
  1417. text-overflow: ellipsis;
  1418. " readonly="true" @click="selectLine(0, index1)" />
  1419. <input :placeholder="item1.title ? item1.title : '链接'
  1420. " v-if="item1.type == 14" style="
  1421. border: none;
  1422. outline: none;
  1423. width: 80%;
  1424. white-space: nowrap;
  1425. overflow: hidden;
  1426. text-overflow: ellipsis;
  1427. " readonly="true" @click="
  1428. openUpdateSource(0, index1)
  1429. " />
  1430. </div>
  1431. <div class="chapter_upload_ic">
  1432. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1433. <div class="chapter_upload_ud" style="z-index: 99">
  1434. <div class="chapter_upload_up" @click="
  1435. upCd(
  1436. $event,
  1437. unitIndex,
  1438. index,
  1439. 0,
  1440. index1
  1441. )
  1442. "></div>
  1443. <div class="chapter_upload_down" @click="
  1444. downCd(
  1445. $event,
  1446. unitIndex,
  1447. index,
  1448. 0,
  1449. index1
  1450. )
  1451. "></div>
  1452. </div>
  1453. <div class="chapter_upload_ic_edit" v-if="
  1454. item1.type == 2 ||
  1455. item1.type == 3 ||
  1456. item1.type == 12 ||
  1457. item1.type == 13 ||
  1458. item1.type == 7
  1459. " @click.stop="
  1460. updataVideoT(
  1461. $event,
  1462. unitIndex,
  1463. 0,
  1464. index1
  1465. )
  1466. ">
  1467. <div></div>
  1468. </div>
  1469. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1470. selectAttText(0, index1)
  1471. ">
  1472. <div></div>
  1473. </div>
  1474. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1475. @click="selectLine(0, index1)">
  1476. <div></div>
  1477. </div>
  1478. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1479. openUpdateSource(0, index1)
  1480. ">
  1481. <div></div>
  1482. </div>
  1483. <div class="chapter_upload_ic_r" @click.stop="
  1484. deleteChapterData(
  1485. $event,
  1486. unitIndex,
  1487. index,
  1488. index1,
  1489. 0
  1490. )
  1491. ">
  1492. <div></div>
  1493. </div>
  1494. </div>
  1495. </div>
  1496. </div>
  1497. </div>
  1498. </div>
  1499. <div class="add_info_box" style="margin: 10px 0 0">
  1500. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1501. 文件
  1502. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  1503. beforeUpload2(
  1504. $event,
  1505. unitIndex,
  1506. 13,
  1507. 0
  1508. )
  1509. " />
  1510. </button>
  1511. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1512. 图文
  1513. </button>
  1514. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1515. 链接
  1516. </button>
  1517. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1518. 代码
  1519. </button>
  1520. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1521. 资源
  1522. </button>
  1523. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  1524. AI生成PPT
  1525. </button>
  1526. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  1527. AI生成教案
  1528. </button>
  1529. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  1530. 智能检索视频
  1531. </button>
  1532. </div>
  1533. <div v-if="
  1534. unitJson[unitIndex].chapterInfo[0].taskJson[
  1535. 0
  1536. ].proVisible
  1537. " class="mask">
  1538. <div class="progressBox">
  1539. <!-- <div id="closePro" class="closeCss">
  1540. <img src="../../../../assets/icon/close.png" alt />
  1541. </div> -->
  1542. <div class="lbox">
  1543. <img src="../../../assets/loading.gif" />上传中,请稍后
  1544. </div>
  1545. <div style="margin-bottom: 10px">
  1546. <span>{{
  1547. unitJson[unitIndex].chapterInfo[0].taskJson[
  1548. 0
  1549. ].isFinishSize
  1550. }}M</span>
  1551. /
  1552. <span>{{
  1553. unitJson[unitIndex].chapterInfo[0].taskJson[
  1554. 0
  1555. ].isAllSize
  1556. }}M</span>
  1557. </div>
  1558. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  1559. 0
  1560. ].progress
  1561. ? unitJson[unitIndex].chapterInfo[0]
  1562. .taskJson[0].progress
  1563. : 0
  1564. " style="width: 80%"></el-progress>
  1565. </div>
  1566. </div>
  1567. </div>
  1568. <div class="chapter_box" v-if="courseState == 1">
  1569. <div class="chapter_contentbox">
  1570. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  1571. <div class="cc_input">
  1572. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  1573. v-model="unitJson[unitIndex].dyName" />
  1574. </div>
  1575. <div class="remove" v-if="
  1576. (unitJson.length > 1 || courseState != 2) &&
  1577. !(unitJson[unitJson.length - 1].easy == 4) &&
  1578. !(unitJson[unitJson.length - 1].easy == 6)
  1579. " @click="deleteUnit(unitIndex)"></div>
  1580. </div>
  1581. </div>
  1582. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  1583. margin: 50px 0px 10px;
  1584. font-size: 1.5em;
  1585. font-weight: 700;
  1586. color: #0f7eff;
  1587. ">
  1588. 添加任务
  1589. </div> -->
  1590. <div class="taskBorder" :style="{
  1591. minHeight: unitJson[unitIndex].easy && 'unset',
  1592. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  1593. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
  1594. <div style="background: #fff; border-radius: 5px">
  1595. <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
  1596. <!-- padding: 20px; -->
  1597. <div v-if="unitJson[unitIndex].easy != 1">
  1598. <div :style="{
  1599. marginBottom:
  1600. unitJson[unitIndex].easy == 3 ||
  1601. (unitJson[unitIndex].easy == 5 &&
  1602. itemTask.taskType == 1)
  1603. ? '75px'
  1604. : '0',
  1605. }">
  1606. <div style="
  1607. display: flex;
  1608. margin: 0px 0 20px;
  1609. flex-direction: row;
  1610. justify-content: flex-start;
  1611. align-items: center;
  1612. ">
  1613. <div class="lineTitle">任务概述</div>
  1614. </div>
  1615. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  1616. flex-direction: row;
  1617. justify-content: flex-start;
  1618. align-items: center;
  1619. margin: 0;
  1620. ">
  1621. <!-- <div class="cc_title">
  1622. 任务{{ itemTaskIndex + 1 }}
  1623. </div> -->
  1624. <div class="cc_input">
  1625. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1626. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1627. itemTaskIndex
  1628. ].task
  1629. " />
  1630. </div>
  1631. <div class="remove" v-if="
  1632. item.taskJson.length > 1 &&
  1633. (!unitJson[unitIndex].easy ||
  1634. unitJson[unitIndex].easy == 6)
  1635. " @click="deleteTask(itemTaskIndex)"></div>
  1636. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  1637. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  1638. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  1639. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  1640. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  1641. </div> -->
  1642. </div>
  1643. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  1644. display: flex;
  1645. margin: 20px 0;
  1646. flex-direction: row;
  1647. justify-content: flex-start;
  1648. align-items: center;
  1649. ">
  1650. <div class="lineTitle">任务描述</div>
  1651. </div> && !itemTask.isFold2-->
  1652. <div v-if="
  1653. easyArray.indexOf(unitJson[unitIndex].easy) ==
  1654. -1
  1655. " style="margin-top: 20px" class="op_task_box"
  1656. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1657. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1658. itemTaskIndex
  1659. ].taskDetail
  1660. " @change="change"></editor-bar> -->
  1661. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1662. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1663. itemTaskIndex
  1664. ].taskDetail
  1665. "></textarea>
  1666. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  1667. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1668. itemTaskIndex
  1669. ].taskDetail
  1670. "></textarea> -->
  1671. <div class="op_box">
  1672. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1673. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1674. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1675. itemTaskIndex
  1676. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1677. itemTaskIndex
  1678. ], itemTaskIndex)">智能优化</div>
  1679. </el-tooltip>
  1680. </div>
  1681. </div>
  1682. </div>
  1683. </div>
  1684. <div v-if="
  1685. unitJson[unitIndex].easy == 1 ||
  1686. (unitJson[unitIndex].easy == 5 &&
  1687. itemTask.taskType == 2)
  1688. ">
  1689. <div>
  1690. <div class="add_chapters_box add_c_none" v-if="
  1691. itemTask.chapterData &&
  1692. itemTask.chapterData.length == 0
  1693. ">
  1694. <img src="../../../assets/icon/new/c_none.png" alt />
  1695. </div>
  1696. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1697. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  1698. dragOver(index1, itemTaskIndex)
  1699. " @dragend="dragEnd()" :draggable="isdrag ==
  1700. 'chapter-' + itemTaskIndex + '-' + index1
  1701. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  1702. :key="item1.id" @click="
  1703. getChapterData(
  1704. $event,
  1705. unitIndex,
  1706. index,
  1707. index1,
  1708. item1.type
  1709. )
  1710. " :class="{
  1711. dragOverTop2:
  1712. newIndex === index1 &&
  1713. typeIndex ==
  1714. 'chapter-' +
  1715. itemTaskIndex +
  1716. '-' +
  1717. index1 &&
  1718. oldIndex > index1,
  1719. dragOverBottom2:
  1720. newIndex === index1 &&
  1721. typeIndex ==
  1722. 'chapter-' +
  1723. itemTaskIndex +
  1724. '-' +
  1725. index1 &&
  1726. oldIndex < index1,
  1727. }">
  1728. <div @mousedown="
  1729. isdrag =
  1730. 'chapter-' + itemTaskIndex + '-' + index1
  1731. " @mouseup="isdrag = ''" @touchstart="
  1732. isdrag =
  1733. 'chapter-' + itemTaskIndex + '-' + index1
  1734. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1735. <div class="chapter_upload_t" style="width: 100%"></div>
  1736. <div class="chapter_upload_o" style="
  1737. position: relative;
  1738. display: flex;
  1739. align-items: center;
  1740. ">
  1741. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1742. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1743. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1744. </div>
  1745. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1746. </div>
  1747. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1748. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1749. </div>
  1750. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1751. </div>
  1752. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1753. </div>
  1754. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1755. </div>
  1756. </div>
  1757. <div class="chapter_upload_n">
  1758. <span style="
  1759. font-size: 14px;
  1760. color: rgb(109, 109, 109);
  1761. height: 14px;
  1762. line-height: 14px;
  1763. " v-if="
  1764. item1.type == 2 ||
  1765. item1.type == 3 ||
  1766. item1.type == 7
  1767. ">{{ item1.text }}-</span>
  1768. <input readonly="true" v-if="
  1769. item1.type == 2 ||
  1770. item1.type == 3 ||
  1771. item1.type == 7
  1772. " :placeholder="item1.name" @click="
  1773. updataVideoT(
  1774. $event,
  1775. unitIndex,
  1776. itemTaskIndex,
  1777. index1
  1778. )
  1779. " style="
  1780. border: none;
  1781. outline: none;
  1782. width: 80%;
  1783. minwidth: 215px;
  1784. z-index: 99;
  1785. font-size: 14px;
  1786. white-space: nowrap;
  1787. overflow: hidden;
  1788. text-overflow: ellipsis;
  1789. " />
  1790. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1791. border: none;
  1792. outline: none;
  1793. width: 80%;
  1794. white-space: nowrap;
  1795. overflow: hidden;
  1796. text-overflow: ellipsis;
  1797. " readonly="true" @click="
  1798. selectAttText(itemTaskIndex, index1)
  1799. " />
  1800. <input :placeholder="item1.title ? item1.title : '链接'
  1801. " v-if="item1.type == 8 || item1.type == 14" style="
  1802. border: none;
  1803. outline: none;
  1804. width: 80%;
  1805. white-space: nowrap;
  1806. overflow: hidden;
  1807. text-overflow: ellipsis;
  1808. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  1809. </div>
  1810. <div class="chapter_upload_ic">
  1811. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1812. <div class="chapter_upload_ud" style="z-index: 99">
  1813. <div class="chapter_upload_up" @click="
  1814. upCd(
  1815. $event,
  1816. unitIndex,
  1817. index,
  1818. itemTaskIndex,
  1819. index1
  1820. )
  1821. "></div>
  1822. <div class="chapter_upload_down" @click="
  1823. downCd(
  1824. $event,
  1825. unitIndex,
  1826. index,
  1827. itemTaskIndex,
  1828. index1
  1829. )
  1830. "></div>
  1831. </div>
  1832. <div class="chapter_upload_ic_edit" v-if="
  1833. item1.type == 2 ||
  1834. item1.type == 3 ||
  1835. item1.type == 12 ||
  1836. item1.type == 13 ||
  1837. item1.type == 7
  1838. " @click.stop="
  1839. updataVideoT(
  1840. $event,
  1841. unitIndex,
  1842. itemTaskIndex,
  1843. index1
  1844. )
  1845. ">
  1846. <div></div>
  1847. </div>
  1848. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1849. selectAttText(itemTaskIndex, index1)
  1850. ">
  1851. <div></div>
  1852. </div>
  1853. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1854. @click="selectLine(itemTaskIndex, index1)">
  1855. <div></div>
  1856. </div>
  1857. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1858. openUpdateSource(itemTaskIndex, index1)
  1859. ">
  1860. <div></div>
  1861. </div>
  1862. <div class="chapter_upload_ic_r" @click.stop="
  1863. deleteChapterData(
  1864. $event,
  1865. unitIndex,
  1866. index,
  1867. index1,
  1868. itemTaskIndex
  1869. )
  1870. ">
  1871. <div></div>
  1872. </div>
  1873. </div>
  1874. </div>
  1875. </div>
  1876. </div>
  1877. </div>
  1878. <div class="add_info_box" style="margin: 10px 0 0">
  1879. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1880. <span style="color: red">*</span>
  1881. 教学设计
  1882. <input type="file"
  1883. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1884. style="display: none" v-if="inputShow" @change="
  1885. beforeUpload3(
  1886. $event,
  1887. unitIndex,
  1888. 3,
  1889. itemTaskIndex,
  1890. '教学设计'
  1891. )
  1892. " />
  1893. </button>
  1894. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1895. <span style="color: red">*</span>
  1896. 教学课件
  1897. <input type="file"
  1898. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1899. style="display: none" v-if="inputShow" @change="
  1900. beforeUpload3(
  1901. $event,
  1902. unitIndex,
  1903. 3,
  1904. itemTaskIndex,
  1905. '教学课件'
  1906. )
  1907. " />
  1908. </button>
  1909. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1910. 教学视频
  1911. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  1912. style="display: none" v-if="inputShow" @change="
  1913. beforeUpload3(
  1914. $event,
  1915. unitIndex,
  1916. 2,
  1917. itemTaskIndex,
  1918. '教学视频'
  1919. )
  1920. " />
  1921. </button>
  1922. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1923. 教学音频
  1924. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  1925. beforeUpload3(
  1926. $event,
  1927. unitIndex,
  1928. 2,
  1929. itemTaskIndex,
  1930. '教学音频'
  1931. )
  1932. " />
  1933. </button>
  1934. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1935. 学习单
  1936. <input type="file"
  1937. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1938. style="display: none" v-if="inputShow" @change="
  1939. beforeUpload3(
  1940. $event,
  1941. unitIndex,
  1942. 3,
  1943. itemTaskIndex,
  1944. '学习单'
  1945. )
  1946. " />
  1947. </button>
  1948. </div>
  1949. <div v-if="
  1950. unitJson[unitIndex].chapterInfo[0].taskJson[
  1951. itemTaskIndex
  1952. ].proVisible
  1953. " class="mask">
  1954. <div class="progressBox">
  1955. <!-- <div id="closePro" class="closeCss">
  1956. <img src="../../../../assets/icon/close.png" alt />
  1957. </div> -->
  1958. <div class="lbox">
  1959. <img src="../../../assets/loading.gif" />上传中,请稍后
  1960. </div>
  1961. <div style="margin-bottom: 10px">
  1962. <span>{{
  1963. unitJson[unitIndex].chapterInfo[0].taskJson[
  1964. itemTaskIndex
  1965. ].isFinishSize
  1966. }}M</span>
  1967. /
  1968. <span>{{
  1969. unitJson[unitIndex].chapterInfo[0].taskJson[
  1970. itemTaskIndex
  1971. ].isAllSize
  1972. }}M</span>
  1973. </div>
  1974. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  1975. itemTaskIndex
  1976. ].progress
  1977. ? unitJson[unitIndex].chapterInfo[0]
  1978. .taskJson[itemTaskIndex].progress
  1979. : 0
  1980. " style="width: 80%"></el-progress>
  1981. </div>
  1982. </div>
  1983. </div>
  1984. </div>
  1985. <!-- padding: 20px; -->
  1986. <div style="
  1987. background: #fff;
  1988. border-radius: 5px;
  1989. margin-top: 15px;
  1990. ">
  1991. <div v-if="
  1992. unitJson[unitIndex].easy != 3 &&
  1993. !(
  1994. unitJson[unitIndex].easy == 5 &&
  1995. itemTask.taskType == 1
  1996. )
  1997. " style="
  1998. flex-direction: row;
  1999. justify-content: flex-start;
  2000. align-items: center;
  2001. ">
  2002. <div style="
  2003. display: flex;
  2004. flex-direction: row;
  2005. align-items: center;
  2006. margin: 5px 0 20px;
  2007. ">
  2008. <div class="lineTitle clineTitle">
  2009. {{
  2010. !unitJson[unitIndex].easy ||
  2011. unitJson[unitIndex].easy == 6 ||
  2012. easyArray.indexOf(unitJson[unitIndex].easy) !=
  2013. -1
  2014. ? "练习内容"
  2015. : "评价内容"
  2016. }}
  2017. </div>
  2018. <!-- <div class="line" style="width: 90%"></div> -->
  2019. </div>
  2020. </div>
  2021. <div v-if="
  2022. unitJson[unitIndex].easy == 6 ||
  2023. !unitJson[unitIndex].easy
  2024. " class="toolChoose">
  2025. <div class="tools">
  2026. <div class="leftTools" style="width: 100%" v-for="(
  2027. itemTool, toolIndex
  2028. ) in itemTask.toolChoose" :key="toolIndex">
  2029. <div style="
  2030. display: flex;
  2031. flex-direction: row;
  2032. align-items: baseline;
  2033. flex-wrap: nowrap;
  2034. justify-content: flex-start;
  2035. position: relative;
  2036. ">
  2037. <div style="margin-right: 20px; font-weight: bold"
  2038. :id="'gj' + itemTaskIndex + '' + toolIndex">
  2039. 工具 {{ toolIndex + 1 }} :
  2040. </div>
  2041. <div class="chooseWho">
  2042. <div :class="itemTool.toolType == 0
  2043. ? 'isChooseActive'
  2044. : ''
  2045. " @click="
  2046. (itemTool.toolType = 0),
  2047. (itemTool.isFold3 = false),
  2048. $forceUpdate()
  2049. ">
  2050. 互动类
  2051. </div>
  2052. <div :class="itemTool.toolType == 1
  2053. ? 'isChooseActive'
  2054. : ''
  2055. " @click="
  2056. (itemTool.toolType = 1),
  2057. (itemTool.isFold3 = false),
  2058. $forceUpdate()
  2059. ">
  2060. 思维类
  2061. </div>
  2062. <div :class="itemTool.toolType == 6
  2063. ? 'isChooseActive'
  2064. : ''
  2065. " @click="
  2066. (itemTool.toolType = 6),
  2067. (itemTool.isFold3 = false),
  2068. $forceUpdate()
  2069. ">
  2070. 协作类
  2071. </div>
  2072. <div :class="itemTool.toolType == 2
  2073. ? 'isChooseActive'
  2074. : ''
  2075. " @click="
  2076. (itemTool.toolType = 2),
  2077. (itemTool.isFold3 = false),
  2078. $forceUpdate()
  2079. ">
  2080. 测评类
  2081. </div>
  2082. <div :class="itemTool.toolType == 7
  2083. ? 'isChooseActive'
  2084. : ''
  2085. " @click="
  2086. (itemTool.toolType = 7),
  2087. (itemTool.isFold3 = false),
  2088. $forceUpdate()
  2089. ">
  2090. 评价类
  2091. </div>
  2092. <div :class="itemTool.toolType == 3
  2093. ? 'isChooseActive'
  2094. : ''
  2095. " @click="
  2096. (itemTool.toolType = 3),
  2097. (itemTool.isFold3 = false),
  2098. $forceUpdate()
  2099. ">
  2100. 编程类
  2101. </div>
  2102. <div :class="itemTool.toolType == 5
  2103. ? 'isChooseActive'
  2104. : ''
  2105. " @click="
  2106. (itemTool.toolType = 5),
  2107. (itemTool.isFold3 = false),
  2108. $forceUpdate()
  2109. ">
  2110. 学科类
  2111. </div>
  2112. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  2113. " @click="(itemTool.toolType = 4), $forceUpdate()">
  2114. 其他
  2115. </div> -->
  2116. </div>
  2117. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  2118. margin:
  2119. itemTask.toolChoose.length > 1
  2120. ? '0px 35px 0px auto'
  2121. : '0 0 0 auto',
  2122. }" v-if="itemTask.toolChoose.length > 1">
  2123. <div class="chapter_upload_up2" @click.stop="
  2124. upTool(
  2125. $event,
  2126. unitIndex,
  2127. itemTaskIndex,
  2128. toolIndex
  2129. )
  2130. ">
  2131. 上移
  2132. </div>
  2133. <div class="chapter_upload_down2" @click.stop="
  2134. downTool(
  2135. $event,
  2136. unitIndex,
  2137. itemTaskIndex,
  2138. toolIndex
  2139. )
  2140. ">
  2141. 下移
  2142. </div>
  2143. </div>
  2144. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  2145. @click="fold3(itemTaskIndex, toolIndex)"
  2146. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2147. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  2148. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  2149. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2150. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  2151. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  2152. v-if="itemTask.toolChoose.length > 1" style="
  2153. position: absolute;
  2154. right: 0;
  2155. top: -5px;
  2156. "></div>
  2157. </div>
  2158. <!-- v-show="!itemTool.isFold3" -->
  2159. <div style="min-height: 163px">
  2160. <div class="toolSort" v-if="itemTool.toolType == 0">
  2161. <!-- <div class="tool">
  2162. <div
  2163. class="whiteBIcon"
  2164. @click="addTools(8, itemTaskIndex, toolIndex)"
  2165. >
  2166. <img src="../../../assets/icon/secondToolList/library.png" alt />
  2167. <div style="margin: 5px 0">素材库</div>
  2168. </div>
  2169. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  2170. <img
  2171. src="../../../assets/icon/checkNo.png"
  2172. alt
  2173. v-if="itemTool.tool.indexOf(8) == -1"
  2174. />
  2175. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  2176. alt /><span>已选择</span></div>
  2177. </div>
  2178. </div>-->
  2179. <!-- <div class="tool">
  2180. <div
  2181. class="whiteBIcon"
  2182. @click="addTools(17, itemTaskIndex, toolIndex)"
  2183. >
  2184. <img
  2185. src="../../../assets/icon/secondToolList/library.png"
  2186. alt
  2187. />
  2188. <div style="margin: 5px 0">学习资料</div>
  2189. </div>
  2190. <div
  2191. class="check"
  2192. @click="addTools(17, itemTaskIndex, toolIndex)"
  2193. >
  2194. <img
  2195. src="../../../assets/icon/checkNo.png"
  2196. alt
  2197. v-if="itemTool.tool.indexOf(17) == -1"
  2198. />
  2199. <img
  2200. src="../../../assets/icon/checkedIs.png"
  2201. alt
  2202. v-else
  2203. />
  2204. </div>10
  2205. </div> -->
  2206. <div class="tool" :class="{
  2207. isToolChoose:
  2208. itemTool.tool.indexOf(10) != -1,
  2209. }" @click="
  2210. addTools(10, itemTaskIndex, toolIndex)
  2211. ">
  2212. <div class="whiteBIcon" @click.stop="
  2213. openTools(itemTaskIndex, 10, toolIndex)
  2214. ">
  2215. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  2216. <div style="margin: 5px 0">倒计时</div>
  2217. </div>
  2218. <div class="noCTool">
  2219. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2220. </div>
  2221. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  2222. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2223. </div>
  2224. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  2225. <img src="../../../assets/icon/checkNo.png" alt
  2226. v-if="itemTool.tool.indexOf(10) == -1" />
  2227. <div class="checkDiv" v-else>
  2228. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2229. </div>
  2230. </div> -->
  2231. </div>
  2232. <div class="tool" :class="{
  2233. isToolChoose:
  2234. itemTool.tool.indexOf(65) != -1,
  2235. }" @click="
  2236. addTools(65, itemTaskIndex, toolIndex)
  2237. ">
  2238. <div class="whiteBIcon" @click.stop="
  2239. addTools(65, itemTaskIndex, toolIndex)
  2240. ">
  2241. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  2242. <div style="margin: 5px 0">挑人</div>
  2243. </div>
  2244. <div class="noCTool">
  2245. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2246. </div>
  2247. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  2248. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2249. </div>
  2250. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  2251. <img src="../../../assets/icon/checkNo.png" alt
  2252. v-if="itemTool.tool.indexOf(65) == -1" />
  2253. <div class="checkDiv" v-else>
  2254. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2255. </div>
  2256. </div> -->
  2257. </div>
  2258. <!-- <div class="tool">
  2259. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  2260. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2261. <div style="margin: 5px 0">学生分组</div>
  2262. </div>
  2263. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2264. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  2265. <div class="checkDiv" v-else>
  2266. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2267. </div>
  2268. </div>
  2269. </div> -->
  2270. <!-- <div class="tool">
  2271. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  2272. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  2273. <div style="margin: 5px 0">交互视频</div>
  2274. </div>
  2275. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  2276. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  2277. <div class="checkDiv" v-else>
  2278. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2279. </div>
  2280. </div>
  2281. </div> -->
  2282. </div>
  2283. <div class="toolSort" v-if="itemTool.toolType == 1">
  2284. <div class="tool" :class="{
  2285. isToolChoose:
  2286. itemTool.tool.indexOf(7) != -1,
  2287. }" @click="
  2288. addTools(7, itemTaskIndex, toolIndex)
  2289. ">
  2290. <div class="whiteBIcon" @click.stop="
  2291. addTools(7, itemTaskIndex, toolIndex)
  2292. ">
  2293. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  2294. <div style="margin: 5px 0">思维网格</div>
  2295. </div>
  2296. <div class="noCTool">
  2297. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2298. </div>
  2299. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  2300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2301. </div>
  2302. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  2303. <img src="../../../assets/icon/checkNo.png" alt
  2304. v-if="itemTool.tool.indexOf(7) == -1" />
  2305. <div class="checkDiv" v-else>
  2306. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2307. </div>
  2308. </div> -->
  2309. </div>
  2310. <div class="tool" :class="{
  2311. isToolChoose:
  2312. itemTool.tool.indexOf(1) != -1,
  2313. }" @click="
  2314. addTools(1, itemTaskIndex, toolIndex)
  2315. ">
  2316. <div class="whiteBIcon" @click.stop="
  2317. openTools(itemTaskIndex, 1, toolIndex)
  2318. ">
  2319. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  2320. <div style="margin: 5px 0">电子白板</div>
  2321. </div>
  2322. <div class="noCTool">
  2323. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2324. </div>
  2325. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  2326. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2327. </div>
  2328. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  2329. <img src="../../../assets/icon/checkNo.png" alt
  2330. v-if="itemTool.tool.indexOf(1) == -1" />
  2331. <div class="checkDiv" v-else>
  2332. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2333. </div>
  2334. </div> -->
  2335. </div>
  2336. <!-- <div class="tool">
  2337. <div
  2338. class="whiteBIcon"
  2339. @click="addTools(2, itemTaskIndex, toolIndex)"
  2340. >
  2341. <img
  2342. src="../../../assets/icon/secondToolList/note.png"
  2343. alt
  2344. />
  2345. <div style="margin: 5px 0">便签</div>
  2346. </div>
  2347. <div
  2348. class="check"
  2349. @click="addTools(2, itemTaskIndex, toolIndex)"
  2350. >
  2351. <img
  2352. src="../../../assets/icon/checkNo.png"
  2353. alt
  2354. v-if="itemTool.tool.indexOf(2) == -1"
  2355. />
  2356. <div class="checkDiv" v-else>
  2357. <img
  2358. src="../../../assets/icon/checkedIs.png"
  2359. alt
  2360. /><span>已选择</span>
  2361. </div>
  2362. </div>
  2363. </div> -->
  2364. <!-- <div class="tool">
  2365. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  2366. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  2367. <div style="margin: 5px 0">协同文档</div>
  2368. </div>
  2369. <div
  2370. class="check"
  2371. @click="addTools(6, itemTaskIndex, toolIndex)"
  2372. >
  2373. <img
  2374. src="../../../assets/icon/checkNo.png"
  2375. alt
  2376. v-if="itemTool.tool.indexOf(6) == -1"
  2377. />
  2378. <div class="checkDiv" v-else>
  2379. <img
  2380. src="../../../assets/icon/checkedIs.png"
  2381. alt
  2382. /><span>已选择</span>
  2383. </div>
  2384. </div>
  2385. </div> -->
  2386. <div class="tool" :class="{
  2387. isToolChoose:
  2388. itemTool.tool.indexOf(52) != -1,
  2389. }" @click="
  2390. addTools(52, itemTaskIndex, toolIndex)
  2391. ">
  2392. <div class="whiteBIcon" @click.stop="
  2393. openTools(itemTaskIndex, 52, toolIndex)
  2394. ">
  2395. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  2396. <div style="margin: 5px 0">文档</div>
  2397. </div>
  2398. <div class="noCTool">
  2399. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2400. </div>
  2401. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  2402. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2403. </div>
  2404. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  2405. <img src="../../../assets/icon/checkNo.png" alt
  2406. v-if="itemTool.tool.indexOf(52) == -1" />
  2407. <div class="checkDiv" v-else>
  2408. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2409. </div>
  2410. </div> -->
  2411. </div>
  2412. <div class="tool" :class="{
  2413. isToolChoose:
  2414. itemTool.tool.indexOf(3) != -1,
  2415. }" @click="
  2416. addTools(3, itemTaskIndex, toolIndex)
  2417. ">
  2418. <div class="whiteBIcon" @click.stop="
  2419. openTools(itemTaskIndex, 3, toolIndex)
  2420. ">
  2421. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  2422. <div style="margin: 5px 0">思维导图</div>
  2423. </div>
  2424. <div class="noCTool">
  2425. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2426. </div>
  2427. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  2428. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2429. </div>
  2430. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  2431. <img src="../../../assets/icon/checkNo.png" alt
  2432. v-if="itemTool.tool.indexOf(3) == -1" />
  2433. <div class="checkDiv" v-else>
  2434. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2435. </div>
  2436. </div> -->
  2437. </div>
  2438. <div class="tool" :class="{
  2439. isToolChoose:
  2440. itemTool.tool.indexOf(48) != -1,
  2441. }" @click="
  2442. addTools(48, itemTaskIndex, toolIndex)
  2443. ">
  2444. <div class="whiteBIcon" @click.stop="
  2445. openTools(itemTaskIndex, 48, toolIndex)
  2446. ">
  2447. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  2448. <div style="margin: 5px 0">表格</div>
  2449. </div>
  2450. <div class="noCTool">
  2451. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2452. </div>
  2453. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  2454. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2455. </div>
  2456. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  2457. <img src="../../../assets/icon/checkNo.png" alt
  2458. v-if="itemTool.tool.indexOf(48) == -1" />
  2459. <div class="checkDiv" v-else>
  2460. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2461. </div>
  2462. </div> -->
  2463. </div>
  2464. </div>
  2465. <div class="toolSort" v-if="itemTool.toolType == 6">
  2466. <div class="tool" :class="{
  2467. isToolChoose:
  2468. itemTool.tool.indexOf(49) != -1,
  2469. }" @click="
  2470. addTools(49, itemTaskIndex, toolIndex)
  2471. ">
  2472. <div class="whiteBIcon" @click.stop="
  2473. openTools(itemTaskIndex, 49, toolIndex)
  2474. ">
  2475. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2476. <div style="margin: 5px 0">学生分组</div>
  2477. </div>
  2478. <div class="noCTool">
  2479. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2480. </div>
  2481. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  2482. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2483. </div>
  2484. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2485. <img src="../../../assets/icon/checkNo.png" alt
  2486. v-if="itemTool.tool.indexOf(49) == -1" />
  2487. <div class="checkDiv" v-else>
  2488. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2489. </div>
  2490. </div> -->
  2491. </div>
  2492. </div>
  2493. <div class="toolSort" v-if="itemTool.toolType == 2">
  2494. <!-- <div class="tool">
  2495. <div
  2496. class="whiteBIcon"
  2497. @click="addTools(5, itemTaskIndex, toolIndex)"
  2498. >
  2499. <img
  2500. src="../../../assets/icon/thirdToolList/score.png"
  2501. alt
  2502. />
  2503. <div style="margin: 5px 0">量规评分</div>
  2504. </div>
  2505. <div
  2506. class="check"
  2507. @click="addTools(5, itemTaskIndex, toolIndex)"
  2508. >
  2509. <img
  2510. src="../../../assets/icon/checkNo.png"
  2511. alt
  2512. v-if="itemTool.tool.indexOf(5) == -1"
  2513. />
  2514. <img
  2515. src="../../../assets/icon/checkedIs.png"
  2516. alt
  2517. v-else
  2518. />
  2519. </div>
  2520. </div>-->
  2521. <div class="tool" :class="{
  2522. isToolChoose:
  2523. itemTool.tool.indexOf(4) != -1,
  2524. }" @click="
  2525. addTools(4, itemTaskIndex, toolIndex)
  2526. ">
  2527. <div class="whiteBIcon" @click.stop="
  2528. openTools(itemTaskIndex, 4, toolIndex)
  2529. ">
  2530. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  2531. <div style="margin: 5px 0">问卷调查</div>
  2532. </div>
  2533. <div class="noCTool">
  2534. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2535. </div>
  2536. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  2537. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2538. </div>
  2539. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  2540. <img src="../../../assets/icon/checkNo.png" alt
  2541. v-if="itemTool.tool.indexOf(4) == -1" />
  2542. <div class="checkDiv" v-else>
  2543. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2544. </div>
  2545. </div> -->
  2546. </div>
  2547. <div class="tool" :class="{
  2548. isToolChoose:
  2549. itemTool.tool.indexOf(45) != -1,
  2550. }" @click="
  2551. addTools(45, itemTaskIndex, toolIndex)
  2552. ">
  2553. <div class="whiteBIcon" @click="
  2554. openTools(itemTaskIndex, 45, toolIndex)
  2555. ">
  2556. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  2557. <div style="margin: 5px 0">选择题</div>
  2558. </div>
  2559. <div class="noCTool">
  2560. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2561. </div>
  2562. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  2563. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2564. </div>
  2565. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  2566. <img src="../../../assets/icon/checkNo.png" alt
  2567. v-if="itemTool.tool.indexOf(45) == -1" />
  2568. <div class="checkDiv" v-else>
  2569. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2570. </div>
  2571. </div> -->
  2572. </div>
  2573. <div class="tool" :class="{
  2574. isToolChoose:
  2575. itemTool.tool.indexOf(15) != -1,
  2576. }" @click="
  2577. addTools(15, itemTaskIndex, toolIndex)
  2578. ">
  2579. <div class="whiteBIcon" @click.stop="
  2580. openTools(itemTaskIndex, 15, toolIndex)
  2581. ">
  2582. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  2583. <div style="margin: 5px 0">问答</div>
  2584. </div>
  2585. <div class="noCTool">
  2586. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2587. </div>
  2588. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  2589. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2590. </div>
  2591. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  2592. <img src="../../../assets/icon/checkNo.png" alt
  2593. v-if="itemTool.tool.indexOf(15) == -1" />
  2594. <div class="checkDiv" v-else>
  2595. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2596. </div>
  2597. </div> -->
  2598. </div>
  2599. <div class="tool" :class="{
  2600. isToolChoose:
  2601. itemTool.tool.indexOf(16) != -1,
  2602. }" @click="
  2603. addTools(16, itemTaskIndex, toolIndex)
  2604. ">
  2605. <div class="whiteBIcon" @click.stop="
  2606. addTools(16, itemTaskIndex, toolIndex)
  2607. ">
  2608. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  2609. <div style="margin: 5px 0">作业提交</div>
  2610. </div>
  2611. <div class="noCTool">
  2612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2613. </div>
  2614. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  2615. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2616. </div>
  2617. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  2618. <img src="../../../assets/icon/checkNo.png" alt
  2619. v-if="itemTool.tool.indexOf(16) == -1" />
  2620. <div class="checkDiv" v-else>
  2621. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2622. </div>
  2623. </div> -->
  2624. </div>
  2625. <div class="tool" :class="{
  2626. isToolChoose:
  2627. itemTool.tool.indexOf(50) != -1,
  2628. }" @click="
  2629. addTools(50, itemTaskIndex, toolIndex)
  2630. ">
  2631. <div class="whiteBIcon" @click.stop="
  2632. addTools(50, itemTaskIndex, toolIndex)
  2633. ">
  2634. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  2635. <div style="margin: 5px 0">批量上传</div>
  2636. </div>
  2637. <div class="noCTool">
  2638. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2639. </div>
  2640. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  2641. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2642. </div>
  2643. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  2644. <img src="../../../assets/icon/checkNo.png" alt
  2645. v-if="itemTool.tool.indexOf(50) == -1" />
  2646. <div class="checkDiv" v-else>
  2647. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2648. </div>
  2649. </div> -->
  2650. </div>
  2651. <!-- <div class="tool">
  2652. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  2653. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  2654. <div style="margin: 5px 0">个人评价</div>
  2655. </div>
  2656. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  2657. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  2658. <div class="checkDiv" v-else>
  2659. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2660. </div>
  2661. </div>
  2662. </div> -->
  2663. <div class="tool" :class="{
  2664. isToolChoose:
  2665. itemTool.tool.indexOf(41) != -1,
  2666. }" @click="
  2667. addTools(41, itemTaskIndex, toolIndex)
  2668. ">
  2669. <div class="whiteBIcon" @click.stop="
  2670. openTools(itemTaskIndex, 41, toolIndex)
  2671. ">
  2672. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  2673. <div style="margin: 5px 0">选择匹配</div>
  2674. </div>
  2675. <div class="noCTool">
  2676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2677. </div>
  2678. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  2679. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2680. </div>
  2681. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  2682. <img src="../../../assets/icon/checkNo.png" alt
  2683. v-if="itemTool.tool.indexOf(41) == -1" />
  2684. <div class="checkDiv" v-else>
  2685. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2686. </div>
  2687. </div> -->
  2688. </div>
  2689. <div class="tool" :class="{
  2690. isToolChoose:
  2691. itemTool.tool.indexOf(47) != -1,
  2692. }" @click="
  2693. addTools(47, itemTaskIndex, toolIndex)
  2694. ">
  2695. <div class="whiteBIcon" @click.stop="
  2696. openTools(itemTaskIndex, 47, toolIndex)
  2697. ">
  2698. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  2699. <div style="margin: 5px 0">排序</div>
  2700. </div>
  2701. <div class="noCTool">
  2702. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2703. </div>
  2704. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  2705. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2706. </div>
  2707. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  2708. <img src="../../../assets/icon/checkNo.png" alt
  2709. v-if="itemTool.tool.indexOf(47) == -1" />
  2710. <div class="checkDiv" v-else>
  2711. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2712. </div>
  2713. </div> -->
  2714. </div>
  2715. <!-- <div class="tool">
  2716. <div
  2717. class="whiteBIcon"
  2718. @click="openTools(itemTaskIndex, 42, toolIndex)"
  2719. >
  2720. <img
  2721. src="../../../assets/icon/thirdToolList/mp3.png"
  2722. alt
  2723. />
  2724. <div style="margin: 5px 0">上传音频</div>
  2725. </div>
  2726. <div
  2727. class="check"
  2728. @click="addTools(42, itemTaskIndex, toolIndex)"
  2729. >
  2730. <img
  2731. src="../../../assets/icon/checkNo.png"
  2732. alt
  2733. v-if="itemTool.tool.indexOf(42) == -1"
  2734. />
  2735. <img
  2736. src="../../../assets/icon/checkedIs.png"
  2737. alt
  2738. v-else
  2739. />
  2740. </div>
  2741. </div> -->
  2742. </div>
  2743. <div class="toolSort" v-if="itemTool.toolType == 3">
  2744. <div class="tool" :class="{
  2745. isToolChoose:
  2746. itemTool.tool.indexOf(18) != -1,
  2747. }" @click="
  2748. addTools(18, itemTaskIndex, toolIndex)
  2749. ">
  2750. <div class="whiteBIcon" @click.stop="
  2751. addTools(18, itemTaskIndex, toolIndex)
  2752. ">
  2753. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  2754. <div style="margin: 5px 0">训练平台</div>
  2755. </div>
  2756. <div class="noCTool">
  2757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2758. </div>
  2759. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  2760. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2761. </div>
  2762. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  2763. <img src="../../../assets/icon/checkNo.png" alt
  2764. v-if="itemTool.tool.indexOf(18) == -1" />
  2765. <div class="checkDiv" v-else>
  2766. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2767. </div>
  2768. </div> -->
  2769. </div>
  2770. <div class="tool" :class="{
  2771. isToolChoose:
  2772. itemTool.tool.indexOf(21) != -1,
  2773. }" @click="
  2774. addTools(21, itemTaskIndex, toolIndex)
  2775. ">
  2776. <div class="whiteBIcon" @click.stop="
  2777. addTools(21, itemTaskIndex, toolIndex)
  2778. ">
  2779. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  2780. <div style="margin: 5px 0">
  2781. AIoT Blockly
  2782. </div>
  2783. </div>
  2784. <div class="noCTool">
  2785. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2786. </div>
  2787. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  2788. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2789. </div>
  2790. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  2791. <img src="../../../assets/icon/checkNo.png" alt
  2792. v-if="itemTool.tool.indexOf(21) == -1" />
  2793. <div class="checkDiv" v-else>
  2794. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2795. </div>
  2796. </div> -->
  2797. </div>
  2798. <!-- <div class="tool">
  2799. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  2800. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  2801. <div style="margin: 5px 0">AI体验</div>
  2802. </div>
  2803. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  2804. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  2805. <div class="checkDiv" v-else>
  2806. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2807. </div>
  2808. </div>
  2809. </div> -->
  2810. <div class="tool" :class="{
  2811. isToolChoose:
  2812. itemTool.tool.indexOf(23) != -1,
  2813. }" @click="
  2814. addTools(23, itemTaskIndex, toolIndex)
  2815. ">
  2816. <div class="whiteBIcon" @click.stop="
  2817. addTools(23, itemTaskIndex, toolIndex)
  2818. ">
  2819. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  2820. <div style="margin: 5px 0">AI Python</div>
  2821. </div>
  2822. <div class="noCTool">
  2823. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2824. </div>
  2825. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  2826. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2827. </div>
  2828. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  2829. <img src="../../../assets/icon/checkNo.png" alt
  2830. v-if="itemTool.tool.indexOf(23) == -1" />
  2831. <div class="checkDiv" v-else>
  2832. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2833. </div>
  2834. </div> -->
  2835. </div>
  2836. <div class="tool" :class="{
  2837. isToolChoose:
  2838. itemTool.tool.indexOf(24) != -1,
  2839. }" @click="
  2840. addTools(24, itemTaskIndex, toolIndex)
  2841. ">
  2842. <div class="whiteBIcon" @click.stop="
  2843. addTools(24, itemTaskIndex, toolIndex)
  2844. ">
  2845. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  2846. <div style="margin: 5px 0">
  2847. AI Blockly
  2848. </div>
  2849. </div>
  2850. <div class="noCTool">
  2851. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2852. </div>
  2853. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  2854. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2855. </div>
  2856. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  2857. <img src="../../../assets/icon/checkNo.png" alt
  2858. v-if="itemTool.tool.indexOf(24) == -1" />
  2859. <div class="checkDiv" v-else>
  2860. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2861. </div>
  2862. </div> -->
  2863. </div>
  2864. <div class="tool" :class="{
  2865. isToolChoose:
  2866. itemTool.tool.indexOf(32) != -1,
  2867. }" @click="
  2868. addTools(32, itemTaskIndex, toolIndex)
  2869. ">
  2870. <div class="whiteBIcon" @click.stop="
  2871. addTools(32, itemTaskIndex, toolIndex)
  2872. ">
  2873. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  2874. <div style="margin: 5px 0">源码编辑</div>
  2875. </div>
  2876. <div class="noCTool">
  2877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2878. </div>
  2879. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  2880. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2881. </div>
  2882. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  2883. <img src="../../../assets/icon/checkNo.png" alt
  2884. v-if="itemTool.tool.indexOf(32) == -1" />
  2885. <div class="checkDiv" v-else>
  2886. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2887. </div>
  2888. </div> -->
  2889. </div>
  2890. <div class="tool" :class="{
  2891. isToolChoose:
  2892. itemTool.tool.indexOf(57) != -1,
  2893. }" @click="
  2894. addTools(57, itemTaskIndex, toolIndex)
  2895. ">
  2896. <div class="whiteBIcon" @click.stop="
  2897. openTools(itemTaskIndex, 57, toolIndex)
  2898. ">
  2899. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  2900. <div style="margin: 5px 0">CocoPi</div>
  2901. </div>
  2902. <div class="noCTool">
  2903. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2904. </div>
  2905. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  2906. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2907. </div>
  2908. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  2909. <img src="../../../assets/icon/checkNo.png" alt
  2910. v-if="itemTool.tool.indexOf(57) == -1" />
  2911. <div class="checkDiv" v-else>
  2912. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2913. </div>
  2914. </div> -->
  2915. </div>
  2916. <div class="tool" :class="{
  2917. isToolChoose:
  2918. itemTool.tool.indexOf(63) != -1,
  2919. }" @click="
  2920. addTools(63, itemTaskIndex, toolIndex)
  2921. ">
  2922. <div class="whiteBIcon" @click.stop="
  2923. addTools(63, itemTaskIndex, toolIndex)
  2924. ">
  2925. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  2926. <div style="margin: 5px 0">海龟编程</div>
  2927. </div>
  2928. <div class="noCTool">
  2929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2930. </div>
  2931. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  2932. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2933. </div>
  2934. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  2935. <img src="../../../assets/icon/checkNo.png" alt
  2936. v-if="itemTool.tool.indexOf(63) == -1" />
  2937. <div class="checkDiv" v-else>
  2938. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2939. </div>
  2940. </div> -->
  2941. </div>
  2942. <div class="tool" :class="{
  2943. isToolChoose:
  2944. itemTool.tool.indexOf(71) != -1,
  2945. }" @click="
  2946. addTools(71, itemTaskIndex, toolIndex)
  2947. ">
  2948. <div class="whiteBIcon" @click.stop="
  2949. addTools(71, itemTaskIndex, toolIndex)
  2950. ">
  2951. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  2952. <div style="margin: 5px 0">AI智能体</div>
  2953. </div>
  2954. <div class="noCTool">
  2955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2956. </div>
  2957. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  2958. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2959. </div>
  2960. </div>
  2961. </div>
  2962. <div class="toolSort" v-if="itemTool.toolType == 7">
  2963. <div class="tool" :class="{
  2964. isToolChoose:
  2965. itemTool.tool.indexOf(40) != -1,
  2966. }" @click.stop="
  2967. addTools(40, itemTaskIndex, toolIndex)
  2968. ">
  2969. <div class="whiteBIcon" @click.stop="
  2970. openTools(itemTaskIndex, 40, toolIndex)
  2971. ">
  2972. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  2973. <div style="margin: 5px 0">个人评价</div>
  2974. </div>
  2975. <div class="noCTool">
  2976. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2977. </div>
  2978. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  2979. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2980. </div>
  2981. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  2982. <img src="../../../assets/icon/checkNo.png" alt
  2983. v-if="itemTool.tool.indexOf(40) == -1" />
  2984. <div class="checkDiv" v-else>
  2985. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2986. </div>
  2987. </div> -->
  2988. </div>
  2989. </div>
  2990. <div class="toolSort" v-if="itemTool.toolType == 5">
  2991. <div class="tool" :class="{
  2992. isToolChoose:
  2993. itemTool.tool.indexOf(28) != -1,
  2994. }" @click="
  2995. addTools(28, itemTaskIndex, toolIndex)
  2996. ">
  2997. <div class="whiteBIcon" @click.stop="
  2998. addTools(28, itemTaskIndex, toolIndex)
  2999. ">
  3000. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3001. <div style="margin: 5px 0">翻译</div>
  3002. </div>
  3003. <div class="noCTool">
  3004. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3005. </div>
  3006. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  3007. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3008. </div>
  3009. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3010. <img src="../../../assets/icon/checkNo.png" alt
  3011. v-if="itemTool.tool.indexOf(28) == -1" />
  3012. <div class="checkDiv" v-else>
  3013. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3014. </div>
  3015. </div> -->
  3016. </div>
  3017. <div class="tool" :class="{
  3018. isToolChoose:
  3019. itemTool.tool.indexOf(31) != -1,
  3020. }" @click="
  3021. addTools(31, itemTaskIndex, toolIndex)
  3022. ">
  3023. <div class="whiteBIcon" @click.stop="
  3024. addTools(31, itemTaskIndex, toolIndex)
  3025. ">
  3026. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3027. <div style="margin: 5px 0">数字画板</div>
  3028. </div>
  3029. <div class="noCTool">
  3030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3031. </div>
  3032. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  3033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3034. </div>
  3035. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3036. <img src="../../../assets/icon/checkNo.png" alt
  3037. v-if="itemTool.tool.indexOf(31) == -1" />
  3038. <div class="checkDiv" v-else>
  3039. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3040. </div>
  3041. </div> -->
  3042. </div>
  3043. <div class="tool" :class="{
  3044. isToolChoose:
  3045. itemTool.tool.indexOf(39) != -1,
  3046. }" @click="
  3047. addTools(39, itemTaskIndex, toolIndex)
  3048. ">
  3049. <div class="whiteBIcon" @click.stop="
  3050. addTools(39, itemTaskIndex, toolIndex)
  3051. ">
  3052. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3053. <div style="margin: 5px 0">GeoGebra</div>
  3054. </div>
  3055. <div class="noCTool">
  3056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3057. </div>
  3058. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  3059. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3060. </div>
  3061. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3062. <img src="../../../assets/icon/checkNo.png" alt
  3063. v-if="itemTool.tool.indexOf(39) == -1" />
  3064. <div class="checkDiv" v-else>
  3065. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3066. </div>
  3067. </div> -->
  3068. </div>
  3069. <div class="tool" :class="{
  3070. isToolChoose:
  3071. itemTool.tool.indexOf(66) != -1,
  3072. }" @click="
  3073. addTools(66, itemTaskIndex, toolIndex)
  3074. ">
  3075. <div class="whiteBIcon" @click.stop="
  3076. addTools(66, itemTaskIndex, toolIndex)
  3077. ">
  3078. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  3079. <div style="margin: 5px 0">公式编辑</div>
  3080. </div>
  3081. <div class="noCTool">
  3082. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3083. </div>
  3084. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  3085. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3086. </div>
  3087. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  3088. <img src="../../../assets/icon/checkNo.png" alt
  3089. v-if="itemTool.tool.indexOf(66) == -1" />
  3090. <div class="checkDiv" v-else>
  3091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3092. </div>
  3093. </div> -->
  3094. </div>
  3095. <!-- <div class="tool">
  3096. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  3097. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  3098. <div style="margin: 5px 0">分子结构</div>
  3099. </div>
  3100. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  3101. <img src="../../../assets/icon/checkNo.png" alt
  3102. v-if="itemTool.tool.indexOf(67) == -1" />
  3103. <div class="checkDiv" v-else>
  3104. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3105. </div>
  3106. </div>
  3107. </div> -->
  3108. <div class="tool" :class="{
  3109. isToolChoose:
  3110. itemTool.tool.indexOf(68) != -1,
  3111. }" @click="
  3112. addTools(68, itemTaskIndex, toolIndex)
  3113. ">
  3114. <div class="whiteBIcon" @click.stop="
  3115. addTools(68, itemTaskIndex, toolIndex)
  3116. ">
  3117. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  3118. <div style="margin: 5px 0">时间轴</div>
  3119. </div>
  3120. <div class="noCTool">
  3121. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3122. </div>
  3123. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  3124. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3125. </div>
  3126. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  3127. <img src="../../../assets/icon/checkNo.png" alt
  3128. v-if="itemTool.tool.indexOf(68) == -1" />
  3129. <div class="checkDiv" v-else>
  3130. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3131. </div>
  3132. </div> -->
  3133. </div>
  3134. <div class="tool" :class="{
  3135. isToolChoose:
  3136. itemTool.tool.indexOf(69) != -1,
  3137. }" @click="
  3138. addTools(69, itemTaskIndex, toolIndex)
  3139. ">
  3140. <div class="whiteBIcon" @click.stop="
  3141. openTools(itemTaskIndex, 69, toolIndex)
  3142. ">
  3143. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  3144. <div style="margin: 5px 0">英语写作</div>
  3145. </div>
  3146. <div class="noCTool">
  3147. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3148. </div>
  3149. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  3150. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3151. </div>
  3152. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3153. <img src="../../../assets/icon/checkNo.png" alt
  3154. v-if="itemTool.tool.indexOf(4) == -1" />
  3155. <div class="checkDiv" v-else>
  3156. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3157. </div>
  3158. </div> -->
  3159. </div>
  3160. <div class="tool" :class="{
  3161. isToolChoose:
  3162. itemTool.tool.indexOf(70) != -1,
  3163. }" @click="
  3164. addTools(70, itemTaskIndex, toolIndex)
  3165. ">
  3166. <div class="whiteBIcon" @click.stop="
  3167. openTools(itemTaskIndex, 70, toolIndex)
  3168. ">
  3169. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  3170. <div style="margin: 5px 0">英语口语</div>
  3171. </div>
  3172. <div class="noCTool">
  3173. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3174. </div>
  3175. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  3176. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3177. </div>
  3178. </div>
  3179. <!-- <div class="tool">
  3180. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  3181. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3182. <div style="margin: 5px 0">翻译</div>
  3183. </div>
  3184. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3185. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  3186. <div class="checkDiv" v-else>
  3187. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3188. </div>
  3189. </div>
  3190. </div>
  3191. <div class="tool">
  3192. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  3193. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  3194. <div style="margin: 5px 0">魔盒识字</div>
  3195. </div>
  3196. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  3197. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  3198. <div class="checkDiv" v-else>
  3199. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3200. </div>
  3201. </div>
  3202. </div>
  3203. <div class="tool">
  3204. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  3205. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  3206. <div style="margin: 5px 0">24点</div>
  3207. </div>
  3208. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  3209. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  3210. <div class="checkDiv" v-else>
  3211. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3212. </div>
  3213. </div>
  3214. </div>
  3215. <div class="tool">
  3216. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  3217. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3218. <div style="margin: 5px 0">数学画板</div>
  3219. </div>
  3220. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3221. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  3222. <div class="checkDiv" v-else>
  3223. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3224. </div>
  3225. </div>
  3226. </div>
  3227. <div class="tool">
  3228. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  3229. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3230. <div style="margin: 5px 0">GeoGebra</div>
  3231. </div>
  3232. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3233. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  3234. <div class="checkDiv" v-else>
  3235. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3236. </div>
  3237. </div>
  3238. </div>
  3239. <div class="tool">
  3240. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  3241. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  3242. <div style="margin: 5px 0">模拟驾驶</div>
  3243. </div>
  3244. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  3245. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  3246. <div class="checkDiv" v-else>
  3247. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3248. </div>
  3249. </div>
  3250. </div>
  3251. <div class="tool">
  3252. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  3253. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  3254. <div style="margin: 5px 0">路径搜索</div>
  3255. </div>
  3256. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  3257. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  3258. <div class="checkDiv" v-else>
  3259. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3260. </div>
  3261. </div>
  3262. </div>
  3263. <div class="tool">
  3264. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  3265. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  3266. <div style="margin: 5px 0">深度学习</div>
  3267. </div>
  3268. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  3269. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  3270. <div class="checkDiv" v-else>
  3271. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3272. </div>
  3273. </div>
  3274. </div>
  3275. <div class="tool">
  3276. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  3277. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  3278. <div style="margin: 5px 0">全历史</div>
  3279. </div>
  3280. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  3281. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  3282. <div class="checkDiv" v-else>
  3283. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3284. </div>
  3285. </div>
  3286. </div>
  3287. </div>
  3288. <div class="toolSort" v-if="itemTool.toolType == 4">
  3289. <div class="tool">
  3290. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  3291. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  3292. <div style="margin: 5px 0">课程设计</div>
  3293. </div>
  3294. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  3295. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  3296. <div class="checkDiv" v-else>
  3297. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3298. </div>
  3299. </div>
  3300. </div>
  3301. <div class="tool">
  3302. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  3303. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  3304. <div style="margin: 5px 0">目标管理</div>
  3305. </div>
  3306. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  3307. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  3308. <div class="checkDiv" v-else>
  3309. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3310. </div>
  3311. </div>
  3312. </div> -->
  3313. <!-- <div class="tool">
  3314. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  3315. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  3316. <div style="margin: 5px 0">汉字宫</div>
  3317. </div>
  3318. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  3319. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  3320. <div class="checkDiv" v-else>
  3321. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3322. </div>
  3323. </div>
  3324. </div> -->
  3325. </div>
  3326. </div>
  3327. <!-- v-show="!itemTool.isFold3" -->
  3328. <div class="op_tool_box"
  3329. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3330. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  3331. class="binfo_input" style="
  3332. margin: 0 0 20px 0;
  3333. width: 100% !important;
  3334. " v-model="itemTool.toolDetail"></textarea>
  3335. <div class="op_box">
  3336. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  3337. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3338. <div class="r_pub_button_op"
  3339. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  3340. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  3341. 智能优化</div>
  3342.                              
  3343. </el-tooltip>
  3344. </div>
  3345. </div>
  3346. </div>
  3347. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  3348. <div class="addToolImg">
  3349. <img src="../../../assets/icon/add.png" alt />
  3350. </div>
  3351. <div>添加工具</div>
  3352. </div> -->
  3353. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  3354. margin: 0 auto;
  3355. padding: 0 30px;
  3356. height: 45px;
  3357. ">
  3358. 添加工具
  3359. </button>
  3360. </div>
  3361. </div>
  3362. <div v-else-if="
  3363. unitJson[unitIndex].easy == 2 ||
  3364. unitJson[unitIndex].easy == 4
  3365. " class="toolChoose" style="padding: 0 0 40px">
  3366. <div class="tools">
  3367. <div class="leftTools" style="width: 100%" v-for="(
  3368. itemTool, toolIndex
  3369. ) in itemTask.toolChoose" :key="toolIndex">
  3370. <div>
  3371. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  3372. margin: 0 0 20px 0;
  3373. width: 100% !important;
  3374. " v-model="itemTool.toolDetail"></textarea>
  3375. </div>
  3376. <div style="
  3377. display: flex;
  3378. flex-direction: row;
  3379. align-items: baseline;
  3380. flex-wrap: nowrap;
  3381. justify-content: flex-start;
  3382. position: relative;
  3383. ">
  3384. <div style="margin-right: 20px; font-weight: bold"
  3385. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3386. 工具 {{ toolIndex + 1 }} :
  3387. </div>
  3388. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3389. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  3390. </div>
  3391. <div style="min-height: 163px">
  3392. <div class="toolSort">
  3393. <div class="tool">
  3394. <div class="whiteBIcon" @click="
  3395. openTools(itemTaskIndex, 1, toolIndex)
  3396. ">
  3397. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3398. <div style="margin: 5px 0">电子白板</div>
  3399. </div>
  3400. <div class="check" @click="
  3401. addTools(1, itemTaskIndex, toolIndex)
  3402. ">
  3403. <img src="../../../assets/icon/checkNo.png" alt
  3404. v-if="itemTool.tool.indexOf(1) == -1" />
  3405. <div class="checkDiv" v-else>
  3406. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3407. </div>
  3408. </div>
  3409. </div>
  3410. <div class="tool">
  3411. <div class="whiteBIcon" @click="
  3412. openTools(itemTaskIndex, 52, toolIndex)
  3413. ">
  3414. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3415. <div style="margin: 5px 0">文档</div>
  3416. </div>
  3417. <div class="check" @click="
  3418. addTools(52, itemTaskIndex, toolIndex)
  3419. ">
  3420. <img src="../../../assets/icon/checkNo.png" alt
  3421. v-if="itemTool.tool.indexOf(52) == -1" />
  3422. <div class="checkDiv" v-else>
  3423. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3424. </div>
  3425. </div>
  3426. </div>
  3427. <div class="tool">
  3428. <div class="whiteBIcon" @click="
  3429. openTools(itemTaskIndex, 3, toolIndex)
  3430. ">
  3431. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3432. <div style="margin: 5px 0">思维导图</div>
  3433. </div>
  3434. <div class="check" @click="
  3435. addTools(3, itemTaskIndex, toolIndex)
  3436. ">
  3437. <img src="../../../assets/icon/checkNo.png" alt
  3438. v-if="itemTool.tool.indexOf(3) == -1" />
  3439. <div class="checkDiv" v-else>
  3440. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3441. </div>
  3442. </div>
  3443. </div>
  3444. <div class="tool">
  3445. <div class="whiteBIcon" @click="
  3446. openTools(itemTaskIndex, 4, toolIndex)
  3447. ">
  3448. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3449. <div style="margin: 5px 0">问卷调查</div>
  3450. </div>
  3451. <div class="check" @click="
  3452. addTools(4, itemTaskIndex, toolIndex)
  3453. ">
  3454. <img src="../../../assets/icon/checkNo.png" alt
  3455. v-if="itemTool.tool.indexOf(4) == -1" />
  3456. <div class="checkDiv" v-else>
  3457. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3458. </div>
  3459. </div>
  3460. </div>
  3461. <div class="tool">
  3462. <div class="whiteBIcon" @click="
  3463. openTools(itemTaskIndex, 45, toolIndex)
  3464. ">
  3465. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3466. <div style="margin: 5px 0">选择题</div>
  3467. </div>
  3468. <div class="check" @click="
  3469. addTools(45, itemTaskIndex, toolIndex)
  3470. ">
  3471. <img src="../../../assets/icon/checkNo.png" alt
  3472. v-if="itemTool.tool.indexOf(45) == -1" />
  3473. <div class="checkDiv" v-else>
  3474. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3475. </div>
  3476. </div>
  3477. </div>
  3478. <div class="tool">
  3479. <div class="whiteBIcon" @click="
  3480. openTools(itemTaskIndex, 15, toolIndex)
  3481. ">
  3482. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3483. <div style="margin: 5px 0">问答</div>
  3484. </div>
  3485. <div class="check" @click="
  3486. addTools(15, itemTaskIndex, toolIndex)
  3487. ">
  3488. <img src="../../../assets/icon/checkNo.png" alt
  3489. v-if="itemTool.tool.indexOf(15) == -1" />
  3490. <div class="checkDiv" v-else>
  3491. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3492. </div>
  3493. </div>
  3494. </div>
  3495. <div class="tool">
  3496. <div class="whiteBIcon" @click="
  3497. addTools(16, itemTaskIndex, toolIndex)
  3498. ">
  3499. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3500. <div style="margin: 5px 0">作业提交</div>
  3501. </div>
  3502. <div class="check" @click="
  3503. addTools(16, itemTaskIndex, toolIndex)
  3504. ">
  3505. <img src="../../../assets/icon/checkNo.png" alt
  3506. v-if="itemTool.tool.indexOf(16) == -1" />
  3507. <div class="checkDiv" v-else>
  3508. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3509. </div>
  3510. </div>
  3511. </div>
  3512. <div class="tool">
  3513. <div class="whiteBIcon" @click="
  3514. openTools(itemTaskIndex, 50, toolIndex)
  3515. ">
  3516. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3517. <div style="margin: 5px 0">批量上传</div>
  3518. </div>
  3519. <div class="check" @click="
  3520. addTools(50, itemTaskIndex, toolIndex)
  3521. ">
  3522. <img src="../../../assets/icon/checkNo.png" alt
  3523. v-if="itemTool.tool.indexOf(50) == -1" />
  3524. <div class="checkDiv" v-else>
  3525. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3526. </div>
  3527. </div>
  3528. </div>
  3529. <div class="tool">
  3530. <div class="whiteBIcon" @click="
  3531. openTools(itemTaskIndex, 41, toolIndex)
  3532. ">
  3533. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3534. <div style="margin: 5px 0">选择匹配</div>
  3535. </div>
  3536. <div class="check" @click="
  3537. addTools(41, itemTaskIndex, toolIndex)
  3538. ">
  3539. <img src="../../../assets/icon/checkNo.png" alt
  3540. v-if="itemTool.tool.indexOf(41) == -1" />
  3541. <div class="checkDiv" v-else>
  3542. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3543. </div>
  3544. </div>
  3545. </div>
  3546. <div class="tool">
  3547. <div class="whiteBIcon" @click="
  3548. openTools(itemTaskIndex, 47, toolIndex)
  3549. ">
  3550. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3551. <div style="margin: 5px 0">排序</div>
  3552. </div>
  3553. <div class="check" @click="
  3554. addTools(47, itemTaskIndex, toolIndex)
  3555. ">
  3556. <img src="../../../assets/icon/checkNo.png" alt
  3557. v-if="itemTool.tool.indexOf(47) == -1" />
  3558. <div class="checkDiv" v-else>
  3559. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3560. </div>
  3561. </div>
  3562. </div>
  3563. <div class="tool">
  3564. <div class="whiteBIcon" @click="
  3565. openTools(itemTaskIndex, 48, toolIndex)
  3566. ">
  3567. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3568. <div style="margin: 5px 0">表格</div>
  3569. </div>
  3570. <div class="check" @click="
  3571. addTools(48, itemTaskIndex, toolIndex)
  3572. ">
  3573. <img src="../../../assets/icon/checkNo.png" alt
  3574. v-if="itemTool.tool.indexOf(48) == -1" />
  3575. <div class="checkDiv" v-else>
  3576. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3577. </div>
  3578. </div>
  3579. </div>
  3580. </div>
  3581. </div>
  3582. </div>
  3583. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  3584. <div class="addToolImg">
  3585. <img src="../../../assets/icon/add.png" alt />
  3586. </div>
  3587. <div>添加工具</div>
  3588. </div> -->
  3589. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  3590. style="margin: 35px auto 20px">
  3591. 添加工具
  3592. </button>
  3593. </div>
  3594. </div>
  3595. <div v-else-if="
  3596. unitJson[unitIndex].easy == 1 ||
  3597. (unitJson[unitIndex].easy == 5 &&
  3598. itemTask.taskType == 2)
  3599. " class="toolChoose" style="padding: 0 0 40px">
  3600. <div class="tools">
  3601. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  3602. itemTool, toolIndex
  3603. ) in itemTask.toolChoose" :key="toolIndex">
  3604. <div style="min-height: 163px">
  3605. <div class="toolSort">
  3606. <div class="tool">
  3607. <div class="whiteBIcon" @click="
  3608. openTools(itemTaskIndex, 50, toolIndex)
  3609. ">
  3610. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3611. <div style="margin: 5px 0">批量上传</div>
  3612. </div>
  3613. <div class="check" @click="
  3614. addTools(50, itemTaskIndex, toolIndex)
  3615. ">
  3616. <img src="../../../assets/icon/checkNo.png" alt
  3617. v-if="itemTool.tool.indexOf(50) == -1" />
  3618. <div class="checkDiv" v-else>
  3619. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3620. </div>
  3621. </div>
  3622. </div>
  3623. </div>
  3624. </div>
  3625. </div>
  3626. </div>
  3627. </div>
  3628. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  3629. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3630. <div class="elist_title">
  3631. <div style="
  3632. display: flex;
  3633. flex-direction: row;
  3634. align-items: center;
  3635. margin: 20px 0;
  3636. ">
  3637. <div class="lineTitle clineTitle">评价设置</div>
  3638. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3639. <div class="r_pub_button_op" style="margin-left:auto;"
  3640. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  3641. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  3642. </el-tooltip>
  3643. <!-- <div class="line" style="width: 90%"></div> -->
  3644. </div>
  3645. </div>
  3646. <div class="mbCss">
  3647. <div class="pjCss" :style="{
  3648. width: itemTask.isEvaFold
  3649. ? 'calc(100% - 55%)'
  3650. : 'calc(100% - 120px)',
  3651. }">
  3652. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  3653. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  3654. <span>评价维度:</span>
  3655. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  3656. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  3657. <!-- </el-tooltip> -->
  3658. <!-- <span>评星等级:</span>
  3659. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  3660. disabled></el-rate> -->
  3661. <div class="remove" @click="
  3662. deletEList(
  3663. unitIndex,
  3664. itemTaskIndex,
  3665. eIndex
  3666. )
  3667. "></div>
  3668. <div class="elist_inptu_text">
  3669. <span>维度描述:</span>
  3670. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  3671. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  3672. <!-- </el-tooltip> -->
  3673. </div>
  3674. <div class="elist_inptu_text" v-if="evalua">
  3675. <span>目标:</span>
  3676. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  3677. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  3678. @change="forceUpdate()">
  3679. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  3680. :value="e.name">
  3681. </el-option>
  3682. </el-select> -->
  3683. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  3684. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  3685. </div>
  3686. </div>
  3687. </div>
  3688. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  3689. style="margin: 35px 35px 0 0">
  3690. <div class="addToolImg">
  3691. <img src="../../../assets/icon/add.png" alt />
  3692. </div>
  3693. <div>添加</div>
  3694. </div> -->
  3695. <div class="eva_btn_box">
  3696. <div class="eva_btn_left_box">
  3697. <button class="c_pub_button_add pub_btn_eval_img"
  3698. @click="addEList(unitIndex, itemTaskIndex)">
  3699. 添加
  3700. </button>
  3701. <button class="c_pub_button_add pub_btn_eval_source_img"
  3702. @click="openEList(unitIndex, itemTaskIndex)">
  3703. 资源
  3704. </button>
  3705. </div>
  3706. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  3707. v-if="itemTask.eList && itemTask.eList.length">
  3708. 添加资源模板
  3709. </button>
  3710. </div>
  3711. </div>
  3712. <div v-if="evalua" style="
  3713. border: 1px solid #e5e5e5;
  3714. box-shadow: 3px 1px 15px 3px #e0e0e0;
  3715. " :style="{
  3716. width: itemTask.isEvaFold ? '55%' : '116px',
  3717. }" class="evaCss">
  3718. <!-- <div class="e_add_top">
  3719. <div class="e_add_title">
  3720. <span>当前使用目标管理</span>
  3721. <span>{{ eTitle }}</span>
  3722. <img src="../../../assets/line.png" class="cru_line" style="
  3723. width: 125px;
  3724. height: 20px;
  3725. bottom: -10px;
  3726. left: 155px;
  3727. " />
  3728. </div>
  3729. </div> -->
  3730. <div class="e_add_content" style="width: 100%">
  3731. <div class="e_add_list_pbox" style="width: 100%">
  3732. <div class="e_add_list_pbox_title">
  3733. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  3734. <div class="type_content" v-if="itemTask.isEvaFold">
  3735. <span :class="{ active: typeMode == 1 }"
  3736. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  3737. <span :class="{ active: typeMode == 2 }"
  3738. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  3739. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  3740. </div>
  3741. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  3742. @click="foldEva(itemTaskIndex)">
  3743. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  3744. </div>
  3745. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  3746. @click="foldEva(itemTaskIndex)">
  3747. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  3748. </div>
  3749. </div>
  3750. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  3751. style="min-height: 200px">
  3752. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  3753. " v-if="typeMode == 1"></Mind>
  3754. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  3755. </Sunburst>
  3756. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  3757. v-if="typeMode == 3"></SeeBoard>
  3758. </div>
  3759. </div>
  3760. </div>
  3761. </div>
  3762. </div>
  3763. </div>
  3764. <div class="funBlock" style="padding: 0">
  3765. <div class="fold" @click="fold(itemTaskIndex, $event)">
  3766. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  3767. <div>
  3768. {{
  3769. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  3770. }}
  3771. </div>
  3772. </div>
  3773. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  3774. <div>展开</div>
  3775. <div class="arrow">
  3776. <img src="../../../assets/icon/expand.png" alt />
  3777. </div>
  3778. </div> -->
  3779. </div>
  3780. </div>
  3781. </div>
  3782. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  3783. <!-- <div>
  3784. <img src="../../../../assets/icon/new/addStage.png" alt />
  3785. <span>添加任务</span>
  3786. </div> -->
  3787. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  3788. 添加任务
  3789. </button>
  3790. </div>
  3791. </div>
  3792. <div class="info_btnBox3">
  3793. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  3794. goTo(
  3795. '/course?userid=' +
  3796. userid +
  3797. '&oid=' +
  3798. oid +
  3799. '&org=' +
  3800. org +
  3801. '&role=' +
  3802. role
  3803. )
  3804. ">
  3805. 返回课程
  3806. </button>
  3807. <button class="c_pub_button_return pub_btn_last_img"
  3808. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  3809. {{ steps == 4 ? "返回课程" : "上一步" }}
  3810. </button>
  3811. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  3812. pub_btn_next_img: steps != 3,
  3813. pub_btn_finish_img: steps == 3,
  3814. }">
  3815. {{ steps == 3 ? "确认上传" : "下一步" }}
  3816. </button>
  3817. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  3818. '修改模板' : '保存模板'}}</button>
  3819. </div>
  3820. </div>
  3821. </div>
  3822. </div>
  3823. </div>
  3824. <div style="
  3825. width: calc(100% - 20px);
  3826. background: rgb(255, 255, 255);
  3827. border-radius: 10px;
  3828. " v-if="steps == 4">
  3829. <div class="basic_box_success">
  3830. <div class="right_img">
  3831. <img src="../../../assets/icon/right.png" alt />
  3832. </div>
  3833. <div style="font-weight: bold">成功</div>
  3834. <!-- <div>您的课程编号</div>
  3835. <div class="number">{{ number }}</div>-->
  3836. <!-- <div class="success_button">
  3837. <div class="look_course" @click="isNoFinsh">
  3838. 邀请老师协同编辑
  3839. </div>
  3840. <div class="attend_others" @click="goCourse">预览课程</div>
  3841. </div> -->
  3842. </div>
  3843. </div>
  3844. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  3845. @mouseleave="btnDisplay(false)" v-if="false">
  3846. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  3847. goTo(
  3848. '/course?userid=' +
  3849. userid +
  3850. '&oid=' +
  3851. oid +
  3852. '&org=' +
  3853. org +
  3854. '&role=' +
  3855. role
  3856. )
  3857. ">
  3858. 返回课程
  3859. </button>
  3860. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  3861. @click="lastSteps">
  3862. {{ steps == 4 ? "返回课程" : "上一步" }}
  3863. </button>
  3864. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  3865. pub_btn_next_img: steps != 3,
  3866. pub_btn_finish_img: steps == 3,
  3867. }">
  3868. {{ steps == 3 ? "确认上传" : "下一步" }}
  3869. </button>
  3870. </div>
  3871. </div>
  3872. </div>
  3873. <div class="leftBar" v-if="istemplate == 1">
  3874. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  3875. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" />
  3876. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" />
  3877. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  3878. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  3879. @setAiJson="setAiJson" /> -->
  3880. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  3881. @setAiJson="setAiJson" />
  3882. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  3883. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  3884. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  3885. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  3886. </div>
  3887. </div>
  3888. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  3889. class="dialog_diy2 customWidth">
  3890. <div>请复制该链接邀请协同编辑</div>
  3891. <div>http://www.boomyon.com/index-zhang.com</div>
  3892. <span slot="footer" class="dialog-footer">
  3893. <el-button type="primary">复制链接分享</el-button>
  3894. <el-button @click="dialogVisible = false">取消</el-button>
  3895. </span>
  3896. </el-dialog>
  3897. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  3898. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  3899. <el-form>
  3900. <el-form-item label="文档标题">
  3901. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  3902. </el-form-item>
  3903. <div>文档简介</div>
  3904. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  3905. </el-form>
  3906. <span slot="footer" class="dialog-footer">
  3907. <el-button @click="dialogVisible1 = false">取 消</el-button>
  3908. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  3909. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  3910. </span>
  3911. </el-dialog>
  3912. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  3913. :before-close="handleClose" class="dialog_diy">
  3914. <el-form>
  3915. <el-form-item label="文档标题">
  3916. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  3917. </el-form-item>
  3918. <div>文档内容</div>
  3919. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  3920. </el-form>
  3921. <span slot="footer" class="dialog-footer">
  3922. <el-button @click="clearChoose">取 消</el-button>
  3923. <el-button type="primary" @click="wordNext()">确定</el-button>
  3924. </span>
  3925. </el-dialog>
  3926. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  3927. :before-close="handleClose" class="dialog_diy">
  3928. <el-form>
  3929. <el-form-item label="文本标题">
  3930. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  3931. placeholder="请输入文本标题..."></el-input>
  3932. </el-form-item>
  3933. <!-- <div>富文本内容</div> -->
  3934. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  3935. </el-form>
  3936. <span slot="footer" class="dialog-footer">
  3937. <el-button @click="clearAttText">取 消</el-button>
  3938. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  3939. </span>
  3940. </el-dialog>
  3941. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  3942. :before-close="handleClose" class="dialog_diy lineCss">
  3943. <el-form>
  3944. <el-form-item label="标题" :label-width="formLabelWidth">
  3945. <span>
  3946. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  3947. </span>
  3948. </el-form-item>
  3949. <el-form-item label="链接" :label-width="formLabelWidth">
  3950. <span>
  3951. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  3952. </span>
  3953. </el-form-item>
  3954. </el-form>
  3955. <span slot="footer" class="dialog-footer">
  3956. <el-button @click="clearLine">取 消</el-button>
  3957. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  3958. </span>
  3959. </el-dialog>
  3960. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  3961. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  3962. <div>
  3963. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  3964. </div>
  3965. <span slot="footer" class="dialog-footer">
  3966. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  3967. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  3968. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  3969. </span>
  3970. </el-dialog>
  3971. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  3972. :before-close="handleClose" class="addNewPP customWidth">
  3973. <div class="people">
  3974. <div class="people_top">
  3975. <div class="people_nav">选择成员</div>
  3976. <div class="people_top_right">
  3977. <div class="people_search">
  3978. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  3979. <div class="search_img" @click="searchStudent">
  3980. <img src="../../../assets/icon/search.png" alt />
  3981. </div>
  3982. </div>
  3983. </div>
  3984. </div>
  3985. <el-checkbox-group v-model="checkboxList" class="people_name">
  3986. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  3987. "暂无学生可选" }}</el-checkbox>
  3988. </el-checkbox-group>
  3989. </div>
  3990. <span slot="footer" class="dialog-footer">
  3991. <el-button @click="dialogVisible3 = false">取 消</el-button>
  3992. <el-button type="primary" @click="isAddPP">确定</el-button>
  3993. </span>
  3994. </el-dialog>
  3995. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  3996. :before-close="handleClose" class="addNewPP2">
  3997. <div class="check_classBox">
  3998. <div class="check_class_right">
  3999. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  4000. 全部
  4001. </div>
  4002. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  4003. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  4004. {{ item.name }}
  4005. </div>
  4006. </el-tooltip>
  4007. </div>
  4008. <div class="check_class_left">
  4009. <div class="check_class_all_box">
  4010. <div class="check_class_left_title">选择班级</div>
  4011. <div style="display: flex; align-items: center; margin-left: auto">
  4012. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  4013. </div>
  4014. </div>
  4015. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  4016. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  4017. </div> -->
  4018. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  4019. v-if="grade2.length">
  4020. <div v-for="item in grade2" :key="item.id" class="class_item">
  4021. <el-checkbox :label="item.id">
  4022. {{ item.name }}
  4023. </el-checkbox>
  4024. </div>
  4025. </el-checkbox-group>
  4026. <div v-if="!grade2.length">暂无数据</div>
  4027. </div>
  4028. </div>
  4029. <span slot="footer" class="dialog-footer">
  4030. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  4031. <el-button type="primary" @click="isAddClass">确定</el-button>
  4032. </span>
  4033. </el-dialog>
  4034. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  4035. :before-close="handleClose" class="addNewPP customWidth">
  4036. <div style="display: flex;justify-content: space-between;">
  4037. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  4038. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  4039. 全部
  4040. </div>
  4041. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  4042. v-for="(i) in CollaborativeTeaList" :key="i.id">
  4043. <el-tooltip placement="top" :content="i.name">
  4044. <span>{{i.name}}</span>
  4045. </el-tooltip>
  4046. </div>
  4047. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  4048. 其他
  4049. </div>
  4050. </div>
  4051. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  4052. <div class="people">
  4053. <div class="people_top">
  4054. <div class="people_top_right">
  4055. <div class="people_search">
  4056. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  4057. <div class="search_img" @click="getTeacher(collid)">
  4058. <img src="../../../assets/icon/search.png" alt />
  4059. </div>
  4060. </div>
  4061. </div>
  4062. <div class="people_nav" style="display: flex; align-items: center">
  4063. <div class="check_class_left_title">选择成员</div>
  4064. <div style="display: flex; align-items: center; margin-left: auto">
  4065. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  4066. </div>
  4067. </div>
  4068. </div>
  4069. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  4070. @change="InviteChange2">
  4071. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  4072. <div class="t_j_box">
  4073. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  4074. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  4075. </el-tooltip>
  4076. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  4077. <span>{{ item.username.split('@')[0] }}</span>
  4078. </el-tooltip>
  4079. <el-tooltip placement="top" :content="item.school">
  4080. <span>{{ item.school }}</span>
  4081. </el-tooltip>
  4082. </div>
  4083. </el-checkbox>
  4084. </el-checkbox-group>
  4085. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  4086. </div>
  4087. </div>
  4088. </div>
  4089. <span slot="footer" class="dialog-footer">
  4090. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  4091. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  4092. </span>
  4093. </el-dialog>
  4094. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  4095. closePan(4);
  4096. }
  4097. " class="dialog_diy fullStyle">
  4098. <div style="height: 100%">
  4099. <div class="a_add_title" style="
  4100. display: flex;
  4101. flex-direction: row;
  4102. align-items: center;
  4103. justify-content: center;
  4104. ">
  4105. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  4106. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4107. </div>
  4108. <div class="a_addBox" style="height: calc(100% - 50px)">
  4109. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  4110. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  4111. <div class="a_add_checkType">
  4112. <span :class="{
  4113. active:
  4114. askJson.askJson[index1].type == '1' ||
  4115. !askJson.askJson[index1].type,
  4116. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  4117. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  4118. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  4119. </div>
  4120. <div class="a_add_head">
  4121. <div style="
  4122. display: flex;
  4123. align-items: center;
  4124. width: 100%;
  4125. margin-right: 20px;
  4126. ">
  4127. <span style="min-width: fit-content">{{
  4128. index1 + 1 + "、"
  4129. }}</span>
  4130. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4131. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  4132. $forceUpdate();
  4133. }
  4134. "></textarea>
  4135. </div>
  4136. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  4137. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  4138. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  4139. </div>
  4140. <div class="a_add_head_div">
  4141. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  4142. </el-button>
  4143. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  4144. </div>
  4145. </div>
  4146. <div class="a_add_body">
  4147. <div class="a_add_input" style="flex-direction: column">
  4148. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  4149. margin: 20px 10px 0 0;
  4150. display: flex;
  4151. align-items: center;
  4152. position: relative;
  4153. ">
  4154. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  4155. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4156. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  4157. @change="() => {
  4158. $forceUpdate();
  4159. }
  4160. "></textarea>
  4161. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  4162. v-if="askJson.askJson[index1].askItem != 1">
  4163. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  4164. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  4165. </div>
  4166. <div class="a_add_body_div">
  4167. <el-button type="primary" size="small"
  4168. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  4169. <el-button type="primary" size="small" @click="
  4170. deletecheckList(askJson.askJson[index1], checkIndex)
  4171. " v-if="askJson.askJson[index1].askItem != 1">删除
  4172. </el-button>
  4173. </div>
  4174. </div>
  4175. </div>
  4176. <!-- <div class="a_add_body_div">
  4177. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  4178. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  4179. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  4180. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  4181. </el-button>
  4182. </div> -->
  4183. </div>
  4184. </div>
  4185. </div>
  4186. </div>
  4187. <span slot="footer" class="dialog-footer">
  4188. <el-button @click="closePan(4)">取 消</el-button>
  4189. <el-button type="primary" @click="addAsk">确 定</el-button>
  4190. </span>
  4191. </el-dialog>
  4192. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  4193. closePan(45);
  4194. }
  4195. " class="dialog_diy fullStyle">
  4196. <div style="height: 100%">
  4197. <!-- <div class="a_add_title" style="
  4198. display: flex;
  4199. flex-direction: row;
  4200. align-items: center;
  4201. justify-content: center;
  4202. ">
  4203. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  4204. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4205. </div> -->
  4206. <div class="a_addBox" style="height: 100%">
  4207. <div style="
  4208. font-size: 16px;
  4209. color: #c7c7c7;
  4210. display: flex;
  4211. align-items: center;
  4212. ">
  4213. <!-- 请输入题目内容 -->
  4214. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  4215. v-if="isPasteChoice">
  4216. 智能粘贴
  4217. </button>
  4218. </div>
  4219. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  4220. <div class="a_add_checkType">
  4221. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  4222. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  4223. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  4224. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  4225. </div>
  4226. <div class="a_add_head">
  4227. <div class="timuUpImg">
  4228. <div style="display: flex; align-items: center">
  4229. <span style="min-width: fit-content">{{
  4230. index1 + 1 + "、"
  4231. }}</span>
  4232. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  4233. placeholder="请输入题目">
  4234. </el-input> -->
  4235. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4236. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  4237. $forceUpdate();
  4238. }
  4239. "></textarea>
  4240. </div>
  4241. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  4242. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  4243. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  4244. </div>
  4245. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  4246. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4247. <input type="file" accept="image/*" style="display: none"
  4248. @change="beforeUploadTiMu($event, index1)" />
  4249. </div>
  4250. </div>
  4251. <div class="a_add_head_div">
  4252. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  4253. </el-button>
  4254. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  4255. </div>
  4256. </div>
  4257. <div class="timuImgBox" v-if="
  4258. testJson.testJson[index1].timuList &&
  4259. testJson.testJson[index1].timuList.length
  4260. ">
  4261. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  4262. @click.stop="previewImg(timg.src)">
  4263. <img :src="timg.src" alt="" />
  4264. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  4265. <img src="../../../assets/icon/delete.png" alt="" />
  4266. </div>
  4267. </div>
  4268. </div>
  4269. <div class="a_add_body">
  4270. <div class="a_add_input a_add_input_choice">
  4271. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  4272. @change="() => {
  4273. $forceUpdate();
  4274. }
  4275. ">
  4276. <div class="radioBox">
  4277. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  4278. .testItem" :key="checkIndex" :label="checkIndex">
  4279. <div style="margin-right: 10px">
  4280. 选项{{ checkIndex + 1 }}
  4281. </div>
  4282. <div style="margin-right: 10px; width: 300px" v-if="
  4283. testJson.testJson[index1].checkList[checkIndex] &&
  4284. testJson.testJson[index1].checkList[checkIndex]
  4285. .imgType &&
  4286. testJson.testJson[index1].checkList[checkIndex]
  4287. .imgType == 1
  4288. ">
  4289. <div class="inImg" @click.stop="
  4290. previewImg(
  4291. testJson.testJson[index1].checkList[checkIndex]
  4292. .src
  4293. )
  4294. ">
  4295. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  4296. .src
  4297. " lazy />
  4298. <!-- <img :src="
  4299. testJson.testJson[index1].checkList[checkIndex]
  4300. .src
  4301. " alt="" /> -->
  4302. </div>
  4303. </div>
  4304. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  4305. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4306. $forceUpdate();
  4307. }
  4308. "></textarea>
  4309. <div class="xzUpImg" @click.stop="addImg($event)">
  4310. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4311. <input type="file" accept="image/*" style="display: none"
  4312. @change="beforeUploadTi($event, index1, checkIndex)" />
  4313. </div>
  4314. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4315. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  4316. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  4317. </div>
  4318. <div class="a_add_body_div">
  4319. <el-button type="primary" size="small" @click.stop="
  4320. addTcheckList(testJson.testJson[index1], checkIndex)
  4321. ">添加</el-button>
  4322. <el-button type="primary" size="small" @click.stop="
  4323. deleteTcheckList(
  4324. testJson.testJson[index1],
  4325. checkIndex
  4326. )
  4327. " v-if="testJson.testJson[index1].testItem != 1">删除
  4328. </el-button>
  4329. </div>
  4330. </el-radio>
  4331. </div>
  4332. </el-radio-group>
  4333. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  4334. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  4335. $forceUpdate();
  4336. }
  4337. ">
  4338. <div class="radioBox">
  4339. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  4340. .testItem" :key="checkIndex1" :label="checkIndex1">
  4341. <div style="margin-right: 10px">
  4342. 选项{{ checkIndex1 + 1 }}
  4343. </div>
  4344. <div style="margin-right: 10px; width: 300px" v-if="
  4345. testJson.testJson[index1].checkList[checkIndex1] &&
  4346. testJson.testJson[index1].checkList[checkIndex1]
  4347. .imgType &&
  4348. testJson.testJson[index1].checkList[checkIndex1]
  4349. .imgType == 1
  4350. ">
  4351. <div class="inImg" @click.stop="
  4352. previewImg(
  4353. testJson.testJson[index1].checkList[checkIndex1]
  4354. .src
  4355. )
  4356. ">
  4357. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  4358. .src
  4359. " lazy />
  4360. <!-- <img :src="
  4361. testJson.testJson[index1].checkList[checkIndex1]
  4362. .src
  4363. " alt="" /> -->
  4364. </div>
  4365. </div>
  4366. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  4367. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4368. $forceUpdate();
  4369. }
  4370. "></textarea>
  4371. <div class="xzUpImg" @click.stop="addImg($event)">
  4372. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4373. <input type="file" accept="image/*" style="display: none"
  4374. @change="beforeUploadTi($event, index1, checkIndex1)" />
  4375. </div>
  4376. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4377. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  4378. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  4379. </div>
  4380. <div class="a_add_body_div">
  4381. <el-button type="primary" size="small" @click.stop="
  4382. addTcheckList(
  4383. testJson.testJson[index1],
  4384. checkIndex1
  4385. )
  4386. ">添加</el-button>
  4387. <el-button type="primary" size="small" @click.stop="
  4388. deleteTcheckList(
  4389. testJson.testJson[index1],
  4390. checkIndex1
  4391. )
  4392. " v-if="testJson.testJson[index1].testItem != 1">删除
  4393. </el-button>
  4394. </div>
  4395. </el-checkbox>
  4396. </div>
  4397. </el-checkbox-group>
  4398. </div>
  4399. <!-- <div class="a_add_body_div">
  4400. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  4401. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  4402. v-if="testJson.testJson[index1].testItem != 1">删除
  4403. </el-button>
  4404. </div> -->
  4405. </div>
  4406. </div>
  4407. </div>
  4408. </div>
  4409. <span slot="footer" class="dialog-footer">
  4410. <el-button @click="closePan(45)">取 消</el-button>
  4411. <el-button type="primary" @click="addTest">确 定</el-button>
  4412. </span>
  4413. </el-dialog>
  4414. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  4415. :before-close="handleClose" class="dialog_diy addToolsDia">
  4416. <div class="toolChoose">
  4417. <div class="tools">
  4418. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  4419. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  4420. <div style="
  4421. display: flex;
  4422. flex-direction: row;
  4423. align-items: baseline;
  4424. flex-wrap: nowrap;
  4425. justify-content: flex-start;
  4426. position: relative;
  4427. ">
  4428. <div class="chooseWho">
  4429. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  4430. 互动类
  4431. </div>
  4432. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  4433. 思维类
  4434. </div>
  4435. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4436. 评价类
  4437. </div>
  4438. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4439. 其他
  4440. </div>
  4441. </div>
  4442. </div>
  4443. <div style="min-height: 163px">
  4444. <div class="toolSort" v-if="chapToolsType == 0">
  4445. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  4446. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  4447. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4448. <div style="margin: 5px 0">素材库</div>
  4449. </div>
  4450. <div class="noCTool">
  4451. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4452. </div>
  4453. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  4454. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4455. </div>
  4456. <!-- <div class="check" @click="chapAddTools(8)">
  4457. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  4458. <div class="checkDiv" v-else>
  4459. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4460. </div>
  4461. </div> -->
  4462. </div>
  4463. </div>
  4464. <div class="toolSort" v-if="chapToolsType == 1">
  4465. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  4466. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  4467. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4468. <div style="margin: 5px 0">思维网格</div>
  4469. </div>
  4470. <div class="noCTool">
  4471. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4472. </div>
  4473. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  4474. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4475. </div>
  4476. <!-- <div class="check" @click="chapAddTools(7)">
  4477. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  4478. <div class="checkDiv" v-else>
  4479. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4480. </div>
  4481. </div> -->
  4482. </div>
  4483. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  4484. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  4485. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4486. <div style="margin: 5px 0">电子白板</div>
  4487. </div>
  4488. <div class="noCTool">
  4489. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4490. </div>
  4491. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  4492. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4493. </div>
  4494. <!-- <div class="check" @click="chapAddTools(1)">
  4495. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  4496. <div class="checkDiv" v-else>
  4497. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4498. </div>
  4499. </div> -->
  4500. </div>
  4501. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  4502. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  4503. <img src="../../../assets/icon/secondToolList/note.png" alt />
  4504. <div style="margin: 5px 0">便签</div>
  4505. </div>
  4506. <div class="noCTool">
  4507. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4508. </div>
  4509. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  4510. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4511. </div>
  4512. <!-- <div class="check" @click="chapAddTools(2)">
  4513. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  4514. <div class="checkDiv" v-else>
  4515. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4516. </div>
  4517. </div> -->
  4518. </div>
  4519. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  4520. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  4521. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4522. <div style="margin: 5px 0">协同文档</div>
  4523. </div>
  4524. <div class="noCTool">
  4525. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4526. </div>
  4527. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  4528. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4529. </div>
  4530. <!-- <div class="check" @click="chapAddTools(6)">
  4531. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  4532. <div class="checkDiv" v-else>
  4533. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4534. </div>
  4535. </div> -->
  4536. </div>
  4537. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  4538. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  4539. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4540. <div style="margin: 5px 0">思维导图</div>
  4541. </div>
  4542. <div class="noCTool">
  4543. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4544. </div>
  4545. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  4546. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4547. </div>
  4548. <!-- <div class="check" @click="chapAddTools(3)">
  4549. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  4550. <div class="checkDiv" v-else>
  4551. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4552. </div>
  4553. </div> -->
  4554. </div>
  4555. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  4556. @click="chapAddTools(31)">
  4557. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  4558. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4559. <div style="margin: 5px 0">数学画板</div>
  4560. </div>
  4561. <div class="noCTool">
  4562. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4563. </div>
  4564. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  4565. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4566. </div>
  4567. <!-- <div class="check" @click="chapAddTools(31)">
  4568. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  4569. <div class="checkDiv" v-else>
  4570. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4571. </div>
  4572. </div> -->
  4573. </div>
  4574. </div>
  4575. <div class="toolSort" v-if="chapToolsType == 2">
  4576. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  4577. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  4578. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  4579. <div style="margin: 5px 0">量规评分</div>
  4580. </div>
  4581. <div class="noCTool">
  4582. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4583. </div>
  4584. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  4585. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4586. </div>
  4587. <!-- <div class="check" @click="chapAddTools(5)">
  4588. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  4589. <div class="checkDiv" v-else>
  4590. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4591. </div>
  4592. </div> -->
  4593. </div>
  4594. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  4595. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  4596. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4597. <div style="margin: 5px 0">问卷调查</div>
  4598. </div>
  4599. <div class="noCTool">
  4600. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4601. </div>
  4602. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  4603. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4604. </div>
  4605. <!-- <div class="check" @click="chapAddTools(4)">
  4606. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  4607. <div class="checkDiv" v-else>
  4608. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4609. </div>
  4610. </div> -->
  4611. </div>
  4612. </div>
  4613. </div>
  4614. <div>
  4615. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  4616. v-model="itemTools.toolDetail" />
  4617. </div>
  4618. </div>
  4619. </div>
  4620. </div>
  4621. <span slot="footer" class="dialog-footer">
  4622. <el-button @click="dialogVisible4 = false">取 消</el-button>
  4623. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  4624. </span>
  4625. </el-dialog>
  4626. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  4627. closePan(15);
  4628. }
  4629. " class="dialog_diy">
  4630. <div>
  4631. <div class="a_add_title" style="
  4632. display: flex;
  4633. flex-direction: column;
  4634. align-items: flex-start;
  4635. justify-content: center;
  4636. ">
  4637. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  4638. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  4639. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  4640. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  4641. </div>
  4642. </div>
  4643. <span slot="footer" class="dialog-footer">
  4644. <el-button @click="closePan(15)">取 消</el-button>
  4645. <el-button type="primary" @click="addAnswer">确 定</el-button>
  4646. </span>
  4647. </el-dialog>
  4648. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  4649. :before-close="handleClose" class="dialog_diy">
  4650. <div>
  4651. <div class="a_add_title" style="
  4652. display: flex;
  4653. flex-direction: column;
  4654. align-items: flex-start;
  4655. justify-content: center;
  4656. ">
  4657. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  4658. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  4659. </div>
  4660. </div>
  4661. <span slot="footer" class="dialog-footer">
  4662. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  4663. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  4664. </span>
  4665. </el-dialog>
  4666. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  4667. :before-close="handleClose" class="dialog_diy">
  4668. <div>
  4669. <div class="fileCss" style="padding-top: 20px">
  4670. <div>
  4671. <button class="info_btn" @click="addImg($event)">
  4672. 选择本地文件
  4673. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  4674. </button>
  4675. <div class="spanName">选择本地文件</div>
  4676. </div>
  4677. <!-- <div>
  4678. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  4679. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  4680. <img :src="cover[0].url" alt="" />
  4681. <div class="deletePic" @click="deleteSysPic">
  4682. <img src="../../../assets/icon/delete.png" alt="" />
  4683. </div>
  4684. </div>
  4685. <div class="spanName">选择系统文件</div>
  4686. </div> -->
  4687. <div>
  4688. <el-button @click="(searchImageValue = courseName), resetImage()"
  4689. v-if="isSysPic2 == false">选择网络文件</el-button>
  4690. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  4691. <img :src="cover[0].url" alt="" />
  4692. <div class="deletePic" @click="deleteSysPic">
  4693. <img src="../../../assets/icon/delete.png" alt="" />
  4694. </div>
  4695. </div>
  4696. <div class="spanName">选择网络文件</div>
  4697. </div>
  4698. </div>
  4699. <!-- <div class="fileCss">
  4700. </div> -->
  4701. </div>
  4702. <span slot="footer" class="dialog-footer">
  4703. <el-button @click="choosePicVisible = false">取 消</el-button>
  4704. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  4705. </span>
  4706. </el-dialog>
  4707. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  4708. :before-close="handleClose" class="dialog_diy">
  4709. <div class="cru_selectBox" style="margin: 0">
  4710. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  4711. 绘画
  4712. </div>
  4713. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  4714. 科技
  4715. </div>
  4716. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  4717. 人文
  4718. </div>
  4719. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  4720. 艺术
  4721. </div>
  4722. </div>
  4723. <div class="sysPicBox">
  4724. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  4725. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  4726. </div>
  4727. </div>
  4728. </el-dialog>
  4729. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  4730. :before-close="handleClose" class="dialog_diy">
  4731. <div>
  4732. <div class="people_top_right" style="display: flex; align-items: center">
  4733. <div style="position: relative; width: 100%">
  4734. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  4735. @keyup.enter.native="resetImage()"></el-input>
  4736. <div class="search_img" @click="resetImage" style="right: 10px">
  4737. <img src="../../../assets/icon/search.png" alt />
  4738. </div>
  4739. </div>
  4740. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  4741. </div>
  4742. <div class="sysPicBox" v-loading="imageloading">
  4743. <div class="picNone" v-if="!imageList.length">
  4744. 请输入关键词搜索图片
  4745. </div>
  4746. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  4747. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  4748. </div>
  4749. </div>
  4750. </div>
  4751. </el-dialog>
  4752. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  4753. closePan(41);
  4754. }
  4755. " class="dialog_diy dialog_diy3 fullStyle">
  4756. <div v-if="selectJson" style="height: 100%">
  4757. <div class="select_box1" v-if="selectSteps == 1">
  4758. <div class="select_box1_img">
  4759. <div class="select_box1_title">
  4760. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  4761. </div>
  4762. <div class="select_box1_add_img">
  4763. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  4764. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  4765. <img src="../../../assets/icon/addPoster.png" alt="" />
  4766. </div>
  4767. <div class="isSysPic" v-else>
  4768. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  4769. <div class="deletePic" @click="deleteSelectPic">
  4770. <img src="../../../assets/icon/delete.png" alt="" />
  4771. </div>
  4772. </div>
  4773. </div>
  4774. </div>
  4775. <div class="select_box1_select">
  4776. <div class="select_box1_title">
  4777. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  4778. </div>
  4779. <div class="select_box1_select_box">
  4780. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  4781. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  4782. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  4783. <div class="select_box1_select_box_add">
  4784. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  4785. 添加</el-button>
  4786. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  4787. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  4788. </div>
  4789. </div>
  4790. </div>
  4791. </div>
  4792. <div v-if="selectSteps == 2" style="height: 100%">
  4793. <div class="select_box2">
  4794. <div class="select_box2_title">设置每道题目的正确选项</div>
  4795. <div class="select_box2_box">
  4796. <div class="select_box2_img">
  4797. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  4798. </div>
  4799. <div class="select_box2_answer">
  4800. <div class="select_answer_title">根据题目选择对应答案</div>
  4801. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  4802. <span>{{ checkIndex + 1 }}、</span>
  4803. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  4804. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  4805. </el-option>
  4806. </el-select>
  4807. </div>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. </div>
  4812. </div>
  4813. <span slot="footer" class="dialog-footer">
  4814. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  4815. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  4816. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  4817. </span>
  4818. </el-dialog>
  4819. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  4820. :before-close="handleClose" class="dialog_diy">
  4821. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  4822. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  4823. <div class="pjCss" style="width: 100%">
  4824. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  4825. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  4826. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  4827. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  4828. <div class="remove" @click="deletRateList(eIndex)"></div>
  4829. <div style="width: 100%; display: flex">
  4830. <span style="min-width: 100px; text-align: right">评星等级:</span>
  4831. <el-rate v-model="eItem.score" disabled></el-rate>
  4832. </div>
  4833. <div class="elist_inptu_text" style="align-items: flex-start">
  4834. <span style="min-width: 100px; text-align: right">描述:</span>
  4835. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  4836. </div>
  4837. </div>
  4838. </div>
  4839. <div class="addToolFun" @click="addRateList()">
  4840. <div class="addToolImg">
  4841. <img src="../../../assets/icon/add.png" alt />
  4842. </div>
  4843. <div>添加</div>
  4844. </div>
  4845. </div>
  4846. </div>
  4847. <span slot="footer" class="dialog-footer">
  4848. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  4849. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  4850. </span>
  4851. </el-dialog>
  4852. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  4853. closePan(47);
  4854. }
  4855. " class="dialog_diy dialog_diy3 fullStyle">
  4856. <div style="height: 100%">
  4857. <div class="sentenBox" style="height: 100%">
  4858. <div class="addSen" @click="addSt">添加题目</div>
  4859. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  4860. <div class="sentenTopBox">
  4861. <div class="sentenTop" :index="stIndex + 1">
  4862. <div>题目设置</div>
  4863. <div>
  4864. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  4865. </div>
  4866. <div @click="addSen(stIndex)">添加</div>
  4867. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  4868. </div>
  4869. </div>
  4870. <div class="cardList">
  4871. <div v-if="st.addSentence.length > 0" class="cardBox">
  4872. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  4873. @click="setRightAnswer(s, stIndex, sIndex)">
  4874. <el-tooltip class="item" effect="light" :content="s" placement="top">
  4875. <div>{{ s }}</div>
  4876. </el-tooltip>
  4877. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  4878. <img src="../../../assets/icon/delete.png" alt="" />
  4879. </div>
  4880. </div>
  4881. </div>
  4882. <div class="card">
  4883. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  4884. </div>
  4885. </div>
  4886. <div class="rightCardBox">
  4887. <div>正确顺序</div>
  4888. <div class="rightCardList">
  4889. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  4890. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  4891. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  4892. <el-tooltip class="item" effect="light" :content="r" placement="top">
  4893. <div>{{ r }}</div>
  4894. </el-tooltip>
  4895. </div>
  4896. <div>{{ rIndex + 1 }}</div>
  4897. </div>
  4898. </div>
  4899. <div class="card" v-if="st.rightAnswer.length == 0">
  4900. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  4901. </div>
  4902. <div class="card" v-else>
  4903. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  4904. </div>
  4905. </div>
  4906. </div>
  4907. </div>
  4908. </div>
  4909. </div>
  4910. <span slot="footer" class="dialog-footer">
  4911. <el-button @click="closePan(47)">取 消</el-button>
  4912. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  4913. </span>
  4914. </el-dialog>
  4915. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  4916. :before-close="handleClose" class="dialog_diy">
  4917. <el-form>
  4918. <!-- <el-form-item label="文本标题">
  4919. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  4920. </el-form-item> -->
  4921. <div>表格内容</div>
  4922. <Table v-model="tableJson.text" @change="change"></Table>
  4923. </el-form>
  4924. <span slot="footer" class="dialog-footer">
  4925. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  4926. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  4927. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  4928. </span>
  4929. </el-dialog>
  4930. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  4931. :before-close="handleClose" class="dialog_diy">
  4932. <el-form>
  4933. <!-- <el-form-item label="文本标题">
  4934. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  4935. </el-form-item> -->
  4936. <div>文档内容</div>
  4937. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  4938. </el-form>
  4939. <span slot="footer" class="dialog-footer">
  4940. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  4941. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  4942. </span>
  4943. </el-dialog>
  4944. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  4945. :before-close="handleClose" class="dialog_diy">
  4946. <div style="
  4947. width: 100%;
  4948. display: flex;
  4949. flex-direction: row;
  4950. flex-wrap: nowrap;
  4951. align-items: center;
  4952. justify-content: center;
  4953. ">
  4954. <div>班级:</div>
  4955. <el-select multiple v-model="uploadJson" placeholder="请选择">
  4956. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  4957. </el-option>
  4958. </el-select>
  4959. </div>
  4960. <span slot="footer" class="dialog-footer">
  4961. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  4962. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  4963. </span>
  4964. </el-dialog>
  4965. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  4966. :before-close="handleClose" class="dialog_diy">
  4967. <div style="
  4968. width: 100%;
  4969. display: flex;
  4970. flex-direction: row;
  4971. flex-wrap: nowrap;
  4972. align-items: center;
  4973. justify-content: center;
  4974. ">
  4975. <div>随机码:</div>
  4976. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  4977. </div>
  4978. <span slot="footer" class="dialog-footer">
  4979. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  4980. <el-button type="primary" @click="addInvite">确定</el-button>
  4981. </span>
  4982. </el-dialog>
  4983. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  4984. :before-close="handleClose" class="dialog_diy">
  4985. <div>
  4986. <div style="margin-bottom: 20px; color: #999">
  4987. 提示:点击“+”或“-”修改倒计时时长。
  4988. </div>
  4989. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  4990. </div>
  4991. <span slot="footer" class="dialog-footer">
  4992. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  4993. <el-button type="primary" @click="addPreTime">确定</el-button>
  4994. </span>
  4995. </el-dialog>
  4996. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  4997. :before-close="handleClose" class="dialog_diy">
  4998. <div>
  4999. <div style="
  5000. width: 100%;
  5001. display: flex;
  5002. flex-direction: row;
  5003. flex-wrap: nowrap;
  5004. align-content: center;
  5005. align-items: center;
  5006. justify-content: space-between;
  5007. ">
  5008. <div style="
  5009. display: flex;
  5010. flex-flow: row nowrap;
  5011. align-items: flex-start;
  5012. width: 100%;
  5013. flex-direction: column;
  5014. flex-wrap: nowrap;
  5015. position: relative;
  5016. ">
  5017. <div class="e_box">
  5018. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  5019. <div class="e_card_picture">
  5020. <img src="../../../assets/e_picture.png" />
  5021. </div>
  5022. <div class="e_card_name">
  5023. <span>{{ item.title }}</span>
  5024. </div>
  5025. <div class="e_card_btn">
  5026. <span @click="checkEva(item.id, 2)">导入</span>
  5027. </div>
  5028. </div> -->
  5029. <!-- <div class="addEva" @click="openT">
  5030. <img src="../../../assets/icon/addEva.png" alt="" />
  5031. </div> -->
  5032. <div style="
  5033. display: flex;
  5034. justify-content: flex-end;
  5035. margin-bottom: 10px;
  5036. ">
  5037. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  5038. </div>
  5039. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  5040. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  5041. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  5042. </el-table-column>
  5043. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  5044. </el-table-column>
  5045. <el-table-column label="操作" width="250px">
  5046. <template slot-scope="scope">
  5047. <div class="btnBox">
  5048. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  5049. </div>
  5050. </template>
  5051. </el-table-column>
  5052. </el-table>
  5053. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  5054. 暂无数据
  5055. </div>
  5056. </div>
  5057. </div>
  5058. </div>
  5059. </div>
  5060. <span slot="footer" class="dialog-footer">
  5061. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  5062. </span>
  5063. </el-dialog>
  5064. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  5065. :before-close="handleClose" class="dialog_diy">
  5066. <div class="groupBox">
  5067. <div v-if="groupJson.group" class="groupContent">
  5068. <div class="groupTitle">请设置小组数量及名称</div>
  5069. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  5070. <span class="groupn">第{{ index + 1 }}组名称:</span>
  5071. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  5072. <div class="groupBtn">
  5073. <el-button type="primary" size="small" @click="addGroup(index)"
  5074. v-if="groupJson.group.length - 1 == index">
  5075. 添加</el-button>
  5076. <el-button type="primary" size="small" @click="deleteGroup(index)"
  5077. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  5078. </div>
  5079. </div>
  5080. </div>
  5081. <div class="groupContent">
  5082. <div class="groupTitle">请设置每组人数</div>
  5083. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  5084. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  5085. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  5086. @change="numberPan"></el-input>
  5087. </div>
  5088. </div>
  5089. <span slot="footer" class="dialog-footer">
  5090. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  5091. <el-button type="primary" @click="addGroupJson">确定</el-button>
  5092. </span>
  5093. </el-dialog>
  5094. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  5095. :before-close="handleClose" class="dialog_diy">
  5096. <div style="
  5097. width: 100%;
  5098. display: flex;
  5099. flex-direction: row;
  5100. flex-wrap: nowrap;
  5101. align-items: center;
  5102. justify-content: center;
  5103. ">
  5104. <div style="min-width: fit-content">文件名称:</div>
  5105. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  5106. </div>
  5107. <span slot="footer" class="dialog-footer">
  5108. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  5109. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  5110. </span>
  5111. </el-dialog>
  5112. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  5113. closePan(69);
  5114. }
  5115. " class="dialog_diy fullStyle fullStyle1">
  5116. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  5117. <span slot="footer" class="dialog-footer">
  5118. <el-button @click="englishDialogVisible = false">取 消</el-button>
  5119. <el-button type="primary" @click="addEnglish">确 定</el-button>
  5120. </span>
  5121. </el-dialog>
  5122. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  5123. :before-close="handleClose" class="dialog_diy">
  5124. <div class="template_box">
  5125. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  5126. :class="{ wordTeacherA: ctJson.id == aa.id }">
  5127. <div class="wordPic">
  5128. <img src="../../../assets/icon/new/course_template.png" alt />
  5129. </div>
  5130. <el-tooltip effect="dark" :content="aa.title" placement="top">
  5131. <div style="
  5132. margin-top: 10px;
  5133. line-height: 19px;
  5134. overflow: hidden;
  5135. text-overflow: ellipsis;
  5136. white-space: nowrap;
  5137. padding: 0 10px;
  5138. box-sizing: border-box;
  5139. width: 100%;
  5140. ">
  5141. {{ aa.title }}
  5142. </div>
  5143. </el-tooltip>
  5144. </div>
  5145. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  5146. :class="{ wordTeacherA: ctJson.id == 1 }">
  5147. <div class="wordPic">
  5148. <img src="../../../assets/icon/new/course_template.png" alt />
  5149. </div>
  5150. <div style="
  5151. margin-top: 10px;
  5152. line-height: 19px;
  5153. overflow: hidden;
  5154. text-overflow: ellipsis;
  5155. white-space: nowrap;
  5156. padding: 0 20px;
  5157. ">
  5158. 简易模板
  5159. </div>
  5160. </div>
  5161. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  5162. :class="{ wordTeacherA: ctJson.id == 2 }">
  5163. <div class="wordPic">
  5164. <img src="../../../assets/icon/new/course_template.png" alt />
  5165. </div>
  5166. <div style="
  5167. margin-top: 10px;
  5168. line-height: 19px;
  5169. overflow: hidden;
  5170. text-overflow: ellipsis;
  5171. white-space: nowrap;
  5172. padding: 0 20px;
  5173. ">
  5174. 智能粘贴模式
  5175. </div>
  5176. </div>
  5177. </div>
  5178. <span slot="footer" class="dialog-footer">
  5179. <el-button @click="templateDialog = false">取 消</el-button>
  5180. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  5181. </span>
  5182. </el-dialog>
  5183. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  5184. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  5185. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  5186. <div class="change_stageBox">
  5187. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  5188. <div class="nt_taskBox">
  5189. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  5190. <div class="nt_taskName">
  5191. <el-tooltip effect="light" :content="t.dyName" placement="top">
  5192. <span>{{ t.dyName }}</span>
  5193. </el-tooltip>
  5194. </div>
  5195. </div>
  5196. <div class="moveBtn" v-if="unitJson3.length > 1">
  5197. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  5198. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  5199. </div>
  5200. </div>
  5201. </div>
  5202. <span slot="footer" class="dialog-footer">
  5203. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  5204. <el-button type="primary" @click="updateChange">确定</el-button>
  5205. </span>
  5206. </el-dialog>
  5207. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  5208. :before-close="handleClose" class="dialog_diy">
  5209. <div class="addTypeChoose" style="justify-content: center">
  5210. <div style="min-width: 100px">模板名称:</div>
  5211. <el-input v-model="templateName" style="width: 200px"></el-input>
  5212. </div>
  5213. <div class="addTypeBox">
  5214. <div class="addTypeChoose">
  5215. <div style="min-width: 100px">选择一级分类:</div>
  5216. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  5217. style="width: 200px">
  5218. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  5219. </el-option>
  5220. </el-select>
  5221. </div>
  5222. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  5223. <div style="min-width: 100px">选择二级分类:</div>
  5224. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  5225. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  5226. </el-option>
  5227. </el-select>
  5228. </div>
  5229. </div>
  5230. <span slot="footer" class="dialog-footer">
  5231. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  5232. <el-button @click="close()">关 闭</el-button>
  5233. </span>
  5234. </el-dialog>
  5235. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  5236. </evaBox>
  5237. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  5238. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  5239. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
  5240. </aiDialog>
  5241. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  5242. @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
  5243. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson"></aiCreateDialog>
  5244. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo"></aiCreateVideoDialog>
  5245. </div>
  5246. </template>
  5247. <script>
  5248. import "../../../common/aws-sdk-2.235.1.min.js";
  5249. import { tools as toolsData } from "../../../common/tools.js";
  5250. // import "../../../common/aws-sdk-2.99.0.min.js";
  5251. import $ from "jquery";
  5252. import EditorBar from "../../../components/tools/wangEnduit";
  5253. import Table from "../../../components/tools/table";
  5254. import Mind from "../../tools/jsmind2";
  5255. import Time from "../../tools/time.vue";
  5256. import Sunburst from "../../tools/sunburst";
  5257. import SeeBoard from "../../tools/seeBoard";
  5258. import weilaiData from "../components/weilai.js";
  5259. import sourceDialog from "../teacherSource/dialog.vue";
  5260. import interVideo from "../interVideo/index.vue";
  5261. import englishRight from "../components/englishRight.vue";
  5262. import evaBox from "../evaBox/index.vue";
  5263. import EnglishVoice from "../EnglishVoice/index.vue";
  5264. import aiBox from './aiBox.vue'
  5265. import aiDialog from './aiDialog'
  5266. import aiTips from './aiTips.vue'
  5267. import tipsDialog from './tipsDialog.vue'
  5268. import { v4 as uuidv4 } from "uuid";
  5269. import MarkdownIt from "markdown-it";
  5270. import aiCreateDialog from './aiCreateDialog.vue'
  5271. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  5272. var OpenCC = require("opencc-js");
  5273. let converter = OpenCC.Converter({
  5274. from:'hk',
  5275. to:'cn'
  5276. })
  5277. export default {
  5278. components: {
  5279. EditorBar,
  5280. Mind,
  5281. Time,
  5282. Sunburst,
  5283. SeeBoard,
  5284. Table,
  5285. sourceDialog,
  5286. interVideo,
  5287. englishRight,
  5288. evaBox,
  5289. EnglishVoice,
  5290. aiBox,
  5291. aiDialog,
  5292. aiTips,
  5293. tipsDialog,
  5294. aiCreateDialog,
  5295. aiCreateVideoDialog
  5296. },
  5297. data() {
  5298. return {
  5299. checkAll: false,
  5300. checkAll2: false,
  5301. chooseType: 1,
  5302. checkedCities: [],
  5303. isIndeterminate: true,
  5304. isIndeterminate2: true,
  5305. isSysPic: false,
  5306. isSysPic2: false,
  5307. steps: 1,
  5308. stepsNav: 1,
  5309. nbOrder: 0,
  5310. courseId: "",
  5311. chapToolsType: 0,
  5312. chapTools: [
  5313. {
  5314. tools: [],
  5315. toolDetail: "",
  5316. },
  5317. ],
  5318. line: "",
  5319. lineTitle: "",
  5320. sysPic: [],
  5321. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  5322. sentenceList2: [],
  5323. isPushTitleList: [],
  5324. lineCount: 0,
  5325. lineType: 0,
  5326. chapCount: 0,
  5327. courseName: "",
  5328. isTeacherSee: false,
  5329. courseText: "",
  5330. textLoading: false,
  5331. ttextLoading: false,
  5332. courseText2: "",
  5333. preTime: 0,
  5334. formLabelWidth: "100px",
  5335. choosePicVisible: false,
  5336. sysPicVisible: false,
  5337. sysPicVisible2: false,
  5338. uploadLoading1: false,
  5339. noneBtnImg: false,
  5340. updateBoolean2: false,
  5341. unitIndex: 0,
  5342. taskCount: 0,
  5343. dialogVisible: false,
  5344. dialogVisible1: false,
  5345. dialogVisible2: false,
  5346. dialogVisible3: false,
  5347. dialogVisible4: false,
  5348. dialogVisible5: false,
  5349. dialogVisible6: false,
  5350. dialogVisible7: false,
  5351. dialogVisible8: false,
  5352. dialogVisible9: false,
  5353. dialogVisibleClass: false,
  5354. dialogVisibleMember: false,
  5355. dialogVisibleMp3: false,
  5356. dialogVisibleSelect: false,
  5357. dialogVisibleSentence: false,
  5358. dialogVisibleRate: false,
  5359. dialogVisibleChoice: false,
  5360. dialogVisiblemb: false,
  5361. dialogVisibleInvite: false,
  5362. dialogVisibleSource: false,
  5363. dialogVisibleVideo: false,
  5364. dialogVisibleStageChange: false,
  5365. dialogVisibleupdataVideoT: false,
  5366. englishDialogVisible: false,
  5367. templateDialog: false,
  5368. ctJson: {},
  5369. isClickColor: 1,
  5370. toolIndexType: "",
  5371. publicTool: 0,
  5372. searchPeople: "",
  5373. searchTN: "",
  5374. collid: '',
  5375. CollLoading: false,
  5376. userid: this.$route.query.userid,
  5377. oid: this.$route.query.oid,
  5378. org: this.$route.query.org,
  5379. role: this.$route.query.role,
  5380. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  5381. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  5382. dialogVisibleTable: false,
  5383. dialogVisibleWord: false,
  5384. tableJson: { text: "" },
  5385. wordJson: { text: "" },
  5386. dialogVisibleMoreUpload: false,
  5387. dialogVisiblePreTime: false,
  5388. uploadJson: [],
  5389. classJuri: [],
  5390. gradeList: [],
  5391. cover: [], //课程封面
  5392. myWord: [],
  5393. evaJuri: [],
  5394. evalua: "",
  5395. targetArray: [],
  5396. eTitle: "",
  5397. eJson: {},
  5398. fid: "", //一级
  5399. sid: "", //二级
  5400. tid: "", //二级
  5401. typeMode: 1,
  5402. eJSONNum: 0,
  5403. data: {
  5404. meta: {
  5405. name: "example",
  5406. author: "dd@163.com",
  5407. version: "0.2",
  5408. },
  5409. format: "node_array",
  5410. data: [{ id: "root", isroot: true, topic: "" }],
  5411. },
  5412. askJson: {
  5413. askCount: 1,
  5414. askTitle: "",
  5415. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5416. },
  5417. askJson2: {},
  5418. testJson: {},
  5419. testJson2: {},
  5420. selectJson: {},
  5421. selectJson2: {},
  5422. rateJson: [],
  5423. unitJson2: [],
  5424. unitJson3: [],
  5425. unitJson: [
  5426. {
  5427. dyName: "", //单元标题
  5428. chapterInfo: [
  5429. {
  5430. isread: false,
  5431. chapterid: this.guid(),
  5432. title: "",
  5433. courseName: "",
  5434. taskJson: [
  5435. {
  5436. task: "",
  5437. taskDetail: "",
  5438. chapterData: [],
  5439. toolText: "",
  5440. toolChoose: [
  5441. {
  5442. tool: [],
  5443. toolDetail: "",
  5444. toolType: 0,
  5445. askCount: 1,
  5446. askTitle: "",
  5447. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5448. },
  5449. ],
  5450. isShowTools: false,
  5451. askCount: 1,
  5452. isFold: 1,
  5453. askTitle: "",
  5454. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5455. checkJson: [{ checkCount: [], checkPerent: [] }],
  5456. homeworkList: [],
  5457. },
  5458. ],
  5459. itemCount: 1,
  5460. fileList1: [],
  5461. video: [],
  5462. testData: [],
  5463. pData: [],
  5464. templateArray: [],
  5465. },
  5466. ],
  5467. },
  5468. ],
  5469. templateArray: [],
  5470. studentJuri: [],
  5471. teacherJuri: [],
  5472. CollaborativeTeaList: [],
  5473. checkboxList: [],
  5474. checkboxList2: [],
  5475. checkboxList3: [],
  5476. classSearch: "",
  5477. gradeId: "",
  5478. number: "",
  5479. tTitle: "",
  5480. tdetail: "",
  5481. templateC: {},
  5482. AttText: {},
  5483. AttTextType: 0,
  5484. AttTextIndex: 0,
  5485. cTemplate: "",
  5486. CourseType: [],
  5487. CourseType1: [],
  5488. CourseType2: [],
  5489. CourseTypeJson: {},
  5490. CourseTypeJson1: {},
  5491. courseTypeId: [],
  5492. courseTypeId1: [],
  5493. courseTypeSon: [],
  5494. clearArray: [],
  5495. pTypeCheck: [],
  5496. pTypeCheckName: [],
  5497. loading: false,
  5498. toolType: 0,
  5499. inputShow: true,
  5500. inputShow2: true,
  5501. toolIndex: 0,
  5502. cidType: 0,
  5503. answerQ: "",
  5504. answerQ2: "",
  5505. grade: [],
  5506. grade2: [],
  5507. courseUserid: "",
  5508. timer: null,
  5509. timer2: null,
  5510. pasteTimer: null,
  5511. checkId: "",
  5512. isDelete: 1,
  5513. addindex: 0,
  5514. selectSteps: 1,
  5515. groupJson: {},
  5516. dialogVisibleGroup: false,
  5517. rightBoxHeight: 0,
  5518. ManAarray: [],
  5519. checkBoolean: false,
  5520. inviteCode: [],
  5521. inviteId: "",
  5522. icode: "",
  5523. easyArray: [2, 4],
  5524. sourceData: {},
  5525. updateSourcePan: false,
  5526. videoJson: {},
  5527. isBtnDisplay: false,
  5528. isStepDisplay: false,
  5529. isPasteStage: false,
  5530. isPasteTask: false,
  5531. isPasteChoice: false,
  5532. imageList: [],
  5533. imageloading: false,
  5534. imageloading2: false,
  5535. searchImageValue: "",
  5536. ppage: 1,
  5537. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  5538. oldIndex: 0,
  5539. dragType: "",
  5540. oldUnitIndex: 0,
  5541. oldData: null,
  5542. newIndex: "",
  5543. englishList: {},
  5544. typeIndex: "",
  5545. courseState: 4,
  5546. taskJSONa: [
  5547. {
  5548. task: "",
  5549. taskDetail: "",
  5550. chapterData: [],
  5551. toolText: "",
  5552. toolChoose: [
  5553. {
  5554. tool: [],
  5555. toolDetail: "",
  5556. toolType: 0,
  5557. askCount: 1,
  5558. askTitle: "",
  5559. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5560. },
  5561. ],
  5562. isShowTools: false,
  5563. askCount: 1,
  5564. isFold: 1,
  5565. askTitle: "",
  5566. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5567. checkJson: [{ checkCount: [], checkPerent: [] }],
  5568. homeworkList: [],
  5569. },
  5570. ],
  5571. checkUnitIndex: 0,
  5572. isdrag: "",
  5573. evaIndex: "",
  5574. evatIndex: "",
  5575. evaBoxDialog: false,
  5576. EnglishVoiceDialog: false,
  5577. englishVoiceJson: {},
  5578. cetIndex: "",
  5579. cettIndex: "",
  5580. cetBoxDialog: false,
  5581. templateName: "",
  5582. setTypeJson: {
  5583. one: "",
  5584. two: "",
  5585. },
  5586. twoJson: [],
  5587. oneJson: [],
  5588. updateKey: 1,
  5589. isOutline: false,
  5590. isOutline2: false,
  5591. infoData: [],
  5592. infoproVisible: false,
  5593. infoisFinishSize: 0,
  5594. infoisAllSize: 0,
  5595. infoprogress: 0,
  5596. taskDetailLoading: [],
  5597. ttaskDetailLoading: [],
  5598. taskDetailLoading2: [],
  5599. ttaskDetailLoading2: [],
  5600. taskDetailLoading3: [],
  5601. ttaskDetailLoading3: [],
  5602. taskDetailLoading4: [],
  5603. taskDetailLoading5: [],
  5604. ttaskDetailLoading5: [],
  5605. dArray: [],
  5606. dialogVisibleAiD: false,
  5607. aitype: "",
  5608. aiJson: {
  5609. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  5610. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  5611. "aiTask": "请根据<教学任务教案>。",
  5612. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  5613. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述和任务名:<任务名>:<任务描述>",
  5614. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  5615. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  5616. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  5617. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  5618. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  5619. },
  5620. aiText: "",
  5621. aiCallBack: "",
  5622. aiIndex: "",
  5623. clickType: 1,
  5624. promptShow: false,
  5625. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  5626. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  5627. dialogVisibleTips: false,
  5628. tipsJson: {},
  5629. cpote:{
  5630. cpote1: '',
  5631. cpote2: '',
  5632. cpote3: '',
  5633. cpote4: '',
  5634. },
  5635. cpoteLoading:{
  5636. cpote1: false,
  5637. cpote2: false,
  5638. cpote3: false,
  5639. cpote4: false,
  5640. },
  5641. cpotetLoading:{
  5642. cpote1: false,
  5643. cpote2: false,
  5644. cpote3: false,
  5645. cpote4: false,
  5646. },
  5647. cpoteType: 0,
  5648. dialogVisibleAiCreate: false,
  5649. dialogVisibleAiCreateVideo: false,
  5650. teacherText: [],
  5651. isFileSearch: true,
  5652. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  5653. 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'],
  5654. courseJie:1,
  5655. courseTime:45,
  5656. };
  5657. },
  5658. directives: {
  5659. autoHeight: {
  5660. update(el, binding) {
  5661. const { value } = binding;
  5662. if (value && typeof value === "number") {
  5663. el.style.height = `${value}px`;
  5664. } else {
  5665. el.style.height = "auto";
  5666. }
  5667. },
  5668. componentUpdated(el) {
  5669. el.style.height = `${el.scrollHeight + 25}px`;
  5670. },
  5671. },
  5672. },
  5673. computed: {
  5674. // rightBoxHeight: function () {
  5675. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  5676. // },
  5677. offsetLetfPx: function () {
  5678. //addnum可以直接在模板语法里面用,相当于data内的值
  5679. return (
  5680. $(".cru_select")[this.unitIndex] &&
  5681. $(".cru_select")[this.unitIndex].offsetLeft + 5
  5682. );
  5683. },
  5684. getMan2() {
  5685. return function (people) {
  5686. let _people = people;
  5687. let _people2 = "";
  5688. if (this.ManAarray.length) {
  5689. for (var i = 0; i < this.ManAarray.length; i++) {
  5690. if (this.ManAarray[i].userid == people) {
  5691. _people2 = this.ManAarray[i].name;
  5692. break;
  5693. }
  5694. }
  5695. }
  5696. if (people == this.courseUserid) {
  5697. return "";
  5698. }
  5699. return this.ManAarray.length ? _people2 : "";
  5700. };
  5701. },
  5702. getListMan2() {
  5703. return function (list) {
  5704. let _people2 = [];
  5705. if (this.ManAarray.length) {
  5706. for (var j = 0; j < list.length; j++) {
  5707. let people = list[j];
  5708. for (var i = 0; i < this.ManAarray.length; i++) {
  5709. if (
  5710. this.ManAarray[i].userid == people &&
  5711. people != this.courseUserid
  5712. ) {
  5713. _people2.push(this.ManAarray[i].name);
  5714. break;
  5715. }
  5716. }
  5717. }
  5718. }
  5719. return this.ManAarray.length ? _people2.join("、") : "";
  5720. };
  5721. },
  5722. isInvite() {
  5723. return function (cid) {
  5724. let array = [];
  5725. for (var i = 0; i < this.inviteCode.length; i++) {
  5726. array.push(this.inviteCode[i].cid);
  5727. }
  5728. return array.indexOf(cid) != -1;
  5729. };
  5730. },
  5731. getInviteCodeC() {
  5732. return function (cid) {
  5733. let array = [];
  5734. for (var i = 0; i < this.inviteCode.length; i++) {
  5735. array.push(this.inviteCode[i].cid);
  5736. }
  5737. return this.inviteCode[array.indexOf(cid)].ic;
  5738. };
  5739. },
  5740. getClassC() {
  5741. return function (c) {
  5742. let _c2 = "";
  5743. if (this.grade.length) {
  5744. for (var i = 0; i < this.grade.length; i++) {
  5745. if (this.grade[i].id == c) {
  5746. _c2 = this.grade[i].name;
  5747. break;
  5748. }
  5749. }
  5750. }
  5751. return this.grade.length ? _c2 : "";
  5752. };
  5753. },
  5754. getListClassC() {
  5755. return function (list) {
  5756. let _c2 = [];
  5757. if (this.grade.length) {
  5758. for (var j = 0; j < list.length; j++) {
  5759. let c = list[j];
  5760. for (var i = 0; i < this.grade.length; i++) {
  5761. if (this.grade[i].id == c) {
  5762. _c2.push(this.grade[i].name);
  5763. break;
  5764. }
  5765. }
  5766. }
  5767. }
  5768. return this.grade.length ? _c2.join("、") : "";
  5769. };
  5770. },
  5771. MarkdownT() {
  5772. return function (c) {
  5773. let md = new MarkdownIt();
  5774. return c
  5775. ? md.render(c) : "";
  5776. };
  5777. },
  5778. },
  5779. watch: {
  5780. unitIndex(newValue, oldValue) {
  5781. // return;
  5782. if (this.isDelete == 2) {
  5783. this.isDelete = 1;
  5784. return;
  5785. }
  5786. if (this.cid != "") {
  5787. let _unitIndex = oldValue;
  5788. if (
  5789. JSON.stringify(this.unitJson2[_unitIndex]) ==
  5790. JSON.stringify(this.unitJson[_unitIndex])
  5791. ) {
  5792. this.$refs.rightboxR.scrollTop = 0;
  5793. return;
  5794. }
  5795. let cPan = 1;
  5796. for (
  5797. var j = 0;
  5798. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  5799. j++
  5800. ) {
  5801. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  5802. j
  5803. ].proVisible = false;
  5804. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  5805. j
  5806. ].proVisible2 = false;
  5807. if (
  5808. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  5809. .length > 1
  5810. ) {
  5811. for (
  5812. var z = 0;
  5813. z <
  5814. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  5815. .length;
  5816. z++
  5817. ) {
  5818. if (
  5819. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  5820. .toolChoose[z].tool.length
  5821. ) {
  5822. this.$message.error("请把工具添加完整");
  5823. cPan = 2;
  5824. break;
  5825. }
  5826. }
  5827. }
  5828. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  5829. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  5830. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  5831. (ele) => {
  5832. return ele.value != "";
  5833. }
  5834. );
  5835. }
  5836. }
  5837. if (cPan == 2) {
  5838. this.unitIndex = oldValue;
  5839. return;
  5840. }
  5841. for (var i = 0; i < this.unitJson.length; i++) {
  5842. if (this.addindex != i) {
  5843. delete this.unitJson[i].isUpdate;
  5844. }
  5845. }
  5846. this.$refs.rightboxR.scrollTop = 0;
  5847. this.addindex = -1;
  5848. let params = [
  5849. {
  5850. cid: this.cid,
  5851. chapters: JSON.stringify(this.unitJson),
  5852. uid: this.userid,
  5853. unitIndex: _unitIndex,
  5854. },
  5855. ];
  5856. this.ajax
  5857. .post(this.$store.state.api + "updateWorkNew4", params)
  5858. .then((res) => {
  5859. // this.$message({
  5860. // message: "修改成功",
  5861. // type: "success",
  5862. // });
  5863. // this.courseId = this.cid;
  5864. this.addtips()
  5865. })
  5866. .catch((err) => {
  5867. this.$message.error("网络不佳");
  5868. console.error(err);
  5869. });
  5870. }
  5871. },
  5872. steps(newValue, old) {
  5873. if (newValue == 4) {
  5874. let cPan = 1;
  5875. for (var i = 0; i < this.unitJson.length; i++) {
  5876. for (
  5877. var j = 0;
  5878. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  5879. j++
  5880. ) {
  5881. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  5882. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  5883. if (
  5884. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  5885. ) {
  5886. for (
  5887. var z = 0;
  5888. z <
  5889. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  5890. z++
  5891. ) {
  5892. if (
  5893. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  5894. .tool.length
  5895. ) {
  5896. this.$message.error("请把工具添加完整");
  5897. cPan = 2;
  5898. break;
  5899. }
  5900. }
  5901. }
  5902. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  5903. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  5904. i
  5905. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  5906. return ele.value != "";
  5907. });
  5908. }
  5909. }
  5910. }
  5911. this.inputShow = true;
  5912. if (cPan == 2) {
  5913. this.steps = old;
  5914. return;
  5915. }
  5916. this.goTo(
  5917. "/course?userid=" +
  5918. this.userid +
  5919. "&oid=" +
  5920. this.oid +
  5921. "&org=" +
  5922. this.org +
  5923. "&role=" +
  5924. this.role
  5925. );
  5926. }
  5927. },
  5928. },
  5929. methods: {
  5930. tableRowClassName({ row, rowIndex }) {
  5931. if ((rowIndex + 1) % 2 === 0) {
  5932. return "even_row";
  5933. } else {
  5934. return "";
  5935. }
  5936. },
  5937. close() {
  5938. this.cetIndex = "";
  5939. this.cettIndex = "";
  5940. this.templateName = "";
  5941. this.cetBoxDialog = false;
  5942. },
  5943. openAI() {
  5944. top.postMessage({ tools: "64" }, "*");
  5945. },
  5946. setMan() {
  5947. // let teacherJuri = this.teacherJuri2;
  5948. this.ManAarray = [];
  5949. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  5950. if (_user.indexOf(this.userid) == -1) {
  5951. _user.push(this.userid);
  5952. }
  5953. if (_user.indexOf(this.courseUserid) == -1) {
  5954. _user.push(this.courseUserid);
  5955. }
  5956. let params = {
  5957. uid: _user.join(","),
  5958. };
  5959. this.ajax
  5960. .get(this.$store.state.api + "getAllUserById", params)
  5961. .then((res) => {
  5962. let teacherJuri = res.data[0];
  5963. this.ManAarray = teacherJuri;
  5964. })
  5965. .catch((err) => {
  5966. console.error(err);
  5967. });
  5968. },
  5969. previewImg(url) {
  5970. this.$hevueImgPreview(url);
  5971. },
  5972. btnDisplay(bool) {
  5973. this.isBtnDisplay = bool;
  5974. },
  5975. stepDisplay(bool) {
  5976. this.isStepDisplay = bool;
  5977. },
  5978. scrollChange() {
  5979. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  5980. },
  5981. addHw(e) {
  5982. var el = e.currentTarget;
  5983. el.getElementsByTagName("input")[0].click();
  5984. },
  5985. change(val) {
  5986. if (this.dialogVisible1) {
  5987. this.tdetail = val;
  5988. } else if (this.dialogVisible6) {
  5989. this.AttText.text = val;
  5990. } else if (this.dialogVisible2) {
  5991. this.cTemplate = val;
  5992. } else if (this.dialogVisibleTable) {
  5993. this.tableJson.text = val;
  5994. }
  5995. this.$forceUpdate();
  5996. console.log(val);
  5997. },
  5998. change2(val) {
  5999. console.log(val);
  6000. this.$forceUpdate();
  6001. },
  6002. handleClose(done) {
  6003. done();
  6004. },
  6005. closePan(tool) {
  6006. if (tool == 15) {
  6007. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  6008. this.dialogVisible8 = false;
  6009. } else {
  6010. this.closeConfirm(tool);
  6011. }
  6012. } else if (tool == 4) {
  6013. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  6014. this.dialogVisible5 = false;
  6015. } else {
  6016. this.closeConfirm(tool);
  6017. }
  6018. } else if (tool == 45) {
  6019. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  6020. this.dialogVisibleChoice = false;
  6021. } else {
  6022. this.closeConfirm(tool);
  6023. }
  6024. } else if (tool == 41) {
  6025. if (
  6026. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  6027. ) {
  6028. this.dialogVisibleSelect = false;
  6029. } else {
  6030. this.closeConfirm(tool);
  6031. }
  6032. } else if (tool == 47) {
  6033. if (
  6034. JSON.stringify(this.sentenceList) ==
  6035. JSON.stringify(this.sentenceList2)
  6036. ) {
  6037. this.dialogVisibleSentence = false;
  6038. } else {
  6039. this.closeConfirm(tool);
  6040. }
  6041. } else if (tool == 69) {
  6042. if (
  6043. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  6044. ) {
  6045. this.englishDialogVisible = false;
  6046. } else {
  6047. this.closeConfirm(tool);
  6048. }
  6049. }
  6050. },
  6051. closeConfirm(tool) {
  6052. this.$confirm("是否保存已编辑内容?", "提示", {
  6053. confirmButtonText: "保存",
  6054. cancelButtonText: "不保存",
  6055. type: "warning",
  6056. })
  6057. .then(() => {
  6058. if (tool == 15) {
  6059. this.addAnswer();
  6060. } else if (tool == 4) {
  6061. this.addAsk();
  6062. } else if (tool == 45) {
  6063. this.addTest();
  6064. } else if (tool == 41) {
  6065. this.addSelectAnswer();
  6066. } else if (tool == 47) {
  6067. this.addSentenceTool();
  6068. } else if (tool == 69) {
  6069. this.addEnglish();
  6070. }
  6071. })
  6072. .catch(() => {
  6073. if (tool == 15) {
  6074. this.dialogVisible8 = false;
  6075. } else if (tool == 4) {
  6076. this.dialogVisible5 = false;
  6077. } else if (tool == 45) {
  6078. this.dialogVisibleChoice = false;
  6079. } else if (tool == 41) {
  6080. this.dialogVisibleSelect = false;
  6081. } else if (tool == 47) {
  6082. this.dialogVisibleSentence = false;
  6083. } else if (tool == 69) {
  6084. this.englishDialogVisible = false;
  6085. }
  6086. });
  6087. },
  6088. addEnglish(jsonType) {
  6089. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  6090. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  6091. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  6092. if (
  6093. this.englishList.engTitle == "" ||
  6094. this.englishList.englishText == ""
  6095. ) {
  6096. this.$message.error("请将内容填写完整!");
  6097. return;
  6098. }
  6099. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6100. this.taskCount
  6101. ].toolChoose[this.toolIndex].englishList = this.englishList;
  6102. this.englishList = {};
  6103. if (jsonType && jsonType == 1) {
  6104. this.englishDialogVisible = true;
  6105. } else {
  6106. this.englishDialogVisible = false;
  6107. }
  6108. if (
  6109. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  6110. .toolChoose[this.toolIndex].tool != 69
  6111. ) {
  6112. this.addTools(69, this.taskCount, this.toolIndex);
  6113. }
  6114. },
  6115. imgChange2(i, j) {
  6116. var _tmp = this.testJson.testJson[i].checkList[j];
  6117. this.noneBtnImg = _tmp.length >= 1;
  6118. },
  6119. imgChange3(i) {
  6120. var _tmp = this.testJson.testJson[i];
  6121. this.noneBtnImg = _tmp.length >= 1;
  6122. },
  6123. imgChange1(file, fileList, type, itemTaskIndex) {
  6124. if (type == 1) {
  6125. var _tmp = this.cover;
  6126. } else if (
  6127. type == 2 ||
  6128. type == 3 ||
  6129. type == 6 ||
  6130. type == 7 ||
  6131. type == 8
  6132. ) {
  6133. var _tmp =
  6134. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6135. .chapterData;
  6136. } else if (type == 4) {
  6137. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  6138. } else {
  6139. var _tmp =
  6140. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6141. .homeworkList;
  6142. }
  6143. this.noneBtnImg = _tmp.length >= 1;
  6144. },
  6145. goTo(path) {
  6146. this.$router.push(path);
  6147. },
  6148. guid() {
  6149. var _num,
  6150. i,
  6151. _guid = "";
  6152. for (i = 0; i < 32; i++) {
  6153. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  6154. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  6155. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  6156. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  6157. _guid += "-";
  6158. }
  6159. }
  6160. return _guid;
  6161. },
  6162. retrunCourse() {
  6163. if(this.istemplate == 1){
  6164. this.goTo(
  6165. "/course?userid=" +
  6166. this.userid +
  6167. "&oid=" +
  6168. this.oid +
  6169. "&org=" +
  6170. this.org +
  6171. "&role=" +
  6172. this.role
  6173. );
  6174. return
  6175. }
  6176. this.$confirm("是否保存已编辑内容?", "提示", {
  6177. confirmButtonText: "保存",
  6178. cancelButtonText: "不保存",
  6179. distinguishCancelAndClose: true,
  6180. type: "warning",
  6181. })
  6182. .then(() => {
  6183. if (this.cid == "" || this.cid == undefined) {
  6184. if (this.courseName == "") {
  6185. this.$message.error("请补充填写课程名称");
  6186. return;
  6187. } else {
  6188. this.addWork();
  6189. }
  6190. this.steps = 4;
  6191. } else {
  6192. if (this.courseName == "") {
  6193. this.$message.error("请补充填写课程名称");
  6194. return;
  6195. } else {
  6196. if (this.userid != this.courseUserid && this.role != "1") {
  6197. this.updateWork2();
  6198. } else {
  6199. this.updateWork();
  6200. }
  6201. this.steps = 4;
  6202. }
  6203. }
  6204. })
  6205. .catch((v) => {
  6206. console.log(v);
  6207. if (v == "cancel") {
  6208. this.goTo(
  6209. "/course?userid=" +
  6210. this.userid +
  6211. "&oid=" +
  6212. this.oid +
  6213. "&org=" +
  6214. this.org +
  6215. "&role=" +
  6216. this.role
  6217. );
  6218. }
  6219. });
  6220. },
  6221. lastSteps() {
  6222. if (this.steps == 4) {
  6223. this.goTo(
  6224. "/course?userid=" +
  6225. this.userid +
  6226. "&oid=" +
  6227. this.oid +
  6228. "&org=" +
  6229. this.org +
  6230. "&role=" +
  6231. this.role
  6232. );
  6233. } else {
  6234. // if (this.cidType == 0) {
  6235. // this.steps--;
  6236. // if (this.steps == 1) {
  6237. // setTimeout(() => {
  6238. // this.checkEva(this.checkId);
  6239. // setTimeout(() => {
  6240. // this.checkEva(this.checkId);
  6241. // }, 100);
  6242. // }, 100);
  6243. // }
  6244. // } else {
  6245. if (this.steps == 3) {
  6246. this.steps = 1;
  6247. setTimeout(() => {
  6248. this.checkEva(this.checkId);
  6249. setTimeout(() => {
  6250. this.checkEva(this.checkId);
  6251. }, 100);
  6252. }, 100);
  6253. }
  6254. // }
  6255. }
  6256. },
  6257. navSteps(s) {
  6258. if (this.courseName == "") {
  6259. this.$message.error("请补充填写课程名称");
  6260. return;
  6261. }
  6262. if (this.cidType == 0) {
  6263. if (this.steps == 1) {
  6264. if (this.cid == "" || this.cid == undefined) {
  6265. this.addWork();
  6266. } else {
  6267. if (this.userid != this.courseUserid && this.role != "1") {
  6268. this.updateWork2();
  6269. } else {
  6270. this.updateWork();
  6271. }
  6272. }
  6273. }
  6274. if (s == 1) {
  6275. this.steps = 1;
  6276. setTimeout(() => {
  6277. this.checkEva(this.checkId);
  6278. setTimeout(() => {
  6279. this.checkEva(this.checkId);
  6280. }, 100);
  6281. }, 100);
  6282. }
  6283. if (s == 2) {
  6284. this.steps = 2;
  6285. }
  6286. if (s == 3) {
  6287. this.cTemplate = this.templateC.content;
  6288. this.dialogVisible2 = false;
  6289. this.steps = 3;
  6290. this.isClickColor = 1;
  6291. this.unitJson[
  6292. this.unitIndex
  6293. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6294. this.$forceUpdate();
  6295. setTimeout(() => {
  6296. this.checkEva(this.checkId);
  6297. setTimeout(() => {
  6298. this.checkEva(this.checkId);
  6299. }, 100);
  6300. }, 1000);
  6301. }
  6302. } else {
  6303. if (this.steps == 1) {
  6304. if (this.cid == "" || this.cid == undefined) {
  6305. this.addWork();
  6306. } else {
  6307. if (this.userid != this.courseUserid && this.role != "1") {
  6308. this.updateWork2();
  6309. } else {
  6310. this.updateWork();
  6311. }
  6312. }
  6313. }
  6314. if (s == 1) {
  6315. this.steps = 1;
  6316. setTimeout(() => {
  6317. this.checkEva(this.checkId);
  6318. setTimeout(() => {
  6319. this.checkEva(this.checkId);
  6320. }, 100);
  6321. }, 100);
  6322. }
  6323. if (s == 3) {
  6324. this.cTemplate = this.templateC.content;
  6325. this.dialogVisible2 = false;
  6326. this.steps = 3;
  6327. this.isClickColor = 1;
  6328. this.unitJson[
  6329. this.unitIndex
  6330. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6331. this.$forceUpdate();
  6332. setTimeout(() => {
  6333. this.checkEva(this.checkId);
  6334. setTimeout(() => {
  6335. this.checkEva(this.checkId);
  6336. }, 100);
  6337. }, 1000);
  6338. }
  6339. }
  6340. this.$refs.stepBox.scrollTop = 0;
  6341. },
  6342. nextSteps(clickType) {
  6343. // if (this.cidType == 1) {
  6344. if (this.steps == 1) {
  6345. if (this.courseName != "") {
  6346. if (this.ttaskDetailLoading5.indexOf('task-') !== -1 || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  6347. this.$message({
  6348. message: "请回答完毕后再次发送",
  6349. type: "warning"
  6350. });
  6351. return;
  6352. }
  6353. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && !this.isOutline) {
  6354. this.openAiDialog(clickType, 'aiOutline')
  6355. return;
  6356. }
  6357. if(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && this.cpoteType != 4){
  6358. let _type = ''
  6359. if(this.cpoteType == 0){
  6360. _type = 'aiCpote1'
  6361. }else if(this.cpoteType == 1){
  6362. _type = 'aiCpote2'
  6363. }else if(this.cpoteType == 2){
  6364. _type = 'aiCpote3'
  6365. }else if(this.cpoteType == 3){
  6366. _type = 'aiCpote4'
  6367. }
  6368. this.cpoteType++
  6369. this.openAiDialog(clickType, _type)
  6370. return;
  6371. }
  6372. if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6373. this.openAiDialog(clickType, 'aiTeacher')
  6374. return;
  6375. }
  6376. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6377. this.openAiDialog(clickType, 'aiTeacher2')
  6378. return;
  6379. }
  6380. const functionA = () => {
  6381. setTimeout(() => {
  6382. this.loading = false
  6383. this.steps = 3;
  6384. }, 0)
  6385. this.isClickColor = 1;
  6386. this.unitJson[
  6387. this.unitIndex
  6388. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6389. this.$forceUpdate();
  6390. setTimeout(() => {
  6391. this.checkEva(this.checkId);
  6392. setTimeout(() => {
  6393. this.checkEva(this.checkId);
  6394. }, 100);
  6395. }, 1000);
  6396. if (this.cid == "" || this.cid == undefined) {
  6397. this.addWork();
  6398. } else {
  6399. if (this.userid != this.courseUserid && this.role != "1") {
  6400. this.updateWork2();
  6401. } else {
  6402. this.updateWork();
  6403. }
  6404. }
  6405. }
  6406. if (this.cid) {
  6407. this.loading = true
  6408. functionA()
  6409. } else {
  6410. this.openAiDialog(clickType, "aiTask", functionA)
  6411. }
  6412. } else {
  6413. this.$message.error("请补充填写课程名称");
  6414. return;
  6415. }
  6416. } else if (this.steps == 3) {
  6417. if (this.cid == "" || this.cid == undefined) {
  6418. if (this.courseName == "") {
  6419. this.$message.error("请补充填写课程名称");
  6420. return;
  6421. } else {
  6422. this.addWork();
  6423. this.steps++;
  6424. }
  6425. } else {
  6426. if (this.courseName == "") {
  6427. this.$message.error("请补充填写课程名称");
  6428. return;
  6429. } else {
  6430. if (this.userid != this.courseUserid && this.role != "1") {
  6431. this.updateWork2();
  6432. } else {
  6433. this.updateWork();
  6434. }
  6435. this.steps++;
  6436. }
  6437. }
  6438. }
  6439. // } else {
  6440. // if (this.steps == 1) {
  6441. // if (this.courseName != "") {
  6442. // if (this.cid == "" || this.cid == undefined) {
  6443. // this.addWork();
  6444. // } else {
  6445. // if (this.userid != this.courseUserid && this.role != "1") {
  6446. // // this.updateWork2();
  6447. // } else {
  6448. // this.updateWork();
  6449. // }
  6450. // }
  6451. // this.steps++;
  6452. // } else {
  6453. // this.$message.error("请补充填写课程名称");
  6454. // return;
  6455. // }
  6456. // } else if (this.steps == 2) {
  6457. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  6458. // this.cTemplate = this.templateC.content;
  6459. // }
  6460. // this.dialogVisible2 = false;
  6461. // this.steps++;
  6462. // setTimeout(() => {
  6463. // this.checkEva(this.checkId);
  6464. // setTimeout(() => {
  6465. // this.checkEva(this.checkId);
  6466. // }, 100);
  6467. // }, 1000);
  6468. // } else if (this.steps == 3) {
  6469. // if (this.cid == "" || this.cid == undefined) {
  6470. // if (this.courseName == "") {
  6471. // this.$message.error("请补充填写课程名称");
  6472. // return;
  6473. // } else {
  6474. // this.addWork();
  6475. // this.steps++;
  6476. // }
  6477. // } else {
  6478. // if (this.courseName == "") {
  6479. // this.$message.error("请补充填写课程名称");
  6480. // return;
  6481. // } else {
  6482. // if (this.userid != this.courseUserid && this.role != "1") {
  6483. // this.updateWork2();
  6484. // } else {
  6485. // this.updateWork();
  6486. // }
  6487. // this.steps++;
  6488. // }
  6489. // }
  6490. // }
  6491. // }
  6492. this.$refs.stepBox.scrollTop = 0;
  6493. },
  6494. unitSet(i) {
  6495. if (this.unitIndex == i) {
  6496. return;
  6497. }
  6498. this.unitIndex = i;
  6499. this.isClickColor = 1;
  6500. // this.$refs.rightboxR.scrollTop = 0;
  6501. this.$refs.unitBox.scrollTop = 0;
  6502. },
  6503. panUnitJson() {
  6504. let _unitIndex = this.unitIndex;
  6505. let cPan = 1;
  6506. for (
  6507. var j = 0;
  6508. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  6509. j++
  6510. ) {
  6511. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  6512. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  6513. j
  6514. ].proVisible2 = false;
  6515. if (
  6516. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6517. .length > 1
  6518. ) {
  6519. for (
  6520. var z = 0;
  6521. z <
  6522. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6523. .length;
  6524. z++
  6525. ) {
  6526. if (
  6527. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  6528. z
  6529. ].tool.length
  6530. ) {
  6531. this.$message.error("请把工具添加完整");
  6532. cPan = 2;
  6533. break;
  6534. }
  6535. }
  6536. }
  6537. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  6538. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  6539. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  6540. (ele) => {
  6541. return ele.value != "";
  6542. }
  6543. );
  6544. }
  6545. }
  6546. return cPan;
  6547. },
  6548. unitOpen(i) {
  6549. if (this.unitJson[i].toolOpen) {
  6550. this.unitJson[i].toolOpen = false;
  6551. } else {
  6552. this.unitJson[i].toolOpen = true;
  6553. }
  6554. this.updateWork();
  6555. this.$forceUpdate();
  6556. },
  6557. unitSet2(i) {
  6558. if (this.panUnitJson() == 2) {
  6559. return;
  6560. }
  6561. // if(this.unitJson[i].toolOpen){
  6562. // this.unitJson[i].toolOpen = false
  6563. // this.updateWork()
  6564. // this.$forceUpdate()
  6565. // return
  6566. // }else {
  6567. this.unitJson[i].toolOpen = true;
  6568. // }
  6569. this.$forceUpdate();
  6570. if (this.unitIndex == i) {
  6571. return;
  6572. }
  6573. this.unitIndex = i;
  6574. this.isClickColor = 1;
  6575. // this.$refs.rightboxR.scrollTop = 0;
  6576. this.$refs.unitBox.scrollTop = 0;
  6577. },
  6578. updateCourseState(i) {
  6579. let params = [
  6580. {
  6581. cid: this.cid,
  6582. state: i,
  6583. },
  6584. ];
  6585. this.ajax
  6586. .post(this.$store.state.api + "updateCourseMode", params)
  6587. .then((res) => {
  6588. this.courseState = i;
  6589. })
  6590. .catch((err) => {
  6591. this.$message.error("网络不佳");
  6592. console.error(err);
  6593. });
  6594. },
  6595. addtips(){
  6596. let params = [
  6597. {
  6598. cid: this.cid,
  6599. tips: JSON.stringify(this.aiJson),
  6600. tid: this.templateid
  6601. },
  6602. ];
  6603. this.ajax
  6604. .post(this.$store.state.api + "addTips", params)
  6605. .then((res) => {
  6606. })
  6607. .catch((err) => {
  6608. this.$message.error("网络不佳");
  6609. console.error(err);
  6610. });
  6611. },
  6612. openSaveTips(){
  6613. this.dialogVisibleTips = true
  6614. },
  6615. time() {
  6616. if (!this.now) {
  6617. this.now = new Date().getTime();
  6618. return true;
  6619. } else {
  6620. let time = new Date().getTime();
  6621. if (time - this.now > 3000) {
  6622. this.now = time;
  6623. return true;
  6624. } else {
  6625. return false;
  6626. }
  6627. }
  6628. },
  6629. deleteUnit(i) {
  6630. var _this = this;
  6631. if (i == 0 && _this.unitJson.length == 1) {
  6632. _this
  6633. .$confirm("确定切换成任务模式吗?", "提示", {
  6634. confirmButtonText: "确定",
  6635. cancelButtonText: "取消",
  6636. type: "warning",
  6637. })
  6638. .then(() => {
  6639. _this.unitJson[i].dyName = "";
  6640. // _this.updateCourseState(2);
  6641. })
  6642. .catch(() => {
  6643. return;
  6644. });
  6645. } else {
  6646. _this
  6647. .$confirm("确定删除此阶段吗?", "提示", {
  6648. confirmButtonText: "确定",
  6649. cancelButtonText: "取消",
  6650. type: "warning",
  6651. })
  6652. .then(() => {
  6653. _this.isDelete = 2;
  6654. // _this.unitIndex = _this.unitIndex - 1;
  6655. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  6656. // _this.$message.success("删除成功");
  6657. })
  6658. .catch(() => {
  6659. return;
  6660. });
  6661. }
  6662. },
  6663. deleteWork(chapid) {
  6664. let params = [
  6665. {
  6666. cid: this.cid,
  6667. chapters: JSON.stringify(this.unitJson),
  6668. uid: this.userid,
  6669. chapid: chapid,
  6670. },
  6671. ];
  6672. this.ajax
  6673. .post(this.$store.state.api + "deleteWork", params)
  6674. .then((res) => {
  6675. this.$message({
  6676. message: "删除成功",
  6677. type: "success",
  6678. });
  6679. let task = JSON.parse(
  6680. JSON.stringify(
  6681. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  6682. )
  6683. );
  6684. this.unitJson.splice(this.unitIndex, 1);
  6685. if (this.unitIndex == 0) {
  6686. this.unitIndex = 0;
  6687. } else {
  6688. this.unitIndex = this.unitIndex - 1;
  6689. }
  6690. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  6691. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  6692. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  6693. ...task,
  6694. ];
  6695. }
  6696. })
  6697. .catch((err) => {
  6698. this.$message.error("网络不佳");
  6699. console.error(err);
  6700. });
  6701. },
  6702. deleteTool(itemTaskIndex, i) {
  6703. var _this = this;
  6704. if (_this.time()) {
  6705. _this
  6706. .$confirm("确定删除此工具吗?", "提示", {
  6707. confirmButtonText: "确定",
  6708. cancelButtonText: "取消",
  6709. type: "warning",
  6710. })
  6711. .then(() => {
  6712. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  6713. itemTaskIndex
  6714. ].toolChoose.splice(i, 1);
  6715. _this.$message.success("删除成功");
  6716. })
  6717. .catch(() => {
  6718. return;
  6719. });
  6720. }
  6721. },
  6722. deleteSentence(i) {
  6723. var _this = this;
  6724. _this
  6725. .$confirm("确定删除此题目吗?", "提示", {
  6726. confirmButtonText: "确定",
  6727. cancelButtonText: "取消",
  6728. type: "warning",
  6729. })
  6730. .then(() => {
  6731. _this.sentenceList.splice(i, 1);
  6732. _this.$message.success("删除成功");
  6733. })
  6734. .catch(() => {
  6735. return;
  6736. });
  6737. },
  6738. deleteS(s, i, j) {
  6739. this.sentenceList[i].addSentence.splice(j, 1);
  6740. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  6741. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  6742. this.sentenceList[i].rightAnswer.splice(a, 1);
  6743. }
  6744. },
  6745. openT() {
  6746. top.postMessage({ tools: "25" }, "*");
  6747. },
  6748. deleteTask(i) {
  6749. var _this = this;
  6750. if (_this.time()) {
  6751. _this
  6752. .$confirm(
  6753. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  6754. 1 ==
  6755. i
  6756. ? "确定删除此任务吗?"
  6757. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  6758. "提示",
  6759. {
  6760. confirmButtonText: "确定",
  6761. cancelButtonText: "取消",
  6762. type: "warning",
  6763. }
  6764. )
  6765. .then(() => {
  6766. if (i == 0) {
  6767. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  6768. i + 1
  6769. ].chapterData = JSON.parse(
  6770. JSON.stringify(
  6771. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  6772. .chapterData
  6773. )
  6774. );
  6775. }
  6776. _this.$forceUpdate();
  6777. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  6778. i,
  6779. 1
  6780. );
  6781. _this.$message.success("删除成功");
  6782. })
  6783. .catch(() => {
  6784. return;
  6785. });
  6786. }
  6787. },
  6788. handlePictureCardPreview(file) {
  6789. this.dialogImageUrl = file.url;
  6790. },
  6791. clean(i, c) {
  6792. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  6793. },
  6794. handle_remove1(file, fileList, type) {
  6795. var _tmp = this.cover;
  6796. // for (var i = 0, len = _tmp.length; i < len; i++) {
  6797. // if (_tmp[i].uid == file.uid) {
  6798. // _tmp.splice(i, 1);
  6799. // break;
  6800. // }
  6801. // this.cover = _tmp;
  6802. // }
  6803. this.cover = [];
  6804. this.noneBtnImg = this.cover.length >= 1;
  6805. this.isSysPic = false;
  6806. this.isSysPic2 = false;
  6807. this.$forceUpdate();
  6808. },
  6809. addImg(e) {
  6810. var el = e.currentTarget;
  6811. el.getElementsByTagName("input")[0].click();
  6812. e.target.value = "";
  6813. },
  6814. addChaptersTools(i) {
  6815. this.chapTools = [
  6816. {
  6817. tools: [],
  6818. toolDetail: "",
  6819. },
  6820. ];
  6821. this.chapCount = i;
  6822. this.dialogVisible4 = true;
  6823. },
  6824. isNoFinsh() {
  6825. this.$message.warning("功能正在开发中");
  6826. },
  6827. addAttText(i) {
  6828. this.AttText = {
  6829. title: "",
  6830. text: "",
  6831. };
  6832. this.taskCount = i;
  6833. this.AttTextType = 0;
  6834. this.$forceUpdate();
  6835. this.dialogVisible6 = true;
  6836. setTimeout(() => {
  6837. this.$refs["fuInput"].focus();
  6838. }, 100);
  6839. },
  6840. openLine(i) {
  6841. this.line = "";
  6842. this.lineCount = i;
  6843. this.lineType = 0;
  6844. this.$forceUpdate();
  6845. this.dialogVisible7 = true;
  6846. },
  6847. pasteLine(i) {
  6848. navigator.clipboard
  6849. .readText()
  6850. .then((v) => {
  6851. console.log("获取剪贴板成功:", v);
  6852. const html = v;
  6853. const regex = /src="(.*?)"/g;
  6854. const match = regex.exec(html);
  6855. if (match && match[1]) {
  6856. console.log(match[1]);
  6857. this.$message.success("粘贴成功");
  6858. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6859. i
  6860. ].chapterData.push({
  6861. name: "链接",
  6862. title: "嵌入代码",
  6863. url: match[1],
  6864. type: 8,
  6865. });
  6866. } else {
  6867. // console.log("未找到包含 src 属性的 iframe");
  6868. this.$message.error(
  6869. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  6870. );
  6871. }
  6872. })
  6873. .catch((v) => {
  6874. console.log("获取剪贴板失败: ", v);
  6875. });
  6876. },
  6877. openSource(i) {
  6878. this.lineCount = i;
  6879. this.sourceData = {};
  6880. this.dialogVisibleSource = true;
  6881. this.updateSourcePan = false;
  6882. },
  6883. openAiCreate(){
  6884. this.dialogVisibleAiCreate = true;
  6885. },
  6886. createAiPpt(json){
  6887. this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push(json);
  6888. this.dialogVisibleAiCreate = false;
  6889. },
  6890. openAiCreateVideo(){
  6891. this.dialogVisibleAiCreateVideo = true;
  6892. },
  6893. createAiVideo(json){
  6894. this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push(json);
  6895. // this.dialogVisibleAiCreateVideo = false;
  6896. },
  6897. async createTeacherAn(){
  6898. this.loading = true
  6899. let md = new MarkdownIt();
  6900. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  6901. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  6902. let name = _task.task+'-教案'
  6903. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  6904. await this.generate(name, _html, i)
  6905. }
  6906. },
  6907. async generate(a, html, index) {
  6908. // 将html文件中需要用到的数据挂载到store上
  6909. const content = `<!DOCTYPE html>
  6910. <html lang="en">
  6911. <head>
  6912. <meta charset="UTF-8">
  6913. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6914. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6915. <title>${a}</title>
  6916. <style>
  6917. </style>
  6918. </head>
  6919. <body>
  6920. ${html}
  6921. </body>
  6922. </html>`;
  6923. // debugger
  6924. let dname = a + ".doc";
  6925. // 创建文件流
  6926. // 创建bolb实例时,内容一定要放在[]中
  6927. const blob = new Blob([content], {
  6928. type: "text/plain;charset='utf-8'",
  6929. });
  6930. const file = new File([blob], dname, { type: 'application/msword' });
  6931. await this.beforeUploadHtml(file, index)
  6932. },
  6933. beforeUploadHtml(event, index) {
  6934. var file = event;
  6935. var credentials = {
  6936. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  6937. secretAccessKey: "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",
  6938. }; //秘钥形式的登录上传
  6939. window.AWS.config.update(credentials);
  6940. window.AWS.config.region = "cn-northwest-1"; //设置区域
  6941. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  6942. var _this = this;
  6943. if (file) {
  6944. var params = {
  6945. Key:
  6946. file.name.split(".")[0] +
  6947. new Date().getTime() +
  6948. "." +
  6949. file.name.split(".")[file.name.split(".").length - 1],
  6950. ContentType: file.type,
  6951. Body: file,
  6952. "Access-Control-Allow-Credentials": "*",
  6953. ACL: "public-read",
  6954. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  6955. var options = {
  6956. partSize: 2048 * 1024 * 1024,
  6957. queueSize: 2,
  6958. leavePartsOnError: true,
  6959. };
  6960. bucket
  6961. .upload(params, options)
  6962. .on("httpUploadProgress", function (evt) {
  6963. //这里可以写进度条
  6964. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  6965. })
  6966. .send(function (err, data) {
  6967. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1)){
  6968. _this.loading = false
  6969. }
  6970. if (err) {
  6971. _this.$message.error("上传失败");
  6972. } else {
  6973. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  6974.                   name: file.name,
  6975.                   url: data.Location,
  6976.                   type: 3,
  6977.                 })
  6978. console.log(data.Location);
  6979. }
  6980. });
  6981. }
  6982. },
  6983. addSource() {
  6984. if (!Object.keys(this.sourceData).length) {
  6985. this.$message.error("请选择要上传的资源");
  6986. return;
  6987. }
  6988. let keys = Object.keys(this.sourceData);
  6989. for (var i = 0; i < keys.length; i++) {
  6990. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6991. this.lineCount
  6992. ].chapterData.push({
  6993. name: "链接",
  6994. title: this.sourceData[keys[i]].name,
  6995. url: this.sourceData[keys[i]].url,
  6996. type: 14,
  6997. id: keys[i],
  6998. });
  6999. }
  7000. this.$forceUpdate();
  7001. this.dialogVisibleSource = false;
  7002. },
  7003. updateSource() {
  7004. if (!Object.keys(this.sourceData).length) {
  7005. this.$message.error("请选择要上传的资源");
  7006. return;
  7007. }
  7008. let keys = Object.keys(this.sourceData);
  7009. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7010. this.taskCount
  7011. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  7012. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7013. this.taskCount
  7014. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  7015. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7016. this.taskCount
  7017. ].chapterData[this.lineCount].id = keys[0];
  7018. this.updateSourcePan = false;
  7019. this.$forceUpdate();
  7020. this.dialogVisibleSource = false;
  7021. },
  7022. deleteM(i, j) {
  7023. this.testJson.testJson[i].timuList.splice(j, 1);
  7024. },
  7025. beforeUploadTiMu(event, i) {
  7026. const loading = this.openLoading();
  7027. var file = event.target.files[0];
  7028. var credentials = {
  7029. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7030. secretAccessKey: "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",
  7031. }; //秘钥形式的登录上传
  7032. window.AWS.config.update(credentials);
  7033. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7034. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7035. var _this = this;
  7036. if (file) {
  7037. var params = {
  7038. Key:
  7039. file.name.split(".")[0] +
  7040. new Date().getTime() +
  7041. "." +
  7042. file.name.split(".")[file.name.split(".").length - 1],
  7043. ContentType: file.type,
  7044. Body: file,
  7045. "Access-Control-Allow-Credentials": "*",
  7046. ACL: "public-read",
  7047. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7048. var options = {
  7049. partSize: 2048 * 1024 * 1024,
  7050. queueSize: 2,
  7051. leavePartsOnError: true,
  7052. };
  7053. bucket
  7054. .upload(params, options)
  7055. .on("httpUploadProgress", function (evt) {
  7056. //这里可以写进度条
  7057. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7058. })
  7059. .send(function (err, data) {
  7060. loading.close();
  7061. if (err) {
  7062. _this.$message.error("上传失败");
  7063. } else {
  7064. if (_this.testJson.testJson[i].timuList) {
  7065. _this.testJson.testJson[i].timuList.push({
  7066. src: data.Location,
  7067. });
  7068. } else {
  7069. _this.testJson.testJson[i].timuList = [];
  7070. _this.testJson.testJson[i].timuList.push({
  7071. src: data.Location,
  7072. });
  7073. }
  7074. _this.imgChange3(i);
  7075. _this.$forceUpdate();
  7076. }
  7077. });
  7078. }
  7079. },
  7080. beforeUploadTi(event, i, j) {
  7081. const loading = this.openLoading();
  7082. var file = event.target.files[0];
  7083. var credentials = {
  7084. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7085. secretAccessKey: "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",
  7086. }; //秘钥形式的登录上传
  7087. window.AWS.config.update(credentials);
  7088. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7089. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7090. var _this = this;
  7091. if (file) {
  7092. var params = {
  7093. Key:
  7094. file.name.split(".")[0] +
  7095. new Date().getTime() +
  7096. "." +
  7097. file.name.split(".")[file.name.split(".").length - 1],
  7098. ContentType: file.type,
  7099. Body: file,
  7100. "Access-Control-Allow-Credentials": "*",
  7101. ACL: "public-read",
  7102. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7103. var options = {
  7104. partSize: 2048 * 1024 * 1024,
  7105. queueSize: 2,
  7106. leavePartsOnError: true,
  7107. };
  7108. bucket
  7109. .upload(params, options)
  7110. .on("httpUploadProgress", function (evt) {
  7111. //这里可以写进度条
  7112. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7113. })
  7114. .send(function (err, data) {
  7115. loading.close();
  7116. if (err) {
  7117. _this.$message.error("上传失败");
  7118. } else {
  7119. _this.testJson.testJson[i].checkList[j] = {};
  7120. _this.testJson.testJson[i].checkList[j].src = data.Location;
  7121. _this.testJson.testJson[i].checkList[j].imgType = 1;
  7122. _this.imgChange2(i, j);
  7123. _this.$forceUpdate();
  7124. }
  7125. });
  7126. }
  7127. },
  7128. beforeUpload1(event, type) {
  7129. // const loading = this.openLoading();
  7130. var file = event.target.files[0];
  7131. var credentials = {
  7132. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7133. secretAccessKey: "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",
  7134. }; //秘钥形式的登录上传
  7135. window.AWS.config.update(credentials);
  7136. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7137. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7138. var _this = this;
  7139. if (file) {
  7140. var params = {
  7141. Key:
  7142. file.name.split(".")[0] +
  7143. new Date().getTime() +
  7144. "." +
  7145. file.name.split(".")[file.name.split(".").length - 1],
  7146. ContentType: file.type,
  7147. Body: file,
  7148. "Access-Control-Allow-Credentials": "*",
  7149. ACL: "public-read",
  7150. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7151. var options = {
  7152. partSize: 2048 * 1024 * 1024,
  7153. queueSize: 2,
  7154. leavePartsOnError: true,
  7155. };
  7156. bucket
  7157. .upload(params, options)
  7158. .on("httpUploadProgress", function (evt) {
  7159. //这里可以写进度条
  7160. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7161. })
  7162. .send(function (err, data) {
  7163. // loading.close();
  7164. if (err) {
  7165. // var a = _this.$refs.upload1.uploadFiles;
  7166. // a.splice(a.length - 1, a.length);
  7167. _this.$message.error("上传失败");
  7168. } else {
  7169. // _this.cover.push({
  7170. // name: file.name,
  7171. // url: data.Location,
  7172. // uid: file.uid,
  7173. // });
  7174. _this.cover = [
  7175. {
  7176. name: file.name,
  7177. url: data.Location,
  7178. uid: file.uid,
  7179. },
  7180. ];
  7181. _this.imgChange1(null, null, 1, null);
  7182. _this.choosePicVisible = false;
  7183. console.log(data.Location);
  7184. }
  7185. });
  7186. }
  7187. },
  7188. beforeUploadSelect(event, type) {
  7189. // const loading = this.openLoading();
  7190. var file = event.target.files[0];
  7191. var credentials = {
  7192. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7193. secretAccessKey: "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",
  7194. }; //秘钥形式的登录上传
  7195. window.AWS.config.update(credentials);
  7196. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7197. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7198. var _this = this;
  7199. if (file) {
  7200. var params = {
  7201. Key:
  7202. file.name.split(".")[0] +
  7203. new Date().getTime() +
  7204. "." +
  7205. file.name.split(".")[file.name.split(".").length - 1],
  7206. ContentType: file.type,
  7207. Body: file,
  7208. "Access-Control-Allow-Credentials": "*",
  7209. ACL: "public-read",
  7210. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7211. var options = {
  7212. partSize: 2048 * 1024 * 1024,
  7213. queueSize: 2,
  7214. leavePartsOnError: true,
  7215. };
  7216. bucket
  7217. .upload(params, options)
  7218. .on("httpUploadProgress", function (evt) {
  7219. //这里可以写进度条
  7220. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7221. })
  7222. .send(function (err, data) {
  7223. // loading.close();
  7224. if (err) {
  7225. _this.$message.error("上传失败");
  7226. } else {
  7227. _this.selectJson.url = data.Location;
  7228. console.log(data.Location);
  7229. }
  7230. });
  7231. }
  7232. },
  7233. chooseSysPic(p) {
  7234. this.cover = [];
  7235. setTimeout(() => {
  7236. this.cover[0] = {
  7237. name: "系统图片.png",
  7238. url: p,
  7239. };
  7240. this.imgChange1(null, null, 1, null);
  7241. this.$forceUpdate();
  7242. }, 0);
  7243. this.isSysPic = true;
  7244. this.isSysPic2 = false;
  7245. this.sysPicVisible = false;
  7246. this.$forceUpdate();
  7247. },
  7248. chooseSysPic2(p) {
  7249. this.cover = [];
  7250. setTimeout(() => {
  7251. this.cover[0] = {
  7252. name: "网络图片.png",
  7253. url: p,
  7254. };
  7255. this.imgChange1(null, null, 1, null);
  7256. this.$forceUpdate();
  7257. }, 0);
  7258. this.isSysPic2 = true;
  7259. this.isSysPic = false;
  7260. this.sysPicVisible2 = false;
  7261. this.$forceUpdate();
  7262. },
  7263. beforeUpload(data) {
  7264. this.$refs.upload1.uploadFiles;
  7265. this.uploadLoading1 = true;
  7266. var file = data.file;
  7267. var credentials = {
  7268. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7269. secretAccessKey: "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",
  7270. }; //秘钥形式的登录上传
  7271. window.AWS.config.update(credentials);
  7272. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7273. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7274. var _this = this;
  7275. if (file) {
  7276. var params = {
  7277. Key:
  7278. file.name.split(".")[0] +
  7279. new Date().getTime() +
  7280. "." +
  7281. file.name.split(".")[file.name.split(".").length - 1],
  7282. ContentType: file.type,
  7283. Body: file,
  7284. "Access-Control-Allow-Credentials": "*",
  7285. ACL: "public-read",
  7286. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7287. var options = {
  7288. partSize: 2048 * 1024 * 1024,
  7289. queueSize: 2,
  7290. leavePartsOnError: true,
  7291. };
  7292. bucket
  7293. .upload(params, options)
  7294. .on("httpUploadProgress", function (evt) {
  7295. //这里可以写进度条
  7296. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7297. })
  7298. .send(function (err, data) {
  7299. _this.uploadLoading1 = false;
  7300. if (err) {
  7301. // var a = _this.$refs.upload1.uploadFiles;
  7302. // a.splice(a.length - 1, a.length);
  7303. _this.$message.error("上传失败");
  7304. } else {
  7305. //上传成功处理
  7306. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  7307. name: file.name,
  7308. url: data.Location,
  7309. uid: file.uid,
  7310. });
  7311. _this.imgChange();
  7312. console.log(data.Location);
  7313. }
  7314. });
  7315. }
  7316. },
  7317. onExceed() {
  7318. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  7319. },
  7320. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  7321. // const loading = this.openLoading();
  7322. var file = event.target.files[0];
  7323. var credentials = {
  7324. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7325. secretAccessKey: "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",
  7326. }; //秘钥形式的登录上传
  7327. window.AWS.config.update(credentials);
  7328. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7329. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7330. var _this = this;
  7331. if (type == 3) {
  7332. var b = [
  7333. "DOC",
  7334. "DOCX",
  7335. "DOCM",
  7336. "DOTM",
  7337. "DOTX",
  7338. "PPTX",
  7339. "PPSX",
  7340. "PPT",
  7341. "PPS",
  7342. "PPTM",
  7343. "POTM",
  7344. "PPAM",
  7345. "POTX",
  7346. "PPSM",
  7347. ];
  7348. if (
  7349. b.indexOf(
  7350. file.name
  7351. .split(".")
  7352. [file.name.split(".").length - 1].toLocaleUpperCase()
  7353. ) != -1
  7354. ) {
  7355. if (file.size / 1024 / 1024 > 80) {
  7356. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7357. this.inputShow = true;
  7358. // var a = _this.$refs.upload1.uploadFiles;
  7359. // a.splice(a.length - 1, a.length);
  7360. // loading.close();
  7361. return;
  7362. }
  7363. } else if (
  7364. file.name
  7365. .split(".")
  7366. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7367. ) {
  7368. if (file.size / 1024 / 1024 > 80) {
  7369. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7370. this.inputShow = true;
  7371. // var a = _this.$refs.upload1.uploadFiles;
  7372. // a.splice(a.length - 1, a.length);
  7373. // loading.close();
  7374. return;
  7375. }
  7376. }
  7377. }
  7378. this.inputShow = false;
  7379. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7380. itemTaskIndex
  7381. ].progress = 0;
  7382. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7383. itemTaskIndex
  7384. ].proVisible = true;
  7385. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7386. itemTaskIndex
  7387. ].isFinishSize = 0;
  7388. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7389. itemTaskIndex
  7390. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  7391. _this.$forceUpdate();
  7392. if (file) {
  7393. var params = {
  7394. Key:
  7395. file.name.split(".")[0] +
  7396. new Date().getTime() +
  7397. "." +
  7398. file.name.split(".")[file.name.split(".").length - 1],
  7399. ContentType: file.type,
  7400. Body: file,
  7401. "Access-Control-Allow-Credentials": "*",
  7402. ACL: "public-read",
  7403. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7404. var options = {
  7405. partSize: 2048 * 1024 * 1024,
  7406. queueSize: 2,
  7407. leavePartsOnError: true,
  7408. };
  7409. bucket
  7410. .upload(params, options)
  7411. .on("httpUploadProgress", function (evt) {
  7412. //这里可以写进度条
  7413. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7414. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7415. itemTaskIndex
  7416. ].progress = parseInt((evt.loaded / evt.total) * 100);
  7417. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7418. itemTaskIndex
  7419. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7420. _this.$forceUpdate();
  7421. })
  7422. .send(function (err, data) {
  7423. // loading.close();
  7424. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7425. itemTaskIndex
  7426. ].progress = 100;
  7427. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7428. itemTaskIndex
  7429. ].isFinishSize =
  7430. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7431. itemTaskIndex
  7432. ].isAllSize;
  7433. _this.$forceUpdate();
  7434. setTimeout(() => {
  7435. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7436. itemTaskIndex
  7437. ].proVisible = false;
  7438. _this.$forceUpdate();
  7439. }, 1000);
  7440. _this.inputShow = true;
  7441. if (err) {
  7442. // var a = _this.$refs.upload1.uploadFiles;
  7443. // a.splice(a.length - 1, a.length);
  7444. _this.$message.error("上传失败");
  7445. } else {
  7446. if (type == 13) {
  7447. let _type = 2;
  7448. var imgA = [
  7449. "png",
  7450. "jpg",
  7451. "jpeg",
  7452. "bmp",
  7453. "gif",
  7454. "webp",
  7455. "psd",
  7456. "svg",
  7457. "tiff",
  7458. ];
  7459. var fileA = [
  7460. "PDF",
  7461. "DOC",
  7462. "DOCX",
  7463. "DOCM",
  7464. "DOTM",
  7465. "DOTX",
  7466. "PPTX",
  7467. "PPSX",
  7468. "PPT",
  7469. "PPS",
  7470. "PPTM",
  7471. "POTM",
  7472. "PPAM",
  7473. "POTX",
  7474. "PPSM",
  7475. "XLSX",
  7476. "XLS",
  7477. ];
  7478. var videoA = [
  7479. "AVI",
  7480. "NAVI",
  7481. "MPEG",
  7482. "ASF",
  7483. "MOV",
  7484. "WMV",
  7485. "3GP",
  7486. "RM",
  7487. "RMVB",
  7488. "FLV",
  7489. "F4V",
  7490. "H.264",
  7491. "H.265",
  7492. "REAL VIDEO",
  7493. "MKV",
  7494. "WebM",
  7495. "HDDVD",
  7496. "MP4",
  7497. "MPG",
  7498. "M4V",
  7499. "MGV",
  7500. "OGV",
  7501. "QTM",
  7502. "STR",
  7503. "AMC",
  7504. "DVX",
  7505. "EVO",
  7506. "DAT",
  7507. "OGG",
  7508. "OGM",
  7509. ];
  7510. if (
  7511. fileA.indexOf(
  7512. data.Location.split(".")[
  7513. data.Location.split(".").length - 1
  7514. ].toLocaleUpperCase()
  7515. ) != -1
  7516. ) {
  7517. _type = 3;
  7518. } else if (
  7519. videoA.indexOf(
  7520. data.Location.split(".")[
  7521. data.Location.split(".").length - 1
  7522. ].toLocaleUpperCase()
  7523. ) != -1
  7524. ) {
  7525. _type = 2;
  7526. } else if (
  7527. imgA.indexOf(
  7528. data.Location.split(".")[
  7529. data.Location.split(".").length - 1
  7530. ].toLocaleLowerCase()
  7531. ) != -1
  7532. ) {
  7533. _type = 13;
  7534. } else {
  7535. _type = 12;
  7536. }
  7537. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7538. itemTaskIndex
  7539. ].chapterData.push({
  7540. name: file.name,
  7541. url: data.Location,
  7542. uid: file.uid,
  7543. type: _type,
  7544. });
  7545. _this.imgChange1(null, null, _type, itemTaskIndex);
  7546. } else if (type == 2 || type == 3 || type == 12) {
  7547. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7548. itemTaskIndex
  7549. ].chapterData.push({
  7550. name: file.name,
  7551. url: data.Location,
  7552. uid: file.uid,
  7553. type: type,
  7554. });
  7555. _this.imgChange1(null, null, type, itemTaskIndex);
  7556. } else if (type == 4) {
  7557. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7558. itemTaskIndex
  7559. ].fileList1.push({
  7560. name: file.name,
  7561. url: data.Location,
  7562. uid: file.uid,
  7563. });
  7564. _this.imgChange1(null, null, type, itemTaskIndex);
  7565. } else if (type == 5) {
  7566. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7567. itemTaskIndex
  7568. ].homeworkList.push({
  7569. name: file.name,
  7570. url: data.Location,
  7571. uid: file.uid,
  7572. });
  7573. _this.imgChange1(null, null, type, itemTaskIndex);
  7574. }
  7575. console.log(data.Location);
  7576. }
  7577. });
  7578. }
  7579. },
  7580. beforeUploadInfo2(event, type) {
  7581. // const loading = this.openLoading();
  7582. var file = event.target.files[0];
  7583. var credentials = {
  7584. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7585. secretAccessKey: "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",
  7586. }; //秘钥形式的登录上传
  7587. window.AWS.config.update(credentials);
  7588. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7589. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7590. var _this = this;
  7591. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  7592. if (
  7593. xianObj.indexOf(
  7594. file.name
  7595. .split(".")
  7596. [file.name.split(".").length - 1].toLocaleUpperCase()
  7597. ) == -1
  7598. ) {
  7599. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  7600. this.inputShow = true;
  7601. // var a = _this.$refs.upload1.uploadFiles;
  7602. // a.splice(a.length - 1, a.length);
  7603. // loading.close();
  7604. return;
  7605. }
  7606. if (type == 3) {
  7607. var b = [
  7608. "DOC",
  7609. "DOCX",
  7610. "DOCM",
  7611. "DOTM",
  7612. "DOTX",
  7613. "PPTX",
  7614. "PPSX",
  7615. "PPT",
  7616. "PPS",
  7617. "PPTM",
  7618. "POTM",
  7619. "PPAM",
  7620. "POTX",
  7621. "PPSM",
  7622. ];
  7623. if (
  7624. b.indexOf(
  7625. file.name
  7626. .split(".")
  7627. [file.name.split(".").length - 1].toLocaleUpperCase()
  7628. ) != -1
  7629. ) {
  7630. if (file.size / 1024 / 1024 > 80) {
  7631. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7632. this.inputShow = true;
  7633. // var a = _this.$refs.upload1.uploadFiles;
  7634. // a.splice(a.length - 1, a.length);
  7635. // loading.close();
  7636. return;
  7637. }
  7638. } else if (
  7639. file.name
  7640. .split(".")
  7641. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7642. ) {
  7643. if (file.size / 1024 / 1024 > 80) {
  7644. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7645. this.inputShow = true;
  7646. // var a = _this.$refs.upload1.uploadFiles;
  7647. // a.splice(a.length - 1, a.length);
  7648. // loading.close();
  7649. return;
  7650. }
  7651. }
  7652. }
  7653. this.inputShow = false;
  7654. _this.infoprogress = 0;
  7655. _this.infoproVisible = true;
  7656. _this.infoisFinishSize = 0;
  7657. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  7658. _this.$forceUpdate();
  7659. if (file) {
  7660. var params = {
  7661. Key:
  7662. file.name.split(".")[0] +
  7663. new Date().getTime() +
  7664. "." +
  7665. file.name.split(".")[file.name.split(".").length - 1],
  7666. ContentType: file.type,
  7667. Body: file,
  7668. "Access-Control-Allow-Credentials": "*",
  7669. ACL: "public-read",
  7670. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7671. var options = {
  7672. partSize: 2048 * 1024 * 1024,
  7673. queueSize: 2,
  7674. leavePartsOnError: true,
  7675. };
  7676. bucket
  7677. .upload(params, options)
  7678. .on("httpUploadProgress", function (evt) {
  7679. //这里可以写进度条
  7680. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7681. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  7682. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7683. _this.$forceUpdate();
  7684. })
  7685. .send(async function (err, data) {
  7686. // loading.close();
  7687. _this.infoprogress = 100;
  7688. _this.infoisFinishSize = _this.infoisAllSize;
  7689. _this.$forceUpdate();
  7690. _this.inputShow = true;
  7691. if (err) {
  7692. setTimeout(() => {
  7693. _this.infoproVisible = false;
  7694. _this.$forceUpdate();
  7695. }, 1000);
  7696. // var a = _this.$refs.upload1.uploadFiles;
  7697. // a.splice(a.length - 1, a.length);
  7698. _this.$message.error("上传失败");
  7699. } else {
  7700. let fileid = await _this.createFileid(data.Location)
  7701. if(fileid){
  7702. _this.infoproVisible = false;
  7703. _this.$forceUpdate();
  7704. }
  7705. if (type == 13) {
  7706. let _type = 2;
  7707. var imgA = [
  7708. "png",
  7709. "jpg",
  7710. "jpeg",
  7711. "bmp",
  7712. "gif",
  7713. "webp",
  7714. "psd",
  7715. "svg",
  7716. "tiff",
  7717. ];
  7718. var fileA = [
  7719. "PDF",
  7720. "DOC",
  7721. "DOCX",
  7722. "DOCM",
  7723. "DOTM",
  7724. "DOTX",
  7725. "PPTX",
  7726. "PPSX",
  7727. "PPT",
  7728. "PPS",
  7729. "PPTM",
  7730. "POTM",
  7731. "PPAM",
  7732. "POTX",
  7733. "PPSM",
  7734. "XLSX",
  7735. "XLS",
  7736. ];
  7737. var videoA = [
  7738. "AVI",
  7739. "NAVI",
  7740. "MPEG",
  7741. "ASF",
  7742. "MOV",
  7743. "WMV",
  7744. "3GP",
  7745. "RM",
  7746. "RMVB",
  7747. "FLV",
  7748. "F4V",
  7749. "H.264",
  7750. "H.265",
  7751. "REAL VIDEO",
  7752. "MKV",
  7753. "WebM",
  7754. "HDDVD",
  7755. "MP4",
  7756. "MPG",
  7757. "M4V",
  7758. "MGV",
  7759. "OGV",
  7760. "QTM",
  7761. "STR",
  7762. "AMC",
  7763. "DVX",
  7764. "EVO",
  7765. "DAT",
  7766. "OGG",
  7767. "OGM",
  7768. ];
  7769. if (
  7770. fileA.indexOf(
  7771. data.Location.split(".")[
  7772. data.Location.split(".").length - 1
  7773. ].toLocaleUpperCase()
  7774. ) != -1
  7775. ) {
  7776. _type = 3;
  7777. } else if (
  7778. videoA.indexOf(
  7779. data.Location.split(".")[
  7780. data.Location.split(".").length - 1
  7781. ].toLocaleUpperCase()
  7782. ) != -1
  7783. ) {
  7784. _type = 2;
  7785. } else if (
  7786. imgA.indexOf(
  7787. data.Location.split(".")[
  7788. data.Location.split(".").length - 1
  7789. ].toLocaleLowerCase()
  7790. ) != -1
  7791. ) {
  7792. _type = 13;
  7793. } else {
  7794. _type = 12;
  7795. }
  7796. _this.infoData.push({
  7797. name: file.name,
  7798. url: data.Location,
  7799. uid: file.uid,
  7800. type: _type,
  7801. fileid: fileid,
  7802. });
  7803. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  7804. name: file.name,
  7805. url: data.Location,
  7806. uid: file.uid,
  7807. type: _type,
  7808. fileid: fileid,
  7809. })
  7810. } else if (type == 2 || type == 3 || type == 12) {
  7811. _this.infoData.push({
  7812. name: file.name,
  7813. url: data.Location,
  7814. uid: file.uid,
  7815. type: type,
  7816. fileid: fileid,
  7817. });
  7818. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  7819. name: file.name,
  7820. url: data.Location,
  7821. uid: file.uid,
  7822. type: type,
  7823. fileid: fileid,
  7824. })
  7825. }
  7826. console.log(data.Location);
  7827. console.log(fileid);
  7828. }
  7829. });
  7830. }
  7831. },
  7832. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  7833. // const loading = this.openLoading();
  7834. var file = event.target.files[0];
  7835. var credentials = {
  7836. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7837. secretAccessKey: "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",
  7838. }; //秘钥形式的登录上传
  7839. window.AWS.config.update(credentials);
  7840. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7841. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7842. var _this = this;
  7843. if (type == 3) {
  7844. var b = [
  7845. "DOC",
  7846. "DOCX",
  7847. "DOCM",
  7848. "DOTM",
  7849. "DOTX",
  7850. "PPTX",
  7851. "PPSX",
  7852. "PPT",
  7853. "PPS",
  7854. "PPTM",
  7855. "POTM",
  7856. "PPAM",
  7857. "POTX",
  7858. "PPSM",
  7859. ];
  7860. if (
  7861. b.indexOf(
  7862. file.name
  7863. .split(".")
  7864. [file.name.split(".").length - 1].toLocaleUpperCase()
  7865. ) != -1
  7866. ) {
  7867. if (file.size / 1024 / 1024 > 80) {
  7868. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7869. this.inputShow = true;
  7870. // var a = _this.$refs.upload1.uploadFiles;
  7871. // a.splice(a.length - 1, a.length);
  7872. // loading.close();
  7873. return;
  7874. }
  7875. } else if (
  7876. file.name
  7877. .split(".")
  7878. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7879. ) {
  7880. if (file.size / 1024 / 1024 > 80) {
  7881. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7882. this.inputShow = true;
  7883. // var a = _this.$refs.upload1.uploadFiles;
  7884. // a.splice(a.length - 1, a.length);
  7885. // loading.close();
  7886. return;
  7887. }
  7888. }
  7889. }
  7890. this.inputShow = false;
  7891. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7892. itemTaskIndex
  7893. ].progress = 0;
  7894. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7895. itemTaskIndex
  7896. ].proVisible = true;
  7897. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7898. itemTaskIndex
  7899. ].isFinishSize = 0;
  7900. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7901. itemTaskIndex
  7902. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  7903. _this.$forceUpdate();
  7904. if (file) {
  7905. var params = {
  7906. Key:
  7907. file.name.split(".")[0] +
  7908. new Date().getTime() +
  7909. "." +
  7910. file.name.split(".")[file.name.split(".").length - 1],
  7911. ContentType: file.type,
  7912. Body: file,
  7913. "Access-Control-Allow-Credentials": "*",
  7914. ACL: "public-read",
  7915. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7916. var options = {
  7917. partSize: 2048 * 1024 * 1024,
  7918. queueSize: 2,
  7919. leavePartsOnError: true,
  7920. };
  7921. bucket
  7922. .upload(params, options)
  7923. .on("httpUploadProgress", function (evt) {
  7924. //这里可以写进度条
  7925. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7926. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7927. itemTaskIndex
  7928. ].progress = parseInt((evt.loaded / evt.total) * 100);
  7929. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7930. itemTaskIndex
  7931. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7932. _this.$forceUpdate();
  7933. })
  7934. .send(function (err, data) {
  7935. // loading.close();
  7936. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7937. itemTaskIndex
  7938. ].progress = 100;
  7939. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7940. itemTaskIndex
  7941. ].isFinishSize =
  7942. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7943. itemTaskIndex
  7944. ].isAllSize;
  7945. _this.$forceUpdate();
  7946. setTimeout(() => {
  7947. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7948. itemTaskIndex
  7949. ].proVisible = false;
  7950. _this.$forceUpdate();
  7951. }, 1000);
  7952. _this.inputShow = true;
  7953. if (err) {
  7954. // var a = _this.$refs.upload1.uploadFiles;
  7955. // a.splice(a.length - 1, a.length);
  7956. _this.$message.error("上传失败");
  7957. } else {
  7958. if (type == 2 || type == 3) {
  7959. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7960. itemTaskIndex
  7961. ].chapterData.push({
  7962. name: file.name,
  7963. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7964. // itemTaskIndex
  7965. // ].chapterData.length+1),
  7966. url: data.Location,
  7967. uid: file.uid,
  7968. type: type,
  7969. text: string,
  7970. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7971. // itemTaskIndex
  7972. // ].chapterData.length + 1),
  7973. });
  7974. _this.imgChange1(null, null, type, itemTaskIndex);
  7975. } else if (type == 4) {
  7976. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7977. itemTaskIndex
  7978. ].fileList1.push({
  7979. name: file.name,
  7980. url: data.Location,
  7981. uid: file.uid,
  7982. });
  7983. _this.imgChange1(null, null, type, itemTaskIndex);
  7984. } else if (type == 5) {
  7985. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7986. itemTaskIndex
  7987. ].homeworkList.push({
  7988. name: file.name,
  7989. url: data.Location,
  7990. uid: file.uid,
  7991. });
  7992. _this.imgChange1(null, null, type, itemTaskIndex);
  7993. }
  7994. console.log(data.Location);
  7995. }
  7996. });
  7997. }
  7998. },
  7999. addunit() {
  8000. this.unitJson.push({
  8001. dyName: "", //单元标题
  8002. isUpdate: 1,
  8003. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  8004. chapterInfo: [
  8005. {
  8006. isread: false,
  8007. chapterid: this.guid(),
  8008. title: "",
  8009. courseName: "",
  8010. taskJson: [
  8011. {
  8012. task: "",
  8013. taskDetail: "",
  8014. chapterData: [],
  8015. toolText: "",
  8016. toolChoose: [
  8017. {
  8018. tool: [],
  8019. toolDetail: "",
  8020. toolType: 0,
  8021. askCount: 1,
  8022. askTitle: "",
  8023. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8024. },
  8025. ],
  8026. isShowTools: false,
  8027. askCount: 1,
  8028. isFold: 1,
  8029. askTitle: "",
  8030. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8031. checkJson: [{ checkCount: [], checkPerent: [] }],
  8032. homeworkList: [],
  8033. },
  8034. ],
  8035. itemCount: 1,
  8036. fileList1: [],
  8037. video: [],
  8038. testData: [],
  8039. pData: [],
  8040. templateArray: [],
  8041. },
  8042. ],
  8043. });
  8044. this.addindex = this.unitJson.length - 1;
  8045. setTimeout(() => {
  8046. this.unitIndex = this.unitJson.length - 1;
  8047. setTimeout(() => {
  8048. console.log(this.$refs.dyInput);
  8049. this.$refs.dyInput[0].focus();
  8050. }, 100);
  8051. this.unitSet(this.unitIndex);
  8052. }, 0);
  8053. },
  8054. addToolFun(itemTaskIndex) {
  8055. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8056. itemTaskIndex
  8057. ].toolChoose.push({
  8058. tool: [],
  8059. toolDetail: "",
  8060. toolType: 0,
  8061. askCount: 1,
  8062. askTitle: "",
  8063. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8064. });
  8065. },
  8066. addTaskBorder() {
  8067. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  8068. task: "",
  8069. taskDetail: "",
  8070. chapterData: [],
  8071. toolText: "",
  8072. toolChoose: [
  8073. {
  8074. tool: [],
  8075. toolDetail: "",
  8076. toolType: 0,
  8077. askCount: 1,
  8078. askTitle: "",
  8079. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8080. },
  8081. ],
  8082. isShowTools: false,
  8083. askCount: 1,
  8084. isFold: 1, //任务收起状态
  8085. askTitle: "",
  8086. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8087. checkJson: [{ checkCount: [], checkPerent: [] }],
  8088. homeworkList: [],
  8089. });
  8090. setTimeout(() => {
  8091. this.checkEva(this.checkId);
  8092. setTimeout(() => {
  8093. this.checkEva(this.checkId);
  8094. }, 100);
  8095. }, 100);
  8096. },
  8097. add(e, i) {
  8098. var el = e.currentTarget;
  8099. el.getElementsByTagName("input")[0].click();
  8100. },
  8101. fold(i, e) {
  8102. if (
  8103. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0
  8104. ) {
  8105. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  8106. } else {
  8107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  8108. }
  8109. },
  8110. fold2(i) {
  8111. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  8112. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8113. i
  8114. ].isFold2 = false;
  8115. } else {
  8116. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  8117. }
  8118. this.$forceUpdate();
  8119. },
  8120. foldEva(i) {
  8121. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  8122. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8123. i
  8124. ].isEvaFold = false;
  8125. } else {
  8126. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8127. i
  8128. ].isEvaFold = true;
  8129. setTimeout(() => {
  8130. this.checkEva(this.checkId);
  8131. setTimeout(() => {
  8132. this.checkEva(this.checkId);
  8133. }, 500);
  8134. }, 0);
  8135. }
  8136. this.$forceUpdate();
  8137. },
  8138. foldC(i) {
  8139. if (
  8140. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  8141. ) {
  8142. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8143. i
  8144. ].isFoldchapter = false;
  8145. } else {
  8146. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8147. i
  8148. ].isFoldchapter = true;
  8149. }
  8150. this.$forceUpdate();
  8151. },
  8152. fold3(i, ti) {
  8153. if (
  8154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  8155. .isFold3
  8156. ) {
  8157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8158. ti
  8159. ].isFold3 = false;
  8160. } else {
  8161. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8162. ti
  8163. ].isFold3 = true;
  8164. }
  8165. this.$forceUpdate();
  8166. },
  8167. deleteHomeworkBox(unitIndex, index, i) {
  8168. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  8169. this.taskCount
  8170. ].homeworkList.splice(i, 1);
  8171. },
  8172. getStudent() {
  8173. let params = {
  8174. oid: this.oid,
  8175. cu: "",
  8176. cn: this.searchPeople,
  8177. };
  8178. this.ajax
  8179. .get(this.$store.state.api + "selectStudentAdd", params)
  8180. .then((res) => {
  8181. this.studentJuri = res.data[0];
  8182. })
  8183. .catch((err) => {
  8184. this.isLoading = false;
  8185. console.error(err);
  8186. });
  8187. },
  8188. // 添加协同成员其他选项按钮
  8189. getTeacherCopy(){
  8190. this.CollLoading=true
  8191. this.collid = ''
  8192. this.collid = '1xpz'
  8193. let params = {
  8194. oid:
  8195. this.org && this.org != "undefined" && this.org != "null"
  8196. ? this.org
  8197. : this.oid,
  8198. cu: "",
  8199. cn: this.searchTN,
  8200. coll: ''
  8201. };
  8202. this.ajax
  8203. .get(
  8204. this.$store.state.api +
  8205. (this.org && this.org != "undefined" && this.org != "null"
  8206. ? "selectCollaborativeMembersOrg"
  8207. : "selectCollaborativeMembers"),
  8208. params
  8209. )
  8210. .then((res) => {
  8211. let teacherJuri = res.data[0];
  8212. this.CollaborativeTeaList = res.data[1];
  8213. for (var i = 0; i < teacherJuri.length; i++) {
  8214. if (teacherJuri[i].userid == this.userid) {
  8215. teacherJuri.splice(i, 1);
  8216. break;
  8217. }
  8218. }
  8219. this.teacherJuri = teacherJuri.filter((i,index)=>{
  8220. return (i.cclassid == '' || i.cclassid == null)
  8221. })
  8222. console.log(' this.teacherJuri', this.teacherJuri);
  8223. let _check = [];
  8224. let _check2 = [];
  8225. for (var i = 0; i < this.teacherJuri.length; i++) {
  8226. var gid = this.teacherJuri[i].userid;
  8227. _check.push(gid);
  8228. }
  8229. for (var i = 0; i < this.checkboxList3.length; i++) {
  8230. var _id = this.checkboxList3[i];
  8231. if (_check.indexOf(_id) !== -1) {
  8232. _check2.push(_id);
  8233. }
  8234. }
  8235. if (_check2.length==0 && _check.length==0) {
  8236. }else{
  8237. this.checkAll2 = _check2.length === _check.length;
  8238. }
  8239. this.CollLoading=false
  8240. })
  8241. .catch((err) => {
  8242. console.error(err);
  8243. this.CollLoading=false
  8244. });
  8245. },
  8246. getTeacher(val) {
  8247. this.CollLoading=true
  8248. this.collid = ''
  8249. this.collid = !val ? '' : val
  8250. let params = {
  8251. oid:
  8252. this.org && this.org != "undefined" && this.org != "null"
  8253. ? this.org
  8254. : this.oid,
  8255. cu: "",
  8256. cn: this.searchTN,
  8257. coll: this.collid
  8258. };
  8259. this.ajax
  8260. .get(
  8261. this.$store.state.api +
  8262. (this.org && this.org != "undefined" && this.org != "null"
  8263. ? "selectCollaborativeMembersOrg"
  8264. : "selectCollaborativeMembers"),
  8265. params
  8266. )
  8267. .then((res) => {
  8268. let teacherJuri = res.data[0];
  8269. this.CollaborativeTeaList = res.data[1];
  8270. for (var i = 0; i < teacherJuri.length; i++) {
  8271. if (teacherJuri[i].userid == this.userid) {
  8272. teacherJuri.splice(i, 1);
  8273. break;
  8274. }
  8275. }
  8276. this.teacherJuri = teacherJuri;
  8277. let _check = [];
  8278. let _check2 = [];
  8279. for (var i = 0; i < this.teacherJuri.length; i++) {
  8280. var gid = this.teacherJuri[i].userid;
  8281. _check.push(gid);
  8282. }
  8283. for (var i = 0; i < this.checkboxList3.length; i++) {
  8284. var _id = this.checkboxList3[i];
  8285. if (_check.indexOf(_id) !== -1) {
  8286. _check2.push(_id);
  8287. }
  8288. }
  8289. if (_check2.length==0 && _check.length==0) {
  8290. }else{
  8291. this.checkAll2 = _check2.length === _check.length;
  8292. }
  8293. this.CollLoading=false
  8294. })
  8295. .catch((err) => {
  8296. console.error(err);
  8297. this.CollLoading=false
  8298. });
  8299. },
  8300. searchStudent() {
  8301. this.getStudent();
  8302. },
  8303. selectGrage() {
  8304. let params = {
  8305. oid: this.oid,
  8306. };
  8307. this.ajax
  8308. .get(this.$store.state.api + "selectGrageBySchool", params)
  8309. .then((res) => {
  8310. this.gradeList = res.data[0];
  8311. })
  8312. .catch((err) => {
  8313. this.isLoading = false;
  8314. console.error(err);
  8315. });
  8316. },
  8317. //获取班级列表
  8318. getClass() {
  8319. let params = {
  8320. oid: this.oid,
  8321. gid: this.gradeId,
  8322. cn: this.classSearch,
  8323. };
  8324. this.ajax
  8325. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  8326. .then((res) => {
  8327. if (!this.grade.length) {
  8328. this.grade = res.data[0];
  8329. }
  8330. this.grade2 = res.data[0];
  8331. this.classJuri = res.data[0];
  8332. let _check = [];
  8333. let _check2 = [];
  8334. for (var i = 0; i < this.grade2.length; i++) {
  8335. var gid = this.grade2[i].id;
  8336. _check.push(gid);
  8337. }
  8338. for (var i = 0; i < this.checkboxList2.length; i++) {
  8339. var _id = this.checkboxList2[i];
  8340. if (_check.indexOf(_id) !== -1) {
  8341. _check2.push(_id);
  8342. }
  8343. }
  8344. this.checkAll = _check2.length === _check.length;
  8345. })
  8346. .catch((err) => {
  8347. this.isLoading = false;
  8348. console.error(err);
  8349. });
  8350. },
  8351. CourseType2Change(val) {
  8352. this.pTypeCheck = [];
  8353. for (var i = 0; i < this.CourseType2.length; i++) {
  8354. let typeA = this.CourseType2[i];
  8355. if (val.indexOf(typeA.name) != -1) {
  8356. this.pTypeCheck.push(...typeA.id);
  8357. }
  8358. }
  8359. },
  8360. getChapterData(e, i, j, ic, type) {
  8361. e.stopPropagation();
  8362. this.updataC = true;
  8363. this.icc = ic;
  8364. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  8365. console.log("还不能下载图片喔");
  8366. }
  8367. },
  8368. deleteChapterData(e, i, j, ic, taskI) {
  8369. e.stopPropagation();
  8370. let _this = this;
  8371. _this
  8372. .$confirm("确定删除此项?", "提示", {
  8373. confirmButtonText: "确定",
  8374. cancelButtonText: "取消",
  8375. type: "warning",
  8376. })
  8377. .then(() => {
  8378. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  8379. ic,
  8380. 1
  8381. );
  8382. })
  8383. .catch(() => {
  8384. return;
  8385. });
  8386. },
  8387. deleteInfoData(e, ic) {
  8388. e.stopPropagation();
  8389. let _this = this;
  8390. _this
  8391. .$confirm("确定删除此项?", "提示", {
  8392. confirmButtonText: "确定",
  8393. cancelButtonText: "取消",
  8394. type: "warning",
  8395. })
  8396. .then(() => {
  8397. _this.infoData.splice(
  8398. ic,
  8399. 1
  8400. );
  8401. })
  8402. .catch(() => {
  8403. return;
  8404. });
  8405. },
  8406. updataVideoT(e, i, j, ic) {
  8407. // e.stopPropagation();
  8408. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  8409. // ic
  8410. // ].name = JSON.parse(JSON.stringify(e.target.value));
  8411. this.line =
  8412. this.unitJson[i].chapterInfo[0].taskJson[0].chapterData[ic].name;
  8413. this.taskCount = j;
  8414. this.lineCount = ic;
  8415. this.dialogVisibleupdataVideoT = true;
  8416. this.$forceUpdate();
  8417. },
  8418. updataVideoC() {
  8419. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8420. this.taskCount
  8421. ].chapterData[this.lineCount].name = JSON.parse(
  8422. JSON.stringify(this.line)
  8423. );
  8424. this.dialogVisibleupdataVideoT = false;
  8425. this.$forceUpdate();
  8426. },
  8427. upCd(e, i, j, taskCount, ic) {
  8428. e.stopPropagation();
  8429. if (ic == 0) {
  8430. return;
  8431. }
  8432. var a = JSON.parse(
  8433. JSON.stringify(
  8434. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  8435. ic - 1
  8436. ]
  8437. )
  8438. );
  8439. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  8440. JSON.parse(
  8441. JSON.stringify(
  8442. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  8443. )
  8444. );
  8445. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  8446. this.$forceUpdate();
  8447. },
  8448. downCd(e, i, j, taskCount, ic) {
  8449. e.stopPropagation();
  8450. if (
  8451. ic ==
  8452. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  8453. 1
  8454. ) {
  8455. return;
  8456. }
  8457. var a = JSON.parse(
  8458. JSON.stringify(
  8459. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  8460. ic + 1
  8461. ]
  8462. )
  8463. );
  8464. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  8465. JSON.parse(
  8466. JSON.stringify(
  8467. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  8468. )
  8469. );
  8470. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  8471. this.$forceUpdate();
  8472. },
  8473. async upTool(e, i, j, tooli) {
  8474. e.stopPropagation();
  8475. if (tooli == 0) {
  8476. return;
  8477. }
  8478. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  8479. let count2 = await this.getWorksCount(3, i, j, tooli);
  8480. if (count1 > 0 || count2 > 0) {
  8481. this.$confirm(
  8482. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  8483. "提示",
  8484. {
  8485. confirmButtonText: "确定",
  8486. cancelButtonText: "取消",
  8487. type: "warning",
  8488. }
  8489. )
  8490. .then(() => {
  8491. var a = JSON.parse(
  8492. JSON.stringify(
  8493. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  8494. tooli - 1
  8495. ]
  8496. )
  8497. );
  8498. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  8499. JSON.parse(
  8500. JSON.stringify(
  8501. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8502. )
  8503. );
  8504. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8505. this.$forceUpdate();
  8506. })
  8507. .catch(() => {
  8508. return;
  8509. });
  8510. } else {
  8511. var a = JSON.parse(
  8512. JSON.stringify(
  8513. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  8514. )
  8515. );
  8516. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  8517. JSON.parse(
  8518. JSON.stringify(
  8519. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8520. )
  8521. );
  8522. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8523. this.$forceUpdate();
  8524. }
  8525. },
  8526. async downTool(e, i, j, tooli) {
  8527. e.stopPropagation();
  8528. if (
  8529. tooli ==
  8530. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  8531. ) {
  8532. return;
  8533. }
  8534. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  8535. let count2 = await this.getWorksCount(3, i, j, tooli);
  8536. if (count1 > 0 || count2 > 0) {
  8537. this.$confirm(
  8538. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  8539. "提示",
  8540. {
  8541. confirmButtonText: "确定",
  8542. cancelButtonText: "取消",
  8543. type: "warning",
  8544. }
  8545. )
  8546. .then(() => {
  8547. var a = JSON.parse(
  8548. JSON.stringify(
  8549. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  8550. tooli + 1
  8551. ]
  8552. )
  8553. );
  8554. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  8555. JSON.parse(
  8556. JSON.stringify(
  8557. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8558. )
  8559. );
  8560. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8561. this.$forceUpdate();
  8562. })
  8563. .catch(() => {
  8564. return;
  8565. });
  8566. } else {
  8567. var a = JSON.parse(
  8568. JSON.stringify(
  8569. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  8570. )
  8571. );
  8572. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  8573. JSON.parse(
  8574. JSON.stringify(
  8575. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8576. )
  8577. );
  8578. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8579. this.$forceUpdate();
  8580. }
  8581. },
  8582. addWork() {
  8583. let cPan = 1;
  8584. for (var i = 0; i < this.unitJson.length; i++) {
  8585. for (
  8586. var j = 0;
  8587. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8588. j++
  8589. ) {
  8590. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8591. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8592. if (
  8593. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8594. ) {
  8595. for (
  8596. var z = 0;
  8597. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8598. z++
  8599. ) {
  8600. if (
  8601. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  8602. .length
  8603. ) {
  8604. this.$message.error("请把工具添加完整");
  8605. cPan = 2;
  8606. break;
  8607. }
  8608. }
  8609. }
  8610. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8611. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8612. i
  8613. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8614. return ele.value != "";
  8615. });
  8616. }
  8617. }
  8618. }
  8619. this.inputShow = true;
  8620. if (cPan == 2) {
  8621. this.steps--;
  8622. return;
  8623. }
  8624. for (var i = 0; i < this.unitJson.length; i++) {
  8625. delete this.unitJson[i].isUpdate;
  8626. }
  8627. let params = [
  8628. {
  8629. uid: this.userid,
  8630. title: this.courseName,
  8631. brief: this.courseText,
  8632. cover:
  8633. this.cover.length > 0
  8634. ? JSON.stringify(this.cover)
  8635. : JSON.stringify([
  8636. {
  8637. name: "noBanner.jpg",
  8638. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  8639. uid: 1656409780264,
  8640. status: "success",
  8641. },
  8642. ]),
  8643. evaId: this.evalua,
  8644. astudent:
  8645. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  8646. see: this.isTeacherSee == true ? 1 : 0,
  8647. chapters: JSON.stringify(this.unitJson),
  8648. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  8649. courseType: JSON.stringify(this.courseTypeId),
  8650. ateacher:
  8651. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  8652. inviteCode: JSON.stringify(this.inviteCode),
  8653. refile: JSON.stringify(this.infoData),
  8654. reBrief: this.courseText2,
  8655. cpote: JSON.stringify(this.cpote),
  8656. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  8657. iresearch: this.isFileSearch ? 1 : 2,
  8658. },
  8659. ];
  8660. this.ajax
  8661. .post(this.$store.state.api + "addWorkNew2AI3", params)
  8662. .then((res) => {
  8663. console.log(this.steps);
  8664. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  8665. this.$message({
  8666. message: "新增成功",
  8667. type: "success",
  8668. });
  8669. }
  8670. this.number = res.data.ordernumber;
  8671. this.courseId = res.data.courseId;
  8672. this.cid = res.data.courseId;
  8673. this.courseUserid = this.userid;
  8674. this.islogin = true;
  8675. this.updateCourseState(4);
  8676. this.addtips()
  8677. })
  8678. .catch((err) => {
  8679. this.$message.error("网络不佳");
  8680. console.error(err);
  8681. });
  8682. },
  8683. goCourse() {
  8684. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  8685. },
  8686. updateWork2() {
  8687. let _unitIndex = this.unitIndex;
  8688. let cPan = 1;
  8689. for (
  8690. var j = 0;
  8691. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8692. j++
  8693. ) {
  8694. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8695. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8696. j
  8697. ].proVisible2 = false;
  8698. if (
  8699. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8700. .length > 1
  8701. ) {
  8702. for (
  8703. var z = 0;
  8704. z <
  8705. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8706. .length;
  8707. z++
  8708. ) {
  8709. if (
  8710. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8711. z
  8712. ].tool.length
  8713. ) {
  8714. this.$message.error("请把工具添加完整");
  8715. cPan = 2;
  8716. break;
  8717. }
  8718. }
  8719. }
  8720. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8721. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8722. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8723. (ele) => {
  8724. return ele.value != "";
  8725. }
  8726. );
  8727. }
  8728. }
  8729. this.inputShow = true;
  8730. if (cPan == 2) {
  8731. this.steps--;
  8732. return;
  8733. }
  8734. let params = [
  8735. {
  8736. cid: this.cid,
  8737. chapters: JSON.stringify(this.unitJson),
  8738. uid: this.userid,
  8739. unitIndex: _unitIndex,
  8740. },
  8741. ];
  8742. this.ajax
  8743. .post(this.$store.state.api + "updateWorkNew4", params)
  8744. .then((res) => {
  8745. this.$message({
  8746. message: "修改成功",
  8747. type: "success",
  8748. });
  8749. this.courseId = this.cid;
  8750. this.addtips();
  8751. })
  8752. .catch((err) => {
  8753. this.$message.error("网络不佳");
  8754. console.error(err);
  8755. });
  8756. },
  8757. updateWork3(unitIndex) {
  8758. let _unitIndex = unitIndex;
  8759. let cPan = 1;
  8760. for (
  8761. var j = 0;
  8762. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8763. j++
  8764. ) {
  8765. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8766. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8767. j
  8768. ].proVisible2 = false;
  8769. if (
  8770. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8771. .length > 1
  8772. ) {
  8773. for (
  8774. var z = 0;
  8775. z <
  8776. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8777. .length;
  8778. z++
  8779. ) {
  8780. if (
  8781. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8782. z
  8783. ].tool.length
  8784. ) {
  8785. this.$message.error("请把工具添加完整");
  8786. cPan = 2;
  8787. break;
  8788. }
  8789. }
  8790. }
  8791. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8792. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8793. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8794. (ele) => {
  8795. return ele.value != "";
  8796. }
  8797. );
  8798. }
  8799. }
  8800. this.inputShow = true;
  8801. if (cPan == 2) {
  8802. this.steps--;
  8803. return;
  8804. }
  8805. let params = [
  8806. {
  8807. cid: this.cid,
  8808. chapters: JSON.stringify(this.unitJson),
  8809. uid: this.userid,
  8810. unitIndex: _unitIndex,
  8811. },
  8812. ];
  8813. this.ajax
  8814. .post(this.$store.state.api + "updateWorkNew4", params)
  8815. .then((res) => {
  8816. // this.$message({
  8817. // message: "修改成功",
  8818. // type: "success",
  8819. // });
  8820. this.courseId = this.cid;
  8821. this.addtips()
  8822. })
  8823. .catch((err) => {
  8824. this.$message.error("网络不佳");
  8825. console.error(err);
  8826. });
  8827. },
  8828. updateWork() {
  8829. let cPan = 1;
  8830. for (var i = 0; i < this.unitJson.length; i++) {
  8831. for (
  8832. var j = 0;
  8833. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8834. j++
  8835. ) {
  8836. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8837. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8838. if (
  8839. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8840. ) {
  8841. for (
  8842. var z = 0;
  8843. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8844. z++
  8845. ) {
  8846. if (
  8847. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  8848. .length
  8849. ) {
  8850. this.$message.error("请把工具添加完整");
  8851. cPan = 2;
  8852. break;
  8853. }
  8854. }
  8855. }
  8856. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8857. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8858. i
  8859. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8860. return ele.value != "";
  8861. });
  8862. }
  8863. }
  8864. }
  8865. this.inputShow = true;
  8866. if (cPan == 2) {
  8867. this.steps--;
  8868. return;
  8869. }
  8870. for (var i = 0; i < this.unitJson.length; i++) {
  8871. delete this.unitJson[i].isUpdate;
  8872. }
  8873. let params = [
  8874. {
  8875. cid: this.cid,
  8876. title: this.courseName,
  8877. brief: this.courseText,
  8878. cover:
  8879. this.cover.length > 0
  8880. ? JSON.stringify(this.cover)
  8881. : JSON.stringify([
  8882. {
  8883. name: "noBanner.jpg",
  8884. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  8885. uid: 1656409780264,
  8886. status: "success",
  8887. },
  8888. ]),
  8889. evaId: this.evalua,
  8890. astudent:
  8891. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  8892. see: this.isTeacherSee == true ? 1 : 0,
  8893. chapters: JSON.stringify(this.unitJson),
  8894. template: this.myWord != "undefined" ? this.myWord : [],
  8895. uid: this.userid,
  8896. courseType: JSON.stringify(this.courseTypeId),
  8897. ateacher:
  8898. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  8899. inviteCode: JSON.stringify(this.inviteCode),
  8900. refile: JSON.stringify(this.infoData),
  8901. reBrief: this.courseText2,
  8902. cpote: JSON.stringify(this.cpote),
  8903. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  8904. iresearch: this.isFileSearch ? 1 : 2,
  8905. },
  8906. ];
  8907. this.ajax
  8908. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  8909. .then((res) => {
  8910. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  8911. if (this.cidType == 1) {
  8912. this.$message({
  8913. message: "修改成功",
  8914. type: "success",
  8915. });
  8916. } else {
  8917. this.$message({
  8918. message: "新增成功",
  8919. type: "success",
  8920. });
  8921. }
  8922. }
  8923. this.number = this.nbOrder;
  8924. this.courseId = this.cid;
  8925. this.addtips()
  8926. })
  8927. .catch((err) => {
  8928. this.$message.error("网络不佳");
  8929. console.error(err);
  8930. });
  8931. },
  8932. insertWord() {
  8933. this.dialogVisible1 = true;
  8934. this.updateBoolean2 = false;
  8935. this.tTitle = "";
  8936. this.tdetail = "";
  8937. },
  8938. addWord() {
  8939. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  8940. name: this.tTitle,
  8941. content: this.tdetail,
  8942. uid: this.guid(),
  8943. });
  8944. this.dialogVisible1 = false;
  8945. },
  8946. upWord() { },
  8947. selectWord(uid, i, c) {
  8948. this.dialogVisible1 = true;
  8949. this.updateBoolean2 = true;
  8950. if (
  8951. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  8952. ) {
  8953. this.tTitle =
  8954. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  8955. this.tdetail =
  8956. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  8957. }
  8958. },
  8959. isAddPP() {
  8960. if (this.checkboxList.length > 0) {
  8961. this.$message({
  8962. message: "添加成功",
  8963. type: "success",
  8964. });
  8965. this.dialogVisible3 = false;
  8966. } else {
  8967. this.$message({
  8968. message: "请添加课程成员",
  8969. type: "error",
  8970. });
  8971. }
  8972. },
  8973. isAddClass() {
  8974. this.dialogVisibleClass = false;
  8975. },
  8976. isAddPPTeacher() {
  8977. this.dialogVisibleMember = false;
  8978. this.setMan();
  8979. },
  8980. getTipsTemplate(){
  8981. if(this.templateid){
  8982. let params = {
  8983. id: this.templateid
  8984. }
  8985. this.ajax
  8986. .get(this.$store.state.api + "selectTipsTemplateById", params)
  8987. .then((res) => {
  8988. if(res.data[0].length){
  8989. this.tipsJson = res.data[0][0]
  8990. this.aiJson = JSON.parse(res.data[0][0].tips)
  8991. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  8992. this.$forceUpdate();
  8993. }
  8994. })
  8995. .catch((err) => { });
  8996. }
  8997. },
  8998. getTemplate() {
  8999. this.ajax
  9000. .get(this.$store.state.api + "getCourseTemplateT", "")
  9001. .then((res) => {
  9002. this.templateArray = res.data[0];
  9003. this.getTemplateOid();
  9004. this.$forceUpdate();
  9005. })
  9006. .catch((err) => { });
  9007. },
  9008. getTemplateOid() {
  9009. let params = {
  9010. oid: this.oid,
  9011. };
  9012. this.ajax
  9013. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9014. .then((res) => {
  9015. if (res.data[0].length) {
  9016. this.templateArray = [...res.data[0], ...this.templateArray];
  9017. }
  9018. this.getTemplateOrg();
  9019. this.$forceUpdate();
  9020. })
  9021. .catch((err) => { });
  9022. },
  9023. getTemplateOrg() {
  9024. let params = {
  9025. oid: this.org,
  9026. };
  9027. this.ajax
  9028. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9029. .then((res) => {
  9030. if (res.data[0].length) {
  9031. this.templateArray = [...res.data[0], ...this.templateArray];
  9032. }
  9033. this.$forceUpdate();
  9034. })
  9035. .catch((err) => { });
  9036. },
  9037. clearChoose() {
  9038. this.clearArray.splice(this.templateC.id, 1);
  9039. this.dialogVisible2 = false;
  9040. },
  9041. clearAttText() {
  9042. this.AttText = {
  9043. title: "",
  9044. text: "",
  9045. };
  9046. this.dialogVisible6 = false;
  9047. },
  9048. clearLine() {
  9049. this.line = "";
  9050. this.dialogVisible7 = false;
  9051. },
  9052. openTemplate() {
  9053. this.ctJson = {};
  9054. this.templateDialog = true;
  9055. },
  9056. checkctJson(json) {
  9057. if (this.ctJson.id == json.id) {
  9058. this.ctJson = {};
  9059. } else {
  9060. this.ctJson = json;
  9061. }
  9062. },
  9063. addTemplate(res) {
  9064. let _this = this;
  9065. let _res = [];
  9066. if (res.id == 1) {
  9067. _res = [
  9068. {
  9069. dyName: "", //单元标题
  9070. easy: 1,
  9071. chapterInfo: [
  9072. {
  9073. isread: false,
  9074. chapterid: this.guid(),
  9075. title: "",
  9076. courseName: "",
  9077. taskJson: [
  9078. {
  9079. task: "",
  9080. taskDetail: "",
  9081. chapterData: [],
  9082. toolText: "",
  9083. toolChoose: [
  9084. {
  9085. tool: [],
  9086. toolDetail: "",
  9087. toolType: 0,
  9088. askCount: 1,
  9089. askTitle: "",
  9090. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9091. },
  9092. ],
  9093. isShowTools: false,
  9094. askCount: 1,
  9095. isFold: 1,
  9096. askTitle: "",
  9097. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9098. checkJson: [{ checkCount: [], checkPerent: [] }],
  9099. homeworkList: [],
  9100. },
  9101. ],
  9102. itemCount: 1,
  9103. fileList1: [],
  9104. video: [],
  9105. testData: [],
  9106. pData: [],
  9107. templateArray: [],
  9108. },
  9109. ],
  9110. },
  9111. ];
  9112. this.updateCourseState(1);
  9113. } else if (res.id == 2) {
  9114. let stageData = [];
  9115. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  9116. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  9117. if (!iframe && !iframe2) {
  9118. this.$message.error("请使用AI共创生成");
  9119. return;
  9120. }
  9121. let copyData = iframe ? iframe.contentWindow.copyData : false;
  9122. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  9123. if (
  9124. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  9125. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  9126. ) {
  9127. this.$message.error("请使用AI共创生成");
  9128. return;
  9129. }
  9130. stageData = copyData
  9131. ? copyData.stageData
  9132. : copyData2
  9133. ? copyData2.stageData
  9134. : [""];
  9135. for (var i = 0; i < stageData.length; i++) {
  9136. _res.push({
  9137. dyName: stageData[i], //单元标题
  9138. chapterInfo: [
  9139. {
  9140. isread: false,
  9141. chapterid: this.guid(),
  9142. title: "",
  9143. courseName: "",
  9144. taskJson: [
  9145. {
  9146. task: "",
  9147. taskDetail: "",
  9148. chapterData: [],
  9149. toolText: "",
  9150. toolChoose: [
  9151. {
  9152. tool: [],
  9153. toolDetail: "",
  9154. toolType: 0,
  9155. askCount: 1,
  9156. askTitle: "",
  9157. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9158. },
  9159. ],
  9160. isShowTools: false,
  9161. askCount: 1,
  9162. isFold: 1,
  9163. askTitle: "",
  9164. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9165. checkJson: [{ checkCount: [], checkPerent: [] }],
  9166. homeworkList: [],
  9167. },
  9168. ],
  9169. itemCount: 1,
  9170. fileList1: [],
  9171. video: [],
  9172. testData: [],
  9173. pData: [],
  9174. templateArray: [],
  9175. },
  9176. ],
  9177. });
  9178. }
  9179. this.updateCourseState(1);
  9180. } else if (!Object.keys(res).length) {
  9181. this.$message.error("请选择模板");
  9182. retrun;
  9183. } else {
  9184. _res = JSON.parse(res.chapters);
  9185. this.updateCourseState(parseInt(res.state));
  9186. }
  9187. _this
  9188. .$confirm(
  9189. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9190. "提示",
  9191. {
  9192. confirmButtonText: "确定",
  9193. cancelButtonText: "取消",
  9194. type: "warning",
  9195. }
  9196. )
  9197. .then(() => {
  9198. _this.unitJson = _res;
  9199. _this.updateWork();
  9200. // _this.steps++;
  9201. _this.templateDialog = false;
  9202. setTimeout(() => {
  9203. this.checkEva(this.checkId);
  9204. setTimeout(() => {
  9205. this.checkEva(this.checkId);
  9206. }, 100);
  9207. }, 1000);
  9208. })
  9209. .catch(() => {
  9210. return;
  9211. });
  9212. },
  9213. checkTemplate(res) {
  9214. let _this = this;
  9215. _this
  9216. .$confirm(
  9217. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9218. "提示",
  9219. {
  9220. confirmButtonText: "确定",
  9221. cancelButtonText: "取消",
  9222. type: "warning",
  9223. }
  9224. )
  9225. .then(() => {
  9226. _this.unitJson = JSON.parse(res.chapters);
  9227. _this.steps++;
  9228. setTimeout(() => {
  9229. this.checkEva(this.checkId);
  9230. setTimeout(() => {
  9231. this.checkEva(this.checkId);
  9232. }, 100);
  9233. }, 1000);
  9234. })
  9235. .catch(() => {
  9236. return;
  9237. });
  9238. },
  9239. checkTemplate1(w) {
  9240. this.steps++;
  9241. },
  9242. checkTemplate2() {
  9243. let _this = this;
  9244. _this
  9245. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  9246. confirmButtonText: "确定",
  9247. cancelButtonText: "取消",
  9248. type: "warning",
  9249. })
  9250. .then(() => {
  9251. _this.unitIndex = 0;
  9252. _this.unitJson = [
  9253. {
  9254. dyName: "", //单元标题
  9255. chapterInfo: [
  9256. {
  9257. isread: false,
  9258. chapterid: this.guid(),
  9259. title: "",
  9260. courseName: "",
  9261. taskJson: [
  9262. {
  9263. task: "",
  9264. taskDetail: "",
  9265. chapterData: [],
  9266. toolText: "",
  9267. toolChoose: [
  9268. {
  9269. tool: [],
  9270. toolDetail: "",
  9271. toolType: 0,
  9272. askCount: 1,
  9273. askTitle: "",
  9274. askJson: [
  9275. { askstitle: "", askItem: 1, checkList: [] },
  9276. ],
  9277. },
  9278. ],
  9279. isShowTools: false,
  9280. askCount: 1,
  9281. isFold: 1,
  9282. askTitle: "",
  9283. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9284. checkJson: [{ checkCount: [], checkPerent: [] }],
  9285. homeworkList: [],
  9286. },
  9287. ],
  9288. itemCount: 1,
  9289. fileList1: [],
  9290. video: [],
  9291. testData: [],
  9292. pData: [],
  9293. templateArray: [],
  9294. },
  9295. ],
  9296. },
  9297. ];
  9298. this.steps++;
  9299. setTimeout(() => {
  9300. this.checkEva(this.checkId);
  9301. setTimeout(() => {
  9302. this.checkEva(this.checkId);
  9303. }, 100);
  9304. }, 1000);
  9305. this.updateWork();
  9306. })
  9307. .catch(() => {
  9308. return;
  9309. });
  9310. },
  9311. checkTemplate3() {
  9312. let _this = this;
  9313. _this
  9314. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  9315. confirmButtonText: "确定",
  9316. cancelButtonText: "取消",
  9317. type: "warning",
  9318. })
  9319. .then(() => {
  9320. _this.unitIndex = 0;
  9321. _this.unitJson = [
  9322. {
  9323. dyName: "", //单元标题
  9324. easy: 1,
  9325. chapterInfo: [
  9326. {
  9327. isread: false,
  9328. chapterid: this.guid(),
  9329. title: "",
  9330. courseName: "",
  9331. taskJson: [
  9332. {
  9333. task: "",
  9334. taskDetail: "",
  9335. chapterData: [],
  9336. toolText: "",
  9337. toolChoose: [
  9338. {
  9339. tool: [],
  9340. toolDetail: "",
  9341. toolType: 0,
  9342. askCount: 1,
  9343. askTitle: "",
  9344. askJson: [
  9345. { askstitle: "", askItem: 1, checkList: [] },
  9346. ],
  9347. },
  9348. ],
  9349. isShowTools: false,
  9350. askCount: 1,
  9351. isFold: 1,
  9352. askTitle: "",
  9353. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9354. checkJson: [{ checkCount: [], checkPerent: [] }],
  9355. homeworkList: [],
  9356. },
  9357. ],
  9358. itemCount: 1,
  9359. fileList1: [],
  9360. video: [],
  9361. testData: [],
  9362. pData: [],
  9363. templateArray: [],
  9364. },
  9365. ],
  9366. },
  9367. ];
  9368. // this.steps++;
  9369. this.updateWork();
  9370. })
  9371. .catch(() => {
  9372. return;
  9373. });
  9374. },
  9375. checkTemplate4() {
  9376. let _this = this;
  9377. _this
  9378. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  9379. confirmButtonText: "确定",
  9380. cancelButtonText: "取消",
  9381. type: "warning",
  9382. })
  9383. .then(() => {
  9384. _this.unitIndex = 0;
  9385. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  9386. this.steps++;
  9387. this.updateWork();
  9388. })
  9389. .catch(() => {
  9390. return;
  9391. });
  9392. },
  9393. wordNext() {
  9394. this.dialogVisible2 = false;
  9395. },
  9396. isAddOrUpdateAttText() {
  9397. if (this.AttTextType == 0) {
  9398. this.addAttTextMessage();
  9399. } else {
  9400. this.updateAttText();
  9401. }
  9402. },
  9403. isAddOrUpdateLine() {
  9404. if (!this.lineTitle) {
  9405. this.$message.error("请填写链接标题");
  9406. return;
  9407. }
  9408. if (this.lineType == 0) {
  9409. this.addLine();
  9410. } else {
  9411. this.updateLine();
  9412. }
  9413. },
  9414. addAttTextMessage() {
  9415. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9416. this.taskCount
  9417. ].chapterData.push({
  9418. name: this.AttText.title,
  9419. url: this.AttText.text,
  9420. type: 6,
  9421. });
  9422. this.imgChange1(null, null, 6, this.taskCount);
  9423. this.dialogVisible6 = false;
  9424. },
  9425. selectAttText(itemTaskIndex, i) {
  9426. this.AttText.title =
  9427. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9428. itemTaskIndex
  9429. ].chapterData[i].name;
  9430. this.AttText.text =
  9431. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9432. itemTaskIndex
  9433. ].chapterData[i].url;
  9434. this.taskCount = itemTaskIndex;
  9435. this.AttTextIndex = i;
  9436. this.AttTextType = 1;
  9437. this.dialogVisible6 = true;
  9438. },
  9439. updateAttText() {
  9440. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9441. this.taskCount
  9442. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  9443. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9444. this.taskCount
  9445. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  9446. this.dialogVisible6 = false;
  9447. },
  9448. addLine() {
  9449. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9450. this.lineCount
  9451. ].chapterData.push({
  9452. name: "链接",
  9453. title: this.lineTitle,
  9454. url: this.line,
  9455. type: 8,
  9456. });
  9457. this.imgChange1(null, null, 8, this.lineCount);
  9458. this.dialogVisible7 = false;
  9459. },
  9460. selectLine(itemTaskIndex, i) {
  9461. this.line =
  9462. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9463. itemTaskIndex
  9464. ].chapterData[i].url;
  9465. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9466. itemTaskIndex
  9467. ].chapterData[i].title
  9468. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9469. .chapterData[i].title
  9470. : "";
  9471. this.taskCount = itemTaskIndex;
  9472. this.lineCount = i;
  9473. this.lineType = 1;
  9474. this.dialogVisible7 = true;
  9475. },
  9476. openUpdateSource(itemTaskIndex, i) {
  9477. this.sourceData = {};
  9478. let source =
  9479. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9480. .chapterData[i];
  9481. this.sourceData[source.id] = {};
  9482. this.sourceData[source.id].name = source.title;
  9483. this.sourceData[source.id].url = source.url;
  9484. this.dialogVisibleSource = true;
  9485. this.updateSourcePan = true;
  9486. this.taskCount = itemTaskIndex;
  9487. this.lineCount = i;
  9488. },
  9489. updateLine() {
  9490. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9491. this.taskCount
  9492. ].chapterData[this.lineCount].url = this.line;
  9493. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9494. this.taskCount
  9495. ].chapterData[this.lineCount].title = this.lineTitle;
  9496. this.dialogVisible7 = false;
  9497. },
  9498. addPP() {
  9499. this.dialogVisible3 = true;
  9500. },
  9501. goTo(path) {
  9502. this.$router.push(path);
  9503. },
  9504. openTools(itemTaskIndex, i, toolIndex) {
  9505. this.toolIndex = toolIndex;
  9506. this.taskCount = itemTaskIndex;
  9507. if (i == 4) {
  9508. if (toolIndex == null) {
  9509. var a =
  9510. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9511. .chapterData;
  9512. for (var i = 0; i < a.length; i++) {
  9513. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  9514. this.askJson =
  9515. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9516. itemTaskIndex
  9517. ].chapterData[i].askJson;
  9518. }
  9519. }
  9520. } else {
  9521. this.askJson = JSON.parse(
  9522. JSON.stringify(
  9523. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9524. itemTaskIndex
  9525. ].toolChoose[toolIndex]
  9526. )
  9527. );
  9528. }
  9529. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  9530. this.dialogVisible5 = true;
  9531. } else if (i == 45) {
  9532. if (
  9533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9534. .toolChoose[toolIndex].testJson
  9535. ) {
  9536. this.testJson = JSON.parse(
  9537. JSON.stringify(
  9538. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9539. itemTaskIndex
  9540. ].toolChoose[toolIndex].testJson
  9541. )
  9542. );
  9543. } else {
  9544. var testJson = {
  9545. testCount: 1,
  9546. testTitle: "",
  9547. testJson: [
  9548. {
  9549. teststitle: "",
  9550. testItem: 1,
  9551. checkList: [],
  9552. timuList: [],
  9553. answer: [],
  9554. type: "1",
  9555. },
  9556. ],
  9557. };
  9558. this.testJson = testJson;
  9559. }
  9560. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  9561. this.dialogVisibleChoice = true;
  9562. } else if (i == 47) {
  9563. if (
  9564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9565. .toolChoose[toolIndex].sentenceList
  9566. ) {
  9567. this.sentenceList = JSON.parse(
  9568. JSON.stringify(
  9569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9570. itemTaskIndex
  9571. ].toolChoose[toolIndex].sentenceList
  9572. )
  9573. );
  9574. } else {
  9575. var sentenceList = [
  9576. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  9577. ];
  9578. this.sentenceList = sentenceList;
  9579. }
  9580. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  9581. this.dialogVisibleSentence = true;
  9582. } else if (i == 48) {
  9583. if (
  9584. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9585. .toolChoose[toolIndex].tableJson
  9586. ) {
  9587. this.tableJson = JSON.parse(
  9588. JSON.stringify(
  9589. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9590. itemTaskIndex
  9591. ].toolChoose[toolIndex].tableJson
  9592. )
  9593. );
  9594. } else {
  9595. var tableJson = { text: "" };
  9596. this.tableJson = tableJson;
  9597. }
  9598. this.dialogVisibleTable = true;
  9599. } else if (i == 52) {
  9600. if (
  9601. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9602. .toolChoose[toolIndex].wordJson
  9603. ) {
  9604. this.wordJson = JSON.parse(
  9605. JSON.stringify(
  9606. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9607. itemTaskIndex
  9608. ].toolChoose[toolIndex].wordJson
  9609. )
  9610. );
  9611. } else {
  9612. var wordJson = { text: "" };
  9613. this.wordJson = wordJson;
  9614. }
  9615. this.dialogVisibleWord = true;
  9616. // else if (i == 50) {
  9617. // if (
  9618. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9619. // .toolChoose[toolIndex].uploadJson
  9620. // ) {
  9621. // this.uploadJson = JSON.parse(
  9622. // JSON.stringify(
  9623. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9624. // itemTaskIndex
  9625. // ].toolChoose[toolIndex].uploadJson
  9626. // )
  9627. // );
  9628. // } else {
  9629. // var uploadJson = [];
  9630. // this.uploadJson = uploadJson;
  9631. // }
  9632. // this.dialogVisibleMoreUpload = true;
  9633. // }
  9634. } else if (i == 10) {
  9635. if (
  9636. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9637. .toolChoose[toolIndex].preTime
  9638. ) {
  9639. this.preTime = JSON.parse(
  9640. JSON.stringify(
  9641. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9642. itemTaskIndex
  9643. ].toolChoose[toolIndex].preTime
  9644. )
  9645. );
  9646. } else {
  9647. var preTime = 0;
  9648. this.preTime = preTime;
  9649. }
  9650. this.dialogVisiblePreTime = true;
  9651. } else if (i == 49) {
  9652. if (
  9653. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9654. .toolChoose[toolIndex].groupJson
  9655. ) {
  9656. this.groupJson = JSON.parse(
  9657. JSON.stringify(
  9658. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9659. itemTaskIndex
  9660. ].toolChoose[toolIndex].groupJson
  9661. )
  9662. );
  9663. } else {
  9664. var groupJson = {
  9665. group: [{ name: "第1组" }],
  9666. number: undefined,
  9667. islock: 1,
  9668. };
  9669. this.groupJson = groupJson;
  9670. }
  9671. this.dialogVisibleGroup = true;
  9672. } else if (i == 62) {
  9673. if (
  9674. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9675. .toolChoose[toolIndex].videoJson
  9676. ) {
  9677. this.videoJson = JSON.parse(
  9678. JSON.stringify(
  9679. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9680. itemTaskIndex
  9681. ].toolChoose[toolIndex].videoJson
  9682. )
  9683. );
  9684. } else {
  9685. var videoJson = {
  9686. video: "",
  9687. setting: [],
  9688. };
  9689. this.videoJson = videoJson;
  9690. }
  9691. this.dialogVisibleVideo = true;
  9692. } else if (i == 15) {
  9693. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9694. itemTaskIndex
  9695. ].toolChoose[toolIndex].answerQ
  9696. ? JSON.parse(
  9697. JSON.stringify(
  9698. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9699. itemTaskIndex
  9700. ].toolChoose[toolIndex].answerQ
  9701. )
  9702. )
  9703. : "";
  9704. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  9705. this.dialogVisible8 = true;
  9706. } else if (i == 40) {
  9707. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9708. itemTaskIndex
  9709. ].toolChoose[toolIndex].rateJson
  9710. ? JSON.parse(
  9711. JSON.stringify(
  9712. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9713. itemTaskIndex
  9714. ].toolChoose[toolIndex].rateJson
  9715. )
  9716. )
  9717. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  9718. this.selectSteps = 1;
  9719. this.dialogVisibleRate = true;
  9720. } else if (i == 42) {
  9721. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9722. itemTaskIndex
  9723. ].toolChoose[toolIndex].answerQ
  9724. ? JSON.parse(
  9725. JSON.stringify(
  9726. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9727. itemTaskIndex
  9728. ].toolChoose[toolIndex].answerQ
  9729. )
  9730. )
  9731. : "";
  9732. this.dialogVisibleMp3 = true;
  9733. } else if (i == 41) {
  9734. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9735. itemTaskIndex
  9736. ].toolChoose[toolIndex].selectJson
  9737. ? JSON.parse(
  9738. JSON.stringify(
  9739. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9740. itemTaskIndex
  9741. ].toolChoose[toolIndex].selectJson
  9742. )
  9743. )
  9744. : { url: "", select: [], answer: [] };
  9745. this.selectSteps = 1;
  9746. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  9747. this.dialogVisibleSelect = true;
  9748. } else if (i == 3) {
  9749. top.postMessage(
  9750. {
  9751. tools: "3y",
  9752. cid: this.cid,
  9753. stage: this.unitIndex,
  9754. task: itemTaskIndex,
  9755. tool: toolIndex,
  9756. },
  9757. "*"
  9758. );
  9759. } else if (i == 1) {
  9760. top.postMessage(
  9761. {
  9762. tools: "1y",
  9763. cid: this.cid,
  9764. stage: this.unitIndex,
  9765. task: itemTaskIndex,
  9766. tool: toolIndex,
  9767. },
  9768. "*"
  9769. );
  9770. } else if (i == 57) {
  9771. top.postMessage(
  9772. {
  9773. tools: "57y",
  9774. cid: this.cid,
  9775. stage: this.unitIndex,
  9776. task: itemTaskIndex,
  9777. tool: toolIndex,
  9778. },
  9779. "*"
  9780. );
  9781. } else if (i == 69) {
  9782. this.englishList = {};
  9783. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  9784. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  9785. ? JSON.parse(
  9786. JSON.stringify(
  9787. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9788. itemTaskIndex
  9789. ].toolChoose[toolIndex].englishList
  9790. )
  9791. )
  9792. : {};
  9793. this.$forceUpdate();
  9794. this.englishDialogVisible = true;
  9795. } else if (i == 70) {
  9796. this.englishVoiceJson = {};
  9797. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  9798. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  9799. ? JSON.parse(
  9800. JSON.stringify(
  9801. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9802. itemTaskIndex
  9803. ].toolChoose[toolIndex].englishVoiceJson
  9804. )
  9805. )
  9806. : {
  9807. title: '',
  9808. detail: '',
  9809. array: []
  9810. };
  9811. // {
  9812. // time: "",
  9813. // class: "",
  9814. // difficulty: 0,
  9815. // topic: "",
  9816. // isShow: false,
  9817. // eva: 0,
  9818. // aiEva: {
  9819. // isAiEva: false,
  9820. // aiEvaChoose: [],
  9821. // },
  9822. // allfType: [],
  9823. // englishJson: {},
  9824. // };
  9825. this.$forceUpdate();
  9826. this.EnglishVoiceDialog = true;
  9827. }
  9828. },
  9829. setEnglishVoiceJson(val) {
  9830. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9831. this.taskCount
  9832. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  9833. JSON.stringify(val)
  9834. );
  9835. this.$forceUpdate();
  9836. if (
  9837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9838. .toolChoose[this.toolIndex].tool != 70
  9839. ) {
  9840. this.addTools(70, this.taskCount, this.toolIndex);
  9841. }
  9842. },
  9843. chapAddTools(i) {
  9844. if (this.chapTools[0].tools.length == 0) {
  9845. this.chapTools[0].tools.push(i);
  9846. } else {
  9847. if (this.chapTools[0].tools.indexOf(i) != -1) {
  9848. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  9849. } else {
  9850. this.chapTools[0].tools.push(i);
  9851. }
  9852. }
  9853. this.$forceUpdate();
  9854. },
  9855. addChaptersDataTools() {
  9856. if (this.chapTools[0].tools.indexOf(4) != -1) {
  9857. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9858. this.chapCount
  9859. ].chapterData.push({
  9860. name: this.chapTools[0].toolDetail,
  9861. url: this.chapTools[0].tools,
  9862. type: 7,
  9863. askJson: this.askJson,
  9864. });
  9865. } else {
  9866. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9867. this.chapCount
  9868. ].chapterData.push({
  9869. name: this.chapTools[0].toolDetail,
  9870. url: this.chapTools[0].tools,
  9871. type: 7,
  9872. });
  9873. }
  9874. this.imgChange1(null, null, 7, this.chapCount);
  9875. this.dialogVisible4 = false;
  9876. },
  9877. addTools(i, itemTaskIndex, toolIndex) {
  9878. // if (
  9879. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9880. // .toolChoose[toolIndex].tool.length == 0
  9881. // ) {
  9882. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9883. // itemTaskIndex
  9884. // ].toolChoose[toolIndex].tool.push(i);
  9885. // } else {
  9886. // if (
  9887. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9888. // itemTaskIndex
  9889. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  9890. // ) {
  9891. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9892. // itemTaskIndex
  9893. // ].toolChoose[toolIndex].tool.splice(
  9894. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9895. // itemTaskIndex
  9896. // ].toolChoose[toolIndex].tool.indexOf(i),
  9897. // 1
  9898. // );
  9899. // } else {
  9900. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9901. // itemTaskIndex
  9902. // ].toolChoose[toolIndex].tool.push(i);
  9903. // }
  9904. // console.log(
  9905. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9906. // .toolChoose[toolIndex].tool
  9907. // );
  9908. // }
  9909. if (i == 4) {
  9910. if (
  9911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9912. .toolChoose[toolIndex].askJson.askTitle == "" ||
  9913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9914. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  9915. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9916. .toolChoose[toolIndex].askJson[0].checkList < 2
  9917. ) {
  9918. this.openTools(itemTaskIndex, 4, toolIndex);
  9919. // this.$message({
  9920. // message: "请填写完整问卷内容",
  9921. // type: "error",
  9922. // });
  9923. return;
  9924. }
  9925. }
  9926. if (i == 45) {
  9927. if (
  9928. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9929. .toolChoose[toolIndex].testJson ||
  9930. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9931. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  9932. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9933. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  9934. ) {
  9935. this.openTools(itemTaskIndex, 45, toolIndex);
  9936. // this.$message({
  9937. // message: "请填写完整问卷内容",
  9938. // type: "error",
  9939. // });
  9940. return;
  9941. }
  9942. }
  9943. if (i == 47) {
  9944. if (
  9945. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9946. .toolChoose[toolIndex].sentenceList ||
  9947. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9948. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  9949. ) {
  9950. this.openTools(itemTaskIndex, 47, toolIndex);
  9951. return;
  9952. }
  9953. }
  9954. if (i == 69) {
  9955. if (
  9956. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9957. .toolChoose[toolIndex].englishList
  9958. ) {
  9959. this.openTools(itemTaskIndex, 69, toolIndex);
  9960. return;
  9961. }
  9962. }
  9963. if (i == 70) {
  9964. if (
  9965. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9966. .toolChoose[toolIndex].englishVoiceJson
  9967. ) {
  9968. this.openTools(itemTaskIndex, 70, toolIndex);
  9969. return;
  9970. }
  9971. }
  9972. // if (i == 48) {
  9973. // if (
  9974. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9975. // .toolChoose[toolIndex].tableJson
  9976. // ) {
  9977. // this.openTools(itemTaskIndex, 48, toolIndex);
  9978. // return;
  9979. // }
  9980. // }
  9981. // if (i == 50) {
  9982. // if (
  9983. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9984. // .toolChoose[toolIndex].uploadJson
  9985. // ) {
  9986. // this.openTools(itemTaskIndex, 50, toolIndex);
  9987. // return;
  9988. // }
  9989. // }
  9990. if (i == 49) {
  9991. if (
  9992. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9993. .toolChoose[toolIndex].groupJson
  9994. ) {
  9995. this.openTools(itemTaskIndex, 49, toolIndex);
  9996. return;
  9997. }
  9998. }
  9999. if (i == 62) {
  10000. if (
  10001. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10002. .toolChoose[toolIndex].videoJson
  10003. ) {
  10004. this.openTools(itemTaskIndex, 62, toolIndex);
  10005. return;
  10006. }
  10007. }
  10008. if (i == 15) {
  10009. if (
  10010. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10011. .toolChoose[toolIndex].answerQ ||
  10012. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10013. .toolChoose[toolIndex].answerQ == ""
  10014. ) {
  10015. this.openTools(itemTaskIndex, 15, toolIndex);
  10016. // this.$message({
  10017. // message: "请填写问答内容",
  10018. // type: "error",
  10019. // });
  10020. return;
  10021. }
  10022. }
  10023. if (i == 40) {
  10024. if (
  10025. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10026. .toolChoose[toolIndex].rateJson ||
  10027. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10028. .toolChoose[toolIndex].rateJson.length
  10029. ) {
  10030. this.openTools(itemTaskIndex, 40, toolIndex);
  10031. return;
  10032. }
  10033. }
  10034. if (i == 41) {
  10035. if (
  10036. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10037. .toolChoose[toolIndex].selectJson ||
  10038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10039. .toolChoose[toolIndex].selectJson.url == "" ||
  10040. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10041. .toolChoose[toolIndex].selectJson.select.length ||
  10042. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10043. .toolChoose[toolIndex].selectJson.answer.length
  10044. ) {
  10045. this.openTools(itemTaskIndex, 41, toolIndex);
  10046. return;
  10047. }
  10048. }
  10049. if (i == 42) {
  10050. if (
  10051. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10052. .toolChoose[toolIndex].answerQ ||
  10053. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10054. .toolChoose[toolIndex].answerQ == ""
  10055. ) {
  10056. this.openTools(itemTaskIndex, 42, toolIndex);
  10057. return;
  10058. }
  10059. }
  10060. if (
  10061. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10062. .toolChoose[toolIndex].tool.length > 0
  10063. ) {
  10064. if (
  10065. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10066. itemTaskIndex
  10067. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  10068. ) {
  10069. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10070. itemTaskIndex
  10071. ].toolChoose[toolIndex].tool.splice(
  10072. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10073. itemTaskIndex
  10074. ].toolChoose[toolIndex].tool.indexOf(i),
  10075. 1
  10076. );
  10077. } else {
  10078. // this.$message({
  10079. // message: "每个工具只能添加一个",
  10080. // type: "error",
  10081. // });
  10082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10083. itemTaskIndex
  10084. ].toolChoose[toolIndex].tool = [];
  10085. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10086. itemTaskIndex
  10087. ].toolChoose[toolIndex].tool.push(i);
  10088. }
  10089. } else {
  10090. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10091. itemTaskIndex
  10092. ].toolChoose[toolIndex].tool.push(i);
  10093. }
  10094. this.$forceUpdate();
  10095. },
  10096. addAskList(index) {
  10097. this.askJson.askJson.splice(index + 1, 0, {
  10098. askstitle: "",
  10099. askItem: 1,
  10100. checkList: [],
  10101. });
  10102. this.askJson.askCount++;
  10103. },
  10104. addTestList(index) {
  10105. this.testJson.testJson.splice(index + 1, 0, {
  10106. teststitle: "",
  10107. testItem: 1,
  10108. checkList: [],
  10109. timuList: [],
  10110. answer: [],
  10111. type: "1",
  10112. });
  10113. this.testJson.testCount++;
  10114. },
  10115. deleteAskList(index) {
  10116. if (
  10117. !this.askJson.askJson[index].askstitle &&
  10118. this.askJson.askJson[index].askItem == 1 &&
  10119. !this.askJson.askJson[index].checkList[0]
  10120. ) {
  10121. this.askJson.askJson.splice(index, 1);
  10122. this.askJson.askCount--;
  10123. } else {
  10124. let _this = this;
  10125. _this
  10126. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10127. confirmButtonText: "确定",
  10128. cancelButtonText: "取消",
  10129. type: "warning",
  10130. })
  10131. .then(() => {
  10132. _this.askJson.askJson.splice(index, 1);
  10133. _this.askJson.askCount--;
  10134. })
  10135. .catch(() => {
  10136. return;
  10137. });
  10138. }
  10139. },
  10140. deleteTestList(index) {
  10141. if (
  10142. !this.testJson.testJson[index].teststitle &&
  10143. this.testJson.testJson[index].testItem == 1 &&
  10144. !this.testJson.testJson[index].checkList[0]
  10145. ) {
  10146. this.testJson.testJson.splice(index, 1);
  10147. this.testJson.testCount--;
  10148. } else {
  10149. let _this = this;
  10150. _this
  10151. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10152. confirmButtonText: "确定",
  10153. cancelButtonText: "取消",
  10154. type: "warning",
  10155. })
  10156. .then(() => {
  10157. _this.testJson.testJson.splice(index, 1);
  10158. _this.testJson.testCount--;
  10159. })
  10160. .catch(() => {
  10161. return;
  10162. });
  10163. }
  10164. },
  10165. askMove(type, index) {
  10166. if (type == 1) {
  10167. if (index > 0) {
  10168. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  10169. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10170. this.askJson.askJson[index - 1] = b;
  10171. this.askJson.askJson[index] = a;
  10172. }
  10173. } else {
  10174. if (index < this.askJson.askJson.length - 1) {
  10175. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  10176. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10177. this.askJson.askJson[index + 1] = b;
  10178. this.askJson.askJson[index] = a;
  10179. }
  10180. }
  10181. this.$forceUpdate();
  10182. },
  10183. checkMove(type, index, checkIndex) {
  10184. if (type == 1) {
  10185. if (checkIndex > 0) {
  10186. let a = JSON.parse(
  10187. JSON.stringify(
  10188. this.askJson.askJson[index].checkList[checkIndex - 1]
  10189. )
  10190. );
  10191. let b = JSON.parse(
  10192. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10193. );
  10194. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  10195. this.askJson.askJson[index].checkList[checkIndex] = a;
  10196. }
  10197. } else {
  10198. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  10199. let a = JSON.parse(
  10200. JSON.stringify(
  10201. this.askJson.askJson[index].checkList[checkIndex + 1]
  10202. )
  10203. );
  10204. let b = JSON.parse(
  10205. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10206. );
  10207. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  10208. this.askJson.askJson[index].checkList[checkIndex] = a;
  10209. }
  10210. }
  10211. this.$forceUpdate();
  10212. },
  10213. testMove(type, index) {
  10214. if (type == 1) {
  10215. if (index > 0) {
  10216. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  10217. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10218. this.testJson.testJson[index - 1] = b;
  10219. this.testJson.testJson[index] = a;
  10220. }
  10221. } else {
  10222. if (index < this.testJson.testJson.length - 1) {
  10223. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  10224. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10225. this.testJson.testJson[index + 1] = b;
  10226. this.testJson.testJson[index] = a;
  10227. }
  10228. }
  10229. this.$forceUpdate();
  10230. },
  10231. tcheckMove(type, index, checkIndex) {
  10232. if (type == 1) {
  10233. if (checkIndex > 0) {
  10234. let a = JSON.parse(
  10235. JSON.stringify(
  10236. this.testJson.testJson[index].checkList[checkIndex - 1]
  10237. )
  10238. );
  10239. let b = JSON.parse(
  10240. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10241. );
  10242. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  10243. this.testJson.testJson[index].checkList[checkIndex] = a;
  10244. }
  10245. } else {
  10246. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  10247. let a = JSON.parse(
  10248. JSON.stringify(
  10249. this.testJson.testJson[index].checkList[checkIndex + 1]
  10250. )
  10251. );
  10252. let b = JSON.parse(
  10253. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10254. );
  10255. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  10256. this.testJson.testJson[index].checkList[checkIndex] = a;
  10257. }
  10258. }
  10259. this.$forceUpdate();
  10260. },
  10261. addcheckList(json, index) {
  10262. // json.checkList.length++;
  10263. json.checkList.splice(index + 1, 0, "");
  10264. json.askItem++;
  10265. this.$forceUpdate();
  10266. },
  10267. deletecheckList(json, index) {
  10268. // json.checkList.length--;
  10269. json.checkList.splice(index, 1);
  10270. json.askItem--;
  10271. this.$forceUpdate();
  10272. },
  10273. addTcheckList(json, index) {
  10274. // json.checkList.length++;
  10275. json.checkList.splice(index + 1, 0, "");
  10276. json.testItem++;
  10277. this.$forceUpdate();
  10278. },
  10279. deleteTcheckList(json, index) {
  10280. // json.checkList.length--;
  10281. json.checkList.splice(index, 1);
  10282. json.testItem--;
  10283. this.$forceUpdate();
  10284. },
  10285. checkTestType(type, json) {
  10286. json.type = type;
  10287. setTimeout(() => {
  10288. json.answer = [];
  10289. }, 100);
  10290. },
  10291. checkAskType(type, json) {
  10292. json.type = type;
  10293. // json.checkList = [];
  10294. this.$forceUpdate();
  10295. },
  10296. addSelectList(json) {
  10297. json.select.push("");
  10298. json.answer.push("");
  10299. },
  10300. deleteSelectList(json) {
  10301. // json.select.length--;
  10302. // json.answer.length--;
  10303. json.select.splice(json.select.length - 1, 1);
  10304. json.answer.splice(json.answer.length - 1, 1);
  10305. },
  10306. addAsk() {
  10307. if (this.askJson.askTitle === "") {
  10308. this.$message.error("标题不能为空!");
  10309. return;
  10310. }
  10311. var aj = this.askJson.askJson;
  10312. var b = 1;
  10313. for (var i = 0; i < aj.length; i++) {
  10314. if (aj[i].askstitle === "") {
  10315. var a = 1;
  10316. for (let index = 0; index < aj[i].askItem; index++) {
  10317. const element = aj[i].checkList[index]
  10318. ? aj[i].checkList[index]
  10319. : "";
  10320. if (element != "") {
  10321. b++;
  10322. this.$message.error(`请将题目${i + 1}填写完整。`);
  10323. return;
  10324. } else {
  10325. a++;
  10326. }
  10327. }
  10328. if (b == 1) {
  10329. this.$message.error("至少填写一个问题");
  10330. return;
  10331. }
  10332. } else if (aj[i].askstitle != "") {
  10333. for (let index = 0; index < aj[i].askItem; index++) {
  10334. const element = aj[i].checkList[index]
  10335. ? aj[i].checkList[index]
  10336. : "";
  10337. var index = 0;
  10338. for (var z = 0; z < aj[i].checkList.length; z++) {
  10339. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  10340. if (checkC != "") {
  10341. index++;
  10342. } else {
  10343. this.$message.error(`题目${i + 1}选项不能为空!`);
  10344. return;
  10345. }
  10346. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  10347. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  10348. if (checkC == checkC2) {
  10349. this.$message.error(
  10350. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10351. );
  10352. return;
  10353. }
  10354. }
  10355. }
  10356. b++;
  10357. if (index < 2) {
  10358. this.$message.error("每道题目至少需要设置2个选项。");
  10359. return;
  10360. }
  10361. }
  10362. }
  10363. }
  10364. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  10365. var elc = el.checkList.filter((element) => {
  10366. return element != "";
  10367. });
  10368. return el.askstitle != "" && elc.length != 0;
  10369. });
  10370. if (!this.dialogVisible4) {
  10371. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10372. this.taskCount
  10373. ].toolChoose[this.toolIndex] = this.askJson;
  10374. }
  10375. this.dialogVisible5 = false;
  10376. if (
  10377. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10378. .toolChoose[this.toolIndex].tool != 4
  10379. ) {
  10380. this.addTools(4, this.taskCount, this.toolIndex);
  10381. }
  10382. },
  10383. addTest() {
  10384. // if (this.testJson.testTitle === "") {
  10385. // this.$message.error("标题不能为空!");
  10386. // return;
  10387. // }
  10388. var aj = this.testJson.testJson;
  10389. var b = 1;
  10390. for (var i = 0; i < aj.length; i++) {
  10391. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  10392. var a = 1;
  10393. for (let index = 0; index < aj[i].testItem; index++) {
  10394. const element = aj[i].checkList[index]
  10395. ? aj[i].checkList[index]
  10396. : "";
  10397. if (element != "") {
  10398. b++;
  10399. this.$message.error(`请将题目${i + 1}填写完整。`);
  10400. return;
  10401. } else {
  10402. a++;
  10403. }
  10404. }
  10405. if (b == 1) {
  10406. this.$message.error("至少填写一个问题");
  10407. return;
  10408. }
  10409. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  10410. for (let index = 0; index < aj[i].testItem; index++) {
  10411. const element = aj[i].checkList[index]
  10412. ? aj[i].checkList[index]
  10413. : "";
  10414. var index = 0;
  10415. for (var z = 0; z < aj[i].checkList.length; z++) {
  10416. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  10417. if (checkC != "") {
  10418. index++;
  10419. } else {
  10420. this.$message.error(`题目${i + 1}选项不能为空!`);
  10421. return;
  10422. }
  10423. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  10424. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  10425. if (checkC == checkC2) {
  10426. this.$message.error(
  10427. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10428. );
  10429. return;
  10430. }
  10431. }
  10432. }
  10433. b++;
  10434. if (index < 2) {
  10435. this.$message.error("每道题目至少需要设置2个选项。");
  10436. return;
  10437. }
  10438. if (
  10439. (aj[i].type == "2" && !aj[i].answer.length) ||
  10440. (aj[i].type == "1" &&
  10441. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  10442. (aj[i].answer !== 0 && !aj[i].answer)))
  10443. ) {
  10444. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  10445. return;
  10446. }
  10447. }
  10448. }
  10449. }
  10450. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  10451. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  10452. var elc = el.checkList.filter((element) => {
  10453. return element != "";
  10454. });
  10455. return (
  10456. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  10457. );
  10458. });
  10459. isTestJson.testCount = isTestJson.testJson.length;
  10460. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10461. this.taskCount
  10462. ].toolChoose[this.toolIndex].testJson = isTestJson;
  10463. this.dialogVisibleChoice = false;
  10464. if (
  10465. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10466. .toolChoose[this.toolIndex].tool != 45
  10467. ) {
  10468. this.addTools(45, this.taskCount, this.toolIndex);
  10469. }
  10470. },
  10471. addVideoJson(videoJson) {
  10472. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10473. this.taskCount
  10474. ].toolChoose[this.toolIndex].videoJson = videoJson;
  10475. this.dialogVisibleVideo = false;
  10476. if (
  10477. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10478. .toolChoose[this.toolIndex].tool != 62
  10479. ) {
  10480. this.addTools(62, this.taskCount, this.toolIndex);
  10481. }
  10482. },
  10483. //自动获取剪贴板
  10484. pasteOption() {
  10485. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10486. if (!iframe) {
  10487. this.$message.error("请使用AI共创生成题目");
  10488. return;
  10489. }
  10490. let copyData = iframe.contentWindow.copyData;
  10491. if (!copyData || !copyData.selectData.length) {
  10492. this.$message.error("请使用AI共创生成题目");
  10493. return;
  10494. }
  10495. let selectData = copyData.selectData;
  10496. for (var i = 0; i < selectData.length; i++) {
  10497. let answer = 0;
  10498. switch (selectData[i].answer[0]) {
  10499. case "A":
  10500. answer = 0;
  10501. break;
  10502. case "B":
  10503. answer = 1;
  10504. break;
  10505. case "C":
  10506. answer = 2;
  10507. break;
  10508. case "D":
  10509. answer = 3;
  10510. break;
  10511. case "E":
  10512. answer = 4;
  10513. break;
  10514. default:
  10515. break;
  10516. }
  10517. this.testJson.testJson.push({
  10518. teststitle: selectData[i].subject,
  10519. testItem: selectData[i].options.length,
  10520. checkList: selectData[i].options,
  10521. timuList: [],
  10522. answer: answer,
  10523. type: "1",
  10524. });
  10525. this.testJson.testCount++;
  10526. }
  10527. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  10528. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  10529. var elc = el.checkList.filter((element) => {
  10530. return element != "";
  10531. });
  10532. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  10533. });
  10534. isTestJson.testCount = isTestJson.testJson.length;
  10535. if (!isTestJson.testCount) {
  10536. return;
  10537. }
  10538. this.testJson = isTestJson;
  10539. this.$forceUpdate();
  10540. },
  10541. pasteTask(taskJson) {
  10542. let stageTasksData = [];
  10543. if (taskJson) {
  10544. stageTasksData = taskJson;
  10545. } else {
  10546. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10547. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10548. if (!iframe && !iframe2) {
  10549. this.$message.error("请使用AI共创生成");
  10550. return;
  10551. }
  10552. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10553. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10554. if (
  10555. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  10556. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  10557. ) {
  10558. this.$message.error("请使用AI共创生成");
  10559. return;
  10560. }
  10561. stageTasksData = copyData
  10562. ? copyData.tasksData
  10563. : copyData2
  10564. ? copyData2.tasksData
  10565. : [{ taskName: "", taskDecs: "" }];
  10566. }
  10567. let taskA = [];
  10568. let tasks = stageTasksData;
  10569. for (var j = 0; j < tasks.length; j++) {
  10570. taskA.push({
  10571. task: tasks[j].taskName,
  10572. taskDetail: tasks[j].taskDecs,
  10573. chapterData: [],
  10574. toolText: "",
  10575. toolChoose: [
  10576. {
  10577. tool: [],
  10578. toolDetail: "",
  10579. toolType: 0,
  10580. askCount: 1,
  10581. askTitle: "",
  10582. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10583. },
  10584. ],
  10585. isShowTools: false,
  10586. askCount: 1,
  10587. isFold: 1,
  10588. askTitle: "",
  10589. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10590. checkJson: [{ checkCount: [], checkPerent: [] }],
  10591. homeworkList: [],
  10592. });
  10593. }
  10594. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  10595. this.$forceUpdate();
  10596. },
  10597. pasteStage(stageJson) {
  10598. let stageData = [];
  10599. if (stageJson) {
  10600. stageData = stageJson;
  10601. } else {
  10602. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10603. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10604. if (!iframe && !iframe2) {
  10605. this.$message.error("请使用AI共创生成");
  10606. return;
  10607. }
  10608. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10609. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10610. if (
  10611. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  10612. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  10613. ) {
  10614. this.$message.error("请使用AI共创生成");
  10615. return;
  10616. }
  10617. stageData = copyData
  10618. ? copyData.stageData
  10619. : copyData2
  10620. ? copyData2.stageData
  10621. : [""];
  10622. }
  10623. let stage = [];
  10624. for (var i = 0; i < stageData.length; i++) {
  10625. stage.push({
  10626. dyName: stageData[i], //单元标题
  10627. chapterInfo: [
  10628. {
  10629. isread: false,
  10630. chapterid: this.guid(),
  10631. title: "",
  10632. courseName: "",
  10633. taskJson: [
  10634. {
  10635. task: "",
  10636. taskDetail: "",
  10637. chapterData: [],
  10638. toolText: "",
  10639. toolChoose: [
  10640. {
  10641. tool: [],
  10642. toolDetail: "",
  10643. toolType: 0,
  10644. askCount: 1,
  10645. askTitle: "",
  10646. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10647. },
  10648. ],
  10649. isShowTools: false,
  10650. askCount: 1,
  10651. isFold: 1,
  10652. askTitle: "",
  10653. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10654. checkJson: [{ checkCount: [], checkPerent: [] }],
  10655. homeworkList: [],
  10656. },
  10657. ],
  10658. itemCount: 1,
  10659. fileList1: [],
  10660. video: [],
  10661. testData: [],
  10662. pData: [],
  10663. templateArray: [],
  10664. },
  10665. ],
  10666. });
  10667. }
  10668. let _this = this;
  10669. if (stageJson) {
  10670. if (!_this.cid) {
  10671. _this.unitJson = stage;
  10672. } else {
  10673. _this.unitIndex = 0;
  10674. _this.unitJson = stage;
  10675. _this.updateWork();
  10676. }
  10677. } else {
  10678. _this
  10679. .$confirm(
  10680. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  10681. "提示",
  10682. {
  10683. confirmButtonText: "确定",
  10684. cancelButtonText: "取消",
  10685. type: "warning",
  10686. }
  10687. )
  10688. .then(() => {
  10689. _this.unitIndex = 0;
  10690. _this.unitJson = stage;
  10691. // _this.steps++;
  10692. _this.updateWork();
  10693. })
  10694. .catch(() => {
  10695. return;
  10696. });
  10697. }
  10698. },
  10699. openStageBox() {
  10700. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  10701. this.dialogVisibleStageChange = true;
  10702. },
  10703. updateChange() {
  10704. this.$confirm(
  10705. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  10706. "提示",
  10707. {
  10708. confirmButtonText: "确定",
  10709. cancelButtonText: "取消",
  10710. type: "warning",
  10711. }
  10712. )
  10713. .then(() => {
  10714. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  10715. this.updateWork();
  10716. this.dialogVisibleStageChange = false;
  10717. })
  10718. .catch(() => {
  10719. return;
  10720. });
  10721. },
  10722. addAnswer() {
  10723. if (this.answerQ == "") {
  10724. this.$message.error("请输入您想要问的问题");
  10725. return;
  10726. }
  10727. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10728. this.taskCount
  10729. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  10730. this.dialogVisible8 = false;
  10731. if (
  10732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10733. .toolChoose[this.toolIndex].tool != 15
  10734. ) {
  10735. this.addTools(15, this.taskCount, this.toolIndex);
  10736. }
  10737. },
  10738. addMp3Answer() {
  10739. if (this.answerQ == "") {
  10740. this.$message.error("请输入您想要回答的问题");
  10741. return;
  10742. }
  10743. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10744. this.taskCount
  10745. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  10746. this.dialogVisibleMp3 = false;
  10747. },
  10748. addRateAnswer() {
  10749. var a = 1;
  10750. for (var i = 0; i < this.rateJson.length; i++) {
  10751. if (this.rateJson[i].value == "") {
  10752. a = 2;
  10753. break;
  10754. }
  10755. }
  10756. if (a == 2) {
  10757. this.$message.error("请把评价信息填写完整");
  10758. return;
  10759. }
  10760. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10761. this.taskCount
  10762. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  10763. this.dialogVisibleRate = false;
  10764. if (
  10765. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10766. .toolChoose[this.toolIndex].tool != 40
  10767. ) {
  10768. this.addTools(40, this.taskCount, this.toolIndex);
  10769. }
  10770. },
  10771. addSelectAnswer() {
  10772. if (this.selectJson.url == "") {
  10773. this.$message.error("请上传题目");
  10774. return;
  10775. }
  10776. if (!this.selectJson.select.length) {
  10777. this.$message.error("请添加选项");
  10778. return;
  10779. }
  10780. if (!this.selectJson.answer.length) {
  10781. this.$message.error("请设置答案");
  10782. return;
  10783. }
  10784. var a = 1;
  10785. for (var i = 0; i < this.selectJson.answer.length; i++) {
  10786. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  10787. a = 2;
  10788. }
  10789. }
  10790. if (a == 2) {
  10791. this.$message.error("请设置答案");
  10792. return;
  10793. }
  10794. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10795. this.taskCount
  10796. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  10797. this.dialogVisibleSelect = false;
  10798. if (
  10799. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10800. .toolChoose[this.toolIndex].tool != 41
  10801. ) {
  10802. this.addTools(41, this.taskCount, this.toolIndex);
  10803. }
  10804. },
  10805. nextSelectSteps() {
  10806. if (this.selectJson.url == "") {
  10807. this.$message.error("请上传题目");
  10808. return;
  10809. }
  10810. if (!this.selectJson.select.length) {
  10811. this.$message.error("请添加选项");
  10812. return;
  10813. } else {
  10814. for (var z = 0; z < this.selectJson.select.length; z++) {
  10815. let checkC = this.selectJson.select[z];
  10816. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  10817. let checkC2 = this.selectJson.select[z2];
  10818. if (checkC == checkC2) {
  10819. this.$message.error(
  10820. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10821. );
  10822. return;
  10823. }
  10824. }
  10825. }
  10826. }
  10827. var a = 1;
  10828. for (var i = 0; i < this.selectJson.select.length; i++) {
  10829. if (!this.selectJson.select[i]) {
  10830. a = 2;
  10831. }
  10832. }
  10833. if (a == 2) {
  10834. this.$message.error("添加的选项不能为空");
  10835. return;
  10836. }
  10837. this.selectSteps++;
  10838. },
  10839. selectCourseDetail() {
  10840. if (this.cid == "" || this.cid == undefined) {
  10841. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  10842. this.isTeacherSee = true;
  10843. }
  10844. console.log("这是新增课程");
  10845. this.selectAllType();
  10846. } else {
  10847. this.isOutline = true
  10848. this.isOutline2 = true
  10849. this.cpoteType = 4
  10850. this.cidType = 1;
  10851. let params = {
  10852. cid: this.cid,
  10853. };
  10854. this.ajax
  10855. .get(this.$store.state.api + "select_course_detail", params)
  10856. .then((res) => {
  10857. this.unitJson = JSON.parse(res.data[0][0].chapters);
  10858. this.courseState = res.data[0][0].state;
  10859. for (var j = 0; j < this.unitJson.length; j++) {
  10860. for (
  10861. var k = 0;
  10862. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  10863. k++
  10864. ) {
  10865. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  10866. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  10867. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  10868. : [];
  10869. let _chapterData = [];
  10870. for (
  10871. var c = 0;
  10872. c <
  10873. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  10874. .length;
  10875. c++
  10876. ) {
  10877. if (
  10878. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  10879. ) {
  10880. _chapterData.push(
  10881. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  10882. );
  10883. }
  10884. }
  10885. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  10886. _chapterData;
  10887. }
  10888. }
  10889. this.$forceUpdate();
  10890. this.courseName = res.data[0][0].title;
  10891. this.courseText = res.data[0][0].brief;
  10892. this.courseText2 = res.data[0][0].reBrief;
  10893. this.evalua = res.data[0][0].evaId;
  10894. this.cover = JSON.parse(res.data[0][0].cover);
  10895. this.noneBtnImg = this.cover.length >= 1;
  10896. if (res.data[0][0].refile) {
  10897. this.infoData = JSON.parse(res.data[0][0].refile)
  10898. }
  10899. // this.checkboxList =
  10900. // res.data[0][0].course_student.length > 0
  10901. // ? JSON.parse(res.data[0][0].course_student)
  10902. // : [];
  10903. this.checkboxList2 = res.data[0][0].juri
  10904. ? res.data[0][0].juri.split(",")
  10905. : [];
  10906. this.inviteCode = [];
  10907. for (var i = 0; i < res.data[2].length; i++) {
  10908. this.inviteCode.push({
  10909. cid: res.data[2][i].classid,
  10910. ic: res.data[2][i].code,
  10911. });
  10912. }
  10913. this.checkboxList3 = res.data[0][0].course_teacher
  10914. ? res.data[0][0].course_teacher.split(",")
  10915. : [];
  10916. // this.isTeacherSee =
  10917. // res.data[0][0].is_teacher_look == 0 ? true : false;
  10918. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  10919. this.myWord = res.data[0][0].template;
  10920. this.templateC.id = "123";
  10921. this.courseUserid = res.data[0][0].userid;
  10922. // if(this.courseUserid == this.userid){
  10923. // this.InviteChange(this.checkboxList2)
  10924. // }
  10925. this.nbOrder = res.data[0][0].ordernumber;
  10926. this.courseTypeId = [];
  10927. for (var i = 0; i < res.data[1].length; i++) {
  10928. this.courseTypeId.push(res.data[1][i].typeid);
  10929. }
  10930. console.log(this.courseTypeId);
  10931. // if (this.timer) clearInterval(this.timer);
  10932. if (this.timer) clearTimeout(this.timer);
  10933. this.timer = null;
  10934. // this.timer = setInterval(() => {
  10935. if(res.data[3].length){
  10936. try {
  10937. this.aiJson = JSON.parse(res.data[3][0].tips);
  10938. this.templateid = res.data[3][0].template;
  10939. }catch(error){
  10940. console.error(error)
  10941. }
  10942. }
  10943. if(res.data[0][0].cpote){
  10944. try {
  10945. this.cpote = JSON.parse(res.data[0][0].cpote);
  10946. }catch(error){
  10947. console.error(error)
  10948. }
  10949. }
  10950. if(res.data[0][0].setting){
  10951. try {
  10952. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie;
  10953. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime;
  10954. }catch(error){
  10955. console.error(error)
  10956. }
  10957. }
  10958. this.isFileSearch = res.data[0][0].iresearch == 1
  10959. this.seleteCourseUpdate();
  10960. this.setMan();
  10961. this.selectAllType();
  10962. this.unitJson[
  10963. this.unitIndex
  10964. ].chapterInfo[0].taskJson[0].toolOpen = true;
  10965. // }, 5000);
  10966. this.$forceUpdate();
  10967. setTimeout(() => {
  10968. this.checkEva(this.evalua);
  10969. setTimeout(() => {
  10970. this.checkEva(this.evalua);
  10971. }, 100);
  10972. }, 100);
  10973. })
  10974. .catch((err) => {
  10975. console.error(err);
  10976. });
  10977. }
  10978. if(this.aiId){
  10979. let params = {
  10980. cid: this.aiId,
  10981. };
  10982. this.ajax
  10983. .get(this.$store.state.api + "select_course_detail", params)
  10984. .then((res) => {
  10985. let _unitJson = JSON.parse(res.data[0][0].chapters);
  10986. let fileInfo = []
  10987. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10988. for(var i = 0; i < _unitJson.length; i++){
  10989. let tasks = _unitJson[i].chapterInfo[0].taskJson
  10990. for(var j = 0; j < tasks.length; j++){
  10991. let _infoData = tasks[j].chapterData.filter(el => {
  10992. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  10993. })
  10994. if(_infoData.length){
  10995. fileInfo = [...fileInfo, ..._infoData]
  10996. }
  10997. }
  10998. }
  10999. this.infoData = fileInfo
  11000. this.$forceUpdate();
  11001. this.courseName = res.data[0][0].title;
  11002. this.courseText = res.data[0][0].brief;
  11003. this.courseText2 = res.data[0][0].reBrief;
  11004. this.cover = JSON.parse(res.data[0][0].cover);
  11005. this.noneBtnImg = this.cover.length >= 1;
  11006. this.checkboxList2 = res.data[0][0].juri
  11007. ? res.data[0][0].juri.split(",")
  11008. : [];
  11009. this.inviteCode = [];
  11010. for (var i = 0; i < res.data[2].length; i++) {
  11011. this.inviteCode.push({
  11012. cid: res.data[2][i].classid,
  11013. ic: res.data[2][i].code,
  11014. });
  11015. }
  11016. this.checkboxList3 = res.data[0][0].course_teacher
  11017. ? res.data[0][0].course_teacher.split(",")
  11018. : [];
  11019. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  11020. this.myWord = res.data[0][0].template;
  11021. this.templateC.id = "123";
  11022. this.courseTypeId = [];
  11023. for (var i = 0; i < res.data[1].length; i++) {
  11024. this.courseTypeId.push(res.data[1][i].typeid);
  11025. }
  11026. console.log(this.courseTypeId);
  11027. this.setMan();
  11028. this.unitJson[
  11029. this.unitIndex
  11030. ].chapterInfo[0].taskJson[0].toolOpen = true;
  11031. this.$forceUpdate();
  11032. setTimeout(() => {
  11033. this.checkEva(this.evalua);
  11034. setTimeout(() => {
  11035. this.checkEva(this.evalua);
  11036. }, 100);
  11037. }, 100);
  11038. })
  11039. .catch((err) => {
  11040. console.error(err);
  11041. });
  11042. }
  11043. // if(this.cidType != 1 && this.templateid == ''){
  11044. // this.promptShow = true
  11045. // }
  11046. },
  11047. seleteCourseUpdate() {
  11048. let params = {
  11049. cid: this.cid,
  11050. };
  11051. this.ajax
  11052. .get(this.$store.state.api + "select_course_detail", params)
  11053. .then((res) => {
  11054. // console.log(this.unitJson);
  11055. let unitJson = JSON.parse(res.data[0][0].chapters);
  11056. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  11057. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  11058. let _unitJson = [];
  11059. let _chapAarry = [];
  11060. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  11061. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  11062. let index = 1;
  11063. let chapindex;
  11064. if (_unitJson2.length > unitJson.length) {
  11065. for (let c = 0; c < _unitJson2.length; c++) {
  11066. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  11067. }
  11068. for (let j = 0; j < unitJson.length; j++) {
  11069. let count = 0;
  11070. for (let k = 0; k < _unitJson2.length; k++) {
  11071. if (
  11072. unitJson[j].chapterInfo[0].chapterid ==
  11073. _unitJson2[k].chapterInfo[0].chapterid
  11074. ) {
  11075. count++;
  11076. _chapAarry.splice(
  11077. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11078. 1
  11079. );
  11080. _unitJson.push(unitJson[j]);
  11081. break;
  11082. }
  11083. }
  11084. // if(count === 0){
  11085. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11086. // }
  11087. }
  11088. for (let k = 0; k < _unitJson2.length; k++) {
  11089. if (_unitJson2[k].isUpdate == 1) {
  11090. _chapAarry.splice(
  11091. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11092. 1
  11093. );
  11094. _unitJson.push(_unitJson2[k]);
  11095. }
  11096. }
  11097. console.log(_chapAarry);
  11098. for (let d = 0; d < _unitJson2.length; d++) {
  11099. if (
  11100. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  11101. ) {
  11102. if (_unitIndex == d) {
  11103. index = 2;
  11104. }
  11105. chapindex = d;
  11106. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11107. }
  11108. }
  11109. } else {
  11110. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  11111. }
  11112. for (let i = 0; i < unitJson.length; i++) {
  11113. if (
  11114. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  11115. _unitJson[i].chapterInfo[0].chapterid !=
  11116. unitJson[i].chapterInfo[0].chapterid
  11117. ) {
  11118. if (i == _unitJson.length - 1) {
  11119. // this.unitIndex++
  11120. _unitIndex2++;
  11121. }
  11122. _unitJson.splice(i, 0, unitJson[i]);
  11123. } else if (i > _unitJson.length - 1) {
  11124. _unitJson.push(unitJson[i]);
  11125. } else if (
  11126. _unitJson[i].chapterInfo[0].chapterid ==
  11127. unitJson[i].chapterInfo[0].chapterid
  11128. ) {
  11129. _unitJson[i] = unitJson[i];
  11130. }
  11131. // if (i == _unitIndex) {
  11132. // continue;
  11133. // } else
  11134. }
  11135. if (_chapAarry.length && index != 2) {
  11136. if (chapindex < _unitIndex) {
  11137. this.isDelete = 2;
  11138. // this.unitIndex--;
  11139. _unitIndex2--;
  11140. } else if (
  11141. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  11142. _unitJson[_unitIndex].chapterInfo[0].chapterid
  11143. ) {
  11144. this.isDelete = 2;
  11145. for (let n = 0; n < _unitJson.length; n++) {
  11146. if (
  11147. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  11148. _unitJson[n].chapterInfo[0].chapterid
  11149. ) {
  11150. // this.unitIndex = n;
  11151. _unitIndex2 = n;
  11152. _unitJson[n] = _unitJson2[_unitIndex];
  11153. break;
  11154. }
  11155. }
  11156. }
  11157. } else if (index != 2) {
  11158. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  11159. _unitJson2[_unitIndex];
  11160. for (
  11161. var ci = 0;
  11162. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  11163. ci++
  11164. ) {
  11165. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  11166. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  11167. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11168. .toolChoose
  11169. : [];
  11170. let _chapterData = [];
  11171. for (
  11172. var c = 0;
  11173. c <
  11174. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  11175. .length;
  11176. c++
  11177. ) {
  11178. if (
  11179. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11180. .chapterData[c]
  11181. ) {
  11182. _chapterData.push(
  11183. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11184. .chapterData[c]
  11185. );
  11186. }
  11187. }
  11188. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  11189. _chapterData;
  11190. }
  11191. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  11192. }
  11193. if (index == 1) {
  11194. this.unitJson = _unitJson;
  11195. this.$forceUpdate();
  11196. setTimeout(() => {
  11197. if (this.unitIndex != _unitIndex2) {
  11198. this.isDelete = 2;
  11199. this.unitIndex = _unitIndex2;
  11200. }
  11201. }, 0);
  11202. this.timer = setTimeout(() => {
  11203. this.seleteCourseUpdate();
  11204. }, 1000);
  11205. } else if (index == 2) {
  11206. let _this = this;
  11207. _this
  11208. .$confirm(
  11209. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  11210. "提示",
  11211. {
  11212. confirmButtonText: "需要",
  11213. cancelButtonText: "取消",
  11214. type: "warning",
  11215. }
  11216. )
  11217. .then(() => {
  11218. if (_this.time()) {
  11219. _this.restoreWork(
  11220. _chapAarry[0],
  11221. _unitJson,
  11222. chapindex,
  11223. _unitJson2,
  11224. _unitIndex2
  11225. );
  11226. }
  11227. })
  11228. .catch(() => {
  11229. _this.unitJson = _unitJson;
  11230. _this.$forceUpdate();
  11231. setTimeout(() => {
  11232. if (this.unitIndex != _unitIndex2) {
  11233. this.isDelete = 2;
  11234. this.unitIndex = _unitIndex2;
  11235. }
  11236. }, 0);
  11237. _this.timer = setTimeout(() => {
  11238. _this.seleteCourseUpdate();
  11239. }, 1000);
  11240. });
  11241. }
  11242. // 在复制操作之前记录滚动位置
  11243. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  11244. // 执行复制操作
  11245. // 复制操作完成后恢复滚动位置
  11246. this.$nextTick(() => {
  11247. if (this.$refs.scrollContainer) {
  11248. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  11249. }
  11250. });
  11251. })
  11252. .catch((err) => {
  11253. console.error(err);
  11254. });
  11255. },
  11256. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  11257. let params = [
  11258. {
  11259. cid: this.cid,
  11260. chapters: JSON.stringify(this.unitJson),
  11261. uid: this.userid,
  11262. chapid: chapid,
  11263. },
  11264. ];
  11265. this.ajax
  11266. .post(this.$store.state.api + "restoreWork", params)
  11267. .then((res) => {
  11268. this.$message({
  11269. message: "恢复成功",
  11270. type: "success",
  11271. });
  11272. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  11273. this.unitJson = unitJson;
  11274. this.$forceUpdate();
  11275. setTimeout(() => {
  11276. if (this.unitIndex != unitIndex2) {
  11277. this.isDelete = 2;
  11278. this.unitIndex = unitIndex2;
  11279. }
  11280. }, 0);
  11281. this.timer = setTimeout(() => {
  11282. this.seleteCourseUpdate();
  11283. }, 1000);
  11284. })
  11285. .catch((err) => {
  11286. this.$message.error("网络不佳");
  11287. console.error(err);
  11288. });
  11289. },
  11290. getTypeName() {
  11291. console.log(this.courseTypeId);
  11292. this.$forceUpdate();
  11293. },
  11294. selectAllType() {
  11295. let params = {
  11296. org: this.org && this.org != "" ? this.org : "",
  11297. oid: this.oid && this.oid != "" ? this.oid : "",
  11298. };
  11299. this.ajax
  11300. .get(this.$store.state.api + "selectAllType", params)
  11301. .then((res) => {
  11302. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11303. res.data[0] = [...res.data[0], ...res.data[4]];
  11304. }
  11305. this.CourseType = res.data;
  11306. this.CourseType2 = [
  11307. { name: "智见课程", id: [] },
  11308. { name: "智行课程", id: [] },
  11309. { name: "智创课程", id: [] },
  11310. ];
  11311. for (var cti = 0; cti < res.data[0].length; cti++) {
  11312. if (
  11313. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11314. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  11315. ) {
  11316. this.CourseType2[0].id.push(res.data[0][cti].id);
  11317. } else if (
  11318. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  11319. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11320. ) {
  11321. this.CourseType2[1].id.push(res.data[0][cti].id);
  11322. } else if (
  11323. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11324. ) {
  11325. this.CourseType2[2].id.push(res.data[0][cti].id);
  11326. }
  11327. if (
  11328. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11329. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  11330. ) {
  11331. res.data[0][cti].name = "年级";
  11332. } else if (
  11333. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  11334. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11335. ) {
  11336. res.data[0][cti].name = "学科";
  11337. } else if (
  11338. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11339. ) {
  11340. res.data[0][cti].name = "主题";
  11341. }
  11342. }
  11343. let _courseTypeId = [];
  11344. for (var i = 0; i < res.data[0].length; i++) {
  11345. if (!this.cid) {
  11346. this.courseTypeId[res.data[0][i].id] = [];
  11347. }
  11348. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  11349. // }
  11350. this.CourseTypeJson[res.data[0][i].id] = [];
  11351. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11352. if (res.data[0][i].name == "栏目") {
  11353. this.CourseType[0][i].name = "主题";
  11354. }
  11355. }
  11356. if (res.data[2].length == 0 && res.data[3].length == 0) {
  11357. for (var j = 0; j < res.data[1].length; j++) {
  11358. if (
  11359. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  11360. _courseTypeId.indexOf(res.data[1][j].id) == -1
  11361. ) {
  11362. _courseTypeId.push(res.data[1][j].id);
  11363. }
  11364. if (res.data[0][i].id == res.data[1][j].pid) {
  11365. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  11366. }
  11367. }
  11368. } else {
  11369. if (res.data[2].length > 0) {
  11370. for (var j = 0; j < res.data[2].length; j++) {
  11371. if (
  11372. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  11373. _courseTypeId.indexOf(res.data[2][j].id) == -1
  11374. ) {
  11375. _courseTypeId.push(res.data[2][j].id);
  11376. }
  11377. if (res.data[0][i].id == res.data[2][j].pid) {
  11378. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  11379. }
  11380. }
  11381. }
  11382. if (res.data[3].length > 0) {
  11383. for (var j = 0; j < res.data[3].length; j++) {
  11384. if (
  11385. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  11386. _courseTypeId.indexOf(res.data[3][j].id) == -1
  11387. ) {
  11388. _courseTypeId.push(res.data[3][j].id);
  11389. }
  11390. if (res.data[0][i].id == res.data[3][j].pid) {
  11391. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  11392. }
  11393. }
  11394. }
  11395. }
  11396. }
  11397. this.courseTypeId = _courseTypeId;
  11398. })
  11399. .catch((err) => {
  11400. console.error(err);
  11401. });
  11402. },
  11403. selectType() {
  11404. this.ajax
  11405. .get(this.$store.state.api + "selectType")
  11406. .then((res) => {
  11407. this.CourseType = res.data;
  11408. for (var i = 0; i < res.data[0].length; i++) {
  11409. if (!this.cid) {
  11410. this.courseTypeId[res.data[0][i].id] = "";
  11411. }
  11412. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11413. if (res.data[0][i].name == "栏目") {
  11414. this.CourseType[0][i].name = "主题";
  11415. }
  11416. }
  11417. for (var j = 0; j < res.data[1].length; j++) {
  11418. if (res.data[0][i].id == res.data[1][j].pid) {
  11419. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11420. this.CourseTypeJson[res.data[0][i].id] = [];
  11421. }
  11422. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  11423. }
  11424. }
  11425. }
  11426. this.selectTypeByOid();
  11427. this.selectTypeByOrg();
  11428. })
  11429. .catch((err) => {
  11430. console.error(err);
  11431. });
  11432. },
  11433. selectTypeByOid() {
  11434. let params = {
  11435. oid: this.oid,
  11436. };
  11437. this.ajax
  11438. .get(this.$store.state.api + "selectTypeByOid", params)
  11439. .then((res) => {
  11440. for (var i = 0; i < res.data[0].length; i++) {
  11441. for (var j = 0; j < res.data[1].length; j++) {
  11442. if (res.data[0][i].id == res.data[1][j].pid) {
  11443. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11444. this.CourseTypeJson[res.data[0][i].id] = [];
  11445. }
  11446. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  11447. }
  11448. }
  11449. }
  11450. })
  11451. .catch((err) => {
  11452. console.error(err);
  11453. });
  11454. },
  11455. selectTypeByOrg() {
  11456. let params = {
  11457. oid: this.org,
  11458. };
  11459. this.ajax
  11460. .get(this.$store.state.api + "selectTypeByOrg", params)
  11461. .then((res) => {
  11462. for (var i = 0; i < res.data[0].length; i++) {
  11463. for (var j = 0; j < res.data[1].length; j++) {
  11464. if (res.data[0][i].id == res.data[1][j].pid) {
  11465. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11466. this.CourseTypeJson[res.data[0][i].id] = [];
  11467. }
  11468. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  11469. }
  11470. }
  11471. }
  11472. this.$forceUpdate();
  11473. })
  11474. .catch((err) => {
  11475. console.error(err);
  11476. });
  11477. },
  11478. OtherMb(type, task) {
  11479. if (task === 0 || task) {
  11480. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11481. task
  11482. ].isEvaFold = true;
  11483. }
  11484. this.typeMode = type;
  11485. setTimeout(() => {
  11486. this.checkEva(this.checkId);
  11487. setTimeout(() => {
  11488. this.checkEva(this.checkId);
  11489. }, 100);
  11490. }, 100);
  11491. },
  11492. openMember() {
  11493. this.searchTN = "";
  11494. this.getTeacher();
  11495. this.dialogVisibleMember = true;
  11496. },
  11497. checkEva(id, type) {
  11498. this.dialogVisiblemb = false;
  11499. this.selectEva();
  11500. if (this.evalua != id && type == 2) {
  11501. this.$message.success("导入成功");
  11502. setTimeout(() => {
  11503. this.checkEva(id);
  11504. }, 100);
  11505. }
  11506. this.evalua = id;
  11507. this.checkId = id;
  11508. if (this.evalua != "") {
  11509. for (var i = 0; i < this.evaJuri.length; i++) {
  11510. if (this.evalua == this.evaJuri[i].id) {
  11511. this.eTitle = this.evaJuri[i].title;
  11512. this.eJson = JSON.parse(this.evaJuri[i].content);
  11513. }
  11514. }
  11515. this.data.data = [];
  11516. this.$forceUpdate();
  11517. setTimeout(() => {
  11518. this.setMindData();
  11519. }, 1000);
  11520. }
  11521. },
  11522. deleteEva() {
  11523. let _this = this;
  11524. if (_this.evalua == "") {
  11525. this.$message.warning("内容已经清空了,请勿重复清空");
  11526. return;
  11527. }
  11528. _this
  11529. .$confirm("确定删除此目标吗?", "提示", {
  11530. confirmButtonText: "确定",
  11531. cancelButtonText: "取消",
  11532. type: "warning",
  11533. })
  11534. .then(() => {
  11535. _this.evalua = "";
  11536. _this.checkId = "";
  11537. _this.eTitle = "";
  11538. let _unitJson = _this.unitJson;
  11539. for (var i = 0; i < _unitJson.length; i++) {
  11540. let _task = _unitJson[i].chapterInfo[0].taskJson;
  11541. for (var j = 0; j < _task.length; j++) {
  11542. let _eList = _task[j].eList;
  11543. for (var k = 0; k < _eList.length; k++) {
  11544. delete _eList[k].target;
  11545. }
  11546. }
  11547. }
  11548. _this.$forceUpdate();
  11549. if (_this.cid) {
  11550. _this.updateWork();
  11551. }
  11552. })
  11553. .catch(() => {
  11554. return;
  11555. });
  11556. },
  11557. selectEva() {
  11558. let params = {
  11559. oid: this.oid,
  11560. };
  11561. this.ajax
  11562. .get(this.$store.state.api + "selectAllEvaluation", params)
  11563. .then((res) => {
  11564. this.evaJuri = res.data[0];
  11565. // 在复制操作之前记录滚动位置
  11566. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  11567. // 执行复制操作
  11568. // 复制操作完成后恢复滚动位置
  11569. this.$nextTick(() => {
  11570. if (this.$refs.scrollContainer) {
  11571. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  11572. }
  11573. });
  11574. })
  11575. .catch((err) => {
  11576. console.error(err);
  11577. });
  11578. },
  11579. setMindData() {
  11580. let targetArray = [];
  11581. this.data.data = [];
  11582. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  11583. let _eJson = Object.keys(this.eJson);
  11584. let _e = this.eJson;
  11585. for (let i = 0; i < _eJson.length; i++) {
  11586. let element = _e[_eJson[i]];
  11587. this.data.data.push({
  11588. id: element.id,
  11589. parentid: "root",
  11590. topic: element.name,
  11591. });
  11592. // targetArray.push({
  11593. // id: element.id,
  11594. // parentid: "root",
  11595. // name: element.name,
  11596. // });
  11597. targetArray.push({
  11598. value: element.name,
  11599. label: element.name,
  11600. children: [],
  11601. });
  11602. let _eJsonc = Object.keys(element.child);
  11603. let _e2 = element.child;
  11604. for (let j = 0; j < _eJsonc.length; j++) {
  11605. let _ec = _e2[_eJsonc[j]];
  11606. this.data.data.push({
  11607. id: _ec.id,
  11608. parentid: element.id,
  11609. topic: _ec.name,
  11610. });
  11611. // targetArray.push({
  11612. // id: _ec.id,
  11613. // parentid: element.id,
  11614. // name: _ec.name,
  11615. // });
  11616. targetArray[i].children.push({
  11617. value: _ec.name,
  11618. label: _ec.name,
  11619. children: [],
  11620. });
  11621. let _eJsonz = Object.keys(_ec.child);
  11622. let _e3 = _ec.child;
  11623. for (let z = 0; z < _eJsonz.length; z++) {
  11624. let _ez = _e3[_eJsonz[z]];
  11625. this.data.data.push({
  11626. id: _ez.id,
  11627. parentid: _ec.id,
  11628. topic: _ez.name,
  11629. });
  11630. // targetArray.push({
  11631. // id: _ez.id,
  11632. // parentid: _ec.id,
  11633. // name: _ez.name,
  11634. // });
  11635. targetArray[i].children[j].children.push({
  11636. value: _ez.name,
  11637. label: _ez.name,
  11638. });
  11639. }
  11640. }
  11641. }
  11642. this.targetArray = targetArray;
  11643. this.$forceUpdate();
  11644. },
  11645. /*添加评价 */
  11646. addEList(index, tIndex) {
  11647. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  11648. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  11649. value: "",
  11650. detail: "",
  11651. score: 5,
  11652. })
  11653. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  11654. { value: "", detail: "", score: 5 },
  11655. ]);
  11656. this.$forceUpdate();
  11657. },
  11658. openEList(index, tIndex) {
  11659. this.evaIndex = index;
  11660. this.evatIndex = tIndex;
  11661. this.evaBoxDialog = true;
  11662. },
  11663. addCET(index, tIndex) {
  11664. this.cetIndex = index;
  11665. this.cettIndex = tIndex;
  11666. this.selectAllType1();
  11667. },
  11668. addCETemplate() {
  11669. var array =
  11670. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  11671. .eList;
  11672. let params = [
  11673. {
  11674. uid: this.userid,
  11675. n: this.templateName,
  11676. json: JSON.stringify(array),
  11677. t: 1,
  11678. oid: this.oid,
  11679. },
  11680. ];
  11681. this.ajax
  11682. .post(this.$store.state.api + "addCETShare", params)
  11683. .then((res) => {
  11684. this.addTypeByCET(res.data[0][0].id);
  11685. })
  11686. .catch((err) => {
  11687. this.$message.error("网络不佳");
  11688. console.error(err);
  11689. });
  11690. },
  11691. addTypeByCET(id) {
  11692. if (this.setTypeJson.two == "") {
  11693. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  11694. return;
  11695. }
  11696. let params = {
  11697. cid: id,
  11698. };
  11699. this.ajax
  11700. .get(this.$store.state.api + "deleteCETLabel", params)
  11701. .then((res) => {
  11702. for (var i = 0; i < 2; i++) {
  11703. let tid = "";
  11704. if (i == 0) {
  11705. tid = this.setTypeJson.one;
  11706. } else {
  11707. tid = this.setTypeJson.two;
  11708. }
  11709. let params = [
  11710. {
  11711. cid: id,
  11712. tid: tid,
  11713. uid: this.userid,
  11714. },
  11715. ];
  11716. this.ajax
  11717. .post(this.$store.state.api + "addCETLabel", params)
  11718. .then((res) => {
  11719. this.$message({
  11720. message: "添加成功",
  11721. type: "success",
  11722. });
  11723. this.close();
  11724. })
  11725. .catch((err) => {
  11726. this.$message.error("网络不佳");
  11727. console.error(err);
  11728. });
  11729. }
  11730. })
  11731. .catch((err) => {
  11732. this.$message.error("网络不佳");
  11733. console.error(err);
  11734. });
  11735. },
  11736. updateEvaJson(array) {
  11737. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  11738. this.evatIndex
  11739. ].eList = array;
  11740. },
  11741. forceUpdate() {
  11742. this.$forceUpdate();
  11743. },
  11744. deletEList(index, tIndex, eIndex) {
  11745. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  11746. eIndex,
  11747. 1
  11748. );
  11749. this.$forceUpdate();
  11750. },
  11751. getChoosePic(t) {
  11752. this.chooseType = t;
  11753. this.getAllBanner();
  11754. },
  11755. getAllBanner() {
  11756. this.sysPicVisible = true;
  11757. let params = {
  11758. t: this.chooseType,
  11759. };
  11760. this.ajax
  11761. .get(this.$store.state.api + "selectAllBanner", params)
  11762. .then((res) => {
  11763. this.sysPic = res.data[0];
  11764. })
  11765. .catch((err) => {
  11766. console.error(err);
  11767. });
  11768. },
  11769. // getClass() {
  11770. // let params = {
  11771. // oid: this.oid,
  11772. // };
  11773. // this.ajax
  11774. // .get(this.$store.state.api + "selectClassBySchool", params)
  11775. // .then((res) => {
  11776. // this.classJuri = res.data[0];
  11777. // })
  11778. // .catch((err) => {
  11779. // console.error(err);
  11780. // });
  11781. // },
  11782. deleteSysPic() {
  11783. this.cover = [];
  11784. this.isSysPic = false;
  11785. this.isSysPic2 = false;
  11786. },
  11787. deleteSelectPic() {
  11788. this.selectJson.url = "";
  11789. },
  11790. setEListStar() {
  11791. this.$forceUpdate();
  11792. },
  11793. deletRateList(i) {
  11794. this.rateJson.splice(i, 1);
  11795. },
  11796. addRateList() {
  11797. this.rateJson.push({ detail: "", score: 5, value: "" });
  11798. },
  11799. addSt() {
  11800. this.sentenceList.push({
  11801. sentenceTitle: "",
  11802. addSentence: [],
  11803. rightAnswer: [],
  11804. });
  11805. },
  11806. addSen(i) {
  11807. if (!this.sentenceList[i].sentenceTitle) {
  11808. this.$message.error("请填写卡片内容!");
  11809. return;
  11810. }
  11811. if (this.sentenceList[i].sentenceTitle.length > 10) {
  11812. this.$message.error("卡片内容字数不能超过10位");
  11813. return;
  11814. }
  11815. if (
  11816. this.sentenceList[i].addSentence.indexOf(
  11817. this.sentenceList[i].sentenceTitle
  11818. ) !== -1
  11819. ) {
  11820. this.$message.error("不能添加重复的卡片内容!");
  11821. return;
  11822. }
  11823. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  11824. // this.isPushTitleList.push(this.sentenceTitle);
  11825. this.sentenceList[i].sentenceTitle = "";
  11826. },
  11827. setRightAnswer(s, i, j) {
  11828. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  11829. this.sentenceList[i].rightAnswer.push(s);
  11830. }
  11831. },
  11832. returnCard(r, i, j) {
  11833. this.sentenceList[i].rightAnswer.splice(j, 1);
  11834. },
  11835. addSentenceTool() {
  11836. for (var i = 0; i < this.sentenceList.length; i++) {
  11837. if (this.sentenceList[i].rightAnswer.length == 0) {
  11838. this.$message.error(`请将题目${i + 1}设置完整。`);
  11839. return;
  11840. }
  11841. if (
  11842. this.sentenceList[i].addSentence.length !=
  11843. this.sentenceList[i].rightAnswer.length
  11844. ) {
  11845. this.$message.error(`请将题目${i + 1}设置完整。`);
  11846. return;
  11847. }
  11848. }
  11849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11850. this.taskCount
  11851. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  11852. this.sentenceList = [
  11853. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  11854. ];
  11855. this.dialogVisibleSentence = false;
  11856. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11857. // itemTaskIndex
  11858. // ].toolChoose[toolIndex].tool = [];
  11859. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11860. // itemTaskIndex
  11861. // ].toolChoose[toolIndex].tool.push(i);
  11862. if (
  11863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11864. .toolChoose[this.toolIndex].tool != 47
  11865. ) {
  11866. this.addTools(47, this.taskCount, this.toolIndex);
  11867. }
  11868. },
  11869. addTableJson() {
  11870. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  11871. // this.$message.error("请将信息填写完整!");
  11872. // return;
  11873. // }
  11874. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11875. this.taskCount
  11876. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  11877. // this.tableJson = [{ text: "" }];
  11878. // this.dialogVisibleTable = false;
  11879. this.$message.success("上传成功");
  11880. if (
  11881. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11882. .toolChoose[this.toolIndex].tool != 48
  11883. ) {
  11884. this.addTools(48, this.taskCount, this.toolIndex);
  11885. }
  11886. },
  11887. addWordJson() {
  11888. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11889. this.taskCount
  11890. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  11891. // this.wordJson = [{ text: "" }];
  11892. // this.dialogVisibleWord = false;
  11893. this.$message.success("上传成功");
  11894. if (
  11895. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11896. .toolChoose[this.toolIndex].tool != 52
  11897. ) {
  11898. this.addTools(52, this.taskCount, this.toolIndex);
  11899. }
  11900. },
  11901. addMoreUpload() {
  11902. if (this.uploadJson.length == 0) {
  11903. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11904. this.taskCount
  11905. ].toolChoose[this.toolIndex].uploadJson = [];
  11906. } else {
  11907. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11908. this.taskCount
  11909. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  11910. }
  11911. this.uploadJson = [];
  11912. this.dialogVisibleMoreUpload = false;
  11913. if (
  11914. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11915. .toolChoose[this.toolIndex].tool != 50
  11916. ) {
  11917. this.addTools(50, this.taskCount, this.toolIndex);
  11918. }
  11919. },
  11920. addPreTime() {
  11921. if (this.preTime == 0) {
  11922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11923. this.taskCount
  11924. ].toolChoose[this.toolIndex].preTime = 0;
  11925. } else {
  11926. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11927. this.taskCount
  11928. ].toolChoose[this.toolIndex].preTime = this.preTime;
  11929. }
  11930. this.preTime = 0;
  11931. this.dialogVisiblePreTime = false;
  11932. if (
  11933. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11934. .toolChoose[this.toolIndex].tool != 10
  11935. ) {
  11936. this.addTools(10, this.taskCount, this.toolIndex);
  11937. }
  11938. },
  11939. goToTask(i) {
  11940. this.toolIndexType = "";
  11941. if (this.isClickColor == i + 1) {
  11942. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11943. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11944. // } else {
  11945. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11946. i
  11947. ].toolOpen = true;
  11948. // }
  11949. this.$forceUpdate();
  11950. return;
  11951. }
  11952. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11953. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11954. // } else {
  11955. document.querySelectorAll(".basic_box")[0].scrollTop =
  11956. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  11957. this.isClickColor = i + 1;
  11958. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11959. // }
  11960. this.$forceUpdate();
  11961. },
  11962. taskOpen(i, stageIndex) {
  11963. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11964. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  11965. } else {
  11966. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11967. }
  11968. this.updateWork3(stageIndex);
  11969. this.$forceUpdate();
  11970. },
  11971. goToTask2(i, stage) {
  11972. this.toolIndexType = "";
  11973. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  11974. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11975. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11976. // } else {
  11977. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11978. i
  11979. ].toolOpen = true;
  11980. // }
  11981. this.$forceUpdate();
  11982. return;
  11983. }
  11984. if (this.unitIndex != stage) {
  11985. if (this.panUnitJson() == 2) {
  11986. return;
  11987. }
  11988. this.unitSet(stage);
  11989. }
  11990. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11991. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11992. // } else {
  11993. document.querySelectorAll(".basic_box")[0].scrollTop =
  11994. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  11995. this.isClickColor = i + 1;
  11996. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11997. // }
  11998. this.$forceUpdate();
  11999. },
  12000. taskMove(type, index) {
  12001. this.$confirm(
  12002. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  12003. "提示",
  12004. {
  12005. confirmButtonText: "确定",
  12006. cancelButtonText: "取消",
  12007. type: "warning",
  12008. }
  12009. )
  12010. .then(() => {
  12011. if (type == 1) {
  12012. if (index > 0) {
  12013. let a = JSON.parse(
  12014. JSON.stringify(
  12015. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12016. index - 1
  12017. ]
  12018. )
  12019. );
  12020. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  12021. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12022. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12023. }
  12024. } else {
  12025. if (
  12026. index <
  12027. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  12028. ) {
  12029. let a = JSON.parse(
  12030. JSON.stringify(
  12031. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12032. index + 1
  12033. ]
  12034. )
  12035. );
  12036. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  12037. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12039. }
  12040. }
  12041. this.$forceUpdate();
  12042. })
  12043. .catch(() => {
  12044. return;
  12045. });
  12046. },
  12047. stageMove(type, index) {
  12048. if (type == 1) {
  12049. if (index > 0) {
  12050. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  12051. let acid = JSON.parse(
  12052. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  12053. );
  12054. let bcid = JSON.parse(
  12055. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12056. );
  12057. this.unitJson3[index - 1] = this.unitJson3[index];
  12058. this.unitJson3[index] = a;
  12059. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  12060. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12061. }
  12062. } else {
  12063. if (index < this.unitJson3.length - 1) {
  12064. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  12065. let acid = JSON.parse(
  12066. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  12067. );
  12068. let bcid = JSON.parse(
  12069. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12070. );
  12071. this.unitJson3[index + 1] = this.unitJson3[index];
  12072. this.unitJson3[index] = a;
  12073. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  12074. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12075. }
  12076. }
  12077. this.$forceUpdate();
  12078. },
  12079. addGroup(i) {
  12080. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  12081. this.groupJson.group.push({
  12082. name: "第" + (this.groupJson.group.length + 1) + "组",
  12083. });
  12084. },
  12085. deleteGroup(i) {
  12086. this.groupJson.group.splice(i, 1);
  12087. },
  12088. numberPan() {
  12089. if (
  12090. /[^\d]/.test(this.groupJson.number) ||
  12091. this.groupJson.number < 2 ||
  12092. this.groupJson.number > 10
  12093. ) {
  12094. this.$message.error("请输入2-10的数字");
  12095. this.groupJson.number = "";
  12096. }
  12097. },
  12098. numberPanJie() {
  12099. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  12100. this.$message.error('请输入大于1的数字')
  12101. this.courseJie = 1
  12102. }
  12103. },
  12104. numberPanTime() {
  12105. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  12106. this.$message.error('请输入大于1的数字')
  12107. this.courseTime = 1
  12108. }
  12109. },
  12110. addGroupJson() {
  12111. for (var i = 0; i < this.groupJson.group.length; i++) {
  12112. if (!this.groupJson.group[i].name) {
  12113. this.$message.error("请将信息填写完整!");
  12114. return;
  12115. }
  12116. }
  12117. if (!this.groupJson.number) {
  12118. this.$message.error("请将信息填写完整!");
  12119. return;
  12120. }
  12121. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12122. this.taskCount
  12123. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  12124. JSON.stringify(this.groupJson)
  12125. );
  12126. this.dialogVisibleGroup = false;
  12127. this.groupJson = {};
  12128. if (
  12129. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12130. .toolChoose[this.toolIndex].tool != 49
  12131. ) {
  12132. this.addTools(49, this.taskCount, this.toolIndex);
  12133. }
  12134. },
  12135. updateTime(preTime) {
  12136. this.preTime = preTime;
  12137. },
  12138. InviteChange(val) {
  12139. console.log(val);
  12140. let _check = [];
  12141. let _check2 = [];
  12142. for (var i = 0; i < this.grade2.length; i++) {
  12143. var gid = this.grade2[i].id;
  12144. _check.push(gid);
  12145. }
  12146. for (var i = 0; i < this.checkboxList2.length; i++) {
  12147. var _id = this.checkboxList2[i];
  12148. if (_check.indexOf(_id) !== -1) {
  12149. _check2.push(_id);
  12150. }
  12151. }
  12152. this.checkAll = _check2.length === _check.length;
  12153. return;
  12154. let array = JSON.parse(JSON.stringify(val));
  12155. this.inviteCode = this.inviteCode.filter((el) => {
  12156. if (val.indexOf(el.cid) != -1) {
  12157. array.splice(array.indexOf(el.cid), 1);
  12158. return el;
  12159. }
  12160. });
  12161. for (var i = 0; i < array.length; i++) {
  12162. this.getInviteCode(array[i]);
  12163. }
  12164. },
  12165. InviteChange2(val) {
  12166. console.log(val);
  12167. let _check = [];
  12168. let _check2 = [];
  12169. for (var i = 0; i < this.teacherJuri.length; i++) {
  12170. var gid = this.teacherJuri[i].userid;
  12171. _check.push(gid);
  12172. }
  12173. for (var i = 0; i < this.checkboxList3.length; i++) {
  12174. var _id = this.checkboxList3[i];
  12175. if (_check.indexOf(_id) !== -1) {
  12176. _check2.push(_id);
  12177. }
  12178. }
  12179. this.checkAll2 = _check2.length === _check.length;
  12180. this.setMan();
  12181. return;
  12182. let array = JSON.parse(JSON.stringify(val));
  12183. this.inviteCode = this.inviteCode.filter((el) => {
  12184. if (val.indexOf(el.cid) != -1) {
  12185. array.splice(array.indexOf(el.cid), 1);
  12186. return el;
  12187. }
  12188. });
  12189. for (var i = 0; i < array.length; i++) {
  12190. this.getInviteCode(array[i]);
  12191. }
  12192. },
  12193. handleCheckAllChange(val) {
  12194. if (val) {
  12195. for (var i = 0; i < this.grade2.length; i++) {
  12196. var gid = this.grade2[i].id;
  12197. if (this.checkboxList2.indexOf(gid) === -1) {
  12198. this.checkboxList2.push(gid);
  12199. }
  12200. }
  12201. } else {
  12202. let _check = [];
  12203. let _check2 = [];
  12204. for (var i = 0; i < this.grade2.length; i++) {
  12205. var gid = this.grade2[i].id;
  12206. _check.push(gid);
  12207. }
  12208. for (var i = 0; i < this.checkboxList2.length; i++) {
  12209. var _id = this.checkboxList2[i];
  12210. if (_check.indexOf(_id) === -1) {
  12211. _check2.push(_id);
  12212. }
  12213. }
  12214. this.checkboxList2 = _check2;
  12215. }
  12216. this.isIndeterminate = false;
  12217. },
  12218. handleCheckAllChange2(val) {
  12219. if (val) {
  12220. for (var i = 0; i < this.teacherJuri.length; i++) {
  12221. var gid = this.teacherJuri[i].userid;
  12222. if (this.checkboxList3.indexOf(gid) === -1) {
  12223. this.checkboxList3.push(gid);
  12224. }
  12225. }
  12226. } else {
  12227. let _check = [];
  12228. let _check2 = [];
  12229. for (var i = 0; i < this.teacherJuri.length; i++) {
  12230. var gid = this.teacherJuri[i].userid;
  12231. _check.push(gid);
  12232. }
  12233. for (var i = 0; i < this.checkboxList3.length; i++) {
  12234. var _id = this.checkboxList3[i];
  12235. if (_check.indexOf(_id) === -1) {
  12236. _check2.push(_id);
  12237. }
  12238. }
  12239. this.checkboxList3 = _check2;
  12240. }
  12241. this.isIndeterminate2 = false;
  12242. },
  12243. async getInviteCode(cid) {
  12244. let code = this.randomNumber();
  12245. let params = {
  12246. code: code,
  12247. oid: this.oid,
  12248. };
  12249. let type = 1;
  12250. for (var i = 0; i < this.inviteCode.length; i++) {
  12251. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  12252. type = 2;
  12253. }
  12254. }
  12255. if (type == 2) {
  12256. this.getInviteCode(cid);
  12257. return;
  12258. }
  12259. const res = await this.ajax.get(
  12260. this.$store.state.api + "selectInviteCode2",
  12261. params
  12262. );
  12263. if (
  12264. res.data.length &&
  12265. res.data[0].length &&
  12266. res.data[0][0].courseId != this.cid
  12267. ) {
  12268. this.getInviteCode(cid);
  12269. return;
  12270. }
  12271. let array = [];
  12272. for (var i = 0; i < this.inviteCode.length; i++) {
  12273. array.push(this.inviteCode[i].cid);
  12274. }
  12275. if (array.indexOf(cid) != -1) {
  12276. this.inviteCode[array.indexOf(cid)].ic = code;
  12277. } else {
  12278. this.inviteCode.push({ cid: cid, ic: code });
  12279. }
  12280. },
  12281. OpenInviteD(cid) {
  12282. let array = [];
  12283. this.icode = "";
  12284. for (var i = 0; i < this.inviteCode.length; i++) {
  12285. array.push(this.inviteCode[i].cid);
  12286. }
  12287. if (array.indexOf(cid) != -1) {
  12288. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  12289. }
  12290. this.inviteId = cid;
  12291. this.dialogVisibleInvite = true;
  12292. },
  12293. addInvite() {
  12294. let reg = /^[A-Za-z0-9]{4,}$/;
  12295. if (!reg.test(this.icode)) {
  12296. this.$message.error("请输入至少四位数字或英文组合的随机码");
  12297. return;
  12298. }
  12299. let type = 1;
  12300. for (var i = 0; i < this.inviteCode.length; i++) {
  12301. if (
  12302. this.inviteCode[i].cid != this.inviteId &&
  12303. this.icode == this.inviteCode[i].ic
  12304. ) {
  12305. type = 2;
  12306. }
  12307. }
  12308. if (type == 2) {
  12309. this.$message.error("已有此随机码,不能重复");
  12310. return;
  12311. }
  12312. let params = {
  12313. code: this.icode,
  12314. oid: this.oid,
  12315. };
  12316. this.ajax
  12317. .get(this.$store.state.api + "selectInviteCode", params)
  12318. .then((res) => {
  12319. if (
  12320. res.data.length &&
  12321. res.data[0].length &&
  12322. res.data[0][0].courseId != this.cid
  12323. ) {
  12324. this.$message.error("已有此随机码,不能重复");
  12325. return;
  12326. }
  12327. let array = [];
  12328. for (var i = 0; i < this.inviteCode.length; i++) {
  12329. array.push(this.inviteCode[i].cid);
  12330. }
  12331. if (array.indexOf(this.inviteId) != -1) {
  12332. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  12333. } else {
  12334. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  12335. }
  12336. this.icode = "";
  12337. this.dialogVisibleInvite = false;
  12338. })
  12339. .catch((err) => {
  12340. console.error(err);
  12341. });
  12342. },
  12343. randomNumber() {
  12344. // 随机生成两位数
  12345. // let num = Math.floor(Math.random() * 900) + 100;
  12346. // 生成 0 到 99 之间的随机整数
  12347. const randomNumber = Math.floor(Math.random() * 100);
  12348. // 如果随机数小于 10,补上前导零
  12349. const num =
  12350. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  12351. // 随机生成两个大写字母
  12352. let letters = "";
  12353. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  12354. for (let i = 0; i < 3; i++) {
  12355. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  12356. }
  12357. // 随机生成两位数字和字母的组合
  12358. let mix = "";
  12359. let chars =
  12360. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  12361. for (let i = 0; i < 3; i++) {
  12362. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  12363. mix += char;
  12364. }
  12365. // 随机选择一种类型
  12366. let type = Math.floor(Math.random() * 3);
  12367. return num;
  12368. // 根据类型输出结果
  12369. switch (type) {
  12370. case 0:
  12371. console.log(num); // 输出两位数
  12372. return num;
  12373. case 1:
  12374. console.log(letters); // 输出两个大写字母
  12375. return letters;
  12376. case 2:
  12377. console.log(mix); // 输出两位数字和字母的组合
  12378. return mix;
  12379. }
  12380. },
  12381. getPaste() {
  12382. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12383. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12384. if (!iframe && !iframe2) {
  12385. return;
  12386. }
  12387. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12388. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12389. if (copyData && copyData.stageData && copyData.stageData.length) {
  12390. this.isPasteStage = true;
  12391. }
  12392. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  12393. this.isPasteStage = true;
  12394. }
  12395. if (copyData && copyData.selectData.length) {
  12396. this.isPasteChoice = true;
  12397. }
  12398. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  12399. this.isPasteTask = true;
  12400. }
  12401. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  12402. this.isPasteTask = true;
  12403. }
  12404. },
  12405. setCover() {
  12406. var _this = this;
  12407. if(_this.cover.length){
  12408. return;
  12409. }
  12410. _this.imageloading2 = true
  12411. _this.ajax
  12412. .post("https://gpt.cocorobo.cn/search_image", {
  12413. page: _this.ppage,
  12414. pagesize: 9,
  12415. query: _this.courseName,
  12416. })
  12417. .then(function (response) {
  12418. // console.log(response.data.data);
  12419. var data = response.data.FunctionResponse.result;
  12420. _this.cover = [];
  12421.       setTimeout(() => {
  12422.         _this.cover[0] = {
  12423.           name: "网络图片.png",
  12424.           url: data[0].thumbnail
  12425.         };
  12426.         _this.imgChange1(null, null, 1, null);
  12427.         _this.$forceUpdate();
  12428.       }, 0);
  12429. _this.imageloading2 = false
  12430. })
  12431. .catch(function (error) {
  12432. _this.imageloading2 = false
  12433. console.log(error);
  12434. });
  12435. },
  12436. searchImage() {
  12437. var _this = this;
  12438. _this.imageList = [];
  12439. if (!_this.searchImageValue) {
  12440. _this.sysPicVisible2 = true;
  12441. return;
  12442. }
  12443. _this.imageloading = true;
  12444. _this.ajax
  12445. .post("https://gpt.cocorobo.cn/search_image", {
  12446. page: _this.ppage,
  12447. pagesize: 9,
  12448. query: _this.searchImageValue,
  12449. })
  12450. .then(function (response) {
  12451. // console.log(response.data.data);
  12452. var data = response.data.FunctionResponse.result;
  12453. for (var i = 0; i < data.length; i++) {
  12454. _this.imageList.push({ url: data[i].thumbnail });
  12455. }
  12456. _this.imageloading = false;
  12457. })
  12458. .catch(function (error) {
  12459. console.log(error);
  12460. });
  12461. _this.sysPicVisible2 = true;
  12462. },
  12463. changePicture() {
  12464. this.ppage++;
  12465. this.searchImage();
  12466. },
  12467. resetImage() {
  12468. this.ppage = 1;
  12469. this.searchImage();
  12470. },
  12471. jumpGj(i, j) {
  12472. if (i + 1 != this.isClickColor) {
  12473. this.isClickColor = i + 1;
  12474. }
  12475. var a = document.scrollingElement;
  12476. this.toolIndexType = `gj${i}${j}`;
  12477. let target = document.querySelector(`#gj${i}${j}`);
  12478. if (target) {
  12479. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12480. setTimeout(() => {
  12481. target.scrollIntoView(true);
  12482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12483. j
  12484. ].isFold3 = false;
  12485. setTimeout(() => {
  12486. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  12487. }, 0);
  12488. }, 0);
  12489. }
  12490. },
  12491. jumpGj2(i, j, k) {
  12492. if (this.unitIndex != k) {
  12493. if (this.panUnitJson() == 2) {
  12494. return;
  12495. }
  12496. this.unitSet(k);
  12497. }
  12498. setTimeout(() => {
  12499. if (i + 1 != this.isClickColor) {
  12500. this.isClickColor = i + 1;
  12501. }
  12502. var a = document.scrollingElement;
  12503. this.toolIndexType = `gj${i}${j}${k}`;
  12504. let target = document.querySelector(`#gj${i}${j}`);
  12505. if (target) {
  12506. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12507. setTimeout(() => {
  12508. target.scrollIntoView(true);
  12509. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12510. j
  12511. ].isFold3 = false;
  12512. setTimeout(() => {
  12513. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  12514. }, 0);
  12515. }, 0);
  12516. }
  12517. }, 0);
  12518. },
  12519. dragStart(val, i, j) {
  12520. console.log(this.taskCount);
  12521. this.dragType = "drag";
  12522. this.taskCount = j;
  12523. this.oldIndex = i;
  12524. this.oldData = val;
  12525. },
  12526. dragOver(i, j) {
  12527. this.typeIndex = "chapter-" + j + "-" + i;
  12528. this.newIndex = i;
  12529. },
  12530. dragEnd() {
  12531. if (this.dragType != "drag") {
  12532. this.typeIndex = "";
  12533. this.newIndex = "";
  12534. this.dragType = "";
  12535. this.isdrag = "";
  12536. return;
  12537. }
  12538. console.log(this.taskCount);
  12539. let newItems = [
  12540. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12541. .chapterData,
  12542. ];
  12543. // 删除老的节点
  12544. newItems.splice(this.oldIndex, 1);
  12545. // 在列表中目标位置增加新的节点
  12546. newItems.splice(this.newIndex, 0, this.oldData);
  12547. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12548. this.taskCount
  12549. ].chapterData = [...newItems];
  12550. this.typeIndex = "";
  12551. this.newIndex = "";
  12552. this.dragType = "";
  12553. this.isdrag = "";
  12554. this.$forceUpdate();
  12555. },
  12556. dragTaskStart(val, i, j) {
  12557. this.dragType = "task";
  12558. this.oldIndex = i;
  12559. this.oldData = val;
  12560. this.oldUnitIndex = j;
  12561. },
  12562. dragTaskOver(i, j) {
  12563. this.typeIndex = "task-" + i;
  12564. this.newIndex = i;
  12565. this.checkUnitIndex = j;
  12566. },
  12567. async dragTaskEnd() {
  12568. if (this.dragType != "task") {
  12569. this.newIndex = "";
  12570. this.dragType = "";
  12571. this.typeIndex = "";
  12572. this.checkUnitIndex = "";
  12573. this.isdrag = "";
  12574. return;
  12575. }
  12576. if (
  12577. this.newIndex == this.oldIndex &&
  12578. this.oldUnitIndex == this.checkUnitIndex
  12579. ) {
  12580. this.newIndex = "";
  12581. this.dragType = "";
  12582. this.typeIndex = "";
  12583. this.checkUnitIndex = "";
  12584. this.isdrag = "";
  12585. return;
  12586. }
  12587. let count1 = await this.getWorksCount(
  12588. 2,
  12589. this.checkUnitIndex,
  12590. this.newIndex,
  12591. 0
  12592. );
  12593. let count2 = await this.getWorksCount(
  12594. 2,
  12595. this.oldUnitIndex,
  12596. this.oldIndex,
  12597. 0
  12598. );
  12599. if (count1 > 0 || count2 > 0) {
  12600. this.$confirm(
  12601. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  12602. "提示",
  12603. {
  12604. confirmButtonText: "确定",
  12605. cancelButtonText: "取消",
  12606. type: "warning",
  12607. }
  12608. )
  12609. .then(() => {
  12610. if (this.oldUnitIndex != this.checkUnitIndex) {
  12611. let newItems = [
  12612. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12613. ];
  12614. // 删除老的节点
  12615. newItems.splice(this.oldIndex, 1);
  12616. // 在列表中目标位置增加新的节点
  12617. let newItems2 = [
  12618. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  12619. ];
  12620. newItems2.splice(this.newIndex, 0, this.oldData);
  12621. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12622. ...newItems,
  12623. ];
  12624. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  12625. ...newItems2,
  12626. ];
  12627. } else {
  12628. let newItems = [
  12629. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12630. ];
  12631. let chapterData = []
  12632. if (this.oldIndex == 0) {
  12633. chapterData = newItems[this.oldIndex].chapterData
  12634. newItems[this.oldIndex].chapterData = []
  12635. } else if (this.newIndex == 0) {
  12636. chapterData = newItems[this.newIndex].chapterData
  12637. newItems[this.oldIndex].chapterData = []
  12638. }
  12639. // 删除老的节点
  12640. newItems.splice(this.oldIndex, 1);
  12641. // 在列表中目标位置增加新的节点
  12642. newItems.splice(this.newIndex, 0, this.oldData);
  12643. if (this.oldIndex == 0 || this.newIndex == 0) {
  12644. newItems[0].chapterData = chapterData
  12645. }
  12646. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12647. ...newItems,
  12648. ];
  12649. }
  12650. this.typeIndex = "";
  12651. this.newIndex = "";
  12652. this.dragType = "";
  12653. this.checkUnitIndex = "";
  12654. this.isdrag = "";
  12655. this.updateWork();
  12656. this.$forceUpdate();
  12657. })
  12658. .catch(() => {
  12659. this.newIndex = "";
  12660. this.dragType = "";
  12661. this.typeIndex = "";
  12662. this.checkUnitIndex = "";
  12663. this.isdrag = "";
  12664. return;
  12665. });
  12666. } else {
  12667. if (this.oldUnitIndex != this.checkUnitIndex) {
  12668. let newItems = [
  12669. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12670. ];
  12671. // 删除老的节点
  12672. newItems.splice(this.oldIndex, 1);
  12673. // 在列表中目标位置增加新的节点
  12674. let newItems2 = [
  12675. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  12676. ];
  12677. newItems2.splice(this.newIndex, 0, this.oldData);
  12678. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12679. ...newItems,
  12680. ];
  12681. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  12682. ...newItems2,
  12683. ];
  12684. } else {
  12685. let newItems = [
  12686. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12687. ];
  12688. let chapterData = []
  12689. if (this.oldIndex == 0) {
  12690. chapterData = newItems[this.oldIndex].chapterData
  12691. newItems[this.oldIndex].chapterData = []
  12692. } else if (this.newIndex == 0) {
  12693. chapterData = newItems[this.newIndex].chapterData
  12694. newItems[this.oldIndex].chapterData = []
  12695. }
  12696. // 删除老的节点
  12697. newItems.splice(this.oldIndex, 1);
  12698. // 在列表中目标位置增加新的节点
  12699. newItems.splice(this.newIndex, 0, this.oldData);
  12700. if (this.oldIndex == 0 || this.newIndex == 0) {
  12701. newItems[0].chapterData = chapterData
  12702. }
  12703. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12704. ...newItems,
  12705. ];
  12706. }
  12707. this.typeIndex = "";
  12708. this.newIndex = "";
  12709. this.dragType = "";
  12710. this.checkUnitIndex = "";
  12711. this.isdrag = "";
  12712. this.updateWork();
  12713. this.$forceUpdate();
  12714. }
  12715. },
  12716. dragUnitStart(val, i) {
  12717. this.dragType = "Unit";
  12718. this.oldIndex = i;
  12719. this.oldData = val;
  12720. },
  12721. dragUnitOver(i) {
  12722. this.typeIndex = "Unit-" + i;
  12723. this.newIndex = i;
  12724. console.log(i, this.unitJson[i].toolOpen);
  12725. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  12726. this.unitJson[i].toolOpen = true;
  12727. this.updateWork();
  12728. this.$forceUpdate();
  12729. }
  12730. },
  12731. async dragUnitEnd() {
  12732. if (this.dragType != "Unit") {
  12733. this.newIndex = "";
  12734. this.dragType = "";
  12735. this.typeIndex = "";
  12736. this.isdrag = "";
  12737. return;
  12738. }
  12739. if (this.newIndex == this.oldIndex) {
  12740. this.newIndex = "";
  12741. this.dragType = "";
  12742. this.typeIndex = "";
  12743. this.isdrag = "";
  12744. return;
  12745. }
  12746. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  12747. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  12748. console.log(count1, count2);
  12749. if (count1 > 0 || count2 > 0) {
  12750. this.$confirm(
  12751. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  12752. "提示",
  12753. {
  12754. confirmButtonText: "确定",
  12755. cancelButtonText: "取消",
  12756. type: "warning",
  12757. }
  12758. )
  12759. .then(() => {
  12760. let newItems = [...this.unitJson];
  12761. // 删除老的节点
  12762. newItems.splice(this.oldIndex, 1);
  12763. // 在列表中目标位置增加新的节点
  12764. newItems.splice(this.newIndex, 0, this.oldData);
  12765. this.unitJson = [...newItems];
  12766. this.typeIndex = "";
  12767. this.newIndex = "";
  12768. this.dragType = "";
  12769. this.isdrag = "";
  12770. this.updateWork();
  12771. this.$forceUpdate();
  12772. })
  12773. .catch(() => {
  12774. this.newIndex = "";
  12775. this.dragType = "";
  12776. this.typeIndex = "";
  12777. this.isdrag = "";
  12778. return;
  12779. });
  12780. } else {
  12781. let newItems = [...this.unitJson];
  12782. // 删除老的节点
  12783. newItems.splice(this.oldIndex, 1);
  12784. // 在列表中目标位置增加新的节点
  12785. newItems.splice(this.newIndex, 0, this.oldData);
  12786. this.unitJson = [...newItems];
  12787. this.typeIndex = "";
  12788. this.newIndex = "";
  12789. this.dragType = "";
  12790. this.isdrag = "";
  12791. this.updateWork();
  12792. this.$forceUpdate();
  12793. }
  12794. },
  12795. getWorksCount(type, stage, task, tool) {
  12796. return new Promise((resolve, reject) => {
  12797. let params = [
  12798. {
  12799. cid: this.cid,
  12800. stage: stage,
  12801. task: task,
  12802. tool: tool,
  12803. type: type,
  12804. },
  12805. ];
  12806. this.ajax
  12807. .post(this.$store.state.api + "getCourseWorkCount", params)
  12808. .then((res) => {
  12809. let count = res.data[0][0].count;
  12810. resolve(count);
  12811. })
  12812. .catch((err) => {
  12813. resolve(0);
  12814. this.$message.error("网络不佳");
  12815. console.error(err);
  12816. });
  12817. });
  12818. },
  12819. getTwoType(id) {
  12820. this.twoJson = [];
  12821. var array = this.CourseTypeJson1[
  12822. "3f8eed32-aba9-11ee-b534-005056b86db5"
  12823. ].filter((e) => {
  12824. return e.ppid == id;
  12825. });
  12826. this.twoJson = array;
  12827. this.$forceUpdate();
  12828. },
  12829. ctype() {
  12830. this.oneJson =
  12831. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  12832. },
  12833. selectAllType1() {
  12834. this.CourseType1 = [];
  12835. this.CourseTypeJson1 = {};
  12836. this.courseTypeId1 = {};
  12837. this.$forceUpdate();
  12838. let params = {
  12839. org: this.org && this.org != "" ? this.org : "",
  12840. oid: this.oid && this.oid != "" ? this.oid : "",
  12841. };
  12842. this.ajax
  12843. .get(this.$store.state.api + "selectAllEvaType", params)
  12844. .then((res) => {
  12845. this.CourseType1 = res.data;
  12846. for (var i = 0; i < res.data[0].length; i++) {
  12847. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  12848. res.data[0][i].name = "一级分类";
  12849. } else if (
  12850. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  12851. ) {
  12852. res.data[0][i].name = "二级分类";
  12853. }
  12854. if (!this.cid) {
  12855. this.courseTypeId1[res.data[0][i].id] = [];
  12856. }
  12857. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  12858. this.CourseTypeJson1[res.data[0][i].id] = [];
  12859. }
  12860. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  12861. for (var j = 0; j < res.data[1].length; j++) {
  12862. if (res.data[0][i].id == res.data[1][j].pid) {
  12863. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  12864. }
  12865. }
  12866. // } else {
  12867. if (res.data[2].length > 0) {
  12868. for (var j = 0; j < res.data[2].length; j++) {
  12869. if (res.data[0][i].id == res.data[2][j].pid) {
  12870. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  12871. }
  12872. }
  12873. }
  12874. if (res.data[3].length > 0) {
  12875. for (var j = 0; j < res.data[3].length; j++) {
  12876. if (res.data[0][i].id == res.data[3][j].pid) {
  12877. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  12878. }
  12879. }
  12880. }
  12881. // }
  12882. }
  12883. this.ctype();
  12884. this.cetBoxDialog = true;
  12885. })
  12886. .catch((err) => {
  12887. console.error(err);
  12888. });
  12889. },
  12890. setAiJson(pan,string){
  12891. if(pan == 'aiTeacher2'){
  12892. this.aiJson['teacherDetail2'] = string
  12893. }else {
  12894. this.aiJson[pan] = string
  12895. }
  12896. this.$forceUpdate();
  12897. },
  12898. editTask3(index){
  12899. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  12900. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  12901. }else {
  12902. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  12903. }
  12904. this.$forceUpdate();
  12905. },
  12906. editCpote(index){
  12907. if(this.cpote[index]){
  12908. this.cpote[index] = false
  12909. }else {
  12910. this.cpote[index] = true
  12911. }
  12912. this.$forceUpdate();
  12913. },
  12914. openAiDialog(clickType, type, callback, index, tindex) {
  12915. // if(clickType == 1){
  12916. // return;
  12917. // }
  12918. if (this.courseName == "") {
  12919. this.$message.error("请补充填写课程名称");
  12920. return;
  12921. }
  12922. this.clickType = clickType
  12923. let sub = []
  12924. if (this.courseTypeId.length) {
  12925. for (var i = 0; i < this.courseTypeId.length; i++) {
  12926. let _sid = this.courseTypeId[i]
  12927. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12928. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12929. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12930. }
  12931. }
  12932. }
  12933. }
  12934. let mclass = []
  12935. if (this.courseTypeId.length) {
  12936. for (var i = 0; i < this.courseTypeId.length; i++) {
  12937. let _sid = this.courseTypeId[i]
  12938. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12939. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12940. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12941. }
  12942. }
  12943. }
  12944. }
  12945. if (type == "aiDetail") {
  12946. if (this.ttextLoading) {
  12947. this.$message({
  12948. message: "请回答完毕后再次发送",
  12949. type: "warning"
  12950. });
  12951. return;
  12952. }
  12953. this.aitype = "aiDetail"
  12954. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  12955. this.aiText = this.aiJson.aiDetail
  12956. } else if (type == "aiOutline") {
  12957. this.aitype = "aiOutline"
  12958. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  12959. this.aiText = this.aiJson.aiOutline
  12960. } else if (type == "aiTask") {
  12961. this.aitype = "aiTask"
  12962. var _text = ""
  12963. for (var i = 0; i < this.teacherText.length; i++) {
  12964. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  12965. }
  12966. // this.aiText = `请根据${_text}。`
  12967. this.aiText = this.aiJson.aiTask
  12968. this.aiCallBack = callback
  12969. } else if (type == "aiDetail1") {
  12970. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  12971. this.$message({
  12972. message: "请回答完毕后再次发送",
  12973. type: "warning"
  12974. });
  12975. return;
  12976. }
  12977. this.aitype = "aiDetail1"
  12978. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  12979. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  12980. this.aiText = this.aiJson.aiDetail1
  12981. this.aiCallBack = callback
  12982. this.aiIndex = index
  12983. } else if (type == "aiDetail2") {
  12984. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  12985. this.$message({
  12986. message: "请回答完毕后再次发送",
  12987. type: "warning"
  12988. });
  12989. return;
  12990. }
  12991. this.aitype = "aiDetail2"
  12992. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  12993. this.aiText = this.aiJson.aiDetail2
  12994. this.aiCallBack = callback
  12995. this.aiIndex = index
  12996. } else if (type == "aiDetail3") {
  12997. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  12998. this.$message({
  12999. message: "请回答完毕后再次发送",
  13000. type: "warning"
  13001. });
  13002. return;
  13003. }
  13004. this.aitype = "aiDetail3"
  13005. this.aiText = this.aiJson.aiDetail3
  13006. this.aiIndex = index + '-' + tindex
  13007. } else if (type == "aiDetail4") {
  13008. var _text = ""
  13009. for (var i = 0; i < callback.length; i++) {
  13010. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  13011. }
  13012. this.aitype = "aiDetail4"
  13013. this.aiText = this.aiJson.aiDetail4
  13014. this.aiIndex = index
  13015. } else if (type == "aiTeacher") {
  13016. this.aitype = "aiTeacher"
  13017. var _text = ""
  13018. for (var i = 0; i < this.dArray.length; i++) {
  13019. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13020. }
  13021. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13022. this.aiText = this.aiJson.aiTeacher
  13023. this.aiCallBack = callback
  13024. } else if (type == "aiTeacher2") {
  13025. this.aitype = "aiTeacher2"
  13026. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13027. } else if (type == "teacherDetail") {
  13028. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13029. this.$message({
  13030. message: "请回答完毕后再次发送",
  13031. type: "warning"
  13032. });
  13033. return;
  13034. }
  13035. this.aitype = "teacherDetail"
  13036. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13037. this.aiText = this.aiJson.teacherDetail
  13038. this.aiCallBack = callback
  13039. this.aiIndex = index
  13040. } else if (type == "teacherDetail2") {
  13041. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13042. this.$message({
  13043. message: "请回答完毕后再次发送",
  13044. type: "warning"
  13045. });
  13046. return;
  13047. }
  13048. this.aitype = "teacherDetail2"
  13049. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13050. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13051. this.aiCallBack = callback
  13052. this.aiIndex = index
  13053. } else if (type == "aiCpote1") {
  13054. if (this.cpotetLoading.cpote1) {
  13055. this.$message({
  13056. message: "请回答完毕后再次发送",
  13057. type: "warning"
  13058. });
  13059. return;
  13060. }
  13061. this.aitype = "aiCpote1"
  13062. this.aiText = this.aiJson.cpote1
  13063. this.aiCallBack = callback
  13064. } else if (type == "aiCpote2") {
  13065. if (this.cpotetLoading.cpote2) {
  13066. this.$message({
  13067. message: "请回答完毕后再次发送",
  13068. type: "warning"
  13069. });
  13070. return;
  13071. }
  13072. this.aitype = "aiCpote2"
  13073. this.aiText = this.aiJson.cpote2
  13074. this.aiCallBack = callback
  13075. }
  13076. else if (type == "aiCpote3") {
  13077. if (this.cpotetLoading.cpote3) {
  13078. this.$message({
  13079. message: "请回答完毕后再次发送",
  13080. type: "warning"
  13081. });
  13082. return;
  13083. }
  13084. this.aitype = "aiCpote3"
  13085. this.aiText = this.aiJson.cpote3
  13086. this.aiCallBack = callback
  13087. } else if (type == "aiCpote4") {
  13088. if (this.cpotetLoading.cpote4) {
  13089. this.$message({
  13090. message: "请回答完毕后再次发送",
  13091. type: "warning"
  13092. });
  13093. return;
  13094. }
  13095. this.aitype = "aiCpote4"
  13096. this.aiText = this.aiJson.cpote4
  13097. this.aiCallBack = callback
  13098. }
  13099. this.dialogVisibleAiD = true
  13100. },
  13101. async aiConfirm(msg) {
  13102. let sub = []
  13103. if (this.courseTypeId.length) {
  13104. for (var i = 0; i < this.courseTypeId.length; i++) {
  13105. let _sid = this.courseTypeId[i]
  13106. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13107. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13108. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13109. }
  13110. }
  13111. }
  13112. }
  13113. let mclass = []
  13114. if (this.courseTypeId.length) {
  13115. for (var i = 0; i < this.courseTypeId.length; i++) {
  13116. let _sid = this.courseTypeId[i]
  13117. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13118. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13119. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13120. }
  13121. }
  13122. }
  13123. }
  13124. let url = []
  13125. if (this.infoData.length) {
  13126. for (var i = 0; i < this.infoData.length; i++) {
  13127. url.push(this.infoData[i].url)
  13128. }
  13129. }
  13130. if (this.aitype == "aiDetail") {
  13131. this.detailYou(msg)
  13132. } else if (this.aitype == "aiOutline") {
  13133. this.loading = true
  13134. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13135. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13136. let message = `NOTICE
  13137. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13138. 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.
  13139. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13140. Instruction: Based on the context, follow "Format example", write content.
  13141. # Context
  13142. ## 要求
  13143. ${msg} 以及##参考资料
  13144. ## 参考资料
  13145. 课程名字:${this.courseName}
  13146. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  13147. ${sub.length ? '学科:' + sub.join(",") : ''}
  13148. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13149. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13150. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13151. # Format example
  13152. [{"task": "任务名称1","detail": "任务设计和评价标准"},{"task": "任务名称2","detail": "任务设计和评价标准"}]`
  13153. this.aiGet2(message, () => {
  13154. this.loading = false
  13155. this.isOutline = true
  13156. })
  13157. } else if (this.aitype == "aiTask") {
  13158. var _text = ""
  13159. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13160. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  13161. }
  13162. let message = `NOTICE
  13163. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13164. 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.
  13165. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13166. Instruction: Based on the context, follow "Format example", write content.
  13167. # Context
  13168. ## 要求
  13169. ${msg} 为**每个教学任务分别输出**以下内容。
  13170.  
  13171. ${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','') : ''}
  13172. ## 输出格式与要求
  13173. •任务名:
  13174. •任务描述:该描述是教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。
  13175. •评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  13176. •平台工具:
  13177. •工具名:**从工具列表**中选择0~2个工具用于学生阶段性成果提交:工具列表:[电子白板,文档,思维导图,表格,作业提交,调查问卷,问答,排序,选择匹配题,个人评价,英语写作,英语口语]
  13178. •工具指引:以友好,明确的口吻告诉学生该如何使用该工具
  13179. ## 参考资料
  13180. 教学任务教案:${_text}
  13181.  
  13182. ## 示例
  13183. 任务一:探究热的传递方式
  13184. •描述:亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  13185. 工具:
  13186. •工具1名称:作业提交
  13187. •工具1指引:在工作单里详细记录你的实验步骤、观察到的现象以及你的分析和结论。请确保包含实验的目的、使用的材料、实验过程的描述和结果的解释。
  13188. •工具2名称:问答
  13189. •工具2指引:通过问答工具回答与热的传递方式相关的问题,以检验你对教学内容的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案。
  13190.  
  13191. ## 评价维度
  13192. •实验设计和执行能力:学生应能够独立设计实验,清晰地描述实验步骤,并准确执行实验过程。
  13193. •观察和记录技能:学生需要展示在实验中对热传递现象的观察能力,并能够详细记录实验数据和现象。
  13194. •分析和解释能力:学生应能够对实验结果进行分析,解释热对流的形成原理,并能将实验结果与理论知识相联系。
  13195. # Format example
  13196. [{"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":"工具描述"}]}]`
  13197. this.loading = true
  13198. this.aiGet3(message, this.aiCallBack)
  13199. } else if (this.aitype == "aiDetail1") {
  13200. this.aiDetail(msg, this.aiIndex)
  13201. } else if (this.aitype == "aiDetail2") {
  13202. this.aiDetail2(msg, this.aiIndex)
  13203. } else if (this.aitype == "aiDetail3") {
  13204. let _index = this.aiIndex.split('-')
  13205. this.aiDetail3(msg, _index[0], _index[1])
  13206. } else if (this.aitype == "aiDetail4") {
  13207. this.aiDetail4(msg, this.aiIndex)
  13208. } else if (this.aitype == "teacherDetail") {
  13209. this.aiDetail5(msg, this.aiIndex)
  13210. } else if (this.aitype == "teacherDetail2") {
  13211. this.aiDetail52(msg, this.aiIndex)
  13212. } else if (this.aitype == "aiCpote1") {
  13213. this.aiCpote(msg, this.aiCallBack)
  13214. } else if (this.aitype == "aiCpote2") {
  13215. this.aiCpote(msg, this.aiCallBack)
  13216. } else if (this.aitype == "aiCpote3") {
  13217. this.aiCpote(msg, this.aiCallBack)
  13218. } else if (this.aitype == "aiCpote4") {
  13219. this.aiCpote(msg, this.aiCallBack)
  13220. } else if (this.aitype == "aiTeacher") {
  13221. this.loading = true
  13222. var _text = ""
  13223. for (var i = 0; i < this.dArray.length; i++) {
  13224. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13225. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13226. let message = ` NOTICE
  13227. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13228. 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.
  13229. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13230. Instruction: Based on the context, follow "Format example", write content.
  13231. # Context
  13232. ## 要求
  13233. ${msg} 以及${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '##任务大纲' : '##目标层,##任务簇'}
  13234. ${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 任务大纲\n'+_text : ''}
  13235. ${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','') : ''}
  13236. ## Format example
  13237. [{"task": "任务名称1","detail": "教案输出为文本格式就行"},{"task": "任务名称2","detail": "教案输出为文本格式就行"}]`
  13238. this.aiGet4(message, () => {
  13239. this.loading = false
  13240. this.isOutline2 = true
  13241. })
  13242. } else if (this.aitype == "aiTeacher2"){
  13243. this.isOutline2 = true
  13244. setTimeout(()=>{
  13245. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13246. this.aiDetail52(msg, i)
  13247. }
  13248. }, 0)
  13249. }
  13250. this.setAiJson(this.aitype, msg)
  13251. },
  13252. detailYou(message) {
  13253. this.textLoading = true
  13254. this.ttextLoading = true
  13255. let sub = []
  13256. if (this.courseTypeId.length) {
  13257. for (var i = 0; i < this.courseTypeId.length; i++) {
  13258. let _sid = this.courseTypeId[i]
  13259. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13260. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13261. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13262. }
  13263. }
  13264. }
  13265. }
  13266. let mclass = []
  13267. if (this.courseTypeId.length) {
  13268. for (var i = 0; i < this.courseTypeId.length; i++) {
  13269. let _sid = this.courseTypeId[i]
  13270. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13271. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13272. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13273. }
  13274. }
  13275. }
  13276. }
  13277. let url = []
  13278. if (this.infoData.length) {
  13279. for (var i = 0; i < this.infoData.length; i++) {
  13280. url.push(this.infoData[i].url)
  13281. }
  13282. }
  13283. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13284. // --------
  13285. // ## 补充参考资料
  13286. // 补充资料:${url.join(",")}
  13287. // 补充描述:${this.courseText2} ##补充参考资料和
  13288. let msg = `
  13289. 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.
  13290. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13291. --------
  13292. ## 参考资料
  13293. 课程名字:${this.courseName}
  13294. ${sub.length ? '学科:' + sub.join(",") : ''}
  13295. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13296. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13297. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13298. --------
  13299. ## 要求
  13300. ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品,格式参考## Format example
  13301. --------
  13302. ## Format example
  13303. -课程简要描述:
  13304. -驱动性问题:**1个**驱动整个项目的问题
  13305. -最终作品:对应解决驱动性问题的作品,可个人可团队`
  13306. this.aiGet(msg)
  13307. },
  13308. setUnitJson() {
  13309. 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 }] }
  13310. this.$forceUpdate()
  13311. },
  13312. async aiGet(messages) {
  13313. let _this = this
  13314. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13315. if (_this.infoData.length) {
  13316. for (var i = 0; i < _this.infoData.length; i++) {
  13317. if(_this.infoData[i].fileid){
  13318. fileid.push(_this.infoData[i].fileid)
  13319. }else {
  13320. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13321. if(_fileid){
  13322. _this.infoData[i].fileid = _fileid
  13323. _this.$forceUpdate();
  13324. fileid.push(_fileid)
  13325. }
  13326. }
  13327. }
  13328. }
  13329. let _uuid = uuidv4();
  13330. // let params = JSON.stringify({
  13331. // // "model": "Chat",
  13332. // model: 'gpt-3.5-turbo',
  13333. // temperature: 0,
  13334. // max_tokens: 4096,
  13335. // top_p: 1,
  13336. // frequency_penalty: 0,
  13337. // presence_penalty: 0,
  13338. // messages: [{
  13339. // content: messages,
  13340. // role: 'user'
  13341. // }],
  13342. // uid: _uuid,
  13343. // mind_map_question: "",
  13344. // })
  13345. let params = {
  13346. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  13347. message: [{"type":"text", "text":messages}],
  13348. session_name: _uuid,
  13349. userId: _this.userid,
  13350. uid: _uuid,
  13351. file_ids: fileid.length ? [...fileid] : '',
  13352. }
  13353. // let params = JSON.stringify({
  13354. // message: {
  13355. // anthropic_version: "bedrock-2023-05-31",
  13356. // max_tokens: 4096,
  13357. // temperature: 0,
  13358. // top_p: 1,
  13359. // messages: [{
  13360. // "role": "user",
  13361. // "content": messages
  13362. // }] ,
  13363. // },
  13364. // uid: _uuid,
  13365. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13366. // });
  13367. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13368. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  13369. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  13370. console.log(response);
  13371. // let data = response.data.FunctionResponse
  13372. // if (data.choices && data.choices.length && data.choices[0].message) {
  13373. // _this.courseText = data.choices[0].message.content
  13374. // }
  13375. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  13376. } else {
  13377. this.$message.warning(response.data.FunctionResponse.result);
  13378. }
  13379. }).catch(function (error) {
  13380. _this.textLoading = false
  13381. _this.ttextLoading = false
  13382. console.log(error);
  13383. });
  13384. await _this.aiGetgetAiContent(_uuid)
  13385. },
  13386. aiGetgetAiContent(_uid) {
  13387. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13388. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13389. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13390. let _allText = "";
  13391. let _mdText = "";
  13392. _source.onmessage = _e => {
  13393. let _eData = JSON.parse(_e.data).content;
  13394. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  13395. //对话已经完成
  13396. _mdText = _mdText.replace("_", "");
  13397. _source.close();
  13398. this.courseText = _mdText;
  13399. this.textLoading = false
  13400. this.ttextLoading = false
  13401. return;
  13402. } else {
  13403. //对话还在继续
  13404. let _text = "";
  13405. _text = _eData.replaceAll("'", "");
  13406. if (_allText == "") {
  13407. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  13408. } else {
  13409. _allText += _text;
  13410. }
  13411. _mdText = _allText + "_";
  13412. _mdText = _mdText.replace(/\\n/g, "\n");
  13413. _mdText = _mdText.replace(/\\/g, "");
  13414. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  13415. //转化返回的回复流数据
  13416. this.courseText = _mdText;
  13417. this.textLoading = false
  13418. // 处理流数据
  13419. }
  13420. this.$forceUpdate();
  13421. };
  13422. },
  13423. async aiGet2(messages, callback) {
  13424. let _this = this
  13425. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13426. if (_this.infoData.length) {
  13427. for (var i = 0; i < _this.infoData.length; i++) {
  13428. if(_this.infoData[i].fileid){
  13429. fileid.push(_this.infoData[i].fileid)
  13430. }else {
  13431. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13432. if(_fileid){
  13433. _this.infoData[i].fileid = _fileid
  13434. _this.$forceUpdate();
  13435. fileid.push(_fileid)
  13436. }
  13437. }
  13438. }
  13439. }
  13440. console.log('fileid=========',fileid)
  13441. // let params = JSON.stringify({
  13442. // // "model": "Chat",
  13443. // model: 'gpt-3.5-turbo',
  13444. // temperature: 0,
  13445. // max_tokens: 4096,
  13446. // top_p: 1,
  13447. // frequency_penalty: 0,
  13448. // presence_penalty: 0,
  13449. // messages: [{
  13450. // content: messages,
  13451. // role: 'user'
  13452. // }],
  13453. // stream: false,
  13454. // uid: this.userid,
  13455. // mind_map_question: "",
  13456. // })
  13457. // // let params = JSON.stringify({
  13458. // // message: {
  13459. // // anthropic_version: "bedrock-2023-05-31",
  13460. // // max_tokens: 4096,
  13461. // // temperature: 0,
  13462. // // top_p: 1,
  13463. // // messages: [{
  13464. // // content: messages,
  13465. // // role: 'user'
  13466. // // }], //
  13467. // // },
  13468. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13469. // // });
  13470. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13471. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  13472. // console.log(response);
  13473. // let data = response.data.FunctionResponse
  13474. // if (data.choices && data.choices.length && data.choices[0].message) {
  13475. // console.log(data.choices[0].message.content);
  13476. // let dArray = JSON.parse(data.choices[0].message.content)
  13477. // _this.dArray = dArray
  13478. // _this.unitJson[0].chapterInfo[0].taskJson = []
  13479. // for (var i = 0; i < dArray.length; i++) {
  13480. // let _task = dArray[i]
  13481. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  13482. // task: _task.task,
  13483. // taskDetail: "",
  13484. // taskDetail2: _task.detail,
  13485. // taskDetail3: "",
  13486. // chapterData: [],
  13487. // toolText: "",
  13488. // toolChoose: [
  13489. // {
  13490. // tool: [],
  13491. // toolDetail: "",
  13492. // toolType: 0,
  13493. // askCount: 1,
  13494. // askTitle: "",
  13495. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13496. // },
  13497. // ],
  13498. // isShowTools: false,
  13499. // askCount: 1,
  13500. // isFold: 2,
  13501. // askTitle: "",
  13502. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13503. // checkJson: [{ checkCount: [], checkPerent: [] }],
  13504. // homeworkList: [],
  13505. // })
  13506. // }
  13507. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  13508. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13509. // _this.$forceUpdate();
  13510. // }
  13511. // // if (data.result) {
  13512. // // console.log(data.result);
  13513. // // let dArray = JSON.parse(data.result)
  13514. // // _this.dArray = dArray
  13515. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  13516. // // for (var i = 0; i < dArray.length; i++) {
  13517. // // let _task = dArray[i]
  13518. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  13519. // // task: _task.task,
  13520. // // taskDetail: "",
  13521. // // taskDetail2: _task.detail,
  13522. // // taskDetail3: "",
  13523. // // chapterData: [],
  13524. // // toolText: "",
  13525. // // toolChoose: [
  13526. // // {
  13527. // // tool: [],
  13528. // // toolDetail: "",
  13529. // // toolType: 0,
  13530. // // askCount: 1,
  13531. // // askTitle: "",
  13532. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13533. // // },
  13534. // // ],
  13535. // // isShowTools: false,
  13536. // // askCount: 1,
  13537. // // isFold: 1,
  13538. // // askTitle: "",
  13539. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13540. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  13541. // // homeworkList: [],
  13542. // // })
  13543. // // }
  13544. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13545. // // _this.$forceUpdate();
  13546. // // }
  13547. // callback ? callback() : ''
  13548. // }).catch(function (error) {
  13549. // _this.loading = false
  13550. // console.log(error);
  13551. // });
  13552. let parm = {
  13553. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13554. message: [{"type":"text", "text":messages}],
  13555. session_name: uuidv4(),
  13556. userId: this.userid,
  13557. file_ids: fileid.length ? [...fileid] : '',
  13558. }
  13559. this.ajax
  13560. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13561. .then((response) => {
  13562. console.log(response);
  13563. let data = response.data.FunctionResponse
  13564. if (data.message) {
  13565. console.log(data.message);
  13566. let dArray = {}
  13567. try {
  13568. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13569. } catch (error) {
  13570. console.log("error_________________" + error);
  13571. try {
  13572. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13573. let match = data.message.match(regex);
  13574. dArray = JSON.parse(match[0]);
  13575. // var message = data.message;
  13576. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13577. // var jsonEnd = message.indexOf("```", jsonStart);
  13578. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13579. // dArray = JSON.parse(jsonString);
  13580. } catch (error) {
  13581. console.log("error_________________" + error);
  13582. }
  13583. }
  13584. _this.dArray = dArray
  13585. _this.unitJson[0].chapterInfo[0].taskJson = []
  13586. for (var i = 0; i < dArray.length; i++) {
  13587. let _task = dArray[i]
  13588. _this.unitJson[0].chapterInfo[0].taskJson.push({
  13589. task: _task.task,
  13590. taskDetail: "",
  13591. taskDetail2: _task.detail,
  13592. taskDetail3: "",
  13593. chapterData: [],
  13594. toolText: "",
  13595. toolChoose: [
  13596. {
  13597. tool: [],
  13598. toolDetail: "",
  13599. toolType: 0,
  13600. askCount: 1,
  13601. askTitle: "",
  13602. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13603. },
  13604. ],
  13605. isShowTools: false,
  13606. askCount: 1,
  13607. isFold: 2,
  13608. askTitle: "",
  13609. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13610. checkJson: [{ checkCount: [], checkPerent: [] }],
  13611. homeworkList: [],
  13612. })
  13613. }
  13614. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  13615. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13616. _this.$forceUpdate();
  13617. }
  13618. callback ? callback() : ''
  13619. })
  13620. .catch((error) => {
  13621. _this.loading = false
  13622. console.log(error);
  13623. });
  13624. },
  13625. async aiGet3(messages, callback) {
  13626. let _this = this
  13627. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13628. if (_this.infoData.length) {
  13629. for (var i = 0; i < _this.infoData.length; i++) {
  13630. if(_this.infoData[i].fileid){
  13631. fileid.push(_this.infoData[i].fileid)
  13632. }else {
  13633. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13634. if(_fileid){
  13635. _this.infoData[i].fileid = _fileid
  13636. _this.$forceUpdate();
  13637. fileid.push(_fileid)
  13638. }
  13639. }
  13640. }
  13641. }
  13642. // let params = JSON.stringify({
  13643. // // "model": "Chat",
  13644. // model: 'gpt-3.5-turbo',
  13645. // temperature: 0,
  13646. // max_tokens: 4096,
  13647. // top_p: 1,
  13648. // frequency_penalty: 0,
  13649. // presence_penalty: 0,
  13650. // messages: [{
  13651. // content: messages,
  13652. // role: 'user'
  13653. // }],
  13654. // stream: false,
  13655. // uid: this.userid,
  13656. // mind_map_question: "",
  13657. // })
  13658. // // let params = JSON.stringify({
  13659. // // message: {
  13660. // // anthropic_version: "bedrock-2023-05-31",
  13661. // // max_tokens: 4096,
  13662. // // temperature: 0,
  13663. // // top_p: 1,
  13664. // // messages: [{
  13665. // // content: messages,
  13666. // // role: 'user'
  13667. // // }], //
  13668. // // },
  13669. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13670. // // });
  13671. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13672. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  13673. // console.log(response);
  13674. // let data = response.data.FunctionResponse
  13675. // if (data.choices && data.choices.length && data.choices[0].message) {
  13676. // console.log(data.choices[0].message.content);
  13677. // let tArray = JSON.parse(data.choices[0].message.content)
  13678. // // _this.unitJson[0].chapterInfo[0].task = []
  13679. // let toolsJson = {
  13680. // "电子白板": { tool: 1, type: 1 },
  13681. // "文档": { tool: 52, type: 1 },
  13682. // "思维导图": { tool: 3, type: 1 },
  13683. // "表格": { tool: 48, type: 1 },
  13684. // "作业提交": { tool: 16, type: 2 }
  13685. // }
  13686. // for (var i = 0; i < tArray.length; i++) {
  13687. // let _task = tArray[i]
  13688. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13689. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13690. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13691. // if (_task.toolChoose.length) {
  13692. // for (var j = 0; j < _task.toolChoose.length; j++) {
  13693. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13694. // {
  13695. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  13696. // toolDetail: _task.toolChoose[j].detail,
  13697. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  13698. // askCount: 1,
  13699. // askTitle: "",
  13700. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13701. // },
  13702. // )
  13703. // }
  13704. // } else {
  13705. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13706. // {
  13707. // tool: [],
  13708. // toolDetail: "",
  13709. // toolType: 0,
  13710. // askCount: 1,
  13711. // askTitle: "",
  13712. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13713. // },
  13714. // )
  13715. // }
  13716. // }
  13717. // // if (_this.infoData.length) {
  13718. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  13719. // // }
  13720. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13721. // _this.$forceUpdate();
  13722. // }
  13723. // // if (data.result) {
  13724. // // console.log(data.result);
  13725. // // let tArray = JSON.parse(data.result)
  13726. // // // _this.unitJson[0].chapterInfo[0].task = []
  13727. // // let toolsJson = {
  13728. // // "电子白板": { tool: 1, type: 1 },
  13729. // // "文档": { tool: 52, type: 1 },
  13730. // // "思维导图": { tool: 3, type: 1 },
  13731. // // "表格": { tool: 48, type: 1 },
  13732. // // "作业提交": { tool: 16, type: 2 }
  13733. // // }
  13734. // // for (var i = 0; i < tArray.length; i++) {
  13735. // // let _task = tArray[i]
  13736. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13737. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13738. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13739. // // if (_task.toolChoose.length) {
  13740. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  13741. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13742. // // {
  13743. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  13744. // // toolDetail: _task.toolChoose[j].detail,
  13745. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  13746. // // askCount: 1,
  13747. // // askTitle: "",
  13748. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13749. // // },
  13750. // // )
  13751. // // }
  13752. // // } else {
  13753. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13754. // // {
  13755. // // tool: [],
  13756. // // toolDetail: "",
  13757. // // toolType: 0,
  13758. // // askCount: 1,
  13759. // // askTitle: "",
  13760. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13761. // // },
  13762. // // )
  13763. // // }
  13764. // // }
  13765. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13766. // // _this.$forceUpdate();
  13767. // // }
  13768. // callback ? callback() : ''
  13769. // }).catch(function (error) {
  13770. // _this.loading = false
  13771. // console.log(error);
  13772. // });
  13773. let parm = {
  13774. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13775. message: [{"type":"text", "text":messages}],
  13776. session_name: uuidv4(),
  13777. userId: this.userid,
  13778. file_ids: fileid.length ? [...fileid] : '',
  13779. }
  13780. this.ajax
  13781. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13782. .then(async (response) => {
  13783. console.log(response);
  13784. let data = response.data.FunctionResponse
  13785. if (data.message) {
  13786. console.log(data.message);
  13787. let tArray = {}
  13788. try {
  13789. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13790. } catch (error) {
  13791. console.log("error_________________" + error);
  13792. try {
  13793. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13794. let match = data.message.match(regex);
  13795. tArray = JSON.parse(match[0]);
  13796. // var message = data.message;
  13797. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13798. // var jsonEnd = message.indexOf("```", jsonStart);
  13799. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13800. // tArray = JSON.parse(jsonString);
  13801. } catch (error) {
  13802. console.log("error_________________" + error);
  13803. }
  13804. }
  13805. let toolsJson = {
  13806. "电子白板": { tool: 1, type: 1 },
  13807. "文档": { tool: 52, type: 1 },
  13808. "思维导图": { tool: 3, type: 1 },
  13809. "表格": { tool: 48, type: 1 },
  13810. "作业提交": { tool: 16, type: 2 },
  13811. "问答": { tool: 15, type: 2 },
  13812. "选择题": { tool: 45, type: 2 },
  13813. }
  13814. // answerQ:"sssssssssssssss"
  13815. for (var i = 0; i < tArray.length; i++) {
  13816. let _task = tArray[i]
  13817. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13818. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13819. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13820. if (_task.toolChoose.length) {
  13821. for (var j = 0; j < _task.toolChoose.length; j++) {
  13822. let _json = {
  13823. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  13824. toolDetail: _task.toolChoose[j].detail,
  13825. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  13826. askCount: 1,
  13827. askTitle: "",
  13828. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13829. }
  13830. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  13831. let answerQ = await _this.aiCreateQuestion(15, i)
  13832. _json.answerQ = answerQ.answerQ
  13833. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  13834. let testJson = await _this.aiCreateQuestion(45, i)
  13835. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  13836. }
  13837. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  13838. }
  13839. } else {
  13840. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13841. {
  13842. tool: [],
  13843. toolDetail: "",
  13844. toolType: 0,
  13845. askCount: 1,
  13846. askTitle: "",
  13847. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13848. },
  13849. )
  13850. }
  13851. }
  13852. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13853. _this.$forceUpdate();
  13854. _this.createTeacherAn();
  13855. }
  13856. callback ? callback() : ''
  13857. })
  13858. .catch((error) => {
  13859. _this.loading = false
  13860. console.log(error);
  13861. });
  13862. },
  13863. async aiCreateQuestion(type, task) {
  13864. let _this = this
  13865. return new Promise((resolve, reject) => {
  13866. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13867. if (_this.infoData.length) {
  13868. for (var i = 0; i < _this.infoData.length; i++) {
  13869. if(_this.infoData[i].fileid){
  13870. fileid.push(_this.infoData[i].fileid)
  13871. }
  13872. }
  13873. }
  13874. let sub = []
  13875. let mclass = []
  13876. if (this.courseTypeId.length) {
  13877. for (var i = 0; i < this.courseTypeId.length; i++) {
  13878. let _sid = this.courseTypeId[i]
  13879. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13880. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13881. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13882. }
  13883. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13884. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13885. }
  13886. }
  13887. }
  13888. }
  13889. let messages = ""
  13890. if(type == 15){
  13891. messages = `NOTICE
  13892. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13893. 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.
  13894. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13895. Instruction: Based on the context, follow "Format example", write content.
  13896. # Context
  13897. ## 任务
  13898. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  13899. ## 限制
  13900. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  13901. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  13902. ## 课程简介
  13903. 课程名字:${_this.courseName}
  13904. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  13905. ${sub.length ? '学科:' + sub.join(",") : ''}
  13906. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13907. ## 教案
  13908. ${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  13909. # Format example
  13910. {answerQ:"问题"}
  13911. `
  13912. }else if(type == 45){
  13913. messages = `NOTICE
  13914. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13915. 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.
  13916. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13917. Instruction: Based on the context, follow "Format example", write content.
  13918. # Context
  13919. ## 任务
  13920. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  13921. ## 限制
  13922. - 生成题目禁止重复。
  13923. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  13924. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  13925. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  13926. ## 课程简介
  13927. 课程名字:${_this.courseName}
  13928. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  13929. ${sub.length ? '学科:' + sub.join(",") : ''}
  13930. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13931. ## 教案
  13932. ${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  13933. # Format example
  13934. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  13935. `
  13936. }
  13937. let parm = {
  13938. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13939. message: [{"type":"text", "text":messages}],
  13940. session_name: uuidv4(),
  13941. userId: this.userid,
  13942. file_ids: fileid.length ? [...fileid] : '',
  13943. }
  13944. this.ajax
  13945. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13946. .then((response) => {
  13947. console.log(response);
  13948. let data = response.data.FunctionResponse
  13949. if (data.message) {
  13950. console.log(data.message);
  13951. try {
  13952. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13953. let tArray = {}
  13954. try {
  13955. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13956. } catch (error) {
  13957. console.log("error_________________" + error);
  13958. try {
  13959. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13960. let match = data.message.match(regex);
  13961. tArray = JSON.parse(match[0]);
  13962. // var message = data.message;
  13963. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13964. // var jsonEnd = message.indexOf("```", jsonStart);
  13965. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13966. // tArray = JSON.parse(jsonString);
  13967. } catch (error) {
  13968. console.log("error_________________" + error);
  13969. }
  13970. }
  13971. resolve(tArray)
  13972. } catch (error) {
  13973. if(type == 15){
  13974. resolve({answerQ: "题目"})
  13975. }else if(type == 45){
  13976. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13977. }
  13978. }
  13979. }else if(type == 15){
  13980. resolve({answerQ: "题目"})
  13981. }else if(type == 45){
  13982. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13983. }
  13984. })
  13985. .catch((error) => {
  13986. if(type == 15){
  13987. resolve({answerQ: "题目"})
  13988. }else if(type == 45){
  13989. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13990. }
  13991. console.log(error);
  13992. });
  13993. });
  13994. },
  13995. async aiGet4(messages, callback, clickType) {
  13996. let _this = this
  13997. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13998. if (_this.infoData.length) {
  13999. for (var i = 0; i < _this.infoData.length; i++) {
  14000. if(_this.infoData[i].fileid){
  14001. fileid.push(_this.infoData[i].fileid)
  14002. }else {
  14003. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14004. if(_fileid){
  14005. _this.infoData[i].fileid = _fileid
  14006. _this.$forceUpdate();
  14007. fileid.push(_fileid)
  14008. }
  14009. }
  14010. }
  14011. }
  14012. // let params = JSON.stringify({
  14013. // // "model": "Chat",
  14014. // model: 'gpt-3.5-turbo',
  14015. // temperature: 0,
  14016. // max_tokens: 4096,
  14017. // top_p: 1,
  14018. // frequency_penalty: 0,
  14019. // presence_penalty: 0,
  14020. // messages: [{
  14021. // content: messages,
  14022. // role: 'user'
  14023. // }],
  14024. // stream: false,
  14025. // uid: this.userid,
  14026. // mind_map_question: "",
  14027. // })
  14028. // // let params = JSON.stringify({
  14029. // // message: {
  14030. // // anthropic_version: "bedrock-2023-05-31",
  14031. // // max_tokens: 4096,
  14032. // // temperature: 0,
  14033. // // top_p: 1,
  14034. // // messages: [{
  14035. // // content: messages,
  14036. // // role: 'user'
  14037. // // }], //
  14038. // // },
  14039. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14040. // // });
  14041. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14042. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14043. // console.log(response);
  14044. // let data = response.data.FunctionResponse
  14045. // if (data.choices && data.choices.length && data.choices[0].message) {
  14046. // console.log(data.choices[0].message.content);
  14047. // let dArray = JSON.parse(data.choices[0].message.content)
  14048. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  14049. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  14050. // _this.unitJson[0].chapterInfo[0].taskJson = []
  14051. // for (var i = 0; i < dArray.length; i++) {
  14052. // let _task = dArray[i]
  14053. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14054. // task: _task.task,
  14055. // taskDetail: "",
  14056. // taskDetail2: "",
  14057. // taskDetail3: _task.detail,
  14058. // chapterData: [],
  14059. // toolText: "",
  14060. // toolChoose: [
  14061. // {
  14062. // tool: [],
  14063. // toolDetail: "",
  14064. // toolType: 0,
  14065. // askCount: 1,
  14066. // askTitle: "",
  14067. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14068. // },
  14069. // ],
  14070. // isShowTools: false,
  14071. // askCount: 1,
  14072. // isFold: 2,
  14073. // askTitle: "",
  14074. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14075. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14076. // homeworkList: [],
  14077. // })
  14078. // }
  14079. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  14080. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14081. // _this.$forceUpdate();
  14082. // } else {
  14083. // for (var i = 0; i < dArray.length; i++) {
  14084. // let _task = dArray[i]
  14085. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14086. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14087. // }else {
  14088. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  14089. // task: _task.task,
  14090. // taskDetail: "",
  14091. // taskDetail2: "",
  14092. // taskDetail3: _task.detail,
  14093. // chapterData: [],
  14094. // toolText: "",
  14095. // toolChoose: [
  14096. // {
  14097. // tool: [],
  14098. // toolDetail: "",
  14099. // toolType: 0,
  14100. // askCount: 1,
  14101. // askTitle: "",
  14102. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14103. // },
  14104. // ],
  14105. // isShowTools: false,
  14106. // askCount: 1,
  14107. // isFold: 2,
  14108. // askTitle: "",
  14109. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14110. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14111. // homeworkList: [],
  14112. // }
  14113. // }
  14114. // }
  14115. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14116. // _this.$forceUpdate();
  14117. // }
  14118. // }
  14119. // // if (data.result) {
  14120. // // console.log(data.result);
  14121. // // let dArray = JSON.parse(data.result)
  14122. // // _this.teacherText = JSON.parse(data.result)
  14123. // // for (var i = 0; i < dArray.length; i++) {
  14124. // // let _task = dArray[i]
  14125. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14126. // // }
  14127. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14128. // // _this.$forceUpdate();
  14129. // // }
  14130. // callback ? callback() : ''
  14131. // _this.loading = false
  14132. // }).catch(function (error) {
  14133. // _this.loading = false
  14134. // console.log(error);
  14135. // });
  14136. let parm = {
  14137. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14138. message: [{"type":"text", "text":messages}],
  14139. session_name: uuidv4(),
  14140. userId: this.userid,
  14141. file_ids: fileid.length ? [...fileid] : '',
  14142. }
  14143. this.ajax
  14144. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14145. .then((response) => {
  14146. console.log(response);
  14147. let data = response.data.FunctionResponse
  14148. if (data.message) {
  14149. console.log(data.message);
  14150. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14151. let dArray = []
  14152. try {
  14153. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14154. } catch (error) {
  14155. console.log("error_________________" + error);
  14156. try {
  14157. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14158. let match = data.message.match(regex);
  14159. dArray = JSON.parse(match[0]);
  14160. // var message = data.message;
  14161. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14162. // var jsonEnd = message.indexOf("```", jsonStart);
  14163. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14164. // dArray = JSON.parse(jsonString);
  14165. } catch (error) {
  14166. console.log("error_________________" + error);
  14167. }
  14168. }
  14169. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  14170. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  14171. _this.unitJson[0].chapterInfo[0].taskJson = []
  14172. for (var i = 0; i < dArray.length; i++) {
  14173. let _task = dArray[i]
  14174. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14175. task: _task.task,
  14176. taskDetail: "",
  14177. taskDetail2: "",
  14178. taskDetail3: _task.detail,
  14179. chapterData: [],
  14180. toolText: "",
  14181. toolChoose: [
  14182. {
  14183. tool: [],
  14184. toolDetail: "",
  14185. toolType: 0,
  14186. askCount: 1,
  14187. askTitle: "",
  14188. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14189. },
  14190. ],
  14191. isShowTools: false,
  14192. askCount: 1,
  14193. isFold: 2,
  14194. askTitle: "",
  14195. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14196. checkJson: [{ checkCount: [], checkPerent: [] }],
  14197. homeworkList: [],
  14198. })
  14199. }
  14200. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  14201. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14202. _this.$forceUpdate();
  14203. } else {
  14204. for (var i = 0; i < dArray.length; i++) {
  14205. let _task = dArray[i]
  14206. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14207. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14208. }else {
  14209. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  14210. task: _task.task,
  14211. taskDetail: "",
  14212. taskDetail2: "",
  14213. taskDetail3: _task.detail,
  14214. chapterData: [],
  14215. toolText: "",
  14216. toolChoose: [
  14217. {
  14218. tool: [],
  14219. toolDetail: "",
  14220. toolType: 0,
  14221. askCount: 1,
  14222. askTitle: "",
  14223. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14224. },
  14225. ],
  14226. isShowTools: false,
  14227. askCount: 1,
  14228. isFold: 2,
  14229. askTitle: "",
  14230. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14231. checkJson: [{ checkCount: [], checkPerent: [] }],
  14232. homeworkList: [],
  14233. }
  14234. }
  14235. }
  14236. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14237. _this.$forceUpdate();
  14238. }
  14239. }
  14240. callback ? callback() : ''
  14241. })
  14242. .catch((error) => {
  14243. _this.loading = false
  14244. console.log(error);
  14245. });
  14246. },
  14247. async aiDetail(msg, index) {
  14248. let _this = this
  14249. const _tindex = 'task-' + index
  14250. const _tindex2 = index
  14251. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14252. if (_this.infoData.length) {
  14253. for (var i = 0; i < _this.infoData.length; i++) {
  14254. if(_this.infoData[i].fileid){
  14255. fileid.push(_this.infoData[i].fileid)
  14256. }else {
  14257. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14258. if(_fileid){
  14259. _this.infoData[i].fileid = _fileid
  14260. _this.$forceUpdate();
  14261. fileid.push(_fileid)
  14262. }
  14263. }
  14264. }
  14265. }
  14266. let url = []
  14267. if (this.infoData.length) {
  14268. for (var i = 0; i < this.infoData.length; i++) {
  14269. url.push(this.infoData[i].url)
  14270. }
  14271. }
  14272. let messages = `
  14273. 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.
  14274. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14275. --------
  14276. ## 要求
  14277. ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
  14278. --------
  14279. ## 教学任务描述
  14280. 任务名称:${_this.aiCallBack.task}
  14281. 大纲描述:${_this.aiCallBack.taskDetail2}`
  14282. // -------- #补充参考资料和
  14283. // ## 补充参考资料
  14284. // - 补充资料:${url.join(",")}
  14285. // - 补充描述:${_this.courseText2}
  14286. _this.taskDetailLoading.push(_tindex)
  14287. _this.ttaskDetailLoading.push(_tindex)
  14288. let _uuid = uuidv4();
  14289. // let params = JSON.stringify({
  14290. // // "model": "Chat",
  14291. // model: 'gpt-3.5-turbo',
  14292. // temperature: 0,
  14293. // max_tokens: 4096,
  14294. // top_p: 1,
  14295. // frequency_penalty: 0,
  14296. // presence_penalty: 0,
  14297. // messages: [{
  14298. // content: messages,
  14299. // role: 'user'
  14300. // }],
  14301. // uid: _uuid,
  14302. // mind_map_question: "",
  14303. // })
  14304. let params = {
  14305. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14306. message: [{"type":"text", "text":messages}],
  14307. session_name: _uuid,
  14308. userId: _this.userid,
  14309. uid: _uuid,
  14310. file_ids: fileid.length ? [...fileid] : '',
  14311. }
  14312. // let params = JSON.stringify({
  14313. // message: {
  14314. // anthropic_version: "bedrock-2023-05-31",
  14315. // max_tokens: 4096,
  14316. // temperature: 0,
  14317. // top_p: 1,
  14318. // messages: [{
  14319. // "role": "user",
  14320. // "content": messages
  14321. // }] ,
  14322. // },
  14323. // uid: _uuid,
  14324. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14325. // });
  14326. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14327. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14328. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14329. console.log(response);
  14330. // let data = response.data.FunctionResponse
  14331. // if (data.choices && data.choices.length && data.choices[0].message) {
  14332. // console.log(data.choices[0].message.content);
  14333. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  14334. // _this.$forceUpdate()
  14335. // }
  14336. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14337. } else {
  14338. this.$message.warning(response.data.FunctionResponse.result);
  14339. }
  14340. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14341. }).catch(function (error) {
  14342. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14343. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  14344. console.log(error);
  14345. });
  14346. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  14347. },
  14348. aiDetailgetAiContent(_uid, loading, _tindex2) {
  14349. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14350. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14351. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14352. let _allText = "";
  14353. let _mdText = "";
  14354. _source.onmessage = _e => {
  14355. let _eData = JSON.parse(_e.data).content;
  14356. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14357. //对话已经完成
  14358. _mdText = _mdText.replace("_", "");
  14359. _source.close();
  14360. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  14361. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  14362. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  14363. return;
  14364. } else {
  14365. //对话还在继续
  14366. let _text = "";
  14367. _text = _eData.replaceAll("'", "");
  14368. if (_allText == "") {
  14369. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14370. } else {
  14371. _allText += _text;
  14372. }
  14373. _mdText = _allText + "_";
  14374. _mdText = _mdText.replace(/\\n/g, "\n");
  14375. _mdText = _mdText.replace(/\\/g, "");
  14376. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14377. //转化返回的回复流数据
  14378. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  14379. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  14380. // 处理流数据
  14381. }
  14382. this.$forceUpdate();
  14383. };
  14384. },
  14385. async aiDetail2(msg, index) {
  14386. let _this = this
  14387. const _tindex = 'task-' + index
  14388. const _tindex2 = index
  14389. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14390. if (_this.infoData.length) {
  14391. for (var i = 0; i < _this.infoData.length; i++) {
  14392. if(_this.infoData[i].fileid){
  14393. fileid.push(_this.infoData[i].fileid)
  14394. }else {
  14395. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14396. if(_fileid){
  14397. _this.infoData[i].fileid = _fileid
  14398. _this.$forceUpdate();
  14399. fileid.push(_fileid)
  14400. }
  14401. }
  14402. }
  14403. }
  14404. let messages = `
  14405. 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.
  14406. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14407. --------
  14408. ## 要求
  14409. ${msg}
  14410. --------
  14411. ## 优化信息
  14412. 任务名字: ${_this.aiCallBack.task}
  14413. 任务描述: ${_this.aiCallBack.taskDetail}
  14414. # 格式与要求
  14415. - 任务名:
  14416. - 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  14417. _this.taskDetailLoading2.push(_tindex)
  14418. _this.ttaskDetailLoading2.push(_tindex)
  14419. let _uuid = uuidv4();
  14420. // let params = JSON.stringify({
  14421. // // "model": "Chat",
  14422. // model: 'gpt-3.5-turbo',
  14423. // temperature: 0,
  14424. // max_tokens: 4096,
  14425. // top_p: 1,
  14426. // frequency_penalty: 0,
  14427. // presence_penalty: 0,
  14428. // messages: [{
  14429. // content: messages,
  14430. // role: 'user'
  14431. // }],
  14432. // uid: _uuid,
  14433. // mind_map_question: "",
  14434. // })
  14435. let params = {
  14436. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14437. message: [{"type":"text", "text":messages}],
  14438. session_name: _uuid,
  14439. userId: _this.userid,
  14440. uid: _uuid,
  14441. file_ids: fileid.length ? [...fileid] : '',
  14442. }
  14443. // let params = JSON.stringify({
  14444. // message: {
  14445. // anthropic_version: "bedrock-2023-05-31",
  14446. // max_tokens: 4096,
  14447. // temperature: 0,
  14448. // top_p: 1,
  14449. // messages: [{
  14450. // "role": "user",
  14451. // "content": messages
  14452. // }] ,
  14453. // },
  14454. // uid: _uuid,
  14455. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14456. // });
  14457. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14458. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14459. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14460. console.log(response);
  14461. // let data = response.data.FunctionResponse
  14462. // if (data.choices && data.choices.length && data.choices[0].message) {
  14463. // console.log(data.choices[0].message.content);
  14464. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  14465. // _this.$forceUpdate()
  14466. // }
  14467. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14468. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14469. } else {
  14470. this.$message.warning(response.data.FunctionResponse.result);
  14471. }
  14472. }).catch(function (error) {
  14473. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  14474. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  14475. console.log(error);
  14476. });
  14477. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  14478. },
  14479. aiDetail2getAiContent(_uid, loading, _tindex2) {
  14480. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14481. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14482. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14483. let _allText = "";
  14484. let _mdText = "";
  14485. _source.onmessage = _e => {
  14486. let _eData = JSON.parse(_e.data).content;
  14487. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14488. //对话已经完成
  14489. _mdText = _mdText.replace("_", "");
  14490. _source.close();
  14491. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  14492. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  14493. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  14494. return;
  14495. } else {
  14496. //对话还在继续
  14497. let _text = "";
  14498. _text = _eData.replaceAll("'", "");
  14499. if (_allText == "") {
  14500. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14501. } else {
  14502. _allText += _text;
  14503. }
  14504. _mdText = _allText + "_";
  14505. _mdText = _mdText.replace(/\\n/g, "\n");
  14506. _mdText = _mdText.replace(/\\/g, "");
  14507. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14508. //转化返回的回复流数据
  14509. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  14510. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  14511. // 处理流数据
  14512. }
  14513. this.$forceUpdate();
  14514. };
  14515. },
  14516. async aiDetail3(msg, index, tindex) {
  14517. let _this = this
  14518. const _tindex = 'task-' + index + tindex
  14519. const _tindex2 = index
  14520. const _tindex3 = tindex
  14521. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14522. if (_this.infoData.length) {
  14523. for (var i = 0; i < _this.infoData.length; i++) {
  14524. if(_this.infoData[i].fileid){
  14525. fileid.push(_this.infoData[i].fileid)
  14526. }else {
  14527. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14528. if(_fileid){
  14529. _this.infoData[i].fileid = _fileid
  14530. _this.$forceUpdate();
  14531. fileid.push(_fileid)
  14532. }
  14533. }
  14534. }
  14535. }
  14536. // **重点考虑该任务及工具名和工具内容的情况下*
  14537. let messages = `
  14538. 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.
  14539. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14540. --------
  14541. ## 参考内容
  14542. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14543. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  14544. 工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]] : '无'}
  14545. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  14546. --------
  14547. ## 要求
  14548. ${msg} 输出格式和内容要求参考#格式与要求
  14549. # 格式与要求
  14550. -工具指引:以友好,明确的口吻告诉学生该如何使用该工具`
  14551. _this.taskDetailLoading3.push(_tindex)
  14552. _this.ttaskDetailLoading3.push(_tindex)
  14553. let _uuid = uuidv4();
  14554. // let params = JSON.stringify({
  14555. // // "model": "Chat",
  14556. // model: 'gpt-3.5-turbo',
  14557. // temperature: 0,
  14558. // max_tokens: 4096,
  14559. // top_p: 1,
  14560. // frequency_penalty: 0,
  14561. // presence_penalty: 0,
  14562. // messages: [{
  14563. // content: messages,
  14564. // role: 'user'
  14565. // }],
  14566. // uid: _uuid,
  14567. // mind_map_question: "",
  14568. // })
  14569. let params = {
  14570. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14571. message: [{"type":"text", "text":messages}],
  14572. session_name: _uuid,
  14573. userId: _this.userid,
  14574. uid: _uuid,
  14575. file_ids: fileid.length ? [...fileid] : '',
  14576. }
  14577. // let params = JSON.stringify({
  14578. // message: {
  14579. // anthropic_version: "bedrock-2023-05-31",
  14580. // max_tokens: 4096,
  14581. // temperature: 0,
  14582. // top_p: 1,
  14583. // messages: [{
  14584. // "role": "user",
  14585. // "content": messages
  14586. // }] ,
  14587. // },
  14588. // uid: _uuid,
  14589. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14590. // });
  14591. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14592. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14593. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14594. console.log(response);
  14595. let data = response.data.FunctionResponse
  14596. // if (data.choices && data.choices.length && data.choices[0].message) {
  14597. // console.log(data.choices[0].message.content);
  14598. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  14599. // _this.$forceUpdate()
  14600. // }
  14601. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  14602. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14603. } else {
  14604. this.$message.warning(response.data.FunctionResponse.result);
  14605. }
  14606. }).catch(function (error) {
  14607. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  14608. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  14609. console.log(error);
  14610. });
  14611. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  14612. },
  14613. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  14614. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14615. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14616. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14617. let _allText = "";
  14618. let _mdText = "";
  14619. _source.onmessage = _e => {
  14620. let _eData = JSON.parse(_e.data).content;
  14621. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14622. //对话已经完成
  14623. _mdText = _mdText.replace("_", "");
  14624. _source.close();
  14625. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  14626. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  14627. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  14628. return;
  14629. } else {
  14630. //对话还在继续
  14631. let _text = "";
  14632. _text = _eData.replaceAll("'", "");
  14633. if (_allText == "") {
  14634. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14635. } else {
  14636. _allText += _text;
  14637. }
  14638. _mdText = _allText + "_";
  14639. _mdText = _mdText.replace(/\\n/g, "\n");
  14640. _mdText = _mdText.replace(/\\/g, "");
  14641. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14642. //转化返回的回复流数据
  14643. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  14644. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  14645. // 处理流数据
  14646. }
  14647. this.$forceUpdate();
  14648. };
  14649. },
  14650. async aiDetail4(msg, index) {
  14651. if (!msg.length) {
  14652. this.$message.error("请添加评价后才能优化")
  14653. return
  14654. }
  14655. let _this = this
  14656. const _tindex = 'task-' + index
  14657. const _tindex2 = index
  14658. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14659. if (_this.infoData.length) {
  14660. for (var i = 0; i < _this.infoData.length; i++) {
  14661. if(_this.infoData[i].fileid){
  14662. fileid.push(_this.infoData[i].fileid)
  14663. }else {
  14664. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14665. if(_fileid){
  14666. _this.infoData[i].fileid = _fileid
  14667. _this.$forceUpdate();
  14668. fileid.push(_fileid)
  14669. }
  14670. }
  14671. }
  14672. }
  14673. var _text = ""
  14674. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  14675. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  14676. }
  14677. // **重点考虑该任务详情**
  14678. let messages = `
  14679. 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.
  14680. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14681. #Context
  14682. ## 参考内容
  14683. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14684. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  14685. 评价设计:${_text}
  14686. ## 要求
  14687. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  14688. # 格式与要求
  14689. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  14690. # Format example
  14691. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  14692. _this.taskDetailLoading4.push(_tindex)
  14693. // let params = JSON.stringify({
  14694. // // "model": "Chat",
  14695. // model: 'gpt-3.5-turbo',
  14696. // temperature: 0,
  14697. // max_tokens: 4096,
  14698. // top_p: 1,
  14699. // frequency_penalty: 0,
  14700. // presence_penalty: 0,
  14701. // messages: [{
  14702. // content: messages,
  14703. // role: 'user'
  14704. // }],
  14705. // stream: false,
  14706. // uid: this.userid,
  14707. // mind_map_question: "",
  14708. // })
  14709. let params = {
  14710. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14711. message: [{"type":"text", "text":messages}],
  14712. session_name: uuidv4(),
  14713. userId: _this.userid,
  14714. file_ids: fileid.length ? [...fileid] : '',
  14715. }
  14716. // let params = JSON.stringify({
  14717. // message: {
  14718. // anthropic_version: "bedrock-2023-05-31",
  14719. // max_tokens: 4096,
  14720. // temperature: 0,
  14721. // top_p: 1,
  14722. // messages: [{
  14723. // content: messages,
  14724. // role: 'user'
  14725. // }], //
  14726. // },
  14727. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14728. // });
  14729. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14730. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  14731. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14732. console.log(response);
  14733. let data = response.data.FunctionResponse
  14734. // if (data.choices && data.choices.length && data.choices[0].message) {
  14735. // console.log(data.choices[0].message.content);
  14736. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  14737. // _this.$forceUpdate()
  14738. // }
  14739. if (data.message) {
  14740. console.log(data.message);
  14741. try {
  14742. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  14743. } catch (e) {
  14744. console.log("error_________________" + e);
  14745. // _this.$message.error(data.message)
  14746. try {
  14747. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14748. let match = data.message.match(regex);
  14749. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  14750. // var message = data.message;
  14751. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14752. // var jsonEnd = message.indexOf("```", jsonStart);
  14753. // if (jsonStart !== -1 && jsonEnd !== -1) {
  14754. // var jsonString = message
  14755. // .substring(jsonStart, jsonEnd)
  14756. // .trim();
  14757. // var _data2 = JSON.parse(jsonString);
  14758. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  14759. // }
  14760. } catch (error) {
  14761. }
  14762. }
  14763. _this.$forceUpdate()
  14764. }
  14765. // if (data.result) {
  14766. // console.log(data.result);
  14767. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  14768. // _this.$forceUpdate()
  14769. // }
  14770. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14771. }).catch(function (error) {
  14772. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14773. console.log(error);
  14774. });
  14775. },
  14776. async aiDetail5(msg, index) {
  14777. let _this = this
  14778. const _tindex = 'task-' + index
  14779. const _tindex2 = index
  14780. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14781. if (_this.infoData.length) {
  14782. for (var i = 0; i < _this.infoData.length; i++) {
  14783. if(_this.infoData[i].fileid){
  14784. fileid.push(_this.infoData[i].fileid)
  14785. }else {
  14786. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14787. if(_fileid){
  14788. _this.infoData[i].fileid = _fileid
  14789. _this.$forceUpdate();
  14790. fileid.push(_fileid)
  14791. }
  14792. }
  14793. }
  14794. }
  14795. let url = []
  14796. if (this.infoData.length) {
  14797. for (var i = 0; i < this.infoData.length; i++) {
  14798. url.push(this.infoData[i].url)
  14799. }
  14800. }
  14801. var _text = ""
  14802. var _text2 = ""
  14803. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  14804. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  14805. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  14806. }
  14807. let messages = `
  14808. 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.
  14809. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14810. --------
  14811. ## 要求
  14812. ${msg}
  14813. -------
  14814. ## 本教案描述
  14815. ${_this.aiCallBack}
  14816. -------
  14817. ## 课程大纲
  14818. ${_text}
  14819. -------
  14820. ## 其他教学任务教案
  14821. ${_text2}`
  14822. // ## 补充参考资料
  14823. // - 补充资料:${url.join(",")}
  14824. // - 补充描述:${this.courseText2}
  14825. _this.taskDetailLoading5.push(_tindex)
  14826. _this.ttaskDetailLoading5.push(_tindex)
  14827. let _uuid = uuidv4();
  14828. // let params = JSON.stringify({
  14829. // // "model": "Chat",
  14830. // model: 'gpt-3.5-turbo',
  14831. // temperature: 0,
  14832. // max_tokens: 4096,
  14833. // top_p: 1,
  14834. // frequency_penalty: 0,
  14835. // presence_penalty: 0,
  14836. // messages: [{
  14837. // content: messages,
  14838. // role: 'user'
  14839. // }],
  14840. // uid: _uuid,
  14841. // mind_map_question: "",
  14842. // })
  14843. let params = {
  14844. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14845. message: [{"type":"text", "text":messages}],
  14846. session_name: _uuid,
  14847. userId: _this.userid,
  14848. uid: _uuid,
  14849. file_ids: fileid.length ? [...fileid] : '',
  14850. }
  14851. // let params = JSON.stringify({
  14852. // message: {
  14853. // anthropic_version: "bedrock-2023-05-31",
  14854. // max_tokens: 4096,
  14855. // temperature: 0,
  14856. // top_p: 1,
  14857. // messages: [{
  14858. // "role": "user",
  14859. // "content": messages
  14860. // }] ,
  14861. // },
  14862. // uid: _uuid,
  14863. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14864. // });
  14865. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14866. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14867. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14868. console.log(response);
  14869. // let data = response.data.FunctionResponse
  14870. // if (data.choices && data.choices.length && data.choices[0].message) {
  14871. // console.log(data.choices[0].message.content);
  14872. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  14873. // _this.$forceUpdate()
  14874. // }
  14875. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14876. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14877. } else {
  14878. this.$message.warning(response.data.FunctionResponse.result);
  14879. }
  14880. }).catch(function (error) {
  14881. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  14882. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  14883. console.log(error);
  14884. });
  14885. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  14886. },
  14887. aiDetail5getAiContent(_uid, loading, _tindex2) {
  14888. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14889. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14890. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14891. let _allText = "";
  14892. let _mdText = "";
  14893. _source.onmessage = _e => {
  14894. let _eData = JSON.parse(_e.data).content;
  14895. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14896. //对话已经完成
  14897. _mdText = _mdText.replace("_", "");
  14898. _source.close();
  14899. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  14900. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  14901. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  14902. return;
  14903. } else {
  14904. //对话还在继续
  14905. let _text = "";
  14906. _text = _eData.replaceAll("'", "");
  14907. if (_allText == "") {
  14908. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14909. } else {
  14910. _allText += _text;
  14911. }
  14912. _mdText = _allText + "_";
  14913. _mdText = _mdText.replace(/\\n/g, "\n");
  14914. _mdText = _mdText.replace(/\\/g, "");
  14915. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14916. //转化返回的回复流数据
  14917. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  14918. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  14919. // 处理流数据
  14920. }
  14921. this.$forceUpdate();
  14922. };
  14923. },
  14924. async aiDetail52(msg, index) {
  14925. let _this = this
  14926. const _tindex = 'task-' + index
  14927. const _tindex2 = index
  14928. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14929. if (_this.infoData.length) {
  14930. for (var i = 0; i < _this.infoData.length; i++) {
  14931. if(_this.infoData[i].fileid){
  14932. fileid.push(_this.infoData[i].fileid)
  14933. }else {
  14934. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14935. if(_fileid){
  14936. _this.infoData[i].fileid = _fileid
  14937. _this.$forceUpdate();
  14938. fileid.push(_fileid)
  14939. }
  14940. }
  14941. }
  14942. }
  14943. let url = []
  14944. if (this.infoData.length) {
  14945. for (var i = 0; i < this.infoData.length; i++) {
  14946. url.push(this.infoData[i].url)
  14947. }
  14948. }
  14949. let messages = `
  14950. 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.
  14951. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14952. --------
  14953. ## 要求
  14954. ${msg}
  14955. -------
  14956. ## 补充描述
  14957. 课程简要描述:${_this.courseText}
  14958. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14959. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}`
  14960. // ## 补充参考资料
  14961. // - 补充资料:${url.join(",")}
  14962. // - 补充描述:${this.courseText2}
  14963. _this.taskDetailLoading5.push(_tindex)
  14964. _this.ttaskDetailLoading5.push(_tindex)
  14965. let _uuid = uuidv4();
  14966. // let params = JSON.stringify({
  14967. // // "model": "Chat",
  14968. // model: 'gpt-3.5-turbo',
  14969. // temperature: 0,
  14970. // max_tokens: 4096,
  14971. // top_p: 1,
  14972. // frequency_penalty: 0,
  14973. // presence_penalty: 0,
  14974. // messages: [{
  14975. // content: messages,
  14976. // role: 'user'
  14977. // }],
  14978. // uid: _uuid,
  14979. // mind_map_question: "",
  14980. // })
  14981. let params = {
  14982. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14983. message: [{"type":"text", "text":messages}],
  14984. session_name: _uuid,
  14985. userId: _this.userid,
  14986. uid: _uuid,
  14987. file_ids: fileid.length ? [...fileid] : '',
  14988. }
  14989. // let params = JSON.stringify({
  14990. // message: {
  14991. // anthropic_version: "bedrock-2023-05-31",
  14992. // max_tokens: 4096,
  14993. // temperature: 0,
  14994. // top_p: 1,
  14995. // messages: [{
  14996. // "role": "user",
  14997. // "content": messages
  14998. // }] ,
  14999. // },
  15000. // uid: _uuid,
  15001. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15002. // });
  15003. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15004. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15005. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15006. console.log(response);
  15007. // let data = response.data.FunctionResponse
  15008. // if (data.choices && data.choices.length && data.choices[0].message) {
  15009. // console.log(data.choices[0].message.content);
  15010. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  15011. // _this.$forceUpdate()
  15012. // }
  15013. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15014. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15015. } else {
  15016. this.$message.warning(response.data.FunctionResponse.result);
  15017. }
  15018. }).catch(function (error) {
  15019. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  15020. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  15021. console.log(error);
  15022. });
  15023. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  15024. },
  15025. aiDetail52getAiContent(_uid, loading, _tindex2) {
  15026. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15027. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15028. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15029. let _allText = "";
  15030. let _mdText = "";
  15031. _source.onmessage = _e => {
  15032. let _eData = JSON.parse(_e.data).content;
  15033. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15034. //对话已经完成
  15035. _mdText = _mdText.replace("_", "");
  15036. _source.close();
  15037. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  15038. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  15039. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  15040. return;
  15041. } else {
  15042. //对话还在继续
  15043. let _text = "";
  15044. _text = _eData.replaceAll("'", "");
  15045. if (_allText == "") {
  15046. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15047. } else {
  15048. _allText += _text;
  15049. }
  15050. _mdText = _allText + "_";
  15051. _mdText = _mdText.replace(/\\n/g, "\n");
  15052. _mdText = _mdText.replace(/\\/g, "");
  15053. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15054. //转化返回的回复流数据
  15055. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  15056. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  15057. // 处理流数据
  15058. }
  15059. this.$forceUpdate();
  15060. };
  15061. },
  15062. async aiCpote(msg, callback) {
  15063. let _this = this
  15064. let _index = _this.aitype.replace("aiC","c")
  15065. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15066. if (_this.infoData.length) {
  15067. for (var i = 0; i < _this.infoData.length; i++) {
  15068. if(_this.infoData[i].fileid){
  15069. fileid.push(_this.infoData[i].fileid)
  15070. }else {
  15071. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15072. if(_fileid){
  15073. _this.infoData[i].fileid = _fileid
  15074. _this.$forceUpdate();
  15075. fileid.push(_fileid)
  15076. }
  15077. }
  15078. }
  15079. }
  15080. let sub = []
  15081. if (this.courseTypeId.length) {
  15082. for (var i = 0; i < this.courseTypeId.length; i++) {
  15083. let _sid = this.courseTypeId[i]
  15084. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15085. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15086. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15087. }
  15088. }
  15089. }
  15090. }
  15091. let mclass = []
  15092. if (this.courseTypeId.length) {
  15093. for (var i = 0; i < this.courseTypeId.length; i++) {
  15094. let _sid = this.courseTypeId[i]
  15095. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15096. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15097. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15098. }
  15099. }
  15100. }
  15101. }
  15102. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15103. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  15104. let messages = `
  15105. 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.
  15106. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  15107. ${msg}
  15108. ## 课程简介
  15109. 课程名字:${this.courseName}
  15110. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  15111. ${sub.length ? '学科:' + sub.join(",") : ''}
  15112. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15113. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  15114. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  15115. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  15116. _this.cpoteLoading[_index] = true
  15117. _this.cpotetLoading[_index] = true
  15118. let _uuid = uuidv4();
  15119. // let params = JSON.stringify({
  15120. // // "model": "Chat",
  15121. // model: 'gpt-3.5-turbo',
  15122. // temperature: 0,
  15123. // max_tokens: 4096,
  15124. // top_p: 1,
  15125. // frequency_penalty: 0,
  15126. // presence_penalty: 0,
  15127. // messages: [{
  15128. // content: messages,
  15129. // role: 'user'
  15130. // }],
  15131. // uid: _uuid,
  15132. // mind_map_question: "",
  15133. // })
  15134. let params = {
  15135. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15136. message: [{"type":"text", "text":messages}],
  15137. session_name: _uuid,
  15138. userId: _this.userid,
  15139. uid: _uuid,
  15140. file_ids: fileid.length ? [...fileid] : '',
  15141. }
  15142. // let params = JSON.stringify({
  15143. // message: {
  15144. // anthropic_version: "bedrock-2023-05-31",
  15145. // max_tokens: 4096,
  15146. // temperature: 0,
  15147. // top_p: 1,
  15148. // messages: [{
  15149. // "role": "user",
  15150. // "content": messages
  15151. // }] ,
  15152. // },
  15153. // uid: _uuid,
  15154. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15155. // });
  15156. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15157. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15158. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15159. console.log(response);
  15160. // let data = response.data.FunctionResponse
  15161. // if (data.choices && data.choices.length && data.choices[0].message) {
  15162. // console.log(data.choices[0].message.content);
  15163. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  15164. // _this.$forceUpdate()
  15165. // }
  15166. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15167. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15168. } else {
  15169. this.$message.warning(response.data.FunctionResponse.result);
  15170. }
  15171. }).catch(function (error) {
  15172. _this.cpoteLoading[_index] = false
  15173. _this.cpotetLoading[_index] = false
  15174. callback ? callback() : ''
  15175. console.log(error);
  15176. });
  15177. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  15178. },
  15179. aiCpotegetAiContent(_uid, loading, callback) {
  15180. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15181. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15182. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15183. let _allText = "";
  15184. let _mdText = "";
  15185. _source.onmessage = _e => {
  15186. let _eData = JSON.parse(_e.data).content;
  15187. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15188. //对话已经完成
  15189. _mdText = _mdText.replace("_", "");
  15190. _source.close();
  15191. this.cpote[loading] = _mdText;
  15192. this.cpoteLoading[loading] = false
  15193. this.cpotetLoading[loading] = false
  15194. callback ? callback() : ''
  15195. return;
  15196. } else {
  15197. //对话还在继续
  15198. let _text = "";
  15199. _text = _eData.replaceAll("'", "");
  15200. if (_allText == "") {
  15201. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15202. } else {
  15203. _allText += _text;
  15204. }
  15205. _mdText = _allText + "_";
  15206. _mdText = _mdText.replace(/\\n/g, "\n");
  15207. _mdText = _mdText.replace(/\\/g, "");
  15208. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15209. //转化返回的回复流数据
  15210. this.cpote[loading] = _mdText;
  15211. this.cpoteLoading[loading] = false
  15212. // 处理流数据
  15213. }
  15214. this.$forceUpdate();
  15215. };
  15216. },
  15217. createFileid(url) {
  15218. let _this = this
  15219. return new Promise((resolve, reject) => {
  15220. try {
  15221. _this.ajax
  15222. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  15223. url: url,
  15224. })
  15225. .then((res) => {
  15226. let _data = res.data.FunctionResponse;
  15227. if (_data.result && _data.result.id) {
  15228. resolve(_data.result.id)
  15229. }
  15230. }).catch(function (error) {
  15231. resolve('')
  15232. });
  15233. }catch (e){
  15234. resolve()
  15235. }
  15236. });
  15237. }
  15238. },
  15239. beforeDestroy() {
  15240. clearTimeout(this.timer);
  15241. this.timer = null;
  15242. clearInterval(this.timer2);
  15243. this.timer2 = null;
  15244. clearInterval(this.pasteTimer);
  15245. this.pasteTimer = null;
  15246. },
  15247. beforeRouteLeave(to, from, next) {
  15248. clearTimeout(this.timer);
  15249. this.timer = null;
  15250. clearInterval(this.timer2);
  15251. this.timer2 = null;
  15252. clearInterval(this.pasteTimer);
  15253. this.pasteTimer = null;
  15254. next();
  15255. },
  15256. created() {
  15257. this.getStudent();
  15258. this.getTeacher();
  15259. this.getClass();
  15260. this.selectGrage();
  15261. this.getTemplate();
  15262. this.getTipsTemplate();
  15263. // this.selectType();
  15264. this.selectEva();
  15265. if(this.istemplate == 1){
  15266. this.isOutline = true
  15267. this.isOutline2 = true
  15268. }
  15269. this.loading = false;
  15270. this.timer2 = setInterval(() => {
  15271. this.selectEva();
  15272. }, 5000);
  15273. this.pasteTimer = setInterval(() => {
  15274. this.getPaste();
  15275. }, 1000);
  15276. setTimeout(() => {
  15277. // this.selectAllType();
  15278. this.selectCourseDetail();
  15279. }, 500);
  15280. let _this = this;
  15281. window.pasteStage = function (json) {
  15282. _this.pasteStage(json);
  15283. };
  15284. window.pasteTask = function (json) {
  15285. _this.pasteTask(json);
  15286. };
  15287. },
  15288. };
  15289. </script>
  15290. <style scoped>
  15291. @media screen and (max-width: 1280px) {
  15292. .mbCss {
  15293. flex-direction: column !important;
  15294. }
  15295. .pjCss {
  15296. width: 100% !important;
  15297. }
  15298. .evaCss {
  15299. width: 100% !important;
  15300. margin-top: 10px;
  15301. }
  15302. }
  15303. .el-table>>>.even_row {
  15304. background-color: #f1f1f1 !important;
  15305. }
  15306. .dialog_diy>>>.el-dialog__header {
  15307. background: #3c3c3c !important;
  15308. padding: 15px 20px;
  15309. }
  15310. .dialog_diy>>>.el-dialog__title {
  15311. color: #fff;
  15312. }
  15313. .dialog_diy>>>.el-dialog__headerbtn {
  15314. top: 19px;
  15315. }
  15316. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  15317. color: #fff;
  15318. }
  15319. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  15320. color: #fff;
  15321. }
  15322. .dialog_diy>>>.el-dialog__body,
  15323. .dialog_diy>>>.el-dialog__footer {
  15324. background: #fafafa;
  15325. }
  15326. .dialog_diy3>>>.el-dialog__body,
  15327. .dialog_diy3>>>.el-dialog__footer {
  15328. background: #eee !important;
  15329. }
  15330. .dialog_diy3>>>.el-dialog__body {
  15331. padding: 20px 20px;
  15332. }
  15333. .dialog_diyStage>>>.el-dialog__body {
  15334. padding: 10px;
  15335. }
  15336. .source_diy>>>.el-dialog {
  15337. height: 100% !important;
  15338. margin: 0 auto !important;
  15339. }
  15340. .source_diy>>>.el-dialog__body {
  15341. height: calc(100% - 185px);
  15342. overflow: auto;
  15343. background: #e6eaf0;
  15344. }
  15345. .source_diy>>>.el-dialog__footer {
  15346. background: #e6eaf0 !important;
  15347. }
  15348. .left {
  15349. border-right: 1px solid rgb(60, 94, 143);
  15350. display: flex;
  15351. flex-direction: column;
  15352. align-items: center;
  15353. min-height: 600px;
  15354. width: 385px;
  15355. height: 80%;
  15356. }
  15357. .tips {
  15358. color: rgb(128, 128, 128);
  15359. font-size: 12px;
  15360. width: 270px;
  15361. margin: 40px;
  15362. }
  15363. .pb_content {
  15364. height: 100% !important;
  15365. /* margin: 0 20px 0 20px; */
  15366. }
  15367. .pb_content_body {
  15368. width: 100% !important;
  15369. height: 100%;
  15370. display: flex;
  15371. }
  15372. .info_solid {
  15373. width: 270px;
  15374. height: 30px;
  15375. border-left: 1px solid #bdbdbd;
  15376. margin: 10px 0px 10px 30px;
  15377. }
  15378. .info_steps {
  15379. width: 270px;
  15380. font-size: 0.875rem;
  15381. display: flex;
  15382. align-items: center;
  15383. }
  15384. .info_steps span:nth-child(1) {
  15385. width: 30px;
  15386. height: 30px;
  15387. background: rgba(0, 0, 0, 0.38);
  15388. display: block;
  15389. color: #fff;
  15390. border-radius: 40px;
  15391. text-align: center;
  15392. line-height: 30px;
  15393. }
  15394. .steps_active {
  15395. background: #3d67bc !important;
  15396. }
  15397. .info_steps span:nth-child(2) {
  15398. margin-left: 5px;
  15399. }
  15400. .right {
  15401. height: 100%;
  15402. width: 100%;
  15403. display: flex;
  15404. overflow: hidden;
  15405. flex-direction: column;
  15406. }
  15407. .leftBar{
  15408. width: 290px;
  15409. height: calc(100% - 50px);
  15410. overflow: auto;
  15411. border-radius: 5px;
  15412. margin: 25px auto;
  15413. box-sizing: border-box;
  15414. margin-right: 10px;
  15415. }
  15416. .basic_box {
  15417. margin: 0 auto;
  15418. position: relative;
  15419. padding: 0 20px 0 20px;
  15420. }
  15421. .basic_box_success {
  15422. width: 100%;
  15423. min-height: 455px;
  15424. padding: 50px 0;
  15425. position: relative;
  15426. text-align: center;
  15427. border-bottom: 1px solid #bfbfbf;
  15428. box-sizing: border-box;
  15429. display: flex;
  15430. align-items: center;
  15431. flex-direction: column;
  15432. justify-content: center;
  15433. }
  15434. .info_title {
  15435. font-size: 1.5em;
  15436. margin-right: 25px;
  15437. /* margin: 20px 30px 20px 30px; */
  15438. }
  15439. .bInfo_title {
  15440. text-align: left;
  15441. margin: 10px 0;
  15442. }
  15443. .small_title {
  15444. font-size: 14px;
  15445. line-height: 40px;
  15446. }
  15447. .chapter_beizhu {
  15448. font-size: 12px;
  15449. font-weight: bold;
  15450. float: right;
  15451. color: rgb(128, 128, 128);
  15452. margin-top: 5px;
  15453. }
  15454. .chapter_uploadBox1 {
  15455. text-align: left;
  15456. background-color: rgb(242, 242, 242);
  15457. width: 100%;
  15458. height: 67px;
  15459. padding: 0px 15px;
  15460. border-radius: 8px;
  15461. overflow: hidden;
  15462. font-size: 16px;
  15463. box-sizing: border-box;
  15464. position: relative;
  15465. }
  15466. .chapter_add {
  15467. width: 100%;
  15468. height: 32px;
  15469. margin-top: 15px;
  15470. cursor: pointer;
  15471. }
  15472. .chapter_add_l {
  15473. margin-left: 5px;
  15474. width: 30px;
  15475. height: 30px;
  15476. float: left;
  15477. border: 1px solid #aaa;
  15478. color: #aaa;
  15479. border-radius: 50%;
  15480. font-size: 25px;
  15481. text-align: center;
  15482. }
  15483. .chapter_add_r {
  15484. font-size: 18px;
  15485. height: 40px;
  15486. line-height: 30px;
  15487. text-indent: 10px;
  15488. color: #aaa;
  15489. }
  15490. .chapter_add_r span {
  15491. font-size: 12px;
  15492. color: rgb(204, 204, 204);
  15493. }
  15494. .chapter_add_input {
  15495. display: none;
  15496. }
  15497. .line {
  15498. width: 85%;
  15499. margin: 0 auto;
  15500. border-top: 1px solid #e5e5e5;
  15501. margin-top: 20px;
  15502. }
  15503. .info_btnBox {
  15504. width: calc(100%);
  15505. display: flex;
  15506. justify-content: center;
  15507. height: 80px;
  15508. align-items: center;
  15509. background: #fff;
  15510. margin: 0 auto;
  15511. border-top: 2px solid rgb(228, 232, 237);
  15512. box-sizing: border-box;
  15513. }
  15514. .info_btnBox2 {
  15515. width: calc(100%);
  15516. display: flex;
  15517. justify-content: center;
  15518. height: 20px;
  15519. align-items: center;
  15520. background: #fff;
  15521. margin: 0 auto;
  15522. border-top: 2px solid rgb(228, 232, 237);
  15523. box-sizing: border-box;
  15524. overflow: hidden;
  15525. cursor: pointer;
  15526. }
  15527. .info_btnBox3 {
  15528. width: calc(100%);
  15529. display: flex;
  15530. justify-content: flex-end;
  15531. padding: 0 20px;
  15532. height: 60px;
  15533. align-items: center;
  15534. background: unset;
  15535. margin: 0 auto;
  15536. /* border-top: 1px solid rgb(228, 232, 237); */
  15537. box-sizing: border-box;
  15538. overflow: hidden;
  15539. cursor: pointer;
  15540. background: #fff;
  15541. border-radius: 10px;
  15542. }
  15543. .info_btn+.info_btn {
  15544. margin-left: 15px;
  15545. }
  15546. .info_btn,
  15547. .teacherWord {
  15548. color: #fff;
  15549. background-color: #0f7eff;
  15550. padding: 8px 24px;
  15551. font-size: 0.9375rem;
  15552. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  15553. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  15554. min-width: 64px;
  15555. font-weight: 500;
  15556. border-radius: 4px;
  15557. box-sizing: border-box;
  15558. border: none;
  15559. cursor: pointer;
  15560. }
  15561. .teacherWord {
  15562. width: 105px !important;
  15563. text-align: center !important;
  15564. line-height: 36px !important;
  15565. padding: 0 !important;
  15566. font-size: 14px !important;
  15567. margin: 10px 0 !important;
  15568. }
  15569. .template_box {
  15570. display: flex;
  15571. flex-wrap: wrap;
  15572. }
  15573. .wordTeacher {
  15574. display: flex;
  15575. flex-direction: column;
  15576. width: 100px;
  15577. height: 100px;
  15578. text-align: center;
  15579. font-size: 13px;
  15580. margin: 0 20px 20px 0;
  15581. background: #f0f4fa;
  15582. position: relative;
  15583. border-radius: 5px;
  15584. align-items: center;
  15585. justify-content: center;
  15586. border: 1px solid #cad1dc;
  15587. color: #0e1e33;
  15588. /* padding: 25px 0px; */
  15589. cursor: pointer;
  15590. }
  15591. .wordTeacher::after {
  15592. content: "";
  15593. display: block;
  15594. position: absolute;
  15595. width: 15px;
  15596. height: 15px;
  15597. right: 10px;
  15598. top: 10px;
  15599. background-image: url(../../../assets/icon/new/choose_a.png);
  15600. background-size: 100% 100%;
  15601. }
  15602. .wordTeacherA::after {
  15603. background-image: url(../../../assets/icon/new/choose_b.png);
  15604. }
  15605. .wordTeacher:nth-child(5n) {
  15606. margin-right: 0px;
  15607. }
  15608. .wordPic {
  15609. margin: 0 auto;
  15610. width: 30px;
  15611. height: 30px;
  15612. cursor: pointer;
  15613. }
  15614. .deleteWord {
  15615. width: 22px;
  15616. height: 22px;
  15617. position: absolute;
  15618. right: 5px;
  15619. top: -15px;
  15620. cursor: pointer;
  15621. display: none;
  15622. z-index: 999;
  15623. }
  15624. .wordPic>img,
  15625. .deleteWord>img,
  15626. .addToolImg>img {
  15627. width: 100%;
  15628. height: 100%;
  15629. }
  15630. .info_btn:hover {
  15631. background-color: #4f7cd5 !important;
  15632. }
  15633. .cru_selectBox {
  15634. display: flex;
  15635. margin: 15px 0;
  15636. flex-wrap: nowrap;
  15637. white-space: nowrap;
  15638. overflow: auto;
  15639. position: relative;
  15640. height: 40px;
  15641. max-width: calc(100% - 175px);
  15642. }
  15643. .cru_selectBox::-webkit-scrollbar {
  15644. /*滚动条整体样式*/
  15645. width: 6px;
  15646. /*高宽分别对应横竖滚动条的尺寸*/
  15647. height: 6px;
  15648. }
  15649. /*定义滚动条轨道 内阴影+圆角*/
  15650. .cru_selectBox::-webkit-scrollbar-track {
  15651. border-radius: 10px;
  15652. background-color: #eee;
  15653. }
  15654. /*定义滑块 内阴影+圆角*/
  15655. .cru_selectBox::-webkit-scrollbar-thumb {
  15656. border-radius: 10px;
  15657. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  15658. background-color: rgba(0, 0, 0, 0.1);
  15659. }
  15660. .cru_line {
  15661. position: absolute;
  15662. bottom: 0px;
  15663. transition: all 0.5s;
  15664. left: 0px;
  15665. width: 50px;
  15666. height: 4px;
  15667. left: 10px;
  15668. border-radius: 2px;
  15669. background: #3681fc;
  15670. }
  15671. .cru_select {
  15672. font-size: 18px;
  15673. margin-right: 20px;
  15674. margin-left: 5px;
  15675. cursor: pointer;
  15676. color: #0e1e33;
  15677. }
  15678. .cru_select:hover {
  15679. color: #3681fc !important;
  15680. }
  15681. .cru_selected {
  15682. color: #3681fc !important;
  15683. font-weight: bold;
  15684. }
  15685. .chapter_box {
  15686. margin-top: 10px;
  15687. width: 100%;
  15688. padding: 10px 20px;
  15689. background: #fff;
  15690. border-radius: 8px;
  15691. box-sizing: border-box;
  15692. }
  15693. .chapter_contentbox {
  15694. display: flex;
  15695. align-items: center;
  15696. /* margin-top: 15px; */
  15697. }
  15698. .chapter_contentbox .cc_title {
  15699. margin: 0px;
  15700. color: black;
  15701. display: block;
  15702. white-space: nowrap;
  15703. overflow: hidden;
  15704. text-overflow: ellipsis;
  15705. margin-right: 20px;
  15706. font-size: 18px;
  15707. height: 20px;
  15708. line-height: 22px;
  15709. min-width: fit-content;
  15710. display: flex;
  15711. }
  15712. .chapter_contentbox .cc_title::before {
  15713. content: "";
  15714. height: 100%;
  15715. width: 3px;
  15716. background: #3681fc;
  15717. border-radius: 3px;
  15718. opacity: 1;
  15719. display: block;
  15720. margin-right: 10px;
  15721. }
  15722. .chapter_contentbox .cc_input {
  15723. width: 100%;
  15724. display: flex;
  15725. }
  15726. .show_taskD {
  15727. min-width: fit-content;
  15728. margin-left: 10px;
  15729. display: flex;
  15730. align-items: center;
  15731. font-size: 14px;
  15732. cursor: pointer;
  15733. color: #717c8d;
  15734. }
  15735. .show_taskD>img {
  15736. width: 15px;
  15737. margin-right: 5px;
  15738. transition: 0.2s all;
  15739. transform: rotate(-90deg);
  15740. }
  15741. .show_taskD.show>img {
  15742. transform: rotate(0deg);
  15743. }
  15744. .show_toolD {
  15745. min-width: fit-content;
  15746. margin-left: 10px;
  15747. display: flex;
  15748. align-items: center;
  15749. font-size: 14px;
  15750. cursor: pointer;
  15751. color: #717c8d;
  15752. /* position: absolute;
  15753. right: 45px;
  15754. top: 5px; */
  15755. }
  15756. .show_toolD>img {
  15757. width: 15px;
  15758. margin-right: 5px;
  15759. transition: 0.2s all;
  15760. transform: rotate(-90deg);
  15761. }
  15762. .show_toolD.show>img {
  15763. transform: rotate(0deg);
  15764. }
  15765. .remove {
  15766. background-image: url("../../../assets/icon/new/delete_u.png");
  15767. cursor: pointer;
  15768. opacity: 0.5;
  15769. width: 30px;
  15770. min-width: 30px;
  15771. height: 30px;
  15772. background-size: 100% 100%;
  15773. background-repeat: no-repeat;
  15774. margin-left: 10px;
  15775. }
  15776. .remove1 {
  15777. background-image: url("../../../assets/remove1.png");
  15778. background-repeat: no-repeat;
  15779. background-position: 5px 10px;
  15780. width: 40px;
  15781. height: 50px;
  15782. cursor: pointer;
  15783. margin-left: 10px;
  15784. }
  15785. .binfo_input {
  15786. width: 100%;
  15787. margin: 0;
  15788. padding: 12px 14px;
  15789. display: block;
  15790. min-width: 0;
  15791. outline: none;
  15792. box-sizing: border-box;
  15793. background: none;
  15794. border: none;
  15795. border-radius: 4px;
  15796. background: #fff;
  15797. font-size: 16px;
  15798. resize: none;
  15799. font-family: "Microsoft YaHei";
  15800. min-height: 48px;
  15801. /* border: 1px solid #3682fc00; */
  15802. border: 1.5px solid #cad1dc;
  15803. }
  15804. .binfo_textarea {
  15805. border: 1.5px solid #cad1dc;
  15806. font-size: 16px;
  15807. resize: none;
  15808. /* background: #f6f6f6; */
  15809. font-family: "Microsoft YaHei";
  15810. }
  15811. .binfo_input:focus-visible {
  15812. border: 1.5px solid #3681fc !important;
  15813. }
  15814. .time {
  15815. display: flex;
  15816. margin: 35px 0 80px 0;
  15817. }
  15818. .chapter_btnbox {
  15819. width: 160px;
  15820. border-radius: 5px;
  15821. border: 2px dashed gray;
  15822. display: flex;
  15823. padding: 8px 50px;
  15824. align-items: center;
  15825. justify-content: center;
  15826. margin: 30px auto 0;
  15827. cursor: pointer;
  15828. }
  15829. .icon_add {
  15830. position: relative;
  15831. width: 24px;
  15832. padding-top: 20px;
  15833. border-radius: 100%;
  15834. border-width: 2px;
  15835. border-style: solid;
  15836. border-color: gray;
  15837. }
  15838. .icon_add i:nth-child(1) {
  15839. position: absolute;
  15840. left: 50%;
  15841. top: 50%;
  15842. height: 60%;
  15843. transform: translate(-50%, -50%);
  15844. border-width: 1px;
  15845. border-style: solid;
  15846. border-color: inherit;
  15847. }
  15848. .icon_add i:nth-child(2) {
  15849. position: absolute;
  15850. top: 50%;
  15851. left: 50%;
  15852. width: 60%;
  15853. transform: translate(-50%, -50%);
  15854. border-width: 1px;
  15855. border-style: solid;
  15856. border-color: inherit;
  15857. }
  15858. .chapter_btn_w {
  15859. font-size: 0.9375rem;
  15860. font-weight: bold;
  15861. color: gray;
  15862. margin-left: 20px;
  15863. }
  15864. .disUoloadSty>>>.el-icon-plus {
  15865. display: none !important;
  15866. /* 上传按钮隐藏 */
  15867. }
  15868. .imgLeft {
  15869. margin: 15px 0;
  15870. }
  15871. .add_info_box {
  15872. margin: 0 0 0 auto;
  15873. display: flex;
  15874. flex-wrap: wrap;
  15875. }
  15876. .add_info_box button {
  15877. margin: 0 5px 10px 0;
  15878. }
  15879. .add_info_box2 {
  15880. display: flex;
  15881. align-items: center;
  15882. flex-wrap: wrap;
  15883. }
  15884. .add_info_box2::after {
  15885. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  15886. color: red;
  15887. font-size: 14px;
  15888. margin-bottom: 10px;
  15889. }
  15890. .add_chapters_box {
  15891. text-align: left;
  15892. background-color: #fff;
  15893. width: 100%;
  15894. border-radius: 4px;
  15895. font-size: 16px;
  15896. box-sizing: border-box;
  15897. position: relative;
  15898. padding: 0 15px;
  15899. height: auto;
  15900. overflow-y: auto;
  15901. overflow-x: hidden;
  15902. border: 1px solid #cad1dc;
  15903. }
  15904. .add_chapters_box.add_c_none {
  15905. display: flex;
  15906. justify-content: center;
  15907. align-items: center;
  15908. padding: 15px;
  15909. }
  15910. .add_c_none>img {
  15911. width: 25px;
  15912. }
  15913. .add_chapters_box.add_c_none>span {
  15914. font-size: 14px;
  15915. font-weight: 400;
  15916. margin: 0 0 5px 5px;
  15917. }
  15918. .homework_box {
  15919. display: flex;
  15920. align-items: flex-start;
  15921. flex-wrap: wrap;
  15922. margin: 15px 0 0 0;
  15923. flex-direction: column;
  15924. align-content: flex-start;
  15925. }
  15926. .course_homework {
  15927. display: flex;
  15928. justify-content: center;
  15929. flex-direction: row;
  15930. align-items: center;
  15931. margin: 0 10px 0 0;
  15932. }
  15933. .course_homework>>>.el-input__inner {
  15934. width: 140px;
  15935. margin-left: 15px;
  15936. }
  15937. .chapter_upload_move {
  15938. position: relative;
  15939. background-color: #fff;
  15940. position: absolute;
  15941. width: 100%;
  15942. top: 0px;
  15943. left: 0px;
  15944. border: 1px solid #eee;
  15945. border-radius: 5px;
  15946. transition: width 2s;
  15947. -moz-transition: width 2s;
  15948. -webkit-transition: width 2s;
  15949. -o-transition: width 2s;
  15950. }
  15951. .chapter_upload_l_i {
  15952. background-image: url("../../../assets/icon.png");
  15953. background-position: 3px -165px;
  15954. width: 30px;
  15955. height: 30px;
  15956. margin: 10px auto 0 auto;
  15957. }
  15958. .course_input_box {
  15959. display: flex;
  15960. margin-right: 20px;
  15961. width: 100%;
  15962. align-items: center;
  15963. position: relative;
  15964. }
  15965. .course_input_box>.binfo_input {
  15966. width: calc(100% - 0 - 200px - 20px);
  15967. margin: 0 10px;
  15968. }
  15969. .bb_courseIcon {
  15970. width: 57px;
  15971. height: 45px;
  15972. background: #f0f4fa;
  15973. border-radius: 5px 0px 0px 5px;
  15974. display: flex;
  15975. align-items: center;
  15976. justify-content: center;
  15977. border-right: 1.5px solid rgb(202, 209, 220);
  15978. box-sizing: border-box;
  15979. position: absolute;
  15980. left: 1.5px;
  15981. }
  15982. .bb_courseIcon>img {
  15983. width: 25px;
  15984. height: auto;
  15985. }
  15986. .big_box {
  15987. /* margin-top: 20px; */
  15988. display: flex;
  15989. justify-content: space-between;
  15990. /* border-bottom: 1px solid #E0E2ED; */
  15991. }
  15992. .left_first {
  15993. display: flex;
  15994. flex-direction: column;
  15995. flex-wrap: nowrap;
  15996. width: calc(100% - 310px);
  15997. padding: 20px;
  15998. box-sizing: border-box;
  15999. background: #fff;
  16000. border-radius: 5px;
  16001. }
  16002. .right_first {
  16003. width: 300px;
  16004. display: flex;
  16005. align-items: center;
  16006. justify-content: center;
  16007. /* border-left: 1px solid #E0E2ED; */
  16008. box-sizing: border-box;
  16009. padding: 20px;
  16010. flex-direction: column;
  16011. background: #fff;
  16012. border-radius: 5px;
  16013. }
  16014. .ai_box {
  16015. width: 204px;
  16016. display: flex;
  16017. justify-content: flex-end;
  16018. margin-bottom: 15px;
  16019. }
  16020. .ai_content {
  16021. display: flex;
  16022. align-items: center;
  16023. font-size: 14px;
  16024. padding: 7px 20px;
  16025. box-sizing: border-box;
  16026. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  16027. border-radius: 12px;
  16028. font-weight: 700;
  16029. cursor: pointer;
  16030. }
  16031. .ai_content>img {
  16032. width: 40px;
  16033. margin-right: 5px;
  16034. }
  16035. .c_info_title {
  16036. padding: 15px 0 15px 0;
  16037. font-size: 16px;
  16038. font-weight: bold;
  16039. margin: 0 0 0 20px;
  16040. box-sizing: border-box;
  16041. display: flex;
  16042. align-items: center;
  16043. line-height: 20px;
  16044. }
  16045. .c_info_title::before {
  16046. content: "";
  16047. display: block;
  16048. width: 3px;
  16049. height: 20px;
  16050. background: #0061ff;
  16051. border-radius: 3px;
  16052. margin: 0 5px 0 0;
  16053. }
  16054. .right_title {
  16055. height: 30px;
  16056. padding: 15px 0 15px 20px;
  16057. border-bottom: 1px solid #f2f2f2;
  16058. font-size: 1.5em;
  16059. font-weight: bold;
  16060. color: #0f7eff;
  16061. margin: 0 auto;
  16062. }
  16063. .people {
  16064. border: 1px solid rgb(229 229 229);
  16065. /* height: 495px; */
  16066. height: 350px;
  16067. border-radius: 5px;
  16068. width: 100%;
  16069. overflow: auto;
  16070. }
  16071. .people_top {
  16072. display: flex;
  16073. width: 100%;
  16074. /* justify-content: space-between; */
  16075. /* align-items: center; */
  16076. flex-direction: column;
  16077. padding: 10px 10px 0;
  16078. box-sizing: border-box;
  16079. }
  16080. .people_nav,
  16081. .people_top_right {
  16082. /* padding: 20px 0 0 20px; */
  16083. }
  16084. .people_top_right {
  16085. height: 40px;
  16086. margin-bottom: 10px;
  16087. }
  16088. .people_search {
  16089. display: flex;
  16090. position: relative;
  16091. }
  16092. .people_search>>>.el-input__inner {
  16093. /* height: 25px; */
  16094. width: 100%;
  16095. }
  16096. .search_img {
  16097. width: 20px;
  16098. height: 20px;
  16099. position: absolute;
  16100. right: 10px;
  16101. top: 50%;
  16102. transform: translateY(-50%);
  16103. }
  16104. .search_img>img {
  16105. width: 100%;
  16106. height: 100%;
  16107. }
  16108. .people_name {
  16109. display: flex;
  16110. justify-content: flex-start;
  16111. padding: 20px 10px;
  16112. flex-direction: column;
  16113. flex-wrap: wrap;
  16114. }
  16115. .p_box {
  16116. position: relative;
  16117. }
  16118. .people_name>>>.el-checkbox {
  16119. width: 100%;
  16120. display: flex;
  16121. align-items: center;
  16122. margin-bottom: 10px;
  16123. }
  16124. .people_name>>>.el-checkbox__label {
  16125. text-overflow: ellipsis;
  16126. overflow: hidden;
  16127. width: calc(100%);
  16128. }
  16129. .people_name2>>>.el-checkbox__label {
  16130. width: calc(100% - 130px);
  16131. }
  16132. .inviteCode {
  16133. position: absolute;
  16134. right: 30px;
  16135. color: #237ade;
  16136. top: 0;
  16137. cursor: pointer;
  16138. font-size: 13px;
  16139. }
  16140. .noneInvite {
  16141. color: #a8a8a8;
  16142. }
  16143. .inviteImg {
  16144. position: absolute;
  16145. right: 5px;
  16146. top: 0;
  16147. width: 20px;
  16148. }
  16149. .right_img {
  16150. width: 150px;
  16151. height: 150px;
  16152. margin: 0 auto;
  16153. }
  16154. .right_img>img {
  16155. width: 100%;
  16156. height: 100%;
  16157. }
  16158. .number {
  16159. margin-top: 20px;
  16160. color: #4aa6ff;
  16161. text-decoration: underline;
  16162. }
  16163. .success_button {
  16164. display: flex;
  16165. text-align: center;
  16166. margin: 5% 0 auto;
  16167. flex-direction: row;
  16168. justify-content: center;
  16169. }
  16170. .look_course {
  16171. margin-right: 40px;
  16172. background: #3d67bc;
  16173. width: 200px;
  16174. height: 35px;
  16175. line-height: 35px;
  16176. color: #fff;
  16177. text-align: center;
  16178. font-size: 14px;
  16179. border-radius: 5px;
  16180. cursor: pointer;
  16181. }
  16182. .attend_others {
  16183. width: 250px;
  16184. background: #4fb13c;
  16185. height: 35px;
  16186. line-height: 35px;
  16187. color: #fff;
  16188. text-align: center;
  16189. font-size: 14px;
  16190. border-radius: 5px;
  16191. cursor: pointer;
  16192. }
  16193. .dialog_diy2>>>.el-dialog__body {
  16194. text-align: center;
  16195. }
  16196. .write_togother {
  16197. position: absolute;
  16198. right: 45px;
  16199. display: flex;
  16200. top: 5%;
  16201. }
  16202. .write_people {
  16203. font-size: 14px;
  16204. line-height: 50px;
  16205. padding-right: 10px;
  16206. }
  16207. .end_write {
  16208. background: #3d67bc;
  16209. color: #fff;
  16210. width: 100px;
  16211. height: 35px;
  16212. line-height: 35px;
  16213. text-align: center;
  16214. font-size: 14px;
  16215. border-radius: 5px;
  16216. cursor: pointer;
  16217. }
  16218. .chapter_upload+.chapter_upload {
  16219. /* margin-top: 15px; */
  16220. border-top: 1px solid #e7ebf1;
  16221. }
  16222. .chapter_upload {
  16223. height: 45px;
  16224. position: relative;
  16225. display: flex;
  16226. align-items: center;
  16227. width: 100%;
  16228. min-height: 45px;
  16229. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  16230. /* border-radius: 4px; */
  16231. /* overflow: hidden; */
  16232. box-sizing: border-box;
  16233. }
  16234. .chapter_upload_drag {
  16235. position: absolute;
  16236. cursor: pointer;
  16237. width: 16px;
  16238. height: 16px;
  16239. left: -9px;
  16240. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  16241. background-size: 100% 100%;
  16242. z-index: 10;
  16243. display: none;
  16244. }
  16245. .isNavStage>.chapter_upload_drag {
  16246. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  16247. }
  16248. .chapter_upload_t {
  16249. background-color: #fff;
  16250. position: absolute;
  16251. height: 100%;
  16252. top: 0px;
  16253. left: 0px;
  16254. box-sizing: border-box;
  16255. }
  16256. .chapter_upload_o {
  16257. width: 100%;
  16258. height: 100%;
  16259. position: relative;
  16260. z-index: 1;
  16261. }
  16262. .chapter_upload_ic {
  16263. margin: 0 15px 0px auto;
  16264. display: flex;
  16265. align-items: center;
  16266. }
  16267. .chapter_upload_ic_l {
  16268. width: 50px;
  16269. height: 50px;
  16270. float: left;
  16271. }
  16272. .chapter_upload_ic_l div {
  16273. width: 30px;
  16274. height: 35px;
  16275. background: url("../../../assets/icon/icon.png");
  16276. }
  16277. .chapter_upload_ic_edit {
  16278. height: 100%;
  16279. display: flex;
  16280. align-items: center;
  16281. cursor: pointer;
  16282. margin: 0 10px 0 0;
  16283. }
  16284. .chapter_upload_ic_edit div {
  16285. width: 18px;
  16286. height: 18px;
  16287. background-image: url("../../../assets/icon/new/edit_u.png");
  16288. background-size: 100% 100%;
  16289. }
  16290. .chapter_upload_ic_r {
  16291. height: 100%;
  16292. display: flex;
  16293. align-items: center;
  16294. cursor: pointer;
  16295. }
  16296. .chapter_upload_ic_r div {
  16297. width: 18px;
  16298. height: 18px;
  16299. background-image: url("../../../assets/icon/new/delete_u.png");
  16300. background-size: 100% 100%;
  16301. }
  16302. .chapter_upload_n {
  16303. display: flex;
  16304. text-indent: 10px;
  16305. text-decoration: none;
  16306. text-overflow: ellipsis;
  16307. white-space: nowrap;
  16308. overflow: hidden;
  16309. width: 55%;
  16310. margin-left: 10px;
  16311. cursor: pointer;
  16312. margin-top: 2px;
  16313. align-items: center;
  16314. }
  16315. .chapter_upload_l_i2,
  16316. .chapter_upload_l_i3,
  16317. .chapter_upload_l_i8,
  16318. .chapter_upload_l_i6,
  16319. .chapter_upload_l_i12,
  16320. .chapter_upload_l_i14,
  16321. .chapter_upload_l_i13 {
  16322. width: 15px;
  16323. height: 15px;
  16324. background-size: 100% 100%;
  16325. }
  16326. .chapter_upload_l_i2 {
  16327. background-image: url("../../../assets/icon/new/u_word.png");
  16328. }
  16329. .chapter_upload_l_i3 {
  16330. background-image: url("../../../assets/icon/new/u_video.png");
  16331. }
  16332. .chapter_upload_l_i8 {
  16333. background-image: url("../../../assets/icon/new/u_url.png");
  16334. }
  16335. .chapter_upload_l_i14 {
  16336. background-image: url("../../../assets/icon/new/u_source.png");
  16337. }
  16338. .chapter_upload_l_i6 {
  16339. background-image: url("../../../assets/icon/new/u_picture.png");
  16340. }
  16341. .chapter_upload_l_i12 {
  16342. background-image: url("../../../assets/icon/new/u_word.png");
  16343. }
  16344. .chapter_upload_l_i13 {
  16345. background-image: url("../../../assets/icon/new/u_img.png");
  16346. }
  16347. .chapter_upload_noSee {
  16348. background-image: url("../../../assets/icon/new/u_noUpload.png");
  16349. width: 18px;
  16350. height: 18px;
  16351. background-size: 100% 100%;
  16352. display: block;
  16353. margin-right: 10px;
  16354. }
  16355. .chapter_upload_ud {
  16356. display: flex;
  16357. flex-direction: row;
  16358. justify-content: center;
  16359. margin: 0 10px 0 0;
  16360. }
  16361. .chapter_upload_ud>.chapter_upload_up {
  16362. margin-bottom: 0;
  16363. margin-right: 10px;
  16364. }
  16365. .chapter_upload_down,
  16366. .chapter_upload_up {
  16367. width: 20px;
  16368. height: 20px;
  16369. background: #e4eaf2;
  16370. cursor: pointer;
  16371. margin: 0 auto;
  16372. border-radius: 5px;
  16373. display: flex;
  16374. justify-content: center;
  16375. align-items: center;
  16376. }
  16377. .chapter_upload_up::after,
  16378. .chapter_upload_down::after {
  16379. content: "";
  16380. background-image: url("../../../assets/icon/new/downBtn.png");
  16381. width: 13px;
  16382. height: 13px;
  16383. background-size: 100% 100%;
  16384. display: block;
  16385. }
  16386. .chapter_upload_up::after {
  16387. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  16388. }
  16389. .chapter_upload_up {
  16390. margin-bottom: 5px;
  16391. }
  16392. .chapter_upload_ud2 {
  16393. display: flex;
  16394. flex-direction: row;
  16395. justify-content: center;
  16396. margin: 0 10px 0 0;
  16397. }
  16398. .chapter_upload_ud2>.chapter_upload_up2 {
  16399. margin-bottom: 0;
  16400. margin-right: 10px;
  16401. }
  16402. .chapter_upload_down2,
  16403. .chapter_upload_up2 {
  16404. cursor: pointer;
  16405. margin: 0 auto;
  16406. border-radius: 5px;
  16407. display: flex;
  16408. justify-content: center;
  16409. align-items: center;
  16410. color: #717c8d;
  16411. font-size: 14px;
  16412. }
  16413. .chapter_upload_up2 {
  16414. margin-right: 10px;
  16415. }
  16416. .chapter_upload_up2::before,
  16417. .chapter_upload_down2::before {
  16418. content: "";
  16419. background-image: url("../../../assets/icon/new/c_down.png");
  16420. width: 14px;
  16421. height: 14px;
  16422. background-size: 100% 100%;
  16423. display: block;
  16424. margin-right: 5px;
  16425. }
  16426. .chapter_upload_up2::before {
  16427. background-image: url("../../../assets/icon/new/c_up.png") !important;
  16428. }
  16429. .addWordStyle {
  16430. display: flex;
  16431. flex-direction: row;
  16432. justify-content: flex-start;
  16433. overflow-x: auto;
  16434. white-space: nowrap;
  16435. flex-wrap: wrap;
  16436. }
  16437. /* table 样式 */
  16438. .cont>>>table {
  16439. border-top: 1px solid #ccc;
  16440. border-left: 1px solid #ccc;
  16441. }
  16442. .cont>>>table td,
  16443. .cont>>>table th {
  16444. border-bottom: 1px solid #ccc;
  16445. border-right: 1px solid #ccc;
  16446. /* padding: 20px 5px; */
  16447. padding: 5px 10px;
  16448. max-width: 0px;
  16449. height: 30px;
  16450. vertical-align: baseline;
  16451. }
  16452. .cont>>>table th {
  16453. border-bottom: 2px solid #ccc;
  16454. text-align: center;
  16455. }
  16456. /* blockquote 样式 */
  16457. .cont>>>blockquote {
  16458. display: block;
  16459. border-left: 8px solid #d0e5f2;
  16460. padding: 5px 10px;
  16461. margin: 10px 0;
  16462. line-height: 1.4;
  16463. font-size: 100%;
  16464. background-color: #f1f1f1;
  16465. }
  16466. /* code 样式 */
  16467. .cont>>>code {
  16468. display: inline-block;
  16469. /* *display: inline; */
  16470. zoom: 1;
  16471. background-color: #f1f1f1;
  16472. border-radius: 3px;
  16473. padding: 3px 5px;
  16474. margin: 0 3px;
  16475. }
  16476. .cont>>>pre code {
  16477. display: block;
  16478. }
  16479. /* ul ol 样式 */
  16480. .cont>>>ul,
  16481. ol {
  16482. margin: 10px 0 10px 20px;
  16483. }
  16484. .wordbox {
  16485. display: flex;
  16486. flex-wrap: wrap;
  16487. cursor: pointer;
  16488. width: 100%;
  16489. }
  16490. .checkword {
  16491. width: 22px;
  16492. height: 22px;
  16493. margin: 10px auto 0;
  16494. cursor: pointer;
  16495. }
  16496. .checkword img {
  16497. width: 100%;
  16498. }
  16499. .stepBg {
  16500. display: flex;
  16501. justify-content: space-between;
  16502. align-items: center;
  16503. background: #fff;
  16504. width: calc(100%);
  16505. margin: 0 auto;
  16506. }
  16507. .stepBorder {
  16508. height: 3px !important;
  16509. background: #cad1dc;
  16510. width: 100px !important;
  16511. margin: 0 15px !important;
  16512. position: relative;
  16513. }
  16514. .border-active {
  16515. background: #3681fc !important;
  16516. }
  16517. .border-active::before,
  16518. .border-active::after {
  16519. border-color: #3681fc !important;
  16520. }
  16521. .stepBorder::before,
  16522. .stepBorder::after {
  16523. content: "";
  16524. width: 9px;
  16525. height: 9px;
  16526. background: #ffffff;
  16527. opacity: 1;
  16528. border: 2px solid #acb4bf;
  16529. display: block;
  16530. box-sizing: border-box;
  16531. border-radius: 50%;
  16532. position: absolute;
  16533. top: 50%;
  16534. transform: translateY(-50%);
  16535. }
  16536. .stepBorder::after {
  16537. right: -9px;
  16538. }
  16539. .stepTop {
  16540. width: 100%;
  16541. /* border-radius: 10px; */
  16542. display: flex;
  16543. justify-content: center;
  16544. align-items: center;
  16545. flex-wrap: nowrap;
  16546. background: #fff;
  16547. /* top: 18%; */
  16548. height: 80px;
  16549. border-bottom: 2px solid rgb(228, 232, 237);
  16550. box-sizing: border-box;
  16551. }
  16552. .stepTop2 {
  16553. width: 100%;
  16554. /* border-radius: 10px; */
  16555. display: flex;
  16556. justify-content: center;
  16557. align-items: center;
  16558. flex-wrap: nowrap;
  16559. background: #fff;
  16560. /* top: 18%; */
  16561. height: 20px;
  16562. border-bottom: 2px solid rgb(228, 232, 237);
  16563. box-sizing: border-box;
  16564. overflow: hidden;
  16565. cursor: pointer;
  16566. }
  16567. .stepTop>div img {
  16568. width: 100%;
  16569. }
  16570. .stepTop>div {
  16571. height: 50px;
  16572. width: 180px;
  16573. cursor: pointer;
  16574. margin: 10px 0;
  16575. border-radius: 10px;
  16576. }
  16577. .first,
  16578. .second,
  16579. .third,
  16580. .four {
  16581. background: #3681fc;
  16582. height: 90px;
  16583. color: #fff;
  16584. display: flex;
  16585. flex-direction: row;
  16586. align-items: center;
  16587. justify-content: center;
  16588. }
  16589. .first>div:nth-child(1),
  16590. .second>div:nth-child(1),
  16591. .third>div:nth-child(1),
  16592. .four>div:nth-child(1) {
  16593. margin: 5px 10px 0 0;
  16594. width: 2rem;
  16595. }
  16596. .firstNo,
  16597. .secondNo,
  16598. .thirdNo,
  16599. .fourNo {
  16600. background: #e7e7e7;
  16601. color: #adadad;
  16602. display: flex;
  16603. flex-direction: row;
  16604. align-items: center;
  16605. justify-content: center;
  16606. }
  16607. .firstNo>div:nth-child(1),
  16608. .secondNo>div:nth-child(1),
  16609. .thirdNo>div:nth-child(1),
  16610. .fourNo>div:nth-child(1) {
  16611. margin: 5px 10px 0 0;
  16612. width: 2rem;
  16613. }
  16614. .uploadWidth>>>.el-upload {
  16615. width: 60px;
  16616. height: 60px;
  16617. position: relative;
  16618. }
  16619. .addPeople {
  16620. background: #fa6060;
  16621. width: 150px;
  16622. height: 40px;
  16623. color: #fff;
  16624. border-radius: 5px;
  16625. text-align: center;
  16626. line-height: 40px;
  16627. font-size: 14px;
  16628. cursor: pointer;
  16629. }
  16630. .kcImg {
  16631. width: 60px;
  16632. margin-left: 10px;
  16633. }
  16634. .zyImg {
  16635. width: 55px;
  16636. margin: 0 10px;
  16637. }
  16638. .deleteZy {
  16639. width: 20px;
  16640. position: absolute;
  16641. top: 5px;
  16642. right: 5px;
  16643. cursor: pointer;
  16644. }
  16645. .kcImg>img,
  16646. .zyImg>img,
  16647. .deleteZy>img {
  16648. width: 100%;
  16649. height: 100%;
  16650. }
  16651. .zyBox {
  16652. display: flex;
  16653. flex-direction: row;
  16654. align-items: center;
  16655. background: #67d37d;
  16656. color: #fff;
  16657. width: 210px;
  16658. margin: 20px 20px 0 0;
  16659. border-radius: 10px;
  16660. height: 70px;
  16661. position: relative;
  16662. }
  16663. .upCss {
  16664. display: flex;
  16665. flex-direction: row;
  16666. justify-content: flex-start;
  16667. }
  16668. .upCss>>>.el-icon-plus {
  16669. position: none !important;
  16670. width: 200px;
  16671. height: 100px;
  16672. display: flex;
  16673. flex-wrap: nowrap;
  16674. flex-direction: column;
  16675. align-items: center;
  16676. justify-content: center;
  16677. border: 1px dashed #ccc;
  16678. min-width: 78px;
  16679. min-height: 100px;
  16680. z-index: 999;
  16681. }
  16682. .upCss>>>.el-upload-list__item-name {
  16683. width: 100px;
  16684. white-space: nowrap;
  16685. overflow: hidden;
  16686. text-overflow: ellipsis;
  16687. }
  16688. .upCss>>>.el-upload-list__item .el-icon-close {
  16689. font-size: 20px;
  16690. z-index: 9999;
  16691. }
  16692. .addStageImg {
  16693. min-width: 20px;
  16694. min-height: 20px;
  16695. width: 20px;
  16696. height: 20px;
  16697. cursor: pointer;
  16698. }
  16699. .addHW {
  16700. width: 28px;
  16701. height: 28px;
  16702. cursor: pointer;
  16703. }
  16704. .addStageImg>img,
  16705. .addHW>img {
  16706. width: 100%;
  16707. height: 100%;
  16708. }
  16709. .addNewPP>>>.el-dialog__body {
  16710. padding: 5px 20px;
  16711. }
  16712. .addNewPP>>>.el-dialog {
  16713. margin-top: 5vh !important;
  16714. }
  16715. .addNewPP2>>>.el-dialog__body {
  16716. padding: 5px 0;
  16717. }
  16718. .addNewPP2>>>.el-dialog {
  16719. margin-top: 5vh !important;
  16720. }
  16721. .isHeight {
  16722. height: 680px;
  16723. }
  16724. .toolChoose {
  16725. display: flex;
  16726. /* width: 100%; */
  16727. flex-direction: row;
  16728. flex-wrap: wrap;
  16729. }
  16730. .tool,
  16731. .isToolChoose {
  16732. display: flex;
  16733. flex-direction: column;
  16734. flex-wrap: nowrap;
  16735. width: fit-content;
  16736. margin: 10px 0 10px 0;
  16737. align-items: center;
  16738. border: 2px solid #dbdbdb00;
  16739. padding: 10px 20px;
  16740. border-radius: 5px;
  16741. cursor: pointer;
  16742. /* box-shadow: 0 0 2px 0px #dedede; */
  16743. position: relative;
  16744. box-sizing: border-box;
  16745. }
  16746. .tool:hover {
  16747. border: 2px solid #a5c7ff;
  16748. }
  16749. .tool:hover>.noCTool {
  16750. display: block;
  16751. opacity: 0.5;
  16752. }
  16753. .isToolChoose {
  16754. border: 2px solid #438aff !important;
  16755. box-shadow: 0 0 2px 0px #438aff;
  16756. opacity: 1 !important;
  16757. }
  16758. .isCTool,
  16759. .noCTool {
  16760. width: 30px;
  16761. height: 30px;
  16762. position: absolute;
  16763. top: -4px;
  16764. right: -4px;
  16765. }
  16766. .noCTool {
  16767. display: none;
  16768. }
  16769. .isCTool>img,
  16770. .noCTool>img {
  16771. width: 100%;
  16772. height: 100%;
  16773. }
  16774. .tool+.tool {
  16775. margin-right: 10px;
  16776. }
  16777. .whiteBIcon {
  16778. width: 80px;
  16779. cursor: pointer;
  16780. display: flex;
  16781. flex-direction: column;
  16782. flex-wrap: nowrap;
  16783. align-items: center;
  16784. font-size: 14px;
  16785. }
  16786. .whiteBIcon>img,
  16787. .toolIcon>img,
  16788. .arrow>img {
  16789. width: 100%;
  16790. height: 100%;
  16791. }
  16792. .check img {
  16793. width: 20px;
  16794. height: 20px;
  16795. }
  16796. .whiteBIcon>img {
  16797. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  16798. border-radius: 15px;
  16799. }
  16800. .whiteBIcon>div:nth-child(2) {
  16801. height: 20px;
  16802. line-height: 20px;
  16803. }
  16804. .check {
  16805. /* width: 20px;
  16806. height: 20px; */
  16807. cursor: pointer;
  16808. margin: 10px 0 0;
  16809. }
  16810. .checkDiv {
  16811. display: flex;
  16812. align-items: center;
  16813. }
  16814. .checkDiv span {
  16815. margin-left: 5px;
  16816. color: #858585;
  16817. }
  16818. .customWidth>>>.el-dialog {
  16819. min-width: 600px !important;
  16820. }
  16821. .CollaborativeCss {
  16822. width: 100%;
  16823. display: flex;
  16824. justify-content: center;
  16825. align-items: center;
  16826. box-sizing: border-box;
  16827. padding: 10px 0;
  16828. cursor: pointer;
  16829. }
  16830. .CollaborativeCss >>> .el-tooltip {
  16831. overflow: hidden;
  16832. white-space: nowrap;
  16833. text-overflow: ellipsis;
  16834. }
  16835. .CollaborativeCss2 {
  16836. background: #e0eafb;
  16837. color: #3681fc;
  16838. font-weight: 700;
  16839. border-radius: 5px;
  16840. }
  16841. .a_addBox {
  16842. margin: 10px 0;
  16843. background: #fff;
  16844. padding: 15px;
  16845. /* max-height: 600px; */
  16846. overflow: auto;
  16847. }
  16848. .a_add_box {
  16849. border-bottom: 2px solid #eee;
  16850. padding-bottom: 25px;
  16851. }
  16852. .a_add_head {
  16853. display: flex;
  16854. align-items: center;
  16855. justify-content: space-between;
  16856. margin: 10px 0 0 0;
  16857. font-size: 18px;
  16858. }
  16859. .a_add_checkType {
  16860. margin-top: 10px;
  16861. display: flex;
  16862. font-size: 14px;
  16863. align-items: center;
  16864. }
  16865. .a_add_checkType span {
  16866. box-sizing: border-box;
  16867. padding: 0 0 5px 0;
  16868. cursor: pointer;
  16869. }
  16870. .a_add_checkType span+span {
  16871. margin-left: 10px;
  16872. }
  16873. .a_add_checkType .active {
  16874. border-bottom: 2px solid #409eff;
  16875. color: #409eff;
  16876. }
  16877. .a_add_head .a_add_head_input {
  16878. /* width: 540px; */
  16879. width: 100%;
  16880. }
  16881. .a_add_head .a_add_head_div {
  16882. display: flex;
  16883. align-items: center;
  16884. justify-content: space-between;
  16885. }
  16886. .a_add_body {
  16887. display: flex;
  16888. /* align-items: center; */
  16889. align-items: flex-end;
  16890. }
  16891. .a_add_input {
  16892. display: flex;
  16893. align-items: center;
  16894. flex-wrap: wrap;
  16895. }
  16896. .a_add_input_choice {
  16897. flex-direction: column;
  16898. margin-right: 10px;
  16899. }
  16900. .a_add_input_choice>>>.el-radio {
  16901. display: flex;
  16902. align-items: center;
  16903. flex-direction: row-reverse;
  16904. margin: 30px 0 0 0;
  16905. position: relative;
  16906. }
  16907. .a_add_input_choice>>>.el-checkbox {
  16908. display: flex;
  16909. align-items: center;
  16910. flex-direction: row-reverse;
  16911. margin: 30px 0 0 0;
  16912. position: relative;
  16913. }
  16914. .width100 {
  16915. width: 100%;
  16916. }
  16917. .a_add_input .a_add_persent {
  16918. width: 100%;
  16919. }
  16920. .a_add_persent_div {
  16921. width: 100%;
  16922. display: flex;
  16923. align-items: center;
  16924. }
  16925. .a_add_persent_div span {
  16926. margin: 5px 0;
  16927. }
  16928. .a_add_persent_div span:nth-child(1) {
  16929. width: 30%;
  16930. }
  16931. .a_add_persent_div span:nth-child(2) {
  16932. width: 7%;
  16933. }
  16934. .a_add_persent_div span:nth-child(3) {
  16935. width: 40%;
  16936. }
  16937. .a_add_body_div {
  16938. display: flex;
  16939. align-items: center;
  16940. justify-content: center;
  16941. /* flex-direction: column; */
  16942. position: absolute;
  16943. right: -20px;
  16944. transform: translateX(100%);
  16945. }
  16946. .a_add_body_div>>>.el-button--primary {
  16947. background: #466b99;
  16948. border: none;
  16949. }
  16950. .all_choose {
  16951. display: flex;
  16952. flex-direction: row;
  16953. align-items: flex-start;
  16954. width: 100%;
  16955. }
  16956. .all_choose+.all_choose {
  16957. /* margin-top: 10px */
  16958. }
  16959. .all_choose>span {
  16960. min-width: fit-content;
  16961. display: block;
  16962. white-space: nowrap;
  16963. overflow: hidden;
  16964. text-overflow: ellipsis;
  16965. margin-right: 20px;
  16966. font-weight: bold;
  16967. font-size: 14px;
  16968. }
  16969. .all_choose>>>.el-checkbox-group {
  16970. display: flex;
  16971. flex-direction: row;
  16972. width: 100%;
  16973. flex-wrap: wrap;
  16974. align-content: center;
  16975. justify-content: flex-start;
  16976. align-items: center;
  16977. margin-top: 3px;
  16978. }
  16979. .all_choose>.el-checkbox-group>>>.el-checkbox {
  16980. margin-bottom: 10px;
  16981. display: flex;
  16982. flex-direction: row;
  16983. align-items: center;
  16984. margin-right: 10px;
  16985. }
  16986. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  16987. min-width: 80px;
  16988. overflow: hidden;
  16989. width: 80px;
  16990. text-overflow: ellipsis;
  16991. white-space: nowrap;
  16992. }
  16993. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  16994. width: auto;
  16995. }
  16996. .choose>div:nth-child(3)>span {
  16997. /* letter-spacing: 0 !important; */
  16998. }
  16999. .choose {
  17000. display: flex;
  17001. flex-direction: column;
  17002. flex-wrap: nowrap;
  17003. height: 100%;
  17004. justify-content: space-evenly;
  17005. align-items: flex-start;
  17006. }
  17007. .both {
  17008. display: flex;
  17009. flex-direction: row;
  17010. flex-wrap: wrap;
  17011. width: 100%;
  17012. align-items: center;
  17013. justify-content: flex-start;
  17014. margin: 15px 0;
  17015. }
  17016. .notice>>>.el-dialog {
  17017. width: 500px !important;
  17018. text-align: center;
  17019. }
  17020. .notice>>>.el-button {
  17021. margin-top: 20px;
  17022. }
  17023. .whiteBg {
  17024. /* background: #fff; */
  17025. border-radius: 10px;
  17026. }
  17027. .wb_j_box {
  17028. display: flex;
  17029. width: 100%;
  17030. padding: 0 20px 0;
  17031. box-sizing: border-box;
  17032. }
  17033. .wb_j_box_content {
  17034. width: calc(100% - 55% - 100px);
  17035. display: flex;
  17036. align-items: center;
  17037. }
  17038. .wb_j_box_p_box {
  17039. max-width: calc(100% - 200px);
  17040. word-break: break-all;
  17041. overflow: hidden;
  17042. margin: 0 0 0 10px;
  17043. font-size: 14px;
  17044. color: #6e6e6e;
  17045. z-index: 999;
  17046. }
  17047. .chooseWho {
  17048. display: flex;
  17049. width: 410px;
  17050. flex-direction: row;
  17051. flex-wrap: nowrap;
  17052. justify-content: space-between;
  17053. padding-bottom: 10px;
  17054. }
  17055. .chooseWho>div {
  17056. cursor: pointer;
  17057. padding-bottom: 10px;
  17058. font-weight: bold;
  17059. }
  17060. .isChooseActive {
  17061. color: #3e88f4;
  17062. border-bottom: 2px solid #2f80f3;
  17063. }
  17064. .toolSort {
  17065. display: flex;
  17066. flex-direction: row;
  17067. flex-wrap: wrap;
  17068. justify-content: flex-start;
  17069. align-items: flex-start;
  17070. }
  17071. .toolSort>div {
  17072. margin-right: 10px;
  17073. }
  17074. .tools {
  17075. width: 100%;
  17076. display: flex;
  17077. flex-direction: column;
  17078. flex-wrap: nowrap;
  17079. align-items: flex-start;
  17080. }
  17081. .leftTools,
  17082. .rightTools {
  17083. width: 50%;
  17084. }
  17085. .leftTools+.leftTools {
  17086. border-top: 1px solid #dbdbdb;
  17087. padding-top: 30px;
  17088. }
  17089. .rightTools {
  17090. display: flex;
  17091. flex-direction: row;
  17092. flex-wrap: nowrap;
  17093. justify-content: space-around;
  17094. }
  17095. .firstToolList {
  17096. display: flex;
  17097. flex-direction: column;
  17098. flex-wrap: nowrap;
  17099. align-items: center;
  17100. }
  17101. .iconList {
  17102. display: flex;
  17103. flex-direction: row;
  17104. flex-wrap: wrap;
  17105. justify-content: flex-start;
  17106. align-items: center;
  17107. margin: 20px 0 5px 0;
  17108. width: 240px;
  17109. min-width: 240px;
  17110. }
  17111. .iconTool {
  17112. display: flex;
  17113. flex-direction: column;
  17114. flex-wrap: nowrap;
  17115. align-items: center;
  17116. justify-content: flex-start;
  17117. margin: 15px 10px;
  17118. }
  17119. .toolIcon {
  17120. width: 50px;
  17121. }
  17122. .taskBorder {
  17123. /* border: 1px solid #CAD1DC; */
  17124. border-radius: 10px;
  17125. margin-top: 10px;
  17126. min-height: 670px;
  17127. position: relative;
  17128. background: #fff;
  17129. padding: 20px;
  17130. overflow: hidden;
  17131. box-sizing: border-box;
  17132. }
  17133. .smallTaskBorder {
  17134. height: 405px;
  17135. min-height: 405px !important;
  17136. overflow: hidden;
  17137. }
  17138. /* .taskBorder>div {
  17139. padding: 30px 30px 10px;
  17140. } */
  17141. .addTaskBorder {
  17142. /* border: 2px solid #5E9AFC; */
  17143. border-radius: 8px;
  17144. margin-top: 10px;
  17145. cursor: pointer;
  17146. /* height: 50px;
  17147. line-height: 50px; */
  17148. background: #fff;
  17149. padding: 15px 0;
  17150. display: flex;
  17151. align-items: center;
  17152. justify-content: center;
  17153. }
  17154. /* .addTaskBorder>div {
  17155. margin: 0 auto;
  17156. display: flex;
  17157. align-items: center;
  17158. justify-content: center;
  17159. }
  17160. .addTaskBorder>div>img {
  17161. width: 20px;
  17162. }
  17163. .addTaskBorder>div>span {
  17164. font-size: 16px;
  17165. margin-left: 10px;
  17166. color: #5E9AFC;
  17167. } */
  17168. .funBlock {
  17169. display: flex;
  17170. padding: 15px 0;
  17171. flex-direction: row;
  17172. justify-content: center;
  17173. align-items: center;
  17174. position: absolute;
  17175. right: 0;
  17176. bottom: 0;
  17177. background: #fff;
  17178. width: 100%;
  17179. height: 60px;
  17180. z-index: 9;
  17181. }
  17182. .fold {
  17183. display: flex;
  17184. margin: 0 20px;
  17185. flex-direction: row;
  17186. align-items: center;
  17187. cursor: pointer;
  17188. color: #2b7bff;
  17189. }
  17190. .arrow {
  17191. margin-right: 8px;
  17192. width: 16px;
  17193. height: 16px;
  17194. min-width: 16px;
  17195. min-height: 16px;
  17196. background-size: 100% 100%;
  17197. display: block;
  17198. background-image: url(../../../assets/icon/new/u_up.png);
  17199. /* border-left: 7px solid transparent;
  17200. border-bottom: 7px solid #717C8D;
  17201. border-top: 0px solid transparent;
  17202. border-right: 7px solid transparent; */
  17203. /* box-sizing: border-box; */
  17204. transition: all 0.3s;
  17205. }
  17206. .arrowZ {
  17207. transform: rotate(180deg);
  17208. }
  17209. .addToolFun {
  17210. display: flex;
  17211. width: 150px;
  17212. flex-direction: row;
  17213. align-items: center;
  17214. justify-content: center;
  17215. border: 2px dashed #cad1dc;
  17216. border-radius: 5px;
  17217. height: 50px;
  17218. margin: 35px auto 0;
  17219. cursor: pointer;
  17220. }
  17221. .addToolFun2 {
  17222. display: flex;
  17223. width: 150px;
  17224. border: 2px dashed #cad1dc;
  17225. flex-direction: row;
  17226. align-items: center;
  17227. justify-content: center;
  17228. border-radius: 5px;
  17229. height: 50px;
  17230. margin: 0 auto 0;
  17231. cursor: pointer;
  17232. }
  17233. .addToolFun2>div,
  17234. .addToolFun>div {
  17235. display: flex;
  17236. line-height: 50px;
  17237. }
  17238. .addToolImg {
  17239. width: 20px;
  17240. height: 20px;
  17241. margin-right: 10px;
  17242. }
  17243. .addToolsDia>>>.el-dialog__body {
  17244. padding: 20px;
  17245. }
  17246. .addToolsDia>>>.el-dialog__body>.toolChoose {
  17247. padding: 0;
  17248. }
  17249. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  17250. padding: 0;
  17251. border-bottom: none;
  17252. margin-bottom: 0;
  17253. }
  17254. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  17255. width: 100%;
  17256. }
  17257. .lineCss>>>.el-form-item__label {
  17258. width: auto !important;
  17259. }
  17260. .lineCss>>>.el-form-item__content {
  17261. margin-left: 50px !important;
  17262. }
  17263. .newSteps {
  17264. display: flex;
  17265. width: 100% !important;
  17266. /* height: 80px; */
  17267. cursor: pointer;
  17268. margin: 10px 0;
  17269. border-radius: 10px;
  17270. flex-direction: row;
  17271. align-content: center;
  17272. justify-content: center;
  17273. align-items: center;
  17274. margin: 0 !important;
  17275. }
  17276. /* 评价样式 */
  17277. .elist_css {
  17278. padding-bottom: 75px !important;
  17279. }
  17280. .elist_title {
  17281. margin-bottom: 10px;
  17282. }
  17283. .elist_input {
  17284. width: 100%;
  17285. }
  17286. .elist_input_box {
  17287. display: flex;
  17288. align-items: center;
  17289. flex-wrap: wrap;
  17290. }
  17291. .elist_input_box+.elist_input_box {
  17292. margin-top: 30px;
  17293. }
  17294. .elist_input .elist_input_box input {
  17295. font: inherit;
  17296. color: currentColor;
  17297. width: 100%;
  17298. /* max-width: calc(100% - 385px); */
  17299. max-width: calc(100% - 150px);
  17300. padding: 8px 14px;
  17301. display: block;
  17302. min-width: 0;
  17303. outline: none;
  17304. border: 1px solid rgba(0, 0, 0, 0.23);
  17305. border-radius: 4px;
  17306. box-sizing: border-box;
  17307. background: #fff;
  17308. margin: 0 20px 0 0;
  17309. }
  17310. .elist_input .elist_input_box span {
  17311. height: 36px;
  17312. line-height: 36px;
  17313. color: rgb(82, 82, 82);
  17314. min-width: 80px;
  17315. }
  17316. .elist_input .elist_input_box .remove {
  17317. height: 20px;
  17318. width: 20px;
  17319. min-height: 20px;
  17320. min-width: 20px;
  17321. background-size: 100% 100%;
  17322. background-position: unset;
  17323. margin-left: 5px;
  17324. }
  17325. .elist_input_box>>>.el-rate {
  17326. display: flex;
  17327. height: 36px;
  17328. align-items: center;
  17329. }
  17330. .elist_input_box .elist_inptu_text {
  17331. width: 100%;
  17332. display: flex;
  17333. align-items: center;
  17334. margin-top: 10px;
  17335. }
  17336. .elist_input_box .elist_inptu_text input {
  17337. /* width: 500px; */
  17338. width: 100%;
  17339. max-width: unset;
  17340. }
  17341. .elist_input_box>>>.el-rate__icon {
  17342. font-size: 24px;
  17343. }
  17344. .elist_btn {
  17345. margin-top: 10px;
  17346. }
  17347. .lineTitle {
  17348. /* margin-top: 15px; */
  17349. width: 110px;
  17350. font-size: 16px;
  17351. display: flex;
  17352. align-items: center;
  17353. line-height: 20px;
  17354. }
  17355. .lineTitle::before {
  17356. content: "";
  17357. display: block;
  17358. width: 3px;
  17359. height: 20px;
  17360. background: #0061ff;
  17361. border-radius: 3px;
  17362. margin: 0 5px 0 0;
  17363. }
  17364. .clineTitle::before {
  17365. content: "";
  17366. display: block;
  17367. min-width: 10px;
  17368. width: 10px;
  17369. height: 10px;
  17370. background: #0061ff;
  17371. border-radius: 50%;
  17372. margin: 0 5px 0 0;
  17373. }
  17374. .courseTop {
  17375. display: flex;
  17376. flex-direction: row;
  17377. justify-content: space-between;
  17378. align-items: center;
  17379. width: calc(100% - 40px);
  17380. margin: 0 auto;
  17381. padding: 10px 0;
  17382. }
  17383. .stepsNav {
  17384. display: flex;
  17385. flex-direction: row;
  17386. justify-content: flex-start;
  17387. align-items: center;
  17388. }
  17389. .stepsWord {
  17390. font-size: 18px;
  17391. color: #fff;
  17392. font-weight: bold;
  17393. margin-left: auto;
  17394. background: rgb(15, 126, 255);
  17395. border-radius: 5px;
  17396. padding: 3px 25px;
  17397. box-sizing: border-box;
  17398. }
  17399. .stepBox {
  17400. width: calc(100% - 40px);
  17401. height: calc(100% - 50px);
  17402. overflow: hidden;
  17403. border-radius: 5px;
  17404. margin: 0 auto;
  17405. }
  17406. .rightBox {
  17407. width: calc(100%);
  17408. background: #f0f2f5;
  17409. /* border-radius: 10px; */
  17410. overflow: auto;
  17411. height: calc(100% - 150px);
  17412. margin: 0 auto;
  17413. position: relative;
  17414. box-sizing: border-box;
  17415. }
  17416. .e_add_top {
  17417. display: flex;
  17418. justify-content: space-between;
  17419. background: #fff;
  17420. position: absolute;
  17421. right: 20px;
  17422. height: 50px;
  17423. align-items: center;
  17424. }
  17425. .e_add_title2 {
  17426. display: flex;
  17427. align-items: center;
  17428. }
  17429. .e_add_title2 span {
  17430. width: 40px;
  17431. }
  17432. .e_add_title {
  17433. display: flex;
  17434. align-items: center;
  17435. color: #b8b8b8;
  17436. font-size: 18px;
  17437. position: relative;
  17438. height: 40px;
  17439. }
  17440. .e_add_title span {
  17441. margin-right: 10px;
  17442. }
  17443. .e_add_title .el_input {
  17444. width: 300px;
  17445. }
  17446. .e_add_title>>>.el-input__inner {
  17447. width: 400px;
  17448. }
  17449. .e_add_btn {}
  17450. .e_add_content {
  17451. display: flex;
  17452. width: 100%;
  17453. }
  17454. .e_add_list {
  17455. background: #fff;
  17456. height: 500px;
  17457. width: 210px;
  17458. position: relative;
  17459. margin: 15px 5px 0 0;
  17460. flex-shrink: 0;
  17461. display: flex;
  17462. flex-direction: column;
  17463. }
  17464. .e_add_list_title {
  17465. font-size: 20px;
  17466. width: 100%;
  17467. box-sizing: border-box;
  17468. padding: 15px 40px;
  17469. text-align: center;
  17470. border-bottom: 1px solid #eaeaea;
  17471. position: relative;
  17472. display: flex;
  17473. align-items: center;
  17474. justify-content: center;
  17475. height: 57px;
  17476. background: #f6f6f6;
  17477. }
  17478. .e_add_list_title span {
  17479. overflow: hidden;
  17480. white-space: nowrap;
  17481. text-overflow: ellipsis;
  17482. }
  17483. .e_add_list_title img {
  17484. position: absolute;
  17485. right: 15px;
  17486. width: 25px;
  17487. cursor: pointer;
  17488. top: 50%;
  17489. transform: translateY(-50%);
  17490. }
  17491. .e_add_list_body {
  17492. height: calc(100% - 187px);
  17493. overflow: auto;
  17494. }
  17495. .e_add_list_child {
  17496. width: 100%;
  17497. display: flex;
  17498. align-items: center;
  17499. justify-content: center;
  17500. position: relative;
  17501. box-sizing: border-box;
  17502. padding: 15px 40px;
  17503. text-align: center;
  17504. }
  17505. .e_add_list_child span {
  17506. overflow: hidden;
  17507. white-space: nowrap;
  17508. text-overflow: ellipsis;
  17509. cursor: pointer;
  17510. }
  17511. .e_add_list_child img {
  17512. position: absolute;
  17513. right: 10px;
  17514. width: 21px;
  17515. cursor: pointer;
  17516. top: 50%;
  17517. transform: translateY(-50%);
  17518. }
  17519. .e_add_list_child+.e_add_list_child {
  17520. border-top: 1px solid #eaeaea;
  17521. }
  17522. .e_add_list_child .active {
  17523. color: #409eff;
  17524. }
  17525. .e_add_list_btn {
  17526. position: absolute;
  17527. bottom: 0;
  17528. height: 50px;
  17529. background: rgb(120, 120, 254);
  17530. width: 100%;
  17531. color: #fff;
  17532. font-size: 16px;
  17533. text-align: center;
  17534. line-height: 50px;
  17535. cursor: pointer;
  17536. }
  17537. .e_add_list_detail {
  17538. position: absolute;
  17539. bottom: 0;
  17540. height: 130px;
  17541. background: rgb(120, 120, 254);
  17542. width: 100%;
  17543. color: #fff;
  17544. font-size: 16px;
  17545. display: flex;
  17546. align-items: center;
  17547. justify-content: center;
  17548. }
  17549. .e_add_list_detail textarea {
  17550. height: 90%;
  17551. width: 95%;
  17552. border: none;
  17553. resize: none;
  17554. outline: none;
  17555. padding: 5px;
  17556. box-sizing: border-box;
  17557. }
  17558. .e_add_list_pbox {
  17559. width: 100%;
  17560. }
  17561. .e_add_list_pbox_title {
  17562. height: 50px;
  17563. background: #fff;
  17564. display: flex;
  17565. align-items: center;
  17566. width: 100%;
  17567. box-sizing: border-box;
  17568. padding: 0 20px;
  17569. flex-direction: row;
  17570. flex-wrap: wrap;
  17571. }
  17572. .type_title {
  17573. font-size: 18px;
  17574. font-weight: 700;
  17575. }
  17576. .type_content {
  17577. font-size: 16px;
  17578. margin-left: 30px;
  17579. }
  17580. .type_content span+span {
  17581. margin-left: 20px;
  17582. }
  17583. .type_content span {
  17584. cursor: pointer;
  17585. padding-bottom: 5px;
  17586. box-sizing: border-box;
  17587. }
  17588. .type_content .active {
  17589. color: #409eff;
  17590. border-bottom: 2px solid #409eff;
  17591. }
  17592. .e_add_list_pbox_content {
  17593. height: calc(100% - 50px);
  17594. display: flex;
  17595. align-items: center;
  17596. width: 100%;
  17597. background: #fff;
  17598. }
  17599. .mbCss {
  17600. width: 100%;
  17601. display: flex;
  17602. flex-direction: row;
  17603. flex-wrap: nowrap;
  17604. align-content: center;
  17605. align-items: flex-start;
  17606. justify-content: flex-start;
  17607. }
  17608. .pjCss {
  17609. /* width: 42%; */
  17610. width: calc(100% - 55%);
  17611. display: flex;
  17612. flex-direction: column;
  17613. flex-wrap: nowrap;
  17614. align-items: flex-start;
  17615. }
  17616. .e_box {
  17617. /* display: flex; */
  17618. flex-wrap: wrap;
  17619. max-height: 500px;
  17620. align-items: flex-start;
  17621. overflow: auto;
  17622. width: 100%;
  17623. }
  17624. .e_card {
  17625. border: 1px solid #ccc;
  17626. background: #fff;
  17627. margin-right: 20px;
  17628. width: 270px;
  17629. display: flex;
  17630. flex-direction: column;
  17631. align-items: center;
  17632. border-radius: 5px;
  17633. margin-top: 10px;
  17634. text-align: center;
  17635. }
  17636. .e_card_picture {
  17637. margin: 10px 0;
  17638. }
  17639. .e_card_picture>img {
  17640. width: 50px;
  17641. }
  17642. .e_card_name {
  17643. width: 100%;
  17644. padding: 0 10px;
  17645. box-sizing: border-box;
  17646. margin-bottom: 10px;
  17647. overflow: hidden;
  17648. text-overflow: ellipsis;
  17649. white-space: nowrap;
  17650. }
  17651. .e_card_time {
  17652. width: 100%;
  17653. padding: 0 10px;
  17654. box-sizing: border-box;
  17655. font-size: 15px;
  17656. color: #c3c3c3;
  17657. margin-bottom: 10px;
  17658. }
  17659. .e_card_btn {
  17660. height: 40px;
  17661. display: flex;
  17662. align-items: center;
  17663. width: 100%;
  17664. background: rgb(244, 244, 244);
  17665. }
  17666. .e_card_btn:hover {
  17667. background: rgb(221 221 221);
  17668. }
  17669. .e_card_btn span {
  17670. flex: 1 1 auto;
  17671. text-align: center;
  17672. cursor: pointer;
  17673. }
  17674. .addEva {
  17675. border: 1px solid #ccc;
  17676. background: #fff;
  17677. margin-right: 20px;
  17678. width: 270px;
  17679. height: 149px;
  17680. display: flex;
  17681. flex-direction: column;
  17682. align-items: center;
  17683. border-radius: 5px;
  17684. margin-top: 10px;
  17685. text-align: center;
  17686. cursor: pointer;
  17687. justify-content: center;
  17688. }
  17689. .addEva>img {
  17690. width: 50px;
  17691. object-fit: cover;
  17692. }
  17693. .uploadFm {
  17694. border: 1px dashed #ccc;
  17695. width: 100%;
  17696. height: 140px;
  17697. position: relative;
  17698. cursor: pointer;
  17699. display: flex;
  17700. flex-direction: column;
  17701. justify-content: center;
  17702. align-items: center;
  17703. font-size: 14px;
  17704. color: #6e6e6e;
  17705. position: relative;
  17706. }
  17707. .cover_p {
  17708. width: 100% !important;
  17709. height: 100%;
  17710. object-fit: cover;
  17711. }
  17712. .uploadFm2:hover .cover_mask {
  17713. display: flex !important;
  17714. }
  17715. .cover_mask {
  17716. display: none;
  17717. width: 100%;
  17718. height: 100%;
  17719. position: absolute;
  17720. background: #00000054;
  17721. align-items: center;
  17722. justify-content: center;
  17723. flex-direction: column;
  17724. }
  17725. .cover_mask>img {
  17726. width: 30px;
  17727. }
  17728. .cover_mask>span {
  17729. color: #fff;
  17730. font-size: 12px;
  17731. }
  17732. .uploadFm>img {
  17733. width: 50px;
  17734. }
  17735. .fileCss {
  17736. width: 100%;
  17737. display: flex;
  17738. flex-direction: row;
  17739. flex-wrap: nowrap;
  17740. justify-content: space-around;
  17741. align-items: center;
  17742. padding-top: 15px;
  17743. }
  17744. .fileCss>div {
  17745. display: flex;
  17746. flex-direction: column;
  17747. align-items: center;
  17748. }
  17749. .fileCss .spanName {
  17750. margin-top: 10px;
  17751. }
  17752. .sysPicBox {
  17753. display: flex;
  17754. flex-direction: row;
  17755. flex-wrap: wrap;
  17756. align-content: flex-start;
  17757. height: 435px;
  17758. overflow: auto;
  17759. position: relative;
  17760. }
  17761. .picNone {
  17762. position: absolute;
  17763. left: 50%;
  17764. top: 45%;
  17765. transform: translate(-50%, -50%);
  17766. width: fit-content;
  17767. color: #9c9c9c;
  17768. }
  17769. .sysPic {
  17770. width: 200px;
  17771. height: 115px;
  17772. margin: 0 20px 20px 0;
  17773. cursor: pointer;
  17774. }
  17775. .sysPic>img,
  17776. .isSysPic>img,
  17777. .deletePic>img {
  17778. width: 100%;
  17779. height: 100%;
  17780. object-fit: cover;
  17781. }
  17782. .isSysPic {
  17783. width: 200px;
  17784. height: 115px;
  17785. position: relative;
  17786. }
  17787. .deletePic {
  17788. width: 20px;
  17789. height: 20px;
  17790. position: absolute;
  17791. top: 0;
  17792. right: 0;
  17793. cursor: pointer;
  17794. }
  17795. .select_box1 {
  17796. height: 100%;
  17797. }
  17798. .select_box1_img {
  17799. background: #fff;
  17800. border-radius: 5px;
  17801. padding: 15px;
  17802. box-sizing: border-box;
  17803. margin-bottom: 20px;
  17804. }
  17805. .select_box1_title {
  17806. padding: 0 0 15px 0;
  17807. border-bottom: 1px solid #eee;
  17808. margin-bottom: 15px;
  17809. }
  17810. .select_box1_title span:nth-child(1) {
  17811. font-size: 16px;
  17812. margin-right: 20px;
  17813. color: #000;
  17814. }
  17815. .select_box1_title span:nth-child(2) {
  17816. font-size: 14px;
  17817. color: rgb(112, 112, 112);
  17818. }
  17819. .select_box1_add_img {}
  17820. .select_box1_select {
  17821. background: #fff;
  17822. border-radius: 5px;
  17823. padding: 15px;
  17824. box-sizing: border-box;
  17825. height: calc(100% - 200px);
  17826. overflow: auto;
  17827. }
  17828. .select_box2 {
  17829. height: 100%;
  17830. }
  17831. .select_box2_title {
  17832. background: #fff;
  17833. border-radius: 5px;
  17834. padding: 5px 10px;
  17835. box-sizing: border-box;
  17836. margin-bottom: 10px;
  17837. }
  17838. .select_box2_box {
  17839. display: flex;
  17840. height: calc(100% - 30px);
  17841. }
  17842. .select_box2_img {
  17843. width: calc(100% - 310px);
  17844. height: 100%;
  17845. overflow: auto;
  17846. background: #fff;
  17847. border-radius: 5px;
  17848. }
  17849. .select_box2_img img {
  17850. width: 100%;
  17851. }
  17852. .select_box2_answer {
  17853. background: #fff;
  17854. margin-left: 10px;
  17855. border-radius: 5px;
  17856. width: 300px;
  17857. overflow: auto;
  17858. height: 100%;
  17859. display: flex;
  17860. flex-direction: column;
  17861. align-items: center;
  17862. padding-top: 10px;
  17863. box-sizing: border-box;
  17864. }
  17865. .select_box2_answer_box {
  17866. margin: 0 0 10px 0;
  17867. width: 85%;
  17868. }
  17869. .rate_textarea {
  17870. font: inherit;
  17871. color: currentColor;
  17872. width: 100%;
  17873. padding: 8px 14px;
  17874. display: block;
  17875. min-width: 0;
  17876. outline: none;
  17877. border: 1px solid rgba(0, 0, 0, 0.23);
  17878. border-radius: 4px;
  17879. box-sizing: border-box;
  17880. background: #fff;
  17881. margin: 0 20px 0 0;
  17882. resize: none;
  17883. }
  17884. .select_answer_title {
  17885. text-align: left;
  17886. width: 85%;
  17887. margin-bottom: 10px;
  17888. font-size: 18px;
  17889. color: #8e8e8e;
  17890. }
  17891. .mask {
  17892. background-color: rgb(0 0 0 / 30%);
  17893. /* position: fixed; */
  17894. position: absolute;
  17895. top: 0;
  17896. left: 0;
  17897. width: 100%;
  17898. height: 100%;
  17899. z-index: 90;
  17900. display: flex;
  17901. align-items: center;
  17902. justify-content: center;
  17903. }
  17904. .progressBox {
  17905. width: 300px;
  17906. height: 150px;
  17907. background: #fff;
  17908. border-radius: 10px;
  17909. box-shadow: 0 0 6px 1px #bfbfbf;
  17910. display: flex;
  17911. align-items: center;
  17912. justify-content: center;
  17913. flex-direction: column;
  17914. position: relative;
  17915. color: #6c6c6c;
  17916. }
  17917. .progressBox>>>.el-progress-bar__outer {
  17918. background-color: #d1dfff !important;
  17919. }
  17920. .progressBox .lbox {
  17921. height: 50px;
  17922. font-size: 19px;
  17923. display: flex;
  17924. align-items: center;
  17925. color: #747474;
  17926. }
  17927. .progressBox .lbox img {
  17928. width: 40px;
  17929. margin-right: 20px;
  17930. }
  17931. .closeCss {
  17932. position: absolute;
  17933. top: 8px;
  17934. right: 8px;
  17935. cursor: pointer;
  17936. width: 20px;
  17937. height: 20px;
  17938. }
  17939. .closeCss>img {
  17940. width: 100%;
  17941. height: 100%;
  17942. }
  17943. .updateTips::before {
  17944. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  17945. font-size: 14px;
  17946. margin-left: 20px;
  17947. font-weight: 400;
  17948. color: #ff3a3a;
  17949. margin-bottom: 10px;
  17950. display: block;
  17951. }
  17952. .updateMask {
  17953. width: 100%;
  17954. z-index: 3;
  17955. top: 0;
  17956. position: absolute;
  17957. /* background-color: rgba(0,0,0,.3); */
  17958. }
  17959. .t_j_box {
  17960. display: flex;
  17961. }
  17962. .t_j_box span:nth-child(1) {
  17963. width: 15%;
  17964. overflow: hidden;
  17965. margin-right: 10px;
  17966. text-overflow: ellipsis;
  17967. white-space: nowrap;
  17968. }
  17969. .t_j_box span:nth-child(2) {
  17970. width: 30%;
  17971. overflow: hidden;
  17972. text-overflow: ellipsis;
  17973. margin-right: 10px;
  17974. }
  17975. .t_j_box span:nth-child(3) {
  17976. max-width: calc(55% - 20px);
  17977. overflow: hidden;
  17978. text-overflow: ellipsis;
  17979. }
  17980. .sentenBox {
  17981. background: #fff;
  17982. height: 600px;
  17983. overflow: auto;
  17984. background-image: url("../../../assets/icon/conSentences/csBg.png");
  17985. background-position: 102%;
  17986. background-repeat: no-repeat;
  17987. background-size: 60%;
  17988. }
  17989. .sentenBox>.sentenContent {
  17990. padding-bottom: 10px;
  17991. width: 97%;
  17992. margin: 0 auto;
  17993. }
  17994. .sentenBox>.sentenContent+.sentenContent {
  17995. border-top: 1px solid #cbcbcb;
  17996. }
  17997. .addSen {
  17998. background: #409efe;
  17999. width: 90px;
  18000. color: #fff;
  18001. height: 35px;
  18002. text-align: center;
  18003. line-height: 35px;
  18004. border-radius: 5px;
  18005. float: right;
  18006. margin: 10px 20px 0 0;
  18007. cursor: pointer;
  18008. }
  18009. .sentenTop {
  18010. display: flex;
  18011. flex-direction: row;
  18012. flex-wrap: nowrap;
  18013. align-items: center;
  18014. }
  18015. .sentenTop::before {
  18016. content: attr(index);
  18017. background: #3681fc;
  18018. border-radius: 50%;
  18019. color: #fff;
  18020. width: 25px;
  18021. height: 25px;
  18022. min-width: 25px;
  18023. min-height: 25px;
  18024. text-align: center;
  18025. line-height: 25px;
  18026. margin-right: 5px;
  18027. }
  18028. .sentenTop>div:nth-child(2) {
  18029. width: 300px;
  18030. margin: 0 15px;
  18031. }
  18032. .sentenTop>div:nth-child(3) {
  18033. background: #409efe;
  18034. color: #fff;
  18035. width: 65px;
  18036. height: 35px;
  18037. text-align: center;
  18038. line-height: 35px;
  18039. border-radius: 5px;
  18040. cursor: pointer;
  18041. }
  18042. .cardList {
  18043. padding: 30px 0 20px 0;
  18044. display: flex;
  18045. flex-direction: row;
  18046. flex-wrap: wrap;
  18047. align-items: center;
  18048. box-sizing: border-box;
  18049. border-bottom: 1px solid #f4f4f4;
  18050. width: 98%;
  18051. margin: 0 auto;
  18052. }
  18053. .rightCardList {
  18054. display: flex;
  18055. flex-wrap: wrap;
  18056. }
  18057. .cardBox {
  18058. display: flex;
  18059. flex-direction: row;
  18060. flex-wrap: wrap;
  18061. align-items: center;
  18062. align-content: center;
  18063. }
  18064. .isCard,
  18065. .isCard1 {
  18066. width: auto;
  18067. padding: 0 20px;
  18068. height: 65px;
  18069. text-align: center;
  18070. line-height: 65px;
  18071. font-size: 14px;
  18072. cursor: pointer;
  18073. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  18074. background-size: 100% 100%;
  18075. position: relative;
  18076. z-index: 99;
  18077. }
  18078. .isCard1 {
  18079. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  18080. }
  18081. .isCard:hover .deleteWord {
  18082. display: block;
  18083. }
  18084. .isCard>div:nth-child(1),
  18085. .isCard1>div:nth-child(1) {
  18086. white-space: nowrap;
  18087. overflow: hidden;
  18088. text-overflow: ellipsis;
  18089. width: 100%;
  18090. margin: 0 auto;
  18091. }
  18092. .card {
  18093. width: 140px;
  18094. height: 65px;
  18095. }
  18096. .card>img {
  18097. width: 100%;
  18098. height: 100%;
  18099. }
  18100. .rightCardBox {
  18101. width: 98%;
  18102. margin: 10px auto 0;
  18103. }
  18104. .rightCardBox>div:nth-child(1) {
  18105. margin-bottom: 10px;
  18106. }
  18107. .cardCss {
  18108. display: flex;
  18109. flex-direction: column;
  18110. flex-wrap: nowrap;
  18111. align-items: center;
  18112. border-bottom: 3px solid #b4c3d3;
  18113. padding: 0 0 5px 0;
  18114. /* margin-right: 10px; */
  18115. }
  18116. .cardCss>div:nth-child(2) {
  18117. background: #5b7b9d;
  18118. color: #fff;
  18119. width: 20px;
  18120. height: 20px;
  18121. border-radius: 50%;
  18122. text-align: center;
  18123. line-height: 20px;
  18124. }
  18125. .sentenTopBox {
  18126. display: flex;
  18127. flex-direction: row;
  18128. flex-wrap: nowrap;
  18129. align-items: center;
  18130. justify-content: space-between;
  18131. padding: 55px 0 0 20px;
  18132. box-sizing: border-box;
  18133. width: 85%;
  18134. }
  18135. .rb_c_ai_box,
  18136. .stepsBottom {
  18137. width: 100%;
  18138. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  18139. /* background: #f7f7f7; */
  18140. border-radius: 10px;
  18141. overflow: hidden;
  18142. /* height: 100%; */
  18143. height: calc(100% - 55px);
  18144. }
  18145. .navTop {
  18146. background: #53749b;
  18147. color: #fff;
  18148. height: 40px;
  18149. line-height: 40px;
  18150. padding-left: 15px;
  18151. font-size: 18px;
  18152. }
  18153. .navBottom {
  18154. /* background: #6b91b7; */
  18155. height: 100%;
  18156. overflow: auto;
  18157. padding: 10px 0;
  18158. }
  18159. .navStage {
  18160. display: flex;
  18161. flex-direction: row;
  18162. flex-wrap: nowrap;
  18163. align-items: center;
  18164. padding: 10px 10px 10px 0;
  18165. cursor: pointer;
  18166. background: #ffffff;
  18167. width: 95%;
  18168. margin: 5px auto 5px;
  18169. box-sizing: border-box;
  18170. border-radius: 5px;
  18171. flex-wrap: wrap;
  18172. position: relative;
  18173. }
  18174. .navStage:hover>.chapter_upload_drag {
  18175. display: block;
  18176. }
  18177. .navTask:hover>.chapter_upload_drag {
  18178. display: block;
  18179. }
  18180. .chapter_upload:hover>.chapter_upload_drag {
  18181. display: block;
  18182. }
  18183. .navStage::before {
  18184. content: "";
  18185. display: block;
  18186. width: 16px;
  18187. height: 16px;
  18188. background-image: url(../../../assets/icon/new/icon_stage.png);
  18189. background-size: 100%;
  18190. margin-left: 25px;
  18191. }
  18192. .navStage .chapter_unit_open {
  18193. content: "";
  18194. display: block;
  18195. width: 16px;
  18196. height: 16px;
  18197. background-image: url(../../../assets/icon/new/down.png);
  18198. transform: rotate(-90deg);
  18199. background-size: 100%;
  18200. margin-left: 10px;
  18201. transition: all 0.5s;
  18202. }
  18203. .isNavStageOpen .chapter_unit_open {
  18204. transform: rotate(0deg);
  18205. }
  18206. .isNavStage {
  18207. background: #0061ff;
  18208. }
  18209. .isNavStage::before {
  18210. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  18211. }
  18212. .isNavStage .chapter_unit_open {
  18213. background-image: url(../../../assets/icon/new/downC.png);
  18214. }
  18215. .isNavStage .nt_taskName {
  18216. font-weight: bold !important;
  18217. color: #ffffff !important;
  18218. }
  18219. .isNavStage .nt_taskTitle {
  18220. font-weight: bold !important;
  18221. color: #fff !important;
  18222. }
  18223. .navStage .nt_taskBox {
  18224. width: calc(100% - 68px);
  18225. padding: 0 0 0 5px;
  18226. box-sizing: border-box;
  18227. box-sizing: border-box;
  18228. display: flex;
  18229. flex-direction: row;
  18230. flex-wrap: nowrap;
  18231. align-items: baseline;
  18232. }
  18233. .navStage .nt_taskTitle {
  18234. color: #060e17;
  18235. line-height: 25px;
  18236. font-size: 16px;
  18237. }
  18238. .navStage .nt_taskName {
  18239. max-width: calc(100% - 82px);
  18240. white-space: nowrap;
  18241. overflow: hidden;
  18242. text-overflow: ellipsis;
  18243. font-size: 16px;
  18244. color: #060e17;
  18245. }
  18246. .navTask {
  18247. display: flex;
  18248. flex-direction: row;
  18249. flex-wrap: nowrap;
  18250. align-items: center;
  18251. padding: 10px 10px 10px 0;
  18252. cursor: pointer;
  18253. background: #ffffff;
  18254. width: 95%;
  18255. margin: 5px auto 5px;
  18256. box-sizing: border-box;
  18257. border-radius: 5px;
  18258. flex-wrap: wrap;
  18259. position: relative;
  18260. }
  18261. .navTask .chapter_upload_open {
  18262. content: "";
  18263. display: block;
  18264. width: 16px;
  18265. height: 16px;
  18266. background-image: url(../../../assets/icon/new/icon_arrow.png);
  18267. background-size: 100%;
  18268. margin-left: 23px;
  18269. }
  18270. .noImage .chapter_upload_open {
  18271. display: none;
  18272. background-image: unset !important;
  18273. }
  18274. .isNavOpen .chapter_upload_open {
  18275. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  18276. transform: rotate(90deg);
  18277. }
  18278. .isNavTask .chapter_upload_open {
  18279. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  18280. transform: rotate(-90deg);
  18281. }
  18282. .isNavTask.isNavOpen .chapter_upload_open {
  18283. transform: rotate(0deg);
  18284. }
  18285. .dragOverTop {
  18286. border-top: 2px solid #0061ff !important;
  18287. border-radius: 0 !important;
  18288. margin-top: 10px;
  18289. }
  18290. .dragOverBottom {
  18291. border-bottom: 2px solid #0061ff !important;
  18292. border-radius: 0 !important;
  18293. margin-top: 10px;
  18294. }
  18295. .dragOverTop2 {
  18296. border-top: 2px solid #0061ff !important;
  18297. border-radius: 0 !important;
  18298. }
  18299. .dragOverBottom2 {
  18300. border-bottom: 2px solid #0061ff !important;
  18301. border-radius: 0 !important;
  18302. }
  18303. .isNavTask {
  18304. /* background: #3681FC; */
  18305. background: #eef3fb;
  18306. }
  18307. .isNavTask>.chapter_upload_drag {
  18308. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  18309. }
  18310. .isNavTask .nt_taskName {
  18311. /* color: #fff !important; */
  18312. font-weight: bold !important;
  18313. color: #0061ff !important;
  18314. }
  18315. .isNavTask .nt_taskTitle {
  18316. /* color: #AECCFE !important; */
  18317. font-weight: bold !important;
  18318. color: #0061ff !important;
  18319. }
  18320. .navTask .nt_taskBox {
  18321. width: calc(100% - 40px);
  18322. padding: 0 0 0 5px;
  18323. box-sizing: border-box;
  18324. box-sizing: border-box;
  18325. display: flex;
  18326. flex-direction: row;
  18327. flex-wrap: nowrap;
  18328. align-items: baseline;
  18329. }
  18330. .navTask .nt_taskTitle {
  18331. /* color: #717C8D; */
  18332. color: #060e17;
  18333. line-height: 25px;
  18334. font-size: 16px;
  18335. /* min-width: 66px; */
  18336. }
  18337. .navTask .nt_taskName {
  18338. /* color: #fff; */
  18339. /* max-width: 130px; */
  18340. /* width: 100%; */
  18341. max-width: calc(100% - 66px);
  18342. font-size: 16px;
  18343. color: #060e17;
  18344. /* color: #0E1E33; */
  18345. }
  18346. .navTask .nt_taskName span {
  18347. width: 100%;
  18348. white-space: nowrap;
  18349. overflow: hidden;
  18350. text-overflow: ellipsis;
  18351. display: block;
  18352. }
  18353. .gjBox {
  18354. width: calc(100% - 25px);
  18355. padding: 0 0 0 0;
  18356. box-sizing: border-box;
  18357. border-left: 1px solid #cad1dc;
  18358. margin-left: 25px;
  18359. }
  18360. .gjBox>div {
  18361. display: flex;
  18362. align-items: center;
  18363. }
  18364. .gjBox>div::before {
  18365. content: "";
  18366. height: 1px;
  18367. width: 10px;
  18368. background: #cad1dc;
  18369. display: block;
  18370. margin-right: 5px;
  18371. }
  18372. .gjCss {
  18373. display: flex;
  18374. flex-direction: row;
  18375. flex-wrap: nowrap;
  18376. align-items: center;
  18377. padding: 15px 0;
  18378. box-sizing: border-box;
  18379. font-size: 14px;
  18380. cursor: pointer;
  18381. }
  18382. .isGjCss {
  18383. color: #0061ff;
  18384. }
  18385. .groupBox {}
  18386. .groupContent+.groupContent {
  18387. margin-top: 30px;
  18388. }
  18389. .groupTitle {
  18390. font-size: 24px;
  18391. color: rgb(80, 80, 80);
  18392. margin-bottom: 20px;
  18393. }
  18394. .groupName {
  18395. display: flex;
  18396. align-items: center;
  18397. }
  18398. .groupn {
  18399. font-size: 15px;
  18400. margin-right: 10px;
  18401. }
  18402. .groupName+.groupName {
  18403. margin-top: 15px;
  18404. }
  18405. .groupBtn {
  18406. margin-left: 10px;
  18407. }
  18408. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  18409. text-align: left;
  18410. }
  18411. .radioBox>div {
  18412. margin: 10px 0 0 10px;
  18413. }
  18414. .radioBox>>>.el-radio__input,
  18415. .radioBox>>>.el-checkbox__inner {
  18416. margin-left: 10px;
  18417. }
  18418. .radioBox>>>.el-radio__label,
  18419. .radioBox>>>.el-checkbox__label {
  18420. display: flex;
  18421. align-items: center;
  18422. }
  18423. .inImg {
  18424. width: 50px;
  18425. }
  18426. .inImg>img {
  18427. width: 100%;
  18428. height: 100%;
  18429. object-fit: cover;
  18430. }
  18431. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  18432. height: auto;
  18433. padding: 10px;
  18434. margin: 0;
  18435. }
  18436. .upCss>>>.el-upload-list {
  18437. width: 100%;
  18438. }
  18439. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  18440. width: 100%;
  18441. height: 120px;
  18442. object-fit: contain;
  18443. background: unset;
  18444. margin-left: 0;
  18445. }
  18446. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  18447. display: none;
  18448. }
  18449. .tcMember+.tcMember::before {
  18450. content: "、";
  18451. }
  18452. .xzUpImg {
  18453. width: 25px;
  18454. height: 25px;
  18455. min-width: 25px;
  18456. min-height: 25px;
  18457. cursor: pointer;
  18458. margin: 0 10px;
  18459. }
  18460. .xzUpImg>img {
  18461. width: 100%;
  18462. height: 100%;
  18463. }
  18464. .closeCss {
  18465. position: absolute;
  18466. top: 8px;
  18467. right: 8px;
  18468. cursor: pointer;
  18469. width: 20px;
  18470. height: 20px;
  18471. }
  18472. .closeCss>img {
  18473. width: 100%;
  18474. height: 100%;
  18475. }
  18476. .moveBtn {
  18477. display: flex;
  18478. flex-direction: row;
  18479. flex-wrap: nowrap;
  18480. align-items: center;
  18481. width: 55px;
  18482. }
  18483. .timuUpImg {
  18484. display: flex;
  18485. flex-direction: row;
  18486. align-items: center;
  18487. width: 100%;
  18488. margin-right: 10px;
  18489. }
  18490. .timuUpImg>div:nth-child(1) {
  18491. margin-right: 10px;
  18492. display: flex;
  18493. align-items: center;
  18494. width: 100%;
  18495. }
  18496. .timuImgBox {
  18497. margin: 10px 0;
  18498. display: flex;
  18499. flex-direction: column;
  18500. flex-wrap: wrap;
  18501. align-items: flex-start;
  18502. }
  18503. .timuImg {
  18504. width: 100px;
  18505. margin: 5px 0;
  18506. cursor: pointer;
  18507. position: relative;
  18508. }
  18509. .timuImg:hover .deleteWord {
  18510. display: block;
  18511. }
  18512. .deleteWord {
  18513. width: 25px;
  18514. height: 25px;
  18515. position: absolute;
  18516. right: -5px;
  18517. top: -5px;
  18518. cursor: pointer;
  18519. display: none;
  18520. }
  18521. .timuImg>img,
  18522. .deleteWord>img {
  18523. width: 100%;
  18524. height: 100%;
  18525. object-fit: cover;
  18526. }
  18527. .e_add_delete {
  18528. cursor: pointer;
  18529. margin-left: 10px;
  18530. }
  18531. .pType_box {
  18532. margin-top: 30px;
  18533. align-items: flex-end;
  18534. }
  18535. .noneBox {
  18536. height: 200px;
  18537. width: 100%;
  18538. display: flex;
  18539. align-items: center;
  18540. justify-content: center;
  18541. flex-direction: column;
  18542. /* margin-top: 150px; */
  18543. }
  18544. .noneBox>img {
  18545. width: 95px;
  18546. }
  18547. .noneBox>span {
  18548. margin-top: 10px;
  18549. color: #717c8d;
  18550. }
  18551. .rb_c_box {
  18552. width: 100%;
  18553. height: 100%;
  18554. display: flex;
  18555. /* padding: 20px; */
  18556. box-sizing: border-box;
  18557. justify-content: space-between;
  18558. }
  18559. .rb_c_box_left {
  18560. height: 100%;
  18561. background: #fff;
  18562. width: 270px;
  18563. min-width: 270px;
  18564. border-radius: 8px;
  18565. margin-right: 10px;
  18566. }
  18567. .rb_c_box_right {
  18568. height: 100%;
  18569. width: calc(100%);
  18570. overflow: hidden;
  18571. }
  18572. .rb_c_box_btn {
  18573. display: flex;
  18574. justify-content: flex-start;
  18575. height: 50px;
  18576. align-items: center;
  18577. }
  18578. .rb_c_box_right>.basic_box {
  18579. /* background: #fff; */
  18580. border-radius: 0;
  18581. height: calc(100% - 0px);
  18582. overflow: auto;
  18583. padding: 0;
  18584. }
  18585. .textarea_css {
  18586. display: block;
  18587. resize: none;
  18588. padding: 10px 15px;
  18589. line-height: 1.5;
  18590. box-sizing: border-box;
  18591. width: 100%;
  18592. font-size: 14px;
  18593. color: #606266;
  18594. background-color: #fff;
  18595. background-image: none;
  18596. border: 1px solid #dcdfe6;
  18597. border-radius: 4px;
  18598. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  18599. outline: none;
  18600. overflow: hidden;
  18601. height: 46px;
  18602. font-family: "Microsoft YaHei";
  18603. }
  18604. .textarea_css::-webkit-input-placeholder {
  18605. color: #c0c4cc;
  18606. }
  18607. .textarea_css:focus {
  18608. border-color: #409eff;
  18609. outline: 0;
  18610. }
  18611. .addEditor>>>.text {
  18612. height: auto;
  18613. min-height: 100px;
  18614. }
  18615. .addEditor>>>.w-e-text-container {
  18616. min-height: 100px;
  18617. }
  18618. .moveBtn2 {
  18619. flex-direction: column;
  18620. width: fit-content;
  18621. margin: 0 10px 0 10px;
  18622. }
  18623. .moveBtn2 .chapter_upload_down,
  18624. .moveBtn2 .chapter_upload_up {
  18625. width: 16px;
  18626. height: 16px;
  18627. }
  18628. .moveBtn2 .chapter_upload_up::after,
  18629. .moveBtn2 .chapter_upload_down::after {
  18630. width: 10px;
  18631. height: 10px;
  18632. }
  18633. .fullStyle>>>.el-dialog__body {
  18634. height: calc(100% - 125px) !important;
  18635. box-sizing: border-box;
  18636. }
  18637. .fullStyle1>>>.el-dialog__body {
  18638. height: auto !important;
  18639. }
  18640. .fullStyle>>>.el-dialog {
  18641. width: 100% !important;
  18642. max-width: 100% !important;
  18643. height: 100% !important;
  18644. margin: 0 !important;
  18645. }
  18646. .fullStyle {
  18647. width: 100% !important;
  18648. max-width: 100% !important;
  18649. height: 100% !important;
  18650. margin: 0 auto !important;
  18651. }
  18652. .wb_j_box_btn {
  18653. width: calc(100% - 30px);
  18654. display: flex;
  18655. height: 40px;
  18656. border: 1.5px solid #cad1dc;
  18657. border-radius: 4px;
  18658. box-sizing: border-box;
  18659. align-items: center;
  18660. font-size: 14px;
  18661. cursor: pointer;
  18662. overflow: hidden;
  18663. }
  18664. .wb_j_box_btn:hover {
  18665. border: 1.5px solid #0061ff;
  18666. }
  18667. .wb_j_box_title {
  18668. background: #f0f4fa;
  18669. height: 100%;
  18670. line-height: 40px;
  18671. width: 90px;
  18672. text-align: center;
  18673. color: #060e17;
  18674. border-right: 1.5px solid #cad1dc;
  18675. box-sizing: border-box;
  18676. }
  18677. .wb_j_box_btn_c {
  18678. width: calc(100% - 90px);
  18679. padding: 0 35px 0 10px;
  18680. box-sizing: border-box;
  18681. position: relative;
  18682. }
  18683. .wb_j_box_span {
  18684. width: 100%;
  18685. overflow: hidden;
  18686. white-space: nowrap;
  18687. text-overflow: ellipsis;
  18688. word-wrap: break-word;
  18689. color: #717c8d;
  18690. }
  18691. .wb_j_box_arrow {
  18692. content: "";
  18693. width: 14px;
  18694. height: 14px;
  18695. background: url(../../../assets/icon/new/u_arrow.png);
  18696. background-size: 100% 100%;
  18697. position: absolute;
  18698. right: 12px;
  18699. top: 50%;
  18700. transform: translateY(-50%);
  18701. }
  18702. .check_classBox {
  18703. height: 400px;
  18704. display: flex;
  18705. border-top: 1.5px solid #e7ebf1;
  18706. border-bottom: 1.5px solid #e7ebf1;
  18707. }
  18708. .check_class_right {
  18709. width: 130px;
  18710. border-right: 1px solid #e7ebf1;
  18711. display: flex;
  18712. align-items: center;
  18713. flex-direction: column;
  18714. height: 100%;
  18715. overflow: auto;
  18716. padding: 15px 0;
  18717. box-sizing: border-box;
  18718. }
  18719. .check_class {
  18720. width: 85%;
  18721. border-radius: 5px;
  18722. height: 30px;
  18723. min-height: 30px;
  18724. line-height: 30px;
  18725. text-align: center;
  18726. padding: 0 10px;
  18727. box-sizing: border-box;
  18728. cursor: pointer;
  18729. white-space: nowrap;
  18730. overflow: hidden;
  18731. text-overflow: ellipsis;
  18732. }
  18733. .check_class.activeX {
  18734. background: #e0eafb;
  18735. color: #3681fc;
  18736. font-weight: 700;
  18737. }
  18738. .check_class+.check_class {
  18739. margin-top: 15px;
  18740. }
  18741. .check_class_left {
  18742. background: #fafafa;
  18743. width: calc(100% - 130px);
  18744. padding: 15px;
  18745. box-sizing: border-box;
  18746. }
  18747. .check_class_all_box {
  18748. display: flex;
  18749. margin-bottom: 10px;
  18750. }
  18751. .all_check {
  18752. display: flex;
  18753. align-items: center;
  18754. padding: 2px 0 0;
  18755. margin-left: 10px;
  18756. }
  18757. .all_check>>>.el-checkbox__label {
  18758. line-height: 18px;
  18759. }
  18760. .check_class_left_title {
  18761. font-size: 16px;
  18762. font-weight: 700;
  18763. }
  18764. .check_class_item {
  18765. display: flex;
  18766. flex-wrap: wrap;
  18767. height: calc(100% - 45px);
  18768. overflow: auto;
  18769. justify-content: flex-start;
  18770. align-items: flex-start;
  18771. align-content: flex-start;
  18772. }
  18773. .class_item:first-child {
  18774. /* margin: 0 15px 15px 67px; */
  18775. }
  18776. .class_item {
  18777. margin: 0 15px 15px 0;
  18778. }
  18779. .class_item:hover>>>.el-checkbox__label {
  18780. color: #409eff;
  18781. }
  18782. .class_item>>>.el-checkbox__label {
  18783. color: #0e1e33;
  18784. }
  18785. .class_item:hover>>>.el-checkbox__inner {
  18786. border-color: #409eff;
  18787. }
  18788. .class_item>>>.el-checkbox,
  18789. .class_item>>>.el-checkbox__input {
  18790. display: flex;
  18791. align-items: center;
  18792. }
  18793. .taskTitle {
  18794. font-size: 20px;
  18795. font-weight: bold;
  18796. margin-bottom: 35px;
  18797. }
  18798. .taskTitle:after {
  18799. content: "";
  18800. width: 100%;
  18801. display: block;
  18802. height: 1px;
  18803. background: #cad1dc;
  18804. position: absolute;
  18805. left: 0;
  18806. margin: 15px 0 0;
  18807. }
  18808. .eva_btn_box {
  18809. margin: 20px 0px 0 0;
  18810. display: flex;
  18811. flex-direction: row;
  18812. flex-wrap: nowrap;
  18813. align-items: center;
  18814. justify-content: space-between;
  18815. width: 100%;
  18816. }
  18817. .eva_btn_left_box {
  18818. display: flex;
  18819. flex-direction: row;
  18820. flex-wrap: nowrap;
  18821. align-items: center;
  18822. }
  18823. .addTypeChoose {
  18824. display: flex;
  18825. flex-direction: row;
  18826. flex-wrap: nowrap;
  18827. align-items: center;
  18828. margin: 15px 0;
  18829. }
  18830. .addTypeBox {
  18831. display: flex;
  18832. flex-direction: column;
  18833. flex-wrap: nowrap;
  18834. align-items: center;
  18835. }
  18836. .addTypeChoose {
  18837. display: flex;
  18838. flex-direction: row;
  18839. flex-wrap: nowrap;
  18840. align-items: center;
  18841. margin: 15px 0;
  18842. }
  18843. .buchong_box {
  18844. background: #E0EAFB66;
  18845. width: calc(100% - 20px);
  18846. min-height: 50px;
  18847. display: flex;
  18848. align-items: center;
  18849. justify-content: center;
  18850. margin: 0 auto;
  18851. }
  18852. .outline {
  18853. width: calc(100% - 40px);
  18854. margin: 0 auto;
  18855. }
  18856. .task_outline {
  18857. width: calc(100% - 40px);
  18858. margin: 0 auto;
  18859. }
  18860. .outline_box+.outline_box {
  18861. margin: 30px 0 0px;
  18862. }
  18863. .outline_task {
  18864. display: flex;
  18865. align-items: center;
  18866. margin-bottom: 10px;
  18867. }
  18868. .outline_task .title {
  18869. font-size: 18px;
  18870. font-weight: bold;
  18871. min-width: 80px;
  18872. }
  18873. .op_task_box,
  18874. .op_tool_box,
  18875. .outline_detail {
  18876. position: relative;
  18877. }
  18878. .op_task_box:hover .op_box,
  18879. .op_tool_box:hover .op_box,
  18880. .outline_detail:hover .op_box {
  18881. display: flex
  18882. }
  18883. .op_box {
  18884. position: absolute;
  18885. bottom: 10px;
  18886. display: none;
  18887. align-items: center;
  18888. justify-content: space-between;
  18889. width: calc(100% - 20px);
  18890. left: 50%;
  18891. transform: translateX(-50%);
  18892. }
  18893. .op_box .op_remark {
  18894. color: #8E8E8E;
  18895. font-size: 14px;
  18896. }
  18897. .rb_c_nav {
  18898. width: calc(100% - 20px);
  18899. margin: 15px auto 0;
  18900. font-size: 18px;
  18901. }
  18902. .rb_c_nav span {
  18903. cursor: pointer;
  18904. }
  18905. .rb_c_nav span+span {
  18906. margin-left: 10px;
  18907. }
  18908. .rb_c_nav span.active {
  18909. color: #0061FF
  18910. }
  18911. .text_panel>>>.text {
  18912. height: 400px;
  18913. }
  18914. .markBox{
  18915. padding: 20px 14px;
  18916. line-height: 29px;
  18917. font-size: 16px;
  18918. background: #f4f4f4;
  18919. border-radius: 5px;
  18920. }
  18921. .info_box_t{
  18922. display: flex;
  18923. align-items: center;
  18924. }
  18925. .info_box_t_box{
  18926. display: flex;
  18927. align-items: center;
  18928. }
  18929. .info_box_t_box + .info_box_t_box{
  18930. margin-left: 10px;
  18931. }
  18932. .info_box_t_box > span{
  18933. width: fit-content
  18934. }
  18935. .info_box_t_box > input{
  18936. width: 150px !important;
  18937. margin: 0 5px 0 0;
  18938. }
  18939. </style>