addCourse.vue 948 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  5. <div class="courseTop">
  6. <div class="stepsNav">
  7. <el-breadcrumb separator-class="el-icon-arrow-right">
  8. <el-breadcrumb-item :to="{
  9. path:
  10. '/course?userid=' +
  11. userid +
  12. '&oid=' +
  13. oid +
  14. '&org=' +
  15. org +
  16. '&role=' +
  17. role,
  18. }">课程管理</el-breadcrumb-item>
  19. <el-breadcrumb-item>
  20. <span style="color: rgb(15, 126, 255)">添加课程</span>
  21. </el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  25. </div>
  26. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  27. <!-- @mouseenter="stepDisplay(true)"
  28. @mouseleave="stepDisplay(false)" -->
  29. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  30. <div class="stepBg" v-if="false">
  31. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  32. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  33. <div>
  34. <img src="../../../assets/icon/first.png" alt />
  35. </div>
  36. <div>填写基本信息</div>
  37. </div>
  38. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/firstNo.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  45. </div>
  46. <!-- <div
  47. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  48. class="second"
  49. @click="navSteps(2)"
  50. >
  51. <div style="margin: 5px 10px 0 0; width: 2rem">
  52. <img src="../../../assets/icon/second.png" alt />
  53. </div>
  54. <div>选择课程模板</div>
  55. </div>
  56. <div
  57. v-else-if="cidType === 0 && isStepDisplay"
  58. class="secondNo"
  59. @click="navSteps(2)"
  60. >
  61. <div>
  62. <img src="../../../assets/icon/secondNo.png" alt />
  63. </div>
  64. <div>选择课程模板</div>
  65. </div> -->
  66. <!-- <div
  67. v-if="isStepDisplay"
  68. class="stepBorder"
  69. :class="{ 'border-active': steps > 2 }"
  70. ></div> -->
  71. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  72. <div>
  73. <img src="../../../assets/icon/third.png" alt />
  74. </div>
  75. <div>上传课程内容</div>
  76. </div>
  77. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/thirdNo.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  84. <div v-if="steps > 3 && isStepDisplay" class="four">
  85. <div>
  86. <img src="../../../assets/icon/four.png" alt />
  87. </div>
  88. <div>上传完成</div>
  89. </div>
  90. <div v-else-if="isStepDisplay" class="fourNo">
  91. <div>
  92. <img src="../../../assets/icon/fourNo.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  99. style="padding: 0" :style="{
  100. height:
  101. !isStepDisplay && !isBtnDisplay
  102. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  103. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  104. }">
  105. <div class="updateMask" :style="{
  106. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  107. }" v-if="cid && userid != courseUserid && role != '1'"></div>
  108. <div class="whiteBg" style="background: unset; padding: 0">
  109. <div>
  110. <div class="basic_box" style="padding: 0">
  111. <div class="big_box">
  112. <div class="left_first">
  113. <div :class="{
  114. updateTips:
  115. cid && userid != courseUserid && role != '1',
  116. }">
  117. <div style="width: 100%">
  118. <div class="course_input_box">
  119. <div class="bb_courseIcon">
  120. <img src="../../../assets/icon/new/course.png" />
  121. </div>
  122. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  123. border: 1.5px solid rgb(202, 209, 220);
  124. margin: 0px 10px 0px 0px;
  125. border-radius: 5px;
  126. font-weight: 600;
  127. padding: 12px 14px 12px 71px;
  128. " @change="setCover" />
  129. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  130. style="justify-content: center; min-width: 150px"></el-switch>
  131. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  132. style="justify-content: center; min-width: 175px"></el-switch>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  179. style="justify-content: center; min-width: 175px"></el-switch>
  180. </div>
  181. <div class="info_box_t_box">
  182. <span>AI生成模式:</span>
  183. <div class="mode_box">
  184. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  185. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  186. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  187. </div>
  188. </div>
  189. </div>
  190. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  191. <div class="info_box_t_box">
  192. <span>课程节数:</span>
  193. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  194. <span>节</span>
  195. </div>
  196. <div class="info_box_t_box">
  197. <span>课程时长:</span>
  198. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  199. <span>min</span>
  200. </div>
  201. </div> -->
  202. </div>
  203. <div class="right_first" v-loading="imageloading2">
  204. <!-- <div class="ai_box">
  205. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  206. </div> -->
  207. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  208. 上传封面
  209. </div>
  210. <div style="width: 100%">
  211. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  212. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  213. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  214. <div v-if="cover.length == 0">点击添加封面</div>
  215. <div class="cover_mask">
  216. <img src="../../../assets/icon/new/cover_update.png" /><span
  217. style="margin-top: 5px">修改封面</span>
  218. </div>
  219. </div>
  220. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  221. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  222. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  223. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  224. <i class="el-icon-plus"></i>
  225. </el-upload> -->
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  233. <div class="whiteBg" style="border-radius: 0">
  234. <div class="c_info_title">
  235. 课程权限设置
  236. </div>
  237. <div class="wb_j_box">
  238. <div class="wb_j_box_content">
  239. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  240. (dialogVisibleClass = true),
  241. (classSearch = ''),
  242. (gradeId = ''),
  243. getClass()
  244. ">添加班级</button>
  245. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  246. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  247. getClassC(tc) }}</span>
  248. </div> -->
  249. <div class="wb_j_box_btn" @click="
  250. (dialogVisibleClass = true),
  251. (classSearch = ''),
  252. (gradeId = ''),
  253. getClass()
  254. ">
  255. <div class="wb_j_box_title">授课班级</div>
  256. <div class="wb_j_box_btn_c">
  257. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  258. v-if="checkboxList2.length" popper-class="text_tooltip2">
  259. <div class="wb_j_box_span">
  260. {{ getListClassC(checkboxList2) }}
  261. </div>
  262. </el-tooltip>
  263. <div v-else class="wb_j_box_span">请选择授课班级</div>
  264. <div class="wb_j_box_arrow"></div>
  265. </div>
  266. </div>
  267. </div>
  268. <div class="wb_j_box_content">
  269. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  270. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  271. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  272. checkBoolean
  273. ? checkboxList3
  274. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  275. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  276. </div> -->
  277. <div class="wb_j_box_btn" @click="openMember">
  278. <div class="wb_j_box_title">协同人员</div>
  279. <div class="wb_j_box_btn_c">
  280. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  281. v-if="checkboxList3.length" popper-class="text_tooltip2">
  282. <div class="wb_j_box_span">
  283. {{ getListMan2(checkboxList3) }}
  284. </div>
  285. </el-tooltip>
  286. <div v-else class="wb_j_box_span">请选择协同人员</div>
  287. <div class="wb_j_box_arrow"></div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  294. <div class="c_info_title">目标管理</div>
  295. <div style="margin: 0 auto; padding: 0 20px">
  296. <div style="
  297. width: 95%;
  298. min-height: 200px;
  299. border: 1px solid #cad1dc;
  300. border-radius: 4px;
  301. position: relative;
  302. ">
  303. <div class="e_add_top">
  304. <div class="e_add_title">
  305. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  306. 清除
  307. </button>
  308. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  309. 添加
  310. </button>
  311. <!-- <span>当前使用目标管理</span>
  312. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  313. <img
  314. src="../../../assets/line.png"
  315. class="cru_line"
  316. style="
  317. width: 125px;
  318. height: 20px;
  319. bottom: -10px;
  320. left: 155px;
  321. "
  322. /> -->
  323. </div>
  324. <div style="
  325. display: flex;
  326. flex-direction: row;
  327. align-items: center;
  328. ">
  329. <!-- <el-button
  330. type="primary"
  331. size="small"
  332. @click="dialogVisiblemb = true"
  333. >添加目标管理</el-button
  334. >
  335. <el-button
  336. type="primary"
  337. size="small"
  338. @click="deleteEva()"
  339. >清除内容</el-button
  340. > -->
  341. <!-- <div class="e_add_delete" @click="deleteEva()">
  342. <img src="../../../assets/icon/delete.png" alt="" />
  343. </div> -->
  344. </div>
  345. </div>
  346. <div v-if="evalua == ''">
  347. <div class="noneBox">
  348. <img src="../../../assets/icon/new/eva_none.png" />
  349. <span>请添加目标管理</span>
  350. </div>
  351. </div>
  352. <div class="e_add_content" v-else>
  353. <div class="e_add_list_pbox">
  354. <div class="e_add_list_pbox_title">
  355. <span class="type_title">切换模式</span>
  356. <div class="type_content">
  357. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  358. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  359. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  360. </div>
  361. </div>
  362. <div class="e_add_list_pbox_content">
  363. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  364. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  365. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  366. v-if="typeMode == 3">
  367. </SeeBoard>
  368. </div>
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  376. <div style="position: relative;
  377. background: #fff;
  378. box-sizing: border-box;
  379. padding: 1px 20px 10px;
  380. width: 100%;
  381. border-radius: 10px;">
  382. <div style="
  383. display: flex;
  384. flex-direction: row;
  385. justify-content: space-between;
  386. align-items: center;
  387. " :style="{
  388. margin: true
  389. ? '20px 0 10px'
  390. : '20px 0 0',
  391. }">
  392. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  393. 已有教案
  394. <div class="add_info_box" style="margin: 0 0 0 auto">
  395. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  396. 上传已有教案
  397. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  398. beforeUploadInfo2(
  399. $event,
  400. 14
  401. )
  402. " />
  403. </button>
  404. <button class="c_pub_button_add" @click="clickGenTT">
  405. 一键智能总结生成
  406. </button>
  407. </div>
  408. </div>
  409. </div>
  410. <div>
  411. <div class="add_chapters_box add_c_none" v-if="
  412. teacherInfoData &&
  413. teacherInfoData.length == 0
  414. ">
  415. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  416. </div>
  417. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  418. <div @dragstart="
  419. dragStart(item1, index1, 0)
  420. " @dragover.prevent="
  421. dragOver(index1, 0)
  422. " @dragend="dragEnd()" :draggable="isdrag ==
  423. 'chapter-' + 0 + '-' + index1
  424. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  425. getChapterData(
  426. $event,
  427. index1,
  428. item1.type
  429. )
  430. " :class="{
  431. dragOverTop2:
  432. newIndex === index1 &&
  433. typeIndex ==
  434. 'chapter-' +
  435. 0 +
  436. '-' +
  437. index1 &&
  438. oldIndex > index1 &&
  439. dragType == 'drag',
  440. dragOverBottom2:
  441. newIndex === index1 &&
  442. typeIndex ==
  443. 'chapter-' +
  444. 0 +
  445. '-' +
  446. index1 &&
  447. oldIndex < index1 &&
  448. dragType == 'drag',
  449. }">
  450. <div class="chapter_upload_o" style="
  451. position: relative;
  452. display: flex;
  453. align-items: center;
  454. ">
  455. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  456. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  457. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  458. </div>
  459. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  460. </div>
  461. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  462. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  463. </div>
  464. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  465. </div>
  466. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  467. </div>
  468. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  469. </div>
  470. </div>
  471. <div class="chapter_upload_n">
  472. <input readonly="true" v-if="
  473. item1.type == 2 ||
  474. item1.type == 3 ||
  475. item1.type == 12 ||
  476. item1.type == 13 ||
  477. item1.type == 7
  478. " :placeholder="item1.name" style="
  479. border: none;
  480. outline: none;
  481. width: 80%;
  482. minwidth: 215px;
  483. z-index: 99;
  484. font-size: 14px;
  485. white-space: nowrap;
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. " />
  489. </div>
  490. <div class="chapter_upload_ic">
  491. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  492. <div class="chapter_upload_ic_r" @click.stop="
  493. deleteTeacherInfoData(
  494. $event,
  495. index1
  496. )
  497. ">
  498. <div></div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. <div v-if="
  506. teacherinfoproVisible
  507. " class="mask">
  508. <div class="progressBox">
  509. <div class="lbox">
  510. <img src="../../../assets/loading.gif" />上传中,请稍后
  511. </div>
  512. <div style="margin-bottom: 10px">
  513. <span>{{
  514. teacherinfoisFinishSize
  515. }}M</span>
  516. /
  517. <span>{{
  518. teacherinfoisAllSize
  519. }}M</span>
  520. </div>
  521. <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  522. ? teacherinfoprogress
  523. : 0
  524. " style="width: 80%"></el-progress>
  525. </div>
  526. </div>
  527. </div>
  528. </div>
  529. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  530. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  531. <div class="c_info_title">
  532. 已有教案摘要
  533. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  534. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  535. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  536. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  537. </el-tooltip>
  538. </div>
  539. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  540. <div style="width: calc(100%);" class='op_task_box'>
  541. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  542. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  543. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  544. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  545. <div class="op_box">
  546. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  547. <div style="display: flex;">
  548. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  549. <div class="r_pub_button_op"
  550. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  551. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  552. </el-tooltip>
  553. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  561. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  562. <div class="c_info_title">
  563. 课程目标
  564. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  565. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  566. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  567. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  568.                   </el-tooltip>
  569. </div>
  570. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  571. <div style="width: calc(100%);" class='op_task_box'>
  572. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  573. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  574. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  575. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  576. <div class="op_box">
  577. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  578. <div style="display: flex;">
  579. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  580. <div class="r_pub_button_op"
  581. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  582. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  583. </el-tooltip>
  584. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  592. <div style="position: relative;
  593. background: #fff;
  594. box-sizing: border-box;
  595. padding: 1px 20px 10px;
  596. width: 100%;
  597. border-radius: 10px;">
  598. <div style="
  599. display: flex;
  600. flex-direction: row;
  601. justify-content: space-between;
  602. align-items: center;
  603. " :style="{
  604. margin: true
  605. ? '20px 0 10px'
  606. : '20px 0 0',
  607. }">
  608. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  609. 系统推荐参考资料
  610. <div class="add_info_box" style="margin: 0 0 0 auto">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  613. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  614. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  615.  </el-tooltip>
  616. </div>
  617. </div>
  618. </div>
  619. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  620. <div class="add_chapters_box add_c_none" v-if="
  621. cankaoInfoData &&
  622. cankaoInfoData.length == 0
  623. ">
  624. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  625. </div>
  626. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  627. <div @dragstart="
  628. dragStart(item1, index1, 0)
  629. " @dragover.prevent="
  630. dragOver(index1, 0)
  631. " @dragend="dragEnd()" :draggable="isdrag ==
  632. 'chapter-' + 0 + '-' + index1
  633. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  634. getChapterData(
  635. $event,
  636. index1,
  637. item1.type
  638. )
  639. " :class="{
  640. dragOverTop2:
  641. newIndex === index1 &&
  642. typeIndex ==
  643. 'chapter-' +
  644. 0 +
  645. '-' +
  646. index1 &&
  647. oldIndex > index1 &&
  648. dragType == 'drag',
  649. dragOverBottom2:
  650. newIndex === index1 &&
  651. typeIndex ==
  652. 'chapter-' +
  653. 0 +
  654. '-' +
  655. index1 &&
  656. oldIndex < index1 &&
  657. dragType == 'drag',
  658. }">
  659. <div class="chapter_upload_o" style="
  660. position: relative;
  661. display: flex;
  662. align-items: center;
  663. ">
  664. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  665. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  666. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  667. </div>
  668. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  669. </div>
  670. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  671. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  672. </div>
  673. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  674. </div>
  675. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  676. </div>
  677. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  678. </div>
  679. </div>
  680. <div class="chapter_upload_n">
  681. <input readonly="true" v-if="
  682. item1.type == 2 ||
  683. item1.type == 3 ||
  684. item1.type == 12 ||
  685. item1.type == 13 ||
  686. item1.type == 7
  687. " :placeholder="item1.name" style="
  688. border: none;
  689. outline: none;
  690. width: 80%;
  691. minwidth: 215px;
  692. z-index: 99;
  693. font-size: 14px;
  694. white-space: nowrap;
  695. overflow: hidden;
  696. text-overflow: ellipsis;
  697. " />
  698. </div>
  699. <div class="chapter_upload_ic">
  700. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  701. <div class="chapter_upload_ic_r" @click.stop="
  702. deleteCankaoInfoData(
  703. $event,
  704. index1
  705. )
  706. ">
  707. <div></div>
  708. </div>
  709. </div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  717. <div style="position: relative;
  718. background: #fff;
  719. box-sizing: border-box;
  720. padding: 1px 20px 10px;
  721. width: 100%;
  722. border-radius: 10px;">
  723. <div style="
  724. display: flex;
  725. flex-direction: row;
  726. justify-content: space-between;
  727. align-items: center;
  728. " :style="{
  729. margin: true
  730. ? '20px 0 10px'
  731. : '20px 0 0',
  732. }">
  733. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  734. 知识库
  735. <div class="add_info_box" style="margin: 0 0 0 auto">
  736. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  737. 上传补充资料
  738. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  739. beforeUploadInfo2(
  740. $event,
  741. 15
  742. )
  743. " />
  744. </button>
  745. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  746. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  747. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  748. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  749.  </el-tooltip>
  750. </div>
  751. </div>
  752. </div>
  753. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  754. <div class="add_chapters_box add_c_none" v-if="
  755. infoData2 &&
  756. infoData2.length == 0
  757. ">
  758. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  759. </div>
  760. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  761. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  762. getChapterData(
  763. $event,
  764. index1,
  765. item1.type
  766. )
  767. " >
  768. <div class="chapter_upload_o" style="
  769. position: relative;
  770. display: flex;
  771. align-items: center;
  772. ">
  773. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  774. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  775. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  776. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  777. </div>
  778. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  779. </div>
  780. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  781. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  782. </div>
  783. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  784. </div>
  785. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  786. </div>
  787. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  788. </div>
  789. </div>
  790. <div class="chapter_upload_n">
  791. <input readonly="true" v-if="
  792. item1.type == 2 ||
  793. item1.type == 3 ||
  794. item1.type == 12 ||
  795. item1.type == 13 ||
  796. item1.type == 7
  797. " :placeholder="item1.name" @click.stop="
  798. checkChpater2($event, index1 )
  799. " style="
  800. border: none;
  801. outline: none;
  802. width: 80%;
  803. minwidth: 215px;
  804. z-index: 99;
  805. font-size: 14px;
  806. white-space: nowrap;
  807. overflow: hidden;
  808. text-overflow: ellipsis;
  809. " />
  810. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  811. border: none;
  812. outline: none;
  813. width: 80%;
  814. white-space: nowrap;
  815. overflow: hidden;
  816. text-overflow: ellipsis;
  817. " readonly="true" @click="
  818. selectAttText(index1)
  819. " />
  820. <input :placeholder="item1.title ? item1.title : '链接'
  821. " v-if="item1.type == 8" style="
  822. border: none;
  823. outline: none;
  824. width: 80%;
  825. white-space: nowrap;
  826. overflow: hidden;
  827. text-overflow: ellipsis;
  828. " readonly="true" @click="selectLine(index1)" />
  829. <input :placeholder="item1.title ? item1.title : '链接'
  830. " v-if="item1.type == 14" style="
  831. border: none;
  832. outline: none;
  833. width: 80%;
  834. white-space: nowrap;
  835. overflow: hidden;
  836. text-overflow: ellipsis;
  837. " readonly="true" @click="
  838. openUpdateSource(index1)
  839. " />
  840. </div>
  841. <div class="chapter_upload_ic">
  842. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  843. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  844. checkChpater2($event, index1 )
  845. ">
  846. <div></div>
  847. </div>
  848. <div class="chapter_upload_ic_r" @click.stop="
  849. deleteInfoData2(
  850. $event,
  851. index1
  852. )
  853. ">
  854. <div></div>
  855. </div>
  856. </div>
  857. </div>
  858. </div>
  859. </div>
  860. </div>
  861. <div v-if="
  862. infoproVisible
  863. " class="mask">
  864. <div class="progressBox">
  865. <div class="lbox">
  866. <img src="../../../assets/loading.gif" />上传中,请稍后
  867. </div>
  868. <div style="margin-bottom: 10px">
  869. <span>{{
  870. infoisFinishSize
  871. }}M</span>
  872. /
  873. <span>{{
  874. infoisAllSize
  875. }}M</span>
  876. </div>
  877. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  878. ? infoprogress
  879. : 0
  880. " style="width: 80%"></el-progress>
  881. </div>
  882. </div>
  883. </div>
  884. </div>
  885. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  886. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  887. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  888. 课程简要描述
  889. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  890. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  891. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  892. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  893. </el-tooltip>
  894. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;">生成概况和目标</button>
  895. </div>
  896. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  897. <div style="width: calc(100%);" class='op_task_box'>
  898. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  899. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  900. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  901. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  902. <div class="op_box">
  903. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  904. <div style="display: flex;">
  905. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  906. <div class="r_pub_button_op"
  907. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  908. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  909. </el-tooltip>
  910. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
  911. </div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. </div>
  917. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)">
  918. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  919. <div class="c_info_title">
  920. 课程目标
  921. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  922. <button class="c_pub_button_confirm" style="margin: 0px 5px 0px auto;"
  923. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  924. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标</button>
  925. </el-tooltip>
  926. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  927. <button class="c_pub_button_confirm" style="margin: 0 20px 0 0;"
  928. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  929. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标2</button>
  930. </el-tooltip>
  931. </div>
  932. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  933. <div style="width: calc(100%);" class='op_task_box'>
  934. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  935. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  936. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  937. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  938. <div class="op_box">
  939. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  940. <div style="display: flex;">
  941. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  942. <div class="r_pub_button_op"
  943. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  944. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  945. </el-tooltip>
  946. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  947. </div>
  948. </div>
  949. </div>
  950. </div>
  951. </div>
  952. </div>
  953. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  954. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  955. <div class="c_info_title">
  956. 补充资料
  957. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  958. </div>
  959. <div class="buchong_box">
  960. <span>暂时还没有内容,快去添加吧~</span>
  961. </div>
  962. </div> -->
  963. <div style="position: relative;
  964. background: #fff;
  965. box-sizing: border-box;
  966. padding: 1px 20px 10px;
  967. width: 100%;
  968. border-radius: 10px;">
  969. <div style="
  970. display: flex;
  971. flex-direction: row;
  972. justify-content: space-between;
  973. align-items: center;
  974. " :style="{
  975. margin: true
  976. ? '20px 0 10px'
  977. : '20px 0 0',
  978. }">
  979. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  980. 补充资料
  981. <div class="add_info_box" style="margin: 0 0 0 auto">
  982. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  983. 上传补充资料
  984. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  985. beforeUploadInfo2(
  986. $event,
  987. 13
  988. )
  989. " />
  990. </button>
  991. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  992. 图文
  993. </button>
  994. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  995. 链接
  996. </button>
  997. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  998. 代码
  999. </button>
  1000. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1001. 资源
  1002. </button> -->
  1003. </div>
  1004. </div>
  1005. </div>
  1006. <div>
  1007. <div class="add_chapters_box add_c_none" v-if="
  1008. infoData &&
  1009. infoData.length == 0
  1010. ">
  1011. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1012. </div>
  1013. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1014. <div @dragstart="
  1015. dragStart(item1, index1, 0)
  1016. " @dragover.prevent="
  1017. dragOver(index1, 0)
  1018. " @dragend="dragEnd()" :draggable="isdrag ==
  1019. 'chapter-' + 0 + '-' + index1
  1020. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1021. getChapterData(
  1022. $event,
  1023. index1,
  1024. item1.type
  1025. )
  1026. " :class="{
  1027. dragOverTop2:
  1028. newIndex === index1 &&
  1029. typeIndex ==
  1030. 'chapter-' +
  1031. 0 +
  1032. '-' +
  1033. index1 &&
  1034. oldIndex > index1 &&
  1035. dragType == 'drag',
  1036. dragOverBottom2:
  1037. newIndex === index1 &&
  1038. typeIndex ==
  1039. 'chapter-' +
  1040. 0 +
  1041. '-' +
  1042. index1 &&
  1043. oldIndex < index1 &&
  1044. dragType == 'drag',
  1045. }">
  1046. <!-- <div @mousedown="
  1047. isdrag =
  1048. 'chapter-' + 0 + '-' + index1
  1049. " @mouseup="isdrag = ''" @touchstart="
  1050. isdrag =
  1051. 'chapter-' + 0 + '-' + index1
  1052. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1053. <div class="chapter_upload_o" style="
  1054. position: relative;
  1055. display: flex;
  1056. align-items: center;
  1057. ">
  1058. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1059. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1060. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1061. </div>
  1062. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1063. </div>
  1064. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1065. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1066. </div>
  1067. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1068. </div>
  1069. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1070. </div>
  1071. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1072. </div>
  1073. </div>
  1074. <div class="chapter_upload_n">
  1075. <input readonly="true" v-if="
  1076. item1.type == 2 ||
  1077. item1.type == 3 ||
  1078. item1.type == 12 ||
  1079. item1.type == 13 ||
  1080. item1.type == 7
  1081. " :placeholder="item1.name" @click="
  1082. updataVideoT(
  1083. $event,
  1084. index1
  1085. )
  1086. " style="
  1087. border: none;
  1088. outline: none;
  1089. width: 80%;
  1090. minwidth: 215px;
  1091. z-index: 99;
  1092. font-size: 14px;
  1093. white-space: nowrap;
  1094. overflow: hidden;
  1095. text-overflow: ellipsis;
  1096. " />
  1097. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1098. border: none;
  1099. outline: none;
  1100. width: 80%;
  1101. white-space: nowrap;
  1102. overflow: hidden;
  1103. text-overflow: ellipsis;
  1104. " readonly="true" @click="
  1105. selectAttText(index1)
  1106. " />
  1107. <input :placeholder="item1.title ? item1.title : '链接'
  1108. " v-if="item1.type == 8" style="
  1109. border: none;
  1110. outline: none;
  1111. width: 80%;
  1112. white-space: nowrap;
  1113. overflow: hidden;
  1114. text-overflow: ellipsis;
  1115. " readonly="true" @click="selectLine(index1)" />
  1116. <input :placeholder="item1.title ? item1.title : '链接'
  1117. " v-if="item1.type == 14" style="
  1118. border: none;
  1119. outline: none;
  1120. width: 80%;
  1121. white-space: nowrap;
  1122. overflow: hidden;
  1123. text-overflow: ellipsis;
  1124. " readonly="true" @click="
  1125. openUpdateSource(index1)
  1126. " />
  1127. </div>
  1128. <div class="chapter_upload_ic">
  1129. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1130. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1131. <div class="chapter_upload_up" @click="
  1132. upCd(
  1133. $event,
  1134. index1
  1135. )
  1136. "></div>
  1137. <div class="chapter_upload_down" @click="
  1138. downCd(
  1139. $event,
  1140. index1
  1141. )
  1142. "></div>
  1143. </div>
  1144. <div class="chapter_upload_ic_edit" v-if="
  1145. item1.type == 2 ||
  1146. item1.type == 3 ||
  1147. item1.type == 12 ||
  1148. item1.type == 13 ||
  1149. item1.type == 7
  1150. " @click.stop="
  1151. updataVideoT(
  1152. $event,
  1153. index1
  1154. )
  1155. ">
  1156. <div></div>
  1157. </div>
  1158. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1159. selectAttText(index1)
  1160. ">
  1161. <div></div>
  1162. </div>
  1163. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1164. @click="selectLine(index1)">
  1165. <div></div>
  1166. </div>
  1167. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1168. openUpdateSource(index1)
  1169. ">
  1170. <div></div>
  1171. </div> -->
  1172. <div class="chapter_upload_ic_r" @click.stop="
  1173. deleteInfoData(
  1174. $event,
  1175. index1
  1176. )
  1177. ">
  1178. <div></div>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. </div>
  1183. </div>
  1184. </div>
  1185. <div v-if="
  1186. infoproVisible
  1187. " class="mask">
  1188. <div class="progressBox">
  1189. <!-- <div id="closePro" class="closeCss">
  1190. <img src="../../../../assets/icon/close.png" alt />
  1191. </div> -->
  1192. <div class="lbox">
  1193. <img src="../../../assets/loading.gif" />上传中,请稍后
  1194. </div>
  1195. <div style="margin-bottom: 10px">
  1196. <span>{{
  1197. infoisFinishSize
  1198. }}M</span>
  1199. /
  1200. <span>{{
  1201. infoisAllSize
  1202. }}M</span>
  1203. </div>
  1204. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1205. ? infoprogress
  1206. : 0
  1207. " style="width: 80%"></el-progress>
  1208. </div>
  1209. </div>
  1210. </div>
  1211. </div>
  1212. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1213. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1214. <div class="c_info_title">
  1215. 补充描述
  1216. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1217. </div>
  1218. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1219. <div style="width: calc(100%)">
  1220. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1221. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. </div>
  1226. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1227. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1228. <div class="c_info_title">
  1229. 课程大纲
  1230. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1231. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1232. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1233. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1234. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1235. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1236. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1237. </el-tooltip>
  1238. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1239. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1240. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1241. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1242. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1243. </div>
  1244. <div class="task_outline">
  1245. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1246. <div class="outline_task">
  1247. <div class="title">任务{{ index + 1 }}</div>
  1248. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1249. v-model="item.task" />
  1250. <div class="outline_btn">
  1251. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1252. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1253. </el-tooltip>
  1254. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1255. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1256. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1257. </div>
  1258. </div>
  1259. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1260. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1261. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1262. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1263. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1264. <div class="op_box">
  1265. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1266. <div style="display: flex;">
  1267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1268. <div class="r_pub_button_op"
  1269. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1270. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1271. </el-tooltip>
  1272. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1273. item.isTask3 ? '确定' : '编辑'}}</div>
  1274. </div>
  1275. </div>
  1276. </div>
  1277. </div>
  1278. </div>
  1279. </div>
  1280. </div>
  1281. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  1282. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1283. <div class="c_info_title">
  1284. 概念群
  1285. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1286. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1287. </div>
  1288. <div class="task_outline">
  1289. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1290. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1291. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1292. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1293. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1294. <div class="op_box">
  1295. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1296. <div style="display: flex;">
  1297. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1298. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1299. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1300. </el-tooltip>
  1301. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1302. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1303. </div>
  1304. </div>
  1305. </div>
  1306. </div>
  1307. </div>
  1308. </div>
  1309. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  1310. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1311. <div class="c_info_title">
  1312. 问题链
  1313. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1314. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1315. </div>
  1316. <div class="task_outline">
  1317. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1318. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1319. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1320. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1321. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1322. <div class="op_box">
  1323. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1324. <div style="display: flex;">
  1325. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1326. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1327. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1328. </el-tooltip>
  1329. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1330. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1331. </div>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. </div>
  1337. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  1338. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1339. <div class="c_info_title">
  1340. 目标层
  1341. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1342. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1343. </div>
  1344. <div class="task_outline">
  1345. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1346. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1347. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1348. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1349. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1350. <div class="op_box">
  1351. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1352. <div style="display: flex;">
  1353. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1354. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1355. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1356. </el-tooltip>
  1357. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1358. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1359. </div>
  1360. </div>
  1361. </div>
  1362. </div>
  1363. </div>
  1364. </div>
  1365. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  1366. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1367. <div class="c_info_title">
  1368. 任务簇
  1369. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1370. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1371. </div>
  1372. <div class="task_outline">
  1373. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1374. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1375. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1376. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1377. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1378. <div class="op_box">
  1379. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1380. <div style="display: flex;">
  1381. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1382. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1383. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1384. </el-tooltip>
  1385. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1386. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1387. </div>
  1388. </div>
  1389. </div>
  1390. </div>
  1391. </div>
  1392. </div>
  1393. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1394. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1395. <div class="c_info_title">
  1396. 教案
  1397. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1398. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1399. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1400. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1401. </el-tooltip>
  1402. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1403. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1404. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1405. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1406. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1407. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1408. </el-tooltip>
  1409. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1410. </div>
  1411. <div class="task_outline">
  1412. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1413. <div class="outline_task">
  1414. <div class="title">任务{{ index + 1 }}</div>
  1415. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1416. v-model="item.task" />
  1417. </div>
  1418. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1419. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1420. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1421. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1422. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1423. <div class="op_box">
  1424. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1425. <div style="display: flex;">
  1426. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1427. <div class="r_pub_button_op"
  1428. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1429. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1430. </el-tooltip>
  1431. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1432. item.isTask3 ? '确定' : '编辑'}}</div>
  1433. </div>
  1434. </div>
  1435. </div>
  1436. </div>
  1437. </div>
  1438. </div>
  1439. </div>
  1440. <div class="info_btnBox3" v-if="istemplate != 1">
  1441. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1442. goTo(
  1443. '/course?userid=' +
  1444. userid +
  1445. '&oid=' +
  1446. oid +
  1447. '&org=' +
  1448. org +
  1449. '&role=' +
  1450. role
  1451. )
  1452. ">
  1453. 返回课程
  1454. </button>
  1455. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1456. {{ steps == 4 ? "返回课程" : "上一步" }}
  1457. </button>
  1458. <button class="c_pub_button_confirm" v-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1459. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1460. </button>
  1461. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1462. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  1463. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1464. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1465. pub_btn_next_img: steps != 3,
  1466. pub_btn_finish_img: steps == 3,
  1467. }">
  1468. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1469. </button>
  1470. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1471. @contextmenu.prevent="nextSteps(1)" :class="{
  1472. pub_btn_next_img: steps != 3,
  1473. pub_btn_finish_img: steps == 3,
  1474. }">
  1475. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1476. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1477. : "下一步" }}
  1478. </button>
  1479. </el-tooltip>
  1480. </div>
  1481. </div>
  1482. <div class="rightBox" v-if="steps == 2" :style="{
  1483. height:
  1484. !isStepDisplay && !isBtnDisplay
  1485. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1486. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1487. }">
  1488. <div class="basic_box" style="
  1489. padding: 20px 30px 0px !important;
  1490. box-sizing: border-box;
  1491. height: calc(100% - 80px);
  1492. overflow: auto;
  1493. background: #fff;
  1494. ">
  1495. <!-- <div
  1496. style="
  1497. color: #b8b8b8;
  1498. background: #fff;
  1499. width: 26%;
  1500. height: 40px;
  1501. border-radius: 15px;
  1502. padding-left: 20px;
  1503. line-height: 40px;
  1504. font-size: 17px;
  1505. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1506. "
  1507. >-->
  1508. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1509. 请选择合适的课程模板
  1510. </div>
  1511. <div class="wordbox">
  1512. <div class="wordTeacher" @click="checkTemplate2()">
  1513. <div class="wordPic">
  1514. <img src="../../../assets/icon/new/template_none.png" alt />
  1515. </div>
  1516. <div style="
  1517. margin-top: 10px;
  1518. line-height: 19px;
  1519. overflow: hidden;
  1520. text-overflow: ellipsis;
  1521. white-space: nowrap;
  1522. padding: 0 20px;
  1523. ">
  1524. 空白模板
  1525. </div>
  1526. </div>
  1527. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1528. <div class="wordPic">
  1529. <img src="../../../assets/icon/new/template.png" alt />
  1530. </div>
  1531. <div style="
  1532. margin-top: 10px;
  1533. line-height: 19px;
  1534. overflow: hidden;
  1535. text-overflow: ellipsis;
  1536. white-space: nowrap;
  1537. padding: 0 20px;
  1538. ">
  1539. {{ aa.title }}
  1540. </div>
  1541. </div>
  1542. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1543. <div class="wordPic">
  1544. <img src="../../../assets/icon/new/template.png" alt />
  1545. </div>
  1546. <div style="
  1547. margin-top: 10px;
  1548. line-height: 19px;
  1549. overflow: hidden;
  1550. text-overflow: ellipsis;
  1551. white-space: nowrap;
  1552. padding: 0 20px;
  1553. ">
  1554. 简易模板
  1555. </div>
  1556. </div>
  1557. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1558. <div class="wordPic">
  1559. <img src="../../../assets/icon/new/template.png" alt />
  1560. </div>
  1561. <div style="
  1562. margin-top: 10px;
  1563. line-height: 19px;
  1564. overflow: hidden;
  1565. text-overflow: ellipsis;
  1566. white-space: nowrap;
  1567. padding: 0 20px;
  1568. ">
  1569. 智能粘贴模式
  1570. </div>
  1571. </div>
  1572. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1573. <div class="wordPic">
  1574. <img src="../../../assets/icon/wordMub.png" alt />
  1575. </div>
  1576. <div style="
  1577. margin-top: 10px;
  1578. line-height: 19px;
  1579. overflow: hidden;
  1580. text-overflow: ellipsis;
  1581. white-space: nowrap;
  1582. padding: 0 20px;
  1583. ">
  1584. 未来小学课程设计
  1585. </div>
  1586. </div> -->
  1587. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1588. <div class="wordPic">
  1589. <img src="../../../assets/icon/wordMub.png" alt />
  1590. </div>
  1591. <div style="
  1592. margin-top: 10px;
  1593. line-height: 19px;
  1594. overflow: hidden;
  1595. text-overflow: ellipsis;
  1596. white-space: nowrap;
  1597. padding: 0 20px;
  1598. ">
  1599. 我的课程
  1600. </div>
  1601. </div> -->
  1602. </div>
  1603. </div>
  1604. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1605. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1606. goTo(
  1607. '/course?userid=' +
  1608. userid +
  1609. '&oid=' +
  1610. oid +
  1611. '&org=' +
  1612. org +
  1613. '&role=' +
  1614. role
  1615. )
  1616. ">
  1617. 返回课程
  1618. </button>
  1619. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1620. {{ steps == 4 ? "返回课程" : "上一步" }}
  1621. </button>
  1622. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1623. pub_btn_next_img: steps != 3,
  1624. pub_btn_finish_img: steps == 3,
  1625. }">
  1626. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1627. </button>
  1628. </div>
  1629. </div>
  1630. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1631. height:
  1632. !isStepDisplay && !isBtnDisplay
  1633. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1634. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1635. }">
  1636. <div class="rb_c_box">
  1637. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1638. <div class="rb_c_nav">
  1639. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1640. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1641. </div>
  1642. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1643. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1644. position: istemplate == 1 ? 'sticky' : 'unset',
  1645. top: istemplate == 1 ? '0' : 'unset'
  1646. }">
  1647. <!-- <div class="navTop">辅助导航</div> -->
  1648. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1649. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1650. <div class="nt_taskBox" style="width: 100%;">
  1651. <div class="nt_taskTitle"
  1652. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1653. unitIndex + 1 }}</div>
  1654. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1655. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1656. <span>{{ unitJson[unitIndex].dyName }}</span>
  1657. </el-tooltip>
  1658. </div>
  1659. </div>
  1660. </div> -->
  1661. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1662. .taskJson" :key="tIndex" :class="{
  1663. dragOverTop:
  1664. newIndex === tIndex &&
  1665. typeIndex == 'task-' + tIndex &&
  1666. oldIndex > tIndex &&
  1667. dragType == 'task',
  1668. dragOverBottom:
  1669. newIndex === tIndex &&
  1670. typeIndex == 'task-' + tIndex &&
  1671. oldIndex < tIndex &&
  1672. dragType == 'task',
  1673. }">
  1674. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1675. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1676. class="navTask" :class="{
  1677. isNavTask:
  1678. isClickColor > 0 && isClickColor == tIndex + 1,
  1679. isNavOpen: t.toolOpen,
  1680. }">
  1681. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1682. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1683. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1684. class="chapter_upload_drag"></div>
  1685. <div class="nt_taskBox">
  1686. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1687. <div class="nt_taskName">
  1688. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1689. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1690. </el-tooltip>
  1691. </div>
  1692. </div>
  1693. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1694. 1
  1695. ">
  1696. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1697. @click.stop="taskMove(1, tIndex)"></div>
  1698. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1699. @click.stop="taskMove(2, tIndex)"></div>
  1700. </div> -->
  1701. </div>
  1702. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1703. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1704. @click="jumpGj(tIndex, toolIndex2)">
  1705. <div class="gjCss" :class="{
  1706. isGjCss:
  1707. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1708. }">
  1709. <div>工具{{ toolIndex2 + 1 }}:</div>
  1710. <div>
  1711. {{
  1712. toolsData[tool.tool[0]] &&
  1713. toolsData[tool.tool[0]].name
  1714. }}
  1715. </div>
  1716. </div>
  1717. </div>
  1718. </div>
  1719. </div>
  1720. </div>
  1721. <div class="navBottom" v-if="courseState == 1">
  1722. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1723. dragOverTop:
  1724. newIndex === stageIndex &&
  1725. typeIndex == 'Unit-' + stageIndex &&
  1726. oldIndex > stageIndex &&
  1727. dragType == 'Unit',
  1728. dragOverBottom:
  1729. newIndex === stageIndex &&
  1730. typeIndex == 'Unit-' + stageIndex &&
  1731. oldIndex < stageIndex &&
  1732. dragType == 'Unit',
  1733. }">
  1734. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1735. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1736. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1737. isNavStage: stageIndex == unitIndex,
  1738. isNavStageOpen: stage.toolOpen,
  1739. }">
  1740. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1741. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1742. class="chapter_upload_drag"></div>
  1743. <div class="nt_taskBox">
  1744. <div class="nt_taskTitle">
  1745. 第{{ stageIndex + 1 }}阶段:
  1746. </div>
  1747. <div class="nt_taskName">
  1748. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1749. " placement="top">
  1750. <span>{{
  1751. stage.dyName ? stage.dyName : "未命名阶段"
  1752. }}</span>
  1753. </el-tooltip>
  1754. </div>
  1755. </div>
  1756. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1757. </div>
  1758. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1759. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1760. dragOverTop:
  1761. newIndex === tIndex &&
  1762. typeIndex == 'task-' + tIndex &&
  1763. ((oldIndex > tIndex &&
  1764. stageIndex == checkUnitIndex) ||
  1765. (oldIndex == tIndex &&
  1766. stageIndex == checkUnitIndex &&
  1767. checkUnitIndex != oldUnitIndex)) &&
  1768. dragType == 'task',
  1769. dragOverBottom:
  1770. newIndex === tIndex &&
  1771. typeIndex == 'task-' + tIndex &&
  1772. oldIndex < tIndex &&
  1773. stageIndex == checkUnitIndex &&
  1774. dragType == 'task',
  1775. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1776. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1777. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1778. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1779. isNavTask:
  1780. isClickColor > 0 &&
  1781. isClickColor == tIndex + 1 &&
  1782. stageIndex == unitIndex,
  1783. isNavOpen: t.toolOpen,
  1784. }">
  1785. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1786. <div @mousedown="
  1787. isdrag = 'task-' + stageIndex + '-' + tIndex
  1788. " @mouseup="isdrag = ''" @touchstart="
  1789. isdrag = 'task-' + stageIndex + '-' + tIndex
  1790. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1791. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1792. <div class="nt_taskTitle">
  1793. 任务{{ tIndex + 1 }}:
  1794. </div>
  1795. <div class="nt_taskName">
  1796. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1797. <span>{{
  1798. t.task ? t.task : "未命名任务"
  1799. }}</span>
  1800. </el-tooltip>
  1801. </div>
  1802. </div>
  1803. </div>
  1804. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1805. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1806. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1807. <div class="gjCss" :class="{
  1808. isGjCss:
  1809. toolIndexType ==
  1810. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1811. }">
  1812. <div>工具{{ toolIndex2 + 1 }}:</div>
  1813. <div>
  1814. {{
  1815. toolsData[tool.tool[0]] &&
  1816. toolsData[tool.tool[0]].name
  1817. }}
  1818. </div>
  1819. </div>
  1820. </div>
  1821. </div>
  1822. </div>
  1823. </div>
  1824. </div>
  1825. </div>
  1826. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1827. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1828. </div>
  1829. </div>
  1830. <div class="rb_c_box_right">
  1831. <!-- <div class="rb_c_box_btn">
  1832. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1833. </div> -->
  1834. <div class="basic_box" ref="unitBox">
  1835. <div v-if="false" style="
  1836. display: flex;
  1837. flex-direction: row;
  1838. align-items: center;
  1839. position: sticky;
  1840. top: 0;
  1841. z-index: 99;
  1842. width: 100%;
  1843. padding: 0 20px 0 20px;
  1844. box-sizing: border-box;
  1845. background: #fff;
  1846. border-radius: 8px;
  1847. ">
  1848. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1849. <div class="cru_selectBox" :style="{
  1850. maxWidth: isPasteTask
  1851. ? 'calc(100% - 335px)'
  1852. : 'calc(100% - 190px)',
  1853. }" v-if="courseState == 1">
  1854. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1855. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1856. <!-- item.dyName ? item.dyName : -->
  1857. <span v-if="
  1858. unitJson[unitJson.length - 1].easy == 4 ||
  1859. unitJson[unitJson.length - 1].easy == 6
  1860. ">{{
  1861. item.dyName
  1862. ? item.dyName
  1863. : "第" + (index + 1) + "阶段"
  1864. }}</span>
  1865. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1866. </div>
  1867. <div class="cru_line" :style="{
  1868. left: offsetLetfPx + 'px',
  1869. }"></div>
  1870. </div>
  1871. <div class="addStageImg" @click="addunit()" v-if="
  1872. !(unitJson[unitJson.length - 1].easy == 4) &&
  1873. !(unitJson[unitJson.length - 1].easy == 6) &&
  1874. courseState == 1
  1875. ">
  1876. <img src="../../../assets/icon/new/addStage.png" alt />
  1877. </div>
  1878. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1879. v-if="courseState == 2" style="margin: 15px 0">
  1880. 新建阶段
  1881. </button>
  1882. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1883. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1884. 阶段顺序
  1885. </button>
  1886. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1887. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1888. 智能粘贴
  1889. </button>
  1890. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1891. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1892. }" style="padding: 0 12px">
  1893. 选择课程模板
  1894. </button>
  1895. </div>
  1896. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1897. :key="index">
  1898. <div v-if="courseState == 4" style="position: relative;
  1899. background: #fff;
  1900. box-sizing: border-box;
  1901. padding: 1px 20px 10px;
  1902. width: 100%;
  1903. border-radius: 10px;">
  1904. <div style="
  1905. display: flex;
  1906. flex-direction: row;
  1907. justify-content: space-between;
  1908. align-items: center;
  1909. " :style="{
  1910. margin: !item.taskJson[0].isFoldchapter
  1911. ? '20px 0 10px'
  1912. : '20px 0 0',
  1913. }">
  1914. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1915. 学习内容
  1916. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1917. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1918. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  1919. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  1920. </el-tooltip>
  1921. </div>
  1922. </div>
  1923. <div>
  1924. <div class="add_chapters_box add_c_none" v-if="
  1925. item.taskJson[0].chapterData &&
  1926. item.taskJson[0].chapterData.length == 0
  1927. ">
  1928. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1929. </div>
  1930. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1931. <div @dragstart="
  1932. dragStart(item1, index1, 0)
  1933. " @dragover.prevent="
  1934. dragOver(index1, 0)
  1935. " @dragend="dragEnd()" :draggable="isdrag ==
  1936. 'chapter-' + 0 + '-' + index1
  1937. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1938. :key="item1.id" @click="
  1939. getChapterData(
  1940. $event,
  1941. unitIndex,
  1942. index,
  1943. index1,
  1944. item1.type
  1945. )
  1946. " :class="{
  1947. dragOverTop2:
  1948. newIndex === index1 &&
  1949. typeIndex ==
  1950. 'chapter-' +
  1951. 0 +
  1952. '-' +
  1953. index1 &&
  1954. oldIndex > index1 &&
  1955. dragType == 'drag',
  1956. dragOverBottom2:
  1957. newIndex === index1 &&
  1958. typeIndex ==
  1959. 'chapter-' +
  1960. 0 +
  1961. '-' +
  1962. index1 &&
  1963. oldIndex < index1 &&
  1964. dragType == 'drag',
  1965. }">
  1966. <div @mousedown="
  1967. isdrag =
  1968. 'chapter-' + 0 + '-' + index1
  1969. " @mouseup="isdrag = ''" @touchstart="
  1970. isdrag =
  1971. 'chapter-' + 0 + '-' + index1
  1972. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1973. <div class="chapter_upload_o" style="
  1974. position: relative;
  1975. display: flex;
  1976. align-items: center;
  1977. ">
  1978. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1979. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1980. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1981. </div>
  1982. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1983. </div>
  1984. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1985. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1986. </div>
  1987. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1988. </div>
  1989. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1990. </div>
  1991. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1992. </div>
  1993. </div>
  1994. <div class="chapter_upload_n">
  1995. <input readonly="true" v-if="
  1996. item1.type == 2 ||
  1997. item1.type == 3 ||
  1998. item1.type == 12 ||
  1999. item1.type == 13 ||
  2000. item1.type == 7
  2001. " :placeholder="item1.name" @click="
  2002. updataVideoT(
  2003. $event,
  2004. unitIndex,
  2005. 0,
  2006. index1
  2007. )
  2008. " style="
  2009. border: none;
  2010. outline: none;
  2011. width: 80%;
  2012. minwidth: 215px;
  2013. z-index: 99;
  2014. font-size: 14px;
  2015. white-space: nowrap;
  2016. overflow: hidden;
  2017. text-overflow: ellipsis;
  2018. " />
  2019. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2020. border: none;
  2021. outline: none;
  2022. width: 80%;
  2023. white-space: nowrap;
  2024. overflow: hidden;
  2025. text-overflow: ellipsis;
  2026. " readonly="true" @click="
  2027. selectAttText(0, index1)
  2028. " />
  2029. <input :placeholder="item1.title ? item1.title : '链接'
  2030. " v-if="item1.type == 8" style="
  2031. border: none;
  2032. outline: none;
  2033. width: 80%;
  2034. white-space: nowrap;
  2035. overflow: hidden;
  2036. text-overflow: ellipsis;
  2037. " readonly="true" @click="selectLine(0, index1)" />
  2038. <input :placeholder="item1.title ? item1.title : '链接'
  2039. " v-if="item1.type == 14" style="
  2040. border: none;
  2041. outline: none;
  2042. width: 80%;
  2043. white-space: nowrap;
  2044. overflow: hidden;
  2045. text-overflow: ellipsis;
  2046. " readonly="true" @click="
  2047. openUpdateSource(0, index1)
  2048. " />
  2049. </div>
  2050. <div class="chapter_upload_ic">
  2051. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2052. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2053. checkChpater( $event, unitIndex, 0, index1 )
  2054. ">
  2055. <div></div>
  2056. </div>
  2057. <div class="chapter_upload_ud" style="z-index: 99">
  2058. <div class="chapter_upload_up" @click="
  2059. upCd(
  2060. $event,
  2061. unitIndex,
  2062. index,
  2063. 0,
  2064. index1
  2065. )
  2066. "></div>
  2067. <div class="chapter_upload_down" @click="
  2068. downCd(
  2069. $event,
  2070. unitIndex,
  2071. index,
  2072. 0,
  2073. index1
  2074. )
  2075. "></div>
  2076. </div>
  2077. <div class="chapter_upload_ic_edit" v-if="
  2078. item1.type == 2 ||
  2079. item1.type == 3 ||
  2080. item1.type == 12 ||
  2081. item1.type == 13 ||
  2082. item1.type == 7
  2083. " @click.stop="
  2084. updataVideoT(
  2085. $event,
  2086. unitIndex,
  2087. 0,
  2088. index1
  2089. )
  2090. ">
  2091. <div></div>
  2092. </div>
  2093. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2094. selectAttText(0, index1)
  2095. ">
  2096. <div></div>
  2097. </div>
  2098. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2099. @click="selectLine(0, index1)">
  2100. <div></div>
  2101. </div>
  2102. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2103. openUpdateSource(0, index1)
  2104. ">
  2105. <div></div>
  2106. </div>
  2107. <div class="chapter_upload_ic_r" @click.stop="
  2108. deleteChapterData(
  2109. $event,
  2110. unitIndex,
  2111. index,
  2112. index1,
  2113. 0
  2114. )
  2115. ">
  2116. <div></div>
  2117. </div>
  2118. </div>
  2119. </div>
  2120. </div>
  2121. </div>
  2122. </div>
  2123. <div class="add_info_box" style="margin: 10px 0 0">
  2124. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2125. 文件
  2126. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  2127. beforeUpload2(
  2128. $event,
  2129. unitIndex,
  2130. 13,
  2131. 0
  2132. )
  2133. " />
  2134. </button>
  2135. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2136. 图文
  2137. </button>
  2138. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2139. 链接
  2140. </button>
  2141. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2142. 代码
  2143. </button>
  2144. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2145. 资源
  2146. </button>
  2147. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2148. AI生成PPT
  2149. </button>
  2150. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2151. AI生成教案
  2152. </button>
  2153. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2154. 智能检索视频
  2155. </button>
  2156. </div>
  2157. <div v-if="
  2158. unitJson[unitIndex].chapterInfo[0].taskJson[
  2159. 0
  2160. ].proVisible
  2161. " class="mask">
  2162. <div class="progressBox">
  2163. <!-- <div id="closePro" class="closeCss">
  2164. <img src="../../../../assets/icon/close.png" alt />
  2165. </div> -->
  2166. <div class="lbox">
  2167. <img src="../../../assets/loading.gif" />上传中,请稍后
  2168. </div>
  2169. <div style="margin-bottom: 10px">
  2170. <span>{{
  2171. unitJson[unitIndex].chapterInfo[0].taskJson[
  2172. 0
  2173. ].isFinishSize
  2174. }}M</span>
  2175. /
  2176. <span>{{
  2177. unitJson[unitIndex].chapterInfo[0].taskJson[
  2178. 0
  2179. ].isAllSize
  2180. }}M</span>
  2181. </div>
  2182. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2183. 0
  2184. ].progress
  2185. ? unitJson[unitIndex].chapterInfo[0]
  2186. .taskJson[0].progress
  2187. : 0
  2188. " style="width: 80%"></el-progress>
  2189. </div>
  2190. </div>
  2191. </div>
  2192. <div class="chapter_box" v-if="courseState == 1">
  2193. <div class="chapter_contentbox">
  2194. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2195. <div class="cc_input">
  2196. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2197. v-model="unitJson[unitIndex].dyName" />
  2198. </div>
  2199. <div class="remove" v-if="
  2200. (unitJson.length > 1 || courseState != 2) &&
  2201. !(unitJson[unitJson.length - 1].easy == 4) &&
  2202. !(unitJson[unitJson.length - 1].easy == 6)
  2203. " @click="deleteUnit(unitIndex)"></div>
  2204. </div>
  2205. </div>
  2206. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2207. margin: 50px 0px 10px;
  2208. font-size: 1.5em;
  2209. font-weight: 700;
  2210. color: #0f7eff;
  2211. ">
  2212. 添加任务
  2213. </div> -->
  2214. <div class="taskBorder" :style="{
  2215. minHeight: unitJson[unitIndex].easy && 'unset',
  2216. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2217. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2218. <div style="background: #fff; border-radius: 5px">
  2219. <div class="taskTitle">
  2220. <div style="display: flex;width: 100%;justify-content: space-between;">
  2221. <span>任务{{ itemTaskIndex + 1 }}</span>
  2222. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2223. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2224. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2225. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2226. </el-tooltip>
  2227. </div>
  2228. </div>
  2229. <!-- padding: 20px; -->
  2230. <div v-if="unitJson[unitIndex].easy != 1">
  2231. <div :style="{
  2232. marginBottom:
  2233. unitJson[unitIndex].easy == 3 ||
  2234. (unitJson[unitIndex].easy == 5 &&
  2235. itemTask.taskType == 1)
  2236. ? '75px'
  2237. : '0',
  2238. }">
  2239. <div style="
  2240. display: flex;
  2241. margin: 0px 0 20px;
  2242. flex-direction: row;
  2243. justify-content: flex-start;
  2244. align-items: center;
  2245. ">
  2246. <div class="lineTitle">任务概述</div>
  2247. </div>
  2248. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2249. flex-direction: row;
  2250. justify-content: flex-start;
  2251. align-items: center;
  2252. margin: 0;
  2253. ">
  2254. <!-- <div class="cc_title">
  2255. 任务{{ itemTaskIndex + 1 }}
  2256. </div> -->
  2257. <div class="cc_input">
  2258. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2259. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2260. itemTaskIndex
  2261. ].task
  2262. " />
  2263. </div>
  2264. <div class="remove" v-if="
  2265. item.taskJson.length > 1 &&
  2266. (!unitJson[unitIndex].easy ||
  2267. unitJson[unitIndex].easy == 6)
  2268. " @click="deleteTask(itemTaskIndex)"></div>
  2269. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2270. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2271. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2272. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2273. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2274. </div> -->
  2275. </div>
  2276. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2277. display: flex;
  2278. margin: 20px 0;
  2279. flex-direction: row;
  2280. justify-content: flex-start;
  2281. align-items: center;
  2282. ">
  2283. <div class="lineTitle">任务描述</div>
  2284. </div> && !itemTask.isFold2-->
  2285. <div v-if="
  2286. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2287. -1
  2288. " style="margin-top: 20px" class="op_task_box"
  2289. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2290. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2291. itemTaskIndex
  2292. ].taskDetail
  2293. " @change="change"></editor-bar> -->
  2294. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2295. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2296. itemTaskIndex
  2297. ].taskDetail
  2298. "></textarea>
  2299. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2300. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2301. itemTaskIndex
  2302. ].taskDetail
  2303. "></textarea> -->
  2304. <div class="op_box">
  2305. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2306. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2307. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2308. itemTaskIndex
  2309. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2310. itemTaskIndex
  2311. ], itemTaskIndex)">智能优化</div>
  2312. </el-tooltip>
  2313. </div>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. <div
  2318. style="position: relative"
  2319. v-if="courseState == 5"
  2320. >
  2321. <div
  2322. style="
  2323. display: flex;
  2324. flex-direction: row;
  2325. justify-content: space-between;
  2326. align-items: center;
  2327. "
  2328. :style="{
  2329. margin: !itemTask.isFoldchapter
  2330. ? '20px 0 10px'
  2331. : '20px 0 0',
  2332. }"
  2333. >
  2334. <div
  2335. style="margin-bottom: 10px"
  2336. class="lineTitle clineTitle"
  2337. >
  2338. 学习内容
  2339. </div>
  2340. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2341. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2342. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2343. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2344. <!-- <div class="line"></div> -->
  2345. </div>
  2346. <!-- v-if="!itemTask.isFoldchapter" -->
  2347. <div>
  2348. <div
  2349. class="add_chapters_box add_c_none"
  2350. v-if="
  2351. itemTask.chapterData &&
  2352. itemTask.chapterData.length == 0
  2353. "
  2354. >
  2355. <img
  2356. src="../../../assets/icon/new/c_none.png"
  2357. alt
  2358. /><span>请添加学习内容</span>
  2359. </div>
  2360. <div
  2361. v-else
  2362. class="add_chapters_box"
  2363. style="display: flex; flex-direction: column"
  2364. >
  2365. <div
  2366. @dragstart="
  2367. dragStart(item1, index1, itemTaskIndex)
  2368. "
  2369. @dragover.prevent="
  2370. dragOver(index1, itemTaskIndex)
  2371. "
  2372. @dragend="dragEnd()"
  2373. :draggable="
  2374. isdrag ==
  2375. 'chapter-' + itemTaskIndex + '-' + index1
  2376. "
  2377. class="chapter_upload"
  2378. v-for="(item1, index1) in itemTask.chapterData"
  2379. :key="item1.id"
  2380. @click="
  2381. getChapterData(
  2382. $event,
  2383. unitIndex,
  2384. index,
  2385. index1,
  2386. item1.type
  2387. )
  2388. "
  2389. :class="{
  2390. dragOverTop2:
  2391. newIndex === index1 &&
  2392. typeIndex ==
  2393. 'chapter-' +
  2394. itemTaskIndex +
  2395. '-' +
  2396. index1 &&
  2397. oldIndex > index1 &&
  2398. dragType == 'drag',
  2399. dragOverBottom2:
  2400. newIndex === index1 &&
  2401. typeIndex ==
  2402. 'chapter-' +
  2403. itemTaskIndex +
  2404. '-' +
  2405. index1 &&
  2406. oldIndex < index1 &&
  2407. dragType == 'drag',
  2408. }"
  2409. >
  2410. <div
  2411. @mousedown="
  2412. isdrag =
  2413. 'chapter-' + itemTaskIndex + '-' + index1
  2414. "
  2415. @mouseup="isdrag = ''"
  2416. @touchstart="
  2417. isdrag =
  2418. 'chapter-' + itemTaskIndex + '-' + index1
  2419. "
  2420. @touchend="isdrag = ''"
  2421. class="chapter_upload_drag"
  2422. ></div>
  2423. <div
  2424. class="chapter_upload_o"
  2425. style="
  2426. position: relative;
  2427. display: flex;
  2428. align-items: center;
  2429. "
  2430. >
  2431. <div
  2432. class="chapter_upload_l"
  2433. style="padding: 1px 0 0 10px"
  2434. >
  2435. <div
  2436. v-if="item1.type == 2"
  2437. class="chapter_upload_l_i2"
  2438. ></div>
  2439. <div
  2440. v-if="item1.type == 3"
  2441. class="chapter_upload_l_i3"
  2442. style="margin-left: 1px"
  2443. ></div>
  2444. <div
  2445. v-if="item1.type == 6"
  2446. class="chapter_upload_l_i6"
  2447. style="margin-left: 1px"
  2448. ></div>
  2449. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2450. <div
  2451. v-if="item1.type == 8"
  2452. class="chapter_upload_l_i8"
  2453. style="margin-left: 1px"
  2454. ></div>
  2455. <div
  2456. v-if="item1.type == 14"
  2457. class="chapter_upload_l_i14"
  2458. style="margin-left: 1px"
  2459. ></div>
  2460. <div
  2461. v-if="item1.type == 12"
  2462. class="chapter_upload_l_i12"
  2463. style="margin-left: 1px"
  2464. ></div>
  2465. <div
  2466. v-if="item1.type == 13"
  2467. class="chapter_upload_l_i13"
  2468. style="margin-left: 1px"
  2469. ></div>
  2470. </div>
  2471. <div class="chapter_upload_n">
  2472. <input
  2473. readonly="true"
  2474. v-if="
  2475. item1.type == 2 ||
  2476. item1.type == 3 ||
  2477. item1.type == 12 ||
  2478. item1.type == 13 ||
  2479. item1.type == 7
  2480. "
  2481. :placeholder="item1.name"
  2482. @click="
  2483. updataVideoT(
  2484. $event,
  2485. unitIndex,
  2486. itemTaskIndex,
  2487. index1
  2488. )
  2489. "
  2490. style="
  2491. border: none;
  2492. outline: none;
  2493. width: 80%;
  2494. minwidth: 215px;
  2495. z-index: 99;
  2496. font-size: 14px;
  2497. white-space: nowrap;
  2498. overflow: hidden;
  2499. text-overflow: ellipsis;
  2500. "
  2501. />
  2502. <input
  2503. :placeholder="item1.name"
  2504. v-if="item1.type == 6"
  2505. style="
  2506. border: none;
  2507. outline: none;
  2508. width: 80%;
  2509. white-space: nowrap;
  2510. overflow: hidden;
  2511. text-overflow: ellipsis;
  2512. "
  2513. readonly="true"
  2514. @click="
  2515. selectAttText(itemTaskIndex, index1)
  2516. "
  2517. />
  2518. <input
  2519. :placeholder="
  2520. item1.title ? item1.title : '链接'
  2521. "
  2522. v-if="item1.type == 8"
  2523. style="
  2524. border: none;
  2525. outline: none;
  2526. width: 80%;
  2527. white-space: nowrap;
  2528. overflow: hidden;
  2529. text-overflow: ellipsis;
  2530. "
  2531. readonly="true"
  2532. @click="selectLine(itemTaskIndex, index1)"
  2533. />
  2534. <input
  2535. :placeholder="
  2536. item1.title ? item1.title : '链接'
  2537. "
  2538. v-if="item1.type == 14"
  2539. style="
  2540. border: none;
  2541. outline: none;
  2542. width: 80%;
  2543. white-space: nowrap;
  2544. overflow: hidden;
  2545. text-overflow: ellipsis;
  2546. "
  2547. readonly="true"
  2548. @click="
  2549. openUpdateSource(itemTaskIndex, index1)
  2550. "
  2551. />
  2552. </div>
  2553. <div class="chapter_upload_ic">
  2554. <div
  2555. class="chapter_upload_noSee"
  2556. v-if="item1.type == 12"
  2557. ></div>
  2558. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2559. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2560. ">
  2561. <div></div>
  2562. </div>
  2563. <div
  2564. class="chapter_upload_ud"
  2565. style="z-index: 99"
  2566. >
  2567. <div
  2568. class="chapter_upload_up"
  2569. @click="
  2570. upCd(
  2571. $event,
  2572. unitIndex,
  2573. index,
  2574. itemTaskIndex,
  2575. index1
  2576. )
  2577. "
  2578. ></div>
  2579. <div
  2580. class="chapter_upload_down"
  2581. @click="
  2582. downCd(
  2583. $event,
  2584. unitIndex,
  2585. index,
  2586. itemTaskIndex,
  2587. index1
  2588. )
  2589. "
  2590. ></div>
  2591. </div>
  2592. <div
  2593. class="chapter_upload_ic_edit"
  2594. v-if="
  2595. item1.type == 2 ||
  2596. item1.type == 3 ||
  2597. item1.type == 12 ||
  2598. item1.type == 13 ||
  2599. item1.type == 7
  2600. "
  2601. @click.stop="
  2602. updataVideoT(
  2603. $event,
  2604. unitIndex,
  2605. itemTaskIndex,
  2606. index1
  2607. )
  2608. "
  2609. >
  2610. <div></div>
  2611. </div>
  2612. <div
  2613. class="chapter_upload_ic_edit"
  2614. v-if="item1.type == 6"
  2615. @click="
  2616. selectAttText(itemTaskIndex, index1)
  2617. "
  2618. >
  2619. <div></div>
  2620. </div>
  2621. <div
  2622. class="chapter_upload_ic_edit"
  2623. v-if="item1.type == 8"
  2624. @click="selectLine(itemTaskIndex, index1)"
  2625. >
  2626. <div></div>
  2627. </div>
  2628. <div
  2629. class="chapter_upload_ic_edit"
  2630. v-if="item1.type == 14"
  2631. @click="
  2632. openUpdateSource(itemTaskIndex, index1)
  2633. "
  2634. >
  2635. <div></div>
  2636. </div>
  2637. <div
  2638. class="chapter_upload_ic_r"
  2639. @click.stop="
  2640. deleteChapterData(
  2641. $event,
  2642. unitIndex,
  2643. index,
  2644. index1,
  2645. itemTaskIndex
  2646. )
  2647. "
  2648. >
  2649. <div></div>
  2650. </div>
  2651. </div>
  2652. </div>
  2653. </div>
  2654. </div>
  2655. </div>
  2656. <!-- v-if="!itemTask.isFoldchapter" -->
  2657. <div class="add_info_box" style="margin: 10px 0 0">
  2658. <button
  2659. class="c_pub_button_add pub_btn_add_img"
  2660. @click="addImg($event)"
  2661. >
  2662. 文件
  2663. <input
  2664. type="file"
  2665. accept="*"
  2666. style="display: none"
  2667. v-if="inputShow"
  2668. @change="
  2669. beforeUpload2(
  2670. $event,
  2671. unitIndex,
  2672. 13,
  2673. itemTaskIndex
  2674. )
  2675. "
  2676. />
  2677. </button>
  2678. <button
  2679. class="c_pub_button_add pub_btn_add_img"
  2680. @click="addAttText(itemTaskIndex)"
  2681. >
  2682. 图文
  2683. </button>
  2684. <button
  2685. class="c_pub_button_add pub_btn_add_img"
  2686. @click="openLine(itemTaskIndex)"
  2687. >
  2688. 链接
  2689. </button>
  2690. <button
  2691. class="c_pub_button_add pub_btn_add_img"
  2692. @click="pasteLine(itemTaskIndex)"
  2693. >
  2694. 代码
  2695. </button>
  2696. <button
  2697. class="c_pub_button_add pub_btn_add_img"
  2698. @click="openSource(itemTaskIndex)"
  2699. >
  2700. 资源
  2701. </button>
  2702. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2703. AI生成PPT
  2704. </button>
  2705. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2706. AI生成教案
  2707. </button>
  2708. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2709. 智能检索视频
  2710. </button>
  2711. </div>
  2712. <div
  2713. v-if="
  2714. unitJson[unitIndex].chapterInfo[0].taskJson[
  2715. itemTaskIndex
  2716. ].proVisible
  2717. "
  2718. class="mask"
  2719. >
  2720. <div class="progressBox">
  2721. <!-- <div id="closePro" class="closeCss">
  2722. <img src="../../../../assets/icon/close.png" alt />
  2723. </div> -->
  2724. <div class="lbox">
  2725. <img
  2726. src="../../../assets/loading.gif"
  2727. />上传中,请稍后
  2728. </div>
  2729. <div style="margin-bottom: 10px">
  2730. <span
  2731. >{{
  2732. unitJson[unitIndex].chapterInfo[0].taskJson[
  2733. itemTaskIndex
  2734. ].isFinishSize
  2735. }}M</span
  2736. >
  2737. /
  2738. <span
  2739. >{{
  2740. unitJson[unitIndex].chapterInfo[0].taskJson[
  2741. itemTaskIndex
  2742. ].isAllSize
  2743. }}M</span
  2744. >
  2745. </div>
  2746. <el-progress
  2747. :text-inside="true"
  2748. :stroke-width="20"
  2749. :percentage="
  2750. unitJson[unitIndex].chapterInfo[0].taskJson[
  2751. itemTaskIndex
  2752. ].progress
  2753. ? unitJson[unitIndex].chapterInfo[0]
  2754. .taskJson[itemTaskIndex].progress
  2755. : 0
  2756. "
  2757. style="width: 80%"
  2758. ></el-progress>
  2759. </div>
  2760. </div>
  2761. </div>
  2762. <div v-if="
  2763. unitJson[unitIndex].easy == 1 ||
  2764. (unitJson[unitIndex].easy == 5 &&
  2765. itemTask.taskType == 2)
  2766. ">
  2767. <div>
  2768. <div class="add_chapters_box add_c_none" v-if="
  2769. itemTask.chapterData &&
  2770. itemTask.chapterData.length == 0
  2771. ">
  2772. <img src="../../../assets/icon/new/c_none.png" alt />
  2773. </div>
  2774. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2775. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2776. dragOver(index1, itemTaskIndex)
  2777. " @dragend="dragEnd()" :draggable="isdrag ==
  2778. 'chapter-' + itemTaskIndex + '-' + index1
  2779. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2780. :key="item1.id" @click="
  2781. getChapterData(
  2782. $event,
  2783. unitIndex,
  2784. index,
  2785. index1,
  2786. item1.type
  2787. )
  2788. " :class="{
  2789. dragOverTop2:
  2790. newIndex === index1 &&
  2791. typeIndex ==
  2792. 'chapter-' +
  2793. itemTaskIndex +
  2794. '-' +
  2795. index1 &&
  2796. oldIndex > index1,
  2797. dragOverBottom2:
  2798. newIndex === index1 &&
  2799. typeIndex ==
  2800. 'chapter-' +
  2801. itemTaskIndex +
  2802. '-' +
  2803. index1 &&
  2804. oldIndex < index1,
  2805. }">
  2806. <div @mousedown="
  2807. isdrag =
  2808. 'chapter-' + itemTaskIndex + '-' + index1
  2809. " @mouseup="isdrag = ''" @touchstart="
  2810. isdrag =
  2811. 'chapter-' + itemTaskIndex + '-' + index1
  2812. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2813. <div class="chapter_upload_t" style="width: 100%"></div>
  2814. <div class="chapter_upload_o" style="
  2815. position: relative;
  2816. display: flex;
  2817. align-items: center;
  2818. ">
  2819. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2820. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2821. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2822. </div>
  2823. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2824. </div>
  2825. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2826. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2827. </div>
  2828. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2829. </div>
  2830. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2831. </div>
  2832. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2833. </div>
  2834. </div>
  2835. <div class="chapter_upload_n">
  2836. <span style="
  2837. font-size: 14px;
  2838. color: rgb(109, 109, 109);
  2839. height: 14px;
  2840. line-height: 14px;
  2841. " v-if="
  2842. item1.type == 2 ||
  2843. item1.type == 3 ||
  2844. item1.type == 7
  2845. ">{{ item1.text }}-</span>
  2846. <input readonly="true" v-if="
  2847. item1.type == 2 ||
  2848. item1.type == 3 ||
  2849. item1.type == 7
  2850. " :placeholder="item1.name" @click="
  2851. updataVideoT(
  2852. $event,
  2853. unitIndex,
  2854. itemTaskIndex,
  2855. index1
  2856. )
  2857. " style="
  2858. border: none;
  2859. outline: none;
  2860. width: 80%;
  2861. minwidth: 215px;
  2862. z-index: 99;
  2863. font-size: 14px;
  2864. white-space: nowrap;
  2865. overflow: hidden;
  2866. text-overflow: ellipsis;
  2867. " />
  2868. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2869. border: none;
  2870. outline: none;
  2871. width: 80%;
  2872. white-space: nowrap;
  2873. overflow: hidden;
  2874. text-overflow: ellipsis;
  2875. " readonly="true" @click="
  2876. selectAttText(itemTaskIndex, index1)
  2877. " />
  2878. <input :placeholder="item1.title ? item1.title : '链接'
  2879. " v-if="item1.type == 8 || item1.type == 14" style="
  2880. border: none;
  2881. outline: none;
  2882. width: 80%;
  2883. white-space: nowrap;
  2884. overflow: hidden;
  2885. text-overflow: ellipsis;
  2886. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  2887. </div>
  2888. <div class="chapter_upload_ic">
  2889. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2890. <div class="chapter_upload_ud" style="z-index: 99">
  2891. <div class="chapter_upload_up" @click="
  2892. upCd(
  2893. $event,
  2894. unitIndex,
  2895. index,
  2896. itemTaskIndex,
  2897. index1
  2898. )
  2899. "></div>
  2900. <div class="chapter_upload_down" @click="
  2901. downCd(
  2902. $event,
  2903. unitIndex,
  2904. index,
  2905. itemTaskIndex,
  2906. index1
  2907. )
  2908. "></div>
  2909. </div>
  2910. <div class="chapter_upload_ic_edit" v-if="
  2911. item1.type == 2 ||
  2912. item1.type == 3 ||
  2913. item1.type == 12 ||
  2914. item1.type == 13 ||
  2915. item1.type == 7
  2916. " @click.stop="
  2917. updataVideoT(
  2918. $event,
  2919. unitIndex,
  2920. itemTaskIndex,
  2921. index1
  2922. )
  2923. ">
  2924. <div></div>
  2925. </div>
  2926. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2927. selectAttText(itemTaskIndex, index1)
  2928. ">
  2929. <div></div>
  2930. </div>
  2931. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2932. @click="selectLine(itemTaskIndex, index1)">
  2933. <div></div>
  2934. </div>
  2935. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2936. openUpdateSource(itemTaskIndex, index1)
  2937. ">
  2938. <div></div>
  2939. </div>
  2940. <div class="chapter_upload_ic_r" @click.stop="
  2941. deleteChapterData(
  2942. $event,
  2943. unitIndex,
  2944. index,
  2945. index1,
  2946. itemTaskIndex
  2947. )
  2948. ">
  2949. <div></div>
  2950. </div>
  2951. </div>
  2952. </div>
  2953. </div>
  2954. </div>
  2955. </div>
  2956. <div class="add_info_box" style="margin: 10px 0 0">
  2957. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2958. <span style="color: red">*</span>
  2959. 教学设计
  2960. <input type="file"
  2961. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2962. style="display: none" v-if="inputShow" @change="
  2963. beforeUpload3(
  2964. $event,
  2965. unitIndex,
  2966. 3,
  2967. itemTaskIndex,
  2968. '教学设计'
  2969. )
  2970. " />
  2971. </button>
  2972. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2973. <span style="color: red">*</span>
  2974. 教学课件
  2975. <input type="file"
  2976. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2977. style="display: none" v-if="inputShow" @change="
  2978. beforeUpload3(
  2979. $event,
  2980. unitIndex,
  2981. 3,
  2982. itemTaskIndex,
  2983. '教学课件'
  2984. )
  2985. " />
  2986. </button>
  2987. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2988. 教学视频
  2989. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  2990. style="display: none" v-if="inputShow" @change="
  2991. beforeUpload3(
  2992. $event,
  2993. unitIndex,
  2994. 2,
  2995. itemTaskIndex,
  2996. '教学视频'
  2997. )
  2998. " />
  2999. </button>
  3000. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3001. 教学音频
  3002. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3003. beforeUpload3(
  3004. $event,
  3005. unitIndex,
  3006. 2,
  3007. itemTaskIndex,
  3008. '教学音频'
  3009. )
  3010. " />
  3011. </button>
  3012. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3013. 学习单
  3014. <input type="file"
  3015. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3016. style="display: none" v-if="inputShow" @change="
  3017. beforeUpload3(
  3018. $event,
  3019. unitIndex,
  3020. 3,
  3021. itemTaskIndex,
  3022. '学习单'
  3023. )
  3024. " />
  3025. </button>
  3026. </div>
  3027. <div v-if="
  3028. unitJson[unitIndex].chapterInfo[0].taskJson[
  3029. itemTaskIndex
  3030. ].proVisible
  3031. " class="mask">
  3032. <div class="progressBox">
  3033. <!-- <div id="closePro" class="closeCss">
  3034. <img src="../../../../assets/icon/close.png" alt />
  3035. </div> -->
  3036. <div class="lbox">
  3037. <img src="../../../assets/loading.gif" />上传中,请稍后
  3038. </div>
  3039. <div style="margin-bottom: 10px">
  3040. <span>{{
  3041. unitJson[unitIndex].chapterInfo[0].taskJson[
  3042. itemTaskIndex
  3043. ].isFinishSize
  3044. }}M</span>
  3045. /
  3046. <span>{{
  3047. unitJson[unitIndex].chapterInfo[0].taskJson[
  3048. itemTaskIndex
  3049. ].isAllSize
  3050. }}M</span>
  3051. </div>
  3052. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3053. itemTaskIndex
  3054. ].progress
  3055. ? unitJson[unitIndex].chapterInfo[0]
  3056. .taskJson[itemTaskIndex].progress
  3057. : 0
  3058. " style="width: 80%"></el-progress>
  3059. </div>
  3060. </div>
  3061. </div>
  3062. </div>
  3063. <!-- padding: 20px; -->
  3064. <div style="
  3065. background: #fff;
  3066. border-radius: 5px;
  3067. margin-top: 15px;
  3068. ">
  3069. <div v-if="
  3070. unitJson[unitIndex].easy != 3 &&
  3071. !(
  3072. unitJson[unitIndex].easy == 5 &&
  3073. itemTask.taskType == 1
  3074. )
  3075. " style="
  3076. flex-direction: row;
  3077. justify-content: flex-start;
  3078. align-items: center;
  3079. ">
  3080. <div style="
  3081. display: flex;
  3082. flex-direction: row;
  3083. align-items: center;
  3084. margin: 5px 0 20px;
  3085. ">
  3086. <div class="lineTitle clineTitle">
  3087. {{
  3088. !unitJson[unitIndex].easy ||
  3089. unitJson[unitIndex].easy == 6 ||
  3090. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3091. -1
  3092. ? "练习内容"
  3093. : "评价内容"
  3094. }}
  3095. </div>
  3096. <!-- <div class="line" style="width: 90%"></div> -->
  3097. </div>
  3098. </div>
  3099. <div v-if="
  3100. unitJson[unitIndex].easy == 6 ||
  3101. !unitJson[unitIndex].easy
  3102. " class="toolChoose">
  3103. <div class="tools">
  3104. <div class="leftTools" style="width: 100%" v-for="(
  3105. itemTool, toolIndex
  3106. ) in itemTask.toolChoose" :key="toolIndex">
  3107. <div style="
  3108. display: flex;
  3109. flex-direction: row;
  3110. align-items: baseline;
  3111. flex-wrap: nowrap;
  3112. justify-content: flex-start;
  3113. position: relative;
  3114. ">
  3115. <div style="margin-right: 20px; font-weight: bold"
  3116. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3117. 工具 {{ toolIndex + 1 }} :
  3118. </div>
  3119. <div class="chooseWho">
  3120. <div :class="itemTool.toolType == 0
  3121. ? 'isChooseActive'
  3122. : ''
  3123. " @click="
  3124. (itemTool.toolType = 0),
  3125. (itemTool.isFold3 = false),
  3126. $forceUpdate()
  3127. ">
  3128. 互动类
  3129. </div>
  3130. <div :class="itemTool.toolType == 1
  3131. ? 'isChooseActive'
  3132. : ''
  3133. " @click="
  3134. (itemTool.toolType = 1),
  3135. (itemTool.isFold3 = false),
  3136. $forceUpdate()
  3137. ">
  3138. 思维类
  3139. </div>
  3140. <div :class="itemTool.toolType == 6
  3141. ? 'isChooseActive'
  3142. : ''
  3143. " @click="
  3144. (itemTool.toolType = 6),
  3145. (itemTool.isFold3 = false),
  3146. $forceUpdate()
  3147. ">
  3148. 协作类
  3149. </div>
  3150. <div :class="itemTool.toolType == 2
  3151. ? 'isChooseActive'
  3152. : ''
  3153. " @click="
  3154. (itemTool.toolType = 2),
  3155. (itemTool.isFold3 = false),
  3156. $forceUpdate()
  3157. ">
  3158. 测评类
  3159. </div>
  3160. <div :class="itemTool.toolType == 7
  3161. ? 'isChooseActive'
  3162. : ''
  3163. " @click="
  3164. (itemTool.toolType = 7),
  3165. (itemTool.isFold3 = false),
  3166. $forceUpdate()
  3167. ">
  3168. 评价类
  3169. </div>
  3170. <div :class="itemTool.toolType == 3
  3171. ? 'isChooseActive'
  3172. : ''
  3173. " @click="
  3174. (itemTool.toolType = 3),
  3175. (itemTool.isFold3 = false),
  3176. $forceUpdate()
  3177. ">
  3178. 编程类
  3179. </div>
  3180. <div :class="itemTool.toolType == 5
  3181. ? 'isChooseActive'
  3182. : ''
  3183. " @click="
  3184. (itemTool.toolType = 5),
  3185. (itemTool.isFold3 = false),
  3186. $forceUpdate()
  3187. ">
  3188. 学科类
  3189. </div>
  3190. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3191. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3192. 其他
  3193. </div> -->
  3194. </div>
  3195. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3196. margin:
  3197. itemTask.toolChoose.length > 1
  3198. ? '0px 35px 0px auto'
  3199. : '0 0 0 auto',
  3200. }" v-if="itemTask.toolChoose.length > 1">
  3201. <div class="chapter_upload_up2" @click.stop="
  3202. upTool(
  3203. $event,
  3204. unitIndex,
  3205. itemTaskIndex,
  3206. toolIndex
  3207. )
  3208. ">
  3209. 上移
  3210. </div>
  3211. <div class="chapter_upload_down2" @click.stop="
  3212. downTool(
  3213. $event,
  3214. unitIndex,
  3215. itemTaskIndex,
  3216. toolIndex
  3217. )
  3218. ">
  3219. 下移
  3220. </div>
  3221. </div>
  3222. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3223. @click="fold3(itemTaskIndex, toolIndex)"
  3224. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3225. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3226. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3227. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3228. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3229. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3230. v-if="itemTask.toolChoose.length > 1" style="
  3231. position: absolute;
  3232. right: 0;
  3233. top: -5px;
  3234. "></div>
  3235. </div>
  3236. <!-- v-show="!itemTool.isFold3" -->
  3237. <div style="min-height: 163px">
  3238. <div class="toolSort" v-if="itemTool.toolType == 0">
  3239. <!-- <div class="tool">
  3240. <div
  3241. class="whiteBIcon"
  3242. @click="addTools(8, itemTaskIndex, toolIndex)"
  3243. >
  3244. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3245. <div style="margin: 5px 0">素材库</div>
  3246. </div>
  3247. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3248. <img
  3249. src="../../../assets/icon/checkNo.png"
  3250. alt
  3251. v-if="itemTool.tool.indexOf(8) == -1"
  3252. />
  3253. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3254. alt /><span>已选择</span></div>
  3255. </div>
  3256. </div>-->
  3257. <!-- <div class="tool">
  3258. <div
  3259. class="whiteBIcon"
  3260. @click="addTools(17, itemTaskIndex, toolIndex)"
  3261. >
  3262. <img
  3263. src="../../../assets/icon/secondToolList/library.png"
  3264. alt
  3265. />
  3266. <div style="margin: 5px 0">学习资料</div>
  3267. </div>
  3268. <div
  3269. class="check"
  3270. @click="addTools(17, itemTaskIndex, toolIndex)"
  3271. >
  3272. <img
  3273. src="../../../assets/icon/checkNo.png"
  3274. alt
  3275. v-if="itemTool.tool.indexOf(17) == -1"
  3276. />
  3277. <img
  3278. src="../../../assets/icon/checkedIs.png"
  3279. alt
  3280. v-else
  3281. />
  3282. </div>10
  3283. </div> -->
  3284. <div class="tool" :class="{
  3285. isToolChoose:
  3286. itemTool.tool.indexOf(10) != -1,
  3287. }" @click="
  3288. addTools(10, itemTaskIndex, toolIndex)
  3289. ">
  3290. <div class="whiteBIcon" @click.stop="
  3291. openTools(itemTaskIndex, 10, toolIndex)
  3292. ">
  3293. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3294. <div style="margin: 5px 0">倒计时</div>
  3295. </div>
  3296. <div class="noCTool">
  3297. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3298. </div>
  3299. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3301. </div>
  3302. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3303. <img src="../../../assets/icon/checkNo.png" alt
  3304. v-if="itemTool.tool.indexOf(10) == -1" />
  3305. <div class="checkDiv" v-else>
  3306. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3307. </div>
  3308. </div> -->
  3309. </div>
  3310. <div class="tool" :class="{
  3311. isToolChoose:
  3312. itemTool.tool.indexOf(65) != -1,
  3313. }" @click="
  3314. addTools(65, itemTaskIndex, toolIndex)
  3315. ">
  3316. <div class="whiteBIcon" @click.stop="
  3317. addTools(65, itemTaskIndex, toolIndex)
  3318. ">
  3319. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3320. <div style="margin: 5px 0">挑人</div>
  3321. </div>
  3322. <div class="noCTool">
  3323. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3324. </div>
  3325. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3326. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3327. </div>
  3328. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3329. <img src="../../../assets/icon/checkNo.png" alt
  3330. v-if="itemTool.tool.indexOf(65) == -1" />
  3331. <div class="checkDiv" v-else>
  3332. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3333. </div>
  3334. </div> -->
  3335. </div>
  3336. <!-- <div class="tool">
  3337. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3338. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3339. <div style="margin: 5px 0">学生分组</div>
  3340. </div>
  3341. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3342. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3343. <div class="checkDiv" v-else>
  3344. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3345. </div>
  3346. </div>
  3347. </div> -->
  3348. <!-- <div class="tool">
  3349. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3350. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3351. <div style="margin: 5px 0">交互视频</div>
  3352. </div>
  3353. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3354. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3355. <div class="checkDiv" v-else>
  3356. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3357. </div>
  3358. </div>
  3359. </div> -->
  3360. </div>
  3361. <div class="toolSort" v-if="itemTool.toolType == 1">
  3362. <div class="tool" :class="{
  3363. isToolChoose:
  3364. itemTool.tool.indexOf(7) != -1,
  3365. }" @click="
  3366. addTools(7, itemTaskIndex, toolIndex)
  3367. ">
  3368. <div class="whiteBIcon" @click.stop="
  3369. addTools(7, itemTaskIndex, toolIndex)
  3370. ">
  3371. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3372. <div style="margin: 5px 0">思维网格</div>
  3373. </div>
  3374. <div class="noCTool">
  3375. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3376. </div>
  3377. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3378. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3379. </div>
  3380. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3381. <img src="../../../assets/icon/checkNo.png" alt
  3382. v-if="itemTool.tool.indexOf(7) == -1" />
  3383. <div class="checkDiv" v-else>
  3384. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3385. </div>
  3386. </div> -->
  3387. </div>
  3388. <div class="tool" :class="{
  3389. isToolChoose:
  3390. itemTool.tool.indexOf(1) != -1,
  3391. }" @click="
  3392. addTools(1, itemTaskIndex, toolIndex)
  3393. ">
  3394. <div class="whiteBIcon" @click.stop="
  3395. openTools(itemTaskIndex, 1, toolIndex)
  3396. ">
  3397. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3398. <div style="margin: 5px 0">电子白板</div>
  3399. </div>
  3400. <div class="noCTool">
  3401. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3402. </div>
  3403. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3404. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3405. </div>
  3406. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3407. <img src="../../../assets/icon/checkNo.png" alt
  3408. v-if="itemTool.tool.indexOf(1) == -1" />
  3409. <div class="checkDiv" v-else>
  3410. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3411. </div>
  3412. </div> -->
  3413. </div>
  3414. <!-- <div class="tool">
  3415. <div
  3416. class="whiteBIcon"
  3417. @click="addTools(2, itemTaskIndex, toolIndex)"
  3418. >
  3419. <img
  3420. src="../../../assets/icon/secondToolList/note.png"
  3421. alt
  3422. />
  3423. <div style="margin: 5px 0">便签</div>
  3424. </div>
  3425. <div
  3426. class="check"
  3427. @click="addTools(2, itemTaskIndex, toolIndex)"
  3428. >
  3429. <img
  3430. src="../../../assets/icon/checkNo.png"
  3431. alt
  3432. v-if="itemTool.tool.indexOf(2) == -1"
  3433. />
  3434. <div class="checkDiv" v-else>
  3435. <img
  3436. src="../../../assets/icon/checkedIs.png"
  3437. alt
  3438. /><span>已选择</span>
  3439. </div>
  3440. </div>
  3441. </div> -->
  3442. <!-- <div class="tool">
  3443. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3444. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3445. <div style="margin: 5px 0">协同文档</div>
  3446. </div>
  3447. <div
  3448. class="check"
  3449. @click="addTools(6, itemTaskIndex, toolIndex)"
  3450. >
  3451. <img
  3452. src="../../../assets/icon/checkNo.png"
  3453. alt
  3454. v-if="itemTool.tool.indexOf(6) == -1"
  3455. />
  3456. <div class="checkDiv" v-else>
  3457. <img
  3458. src="../../../assets/icon/checkedIs.png"
  3459. alt
  3460. /><span>已选择</span>
  3461. </div>
  3462. </div>
  3463. </div> -->
  3464. <div class="tool" :class="{
  3465. isToolChoose:
  3466. itemTool.tool.indexOf(52) != -1,
  3467. }" @click="
  3468. addTools(52, itemTaskIndex, toolIndex)
  3469. ">
  3470. <div class="whiteBIcon" @click.stop="
  3471. openTools(itemTaskIndex, 52, toolIndex)
  3472. ">
  3473. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3474. <div style="margin: 5px 0">文档</div>
  3475. </div>
  3476. <div class="noCTool">
  3477. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3478. </div>
  3479. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3480. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3481. </div>
  3482. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3483. <img src="../../../assets/icon/checkNo.png" alt
  3484. v-if="itemTool.tool.indexOf(52) == -1" />
  3485. <div class="checkDiv" v-else>
  3486. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3487. </div>
  3488. </div> -->
  3489. </div>
  3490. <div class="tool" :class="{
  3491. isToolChoose:
  3492. itemTool.tool.indexOf(3) != -1,
  3493. }" @click="
  3494. addTools(3, itemTaskIndex, toolIndex)
  3495. ">
  3496. <div class="whiteBIcon" @click.stop="
  3497. openTools(itemTaskIndex, 3, toolIndex)
  3498. ">
  3499. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3500. <div style="margin: 5px 0">思维导图</div>
  3501. </div>
  3502. <div class="noCTool">
  3503. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3504. </div>
  3505. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3506. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3507. </div>
  3508. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3509. <img src="../../../assets/icon/checkNo.png" alt
  3510. v-if="itemTool.tool.indexOf(3) == -1" />
  3511. <div class="checkDiv" v-else>
  3512. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3513. </div>
  3514. </div> -->
  3515. </div>
  3516. <div class="tool" :class="{
  3517. isToolChoose:
  3518. itemTool.tool.indexOf(48) != -1,
  3519. }" @click="
  3520. addTools(48, itemTaskIndex, toolIndex)
  3521. ">
  3522. <div class="whiteBIcon" @click.stop="
  3523. openTools(itemTaskIndex, 48, toolIndex)
  3524. ">
  3525. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3526. <div style="margin: 5px 0">表格</div>
  3527. </div>
  3528. <div class="noCTool">
  3529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3530. </div>
  3531. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3532. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3533. </div>
  3534. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3535. <img src="../../../assets/icon/checkNo.png" alt
  3536. v-if="itemTool.tool.indexOf(48) == -1" />
  3537. <div class="checkDiv" v-else>
  3538. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3539. </div>
  3540. </div> -->
  3541. </div>
  3542. </div>
  3543. <div class="toolSort" v-if="itemTool.toolType == 6">
  3544. <div class="tool" :class="{
  3545. isToolChoose:
  3546. itemTool.tool.indexOf(49) != -1,
  3547. }" @click="
  3548. addTools(49, itemTaskIndex, toolIndex)
  3549. ">
  3550. <div class="whiteBIcon" @click.stop="
  3551. openTools(itemTaskIndex, 49, toolIndex)
  3552. ">
  3553. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3554. <div style="margin: 5px 0">学生分组</div>
  3555. </div>
  3556. <div class="noCTool">
  3557. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3558. </div>
  3559. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3560. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3561. </div>
  3562. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3563. <img src="../../../assets/icon/checkNo.png" alt
  3564. v-if="itemTool.tool.indexOf(49) == -1" />
  3565. <div class="checkDiv" v-else>
  3566. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3567. </div>
  3568. </div> -->
  3569. </div>
  3570. </div>
  3571. <div class="toolSort" v-if="itemTool.toolType == 2">
  3572. <!-- <div class="tool">
  3573. <div
  3574. class="whiteBIcon"
  3575. @click="addTools(5, itemTaskIndex, toolIndex)"
  3576. >
  3577. <img
  3578. src="../../../assets/icon/thirdToolList/score.png"
  3579. alt
  3580. />
  3581. <div style="margin: 5px 0">量规评分</div>
  3582. </div>
  3583. <div
  3584. class="check"
  3585. @click="addTools(5, itemTaskIndex, toolIndex)"
  3586. >
  3587. <img
  3588. src="../../../assets/icon/checkNo.png"
  3589. alt
  3590. v-if="itemTool.tool.indexOf(5) == -1"
  3591. />
  3592. <img
  3593. src="../../../assets/icon/checkedIs.png"
  3594. alt
  3595. v-else
  3596. />
  3597. </div>
  3598. </div>-->
  3599. <div class="tool" :class="{
  3600. isToolChoose:
  3601. itemTool.tool.indexOf(4) != -1,
  3602. }" @click="
  3603. addTools(4, itemTaskIndex, toolIndex)
  3604. ">
  3605. <div class="whiteBIcon" @click.stop="
  3606. openTools(itemTaskIndex, 4, toolIndex)
  3607. ">
  3608. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3609. <div style="margin: 5px 0">问卷调查</div>
  3610. </div>
  3611. <div class="noCTool">
  3612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3613. </div>
  3614. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3615. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3616. </div>
  3617. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3618. <img src="../../../assets/icon/checkNo.png" alt
  3619. v-if="itemTool.tool.indexOf(4) == -1" />
  3620. <div class="checkDiv" v-else>
  3621. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3622. </div>
  3623. </div> -->
  3624. </div>
  3625. <div class="tool" :class="{
  3626. isToolChoose:
  3627. itemTool.tool.indexOf(45) != -1,
  3628. }" @click="
  3629. addTools(45, itemTaskIndex, toolIndex)
  3630. ">
  3631. <div class="whiteBIcon" @click="
  3632. openTools(itemTaskIndex, 45, toolIndex)
  3633. ">
  3634. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3635. <div style="margin: 5px 0">选择题</div>
  3636. </div>
  3637. <div class="noCTool">
  3638. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3639. </div>
  3640. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3641. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3642. </div>
  3643. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3644. <img src="../../../assets/icon/checkNo.png" alt
  3645. v-if="itemTool.tool.indexOf(45) == -1" />
  3646. <div class="checkDiv" v-else>
  3647. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3648. </div>
  3649. </div> -->
  3650. </div>
  3651. <div class="tool" :class="{
  3652. isToolChoose:
  3653. itemTool.tool.indexOf(15) != -1,
  3654. }" @click="
  3655. addTools(15, itemTaskIndex, toolIndex)
  3656. ">
  3657. <div class="whiteBIcon" @click.stop="
  3658. openTools(itemTaskIndex, 15, toolIndex)
  3659. ">
  3660. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3661. <div style="margin: 5px 0">问答</div>
  3662. </div>
  3663. <div class="noCTool">
  3664. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3665. </div>
  3666. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3667. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3668. </div>
  3669. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3670. <img src="../../../assets/icon/checkNo.png" alt
  3671. v-if="itemTool.tool.indexOf(15) == -1" />
  3672. <div class="checkDiv" v-else>
  3673. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3674. </div>
  3675. </div> -->
  3676. </div>
  3677. <div class="tool" :class="{
  3678. isToolChoose:
  3679. itemTool.tool.indexOf(16) != -1,
  3680. }" @click="
  3681. addTools(16, itemTaskIndex, toolIndex)
  3682. ">
  3683. <div class="whiteBIcon" @click.stop="
  3684. addTools(16, itemTaskIndex, toolIndex)
  3685. ">
  3686. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3687. <div style="margin: 5px 0">作业提交</div>
  3688. </div>
  3689. <div class="noCTool">
  3690. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3691. </div>
  3692. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3693. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3694. </div>
  3695. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3696. <img src="../../../assets/icon/checkNo.png" alt
  3697. v-if="itemTool.tool.indexOf(16) == -1" />
  3698. <div class="checkDiv" v-else>
  3699. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3700. </div>
  3701. </div> -->
  3702. </div>
  3703. <div class="tool" :class="{
  3704. isToolChoose:
  3705. itemTool.tool.indexOf(50) != -1,
  3706. }" @click="
  3707. addTools(50, itemTaskIndex, toolIndex)
  3708. ">
  3709. <div class="whiteBIcon" @click.stop="
  3710. addTools(50, itemTaskIndex, toolIndex)
  3711. ">
  3712. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3713. <div style="margin: 5px 0">批量上传</div>
  3714. </div>
  3715. <div class="noCTool">
  3716. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3717. </div>
  3718. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3719. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3720. </div>
  3721. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3722. <img src="../../../assets/icon/checkNo.png" alt
  3723. v-if="itemTool.tool.indexOf(50) == -1" />
  3724. <div class="checkDiv" v-else>
  3725. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3726. </div>
  3727. </div> -->
  3728. </div>
  3729. <!-- <div class="tool">
  3730. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3731. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3732. <div style="margin: 5px 0">个人评价</div>
  3733. </div>
  3734. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3735. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3736. <div class="checkDiv" v-else>
  3737. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3738. </div>
  3739. </div>
  3740. </div> -->
  3741. <div class="tool" :class="{
  3742. isToolChoose:
  3743. itemTool.tool.indexOf(41) != -1,
  3744. }" @click="
  3745. addTools(41, itemTaskIndex, toolIndex)
  3746. ">
  3747. <div class="whiteBIcon" @click.stop="
  3748. openTools(itemTaskIndex, 41, toolIndex)
  3749. ">
  3750. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3751. <div style="margin: 5px 0">选择匹配</div>
  3752. </div>
  3753. <div class="noCTool">
  3754. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3755. </div>
  3756. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3758. </div>
  3759. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3760. <img src="../../../assets/icon/checkNo.png" alt
  3761. v-if="itemTool.tool.indexOf(41) == -1" />
  3762. <div class="checkDiv" v-else>
  3763. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3764. </div>
  3765. </div> -->
  3766. </div>
  3767. <div class="tool" :class="{
  3768. isToolChoose:
  3769. itemTool.tool.indexOf(47) != -1,
  3770. }" @click="
  3771. addTools(47, itemTaskIndex, toolIndex)
  3772. ">
  3773. <div class="whiteBIcon" @click.stop="
  3774. openTools(itemTaskIndex, 47, toolIndex)
  3775. ">
  3776. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3777. <div style="margin: 5px 0">排序</div>
  3778. </div>
  3779. <div class="noCTool">
  3780. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3781. </div>
  3782. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3783. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3784. </div>
  3785. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3786. <img src="../../../assets/icon/checkNo.png" alt
  3787. v-if="itemTool.tool.indexOf(47) == -1" />
  3788. <div class="checkDiv" v-else>
  3789. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3790. </div>
  3791. </div> -->
  3792. </div>
  3793. <!-- <div class="tool">
  3794. <div
  3795. class="whiteBIcon"
  3796. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3797. >
  3798. <img
  3799. src="../../../assets/icon/thirdToolList/mp3.png"
  3800. alt
  3801. />
  3802. <div style="margin: 5px 0">上传音频</div>
  3803. </div>
  3804. <div
  3805. class="check"
  3806. @click="addTools(42, itemTaskIndex, toolIndex)"
  3807. >
  3808. <img
  3809. src="../../../assets/icon/checkNo.png"
  3810. alt
  3811. v-if="itemTool.tool.indexOf(42) == -1"
  3812. />
  3813. <img
  3814. src="../../../assets/icon/checkedIs.png"
  3815. alt
  3816. v-else
  3817. />
  3818. </div>
  3819. </div> -->
  3820. </div>
  3821. <div class="toolSort" v-if="itemTool.toolType == 3">
  3822. <div class="tool" :class="{
  3823. isToolChoose:
  3824. itemTool.tool.indexOf(18) != -1,
  3825. }" @click="
  3826. addTools(18, itemTaskIndex, toolIndex)
  3827. ">
  3828. <div class="whiteBIcon" @click.stop="
  3829. addTools(18, itemTaskIndex, toolIndex)
  3830. ">
  3831. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3832. <div style="margin: 5px 0">训练平台</div>
  3833. </div>
  3834. <div class="noCTool">
  3835. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3836. </div>
  3837. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3838. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3839. </div>
  3840. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3841. <img src="../../../assets/icon/checkNo.png" alt
  3842. v-if="itemTool.tool.indexOf(18) == -1" />
  3843. <div class="checkDiv" v-else>
  3844. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3845. </div>
  3846. </div> -->
  3847. </div>
  3848. <div class="tool" :class="{
  3849. isToolChoose:
  3850. itemTool.tool.indexOf(21) != -1,
  3851. }" @click="
  3852. addTools(21, itemTaskIndex, toolIndex)
  3853. ">
  3854. <div class="whiteBIcon" @click.stop="
  3855. addTools(21, itemTaskIndex, toolIndex)
  3856. ">
  3857. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  3858. <div style="margin: 5px 0">
  3859. AIoT Blockly
  3860. </div>
  3861. </div>
  3862. <div class="noCTool">
  3863. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3864. </div>
  3865. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  3866. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3867. </div>
  3868. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  3869. <img src="../../../assets/icon/checkNo.png" alt
  3870. v-if="itemTool.tool.indexOf(21) == -1" />
  3871. <div class="checkDiv" v-else>
  3872. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3873. </div>
  3874. </div> -->
  3875. </div>
  3876. <!-- <div class="tool">
  3877. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  3878. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  3879. <div style="margin: 5px 0">AI体验</div>
  3880. </div>
  3881. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  3882. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  3883. <div class="checkDiv" v-else>
  3884. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3885. </div>
  3886. </div>
  3887. </div> -->
  3888. <div class="tool" :class="{
  3889. isToolChoose:
  3890. itemTool.tool.indexOf(23) != -1,
  3891. }" @click="
  3892. addTools(23, itemTaskIndex, toolIndex)
  3893. ">
  3894. <div class="whiteBIcon" @click.stop="
  3895. addTools(23, itemTaskIndex, toolIndex)
  3896. ">
  3897. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  3898. <div style="margin: 5px 0">AI Python</div>
  3899. </div>
  3900. <div class="noCTool">
  3901. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3902. </div>
  3903. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  3904. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3905. </div>
  3906. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  3907. <img src="../../../assets/icon/checkNo.png" alt
  3908. v-if="itemTool.tool.indexOf(23) == -1" />
  3909. <div class="checkDiv" v-else>
  3910. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3911. </div>
  3912. </div> -->
  3913. </div>
  3914. <div class="tool" :class="{
  3915. isToolChoose:
  3916. itemTool.tool.indexOf(24) != -1,
  3917. }" @click="
  3918. addTools(24, itemTaskIndex, toolIndex)
  3919. ">
  3920. <div class="whiteBIcon" @click.stop="
  3921. addTools(24, itemTaskIndex, toolIndex)
  3922. ">
  3923. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  3924. <div style="margin: 5px 0">
  3925. AI Blockly
  3926. </div>
  3927. </div>
  3928. <div class="noCTool">
  3929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3930. </div>
  3931. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  3932. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3933. </div>
  3934. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  3935. <img src="../../../assets/icon/checkNo.png" alt
  3936. v-if="itemTool.tool.indexOf(24) == -1" />
  3937. <div class="checkDiv" v-else>
  3938. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3939. </div>
  3940. </div> -->
  3941. </div>
  3942. <div class="tool" :class="{
  3943. isToolChoose:
  3944. itemTool.tool.indexOf(32) != -1,
  3945. }" @click="
  3946. addTools(32, itemTaskIndex, toolIndex)
  3947. ">
  3948. <div class="whiteBIcon" @click.stop="
  3949. addTools(32, itemTaskIndex, toolIndex)
  3950. ">
  3951. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  3952. <div style="margin: 5px 0">源码编辑</div>
  3953. </div>
  3954. <div class="noCTool">
  3955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3956. </div>
  3957. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  3958. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3959. </div>
  3960. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  3961. <img src="../../../assets/icon/checkNo.png" alt
  3962. v-if="itemTool.tool.indexOf(32) == -1" />
  3963. <div class="checkDiv" v-else>
  3964. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3965. </div>
  3966. </div> -->
  3967. </div>
  3968. <div class="tool" :class="{
  3969. isToolChoose:
  3970. itemTool.tool.indexOf(57) != -1,
  3971. }" @click="
  3972. addTools(57, itemTaskIndex, toolIndex)
  3973. ">
  3974. <div class="whiteBIcon" @click.stop="
  3975. openTools(itemTaskIndex, 57, toolIndex)
  3976. ">
  3977. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  3978. <div style="margin: 5px 0">CocoPi</div>
  3979. </div>
  3980. <div class="noCTool">
  3981. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3982. </div>
  3983. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  3984. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3985. </div>
  3986. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  3987. <img src="../../../assets/icon/checkNo.png" alt
  3988. v-if="itemTool.tool.indexOf(57) == -1" />
  3989. <div class="checkDiv" v-else>
  3990. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3991. </div>
  3992. </div> -->
  3993. </div>
  3994. <div class="tool" :class="{
  3995. isToolChoose:
  3996. itemTool.tool.indexOf(63) != -1,
  3997. }" @click="
  3998. addTools(63, itemTaskIndex, toolIndex)
  3999. ">
  4000. <div class="whiteBIcon" @click.stop="
  4001. addTools(63, itemTaskIndex, toolIndex)
  4002. ">
  4003. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4004. <div style="margin: 5px 0">海龟编程</div>
  4005. </div>
  4006. <div class="noCTool">
  4007. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4008. </div>
  4009. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4010. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4011. </div>
  4012. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4013. <img src="../../../assets/icon/checkNo.png" alt
  4014. v-if="itemTool.tool.indexOf(63) == -1" />
  4015. <div class="checkDiv" v-else>
  4016. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4017. </div>
  4018. </div> -->
  4019. </div>
  4020. <div class="tool" :class="{
  4021. isToolChoose:
  4022. itemTool.tool.indexOf(71) != -1,
  4023. }" @click="
  4024. addTools(71, itemTaskIndex, toolIndex)
  4025. ">
  4026. <div class="whiteBIcon" @click.stop="
  4027. addTools(71, itemTaskIndex, toolIndex)
  4028. ">
  4029. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4030. <div style="margin: 5px 0">AI智能体</div>
  4031. </div>
  4032. <div class="noCTool">
  4033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4034. </div>
  4035. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4036. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4037. </div>
  4038. </div>
  4039. </div>
  4040. <div class="toolSort" v-if="itemTool.toolType == 7">
  4041. <div class="tool" :class="{
  4042. isToolChoose:
  4043. itemTool.tool.indexOf(40) != -1,
  4044. }" @click.stop="
  4045. addTools(40, itemTaskIndex, toolIndex)
  4046. ">
  4047. <div class="whiteBIcon" @click.stop="
  4048. openTools(itemTaskIndex, 40, toolIndex)
  4049. ">
  4050. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4051. <div style="margin: 5px 0">个人评价</div>
  4052. </div>
  4053. <div class="noCTool">
  4054. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4055. </div>
  4056. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4057. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4058. </div>
  4059. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4060. <img src="../../../assets/icon/checkNo.png" alt
  4061. v-if="itemTool.tool.indexOf(40) == -1" />
  4062. <div class="checkDiv" v-else>
  4063. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4064. </div>
  4065. </div> -->
  4066. </div>
  4067. </div>
  4068. <div class="toolSort" v-if="itemTool.toolType == 5">
  4069. <div class="tool" :class="{
  4070. isToolChoose:
  4071. itemTool.tool.indexOf(28) != -1,
  4072. }" @click="
  4073. addTools(28, itemTaskIndex, toolIndex)
  4074. ">
  4075. <div class="whiteBIcon" @click.stop="
  4076. addTools(28, itemTaskIndex, toolIndex)
  4077. ">
  4078. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4079. <div style="margin: 5px 0">翻译</div>
  4080. </div>
  4081. <div class="noCTool">
  4082. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4083. </div>
  4084. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4085. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4086. </div>
  4087. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4088. <img src="../../../assets/icon/checkNo.png" alt
  4089. v-if="itemTool.tool.indexOf(28) == -1" />
  4090. <div class="checkDiv" v-else>
  4091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4092. </div>
  4093. </div> -->
  4094. </div>
  4095. <div class="tool" :class="{
  4096. isToolChoose:
  4097. itemTool.tool.indexOf(31) != -1,
  4098. }" @click="
  4099. addTools(31, itemTaskIndex, toolIndex)
  4100. ">
  4101. <div class="whiteBIcon" @click.stop="
  4102. addTools(31, itemTaskIndex, toolIndex)
  4103. ">
  4104. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4105. <div style="margin: 5px 0">数字画板</div>
  4106. </div>
  4107. <div class="noCTool">
  4108. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4109. </div>
  4110. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4111. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4112. </div>
  4113. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4114. <img src="../../../assets/icon/checkNo.png" alt
  4115. v-if="itemTool.tool.indexOf(31) == -1" />
  4116. <div class="checkDiv" v-else>
  4117. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4118. </div>
  4119. </div> -->
  4120. </div>
  4121. <div class="tool" :class="{
  4122. isToolChoose:
  4123. itemTool.tool.indexOf(39) != -1,
  4124. }" @click="
  4125. addTools(39, itemTaskIndex, toolIndex)
  4126. ">
  4127. <div class="whiteBIcon" @click.stop="
  4128. addTools(39, itemTaskIndex, toolIndex)
  4129. ">
  4130. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4131. <div style="margin: 5px 0">GeoGebra</div>
  4132. </div>
  4133. <div class="noCTool">
  4134. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4135. </div>
  4136. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4137. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4138. </div>
  4139. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4140. <img src="../../../assets/icon/checkNo.png" alt
  4141. v-if="itemTool.tool.indexOf(39) == -1" />
  4142. <div class="checkDiv" v-else>
  4143. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4144. </div>
  4145. </div> -->
  4146. </div>
  4147. <div class="tool" :class="{
  4148. isToolChoose:
  4149. itemTool.tool.indexOf(66) != -1,
  4150. }" @click="
  4151. addTools(66, itemTaskIndex, toolIndex)
  4152. ">
  4153. <div class="whiteBIcon" @click.stop="
  4154. addTools(66, itemTaskIndex, toolIndex)
  4155. ">
  4156. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4157. <div style="margin: 5px 0">公式编辑</div>
  4158. </div>
  4159. <div class="noCTool">
  4160. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4161. </div>
  4162. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4163. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4164. </div>
  4165. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4166. <img src="../../../assets/icon/checkNo.png" alt
  4167. v-if="itemTool.tool.indexOf(66) == -1" />
  4168. <div class="checkDiv" v-else>
  4169. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4170. </div>
  4171. </div> -->
  4172. </div>
  4173. <!-- <div class="tool">
  4174. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4175. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4176. <div style="margin: 5px 0">分子结构</div>
  4177. </div>
  4178. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4179. <img src="../../../assets/icon/checkNo.png" alt
  4180. v-if="itemTool.tool.indexOf(67) == -1" />
  4181. <div class="checkDiv" v-else>
  4182. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4183. </div>
  4184. </div>
  4185. </div> -->
  4186. <div class="tool" :class="{
  4187. isToolChoose:
  4188. itemTool.tool.indexOf(68) != -1,
  4189. }" @click="
  4190. addTools(68, itemTaskIndex, toolIndex)
  4191. ">
  4192. <div class="whiteBIcon" @click.stop="
  4193. addTools(68, itemTaskIndex, toolIndex)
  4194. ">
  4195. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4196. <div style="margin: 5px 0">时间轴</div>
  4197. </div>
  4198. <div class="noCTool">
  4199. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4200. </div>
  4201. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4202. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4203. </div>
  4204. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4205. <img src="../../../assets/icon/checkNo.png" alt
  4206. v-if="itemTool.tool.indexOf(68) == -1" />
  4207. <div class="checkDiv" v-else>
  4208. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4209. </div>
  4210. </div> -->
  4211. </div>
  4212. <div class="tool" :class="{
  4213. isToolChoose:
  4214. itemTool.tool.indexOf(69) != -1,
  4215. }" @click="
  4216. addTools(69, itemTaskIndex, toolIndex)
  4217. ">
  4218. <div class="whiteBIcon" @click.stop="
  4219. openTools(itemTaskIndex, 69, toolIndex)
  4220. ">
  4221. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4222. <div style="margin: 5px 0">英语写作</div>
  4223. </div>
  4224. <div class="noCTool">
  4225. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4226. </div>
  4227. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4228. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4229. </div>
  4230. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4231. <img src="../../../assets/icon/checkNo.png" alt
  4232. v-if="itemTool.tool.indexOf(4) == -1" />
  4233. <div class="checkDiv" v-else>
  4234. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4235. </div>
  4236. </div> -->
  4237. </div>
  4238. <div class="tool" :class="{
  4239. isToolChoose:
  4240. itemTool.tool.indexOf(70) != -1,
  4241. }" @click="
  4242. addTools(70, itemTaskIndex, toolIndex)
  4243. ">
  4244. <div class="whiteBIcon" @click.stop="
  4245. openTools(itemTaskIndex, 70, toolIndex)
  4246. ">
  4247. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4248. <div style="margin: 5px 0">英语口语</div>
  4249. </div>
  4250. <div class="noCTool">
  4251. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4252. </div>
  4253. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4254. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4255. </div>
  4256. </div>
  4257. <!-- <div class="tool">
  4258. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4259. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4260. <div style="margin: 5px 0">翻译</div>
  4261. </div>
  4262. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4263. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4264. <div class="checkDiv" v-else>
  4265. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4266. </div>
  4267. </div>
  4268. </div>
  4269. <div class="tool">
  4270. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4271. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4272. <div style="margin: 5px 0">魔盒识字</div>
  4273. </div>
  4274. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4275. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4276. <div class="checkDiv" v-else>
  4277. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4278. </div>
  4279. </div>
  4280. </div>
  4281. <div class="tool">
  4282. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4283. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4284. <div style="margin: 5px 0">24点</div>
  4285. </div>
  4286. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4287. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4288. <div class="checkDiv" v-else>
  4289. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4290. </div>
  4291. </div>
  4292. </div>
  4293. <div class="tool">
  4294. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4295. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4296. <div style="margin: 5px 0">数学画板</div>
  4297. </div>
  4298. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4299. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4300. <div class="checkDiv" v-else>
  4301. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4302. </div>
  4303. </div>
  4304. </div>
  4305. <div class="tool">
  4306. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4307. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4308. <div style="margin: 5px 0">GeoGebra</div>
  4309. </div>
  4310. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4311. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4312. <div class="checkDiv" v-else>
  4313. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4314. </div>
  4315. </div>
  4316. </div>
  4317. <div class="tool">
  4318. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4319. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4320. <div style="margin: 5px 0">模拟驾驶</div>
  4321. </div>
  4322. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4323. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4324. <div class="checkDiv" v-else>
  4325. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4326. </div>
  4327. </div>
  4328. </div>
  4329. <div class="tool">
  4330. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4331. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4332. <div style="margin: 5px 0">路径搜索</div>
  4333. </div>
  4334. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4335. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4336. <div class="checkDiv" v-else>
  4337. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4338. </div>
  4339. </div>
  4340. </div>
  4341. <div class="tool">
  4342. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4343. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4344. <div style="margin: 5px 0">深度学习</div>
  4345. </div>
  4346. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4347. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4348. <div class="checkDiv" v-else>
  4349. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4350. </div>
  4351. </div>
  4352. </div>
  4353. <div class="tool">
  4354. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4355. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4356. <div style="margin: 5px 0">全历史</div>
  4357. </div>
  4358. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4359. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4360. <div class="checkDiv" v-else>
  4361. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4362. </div>
  4363. </div>
  4364. </div>
  4365. </div>
  4366. <div class="toolSort" v-if="itemTool.toolType == 4">
  4367. <div class="tool">
  4368. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4369. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4370. <div style="margin: 5px 0">课程设计</div>
  4371. </div>
  4372. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4373. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4374. <div class="checkDiv" v-else>
  4375. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4376. </div>
  4377. </div>
  4378. </div>
  4379. <div class="tool">
  4380. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4381. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4382. <div style="margin: 5px 0">目标管理</div>
  4383. </div>
  4384. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4385. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4386. <div class="checkDiv" v-else>
  4387. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4388. </div>
  4389. </div>
  4390. </div> -->
  4391. <!-- <div class="tool">
  4392. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4393. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4394. <div style="margin: 5px 0">汉字宫</div>
  4395. </div>
  4396. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4397. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4398. <div class="checkDiv" v-else>
  4399. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4400. </div>
  4401. </div>
  4402. </div> -->
  4403. </div>
  4404. </div>
  4405. <!-- v-show="!itemTool.isFold3" -->
  4406. <div class="op_tool_box"
  4407. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4408. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4409. class="binfo_input" style="
  4410. margin: 0 0 20px 0;
  4411. width: 100% !important;
  4412. " v-model="itemTool.toolDetail"></textarea>
  4413. <div class="op_box">
  4414. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4415. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4416. <div class="r_pub_button_op"
  4417. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4418. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4419. 智能优化</div>
  4420.                              
  4421. </el-tooltip>
  4422. </div>
  4423. </div>
  4424. </div>
  4425. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4426. <div class="addToolImg">
  4427. <img src="../../../assets/icon/add.png" alt />
  4428. </div>
  4429. <div>添加工具</div>
  4430. </div> -->
  4431. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4432. margin: 0 auto;
  4433. padding: 0 30px;
  4434. height: 45px;
  4435. ">
  4436. 添加工具
  4437. </button>
  4438. </div>
  4439. </div>
  4440. <div v-else-if="
  4441. unitJson[unitIndex].easy == 2 ||
  4442. unitJson[unitIndex].easy == 4
  4443. " class="toolChoose" style="padding: 0 0 40px">
  4444. <div class="tools">
  4445. <div class="leftTools" style="width: 100%" v-for="(
  4446. itemTool, toolIndex
  4447. ) in itemTask.toolChoose" :key="toolIndex">
  4448. <div>
  4449. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4450. margin: 0 0 20px 0;
  4451. width: 100% !important;
  4452. " v-model="itemTool.toolDetail"></textarea>
  4453. </div>
  4454. <div style="
  4455. display: flex;
  4456. flex-direction: row;
  4457. align-items: baseline;
  4458. flex-wrap: nowrap;
  4459. justify-content: flex-start;
  4460. position: relative;
  4461. ">
  4462. <div style="margin-right: 20px; font-weight: bold"
  4463. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4464. 工具 {{ toolIndex + 1 }} :
  4465. </div>
  4466. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4467. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4468. </div>
  4469. <div style="min-height: 163px">
  4470. <div class="toolSort">
  4471. <div class="tool">
  4472. <div class="whiteBIcon" @click="
  4473. openTools(itemTaskIndex, 1, toolIndex)
  4474. ">
  4475. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4476. <div style="margin: 5px 0">电子白板</div>
  4477. </div>
  4478. <div class="check" @click="
  4479. addTools(1, itemTaskIndex, toolIndex)
  4480. ">
  4481. <img src="../../../assets/icon/checkNo.png" alt
  4482. v-if="itemTool.tool.indexOf(1) == -1" />
  4483. <div class="checkDiv" v-else>
  4484. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4485. </div>
  4486. </div>
  4487. </div>
  4488. <div class="tool">
  4489. <div class="whiteBIcon" @click="
  4490. openTools(itemTaskIndex, 52, toolIndex)
  4491. ">
  4492. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4493. <div style="margin: 5px 0">文档</div>
  4494. </div>
  4495. <div class="check" @click="
  4496. addTools(52, itemTaskIndex, toolIndex)
  4497. ">
  4498. <img src="../../../assets/icon/checkNo.png" alt
  4499. v-if="itemTool.tool.indexOf(52) == -1" />
  4500. <div class="checkDiv" v-else>
  4501. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4502. </div>
  4503. </div>
  4504. </div>
  4505. <div class="tool">
  4506. <div class="whiteBIcon" @click="
  4507. openTools(itemTaskIndex, 3, toolIndex)
  4508. ">
  4509. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4510. <div style="margin: 5px 0">思维导图</div>
  4511. </div>
  4512. <div class="check" @click="
  4513. addTools(3, itemTaskIndex, toolIndex)
  4514. ">
  4515. <img src="../../../assets/icon/checkNo.png" alt
  4516. v-if="itemTool.tool.indexOf(3) == -1" />
  4517. <div class="checkDiv" v-else>
  4518. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4519. </div>
  4520. </div>
  4521. </div>
  4522. <div class="tool">
  4523. <div class="whiteBIcon" @click="
  4524. openTools(itemTaskIndex, 4, toolIndex)
  4525. ">
  4526. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4527. <div style="margin: 5px 0">问卷调查</div>
  4528. </div>
  4529. <div class="check" @click="
  4530. addTools(4, itemTaskIndex, toolIndex)
  4531. ">
  4532. <img src="../../../assets/icon/checkNo.png" alt
  4533. v-if="itemTool.tool.indexOf(4) == -1" />
  4534. <div class="checkDiv" v-else>
  4535. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4536. </div>
  4537. </div>
  4538. </div>
  4539. <div class="tool">
  4540. <div class="whiteBIcon" @click="
  4541. openTools(itemTaskIndex, 45, toolIndex)
  4542. ">
  4543. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4544. <div style="margin: 5px 0">选择题</div>
  4545. </div>
  4546. <div class="check" @click="
  4547. addTools(45, itemTaskIndex, toolIndex)
  4548. ">
  4549. <img src="../../../assets/icon/checkNo.png" alt
  4550. v-if="itemTool.tool.indexOf(45) == -1" />
  4551. <div class="checkDiv" v-else>
  4552. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4553. </div>
  4554. </div>
  4555. </div>
  4556. <div class="tool">
  4557. <div class="whiteBIcon" @click="
  4558. openTools(itemTaskIndex, 15, toolIndex)
  4559. ">
  4560. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4561. <div style="margin: 5px 0">问答</div>
  4562. </div>
  4563. <div class="check" @click="
  4564. addTools(15, itemTaskIndex, toolIndex)
  4565. ">
  4566. <img src="../../../assets/icon/checkNo.png" alt
  4567. v-if="itemTool.tool.indexOf(15) == -1" />
  4568. <div class="checkDiv" v-else>
  4569. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4570. </div>
  4571. </div>
  4572. </div>
  4573. <div class="tool">
  4574. <div class="whiteBIcon" @click="
  4575. addTools(16, itemTaskIndex, toolIndex)
  4576. ">
  4577. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4578. <div style="margin: 5px 0">作业提交</div>
  4579. </div>
  4580. <div class="check" @click="
  4581. addTools(16, itemTaskIndex, toolIndex)
  4582. ">
  4583. <img src="../../../assets/icon/checkNo.png" alt
  4584. v-if="itemTool.tool.indexOf(16) == -1" />
  4585. <div class="checkDiv" v-else>
  4586. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4587. </div>
  4588. </div>
  4589. </div>
  4590. <div class="tool">
  4591. <div class="whiteBIcon" @click="
  4592. openTools(itemTaskIndex, 50, toolIndex)
  4593. ">
  4594. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4595. <div style="margin: 5px 0">批量上传</div>
  4596. </div>
  4597. <div class="check" @click="
  4598. addTools(50, itemTaskIndex, toolIndex)
  4599. ">
  4600. <img src="../../../assets/icon/checkNo.png" alt
  4601. v-if="itemTool.tool.indexOf(50) == -1" />
  4602. <div class="checkDiv" v-else>
  4603. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4604. </div>
  4605. </div>
  4606. </div>
  4607. <div class="tool">
  4608. <div class="whiteBIcon" @click="
  4609. openTools(itemTaskIndex, 41, toolIndex)
  4610. ">
  4611. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4612. <div style="margin: 5px 0">选择匹配</div>
  4613. </div>
  4614. <div class="check" @click="
  4615. addTools(41, itemTaskIndex, toolIndex)
  4616. ">
  4617. <img src="../../../assets/icon/checkNo.png" alt
  4618. v-if="itemTool.tool.indexOf(41) == -1" />
  4619. <div class="checkDiv" v-else>
  4620. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4621. </div>
  4622. </div>
  4623. </div>
  4624. <div class="tool">
  4625. <div class="whiteBIcon" @click="
  4626. openTools(itemTaskIndex, 47, toolIndex)
  4627. ">
  4628. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4629. <div style="margin: 5px 0">排序</div>
  4630. </div>
  4631. <div class="check" @click="
  4632. addTools(47, itemTaskIndex, toolIndex)
  4633. ">
  4634. <img src="../../../assets/icon/checkNo.png" alt
  4635. v-if="itemTool.tool.indexOf(47) == -1" />
  4636. <div class="checkDiv" v-else>
  4637. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4638. </div>
  4639. </div>
  4640. </div>
  4641. <div class="tool">
  4642. <div class="whiteBIcon" @click="
  4643. openTools(itemTaskIndex, 48, toolIndex)
  4644. ">
  4645. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4646. <div style="margin: 5px 0">表格</div>
  4647. </div>
  4648. <div class="check" @click="
  4649. addTools(48, itemTaskIndex, toolIndex)
  4650. ">
  4651. <img src="../../../assets/icon/checkNo.png" alt
  4652. v-if="itemTool.tool.indexOf(48) == -1" />
  4653. <div class="checkDiv" v-else>
  4654. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4655. </div>
  4656. </div>
  4657. </div>
  4658. </div>
  4659. </div>
  4660. </div>
  4661. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4662. <div class="addToolImg">
  4663. <img src="../../../assets/icon/add.png" alt />
  4664. </div>
  4665. <div>添加工具</div>
  4666. </div> -->
  4667. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4668. style="margin: 35px auto 20px">
  4669. 添加工具
  4670. </button>
  4671. </div>
  4672. </div>
  4673. <div v-else-if="
  4674. unitJson[unitIndex].easy == 1 ||
  4675. (unitJson[unitIndex].easy == 5 &&
  4676. itemTask.taskType == 2)
  4677. " class="toolChoose" style="padding: 0 0 40px">
  4678. <div class="tools">
  4679. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4680. itemTool, toolIndex
  4681. ) in itemTask.toolChoose" :key="toolIndex">
  4682. <div style="min-height: 163px">
  4683. <div class="toolSort">
  4684. <div class="tool">
  4685. <div class="whiteBIcon" @click="
  4686. openTools(itemTaskIndex, 50, toolIndex)
  4687. ">
  4688. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4689. <div style="margin: 5px 0">批量上传</div>
  4690. </div>
  4691. <div class="check" @click="
  4692. addTools(50, itemTaskIndex, toolIndex)
  4693. ">
  4694. <img src="../../../assets/icon/checkNo.png" alt
  4695. v-if="itemTool.tool.indexOf(50) == -1" />
  4696. <div class="checkDiv" v-else>
  4697. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4698. </div>
  4699. </div>
  4700. </div>
  4701. </div>
  4702. </div>
  4703. </div>
  4704. </div>
  4705. </div>
  4706. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4707. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4708. <div class="elist_title">
  4709. <div style="
  4710. display: flex;
  4711. flex-direction: row;
  4712. align-items: center;
  4713. margin: 20px 0;
  4714. ">
  4715. <div class="lineTitle clineTitle">评价设置</div>
  4716. <div style="margin-left:auto;display: flex;">
  4717. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4718. <div class="r_pub_button_op"
  4719. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4720. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4721. </el-tooltip>
  4722. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4723. <div class="r_pub_button_op" style="margin-left:10px;"
  4724. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4725. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4726. </el-tooltip>
  4727. </div>
  4728. <!-- <div class="line" style="width: 90%"></div> -->
  4729. </div>
  4730. </div>
  4731. <div class="mbCss">
  4732. <div class="pjCss" :style="{
  4733. width: itemTask.isEvaFold
  4734. ? 'calc(100% - 55%)'
  4735. : 'calc(100% - 120px)',
  4736. }">
  4737. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  4738. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  4739. <div class="elist_inptu_text">
  4740. <span>目标:</span>
  4741. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  4742. <el-switch
  4743. style="margin-left: auto;"
  4744. v-model="itemTask.eList[eIndex].isai"
  4745. active-text="人工评分"
  4746. inactive-text="AI评分"
  4747. active-value="2"
  4748. inactive-value="1">
  4749. </el-switch>
  4750. </div>
  4751. <div class="elist_inptu_text">
  4752. <span>评价维度:</span>
  4753. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  4754. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  4755. <!-- </el-tooltip> -->
  4756. <!-- <span>评星等级:</span>
  4757. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  4758. disabled></el-rate> -->
  4759. <div class="remove" @click="
  4760. deletEList(
  4761. unitIndex,
  4762. itemTaskIndex,
  4763. eIndex
  4764. )
  4765. "></div>
  4766. </div>
  4767. <div class="elist_inptu_text">
  4768. <span>维度描述:</span>
  4769. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  4770. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  4771. <!-- </el-tooltip> -->
  4772. </div>
  4773. <div class="elist_inptu_text" v-if="evalua">
  4774. <span>目标:</span>
  4775. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  4776. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  4777. @change="forceUpdate()">
  4778. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  4779. :value="e.name">
  4780. </el-option>
  4781. </el-select> -->
  4782. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  4783. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  4784. </div>
  4785. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  4786. <span>细则:</span>
  4787. <div style="width: calc(100%);">
  4788. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  4789. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  4790. <div class="ruleBtn"
  4791. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  4792. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  4793. </el-tooltip>
  4794. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  4795. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  4796. <div class="op_box">
  4797. <div class="op_remark"></div>
  4798. <div style="display: flex;">
  4799. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4800. <div class="r_pub_button_op"
  4801. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  4802. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  4803. </el-tooltip>
  4804. </div>
  4805. </div>
  4806. </div>
  4807. </div>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  4812. style="margin: 35px 35px 0 0">
  4813. <div class="addToolImg">
  4814. <img src="../../../assets/icon/add.png" alt />
  4815. </div>
  4816. <div>添加</div>
  4817. </div> -->
  4818. <div class="eva_btn_box">
  4819. <div class="eva_btn_left_box">
  4820. <button class="c_pub_button_add pub_btn_eval_img"
  4821. @click="addEList(unitIndex, itemTaskIndex)">
  4822. 添加
  4823. </button>
  4824. <button class="c_pub_button_add pub_btn_eval_source_img"
  4825. @click="openEList(unitIndex, itemTaskIndex)">
  4826. 资源
  4827. </button>
  4828. </div>
  4829. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  4830. v-if="itemTask.eList && itemTask.eList.length">
  4831. 添加资源模板
  4832. </button>
  4833. </div>
  4834. </div>
  4835. <div v-if="evalua" style="
  4836. border: 1px solid #e5e5e5;
  4837. box-shadow: 3px 1px 15px 3px #e0e0e0;
  4838. " :style="{
  4839. width: itemTask.isEvaFold ? '55%' : '116px',
  4840. }" class="evaCss">
  4841. <!-- <div class="e_add_top">
  4842. <div class="e_add_title">
  4843. <span>当前使用目标管理</span>
  4844. <span>{{ eTitle }}</span>
  4845. <img src="../../../assets/line.png" class="cru_line" style="
  4846. width: 125px;
  4847. height: 20px;
  4848. bottom: -10px;
  4849. left: 155px;
  4850. " />
  4851. </div>
  4852. </div> -->
  4853. <div class="e_add_content" style="width: 100%">
  4854. <div class="e_add_list_pbox" style="width: 100%">
  4855. <div class="e_add_list_pbox_title">
  4856. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  4857. <div class="type_content" v-if="itemTask.isEvaFold">
  4858. <span :class="{ active: typeMode == 1 }"
  4859. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  4860. <span :class="{ active: typeMode == 2 }"
  4861. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  4862. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  4863. </div>
  4864. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  4865. @click="foldEva(itemTaskIndex)">
  4866. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  4867. </div>
  4868. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  4869. @click="foldEva(itemTaskIndex)">
  4870. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  4871. </div>
  4872. </div>
  4873. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  4874. style="min-height: 200px">
  4875. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  4876. " v-if="typeMode == 1"></Mind>
  4877. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  4878. </Sunburst>
  4879. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  4880. v-if="typeMode == 3"></SeeBoard>
  4881. </div>
  4882. </div>
  4883. </div>
  4884. </div>
  4885. </div>
  4886. </div>
  4887. <div class="funBlock" style="padding: 0">
  4888. <div class="fold" @click="fold(itemTaskIndex, $event)">
  4889. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  4890. <div>
  4891. {{
  4892. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  4893. }}
  4894. </div>
  4895. </div>
  4896. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  4897. <div>展开</div>
  4898. <div class="arrow">
  4899. <img src="../../../assets/icon/expand.png" alt />
  4900. </div>
  4901. </div> -->
  4902. </div>
  4903. </div>
  4904. </div>
  4905. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  4906. <!-- <div>
  4907. <img src="../../../../assets/icon/new/addStage.png" alt />
  4908. <span>添加任务</span>
  4909. </div> -->
  4910. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  4911. 添加任务
  4912. </button>
  4913. </div>
  4914. </div>
  4915. <div class="info_btnBox3">
  4916. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  4917. goTo(
  4918. '/course?userid=' +
  4919. userid +
  4920. '&oid=' +
  4921. oid +
  4922. '&org=' +
  4923. org +
  4924. '&role=' +
  4925. role
  4926. )
  4927. ">
  4928. 返回课程
  4929. </button>
  4930. <button class="c_pub_button_return pub_btn_last_img"
  4931. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  4932. {{ steps == 4 ? "返回课程" : "上一步" }}
  4933. </button>
  4934. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  4935. pub_btn_next_img: steps != 3,
  4936. pub_btn_finish_img: steps == 3,
  4937. }">
  4938. {{ steps == 3 ? "确认上传" : "下一步" }}
  4939. </button>
  4940. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  4941. '修改模板' : '保存模板'}}</button>
  4942. </div>
  4943. </div>
  4944. </div>
  4945. </div>
  4946. </div>
  4947. <div style="
  4948. width: calc(100% - 20px);
  4949. background: rgb(255, 255, 255);
  4950. border-radius: 10px;
  4951. " v-if="steps == 4">
  4952. <div class="basic_box_success">
  4953. <div class="right_img">
  4954. <img src="../../../assets/icon/right.png" alt />
  4955. </div>
  4956. <div style="font-weight: bold">成功</div>
  4957. <!-- <div>您的课程编号</div>
  4958. <div class="number">{{ number }}</div>-->
  4959. <!-- <div class="success_button">
  4960. <div class="look_course" @click="isNoFinsh">
  4961. 邀请老师协同编辑
  4962. </div>
  4963. <div class="attend_others" @click="goCourse">预览课程</div>
  4964. </div> -->
  4965. </div>
  4966. </div>
  4967. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  4968. @mouseleave="btnDisplay(false)" v-if="false">
  4969. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  4970. goTo(
  4971. '/course?userid=' +
  4972. userid +
  4973. '&oid=' +
  4974. oid +
  4975. '&org=' +
  4976. org +
  4977. '&role=' +
  4978. role
  4979. )
  4980. ">
  4981. 返回课程
  4982. </button>
  4983. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  4984. @click="lastSteps">
  4985. {{ steps == 4 ? "返回课程" : "上一步" }}
  4986. </button>
  4987. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  4988. pub_btn_next_img: steps != 3,
  4989. pub_btn_finish_img: steps == 3,
  4990. }">
  4991. {{ steps == 3 ? "确认上传" : "下一步" }}
  4992. </button>
  4993. </div>
  4994. </div>
  4995. </div>
  4996. <div class="leftBar" v-if="istemplate == 1">
  4997. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4998. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4999. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5000. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5001. <!-- <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/> -->
  5002. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5003. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5004. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5005. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5006. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5007. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5008. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5009. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5010. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5011. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5012. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5013. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5014. @setAiJson="setAiJson" /> -->
  5015. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5016. @setAiJson="setAiJson" />
  5017. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5018. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5019. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5020. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5021. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5022. </div>
  5023. </div>
  5024. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5025. class="dialog_diy2 customWidth">
  5026. <div>请复制该链接邀请协同编辑</div>
  5027. <div>http://www.boomyon.com/index-zhang.com</div>
  5028. <span slot="footer" class="dialog-footer">
  5029. <el-button type="primary">复制链接分享</el-button>
  5030. <el-button @click="dialogVisible = false">取消</el-button>
  5031. </span>
  5032. </el-dialog>
  5033. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5034. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5035. <el-form>
  5036. <el-form-item label="文档标题">
  5037. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5038. </el-form-item>
  5039. <div>文档简介</div>
  5040. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5041. </el-form>
  5042. <span slot="footer" class="dialog-footer">
  5043. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5044. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5045. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5046. </span>
  5047. </el-dialog>
  5048. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5049. :before-close="handleClose" class="dialog_diy">
  5050. <el-form>
  5051. <el-form-item label="文档标题">
  5052. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5053. </el-form-item>
  5054. <div>文档内容</div>
  5055. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5056. </el-form>
  5057. <span slot="footer" class="dialog-footer">
  5058. <el-button @click="clearChoose">取 消</el-button>
  5059. <el-button type="primary" @click="wordNext()">确定</el-button>
  5060. </span>
  5061. </el-dialog>
  5062. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5063. :before-close="handleClose" class="dialog_diy">
  5064. <el-form>
  5065. <el-form-item label="文本标题">
  5066. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5067. placeholder="请输入文本标题..."></el-input>
  5068. </el-form-item>
  5069. <!-- <div>富文本内容</div> -->
  5070. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5071. </el-form>
  5072. <span slot="footer" class="dialog-footer">
  5073. <el-button @click="clearAttText">取 消</el-button>
  5074. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5075. </span>
  5076. </el-dialog>
  5077. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5078. :before-close="handleClose" class="dialog_diy lineCss">
  5079. <el-form>
  5080. <el-form-item label="标题" :label-width="formLabelWidth">
  5081. <span>
  5082. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5083. </span>
  5084. </el-form-item>
  5085. <el-form-item label="链接" :label-width="formLabelWidth">
  5086. <span>
  5087. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5088. </span>
  5089. </el-form-item>
  5090. </el-form>
  5091. <span slot="footer" class="dialog-footer">
  5092. <el-button @click="clearLine">取 消</el-button>
  5093. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5094. </span>
  5095. </el-dialog>
  5096. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5097. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5098. <div>
  5099. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5100. </div>
  5101. <span slot="footer" class="dialog-footer">
  5102. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5103. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5104. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5105. </span>
  5106. </el-dialog>
  5107. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5108. :before-close="handleClose" class="addNewPP customWidth">
  5109. <div class="people">
  5110. <div class="people_top">
  5111. <div class="people_nav">选择成员</div>
  5112. <div class="people_top_right">
  5113. <div class="people_search">
  5114. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5115. <div class="search_img" @click="searchStudent">
  5116. <img src="../../../assets/icon/search.png" alt />
  5117. </div>
  5118. </div>
  5119. </div>
  5120. </div>
  5121. <el-checkbox-group v-model="checkboxList" class="people_name">
  5122. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5123. "暂无学生可选" }}</el-checkbox>
  5124. </el-checkbox-group>
  5125. </div>
  5126. <span slot="footer" class="dialog-footer">
  5127. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5128. <el-button type="primary" @click="isAddPP">确定</el-button>
  5129. </span>
  5130. </el-dialog>
  5131. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5132. :before-close="handleClose" class="addNewPP2">
  5133. <div class="check_classBox">
  5134. <div class="check_class_right">
  5135. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5136. 全部
  5137. </div>
  5138. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5139. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5140. {{ item.name }}
  5141. </div>
  5142. </el-tooltip>
  5143. </div>
  5144. <div class="check_class_left">
  5145. <div class="check_class_all_box">
  5146. <div class="check_class_left_title">选择班级</div>
  5147. <div style="display: flex; align-items: center; margin-left: auto">
  5148. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5149. </div>
  5150. </div>
  5151. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5152. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5153. </div> -->
  5154. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5155. v-if="grade2.length">
  5156. <div v-for="item in grade2" :key="item.id" class="class_item">
  5157. <el-checkbox :label="item.id">
  5158. {{ item.name }}
  5159. </el-checkbox>
  5160. </div>
  5161. </el-checkbox-group>
  5162. <div v-if="!grade2.length">暂无数据</div>
  5163. </div>
  5164. </div>
  5165. <span slot="footer" class="dialog-footer">
  5166. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5167. <el-button type="primary" @click="isAddClass">确定</el-button>
  5168. </span>
  5169. </el-dialog>
  5170. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5171. :before-close="handleClose" class="addNewPP customWidth">
  5172. <div style="display: flex;justify-content: space-between;">
  5173. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5174. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5175. 全部
  5176. </div>
  5177. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5178. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5179. <el-tooltip placement="top" :content="i.name">
  5180. <span>{{i.name}}</span>
  5181. </el-tooltip>
  5182. </div>
  5183. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5184. 其他
  5185. </div>
  5186. </div>
  5187. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5188. <div class="people">
  5189. <div class="people_top">
  5190. <div class="people_top_right">
  5191. <div class="people_search">
  5192. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5193. <div class="search_img" @click="getTeacher(collid)">
  5194. <img src="../../../assets/icon/search.png" alt />
  5195. </div>
  5196. </div>
  5197. </div>
  5198. <div class="people_nav" style="display: flex; align-items: center">
  5199. <div class="check_class_left_title">选择成员</div>
  5200. <div style="display: flex; align-items: center; margin-left: auto">
  5201. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5202. </div>
  5203. </div>
  5204. </div>
  5205. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5206. @change="InviteChange2">
  5207. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5208. <div class="t_j_box">
  5209. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5210. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5211. </el-tooltip>
  5212. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5213. <span>{{ item.username.split('@')[0] }}</span>
  5214. </el-tooltip>
  5215. <el-tooltip placement="top" :content="item.school">
  5216. <span>{{ item.school }}</span>
  5217. </el-tooltip>
  5218. </div>
  5219. </el-checkbox>
  5220. </el-checkbox-group>
  5221. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5222. </div>
  5223. </div>
  5224. </div>
  5225. <span slot="footer" class="dialog-footer">
  5226. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5227. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5228. </span>
  5229. </el-dialog>
  5230. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5231. closePan(4);
  5232. }
  5233. " class="dialog_diy fullStyle">
  5234. <div style="height: 100%">
  5235. <div class="a_add_title" style="
  5236. display: flex;
  5237. flex-direction: row;
  5238. align-items: center;
  5239. justify-content: center;
  5240. ">
  5241. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5242. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5243. </div>
  5244. <div class="a_addBox" style="height: calc(100% - 50px)">
  5245. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5246. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5247. <div class="a_add_checkType">
  5248. <span :class="{
  5249. active:
  5250. askJson.askJson[index1].type == '1' ||
  5251. !askJson.askJson[index1].type,
  5252. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5253. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5254. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5255. </div>
  5256. <div class="a_add_head">
  5257. <div style="
  5258. display: flex;
  5259. align-items: center;
  5260. width: 100%;
  5261. margin-right: 20px;
  5262. ">
  5263. <span style="min-width: fit-content">{{
  5264. index1 + 1 + "、"
  5265. }}</span>
  5266. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5267. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5268. $forceUpdate();
  5269. }
  5270. "></textarea>
  5271. </div>
  5272. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5273. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5274. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5275. </div>
  5276. <div class="a_add_head_div">
  5277. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5278. </el-button>
  5279. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5280. </div>
  5281. </div>
  5282. <div class="a_add_body">
  5283. <div class="a_add_input" style="flex-direction: column">
  5284. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5285. margin: 20px 10px 0 0;
  5286. display: flex;
  5287. align-items: center;
  5288. position: relative;
  5289. ">
  5290. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5291. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5292. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5293. @change="() => {
  5294. $forceUpdate();
  5295. }
  5296. "></textarea>
  5297. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5298. v-if="askJson.askJson[index1].askItem != 1">
  5299. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5300. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5301. </div>
  5302. <div class="a_add_body_div">
  5303. <el-button type="primary" size="small"
  5304. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5305. <el-button type="primary" size="small" @click="
  5306. deletecheckList(askJson.askJson[index1], checkIndex)
  5307. " v-if="askJson.askJson[index1].askItem != 1">删除
  5308. </el-button>
  5309. </div>
  5310. </div>
  5311. </div>
  5312. <!-- <div class="a_add_body_div">
  5313. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5314. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5315. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5316. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5317. </el-button>
  5318. </div> -->
  5319. </div>
  5320. </div>
  5321. </div>
  5322. </div>
  5323. <span slot="footer" class="dialog-footer">
  5324. <el-button @click="closePan(4)">取 消</el-button>
  5325. <el-button type="primary" @click="addAsk">确 定</el-button>
  5326. </span>
  5327. </el-dialog>
  5328. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5329. closePan(45);
  5330. }
  5331. " class="dialog_diy fullStyle">
  5332. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5333. <!-- <div class="a_add_title" style="
  5334. display: flex;
  5335. flex-direction: row;
  5336. align-items: center;
  5337. justify-content: center;
  5338. ">
  5339. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5340. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5341. </div> -->
  5342. <div class="a_addBox" style="height: 100%">
  5343. <div style="
  5344. font-size: 16px;
  5345. color: #c7c7c7;
  5346. display: flex;
  5347. align-items: center;
  5348. justify-content: flex-end;
  5349. ">
  5350. <!-- 请输入题目内容 -->
  5351. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5352. 智能生成
  5353. </button>
  5354. <!-- 请输入题目内容 -->
  5355. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5356. v-if="isPasteChoice">
  5357. 智能粘贴
  5358. </button>
  5359. </div>
  5360. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5361. <div class="a_add_checkType">
  5362. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5363. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5364. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5365. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5366. </div>
  5367. <div class="a_add_head">
  5368. <div class="timuUpImg">
  5369. <div style="display: flex; align-items: center">
  5370. <span style="min-width: fit-content">{{
  5371. index1 + 1 + "、"
  5372. }}</span>
  5373. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5374. placeholder="请输入题目">
  5375. </el-input> -->
  5376. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5377. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5378. $forceUpdate();
  5379. }
  5380. "></textarea>
  5381. </div>
  5382. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5383. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5384. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5385. </div>
  5386. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5387. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5388. <input type="file" accept="image/*" style="display: none"
  5389. @change="beforeUploadTiMu($event, index1)" />
  5390. </div>
  5391. </div>
  5392. <div class="a_add_head_div">
  5393. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5394. </el-button>
  5395. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5396. </div>
  5397. </div>
  5398. <div class="timuImgBox" v-if="
  5399. testJson.testJson[index1].timuList &&
  5400. testJson.testJson[index1].timuList.length
  5401. ">
  5402. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5403. @click.stop="previewImg(timg.src)">
  5404. <img :src="timg.src" alt="" />
  5405. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5406. <img src="../../../assets/icon/delete.png" alt="" />
  5407. </div>
  5408. </div>
  5409. </div>
  5410. <div class="a_add_body">
  5411. <div class="a_add_input a_add_input_choice">
  5412. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5413. @change="() => {
  5414. $forceUpdate();
  5415. }
  5416. ">
  5417. <div class="radioBox">
  5418. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5419. .testItem" :key="checkIndex" :label="checkIndex">
  5420. <div style="margin-right: 10px">
  5421. 选项{{ checkIndex + 1 }}
  5422. </div>
  5423. <div style="margin-right: 10px; width: 300px" v-if="
  5424. testJson.testJson[index1].checkList[checkIndex] &&
  5425. testJson.testJson[index1].checkList[checkIndex]
  5426. .imgType &&
  5427. testJson.testJson[index1].checkList[checkIndex]
  5428. .imgType == 1
  5429. ">
  5430. <div class="inImg" @click.stop="
  5431. previewImg(
  5432. testJson.testJson[index1].checkList[checkIndex]
  5433. .src
  5434. )
  5435. ">
  5436. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5437. .src
  5438. " lazy />
  5439. <!-- <img :src="
  5440. testJson.testJson[index1].checkList[checkIndex]
  5441. .src
  5442. " alt="" /> -->
  5443. </div>
  5444. </div>
  5445. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5446. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5447. $forceUpdate();
  5448. }
  5449. "></textarea>
  5450. <div class="xzUpImg" @click.stop="addImg($event)">
  5451. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5452. <input type="file" accept="image/*" style="display: none"
  5453. @change="beforeUploadTi($event, index1, checkIndex)" />
  5454. </div>
  5455. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5456. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5457. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5458. </div>
  5459. <div class="a_add_body_div">
  5460. <el-button type="primary" size="small" @click.stop="
  5461. addTcheckList(testJson.testJson[index1], checkIndex)
  5462. ">添加</el-button>
  5463. <el-button type="primary" size="small" @click.stop="
  5464. deleteTcheckList(
  5465. testJson.testJson[index1],
  5466. checkIndex
  5467. )
  5468. " v-if="testJson.testJson[index1].testItem != 1">删除
  5469. </el-button>
  5470. </div>
  5471. </el-radio>
  5472. </div>
  5473. </el-radio-group>
  5474. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5475. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5476. $forceUpdate();
  5477. }
  5478. ">
  5479. <div class="radioBox">
  5480. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5481. .testItem" :key="checkIndex1" :label="checkIndex1">
  5482. <div style="margin-right: 10px">
  5483. 选项{{ checkIndex1 + 1 }}
  5484. </div>
  5485. <div style="margin-right: 10px; width: 300px" v-if="
  5486. testJson.testJson[index1].checkList[checkIndex1] &&
  5487. testJson.testJson[index1].checkList[checkIndex1]
  5488. .imgType &&
  5489. testJson.testJson[index1].checkList[checkIndex1]
  5490. .imgType == 1
  5491. ">
  5492. <div class="inImg" @click.stop="
  5493. previewImg(
  5494. testJson.testJson[index1].checkList[checkIndex1]
  5495. .src
  5496. )
  5497. ">
  5498. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5499. .src
  5500. " lazy />
  5501. <!-- <img :src="
  5502. testJson.testJson[index1].checkList[checkIndex1]
  5503. .src
  5504. " alt="" /> -->
  5505. </div>
  5506. </div>
  5507. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5508. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5509. $forceUpdate();
  5510. }
  5511. "></textarea>
  5512. <div class="xzUpImg" @click.stop="addImg($event)">
  5513. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5514. <input type="file" accept="image/*" style="display: none"
  5515. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5516. </div>
  5517. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5518. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5519. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5520. </div>
  5521. <div class="a_add_body_div">
  5522. <el-button type="primary" size="small" @click.stop="
  5523. addTcheckList(
  5524. testJson.testJson[index1],
  5525. checkIndex1
  5526. )
  5527. ">添加</el-button>
  5528. <el-button type="primary" size="small" @click.stop="
  5529. deleteTcheckList(
  5530. testJson.testJson[index1],
  5531. checkIndex1
  5532. )
  5533. " v-if="testJson.testJson[index1].testItem != 1">删除
  5534. </el-button>
  5535. </div>
  5536. </el-checkbox>
  5537. </div>
  5538. </el-checkbox-group>
  5539. </div>
  5540. <!-- <div class="a_add_body_div">
  5541. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  5542. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  5543. v-if="testJson.testJson[index1].testItem != 1">删除
  5544. </el-button>
  5545. </div> -->
  5546. </div>
  5547. </div>
  5548. </div>
  5549. </div>
  5550. <span slot="footer" class="dialog-footer">
  5551. <el-button @click="closePan(45)">取 消</el-button>
  5552. <el-button type="primary" @click="addTest">确 定</el-button>
  5553. </span>
  5554. </el-dialog>
  5555. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  5556. :before-close="handleClose" class="dialog_diy addToolsDia">
  5557. <div class="toolChoose">
  5558. <div class="tools">
  5559. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  5560. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  5561. <div style="
  5562. display: flex;
  5563. flex-direction: row;
  5564. align-items: baseline;
  5565. flex-wrap: nowrap;
  5566. justify-content: flex-start;
  5567. position: relative;
  5568. ">
  5569. <div class="chooseWho">
  5570. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  5571. 互动类
  5572. </div>
  5573. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  5574. 思维类
  5575. </div>
  5576. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5577. 评价类
  5578. </div>
  5579. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5580. 其他
  5581. </div>
  5582. </div>
  5583. </div>
  5584. <div style="min-height: 163px">
  5585. <div class="toolSort" v-if="chapToolsType == 0">
  5586. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  5587. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  5588. <img src="../../../assets/icon/secondToolList/library.png" alt />
  5589. <div style="margin: 5px 0">素材库</div>
  5590. </div>
  5591. <div class="noCTool">
  5592. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5593. </div>
  5594. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  5595. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5596. </div>
  5597. <!-- <div class="check" @click="chapAddTools(8)">
  5598. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  5599. <div class="checkDiv" v-else>
  5600. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5601. </div>
  5602. </div> -->
  5603. </div>
  5604. </div>
  5605. <div class="toolSort" v-if="chapToolsType == 1">
  5606. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  5607. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  5608. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  5609. <div style="margin: 5px 0">思维网格</div>
  5610. </div>
  5611. <div class="noCTool">
  5612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5613. </div>
  5614. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  5615. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5616. </div>
  5617. <!-- <div class="check" @click="chapAddTools(7)">
  5618. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  5619. <div class="checkDiv" v-else>
  5620. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5621. </div>
  5622. </div> -->
  5623. </div>
  5624. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  5625. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  5626. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  5627. <div style="margin: 5px 0">电子白板</div>
  5628. </div>
  5629. <div class="noCTool">
  5630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5631. </div>
  5632. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  5633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5634. </div>
  5635. <!-- <div class="check" @click="chapAddTools(1)">
  5636. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  5637. <div class="checkDiv" v-else>
  5638. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5639. </div>
  5640. </div> -->
  5641. </div>
  5642. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  5643. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  5644. <img src="../../../assets/icon/secondToolList/note.png" alt />
  5645. <div style="margin: 5px 0">便签</div>
  5646. </div>
  5647. <div class="noCTool">
  5648. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5649. </div>
  5650. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  5651. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5652. </div>
  5653. <!-- <div class="check" @click="chapAddTools(2)">
  5654. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  5655. <div class="checkDiv" v-else>
  5656. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5657. </div>
  5658. </div> -->
  5659. </div>
  5660. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  5661. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  5662. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  5663. <div style="margin: 5px 0">协同文档</div>
  5664. </div>
  5665. <div class="noCTool">
  5666. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5667. </div>
  5668. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  5669. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5670. </div>
  5671. <!-- <div class="check" @click="chapAddTools(6)">
  5672. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  5673. <div class="checkDiv" v-else>
  5674. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5675. </div>
  5676. </div> -->
  5677. </div>
  5678. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  5679. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  5680. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  5681. <div style="margin: 5px 0">思维导图</div>
  5682. </div>
  5683. <div class="noCTool">
  5684. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5685. </div>
  5686. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  5687. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5688. </div>
  5689. <!-- <div class="check" @click="chapAddTools(3)">
  5690. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  5691. <div class="checkDiv" v-else>
  5692. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5693. </div>
  5694. </div> -->
  5695. </div>
  5696. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  5697. @click="chapAddTools(31)">
  5698. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  5699. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5700. <div style="margin: 5px 0">数学画板</div>
  5701. </div>
  5702. <div class="noCTool">
  5703. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5704. </div>
  5705. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  5706. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5707. </div>
  5708. <!-- <div class="check" @click="chapAddTools(31)">
  5709. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  5710. <div class="checkDiv" v-else>
  5711. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5712. </div>
  5713. </div> -->
  5714. </div>
  5715. </div>
  5716. <div class="toolSort" v-if="chapToolsType == 2">
  5717. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  5718. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  5719. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  5720. <div style="margin: 5px 0">量规评分</div>
  5721. </div>
  5722. <div class="noCTool">
  5723. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5724. </div>
  5725. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  5726. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5727. </div>
  5728. <!-- <div class="check" @click="chapAddTools(5)">
  5729. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  5730. <div class="checkDiv" v-else>
  5731. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5732. </div>
  5733. </div> -->
  5734. </div>
  5735. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  5736. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  5737. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  5738. <div style="margin: 5px 0">问卷调查</div>
  5739. </div>
  5740. <div class="noCTool">
  5741. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5742. </div>
  5743. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  5744. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5745. </div>
  5746. <!-- <div class="check" @click="chapAddTools(4)">
  5747. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  5748. <div class="checkDiv" v-else>
  5749. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5750. </div>
  5751. </div> -->
  5752. </div>
  5753. </div>
  5754. </div>
  5755. <div>
  5756. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  5757. v-model="itemTools.toolDetail" />
  5758. </div>
  5759. </div>
  5760. </div>
  5761. </div>
  5762. <span slot="footer" class="dialog-footer">
  5763. <el-button @click="dialogVisible4 = false">取 消</el-button>
  5764. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  5765. </span>
  5766. </el-dialog>
  5767. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  5768. closePan(15);
  5769. }
  5770. " class="dialog_diy">
  5771. <div>
  5772. <div class="a_add_title" style="
  5773. display: flex;
  5774. flex-direction: column;
  5775. align-items: flex-start;
  5776. justify-content: center;
  5777. ">
  5778. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5779. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  5780. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  5781. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  5782. </div>
  5783. </div>
  5784. <span slot="footer" class="dialog-footer">
  5785. <el-button @click="closePan(15)">取 消</el-button>
  5786. <el-button type="primary" @click="addAnswer">确 定</el-button>
  5787. </span>
  5788. </el-dialog>
  5789. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  5790. :before-close="handleClose" class="dialog_diy">
  5791. <div>
  5792. <div class="a_add_title" style="
  5793. display: flex;
  5794. flex-direction: column;
  5795. align-items: flex-start;
  5796. justify-content: center;
  5797. ">
  5798. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5799. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  5800. </div>
  5801. </div>
  5802. <span slot="footer" class="dialog-footer">
  5803. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  5804. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  5805. </span>
  5806. </el-dialog>
  5807. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  5808. :before-close="handleClose" class="dialog_diy">
  5809. <div>
  5810. <div class="fileCss" style="padding-top: 20px">
  5811. <div>
  5812. <button class="info_btn" @click="addImg($event)">
  5813. 选择本地文件
  5814. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  5815. </button>
  5816. <div class="spanName">选择本地文件</div>
  5817. </div>
  5818. <!-- <div>
  5819. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  5820. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  5821. <img :src="cover[0].url" alt="" />
  5822. <div class="deletePic" @click="deleteSysPic">
  5823. <img src="../../../assets/icon/delete.png" alt="" />
  5824. </div>
  5825. </div>
  5826. <div class="spanName">选择系统文件</div>
  5827. </div> -->
  5828. <div>
  5829. <el-button @click="(searchImageValue = courseName), resetImage()"
  5830. v-if="isSysPic2 == false">选择网络文件</el-button>
  5831. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  5832. <img :src="cover[0].url" alt="" />
  5833. <div class="deletePic" @click="deleteSysPic">
  5834. <img src="../../../assets/icon/delete.png" alt="" />
  5835. </div>
  5836. </div>
  5837. <div class="spanName">选择网络文件</div>
  5838. </div>
  5839. </div>
  5840. <!-- <div class="fileCss">
  5841. </div> -->
  5842. </div>
  5843. <span slot="footer" class="dialog-footer">
  5844. <el-button @click="choosePicVisible = false">取 消</el-button>
  5845. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  5846. </span>
  5847. </el-dialog>
  5848. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  5849. :before-close="handleClose" class="dialog_diy">
  5850. <div class="cru_selectBox" style="margin: 0">
  5851. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  5852. 绘画
  5853. </div>
  5854. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  5855. 科技
  5856. </div>
  5857. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  5858. 人文
  5859. </div>
  5860. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  5861. 艺术
  5862. </div>
  5863. </div>
  5864. <div class="sysPicBox">
  5865. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  5866. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  5867. </div>
  5868. </div>
  5869. </el-dialog>
  5870. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  5871. :before-close="handleClose" class="dialog_diy">
  5872. <div>
  5873. <div class="people_top_right" style="display: flex; align-items: center">
  5874. <div style="position: relative; width: 100%">
  5875. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  5876. @keyup.enter.native="resetImage()"></el-input>
  5877. <div class="search_img" @click="resetImage" style="right: 10px">
  5878. <img src="../../../assets/icon/search.png" alt />
  5879. </div>
  5880. </div>
  5881. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  5882. </div>
  5883. <div class="sysPicBox" v-loading="imageloading">
  5884. <div class="picNone" v-if="!imageList.length">
  5885. 请输入关键词搜索图片
  5886. </div>
  5887. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  5888. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  5889. </div>
  5890. </div>
  5891. </div>
  5892. </el-dialog>
  5893. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  5894. closePan(41);
  5895. }
  5896. " class="dialog_diy dialog_diy3 fullStyle">
  5897. <div v-if="selectJson" style="height: 100%">
  5898. <div class="select_box1" v-if="selectSteps == 1">
  5899. <div class="select_box1_img">
  5900. <div class="select_box1_title">
  5901. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  5902. </div>
  5903. <div class="select_box1_add_img">
  5904. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  5905. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  5906. <img src="../../../assets/icon/addPoster.png" alt="" />
  5907. </div>
  5908. <div class="isSysPic" v-else>
  5909. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5910. <div class="deletePic" @click="deleteSelectPic">
  5911. <img src="../../../assets/icon/delete.png" alt="" />
  5912. </div>
  5913. </div>
  5914. </div>
  5915. </div>
  5916. <div class="select_box1_select">
  5917. <div class="select_box1_title">
  5918. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  5919. </div>
  5920. <div class="select_box1_select_box">
  5921. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  5922. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  5923. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  5924. <div class="select_box1_select_box_add">
  5925. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  5926. 添加</el-button>
  5927. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  5928. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  5929. </div>
  5930. </div>
  5931. </div>
  5932. </div>
  5933. <div v-if="selectSteps == 2" style="height: 100%">
  5934. <div class="select_box2">
  5935. <div class="select_box2_title">设置每道题目的正确选项</div>
  5936. <div class="select_box2_box">
  5937. <div class="select_box2_img">
  5938. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5939. </div>
  5940. <div class="select_box2_answer">
  5941. <div class="select_answer_title">根据题目选择对应答案</div>
  5942. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  5943. <span>{{ checkIndex + 1 }}、</span>
  5944. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  5945. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  5946. </el-option>
  5947. </el-select>
  5948. </div>
  5949. </div>
  5950. </div>
  5951. </div>
  5952. </div>
  5953. </div>
  5954. <span slot="footer" class="dialog-footer">
  5955. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  5956. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  5957. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  5958. </span>
  5959. </el-dialog>
  5960. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  5961. :before-close="handleClose" class="dialog_diy">
  5962. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  5963. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  5964. <div class="pjCss" style="width: 100%">
  5965. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  5966. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  5967. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  5968. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  5969. <div class="remove" @click="deletRateList(eIndex)"></div>
  5970. <div style="width: 100%; display: flex">
  5971. <span style="min-width: 100px; text-align: right">评星等级:</span>
  5972. <el-rate v-model="eItem.score" disabled></el-rate>
  5973. </div>
  5974. <div class="elist_inptu_text" style="align-items: flex-start">
  5975. <span style="min-width: 100px; text-align: right">描述:</span>
  5976. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  5977. </div>
  5978. </div>
  5979. </div>
  5980. <div class="addToolFun" @click="addRateList()">
  5981. <div class="addToolImg">
  5982. <img src="../../../assets/icon/add.png" alt />
  5983. </div>
  5984. <div>添加</div>
  5985. </div>
  5986. </div>
  5987. </div>
  5988. <span slot="footer" class="dialog-footer">
  5989. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  5990. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  5991. </span>
  5992. </el-dialog>
  5993. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  5994. closePan(47);
  5995. }
  5996. " class="dialog_diy dialog_diy3 fullStyle">
  5997. <div style="height: 100%">
  5998. <div class="sentenBox" style="height: 100%">
  5999. <div class="addSen" @click="addSt">添加题目</div>
  6000. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6001. <div class="sentenTopBox">
  6002. <div class="sentenTop" :index="stIndex + 1">
  6003. <div>题目设置</div>
  6004. <div>
  6005. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6006. </div>
  6007. <div @click="addSen(stIndex)">添加</div>
  6008. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6009. </div>
  6010. </div>
  6011. <div class="cardList">
  6012. <div v-if="st.addSentence.length > 0" class="cardBox">
  6013. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6014. @click="setRightAnswer(s, stIndex, sIndex)">
  6015. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6016. <div>{{ s }}</div>
  6017. </el-tooltip>
  6018. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6019. <img src="../../../assets/icon/delete.png" alt="" />
  6020. </div>
  6021. </div>
  6022. </div>
  6023. <div class="card">
  6024. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6025. </div>
  6026. </div>
  6027. <div class="rightCardBox">
  6028. <div>正确顺序</div>
  6029. <div class="rightCardList">
  6030. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6031. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6032. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6033. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6034. <div>{{ r }}</div>
  6035. </el-tooltip>
  6036. </div>
  6037. <div>{{ rIndex + 1 }}</div>
  6038. </div>
  6039. </div>
  6040. <div class="card" v-if="st.rightAnswer.length == 0">
  6041. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6042. </div>
  6043. <div class="card" v-else>
  6044. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6045. </div>
  6046. </div>
  6047. </div>
  6048. </div>
  6049. </div>
  6050. </div>
  6051. <span slot="footer" class="dialog-footer">
  6052. <el-button @click="closePan(47)">取 消</el-button>
  6053. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6054. </span>
  6055. </el-dialog>
  6056. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6057. :before-close="handleClose" class="dialog_diy">
  6058. <el-form>
  6059. <!-- <el-form-item label="文本标题">
  6060. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6061. </el-form-item> -->
  6062. <div>表格内容</div>
  6063. <Table v-model="tableJson.text" @change="change"></Table>
  6064. </el-form>
  6065. <span slot="footer" class="dialog-footer">
  6066. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6067. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6068. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6069. </span>
  6070. </el-dialog>
  6071. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6072. :before-close="handleClose" class="dialog_diy">
  6073. <el-form>
  6074. <!-- <el-form-item label="文本标题">
  6075. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6076. </el-form-item> -->
  6077. <div>文档内容</div>
  6078. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6079. </el-form>
  6080. <span slot="footer" class="dialog-footer">
  6081. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6082. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6083. </span>
  6084. </el-dialog>
  6085. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6086. :before-close="handleClose" class="dialog_diy">
  6087. <div style="
  6088. width: 100%;
  6089. display: flex;
  6090. flex-direction: row;
  6091. flex-wrap: nowrap;
  6092. align-items: center;
  6093. justify-content: center;
  6094. ">
  6095. <div>班级:</div>
  6096. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6097. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6098. </el-option>
  6099. </el-select>
  6100. </div>
  6101. <span slot="footer" class="dialog-footer">
  6102. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6103. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6104. </span>
  6105. </el-dialog>
  6106. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6107. :before-close="handleClose" class="dialog_diy">
  6108. <div style="
  6109. width: 100%;
  6110. display: flex;
  6111. flex-direction: row;
  6112. flex-wrap: nowrap;
  6113. align-items: center;
  6114. justify-content: center;
  6115. ">
  6116. <div>随机码:</div>
  6117. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6118. </div>
  6119. <span slot="footer" class="dialog-footer">
  6120. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6121. <el-button type="primary" @click="addInvite">确定</el-button>
  6122. </span>
  6123. </el-dialog>
  6124. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6125. :before-close="handleClose" class="dialog_diy">
  6126. <div>
  6127. <div style="margin-bottom: 20px; color: #999">
  6128. 提示:点击“+”或“-”修改倒计时时长。
  6129. </div>
  6130. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6131. </div>
  6132. <span slot="footer" class="dialog-footer">
  6133. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6134. <el-button type="primary" @click="addPreTime">确定</el-button>
  6135. </span>
  6136. </el-dialog>
  6137. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6138. :before-close="handleClose" class="dialog_diy">
  6139. <div>
  6140. <div style="
  6141. width: 100%;
  6142. display: flex;
  6143. flex-direction: row;
  6144. flex-wrap: nowrap;
  6145. align-content: center;
  6146. align-items: center;
  6147. justify-content: space-between;
  6148. ">
  6149. <div style="
  6150. display: flex;
  6151. flex-flow: row nowrap;
  6152. align-items: flex-start;
  6153. width: 100%;
  6154. flex-direction: column;
  6155. flex-wrap: nowrap;
  6156. position: relative;
  6157. ">
  6158. <div class="e_box">
  6159. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6160. <div class="e_card_picture">
  6161. <img src="../../../assets/e_picture.png" />
  6162. </div>
  6163. <div class="e_card_name">
  6164. <span>{{ item.title }}</span>
  6165. </div>
  6166. <div class="e_card_btn">
  6167. <span @click="checkEva(item.id, 2)">导入</span>
  6168. </div>
  6169. </div> -->
  6170. <!-- <div class="addEva" @click="openT">
  6171. <img src="../../../assets/icon/addEva.png" alt="" />
  6172. </div> -->
  6173. <div style="
  6174. display: flex;
  6175. justify-content: flex-end;
  6176. margin-bottom: 10px;
  6177. ">
  6178. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6179. </div>
  6180. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6181. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6182. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6183. </el-table-column>
  6184. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6185. </el-table-column>
  6186. <el-table-column label="操作" width="250px">
  6187. <template slot-scope="scope">
  6188. <div class="btnBox">
  6189. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6190. </div>
  6191. </template>
  6192. </el-table-column>
  6193. </el-table>
  6194. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6195. 暂无数据
  6196. </div>
  6197. </div>
  6198. </div>
  6199. </div>
  6200. </div>
  6201. <span slot="footer" class="dialog-footer">
  6202. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6203. </span>
  6204. </el-dialog>
  6205. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6206. :before-close="handleClose" class="dialog_diy">
  6207. <div class="groupBox">
  6208. <div v-if="groupJson.group" class="groupContent">
  6209. <div class="groupTitle">请设置小组数量及名称</div>
  6210. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6211. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6212. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6213. <div class="groupBtn">
  6214. <el-button type="primary" size="small" @click="addGroup(index)"
  6215. v-if="groupJson.group.length - 1 == index">
  6216. 添加</el-button>
  6217. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6218. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6219. </div>
  6220. </div>
  6221. </div>
  6222. <div class="groupContent">
  6223. <div class="groupTitle">请设置每组人数</div>
  6224. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6225. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6226. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6227. @change="numberPan"></el-input>
  6228. </div>
  6229. </div>
  6230. <span slot="footer" class="dialog-footer">
  6231. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6232. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6233. </span>
  6234. </el-dialog>
  6235. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6236. :before-close="handleClose" class="dialog_diy">
  6237. <div style="
  6238. width: 100%;
  6239. display: flex;
  6240. flex-direction: row;
  6241. flex-wrap: nowrap;
  6242. align-items: center;
  6243. justify-content: center;
  6244. ">
  6245. <div style="min-width: fit-content">文件名称:</div>
  6246. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6247. </div>
  6248. <span slot="footer" class="dialog-footer">
  6249. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6250. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6251. </span>
  6252. </el-dialog>
  6253. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6254. closePan(69);
  6255. }
  6256. " class="dialog_diy fullStyle fullStyle1">
  6257. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6258. <span slot="footer" class="dialog-footer">
  6259. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6260. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6261. </span>
  6262. </el-dialog>
  6263. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6264. :before-close="handleClose" class="dialog_diy">
  6265. <div class="template_box">
  6266. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6267. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6268. <div class="wordPic">
  6269. <img src="../../../assets/icon/new/course_template.png" alt />
  6270. </div>
  6271. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6272. <div style="
  6273. margin-top: 10px;
  6274. line-height: 19px;
  6275. overflow: hidden;
  6276. text-overflow: ellipsis;
  6277. white-space: nowrap;
  6278. padding: 0 10px;
  6279. box-sizing: border-box;
  6280. width: 100%;
  6281. ">
  6282. {{ aa.title }}
  6283. </div>
  6284. </el-tooltip>
  6285. </div>
  6286. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6287. :class="{ wordTeacherA: ctJson.id == 1 }">
  6288. <div class="wordPic">
  6289. <img src="../../../assets/icon/new/course_template.png" alt />
  6290. </div>
  6291. <div style="
  6292. margin-top: 10px;
  6293. line-height: 19px;
  6294. overflow: hidden;
  6295. text-overflow: ellipsis;
  6296. white-space: nowrap;
  6297. padding: 0 20px;
  6298. ">
  6299. 简易模板
  6300. </div>
  6301. </div>
  6302. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6303. :class="{ wordTeacherA: ctJson.id == 2 }">
  6304. <div class="wordPic">
  6305. <img src="../../../assets/icon/new/course_template.png" alt />
  6306. </div>
  6307. <div style="
  6308. margin-top: 10px;
  6309. line-height: 19px;
  6310. overflow: hidden;
  6311. text-overflow: ellipsis;
  6312. white-space: nowrap;
  6313. padding: 0 20px;
  6314. ">
  6315. 智能粘贴模式
  6316. </div>
  6317. </div>
  6318. </div>
  6319. <span slot="footer" class="dialog-footer">
  6320. <el-button @click="templateDialog = false">取 消</el-button>
  6321. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6322. </span>
  6323. </el-dialog>
  6324. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6325. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6326. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6327. <div class="change_stageBox">
  6328. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6329. <div class="nt_taskBox">
  6330. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6331. <div class="nt_taskName">
  6332. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6333. <span>{{ t.dyName }}</span>
  6334. </el-tooltip>
  6335. </div>
  6336. </div>
  6337. <div class="moveBtn" v-if="unitJson3.length > 1">
  6338. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6339. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6340. </div>
  6341. </div>
  6342. </div>
  6343. <span slot="footer" class="dialog-footer">
  6344. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6345. <el-button type="primary" @click="updateChange">确定</el-button>
  6346. </span>
  6347. </el-dialog>
  6348. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6349. :before-close="handleClose" class="dialog_diy">
  6350. <div class="addTypeChoose" style="justify-content: center">
  6351. <div style="min-width: 100px">模板名称:</div>
  6352. <el-input v-model="templateName" style="width: 200px"></el-input>
  6353. </div>
  6354. <div class="addTypeBox">
  6355. <div class="addTypeChoose">
  6356. <div style="min-width: 100px">选择一级分类:</div>
  6357. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6358. style="width: 200px">
  6359. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6360. </el-option>
  6361. </el-select>
  6362. </div>
  6363. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6364. <div style="min-width: 100px">选择二级分类:</div>
  6365. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6366. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6367. </el-option>
  6368. </el-select>
  6369. </div>
  6370. </div>
  6371. <span slot="footer" class="dialog-footer">
  6372. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6373. <el-button @click="close()">关 闭</el-button>
  6374. </span>
  6375. </el-dialog>
  6376. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6377. </evaBox>
  6378. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6379. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6380. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" @aiConfirm="aiConfirm" :clickType="clickType">
  6381. </aiDialog>
  6382. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6383. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6384. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6385. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6386. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6387. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6388. </div>
  6389. </template>
  6390. <script>
  6391. import "../../../common/aws-sdk-2.235.1.min.js";
  6392. import { tools as toolsData } from "../../../common/tools.js";
  6393. // import "../../../common/aws-sdk-2.99.0.min.js";
  6394. import $ from "jquery";
  6395. import EditorBar from "../../../components/tools/wangEnduit";
  6396. import Table from "../../../components/tools/table";
  6397. import Mind from "../../tools/jsmind2";
  6398. import Time from "../../tools/time.vue";
  6399. import Sunburst from "../../tools/sunburst";
  6400. import SeeBoard from "../../tools/seeBoard";
  6401. import weilaiData from "../components/weilai.js";
  6402. import sourceDialog from "../teacherSource/dialog.vue";
  6403. import interVideo from "../interVideo/index.vue";
  6404. import englishRight from "../components/englishRight.vue";
  6405. import evaBox from "../evaBox/index.vue";
  6406. import EnglishVoice from "../EnglishVoice/index.vue";
  6407. import aiBox from './aiBox.vue'
  6408. import aiDialog from './aiDialog'
  6409. import aiTips from './aiTips.vue'
  6410. import tipsDialog from './tipsDialog.vue'
  6411. import { v4 as uuidv4 } from "uuid";
  6412. import MarkdownIt from "markdown-it";
  6413. import aiCreateDialog from './aiCreateDialog.vue'
  6414. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6415. import wpdf from "../test/file/wPdf2.vue";
  6416. import wOffice from "../test/file/wOffice.vue";
  6417. var OpenCC = require("opencc-js");
  6418. let converter = OpenCC.Converter({
  6419. from:'hk',
  6420. to:'cn'
  6421. })
  6422. export default {
  6423. components: {
  6424. EditorBar,
  6425. Mind,
  6426. Time,
  6427. Sunburst,
  6428. SeeBoard,
  6429. Table,
  6430. sourceDialog,
  6431. interVideo,
  6432. englishRight,
  6433. evaBox,
  6434. EnglishVoice,
  6435. aiBox,
  6436. aiDialog,
  6437. aiTips,
  6438. tipsDialog,
  6439. aiCreateDialog,
  6440. aiCreateVideoDialog,
  6441. wpdf,
  6442. wOffice,
  6443. },
  6444. data() {
  6445. return {
  6446. checkAll: false,
  6447. checkAll2: false,
  6448. chooseType: 1,
  6449. checkedCities: [],
  6450. isIndeterminate: true,
  6451. isIndeterminate2: true,
  6452. isSysPic: false,
  6453. isSysPic2: false,
  6454. steps: 1,
  6455. stepsNav: 1,
  6456. nbOrder: 0,
  6457. courseId: "",
  6458. chapToolsType: 0,
  6459. chapTools: [
  6460. {
  6461. tools: [],
  6462. toolDetail: "",
  6463. },
  6464. ],
  6465. line: "",
  6466. lineTitle: "",
  6467. sysPic: [],
  6468. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6469. sentenceList2: [],
  6470. isPushTitleList: [],
  6471. lineCount: 0,
  6472. lineType: 0,
  6473. chapCount: 0,
  6474. courseName: "",
  6475. isTeacherSee: false,
  6476. courseText: "",
  6477. textLoading: false,
  6478. ttextLoading: false,
  6479. courseText2: "",
  6480. preTime: 0,
  6481. formLabelWidth: "100px",
  6482. choosePicVisible: false,
  6483. sysPicVisible: false,
  6484. sysPicVisible2: false,
  6485. uploadLoading1: false,
  6486. noneBtnImg: false,
  6487. updateBoolean2: false,
  6488. unitIndex: 0,
  6489. taskCount: 0,
  6490. dialogVisible: false,
  6491. dialogVisible1: false,
  6492. dialogVisible2: false,
  6493. dialogVisible3: false,
  6494. dialogVisible4: false,
  6495. dialogVisible5: false,
  6496. dialogVisible6: false,
  6497. dialogVisible7: false,
  6498. dialogVisible8: false,
  6499. dialogVisible9: false,
  6500. dialogVisibleClass: false,
  6501. dialogVisibleMember: false,
  6502. dialogVisibleMp3: false,
  6503. dialogVisibleSelect: false,
  6504. dialogVisibleSentence: false,
  6505. dialogVisibleRate: false,
  6506. dialogVisibleChoice: false,
  6507. dialogVisiblemb: false,
  6508. dialogVisibleInvite: false,
  6509. dialogVisibleSource: false,
  6510. dialogVisibleVideo: false,
  6511. dialogVisibleStageChange: false,
  6512. dialogVisibleupdataVideoT: false,
  6513. englishDialogVisible: false,
  6514. templateDialog: false,
  6515. ctJson: {},
  6516. isClickColor: 1,
  6517. toolIndexType: "",
  6518. publicTool: 0,
  6519. searchPeople: "",
  6520. searchTN: "",
  6521. collid: '',
  6522. CollLoading: false,
  6523. userid: this.$route.query.userid,
  6524. oid: this.$route.query.oid,
  6525. org: this.$route.query.org,
  6526. role: this.$route.query.role,
  6527. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6528. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6529. dialogVisibleTable: false,
  6530. dialogVisibleWord: false,
  6531. tableJson: { text: "" },
  6532. wordJson: { text: "" },
  6533. dialogVisibleMoreUpload: false,
  6534. dialogVisiblePreTime: false,
  6535. uploadJson: [],
  6536. classJuri: [],
  6537. gradeList: [],
  6538. cover: [], //课程封面
  6539. myWord: [],
  6540. evaJuri: [],
  6541. evalua: "",
  6542. targetArray: [],
  6543. eTitle: "",
  6544. eJson: {},
  6545. fid: "", //一级
  6546. sid: "", //二级
  6547. tid: "", //二级
  6548. typeMode: 3,
  6549. eJSONNum: 0,
  6550. data: {
  6551. meta: {
  6552. name: "example",
  6553. author: "dd@163.com",
  6554. version: "0.2",
  6555. },
  6556. format: "node_array",
  6557. data: [{ id: "root", isroot: true, topic: "" }],
  6558. },
  6559. askJson: {
  6560. askCount: 1,
  6561. askTitle: "",
  6562. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6563. },
  6564. askJson2: {},
  6565. testJson: {},
  6566. testJson2: {},
  6567. selectJson: {},
  6568. selectJson2: {},
  6569. rateJson: [],
  6570. unitJson2: [],
  6571. unitJson3: [],
  6572. unitJson: [
  6573. {
  6574. dyName: "", //单元标题
  6575. chapterInfo: [
  6576. {
  6577. isread: false,
  6578. chapterid: this.guid(),
  6579. title: "",
  6580. courseName: "",
  6581. taskJson: [
  6582. {
  6583. task: "",
  6584. taskDetail: "",
  6585. chapterData: [],
  6586. toolText: "",
  6587. toolChoose: [
  6588. {
  6589. tool: [],
  6590. toolDetail: "",
  6591. toolType: 0,
  6592. askCount: 1,
  6593. askTitle: "",
  6594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6595. },
  6596. ],
  6597. isShowTools: false,
  6598. askCount: 1,
  6599. isFold: 1,
  6600. askTitle: "",
  6601. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6602. checkJson: [{ checkCount: [], checkPerent: [] }],
  6603. homeworkList: [],
  6604. },
  6605. ],
  6606. itemCount: 1,
  6607. fileList1: [],
  6608. video: [],
  6609. testData: [],
  6610. pData: [],
  6611. templateArray: [],
  6612. },
  6613. ],
  6614. },
  6615. ],
  6616. templateArray: [],
  6617. studentJuri: [],
  6618. teacherJuri: [],
  6619. CollaborativeTeaList: [],
  6620. checkboxList: [],
  6621. checkboxList2: [],
  6622. checkboxList3: [],
  6623. classSearch: "",
  6624. gradeId: "",
  6625. number: "",
  6626. tTitle: "",
  6627. tdetail: "",
  6628. templateC: {},
  6629. AttText: {},
  6630. AttTextType: 0,
  6631. AttTextIndex: 0,
  6632. cTemplate: "",
  6633. CourseType: [],
  6634. CourseType1: [],
  6635. CourseType2: [],
  6636. CourseTypeJson: {},
  6637. CourseTypeJson1: {},
  6638. courseTypeId: [],
  6639. courseTypeId1: [],
  6640. courseTypeSon: [],
  6641. clearArray: [],
  6642. pTypeCheck: [],
  6643. pTypeCheckName: [],
  6644. loading: false,
  6645. toolType: 0,
  6646. inputShow: true,
  6647. inputShow2: true,
  6648. toolIndex: 0,
  6649. cidType: 0,
  6650. answerQ: "",
  6651. answerQ2: "",
  6652. grade: [],
  6653. grade2: [],
  6654. courseUserid: "",
  6655. timer: null,
  6656. timer2: null,
  6657. pasteTimer: null,
  6658. checkId: "",
  6659. isDelete: 1,
  6660. addindex: 0,
  6661. selectSteps: 1,
  6662. groupJson: {},
  6663. dialogVisibleGroup: false,
  6664. rightBoxHeight: 0,
  6665. ManAarray: [],
  6666. checkBoolean: false,
  6667. inviteCode: [],
  6668. inviteId: "",
  6669. icode: "",
  6670. easyArray: [2, 4],
  6671. sourceData: {},
  6672. updateSourcePan: false,
  6673. videoJson: {},
  6674. isBtnDisplay: false,
  6675. isStepDisplay: false,
  6676. isPasteStage: false,
  6677. isPasteTask: false,
  6678. isPasteChoice: false,
  6679. imageList: [],
  6680. imageloading: false,
  6681. imageloading2: false,
  6682. searchImageValue: "",
  6683. ppage: 1,
  6684. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  6685. oldIndex: 0,
  6686. dragType: "",
  6687. oldUnitIndex: 0,
  6688. oldData: null,
  6689. newIndex: "",
  6690. englishList: {},
  6691. typeIndex: "",
  6692. courseState: 5,
  6693. taskJSONa: [
  6694. {
  6695. task: "",
  6696. taskDetail: "",
  6697. chapterData: [],
  6698. toolText: "",
  6699. toolChoose: [
  6700. {
  6701. tool: [],
  6702. toolDetail: "",
  6703. toolType: 0,
  6704. askCount: 1,
  6705. askTitle: "",
  6706. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6707. },
  6708. ],
  6709. isShowTools: false,
  6710. askCount: 1,
  6711. isFold: 1,
  6712. askTitle: "",
  6713. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6714. checkJson: [{ checkCount: [], checkPerent: [] }],
  6715. homeworkList: [],
  6716. },
  6717. ],
  6718. checkUnitIndex: 0,
  6719. isdrag: "",
  6720. evaIndex: "",
  6721. evatIndex: "",
  6722. evaBoxDialog: false,
  6723. EnglishVoiceDialog: false,
  6724. englishVoiceJson: {},
  6725. cetIndex: "",
  6726. cettIndex: "",
  6727. cetBoxDialog: false,
  6728. templateName: "",
  6729. setTypeJson: {
  6730. one: "",
  6731. two: "",
  6732. },
  6733. twoJson: [],
  6734. oneJson: [],
  6735. updateKey: 1,
  6736. isOutline: false,
  6737. isOutline2: false,
  6738. infoData: [],
  6739. infoproVisible: false,
  6740. infoisFinishSize: 0,
  6741. infoisAllSize: 0,
  6742. infoprogress: 0,
  6743. taskDetailLoading: [],
  6744. ttaskDetailLoading: [],
  6745. taskDetailLoading2: [],
  6746. ttaskDetailLoading2: [],
  6747. taskDetailLoading3: [],
  6748. ttaskDetailLoading3: [],
  6749. taskDetailLoading4: [],
  6750. taskDetailLoading5: [],
  6751. ttaskDetailLoading5: [],
  6752. dArray: [],
  6753. dialogVisibleAiD: false,
  6754. aitype: "",
  6755. aiJson: {
  6756. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  6757. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  6758. "aiTask": "请根据<教学任务教案>。",
  6759. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  6760. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  6761. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  6762. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  6763. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  6764. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  6765. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  6766. },
  6767. aiText: "",
  6768. aiText2: "",
  6769. aiCallBack: "",
  6770. aiIndex: "",
  6771. clickType: 1,
  6772. promptShow: false,
  6773. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  6774. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  6775. dialogVisibleTips: false,
  6776. tipsJson: {},
  6777. cpote:{
  6778. cpote1: '',
  6779. cpote2: '',
  6780. cpote3: '',
  6781. cpote4: '',
  6782. },
  6783. cpoteLoading:{
  6784. cpote1: false,
  6785. cpote2: false,
  6786. cpote3: false,
  6787. cpote4: false,
  6788. },
  6789. cpotetLoading:{
  6790. cpote1: false,
  6791. cpote2: false,
  6792. cpote3: false,
  6793. cpote4: false,
  6794. },
  6795. cpoteType: 0,
  6796. dialogVisibleAiCreate: false,
  6797. dialogVisibleAiCreateVideo: false,
  6798. teacherText: [],
  6799. isFileSearch: true,
  6800. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  6801. templatePan: ['0e7966d6-1e49-11ef-bee5-005056b86db5','60d153e3-1e49-11ef-bee5-005056b86db5','7f3e28b7-1e66-11ef-bee5-005056b86db5','9dd4bb76-1e48-11ef-bee5-005056b86db5','ab317f23-1e66-11ef-bee5-005056b86db5'],
  6802. courseJie:1,
  6803. courseTime:45,
  6804. allTextArray: [],
  6805. dialogVisiblePdf: false,
  6806. dialogVisibleOffice: false,
  6807. wurl: "",
  6808. choiceLoading: false,
  6809. teacherInfoData: [],
  6810. teacherinfoproVisible: false,
  6811. teacherinfoisFinishSize: 0,
  6812. teacherinfoisAllSize: 0,
  6813. teacherinfoprogress: 0,
  6814. teacherCourseText: "",
  6815. teacherTextLoading: false,
  6816. tteacherTextLoading: false,
  6817. targetCourseText: "",
  6818. targetTextLoading: false,
  6819. ttargetTextLoading: false,
  6820. cankaoInfoData: [],
  6821. fileSLoading: false,
  6822. infoData2: [],
  6823. isuseT: false,
  6824. mode: 1,
  6825. targetCourseText2: "",
  6826. targetTextLoading2: false,
  6827. ttargetTextLoading2: false,
  6828. courseTextBool: false,
  6829. teacherCourseTextB: true,
  6830. targetCourseTextB: true,
  6831. courseTextB: true,
  6832. targetCourseText2B: true,
  6833. // yiKeTemplateArray:['cf5722a4-401b-11ef-b873-005056b86db5','cf5722a4-401b-11ef-b873-005056b86dc4','cf5722a4-401b-11ef-b873-005056b86dc3','cf5722a4-401b-11ef-b873-005056b86dc5','9dd4bb76-1e48-11ef-bee5-005056b86dc4'],
  6834. yiKeTemplateArray:[],
  6835. taskLoading: [],
  6836. ruleLoading: [],
  6837. };
  6838. },
  6839. directives: {
  6840. autoHeight: {
  6841. update(el, binding) {
  6842. const { value } = binding;
  6843. if (value && typeof value === "number") {
  6844. el.style.height = `${value}px`;
  6845. } else {
  6846. el.style.height = "auto";
  6847. }
  6848. },
  6849. componentUpdated(el) {
  6850. el.style.height = `${el.scrollHeight + 25}px`;
  6851. },
  6852. },
  6853. },
  6854. computed: {
  6855. // rightBoxHeight: function () {
  6856. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  6857. // },
  6858. offsetLetfPx: function () {
  6859. //addnum可以直接在模板语法里面用,相当于data内的值
  6860. return (
  6861. $(".cru_select")[this.unitIndex] &&
  6862. $(".cru_select")[this.unitIndex].offsetLeft + 5
  6863. );
  6864. },
  6865. getMan2() {
  6866. return function (people) {
  6867. let _people = people;
  6868. let _people2 = "";
  6869. if (this.ManAarray.length) {
  6870. for (var i = 0; i < this.ManAarray.length; i++) {
  6871. if (this.ManAarray[i].userid == people) {
  6872. _people2 = this.ManAarray[i].name;
  6873. break;
  6874. }
  6875. }
  6876. }
  6877. if (people == this.courseUserid) {
  6878. return "";
  6879. }
  6880. return this.ManAarray.length ? _people2 : "";
  6881. };
  6882. },
  6883. getListMan2() {
  6884. return function (list) {
  6885. let _people2 = [];
  6886. if (this.ManAarray.length) {
  6887. for (var j = 0; j < list.length; j++) {
  6888. let people = list[j];
  6889. for (var i = 0; i < this.ManAarray.length; i++) {
  6890. if (
  6891. this.ManAarray[i].userid == people &&
  6892. people != this.courseUserid
  6893. ) {
  6894. _people2.push(this.ManAarray[i].name);
  6895. break;
  6896. }
  6897. }
  6898. }
  6899. }
  6900. return this.ManAarray.length ? _people2.join("、") : "";
  6901. };
  6902. },
  6903. isInvite() {
  6904. return function (cid) {
  6905. let array = [];
  6906. for (var i = 0; i < this.inviteCode.length; i++) {
  6907. array.push(this.inviteCode[i].cid);
  6908. }
  6909. return array.indexOf(cid) != -1;
  6910. };
  6911. },
  6912. getInviteCodeC() {
  6913. return function (cid) {
  6914. let array = [];
  6915. for (var i = 0; i < this.inviteCode.length; i++) {
  6916. array.push(this.inviteCode[i].cid);
  6917. }
  6918. return this.inviteCode[array.indexOf(cid)].ic;
  6919. };
  6920. },
  6921. getClassC() {
  6922. return function (c) {
  6923. let _c2 = "";
  6924. if (this.grade.length) {
  6925. for (var i = 0; i < this.grade.length; i++) {
  6926. if (this.grade[i].id == c) {
  6927. _c2 = this.grade[i].name;
  6928. break;
  6929. }
  6930. }
  6931. }
  6932. return this.grade.length ? _c2 : "";
  6933. };
  6934. },
  6935. getListClassC() {
  6936. return function (list) {
  6937. let _c2 = [];
  6938. if (this.grade.length) {
  6939. for (var j = 0; j < list.length; j++) {
  6940. let c = list[j];
  6941. for (var i = 0; i < this.grade.length; i++) {
  6942. if (this.grade[i].id == c) {
  6943. _c2.push(this.grade[i].name);
  6944. break;
  6945. }
  6946. }
  6947. }
  6948. }
  6949. return this.grade.length ? _c2.join("、") : "";
  6950. };
  6951. },
  6952. MarkdownT() {
  6953. return function (c) {
  6954. let md = new MarkdownIt();
  6955. return c
  6956. ? md.render(c) : "";
  6957. };
  6958. },
  6959. panOutline(){
  6960. return function () {
  6961. let count = 0;
  6962. for(var i = 0; i < this.unitJson.length; i++){
  6963. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6964. for(var j = 0; j < _task.length; j++){
  6965. if(_task[j].taskDetail2){
  6966. count++
  6967. }
  6968. }
  6969. }
  6970. return count;
  6971. };
  6972. },
  6973. panTeacher(){
  6974. return function () {
  6975. let count = 0;
  6976. for(var i = 0; i < this.unitJson.length; i++){
  6977. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6978. for(var j = 0; j < _task.length; j++){
  6979. if(_task[j].taskDetail3){
  6980. count++
  6981. }
  6982. }
  6983. }
  6984. return count;
  6985. };
  6986. },
  6987. dataCheckPan(){
  6988. return function (fileid) {
  6989. for(let i = 0; i < this.infoData.length; i++){
  6990. if(this.infoData[i].fileid == fileid){
  6991. return true
  6992. }
  6993. }
  6994. return false;
  6995. };
  6996. }
  6997. },
  6998. watch: {
  6999. unitIndex(newValue, oldValue) {
  7000. // return;
  7001. if (this.isDelete == 2) {
  7002. this.isDelete = 1;
  7003. return;
  7004. }
  7005. if (this.cid != "") {
  7006. let _unitIndex = oldValue;
  7007. if (
  7008. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7009. JSON.stringify(this.unitJson[_unitIndex])
  7010. ) {
  7011. this.$refs.rightboxR.scrollTop = 0;
  7012. return;
  7013. }
  7014. let cPan = 1;
  7015. for (
  7016. var j = 0;
  7017. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7018. j++
  7019. ) {
  7020. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7021. j
  7022. ].proVisible = false;
  7023. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7024. j
  7025. ].proVisible2 = false;
  7026. if (
  7027. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7028. .length > 1
  7029. ) {
  7030. for (
  7031. var z = 0;
  7032. z <
  7033. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7034. .length;
  7035. z++
  7036. ) {
  7037. if (
  7038. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7039. .toolChoose[z].tool.length
  7040. ) {
  7041. this.$message.error("请把工具添加完整");
  7042. cPan = 2;
  7043. break;
  7044. }
  7045. }
  7046. }
  7047. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7048. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7049. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7050. (ele) => {
  7051. return ele.value != "";
  7052. }
  7053. );
  7054. }
  7055. }
  7056. if (cPan == 2) {
  7057. this.unitIndex = oldValue;
  7058. return;
  7059. }
  7060. for (var i = 0; i < this.unitJson.length; i++) {
  7061. if (this.addindex != i) {
  7062. delete this.unitJson[i].isUpdate;
  7063. }
  7064. }
  7065. this.$refs.rightboxR.scrollTop = 0;
  7066. this.addindex = -1;
  7067. let params = [
  7068. {
  7069. cid: this.cid,
  7070. chapters: JSON.stringify(this.unitJson),
  7071. uid: this.userid,
  7072. unitIndex: _unitIndex,
  7073. },
  7074. ];
  7075. this.ajax
  7076. .post(this.$store.state.api + "updateWorkNew4", params)
  7077. .then((res) => {
  7078. // this.$message({
  7079. // message: "修改成功",
  7080. // type: "success",
  7081. // });
  7082. // this.courseId = this.cid;
  7083. this.addtips()
  7084. })
  7085. .catch((err) => {
  7086. this.$message.error("网络不佳");
  7087. console.error(err);
  7088. });
  7089. }
  7090. },
  7091. steps(newValue, old) {
  7092. if (newValue == 4) {
  7093. let cPan = 1;
  7094. for (var i = 0; i < this.unitJson.length; i++) {
  7095. for (
  7096. var j = 0;
  7097. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7098. j++
  7099. ) {
  7100. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7101. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7102. if (
  7103. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7104. ) {
  7105. for (
  7106. var z = 0;
  7107. z <
  7108. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7109. z++
  7110. ) {
  7111. if (
  7112. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7113. .tool.length
  7114. ) {
  7115. this.$message.error("请把工具添加完整");
  7116. cPan = 2;
  7117. break;
  7118. }
  7119. }
  7120. }
  7121. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7122. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7123. i
  7124. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7125. return ele.value != "";
  7126. });
  7127. }
  7128. }
  7129. }
  7130. this.inputShow = true;
  7131. if (cPan == 2) {
  7132. this.steps = old;
  7133. return;
  7134. }
  7135. this.goTo(
  7136. "/course?userid=" +
  7137. this.userid +
  7138. "&oid=" +
  7139. this.oid +
  7140. "&org=" +
  7141. this.org +
  7142. "&role=" +
  7143. this.role
  7144. );
  7145. }
  7146. },
  7147. },
  7148. methods: {
  7149. tableRowClassName({ row, rowIndex }) {
  7150. if ((rowIndex + 1) % 2 === 0) {
  7151. return "even_row";
  7152. } else {
  7153. return "";
  7154. }
  7155. },
  7156. close() {
  7157. this.cetIndex = "";
  7158. this.cettIndex = "";
  7159. this.templateName = "";
  7160. this.cetBoxDialog = false;
  7161. },
  7162. openAI() {
  7163. top.postMessage({ tools: "64" }, "*");
  7164. },
  7165. setMan() {
  7166. // let teacherJuri = this.teacherJuri2;
  7167. this.ManAarray = [];
  7168. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7169. if (_user.indexOf(this.userid) == -1) {
  7170. _user.push(this.userid);
  7171. }
  7172. if (_user.indexOf(this.courseUserid) == -1) {
  7173. _user.push(this.courseUserid);
  7174. }
  7175. let params = {
  7176. uid: _user.join(","),
  7177. };
  7178. this.ajax
  7179. .get(this.$store.state.api + "getAllUserById", params)
  7180. .then((res) => {
  7181. let teacherJuri = res.data[0];
  7182. this.ManAarray = teacherJuri;
  7183. })
  7184. .catch((err) => {
  7185. console.error(err);
  7186. });
  7187. },
  7188. previewImg(url) {
  7189. this.$hevueImgPreview(url);
  7190. },
  7191. btnDisplay(bool) {
  7192. this.isBtnDisplay = bool;
  7193. },
  7194. stepDisplay(bool) {
  7195. this.isStepDisplay = bool;
  7196. },
  7197. scrollChange() {
  7198. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7199. },
  7200. addHw(e) {
  7201. var el = e.currentTarget;
  7202. el.getElementsByTagName("input")[0].click();
  7203. },
  7204. change(val) {
  7205. if (this.dialogVisible1) {
  7206. this.tdetail = val;
  7207. } else if (this.dialogVisible6) {
  7208. this.AttText.text = val;
  7209. } else if (this.dialogVisible2) {
  7210. this.cTemplate = val;
  7211. } else if (this.dialogVisibleTable) {
  7212. this.tableJson.text = val;
  7213. }
  7214. this.$forceUpdate();
  7215. console.log(val);
  7216. },
  7217. change2(val) {
  7218. console.log(val);
  7219. this.$forceUpdate();
  7220. },
  7221. handleClose(done) {
  7222. done();
  7223. },
  7224. closePan(tool) {
  7225. if (tool == 15) {
  7226. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7227. this.dialogVisible8 = false;
  7228. } else {
  7229. this.closeConfirm(tool);
  7230. }
  7231. } else if (tool == 4) {
  7232. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7233. this.dialogVisible5 = false;
  7234. } else {
  7235. this.closeConfirm(tool);
  7236. }
  7237. } else if (tool == 45) {
  7238. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7239. this.dialogVisibleChoice = false;
  7240. } else {
  7241. this.closeConfirm(tool);
  7242. }
  7243. } else if (tool == 41) {
  7244. if (
  7245. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7246. ) {
  7247. this.dialogVisibleSelect = false;
  7248. } else {
  7249. this.closeConfirm(tool);
  7250. }
  7251. } else if (tool == 47) {
  7252. if (
  7253. JSON.stringify(this.sentenceList) ==
  7254. JSON.stringify(this.sentenceList2)
  7255. ) {
  7256. this.dialogVisibleSentence = false;
  7257. } else {
  7258. this.closeConfirm(tool);
  7259. }
  7260. } else if (tool == 69) {
  7261. if (
  7262. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7263. ) {
  7264. this.englishDialogVisible = false;
  7265. } else {
  7266. this.closeConfirm(tool);
  7267. }
  7268. }
  7269. },
  7270. closeConfirm(tool) {
  7271. this.$confirm("是否保存已编辑内容?", "提示", {
  7272. confirmButtonText: "保存",
  7273. cancelButtonText: "不保存",
  7274. type: "warning",
  7275. })
  7276. .then(() => {
  7277. if (tool == 15) {
  7278. this.addAnswer();
  7279. } else if (tool == 4) {
  7280. this.addAsk();
  7281. } else if (tool == 45) {
  7282. this.addTest();
  7283. } else if (tool == 41) {
  7284. this.addSelectAnswer();
  7285. } else if (tool == 47) {
  7286. this.addSentenceTool();
  7287. } else if (tool == 69) {
  7288. this.addEnglish();
  7289. }
  7290. })
  7291. .catch(() => {
  7292. if (tool == 15) {
  7293. this.dialogVisible8 = false;
  7294. } else if (tool == 4) {
  7295. this.dialogVisible5 = false;
  7296. } else if (tool == 45) {
  7297. this.dialogVisibleChoice = false;
  7298. } else if (tool == 41) {
  7299. this.dialogVisibleSelect = false;
  7300. } else if (tool == 47) {
  7301. this.dialogVisibleSentence = false;
  7302. } else if (tool == 69) {
  7303. this.englishDialogVisible = false;
  7304. }
  7305. });
  7306. },
  7307. addEnglish(jsonType) {
  7308. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7309. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7310. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7311. if (
  7312. this.englishList.engTitle == "" ||
  7313. this.englishList.englishText == ""
  7314. ) {
  7315. this.$message.error("请将内容填写完整!");
  7316. return;
  7317. }
  7318. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7319. this.taskCount
  7320. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7321. this.englishList = {};
  7322. if (jsonType && jsonType == 1) {
  7323. this.englishDialogVisible = true;
  7324. } else {
  7325. this.englishDialogVisible = false;
  7326. }
  7327. if (
  7328. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7329. .toolChoose[this.toolIndex].tool != 69
  7330. ) {
  7331. this.addTools(69, this.taskCount, this.toolIndex);
  7332. }
  7333. },
  7334. imgChange2(i, j) {
  7335. var _tmp = this.testJson.testJson[i].checkList[j];
  7336. this.noneBtnImg = _tmp.length >= 1;
  7337. },
  7338. imgChange3(i) {
  7339. var _tmp = this.testJson.testJson[i];
  7340. this.noneBtnImg = _tmp.length >= 1;
  7341. },
  7342. imgChange1(file, fileList, type, itemTaskIndex) {
  7343. if (type == 1) {
  7344. var _tmp = this.cover;
  7345. } else if (
  7346. type == 2 ||
  7347. type == 3 ||
  7348. type == 6 ||
  7349. type == 7 ||
  7350. type == 8
  7351. ) {
  7352. var _tmp =
  7353. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7354. .chapterData;
  7355. } else if (type == 4) {
  7356. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7357. } else {
  7358. var _tmp =
  7359. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7360. .homeworkList;
  7361. }
  7362. this.noneBtnImg = _tmp.length >= 1;
  7363. },
  7364. goTo(path) {
  7365. this.$router.push(path);
  7366. },
  7367. guid() {
  7368. var _num,
  7369. i,
  7370. _guid = "";
  7371. for (i = 0; i < 32; i++) {
  7372. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7373. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7374. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7375. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7376. _guid += "-";
  7377. }
  7378. }
  7379. return _guid;
  7380. },
  7381. retrunCourse() {
  7382. if(this.istemplate == 1){
  7383. this.goTo(
  7384. "/course?userid=" +
  7385. this.userid +
  7386. "&oid=" +
  7387. this.oid +
  7388. "&org=" +
  7389. this.org +
  7390. "&role=" +
  7391. this.role
  7392. );
  7393. return
  7394. }
  7395. this.$confirm("是否保存已编辑内容?", "提示", {
  7396. confirmButtonText: "保存",
  7397. cancelButtonText: "不保存",
  7398. distinguishCancelAndClose: true,
  7399. type: "warning",
  7400. })
  7401. .then(() => {
  7402. if (this.taskLoading.length) {
  7403. let _pan = 1
  7404. for(var k = 0; k < this.taskLoading.length; k++){
  7405. if(this.taskLoading[k]){
  7406. this.$message({
  7407. message: `请等待任务${k+1}回答完毕后再保存`,
  7408. type: "warning"
  7409. });
  7410. _pan = 2
  7411. }
  7412. }
  7413. if(_pan == 2){
  7414. return
  7415. }
  7416. }
  7417. if (this.cid == "" || this.cid == undefined) {
  7418. if (this.courseName == "") {
  7419. this.$message.error("请补充填写课程名称");
  7420. return;
  7421. } else {
  7422. this.addWork();
  7423. }
  7424. this.steps = 4;
  7425. } else {
  7426. if (this.courseName == "") {
  7427. this.$message.error("请补充填写课程名称");
  7428. return;
  7429. } else {
  7430. if (this.userid != this.courseUserid && this.role != "1") {
  7431. this.updateWork2();
  7432. } else {
  7433. this.updateWork();
  7434. }
  7435. this.steps = 4;
  7436. }
  7437. }
  7438. })
  7439. .catch((v) => {
  7440. console.log(v);
  7441. if (v == "cancel") {
  7442. this.goTo(
  7443. "/course?userid=" +
  7444. this.userid +
  7445. "&oid=" +
  7446. this.oid +
  7447. "&org=" +
  7448. this.org +
  7449. "&role=" +
  7450. this.role
  7451. );
  7452. }
  7453. });
  7454. },
  7455. lastSteps() {
  7456. if (this.steps == 4) {
  7457. this.goTo(
  7458. "/course?userid=" +
  7459. this.userid +
  7460. "&oid=" +
  7461. this.oid +
  7462. "&org=" +
  7463. this.org +
  7464. "&role=" +
  7465. this.role
  7466. );
  7467. } else {
  7468. // if (this.cidType == 0) {
  7469. // this.steps--;
  7470. // if (this.steps == 1) {
  7471. // setTimeout(() => {
  7472. // this.checkEva(this.checkId);
  7473. // setTimeout(() => {
  7474. // this.checkEva(this.checkId);
  7475. // }, 100);
  7476. // }, 100);
  7477. // }
  7478. // } else {
  7479. if (this.steps == 3) {
  7480. this.steps = 1;
  7481. setTimeout(() => {
  7482. this.checkEva(this.checkId);
  7483. setTimeout(() => {
  7484. this.checkEva(this.checkId);
  7485. }, 100);
  7486. }, 100);
  7487. }
  7488. // }
  7489. }
  7490. },
  7491. navSteps(s) {
  7492. if (this.courseName == "") {
  7493. this.$message.error("请补充填写课程名称");
  7494. return;
  7495. }
  7496. if (this.cidType == 0) {
  7497. if (this.steps == 1) {
  7498. if (this.cid == "" || this.cid == undefined) {
  7499. this.addWork();
  7500. } else {
  7501. if (this.userid != this.courseUserid && this.role != "1") {
  7502. this.updateWork2();
  7503. } else {
  7504. this.updateWork();
  7505. }
  7506. }
  7507. }
  7508. if (s == 1) {
  7509. this.steps = 1;
  7510. setTimeout(() => {
  7511. this.checkEva(this.checkId);
  7512. setTimeout(() => {
  7513. this.checkEva(this.checkId);
  7514. }, 100);
  7515. }, 100);
  7516. }
  7517. if (s == 2) {
  7518. this.steps = 2;
  7519. }
  7520. if (s == 3) {
  7521. this.cTemplate = this.templateC.content;
  7522. this.dialogVisible2 = false;
  7523. this.steps = 3;
  7524. this.isClickColor = 1;
  7525. this.unitJson[
  7526. this.unitIndex
  7527. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7528. this.$forceUpdate();
  7529. setTimeout(() => {
  7530. this.checkEva(this.checkId);
  7531. setTimeout(() => {
  7532. this.checkEva(this.checkId);
  7533. }, 100);
  7534. }, 1000);
  7535. }
  7536. } else {
  7537. if (this.steps == 1) {
  7538. if (this.cid == "" || this.cid == undefined) {
  7539. this.addWork();
  7540. } else {
  7541. if (this.userid != this.courseUserid && this.role != "1") {
  7542. this.updateWork2();
  7543. } else {
  7544. this.updateWork();
  7545. }
  7546. }
  7547. }
  7548. if (s == 1) {
  7549. this.steps = 1;
  7550. setTimeout(() => {
  7551. this.checkEva(this.checkId);
  7552. setTimeout(() => {
  7553. this.checkEva(this.checkId);
  7554. }, 100);
  7555. }, 100);
  7556. }
  7557. if (s == 3) {
  7558. this.cTemplate = this.templateC.content;
  7559. this.dialogVisible2 = false;
  7560. this.steps = 3;
  7561. this.isClickColor = 1;
  7562. this.unitJson[
  7563. this.unitIndex
  7564. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7565. this.$forceUpdate();
  7566. setTimeout(() => {
  7567. this.checkEva(this.checkId);
  7568. setTimeout(() => {
  7569. this.checkEva(this.checkId);
  7570. }, 100);
  7571. }, 1000);
  7572. }
  7573. }
  7574. this.$refs.stepBox.scrollTop = 0;
  7575. },
  7576. nextSteps(clickType) {
  7577. // if (this.cidType == 1) {
  7578. if (this.steps == 1) {
  7579. if (this.courseName != "") {
  7580. if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  7581. // this.$message({
  7582. // message: "请回答完毕后再次发送",
  7583. // type: "warning"
  7584. // });
  7585. if(this.ttaskDetailLoading5.length){
  7586. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  7587. this.$message({
  7588. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7589. type: "warning"
  7590. });
  7591. }
  7592. if(this.ttaskDetailLoading.length){
  7593. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  7594. this.$message({
  7595. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7596. type: "warning"
  7597. });
  7598. }
  7599. if(this.cpotetLoading.cpote1){
  7600. this.$message({
  7601. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  7602. type: "warning"
  7603. });
  7604. }
  7605. if(this.cpotetLoading.cpote2){
  7606. this.$message({
  7607. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  7608. type: "warning"
  7609. });
  7610. }
  7611. if(this.cpotetLoading.cpote3){
  7612. this.$message({
  7613. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  7614. type: "warning"
  7615. });
  7616. }
  7617. if(this.cpotetLoading.cpote4){
  7618. this.$message({
  7619. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  7620. type: "warning"
  7621. });
  7622. }
  7623. return;
  7624. }
  7625. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  7626. if(!this.courseText && !this.teacherCourseText){
  7627. this.$message.error("请生成简要描述后再生成大纲");
  7628. return;
  7629. }
  7630. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  7631. this.openAiDialog(clickType, 'aiOutline2')
  7632. }else {
  7633. this.openAiDialog(clickType, 'aiOutline')
  7634. }
  7635. return;
  7636. }
  7637. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  7638. let _type = ''
  7639. if(this.cpoteType == 0){
  7640. _type = 'aiCpote1'
  7641. }else if(this.cpoteType == 1){
  7642. _type = 'aiCpote2'
  7643. }else if(this.cpoteType == 2){
  7644. _type = 'aiCpote3'
  7645. }else if(this.cpoteType == 3){
  7646. _type = 'aiCpote4'
  7647. }
  7648. this.cpoteType++
  7649. this.openAiDialog(clickType, _type)
  7650. return;
  7651. }
  7652. // if (!this.isOutline2) {
  7653. // this.openAiDialog(clickType, 'aiTeacher')
  7654. // return;
  7655. // }
  7656. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  7657. this.openAiDialog(clickType, 'aiTeacher3')
  7658. return;
  7659. }
  7660. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  7661. this.openAiDialog(clickType, 'aiTeacher2')
  7662. return;
  7663. }
  7664. let _pan2 = 1
  7665. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  7666. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  7667. _pan2 = 2
  7668. this.$message.error(`请完善任务${k+1}的课程大纲`)
  7669. break;
  7670. }
  7671. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  7672. _pan2 = 2
  7673. this.$message.error(`请完善任务${k+1}的课程教案`)
  7674. break;
  7675. }
  7676. }
  7677. if(_pan2 == 2){
  7678. return;
  7679. }
  7680. const functionA = () => {
  7681. setTimeout(() => {
  7682. this.loading = false
  7683. this.steps = 3;
  7684. }, 0)
  7685. this.isClickColor = 1;
  7686. this.unitJson[
  7687. this.unitIndex
  7688. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7689. this.$forceUpdate();
  7690. setTimeout(() => {
  7691. this.checkEva(this.checkId);
  7692. setTimeout(() => {
  7693. this.checkEva(this.checkId);
  7694. }, 100);
  7695. }, 1000);
  7696. if (this.cid == "" || this.cid == undefined) {
  7697. this.addWork();
  7698. } else {
  7699. if (this.userid != this.courseUserid && this.role != "1") {
  7700. this.updateWork2();
  7701. } else {
  7702. this.updateWork();
  7703. }
  7704. }
  7705. }
  7706. if (this.cid) {
  7707. this.loading = true
  7708. } else {
  7709. this.openAiDialog(clickType, "aiTask2", 'all')
  7710. }
  7711. functionA()
  7712. } else {
  7713. this.$message.error("请补充填写课程名称");
  7714. return;
  7715. }
  7716. } else if (this.steps == 3) {
  7717. if (this.taskLoading.length) {
  7718. let _pan = 1
  7719. for(var k = 0; k < this.taskLoading.length; k++){
  7720. if(this.taskLoading[k]){
  7721. this.$message({
  7722. message: `请等待任务${k+1}回答完毕后再上传`,
  7723. type: "warning"
  7724. });
  7725. _pan = 2
  7726. }
  7727. }
  7728. if(_pan == 2){
  7729. return
  7730. }
  7731. }
  7732. if (this.cid == "" || this.cid == undefined) {
  7733. if (this.courseName == "") {
  7734. this.$message.error("请补充填写课程名称");
  7735. return;
  7736. } else {
  7737. this.addWork();
  7738. this.steps++;
  7739. }
  7740. } else {
  7741. if (this.courseName == "") {
  7742. this.$message.error("请补充填写课程名称");
  7743. return;
  7744. } else {
  7745. if (this.userid != this.courseUserid && this.role != "1") {
  7746. this.updateWork2();
  7747. } else {
  7748. this.updateWork();
  7749. }
  7750. this.steps++;
  7751. }
  7752. }
  7753. }
  7754. // } else {
  7755. // if (this.steps == 1) {
  7756. // if (this.courseName != "") {
  7757. // if (this.cid == "" || this.cid == undefined) {
  7758. // this.addWork();
  7759. // } else {
  7760. // if (this.userid != this.courseUserid && this.role != "1") {
  7761. // // this.updateWork2();
  7762. // } else {
  7763. // this.updateWork();
  7764. // }
  7765. // }
  7766. // this.steps++;
  7767. // } else {
  7768. // this.$message.error("请补充填写课程名称");
  7769. // return;
  7770. // }
  7771. // } else if (this.steps == 2) {
  7772. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  7773. // this.cTemplate = this.templateC.content;
  7774. // }
  7775. // this.dialogVisible2 = false;
  7776. // this.steps++;
  7777. // setTimeout(() => {
  7778. // this.checkEva(this.checkId);
  7779. // setTimeout(() => {
  7780. // this.checkEva(this.checkId);
  7781. // }, 100);
  7782. // }, 1000);
  7783. // } else if (this.steps == 3) {
  7784. // if (this.cid == "" || this.cid == undefined) {
  7785. // if (this.courseName == "") {
  7786. // this.$message.error("请补充填写课程名称");
  7787. // return;
  7788. // } else {
  7789. // this.addWork();
  7790. // this.steps++;
  7791. // }
  7792. // } else {
  7793. // if (this.courseName == "") {
  7794. // this.$message.error("请补充填写课程名称");
  7795. // return;
  7796. // } else {
  7797. // if (this.userid != this.courseUserid && this.role != "1") {
  7798. // this.updateWork2();
  7799. // } else {
  7800. // this.updateWork();
  7801. // }
  7802. // this.steps++;
  7803. // }
  7804. // }
  7805. // }
  7806. // }
  7807. this.$refs.stepBox.scrollTop = 0;
  7808. },
  7809. unitSet(i) {
  7810. if (this.unitIndex == i) {
  7811. return;
  7812. }
  7813. this.unitIndex = i;
  7814. this.isClickColor = 1;
  7815. // this.$refs.rightboxR.scrollTop = 0;
  7816. this.$refs.unitBox.scrollTop = 0;
  7817. },
  7818. panUnitJson() {
  7819. let _unitIndex = this.unitIndex;
  7820. let cPan = 1;
  7821. for (
  7822. var j = 0;
  7823. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7824. j++
  7825. ) {
  7826. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  7827. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7828. j
  7829. ].proVisible2 = false;
  7830. if (
  7831. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7832. .length > 1
  7833. ) {
  7834. for (
  7835. var z = 0;
  7836. z <
  7837. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7838. .length;
  7839. z++
  7840. ) {
  7841. if (
  7842. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  7843. z
  7844. ].tool.length
  7845. ) {
  7846. this.$message.error("请把工具添加完整");
  7847. cPan = 2;
  7848. break;
  7849. }
  7850. }
  7851. }
  7852. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7853. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7854. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7855. (ele) => {
  7856. return ele.value != "";
  7857. }
  7858. );
  7859. }
  7860. }
  7861. return cPan;
  7862. },
  7863. unitOpen(i) {
  7864. if (this.unitJson[i].toolOpen) {
  7865. this.unitJson[i].toolOpen = false;
  7866. } else {
  7867. this.unitJson[i].toolOpen = true;
  7868. }
  7869. this.updateWork();
  7870. this.$forceUpdate();
  7871. },
  7872. unitSet2(i) {
  7873. if (this.panUnitJson() == 2) {
  7874. return;
  7875. }
  7876. // if(this.unitJson[i].toolOpen){
  7877. // this.unitJson[i].toolOpen = false
  7878. // this.updateWork()
  7879. // this.$forceUpdate()
  7880. // return
  7881. // }else {
  7882. this.unitJson[i].toolOpen = true;
  7883. // }
  7884. this.$forceUpdate();
  7885. if (this.unitIndex == i) {
  7886. return;
  7887. }
  7888. this.unitIndex = i;
  7889. this.isClickColor = 1;
  7890. // this.$refs.rightboxR.scrollTop = 0;
  7891. this.$refs.unitBox.scrollTop = 0;
  7892. },
  7893. updateCourseState(i) {
  7894. let params = [
  7895. {
  7896. cid: this.cid,
  7897. state: i,
  7898. },
  7899. ];
  7900. this.ajax
  7901. .post(this.$store.state.api + "updateCourseMode", params)
  7902. .then((res) => {
  7903. this.courseState = i;
  7904. })
  7905. .catch((err) => {
  7906. this.$message.error("网络不佳");
  7907. console.error(err);
  7908. });
  7909. },
  7910. addtips(){
  7911. let params = [
  7912. {
  7913. cid: this.cid,
  7914. tips: JSON.stringify(this.aiJson),
  7915. tid: this.templateid
  7916. },
  7917. ];
  7918. this.ajax
  7919. .post(this.$store.state.api + "addTips", params)
  7920. .then((res) => {
  7921. })
  7922. .catch((err) => {
  7923. this.$message.error("网络不佳");
  7924. console.error(err);
  7925. });
  7926. },
  7927. openSaveTips(){
  7928. this.dialogVisibleTips = true
  7929. },
  7930. time() {
  7931. if (!this.now) {
  7932. this.now = new Date().getTime();
  7933. return true;
  7934. } else {
  7935. let time = new Date().getTime();
  7936. if (time - this.now > 3000) {
  7937. this.now = time;
  7938. return true;
  7939. } else {
  7940. return false;
  7941. }
  7942. }
  7943. },
  7944. deleteUnit(i) {
  7945. var _this = this;
  7946. if (i == 0 && _this.unitJson.length == 1) {
  7947. _this
  7948. .$confirm("确定切换成任务模式吗?", "提示", {
  7949. confirmButtonText: "确定",
  7950. cancelButtonText: "取消",
  7951. type: "warning",
  7952. })
  7953. .then(() => {
  7954. _this.unitJson[i].dyName = "";
  7955. // _this.updateCourseState(2);
  7956. })
  7957. .catch(() => {
  7958. return;
  7959. });
  7960. } else {
  7961. _this
  7962. .$confirm("确定删除此阶段吗?", "提示", {
  7963. confirmButtonText: "确定",
  7964. cancelButtonText: "取消",
  7965. type: "warning",
  7966. })
  7967. .then(() => {
  7968. _this.isDelete = 2;
  7969. // _this.unitIndex = _this.unitIndex - 1;
  7970. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  7971. // _this.$message.success("删除成功");
  7972. })
  7973. .catch(() => {
  7974. return;
  7975. });
  7976. }
  7977. },
  7978. deleteWork(chapid) {
  7979. let params = [
  7980. {
  7981. cid: this.cid,
  7982. chapters: JSON.stringify(this.unitJson),
  7983. uid: this.userid,
  7984. chapid: chapid,
  7985. },
  7986. ];
  7987. this.ajax
  7988. .post(this.$store.state.api + "deleteWork", params)
  7989. .then((res) => {
  7990. this.$message({
  7991. message: "删除成功",
  7992. type: "success",
  7993. });
  7994. let task = JSON.parse(
  7995. JSON.stringify(
  7996. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  7997. )
  7998. );
  7999. this.unitJson.splice(this.unitIndex, 1);
  8000. if (this.unitIndex == 0) {
  8001. this.unitIndex = 0;
  8002. } else {
  8003. this.unitIndex = this.unitIndex - 1;
  8004. }
  8005. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8006. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8007. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8008. ...task,
  8009. ];
  8010. }
  8011. })
  8012. .catch((err) => {
  8013. this.$message.error("网络不佳");
  8014. console.error(err);
  8015. });
  8016. },
  8017. deleteTool(itemTaskIndex, i) {
  8018. var _this = this;
  8019. if (_this.time()) {
  8020. _this
  8021. .$confirm("确定删除此工具吗?", "提示", {
  8022. confirmButtonText: "确定",
  8023. cancelButtonText: "取消",
  8024. type: "warning",
  8025. })
  8026. .then(() => {
  8027. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8028. itemTaskIndex
  8029. ].toolChoose.splice(i, 1);
  8030. _this.$message.success("删除成功");
  8031. })
  8032. .catch(() => {
  8033. return;
  8034. });
  8035. }
  8036. },
  8037. deleteSentence(i) {
  8038. var _this = this;
  8039. _this
  8040. .$confirm("确定删除此题目吗?", "提示", {
  8041. confirmButtonText: "确定",
  8042. cancelButtonText: "取消",
  8043. type: "warning",
  8044. })
  8045. .then(() => {
  8046. _this.sentenceList.splice(i, 1);
  8047. _this.$message.success("删除成功");
  8048. })
  8049. .catch(() => {
  8050. return;
  8051. });
  8052. },
  8053. deleteS(s, i, j) {
  8054. this.sentenceList[i].addSentence.splice(j, 1);
  8055. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8056. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8057. this.sentenceList[i].rightAnswer.splice(a, 1);
  8058. }
  8059. },
  8060. openT() {
  8061. top.postMessage({ tools: "25" }, "*");
  8062. },
  8063. deleteTask(i) {
  8064. var _this = this;
  8065. if (_this.time()) {
  8066. _this
  8067. .$confirm(
  8068. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8069. 1 ==
  8070. i
  8071. ? "确定删除此任务吗?"
  8072. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8073. "提示",
  8074. {
  8075. confirmButtonText: "确定",
  8076. cancelButtonText: "取消",
  8077. type: "warning",
  8078. }
  8079. )
  8080. .then(() => {
  8081. if (i == 0 && _this.courseState == 4) {
  8082. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8083. i + 1
  8084. ].chapterData = JSON.parse(
  8085. JSON.stringify(
  8086. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8087. .chapterData
  8088. )
  8089. );
  8090. }
  8091. _this.$forceUpdate();
  8092. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8093. i,
  8094. 1
  8095. );
  8096. _this.$message.success("删除成功");
  8097. })
  8098. .catch(() => {
  8099. return;
  8100. });
  8101. }
  8102. },
  8103. deleteTask2(i) {
  8104. var _this = this;
  8105. if (_this.time()) {
  8106. _this
  8107. .$confirm(
  8108. "确定删除此任务吗?",
  8109. "提示",
  8110. {
  8111. confirmButtonText: "确定",
  8112. cancelButtonText: "取消",
  8113. type: "warning",
  8114. }
  8115. )
  8116. .then(() => {
  8117. if (i == 0 && _this.courseState == 4) {
  8118. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8119. i + 1
  8120. ].chapterData = JSON.parse(
  8121. JSON.stringify(
  8122. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8123. .chapterData
  8124. )
  8125. );
  8126. }
  8127. _this.$forceUpdate();
  8128. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8129. i,
  8130. 1
  8131. );
  8132. _this.$message.success("删除成功");
  8133. })
  8134. .catch(() => {
  8135. return;
  8136. });
  8137. }
  8138. },
  8139. handlePictureCardPreview(file) {
  8140. this.dialogImageUrl = file.url;
  8141. },
  8142. clean(i, c) {
  8143. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8144. },
  8145. handle_remove1(file, fileList, type) {
  8146. var _tmp = this.cover;
  8147. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8148. // if (_tmp[i].uid == file.uid) {
  8149. // _tmp.splice(i, 1);
  8150. // break;
  8151. // }
  8152. // this.cover = _tmp;
  8153. // }
  8154. this.cover = [];
  8155. this.noneBtnImg = this.cover.length >= 1;
  8156. this.isSysPic = false;
  8157. this.isSysPic2 = false;
  8158. this.$forceUpdate();
  8159. },
  8160. addImg(e) {
  8161. var el = e.currentTarget;
  8162. el.getElementsByTagName("input")[0].click();
  8163. e.target.value = "";
  8164. },
  8165. addChaptersTools(i) {
  8166. this.chapTools = [
  8167. {
  8168. tools: [],
  8169. toolDetail: "",
  8170. },
  8171. ];
  8172. this.chapCount = i;
  8173. this.dialogVisible4 = true;
  8174. },
  8175. isNoFinsh() {
  8176. this.$message.warning("功能正在开发中");
  8177. },
  8178. addAttText(i) {
  8179. this.AttText = {
  8180. title: "",
  8181. text: "",
  8182. };
  8183. this.taskCount = i;
  8184. this.AttTextType = 0;
  8185. this.$forceUpdate();
  8186. this.dialogVisible6 = true;
  8187. setTimeout(() => {
  8188. this.$refs["fuInput"].focus();
  8189. }, 100);
  8190. },
  8191. openLine(i) {
  8192. this.line = "";
  8193. this.lineCount = i;
  8194. this.lineType = 0;
  8195. this.$forceUpdate();
  8196. this.dialogVisible7 = true;
  8197. },
  8198. pasteLine(i) {
  8199. navigator.clipboard
  8200. .readText()
  8201. .then((v) => {
  8202. console.log("获取剪贴板成功:", v);
  8203. const html = v;
  8204. const regex = /src="(.*?)"/g;
  8205. const match = regex.exec(html);
  8206. if (match && match[1]) {
  8207. console.log(match[1]);
  8208. this.$message.success("粘贴成功");
  8209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8210. i
  8211. ].chapterData.unshift({
  8212. name: "链接",
  8213. title: "嵌入代码",
  8214. url: match[1],
  8215. type: 8,
  8216. });
  8217. } else {
  8218. // console.log("未找到包含 src 属性的 iframe");
  8219. this.$message.error(
  8220. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8221. );
  8222. }
  8223. })
  8224. .catch((v) => {
  8225. console.log("获取剪贴板失败: ", v);
  8226. });
  8227. },
  8228. openSource(i) {
  8229. this.lineCount = i;
  8230. this.sourceData = {};
  8231. this.dialogVisibleSource = true;
  8232. this.updateSourcePan = false;
  8233. },
  8234. openAiCreate(i){
  8235. this.lineCount = i;
  8236. this.dialogVisibleAiCreate = true;
  8237. },
  8238. createAiPpt(json){
  8239. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8240. this.dialogVisibleAiCreate = false;
  8241. },
  8242. openAiCreateVideo(i){
  8243. this.lineCount = i;
  8244. this.dialogVisibleAiCreateVideo = true;
  8245. },
  8246. createAiVideo(json){
  8247. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8248. // this.dialogVisibleAiCreateVideo = false;
  8249. },
  8250. async createTeacherAn(index){
  8251. this.lineCount = index;
  8252. this.loading = true
  8253. let md = new MarkdownIt();
  8254. if(this.courseState == 4){
  8255. if(index == 0 || index){
  8256. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8257. let name = _task.task+'-教案'
  8258. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8259. await this.generate(name, _html, 0)
  8260. }else {
  8261. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8262. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8263. let name = _task.task+'-教案'
  8264. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8265. await this.generate(name, _html, 0)
  8266. }
  8267. }
  8268. }else if(this.courseState == 5){
  8269. if(index == 0 || index){
  8270. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8271. let name = _task.task+'-教案'
  8272. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8273. await this.generate(name, _html, index)
  8274. }else {
  8275. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8276. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8277. let name = _task.task+'-教案'
  8278. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8279. await this.generate(name, _html, i)
  8280. }
  8281. }
  8282. }
  8283. },
  8284. async generate(a, html, index) {
  8285. // 将html文件中需要用到的数据挂载到store上
  8286. const content = `<!DOCTYPE html>
  8287. <html lang="en">
  8288. <head>
  8289. <meta charset="UTF-8">
  8290. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8291. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8292. <title>${a}</title>
  8293. <style>
  8294. table {
  8295. border-collapse: collapse; /* 折叠边框 */
  8296. width: 100%;
  8297. }
  8298. th, td {
  8299. border: 1px solid black; /* 线条样式 */
  8300. padding: 8px;
  8301. text-align: left;
  8302. }
  8303. </style>
  8304. </head>
  8305. <body>
  8306. ${html}
  8307. </body>
  8308. </html>`;
  8309. // debugger
  8310. let dname = a + ".doc";
  8311. // 创建文件流
  8312. // 创建bolb实例时,内容一定要放在[]中
  8313. const blob = new Blob([content], {
  8314. type: "text/plain;charset='utf-8'",
  8315. });
  8316. const file = new File([blob], dname, { type: 'application/msword' });
  8317. await this.beforeUploadHtml(file, index)
  8318. },
  8319. beforeUploadHtml(event, index) {
  8320. var file = event;
  8321. var credentials = {
  8322. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8323. secretAccessKey: "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",
  8324. }; //秘钥形式的登录上传
  8325. window.AWS.config.update(credentials);
  8326. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8327. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8328. var _this = this;
  8329. if (file) {
  8330. var params = {
  8331. Key:
  8332. file.name.split(".")[0] +
  8333. new Date().getTime() +
  8334. "." +
  8335. file.name.split(".")[file.name.split(".").length - 1],
  8336. ContentType: file.type,
  8337. Body: file,
  8338. "Access-Control-Allow-Credentials": "*",
  8339. ACL: "public-read",
  8340. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8341. var options = {
  8342. partSize: 2048 * 1024 * 1024,
  8343. queueSize: 2,
  8344. leavePartsOnError: true,
  8345. };
  8346. bucket
  8347. .upload(params, options)
  8348. .on("httpUploadProgress", function (evt) {
  8349. //这里可以写进度条
  8350. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8351. })
  8352. .send(function (err, data) {
  8353. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8354. _this.loading = false
  8355. }
  8356. if(_this.courseState == 5){
  8357. _this.loading = false
  8358. }
  8359. if (err) {
  8360. _this.$message.error("上传失败");
  8361. } else {
  8362. let _index = 0
  8363. if(_this.lineCount == 0 || _this.lineCount){
  8364. _index = _this.lineCount
  8365. }else {
  8366. _index = index
  8367. }
  8368. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8369.                   name: file.name,
  8370.                   url: data.Location,
  8371.                   type: 3,
  8372.                 })
  8373. console.log(data.Location);
  8374. }
  8375. });
  8376. }
  8377. },
  8378. async generate2(a, html, index, callback) {
  8379. // 将html文件中需要用到的数据挂载到store上
  8380. const content = `<!DOCTYPE html>
  8381. <html lang="en">
  8382. <head>
  8383. <meta charset="UTF-8">
  8384. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8385. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8386. <title>${a}</title>
  8387. <style>
  8388. table {
  8389. border-collapse: collapse; /* 折叠边框 */
  8390. width: 100%;
  8391. }
  8392. th, td {
  8393. border: 1px solid black; /* 线条样式 */
  8394. padding: 8px;
  8395. text-align: left;
  8396. }
  8397. </style>
  8398. </head>
  8399. <body>
  8400. ${html}
  8401. </body>
  8402. </html>`;
  8403. // debugger
  8404. let dname = a + ".doc";
  8405. // 创建文件流
  8406. // 创建bolb实例时,内容一定要放在[]中
  8407. const blob = new Blob([content], {
  8408. type: "text/plain;charset='utf-8'",
  8409. });
  8410. const file = new File([blob], dname, { type: 'application/msword' });
  8411. await this.beforeUploadHtml2(file, index, callback)
  8412. },
  8413. beforeUploadHtml2(event, index, callback) {
  8414. var file = event;
  8415. var credentials = {
  8416. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8417. secretAccessKey: "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",
  8418. }; //秘钥形式的登录上传
  8419. window.AWS.config.update(credentials);
  8420. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8421. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8422. var _this = this;
  8423. if (file) {
  8424. var params = {
  8425. Key:
  8426. file.name.split(".")[0] +
  8427. new Date().getTime() +
  8428. "." +
  8429. file.name.split(".")[file.name.split(".").length - 1],
  8430. ContentType: file.type,
  8431. Body: file,
  8432. "Access-Control-Allow-Credentials": "*",
  8433. ACL: "public-read",
  8434. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8435. var options = {
  8436. partSize: 2048 * 1024 * 1024,
  8437. queueSize: 2,
  8438. leavePartsOnError: true,
  8439. };
  8440. bucket
  8441. .upload(params, options)
  8442. .on("httpUploadProgress", function (evt) {
  8443. //这里可以写进度条
  8444. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8445. })
  8446. .send(async function (err, data) {
  8447. if(_this.courseState == 5){
  8448. _this.loading = false
  8449. }
  8450. if (err) {
  8451. callback ? callback() : ''
  8452. _this.$message.error("上传失败");
  8453. } else {
  8454. let fileid = await _this.createFileid(data.Location)
  8455. // _this.cankaoInfoData.push({
  8456. //                   name: file.name,
  8457. //                   url: data.Location,
  8458. //                   type: 3,
  8459. // fileid: fileid,
  8460. //   })
  8461. _this.infoData2.push({
  8462.                   name: file.name,
  8463.                   url: data.Location,
  8464.                   type: 3,
  8465. fileid: fileid,
  8466.   })
  8467. console.log(data.Location);
  8468. callback ? callback() : ''
  8469. }
  8470. });
  8471. }
  8472. },
  8473. addSource() {
  8474. if (!Object.keys(this.sourceData).length) {
  8475. this.$message.error("请选择要上传的资源");
  8476. return;
  8477. }
  8478. let keys = Object.keys(this.sourceData);
  8479. for (var i = 0; i < keys.length; i++) {
  8480. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8481. this.lineCount
  8482. ].chapterData.unshift({
  8483. name: "链接",
  8484. title: this.sourceData[keys[i]].name,
  8485. url: this.sourceData[keys[i]].url,
  8486. type: 14,
  8487. id: keys[i],
  8488. });
  8489. }
  8490. this.$forceUpdate();
  8491. this.dialogVisibleSource = false;
  8492. },
  8493. updateSource() {
  8494. if (!Object.keys(this.sourceData).length) {
  8495. this.$message.error("请选择要上传的资源");
  8496. return;
  8497. }
  8498. let keys = Object.keys(this.sourceData);
  8499. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8500. this.taskCount
  8501. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  8502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8503. this.taskCount
  8504. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  8505. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8506. this.taskCount
  8507. ].chapterData[this.lineCount].id = keys[0];
  8508. this.updateSourcePan = false;
  8509. this.$forceUpdate();
  8510. this.dialogVisibleSource = false;
  8511. },
  8512. deleteM(i, j) {
  8513. this.testJson.testJson[i].timuList.splice(j, 1);
  8514. },
  8515. beforeUploadTiMu(event, i) {
  8516. const loading = this.openLoading();
  8517. var file = event.target.files[0];
  8518. var credentials = {
  8519. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8520. secretAccessKey: "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",
  8521. }; //秘钥形式的登录上传
  8522. window.AWS.config.update(credentials);
  8523. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8524. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8525. var _this = this;
  8526. if (file) {
  8527. var params = {
  8528. Key:
  8529. file.name.split(".")[0] +
  8530. new Date().getTime() +
  8531. "." +
  8532. file.name.split(".")[file.name.split(".").length - 1],
  8533. ContentType: file.type,
  8534. Body: file,
  8535. "Access-Control-Allow-Credentials": "*",
  8536. ACL: "public-read",
  8537. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8538. var options = {
  8539. partSize: 2048 * 1024 * 1024,
  8540. queueSize: 2,
  8541. leavePartsOnError: true,
  8542. };
  8543. bucket
  8544. .upload(params, options)
  8545. .on("httpUploadProgress", function (evt) {
  8546. //这里可以写进度条
  8547. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8548. })
  8549. .send(function (err, data) {
  8550. loading.close();
  8551. if (err) {
  8552. _this.$message.error("上传失败");
  8553. } else {
  8554. if (_this.testJson.testJson[i].timuList) {
  8555. _this.testJson.testJson[i].timuList.push({
  8556. src: data.Location,
  8557. });
  8558. } else {
  8559. _this.testJson.testJson[i].timuList = [];
  8560. _this.testJson.testJson[i].timuList.push({
  8561. src: data.Location,
  8562. });
  8563. }
  8564. _this.imgChange3(i);
  8565. _this.$forceUpdate();
  8566. }
  8567. });
  8568. }
  8569. },
  8570. beforeUploadTi(event, i, j) {
  8571. const loading = this.openLoading();
  8572. var file = event.target.files[0];
  8573. var credentials = {
  8574. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8575. secretAccessKey: "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",
  8576. }; //秘钥形式的登录上传
  8577. window.AWS.config.update(credentials);
  8578. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8579. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8580. var _this = this;
  8581. if (file) {
  8582. var params = {
  8583. Key:
  8584. file.name.split(".")[0] +
  8585. new Date().getTime() +
  8586. "." +
  8587. file.name.split(".")[file.name.split(".").length - 1],
  8588. ContentType: file.type,
  8589. Body: file,
  8590. "Access-Control-Allow-Credentials": "*",
  8591. ACL: "public-read",
  8592. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8593. var options = {
  8594. partSize: 2048 * 1024 * 1024,
  8595. queueSize: 2,
  8596. leavePartsOnError: true,
  8597. };
  8598. bucket
  8599. .upload(params, options)
  8600. .on("httpUploadProgress", function (evt) {
  8601. //这里可以写进度条
  8602. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8603. })
  8604. .send(function (err, data) {
  8605. loading.close();
  8606. if (err) {
  8607. _this.$message.error("上传失败");
  8608. } else {
  8609. _this.testJson.testJson[i].checkList[j] = {};
  8610. _this.testJson.testJson[i].checkList[j].src = data.Location;
  8611. _this.testJson.testJson[i].checkList[j].imgType = 1;
  8612. _this.imgChange2(i, j);
  8613. _this.$forceUpdate();
  8614. }
  8615. });
  8616. }
  8617. },
  8618. beforeUpload1(event, type) {
  8619. // const loading = this.openLoading();
  8620. var file = event.target.files[0];
  8621. var credentials = {
  8622. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8623. secretAccessKey: "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",
  8624. }; //秘钥形式的登录上传
  8625. window.AWS.config.update(credentials);
  8626. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8627. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8628. var _this = this;
  8629. if (file) {
  8630. var params = {
  8631. Key:
  8632. file.name.split(".")[0] +
  8633. new Date().getTime() +
  8634. "." +
  8635. file.name.split(".")[file.name.split(".").length - 1],
  8636. ContentType: file.type,
  8637. Body: file,
  8638. "Access-Control-Allow-Credentials": "*",
  8639. ACL: "public-read",
  8640. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8641. var options = {
  8642. partSize: 2048 * 1024 * 1024,
  8643. queueSize: 2,
  8644. leavePartsOnError: true,
  8645. };
  8646. bucket
  8647. .upload(params, options)
  8648. .on("httpUploadProgress", function (evt) {
  8649. //这里可以写进度条
  8650. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8651. })
  8652. .send(function (err, data) {
  8653. // loading.close();
  8654. if (err) {
  8655. // var a = _this.$refs.upload1.uploadFiles;
  8656. // a.splice(a.length - 1, a.length);
  8657. _this.$message.error("上传失败");
  8658. } else {
  8659. // _this.cover.push({
  8660. // name: file.name,
  8661. // url: data.Location,
  8662. // uid: file.uid,
  8663. // });
  8664. _this.cover = [
  8665. {
  8666. name: file.name,
  8667. url: data.Location,
  8668. uid: file.uid,
  8669. },
  8670. ];
  8671. _this.imgChange1(null, null, 1, null);
  8672. _this.choosePicVisible = false;
  8673. console.log(data.Location);
  8674. }
  8675. });
  8676. }
  8677. },
  8678. beforeUploadSelect(event, type) {
  8679. // const loading = this.openLoading();
  8680. var file = event.target.files[0];
  8681. var credentials = {
  8682. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8683. secretAccessKey: "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",
  8684. }; //秘钥形式的登录上传
  8685. window.AWS.config.update(credentials);
  8686. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8687. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8688. var _this = this;
  8689. if (file) {
  8690. var params = {
  8691. Key:
  8692. file.name.split(".")[0] +
  8693. new Date().getTime() +
  8694. "." +
  8695. file.name.split(".")[file.name.split(".").length - 1],
  8696. ContentType: file.type,
  8697. Body: file,
  8698. "Access-Control-Allow-Credentials": "*",
  8699. ACL: "public-read",
  8700. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8701. var options = {
  8702. partSize: 2048 * 1024 * 1024,
  8703. queueSize: 2,
  8704. leavePartsOnError: true,
  8705. };
  8706. bucket
  8707. .upload(params, options)
  8708. .on("httpUploadProgress", function (evt) {
  8709. //这里可以写进度条
  8710. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8711. })
  8712. .send(function (err, data) {
  8713. // loading.close();
  8714. if (err) {
  8715. _this.$message.error("上传失败");
  8716. } else {
  8717. _this.selectJson.url = data.Location;
  8718. console.log(data.Location);
  8719. }
  8720. });
  8721. }
  8722. },
  8723. chooseSysPic(p) {
  8724. this.cover = [];
  8725. setTimeout(() => {
  8726. this.cover[0] = {
  8727. name: "系统图片.png",
  8728. url: p,
  8729. };
  8730. this.imgChange1(null, null, 1, null);
  8731. this.$forceUpdate();
  8732. }, 0);
  8733. this.isSysPic = true;
  8734. this.isSysPic2 = false;
  8735. this.sysPicVisible = false;
  8736. this.$forceUpdate();
  8737. },
  8738. chooseSysPic2(p) {
  8739. this.cover = [];
  8740. setTimeout(() => {
  8741. this.cover[0] = {
  8742. name: "网络图片.png",
  8743. url: p,
  8744. };
  8745. this.imgChange1(null, null, 1, null);
  8746. this.$forceUpdate();
  8747. }, 0);
  8748. this.isSysPic2 = true;
  8749. this.isSysPic = false;
  8750. this.sysPicVisible2 = false;
  8751. this.$forceUpdate();
  8752. },
  8753. beforeUpload(data) {
  8754. this.$refs.upload1.uploadFiles;
  8755. this.uploadLoading1 = true;
  8756. var file = data.file;
  8757. var credentials = {
  8758. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8759. secretAccessKey: "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",
  8760. }; //秘钥形式的登录上传
  8761. window.AWS.config.update(credentials);
  8762. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8763. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8764. var _this = this;
  8765. if (file) {
  8766. var params = {
  8767. Key:
  8768. file.name.split(".")[0] +
  8769. new Date().getTime() +
  8770. "." +
  8771. file.name.split(".")[file.name.split(".").length - 1],
  8772. ContentType: file.type,
  8773. Body: file,
  8774. "Access-Control-Allow-Credentials": "*",
  8775. ACL: "public-read",
  8776. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8777. var options = {
  8778. partSize: 2048 * 1024 * 1024,
  8779. queueSize: 2,
  8780. leavePartsOnError: true,
  8781. };
  8782. bucket
  8783. .upload(params, options)
  8784. .on("httpUploadProgress", function (evt) {
  8785. //这里可以写进度条
  8786. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8787. })
  8788. .send(function (err, data) {
  8789. _this.uploadLoading1 = false;
  8790. if (err) {
  8791. // var a = _this.$refs.upload1.uploadFiles;
  8792. // a.splice(a.length - 1, a.length);
  8793. _this.$message.error("上传失败");
  8794. } else {
  8795. //上传成功处理
  8796. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  8797. name: file.name,
  8798. url: data.Location,
  8799. uid: file.uid,
  8800. });
  8801. _this.imgChange();
  8802. console.log(data.Location);
  8803. }
  8804. });
  8805. }
  8806. },
  8807. onExceed() {
  8808. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  8809. },
  8810. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  8811. // const loading = this.openLoading();
  8812. var file = event.target.files[0];
  8813. var credentials = {
  8814. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8815. secretAccessKey: "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",
  8816. }; //秘钥形式的登录上传
  8817. window.AWS.config.update(credentials);
  8818. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8819. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8820. var _this = this;
  8821. if (type == 3) {
  8822. var b = [
  8823. "DOC",
  8824. "DOCX",
  8825. "DOCM",
  8826. "DOTM",
  8827. "DOTX",
  8828. "PPTX",
  8829. "PPSX",
  8830. "PPT",
  8831. "PPS",
  8832. "PPTM",
  8833. "POTM",
  8834. "PPAM",
  8835. "POTX",
  8836. "PPSM",
  8837. ];
  8838. if (
  8839. b.indexOf(
  8840. file.name
  8841. .split(".")
  8842. [file.name.split(".").length - 1].toLocaleUpperCase()
  8843. ) != -1
  8844. ) {
  8845. if (file.size / 1024 / 1024 > 80) {
  8846. this.$message.error("上传文件大于80兆,请重新选择文件!");
  8847. this.inputShow = true;
  8848. // var a = _this.$refs.upload1.uploadFiles;
  8849. // a.splice(a.length - 1, a.length);
  8850. // loading.close();
  8851. return;
  8852. }
  8853. } else if (
  8854. file.name
  8855. .split(".")
  8856. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  8857. ) {
  8858. if (file.size / 1024 / 1024 > 80) {
  8859. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  8860. this.inputShow = true;
  8861. // var a = _this.$refs.upload1.uploadFiles;
  8862. // a.splice(a.length - 1, a.length);
  8863. // loading.close();
  8864. return;
  8865. }
  8866. }
  8867. }
  8868. this.inputShow = false;
  8869. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8870. itemTaskIndex
  8871. ].progress = 0;
  8872. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8873. itemTaskIndex
  8874. ].proVisible = true;
  8875. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8876. itemTaskIndex
  8877. ].isFinishSize = 0;
  8878. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8879. itemTaskIndex
  8880. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  8881. _this.$forceUpdate();
  8882. if (file) {
  8883. var params = {
  8884. Key:
  8885. file.name.split(".")[0] +
  8886. new Date().getTime() +
  8887. "." +
  8888. file.name.split(".")[file.name.split(".").length - 1],
  8889. ContentType: file.type,
  8890. Body: file,
  8891. "Access-Control-Allow-Credentials": "*",
  8892. ACL: "public-read",
  8893. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8894. var options = {
  8895. partSize: 2048 * 1024 * 1024,
  8896. queueSize: 2,
  8897. leavePartsOnError: true,
  8898. };
  8899. bucket
  8900. .upload(params, options)
  8901. .on("httpUploadProgress", function (evt) {
  8902. //这里可以写进度条
  8903. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8904. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8905. itemTaskIndex
  8906. ].progress = parseInt((evt.loaded / evt.total) * 100);
  8907. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8908. itemTaskIndex
  8909. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  8910. _this.$forceUpdate();
  8911. })
  8912. .send(function (err, data) {
  8913. // loading.close();
  8914. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8915. itemTaskIndex
  8916. ].progress = 100;
  8917. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8918. itemTaskIndex
  8919. ].isFinishSize =
  8920. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8921. itemTaskIndex
  8922. ].isAllSize;
  8923. _this.$forceUpdate();
  8924. setTimeout(() => {
  8925. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8926. itemTaskIndex
  8927. ].proVisible = false;
  8928. _this.$forceUpdate();
  8929. }, 1000);
  8930. _this.inputShow = true;
  8931. if (err) {
  8932. // var a = _this.$refs.upload1.uploadFiles;
  8933. // a.splice(a.length - 1, a.length);
  8934. _this.$message.error("上传失败");
  8935. } else {
  8936. if (type == 13) {
  8937. let _type = 2;
  8938. var imgA = [
  8939. "png",
  8940. "jpg",
  8941. "jpeg",
  8942. "bmp",
  8943. "gif",
  8944. "webp",
  8945. "psd",
  8946. "svg",
  8947. "tiff",
  8948. ];
  8949. var fileA = [
  8950. "PDF",
  8951. "DOC",
  8952. "DOCX",
  8953. "DOCM",
  8954. "DOTM",
  8955. "DOTX",
  8956. "PPTX",
  8957. "PPSX",
  8958. "PPT",
  8959. "PPS",
  8960. "PPTM",
  8961. "POTM",
  8962. "PPAM",
  8963. "POTX",
  8964. "PPSM",
  8965. "XLSX",
  8966. "XLS",
  8967. ];
  8968. var videoA = [
  8969. "AVI",
  8970. "NAVI",
  8971. "MPEG",
  8972. "ASF",
  8973. "MOV",
  8974. "WMV",
  8975. "3GP",
  8976. "RM",
  8977. "RMVB",
  8978. "FLV",
  8979. "F4V",
  8980. "H.264",
  8981. "H.265",
  8982. "REAL VIDEO",
  8983. "MKV",
  8984. "WebM",
  8985. "HDDVD",
  8986. "MP4",
  8987. "MPG",
  8988. "M4V",
  8989. "MGV",
  8990. "OGV",
  8991. "QTM",
  8992. "STR",
  8993. "AMC",
  8994. "DVX",
  8995. "EVO",
  8996. "DAT",
  8997. "OGG",
  8998. "OGM",
  8999. ];
  9000. if (
  9001. fileA.indexOf(
  9002. data.Location.split(".")[
  9003. data.Location.split(".").length - 1
  9004. ].toLocaleUpperCase()
  9005. ) != -1
  9006. ) {
  9007. _type = 3;
  9008. } else if (
  9009. videoA.indexOf(
  9010. data.Location.split(".")[
  9011. data.Location.split(".").length - 1
  9012. ].toLocaleUpperCase()
  9013. ) != -1
  9014. ) {
  9015. _type = 2;
  9016. } else if (
  9017. imgA.indexOf(
  9018. data.Location.split(".")[
  9019. data.Location.split(".").length - 1
  9020. ].toLocaleLowerCase()
  9021. ) != -1
  9022. ) {
  9023. _type = 13;
  9024. } else {
  9025. _type = 12;
  9026. }
  9027. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9028. itemTaskIndex
  9029. ].chapterData.unshift({
  9030. name: file.name,
  9031. url: data.Location,
  9032. uid: file.uid,
  9033. type: _type,
  9034. });
  9035. _this.imgChange1(null, null, _type, itemTaskIndex);
  9036. } else if (type == 2 || type == 3 || type == 12) {
  9037. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9038. itemTaskIndex
  9039. ].chapterData.unshift({
  9040. name: file.name,
  9041. url: data.Location,
  9042. uid: file.uid,
  9043. type: type,
  9044. });
  9045. _this.imgChange1(null, null, type, itemTaskIndex);
  9046. } else if (type == 4) {
  9047. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9048. itemTaskIndex
  9049. ].fileList1.push({
  9050. name: file.name,
  9051. url: data.Location,
  9052. uid: file.uid,
  9053. });
  9054. _this.imgChange1(null, null, type, itemTaskIndex);
  9055. } else if (type == 5) {
  9056. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9057. itemTaskIndex
  9058. ].homeworkList.push({
  9059. name: file.name,
  9060. url: data.Location,
  9061. uid: file.uid,
  9062. });
  9063. _this.imgChange1(null, null, type, itemTaskIndex);
  9064. }
  9065. console.log(data.Location);
  9066. }
  9067. });
  9068. }
  9069. },
  9070. beforeUploadInfo2(event, type) {
  9071. // const loading = this.openLoading();
  9072. var file = event.target.files[0];
  9073. var credentials = {
  9074. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9075. secretAccessKey: "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",
  9076. }; //秘钥形式的登录上传
  9077. window.AWS.config.update(credentials);
  9078. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9079. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9080. var _this = this;
  9081. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9082. if (
  9083. xianObj.indexOf(
  9084. file.name
  9085. .split(".")
  9086. [file.name.split(".").length - 1].toLocaleUpperCase()
  9087. ) == -1
  9088. ) {
  9089. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9090. this.inputShow = true;
  9091. // var a = _this.$refs.upload1.uploadFiles;
  9092. // a.splice(a.length - 1, a.length);
  9093. // loading.close();
  9094. return;
  9095. }
  9096. if (type == 3) {
  9097. var b = [
  9098. "DOC",
  9099. "DOCX",
  9100. "DOCM",
  9101. "DOTM",
  9102. "DOTX",
  9103. "PPTX",
  9104. "PPSX",
  9105. "PPT",
  9106. "PPS",
  9107. "PPTM",
  9108. "POTM",
  9109. "PPAM",
  9110. "POTX",
  9111. "PPSM",
  9112. ];
  9113. if (
  9114. b.indexOf(
  9115. file.name
  9116. .split(".")
  9117. [file.name.split(".").length - 1].toLocaleUpperCase()
  9118. ) != -1
  9119. ) {
  9120. if (file.size / 1024 / 1024 > 80) {
  9121. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9122. this.inputShow = true;
  9123. // var a = _this.$refs.upload1.uploadFiles;
  9124. // a.splice(a.length - 1, a.length);
  9125. // loading.close();
  9126. return;
  9127. }
  9128. } else if (
  9129. file.name
  9130. .split(".")
  9131. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9132. ) {
  9133. if (file.size / 1024 / 1024 > 80) {
  9134. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9135. this.inputShow = true;
  9136. // var a = _this.$refs.upload1.uploadFiles;
  9137. // a.splice(a.length - 1, a.length);
  9138. // loading.close();
  9139. return;
  9140. }
  9141. }
  9142. }
  9143. this.inputShow = false;
  9144. if(type == 14){
  9145. _this.teacherinfoprogress = 0;
  9146. _this.teacherinfoproVisible = true;
  9147. _this.teacherinfoisFinishSize = 0;
  9148. _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9149. }else{
  9150. _this.infoprogress = 0;
  9151. _this.infoproVisible = true;
  9152. _this.infoisFinishSize = 0;
  9153. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9154. }
  9155. _this.$forceUpdate();
  9156. if (file) {
  9157. var params = {
  9158. Key:
  9159. file.name.split(".")[0] +
  9160. new Date().getTime() +
  9161. "." +
  9162. file.name.split(".")[file.name.split(".").length - 1],
  9163. ContentType: file.type,
  9164. Body: file,
  9165. "Access-Control-Allow-Credentials": "*",
  9166. ACL: "public-read",
  9167. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9168. var options = {
  9169. partSize: 2048 * 1024 * 1024,
  9170. queueSize: 2,
  9171. leavePartsOnError: true,
  9172. };
  9173. bucket
  9174. .upload(params, options)
  9175. .on("httpUploadProgress", function (evt) {
  9176. //这里可以写进度条
  9177. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9178. if(type == 14){
  9179. _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9180. _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9181. }else {
  9182. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9183. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9184. }
  9185. _this.$forceUpdate();
  9186. })
  9187. .send(async function (err, data) {
  9188. // loading.close();
  9189. if(type == 14){
  9190. _this.teacherinfoprogress = 100;
  9191. _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9192. }else {
  9193. _this.infoprogress = 100;
  9194. _this.infoisFinishSize = _this.infoisAllSize;
  9195. }
  9196. _this.$forceUpdate();
  9197. _this.inputShow = true;
  9198. if (err) {
  9199. setTimeout(() => {
  9200. if(type == 14){
  9201. _this.teacherinfoproVisible = false;
  9202. }else{
  9203. _this.infoproVisible = false;
  9204. }
  9205. _this.$forceUpdate();
  9206. }, 1000);
  9207. // var a = _this.$refs.upload1.uploadFiles;
  9208. // a.splice(a.length - 1, a.length);
  9209. _this.$message.error("上传失败");
  9210. } else {
  9211. let fileid = await _this.createFileid(data.Location)
  9212. if(fileid){
  9213. if(type == 14){
  9214. _this.teacherinfoproVisible = false;
  9215. }else{
  9216. _this.infoproVisible = false;
  9217. }
  9218. _this.$forceUpdate();
  9219. }
  9220. var imgA = [
  9221. "png",
  9222. "jpg",
  9223. "jpeg",
  9224. "bmp",
  9225. "gif",
  9226. "webp",
  9227. "psd",
  9228. "svg",
  9229. "tiff",
  9230. ];
  9231. var fileA = [
  9232. "PDF",
  9233. "DOC",
  9234. "DOCX",
  9235. "DOCM",
  9236. "DOTM",
  9237. "DOTX",
  9238. "PPTX",
  9239. "PPSX",
  9240. "PPT",
  9241. "PPS",
  9242. "PPTM",
  9243. "POTM",
  9244. "PPAM",
  9245. "POTX",
  9246. "PPSM",
  9247. "XLSX",
  9248. "XLS",
  9249. ];
  9250. var videoA = [
  9251. "AVI",
  9252. "NAVI",
  9253. "MPEG",
  9254. "ASF",
  9255. "MOV",
  9256. "WMV",
  9257. "3GP",
  9258. "RM",
  9259. "RMVB",
  9260. "FLV",
  9261. "F4V",
  9262. "H.264",
  9263. "H.265",
  9264. "REAL VIDEO",
  9265. "MKV",
  9266. "WebM",
  9267. "HDDVD",
  9268. "MP4",
  9269. "MPG",
  9270. "M4V",
  9271. "MGV",
  9272. "OGV",
  9273. "QTM",
  9274. "STR",
  9275. "AMC",
  9276. "DVX",
  9277. "EVO",
  9278. "DAT",
  9279. "OGG",
  9280. "OGM",
  9281. ];
  9282. let _type = 2;
  9283. if (
  9284. fileA.indexOf(
  9285. data.Location.split(".")[
  9286. data.Location.split(".").length - 1
  9287. ].toLocaleUpperCase()
  9288. ) != -1
  9289. ) {
  9290. _type = 3;
  9291. } else if (
  9292. videoA.indexOf(
  9293. data.Location.split(".")[
  9294. data.Location.split(".").length - 1
  9295. ].toLocaleUpperCase()
  9296. ) != -1
  9297. ) {
  9298. _type = 2;
  9299. } else if (
  9300. imgA.indexOf(
  9301. data.Location.split(".")[
  9302. data.Location.split(".").length - 1
  9303. ].toLocaleLowerCase()
  9304. ) != -1
  9305. ) {
  9306. _type = 13;
  9307. } else {
  9308. _type = 12;
  9309. }
  9310. if (type == 13) {
  9311. _this.infoData.push({
  9312. name: file.name,
  9313. url: data.Location,
  9314. uid: file.uid,
  9315. type: _type,
  9316. fileid: fileid,
  9317. });
  9318. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9319. name: file.name,
  9320. url: data.Location,
  9321. uid: file.uid,
  9322. type: _type,
  9323. fileid: fileid,
  9324. })
  9325. }else if (type == 14) {
  9326. _this.teacherInfoData.push({
  9327. name: file.name,
  9328. url: data.Location,
  9329. uid: file.uid,
  9330. type: _type,
  9331. fileid: fileid,
  9332. });
  9333. _this.infoData2.push({
  9334. name: file.name,
  9335. url: data.Location,
  9336. uid: file.uid,
  9337. type: _type,
  9338. fileid: fileid,
  9339. });
  9340. }else if (type == 15) {
  9341. _this.infoData2.push({
  9342. name: file.name,
  9343. url: data.Location,
  9344. uid: file.uid,
  9345. type: _type,
  9346. fileid: fileid,
  9347. });
  9348. _this.infoData.push({
  9349. name: file.name,
  9350. url: data.Location,
  9351. uid: file.uid,
  9352. type: _type,
  9353. fileid: fileid,
  9354. });
  9355. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9356. name: file.name,
  9357. url: data.Location,
  9358. uid: file.uid,
  9359. type: _type,
  9360. fileid: fileid,
  9361. })
  9362. }
  9363. console.log(data.Location);
  9364. console.log(fileid);
  9365. }
  9366. });
  9367. }
  9368. },
  9369. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  9370. // const loading = this.openLoading();
  9371. var file = event.target.files[0];
  9372. var credentials = {
  9373. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9374. secretAccessKey: "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",
  9375. }; //秘钥形式的登录上传
  9376. window.AWS.config.update(credentials);
  9377. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9378. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9379. var _this = this;
  9380. if (type == 3) {
  9381. var b = [
  9382. "DOC",
  9383. "DOCX",
  9384. "DOCM",
  9385. "DOTM",
  9386. "DOTX",
  9387. "PPTX",
  9388. "PPSX",
  9389. "PPT",
  9390. "PPS",
  9391. "PPTM",
  9392. "POTM",
  9393. "PPAM",
  9394. "POTX",
  9395. "PPSM",
  9396. ];
  9397. if (
  9398. b.indexOf(
  9399. file.name
  9400. .split(".")
  9401. [file.name.split(".").length - 1].toLocaleUpperCase()
  9402. ) != -1
  9403. ) {
  9404. if (file.size / 1024 / 1024 > 80) {
  9405. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9406. this.inputShow = true;
  9407. // var a = _this.$refs.upload1.uploadFiles;
  9408. // a.splice(a.length - 1, a.length);
  9409. // loading.close();
  9410. return;
  9411. }
  9412. } else if (
  9413. file.name
  9414. .split(".")
  9415. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9416. ) {
  9417. if (file.size / 1024 / 1024 > 80) {
  9418. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9419. this.inputShow = true;
  9420. // var a = _this.$refs.upload1.uploadFiles;
  9421. // a.splice(a.length - 1, a.length);
  9422. // loading.close();
  9423. return;
  9424. }
  9425. }
  9426. }
  9427. this.inputShow = false;
  9428. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9429. itemTaskIndex
  9430. ].progress = 0;
  9431. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9432. itemTaskIndex
  9433. ].proVisible = true;
  9434. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9435. itemTaskIndex
  9436. ].isFinishSize = 0;
  9437. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9438. itemTaskIndex
  9439. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9440. _this.$forceUpdate();
  9441. if (file) {
  9442. var params = {
  9443. Key:
  9444. file.name.split(".")[0] +
  9445. new Date().getTime() +
  9446. "." +
  9447. file.name.split(".")[file.name.split(".").length - 1],
  9448. ContentType: file.type,
  9449. Body: file,
  9450. "Access-Control-Allow-Credentials": "*",
  9451. ACL: "public-read",
  9452. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9453. var options = {
  9454. partSize: 2048 * 1024 * 1024,
  9455. queueSize: 2,
  9456. leavePartsOnError: true,
  9457. };
  9458. bucket
  9459. .upload(params, options)
  9460. .on("httpUploadProgress", function (evt) {
  9461. //这里可以写进度条
  9462. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9463. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9464. itemTaskIndex
  9465. ].progress = parseInt((evt.loaded / evt.total) * 100);
  9466. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9467. itemTaskIndex
  9468. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9469. _this.$forceUpdate();
  9470. })
  9471. .send(function (err, data) {
  9472. // loading.close();
  9473. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9474. itemTaskIndex
  9475. ].progress = 100;
  9476. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9477. itemTaskIndex
  9478. ].isFinishSize =
  9479. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9480. itemTaskIndex
  9481. ].isAllSize;
  9482. _this.$forceUpdate();
  9483. setTimeout(() => {
  9484. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9485. itemTaskIndex
  9486. ].proVisible = false;
  9487. _this.$forceUpdate();
  9488. }, 1000);
  9489. _this.inputShow = true;
  9490. if (err) {
  9491. // var a = _this.$refs.upload1.uploadFiles;
  9492. // a.splice(a.length - 1, a.length);
  9493. _this.$message.error("上传失败");
  9494. } else {
  9495. if (type == 2 || type == 3) {
  9496. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9497. itemTaskIndex
  9498. ].chapterData.unshift({
  9499. name: file.name,
  9500. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9501. // itemTaskIndex
  9502. // ].chapterData.length+1),
  9503. url: data.Location,
  9504. uid: file.uid,
  9505. type: type,
  9506. text: string,
  9507. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9508. // itemTaskIndex
  9509. // ].chapterData.length + 1),
  9510. });
  9511. _this.imgChange1(null, null, type, itemTaskIndex);
  9512. } else if (type == 4) {
  9513. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9514. itemTaskIndex
  9515. ].fileList1.push({
  9516. name: file.name,
  9517. url: data.Location,
  9518. uid: file.uid,
  9519. });
  9520. _this.imgChange1(null, null, type, itemTaskIndex);
  9521. } else if (type == 5) {
  9522. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9523. itemTaskIndex
  9524. ].homeworkList.push({
  9525. name: file.name,
  9526. url: data.Location,
  9527. uid: file.uid,
  9528. });
  9529. _this.imgChange1(null, null, type, itemTaskIndex);
  9530. }
  9531. console.log(data.Location);
  9532. }
  9533. });
  9534. }
  9535. },
  9536. addunit() {
  9537. this.unitJson.push({
  9538. dyName: "", //单元标题
  9539. isUpdate: 1,
  9540. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  9541. chapterInfo: [
  9542. {
  9543. isread: false,
  9544. chapterid: this.guid(),
  9545. title: "",
  9546. courseName: "",
  9547. taskJson: [
  9548. {
  9549. task: "",
  9550. taskDetail: "",
  9551. chapterData: [],
  9552. toolText: "",
  9553. toolChoose: [
  9554. {
  9555. tool: [],
  9556. toolDetail: "",
  9557. toolType: 0,
  9558. askCount: 1,
  9559. askTitle: "",
  9560. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9561. },
  9562. ],
  9563. isShowTools: false,
  9564. askCount: 1,
  9565. isFold: 1,
  9566. askTitle: "",
  9567. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9568. checkJson: [{ checkCount: [], checkPerent: [] }],
  9569. homeworkList: [],
  9570. },
  9571. ],
  9572. itemCount: 1,
  9573. fileList1: [],
  9574. video: [],
  9575. testData: [],
  9576. pData: [],
  9577. templateArray: [],
  9578. },
  9579. ],
  9580. });
  9581. this.addindex = this.unitJson.length - 1;
  9582. setTimeout(() => {
  9583. this.unitIndex = this.unitJson.length - 1;
  9584. setTimeout(() => {
  9585. console.log(this.$refs.dyInput);
  9586. this.$refs.dyInput[0].focus();
  9587. }, 100);
  9588. this.unitSet(this.unitIndex);
  9589. }, 0);
  9590. },
  9591. addToolFun(itemTaskIndex) {
  9592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9593. itemTaskIndex
  9594. ].toolChoose.push({
  9595. tool: [],
  9596. toolDetail: "",
  9597. toolType: 0,
  9598. askCount: 1,
  9599. askTitle: "",
  9600. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9601. });
  9602. },
  9603. addTaskBorder() {
  9604. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  9605. task: "",
  9606. taskDetail: "",
  9607. chapterData: [],
  9608. toolText: "",
  9609. toolChoose: [
  9610. {
  9611. tool: [],
  9612. toolDetail: "",
  9613. toolType: 0,
  9614. askCount: 1,
  9615. askTitle: "",
  9616. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9617. },
  9618. ],
  9619. isShowTools: false,
  9620. askCount: 1,
  9621. isFold: 1, //任务收起状态
  9622. askTitle: "",
  9623. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9624. checkJson: [{ checkCount: [], checkPerent: [] }],
  9625. homeworkList: [],
  9626. });
  9627. setTimeout(() => {
  9628. this.checkEva(this.checkId);
  9629. setTimeout(() => {
  9630. this.checkEva(this.checkId);
  9631. }, 100);
  9632. }, 100);
  9633. },
  9634. addTaskBorder2(type, index) {
  9635. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  9636. this.$message({
  9637. message: "有大纲在生成请生成完之后才能使用此功能",
  9638. type: "warning"
  9639. });
  9640. return;
  9641. }
  9642. if(type == 1){
  9643. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  9644. task: "",
  9645. isTask2: true,
  9646. isTask3: true,
  9647. taskDetail: "",
  9648. chapterData: [],
  9649. toolText: "",
  9650. toolChoose: [
  9651. {
  9652. tool: [],
  9653. toolDetail: "",
  9654. toolType: 0,
  9655. askCount: 1,
  9656. askTitle: "",
  9657. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9658. },
  9659. ],
  9660. isShowTools: false,
  9661. askCount: 1,
  9662. isFold: 0, //任务收起状态
  9663. askTitle: "",
  9664. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9665. checkJson: [{ checkCount: [], checkPerent: [] }],
  9666. homeworkList: [],
  9667. })
  9668. }else if(type == 2){
  9669. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  9670. task: "",
  9671. isTask2: true,
  9672. isTask3: true,
  9673. taskDetail: "",
  9674. chapterData: [],
  9675. toolText: "",
  9676. toolChoose: [
  9677. {
  9678. tool: [],
  9679. toolDetail: "",
  9680. toolType: 0,
  9681. askCount: 1,
  9682. askTitle: "",
  9683. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9684. },
  9685. ],
  9686. isShowTools: false,
  9687. askCount: 1,
  9688. isFold: 0, //任务收起状态
  9689. askTitle: "",
  9690. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9691. checkJson: [{ checkCount: [], checkPerent: [] }],
  9692. homeworkList: [],
  9693. })
  9694. }
  9695. setTimeout(() => {
  9696. this.checkEva(this.checkId);
  9697. setTimeout(() => {
  9698. this.checkEva(this.checkId);
  9699. }, 100);
  9700. }, 100);
  9701. },
  9702. add(e, i) {
  9703. var el = e.currentTarget;
  9704. el.getElementsByTagName("input")[0].click();
  9705. },
  9706. fold(i, e) {
  9707. if (
  9708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  9709. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  9710. ) {
  9711. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  9712. } else {
  9713. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  9714. }
  9715. },
  9716. fold2(i) {
  9717. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  9718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9719. i
  9720. ].isFold2 = false;
  9721. } else {
  9722. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  9723. }
  9724. this.$forceUpdate();
  9725. },
  9726. foldEva(i) {
  9727. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  9728. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9729. i
  9730. ].isEvaFold = false;
  9731. } else {
  9732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9733. i
  9734. ].isEvaFold = true;
  9735. setTimeout(() => {
  9736. this.checkEva(this.checkId);
  9737. setTimeout(() => {
  9738. this.checkEva(this.checkId);
  9739. }, 500);
  9740. }, 0);
  9741. }
  9742. this.$forceUpdate();
  9743. },
  9744. foldC(i) {
  9745. if (
  9746. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  9747. ) {
  9748. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9749. i
  9750. ].isFoldchapter = false;
  9751. } else {
  9752. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9753. i
  9754. ].isFoldchapter = true;
  9755. }
  9756. this.$forceUpdate();
  9757. },
  9758. fold3(i, ti) {
  9759. if (
  9760. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  9761. .isFold3
  9762. ) {
  9763. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9764. ti
  9765. ].isFold3 = false;
  9766. } else {
  9767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9768. ti
  9769. ].isFold3 = true;
  9770. }
  9771. this.$forceUpdate();
  9772. },
  9773. deleteHomeworkBox(unitIndex, index, i) {
  9774. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  9775. this.taskCount
  9776. ].homeworkList.splice(i, 1);
  9777. },
  9778. getStudent() {
  9779. let params = {
  9780. oid: this.oid,
  9781. cu: "",
  9782. cn: this.searchPeople,
  9783. };
  9784. this.ajax
  9785. .get(this.$store.state.api + "selectStudentAdd", params)
  9786. .then((res) => {
  9787. this.studentJuri = res.data[0];
  9788. })
  9789. .catch((err) => {
  9790. this.isLoading = false;
  9791. console.error(err);
  9792. });
  9793. },
  9794. // 添加协同成员其他选项按钮
  9795. getTeacherCopy(){
  9796. this.CollLoading=true
  9797. this.collid = ''
  9798. this.collid = '1xpz'
  9799. let params = {
  9800. oid:
  9801. this.org && this.org != "undefined" && this.org != "null"
  9802. ? this.org
  9803. : this.oid,
  9804. cu: "",
  9805. cn: this.searchTN,
  9806. coll: ''
  9807. };
  9808. this.ajax
  9809. .get(
  9810. this.$store.state.api +
  9811. (this.org && this.org != "undefined" && this.org != "null"
  9812. ? "selectCollaborativeMembersOrg"
  9813. : "selectCollaborativeMembers"),
  9814. params
  9815. )
  9816. .then((res) => {
  9817. let teacherJuri = res.data[0];
  9818. this.CollaborativeTeaList = res.data[1];
  9819. for (var i = 0; i < teacherJuri.length; i++) {
  9820. if (teacherJuri[i].userid == this.userid) {
  9821. teacherJuri.splice(i, 1);
  9822. break;
  9823. }
  9824. }
  9825. this.teacherJuri = teacherJuri.filter((i,index)=>{
  9826. return (i.cclassid == '' || i.cclassid == null)
  9827. })
  9828. console.log(' this.teacherJuri', this.teacherJuri);
  9829. let _check = [];
  9830. let _check2 = [];
  9831. for (var i = 0; i < this.teacherJuri.length; i++) {
  9832. var gid = this.teacherJuri[i].userid;
  9833. _check.push(gid);
  9834. }
  9835. for (var i = 0; i < this.checkboxList3.length; i++) {
  9836. var _id = this.checkboxList3[i];
  9837. if (_check.indexOf(_id) !== -1) {
  9838. _check2.push(_id);
  9839. }
  9840. }
  9841. if (_check2.length==0 && _check.length==0) {
  9842. }else{
  9843. this.checkAll2 = _check2.length === _check.length;
  9844. }
  9845. this.CollLoading=false
  9846. })
  9847. .catch((err) => {
  9848. console.error(err);
  9849. this.CollLoading=false
  9850. });
  9851. },
  9852. getTeacher(val) {
  9853. this.CollLoading=true
  9854. this.collid = ''
  9855. this.collid = !val ? '' : val
  9856. let params = {
  9857. oid:
  9858. this.org && this.org != "undefined" && this.org != "null"
  9859. ? this.org
  9860. : this.oid,
  9861. cu: "",
  9862. cn: this.searchTN,
  9863. coll: this.collid
  9864. };
  9865. this.ajax
  9866. .get(
  9867. this.$store.state.api +
  9868. (this.org && this.org != "undefined" && this.org != "null"
  9869. ? "selectCollaborativeMembersOrg"
  9870. : "selectCollaborativeMembers"),
  9871. params
  9872. )
  9873. .then((res) => {
  9874. let teacherJuri = res.data[0];
  9875. this.CollaborativeTeaList = res.data[1];
  9876. for (var i = 0; i < teacherJuri.length; i++) {
  9877. if (teacherJuri[i].userid == this.userid) {
  9878. teacherJuri.splice(i, 1);
  9879. break;
  9880. }
  9881. }
  9882. this.teacherJuri = teacherJuri;
  9883. let _check = [];
  9884. let _check2 = [];
  9885. for (var i = 0; i < this.teacherJuri.length; i++) {
  9886. var gid = this.teacherJuri[i].userid;
  9887. _check.push(gid);
  9888. }
  9889. for (var i = 0; i < this.checkboxList3.length; i++) {
  9890. var _id = this.checkboxList3[i];
  9891. if (_check.indexOf(_id) !== -1) {
  9892. _check2.push(_id);
  9893. }
  9894. }
  9895. if (_check2.length==0 && _check.length==0) {
  9896. }else{
  9897. this.checkAll2 = _check2.length === _check.length;
  9898. }
  9899. this.CollLoading=false
  9900. })
  9901. .catch((err) => {
  9902. console.error(err);
  9903. this.CollLoading=false
  9904. });
  9905. },
  9906. searchStudent() {
  9907. this.getStudent();
  9908. },
  9909. selectGrage() {
  9910. let params = {
  9911. oid: this.oid,
  9912. };
  9913. this.ajax
  9914. .get(this.$store.state.api + "selectGrageBySchool", params)
  9915. .then((res) => {
  9916. this.gradeList = res.data[0];
  9917. })
  9918. .catch((err) => {
  9919. this.isLoading = false;
  9920. console.error(err);
  9921. });
  9922. },
  9923. //获取班级列表
  9924. getClass() {
  9925. let params = {
  9926. oid: this.oid,
  9927. gid: this.gradeId,
  9928. cn: this.classSearch,
  9929. };
  9930. this.ajax
  9931. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  9932. .then((res) => {
  9933. if (!this.grade.length) {
  9934. this.grade = res.data[0];
  9935. }
  9936. this.grade2 = res.data[0];
  9937. this.classJuri = res.data[0];
  9938. let _check = [];
  9939. let _check2 = [];
  9940. for (var i = 0; i < this.grade2.length; i++) {
  9941. var gid = this.grade2[i].id;
  9942. _check.push(gid);
  9943. }
  9944. for (var i = 0; i < this.checkboxList2.length; i++) {
  9945. var _id = this.checkboxList2[i];
  9946. if (_check.indexOf(_id) !== -1) {
  9947. _check2.push(_id);
  9948. }
  9949. }
  9950. this.checkAll = _check2.length === _check.length;
  9951. })
  9952. .catch((err) => {
  9953. this.isLoading = false;
  9954. console.error(err);
  9955. });
  9956. },
  9957. CourseType2Change(val) {
  9958. this.pTypeCheck = [];
  9959. for (var i = 0; i < this.CourseType2.length; i++) {
  9960. let typeA = this.CourseType2[i];
  9961. if (val.indexOf(typeA.name) != -1) {
  9962. this.pTypeCheck.push(...typeA.id);
  9963. }
  9964. }
  9965. },
  9966. getChapterData(e, i, j, ic, type) {
  9967. e.stopPropagation();
  9968. this.updataC = true;
  9969. this.icc = ic;
  9970. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  9971. console.log("还不能下载图片喔");
  9972. }
  9973. },
  9974. deleteChapterData(e, i, j, ic, taskI) {
  9975. e.stopPropagation();
  9976. let _this = this;
  9977. _this
  9978. .$confirm("确定删除此项?", "提示", {
  9979. confirmButtonText: "确定",
  9980. cancelButtonText: "取消",
  9981. type: "warning",
  9982. })
  9983. .then(() => {
  9984. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  9985. ic,
  9986. 1
  9987. );
  9988. })
  9989. .catch(() => {
  9990. return;
  9991. });
  9992. },
  9993. checkInfoData(fileid, file){
  9994. let type = 1
  9995. let index = 0
  9996. for(let i = 0; i < this.infoData.length; i++){
  9997. if(this.infoData[i].fileid == fileid){
  9998. type = 2
  9999. index = i
  10000. }
  10001. }
  10002. if(type == 2){
  10003. this.infoData.splice(index, 1)
  10004. }else {
  10005. this.infoData.push({...file})
  10006. }
  10007. },
  10008. deleteInfoData(e, ic) {
  10009. e.stopPropagation();
  10010. let _this = this;
  10011. _this
  10012. .$confirm("确定删除此项?", "提示", {
  10013. confirmButtonText: "确定",
  10014. cancelButtonText: "取消",
  10015. type: "warning",
  10016. })
  10017. .then(() => {
  10018. _this.infoData.splice(
  10019. ic,
  10020. 1
  10021. );
  10022. })
  10023. .catch(() => {
  10024. return;
  10025. });
  10026. },
  10027. deleteInfoData2(e, ic) {
  10028. e.stopPropagation();
  10029. let _this = this;
  10030. _this
  10031. .$confirm("确定删除此项?", "提示", {
  10032. confirmButtonText: "确定",
  10033. cancelButtonText: "取消",
  10034. type: "warning",
  10035. })
  10036. .then(() => {
  10037. _this.infoData2.splice(
  10038. ic,
  10039. 1
  10040. );
  10041. })
  10042. .catch(() => {
  10043. return;
  10044. });
  10045. },
  10046. deleteCankaoInfoData(e, ic) {
  10047. e.stopPropagation();
  10048. let _this = this;
  10049. _this
  10050. .$confirm("确定删除此项?", "提示", {
  10051. confirmButtonText: "确定",
  10052. cancelButtonText: "取消",
  10053. type: "warning",
  10054. })
  10055. .then(() => {
  10056. _this.cankaoInfoData.splice(
  10057. ic,
  10058. 1
  10059. );
  10060. })
  10061. .catch(() => {
  10062. return;
  10063. });
  10064. },
  10065. deleteTeacherInfoData(e, ic) {
  10066. e.stopPropagation();
  10067. let _this = this;
  10068. _this
  10069. .$confirm("确定删除此项?", "提示", {
  10070. confirmButtonText: "确定",
  10071. cancelButtonText: "取消",
  10072. type: "warning",
  10073. })
  10074. .then(() => {
  10075. _this.teacherInfoData.splice(
  10076. ic,
  10077. 1
  10078. );
  10079. })
  10080. .catch(() => {
  10081. return;
  10082. });
  10083. },
  10084. updataVideoT(e, i, j, ic) {
  10085. // e.stopPropagation();
  10086. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10087. // ic
  10088. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10089. this.line =
  10090. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10091. this.taskCount = j;
  10092. this.lineCount = ic;
  10093. this.dialogVisibleupdataVideoT = true;
  10094. this.$forceUpdate();
  10095. },
  10096. checkChpater(e, i, j, ic){
  10097. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10098. if(type == 3){
  10099. var fileA = [
  10100. "DOC",
  10101. "DOCX",
  10102. "DOCM",
  10103. "DOTM",
  10104. "DOTX",
  10105. "PPTX",
  10106. "PPSX",
  10107. "PPT",
  10108. "PPS",
  10109. "PPTM",
  10110. "POTM",
  10111. "PPAM",
  10112. "POTX",
  10113. "PPSM",
  10114. "XLSX",
  10115. "XLS"
  10116. ];
  10117. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10118. if (
  10119. fileA.indexOf(
  10120. url.split(".")[
  10121. url.split(".").length - 1
  10122. ].toLocaleUpperCase()
  10123. ) != -1
  10124. ) {
  10125. this.dialogVisibleOffice = true
  10126. this.wurl = url
  10127. } else if (
  10128. "pdf".indexOf(
  10129. url.split(".")[
  10130. url.split(".").length - 1
  10131. ].toLocaleLowerCase()
  10132. ) != -1
  10133. ) {
  10134. this.dialogVisiblePdf = true
  10135. this.wurl = url
  10136. }
  10137. }
  10138. },
  10139. checkChpater2(e, ic){
  10140. let type = this.infoData2[ic].type
  10141. if(type == 3){
  10142. var fileA = [
  10143. "DOC",
  10144. "DOCX",
  10145. "DOCM",
  10146. "DOTM",
  10147. "DOTX",
  10148. "PPTX",
  10149. "PPSX",
  10150. "PPT",
  10151. "PPS",
  10152. "PPTM",
  10153. "POTM",
  10154. "PPAM",
  10155. "POTX",
  10156. "PPSM",
  10157. "XLSX",
  10158. "XLS"
  10159. ];
  10160. let url = this.infoData2[ic].url
  10161. if (
  10162. fileA.indexOf(
  10163. url.split(".")[
  10164. url.split(".").length - 1
  10165. ].toLocaleUpperCase()
  10166. ) != -1
  10167. ) {
  10168. this.dialogVisibleOffice = true
  10169. this.wurl = url
  10170. } else if (
  10171. "pdf".indexOf(
  10172. url.split(".")[
  10173. url.split(".").length - 1
  10174. ].toLocaleLowerCase()
  10175. ) != -1
  10176. ) {
  10177. this.dialogVisiblePdf = true
  10178. this.wurl = url
  10179. }
  10180. }
  10181. },
  10182. updataVideoC() {
  10183. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10184. this.taskCount
  10185. ].chapterData[this.lineCount].name = JSON.parse(
  10186. JSON.stringify(this.line)
  10187. );
  10188. this.dialogVisibleupdataVideoT = false;
  10189. this.$forceUpdate();
  10190. },
  10191. upCd(e, i, j, taskCount, ic) {
  10192. e.stopPropagation();
  10193. if (ic == 0) {
  10194. return;
  10195. }
  10196. var a = JSON.parse(
  10197. JSON.stringify(
  10198. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10199. ic - 1
  10200. ]
  10201. )
  10202. );
  10203. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  10204. JSON.parse(
  10205. JSON.stringify(
  10206. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10207. )
  10208. );
  10209. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10210. this.$forceUpdate();
  10211. },
  10212. downCd(e, i, j, taskCount, ic) {
  10213. e.stopPropagation();
  10214. if (
  10215. ic ==
  10216. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  10217. 1
  10218. ) {
  10219. return;
  10220. }
  10221. var a = JSON.parse(
  10222. JSON.stringify(
  10223. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10224. ic + 1
  10225. ]
  10226. )
  10227. );
  10228. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  10229. JSON.parse(
  10230. JSON.stringify(
  10231. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10232. )
  10233. );
  10234. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10235. this.$forceUpdate();
  10236. },
  10237. async upTool(e, i, j, tooli) {
  10238. e.stopPropagation();
  10239. if (tooli == 0) {
  10240. return;
  10241. }
  10242. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  10243. let count2 = await this.getWorksCount(3, i, j, tooli);
  10244. if (count1 > 0 || count2 > 0) {
  10245. this.$confirm(
  10246. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10247. "提示",
  10248. {
  10249. confirmButtonText: "确定",
  10250. cancelButtonText: "取消",
  10251. type: "warning",
  10252. }
  10253. )
  10254. .then(() => {
  10255. var a = JSON.parse(
  10256. JSON.stringify(
  10257. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10258. tooli - 1
  10259. ]
  10260. )
  10261. );
  10262. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10263. JSON.parse(
  10264. JSON.stringify(
  10265. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10266. )
  10267. );
  10268. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10269. this.$forceUpdate();
  10270. })
  10271. .catch(() => {
  10272. return;
  10273. });
  10274. } else {
  10275. var a = JSON.parse(
  10276. JSON.stringify(
  10277. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  10278. )
  10279. );
  10280. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10281. JSON.parse(
  10282. JSON.stringify(
  10283. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10284. )
  10285. );
  10286. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10287. this.$forceUpdate();
  10288. }
  10289. },
  10290. async downTool(e, i, j, tooli) {
  10291. e.stopPropagation();
  10292. if (
  10293. tooli ==
  10294. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  10295. ) {
  10296. return;
  10297. }
  10298. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  10299. let count2 = await this.getWorksCount(3, i, j, tooli);
  10300. if (count1 > 0 || count2 > 0) {
  10301. this.$confirm(
  10302. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10303. "提示",
  10304. {
  10305. confirmButtonText: "确定",
  10306. cancelButtonText: "取消",
  10307. type: "warning",
  10308. }
  10309. )
  10310. .then(() => {
  10311. var a = JSON.parse(
  10312. JSON.stringify(
  10313. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10314. tooli + 1
  10315. ]
  10316. )
  10317. );
  10318. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10319. JSON.parse(
  10320. JSON.stringify(
  10321. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10322. )
  10323. );
  10324. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10325. this.$forceUpdate();
  10326. })
  10327. .catch(() => {
  10328. return;
  10329. });
  10330. } else {
  10331. var a = JSON.parse(
  10332. JSON.stringify(
  10333. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  10334. )
  10335. );
  10336. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10337. JSON.parse(
  10338. JSON.stringify(
  10339. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10340. )
  10341. );
  10342. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10343. this.$forceUpdate();
  10344. }
  10345. },
  10346. addWork(type) {
  10347. if(type == 2 && this.courseName == "") {
  10348. this.$message.error("请补充填写课程名称");
  10349. return;
  10350. }
  10351. let cPan = 1;
  10352. for (var i = 0; i < this.unitJson.length; i++) {
  10353. for (
  10354. var j = 0;
  10355. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10356. j++
  10357. ) {
  10358. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10359. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10360. if (
  10361. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10362. ) {
  10363. for (
  10364. var z = 0;
  10365. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10366. z++
  10367. ) {
  10368. if (
  10369. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10370. .length
  10371. ) {
  10372. this.$message.error("请把工具添加完整");
  10373. cPan = 2;
  10374. break;
  10375. }
  10376. }
  10377. }
  10378. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10379. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10380. i
  10381. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10382. return ele.value != "";
  10383. });
  10384. }
  10385. }
  10386. }
  10387. this.inputShow = true;
  10388. if (cPan == 2) {
  10389. this.steps--;
  10390. return;
  10391. }
  10392. for (var i = 0; i < this.unitJson.length; i++) {
  10393. delete this.unitJson[i].isUpdate;
  10394. }
  10395. if(!this.targetCourseText2){
  10396. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  10397. }
  10398. let params = [
  10399. {
  10400. uid: this.userid,
  10401. title: this.courseName,
  10402. brief: this.courseText,
  10403. cover:
  10404. this.cover.length > 0
  10405. ? JSON.stringify(this.cover)
  10406. : JSON.stringify([
  10407. {
  10408. name: "noBanner.jpg",
  10409. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10410. uid: 1656409780264,
  10411. status: "success",
  10412. },
  10413. ]),
  10414. evaId: this.evalua,
  10415. astudent:
  10416. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10417. see: this.isTeacherSee == true ? 1 : 0,
  10418. chapters: JSON.stringify(this.unitJson),
  10419. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  10420. courseType: JSON.stringify(this.courseTypeId),
  10421. ateacher:
  10422. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10423. inviteCode: JSON.stringify(this.inviteCode),
  10424. refile: JSON.stringify(this.infoData),
  10425. reBrief: this.courseText2,
  10426. cpote: JSON.stringify(this.cpote),
  10427. setting: JSON.stringify({
  10428. courseJie: this.courseJie,
  10429. courseTime: this.courseTime,
  10430. teacherInfoData: this.teacherInfoData,
  10431. teacherCourseText: this.teacherCourseText,
  10432. targetCourseText: this.targetCourseText,
  10433. cankaoInfoData: this.cankaoInfoData,
  10434. infoData2: this.infoData2,
  10435. isuseT: this.isuseT,
  10436. mode: this.mode,
  10437. targetCourseText2: this.targetCourseText2,
  10438. }),
  10439. iresearch: this.isFileSearch ? 1 : 2,
  10440. },
  10441. ];
  10442. this.ajax
  10443. .post(this.$store.state.api + "addWorkNew2AI3", params)
  10444. .then((res) => {
  10445. console.log(this.steps);
  10446. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10447. this.$message({
  10448. message: "新增成功",
  10449. type: "success",
  10450. });
  10451. }
  10452. this.number = res.data.ordernumber;
  10453. this.courseId = res.data.courseId;
  10454. this.cid = res.data.courseId;
  10455. this.courseUserid = this.userid;
  10456. this.islogin = true;
  10457. // this.updateCourseState(4);
  10458. this.updateCourseState(5);
  10459. this.addtips()
  10460. if(type == 2){
  10461. this.retrunCourse()
  10462. }
  10463. })
  10464. .catch((err) => {
  10465. this.$message.error("网络不佳");
  10466. console.error(err);
  10467. });
  10468. },
  10469. goCourse() {
  10470. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  10471. },
  10472. updateWork2() {
  10473. let _unitIndex = this.unitIndex;
  10474. let cPan = 1;
  10475. for (
  10476. var j = 0;
  10477. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10478. j++
  10479. ) {
  10480. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10481. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10482. j
  10483. ].proVisible2 = false;
  10484. if (
  10485. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10486. .length > 1
  10487. ) {
  10488. for (
  10489. var z = 0;
  10490. z <
  10491. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10492. .length;
  10493. z++
  10494. ) {
  10495. if (
  10496. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10497. z
  10498. ].tool.length
  10499. ) {
  10500. this.$message.error("请把工具添加完整");
  10501. cPan = 2;
  10502. break;
  10503. }
  10504. }
  10505. }
  10506. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10507. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10508. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10509. (ele) => {
  10510. return ele.value != "";
  10511. }
  10512. );
  10513. }
  10514. }
  10515. this.inputShow = true;
  10516. if (cPan == 2) {
  10517. this.steps--;
  10518. return;
  10519. }
  10520. let params = [
  10521. {
  10522. cid: this.cid,
  10523. chapters: JSON.stringify(this.unitJson),
  10524. uid: this.userid,
  10525. unitIndex: _unitIndex,
  10526. },
  10527. ];
  10528. this.ajax
  10529. .post(this.$store.state.api + "updateWorkNew4", params)
  10530. .then((res) => {
  10531. this.$message({
  10532. message: "修改成功",
  10533. type: "success",
  10534. });
  10535. this.courseId = this.cid;
  10536. this.addtips();
  10537. })
  10538. .catch((err) => {
  10539. this.$message.error("网络不佳");
  10540. console.error(err);
  10541. });
  10542. },
  10543. updateWork3(unitIndex) {
  10544. let _unitIndex = unitIndex;
  10545. let cPan = 1;
  10546. for (
  10547. var j = 0;
  10548. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10549. j++
  10550. ) {
  10551. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10552. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10553. j
  10554. ].proVisible2 = false;
  10555. if (
  10556. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10557. .length > 1
  10558. ) {
  10559. for (
  10560. var z = 0;
  10561. z <
  10562. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10563. .length;
  10564. z++
  10565. ) {
  10566. if (
  10567. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10568. z
  10569. ].tool.length
  10570. ) {
  10571. this.$message.error("请把工具添加完整");
  10572. cPan = 2;
  10573. break;
  10574. }
  10575. }
  10576. }
  10577. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10578. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10579. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10580. (ele) => {
  10581. return ele.value != "";
  10582. }
  10583. );
  10584. }
  10585. }
  10586. this.inputShow = true;
  10587. if (cPan == 2) {
  10588. this.steps--;
  10589. return;
  10590. }
  10591. let params = [
  10592. {
  10593. cid: this.cid,
  10594. chapters: JSON.stringify(this.unitJson),
  10595. uid: this.userid,
  10596. unitIndex: _unitIndex,
  10597. },
  10598. ];
  10599. this.ajax
  10600. .post(this.$store.state.api + "updateWorkNew4", params)
  10601. .then((res) => {
  10602. // this.$message({
  10603. // message: "修改成功",
  10604. // type: "success",
  10605. // });
  10606. this.courseId = this.cid;
  10607. this.addtips()
  10608. })
  10609. .catch((err) => {
  10610. this.$message.error("网络不佳");
  10611. console.error(err);
  10612. });
  10613. },
  10614. updateWork() {
  10615. let cPan = 1;
  10616. for (var i = 0; i < this.unitJson.length; i++) {
  10617. for (
  10618. var j = 0;
  10619. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10620. j++
  10621. ) {
  10622. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10623. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10624. if (
  10625. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10626. ) {
  10627. for (
  10628. var z = 0;
  10629. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10630. z++
  10631. ) {
  10632. if (
  10633. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10634. .length
  10635. ) {
  10636. this.$message.error("请把工具添加完整");
  10637. cPan = 2;
  10638. break;
  10639. }
  10640. }
  10641. }
  10642. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10643. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10644. i
  10645. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10646. return ele.value != "";
  10647. });
  10648. }
  10649. }
  10650. }
  10651. this.inputShow = true;
  10652. if (cPan == 2) {
  10653. this.steps--;
  10654. return;
  10655. }
  10656. for (var i = 0; i < this.unitJson.length; i++) {
  10657. delete this.unitJson[i].isUpdate;
  10658. }
  10659. if(!this.targetCourseText2){
  10660. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  10661. }
  10662. let params = [
  10663. {
  10664. cid: this.cid,
  10665. title: this.courseName,
  10666. brief: this.courseText,
  10667. cover:
  10668. this.cover.length > 0
  10669. ? JSON.stringify(this.cover)
  10670. : JSON.stringify([
  10671. {
  10672. name: "noBanner.jpg",
  10673. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10674. uid: 1656409780264,
  10675. status: "success",
  10676. },
  10677. ]),
  10678. evaId: this.evalua,
  10679. astudent:
  10680. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10681. see: this.isTeacherSee == true ? 1 : 0,
  10682. chapters: JSON.stringify(this.unitJson),
  10683. template: this.myWord != "undefined" ? this.myWord : [],
  10684. uid: this.userid,
  10685. courseType: JSON.stringify(this.courseTypeId),
  10686. ateacher:
  10687. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10688. inviteCode: JSON.stringify(this.inviteCode),
  10689. refile: JSON.stringify(this.infoData),
  10690. reBrief: this.courseText2,
  10691. cpote: JSON.stringify(this.cpote),
  10692. setting: JSON.stringify({
  10693. courseJie: this.courseJie,
  10694. courseTime: this.courseTime,
  10695. teacherInfoData: this.teacherInfoData,
  10696. teacherCourseText: this.teacherCourseText,
  10697. targetCourseText: this.targetCourseText,
  10698. cankaoInfoData: this.cankaoInfoData,
  10699. infoData2: this.infoData2,
  10700. isuseT: this.isuseT,
  10701. mode: this.mode,
  10702. targetCourseText2: this.targetCourseText2,
  10703. }),
  10704. iresearch: this.isFileSearch ? 1 : 2,
  10705. },
  10706. ];
  10707. this.ajax
  10708. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  10709. .then((res) => {
  10710. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10711. if (this.cidType == 1) {
  10712. this.$message({
  10713. message: "修改成功",
  10714. type: "success",
  10715. });
  10716. } else {
  10717. this.$message({
  10718. message: "新增成功",
  10719. type: "success",
  10720. });
  10721. }
  10722. }
  10723. this.number = this.nbOrder;
  10724. this.courseId = this.cid;
  10725. this.addtips()
  10726. })
  10727. .catch((err) => {
  10728. this.$message.error("网络不佳");
  10729. console.error(err);
  10730. });
  10731. },
  10732. insertWord() {
  10733. this.dialogVisible1 = true;
  10734. this.updateBoolean2 = false;
  10735. this.tTitle = "";
  10736. this.tdetail = "";
  10737. },
  10738. addWord() {
  10739. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  10740. name: this.tTitle,
  10741. content: this.tdetail,
  10742. uid: this.guid(),
  10743. });
  10744. this.dialogVisible1 = false;
  10745. },
  10746. upWord() { },
  10747. selectWord(uid, i, c) {
  10748. this.dialogVisible1 = true;
  10749. this.updateBoolean2 = true;
  10750. if (
  10751. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  10752. ) {
  10753. this.tTitle =
  10754. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  10755. this.tdetail =
  10756. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  10757. }
  10758. },
  10759. isAddPP() {
  10760. if (this.checkboxList.length > 0) {
  10761. this.$message({
  10762. message: "添加成功",
  10763. type: "success",
  10764. });
  10765. this.dialogVisible3 = false;
  10766. } else {
  10767. this.$message({
  10768. message: "请添加课程成员",
  10769. type: "error",
  10770. });
  10771. }
  10772. },
  10773. isAddClass() {
  10774. this.dialogVisibleClass = false;
  10775. },
  10776. isAddPPTeacher() {
  10777. this.dialogVisibleMember = false;
  10778. this.setMan();
  10779. },
  10780. getTipsTemplate(){
  10781. if(this.templateid){
  10782. let params = {
  10783. id: this.templateid
  10784. }
  10785. this.ajax
  10786. .get(this.$store.state.api + "selectTipsTemplateById", params)
  10787. .then((res) => {
  10788. if(res.data[0].length){
  10789. this.tipsJson = res.data[0][0]
  10790. this.aiJson = JSON.parse(res.data[0][0].tips)
  10791. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10792. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10793. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10794. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10795. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  10796. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10797. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  10798. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  10799. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  10800. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  10801. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  10802. }
  10803. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  10804. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  10805. // }
  10806. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  10807. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10808. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10809. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10810. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  10811. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  10812. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  10813. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10814. // }
  10815. this.$forceUpdate();
  10816. }
  10817. })
  10818. .catch((err) => { });
  10819. }
  10820. },
  10821. getTemplate() {
  10822. this.ajax
  10823. .get(this.$store.state.api + "getCourseTemplateT", "")
  10824. .then((res) => {
  10825. this.templateArray = res.data[0];
  10826. this.getTemplateOid();
  10827. this.$forceUpdate();
  10828. })
  10829. .catch((err) => { });
  10830. },
  10831. getTemplateOid() {
  10832. let params = {
  10833. oid: this.oid,
  10834. };
  10835. this.ajax
  10836. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10837. .then((res) => {
  10838. if (res.data[0].length) {
  10839. this.templateArray = [...res.data[0], ...this.templateArray];
  10840. }
  10841. this.getTemplateOrg();
  10842. this.$forceUpdate();
  10843. })
  10844. .catch((err) => { });
  10845. },
  10846. getTemplateOrg() {
  10847. let params = {
  10848. oid: this.org,
  10849. };
  10850. this.ajax
  10851. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10852. .then((res) => {
  10853. if (res.data[0].length) {
  10854. this.templateArray = [...res.data[0], ...this.templateArray];
  10855. }
  10856. this.$forceUpdate();
  10857. })
  10858. .catch((err) => { });
  10859. },
  10860. clearChoose() {
  10861. this.clearArray.splice(this.templateC.id, 1);
  10862. this.dialogVisible2 = false;
  10863. },
  10864. clearAttText() {
  10865. this.AttText = {
  10866. title: "",
  10867. text: "",
  10868. };
  10869. this.dialogVisible6 = false;
  10870. },
  10871. clearLine() {
  10872. this.line = "";
  10873. this.dialogVisible7 = false;
  10874. },
  10875. openTemplate() {
  10876. this.ctJson = {};
  10877. this.templateDialog = true;
  10878. },
  10879. checkctJson(json) {
  10880. if (this.ctJson.id == json.id) {
  10881. this.ctJson = {};
  10882. } else {
  10883. this.ctJson = json;
  10884. }
  10885. },
  10886. addTemplate(res) {
  10887. let _this = this;
  10888. let _res = [];
  10889. if (res.id == 1) {
  10890. _res = [
  10891. {
  10892. dyName: "", //单元标题
  10893. easy: 1,
  10894. chapterInfo: [
  10895. {
  10896. isread: false,
  10897. chapterid: this.guid(),
  10898. title: "",
  10899. courseName: "",
  10900. taskJson: [
  10901. {
  10902. task: "",
  10903. taskDetail: "",
  10904. chapterData: [],
  10905. toolText: "",
  10906. toolChoose: [
  10907. {
  10908. tool: [],
  10909. toolDetail: "",
  10910. toolType: 0,
  10911. askCount: 1,
  10912. askTitle: "",
  10913. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10914. },
  10915. ],
  10916. isShowTools: false,
  10917. askCount: 1,
  10918. isFold: 1,
  10919. askTitle: "",
  10920. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10921. checkJson: [{ checkCount: [], checkPerent: [] }],
  10922. homeworkList: [],
  10923. },
  10924. ],
  10925. itemCount: 1,
  10926. fileList1: [],
  10927. video: [],
  10928. testData: [],
  10929. pData: [],
  10930. templateArray: [],
  10931. },
  10932. ],
  10933. },
  10934. ];
  10935. this.updateCourseState(1);
  10936. } else if (res.id == 2) {
  10937. let stageData = [];
  10938. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10939. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10940. if (!iframe && !iframe2) {
  10941. this.$message.error("请使用AI共创生成");
  10942. return;
  10943. }
  10944. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10945. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10946. if (
  10947. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  10948. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  10949. ) {
  10950. this.$message.error("请使用AI共创生成");
  10951. return;
  10952. }
  10953. stageData = copyData
  10954. ? copyData.stageData
  10955. : copyData2
  10956. ? copyData2.stageData
  10957. : [""];
  10958. for (var i = 0; i < stageData.length; i++) {
  10959. _res.push({
  10960. dyName: stageData[i], //单元标题
  10961. chapterInfo: [
  10962. {
  10963. isread: false,
  10964. chapterid: this.guid(),
  10965. title: "",
  10966. courseName: "",
  10967. taskJson: [
  10968. {
  10969. task: "",
  10970. taskDetail: "",
  10971. chapterData: [],
  10972. toolText: "",
  10973. toolChoose: [
  10974. {
  10975. tool: [],
  10976. toolDetail: "",
  10977. toolType: 0,
  10978. askCount: 1,
  10979. askTitle: "",
  10980. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10981. },
  10982. ],
  10983. isShowTools: false,
  10984. askCount: 1,
  10985. isFold: 1,
  10986. askTitle: "",
  10987. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10988. checkJson: [{ checkCount: [], checkPerent: [] }],
  10989. homeworkList: [],
  10990. },
  10991. ],
  10992. itemCount: 1,
  10993. fileList1: [],
  10994. video: [],
  10995. testData: [],
  10996. pData: [],
  10997. templateArray: [],
  10998. },
  10999. ],
  11000. });
  11001. }
  11002. this.updateCourseState(1);
  11003. } else if (!Object.keys(res).length) {
  11004. this.$message.error("请选择模板");
  11005. retrun;
  11006. } else {
  11007. _res = JSON.parse(res.chapters);
  11008. this.updateCourseState(parseInt(res.state));
  11009. }
  11010. _this
  11011. .$confirm(
  11012. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11013. "提示",
  11014. {
  11015. confirmButtonText: "确定",
  11016. cancelButtonText: "取消",
  11017. type: "warning",
  11018. }
  11019. )
  11020. .then(() => {
  11021. _this.unitJson = _res;
  11022. _this.updateWork();
  11023. // _this.steps++;
  11024. _this.templateDialog = false;
  11025. setTimeout(() => {
  11026. this.checkEva(this.checkId);
  11027. setTimeout(() => {
  11028. this.checkEva(this.checkId);
  11029. }, 100);
  11030. }, 1000);
  11031. })
  11032. .catch(() => {
  11033. return;
  11034. });
  11035. },
  11036. checkTemplate(res) {
  11037. let _this = this;
  11038. _this
  11039. .$confirm(
  11040. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11041. "提示",
  11042. {
  11043. confirmButtonText: "确定",
  11044. cancelButtonText: "取消",
  11045. type: "warning",
  11046. }
  11047. )
  11048. .then(() => {
  11049. _this.unitJson = JSON.parse(res.chapters);
  11050. _this.steps++;
  11051. setTimeout(() => {
  11052. this.checkEva(this.checkId);
  11053. setTimeout(() => {
  11054. this.checkEva(this.checkId);
  11055. }, 100);
  11056. }, 1000);
  11057. })
  11058. .catch(() => {
  11059. return;
  11060. });
  11061. },
  11062. checkTemplate1(w) {
  11063. this.steps++;
  11064. },
  11065. checkTemplate2() {
  11066. let _this = this;
  11067. _this
  11068. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11069. confirmButtonText: "确定",
  11070. cancelButtonText: "取消",
  11071. type: "warning",
  11072. })
  11073. .then(() => {
  11074. _this.unitIndex = 0;
  11075. _this.unitJson = [
  11076. {
  11077. dyName: "", //单元标题
  11078. chapterInfo: [
  11079. {
  11080. isread: false,
  11081. chapterid: this.guid(),
  11082. title: "",
  11083. courseName: "",
  11084. taskJson: [
  11085. {
  11086. task: "",
  11087. taskDetail: "",
  11088. chapterData: [],
  11089. toolText: "",
  11090. toolChoose: [
  11091. {
  11092. tool: [],
  11093. toolDetail: "",
  11094. toolType: 0,
  11095. askCount: 1,
  11096. askTitle: "",
  11097. askJson: [
  11098. { askstitle: "", askItem: 1, checkList: [] },
  11099. ],
  11100. },
  11101. ],
  11102. isShowTools: false,
  11103. askCount: 1,
  11104. isFold: 1,
  11105. askTitle: "",
  11106. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11107. checkJson: [{ checkCount: [], checkPerent: [] }],
  11108. homeworkList: [],
  11109. },
  11110. ],
  11111. itemCount: 1,
  11112. fileList1: [],
  11113. video: [],
  11114. testData: [],
  11115. pData: [],
  11116. templateArray: [],
  11117. },
  11118. ],
  11119. },
  11120. ];
  11121. this.steps++;
  11122. setTimeout(() => {
  11123. this.checkEva(this.checkId);
  11124. setTimeout(() => {
  11125. this.checkEva(this.checkId);
  11126. }, 100);
  11127. }, 1000);
  11128. this.updateWork();
  11129. })
  11130. .catch(() => {
  11131. return;
  11132. });
  11133. },
  11134. checkTemplate3() {
  11135. let _this = this;
  11136. _this
  11137. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11138. confirmButtonText: "确定",
  11139. cancelButtonText: "取消",
  11140. type: "warning",
  11141. })
  11142. .then(() => {
  11143. _this.unitIndex = 0;
  11144. _this.unitJson = [
  11145. {
  11146. dyName: "", //单元标题
  11147. easy: 1,
  11148. chapterInfo: [
  11149. {
  11150. isread: false,
  11151. chapterid: this.guid(),
  11152. title: "",
  11153. courseName: "",
  11154. taskJson: [
  11155. {
  11156. task: "",
  11157. taskDetail: "",
  11158. chapterData: [],
  11159. toolText: "",
  11160. toolChoose: [
  11161. {
  11162. tool: [],
  11163. toolDetail: "",
  11164. toolType: 0,
  11165. askCount: 1,
  11166. askTitle: "",
  11167. askJson: [
  11168. { askstitle: "", askItem: 1, checkList: [] },
  11169. ],
  11170. },
  11171. ],
  11172. isShowTools: false,
  11173. askCount: 1,
  11174. isFold: 1,
  11175. askTitle: "",
  11176. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11177. checkJson: [{ checkCount: [], checkPerent: [] }],
  11178. homeworkList: [],
  11179. },
  11180. ],
  11181. itemCount: 1,
  11182. fileList1: [],
  11183. video: [],
  11184. testData: [],
  11185. pData: [],
  11186. templateArray: [],
  11187. },
  11188. ],
  11189. },
  11190. ];
  11191. // this.steps++;
  11192. this.updateWork();
  11193. })
  11194. .catch(() => {
  11195. return;
  11196. });
  11197. },
  11198. checkTemplate4() {
  11199. let _this = this;
  11200. _this
  11201. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  11202. confirmButtonText: "确定",
  11203. cancelButtonText: "取消",
  11204. type: "warning",
  11205. })
  11206. .then(() => {
  11207. _this.unitIndex = 0;
  11208. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  11209. this.steps++;
  11210. this.updateWork();
  11211. })
  11212. .catch(() => {
  11213. return;
  11214. });
  11215. },
  11216. wordNext() {
  11217. this.dialogVisible2 = false;
  11218. },
  11219. isAddOrUpdateAttText() {
  11220. if (this.AttTextType == 0) {
  11221. this.addAttTextMessage();
  11222. } else {
  11223. this.updateAttText();
  11224. }
  11225. },
  11226. isAddOrUpdateLine() {
  11227. if (!this.lineTitle) {
  11228. this.$message.error("请填写链接标题");
  11229. return;
  11230. }
  11231. if (this.lineType == 0) {
  11232. this.addLine();
  11233. } else {
  11234. this.updateLine();
  11235. }
  11236. },
  11237. addAttTextMessage() {
  11238. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11239. this.taskCount
  11240. ].chapterData.unshift({
  11241. name: this.AttText.title,
  11242. url: this.AttText.text,
  11243. type: 6,
  11244. });
  11245. this.imgChange1(null, null, 6, this.taskCount);
  11246. this.dialogVisible6 = false;
  11247. },
  11248. selectAttText(itemTaskIndex, i) {
  11249. this.AttText.title =
  11250. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11251. itemTaskIndex
  11252. ].chapterData[i].name;
  11253. this.AttText.text =
  11254. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11255. itemTaskIndex
  11256. ].chapterData[i].url;
  11257. this.taskCount = itemTaskIndex;
  11258. this.AttTextIndex = i;
  11259. this.AttTextType = 1;
  11260. this.dialogVisible6 = true;
  11261. },
  11262. updateAttText() {
  11263. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11264. this.taskCount
  11265. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  11266. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11267. this.taskCount
  11268. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  11269. this.dialogVisible6 = false;
  11270. },
  11271. addLine() {
  11272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11273. this.lineCount
  11274. ].chapterData.unshift({
  11275. name: "链接",
  11276. title: this.lineTitle,
  11277. url: this.line,
  11278. type: 8,
  11279. });
  11280. this.imgChange1(null, null, 8, this.lineCount);
  11281. this.dialogVisible7 = false;
  11282. },
  11283. selectLine(itemTaskIndex, i) {
  11284. this.line =
  11285. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11286. itemTaskIndex
  11287. ].chapterData[i].url;
  11288. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11289. itemTaskIndex
  11290. ].chapterData[i].title
  11291. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11292. .chapterData[i].title
  11293. : "";
  11294. this.taskCount = itemTaskIndex;
  11295. this.lineCount = i;
  11296. this.lineType = 1;
  11297. this.dialogVisible7 = true;
  11298. },
  11299. openUpdateSource(itemTaskIndex, i) {
  11300. this.sourceData = {};
  11301. let source =
  11302. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11303. .chapterData[i];
  11304. this.sourceData[source.id] = {};
  11305. this.sourceData[source.id].name = source.title;
  11306. this.sourceData[source.id].url = source.url;
  11307. this.dialogVisibleSource = true;
  11308. this.updateSourcePan = true;
  11309. this.taskCount = itemTaskIndex;
  11310. this.lineCount = i;
  11311. },
  11312. updateLine() {
  11313. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11314. this.taskCount
  11315. ].chapterData[this.lineCount].url = this.line;
  11316. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11317. this.taskCount
  11318. ].chapterData[this.lineCount].title = this.lineTitle;
  11319. this.dialogVisible7 = false;
  11320. },
  11321. addPP() {
  11322. this.dialogVisible3 = true;
  11323. },
  11324. goTo(path) {
  11325. this.$router.push(path);
  11326. },
  11327. openTools(itemTaskIndex, i, toolIndex) {
  11328. this.toolIndex = toolIndex;
  11329. this.taskCount = itemTaskIndex;
  11330. if (i == 4) {
  11331. if (toolIndex == null) {
  11332. var a =
  11333. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11334. .chapterData;
  11335. for (var i = 0; i < a.length; i++) {
  11336. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  11337. this.askJson =
  11338. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11339. itemTaskIndex
  11340. ].chapterData[i].askJson;
  11341. }
  11342. }
  11343. } else {
  11344. this.askJson = JSON.parse(
  11345. JSON.stringify(
  11346. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11347. itemTaskIndex
  11348. ].toolChoose[toolIndex]
  11349. )
  11350. );
  11351. }
  11352. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  11353. this.dialogVisible5 = true;
  11354. } else if (i == 45) {
  11355. if (
  11356. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11357. .toolChoose[toolIndex].testJson
  11358. ) {
  11359. this.testJson = JSON.parse(
  11360. JSON.stringify(
  11361. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11362. itemTaskIndex
  11363. ].toolChoose[toolIndex].testJson
  11364. )
  11365. );
  11366. } else {
  11367. var testJson = {
  11368. testCount: 1,
  11369. testTitle: "",
  11370. testJson: [
  11371. {
  11372. teststitle: "",
  11373. testItem: 1,
  11374. checkList: [],
  11375. timuList: [],
  11376. answer: [],
  11377. type: "1",
  11378. },
  11379. ],
  11380. };
  11381. this.testJson = testJson;
  11382. }
  11383. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  11384. this.dialogVisibleChoice = true;
  11385. } else if (i == 47) {
  11386. if (
  11387. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11388. .toolChoose[toolIndex].sentenceList
  11389. ) {
  11390. this.sentenceList = JSON.parse(
  11391. JSON.stringify(
  11392. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11393. itemTaskIndex
  11394. ].toolChoose[toolIndex].sentenceList
  11395. )
  11396. );
  11397. } else {
  11398. var sentenceList = [
  11399. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  11400. ];
  11401. this.sentenceList = sentenceList;
  11402. }
  11403. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  11404. this.dialogVisibleSentence = true;
  11405. } else if (i == 48) {
  11406. if (
  11407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11408. .toolChoose[toolIndex].tableJson
  11409. ) {
  11410. this.tableJson = JSON.parse(
  11411. JSON.stringify(
  11412. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11413. itemTaskIndex
  11414. ].toolChoose[toolIndex].tableJson
  11415. )
  11416. );
  11417. } else {
  11418. var tableJson = { text: "" };
  11419. this.tableJson = tableJson;
  11420. }
  11421. this.dialogVisibleTable = true;
  11422. } else if (i == 52) {
  11423. if (
  11424. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11425. .toolChoose[toolIndex].wordJson
  11426. ) {
  11427. this.wordJson = JSON.parse(
  11428. JSON.stringify(
  11429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11430. itemTaskIndex
  11431. ].toolChoose[toolIndex].wordJson
  11432. )
  11433. );
  11434. } else {
  11435. var wordJson = { text: "" };
  11436. this.wordJson = wordJson;
  11437. }
  11438. this.dialogVisibleWord = true;
  11439. // else if (i == 50) {
  11440. // if (
  11441. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11442. // .toolChoose[toolIndex].uploadJson
  11443. // ) {
  11444. // this.uploadJson = JSON.parse(
  11445. // JSON.stringify(
  11446. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11447. // itemTaskIndex
  11448. // ].toolChoose[toolIndex].uploadJson
  11449. // )
  11450. // );
  11451. // } else {
  11452. // var uploadJson = [];
  11453. // this.uploadJson = uploadJson;
  11454. // }
  11455. // this.dialogVisibleMoreUpload = true;
  11456. // }
  11457. } else if (i == 10) {
  11458. if (
  11459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11460. .toolChoose[toolIndex].preTime
  11461. ) {
  11462. this.preTime = JSON.parse(
  11463. JSON.stringify(
  11464. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11465. itemTaskIndex
  11466. ].toolChoose[toolIndex].preTime
  11467. )
  11468. );
  11469. } else {
  11470. var preTime = 0;
  11471. this.preTime = preTime;
  11472. }
  11473. this.dialogVisiblePreTime = true;
  11474. } else if (i == 49) {
  11475. if (
  11476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11477. .toolChoose[toolIndex].groupJson
  11478. ) {
  11479. this.groupJson = JSON.parse(
  11480. JSON.stringify(
  11481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11482. itemTaskIndex
  11483. ].toolChoose[toolIndex].groupJson
  11484. )
  11485. );
  11486. } else {
  11487. var groupJson = {
  11488. group: [{ name: "第1组" }],
  11489. number: undefined,
  11490. islock: 1,
  11491. };
  11492. this.groupJson = groupJson;
  11493. }
  11494. this.dialogVisibleGroup = true;
  11495. } else if (i == 62) {
  11496. if (
  11497. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11498. .toolChoose[toolIndex].videoJson
  11499. ) {
  11500. this.videoJson = JSON.parse(
  11501. JSON.stringify(
  11502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11503. itemTaskIndex
  11504. ].toolChoose[toolIndex].videoJson
  11505. )
  11506. );
  11507. } else {
  11508. var videoJson = {
  11509. video: "",
  11510. setting: [],
  11511. };
  11512. this.videoJson = videoJson;
  11513. }
  11514. this.dialogVisibleVideo = true;
  11515. } else if (i == 15) {
  11516. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11517. itemTaskIndex
  11518. ].toolChoose[toolIndex].answerQ
  11519. ? JSON.parse(
  11520. JSON.stringify(
  11521. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11522. itemTaskIndex
  11523. ].toolChoose[toolIndex].answerQ
  11524. )
  11525. )
  11526. : "";
  11527. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  11528. this.dialogVisible8 = true;
  11529. } else if (i == 40) {
  11530. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11531. itemTaskIndex
  11532. ].toolChoose[toolIndex].rateJson
  11533. ? JSON.parse(
  11534. JSON.stringify(
  11535. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11536. itemTaskIndex
  11537. ].toolChoose[toolIndex].rateJson
  11538. )
  11539. )
  11540. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  11541. this.selectSteps = 1;
  11542. this.dialogVisibleRate = true;
  11543. } else if (i == 42) {
  11544. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11545. itemTaskIndex
  11546. ].toolChoose[toolIndex].answerQ
  11547. ? JSON.parse(
  11548. JSON.stringify(
  11549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11550. itemTaskIndex
  11551. ].toolChoose[toolIndex].answerQ
  11552. )
  11553. )
  11554. : "";
  11555. this.dialogVisibleMp3 = true;
  11556. } else if (i == 41) {
  11557. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11558. itemTaskIndex
  11559. ].toolChoose[toolIndex].selectJson
  11560. ? JSON.parse(
  11561. JSON.stringify(
  11562. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11563. itemTaskIndex
  11564. ].toolChoose[toolIndex].selectJson
  11565. )
  11566. )
  11567. : { url: "", select: [], answer: [] };
  11568. this.selectSteps = 1;
  11569. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  11570. this.dialogVisibleSelect = true;
  11571. } else if (i == 3) {
  11572. top.postMessage(
  11573. {
  11574. tools: "3y",
  11575. cid: this.cid,
  11576. stage: this.unitIndex,
  11577. task: itemTaskIndex,
  11578. tool: toolIndex,
  11579. },
  11580. "*"
  11581. );
  11582. } else if (i == 1) {
  11583. top.postMessage(
  11584. {
  11585. tools: "1y",
  11586. cid: this.cid,
  11587. stage: this.unitIndex,
  11588. task: itemTaskIndex,
  11589. tool: toolIndex,
  11590. },
  11591. "*"
  11592. );
  11593. } else if (i == 57) {
  11594. top.postMessage(
  11595. {
  11596. tools: "57y",
  11597. cid: this.cid,
  11598. stage: this.unitIndex,
  11599. task: itemTaskIndex,
  11600. tool: toolIndex,
  11601. },
  11602. "*"
  11603. );
  11604. } else if (i == 69) {
  11605. this.englishList = {};
  11606. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  11607. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  11608. ? JSON.parse(
  11609. JSON.stringify(
  11610. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11611. itemTaskIndex
  11612. ].toolChoose[toolIndex].englishList
  11613. )
  11614. )
  11615. : {};
  11616. this.$forceUpdate();
  11617. this.englishDialogVisible = true;
  11618. } else if (i == 70) {
  11619. this.englishVoiceJson = {};
  11620. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  11621. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  11622. ? JSON.parse(
  11623. JSON.stringify(
  11624. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11625. itemTaskIndex
  11626. ].toolChoose[toolIndex].englishVoiceJson
  11627. )
  11628. )
  11629. : {
  11630. title: '',
  11631. detail: '',
  11632. array: []
  11633. };
  11634. // {
  11635. // time: "",
  11636. // class: "",
  11637. // difficulty: 0,
  11638. // topic: "",
  11639. // isShow: false,
  11640. // eva: 0,
  11641. // aiEva: {
  11642. // isAiEva: false,
  11643. // aiEvaChoose: [],
  11644. // },
  11645. // allfType: [],
  11646. // englishJson: {},
  11647. // };
  11648. this.$forceUpdate();
  11649. this.EnglishVoiceDialog = true;
  11650. }
  11651. },
  11652. setEnglishVoiceJson(val) {
  11653. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11654. this.taskCount
  11655. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  11656. JSON.stringify(val)
  11657. );
  11658. this.$forceUpdate();
  11659. if (
  11660. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11661. .toolChoose[this.toolIndex].tool != 70
  11662. ) {
  11663. this.addTools(70, this.taskCount, this.toolIndex);
  11664. }
  11665. },
  11666. chapAddTools(i) {
  11667. if (this.chapTools[0].tools.length == 0) {
  11668. this.chapTools[0].tools.push(i);
  11669. } else {
  11670. if (this.chapTools[0].tools.indexOf(i) != -1) {
  11671. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  11672. } else {
  11673. this.chapTools[0].tools.push(i);
  11674. }
  11675. }
  11676. this.$forceUpdate();
  11677. },
  11678. addChaptersDataTools() {
  11679. if (this.chapTools[0].tools.indexOf(4) != -1) {
  11680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11681. this.chapCount
  11682. ].chapterData.unshift({
  11683. name: this.chapTools[0].toolDetail,
  11684. url: this.chapTools[0].tools,
  11685. type: 7,
  11686. askJson: this.askJson,
  11687. });
  11688. } else {
  11689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11690. this.chapCount
  11691. ].chapterData.unshift({
  11692. name: this.chapTools[0].toolDetail,
  11693. url: this.chapTools[0].tools,
  11694. type: 7,
  11695. });
  11696. }
  11697. this.imgChange1(null, null, 7, this.chapCount);
  11698. this.dialogVisible4 = false;
  11699. },
  11700. addTools(i, itemTaskIndex, toolIndex) {
  11701. // if (
  11702. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11703. // .toolChoose[toolIndex].tool.length == 0
  11704. // ) {
  11705. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11706. // itemTaskIndex
  11707. // ].toolChoose[toolIndex].tool.push(i);
  11708. // } else {
  11709. // if (
  11710. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11711. // itemTaskIndex
  11712. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11713. // ) {
  11714. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11715. // itemTaskIndex
  11716. // ].toolChoose[toolIndex].tool.splice(
  11717. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11718. // itemTaskIndex
  11719. // ].toolChoose[toolIndex].tool.indexOf(i),
  11720. // 1
  11721. // );
  11722. // } else {
  11723. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11724. // itemTaskIndex
  11725. // ].toolChoose[toolIndex].tool.push(i);
  11726. // }
  11727. // console.log(
  11728. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11729. // .toolChoose[toolIndex].tool
  11730. // );
  11731. // }
  11732. if (i == 4) {
  11733. if (
  11734. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11735. .toolChoose[toolIndex].askJson.askTitle == "" ||
  11736. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11737. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  11738. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11739. .toolChoose[toolIndex].askJson[0].checkList < 2
  11740. ) {
  11741. this.openTools(itemTaskIndex, 4, toolIndex);
  11742. // this.$message({
  11743. // message: "请填写完整问卷内容",
  11744. // type: "error",
  11745. // });
  11746. return;
  11747. }
  11748. }
  11749. if (i == 45) {
  11750. if (
  11751. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11752. .toolChoose[toolIndex].testJson ||
  11753. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11754. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  11755. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11756. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  11757. ) {
  11758. this.openTools(itemTaskIndex, 45, toolIndex);
  11759. // this.$message({
  11760. // message: "请填写完整问卷内容",
  11761. // type: "error",
  11762. // });
  11763. return;
  11764. }
  11765. }
  11766. if (i == 47) {
  11767. if (
  11768. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11769. .toolChoose[toolIndex].sentenceList ||
  11770. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11771. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  11772. ) {
  11773. this.openTools(itemTaskIndex, 47, toolIndex);
  11774. return;
  11775. }
  11776. }
  11777. if (i == 69) {
  11778. if (
  11779. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11780. .toolChoose[toolIndex].englishList
  11781. ) {
  11782. this.openTools(itemTaskIndex, 69, toolIndex);
  11783. return;
  11784. }
  11785. }
  11786. if (i == 70) {
  11787. if (
  11788. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11789. .toolChoose[toolIndex].englishVoiceJson
  11790. ) {
  11791. this.openTools(itemTaskIndex, 70, toolIndex);
  11792. return;
  11793. }
  11794. }
  11795. // if (i == 48) {
  11796. // if (
  11797. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11798. // .toolChoose[toolIndex].tableJson
  11799. // ) {
  11800. // this.openTools(itemTaskIndex, 48, toolIndex);
  11801. // return;
  11802. // }
  11803. // }
  11804. // if (i == 50) {
  11805. // if (
  11806. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11807. // .toolChoose[toolIndex].uploadJson
  11808. // ) {
  11809. // this.openTools(itemTaskIndex, 50, toolIndex);
  11810. // return;
  11811. // }
  11812. // }
  11813. if (i == 49) {
  11814. if (
  11815. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11816. .toolChoose[toolIndex].groupJson
  11817. ) {
  11818. this.openTools(itemTaskIndex, 49, toolIndex);
  11819. return;
  11820. }
  11821. }
  11822. if (i == 62) {
  11823. if (
  11824. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11825. .toolChoose[toolIndex].videoJson
  11826. ) {
  11827. this.openTools(itemTaskIndex, 62, toolIndex);
  11828. return;
  11829. }
  11830. }
  11831. if (i == 15) {
  11832. if (
  11833. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11834. .toolChoose[toolIndex].answerQ ||
  11835. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11836. .toolChoose[toolIndex].answerQ == ""
  11837. ) {
  11838. this.openTools(itemTaskIndex, 15, toolIndex);
  11839. // this.$message({
  11840. // message: "请填写问答内容",
  11841. // type: "error",
  11842. // });
  11843. return;
  11844. }
  11845. }
  11846. if (i == 40) {
  11847. if (
  11848. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11849. .toolChoose[toolIndex].rateJson ||
  11850. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11851. .toolChoose[toolIndex].rateJson.length
  11852. ) {
  11853. this.openTools(itemTaskIndex, 40, toolIndex);
  11854. return;
  11855. }
  11856. }
  11857. if (i == 41) {
  11858. if (
  11859. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11860. .toolChoose[toolIndex].selectJson ||
  11861. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11862. .toolChoose[toolIndex].selectJson.url == "" ||
  11863. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11864. .toolChoose[toolIndex].selectJson.select.length ||
  11865. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11866. .toolChoose[toolIndex].selectJson.answer.length
  11867. ) {
  11868. this.openTools(itemTaskIndex, 41, toolIndex);
  11869. return;
  11870. }
  11871. }
  11872. if (i == 42) {
  11873. if (
  11874. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11875. .toolChoose[toolIndex].answerQ ||
  11876. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11877. .toolChoose[toolIndex].answerQ == ""
  11878. ) {
  11879. this.openTools(itemTaskIndex, 42, toolIndex);
  11880. return;
  11881. }
  11882. }
  11883. if (
  11884. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11885. .toolChoose[toolIndex].tool.length > 0
  11886. ) {
  11887. if (
  11888. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11889. itemTaskIndex
  11890. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11891. ) {
  11892. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11893. itemTaskIndex
  11894. ].toolChoose[toolIndex].tool.splice(
  11895. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11896. itemTaskIndex
  11897. ].toolChoose[toolIndex].tool.indexOf(i),
  11898. 1
  11899. );
  11900. } else {
  11901. // this.$message({
  11902. // message: "每个工具只能添加一个",
  11903. // type: "error",
  11904. // });
  11905. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11906. itemTaskIndex
  11907. ].toolChoose[toolIndex].tool = [];
  11908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11909. itemTaskIndex
  11910. ].toolChoose[toolIndex].tool.push(i);
  11911. }
  11912. } else {
  11913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11914. itemTaskIndex
  11915. ].toolChoose[toolIndex].tool.push(i);
  11916. }
  11917. this.$forceUpdate();
  11918. },
  11919. addAskList(index) {
  11920. this.askJson.askJson.splice(index + 1, 0, {
  11921. askstitle: "",
  11922. askItem: 1,
  11923. checkList: [],
  11924. });
  11925. this.askJson.askCount++;
  11926. },
  11927. addTestList(index) {
  11928. this.testJson.testJson.splice(index + 1, 0, {
  11929. teststitle: "",
  11930. testItem: 1,
  11931. checkList: [],
  11932. timuList: [],
  11933. answer: [],
  11934. type: "1",
  11935. });
  11936. this.testJson.testCount++;
  11937. },
  11938. deleteAskList(index) {
  11939. if (
  11940. !this.askJson.askJson[index].askstitle &&
  11941. this.askJson.askJson[index].askItem == 1 &&
  11942. !this.askJson.askJson[index].checkList[0]
  11943. ) {
  11944. this.askJson.askJson.splice(index, 1);
  11945. this.askJson.askCount--;
  11946. } else {
  11947. let _this = this;
  11948. _this
  11949. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11950. confirmButtonText: "确定",
  11951. cancelButtonText: "取消",
  11952. type: "warning",
  11953. })
  11954. .then(() => {
  11955. _this.askJson.askJson.splice(index, 1);
  11956. _this.askJson.askCount--;
  11957. })
  11958. .catch(() => {
  11959. return;
  11960. });
  11961. }
  11962. },
  11963. deleteTestList(index) {
  11964. if (
  11965. !this.testJson.testJson[index].teststitle &&
  11966. this.testJson.testJson[index].testItem == 1 &&
  11967. !this.testJson.testJson[index].checkList[0]
  11968. ) {
  11969. this.testJson.testJson.splice(index, 1);
  11970. this.testJson.testCount--;
  11971. } else {
  11972. let _this = this;
  11973. _this
  11974. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11975. confirmButtonText: "确定",
  11976. cancelButtonText: "取消",
  11977. type: "warning",
  11978. })
  11979. .then(() => {
  11980. _this.testJson.testJson.splice(index, 1);
  11981. _this.testJson.testCount--;
  11982. })
  11983. .catch(() => {
  11984. return;
  11985. });
  11986. }
  11987. },
  11988. askMove(type, index) {
  11989. if (type == 1) {
  11990. if (index > 0) {
  11991. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  11992. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  11993. this.askJson.askJson[index - 1] = b;
  11994. this.askJson.askJson[index] = a;
  11995. }
  11996. } else {
  11997. if (index < this.askJson.askJson.length - 1) {
  11998. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  11999. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12000. this.askJson.askJson[index + 1] = b;
  12001. this.askJson.askJson[index] = a;
  12002. }
  12003. }
  12004. this.$forceUpdate();
  12005. },
  12006. checkMove(type, index, checkIndex) {
  12007. if (type == 1) {
  12008. if (checkIndex > 0) {
  12009. let a = JSON.parse(
  12010. JSON.stringify(
  12011. this.askJson.askJson[index].checkList[checkIndex - 1]
  12012. )
  12013. );
  12014. let b = JSON.parse(
  12015. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12016. );
  12017. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12018. this.askJson.askJson[index].checkList[checkIndex] = a;
  12019. }
  12020. } else {
  12021. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12022. let a = JSON.parse(
  12023. JSON.stringify(
  12024. this.askJson.askJson[index].checkList[checkIndex + 1]
  12025. )
  12026. );
  12027. let b = JSON.parse(
  12028. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12029. );
  12030. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12031. this.askJson.askJson[index].checkList[checkIndex] = a;
  12032. }
  12033. }
  12034. this.$forceUpdate();
  12035. },
  12036. testMove(type, index) {
  12037. if (type == 1) {
  12038. if (index > 0) {
  12039. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12040. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12041. this.testJson.testJson[index - 1] = b;
  12042. this.testJson.testJson[index] = a;
  12043. }
  12044. } else {
  12045. if (index < this.testJson.testJson.length - 1) {
  12046. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12047. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12048. this.testJson.testJson[index + 1] = b;
  12049. this.testJson.testJson[index] = a;
  12050. }
  12051. }
  12052. this.$forceUpdate();
  12053. },
  12054. tcheckMove(type, index, checkIndex) {
  12055. if (type == 1) {
  12056. if (checkIndex > 0) {
  12057. let a = JSON.parse(
  12058. JSON.stringify(
  12059. this.testJson.testJson[index].checkList[checkIndex - 1]
  12060. )
  12061. );
  12062. let b = JSON.parse(
  12063. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12064. );
  12065. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12066. this.testJson.testJson[index].checkList[checkIndex] = a;
  12067. }
  12068. } else {
  12069. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12070. let a = JSON.parse(
  12071. JSON.stringify(
  12072. this.testJson.testJson[index].checkList[checkIndex + 1]
  12073. )
  12074. );
  12075. let b = JSON.parse(
  12076. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12077. );
  12078. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12079. this.testJson.testJson[index].checkList[checkIndex] = a;
  12080. }
  12081. }
  12082. this.$forceUpdate();
  12083. },
  12084. addcheckList(json, index) {
  12085. // json.checkList.length++;
  12086. json.checkList.splice(index + 1, 0, "");
  12087. json.askItem++;
  12088. this.$forceUpdate();
  12089. },
  12090. deletecheckList(json, index) {
  12091. // json.checkList.length--;
  12092. json.checkList.splice(index, 1);
  12093. json.askItem--;
  12094. this.$forceUpdate();
  12095. },
  12096. addTcheckList(json, index) {
  12097. // json.checkList.length++;
  12098. json.checkList.splice(index + 1, 0, "");
  12099. json.testItem++;
  12100. this.$forceUpdate();
  12101. },
  12102. deleteTcheckList(json, index) {
  12103. // json.checkList.length--;
  12104. json.checkList.splice(index, 1);
  12105. json.testItem--;
  12106. this.$forceUpdate();
  12107. },
  12108. checkTestType(type, json) {
  12109. json.type = type;
  12110. setTimeout(() => {
  12111. json.answer = [];
  12112. }, 100);
  12113. },
  12114. checkAskType(type, json) {
  12115. json.type = type;
  12116. // json.checkList = [];
  12117. this.$forceUpdate();
  12118. },
  12119. addSelectList(json) {
  12120. json.select.push("");
  12121. json.answer.push("");
  12122. },
  12123. deleteSelectList(json) {
  12124. // json.select.length--;
  12125. // json.answer.length--;
  12126. json.select.splice(json.select.length - 1, 1);
  12127. json.answer.splice(json.answer.length - 1, 1);
  12128. },
  12129. addAsk() {
  12130. if (this.askJson.askTitle === "") {
  12131. this.$message.error("标题不能为空!");
  12132. return;
  12133. }
  12134. var aj = this.askJson.askJson;
  12135. var b = 1;
  12136. for (var i = 0; i < aj.length; i++) {
  12137. if (aj[i].askstitle === "") {
  12138. var a = 1;
  12139. for (let index = 0; index < aj[i].askItem; index++) {
  12140. const element = aj[i].checkList[index]
  12141. ? aj[i].checkList[index]
  12142. : "";
  12143. if (element != "") {
  12144. b++;
  12145. this.$message.error(`请将题目${i + 1}填写完整。`);
  12146. return;
  12147. } else {
  12148. a++;
  12149. }
  12150. }
  12151. if (b == 1) {
  12152. this.$message.error("至少填写一个问题");
  12153. return;
  12154. }
  12155. } else if (aj[i].askstitle != "") {
  12156. for (let index = 0; index < aj[i].askItem; index++) {
  12157. const element = aj[i].checkList[index]
  12158. ? aj[i].checkList[index]
  12159. : "";
  12160. var index = 0;
  12161. for (var z = 0; z < aj[i].checkList.length; z++) {
  12162. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12163. if (checkC != "") {
  12164. index++;
  12165. } else {
  12166. this.$message.error(`题目${i + 1}选项不能为空!`);
  12167. return;
  12168. }
  12169. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12170. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12171. if (checkC == checkC2) {
  12172. this.$message.error(
  12173. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12174. );
  12175. return;
  12176. }
  12177. }
  12178. }
  12179. b++;
  12180. if (index < 2) {
  12181. this.$message.error("每道题目至少需要设置2个选项。");
  12182. return;
  12183. }
  12184. }
  12185. }
  12186. }
  12187. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  12188. var elc = el.checkList.filter((element) => {
  12189. return element != "";
  12190. });
  12191. return el.askstitle != "" && elc.length != 0;
  12192. });
  12193. if (!this.dialogVisible4) {
  12194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12195. this.taskCount
  12196. ].toolChoose[this.toolIndex] = this.askJson;
  12197. }
  12198. this.dialogVisible5 = false;
  12199. if (
  12200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12201. .toolChoose[this.toolIndex].tool != 4
  12202. ) {
  12203. this.addTools(4, this.taskCount, this.toolIndex);
  12204. }
  12205. },
  12206. addTest() {
  12207. // if (this.testJson.testTitle === "") {
  12208. // this.$message.error("标题不能为空!");
  12209. // return;
  12210. // }
  12211. var aj = this.testJson.testJson;
  12212. var b = 1;
  12213. for (var i = 0; i < aj.length; i++) {
  12214. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  12215. var a = 1;
  12216. for (let index = 0; index < aj[i].testItem; index++) {
  12217. const element = aj[i].checkList[index]
  12218. ? aj[i].checkList[index]
  12219. : "";
  12220. if (element != "") {
  12221. b++;
  12222. this.$message.error(`请将题目${i + 1}填写完整。`);
  12223. return;
  12224. } else {
  12225. a++;
  12226. }
  12227. }
  12228. if (b == 1) {
  12229. this.$message.error("至少填写一个问题");
  12230. return;
  12231. }
  12232. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  12233. for (let index = 0; index < aj[i].testItem; index++) {
  12234. const element = aj[i].checkList[index]
  12235. ? aj[i].checkList[index]
  12236. : "";
  12237. var index = 0;
  12238. for (var z = 0; z < aj[i].checkList.length; z++) {
  12239. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12240. if (checkC != "") {
  12241. index++;
  12242. } else {
  12243. this.$message.error(`题目${i + 1}选项不能为空!`);
  12244. return;
  12245. }
  12246. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12247. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12248. if (checkC == checkC2) {
  12249. this.$message.error(
  12250. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12251. );
  12252. return;
  12253. }
  12254. }
  12255. }
  12256. b++;
  12257. if (index < 2) {
  12258. this.$message.error("每道题目至少需要设置2个选项。");
  12259. return;
  12260. }
  12261. if (
  12262. (aj[i].type == "2" && !aj[i].answer.length) ||
  12263. (aj[i].type == "1" &&
  12264. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  12265. (aj[i].answer !== 0 && !aj[i].answer)))
  12266. ) {
  12267. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  12268. return;
  12269. }
  12270. }
  12271. }
  12272. }
  12273. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12274. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12275. var elc = el.checkList.filter((element) => {
  12276. return element != "";
  12277. });
  12278. return (
  12279. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  12280. );
  12281. });
  12282. isTestJson.testCount = isTestJson.testJson.length;
  12283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12284. this.taskCount
  12285. ].toolChoose[this.toolIndex].testJson = isTestJson;
  12286. this.dialogVisibleChoice = false;
  12287. if (
  12288. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12289. .toolChoose[this.toolIndex].tool != 45
  12290. ) {
  12291. this.addTools(45, this.taskCount, this.toolIndex);
  12292. }
  12293. },
  12294. addVideoJson(videoJson) {
  12295. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12296. this.taskCount
  12297. ].toolChoose[this.toolIndex].videoJson = videoJson;
  12298. this.dialogVisibleVideo = false;
  12299. if (
  12300. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12301. .toolChoose[this.toolIndex].tool != 62
  12302. ) {
  12303. this.addTools(62, this.taskCount, this.toolIndex);
  12304. }
  12305. },
  12306. //自动获取剪贴板
  12307. pasteOption() {
  12308. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12309. if (!iframe) {
  12310. this.$message.error("请使用AI共创生成题目");
  12311. return;
  12312. }
  12313. let copyData = iframe.contentWindow.copyData;
  12314. if (!copyData || !copyData.selectData.length) {
  12315. this.$message.error("请使用AI共创生成题目");
  12316. return;
  12317. }
  12318. let selectData = copyData.selectData;
  12319. for (var i = 0; i < selectData.length; i++) {
  12320. let answer = 0;
  12321. switch (selectData[i].answer[0]) {
  12322. case "A":
  12323. answer = 0;
  12324. break;
  12325. case "B":
  12326. answer = 1;
  12327. break;
  12328. case "C":
  12329. answer = 2;
  12330. break;
  12331. case "D":
  12332. answer = 3;
  12333. break;
  12334. case "E":
  12335. answer = 4;
  12336. break;
  12337. default:
  12338. break;
  12339. }
  12340. this.testJson.testJson.push({
  12341. teststitle: selectData[i].subject,
  12342. testItem: selectData[i].options.length,
  12343. checkList: selectData[i].options,
  12344. timuList: [],
  12345. answer: answer,
  12346. type: "1",
  12347. });
  12348. this.testJson.testCount++;
  12349. }
  12350. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12351. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12352. var elc = el.checkList.filter((element) => {
  12353. return element != "";
  12354. });
  12355. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  12356. });
  12357. isTestJson.testCount = isTestJson.testJson.length;
  12358. if (!isTestJson.testCount) {
  12359. return;
  12360. }
  12361. this.testJson = isTestJson;
  12362. this.$forceUpdate();
  12363. },
  12364. pasteTask(taskJson) {
  12365. let stageTasksData = [];
  12366. if (taskJson) {
  12367. stageTasksData = taskJson;
  12368. } else {
  12369. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12370. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12371. if (!iframe && !iframe2) {
  12372. this.$message.error("请使用AI共创生成");
  12373. return;
  12374. }
  12375. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12376. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12377. if (
  12378. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  12379. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  12380. ) {
  12381. this.$message.error("请使用AI共创生成");
  12382. return;
  12383. }
  12384. stageTasksData = copyData
  12385. ? copyData.tasksData
  12386. : copyData2
  12387. ? copyData2.tasksData
  12388. : [{ taskName: "", taskDecs: "" }];
  12389. }
  12390. let taskA = [];
  12391. let tasks = stageTasksData;
  12392. for (var j = 0; j < tasks.length; j++) {
  12393. taskA.push({
  12394. task: tasks[j].taskName,
  12395. taskDetail: tasks[j].taskDecs,
  12396. chapterData: [],
  12397. toolText: "",
  12398. toolChoose: [
  12399. {
  12400. tool: [],
  12401. toolDetail: "",
  12402. toolType: 0,
  12403. askCount: 1,
  12404. askTitle: "",
  12405. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12406. },
  12407. ],
  12408. isShowTools: false,
  12409. askCount: 1,
  12410. isFold: 1,
  12411. askTitle: "",
  12412. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12413. checkJson: [{ checkCount: [], checkPerent: [] }],
  12414. homeworkList: [],
  12415. });
  12416. }
  12417. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  12418. this.$forceUpdate();
  12419. },
  12420. pasteStage(stageJson) {
  12421. let stageData = [];
  12422. if (stageJson) {
  12423. stageData = stageJson;
  12424. } else {
  12425. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12426. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12427. if (!iframe && !iframe2) {
  12428. this.$message.error("请使用AI共创生成");
  12429. return;
  12430. }
  12431. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12432. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12433. if (
  12434. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12435. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12436. ) {
  12437. this.$message.error("请使用AI共创生成");
  12438. return;
  12439. }
  12440. stageData = copyData
  12441. ? copyData.stageData
  12442. : copyData2
  12443. ? copyData2.stageData
  12444. : [""];
  12445. }
  12446. let stage = [];
  12447. for (var i = 0; i < stageData.length; i++) {
  12448. stage.push({
  12449. dyName: stageData[i], //单元标题
  12450. chapterInfo: [
  12451. {
  12452. isread: false,
  12453. chapterid: this.guid(),
  12454. title: "",
  12455. courseName: "",
  12456. taskJson: [
  12457. {
  12458. task: "",
  12459. taskDetail: "",
  12460. chapterData: [],
  12461. toolText: "",
  12462. toolChoose: [
  12463. {
  12464. tool: [],
  12465. toolDetail: "",
  12466. toolType: 0,
  12467. askCount: 1,
  12468. askTitle: "",
  12469. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12470. },
  12471. ],
  12472. isShowTools: false,
  12473. askCount: 1,
  12474. isFold: 1,
  12475. askTitle: "",
  12476. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12477. checkJson: [{ checkCount: [], checkPerent: [] }],
  12478. homeworkList: [],
  12479. },
  12480. ],
  12481. itemCount: 1,
  12482. fileList1: [],
  12483. video: [],
  12484. testData: [],
  12485. pData: [],
  12486. templateArray: [],
  12487. },
  12488. ],
  12489. });
  12490. }
  12491. let _this = this;
  12492. if (stageJson) {
  12493. if (!_this.cid) {
  12494. _this.unitJson = stage;
  12495. } else {
  12496. _this.unitIndex = 0;
  12497. _this.unitJson = stage;
  12498. _this.updateWork();
  12499. }
  12500. } else {
  12501. _this
  12502. .$confirm(
  12503. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  12504. "提示",
  12505. {
  12506. confirmButtonText: "确定",
  12507. cancelButtonText: "取消",
  12508. type: "warning",
  12509. }
  12510. )
  12511. .then(() => {
  12512. _this.unitIndex = 0;
  12513. _this.unitJson = stage;
  12514. // _this.steps++;
  12515. _this.updateWork();
  12516. })
  12517. .catch(() => {
  12518. return;
  12519. });
  12520. }
  12521. },
  12522. openStageBox() {
  12523. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  12524. this.dialogVisibleStageChange = true;
  12525. },
  12526. updateChange() {
  12527. this.$confirm(
  12528. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  12529. "提示",
  12530. {
  12531. confirmButtonText: "确定",
  12532. cancelButtonText: "取消",
  12533. type: "warning",
  12534. }
  12535. )
  12536. .then(() => {
  12537. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  12538. this.updateWork();
  12539. this.dialogVisibleStageChange = false;
  12540. })
  12541. .catch(() => {
  12542. return;
  12543. });
  12544. },
  12545. addAnswer() {
  12546. if (this.answerQ == "") {
  12547. this.$message.error("请输入您想要问的问题");
  12548. return;
  12549. }
  12550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12551. this.taskCount
  12552. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12553. this.dialogVisible8 = false;
  12554. if (
  12555. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12556. .toolChoose[this.toolIndex].tool != 15
  12557. ) {
  12558. this.addTools(15, this.taskCount, this.toolIndex);
  12559. }
  12560. },
  12561. addMp3Answer() {
  12562. if (this.answerQ == "") {
  12563. this.$message.error("请输入您想要回答的问题");
  12564. return;
  12565. }
  12566. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12567. this.taskCount
  12568. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12569. this.dialogVisibleMp3 = false;
  12570. },
  12571. addRateAnswer() {
  12572. var a = 1;
  12573. for (var i = 0; i < this.rateJson.length; i++) {
  12574. if (this.rateJson[i].value == "") {
  12575. a = 2;
  12576. break;
  12577. }
  12578. }
  12579. if (a == 2) {
  12580. this.$message.error("请把评价信息填写完整");
  12581. return;
  12582. }
  12583. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12584. this.taskCount
  12585. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  12586. this.dialogVisibleRate = false;
  12587. if (
  12588. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12589. .toolChoose[this.toolIndex].tool != 40
  12590. ) {
  12591. this.addTools(40, this.taskCount, this.toolIndex);
  12592. }
  12593. },
  12594. addSelectAnswer() {
  12595. if (this.selectJson.url == "") {
  12596. this.$message.error("请上传题目");
  12597. return;
  12598. }
  12599. if (!this.selectJson.select.length) {
  12600. this.$message.error("请添加选项");
  12601. return;
  12602. }
  12603. if (!this.selectJson.answer.length) {
  12604. this.$message.error("请设置答案");
  12605. return;
  12606. }
  12607. var a = 1;
  12608. for (var i = 0; i < this.selectJson.answer.length; i++) {
  12609. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  12610. a = 2;
  12611. }
  12612. }
  12613. if (a == 2) {
  12614. this.$message.error("请设置答案");
  12615. return;
  12616. }
  12617. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12618. this.taskCount
  12619. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  12620. this.dialogVisibleSelect = false;
  12621. if (
  12622. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12623. .toolChoose[this.toolIndex].tool != 41
  12624. ) {
  12625. this.addTools(41, this.taskCount, this.toolIndex);
  12626. }
  12627. },
  12628. nextSelectSteps() {
  12629. if (this.selectJson.url == "") {
  12630. this.$message.error("请上传题目");
  12631. return;
  12632. }
  12633. if (!this.selectJson.select.length) {
  12634. this.$message.error("请添加选项");
  12635. return;
  12636. } else {
  12637. for (var z = 0; z < this.selectJson.select.length; z++) {
  12638. let checkC = this.selectJson.select[z];
  12639. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  12640. let checkC2 = this.selectJson.select[z2];
  12641. if (checkC == checkC2) {
  12642. this.$message.error(
  12643. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12644. );
  12645. return;
  12646. }
  12647. }
  12648. }
  12649. }
  12650. var a = 1;
  12651. for (var i = 0; i < this.selectJson.select.length; i++) {
  12652. if (!this.selectJson.select[i]) {
  12653. a = 2;
  12654. }
  12655. }
  12656. if (a == 2) {
  12657. this.$message.error("添加的选项不能为空");
  12658. return;
  12659. }
  12660. this.selectSteps++;
  12661. },
  12662. selectCourseDetail() {
  12663. if (this.cid == "" || this.cid == undefined) {
  12664. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  12665. this.isTeacherSee = true;
  12666. }
  12667. console.log("这是新增课程");
  12668. this.selectAllType();
  12669. } else {
  12670. this.isOutline = true
  12671. this.isOutline2 = true
  12672. this.cpoteType = 4
  12673. this.cidType = 1;
  12674. let params = {
  12675. cid: this.cid,
  12676. };
  12677. this.ajax
  12678. .get(this.$store.state.api + "select_course_detail", params)
  12679. .then((res) => {
  12680. this.unitJson = JSON.parse(res.data[0][0].chapters);
  12681. this.courseState = res.data[0][0].state;
  12682. for (var j = 0; j < this.unitJson.length; j++) {
  12683. for (
  12684. var k = 0;
  12685. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  12686. k++
  12687. ) {
  12688. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  12689. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12690. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12691. : [];
  12692. let _chapterData = [];
  12693. for (
  12694. var c = 0;
  12695. c <
  12696. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  12697. .length;
  12698. c++
  12699. ) {
  12700. if (
  12701. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12702. ) {
  12703. _chapterData.push(
  12704. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12705. );
  12706. }
  12707. }
  12708. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  12709. _chapterData;
  12710. }
  12711. }
  12712. this.$forceUpdate();
  12713. this.courseName = res.data[0][0].title;
  12714. this.courseText = res.data[0][0].brief;
  12715. this.courseText2 = res.data[0][0].reBrief;
  12716. this.evalua = res.data[0][0].evaId;
  12717. this.cover = JSON.parse(res.data[0][0].cover);
  12718. this.noneBtnImg = this.cover.length >= 1;
  12719. if (res.data[0][0].refile) {
  12720. this.infoData = JSON.parse(res.data[0][0].refile)
  12721. }
  12722. // this.checkboxList =
  12723. // res.data[0][0].course_student.length > 0
  12724. // ? JSON.parse(res.data[0][0].course_student)
  12725. // : [];
  12726. this.checkboxList2 = res.data[0][0].juri
  12727. ? res.data[0][0].juri.split(",")
  12728. : [];
  12729. this.inviteCode = [];
  12730. for (var i = 0; i < res.data[2].length; i++) {
  12731. this.inviteCode.push({
  12732. cid: res.data[2][i].classid,
  12733. ic: res.data[2][i].code,
  12734. });
  12735. }
  12736. this.checkboxList3 = res.data[0][0].course_teacher
  12737. ? res.data[0][0].course_teacher.split(",")
  12738. : [];
  12739. // this.isTeacherSee =
  12740. // res.data[0][0].is_teacher_look == 0 ? true : false;
  12741. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12742. this.myWord = res.data[0][0].template;
  12743. this.templateC.id = "123";
  12744. this.courseUserid = res.data[0][0].userid;
  12745. // if(this.courseUserid == this.userid){
  12746. // this.InviteChange(this.checkboxList2)
  12747. // }
  12748. this.nbOrder = res.data[0][0].ordernumber;
  12749. this.courseTypeId = [];
  12750. for (var i = 0; i < res.data[1].length; i++) {
  12751. this.courseTypeId.push(res.data[1][i].typeid);
  12752. }
  12753. console.log(this.courseTypeId);
  12754. // if (this.timer) clearInterval(this.timer);
  12755. if (this.timer) clearTimeout(this.timer);
  12756. this.timer = null;
  12757. // this.timer = setInterval(() => {
  12758. if(res.data[3].length){
  12759. try {
  12760. this.aiJson = JSON.parse(res.data[3][0].tips);
  12761. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12762. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12763. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12764. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12765. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12766. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12767. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12768. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12769. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12770. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12771. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12772. }
  12773. this.templateid = res.data[3][0].template;
  12774. }catch(error){
  12775. console.error(error)
  12776. }
  12777. }
  12778. if(res.data[0][0].cpote){
  12779. try {
  12780. this.cpote = JSON.parse(res.data[0][0].cpote);
  12781. }catch(error){
  12782. console.error(error)
  12783. }
  12784. }
  12785. if(res.data[0][0].setting){
  12786. try {
  12787. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12788. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12789. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12790. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12791. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12792. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12793. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12794. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  12795. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12796. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12797. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12798. this.courseTextBool = true
  12799. }
  12800. if(!this.teacherCourseText && !this.teacherCourseText){
  12801. this.isuseT = false
  12802. }
  12803. }catch(error){
  12804. console.error(error)
  12805. }
  12806. }
  12807. if(this.courseText){
  12808. this.courseTextB = false
  12809. }
  12810. if(this.teacherCourseText){
  12811. this.teacherCourseTextB = false
  12812. }
  12813. if(this.targetCourseText){
  12814. this.targetCourseTextB = false
  12815. }
  12816. if(this.targetCourseText2){
  12817. this.targetCourseText2B = false
  12818. }
  12819. this.isFileSearch = res.data[0][0].iresearch == 1
  12820. this.seleteCourseUpdate();
  12821. this.setMan();
  12822. this.selectAllType();
  12823. this.unitJson[
  12824. this.unitIndex
  12825. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12826. // }, 5000);
  12827. this.$forceUpdate();
  12828. setTimeout(() => {
  12829. this.checkEva(this.evalua);
  12830. setTimeout(() => {
  12831. this.checkEva(this.evalua);
  12832. }, 100);
  12833. }, 100);
  12834. })
  12835. .catch((err) => {
  12836. console.error(err);
  12837. });
  12838. }
  12839. if(this.aiId){
  12840. let params = {
  12841. cid: this.aiId,
  12842. };
  12843. this.ajax
  12844. .get(this.$store.state.api + "select_course_detail", params)
  12845. .then((res) => {
  12846. let _unitJson = JSON.parse(res.data[0][0].chapters);
  12847. let fileInfo = []
  12848. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  12849. for(var i = 0; i < _unitJson.length; i++){
  12850. let tasks = _unitJson[i].chapterInfo[0].taskJson
  12851. for(var j = 0; j < tasks.length; j++){
  12852. let _infoData = tasks[j].chapterData.filter(el => {
  12853. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  12854. })
  12855. if(_infoData.length){
  12856. fileInfo = [...fileInfo, ..._infoData]
  12857. }
  12858. }
  12859. }
  12860. this.infoData = fileInfo
  12861. this.$forceUpdate();
  12862. this.courseName = res.data[0][0].title;
  12863. this.courseText = res.data[0][0].brief;
  12864. this.courseText2 = res.data[0][0].reBrief;
  12865. this.cover = JSON.parse(res.data[0][0].cover);
  12866. this.noneBtnImg = this.cover.length >= 1;
  12867. this.checkboxList2 = res.data[0][0].juri
  12868. ? res.data[0][0].juri.split(",")
  12869. : [];
  12870. this.inviteCode = [];
  12871. for (var i = 0; i < res.data[2].length; i++) {
  12872. this.inviteCode.push({
  12873. cid: res.data[2][i].classid,
  12874. ic: res.data[2][i].code,
  12875. });
  12876. }
  12877. this.checkboxList3 = res.data[0][0].course_teacher
  12878. ? res.data[0][0].course_teacher.split(",")
  12879. : [];
  12880. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12881. this.myWord = res.data[0][0].template;
  12882. this.templateC.id = "123";
  12883. this.courseTypeId = [];
  12884. for (var i = 0; i < res.data[1].length; i++) {
  12885. this.courseTypeId.push(res.data[1][i].typeid);
  12886. }
  12887. console.log(this.courseTypeId);
  12888. if(res.data[3].length){
  12889. try {
  12890. this.aiJson = JSON.parse(res.data[3][0].tips);
  12891. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12892. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12893. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12894. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12895. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12896. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12897. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12898. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12899. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12900. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12901. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12902. }
  12903. this.templateid = res.data[3][0].template;
  12904. }catch(error){
  12905. console.error(error)
  12906. }
  12907. }
  12908. if(res.data[0][0].cpote){
  12909. try {
  12910. this.cpote = JSON.parse(res.data[0][0].cpote);
  12911. }catch(error){
  12912. console.error(error)
  12913. }
  12914. }
  12915. if(res.data[0][0].setting){
  12916. try {
  12917. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12918. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12919. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12920. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12921. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12922. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12923. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12924. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  12925. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12926. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12927. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12928. this.courseTextBool = true
  12929. }
  12930. if(!this.teacherCourseText && !this.teacherCourseText){
  12931. this.isuseT = false
  12932. }
  12933. }catch(error){
  12934. console.error(error)
  12935. }
  12936. }
  12937. if(this.courseText){
  12938. this.courseTextB = false
  12939. }
  12940. if(this.teacherCourseText){
  12941. this.teacherCourseTextB = false
  12942. }
  12943. if(this.targetCourseText){
  12944. this.targetCourseTextB = false
  12945. }
  12946. if(this.targetCourseText2){
  12947. this.targetCourseText2B = false
  12948. }
  12949. this.setMan();
  12950. this.unitJson[
  12951. this.unitIndex
  12952. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12953. this.$forceUpdate();
  12954. setTimeout(() => {
  12955. this.checkEva(this.evalua);
  12956. setTimeout(() => {
  12957. this.checkEva(this.evalua);
  12958. }, 100);
  12959. }, 100);
  12960. })
  12961. .catch((err) => {
  12962. console.error(err);
  12963. });
  12964. }
  12965. // if(this.cidType != 1 && this.templateid == ''){
  12966. // this.promptShow = true
  12967. // }
  12968. },
  12969. seleteCourseUpdate() {
  12970. let params = {
  12971. cid: this.cid,
  12972. };
  12973. this.ajax
  12974. .get(this.$store.state.api + "select_course_detail", params)
  12975. .then((res) => {
  12976. // console.log(this.unitJson);
  12977. let unitJson = JSON.parse(res.data[0][0].chapters);
  12978. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  12979. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  12980. let _unitJson = [];
  12981. let _chapAarry = [];
  12982. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  12983. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  12984. let index = 1;
  12985. let chapindex;
  12986. if (_unitJson2.length > unitJson.length) {
  12987. for (let c = 0; c < _unitJson2.length; c++) {
  12988. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  12989. }
  12990. for (let j = 0; j < unitJson.length; j++) {
  12991. let count = 0;
  12992. for (let k = 0; k < _unitJson2.length; k++) {
  12993. if (
  12994. unitJson[j].chapterInfo[0].chapterid ==
  12995. _unitJson2[k].chapterInfo[0].chapterid
  12996. ) {
  12997. count++;
  12998. _chapAarry.splice(
  12999. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13000. 1
  13001. );
  13002. _unitJson.push(unitJson[j]);
  13003. break;
  13004. }
  13005. }
  13006. // if(count === 0){
  13007. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13008. // }
  13009. }
  13010. for (let k = 0; k < _unitJson2.length; k++) {
  13011. if (_unitJson2[k].isUpdate == 1) {
  13012. _chapAarry.splice(
  13013. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13014. 1
  13015. );
  13016. _unitJson.push(_unitJson2[k]);
  13017. }
  13018. }
  13019. console.log(_chapAarry);
  13020. for (let d = 0; d < _unitJson2.length; d++) {
  13021. if (
  13022. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13023. ) {
  13024. if (_unitIndex == d) {
  13025. index = 2;
  13026. }
  13027. chapindex = d;
  13028. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13029. }
  13030. }
  13031. } else {
  13032. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13033. }
  13034. for (let i = 0; i < unitJson.length; i++) {
  13035. if (
  13036. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13037. _unitJson[i].chapterInfo[0].chapterid !=
  13038. unitJson[i].chapterInfo[0].chapterid
  13039. ) {
  13040. if (i == _unitJson.length - 1) {
  13041. // this.unitIndex++
  13042. _unitIndex2++;
  13043. }
  13044. _unitJson.splice(i, 0, unitJson[i]);
  13045. } else if (i > _unitJson.length - 1) {
  13046. _unitJson.push(unitJson[i]);
  13047. } else if (
  13048. _unitJson[i].chapterInfo[0].chapterid ==
  13049. unitJson[i].chapterInfo[0].chapterid
  13050. ) {
  13051. _unitJson[i] = unitJson[i];
  13052. }
  13053. // if (i == _unitIndex) {
  13054. // continue;
  13055. // } else
  13056. }
  13057. if (_chapAarry.length && index != 2) {
  13058. if (chapindex < _unitIndex) {
  13059. this.isDelete = 2;
  13060. // this.unitIndex--;
  13061. _unitIndex2--;
  13062. } else if (
  13063. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13064. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13065. ) {
  13066. this.isDelete = 2;
  13067. for (let n = 0; n < _unitJson.length; n++) {
  13068. if (
  13069. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13070. _unitJson[n].chapterInfo[0].chapterid
  13071. ) {
  13072. // this.unitIndex = n;
  13073. _unitIndex2 = n;
  13074. _unitJson[n] = _unitJson2[_unitIndex];
  13075. break;
  13076. }
  13077. }
  13078. }
  13079. } else if (index != 2) {
  13080. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13081. _unitJson2[_unitIndex];
  13082. for (
  13083. var ci = 0;
  13084. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13085. ci++
  13086. ) {
  13087. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13088. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13089. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13090. .toolChoose
  13091. : [];
  13092. let _chapterData = [];
  13093. for (
  13094. var c = 0;
  13095. c <
  13096. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13097. .length;
  13098. c++
  13099. ) {
  13100. if (
  13101. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13102. .chapterData[c]
  13103. ) {
  13104. _chapterData.push(
  13105. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13106. .chapterData[c]
  13107. );
  13108. }
  13109. }
  13110. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13111. _chapterData;
  13112. }
  13113. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13114. }
  13115. if (index == 1) {
  13116. this.unitJson = _unitJson;
  13117. this.$forceUpdate();
  13118. setTimeout(() => {
  13119. if (this.unitIndex != _unitIndex2) {
  13120. this.isDelete = 2;
  13121. this.unitIndex = _unitIndex2;
  13122. }
  13123. }, 0);
  13124. this.timer = setTimeout(() => {
  13125. this.seleteCourseUpdate();
  13126. }, 1000);
  13127. } else if (index == 2) {
  13128. let _this = this;
  13129. _this
  13130. .$confirm(
  13131. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13132. "提示",
  13133. {
  13134. confirmButtonText: "需要",
  13135. cancelButtonText: "取消",
  13136. type: "warning",
  13137. }
  13138. )
  13139. .then(() => {
  13140. if (_this.time()) {
  13141. _this.restoreWork(
  13142. _chapAarry[0],
  13143. _unitJson,
  13144. chapindex,
  13145. _unitJson2,
  13146. _unitIndex2
  13147. );
  13148. }
  13149. })
  13150. .catch(() => {
  13151. _this.unitJson = _unitJson;
  13152. _this.$forceUpdate();
  13153. setTimeout(() => {
  13154. if (this.unitIndex != _unitIndex2) {
  13155. this.isDelete = 2;
  13156. this.unitIndex = _unitIndex2;
  13157. }
  13158. }, 0);
  13159. _this.timer = setTimeout(() => {
  13160. _this.seleteCourseUpdate();
  13161. }, 1000);
  13162. });
  13163. }
  13164. // 在复制操作之前记录滚动位置
  13165. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13166. // 执行复制操作
  13167. // 复制操作完成后恢复滚动位置
  13168. this.$nextTick(() => {
  13169. if (this.$refs.scrollContainer) {
  13170. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13171. }
  13172. });
  13173. })
  13174. .catch((err) => {
  13175. console.error(err);
  13176. });
  13177. },
  13178. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  13179. let params = [
  13180. {
  13181. cid: this.cid,
  13182. chapters: JSON.stringify(this.unitJson),
  13183. uid: this.userid,
  13184. chapid: chapid,
  13185. },
  13186. ];
  13187. this.ajax
  13188. .post(this.$store.state.api + "restoreWork", params)
  13189. .then((res) => {
  13190. this.$message({
  13191. message: "恢复成功",
  13192. type: "success",
  13193. });
  13194. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  13195. this.unitJson = unitJson;
  13196. this.$forceUpdate();
  13197. setTimeout(() => {
  13198. if (this.unitIndex != unitIndex2) {
  13199. this.isDelete = 2;
  13200. this.unitIndex = unitIndex2;
  13201. }
  13202. }, 0);
  13203. this.timer = setTimeout(() => {
  13204. this.seleteCourseUpdate();
  13205. }, 1000);
  13206. })
  13207. .catch((err) => {
  13208. this.$message.error("网络不佳");
  13209. console.error(err);
  13210. });
  13211. },
  13212. getTypeName() {
  13213. console.log(this.courseTypeId);
  13214. this.$forceUpdate();
  13215. },
  13216. selectAllType() {
  13217. let params = {
  13218. org: this.org && this.org != "" ? this.org : "",
  13219. oid: this.oid && this.oid != "" ? this.oid : "",
  13220. };
  13221. this.ajax
  13222. .get(this.$store.state.api + "selectAllType", params)
  13223. .then((res) => {
  13224. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13225. res.data[0] = [...res.data[0], ...res.data[4]];
  13226. }
  13227. this.CourseType = res.data;
  13228. this.CourseType2 = [
  13229. { name: "智见课程", id: [] },
  13230. { name: "智行课程", id: [] },
  13231. { name: "智创课程", id: [] },
  13232. ];
  13233. for (var cti = 0; cti < res.data[0].length; cti++) {
  13234. if (
  13235. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13236. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  13237. ) {
  13238. this.CourseType2[0].id.push(res.data[0][cti].id);
  13239. } else if (
  13240. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  13241. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13242. ) {
  13243. this.CourseType2[1].id.push(res.data[0][cti].id);
  13244. } else if (
  13245. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13246. ) {
  13247. this.CourseType2[2].id.push(res.data[0][cti].id);
  13248. }
  13249. if (
  13250. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13251. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  13252. ) {
  13253. res.data[0][cti].name = "年级";
  13254. } else if (
  13255. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  13256. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13257. ) {
  13258. res.data[0][cti].name = "学科";
  13259. } else if (
  13260. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13261. ) {
  13262. res.data[0][cti].name = "主题";
  13263. }
  13264. }
  13265. let _courseTypeId = [];
  13266. for (var i = 0; i < res.data[0].length; i++) {
  13267. if (!this.cid) {
  13268. this.courseTypeId[res.data[0][i].id] = [];
  13269. }
  13270. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  13271. // }
  13272. this.CourseTypeJson[res.data[0][i].id] = [];
  13273. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13274. if (res.data[0][i].name == "栏目") {
  13275. this.CourseType[0][i].name = "主题";
  13276. }
  13277. }
  13278. if (res.data[2].length == 0 && res.data[3].length == 0) {
  13279. for (var j = 0; j < res.data[1].length; j++) {
  13280. if (
  13281. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  13282. _courseTypeId.indexOf(res.data[1][j].id) == -1
  13283. ) {
  13284. _courseTypeId.push(res.data[1][j].id);
  13285. }
  13286. if (res.data[0][i].id == res.data[1][j].pid) {
  13287. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13288. }
  13289. }
  13290. } else {
  13291. if (res.data[2].length > 0) {
  13292. for (var j = 0; j < res.data[2].length; j++) {
  13293. if (
  13294. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  13295. _courseTypeId.indexOf(res.data[2][j].id) == -1
  13296. ) {
  13297. _courseTypeId.push(res.data[2][j].id);
  13298. }
  13299. if (res.data[0][i].id == res.data[2][j].pid) {
  13300. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  13301. }
  13302. }
  13303. }
  13304. if (res.data[3].length > 0) {
  13305. for (var j = 0; j < res.data[3].length; j++) {
  13306. if (
  13307. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  13308. _courseTypeId.indexOf(res.data[3][j].id) == -1
  13309. ) {
  13310. _courseTypeId.push(res.data[3][j].id);
  13311. }
  13312. if (res.data[0][i].id == res.data[3][j].pid) {
  13313. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  13314. }
  13315. }
  13316. }
  13317. }
  13318. }
  13319. this.courseTypeId = _courseTypeId;
  13320. })
  13321. .catch((err) => {
  13322. console.error(err);
  13323. });
  13324. },
  13325. selectType() {
  13326. this.ajax
  13327. .get(this.$store.state.api + "selectType")
  13328. .then((res) => {
  13329. this.CourseType = res.data;
  13330. for (var i = 0; i < res.data[0].length; i++) {
  13331. if (!this.cid) {
  13332. this.courseTypeId[res.data[0][i].id] = "";
  13333. }
  13334. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13335. if (res.data[0][i].name == "栏目") {
  13336. this.CourseType[0][i].name = "主题";
  13337. }
  13338. }
  13339. for (var j = 0; j < res.data[1].length; j++) {
  13340. if (res.data[0][i].id == res.data[1][j].pid) {
  13341. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13342. this.CourseTypeJson[res.data[0][i].id] = [];
  13343. }
  13344. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13345. }
  13346. }
  13347. }
  13348. this.selectTypeByOid();
  13349. this.selectTypeByOrg();
  13350. })
  13351. .catch((err) => {
  13352. console.error(err);
  13353. });
  13354. },
  13355. selectTypeByOid() {
  13356. let params = {
  13357. oid: this.oid,
  13358. };
  13359. this.ajax
  13360. .get(this.$store.state.api + "selectTypeByOid", params)
  13361. .then((res) => {
  13362. for (var i = 0; i < res.data[0].length; i++) {
  13363. for (var j = 0; j < res.data[1].length; j++) {
  13364. if (res.data[0][i].id == res.data[1][j].pid) {
  13365. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13366. this.CourseTypeJson[res.data[0][i].id] = [];
  13367. }
  13368. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13369. }
  13370. }
  13371. }
  13372. })
  13373. .catch((err) => {
  13374. console.error(err);
  13375. });
  13376. },
  13377. selectTypeByOrg() {
  13378. let params = {
  13379. oid: this.org,
  13380. };
  13381. this.ajax
  13382. .get(this.$store.state.api + "selectTypeByOrg", params)
  13383. .then((res) => {
  13384. for (var i = 0; i < res.data[0].length; i++) {
  13385. for (var j = 0; j < res.data[1].length; j++) {
  13386. if (res.data[0][i].id == res.data[1][j].pid) {
  13387. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13388. this.CourseTypeJson[res.data[0][i].id] = [];
  13389. }
  13390. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13391. }
  13392. }
  13393. }
  13394. this.$forceUpdate();
  13395. })
  13396. .catch((err) => {
  13397. console.error(err);
  13398. });
  13399. },
  13400. OtherMb(type, task) {
  13401. if (task === 0 || task) {
  13402. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13403. task
  13404. ].isEvaFold = true;
  13405. }
  13406. this.typeMode = type;
  13407. setTimeout(() => {
  13408. this.checkEva(this.checkId);
  13409. setTimeout(() => {
  13410. this.checkEva(this.checkId);
  13411. }, 100);
  13412. }, 100);
  13413. },
  13414. openMember() {
  13415. this.searchTN = "";
  13416. this.getTeacher();
  13417. this.dialogVisibleMember = true;
  13418. },
  13419. checkEva(id, type) {
  13420. this.dialogVisiblemb = false;
  13421. this.selectEva();
  13422. if (this.evalua != id && type == 2) {
  13423. this.$message.success("导入成功");
  13424. setTimeout(() => {
  13425. this.checkEva(id);
  13426. }, 100);
  13427. }
  13428. this.evalua = id;
  13429. this.checkId = id;
  13430. if (this.evalua != "") {
  13431. for (var i = 0; i < this.evaJuri.length; i++) {
  13432. if (this.evalua == this.evaJuri[i].id) {
  13433. this.eTitle = this.evaJuri[i].title;
  13434. this.eJson = JSON.parse(this.evaJuri[i].content);
  13435. }
  13436. }
  13437. this.data.data = [];
  13438. this.$forceUpdate();
  13439. setTimeout(() => {
  13440. this.setMindData();
  13441. }, 1000);
  13442. }
  13443. },
  13444. deleteEva() {
  13445. let _this = this;
  13446. if (_this.evalua == "") {
  13447. this.$message.warning("内容已经清空了,请勿重复清空");
  13448. return;
  13449. }
  13450. _this
  13451. .$confirm("确定删除此目标吗?", "提示", {
  13452. confirmButtonText: "确定",
  13453. cancelButtonText: "取消",
  13454. type: "warning",
  13455. })
  13456. .then(() => {
  13457. _this.evalua = "";
  13458. _this.checkId = "";
  13459. _this.eTitle = "";
  13460. let _unitJson = _this.unitJson;
  13461. for (var i = 0; i < _unitJson.length; i++) {
  13462. let _task = _unitJson[i].chapterInfo[0].taskJson;
  13463. for (var j = 0; j < _task.length; j++) {
  13464. let _eList = _task[j].eList;
  13465. for (var k = 0; k < _eList.length; k++) {
  13466. delete _eList[k].target;
  13467. }
  13468. }
  13469. }
  13470. _this.$forceUpdate();
  13471. if (_this.cid) {
  13472. _this.updateWork();
  13473. }
  13474. })
  13475. .catch(() => {
  13476. return;
  13477. });
  13478. },
  13479. selectEva() {
  13480. let params = {
  13481. oid: this.oid,
  13482. };
  13483. this.ajax
  13484. .get(this.$store.state.api + "selectAllEvaluation", params)
  13485. .then((res) => {
  13486. this.evaJuri = res.data[0];
  13487. // 在复制操作之前记录滚动位置
  13488. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13489. // 执行复制操作
  13490. // 复制操作完成后恢复滚动位置
  13491. this.$nextTick(() => {
  13492. if (this.$refs.scrollContainer) {
  13493. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13494. }
  13495. });
  13496. })
  13497. .catch((err) => {
  13498. console.error(err);
  13499. });
  13500. },
  13501. setMindData() {
  13502. let targetArray = [];
  13503. this.data.data = [];
  13504. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  13505. let _eJson = Object.keys(this.eJson);
  13506. let _e = this.eJson;
  13507. for (let i = 0; i < _eJson.length; i++) {
  13508. let element = _e[_eJson[i]];
  13509. this.data.data.push({
  13510. id: element.id,
  13511. parentid: "root",
  13512. topic: element.name,
  13513. });
  13514. // targetArray.push({
  13515. // id: element.id,
  13516. // parentid: "root",
  13517. // name: element.name,
  13518. // });
  13519. targetArray.push({
  13520. value: element.name,
  13521. label: element.name,
  13522. children: [],
  13523. });
  13524. let _eJsonc = Object.keys(element.child);
  13525. let _e2 = element.child;
  13526. for (let j = 0; j < _eJsonc.length; j++) {
  13527. let _ec = _e2[_eJsonc[j]];
  13528. this.data.data.push({
  13529. id: _ec.id,
  13530. parentid: element.id,
  13531. topic: _ec.name,
  13532. });
  13533. // targetArray.push({
  13534. // id: _ec.id,
  13535. // parentid: element.id,
  13536. // name: _ec.name,
  13537. // });
  13538. targetArray[i].children.push({
  13539. value: _ec.name,
  13540. label: _ec.name,
  13541. children: [],
  13542. });
  13543. let _eJsonz = Object.keys(_ec.child);
  13544. let _e3 = _ec.child;
  13545. for (let z = 0; z < _eJsonz.length; z++) {
  13546. let _ez = _e3[_eJsonz[z]];
  13547. this.data.data.push({
  13548. id: _ez.id,
  13549. parentid: _ec.id,
  13550. topic: _ez.name,
  13551. });
  13552. // targetArray.push({
  13553. // id: _ez.id,
  13554. // parentid: _ec.id,
  13555. // name: _ez.name,
  13556. // });
  13557. targetArray[i].children[j].children.push({
  13558. value: _ez.name,
  13559. label: _ez.name,
  13560. });
  13561. }
  13562. }
  13563. }
  13564. this.targetArray = targetArray;
  13565. this.$forceUpdate();
  13566. },
  13567. /*添加评价 */
  13568. addEList(index, tIndex) {
  13569. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  13570. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  13571. value: "",
  13572. detail: "",
  13573. score: 5,
  13574. })
  13575. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  13576. { value: "", detail: "", score: 5 },
  13577. ]);
  13578. this.$forceUpdate();
  13579. },
  13580. openEList(index, tIndex) {
  13581. this.evaIndex = index;
  13582. this.evatIndex = tIndex;
  13583. this.evaBoxDialog = true;
  13584. },
  13585. addCET(index, tIndex) {
  13586. this.cetIndex = index;
  13587. this.cettIndex = tIndex;
  13588. this.selectAllType1();
  13589. },
  13590. addCETemplate() {
  13591. var array =
  13592. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  13593. .eList;
  13594. let params = [
  13595. {
  13596. uid: this.userid,
  13597. n: this.templateName,
  13598. json: JSON.stringify(array),
  13599. t: 1,
  13600. oid: this.oid,
  13601. },
  13602. ];
  13603. this.ajax
  13604. .post(this.$store.state.api + "addCETShare", params)
  13605. .then((res) => {
  13606. this.addTypeByCET(res.data[0][0].id);
  13607. })
  13608. .catch((err) => {
  13609. this.$message.error("网络不佳");
  13610. console.error(err);
  13611. });
  13612. },
  13613. addTypeByCET(id) {
  13614. if (this.setTypeJson.two == "") {
  13615. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  13616. return;
  13617. }
  13618. let params = {
  13619. cid: id,
  13620. };
  13621. this.ajax
  13622. .get(this.$store.state.api + "deleteCETLabel", params)
  13623. .then((res) => {
  13624. for (var i = 0; i < 2; i++) {
  13625. let tid = "";
  13626. if (i == 0) {
  13627. tid = this.setTypeJson.one;
  13628. } else {
  13629. tid = this.setTypeJson.two;
  13630. }
  13631. let params = [
  13632. {
  13633. cid: id,
  13634. tid: tid,
  13635. uid: this.userid,
  13636. },
  13637. ];
  13638. this.ajax
  13639. .post(this.$store.state.api + "addCETLabel", params)
  13640. .then((res) => {
  13641. this.$message({
  13642. message: "添加成功",
  13643. type: "success",
  13644. });
  13645. this.close();
  13646. })
  13647. .catch((err) => {
  13648. this.$message.error("网络不佳");
  13649. console.error(err);
  13650. });
  13651. }
  13652. })
  13653. .catch((err) => {
  13654. this.$message.error("网络不佳");
  13655. console.error(err);
  13656. });
  13657. },
  13658. updateEvaJson(array) {
  13659. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  13660. this.evatIndex
  13661. ].eList = array;
  13662. },
  13663. forceUpdate() {
  13664. this.$forceUpdate();
  13665. },
  13666. deletEList(index, tIndex, eIndex) {
  13667. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  13668. eIndex,
  13669. 1
  13670. );
  13671. this.$forceUpdate();
  13672. },
  13673. getChoosePic(t) {
  13674. this.chooseType = t;
  13675. this.getAllBanner();
  13676. },
  13677. getAllBanner() {
  13678. this.sysPicVisible = true;
  13679. let params = {
  13680. t: this.chooseType,
  13681. };
  13682. this.ajax
  13683. .get(this.$store.state.api + "selectAllBanner", params)
  13684. .then((res) => {
  13685. this.sysPic = res.data[0];
  13686. })
  13687. .catch((err) => {
  13688. console.error(err);
  13689. });
  13690. },
  13691. // getClass() {
  13692. // let params = {
  13693. // oid: this.oid,
  13694. // };
  13695. // this.ajax
  13696. // .get(this.$store.state.api + "selectClassBySchool", params)
  13697. // .then((res) => {
  13698. // this.classJuri = res.data[0];
  13699. // })
  13700. // .catch((err) => {
  13701. // console.error(err);
  13702. // });
  13703. // },
  13704. deleteSysPic() {
  13705. this.cover = [];
  13706. this.isSysPic = false;
  13707. this.isSysPic2 = false;
  13708. },
  13709. deleteSelectPic() {
  13710. this.selectJson.url = "";
  13711. },
  13712. setEListStar() {
  13713. this.$forceUpdate();
  13714. },
  13715. deletRateList(i) {
  13716. this.rateJson.splice(i, 1);
  13717. },
  13718. addRateList() {
  13719. this.rateJson.push({ detail: "", score: 5, value: "" });
  13720. },
  13721. addSt() {
  13722. this.sentenceList.push({
  13723. sentenceTitle: "",
  13724. addSentence: [],
  13725. rightAnswer: [],
  13726. });
  13727. },
  13728. addSen(i) {
  13729. if (!this.sentenceList[i].sentenceTitle) {
  13730. this.$message.error("请填写卡片内容!");
  13731. return;
  13732. }
  13733. if (this.sentenceList[i].sentenceTitle.length > 10) {
  13734. this.$message.error("卡片内容字数不能超过10位");
  13735. return;
  13736. }
  13737. if (
  13738. this.sentenceList[i].addSentence.indexOf(
  13739. this.sentenceList[i].sentenceTitle
  13740. ) !== -1
  13741. ) {
  13742. this.$message.error("不能添加重复的卡片内容!");
  13743. return;
  13744. }
  13745. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  13746. // this.isPushTitleList.push(this.sentenceTitle);
  13747. this.sentenceList[i].sentenceTitle = "";
  13748. },
  13749. setRightAnswer(s, i, j) {
  13750. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  13751. this.sentenceList[i].rightAnswer.push(s);
  13752. }
  13753. },
  13754. returnCard(r, i, j) {
  13755. this.sentenceList[i].rightAnswer.splice(j, 1);
  13756. },
  13757. addSentenceTool() {
  13758. for (var i = 0; i < this.sentenceList.length; i++) {
  13759. if (this.sentenceList[i].rightAnswer.length == 0) {
  13760. this.$message.error(`请将题目${i + 1}设置完整。`);
  13761. return;
  13762. }
  13763. if (
  13764. this.sentenceList[i].addSentence.length !=
  13765. this.sentenceList[i].rightAnswer.length
  13766. ) {
  13767. this.$message.error(`请将题目${i + 1}设置完整。`);
  13768. return;
  13769. }
  13770. }
  13771. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13772. this.taskCount
  13773. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  13774. this.sentenceList = [
  13775. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13776. ];
  13777. this.dialogVisibleSentence = false;
  13778. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13779. // itemTaskIndex
  13780. // ].toolChoose[toolIndex].tool = [];
  13781. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13782. // itemTaskIndex
  13783. // ].toolChoose[toolIndex].tool.push(i);
  13784. if (
  13785. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13786. .toolChoose[this.toolIndex].tool != 47
  13787. ) {
  13788. this.addTools(47, this.taskCount, this.toolIndex);
  13789. }
  13790. },
  13791. addTableJson() {
  13792. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  13793. // this.$message.error("请将信息填写完整!");
  13794. // return;
  13795. // }
  13796. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13797. this.taskCount
  13798. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  13799. // this.tableJson = [{ text: "" }];
  13800. // this.dialogVisibleTable = false;
  13801. this.$message.success("上传成功");
  13802. if (
  13803. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13804. .toolChoose[this.toolIndex].tool != 48
  13805. ) {
  13806. this.addTools(48, this.taskCount, this.toolIndex);
  13807. }
  13808. },
  13809. addWordJson() {
  13810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13811. this.taskCount
  13812. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  13813. // this.wordJson = [{ text: "" }];
  13814. // this.dialogVisibleWord = false;
  13815. this.$message.success("上传成功");
  13816. if (
  13817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13818. .toolChoose[this.toolIndex].tool != 52
  13819. ) {
  13820. this.addTools(52, this.taskCount, this.toolIndex);
  13821. }
  13822. },
  13823. addMoreUpload() {
  13824. if (this.uploadJson.length == 0) {
  13825. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13826. this.taskCount
  13827. ].toolChoose[this.toolIndex].uploadJson = [];
  13828. } else {
  13829. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13830. this.taskCount
  13831. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  13832. }
  13833. this.uploadJson = [];
  13834. this.dialogVisibleMoreUpload = false;
  13835. if (
  13836. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13837. .toolChoose[this.toolIndex].tool != 50
  13838. ) {
  13839. this.addTools(50, this.taskCount, this.toolIndex);
  13840. }
  13841. },
  13842. addPreTime() {
  13843. if (this.preTime == 0) {
  13844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13845. this.taskCount
  13846. ].toolChoose[this.toolIndex].preTime = 0;
  13847. } else {
  13848. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13849. this.taskCount
  13850. ].toolChoose[this.toolIndex].preTime = this.preTime;
  13851. }
  13852. this.preTime = 0;
  13853. this.dialogVisiblePreTime = false;
  13854. if (
  13855. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13856. .toolChoose[this.toolIndex].tool != 10
  13857. ) {
  13858. this.addTools(10, this.taskCount, this.toolIndex);
  13859. }
  13860. },
  13861. goToTask(i) {
  13862. this.toolIndexType = "";
  13863. if (this.isClickColor == i + 1) {
  13864. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13865. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13866. // } else {
  13867. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13868. i
  13869. ].toolOpen = true;
  13870. // }
  13871. this.$forceUpdate();
  13872. return;
  13873. }
  13874. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13875. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13876. // } else {
  13877. document.querySelectorAll(".basic_box")[0].scrollTop =
  13878. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13879. this.isClickColor = i + 1;
  13880. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13881. // }
  13882. this.$forceUpdate();
  13883. },
  13884. taskOpen(i, stageIndex) {
  13885. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13886. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  13887. } else {
  13888. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13889. }
  13890. this.updateWork3(stageIndex);
  13891. this.$forceUpdate();
  13892. },
  13893. goToTask2(i, stage) {
  13894. this.toolIndexType = "";
  13895. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  13896. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13897. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13898. // } else {
  13899. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13900. i
  13901. ].toolOpen = true;
  13902. // }
  13903. this.$forceUpdate();
  13904. return;
  13905. }
  13906. if (this.unitIndex != stage) {
  13907. if (this.panUnitJson() == 2) {
  13908. return;
  13909. }
  13910. this.unitSet(stage);
  13911. }
  13912. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13913. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13914. // } else {
  13915. document.querySelectorAll(".basic_box")[0].scrollTop =
  13916. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13917. this.isClickColor = i + 1;
  13918. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13919. // }
  13920. this.$forceUpdate();
  13921. },
  13922. taskMove(type, index) {
  13923. this.$confirm(
  13924. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  13925. "提示",
  13926. {
  13927. confirmButtonText: "确定",
  13928. cancelButtonText: "取消",
  13929. type: "warning",
  13930. }
  13931. )
  13932. .then(() => {
  13933. if (type == 1) {
  13934. if (index > 0) {
  13935. let a = JSON.parse(
  13936. JSON.stringify(
  13937. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13938. index - 1
  13939. ]
  13940. )
  13941. );
  13942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  13943. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13944. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13945. }
  13946. } else {
  13947. if (
  13948. index <
  13949. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  13950. ) {
  13951. let a = JSON.parse(
  13952. JSON.stringify(
  13953. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13954. index + 1
  13955. ]
  13956. )
  13957. );
  13958. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  13959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13960. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13961. }
  13962. }
  13963. this.$forceUpdate();
  13964. })
  13965. .catch(() => {
  13966. return;
  13967. });
  13968. },
  13969. stageMove(type, index) {
  13970. if (type == 1) {
  13971. if (index > 0) {
  13972. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  13973. let acid = JSON.parse(
  13974. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  13975. );
  13976. let bcid = JSON.parse(
  13977. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13978. );
  13979. this.unitJson3[index - 1] = this.unitJson3[index];
  13980. this.unitJson3[index] = a;
  13981. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  13982. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13983. }
  13984. } else {
  13985. if (index < this.unitJson3.length - 1) {
  13986. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  13987. let acid = JSON.parse(
  13988. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  13989. );
  13990. let bcid = JSON.parse(
  13991. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13992. );
  13993. this.unitJson3[index + 1] = this.unitJson3[index];
  13994. this.unitJson3[index] = a;
  13995. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  13996. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13997. }
  13998. }
  13999. this.$forceUpdate();
  14000. },
  14001. addGroup(i) {
  14002. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14003. this.groupJson.group.push({
  14004. name: "第" + (this.groupJson.group.length + 1) + "组",
  14005. });
  14006. },
  14007. deleteGroup(i) {
  14008. this.groupJson.group.splice(i, 1);
  14009. },
  14010. numberPan() {
  14011. if (
  14012. /[^\d]/.test(this.groupJson.number) ||
  14013. this.groupJson.number < 2 ||
  14014. this.groupJson.number > 10
  14015. ) {
  14016. this.$message.error("请输入2-10的数字");
  14017. this.groupJson.number = "";
  14018. }
  14019. },
  14020. numberPanJie() {
  14021. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  14022. this.$message.error('请输入大于1的数字')
  14023. this.courseJie = 1
  14024. }
  14025. },
  14026. numberPanTime() {
  14027. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  14028. this.$message.error('请输入大于1的数字')
  14029. this.courseTime = 1
  14030. }
  14031. },
  14032. addGroupJson() {
  14033. for (var i = 0; i < this.groupJson.group.length; i++) {
  14034. if (!this.groupJson.group[i].name) {
  14035. this.$message.error("请将信息填写完整!");
  14036. return;
  14037. }
  14038. }
  14039. if (!this.groupJson.number) {
  14040. this.$message.error("请将信息填写完整!");
  14041. return;
  14042. }
  14043. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14044. this.taskCount
  14045. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14046. JSON.stringify(this.groupJson)
  14047. );
  14048. this.dialogVisibleGroup = false;
  14049. this.groupJson = {};
  14050. if (
  14051. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14052. .toolChoose[this.toolIndex].tool != 49
  14053. ) {
  14054. this.addTools(49, this.taskCount, this.toolIndex);
  14055. }
  14056. },
  14057. updateTime(preTime) {
  14058. this.preTime = preTime;
  14059. },
  14060. InviteChange(val) {
  14061. console.log(val);
  14062. let _check = [];
  14063. let _check2 = [];
  14064. for (var i = 0; i < this.grade2.length; i++) {
  14065. var gid = this.grade2[i].id;
  14066. _check.push(gid);
  14067. }
  14068. for (var i = 0; i < this.checkboxList2.length; i++) {
  14069. var _id = this.checkboxList2[i];
  14070. if (_check.indexOf(_id) !== -1) {
  14071. _check2.push(_id);
  14072. }
  14073. }
  14074. this.checkAll = _check2.length === _check.length;
  14075. return;
  14076. let array = JSON.parse(JSON.stringify(val));
  14077. this.inviteCode = this.inviteCode.filter((el) => {
  14078. if (val.indexOf(el.cid) != -1) {
  14079. array.splice(array.indexOf(el.cid), 1);
  14080. return el;
  14081. }
  14082. });
  14083. for (var i = 0; i < array.length; i++) {
  14084. this.getInviteCode(array[i]);
  14085. }
  14086. },
  14087. InviteChange2(val) {
  14088. console.log(val);
  14089. let _check = [];
  14090. let _check2 = [];
  14091. for (var i = 0; i < this.teacherJuri.length; i++) {
  14092. var gid = this.teacherJuri[i].userid;
  14093. _check.push(gid);
  14094. }
  14095. for (var i = 0; i < this.checkboxList3.length; i++) {
  14096. var _id = this.checkboxList3[i];
  14097. if (_check.indexOf(_id) !== -1) {
  14098. _check2.push(_id);
  14099. }
  14100. }
  14101. this.checkAll2 = _check2.length === _check.length;
  14102. this.setMan();
  14103. return;
  14104. let array = JSON.parse(JSON.stringify(val));
  14105. this.inviteCode = this.inviteCode.filter((el) => {
  14106. if (val.indexOf(el.cid) != -1) {
  14107. array.splice(array.indexOf(el.cid), 1);
  14108. return el;
  14109. }
  14110. });
  14111. for (var i = 0; i < array.length; i++) {
  14112. this.getInviteCode(array[i]);
  14113. }
  14114. },
  14115. handleCheckAllChange(val) {
  14116. if (val) {
  14117. for (var i = 0; i < this.grade2.length; i++) {
  14118. var gid = this.grade2[i].id;
  14119. if (this.checkboxList2.indexOf(gid) === -1) {
  14120. this.checkboxList2.push(gid);
  14121. }
  14122. }
  14123. } else {
  14124. let _check = [];
  14125. let _check2 = [];
  14126. for (var i = 0; i < this.grade2.length; i++) {
  14127. var gid = this.grade2[i].id;
  14128. _check.push(gid);
  14129. }
  14130. for (var i = 0; i < this.checkboxList2.length; i++) {
  14131. var _id = this.checkboxList2[i];
  14132. if (_check.indexOf(_id) === -1) {
  14133. _check2.push(_id);
  14134. }
  14135. }
  14136. this.checkboxList2 = _check2;
  14137. }
  14138. this.isIndeterminate = false;
  14139. },
  14140. handleCheckAllChange2(val) {
  14141. if (val) {
  14142. for (var i = 0; i < this.teacherJuri.length; i++) {
  14143. var gid = this.teacherJuri[i].userid;
  14144. if (this.checkboxList3.indexOf(gid) === -1) {
  14145. this.checkboxList3.push(gid);
  14146. }
  14147. }
  14148. } else {
  14149. let _check = [];
  14150. let _check2 = [];
  14151. for (var i = 0; i < this.teacherJuri.length; i++) {
  14152. var gid = this.teacherJuri[i].userid;
  14153. _check.push(gid);
  14154. }
  14155. for (var i = 0; i < this.checkboxList3.length; i++) {
  14156. var _id = this.checkboxList3[i];
  14157. if (_check.indexOf(_id) === -1) {
  14158. _check2.push(_id);
  14159. }
  14160. }
  14161. this.checkboxList3 = _check2;
  14162. }
  14163. this.isIndeterminate2 = false;
  14164. },
  14165. async getInviteCode(cid) {
  14166. let code = this.randomNumber();
  14167. let params = {
  14168. code: code,
  14169. oid: this.oid,
  14170. };
  14171. let type = 1;
  14172. for (var i = 0; i < this.inviteCode.length; i++) {
  14173. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  14174. type = 2;
  14175. }
  14176. }
  14177. if (type == 2) {
  14178. this.getInviteCode(cid);
  14179. return;
  14180. }
  14181. const res = await this.ajax.get(
  14182. this.$store.state.api + "selectInviteCode2",
  14183. params
  14184. );
  14185. if (
  14186. res.data.length &&
  14187. res.data[0].length &&
  14188. res.data[0][0].courseId != this.cid
  14189. ) {
  14190. this.getInviteCode(cid);
  14191. return;
  14192. }
  14193. let array = [];
  14194. for (var i = 0; i < this.inviteCode.length; i++) {
  14195. array.push(this.inviteCode[i].cid);
  14196. }
  14197. if (array.indexOf(cid) != -1) {
  14198. this.inviteCode[array.indexOf(cid)].ic = code;
  14199. } else {
  14200. this.inviteCode.push({ cid: cid, ic: code });
  14201. }
  14202. },
  14203. OpenInviteD(cid) {
  14204. let array = [];
  14205. this.icode = "";
  14206. for (var i = 0; i < this.inviteCode.length; i++) {
  14207. array.push(this.inviteCode[i].cid);
  14208. }
  14209. if (array.indexOf(cid) != -1) {
  14210. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  14211. }
  14212. this.inviteId = cid;
  14213. this.dialogVisibleInvite = true;
  14214. },
  14215. addInvite() {
  14216. let reg = /^[A-Za-z0-9]{4,}$/;
  14217. if (!reg.test(this.icode)) {
  14218. this.$message.error("请输入至少四位数字或英文组合的随机码");
  14219. return;
  14220. }
  14221. let type = 1;
  14222. for (var i = 0; i < this.inviteCode.length; i++) {
  14223. if (
  14224. this.inviteCode[i].cid != this.inviteId &&
  14225. this.icode == this.inviteCode[i].ic
  14226. ) {
  14227. type = 2;
  14228. }
  14229. }
  14230. if (type == 2) {
  14231. this.$message.error("已有此随机码,不能重复");
  14232. return;
  14233. }
  14234. let params = {
  14235. code: this.icode,
  14236. oid: this.oid,
  14237. };
  14238. this.ajax
  14239. .get(this.$store.state.api + "selectInviteCode", params)
  14240. .then((res) => {
  14241. if (
  14242. res.data.length &&
  14243. res.data[0].length &&
  14244. res.data[0][0].courseId != this.cid
  14245. ) {
  14246. this.$message.error("已有此随机码,不能重复");
  14247. return;
  14248. }
  14249. let array = [];
  14250. for (var i = 0; i < this.inviteCode.length; i++) {
  14251. array.push(this.inviteCode[i].cid);
  14252. }
  14253. if (array.indexOf(this.inviteId) != -1) {
  14254. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  14255. } else {
  14256. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  14257. }
  14258. this.icode = "";
  14259. this.dialogVisibleInvite = false;
  14260. })
  14261. .catch((err) => {
  14262. console.error(err);
  14263. });
  14264. },
  14265. randomNumber() {
  14266. // 随机生成两位数
  14267. // let num = Math.floor(Math.random() * 900) + 100;
  14268. // 生成 0 到 99 之间的随机整数
  14269. const randomNumber = Math.floor(Math.random() * 100);
  14270. // 如果随机数小于 10,补上前导零
  14271. const num =
  14272. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  14273. // 随机生成两个大写字母
  14274. let letters = "";
  14275. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  14276. for (let i = 0; i < 3; i++) {
  14277. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  14278. }
  14279. // 随机生成两位数字和字母的组合
  14280. let mix = "";
  14281. let chars =
  14282. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  14283. for (let i = 0; i < 3; i++) {
  14284. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  14285. mix += char;
  14286. }
  14287. // 随机选择一种类型
  14288. let type = Math.floor(Math.random() * 3);
  14289. return num;
  14290. // 根据类型输出结果
  14291. switch (type) {
  14292. case 0:
  14293. console.log(num); // 输出两位数
  14294. return num;
  14295. case 1:
  14296. console.log(letters); // 输出两个大写字母
  14297. return letters;
  14298. case 2:
  14299. console.log(mix); // 输出两位数字和字母的组合
  14300. return mix;
  14301. }
  14302. },
  14303. getPaste() {
  14304. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14305. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14306. if (!iframe && !iframe2) {
  14307. return;
  14308. }
  14309. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14310. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14311. if (copyData && copyData.stageData && copyData.stageData.length) {
  14312. this.isPasteStage = true;
  14313. }
  14314. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  14315. this.isPasteStage = true;
  14316. }
  14317. if (copyData && copyData.selectData.length) {
  14318. this.isPasteChoice = true;
  14319. }
  14320. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  14321. this.isPasteTask = true;
  14322. }
  14323. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  14324. this.isPasteTask = true;
  14325. }
  14326. },
  14327. setCover() {
  14328. var _this = this;
  14329. if(_this.cover.length){
  14330. return;
  14331. }
  14332. _this.imageloading2 = true
  14333. _this.ajax
  14334. .post("https://gpt.cocorobo.cn/search_image", {
  14335. page: _this.ppage,
  14336. pagesize: 9,
  14337. query: _this.courseName,
  14338. })
  14339. .then(function (response) {
  14340. // console.log(response.data.data);
  14341. var data = response.data.FunctionResponse.result;
  14342. _this.cover = [];
  14343.       setTimeout(() => {
  14344.         _this.cover[0] = {
  14345.           name: "网络图片.png",
  14346.           url: data[0].thumbnail
  14347.         };
  14348.         _this.imgChange1(null, null, 1, null);
  14349.         _this.$forceUpdate();
  14350.       }, 0);
  14351. _this.imageloading2 = false
  14352. })
  14353. .catch(function (error) {
  14354. _this.imageloading2 = false
  14355. console.log(error);
  14356. });
  14357. },
  14358. searchImage() {
  14359. var _this = this;
  14360. _this.imageList = [];
  14361. if (!_this.searchImageValue) {
  14362. _this.sysPicVisible2 = true;
  14363. return;
  14364. }
  14365. _this.imageloading = true;
  14366. _this.ajax
  14367. .post("https://gpt.cocorobo.cn/search_image", {
  14368. page: _this.ppage,
  14369. pagesize: 9,
  14370. query: _this.searchImageValue,
  14371. })
  14372. .then(function (response) {
  14373. // console.log(response.data.data);
  14374. var data = response.data.FunctionResponse.result;
  14375. for (var i = 0; i < data.length; i++) {
  14376. _this.imageList.push({ url: data[i].thumbnail });
  14377. }
  14378. _this.imageloading = false;
  14379. })
  14380. .catch(function (error) {
  14381. console.log(error);
  14382. });
  14383. _this.sysPicVisible2 = true;
  14384. },
  14385. changePicture() {
  14386. this.ppage++;
  14387. this.searchImage();
  14388. },
  14389. resetImage() {
  14390. this.ppage = 1;
  14391. this.searchImage();
  14392. },
  14393. jumpGj(i, j) {
  14394. if (i + 1 != this.isClickColor) {
  14395. this.isClickColor = i + 1;
  14396. }
  14397. var a = document.scrollingElement;
  14398. this.toolIndexType = `gj${i}${j}`;
  14399. let target = document.querySelector(`#gj${i}${j}`);
  14400. if (target) {
  14401. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14402. setTimeout(() => {
  14403. target.scrollIntoView(true);
  14404. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14405. j
  14406. ].isFold3 = false;
  14407. setTimeout(() => {
  14408. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14409. }, 0);
  14410. }, 0);
  14411. }
  14412. },
  14413. jumpGj2(i, j, k) {
  14414. if (this.unitIndex != k) {
  14415. if (this.panUnitJson() == 2) {
  14416. return;
  14417. }
  14418. this.unitSet(k);
  14419. }
  14420. setTimeout(() => {
  14421. if (i + 1 != this.isClickColor) {
  14422. this.isClickColor = i + 1;
  14423. }
  14424. var a = document.scrollingElement;
  14425. this.toolIndexType = `gj${i}${j}${k}`;
  14426. let target = document.querySelector(`#gj${i}${j}`);
  14427. if (target) {
  14428. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14429. setTimeout(() => {
  14430. target.scrollIntoView(true);
  14431. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14432. j
  14433. ].isFold3 = false;
  14434. setTimeout(() => {
  14435. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14436. }, 0);
  14437. }, 0);
  14438. }
  14439. }, 0);
  14440. },
  14441. dragStart(val, i, j) {
  14442. console.log(this.taskCount);
  14443. this.dragType = "drag";
  14444. this.taskCount = j;
  14445. this.oldIndex = i;
  14446. this.oldData = val;
  14447. },
  14448. dragOver(i, j) {
  14449. this.typeIndex = "chapter-" + j + "-" + i;
  14450. this.newIndex = i;
  14451. },
  14452. dragEnd() {
  14453. if (this.dragType != "drag") {
  14454. this.typeIndex = "";
  14455. this.newIndex = "";
  14456. this.dragType = "";
  14457. this.isdrag = "";
  14458. return;
  14459. }
  14460. console.log(this.taskCount);
  14461. let newItems = [
  14462. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14463. .chapterData,
  14464. ];
  14465. // 删除老的节点
  14466. newItems.splice(this.oldIndex, 1);
  14467. // 在列表中目标位置增加新的节点
  14468. newItems.splice(this.newIndex, 0, this.oldData);
  14469. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14470. this.taskCount
  14471. ].chapterData = [...newItems];
  14472. this.typeIndex = "";
  14473. this.newIndex = "";
  14474. this.dragType = "";
  14475. this.isdrag = "";
  14476. this.$forceUpdate();
  14477. },
  14478. dragTaskStart(val, i, j) {
  14479. this.dragType = "task";
  14480. this.oldIndex = i;
  14481. this.oldData = val;
  14482. this.oldUnitIndex = j;
  14483. },
  14484. dragTaskOver(i, j) {
  14485. this.typeIndex = "task-" + i;
  14486. this.newIndex = i;
  14487. this.checkUnitIndex = j;
  14488. },
  14489. async dragTaskEnd() {
  14490. if (this.dragType != "task") {
  14491. this.newIndex = "";
  14492. this.dragType = "";
  14493. this.typeIndex = "";
  14494. this.checkUnitIndex = "";
  14495. this.isdrag = "";
  14496. return;
  14497. }
  14498. if (
  14499. this.newIndex == this.oldIndex &&
  14500. this.oldUnitIndex == this.checkUnitIndex
  14501. ) {
  14502. this.newIndex = "";
  14503. this.dragType = "";
  14504. this.typeIndex = "";
  14505. this.checkUnitIndex = "";
  14506. this.isdrag = "";
  14507. return;
  14508. }
  14509. let count1 = await this.getWorksCount(
  14510. 2,
  14511. this.checkUnitIndex,
  14512. this.newIndex,
  14513. 0
  14514. );
  14515. let count2 = await this.getWorksCount(
  14516. 2,
  14517. this.oldUnitIndex,
  14518. this.oldIndex,
  14519. 0
  14520. );
  14521. if (count1 > 0 || count2 > 0) {
  14522. this.$confirm(
  14523. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14524. "提示",
  14525. {
  14526. confirmButtonText: "确定",
  14527. cancelButtonText: "取消",
  14528. type: "warning",
  14529. }
  14530. )
  14531. .then(() => {
  14532. if (this.oldUnitIndex != this.checkUnitIndex) {
  14533. let newItems = [
  14534. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14535. ];
  14536. // 删除老的节点
  14537. newItems.splice(this.oldIndex, 1);
  14538. // 在列表中目标位置增加新的节点
  14539. let newItems2 = [
  14540. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14541. ];
  14542. newItems2.splice(this.newIndex, 0, this.oldData);
  14543. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14544. ...newItems,
  14545. ];
  14546. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14547. ...newItems2,
  14548. ];
  14549. } else {
  14550. let newItems = [
  14551. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14552. ];
  14553. let chapterData = []
  14554. if (this.oldIndex == 0) {
  14555. chapterData = newItems[this.oldIndex].chapterData
  14556. newItems[this.oldIndex].chapterData = []
  14557. } else if (this.newIndex == 0) {
  14558. chapterData = newItems[this.newIndex].chapterData
  14559. newItems[this.oldIndex].chapterData = []
  14560. }
  14561. // 删除老的节点
  14562. newItems.splice(this.oldIndex, 1);
  14563. // 在列表中目标位置增加新的节点
  14564. newItems.splice(this.newIndex, 0, this.oldData);
  14565. if (this.oldIndex == 0 || this.newIndex == 0) {
  14566. newItems[0].chapterData = chapterData
  14567. }
  14568. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14569. ...newItems,
  14570. ];
  14571. }
  14572. this.typeIndex = "";
  14573. this.newIndex = "";
  14574. this.dragType = "";
  14575. this.checkUnitIndex = "";
  14576. this.isdrag = "";
  14577. this.updateWork();
  14578. this.$forceUpdate();
  14579. })
  14580. .catch(() => {
  14581. this.newIndex = "";
  14582. this.dragType = "";
  14583. this.typeIndex = "";
  14584. this.checkUnitIndex = "";
  14585. this.isdrag = "";
  14586. return;
  14587. });
  14588. } else {
  14589. if (this.oldUnitIndex != this.checkUnitIndex) {
  14590. let newItems = [
  14591. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14592. ];
  14593. // 删除老的节点
  14594. newItems.splice(this.oldIndex, 1);
  14595. // 在列表中目标位置增加新的节点
  14596. let newItems2 = [
  14597. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14598. ];
  14599. newItems2.splice(this.newIndex, 0, this.oldData);
  14600. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14601. ...newItems,
  14602. ];
  14603. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14604. ...newItems2,
  14605. ];
  14606. } else {
  14607. let newItems = [
  14608. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14609. ];
  14610. let chapterData = []
  14611. if (this.oldIndex == 0) {
  14612. chapterData = newItems[this.oldIndex].chapterData
  14613. newItems[this.oldIndex].chapterData = []
  14614. } else if (this.newIndex == 0) {
  14615. chapterData = newItems[this.newIndex].chapterData
  14616. newItems[this.oldIndex].chapterData = []
  14617. }
  14618. // 删除老的节点
  14619. newItems.splice(this.oldIndex, 1);
  14620. // 在列表中目标位置增加新的节点
  14621. newItems.splice(this.newIndex, 0, this.oldData);
  14622. if (this.oldIndex == 0 || this.newIndex == 0) {
  14623. newItems[0].chapterData = chapterData
  14624. }
  14625. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14626. ...newItems,
  14627. ];
  14628. }
  14629. this.typeIndex = "";
  14630. this.newIndex = "";
  14631. this.dragType = "";
  14632. this.checkUnitIndex = "";
  14633. this.isdrag = "";
  14634. this.updateWork();
  14635. this.$forceUpdate();
  14636. }
  14637. },
  14638. dragUnitStart(val, i) {
  14639. this.dragType = "Unit";
  14640. this.oldIndex = i;
  14641. this.oldData = val;
  14642. },
  14643. dragUnitOver(i) {
  14644. this.typeIndex = "Unit-" + i;
  14645. this.newIndex = i;
  14646. console.log(i, this.unitJson[i].toolOpen);
  14647. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  14648. this.unitJson[i].toolOpen = true;
  14649. this.updateWork();
  14650. this.$forceUpdate();
  14651. }
  14652. },
  14653. async dragUnitEnd() {
  14654. if (this.dragType != "Unit") {
  14655. this.newIndex = "";
  14656. this.dragType = "";
  14657. this.typeIndex = "";
  14658. this.isdrag = "";
  14659. return;
  14660. }
  14661. if (this.newIndex == this.oldIndex) {
  14662. this.newIndex = "";
  14663. this.dragType = "";
  14664. this.typeIndex = "";
  14665. this.isdrag = "";
  14666. return;
  14667. }
  14668. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  14669. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  14670. console.log(count1, count2);
  14671. if (count1 > 0 || count2 > 0) {
  14672. this.$confirm(
  14673. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14674. "提示",
  14675. {
  14676. confirmButtonText: "确定",
  14677. cancelButtonText: "取消",
  14678. type: "warning",
  14679. }
  14680. )
  14681. .then(() => {
  14682. let newItems = [...this.unitJson];
  14683. // 删除老的节点
  14684. newItems.splice(this.oldIndex, 1);
  14685. // 在列表中目标位置增加新的节点
  14686. newItems.splice(this.newIndex, 0, this.oldData);
  14687. this.unitJson = [...newItems];
  14688. this.typeIndex = "";
  14689. this.newIndex = "";
  14690. this.dragType = "";
  14691. this.isdrag = "";
  14692. this.updateWork();
  14693. this.$forceUpdate();
  14694. })
  14695. .catch(() => {
  14696. this.newIndex = "";
  14697. this.dragType = "";
  14698. this.typeIndex = "";
  14699. this.isdrag = "";
  14700. return;
  14701. });
  14702. } else {
  14703. let newItems = [...this.unitJson];
  14704. // 删除老的节点
  14705. newItems.splice(this.oldIndex, 1);
  14706. // 在列表中目标位置增加新的节点
  14707. newItems.splice(this.newIndex, 0, this.oldData);
  14708. this.unitJson = [...newItems];
  14709. this.typeIndex = "";
  14710. this.newIndex = "";
  14711. this.dragType = "";
  14712. this.isdrag = "";
  14713. this.updateWork();
  14714. this.$forceUpdate();
  14715. }
  14716. },
  14717. getWorksCount(type, stage, task, tool) {
  14718. return new Promise((resolve, reject) => {
  14719. let params = [
  14720. {
  14721. cid: this.cid,
  14722. stage: stage,
  14723. task: task,
  14724. tool: tool,
  14725. type: type,
  14726. },
  14727. ];
  14728. this.ajax
  14729. .post(this.$store.state.api + "getCourseWorkCount", params)
  14730. .then((res) => {
  14731. let count = res.data[0][0].count;
  14732. resolve(count);
  14733. })
  14734. .catch((err) => {
  14735. resolve(0);
  14736. this.$message.error("网络不佳");
  14737. console.error(err);
  14738. });
  14739. });
  14740. },
  14741. getTwoType(id) {
  14742. this.twoJson = [];
  14743. var array = this.CourseTypeJson1[
  14744. "3f8eed32-aba9-11ee-b534-005056b86db5"
  14745. ].filter((e) => {
  14746. return e.ppid == id;
  14747. });
  14748. this.twoJson = array;
  14749. this.$forceUpdate();
  14750. },
  14751. ctype() {
  14752. this.oneJson =
  14753. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  14754. },
  14755. selectAllType1() {
  14756. this.CourseType1 = [];
  14757. this.CourseTypeJson1 = {};
  14758. this.courseTypeId1 = {};
  14759. this.$forceUpdate();
  14760. let params = {
  14761. org: this.org && this.org != "" ? this.org : "",
  14762. oid: this.oid && this.oid != "" ? this.oid : "",
  14763. };
  14764. this.ajax
  14765. .get(this.$store.state.api + "selectAllEvaType", params)
  14766. .then((res) => {
  14767. this.CourseType1 = res.data;
  14768. for (var i = 0; i < res.data[0].length; i++) {
  14769. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  14770. res.data[0][i].name = "一级分类";
  14771. } else if (
  14772. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  14773. ) {
  14774. res.data[0][i].name = "二级分类";
  14775. }
  14776. if (!this.cid) {
  14777. this.courseTypeId1[res.data[0][i].id] = [];
  14778. }
  14779. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  14780. this.CourseTypeJson1[res.data[0][i].id] = [];
  14781. }
  14782. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  14783. for (var j = 0; j < res.data[1].length; j++) {
  14784. if (res.data[0][i].id == res.data[1][j].pid) {
  14785. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14786. }
  14787. }
  14788. // } else {
  14789. if (res.data[2].length > 0) {
  14790. for (var j = 0; j < res.data[2].length; j++) {
  14791. if (res.data[0][i].id == res.data[2][j].pid) {
  14792. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14793. }
  14794. }
  14795. }
  14796. if (res.data[3].length > 0) {
  14797. for (var j = 0; j < res.data[3].length; j++) {
  14798. if (res.data[0][i].id == res.data[3][j].pid) {
  14799. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14800. }
  14801. }
  14802. }
  14803. // }
  14804. }
  14805. this.ctype();
  14806. this.cetBoxDialog = true;
  14807. })
  14808. .catch((err) => {
  14809. console.error(err);
  14810. });
  14811. },
  14812. setAiJson(pan,string,string2){
  14813. if(pan == 'aiTeacher2'){
  14814. this.aiJson['teacherDetail2'] = string
  14815. }else if(pan == 'aiRateRuleA'){
  14816. this.aiJson['aiRateRule'] = string
  14817. }else if(pan == 'aiOutline2'){
  14818. this.aiJson['aiOutlineTask'] = string
  14819. this.aiJson['aiOutlineDetail'] = string2
  14820. this.aiText2 = ''
  14821. }else if(pan == 'aiTeacher3'){
  14822. this.aiJson['aiCpoteTask'] = string
  14823. this.aiJson['teacherDetail2'] = string2
  14824. this.aiText2 = ''
  14825. }else if(pan == 'aiTask2'){
  14826. this.aiJson['aiTask'] = string
  14827. }else if(pan == 'aiteacherTextDetail'){
  14828. this.aiJson['aiAbstract'] = string
  14829. }else if(pan == 'aitargetTextDetail'){
  14830. this.aiJson['aiTarget'] = string
  14831. }else if(pan == 'aitargetTextDetail2'){
  14832. this.aiJson['aiTarget2'] = string
  14833. }else if(pan == 'aitargetTextDetail3'){
  14834. this.aiJson['aiTargetGet'] = string
  14835. this.aiJson['aiTarget2'] = string2
  14836. }else {
  14837. this.aiJson[pan] = string
  14838. }
  14839. this.$forceUpdate();
  14840. },
  14841. editTask3(index){
  14842. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  14843. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  14844. }else {
  14845. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  14846. }
  14847. this.$forceUpdate();
  14848. },
  14849. editTask2(index){
  14850. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  14851. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  14852. }else {
  14853. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  14854. }
  14855. this.$forceUpdate();
  14856. },
  14857. openRule(i, k){
  14858. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  14859. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  14860. }else {
  14861. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  14862. }
  14863. this.$forceUpdate();
  14864. },
  14865. editCpote(index){
  14866. if(this.cpote[index]){
  14867. this.cpote[index] = false
  14868. }else {
  14869. this.cpote[index] = true
  14870. }
  14871. this.$forceUpdate();
  14872. },
  14873. clickGenTT(){
  14874. if(!this.teacherInfoData.length){
  14875. this.$message.error("请上传教案");
  14876. return;
  14877. }
  14878. this.openAiDialog(2, 'aiteacherTextDetail',1)
  14879. setTimeout(() => {
  14880. this.openAiDialog(2, 'aitargetTextDetail',1)
  14881. }, 500);
  14882. },
  14883. clickGenTT2(){
  14884. if (this.courseName == "") {
  14885. this.$message.error("请补充填写课程名称");
  14886. return;
  14887. }
  14888. this.openAiDialog(2, 'aiDetail',1)
  14889. setTimeout(() => {
  14890. this.openAiDialog(2, 'aitargetTextDetail2',1)
  14891. }, 500);
  14892. this.courseTextBool = true
  14893. },
  14894. openAiDialog2(clickType, type, callback, index, tindex){
  14895. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  14896. confirmButtonText: "确定",
  14897. cancelButtonText: "取消",
  14898. type: "warning",
  14899. })
  14900. .then(() => {
  14901. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  14902. // this.openAiDialog(clickType, 'aiTeacher')
  14903. // }else {
  14904. this.openAiDialog(clickType, type, callback, index, tindex)
  14905. // }
  14906. })
  14907. .catch(() => {
  14908. });
  14909. },
  14910. openAiDialog(clickType, type, callback, index, tindex) {
  14911. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  14912. this.$message.error("您没有权限修改/查看提示词");
  14913. return;
  14914. }
  14915. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  14916. this.$message.error("请上传教案");
  14917. return;
  14918. }
  14919. if (this.courseName == "") {
  14920. this.$message.error("请补充填写课程名称");
  14921. return;
  14922. }
  14923. this.aiText2 = ''
  14924. this.clickType = clickType
  14925. let sub = []
  14926. if (this.courseTypeId.length) {
  14927. for (var i = 0; i < this.courseTypeId.length; i++) {
  14928. let _sid = this.courseTypeId[i]
  14929. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14930. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  14931. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  14932. }
  14933. }
  14934. }
  14935. }
  14936. let mclass = []
  14937. if (this.courseTypeId.length) {
  14938. for (var i = 0; i < this.courseTypeId.length; i++) {
  14939. let _sid = this.courseTypeId[i]
  14940. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14941. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  14942. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  14943. }
  14944. }
  14945. }
  14946. }
  14947. if (type == "aiDetail") {
  14948. if (this.ttextLoading) {
  14949. this.$message({
  14950. message: "请回答完毕后再次发送",
  14951. type: "warning"
  14952. });
  14953. return;
  14954. }
  14955. this.aitype = "aiDetail"
  14956. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  14957. this.aiText = this.aiJson.aiDetail
  14958. this.aiCallBack = callback
  14959. } else if (type == "aiOutline") {
  14960. this.aitype = "aiOutline"
  14961. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14962. this.aiText = this.aiJson.aiOutline
  14963. } else if (type == "aiOutline2") {
  14964. this.aitype = "aiOutline2"
  14965. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14966. this.aiText = this.aiJson.aiOutlineTask
  14967. this.aiText2 = this.aiJson.aiOutlineDetail
  14968. } else if (type == "aiOutlineDetail2") {
  14969. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  14970. this.$message({
  14971. message: "请回答完毕后再次发送",
  14972. type: "warning"
  14973. });
  14974. return;
  14975. }
  14976. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  14977. this.$message.error('请输入任务名称')
  14978. return;
  14979. }
  14980. this.aitype = type
  14981. this.aiCallBack = callback
  14982. this.aiText = this.aiJson.aiOutlineDetail2
  14983. } else if (type == "aiTask") {
  14984. this.aitype = "aiTask"
  14985. var _text = ""
  14986. for (var i = 0; i < this.teacherText.length; i++) {
  14987. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  14988. }
  14989. // this.aiText = `请根据${_text}。`
  14990. this.aiText = this.aiJson.aiTask
  14991. this.aiCallBack = callback
  14992. } else if (type == "aiTask2") {
  14993. if (this.taskLoading[callback]) {
  14994. this.$message({
  14995. message: "请回答完毕后再次发送",
  14996. type: "warning"
  14997. });
  14998. return;
  14999. }
  15000. this.aitype = "aiTask2"
  15001. this.aiText = this.aiJson.aiTask
  15002. this.aiCallBack = callback
  15003. } else if (type == "aiDetail1") {
  15004. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  15005. this.$message({
  15006. message: "请回答完毕后再次发送",
  15007. type: "warning"
  15008. });
  15009. return;
  15010. }
  15011. this.aitype = "aiDetail1"
  15012. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  15013. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  15014. this.aiText = this.aiJson.aiDetail1
  15015. this.aiCallBack = callback
  15016. this.aiIndex = index
  15017. } else if (type == "aiDetail2") {
  15018. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  15019. this.$message({
  15020. message: "请回答完毕后再次发送",
  15021. type: "warning"
  15022. });
  15023. return;
  15024. }
  15025. this.aitype = "aiDetail2"
  15026. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  15027. this.aiText = this.aiJson.aiDetail2
  15028. this.aiCallBack = callback
  15029. this.aiIndex = index
  15030. } else if (type == "aiDetail3") {
  15031. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  15032. this.$message({
  15033. message: "请回答完毕后再次发送",
  15034. type: "warning"
  15035. });
  15036. return;
  15037. }
  15038. this.aitype = "aiDetail3"
  15039. this.aiText = this.aiJson.aiDetail3
  15040. this.aiIndex = index + '-' + tindex
  15041. } else if (type == "aiDetail4") {
  15042. var _text = ""
  15043. for (var i = 0; i < callback.length; i++) {
  15044. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15045. }
  15046. this.aitype = "aiDetail4"
  15047. this.aiText = this.aiJson.aiDetail4
  15048. this.aiIndex = index
  15049. } else if (type == "aiTeacher") {
  15050. this.aitype = "aiTeacher"
  15051. var _text = ""
  15052. for (var i = 0; i < this.dArray.length; i++) {
  15053. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15054. }
  15055. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15056. this.aiText = this.aiJson.aiTeacher
  15057. this.aiCallBack = callback
  15058. } else if (type == "aiTeacher2") {
  15059. this.aitype = "aiTeacher2"
  15060. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15061. } else if (type == "aiTeacher3") {
  15062. this.aitype = type
  15063. this.aiText = this.aiJson.aiCpoteTask
  15064. this.aiText2 = this.aiJson.teacherDetail2
  15065. } else if (type == "teacherDetail") {
  15066. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15067. this.$message({
  15068. message: "请回答完毕后再次发送",
  15069. type: "warning"
  15070. });
  15071. return;
  15072. }
  15073. this.aitype = "teacherDetail"
  15074. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15075. this.aiText = this.aiJson.teacherDetail
  15076. this.aiCallBack = callback
  15077. this.aiIndex = index
  15078. } else if (type == "teacherDetail2") {
  15079. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15080. this.$message({
  15081. message: "请回答完毕后再次发送",
  15082. type: "warning"
  15083. });
  15084. return;
  15085. }
  15086. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15087. this.$message.error('请输入任务名称')
  15088. return;
  15089. }
  15090. this.aitype = "teacherDetail2"
  15091. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15092. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15093. this.aiCallBack = callback
  15094. this.aiIndex = index
  15095. } else if (type == "aiCpote1") {
  15096. if (this.cpotetLoading.cpote1) {
  15097. this.$message({
  15098. message: "请回答完毕后再次发送",
  15099. type: "warning"
  15100. });
  15101. return;
  15102. }
  15103. this.aitype = "aiCpote1"
  15104. this.aiText = this.aiJson.cpote1
  15105. this.aiCallBack = callback
  15106. } else if (type == "aiCpote2") {
  15107. if (this.cpotetLoading.cpote2) {
  15108. this.$message({
  15109. message: "请回答完毕后再次发送",
  15110. type: "warning"
  15111. });
  15112. return;
  15113. }
  15114. this.aitype = "aiCpote2"
  15115. this.aiText = this.aiJson.cpote2
  15116. this.aiCallBack = callback
  15117. } else if (type == "aiCpote3") {
  15118. if (this.cpotetLoading.cpote3) {
  15119. this.$message({
  15120. message: "请回答完毕后再次发送",
  15121. type: "warning"
  15122. });
  15123. return;
  15124. }
  15125. this.aitype = "aiCpote3"
  15126. this.aiText = this.aiJson.cpote3
  15127. this.aiCallBack = callback
  15128. } else if (type == "aiCpote4") {
  15129. if (this.cpotetLoading.cpote4) {
  15130. this.$message({
  15131. message: "请回答完毕后再次发送",
  15132. type: "warning"
  15133. });
  15134. return;
  15135. }
  15136. this.aitype = "aiCpote4"
  15137. this.aiText = this.aiJson.cpote4
  15138. this.aiCallBack = callback
  15139. } else if (type == 'aiteacherTextDetail'){
  15140. if (this.tteacherTextLoading) {
  15141. this.$message({
  15142. message: "请回答完毕后再次发送",
  15143. type: "warning"
  15144. });
  15145. return;
  15146. }
  15147. this.aitype = type
  15148. this.aiText = this.aiJson.aiAbstract
  15149. this.aiCallBack = callback
  15150. } else if (type == 'aitargetTextDetail'){
  15151. if (this.ttargetTextLoading) {
  15152. this.$message({
  15153. message: "请回答完毕后再次发送",
  15154. type: "warning"
  15155. });
  15156. return;
  15157. }
  15158. this.aitype = type
  15159. this.aiText = this.aiJson.aiTarget
  15160. this.aiCallBack = callback
  15161. } else if (type == 'aitargetTextDetail2'){
  15162. if (this.ttargetTextLoading2) {
  15163. this.$message({
  15164. message: "请回答完毕后再次发送",
  15165. type: "warning"
  15166. });
  15167. return;
  15168. }
  15169. this.aitype = type
  15170. this.aiText = this.aiJson.aiTarget2
  15171. this.aiCallBack = callback
  15172. } else if (type == 'aitargetTextDetail3'){
  15173. if (this.ttargetTextLoading2) {
  15174. this.$message({
  15175. message: "请回答完毕后再次发送",
  15176. type: "warning"
  15177. });
  15178. return;
  15179. }
  15180. this.aitype = type
  15181. this.aiText = this.aiJson.aiTargetGet
  15182. this.aiText2 = this.aiJson.aiTarget2
  15183. this. aiCallBack= callback
  15184. } else if (type == 'aiSearchFile'){
  15185. if(this.fileSLoading) {
  15186. this.$message({
  15187. message: "请回答完毕后再次发送",
  15188. type: "warning"
  15189. });
  15190. return;
  15191. }
  15192. this.aitype = type
  15193. this.aiText = this.aiJson.aiSearchFile
  15194. } else if (type == 'aiRateRule'){
  15195. this.aitype = type
  15196. this.aiText = this.aiJson.aiRateRule
  15197. this.aiCallBack = [callback, index]
  15198. } else if (type == 'aiRateRuleA'){
  15199. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  15200. confirmButtonText: "生成所有",
  15201. cancelButtonText: "仅生成该任务",
  15202. distinguishCancelAndClose: true,
  15203. type: "warning",
  15204. })
  15205. .then(() => {
  15206. this.aitype = type
  15207. this.aiText = this.aiJson.aiRateRule
  15208. this.aiCallBack = [1,callback]
  15209. this.dialogVisibleAiD = true
  15210. }).catch((v) => {
  15211. console.log(v);
  15212. if (v == "cancel") {
  15213. this.aitype = type
  15214. this.aiText = this.aiJson.aiRateRule
  15215. this.aiCallBack = [2,callback]
  15216. this.dialogVisibleAiD = true
  15217. }
  15218. })
  15219. }
  15220. if(type != 'aiRateRuleA'){
  15221. this.dialogVisibleAiD = true
  15222. }
  15223. },
  15224. async aiConfirm(msg,msg2) {
  15225. let sub = []
  15226. if (this.courseTypeId.length) {
  15227. for (var i = 0; i < this.courseTypeId.length; i++) {
  15228. let _sid = this.courseTypeId[i]
  15229. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15230. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15231. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15232. }
  15233. }
  15234. }
  15235. }
  15236. let mclass = []
  15237. if (this.courseTypeId.length) {
  15238. for (var i = 0; i < this.courseTypeId.length; i++) {
  15239. let _sid = this.courseTypeId[i]
  15240. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15241. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15242. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15243. }
  15244. }
  15245. }
  15246. }
  15247. let url = []
  15248. if (this.infoData.length) {
  15249. for (var i = 0; i < this.infoData.length; i++) {
  15250. url.push(this.infoData[i].url)
  15251. }
  15252. }
  15253. if (this.aitype == "aiDetail") {
  15254. this.detailYou(msg)
  15255. } else if (this.aitype == "aiOutline") {
  15256. this.loading = true
  15257. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15258. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15259. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  15260. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  15261. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15262. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15263. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15264. let message = `NOTICE
  15265. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15266. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15267. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15268. Instruction: Based on the context, follow "Format example", write content.
  15269. # Context
  15270. ## 要求
  15271. ${msg} 以及##参考资料
  15272. ## 参考资料
  15273. 课程名字:${this.courseName}
  15274. ${courseText ? '课程简要描述:' + courseText : ''}
  15275. ${sub.length ? '学科:' + sub.join(",") : ''}
  15276. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15277. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15278. detail输出不要输出成json,文本或者markdown都可以
  15279. # Format example
  15280. [{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"}]`
  15281. this.aiGet2(message, () => {
  15282. this.loading = false
  15283. this.isOutline = true
  15284. })
  15285. } else if (this.aitype == "aiOutline2") {
  15286. this.loading = true
  15287. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15288. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15289. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15290. let message = `NOTICE
  15291. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15292. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15293. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15294. Instruction: Based on the context, follow "Format example", write content.
  15295. # Context
  15296. ## 要求
  15297. ${msg} 以及##参考资料
  15298. ## 参考资料
  15299. 课程名字:${this.courseName}
  15300. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  15301. ${sub.length ? '学科:' + sub.join(",") : ''}
  15302. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15303. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15304. # Format example
  15305. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15306. this.aiGetTask2(message, () => {
  15307. this.loading = false
  15308. this.isOutline = true
  15309. })
  15310. } else if (this.aitype == "aiOutlineDetail2") {
  15311. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  15312. } else if (this.aitype == "aiTask") {
  15313. var _text = ""
  15314. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15315. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15316. }
  15317. let message = `NOTICE
  15318. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15319. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15320. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15321. Instruction: Based on the context, follow "Format example", write content.
  15322. # Context
  15323. ## 要求
  15324. ${msg} 为**每个教学任务分别输出**以下内容。
  15325.  
  15326. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15327. ## 参考资料
  15328. 教学任务教案:${_text}
  15329. ## 格式要求
  15330. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  15331. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15332. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  15333. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15334. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15335. 出现选择题和问答题的概率提高
  15336. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  15337.  
  15338. # Format example
  15339. [{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"}]}]`
  15340. this.loading = true
  15341. this.aiGet3(message, this.aiCallBack)
  15342. } else if (this.aitype == "aiTask2") {
  15343. if(this.aiCallBack == 'all'){
  15344. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  15345. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15346. let message = `NOTICE
  15347. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15348. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15349. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15350. Instruction: Based on the context, follow "Format example", write content.
  15351. # Context
  15352. ## 要求
  15353. ${msg} 为教学任务分别输出以下内容。
  15354.  
  15355. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15356. ## 参考资料
  15357. 教学任务教案:${_text}
  15358. ## 格式要求
  15359. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15360. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  15361. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15362. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15363. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15364.  
  15365. # Format example
  15366. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15367. this.taskLoading[_task] = true
  15368. this.aiGet32(message, _task)
  15369. }
  15370. }else{
  15371. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15372. let message = `NOTICE
  15373. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15374. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15375. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15376. Instruction: Based on the context, follow "Format example", write content.
  15377. # Context
  15378. ## 要求
  15379. ${msg} 为教学任务分别输出以下内容。
  15380.  
  15381. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15382. ## 参考资料
  15383. 教学任务教案:${_text}
  15384. ## 格式要求
  15385. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15386. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  15387. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15388. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15389. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15390.  
  15391. # Format example
  15392. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15393. this.taskLoading[this.aiCallBack] = true
  15394. this.aiGet32(message, this.aiCallBack)
  15395. }
  15396. } else if (this.aitype == "aiDetail1") {
  15397. this.aiDetail(msg, this.aiIndex)
  15398. } else if (this.aitype == "aiDetail2") {
  15399. this.aiDetail2(msg, this.aiIndex)
  15400. } else if (this.aitype == "aiDetail3") {
  15401. let _index = this.aiIndex.split('-')
  15402. this.aiDetail3(msg, _index[0], _index[1])
  15403. } else if (this.aitype == "aiDetail4") {
  15404. this.aiDetail4(msg, this.aiIndex)
  15405. } else if (this.aitype == "teacherDetail") {
  15406. this.aiDetail5(msg, this.aiIndex)
  15407. } else if (this.aitype == "teacherDetail2") {
  15408. this.aiDetail52(msg, this.aiIndex)
  15409. } else if (this.aitype == "aiCpote1") {
  15410. this.aiCpote(msg, this.aiCallBack)
  15411. } else if (this.aitype == "aiCpote2") {
  15412. this.aiCpote(msg, this.aiCallBack)
  15413. } else if (this.aitype == "aiCpote3") {
  15414. this.aiCpote(msg, this.aiCallBack)
  15415. } else if (this.aitype == "aiCpote4") {
  15416. this.aiCpote(msg, this.aiCallBack)
  15417. } else if (this.aitype == "aiTeacher") {
  15418. this.loading = true
  15419. var _text = ""
  15420. for (var i = 0; i < this.dArray.length; i++) {
  15421. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15422. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15423. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15424. let message = ` NOTICE
  15425. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15426. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15427. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15428. Instruction: Based on the context, follow "Format example", write content.
  15429. # Context
  15430. ## 要求
  15431. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  15432. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  15433. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15434. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15435. ## Format example
  15436. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  15437. this.aiGet4(message, () => {
  15438. this.loading = false
  15439. this.isOutline2 = true
  15440. })
  15441. } else if (this.aitype == "aiTeacher2"){
  15442. this.isOutline2 = true
  15443. setTimeout(()=>{
  15444. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15445. this.aiDetail52(msg, i)
  15446. }
  15447. }, 0)
  15448. } else if (this.aitype == "aiTeacher3"){
  15449. this.loading = true
  15450. let message = `NOTICE
  15451. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15452. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15453. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15454. Instruction: Based on the context, follow "Format example", write content.
  15455. # Context
  15456. ## 要求
  15457. ${msg} 以及##参考资料
  15458. ## 参考资料
  15459. 任务簇:${this.cpote.cpote4}
  15460. # Format example
  15461. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15462. this.aiGetTask3(message, () => {
  15463. this.loading = false
  15464. this.isOutline2 = true
  15465. })
  15466. } else if (this.aitype == "aiteacherTextDetail") {
  15467. this.aiteacherTextDetail(msg)
  15468. } else if (this.aitype == "aitargetTextDetail") {
  15469. this.aitargetTextDetail(msg)
  15470. } else if (this.aitype == "aitargetTextDetail2") {
  15471. this.aitargetTextDetail2(msg)
  15472. } else if (this.aitype == "aitargetTextDetail3") {
  15473. this.aitargetTextDetail3(msg)
  15474. } else if (this.aitype == 'aiSearchFile'){
  15475. let messages = `NOTICE
  15476. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15477. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15478. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15479. Instruction: Based on the context, follow "Format example", write content.
  15480. ## 参考资料
  15481. 关键词:${this.courseName}
  15482. # Context
  15483. ## 要求
  15484. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  15485. # Format example
  15486. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  15487. this.fileSLoading = true
  15488. this.aiSearchFile(messages,()=>{
  15489. this.fileSLoading = false
  15490. })
  15491. } else if (this.aitype == 'aiRateRule'){
  15492. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  15493. } else if (this.aitype == 'aiRateRuleA'){
  15494. if(this.aiCallBack[0] == 1){
  15495. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15496. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  15497. for(var k = 0; k < task.eList.length; k++){
  15498. if(!task.eList[k].rule){
  15499. this.againEva(msg, i, k)
  15500. }
  15501. }
  15502. }
  15503. }else if(this.aiCallBack[0] == 2){
  15504. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  15505. for(var k = 0; k < task.eList.length; k++){
  15506. if(!task.eList[k].rule){
  15507. this.againEva(msg, this.aiCallBack[1], k)
  15508. }
  15509. }
  15510. }
  15511. }
  15512. this.setAiJson(this.aitype, msg, msg2)
  15513. },
  15514. detailYou(message) {
  15515. this.textLoading = true
  15516. this.ttextLoading = true
  15517. let sub = []
  15518. if (this.courseTypeId.length) {
  15519. for (var i = 0; i < this.courseTypeId.length; i++) {
  15520. let _sid = this.courseTypeId[i]
  15521. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15522. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15523. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15524. }
  15525. }
  15526. }
  15527. }
  15528. let mclass = []
  15529. if (this.courseTypeId.length) {
  15530. for (var i = 0; i < this.courseTypeId.length; i++) {
  15531. let _sid = this.courseTypeId[i]
  15532. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15533. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15534. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15535. }
  15536. }
  15537. }
  15538. }
  15539. let url = []
  15540. if (this.infoData.length) {
  15541. for (var i = 0; i < this.infoData.length; i++) {
  15542. url.push(this.infoData[i].url)
  15543. }
  15544. }
  15545. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15546. // --------
  15547. // ## 补充参考资料
  15548. // 补充资料:${url.join(",")}
  15549. // 补充描述:${this.courseText2} ##补充参考资料和
  15550. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15551. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15552. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15553. let msg = `NOTICE
  15554. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  15555. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  15556. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15557. Instruction: Based on the context, follow "Format example", write content.
  15558. #Context
  15559. ## 参考资料
  15560. 课程名字:${this.courseName}
  15561. ${sub.length ? '学科:' + sub.join(",") : ''}
  15562. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15563. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  15564. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  15565. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  15566. ## 要求
  15567. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  15568. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  15569. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  15570. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  15571. this.aiGet(msg)
  15572. },
  15573. setUnitJson() {
  15574. this.unitJson[0].chapterInfo[0].taskJson[0] = { "task": "观察热在水中的传递", "taskDetail": "同学们,今天我们将通过一个有趣的实验来探究热是如何在水中传递的。你将需要加热水并观察温度是如何分布的。请准备好实验器材,并按照安全指南进行操作。在实验过程中,请注意观察热水和冷水之间的相互作用,以及水温是如何随时间和空间变化的。你将需要记录你的观察结果,并思考热是如何从一个地方传递到另一个地方的。", "chapterData": [], "toolText": "", "toolChoose": [{ "tool": [1], "toolDetail": "使用电子白板工具来绘制你的实验设置和观察到的热传递过程。你可以使用电子白板的绘图功能来创建一个温度分布图,展示热水和冷水相遇时的情况。同时,你可以用它来记录实验步骤和关键观察点,以便于你和同学们进行讨论和分享。", "toolType": 1, "askCount": 1, "askTitle": "", "askJson": [{ "askstitle": "", "askItem": 1, "checkList": [] }], "isFold3": false }], "isShowTools": false, "askCount": 1, "isFold": 0, "askTitle": "", "askJson": [{ "askstitle": "", "askItem": 1, "checkList": [] }], "checkJson": [{ "checkCount": [], "checkPerent": [] }], "homeworkList": [], "toolOpen": true, "eList": [{ "value": "实验观察和记录", "detail": "学生应该能够准确地记录实验过程中的观察结果,包括水温变化和热传递的现象。", "score": 5 }, { "value": "数据分析和解释", "detail": "学生应该能够分析实验数据,解释热在水中的传递方式,并能够用自己的话描述热对流的原理。", "score": 5 }, { "value": "实验报告撰写", "detail": "学生应该能够撰写一份清晰的实验报告,包括实验目的、方法、结果和结论,以及对实验过程的反思。", "score": 5 }] }
  15575. this.$forceUpdate()
  15576. },
  15577. async aiGet(messages) {
  15578. let _this = this
  15579. let fileid = []
  15580. if(!this.yiKeTemplateArray.includes(this.templateid)){
  15581. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  15582. if(_this.cankaoInfoData[i].fileid){
  15583. fileid.push(_this.cankaoInfoData[i].fileid)
  15584. }else {
  15585. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  15586. if(_fileid){
  15587. _this.cankaoInfoData[i].fileid = _fileid
  15588. _this.$forceUpdate();
  15589. fileid.push(_fileid)
  15590. }
  15591. }
  15592. }
  15593. if(this.mode == 1){
  15594. for (var i = 0; i < _this.infoData.length; i++) {
  15595. if(_this.infoData[i].fileid){
  15596. fileid.push(_this.infoData[i].fileid)
  15597. }else {
  15598. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15599. if(_fileid){
  15600. _this.infoData[i].fileid = _fileid
  15601. _this.$forceUpdate();
  15602. fileid.push(_fileid)
  15603. }
  15604. }
  15605. }
  15606. }
  15607. } else {
  15608. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15609. if (_this.infoData.length) {
  15610. for (var i = 0; i < _this.infoData.length; i++) {
  15611. if(_this.infoData[i].fileid){
  15612. fileid.push(_this.infoData[i].fileid)
  15613. }else {
  15614. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15615. if(_fileid){
  15616. _this.infoData[i].fileid = _fileid
  15617. _this.$forceUpdate();
  15618. fileid.push(_fileid)
  15619. }
  15620. }
  15621. }
  15622. }
  15623. }
  15624. let _uuid = uuidv4();
  15625. // let params = JSON.stringify({
  15626. // // "model": "Chat",
  15627. // model: 'gpt-3.5-turbo',
  15628. // temperature: 0,
  15629. // max_tokens: 4096,
  15630. // top_p: 1,
  15631. // frequency_penalty: 0,
  15632. // presence_penalty: 0,
  15633. // messages: [{
  15634. // content: messages,
  15635. // role: 'user'
  15636. // }],
  15637. // uid: _uuid,
  15638. // mind_map_question: "",
  15639. // })
  15640. let params = {
  15641. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15642. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15643. session_name: _uuid,
  15644. userId: _this.userid,
  15645. uid: _uuid,
  15646. file_ids: fileid.length ? [...fileid] : '',
  15647. }
  15648. // let params = JSON.stringify({
  15649. // message: {
  15650. // anthropic_version: "bedrock-2023-05-31",
  15651. // max_tokens: 4096,
  15652. // temperature: 0,
  15653. // top_p: 1,
  15654. // messages: [{
  15655. // "role": "user",
  15656. // "content": messages
  15657. // }] ,
  15658. // },
  15659. // uid: _uuid,
  15660. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15661. // });
  15662. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15663. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15664. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15665. console.log(response);
  15666. // let data = response.data.FunctionResponse
  15667. // if (data.choices && data.choices.length && data.choices[0].message) {
  15668. // _this.courseText = data.choices[0].message.content
  15669. // }
  15670. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15671. } else {
  15672. _this.$message.warning(response.data.FunctionResponse.result);
  15673. }
  15674. }).catch(function (error) {
  15675. _this.textLoading = false
  15676. _this.ttextLoading = false
  15677. console.log(error);
  15678. });
  15679. await _this.aiGetgetAiContent(_uuid)
  15680. },
  15681. aiGetgetAiContent(_uid) {
  15682. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15683. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15684. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15685. let _allText = "";
  15686. let _mdText = "";
  15687. let _iindex = 0
  15688. _source.onmessage = _e => {
  15689. let _eData = JSON.parse(_e.data).content;
  15690. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15691. //对话已经完成
  15692. _mdText = _mdText.replace("_", "");
  15693. _source.close();
  15694. this.courseText = _mdText;
  15695. this.textLoading = false
  15696. this.ttextLoading = false
  15697. this.courseTextB = false
  15698. return;
  15699. } else {
  15700. _iindex++
  15701. //对话还在继续
  15702. let _text = "";
  15703. _text = _eData.replaceAll("'", "");
  15704. if (_allText == "") {
  15705. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15706. } else {
  15707. _allText += _text;
  15708. }
  15709. _mdText = _allText + "_";
  15710. _mdText = _mdText.replace(/\\n/g, "\n");
  15711. _mdText = _mdText.replace(/\\/g, "");
  15712. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15713. //转化返回的回复流数据
  15714. if(_iindex == 10){
  15715. this.courseText = _mdText;
  15716. _iindex = 0
  15717. }
  15718. this.textLoading = false
  15719. // 处理流数据
  15720. }
  15721. // this.$forceUpdate();
  15722. };
  15723. },
  15724. async aiGet2(messages, callback) {
  15725. let _this = this
  15726. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15727. if (_this.infoData.length) {
  15728. for (var i = 0; i < _this.infoData.length; i++) {
  15729. if(_this.infoData[i].fileid){
  15730. fileid.push(_this.infoData[i].fileid)
  15731. }else {
  15732. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15733. if(_fileid){
  15734. _this.infoData[i].fileid = _fileid
  15735. _this.$forceUpdate();
  15736. fileid.push(_fileid)
  15737. }
  15738. }
  15739. }
  15740. }
  15741. console.log('fileid=========',fileid)
  15742. // let params = JSON.stringify({
  15743. // // "model": "Chat",
  15744. // model: 'gpt-3.5-turbo',
  15745. // temperature: 0,
  15746. // max_tokens: 4096,
  15747. // top_p: 1,
  15748. // frequency_penalty: 0,
  15749. // presence_penalty: 0,
  15750. // messages: [{
  15751. // content: messages,
  15752. // role: 'user'
  15753. // }],
  15754. // stream: false,
  15755. // uid: this.userid,
  15756. // mind_map_question: "",
  15757. // })
  15758. // // let params = JSON.stringify({
  15759. // // message: {
  15760. // // anthropic_version: "bedrock-2023-05-31",
  15761. // // max_tokens: 4096,
  15762. // // temperature: 0,
  15763. // // top_p: 1,
  15764. // // messages: [{
  15765. // // content: messages,
  15766. // // role: 'user'
  15767. // // }], //
  15768. // // },
  15769. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15770. // // });
  15771. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15772. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  15773. // console.log(response);
  15774. // let data = response.data.FunctionResponse
  15775. // if (data.choices && data.choices.length && data.choices[0].message) {
  15776. // console.log(data.choices[0].message.content);
  15777. // let dArray = JSON.parse(data.choices[0].message.content)
  15778. // _this.dArray = dArray
  15779. // _this.unitJson[0].chapterInfo[0].taskJson = []
  15780. // for (var i = 0; i < dArray.length; i++) {
  15781. // let _task = dArray[i]
  15782. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15783. // task: _task.task,
  15784. // taskDetail: "",
  15785. // taskDetail2: _task.detail,
  15786. // taskDetail3: "",
  15787. // chapterData: [],
  15788. // toolText: "",
  15789. // toolChoose: [
  15790. // {
  15791. // tool: [],
  15792. // toolDetail: "",
  15793. // toolType: 0,
  15794. // askCount: 1,
  15795. // askTitle: "",
  15796. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15797. // },
  15798. // ],
  15799. // isShowTools: false,
  15800. // askCount: 1,
  15801. // isFold: 0,
  15802. // askTitle: "",
  15803. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15804. // checkJson: [{ checkCount: [], checkPerent: [] }],
  15805. // homeworkList: [],
  15806. // })
  15807. // }
  15808. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  15809. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15810. // _this.$forceUpdate();
  15811. // }
  15812. // // if (data.result) {
  15813. // // console.log(data.result);
  15814. // // let dArray = JSON.parse(data.result)
  15815. // // _this.dArray = dArray
  15816. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  15817. // // for (var i = 0; i < dArray.length; i++) {
  15818. // // let _task = dArray[i]
  15819. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15820. // // task: _task.task,
  15821. // // taskDetail: "",
  15822. // // taskDetail2: _task.detail,
  15823. // // taskDetail3: "",
  15824. // // chapterData: [],
  15825. // // toolText: "",
  15826. // // toolChoose: [
  15827. // // {
  15828. // // tool: [],
  15829. // // toolDetail: "",
  15830. // // toolType: 0,
  15831. // // askCount: 1,
  15832. // // askTitle: "",
  15833. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15834. // // },
  15835. // // ],
  15836. // // isShowTools: false,
  15837. // // askCount: 1,
  15838. // // isFold: 1,
  15839. // // askTitle: "",
  15840. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15841. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  15842. // // homeworkList: [],
  15843. // // })
  15844. // // }
  15845. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15846. // // _this.$forceUpdate();
  15847. // // }
  15848. // callback ? callback() : ''
  15849. // }).catch(function (error) {
  15850. // _this.loading = false
  15851. // console.log(error);
  15852. // });
  15853. let parm = {
  15854. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  15855. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15856. session_name: uuidv4(),
  15857. userId: this.userid,
  15858. file_ids: fileid.length ? [...fileid] : '',
  15859. }
  15860. this.ajax
  15861. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  15862. .then((response) => {
  15863. console.log(response);
  15864. let data = response.data.FunctionResponse
  15865. if (data.message) {
  15866. console.log(data.message);
  15867. let dArray = {}
  15868. try {
  15869. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15870. } catch (error) {
  15871. console.log("error_________________" + error);
  15872. try {
  15873. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15874. let match = data.message.match(regex);
  15875. dArray = JSON.parse(match[0]);
  15876. // var message = data.message;
  15877. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  15878. // var jsonEnd = message.indexOf("```", jsonStart);
  15879. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  15880. // dArray = JSON.parse(jsonString);
  15881. } catch (error) {
  15882. try {
  15883. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15884. let match = data.message.match(regex);
  15885. // eval("var aaa = " + match[0])
  15886. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  15887. } catch (error) {
  15888. console.log("error_________________" + error);
  15889. }
  15890. console.log("error_________________" + error);
  15891. }
  15892. }
  15893. _this.dArray = dArray
  15894. console.log(dArray)
  15895. if(_this.panOutline() > 0){
  15896. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15897. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  15898. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  15899. }
  15900. for (var i = 0; i < dArray.length; i++) {
  15901. let _task = dArray[i]
  15902. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15903. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  15904. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  15905. }else {
  15906. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15907. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15908. taskDetail: "",
  15909. taskDetail2: _task.detail,
  15910. taskDetail3: "",
  15911. chapterData: [],
  15912. toolText: "",
  15913. toolChoose: [
  15914. {
  15915. tool: [],
  15916. toolDetail: "",
  15917. toolType: 0,
  15918. askCount: 1,
  15919. askTitle: "",
  15920. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15921. },
  15922. ],
  15923. isShowTools: false,
  15924. askCount: 1,
  15925. isFold: 0,
  15926. askTitle: "",
  15927. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15928. checkJson: [{ checkCount: [], checkPerent: [] }],
  15929. homeworkList: [],
  15930. })
  15931. }
  15932. }
  15933. }else {
  15934. _this.unitJson[0].chapterInfo[0].taskJson = []
  15935. for (var i = 0; i < dArray.length; i++) {
  15936. let _task = dArray[i]
  15937. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15938. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15939. taskDetail: "",
  15940. taskDetail2: _task.detail,
  15941. taskDetail3: "",
  15942. chapterData: [],
  15943. toolText: "",
  15944. toolChoose: [
  15945. {
  15946. tool: [],
  15947. toolDetail: "",
  15948. toolType: 0,
  15949. askCount: 1,
  15950. askTitle: "",
  15951. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15952. },
  15953. ],
  15954. isShowTools: false,
  15955. askCount: 1,
  15956. isFold: 0,
  15957. askTitle: "",
  15958. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15959. checkJson: [{ checkCount: [], checkPerent: [] }],
  15960. homeworkList: [],
  15961. })
  15962. }
  15963. }
  15964. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  15965. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15966. _this.$forceUpdate();
  15967. }
  15968. callback ? callback() : ''
  15969. })
  15970. .catch((error) => {
  15971. _this.loading = false
  15972. console.log(error);
  15973. });
  15974. },
  15975. async aiGetTask2(messages, callback) {
  15976. let _this = this
  15977. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15978. if (_this.infoData.length) {
  15979. for (var i = 0; i < _this.infoData.length; i++) {
  15980. if(_this.infoData[i].fileid){
  15981. fileid.push(_this.infoData[i].fileid)
  15982. }else {
  15983. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15984. if(_fileid){
  15985. _this.infoData[i].fileid = _fileid
  15986. _this.$forceUpdate();
  15987. fileid.push(_fileid)
  15988. }
  15989. }
  15990. }
  15991. }
  15992. console.log('fileid=========',fileid)
  15993. // let params = JSON.stringify({
  15994. // // "model": "Chat",
  15995. // model: 'gpt-3.5-turbo',
  15996. // temperature: 0,
  15997. // max_tokens: 4096,
  15998. // top_p: 1,
  15999. // frequency_penalty: 0,
  16000. // presence_penalty: 0,
  16001. // messages: [{
  16002. // content: messages,
  16003. // role: 'user'
  16004. // }],
  16005. // stream: false,
  16006. // uid: this.userid,
  16007. // mind_map_question: "",
  16008. // })
  16009. // // let params = JSON.stringify({
  16010. // // message: {
  16011. // // anthropic_version: "bedrock-2023-05-31",
  16012. // // max_tokens: 4096,
  16013. // // temperature: 0,
  16014. // // top_p: 1,
  16015. // // messages: [{
  16016. // // content: messages,
  16017. // // role: 'user'
  16018. // // }], //
  16019. // // },
  16020. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16021. // // });
  16022. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16023. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16024. // console.log(response);
  16025. // let data = response.data.FunctionResponse
  16026. // if (data.choices && data.choices.length && data.choices[0].message) {
  16027. // console.log(data.choices[0].message.content);
  16028. // let dArray = JSON.parse(data.choices[0].message.content)
  16029. // _this.dArray = dArray
  16030. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16031. // for (var i = 0; i < dArray.length; i++) {
  16032. // let _task = dArray[i]
  16033. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16034. // task: _task.task,
  16035. // taskDetail: "",
  16036. // taskDetail2: _task.detail,
  16037. // taskDetail3: "",
  16038. // chapterData: [],
  16039. // toolText: "",
  16040. // toolChoose: [
  16041. // {
  16042. // tool: [],
  16043. // toolDetail: "",
  16044. // toolType: 0,
  16045. // askCount: 1,
  16046. // askTitle: "",
  16047. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16048. // },
  16049. // ],
  16050. // isShowTools: false,
  16051. // askCount: 1,
  16052. // isFold: 0,
  16053. // askTitle: "",
  16054. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16055. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16056. // homeworkList: [],
  16057. // })
  16058. // }
  16059. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16060. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16061. // _this.$forceUpdate();
  16062. // }
  16063. // // if (data.result) {
  16064. // // console.log(data.result);
  16065. // // let dArray = JSON.parse(data.result)
  16066. // // _this.dArray = dArray
  16067. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16068. // // for (var i = 0; i < dArray.length; i++) {
  16069. // // let _task = dArray[i]
  16070. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16071. // // task: _task.task,
  16072. // // taskDetail: "",
  16073. // // taskDetail2: _task.detail,
  16074. // // taskDetail3: "",
  16075. // // chapterData: [],
  16076. // // toolText: "",
  16077. // // toolChoose: [
  16078. // // {
  16079. // // tool: [],
  16080. // // toolDetail: "",
  16081. // // toolType: 0,
  16082. // // askCount: 1,
  16083. // // askTitle: "",
  16084. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16085. // // },
  16086. // // ],
  16087. // // isShowTools: false,
  16088. // // askCount: 1,
  16089. // // isFold: 1,
  16090. // // askTitle: "",
  16091. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16092. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16093. // // homeworkList: [],
  16094. // // })
  16095. // // }
  16096. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16097. // // _this.$forceUpdate();
  16098. // // }
  16099. // callback ? callback() : ''
  16100. // }).catch(function (error) {
  16101. // _this.loading = false
  16102. // console.log(error);
  16103. // });
  16104. let parm = {
  16105. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16106. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16107. session_name: uuidv4(),
  16108. userId: this.userid,
  16109. file_ids: fileid.length ? [...fileid] : '',
  16110. }
  16111. this.ajax
  16112. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16113. .then((response) => {
  16114. console.log(response);
  16115. let data = response.data.FunctionResponse
  16116. if (data.message) {
  16117. console.log(data.message);
  16118. let dArray = {}
  16119. try {
  16120. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16121. } catch (error) {
  16122. console.log("error_________________" + error);
  16123. try {
  16124. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16125. let match = data.message.match(regex);
  16126. dArray = JSON.parse(match[0]);
  16127. // var message = data.message;
  16128. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16129. // var jsonEnd = message.indexOf("```", jsonStart);
  16130. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16131. // dArray = JSON.parse(jsonString);
  16132. } catch (error) {
  16133. try {
  16134. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16135. let match = data.message.match(regex);
  16136. // eval("var aaa = " + match[0])
  16137. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16138. } catch (error) {
  16139. console.log("error_________________" + error);
  16140. }
  16141. console.log("error_________________" + error);
  16142. }
  16143. }
  16144. _this.dArray = dArray
  16145. if(_this.panOutline() > 0){
  16146. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16147. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16148. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16149. }
  16150. for (var i = 0; i < dArray.length; i++) {
  16151. let _task = dArray[i]
  16152. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16153. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16154. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16155. }else {
  16156. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16157. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16158. taskDetail: "",
  16159. taskDetail2: "",
  16160. taskDetail3: "",
  16161. chapterData: [],
  16162. toolText: "",
  16163. toolChoose: [
  16164. {
  16165. tool: [],
  16166. toolDetail: "",
  16167. toolType: 0,
  16168. askCount: 1,
  16169. askTitle: "",
  16170. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16171. },
  16172. ],
  16173. isShowTools: false,
  16174. askCount: 1,
  16175. isFold: 0,
  16176. askTitle: "",
  16177. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16178. checkJson: [{ checkCount: [], checkPerent: [] }],
  16179. homeworkList: [],
  16180. })
  16181. }
  16182. }
  16183. }else {
  16184. _this.unitJson[0].chapterInfo[0].taskJson = []
  16185. for (var i = 0; i < dArray.length; i++) {
  16186. let _task = dArray[i]
  16187. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16188. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16189. taskDetail: "",
  16190. taskDetail2: "",
  16191. taskDetail3: "",
  16192. chapterData: [],
  16193. toolText: "",
  16194. toolChoose: [
  16195. {
  16196. tool: [],
  16197. toolDetail: "",
  16198. toolType: 0,
  16199. askCount: 1,
  16200. askTitle: "",
  16201. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16202. },
  16203. ],
  16204. isShowTools: false,
  16205. askCount: 1,
  16206. isFold: 0,
  16207. askTitle: "",
  16208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16209. checkJson: [{ checkCount: [], checkPerent: [] }],
  16210. homeworkList: [],
  16211. })
  16212. }
  16213. }
  16214. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16215. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16216. _this.$forceUpdate();
  16217. setTimeout(()=>{
  16218. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16219. this.aiOutlineDetail('', i)
  16220. }
  16221. }, 0)
  16222. }
  16223. callback ? callback() : ''
  16224. })
  16225. .catch((error) => {
  16226. _this.loading = false
  16227. console.log(error);
  16228. });
  16229. },
  16230. async aiGetTask3(messages, callback) {
  16231. let _this = this
  16232. // let params = JSON.stringify({
  16233. // // "model": "Chat",
  16234. // model: 'gpt-3.5-turbo',
  16235. // temperature: 0,
  16236. // max_tokens: 4096,
  16237. // top_p: 1,
  16238. // frequency_penalty: 0,
  16239. // presence_penalty: 0,
  16240. // messages: [{
  16241. // content: messages,
  16242. // role: 'user'
  16243. // }],
  16244. // stream: false,
  16245. // uid: this.userid,
  16246. // mind_map_question: "",
  16247. // })
  16248. // // let params = JSON.stringify({
  16249. // // message: {
  16250. // // anthropic_version: "bedrock-2023-05-31",
  16251. // // max_tokens: 4096,
  16252. // // temperature: 0,
  16253. // // top_p: 1,
  16254. // // messages: [{
  16255. // // content: messages,
  16256. // // role: 'user'
  16257. // // }], //
  16258. // // },
  16259. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16260. // // });
  16261. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16262. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16263. // console.log(response);
  16264. // let data = response.data.FunctionResponse
  16265. // if (data.choices && data.choices.length && data.choices[0].message) {
  16266. // console.log(data.choices[0].message.content);
  16267. // let dArray = JSON.parse(data.choices[0].message.content)
  16268. // _this.dArray = dArray
  16269. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16270. // for (var i = 0; i < dArray.length; i++) {
  16271. // let _task = dArray[i]
  16272. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16273. // task: _task.task,
  16274. // taskDetail: "",
  16275. // taskDetail2: _task.detail,
  16276. // taskDetail3: "",
  16277. // chapterData: [],
  16278. // toolText: "",
  16279. // toolChoose: [
  16280. // {
  16281. // tool: [],
  16282. // toolDetail: "",
  16283. // toolType: 0,
  16284. // askCount: 1,
  16285. // askTitle: "",
  16286. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16287. // },
  16288. // ],
  16289. // isShowTools: false,
  16290. // askCount: 1,
  16291. // isFold: 0,
  16292. // askTitle: "",
  16293. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16294. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16295. // homeworkList: [],
  16296. // })
  16297. // }
  16298. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16299. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16300. // _this.$forceUpdate();
  16301. // }
  16302. // // if (data.result) {
  16303. // // console.log(data.result);
  16304. // // let dArray = JSON.parse(data.result)
  16305. // // _this.dArray = dArray
  16306. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16307. // // for (var i = 0; i < dArray.length; i++) {
  16308. // // let _task = dArray[i]
  16309. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16310. // // task: _task.task,
  16311. // // taskDetail: "",
  16312. // // taskDetail2: _task.detail,
  16313. // // taskDetail3: "",
  16314. // // chapterData: [],
  16315. // // toolText: "",
  16316. // // toolChoose: [
  16317. // // {
  16318. // // tool: [],
  16319. // // toolDetail: "",
  16320. // // toolType: 0,
  16321. // // askCount: 1,
  16322. // // askTitle: "",
  16323. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16324. // // },
  16325. // // ],
  16326. // // isShowTools: false,
  16327. // // askCount: 1,
  16328. // // isFold: 1,
  16329. // // askTitle: "",
  16330. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16331. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16332. // // homeworkList: [],
  16333. // // })
  16334. // // }
  16335. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16336. // // _this.$forceUpdate();
  16337. // // }
  16338. // callback ? callback() : ''
  16339. // }).catch(function (error) {
  16340. // _this.loading = false
  16341. // console.log(error);
  16342. // });
  16343. let parm = {
  16344. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16345. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16346. session_name: uuidv4(),
  16347. userId: this.userid,
  16348. file_ids: '',
  16349. }
  16350. this.ajax
  16351. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16352. .then((response) => {
  16353. console.log(response);
  16354. let data = response.data.FunctionResponse
  16355. if (data.message) {
  16356. console.log(data.message);
  16357. let dArray = {}
  16358. try {
  16359. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16360. } catch (error) {
  16361. console.log("error_________________" + error);
  16362. try {
  16363. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16364. let match = data.message.match(regex);
  16365. dArray = JSON.parse(match[0]);
  16366. // var message = data.message;
  16367. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16368. // var jsonEnd = message.indexOf("```", jsonStart);
  16369. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16370. // dArray = JSON.parse(jsonString);
  16371. } catch (error) {
  16372. try {
  16373. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16374. let match = data.message.match(regex);
  16375. // eval("var aaa = " + match[0])
  16376. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16377. } catch (error) {
  16378. console.log("error_________________" + error);
  16379. }
  16380. console.log("error_________________" + error);
  16381. }
  16382. }
  16383. _this.dArray = dArray
  16384. if(_this.panOutline() > 0){
  16385. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16386. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16387. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  16388. }
  16389. for (var i = 0; i < dArray.length; i++) {
  16390. let _task = dArray[i]
  16391. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16392. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16393. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16394. }else {
  16395. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16396. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16397. taskDetail: "",
  16398. taskDetail2: "",
  16399. taskDetail3: "",
  16400. chapterData: [],
  16401. toolText: "",
  16402. toolChoose: [
  16403. {
  16404. tool: [],
  16405. toolDetail: "",
  16406. toolType: 0,
  16407. askCount: 1,
  16408. askTitle: "",
  16409. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16410. },
  16411. ],
  16412. isShowTools: false,
  16413. askCount: 1,
  16414. isFold: 0,
  16415. askTitle: "",
  16416. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16417. checkJson: [{ checkCount: [], checkPerent: [] }],
  16418. homeworkList: [],
  16419. })
  16420. }
  16421. }
  16422. }else {
  16423. _this.unitJson[0].chapterInfo[0].taskJson = []
  16424. for (var i = 0; i < dArray.length; i++) {
  16425. let _task = dArray[i]
  16426. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16427. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16428. taskDetail: "",
  16429. taskDetail2: "",
  16430. taskDetail3: "",
  16431. chapterData: [],
  16432. toolText: "",
  16433. toolChoose: [
  16434. {
  16435. tool: [],
  16436. toolDetail: "",
  16437. toolType: 0,
  16438. askCount: 1,
  16439. askTitle: "",
  16440. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16441. },
  16442. ],
  16443. isShowTools: false,
  16444. askCount: 1,
  16445. isFold: 0,
  16446. askTitle: "",
  16447. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16448. checkJson: [{ checkCount: [], checkPerent: [] }],
  16449. homeworkList: [],
  16450. })
  16451. }
  16452. }
  16453. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16454. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16455. _this.$forceUpdate();
  16456. setTimeout(()=>{
  16457. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16458. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  16459. }
  16460. }, 0)
  16461. }
  16462. callback ? callback() : ''
  16463. })
  16464. .catch((error) => {
  16465. _this.loading = false
  16466. console.log(error);
  16467. });
  16468. },
  16469. async aiGet3(messages, callback) {
  16470. let _this = this
  16471. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16472. if (_this.infoData.length) {
  16473. for (var i = 0; i < _this.infoData.length; i++) {
  16474. if(_this.infoData[i].fileid){
  16475. fileid.push(_this.infoData[i].fileid)
  16476. }else {
  16477. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16478. if(_fileid){
  16479. _this.infoData[i].fileid = _fileid
  16480. _this.$forceUpdate();
  16481. fileid.push(_fileid)
  16482. }
  16483. }
  16484. }
  16485. }
  16486. // let params = JSON.stringify({
  16487. // // "model": "Chat",
  16488. // model: 'gpt-3.5-turbo',
  16489. // temperature: 0,
  16490. // max_tokens: 4096,
  16491. // top_p: 1,
  16492. // frequency_penalty: 0,
  16493. // presence_penalty: 0,
  16494. // messages: [{
  16495. // content: messages,
  16496. // role: 'user'
  16497. // }],
  16498. // stream: false,
  16499. // uid: this.userid,
  16500. // mind_map_question: "",
  16501. // })
  16502. // // let params = JSON.stringify({
  16503. // // message: {
  16504. // // anthropic_version: "bedrock-2023-05-31",
  16505. // // max_tokens: 4096,
  16506. // // temperature: 0,
  16507. // // top_p: 1,
  16508. // // messages: [{
  16509. // // content: messages,
  16510. // // role: 'user'
  16511. // // }], //
  16512. // // },
  16513. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16514. // // });
  16515. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16516. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16517. // console.log(response);
  16518. // let data = response.data.FunctionResponse
  16519. // if (data.choices && data.choices.length && data.choices[0].message) {
  16520. // console.log(data.choices[0].message.content);
  16521. // let tArray = JSON.parse(data.choices[0].message.content)
  16522. // // _this.unitJson[0].chapterInfo[0].task = []
  16523. // let toolsJson = {
  16524. // "电子白板": { tool: 1, type: 1 },
  16525. // "文档": { tool: 52, type: 1 },
  16526. // "思维导图": { tool: 3, type: 1 },
  16527. // "表格": { tool: 48, type: 1 },
  16528. // "作业提交": { tool: 16, type: 2 }
  16529. // }
  16530. // for (var i = 0; i < tArray.length; i++) {
  16531. // let _task = tArray[i]
  16532. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16533. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16534. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16535. // if (_task.toolChoose.length) {
  16536. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16537. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16538. // {
  16539. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16540. // toolDetail: _task.toolChoose[j].detail,
  16541. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16542. // askCount: 1,
  16543. // askTitle: "",
  16544. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16545. // },
  16546. // )
  16547. // }
  16548. // } else {
  16549. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16550. // {
  16551. // tool: [],
  16552. // toolDetail: "",
  16553. // toolType: 0,
  16554. // askCount: 1,
  16555. // askTitle: "",
  16556. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16557. // },
  16558. // )
  16559. // }
  16560. // }
  16561. // // if (_this.infoData.length) {
  16562. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16563. // // }
  16564. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16565. // _this.$forceUpdate();
  16566. // }
  16567. // // if (data.result) {
  16568. // // console.log(data.result);
  16569. // // let tArray = JSON.parse(data.result)
  16570. // // // _this.unitJson[0].chapterInfo[0].task = []
  16571. // // let toolsJson = {
  16572. // // "电子白板": { tool: 1, type: 1 },
  16573. // // "文档": { tool: 52, type: 1 },
  16574. // // "思维导图": { tool: 3, type: 1 },
  16575. // // "表格": { tool: 48, type: 1 },
  16576. // // "作业提交": { tool: 16, type: 2 }
  16577. // // }
  16578. // // for (var i = 0; i < tArray.length; i++) {
  16579. // // let _task = tArray[i]
  16580. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16581. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16582. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16583. // // if (_task.toolChoose.length) {
  16584. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16585. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16586. // // {
  16587. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16588. // // toolDetail: _task.toolChoose[j].detail,
  16589. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16590. // // askCount: 1,
  16591. // // askTitle: "",
  16592. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16593. // // },
  16594. // // )
  16595. // // }
  16596. // // } else {
  16597. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16598. // // {
  16599. // // tool: [],
  16600. // // toolDetail: "",
  16601. // // toolType: 0,
  16602. // // askCount: 1,
  16603. // // askTitle: "",
  16604. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16605. // // },
  16606. // // )
  16607. // // }
  16608. // // }
  16609. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16610. // // _this.$forceUpdate();
  16611. // // }
  16612. // callback ? callback() : ''
  16613. // }).catch(function (error) {
  16614. // _this.loading = false
  16615. // console.log(error);
  16616. // });
  16617. let parm = {
  16618. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16619. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16620. session_name: uuidv4(),
  16621. userId: this.userid,
  16622. file_ids: fileid.length ? [...fileid] : '',
  16623. }
  16624. this.ajax
  16625. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16626. .then(async (response) => {
  16627. console.log(response);
  16628. let data = response.data.FunctionResponse
  16629. if (data.message) {
  16630. console.log(data.message);
  16631. let tArray = {}
  16632. try {
  16633. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16634. } catch (error) {
  16635. console.log("error_________________" + error);
  16636. try {
  16637. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16638. let match = data.message.match(regex);
  16639. tArray = JSON.parse(match[0]);
  16640. // var message = data.message;
  16641. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16642. // var jsonEnd = message.indexOf("```", jsonStart);
  16643. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16644. // tArray = JSON.parse(jsonString);
  16645. } catch (error) {
  16646. try {
  16647. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16648. let match = data.message.match(regex);
  16649. // eval("var aaa = " + match[0])
  16650. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16651. } catch (error) {
  16652. console.log("error_________________" + error);
  16653. }
  16654. console.log("error_________________" + error);
  16655. }
  16656. }
  16657. let toolsJson = {
  16658. "电子白板": { tool: 1, type: 1 },
  16659. "文档": { tool: 52, type: 1 },
  16660. "思维导图": { tool: 3, type: 1 },
  16661. "表格": { tool: 48, type: 1 },
  16662. "作业提交": { tool: 16, type: 2 },
  16663. "问答": { tool: 15, type: 2 },
  16664. "选择题": { tool: 45, type: 2 },
  16665. }
  16666. // answerQ:"sssssssssssssss"
  16667. for (var i = 0; i < tArray.length; i++) {
  16668. let _task = tArray[i]
  16669. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16670. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16671. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16672. if (_task.toolChoose.length) {
  16673. for (var j = 0; j < _task.toolChoose.length; j++) {
  16674. let _json = {
  16675. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  16676. toolDetail: _task.toolChoose[j].detail,
  16677. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16678. askCount: 1,
  16679. askTitle: "",
  16680. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16681. }
  16682. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16683. let answerQ = await _this.aiCreateQuestion(15, i)
  16684. _json.answerQ = answerQ.answerQ
  16685. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16686. let testJson = await _this.aiCreateQuestion(45, i)
  16687. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16688. }
  16689. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  16690. }
  16691. } else {
  16692. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16693. {
  16694. tool: [],
  16695. toolDetail: "",
  16696. toolType: 0,
  16697. askCount: 1,
  16698. askTitle: "",
  16699. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16700. },
  16701. )
  16702. }
  16703. }
  16704. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16705. _this.$forceUpdate();
  16706. _this.createTeacherAn();
  16707. }
  16708. callback ? callback() : ''
  16709. })
  16710. .catch((error) => {
  16711. _this.loading = false
  16712. console.log(error);
  16713. });
  16714. },
  16715. async aiGet32(messages, index) {
  16716. let _this = this
  16717. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16718. if (_this.infoData.length) {
  16719. for (var i = 0; i < _this.infoData.length; i++) {
  16720. if(_this.infoData[i].fileid){
  16721. fileid.push(_this.infoData[i].fileid)
  16722. }else {
  16723. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16724. if(_fileid){
  16725. _this.infoData[i].fileid = _fileid
  16726. _this.$forceUpdate();
  16727. fileid.push(_fileid)
  16728. }
  16729. }
  16730. }
  16731. }
  16732. // let params = JSON.stringify({
  16733. // // "model": "Chat",
  16734. // model: 'gpt-3.5-turbo',
  16735. // temperature: 0,
  16736. // max_tokens: 4096,
  16737. // top_p: 1,
  16738. // frequency_penalty: 0,
  16739. // presence_penalty: 0,
  16740. // messages: [{
  16741. // content: messages,
  16742. // role: 'user'
  16743. // }],
  16744. // stream: false,
  16745. // uid: this.userid,
  16746. // mind_map_question: "",
  16747. // })
  16748. // // let params = JSON.stringify({
  16749. // // message: {
  16750. // // anthropic_version: "bedrock-2023-05-31",
  16751. // // max_tokens: 4096,
  16752. // // temperature: 0,
  16753. // // top_p: 1,
  16754. // // messages: [{
  16755. // // content: messages,
  16756. // // role: 'user'
  16757. // // }], //
  16758. // // },
  16759. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16760. // // });
  16761. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16762. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16763. // console.log(response);
  16764. // let data = response.data.FunctionResponse
  16765. // if (data.choices && data.choices.length && data.choices[0].message) {
  16766. // console.log(data.choices[0].message.content);
  16767. // let tArray = JSON.parse(data.choices[0].message.content)
  16768. // // _this.unitJson[0].chapterInfo[0].task = []
  16769. // let toolsJson = {
  16770. // "电子白板": { tool: 1, type: 1 },
  16771. // "文档": { tool: 52, type: 1 },
  16772. // "思维导图": { tool: 3, type: 1 },
  16773. // "表格": { tool: 48, type: 1 },
  16774. // "作业提交": { tool: 16, type: 2 }
  16775. // }
  16776. // for (var i = 0; i < tArray.length; i++) {
  16777. // let _task = tArray[i]
  16778. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16779. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16780. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16781. // if (_task.toolChoose.length) {
  16782. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16783. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16784. // {
  16785. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16786. // toolDetail: _task.toolChoose[j].detail,
  16787. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16788. // askCount: 1,
  16789. // askTitle: "",
  16790. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16791. // },
  16792. // )
  16793. // }
  16794. // } else {
  16795. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16796. // {
  16797. // tool: [],
  16798. // toolDetail: "",
  16799. // toolType: 0,
  16800. // askCount: 1,
  16801. // askTitle: "",
  16802. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16803. // },
  16804. // )
  16805. // }
  16806. // }
  16807. // // if (_this.infoData.length) {
  16808. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16809. // // }
  16810. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16811. // _this.$forceUpdate();
  16812. // }
  16813. // // if (data.result) {
  16814. // // console.log(data.result);
  16815. // // let tArray = JSON.parse(data.result)
  16816. // // // _this.unitJson[0].chapterInfo[0].task = []
  16817. // // let toolsJson = {
  16818. // // "电子白板": { tool: 1, type: 1 },
  16819. // // "文档": { tool: 52, type: 1 },
  16820. // // "思维导图": { tool: 3, type: 1 },
  16821. // // "表格": { tool: 48, type: 1 },
  16822. // // "作业提交": { tool: 16, type: 2 }
  16823. // // }
  16824. // // for (var i = 0; i < tArray.length; i++) {
  16825. // // let _task = tArray[i]
  16826. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16827. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16828. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16829. // // if (_task.toolChoose.length) {
  16830. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16831. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16832. // // {
  16833. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16834. // // toolDetail: _task.toolChoose[j].detail,
  16835. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16836. // // askCount: 1,
  16837. // // askTitle: "",
  16838. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16839. // // },
  16840. // // )
  16841. // // }
  16842. // // } else {
  16843. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16844. // // {
  16845. // // tool: [],
  16846. // // toolDetail: "",
  16847. // // toolType: 0,
  16848. // // askCount: 1,
  16849. // // askTitle: "",
  16850. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16851. // // },
  16852. // // )
  16853. // // }
  16854. // // }
  16855. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16856. // // _this.$forceUpdate();
  16857. // // }
  16858. // callback ? callback() : ''
  16859. // }).catch(function (error) {
  16860. // _this.loading = false
  16861. // console.log(error);
  16862. // });
  16863. let parm = {
  16864. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16865. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16866. session_name: uuidv4(),
  16867. userId: this.userid,
  16868. file_ids: fileid.length ? [...fileid] : '',
  16869. }
  16870. this.ajax
  16871. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16872. .then(async (response) => {
  16873. console.log(response);
  16874. let data = response.data.FunctionResponse
  16875. if (data.message) {
  16876. console.log(data.message);
  16877. let tArray = {}
  16878. try {
  16879. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16880. } catch (error) {
  16881. console.log("error_________________" + error);
  16882. try {
  16883. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16884. let match = data.message.match(regex);
  16885. tArray = JSON.parse(match[0]);
  16886. // var message = data.message;
  16887. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16888. // var jsonEnd = message.indexOf("```", jsonStart);
  16889. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16890. // tArray = JSON.parse(jsonString);
  16891. } catch (error) {
  16892. try {
  16893. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16894. let match = data.message.match(regex);
  16895. // eval("var aaa = " + match[0])
  16896. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16897. } catch (error) {
  16898. console.log("error_________________" + error);
  16899. }
  16900. console.log("error_________________" + error);
  16901. }
  16902. }
  16903. let toolsJson = {
  16904. "电子白板": { tool: 1, type: 1 },
  16905. "文档": { tool: 52, type: 1 },
  16906. "思维导图": { tool: 3, type: 1 },
  16907. "表格": { tool: 48, type: 1 },
  16908. "作业提交": { tool: 16, type: 2 },
  16909. "问答": { tool: 15, type: 2 },
  16910. "选择题": { tool: 45, type: 2 },
  16911. }
  16912. // answerQ:"sssssssssssssss"
  16913. // for (var i = 0; i < tArray.length; i++) {
  16914. let _task = tArray
  16915. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  16916. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  16917. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  16918. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  16919. console.log("error_________________JSON不对重新生成");
  16920. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16921. _this.aiGet32(messages, index)
  16922. return;
  16923. }
  16924. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  16925. if (_task.toolChoose && _task.toolChoose.length) {
  16926. for (var j = 0; j < _task.toolChoose.length; j++) {
  16927. let _json = {
  16928. tool: [],
  16929. toolDetail: _task.toolChoose[j].detail,
  16930. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16931. askCount: 1,
  16932. askTitle: "",
  16933. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16934. }
  16935. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16936. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16937. let answerQ = await _this.aiCreateQuestion(15, index)
  16938. // _json.answerQ = answerQ.answerQ
  16939. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  16940. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16941. let testJson = await _this.aiCreateQuestion(45, index)
  16942. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16943. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16944. }
  16945. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].tool = toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16]
  16946. _this.$forceUpdate();
  16947. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16948. }
  16949. } else {
  16950. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  16951. {
  16952. tool: [],
  16953. toolDetail: "",
  16954. toolType: 0,
  16955. askCount: 1,
  16956. askTitle: "",
  16957. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16958. },
  16959. )
  16960. }
  16961. // }
  16962. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16963. _this.$forceUpdate();
  16964. _this.createTeacherAn(index);
  16965. }
  16966. // callback ? callback() : ''
  16967. _this.taskLoading[index] = false
  16968. })
  16969. .catch((error) => {
  16970. // _this.loading = false
  16971. _this.taskLoading[index] = false
  16972. console.log(error);
  16973. });
  16974. },
  16975. async aiCreateQuestion(type, task) {
  16976. let _this = this
  16977. return new Promise((resolve, reject) => {
  16978. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16979. if (_this.infoData.length) {
  16980. for (var i = 0; i < _this.infoData.length; i++) {
  16981. if(_this.infoData[i].fileid){
  16982. fileid.push(_this.infoData[i].fileid)
  16983. }
  16984. }
  16985. }
  16986. let sub = []
  16987. let mclass = []
  16988. if (this.courseTypeId.length) {
  16989. for (var i = 0; i < this.courseTypeId.length; i++) {
  16990. let _sid = this.courseTypeId[i]
  16991. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16992. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16993. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16994. }
  16995. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16996. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16997. }
  16998. }
  16999. }
  17000. }
  17001. let messages = ""
  17002. if(type == 15){
  17003. messages = `NOTICE
  17004. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17005. 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.
  17006. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17007. Instruction: Based on the context, follow "Format example", write content.
  17008. # Context
  17009. ## 任务
  17010. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17011. ## 限制
  17012. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17013. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17014. ## 课程简介
  17015. 课程名字:${_this.courseName}
  17016. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17017. ${sub.length ? '学科:' + sub.join(",") : ''}
  17018. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17019. ## 教案
  17020. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17021. # Format example
  17022. {answerQ:"问题"}
  17023. `
  17024. }else if(type == 45){
  17025. messages = `NOTICE
  17026. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17027. 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.
  17028. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17029. Instruction: Based on the context, follow "Format example", write content.
  17030. # Context
  17031. ## 任务
  17032. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17033. ## 限制
  17034. - 生成题目禁止重复。
  17035. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17036. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17037. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17038. ## 课程简介
  17039. 课程名字:${_this.courseName}
  17040. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17041. ${sub.length ? '学科:' + sub.join(",") : ''}
  17042. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17043. ## 教案
  17044. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17045. # Format example
  17046. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17047. `
  17048. }
  17049. let parm = {
  17050. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17051. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17052. session_name: uuidv4(),
  17053. userId: this.userid,
  17054. file_ids: fileid.length ? [...fileid] : '',
  17055. }
  17056. this.ajax
  17057. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17058. .then((response) => {
  17059. console.log(response);
  17060. let data = response.data.FunctionResponse
  17061. if (data.message) {
  17062. console.log(data.message);
  17063. try {
  17064. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17065. let tArray = {}
  17066. try {
  17067. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17068. } catch (error) {
  17069. console.log("error_________________" + error);
  17070. try {
  17071. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17072. let match = data.message.match(regex);
  17073. tArray = JSON.parse(match[0]);
  17074. // var message = data.message;
  17075. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17076. // var jsonEnd = message.indexOf("```", jsonStart);
  17077. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17078. // tArray = JSON.parse(jsonString);
  17079. } catch (error) {
  17080. try {
  17081. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17082. let match = data.message.match(regex);
  17083. // eval("var aaa = " + match[0])
  17084. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17085. } catch (error) {
  17086. console.log("error_________________" + error);
  17087. }
  17088. console.log("error_________________" + error);
  17089. }
  17090. }
  17091. resolve(tArray)
  17092. } catch (error) {
  17093. if(type == 15){
  17094. resolve({answerQ: "题目"})
  17095. }else if(type == 45){
  17096. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17097. }
  17098. }
  17099. }else if(type == 15){
  17100. resolve({answerQ: "题目"})
  17101. }else if(type == 45){
  17102. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17103. }
  17104. })
  17105. .catch((error) => {
  17106. if(type == 15){
  17107. resolve({answerQ: "题目"})
  17108. }else if(type == 45){
  17109. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17110. }
  17111. console.log(error);
  17112. });
  17113. });
  17114. },
  17115. async aiChoice(type){
  17116. if(type == 45){
  17117. this.choiceLoading = true
  17118. }
  17119. let _this = this
  17120. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17121. if (_this.infoData.length) {
  17122. for (var i = 0; i < _this.infoData.length; i++) {
  17123. if(_this.infoData[i].fileid){
  17124. fileid.push(_this.infoData[i].fileid)
  17125. }
  17126. }
  17127. }
  17128. let sub = []
  17129. let mclass = []
  17130. if (this.courseTypeId.length) {
  17131. for (var i = 0; i < this.courseTypeId.length; i++) {
  17132. let _sid = this.courseTypeId[i]
  17133. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17134. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17135. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17136. }
  17137. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17138. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17139. }
  17140. }
  17141. }
  17142. }
  17143. let messages = ""
  17144. if(type == 15){
  17145. messages = `NOTICE
  17146. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17147. 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.
  17148. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17149. Instruction: Based on the context, follow "Format example", write content.
  17150. # Context
  17151. ## 任务
  17152. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17153. ## 限制
  17154. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17155. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17156. ## 课程简介
  17157. 课程名字:${_this.courseName}
  17158. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17159. ${sub.length ? '学科:' + sub.join(",") : ''}
  17160. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17161. ## 教案
  17162. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17163. # Format example
  17164. {answerQ:"问题"}
  17165. `
  17166. }else if(type == 45){
  17167. messages = `NOTICE
  17168. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17169. 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.
  17170. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17171. Instruction: Based on the context, follow "Format example", write content.
  17172. # Context
  17173. ## 任务
  17174. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17175. ## 限制
  17176. - 生成题目禁止重复。
  17177. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17178. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17179. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17180. ## 课程简介
  17181. 课程名字:${_this.courseName}
  17182. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17183. ${sub.length ? '学科:' + sub.join(",") : ''}
  17184. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17185. ## 教案
  17186. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17187. # Format example
  17188. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17189. `
  17190. }
  17191. let parm = {
  17192. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17193. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17194. session_name: uuidv4(),
  17195. userId: this.userid,
  17196. file_ids: fileid.length ? [...fileid] : '',
  17197. }
  17198. this.ajax
  17199. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17200. .then((response) => {
  17201. console.log(response);
  17202. let data = response.data.FunctionResponse
  17203. if (data.message) {
  17204. console.log(data.message);
  17205. try {
  17206. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17207. let tArray = {}
  17208. try {
  17209. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17210. } catch (error) {
  17211. console.log("error_________________" + error);
  17212. try {
  17213. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17214. let match = data.message.match(regex);
  17215. tArray = JSON.parse(match[0]);
  17216. // var message = data.message;
  17217. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17218. // var jsonEnd = message.indexOf("```", jsonStart);
  17219. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17220. // tArray = JSON.parse(jsonString);
  17221. } catch (error) {
  17222. try {
  17223. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17224. let match = data.message.match(regex);
  17225. // eval("var aaa = " + match[0])
  17226. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17227. } catch (error) {
  17228. console.log("error_________________" + error);
  17229. }
  17230. console.log("error_________________" + error);
  17231. }
  17232. }
  17233. if(type == 45){
  17234. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  17235. }
  17236. } catch (error) {
  17237. if(type == 15){
  17238. {answerQ: "题目"}
  17239. }else if(type == 45){
  17240. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17241. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17242. }
  17243. _this.choiceLoading = false
  17244. }
  17245. }else if(type == 15){
  17246. {answerQ: "题目"}
  17247. }else if(type == 45){
  17248. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17249. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17250. }
  17251. _this.choiceLoading = false
  17252. }).catch((error) => {
  17253. if(type == 15){
  17254. {answerQ: "题目"}
  17255. }else if(type == 45){
  17256. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17257. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17258. }
  17259. console.log(error);
  17260. _this.choiceLoading = false
  17261. });
  17262. },
  17263. async aiGet4(messages, callback, clickType) {
  17264. let _this = this
  17265. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17266. if (_this.infoData.length) {
  17267. for (var i = 0; i < _this.infoData.length; i++) {
  17268. if(_this.infoData[i].fileid){
  17269. fileid.push(_this.infoData[i].fileid)
  17270. }else {
  17271. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17272. if(_fileid){
  17273. _this.infoData[i].fileid = _fileid
  17274. _this.$forceUpdate();
  17275. fileid.push(_fileid)
  17276. }
  17277. }
  17278. }
  17279. }
  17280. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17281. if(_this.cankaoInfoData[i].fileid){
  17282. fileid.push(_this.cankaoInfoData[i].fileid)
  17283. }else {
  17284. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17285. if(_fileid){
  17286. _this.cankaoInfoData[i].fileid = _fileid
  17287. _this.$forceUpdate();
  17288. fileid.push(_fileid)
  17289. }
  17290. }
  17291. }
  17292. // let params = JSON.stringify({
  17293. // // "model": "Chat",
  17294. // model: 'gpt-3.5-turbo',
  17295. // temperature: 0,
  17296. // max_tokens: 4096,
  17297. // top_p: 1,
  17298. // frequency_penalty: 0,
  17299. // presence_penalty: 0,
  17300. // messages: [{
  17301. // content: messages,
  17302. // role: 'user'
  17303. // }],
  17304. // stream: false,
  17305. // uid: this.userid,
  17306. // mind_map_question: "",
  17307. // })
  17308. // // let params = JSON.stringify({
  17309. // // message: {
  17310. // // anthropic_version: "bedrock-2023-05-31",
  17311. // // max_tokens: 4096,
  17312. // // temperature: 0,
  17313. // // top_p: 1,
  17314. // // messages: [{
  17315. // // content: messages,
  17316. // // role: 'user'
  17317. // // }], //
  17318. // // },
  17319. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17320. // // });
  17321. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17322. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17323. // console.log(response);
  17324. // let data = response.data.FunctionResponse
  17325. // if (data.choices && data.choices.length && data.choices[0].message) {
  17326. // console.log(data.choices[0].message.content);
  17327. // let dArray = JSON.parse(data.choices[0].message.content)
  17328. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  17329. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  17330. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17331. // for (var i = 0; i < dArray.length; i++) {
  17332. // let _task = dArray[i]
  17333. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17334. // task: _task.task,
  17335. // taskDetail: "",
  17336. // taskDetail2: "",
  17337. // taskDetail3: _task.detail,
  17338. // chapterData: [],
  17339. // toolText: "",
  17340. // toolChoose: [
  17341. // {
  17342. // tool: [],
  17343. // toolDetail: "",
  17344. // toolType: 0,
  17345. // askCount: 1,
  17346. // askTitle: "",
  17347. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17348. // },
  17349. // ],
  17350. // isShowTools: false,
  17351. // askCount: 1,
  17352. // isFold: 0,
  17353. // askTitle: "",
  17354. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17355. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17356. // homeworkList: [],
  17357. // })
  17358. // }
  17359. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17360. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17361. // _this.$forceUpdate();
  17362. // } else {
  17363. // for (var i = 0; i < dArray.length; i++) {
  17364. // let _task = dArray[i]
  17365. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17366. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17367. // }else {
  17368. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17369. // task: _task.task,
  17370. // taskDetail: "",
  17371. // taskDetail2: "",
  17372. // taskDetail3: _task.detail,
  17373. // chapterData: [],
  17374. // toolText: "",
  17375. // toolChoose: [
  17376. // {
  17377. // tool: [],
  17378. // toolDetail: "",
  17379. // toolType: 0,
  17380. // askCount: 1,
  17381. // askTitle: "",
  17382. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17383. // },
  17384. // ],
  17385. // isShowTools: false,
  17386. // askCount: 1,
  17387. // isFold: 0,
  17388. // askTitle: "",
  17389. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17390. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17391. // homeworkList: [],
  17392. // }
  17393. // }
  17394. // }
  17395. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17396. // _this.$forceUpdate();
  17397. // }
  17398. // }
  17399. // // if (data.result) {
  17400. // // console.log(data.result);
  17401. // // let dArray = JSON.parse(data.result)
  17402. // // _this.teacherText = JSON.parse(data.result)
  17403. // // for (var i = 0; i < dArray.length; i++) {
  17404. // // let _task = dArray[i]
  17405. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17406. // // }
  17407. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17408. // // _this.$forceUpdate();
  17409. // // }
  17410. // callback ? callback() : ''
  17411. // _this.loading = false
  17412. // }).catch(function (error) {
  17413. // _this.loading = false
  17414. // console.log(error);
  17415. // });
  17416. let parm = {
  17417. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17418. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17419. session_name: uuidv4(),
  17420. userId: this.userid,
  17421. file_ids: fileid.length ? [...fileid] : '',
  17422. }
  17423. this.ajax
  17424. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17425. .then((response) => {
  17426. console.log(response);
  17427. let data = response.data.FunctionResponse
  17428. if (data.message) {
  17429. console.log(data.message);
  17430. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17431. let dArray = []
  17432. try {
  17433. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17434. } catch (error) {
  17435. console.log("error_________________" + error);
  17436. try {
  17437. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17438. let match = data.message.match(regex);
  17439. dArray = JSON.parse(match[0]);
  17440. // var message = data.message;
  17441. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17442. // var jsonEnd = message.indexOf("```", jsonStart);
  17443. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17444. // dArray = JSON.parse(jsonString);
  17445. } catch (error) {
  17446. _this.aiGet4(messages, callback)
  17447. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17448. console.log("error_________________" + error);
  17449. return;
  17450. console.log("error_________________" + error);
  17451. _this.loading = false
  17452. }
  17453. }
  17454. try {
  17455. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  17456. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  17457. if(_this.panTeacher() > 0){
  17458. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17459. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17460. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17461. }
  17462. for (var i = 0; i < dArray.length; i++) {
  17463. let _task = dArray[i]
  17464. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17465. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  17466. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17467. }else {
  17468. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17469. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17470. taskDetail: "",
  17471. taskDetail2: "",
  17472. taskDetail3: _task.detail,
  17473. chapterData: [],
  17474. toolText: "",
  17475. toolChoose: [
  17476. {
  17477. tool: [],
  17478. toolDetail: "",
  17479. toolType: 0,
  17480. askCount: 1,
  17481. askTitle: "",
  17482. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17483. },
  17484. ],
  17485. isShowTools: false,
  17486. askCount: 1,
  17487. isFold: 0,
  17488. askTitle: "",
  17489. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17490. checkJson: [{ checkCount: [], checkPerent: [] }],
  17491. homeworkList: [],
  17492. })
  17493. }
  17494. }
  17495. }else {
  17496. _this.unitJson[0].chapterInfo[0].taskJson = []
  17497. for (var i = 0; i < dArray.length; i++) {
  17498. let _task = dArray[i]
  17499. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17500. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17501. taskDetail: "",
  17502. taskDetail2: "",
  17503. taskDetail3: _task.detail,
  17504. chapterData: [],
  17505. toolText: "",
  17506. toolChoose: [
  17507. {
  17508. tool: [],
  17509. toolDetail: "",
  17510. toolType: 0,
  17511. askCount: 1,
  17512. askTitle: "",
  17513. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17514. },
  17515. ],
  17516. isShowTools: false,
  17517. askCount: 1,
  17518. isFold: 0,
  17519. askTitle: "",
  17520. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17521. checkJson: [{ checkCount: [], checkPerent: [] }],
  17522. homeworkList: [],
  17523. })
  17524. }
  17525. }
  17526. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17527. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17528. _this.$forceUpdate();
  17529. } else {
  17530. for (var i = 0; i < dArray.length; i++) {
  17531. let _task = dArray[i]
  17532. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17533. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17534. }else {
  17535. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17536. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17537. taskDetail: "",
  17538. taskDetail2: "",
  17539. taskDetail3: _task.detail,
  17540. chapterData: [],
  17541. toolText: "",
  17542. toolChoose: [
  17543. {
  17544. tool: [],
  17545. toolDetail: "",
  17546. toolType: 0,
  17547. askCount: 1,
  17548. askTitle: "",
  17549. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17550. },
  17551. ],
  17552. isShowTools: false,
  17553. askCount: 1,
  17554. isFold: 0,
  17555. askTitle: "",
  17556. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17557. checkJson: [{ checkCount: [], checkPerent: [] }],
  17558. homeworkList: [],
  17559. }
  17560. }
  17561. }
  17562. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17563. _this.$forceUpdate();
  17564. }
  17565. } catch (error) {
  17566. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17567. _this.aiGet4(messages, callback)
  17568. console.log("error_________________" + error);
  17569. return;
  17570. // _this.loading = false
  17571. }
  17572. }
  17573. callback ? callback() : ''
  17574. })
  17575. .catch((error) => {
  17576. _this.loading = false
  17577. console.log(error);
  17578. });
  17579. },
  17580. async aiDetail(msg, index) {
  17581. let _this = this
  17582. const _tindex = 'task-' + index
  17583. const _tindex2 = index
  17584. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17585. if (_this.infoData.length) {
  17586. for (var i = 0; i < _this.infoData.length; i++) {
  17587. if(_this.infoData[i].fileid){
  17588. fileid.push(_this.infoData[i].fileid)
  17589. }else {
  17590. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17591. if(_fileid){
  17592. _this.infoData[i].fileid = _fileid
  17593. _this.$forceUpdate();
  17594. fileid.push(_fileid)
  17595. }
  17596. }
  17597. }
  17598. }
  17599. let url = []
  17600. if (this.infoData.length) {
  17601. for (var i = 0; i < this.infoData.length; i++) {
  17602. url.push(this.infoData[i].url)
  17603. }
  17604. }
  17605. let messages = `NOTICE
  17606. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  17607. 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.
  17608. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17609. Instruction: Based on the context, follow "Format example", write content.
  17610. #Context
  17611. ## 要求
  17612. ${msg}
  17613. ## 参考信息
  17614. 任务名称:${_this.aiCallBack.task}
  17615. ## 优化内容
  17616. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  17617. // -------- #补充参考资料和
  17618. // ## 补充参考资料
  17619. // - 补充资料:${url.join(",")}
  17620. // - 补充描述:${_this.courseText2}
  17621. _this.taskDetailLoading.push(_tindex)
  17622. _this.ttaskDetailLoading.push(_tindex)
  17623. let _uuid = uuidv4();
  17624. // let params = JSON.stringify({
  17625. // // "model": "Chat",
  17626. // model: 'gpt-3.5-turbo',
  17627. // temperature: 0,
  17628. // max_tokens: 4096,
  17629. // top_p: 1,
  17630. // frequency_penalty: 0,
  17631. // presence_penalty: 0,
  17632. // messages: [{
  17633. // content: messages,
  17634. // role: 'user'
  17635. // }],
  17636. // uid: _uuid,
  17637. // mind_map_question: "",
  17638. // })
  17639. let params = {
  17640. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17641. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17642. session_name: _uuid,
  17643. userId: _this.userid,
  17644. uid: _uuid,
  17645. file_ids: fileid.length ? [...fileid] : '',
  17646. }
  17647. // let params = JSON.stringify({
  17648. // message: {
  17649. // anthropic_version: "bedrock-2023-05-31",
  17650. // max_tokens: 4096,
  17651. // temperature: 0,
  17652. // top_p: 1,
  17653. // messages: [{
  17654. // "role": "user",
  17655. // "content": messages
  17656. // }] ,
  17657. // },
  17658. // uid: _uuid,
  17659. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17660. // });
  17661. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17662. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17663. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17664. console.log(response);
  17665. // let data = response.data.FunctionResponse
  17666. // if (data.choices && data.choices.length && data.choices[0].message) {
  17667. // console.log(data.choices[0].message.content);
  17668. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17669. // _this.$forceUpdate()
  17670. // }
  17671. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17672. } else {
  17673. _this.$message.warning(response.data.FunctionResponse.result);
  17674. }
  17675. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17676. }).catch(function (error) {
  17677. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17678. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17679. console.log(error);
  17680. });
  17681. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  17682. },
  17683. aiDetailgetAiContent(_uid, loading, _tindex2) {
  17684. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17685. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17686. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17687. let _allText = "";
  17688. let _mdText = "";
  17689. let _iindex = 0
  17690. _source.onmessage = _e => {
  17691. let _eData = JSON.parse(_e.data).content;
  17692. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17693. //对话已经完成
  17694. _mdText = _mdText.replace("_", "");
  17695. _source.close();
  17696. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17697. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17698. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17699. return;
  17700. } else {
  17701. _iindex++
  17702. //对话还在继续
  17703. let _text = "";
  17704. _text = _eData.replaceAll("'", "");
  17705. if (_allText == "") {
  17706. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17707. } else {
  17708. _allText += _text;
  17709. }
  17710. _mdText = _allText + "_";
  17711. _mdText = _mdText.replace(/\\n/g, "\n");
  17712. _mdText = _mdText.replace(/\\/g, "");
  17713. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17714. //转化返回的回复流数据.
  17715. if(_iindex == 10){
  17716. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17717. _iindex = 0
  17718. }
  17719. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17720. // 处理流数据
  17721. }
  17722. // this.$forceUpdate();
  17723. };
  17724. },
  17725. async aiOutlineDetail(msg, index) {
  17726. let _this = this
  17727. const _tindex = 'task-' + index
  17728. const _tindex2 = index
  17729. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17730. if (_this.infoData.length) {
  17731. for (var i = 0; i < _this.infoData.length; i++) {
  17732. if(_this.infoData[i].fileid){
  17733. fileid.push(_this.infoData[i].fileid)
  17734. }else {
  17735. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17736. if(_fileid){
  17737. _this.infoData[i].fileid = _fileid
  17738. _this.$forceUpdate();
  17739. fileid.push(_fileid)
  17740. }
  17741. }
  17742. }
  17743. }
  17744. let url = []
  17745. if (this.infoData.length) {
  17746. for (var i = 0; i < this.infoData.length; i++) {
  17747. url.push(this.infoData[i].url)
  17748. }
  17749. }
  17750. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17751. let messages = `NOTICE
  17752. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17753. 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.
  17754. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17755. Instruction: Based on the context, follow "Format example", write content.
  17756. #Context
  17757. ## 要求
  17758. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  17759. ## 参考信息
  17760. 课程名字:${_this.courseName}
  17761. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17762. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17763. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17764. # Format example
  17765. 教学目标:教学目标。
  17766. 任务设计:任务设计。
  17767. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17768. `
  17769. // -------- #补充参考资料和
  17770. // ## 补充参考资料
  17771. // - 补充资料:${url.join(",")}
  17772. // - 补充描述:${_this.courseText2}
  17773. _this.taskDetailLoading.push(_tindex)
  17774. _this.ttaskDetailLoading.push(_tindex)
  17775. let _uuid = uuidv4();
  17776. // let params = JSON.stringify({
  17777. // // "model": "Chat",
  17778. // model: 'gpt-3.5-turbo',
  17779. // temperature: 0,
  17780. // max_tokens: 4096,
  17781. // top_p: 1,
  17782. // frequency_penalty: 0,
  17783. // presence_penalty: 0,
  17784. // messages: [{
  17785. // content: messages,
  17786. // role: 'user'
  17787. // }],
  17788. // uid: _uuid,
  17789. // mind_map_question: "",
  17790. // })
  17791. let params = {
  17792. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17793. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17794. session_name: _uuid,
  17795. userId: _this.userid,
  17796. uid: _uuid,
  17797. file_ids: fileid.length ? [...fileid] : '',
  17798. }
  17799. // let params = JSON.stringify({
  17800. // message: {
  17801. // anthropic_version: "bedrock-2023-05-31",
  17802. // max_tokens: 4096,
  17803. // temperature: 0,
  17804. // top_p: 1,
  17805. // messages: [{
  17806. // "role": "user",
  17807. // "content": messages
  17808. // }] ,
  17809. // },
  17810. // uid: _uuid,
  17811. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17812. // });
  17813. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17814. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17815. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17816. console.log(response);
  17817. // let data = response.data.FunctionResponse
  17818. // if (data.choices && data.choices.length && data.choices[0].message) {
  17819. // console.log(data.choices[0].message.content);
  17820. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17821. // _this.$forceUpdate()
  17822. // }
  17823. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17824. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17825. } else {
  17826. _this.$message.warning(response.data.FunctionResponse.result);
  17827. }
  17828. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17829. }).catch(function (error) {
  17830. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17831. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17832. console.log(error);
  17833. });
  17834. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17835. },
  17836. async aiOutlineDetail2(msg, index) {
  17837. let _this = this
  17838. const _tindex = 'task-' + index
  17839. const _tindex2 = index
  17840. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17841. if (_this.infoData.length) {
  17842. for (var i = 0; i < _this.infoData.length; i++) {
  17843. if(_this.infoData[i].fileid){
  17844. fileid.push(_this.infoData[i].fileid)
  17845. }else {
  17846. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17847. if(_fileid){
  17848. _this.infoData[i].fileid = _fileid
  17849. _this.$forceUpdate();
  17850. fileid.push(_fileid)
  17851. }
  17852. }
  17853. }
  17854. }
  17855. let url = []
  17856. if (this.infoData.length) {
  17857. for (var i = 0; i < this.infoData.length; i++) {
  17858. url.push(this.infoData[i].url)
  17859. }
  17860. }
  17861. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17862. let taskArray = []
  17863. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  17864. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  17865. if(k != index){
  17866. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  17867. }
  17868. }
  17869. let messages = `NOTICE
  17870. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17871. 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.
  17872. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17873. Instruction: Based on the context, follow "Format example", write content.
  17874. #Context
  17875. ## 要求
  17876. ${msg}
  17877. ## 参考信息
  17878. 课程名字:${_this.courseName}
  17879. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17880. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17881. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17882. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  17883. # Format example
  17884. 教学目标:教学目标。
  17885. 任务设计:任务设计。
  17886. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17887. `
  17888. // -------- #补充参考资料和
  17889. // ## 补充参考资料
  17890. // - 补充资料:${url.join(",")}
  17891. // - 补充描述:${_this.courseText2}
  17892. _this.taskDetailLoading.push(_tindex)
  17893. _this.ttaskDetailLoading.push(_tindex)
  17894. let _uuid = uuidv4();
  17895. // let params = JSON.stringify({
  17896. // // "model": "Chat",
  17897. // model: 'gpt-3.5-turbo',
  17898. // temperature: 0,
  17899. // max_tokens: 4096,
  17900. // top_p: 1,
  17901. // frequency_penalty: 0,
  17902. // presence_penalty: 0,
  17903. // messages: [{
  17904. // content: messages,
  17905. // role: 'user'
  17906. // }],
  17907. // uid: _uuid,
  17908. // mind_map_question: "",
  17909. // })
  17910. let params = {
  17911. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17912. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17913. session_name: _uuid,
  17914. userId: _this.userid,
  17915. uid: _uuid,
  17916. file_ids: fileid.length ? [...fileid] : '',
  17917. }
  17918. // let params = JSON.stringify({
  17919. // message: {
  17920. // anthropic_version: "bedrock-2023-05-31",
  17921. // max_tokens: 4096,
  17922. // temperature: 0,
  17923. // top_p: 1,
  17924. // messages: [{
  17925. // "role": "user",
  17926. // "content": messages
  17927. // }] ,
  17928. // },
  17929. // uid: _uuid,
  17930. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17931. // });
  17932. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17933. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17934. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17935. console.log(response);
  17936. // let data = response.data.FunctionResponse
  17937. // if (data.choices && data.choices.length && data.choices[0].message) {
  17938. // console.log(data.choices[0].message.content);
  17939. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17940. // _this.$forceUpdate()
  17941. // }
  17942. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17943. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17944. } else {
  17945. _this.$message.warning(response.data.FunctionResponse.result);
  17946. }
  17947. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17948. }).catch(function (error) {
  17949. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17950. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17951. console.log(error);
  17952. });
  17953. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17954. },
  17955. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  17956. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17957. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17958. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17959. let _allText = "";
  17960. let _mdText = "";
  17961. let _iindex = 0
  17962. _source.onmessage = _e => {
  17963. let _eData = JSON.parse(_e.data).content;
  17964. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17965. //对话已经完成
  17966. _mdText = _mdText.replace("_", "");
  17967. _source.close();
  17968. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17969. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  17970. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  17971. }
  17972. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17973. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17974. return;
  17975. } else {
  17976. _iindex++
  17977. //对话还在继续
  17978. let _text = "";
  17979. _text = _eData.replaceAll("'", "");
  17980. if (_allText == "") {
  17981. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17982. } else {
  17983. _allText += _text;
  17984. }
  17985. _mdText = _allText + "_";
  17986. _mdText = _mdText.replace(/\\n/g, "\n");
  17987. _mdText = _mdText.replace(/\\/g, "");
  17988. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17989. //转化返回的回复流数据.
  17990. if(_iindex == 10){
  17991. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17992. _iindex = 0
  17993. }
  17994. if(this.taskDetailLoading.indexOf(loading) !== -1){
  17995. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17996. }
  17997. // 处理流数据
  17998. }
  17999. // this.$forceUpdate();
  18000. };
  18001. },
  18002. async aiDetail2(msg, index) {
  18003. let _this = this
  18004. const _tindex = 'task-' + index
  18005. const _tindex2 = index
  18006. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18007. if (_this.infoData.length) {
  18008. for (var i = 0; i < _this.infoData.length; i++) {
  18009. if(_this.infoData[i].fileid){
  18010. fileid.push(_this.infoData[i].fileid)
  18011. }else {
  18012. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18013. if(_fileid){
  18014. _this.infoData[i].fileid = _fileid
  18015. _this.$forceUpdate();
  18016. fileid.push(_fileid)
  18017. }
  18018. }
  18019. }
  18020. }
  18021. let messages = `NOTICE
  18022. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18023. 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.
  18024. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18025. Instruction: Based on the context, follow "Format example", write content.
  18026. #Context
  18027. ## 要求
  18028. ${msg}
  18029. ## 参考资料
  18030. 任务名字: ${_this.aiCallBack.task}
  18031. ## 优化信息
  18032. ${_this.aiCallBack.taskDetail}
  18033. # Format example
  18034. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  18035. _this.taskDetailLoading2.push(_tindex)
  18036. _this.ttaskDetailLoading2.push(_tindex)
  18037. let _uuid = uuidv4();
  18038. // let params = JSON.stringify({
  18039. // // "model": "Chat",
  18040. // model: 'gpt-3.5-turbo',
  18041. // temperature: 0,
  18042. // max_tokens: 4096,
  18043. // top_p: 1,
  18044. // frequency_penalty: 0,
  18045. // presence_penalty: 0,
  18046. // messages: [{
  18047. // content: messages,
  18048. // role: 'user'
  18049. // }],
  18050. // uid: _uuid,
  18051. // mind_map_question: "",
  18052. // })
  18053. let params = {
  18054. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18055. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  18056. session_name: _uuid,
  18057. userId: _this.userid,
  18058. uid: _uuid,
  18059. file_ids: fileid.length ? [...fileid] : '',
  18060. }
  18061. // let params = JSON.stringify({
  18062. // message: {
  18063. // anthropic_version: "bedrock-2023-05-31",
  18064. // max_tokens: 4096,
  18065. // temperature: 0,
  18066. // top_p: 1,
  18067. // messages: [{
  18068. // "role": "user",
  18069. // "content": messages
  18070. // }] ,
  18071. // },
  18072. // uid: _uuid,
  18073. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18074. // });
  18075. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18076. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18077. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18078. console.log(response);
  18079. // let data = response.data.FunctionResponse
  18080. // if (data.choices && data.choices.length && data.choices[0].message) {
  18081. // console.log(data.choices[0].message.content);
  18082. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18083. // _this.$forceUpdate()
  18084. // }
  18085. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18086. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18087. } else {
  18088. _this.$message.warning(response.data.FunctionResponse.result);
  18089. }
  18090. }).catch(function (error) {
  18091. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  18092. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  18093. console.log(error);
  18094. });
  18095. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  18096. },
  18097. aiDetail2getAiContent(_uid, loading, _tindex2) {
  18098. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18099. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18100. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18101. let _allText = "";
  18102. let _mdText = "";
  18103. let _iindex = 0
  18104. _source.onmessage = _e => {
  18105. let _eData = JSON.parse(_e.data).content;
  18106. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18107. //对话已经完成
  18108. _mdText = _mdText.replace("_", "");
  18109. _source.close();
  18110. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18111. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18112. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  18113. return;
  18114. } else {
  18115. _iindex++
  18116. //对话还在继续
  18117. let _text = "";
  18118. _text = _eData.replaceAll("'", "");
  18119. if (_allText == "") {
  18120. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18121. } else {
  18122. _allText += _text;
  18123. }
  18124. _mdText = _allText + "_";
  18125. _mdText = _mdText.replace(/\\n/g, "\n");
  18126. _mdText = _mdText.replace(/\\/g, "");
  18127. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18128. //转化返回的回复流数据
  18129. if(_iindex == 10){
  18130. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18131. _iindex = 0
  18132. }
  18133. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18134. // 处理流数据
  18135. }
  18136. // this.$forceUpdate();
  18137. };
  18138. },
  18139. async aiDetail3(msg, index, tindex) {
  18140. let _this = this
  18141. const _tindex = 'task-' + index + tindex
  18142. const _tindex2 = index
  18143. const _tindex3 = tindex
  18144. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18145. if (_this.infoData.length) {
  18146. for (var i = 0; i < _this.infoData.length; i++) {
  18147. if(_this.infoData[i].fileid){
  18148. fileid.push(_this.infoData[i].fileid)
  18149. }else {
  18150. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18151. if(_fileid){
  18152. _this.infoData[i].fileid = _fileid
  18153. _this.$forceUpdate();
  18154. fileid.push(_fileid)
  18155. }
  18156. }
  18157. }
  18158. }
  18159. // **重点考虑该任务及工具名和工具内容的情况下*
  18160. let messages = `NOTICE
  18161. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18162. 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.
  18163. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18164. Instruction: Based on the context, follow "Format example", write content.
  18165. #Context
  18166. ## 参考内容
  18167. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18168. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18169. 工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]].name : '无'}
  18170. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  18171. ## 要求
  18172. ${msg} 输出格式和内容要求参考#格式与要求
  18173. # Format example
  18174. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  18175. _this.taskDetailLoading3.push(_tindex)
  18176. _this.ttaskDetailLoading3.push(_tindex)
  18177. let _uuid = uuidv4();
  18178. // let params = JSON.stringify({
  18179. // // "model": "Chat",
  18180. // model: 'gpt-3.5-turbo',
  18181. // temperature: 0,
  18182. // max_tokens: 4096,
  18183. // top_p: 1,
  18184. // frequency_penalty: 0,
  18185. // presence_penalty: 0,
  18186. // messages: [{
  18187. // content: messages,
  18188. // role: 'user'
  18189. // }],
  18190. // uid: _uuid,
  18191. // mind_map_question: "",
  18192. // })
  18193. let params = {
  18194. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18195. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18196. session_name: _uuid,
  18197. userId: _this.userid,
  18198. uid: _uuid,
  18199. file_ids: fileid.length ? [...fileid] : '',
  18200. }
  18201. // let params = JSON.stringify({
  18202. // message: {
  18203. // anthropic_version: "bedrock-2023-05-31",
  18204. // max_tokens: 4096,
  18205. // temperature: 0,
  18206. // top_p: 1,
  18207. // messages: [{
  18208. // "role": "user",
  18209. // "content": messages
  18210. // }] ,
  18211. // },
  18212. // uid: _uuid,
  18213. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18214. // });
  18215. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18216. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18217. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18218. console.log(response);
  18219. let data = response.data.FunctionResponse
  18220. // if (data.choices && data.choices.length && data.choices[0].message) {
  18221. // console.log(data.choices[0].message.content);
  18222. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  18223. // _this.$forceUpdate()
  18224. // }
  18225. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18226. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18227. } else {
  18228. _this.$message.warning(response.data.FunctionResponse.result);
  18229. }
  18230. }).catch(function (error) {
  18231. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18232. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  18233. console.log(error);
  18234. });
  18235. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  18236. },
  18237. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  18238. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18239. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18240. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18241. let _allText = "";
  18242. let _mdText = "";
  18243. let _iindex = 0
  18244. _source.onmessage = _e => {
  18245. let _eData = JSON.parse(_e.data).content;
  18246. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18247. //对话已经完成
  18248. _mdText = _mdText.replace("_", "");
  18249. _source.close();
  18250. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18251. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18252. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  18253. return;
  18254. } else {
  18255. _iindex++
  18256. //对话还在继续
  18257. let _text = "";
  18258. _text = _eData.replaceAll("'", "");
  18259. if (_allText == "") {
  18260. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18261. } else {
  18262. _allText += _text;
  18263. }
  18264. _mdText = _allText + "_";
  18265. _mdText = _mdText.replace(/\\n/g, "\n");
  18266. _mdText = _mdText.replace(/\\/g, "");
  18267. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18268. //转化返回的回复流数据
  18269. if(_iindex == 10){
  18270. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18271. _iindex = 0
  18272. }
  18273. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18274. // 处理流数据
  18275. }
  18276. // this.$forceUpdate();
  18277. };
  18278. },
  18279. async aiDetail4(msg, index) {
  18280. if (!msg.length) {
  18281. this.$message.error("请添加评价后才能优化")
  18282. return
  18283. }
  18284. let _this = this
  18285. const _tindex = 'task-' + index
  18286. const _tindex2 = index
  18287. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18288. if (_this.infoData.length) {
  18289. for (var i = 0; i < _this.infoData.length; i++) {
  18290. if(_this.infoData[i].fileid){
  18291. fileid.push(_this.infoData[i].fileid)
  18292. }else {
  18293. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18294. if(_fileid){
  18295. _this.infoData[i].fileid = _fileid
  18296. _this.$forceUpdate();
  18297. fileid.push(_fileid)
  18298. }
  18299. }
  18300. }
  18301. }
  18302. var _text = ""
  18303. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  18304. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  18305. }
  18306. // **重点考虑该任务详情**
  18307. let messages = `
  18308. 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.
  18309. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18310. #Context
  18311. ## 参考内容
  18312. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18313. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18314. 评价设计:${_text}
  18315. ## 要求
  18316. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  18317. # 格式与要求
  18318. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18319. # Format example
  18320. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  18321. _this.taskDetailLoading4.push(_tindex)
  18322. // let params = JSON.stringify({
  18323. // // "model": "Chat",
  18324. // model: 'gpt-3.5-turbo',
  18325. // temperature: 0,
  18326. // max_tokens: 4096,
  18327. // top_p: 1,
  18328. // frequency_penalty: 0,
  18329. // presence_penalty: 0,
  18330. // messages: [{
  18331. // content: messages,
  18332. // role: 'user'
  18333. // }],
  18334. // stream: false,
  18335. // uid: this.userid,
  18336. // mind_map_question: "",
  18337. // })
  18338. let params = {
  18339. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18340. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18341. session_name: uuidv4(),
  18342. userId: _this.userid,
  18343. file_ids: fileid.length ? [...fileid] : '',
  18344. }
  18345. // let params = JSON.stringify({
  18346. // message: {
  18347. // anthropic_version: "bedrock-2023-05-31",
  18348. // max_tokens: 4096,
  18349. // temperature: 0,
  18350. // top_p: 1,
  18351. // messages: [{
  18352. // content: messages,
  18353. // role: 'user'
  18354. // }], //
  18355. // },
  18356. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18357. // });
  18358. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18359. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  18360. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18361. console.log(response);
  18362. let data = response.data.FunctionResponse
  18363. // if (data.choices && data.choices.length && data.choices[0].message) {
  18364. // console.log(data.choices[0].message.content);
  18365. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  18366. // _this.$forceUpdate()
  18367. // }
  18368. if (data.message) {
  18369. console.log(data.message);
  18370. try {
  18371. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  18372. } catch (e) {
  18373. console.log("error_________________" + e);
  18374. // _this.$message.error(data.message)
  18375. try {
  18376. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18377. let match = data.message.match(regex);
  18378. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  18379. // var message = data.message;
  18380. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18381. // var jsonEnd = message.indexOf("```", jsonStart);
  18382. // if (jsonStart !== -1 && jsonEnd !== -1) {
  18383. // var jsonString = message
  18384. // .substring(jsonStart, jsonEnd)
  18385. // .trim();
  18386. // var _data2 = JSON.parse(jsonString);
  18387. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  18388. // }
  18389. } catch (error) {
  18390. }
  18391. }
  18392. _this.$forceUpdate()
  18393. }
  18394. // if (data.result) {
  18395. // console.log(data.result);
  18396. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  18397. // _this.$forceUpdate()
  18398. // }
  18399. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18400. }).catch(function (error) {
  18401. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18402. console.log(error);
  18403. });
  18404. },
  18405. async aiDetail5(msg, index) {
  18406. let _this = this
  18407. const _tindex = 'task-' + index
  18408. const _tindex2 = index
  18409. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18410. if (_this.infoData.length) {
  18411. for (var i = 0; i < _this.infoData.length; i++) {
  18412. if(_this.infoData[i].fileid){
  18413. fileid.push(_this.infoData[i].fileid)
  18414. }else {
  18415. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18416. if(_fileid){
  18417. _this.infoData[i].fileid = _fileid
  18418. _this.$forceUpdate();
  18419. fileid.push(_fileid)
  18420. }
  18421. }
  18422. }
  18423. }
  18424. let url = []
  18425. if (this.infoData.length) {
  18426. for (var i = 0; i < this.infoData.length; i++) {
  18427. url.push(this.infoData[i].url)
  18428. }
  18429. }
  18430. var _text = ""
  18431. var _text2 = ""
  18432. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18433. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18434. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18435. }
  18436. let messages = `
  18437. 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.
  18438. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18439. --------
  18440. ## 要求
  18441. ${msg}
  18442. -------
  18443. ## 本教案描述
  18444. ${_this.aiCallBack}
  18445. -------
  18446. ## 课程大纲
  18447. ${_text}
  18448. -------
  18449. ## 其他教学任务教案
  18450. ${_text2}`
  18451. // ## 补充参考资料
  18452. // - 补充资料:${url.join(",")}
  18453. // - 补充描述:${this.courseText2}
  18454. _this.taskDetailLoading5.push(_tindex)
  18455. _this.ttaskDetailLoading5.push(_tindex)
  18456. let _uuid = uuidv4();
  18457. // let params = JSON.stringify({
  18458. // // "model": "Chat",
  18459. // model: 'gpt-3.5-turbo',
  18460. // temperature: 0,
  18461. // max_tokens: 4096,
  18462. // top_p: 1,
  18463. // frequency_penalty: 0,
  18464. // presence_penalty: 0,
  18465. // messages: [{
  18466. // content: messages,
  18467. // role: 'user'
  18468. // }],
  18469. // uid: _uuid,
  18470. // mind_map_question: "",
  18471. // })
  18472. let params = {
  18473. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18474. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18475. session_name: _uuid,
  18476. userId: _this.userid,
  18477. uid: _uuid,
  18478. file_ids: fileid.length ? [...fileid] : '',
  18479. }
  18480. // let params = JSON.stringify({
  18481. // message: {
  18482. // anthropic_version: "bedrock-2023-05-31",
  18483. // max_tokens: 4096,
  18484. // temperature: 0,
  18485. // top_p: 1,
  18486. // messages: [{
  18487. // "role": "user",
  18488. // "content": messages
  18489. // }] ,
  18490. // },
  18491. // uid: _uuid,
  18492. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18493. // });
  18494. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18495. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18496. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18497. console.log(response);
  18498. // let data = response.data.FunctionResponse
  18499. // if (data.choices && data.choices.length && data.choices[0].message) {
  18500. // console.log(data.choices[0].message.content);
  18501. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18502. // _this.$forceUpdate()
  18503. // }
  18504. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18505. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18506. } else {
  18507. _this.$message.warning(response.data.FunctionResponse.result);
  18508. }
  18509. }).catch(function (error) {
  18510. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18511. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18512. console.log(error);
  18513. });
  18514. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  18515. },
  18516. aiDetail5getAiContent(_uid, loading, _tindex2) {
  18517. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18518. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18519. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18520. let _allText = "";
  18521. let _mdText = "";
  18522. let _iindex = 0
  18523. _source.onmessage = _e => {
  18524. let _eData = JSON.parse(_e.data).content;
  18525. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18526. //对话已经完成
  18527. _mdText = _mdText.replace("_", "");
  18528. _source.close();
  18529. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18530. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18531. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18532. return;
  18533. } else {
  18534. _iindex++
  18535. //对话还在继续
  18536. let _text = "";
  18537. _text = _eData.replaceAll("'", "");
  18538. if (_allText == "") {
  18539. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18540. } else {
  18541. _allText += _text;
  18542. }
  18543. _mdText = _allText + "_";
  18544. _mdText = _mdText.replace(/\\n/g, "\n");
  18545. _mdText = _mdText.replace(/\\/g, "");
  18546. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18547. //转化返回的回复流数据
  18548. if(_iindex == 10){
  18549. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18550. _iindex = 0
  18551. }
  18552. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18553. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18554. }
  18555. // 处理流数据
  18556. }
  18557. // this.$forceUpdate();
  18558. };
  18559. },
  18560. async aiDetail52(msg, index) {
  18561. let _this = this
  18562. const _tindex = 'task-' + index
  18563. const _tindex2 = index
  18564. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18565. if (_this.infoData.length) {
  18566. for (var i = 0; i < _this.infoData.length; i++) {
  18567. if(_this.infoData[i].fileid){
  18568. fileid.push(_this.infoData[i].fileid)
  18569. }else {
  18570. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18571. if(_fileid){
  18572. _this.infoData[i].fileid = _fileid
  18573. _this.$forceUpdate();
  18574. fileid.push(_fileid)
  18575. }
  18576. }
  18577. }
  18578. }
  18579. let url = []
  18580. if (this.infoData.length) {
  18581. for (var i = 0; i < this.infoData.length; i++) {
  18582. url.push(this.infoData[i].url)
  18583. }
  18584. }
  18585. let messages = `NOTICE
  18586. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18587. 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.
  18588. #Context
  18589. ## 要求
  18590. ${msg}
  18591. ## 补充描述
  18592. 课程简要描述:${_this.courseText}
  18593. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18594. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  18595. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18596. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18597. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18598. `
  18599. // ## 补充参考资料
  18600. // - 补充资料:${url.join(",")}
  18601. // - 补充描述:${this.courseText2}
  18602. _this.taskDetailLoading5.push(_tindex)
  18603. _this.ttaskDetailLoading5.push(_tindex)
  18604. let _uuid = uuidv4();
  18605. // let params = JSON.stringify({
  18606. // // "model": "Chat",
  18607. // model: 'gpt-3.5-turbo',
  18608. // temperature: 0,
  18609. // max_tokens: 4096,
  18610. // top_p: 1,
  18611. // frequency_penalty: 0,
  18612. // presence_penalty: 0,
  18613. // messages: [{
  18614. // content: messages,
  18615. // role: 'user'
  18616. // }],
  18617. // uid: _uuid,
  18618. // mind_map_question: "",
  18619. // })
  18620. let params = {
  18621. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18622. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18623. session_name: _uuid,
  18624. userId: _this.userid,
  18625. uid: _uuid,
  18626. file_ids: fileid.length ? [...fileid] : '',
  18627. }
  18628. // let params = JSON.stringify({
  18629. // message: {
  18630. // anthropic_version: "bedrock-2023-05-31",
  18631. // max_tokens: 4096,
  18632. // temperature: 0,
  18633. // top_p: 1,
  18634. // messages: [{
  18635. // "role": "user",
  18636. // "content": messages
  18637. // }] ,
  18638. // },
  18639. // uid: _uuid,
  18640. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18641. // });
  18642. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18643. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18644. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18645. console.log(response);
  18646. // let data = response.data.FunctionResponse
  18647. // if (data.choices && data.choices.length && data.choices[0].message) {
  18648. // console.log(data.choices[0].message.content);
  18649. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18650. // _this.$forceUpdate()
  18651. // }
  18652. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18653. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18654. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  18655. } else {
  18656. _this.$message.warning(response.data.FunctionResponse.result);
  18657. }
  18658. }).catch(function (error) {
  18659. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18660. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18661. console.log(error);
  18662. });
  18663. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  18664. },
  18665. aiDetail52getAiContent(_uid, loading, _tindex2) {
  18666. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18667. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18668. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18669. let _allText = "";
  18670. let _mdText = "";
  18671. this.allTextArray[_tindex2] = ""
  18672. let _iindex = 0
  18673. _source.onmessage = async (_e) => {
  18674. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  18675. let _eData = JSON.parse(_e.data).content;
  18676. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18677. //对话已经完成
  18678. _mdText = _mdText.replace("_", "");
  18679. _source.close();
  18680. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18681. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18682. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18683. return;
  18684. } else {
  18685. _iindex++
  18686. //对话还在继续
  18687. let _text = "";
  18688. _text = _eData.replaceAll("'", "");
  18689. if (_allText == "") {
  18690. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18691. } else {
  18692. _allText += _text;
  18693. }
  18694. _mdText = _allText + "_";
  18695. _mdText = _mdText.replace(/\\n/g, "\n");
  18696. _mdText = _mdText.replace(/\\/g, "");
  18697. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18698. //转化返回的回复流数据
  18699. if(_iindex == 10){
  18700. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18701. _iindex = 0
  18702. }
  18703. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18704. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18705. }
  18706. // 处理流数据
  18707. }
  18708. };
  18709. },
  18710. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  18711. let _mdText = "";
  18712. let _eData = JSON.parse(_e.data).content;
  18713. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18714. //对话已经完成
  18715. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  18716. _source.close();
  18717. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18718. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18719. return;
  18720. } else {
  18721. //对话还在继续
  18722. let _text = "";
  18723. _text = _eData.replaceAll("'", "");
  18724. if (this.allTextArray[_tindex2] == "") {
  18725. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18726. } else {
  18727. this.allTextArray[_tindex2] += _text;
  18728. }
  18729. _mdText = this.allTextArray[_tindex2] + "_";
  18730. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  18731. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  18732. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  18733. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  18734. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18735. // 处理流数据
  18736. }
  18737. },
  18738. async aiCpote(msg, callback) {
  18739. let _this = this
  18740. let _index = _this.aitype.replace("aiC","c")
  18741. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18742. if (_this.infoData.length) {
  18743. for (var i = 0; i < _this.infoData.length; i++) {
  18744. if(_this.infoData[i].fileid){
  18745. fileid.push(_this.infoData[i].fileid)
  18746. }else {
  18747. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18748. if(_fileid){
  18749. _this.infoData[i].fileid = _fileid
  18750. _this.$forceUpdate();
  18751. fileid.push(_fileid)
  18752. }
  18753. }
  18754. }
  18755. }
  18756. let sub = []
  18757. if (this.courseTypeId.length) {
  18758. for (var i = 0; i < this.courseTypeId.length; i++) {
  18759. let _sid = this.courseTypeId[i]
  18760. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18761. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18762. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18763. }
  18764. }
  18765. }
  18766. }
  18767. let mclass = []
  18768. if (this.courseTypeId.length) {
  18769. for (var i = 0; i < this.courseTypeId.length; i++) {
  18770. let _sid = this.courseTypeId[i]
  18771. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18772. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18773. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18774. }
  18775. }
  18776. }
  18777. }
  18778. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18779. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  18780. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18781. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18782. let messages = `NOTICE
  18783. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18784. 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.
  18785. ${msg}
  18786. ## 课程简介
  18787. 课程名字:${this.courseName}
  18788. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18789. ${sub.length ? '学科:' + sub.join(",") : ''}
  18790. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18791. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18792. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  18793. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  18794. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  18795. _this.cpoteLoading[_index] = true
  18796. _this.cpotetLoading[_index] = true
  18797. let _uuid = uuidv4();
  18798. // let params = JSON.stringify({
  18799. // // "model": "Chat",
  18800. // model: 'gpt-3.5-turbo',
  18801. // temperature: 0,
  18802. // max_tokens: 4096,
  18803. // top_p: 1,
  18804. // frequency_penalty: 0,
  18805. // presence_penalty: 0,
  18806. // messages: [{
  18807. // content: messages,
  18808. // role: 'user'
  18809. // }],
  18810. // uid: _uuid,
  18811. // mind_map_question: "",
  18812. // })
  18813. let params = {
  18814. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18815. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18816. session_name: _uuid,
  18817. userId: _this.userid,
  18818. uid: _uuid,
  18819. file_ids: fileid.length ? [...fileid] : '',
  18820. }
  18821. // let params = JSON.stringify({
  18822. // message: {
  18823. // anthropic_version: "bedrock-2023-05-31",
  18824. // max_tokens: 4096,
  18825. // temperature: 0,
  18826. // top_p: 1,
  18827. // messages: [{
  18828. // "role": "user",
  18829. // "content": messages
  18830. // }] ,
  18831. // },
  18832. // uid: _uuid,
  18833. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18834. // });
  18835. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18836. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18837. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18838. console.log(response);
  18839. // let data = response.data.FunctionResponse
  18840. // if (data.choices && data.choices.length && data.choices[0].message) {
  18841. // console.log(data.choices[0].message.content);
  18842. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18843. // _this.$forceUpdate()
  18844. // }
  18845. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18846. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18847. } else {
  18848. _this.$message.warning(response.data.FunctionResponse.result);
  18849. }
  18850. }).catch(function (error) {
  18851. _this.cpoteLoading[_index] = false
  18852. _this.cpotetLoading[_index] = false
  18853. callback ? callback() : ''
  18854. console.log(error);
  18855. });
  18856. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  18857. },
  18858. aiCpotegetAiContent(_uid, loading, callback) {
  18859. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18860. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18861. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18862. let _allText = "";
  18863. let _mdText = "";
  18864. let _iindex = 0
  18865. _source.onmessage = _e => {
  18866. let _eData = JSON.parse(_e.data).content;
  18867. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18868. //对话已经完成
  18869. _mdText = _mdText.replace("_", "");
  18870. _source.close();
  18871. this.cpote[loading] = _mdText;
  18872. this.cpoteLoading[loading] = false
  18873. this.cpotetLoading[loading] = false
  18874. callback ? callback() : ''
  18875. return;
  18876. } else {
  18877. _iindex++
  18878. //对话还在继续
  18879. let _text = "";
  18880. _text = _eData.replaceAll("'", "");
  18881. if (_allText == "") {
  18882. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18883. } else {
  18884. _allText += _text;
  18885. }
  18886. _mdText = _allText + "_";
  18887. _mdText = _mdText.replace(/\\n/g, "\n");
  18888. _mdText = _mdText.replace(/\\/g, "");
  18889. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18890. //转化返回的回复流数据
  18891. if(_iindex == 10){
  18892. this.cpote[loading] = _mdText;
  18893. _iindex = 0
  18894. }
  18895. this.cpoteLoading[loading] = false
  18896. // 处理流数据
  18897. }
  18898. // this.$forceUpdate();
  18899. };
  18900. },
  18901. async aiteacherTextDetail(msg) {
  18902. let _this = this
  18903. let fileid = []
  18904. if (_this.teacherInfoData.length) {
  18905. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  18906. if(_this.teacherInfoData[i].fileid){
  18907. fileid.push(_this.teacherInfoData[i].fileid)
  18908. }else {
  18909. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  18910. if(_fileid){
  18911. _this.teacherInfoData[i].fileid = _fileid
  18912. _this.$forceUpdate();
  18913. fileid.push(_fileid)
  18914. }
  18915. }
  18916. }
  18917. }
  18918. _this.teacherTextLoading = true
  18919. _this.tteacherTextLoading = true
  18920. let sub = []
  18921. if (_this.courseTypeId.length) {
  18922. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18923. let _sid = _this.courseTypeId[i]
  18924. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18925. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18926. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18927. }
  18928. }
  18929. }
  18930. }
  18931. let mclass = []
  18932. if (_this.courseTypeId.length) {
  18933. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18934. let _sid = _this.courseTypeId[i]
  18935. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18936. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18937. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18938. }
  18939. }
  18940. }
  18941. }
  18942. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18943. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18944. let messages = `NOTICE
  18945. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  18946. 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.
  18947. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18948. Instruction: Based on the context, follow "Format example", write content.
  18949. #Context
  18950. ## 参考资料
  18951. 课程名字:${this.courseName}
  18952. ${sub.length ? '学科:' + sub.join(",") : ''}
  18953. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18954. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  18955. ## 要求
  18956. ${msg}
  18957. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  18958. let _uuid = uuidv4();
  18959. // let params = JSON.stringify({
  18960. // // "model": "Chat",
  18961. // model: 'gpt-3.5-turbo',
  18962. // temperature: 0,
  18963. // max_tokens: 4096,
  18964. // top_p: 1,
  18965. // frequency_penalty: 0,
  18966. // presence_penalty: 0,
  18967. // messages: [{
  18968. // content: messages,
  18969. // role: 'user'
  18970. // }],
  18971. // uid: _uuid,
  18972. // mind_map_question: "",
  18973. // })
  18974. let params = {
  18975. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18976. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18977. session_name: _uuid,
  18978. userId: _this.userid,
  18979. uid: _uuid,
  18980. file_ids: fileid.length ? [...fileid] : '',
  18981. }
  18982. // let params = JSON.stringify({
  18983. // message: {
  18984. // anthropic_version: "bedrock-2023-05-31",
  18985. // max_tokens: 4096,
  18986. // temperature: 0,
  18987. // top_p: 1,
  18988. // messages: [{
  18989. // "role": "user",
  18990. // "content": messages
  18991. // }] ,
  18992. // },
  18993. // uid: _uuid,
  18994. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18995. // });
  18996. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18997. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18998. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18999. console.log(response);
  19000. // let data = response.data.FunctionResponse
  19001. // if (data.choices && data.choices.length && data.choices[0].message) {
  19002. // _this.courseText = data.choices[0].message.content
  19003. // }
  19004. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19005. } else {
  19006. _this.$message.warning(response.data.FunctionResponse.result);
  19007. }
  19008. }).catch(function (error) {
  19009. _this.teacherTextLoading = false
  19010. _this.tteacherTextLoading = false
  19011. console.log(error);
  19012. });
  19013. await _this.aiteacherTextDetailgetAiContent(_uuid)
  19014. },
  19015. aiteacherTextDetailgetAiContent(_uid) {
  19016. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19017. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19018. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19019. let _allText = "";
  19020. let _mdText = "";
  19021. let _iindex = 0
  19022. _source.onmessage = _e => {
  19023. let _eData = JSON.parse(_e.data).content;
  19024. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19025. //对话已经完成
  19026. _mdText = _mdText.replace("_", "");
  19027. _source.close();
  19028. this.teacherCourseText = _mdText;
  19029. this.teacherTextLoading = false
  19030. this.tteacherTextLoading = false
  19031. this.teacherCourseTextB = false
  19032. return;
  19033. } else {
  19034. _iindex++
  19035. //对话还在继续
  19036. let _text = "";
  19037. _text = _eData.replaceAll("'", "");
  19038. if (_allText == "") {
  19039. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19040. } else {
  19041. _allText += _text;
  19042. }
  19043. _mdText = _allText + "_";
  19044. _mdText = _mdText.replace(/\\n/g, "\n");
  19045. _mdText = _mdText.replace(/\\/g, "");
  19046. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19047. //转化返回的回复流数据
  19048. if(_iindex == 10){
  19049. this.teacherCourseText = _mdText;
  19050. _iindex = 0
  19051. }
  19052. if(this.teacherTextLoading){
  19053. this.teacherTextLoading = false
  19054. }
  19055. // 处理流数据
  19056. }
  19057. // this.$forceUpdate();
  19058. };
  19059. },
  19060. async aitargetTextDetail(msg) {
  19061. let _this = this
  19062. let fileid = []
  19063. if (_this.teacherInfoData.length) {
  19064. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  19065. if(_this.teacherInfoData[i].fileid){
  19066. fileid.push(_this.teacherInfoData[i].fileid)
  19067. }else {
  19068. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  19069. if(_fileid){
  19070. _this.teacherInfoData[i].fileid = _fileid
  19071. _this.$forceUpdate();
  19072. fileid.push(_fileid)
  19073. }
  19074. }
  19075. }
  19076. }
  19077. _this.targetTextLoading = true
  19078. _this.ttargetTextLoading = true
  19079. let sub = []
  19080. if (_this.courseTypeId.length) {
  19081. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19082. let _sid = _this.courseTypeId[i]
  19083. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19084. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19085. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19086. }
  19087. }
  19088. }
  19089. }
  19090. let mclass = []
  19091. if (_this.courseTypeId.length) {
  19092. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19093. let _sid = _this.courseTypeId[i]
  19094. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19095. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19096. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19097. }
  19098. }
  19099. }
  19100. }
  19101. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19102. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19103. let messages = `NOTICE
  19104. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19105. 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.
  19106. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19107. Instruction: Based on the context, follow "Format example", write content.
  19108. #Context
  19109. ## 参考资料
  19110. 课程名字:${this.courseName}
  19111. ${sub.length ? '学科:' + sub.join(",") : ''}
  19112. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19113. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19114. ## 要求
  19115. ${msg}
  19116. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19117. let _uuid = uuidv4();
  19118. // let params = JSON.stringify({
  19119. // // "model": "Chat",
  19120. // model: 'gpt-3.5-turbo',
  19121. // temperature: 0,
  19122. // max_tokens: 4096,
  19123. // top_p: 1,
  19124. // frequency_penalty: 0,
  19125. // presence_penalty: 0,
  19126. // messages: [{
  19127. // content: messages,
  19128. // role: 'user'
  19129. // }],
  19130. // uid: _uuid,
  19131. // mind_map_question: "",
  19132. // })
  19133. let params = {
  19134. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19135. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19136. session_name: _uuid,
  19137. userId: _this.userid,
  19138. uid: _uuid,
  19139. file_ids: fileid.length ? [...fileid] : '',
  19140. }
  19141. // let params = JSON.stringify({
  19142. // message: {
  19143. // anthropic_version: "bedrock-2023-05-31",
  19144. // max_tokens: 4096,
  19145. // temperature: 0,
  19146. // top_p: 1,
  19147. // messages: [{
  19148. // "role": "user",
  19149. // "content": messages
  19150. // }] ,
  19151. // },
  19152. // uid: _uuid,
  19153. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19154. // });
  19155. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19156. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19157. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19158. console.log(response);
  19159. // let data = response.data.FunctionResponse
  19160. // if (data.choices && data.choices.length && data.choices[0].message) {
  19161. // _this.courseText = data.choices[0].message.content
  19162. // }
  19163. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19164. } else {
  19165. _this.$message.warning(response.data.FunctionResponse.result);
  19166. }
  19167. }).catch(function (error) {
  19168. _this.targetTextLoading = false
  19169. _this.ttargetTextLoading = false
  19170. console.log(error);
  19171. });
  19172. await _this.aitargetTextDetailgetAiContent(_uuid)
  19173. },
  19174. aitargetTextDetailgetAiContent(_uid) {
  19175. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19176. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19177. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19178. let _allText = "";
  19179. let _mdText = "";
  19180. let _iindex = 0
  19181. _source.onmessage = _e => {
  19182. let _eData = JSON.parse(_e.data).content;
  19183. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19184. //对话已经完成
  19185. _mdText = _mdText.replace("_", "");
  19186. _source.close();
  19187. this.targetCourseText = _mdText;
  19188. this.targetTextLoading = false
  19189. this.ttargetTextLoading = false
  19190. this.targetCourseTextB = false
  19191. return;
  19192. } else {
  19193. _iindex++
  19194. //对话还在继续
  19195. let _text = "";
  19196. _text = _eData.replaceAll("'", "");
  19197. if (_allText == "") {
  19198. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19199. } else {
  19200. _allText += _text;
  19201. }
  19202. _mdText = _allText + "_";
  19203. _mdText = _mdText.replace(/\\n/g, "\n");
  19204. _mdText = _mdText.replace(/\\/g, "");
  19205. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19206. //转化返回的回复流数据
  19207. if(_iindex == 10){
  19208. this.targetCourseText = _mdText;
  19209. _iindex = 0
  19210. }
  19211. if(this.targetTextLoading){
  19212. this.targetTextLoading = false
  19213. }
  19214. // 处理流数据
  19215. }
  19216. // this.$forceUpdate();
  19217. };
  19218. },
  19219. async aitargetTextDetail2(msg) {
  19220. let _this = this
  19221. let fileid = ['file-okF1PSRw4VYjRl81SykkxWSo'] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid
  19222. _this.targetTextLoading2 = true
  19223. _this.ttargetTextLoading2 = true
  19224. let sub = []
  19225. if (_this.courseTypeId.length) {
  19226. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19227. let _sid = _this.courseTypeId[i]
  19228. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19229. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19230. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19231. }
  19232. }
  19233. }
  19234. }
  19235. let mclass = []
  19236. if (_this.courseTypeId.length) {
  19237. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19238. let _sid = _this.courseTypeId[i]
  19239. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19240. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19241. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19242. }
  19243. }
  19244. }
  19245. }
  19246. let messages = `NOTICE
  19247. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19248. 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.
  19249. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19250. Instruction: Based on the context, follow "Format example", write content.
  19251. #Context
  19252. ## 参考资料
  19253. 课程标题:${this.courseName}
  19254. ${sub.length ? '学科:' + sub.join(",") : ''}
  19255. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19256. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  19257. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19258. ## 要求
  19259. ${msg}
  19260. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19261. let _uuid = uuidv4();
  19262. // let params = JSON.stringify({
  19263. // // "model": "Chat",
  19264. // model: 'gpt-3.5-turbo',
  19265. // temperature: 0,
  19266. // max_tokens: 4096,
  19267. // top_p: 1,
  19268. // frequency_penalty: 0,
  19269. // presence_penalty: 0,
  19270. // messages: [{
  19271. // content: messages,
  19272. // role: 'user'
  19273. // }],
  19274. // uid: _uuid,
  19275. // mind_map_question: "",
  19276. // })
  19277. let params = {
  19278. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19279. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19280. session_name: _uuid,
  19281. userId: _this.userid,
  19282. uid: _uuid,
  19283. file_ids: fileid.length ? [...fileid] : '',
  19284. }
  19285. // let params = JSON.stringify({
  19286. // message: {
  19287. // anthropic_version: "bedrock-2023-05-31",
  19288. // max_tokens: 4096,
  19289. // temperature: 0,
  19290. // top_p: 1,
  19291. // messages: [{
  19292. // "role": "user",
  19293. // "content": messages
  19294. // }] ,
  19295. // },
  19296. // uid: _uuid,
  19297. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19298. // });
  19299. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19300. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19301. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19302. console.log(response);
  19303. // let data = response.data.FunctionResponse
  19304. // if (data.choices && data.choices.length && data.choices[0].message) {
  19305. // _this.courseText = data.choices[0].message.content
  19306. // }
  19307. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19308. } else {
  19309. _this.$message.warning(response.data.FunctionResponse.result);
  19310. }
  19311. }).catch(function (error) {
  19312. _this.targetTextLoading2 = false
  19313. _this.ttargetTextLoading2 = false
  19314. console.log(error);
  19315. });
  19316. await _this.aitargetTextDetail2getAiContent(_uuid)
  19317. },
  19318. async aitargetTextDetail22(msg,msg2) {
  19319. let _this = this
  19320. let fileid = [] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid 'file-okF1PSRw4VYjRl81SykkxWSo' 目标
  19321. _this.targetTextLoading2 = true
  19322. _this.ttargetTextLoading2 = true
  19323. let sub = []
  19324. if (_this.courseTypeId.length) {
  19325. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19326. let _sid = _this.courseTypeId[i]
  19327. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19328. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19329. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19330. }
  19331. }
  19332. }
  19333. }
  19334. let mclass = []
  19335. if (_this.courseTypeId.length) {
  19336. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19337. let _sid = _this.courseTypeId[i]
  19338. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19339. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19340. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19341. }
  19342. }
  19343. }
  19344. }
  19345. let messages = `NOTICE
  19346. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19347. 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.
  19348. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19349. Instruction: Based on the context, follow "Format example", write content.
  19350. #Context
  19351. ## 参考资料
  19352. 课程标题:${this.courseName}
  19353. ${sub.length ? '学科:' + sub.join(",") : ''}
  19354. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19355. 课程目标:${msg2}
  19356. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  19357. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19358. ## 要求
  19359. ${msg}
  19360. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19361. let _uuid = uuidv4();
  19362. // let params = JSON.stringify({
  19363. // // "model": "Chat",
  19364. // model: 'gpt-3.5-turbo',
  19365. // temperature: 0,
  19366. // max_tokens: 4096,
  19367. // top_p: 1,
  19368. // frequency_penalty: 0,
  19369. // presence_penalty: 0,
  19370. // messages: [{
  19371. // content: messages,
  19372. // role: 'user'
  19373. // }],
  19374. // uid: _uuid,
  19375. // mind_map_question: "",
  19376. // })
  19377. let params = {
  19378. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19379. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19380. session_name: _uuid,
  19381. userId: _this.userid,
  19382. uid: _uuid,
  19383. file_ids: fileid.length ? [...fileid] : '',
  19384. }
  19385. // let params = JSON.stringify({
  19386. // message: {
  19387. // anthropic_version: "bedrock-2023-05-31",
  19388. // max_tokens: 4096,
  19389. // temperature: 0,
  19390. // top_p: 1,
  19391. // messages: [{
  19392. // "role": "user",
  19393. // "content": messages
  19394. // }] ,
  19395. // },
  19396. // uid: _uuid,
  19397. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19398. // });
  19399. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19400. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19401. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19402. console.log(response);
  19403. // let data = response.data.FunctionResponse
  19404. // if (data.choices && data.choices.length && data.choices[0].message) {
  19405. // _this.courseText = data.choices[0].message.content
  19406. // }
  19407. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19408. } else {
  19409. _this.$message.warning(response.data.FunctionResponse.result);
  19410. }
  19411. }).catch(function (error) {
  19412. _this.targetTextLoading2 = false
  19413. _this.ttargetTextLoading2 = false
  19414. console.log(error);
  19415. });
  19416. await _this.aitargetTextDetail2getAiContent(_uuid)
  19417. },
  19418. aitargetTextDetail2getAiContent(_uid) {
  19419. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19420. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19421. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19422. let _allText = "";
  19423. let _mdText = "";
  19424. let _iindex = 0
  19425. _source.onmessage = _e => {
  19426. let _eData = JSON.parse(_e.data).content;
  19427. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19428. //对话已经完成
  19429. _mdText = _mdText.replace("_", "");
  19430. _source.close();
  19431. this.targetCourseText2 = _mdText;
  19432. this.targetTextLoading2 = false
  19433. this.ttargetTextLoading2 = false
  19434. this.targetCourseText2B = false
  19435. return;
  19436. } else {
  19437. _iindex++
  19438. //对话还在继续
  19439. let _text = "";
  19440. _text = _eData.replaceAll("'", "");
  19441. if (_allText == "") {
  19442. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19443. } else {
  19444. _allText += _text;
  19445. }
  19446. _mdText = _allText + "_";
  19447. _mdText = _mdText.replace(/\\n/g, "\n");
  19448. _mdText = _mdText.replace(/\\/g, "");
  19449. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19450. //转化返回的回复流数据
  19451. if(_iindex == 10){
  19452. this.targetCourseText2 = _mdText;
  19453. _iindex = 0
  19454. }
  19455. if(this.targetTextLoading2){
  19456. this.targetTextLoading2 = false
  19457. }
  19458. // 处理流数据
  19459. }
  19460. // this.$forceUpdate();
  19461. };
  19462. },
  19463. async aitargetTextDetail3(msg) {
  19464. let _this = this
  19465. let fileid = ['file-okF1PSRw4VYjRl81SykkxWSo'] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid
  19466. _this.targetTextLoading2 = true
  19467. _this.ttargetTextLoading2 = true
  19468. let sub = []
  19469. if (_this.courseTypeId.length) {
  19470. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19471. let _sid = _this.courseTypeId[i]
  19472. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19473. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19474. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19475. }
  19476. }
  19477. }
  19478. }
  19479. let mclass = []
  19480. if (_this.courseTypeId.length) {
  19481. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19482. let _sid = _this.courseTypeId[i]
  19483. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19484. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19485. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19486. }
  19487. }
  19488. }
  19489. }
  19490. let messages = `${msg}`
  19491. let _uuid = uuidv4();
  19492. // let params = JSON.stringify({
  19493. // // "model": "Chat",
  19494. // model: 'gpt-3.5-turbo',
  19495. // temperature: 0,
  19496. // max_tokens: 4096,
  19497. // top_p: 1,
  19498. // frequency_penalty: 0,
  19499. // presence_penalty: 0,
  19500. // messages: [{
  19501. // content: messages,
  19502. // role: 'user'
  19503. // }],
  19504. // uid: _uuid,
  19505. // mind_map_question: "",
  19506. // })
  19507. let params = {
  19508. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19509. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19510. session_name: _uuid,
  19511. userId: _this.userid,
  19512. uid: _uuid,
  19513. file_ids: fileid.length ? [...fileid] : '',
  19514. }
  19515. // let params = JSON.stringify({
  19516. // message: {
  19517. // anthropic_version: "bedrock-2023-05-31",
  19518. // max_tokens: 4096,
  19519. // temperature: 0,
  19520. // top_p: 1,
  19521. // messages: [{
  19522. // "role": "user",
  19523. // "content": messages
  19524. // }] ,
  19525. // },
  19526. // uid: _uuid,
  19527. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19528. // });
  19529. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19530. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  19531. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19532. console.log(response);
  19533. // let data = response.data.FunctionResponse
  19534. // if (data.choices && data.choices.length && data.choices[0].message) {
  19535. // _this.courseText = data.choices[0].message.content
  19536. // }
  19537. console.log(response);
  19538. let data = response.data.FunctionResponse
  19539. // if (data.choices && data.choices.length && data.choices[0].message) {
  19540. // console.log(data.choices[0].message.content);
  19541. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  19542. // _this.$forceUpdate()
  19543. // }
  19544. if (data.message) {
  19545. console.log('返回回来的目标:',data.message);
  19546. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  19547. }
  19548. }).catch(function (error) {
  19549. _this.targetTextLoading2 = false
  19550. _this.ttargetTextLoading2 = false
  19551. console.log(error);
  19552. });
  19553. },
  19554. againEva(msg, i, k) {
  19555. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  19556. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  19557. return;
  19558. }
  19559. if (this.ruleLoading[i]) {
  19560. this.ruleLoading[i][k] = true
  19561. } else {
  19562. this.ruleLoading[i] = []
  19563. this.ruleLoading[i][k] = true
  19564. }
  19565. let message = `NOTICE
  19566. Role: 你是一个专业的项目式学习导师,你要根据<评价维度>和<维度描述>制定具体的评价细则。
  19567. 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.
  19568. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19569. Instruction: Based on the context, follow "Format example", write content.
  19570. #Context
  19571. ##要求
  19572. ${msg}
  19573. ##制定标准资料
  19574. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value}
  19575. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  19576. # Format example
  19577. == 0 星,作业内容与作业要求无关;
  19578. 1 星,没有识别问题和需求;
  19579. 2 星,问题或需求没有被清晰理解或准确识别;
  19580. 3 星,问题或需求的一部分被识别;
  19581. 4 星,问题或需求的大部分被识别;
  19582. 5 星,问题或需求都被识别。 ==
  19583. `
  19584. let params = {
  19585. // "model": "Chat",
  19586. model: "gpt-4o",
  19587. temperature: 0,
  19588. max_tokens: 4096,
  19589. top_p: 1,
  19590. frequency_penalty: 0,
  19591. presence_penalty: 0,
  19592. messages: [
  19593. {
  19594. content: message.replaceAll("\n", " ").replaceAll("*", ""),
  19595. role: "user"
  19596. }
  19597. ],
  19598. stream: false,
  19599. uid: this.userid,
  19600. mind_map_question: ""
  19601. };
  19602. this.ajax
  19603. .post("https://gpt4.cocorobo.cn/chat", params)
  19604. .then(response => {
  19605. let data = response.data.FunctionResponse;
  19606. console.log("data", data);
  19607. if (data.choices && data.choices.length && data.choices[0].message) {
  19608. let content = data.choices[0].message.content;
  19609. var regex = new RegExp('==([^=]+)==');
  19610. let match = content.match(regex);
  19611. if (match) {
  19612. content = match[1].trim().replaceAll(' ', '');
  19613. // 获取匹配到的内容并去除两端空格
  19614. console.log('contentInsideDoubleEquals', content);
  19615. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  19616. console.log("未有星级。");
  19617. this.againEva(msg, i, k)
  19618. return
  19619. }
  19620. //  return
  19621. } else {
  19622. console.log("未找到匹配的内容。");
  19623. this.againEva(msg, i, k)
  19624. return
  19625. }
  19626. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  19627. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19628. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19629. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  19630. this.$forceUpdate();
  19631. this.ruleLoading[i][k] = false
  19632. }else{
  19633. this.ruleLoading[i][k] = false
  19634. }
  19635. })
  19636. .catch(error => {
  19637. console.log(error);
  19638. this.ruleLoading[i][k] = false
  19639. });
  19640. },
  19641. async aiSearchFile(messages, callback) {
  19642. let _this = this
  19643. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19644. console.log('fileid=========',fileid)
  19645. // let params = JSON.stringify({
  19646. // // "model": "Chat",
  19647. // model: 'gpt-3.5-turbo',
  19648. // temperature: 0,
  19649. // max_tokens: 4096,
  19650. // top_p: 1,
  19651. // frequency_penalty: 0,
  19652. // presence_penalty: 0,
  19653. // messages: [{
  19654. // content: messages,
  19655. // role: 'user'
  19656. // }],
  19657. // stream: false,
  19658. // uid: this.userid,
  19659. // mind_map_question: "",
  19660. // })
  19661. // // let params = JSON.stringify({
  19662. // // message: {
  19663. // // anthropic_version: "bedrock-2023-05-31",
  19664. // // max_tokens: 4096,
  19665. // // temperature: 0,
  19666. // // top_p: 1,
  19667. // // messages: [{
  19668. // // content: messages,
  19669. // // role: 'user'
  19670. // // }], //
  19671. // // },
  19672. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19673. // // });
  19674. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19675. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19676. // console.log(response);
  19677. // let data = response.data.FunctionResponse
  19678. // if (data.choices && data.choices.length && data.choices[0].message) {
  19679. // console.log(data.choices[0].message.content);
  19680. // let dArray = JSON.parse(data.choices[0].message.content)
  19681. // _this.dArray = dArray
  19682. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19683. // for (var i = 0; i < dArray.length; i++) {
  19684. // let _task = dArray[i]
  19685. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19686. // task: _task.task,
  19687. // taskDetail: "",
  19688. // taskDetail2: _task.detail,
  19689. // taskDetail3: "",
  19690. // chapterData: [],
  19691. // toolText: "",
  19692. // toolChoose: [
  19693. // {
  19694. // tool: [],
  19695. // toolDetail: "",
  19696. // toolType: 0,
  19697. // askCount: 1,
  19698. // askTitle: "",
  19699. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19700. // },
  19701. // ],
  19702. // isShowTools: false,
  19703. // askCount: 1,
  19704. // isFold: 0,
  19705. // askTitle: "",
  19706. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19707. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19708. // homeworkList: [],
  19709. // })
  19710. // }
  19711. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19712. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19713. // _this.$forceUpdate();
  19714. // }
  19715. // // if (data.result) {
  19716. // // console.log(data.result);
  19717. // // let dArray = JSON.parse(data.result)
  19718. // // _this.dArray = dArray
  19719. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19720. // // for (var i = 0; i < dArray.length; i++) {
  19721. // // let _task = dArray[i]
  19722. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19723. // // task: _task.task,
  19724. // // taskDetail: "",
  19725. // // taskDetail2: _task.detail,
  19726. // // taskDetail3: "",
  19727. // // chapterData: [],
  19728. // // toolText: "",
  19729. // // toolChoose: [
  19730. // // {
  19731. // // tool: [],
  19732. // // toolDetail: "",
  19733. // // toolType: 0,
  19734. // // askCount: 1,
  19735. // // askTitle: "",
  19736. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19737. // // },
  19738. // // ],
  19739. // // isShowTools: false,
  19740. // // askCount: 1,
  19741. // // isFold: 1,
  19742. // // askTitle: "",
  19743. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19744. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19745. // // homeworkList: [],
  19746. // // })
  19747. // // }
  19748. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19749. // // _this.$forceUpdate();
  19750. // // }
  19751. // callback ? callback() : ''
  19752. // }).catch(function (error) {
  19753. // _this.loading = false
  19754. // console.log(error);
  19755. // });
  19756. let parm = {
  19757. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19758. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19759. session_name: uuidv4(),
  19760. userId: this.userid,
  19761. file_ids: fileid.length ? [...fileid] : '',
  19762. }
  19763. this.ajax
  19764. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19765. .then((response) => {
  19766. console.log(response);
  19767. let data = response.data.FunctionResponse
  19768. if (data.message) {
  19769. console.log(data.message);
  19770. let dArray = []
  19771. try {
  19772. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19773. } catch (error) {
  19774. // callback ? callback() : ''
  19775. console.log("error_________________" + error);
  19776. try {
  19777. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19778. let match = data.message.match(regex);
  19779. dArray = JSON.parse(match[0]);
  19780. } catch (error) {
  19781. callback ? callback() : ''
  19782. _this.$message.error("生成的json格式错误,请重新点击获取")
  19783. console.log("error_________________" + error);
  19784. }
  19785. }
  19786. for(let i = 0; i < dArray.length; i++){
  19787. let content = dArray[i].content
  19788. let name = '参考资料'+(i+1)
  19789. let md = new MarkdownIt();
  19790. let _html = content ? md.render(content) : ''
  19791. setTimeout(()=>{
  19792. if(i == (dArray.length - 1)){
  19793. _this.generate2(name, _html, i, callback)
  19794. }else {
  19795. _this.generate2(name, _html, i)
  19796. }
  19797. }, 500 * i)
  19798. }
  19799. _this.$forceUpdate();
  19800. }
  19801. })
  19802. .catch((error) => {
  19803. callback ? callback() : ''
  19804. console.log(error);
  19805. });
  19806. },
  19807. createFileid(url) {
  19808. let _this = this
  19809. return new Promise((resolve, reject) => {
  19810. try {
  19811. _this.ajax
  19812. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  19813. url: url,
  19814. })
  19815. .then((res) => {
  19816. let _data = res.data.FunctionResponse;
  19817. if (_data.result && _data.result.id) {
  19818. resolve(_data.result.id)
  19819. }
  19820. }).catch(function (error) {
  19821. resolve('')
  19822. });
  19823. }catch (e){
  19824. resolve()
  19825. }
  19826. });
  19827. }
  19828. },
  19829. beforeDestroy() {
  19830. clearTimeout(this.timer);
  19831. this.timer = null;
  19832. clearInterval(this.timer2);
  19833. this.timer2 = null;
  19834. clearInterval(this.pasteTimer);
  19835. this.pasteTimer = null;
  19836. },
  19837. beforeRouteLeave(to, from, next) {
  19838. clearTimeout(this.timer);
  19839. this.timer = null;
  19840. clearInterval(this.timer2);
  19841. this.timer2 = null;
  19842. clearInterval(this.pasteTimer);
  19843. this.pasteTimer = null;
  19844. next();
  19845. },
  19846. created() {
  19847. this.getStudent();
  19848. this.getTeacher();
  19849. this.getClass();
  19850. this.selectGrage();
  19851. this.getTemplate();
  19852. this.getTipsTemplate();
  19853. // this.selectType();
  19854. this.selectEva();
  19855. if(this.istemplate == 1){
  19856. this.isOutline = true
  19857. this.isOutline2 = true
  19858. this.courseTextBool = true
  19859. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  19860. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  19861. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  19862. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  19863. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  19864. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  19865. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  19866. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  19867. }
  19868. this.loading = false;
  19869. this.timer2 = setInterval(() => {
  19870. this.selectEva();
  19871. }, 5000);
  19872. this.pasteTimer = setInterval(() => {
  19873. this.getPaste();
  19874. }, 1000);
  19875. setTimeout(() => {
  19876. // this.selectAllType();
  19877. this.selectCourseDetail();
  19878. }, 500);
  19879. let _this = this;
  19880. window.pasteStage = function (json) {
  19881. _this.pasteStage(json);
  19882. };
  19883. window.pasteTask = function (json) {
  19884. _this.pasteTask(json);
  19885. };
  19886. },
  19887. };
  19888. </script>
  19889. <style scoped>
  19890. @media screen and (max-width: 1280px) {
  19891. .mbCss {
  19892. flex-direction: column !important;
  19893. }
  19894. .pjCss {
  19895. width: 100% !important;
  19896. }
  19897. .evaCss {
  19898. width: 100% !important;
  19899. margin-top: 10px;
  19900. }
  19901. }
  19902. .el-table>>>.even_row {
  19903. background-color: #f1f1f1 !important;
  19904. }
  19905. .dialog_diy>>>.el-dialog__header {
  19906. background: #3c3c3c !important;
  19907. padding: 15px 20px;
  19908. }
  19909. .dialog_diy>>>.el-dialog__title {
  19910. color: #fff;
  19911. }
  19912. .dialog_diy>>>.el-dialog__headerbtn {
  19913. top: 19px;
  19914. }
  19915. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  19916. color: #fff;
  19917. }
  19918. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  19919. color: #fff;
  19920. }
  19921. .dialog_diy>>>.el-dialog__body,
  19922. .dialog_diy>>>.el-dialog__footer {
  19923. background: #fafafa;
  19924. }
  19925. .dialog_diy3>>>.el-dialog__body,
  19926. .dialog_diy3>>>.el-dialog__footer {
  19927. background: #eee !important;
  19928. }
  19929. .dialog_diy3>>>.el-dialog__body {
  19930. padding: 20px 20px;
  19931. }
  19932. .dialog_diyStage>>>.el-dialog__body {
  19933. padding: 10px;
  19934. }
  19935. .source_diy>>>.el-dialog {
  19936. height: 100% !important;
  19937. margin: 0 auto !important;
  19938. }
  19939. .source_diy>>>.el-dialog__body {
  19940. height: calc(100% - 185px);
  19941. overflow: auto;
  19942. background: #e6eaf0;
  19943. }
  19944. .source_diy>>>.el-dialog__footer {
  19945. background: #e6eaf0 !important;
  19946. }
  19947. .left {
  19948. border-right: 1px solid rgb(60, 94, 143);
  19949. display: flex;
  19950. flex-direction: column;
  19951. align-items: center;
  19952. min-height: 600px;
  19953. width: 385px;
  19954. height: 80%;
  19955. }
  19956. .tips {
  19957. color: rgb(128, 128, 128);
  19958. font-size: 12px;
  19959. width: 270px;
  19960. margin: 40px;
  19961. }
  19962. .pb_content {
  19963. height: 100% !important;
  19964. /* margin: 0 20px 0 20px; */
  19965. }
  19966. .pb_content_body {
  19967. width: 100% !important;
  19968. height: 100%;
  19969. display: flex;
  19970. }
  19971. .info_solid {
  19972. width: 270px;
  19973. height: 30px;
  19974. border-left: 1px solid #bdbdbd;
  19975. margin: 10px 0px 10px 30px;
  19976. }
  19977. .info_steps {
  19978. width: 270px;
  19979. font-size: 0.875rem;
  19980. display: flex;
  19981. align-items: center;
  19982. }
  19983. .info_steps span:nth-child(1) {
  19984. width: 30px;
  19985. height: 30px;
  19986. background: rgba(0, 0, 0, 0.38);
  19987. display: block;
  19988. color: #fff;
  19989. border-radius: 40px;
  19990. text-align: center;
  19991. line-height: 30px;
  19992. }
  19993. .steps_active {
  19994. background: #3d67bc !important;
  19995. }
  19996. .info_steps span:nth-child(2) {
  19997. margin-left: 5px;
  19998. }
  19999. .right {
  20000. height: 100%;
  20001. width: 100%;
  20002. display: flex;
  20003. overflow: hidden;
  20004. flex-direction: column;
  20005. }
  20006. .leftBar{
  20007. width: 290px;
  20008. height: calc(100% - 50px);
  20009. overflow: auto;
  20010. border-radius: 5px;
  20011. margin: 25px auto;
  20012. box-sizing: border-box;
  20013. margin-right: 10px;
  20014. }
  20015. .basic_box {
  20016. margin: 0 auto;
  20017. position: relative;
  20018. padding: 0 20px 0 20px;
  20019. }
  20020. .basic_box_success {
  20021. width: 100%;
  20022. min-height: 455px;
  20023. padding: 50px 0;
  20024. position: relative;
  20025. text-align: center;
  20026. border-bottom: 1px solid #bfbfbf;
  20027. box-sizing: border-box;
  20028. display: flex;
  20029. align-items: center;
  20030. flex-direction: column;
  20031. justify-content: center;
  20032. }
  20033. .info_title {
  20034. font-size: 1.5em;
  20035. margin-right: 25px;
  20036. /* margin: 20px 30px 20px 30px; */
  20037. }
  20038. .bInfo_title {
  20039. text-align: left;
  20040. margin: 10px 0;
  20041. }
  20042. .small_title {
  20043. font-size: 14px;
  20044. line-height: 40px;
  20045. }
  20046. .chapter_beizhu {
  20047. font-size: 12px;
  20048. font-weight: bold;
  20049. float: right;
  20050. color: rgb(128, 128, 128);
  20051. margin-top: 5px;
  20052. }
  20053. .chapter_uploadBox1 {
  20054. text-align: left;
  20055. background-color: rgb(242, 242, 242);
  20056. width: 100%;
  20057. height: 67px;
  20058. padding: 0px 15px;
  20059. border-radius: 8px;
  20060. overflow: hidden;
  20061. font-size: 16px;
  20062. box-sizing: border-box;
  20063. position: relative;
  20064. }
  20065. .chapter_add {
  20066. width: 100%;
  20067. height: 32px;
  20068. margin-top: 15px;
  20069. cursor: pointer;
  20070. }
  20071. .chapter_add_l {
  20072. margin-left: 5px;
  20073. width: 30px;
  20074. height: 30px;
  20075. float: left;
  20076. border: 1px solid #aaa;
  20077. color: #aaa;
  20078. border-radius: 50%;
  20079. font-size: 25px;
  20080. text-align: center;
  20081. }
  20082. .chapter_add_r {
  20083. font-size: 18px;
  20084. height: 40px;
  20085. line-height: 30px;
  20086. text-indent: 10px;
  20087. color: #aaa;
  20088. }
  20089. .chapter_add_r span {
  20090. font-size: 12px;
  20091. color: rgb(204, 204, 204);
  20092. }
  20093. .chapter_add_input {
  20094. display: none;
  20095. }
  20096. .line {
  20097. width: 85%;
  20098. margin: 0 auto;
  20099. border-top: 1px solid #e5e5e5;
  20100. margin-top: 20px;
  20101. }
  20102. .info_btnBox {
  20103. width: calc(100%);
  20104. display: flex;
  20105. justify-content: center;
  20106. height: 80px;
  20107. align-items: center;
  20108. background: #fff;
  20109. margin: 0 auto;
  20110. border-top: 2px solid rgb(228, 232, 237);
  20111. box-sizing: border-box;
  20112. }
  20113. .info_btnBox2 {
  20114. width: calc(100%);
  20115. display: flex;
  20116. justify-content: center;
  20117. height: 20px;
  20118. align-items: center;
  20119. background: #fff;
  20120. margin: 0 auto;
  20121. border-top: 2px solid rgb(228, 232, 237);
  20122. box-sizing: border-box;
  20123. overflow: hidden;
  20124. cursor: pointer;
  20125. }
  20126. .info_btnBox3 {
  20127. width: calc(100%);
  20128. display: flex;
  20129. justify-content: flex-end;
  20130. padding: 0 20px;
  20131. height: 60px;
  20132. align-items: center;
  20133. background: unset;
  20134. margin: 0 auto;
  20135. /* border-top: 1px solid rgb(228, 232, 237); */
  20136. box-sizing: border-box;
  20137. overflow: hidden;
  20138. cursor: pointer;
  20139. background: #fff;
  20140. border-radius: 10px;
  20141. }
  20142. .info_btn+.info_btn {
  20143. margin-left: 15px;
  20144. }
  20145. .info_btn,
  20146. .teacherWord {
  20147. color: #fff;
  20148. background-color: #0f7eff;
  20149. padding: 8px 24px;
  20150. font-size: 0.9375rem;
  20151. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  20152. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  20153. min-width: 64px;
  20154. font-weight: 500;
  20155. border-radius: 4px;
  20156. box-sizing: border-box;
  20157. border: none;
  20158. cursor: pointer;
  20159. }
  20160. .teacherWord {
  20161. width: 105px !important;
  20162. text-align: center !important;
  20163. line-height: 36px !important;
  20164. padding: 0 !important;
  20165. font-size: 14px !important;
  20166. margin: 10px 0 !important;
  20167. }
  20168. .template_box {
  20169. display: flex;
  20170. flex-wrap: wrap;
  20171. }
  20172. .wordTeacher {
  20173. display: flex;
  20174. flex-direction: column;
  20175. width: 100px;
  20176. height: 100px;
  20177. text-align: center;
  20178. font-size: 13px;
  20179. margin: 0 20px 20px 0;
  20180. background: #f0f4fa;
  20181. position: relative;
  20182. border-radius: 5px;
  20183. align-items: center;
  20184. justify-content: center;
  20185. border: 1px solid #cad1dc;
  20186. color: #0e1e33;
  20187. /* padding: 25px 0px; */
  20188. cursor: pointer;
  20189. }
  20190. .wordTeacher::after {
  20191. content: "";
  20192. display: block;
  20193. position: absolute;
  20194. width: 15px;
  20195. height: 15px;
  20196. right: 10px;
  20197. top: 10px;
  20198. background-image: url(../../../assets/icon/new/choose_a.png);
  20199. background-size: 100% 100%;
  20200. }
  20201. .wordTeacherA::after {
  20202. background-image: url(../../../assets/icon/new/choose_b.png);
  20203. }
  20204. .wordTeacher:nth-child(5n) {
  20205. margin-right: 0px;
  20206. }
  20207. .wordPic {
  20208. margin: 0 auto;
  20209. width: 30px;
  20210. height: 30px;
  20211. cursor: pointer;
  20212. }
  20213. .deleteWord {
  20214. width: 22px;
  20215. height: 22px;
  20216. position: absolute;
  20217. right: 5px;
  20218. top: -15px;
  20219. cursor: pointer;
  20220. display: none;
  20221. z-index: 999;
  20222. }
  20223. .wordPic>img,
  20224. .deleteWord>img,
  20225. .addToolImg>img {
  20226. width: 100%;
  20227. height: 100%;
  20228. }
  20229. .info_btn:hover {
  20230. background-color: #4f7cd5 !important;
  20231. }
  20232. .cru_selectBox {
  20233. display: flex;
  20234. margin: 15px 0;
  20235. flex-wrap: nowrap;
  20236. white-space: nowrap;
  20237. overflow: auto;
  20238. position: relative;
  20239. height: 40px;
  20240. max-width: calc(100% - 175px);
  20241. }
  20242. .cru_selectBox::-webkit-scrollbar {
  20243. /*滚动条整体样式*/
  20244. width: 6px;
  20245. /*高宽分别对应横竖滚动条的尺寸*/
  20246. height: 6px;
  20247. }
  20248. /*定义滚动条轨道 内阴影+圆角*/
  20249. .cru_selectBox::-webkit-scrollbar-track {
  20250. border-radius: 10px;
  20251. background-color: #eee;
  20252. }
  20253. /*定义滑块 内阴影+圆角*/
  20254. .cru_selectBox::-webkit-scrollbar-thumb {
  20255. border-radius: 10px;
  20256. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  20257. background-color: rgba(0, 0, 0, 0.1);
  20258. }
  20259. .cru_line {
  20260. position: absolute;
  20261. bottom: 0px;
  20262. transition: all 0.5s;
  20263. left: 0px;
  20264. width: 50px;
  20265. height: 4px;
  20266. left: 10px;
  20267. border-radius: 2px;
  20268. background: #3681fc;
  20269. }
  20270. .cru_select {
  20271. font-size: 18px;
  20272. margin-right: 20px;
  20273. margin-left: 5px;
  20274. cursor: pointer;
  20275. color: #0e1e33;
  20276. }
  20277. .cru_select:hover {
  20278. color: #3681fc !important;
  20279. }
  20280. .cru_selected {
  20281. color: #3681fc !important;
  20282. font-weight: bold;
  20283. }
  20284. .chapter_box {
  20285. margin-top: 10px;
  20286. width: 100%;
  20287. padding: 10px 20px;
  20288. background: #fff;
  20289. border-radius: 8px;
  20290. box-sizing: border-box;
  20291. }
  20292. .chapter_contentbox {
  20293. display: flex;
  20294. align-items: center;
  20295. /* margin-top: 15px; */
  20296. }
  20297. .chapter_contentbox .cc_title {
  20298. margin: 0px;
  20299. color: black;
  20300. display: block;
  20301. white-space: nowrap;
  20302. overflow: hidden;
  20303. text-overflow: ellipsis;
  20304. margin-right: 20px;
  20305. font-size: 18px;
  20306. height: 20px;
  20307. line-height: 22px;
  20308. min-width: fit-content;
  20309. display: flex;
  20310. }
  20311. .chapter_contentbox .cc_title::before {
  20312. content: "";
  20313. height: 100%;
  20314. width: 3px;
  20315. background: #3681fc;
  20316. border-radius: 3px;
  20317. opacity: 1;
  20318. display: block;
  20319. margin-right: 10px;
  20320. }
  20321. .chapter_contentbox .cc_input {
  20322. width: 100%;
  20323. display: flex;
  20324. }
  20325. .show_taskD {
  20326. min-width: fit-content;
  20327. margin-left: 10px;
  20328. display: flex;
  20329. align-items: center;
  20330. font-size: 14px;
  20331. cursor: pointer;
  20332. color: #717c8d;
  20333. }
  20334. .show_taskD>img {
  20335. width: 15px;
  20336. margin-right: 5px;
  20337. transition: 0.2s all;
  20338. transform: rotate(-90deg);
  20339. }
  20340. .show_taskD.show>img {
  20341. transform: rotate(0deg);
  20342. }
  20343. .show_toolD {
  20344. min-width: fit-content;
  20345. margin-left: 10px;
  20346. display: flex;
  20347. align-items: center;
  20348. font-size: 14px;
  20349. cursor: pointer;
  20350. color: #717c8d;
  20351. /* position: absolute;
  20352. right: 45px;
  20353. top: 5px; */
  20354. }
  20355. .show_toolD>img {
  20356. width: 15px;
  20357. margin-right: 5px;
  20358. transition: 0.2s all;
  20359. transform: rotate(-90deg);
  20360. }
  20361. .show_toolD.show>img {
  20362. transform: rotate(0deg);
  20363. }
  20364. .remove {
  20365. background-image: url("../../../assets/icon/new/delete_u.png");
  20366. cursor: pointer;
  20367. opacity: 0.5;
  20368. width: 30px;
  20369. min-width: 30px;
  20370. height: 30px;
  20371. background-size: 100% 100%;
  20372. background-repeat: no-repeat;
  20373. margin-left: 10px;
  20374. }
  20375. .remove1 {
  20376. background-image: url("../../../assets/remove1.png");
  20377. background-repeat: no-repeat;
  20378. background-position: 5px 10px;
  20379. width: 40px;
  20380. height: 50px;
  20381. cursor: pointer;
  20382. margin-left: 10px;
  20383. }
  20384. .binfo_input {
  20385. width: 100%;
  20386. margin: 0;
  20387. padding: 12px 14px;
  20388. display: block;
  20389. min-width: 0;
  20390. outline: none;
  20391. box-sizing: border-box;
  20392. background: none;
  20393. border: none;
  20394. border-radius: 4px;
  20395. background: #fff;
  20396. font-size: 16px;
  20397. resize: none;
  20398. font-family: "Microsoft YaHei";
  20399. min-height: 48px;
  20400. /* border: 1px solid #3682fc00; */
  20401. border: 1.5px solid #cad1dc;
  20402. }
  20403. .binfo_textarea {
  20404. border: 1.5px solid #cad1dc;
  20405. font-size: 16px;
  20406. resize: none;
  20407. /* background: #f6f6f6; */
  20408. font-family: "Microsoft YaHei";
  20409. }
  20410. .binfo_input:focus-visible {
  20411. border: 1.5px solid #3681fc !important;
  20412. }
  20413. .time {
  20414. display: flex;
  20415. margin: 35px 0 80px 0;
  20416. }
  20417. .chapter_btnbox {
  20418. width: 160px;
  20419. border-radius: 5px;
  20420. border: 2px dashed gray;
  20421. display: flex;
  20422. padding: 8px 50px;
  20423. align-items: center;
  20424. justify-content: center;
  20425. margin: 30px auto 0;
  20426. cursor: pointer;
  20427. }
  20428. .icon_add {
  20429. position: relative;
  20430. width: 24px;
  20431. padding-top: 20px;
  20432. border-radius: 100%;
  20433. border-width: 2px;
  20434. border-style: solid;
  20435. border-color: gray;
  20436. }
  20437. .icon_add i:nth-child(1) {
  20438. position: absolute;
  20439. left: 50%;
  20440. top: 50%;
  20441. height: 60%;
  20442. transform: translate(-50%, -50%);
  20443. border-width: 1px;
  20444. border-style: solid;
  20445. border-color: inherit;
  20446. }
  20447. .icon_add i:nth-child(2) {
  20448. position: absolute;
  20449. top: 50%;
  20450. left: 50%;
  20451. width: 60%;
  20452. transform: translate(-50%, -50%);
  20453. border-width: 1px;
  20454. border-style: solid;
  20455. border-color: inherit;
  20456. }
  20457. .chapter_btn_w {
  20458. font-size: 0.9375rem;
  20459. font-weight: bold;
  20460. color: gray;
  20461. margin-left: 20px;
  20462. }
  20463. .disUoloadSty>>>.el-icon-plus {
  20464. display: none !important;
  20465. /* 上传按钮隐藏 */
  20466. }
  20467. .imgLeft {
  20468. margin: 15px 0;
  20469. }
  20470. .add_info_box {
  20471. margin: 0 0 0 auto;
  20472. display: flex;
  20473. flex-wrap: wrap;
  20474. }
  20475. .add_info_box button {
  20476. margin: 0 5px 10px 0;
  20477. }
  20478. .add_info_box2 {
  20479. display: flex;
  20480. align-items: center;
  20481. flex-wrap: wrap;
  20482. }
  20483. .add_info_box2::after {
  20484. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  20485. color: red;
  20486. font-size: 14px;
  20487. margin-bottom: 10px;
  20488. }
  20489. .add_chapters_box {
  20490. text-align: left;
  20491. background-color: #fff;
  20492. width: 100%;
  20493. border-radius: 4px;
  20494. font-size: 16px;
  20495. box-sizing: border-box;
  20496. position: relative;
  20497. padding: 0 15px;
  20498. height: auto;
  20499. overflow-y: auto;
  20500. overflow-x: hidden;
  20501. border: 1px solid #cad1dc;
  20502. }
  20503. .add_chapters_box.add_c_none {
  20504. display: flex;
  20505. justify-content: center;
  20506. align-items: center;
  20507. padding: 15px;
  20508. }
  20509. .add_c_none>img {
  20510. width: 25px;
  20511. }
  20512. .add_chapters_box.add_c_none>span {
  20513. font-size: 14px;
  20514. font-weight: 400;
  20515. margin: 0 0 5px 5px;
  20516. }
  20517. .homework_box {
  20518. display: flex;
  20519. align-items: flex-start;
  20520. flex-wrap: wrap;
  20521. margin: 15px 0 0 0;
  20522. flex-direction: column;
  20523. align-content: flex-start;
  20524. }
  20525. .course_homework {
  20526. display: flex;
  20527. justify-content: center;
  20528. flex-direction: row;
  20529. align-items: center;
  20530. margin: 0 10px 0 0;
  20531. }
  20532. .course_homework>>>.el-input__inner {
  20533. width: 140px;
  20534. margin-left: 15px;
  20535. }
  20536. .chapter_upload_move {
  20537. position: relative;
  20538. background-color: #fff;
  20539. position: absolute;
  20540. width: 100%;
  20541. top: 0px;
  20542. left: 0px;
  20543. border: 1px solid #eee;
  20544. border-radius: 5px;
  20545. transition: width 2s;
  20546. -moz-transition: width 2s;
  20547. -webkit-transition: width 2s;
  20548. -o-transition: width 2s;
  20549. }
  20550. .chapter_upload_l_i {
  20551. background-image: url("../../../assets/icon.png");
  20552. background-position: 3px -165px;
  20553. width: 30px;
  20554. height: 30px;
  20555. margin: 10px auto 0 auto;
  20556. }
  20557. .course_input_box {
  20558. display: flex;
  20559. margin-right: 20px;
  20560. width: 100%;
  20561. align-items: center;
  20562. position: relative;
  20563. }
  20564. .course_input_box>.binfo_input {
  20565. width: calc(100% - 0 - 200px - 20px);
  20566. margin: 0 10px;
  20567. }
  20568. .bb_courseIcon {
  20569. width: 57px;
  20570. height: 45px;
  20571. background: #f0f4fa;
  20572. border-radius: 5px 0px 0px 5px;
  20573. display: flex;
  20574. align-items: center;
  20575. justify-content: center;
  20576. border-right: 1.5px solid rgb(202, 209, 220);
  20577. box-sizing: border-box;
  20578. position: absolute;
  20579. left: 1.5px;
  20580. }
  20581. .bb_courseIcon>img {
  20582. width: 25px;
  20583. height: auto;
  20584. }
  20585. .big_box {
  20586. /* margin-top: 20px; */
  20587. display: flex;
  20588. justify-content: space-between;
  20589. /* border-bottom: 1px solid #E0E2ED; */
  20590. }
  20591. .left_first {
  20592. display: flex;
  20593. flex-direction: column;
  20594. flex-wrap: nowrap;
  20595. width: calc(100% - 310px);
  20596. padding: 20px;
  20597. box-sizing: border-box;
  20598. background: #fff;
  20599. border-radius: 5px;
  20600. }
  20601. .right_first {
  20602. width: 300px;
  20603. display: flex;
  20604. align-items: center;
  20605. justify-content: center;
  20606. /* border-left: 1px solid #E0E2ED; */
  20607. box-sizing: border-box;
  20608. padding: 20px;
  20609. flex-direction: column;
  20610. background: #fff;
  20611. border-radius: 5px;
  20612. }
  20613. .ai_box {
  20614. width: 204px;
  20615. display: flex;
  20616. justify-content: flex-end;
  20617. margin-bottom: 15px;
  20618. }
  20619. .ai_content {
  20620. display: flex;
  20621. align-items: center;
  20622. font-size: 14px;
  20623. padding: 7px 20px;
  20624. box-sizing: border-box;
  20625. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  20626. border-radius: 12px;
  20627. font-weight: 700;
  20628. cursor: pointer;
  20629. }
  20630. .ai_content>img {
  20631. width: 40px;
  20632. margin-right: 5px;
  20633. }
  20634. .c_info_title {
  20635. padding: 15px 0 15px 0;
  20636. font-size: 16px;
  20637. font-weight: bold;
  20638. margin: 0 0 0 20px;
  20639. box-sizing: border-box;
  20640. display: flex;
  20641. align-items: center;
  20642. line-height: 20px;
  20643. }
  20644. .c_info_title::before {
  20645. content: "";
  20646. display: block;
  20647. width: 3px;
  20648. height: 20px;
  20649. background: #0061ff;
  20650. border-radius: 3px;
  20651. margin: 0 5px 0 0;
  20652. }
  20653. .right_title {
  20654. height: 30px;
  20655. padding: 15px 0 15px 20px;
  20656. border-bottom: 1px solid #f2f2f2;
  20657. font-size: 1.5em;
  20658. font-weight: bold;
  20659. color: #0f7eff;
  20660. margin: 0 auto;
  20661. }
  20662. .people {
  20663. border: 1px solid rgb(229 229 229);
  20664. /* height: 495px; */
  20665. height: 350px;
  20666. border-radius: 5px;
  20667. width: 100%;
  20668. overflow: auto;
  20669. }
  20670. .people_top {
  20671. display: flex;
  20672. width: 100%;
  20673. /* justify-content: space-between; */
  20674. /* align-items: center; */
  20675. flex-direction: column;
  20676. padding: 10px 10px 0;
  20677. box-sizing: border-box;
  20678. }
  20679. .people_nav,
  20680. .people_top_right {
  20681. /* padding: 20px 0 0 20px; */
  20682. }
  20683. .people_top_right {
  20684. height: 40px;
  20685. margin-bottom: 10px;
  20686. }
  20687. .people_search {
  20688. display: flex;
  20689. position: relative;
  20690. }
  20691. .people_search>>>.el-input__inner {
  20692. /* height: 25px; */
  20693. width: 100%;
  20694. }
  20695. .search_img {
  20696. width: 20px;
  20697. height: 20px;
  20698. position: absolute;
  20699. right: 10px;
  20700. top: 50%;
  20701. transform: translateY(-50%);
  20702. }
  20703. .search_img>img {
  20704. width: 100%;
  20705. height: 100%;
  20706. }
  20707. .people_name {
  20708. display: flex;
  20709. justify-content: flex-start;
  20710. padding: 20px 10px;
  20711. flex-direction: column;
  20712. flex-wrap: wrap;
  20713. }
  20714. .p_box {
  20715. position: relative;
  20716. }
  20717. .people_name>>>.el-checkbox {
  20718. width: 100%;
  20719. display: flex;
  20720. align-items: center;
  20721. margin-bottom: 10px;
  20722. }
  20723. .people_name>>>.el-checkbox__label {
  20724. text-overflow: ellipsis;
  20725. overflow: hidden;
  20726. width: calc(100%);
  20727. }
  20728. .people_name2>>>.el-checkbox__label {
  20729. width: calc(100% - 130px);
  20730. }
  20731. .inviteCode {
  20732. position: absolute;
  20733. right: 30px;
  20734. color: #237ade;
  20735. top: 0;
  20736. cursor: pointer;
  20737. font-size: 13px;
  20738. }
  20739. .noneInvite {
  20740. color: #a8a8a8;
  20741. }
  20742. .inviteImg {
  20743. position: absolute;
  20744. right: 5px;
  20745. top: 0;
  20746. width: 20px;
  20747. }
  20748. .right_img {
  20749. width: 150px;
  20750. height: 150px;
  20751. margin: 0 auto;
  20752. }
  20753. .right_img>img {
  20754. width: 100%;
  20755. height: 100%;
  20756. }
  20757. .number {
  20758. margin-top: 20px;
  20759. color: #4aa6ff;
  20760. text-decoration: underline;
  20761. }
  20762. .success_button {
  20763. display: flex;
  20764. text-align: center;
  20765. margin: 5% 0 auto;
  20766. flex-direction: row;
  20767. justify-content: center;
  20768. }
  20769. .look_course {
  20770. margin-right: 40px;
  20771. background: #3d67bc;
  20772. width: 200px;
  20773. height: 35px;
  20774. line-height: 35px;
  20775. color: #fff;
  20776. text-align: center;
  20777. font-size: 14px;
  20778. border-radius: 5px;
  20779. cursor: pointer;
  20780. }
  20781. .attend_others {
  20782. width: 250px;
  20783. background: #4fb13c;
  20784. height: 35px;
  20785. line-height: 35px;
  20786. color: #fff;
  20787. text-align: center;
  20788. font-size: 14px;
  20789. border-radius: 5px;
  20790. cursor: pointer;
  20791. }
  20792. .dialog_diy2>>>.el-dialog__body {
  20793. text-align: center;
  20794. }
  20795. .write_togother {
  20796. position: absolute;
  20797. right: 45px;
  20798. display: flex;
  20799. top: 5%;
  20800. }
  20801. .write_people {
  20802. font-size: 14px;
  20803. line-height: 50px;
  20804. padding-right: 10px;
  20805. }
  20806. .end_write {
  20807. background: #3d67bc;
  20808. color: #fff;
  20809. width: 100px;
  20810. height: 35px;
  20811. line-height: 35px;
  20812. text-align: center;
  20813. font-size: 14px;
  20814. border-radius: 5px;
  20815. cursor: pointer;
  20816. }
  20817. .chapter_upload+.chapter_upload {
  20818. /* margin-top: 15px; */
  20819. border-top: 1px solid #e7ebf1;
  20820. }
  20821. .chapter_upload {
  20822. height: 45px;
  20823. position: relative;
  20824. display: flex;
  20825. align-items: center;
  20826. width: 100%;
  20827. min-height: 45px;
  20828. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  20829. /* border-radius: 4px; */
  20830. /* overflow: hidden; */
  20831. box-sizing: border-box;
  20832. }
  20833. .chapter_upload_drag {
  20834. position: absolute;
  20835. cursor: pointer;
  20836. width: 16px;
  20837. height: 16px;
  20838. left: -9px;
  20839. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  20840. background-size: 100% 100%;
  20841. z-index: 10;
  20842. display: none;
  20843. }
  20844. .isNavStage>.chapter_upload_drag {
  20845. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  20846. }
  20847. .chapter_upload_t {
  20848. background-color: #fff;
  20849. position: absolute;
  20850. height: 100%;
  20851. top: 0px;
  20852. left: 0px;
  20853. box-sizing: border-box;
  20854. }
  20855. .chapter_upload_o {
  20856. width: 100%;
  20857. height: 100%;
  20858. position: relative;
  20859. z-index: 1;
  20860. }
  20861. .chapter_upload_ic {
  20862. margin: 0 15px 0px auto;
  20863. display: flex;
  20864. align-items: center;
  20865. }
  20866. .chapter_upload_ic_l {
  20867. width: 50px;
  20868. height: 50px;
  20869. float: left;
  20870. }
  20871. .chapter_upload_ic_l div {
  20872. width: 30px;
  20873. height: 35px;
  20874. background: url("../../../assets/icon/icon.png");
  20875. }
  20876. .chapter_upload_ic_edit {
  20877. height: 100%;
  20878. display: flex;
  20879. align-items: center;
  20880. cursor: pointer;
  20881. margin: 0 10px 0 0;
  20882. }
  20883. .chapter_upload_ic_edit div {
  20884. width: 18px;
  20885. height: 18px;
  20886. background-image: url("../../../assets/icon/new/edit_u.png");
  20887. background-size: 100% 100%;
  20888. }
  20889. .chapter_upload_ic_check {
  20890. height: 100%;
  20891. display: flex;
  20892. align-items: center;
  20893. cursor: pointer;
  20894. margin: 0 10px 0 0;
  20895. }
  20896. .chapter_upload_ic_check div {
  20897. width: 18px;
  20898. height: 18px;
  20899. background-image: url("../../../assets/icon/course/lookeye.svg");
  20900. background-size: 100% 100%;
  20901. }
  20902. .chapter_upload_ic_r {
  20903. height: 100%;
  20904. display: flex;
  20905. align-items: center;
  20906. cursor: pointer;
  20907. }
  20908. .chapter_upload_ic_r div {
  20909. width: 18px;
  20910. height: 18px;
  20911. background-image: url("../../../assets/icon/new/delete_u.png");
  20912. background-size: 100% 100%;
  20913. }
  20914. .chapter_upload_n {
  20915. display: flex;
  20916. text-indent: 10px;
  20917. text-decoration: none;
  20918. text-overflow: ellipsis;
  20919. white-space: nowrap;
  20920. overflow: hidden;
  20921. width: 55%;
  20922. margin-left: 10px;
  20923. cursor: pointer;
  20924. margin-top: 2px;
  20925. align-items: center;
  20926. }
  20927. .chapter_upload_l_i2,
  20928. .chapter_upload_l_i3,
  20929. .chapter_upload_l_i8,
  20930. .chapter_upload_l_i6,
  20931. .chapter_upload_l_i12,
  20932. .chapter_upload_l_i14,
  20933. .chapter_upload_l_i13 {
  20934. width: 15px;
  20935. height: 15px;
  20936. background-size: 100% 100%;
  20937. }
  20938. .chapter_upload_l_i2 {
  20939. background-image: url("../../../assets/icon/new/u_word.png");
  20940. }
  20941. .chapter_upload_l_i3 {
  20942. background-image: url("../../../assets/icon/new/u_video.png");
  20943. }
  20944. .chapter_upload_l_i8 {
  20945. background-image: url("../../../assets/icon/new/u_url.png");
  20946. }
  20947. .chapter_upload_l_i14 {
  20948. background-image: url("../../../assets/icon/new/u_source.png");
  20949. }
  20950. .chapter_upload_l_i6 {
  20951. background-image: url("../../../assets/icon/new/u_picture.png");
  20952. }
  20953. .chapter_upload_l_i12 {
  20954. background-image: url("../../../assets/icon/new/u_word.png");
  20955. }
  20956. .chapter_upload_l_i13 {
  20957. background-image: url("../../../assets/icon/new/u_img.png");
  20958. }
  20959. .chapter_upload_noSee {
  20960. background-image: url("../../../assets/icon/new/u_noUpload.png");
  20961. width: 18px;
  20962. height: 18px;
  20963. background-size: 100% 100%;
  20964. display: block;
  20965. margin-right: 10px;
  20966. }
  20967. .chapter_upload_ud {
  20968. display: flex;
  20969. flex-direction: row;
  20970. justify-content: center;
  20971. margin: 0 10px 0 0;
  20972. }
  20973. .chapter_upload_ud>.chapter_upload_up {
  20974. margin-bottom: 0;
  20975. margin-right: 10px;
  20976. }
  20977. .chapter_upload_down,
  20978. .chapter_upload_up {
  20979. width: 20px;
  20980. height: 20px;
  20981. background: #e4eaf2;
  20982. cursor: pointer;
  20983. margin: 0 auto;
  20984. border-radius: 5px;
  20985. display: flex;
  20986. justify-content: center;
  20987. align-items: center;
  20988. }
  20989. .chapter_upload_up::after,
  20990. .chapter_upload_down::after {
  20991. content: "";
  20992. background-image: url("../../../assets/icon/new/downBtn.png");
  20993. width: 13px;
  20994. height: 13px;
  20995. background-size: 100% 100%;
  20996. display: block;
  20997. }
  20998. .chapter_upload_up::after {
  20999. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  21000. }
  21001. .chapter_upload_up {
  21002. margin-bottom: 5px;
  21003. }
  21004. .chapter_upload_ud2 {
  21005. display: flex;
  21006. flex-direction: row;
  21007. justify-content: center;
  21008. margin: 0 10px 0 0;
  21009. }
  21010. .chapter_upload_ud2>.chapter_upload_up2 {
  21011. margin-bottom: 0;
  21012. margin-right: 10px;
  21013. }
  21014. .chapter_upload_down2,
  21015. .chapter_upload_up2 {
  21016. cursor: pointer;
  21017. margin: 0 auto;
  21018. border-radius: 5px;
  21019. display: flex;
  21020. justify-content: center;
  21021. align-items: center;
  21022. color: #717c8d;
  21023. font-size: 14px;
  21024. }
  21025. .chapter_upload_up2 {
  21026. margin-right: 10px;
  21027. }
  21028. .chapter_upload_up2::before,
  21029. .chapter_upload_down2::before {
  21030. content: "";
  21031. background-image: url("../../../assets/icon/new/c_down.png");
  21032. width: 14px;
  21033. height: 14px;
  21034. background-size: 100% 100%;
  21035. display: block;
  21036. margin-right: 5px;
  21037. }
  21038. .chapter_upload_up2::before {
  21039. background-image: url("../../../assets/icon/new/c_up.png") !important;
  21040. }
  21041. .addWordStyle {
  21042. display: flex;
  21043. flex-direction: row;
  21044. justify-content: flex-start;
  21045. overflow-x: auto;
  21046. white-space: nowrap;
  21047. flex-wrap: wrap;
  21048. }
  21049. /* table 样式 */
  21050. .cont>>>table {
  21051. border-top: 1px solid #ccc;
  21052. border-left: 1px solid #ccc;
  21053. }
  21054. .cont>>>table td,
  21055. .cont>>>table th {
  21056. border-bottom: 1px solid #ccc;
  21057. border-right: 1px solid #ccc;
  21058. /* padding: 20px 5px; */
  21059. padding: 5px 10px;
  21060. max-width: 0px;
  21061. height: 30px;
  21062. vertical-align: baseline;
  21063. }
  21064. .cont>>>table th {
  21065. border-bottom: 2px solid #ccc;
  21066. text-align: center;
  21067. }
  21068. /* blockquote 样式 */
  21069. .cont>>>blockquote {
  21070. display: block;
  21071. border-left: 8px solid #d0e5f2;
  21072. padding: 5px 10px;
  21073. margin: 10px 0;
  21074. line-height: 1.4;
  21075. font-size: 100%;
  21076. background-color: #f1f1f1;
  21077. }
  21078. /* code 样式 */
  21079. .cont>>>code {
  21080. display: inline-block;
  21081. /* *display: inline; */
  21082. zoom: 1;
  21083. background-color: #f1f1f1;
  21084. border-radius: 3px;
  21085. padding: 3px 5px;
  21086. margin: 0 3px;
  21087. }
  21088. .cont>>>pre code {
  21089. display: block;
  21090. }
  21091. /* ul ol 样式 */
  21092. .cont>>>ul,
  21093. ol {
  21094. margin: 10px 0 10px 20px;
  21095. }
  21096. .wordbox {
  21097. display: flex;
  21098. flex-wrap: wrap;
  21099. cursor: pointer;
  21100. width: 100%;
  21101. }
  21102. .checkword {
  21103. width: 22px;
  21104. height: 22px;
  21105. margin: 10px auto 0;
  21106. cursor: pointer;
  21107. }
  21108. .checkword img {
  21109. width: 100%;
  21110. }
  21111. .stepBg {
  21112. display: flex;
  21113. justify-content: space-between;
  21114. align-items: center;
  21115. background: #fff;
  21116. width: calc(100%);
  21117. margin: 0 auto;
  21118. }
  21119. .stepBorder {
  21120. height: 3px !important;
  21121. background: #cad1dc;
  21122. width: 100px !important;
  21123. margin: 0 15px !important;
  21124. position: relative;
  21125. }
  21126. .border-active {
  21127. background: #3681fc !important;
  21128. }
  21129. .border-active::before,
  21130. .border-active::after {
  21131. border-color: #3681fc !important;
  21132. }
  21133. .stepBorder::before,
  21134. .stepBorder::after {
  21135. content: "";
  21136. width: 9px;
  21137. height: 9px;
  21138. background: #ffffff;
  21139. opacity: 1;
  21140. border: 2px solid #acb4bf;
  21141. display: block;
  21142. box-sizing: border-box;
  21143. border-radius: 50%;
  21144. position: absolute;
  21145. top: 50%;
  21146. transform: translateY(-50%);
  21147. }
  21148. .stepBorder::after {
  21149. right: -9px;
  21150. }
  21151. .stepTop {
  21152. width: 100%;
  21153. /* border-radius: 10px; */
  21154. display: flex;
  21155. justify-content: center;
  21156. align-items: center;
  21157. flex-wrap: nowrap;
  21158. background: #fff;
  21159. /* top: 18%; */
  21160. height: 80px;
  21161. border-bottom: 2px solid rgb(228, 232, 237);
  21162. box-sizing: border-box;
  21163. }
  21164. .stepTop2 {
  21165. width: 100%;
  21166. /* border-radius: 10px; */
  21167. display: flex;
  21168. justify-content: center;
  21169. align-items: center;
  21170. flex-wrap: nowrap;
  21171. background: #fff;
  21172. /* top: 18%; */
  21173. height: 20px;
  21174. border-bottom: 2px solid rgb(228, 232, 237);
  21175. box-sizing: border-box;
  21176. overflow: hidden;
  21177. cursor: pointer;
  21178. }
  21179. .stepTop>div img {
  21180. width: 100%;
  21181. }
  21182. .stepTop>div {
  21183. height: 50px;
  21184. width: 180px;
  21185. cursor: pointer;
  21186. margin: 10px 0;
  21187. border-radius: 10px;
  21188. }
  21189. .first,
  21190. .second,
  21191. .third,
  21192. .four {
  21193. background: #3681fc;
  21194. height: 90px;
  21195. color: #fff;
  21196. display: flex;
  21197. flex-direction: row;
  21198. align-items: center;
  21199. justify-content: center;
  21200. }
  21201. .first>div:nth-child(1),
  21202. .second>div:nth-child(1),
  21203. .third>div:nth-child(1),
  21204. .four>div:nth-child(1) {
  21205. margin: 5px 10px 0 0;
  21206. width: 2rem;
  21207. }
  21208. .firstNo,
  21209. .secondNo,
  21210. .thirdNo,
  21211. .fourNo {
  21212. background: #e7e7e7;
  21213. color: #adadad;
  21214. display: flex;
  21215. flex-direction: row;
  21216. align-items: center;
  21217. justify-content: center;
  21218. }
  21219. .firstNo>div:nth-child(1),
  21220. .secondNo>div:nth-child(1),
  21221. .thirdNo>div:nth-child(1),
  21222. .fourNo>div:nth-child(1) {
  21223. margin: 5px 10px 0 0;
  21224. width: 2rem;
  21225. }
  21226. .uploadWidth>>>.el-upload {
  21227. width: 60px;
  21228. height: 60px;
  21229. position: relative;
  21230. }
  21231. .addPeople {
  21232. background: #fa6060;
  21233. width: 150px;
  21234. height: 40px;
  21235. color: #fff;
  21236. border-radius: 5px;
  21237. text-align: center;
  21238. line-height: 40px;
  21239. font-size: 14px;
  21240. cursor: pointer;
  21241. }
  21242. .kcImg {
  21243. width: 60px;
  21244. margin-left: 10px;
  21245. }
  21246. .zyImg {
  21247. width: 55px;
  21248. margin: 0 10px;
  21249. }
  21250. .deleteZy {
  21251. width: 20px;
  21252. position: absolute;
  21253. top: 5px;
  21254. right: 5px;
  21255. cursor: pointer;
  21256. }
  21257. .kcImg>img,
  21258. .zyImg>img,
  21259. .deleteZy>img {
  21260. width: 100%;
  21261. height: 100%;
  21262. }
  21263. .zyBox {
  21264. display: flex;
  21265. flex-direction: row;
  21266. align-items: center;
  21267. background: #67d37d;
  21268. color: #fff;
  21269. width: 210px;
  21270. margin: 20px 20px 0 0;
  21271. border-radius: 10px;
  21272. height: 70px;
  21273. position: relative;
  21274. }
  21275. .upCss {
  21276. display: flex;
  21277. flex-direction: row;
  21278. justify-content: flex-start;
  21279. }
  21280. .upCss>>>.el-icon-plus {
  21281. position: none !important;
  21282. width: 200px;
  21283. height: 100px;
  21284. display: flex;
  21285. flex-wrap: nowrap;
  21286. flex-direction: column;
  21287. align-items: center;
  21288. justify-content: center;
  21289. border: 1px dashed #ccc;
  21290. min-width: 78px;
  21291. min-height: 100px;
  21292. z-index: 999;
  21293. }
  21294. .upCss>>>.el-upload-list__item-name {
  21295. width: 100px;
  21296. white-space: nowrap;
  21297. overflow: hidden;
  21298. text-overflow: ellipsis;
  21299. }
  21300. .upCss>>>.el-upload-list__item .el-icon-close {
  21301. font-size: 20px;
  21302. z-index: 9999;
  21303. }
  21304. .addStageImg {
  21305. min-width: 20px;
  21306. min-height: 20px;
  21307. width: 20px;
  21308. height: 20px;
  21309. cursor: pointer;
  21310. }
  21311. .addHW {
  21312. width: 28px;
  21313. height: 28px;
  21314. cursor: pointer;
  21315. }
  21316. .addStageImg>img,
  21317. .addHW>img {
  21318. width: 100%;
  21319. height: 100%;
  21320. }
  21321. .addNewPP>>>.el-dialog__body {
  21322. padding: 5px 20px;
  21323. }
  21324. .addNewPP>>>.el-dialog {
  21325. margin-top: 5vh !important;
  21326. }
  21327. .addNewPP2>>>.el-dialog__body {
  21328. padding: 5px 0;
  21329. }
  21330. .addNewPP2>>>.el-dialog {
  21331. margin-top: 5vh !important;
  21332. }
  21333. .isHeight {
  21334. height: 680px;
  21335. }
  21336. .toolChoose {
  21337. display: flex;
  21338. /* width: 100%; */
  21339. flex-direction: row;
  21340. flex-wrap: wrap;
  21341. }
  21342. .tool,
  21343. .isToolChoose {
  21344. display: flex;
  21345. flex-direction: column;
  21346. flex-wrap: nowrap;
  21347. width: fit-content;
  21348. margin: 10px 0 10px 0;
  21349. align-items: center;
  21350. border: 2px solid #dbdbdb00;
  21351. padding: 10px 20px;
  21352. border-radius: 5px;
  21353. cursor: pointer;
  21354. /* box-shadow: 0 0 2px 0px #dedede; */
  21355. position: relative;
  21356. box-sizing: border-box;
  21357. }
  21358. .tool:hover {
  21359. border: 2px solid #a5c7ff;
  21360. }
  21361. .tool:hover>.noCTool {
  21362. display: block;
  21363. opacity: 0.5;
  21364. }
  21365. .isToolChoose {
  21366. border: 2px solid #438aff !important;
  21367. box-shadow: 0 0 2px 0px #438aff;
  21368. opacity: 1 !important;
  21369. }
  21370. .isCTool,
  21371. .noCTool {
  21372. width: 30px;
  21373. height: 30px;
  21374. position: absolute;
  21375. top: -4px;
  21376. right: -4px;
  21377. }
  21378. .noCTool {
  21379. display: none;
  21380. }
  21381. .isCTool>img,
  21382. .noCTool>img {
  21383. width: 100%;
  21384. height: 100%;
  21385. }
  21386. .tool+.tool {
  21387. margin-right: 10px;
  21388. }
  21389. .whiteBIcon {
  21390. width: 80px;
  21391. cursor: pointer;
  21392. display: flex;
  21393. flex-direction: column;
  21394. flex-wrap: nowrap;
  21395. align-items: center;
  21396. font-size: 14px;
  21397. }
  21398. .whiteBIcon>img,
  21399. .toolIcon>img,
  21400. .arrow>img {
  21401. width: 100%;
  21402. height: 100%;
  21403. }
  21404. .check img {
  21405. width: 20px;
  21406. height: 20px;
  21407. }
  21408. .whiteBIcon>img {
  21409. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  21410. border-radius: 15px;
  21411. }
  21412. .whiteBIcon>div:nth-child(2) {
  21413. height: 20px;
  21414. line-height: 20px;
  21415. }
  21416. .check {
  21417. /* width: 20px;
  21418. height: 20px; */
  21419. cursor: pointer;
  21420. margin: 10px 0 0;
  21421. }
  21422. .checkDiv {
  21423. display: flex;
  21424. align-items: center;
  21425. }
  21426. .checkDiv span {
  21427. margin-left: 5px;
  21428. color: #858585;
  21429. }
  21430. .customWidth>>>.el-dialog {
  21431. min-width: 600px !important;
  21432. }
  21433. .CollaborativeCss {
  21434. width: 100%;
  21435. display: flex;
  21436. justify-content: center;
  21437. align-items: center;
  21438. box-sizing: border-box;
  21439. padding: 10px 0;
  21440. cursor: pointer;
  21441. }
  21442. .CollaborativeCss >>> .el-tooltip {
  21443. overflow: hidden;
  21444. white-space: nowrap;
  21445. text-overflow: ellipsis;
  21446. }
  21447. .CollaborativeCss2 {
  21448. background: #e0eafb;
  21449. color: #3681fc;
  21450. font-weight: 700;
  21451. border-radius: 5px;
  21452. }
  21453. .a_addBox {
  21454. margin: 10px 0;
  21455. background: #fff;
  21456. padding: 15px;
  21457. /* max-height: 600px; */
  21458. overflow: auto;
  21459. }
  21460. .a_add_box {
  21461. border-bottom: 2px solid #eee;
  21462. padding-bottom: 25px;
  21463. }
  21464. .a_add_head {
  21465. display: flex;
  21466. align-items: center;
  21467. justify-content: space-between;
  21468. margin: 10px 0 0 0;
  21469. font-size: 18px;
  21470. }
  21471. .a_add_checkType {
  21472. margin-top: 10px;
  21473. display: flex;
  21474. font-size: 14px;
  21475. align-items: center;
  21476. }
  21477. .a_add_checkType span {
  21478. box-sizing: border-box;
  21479. padding: 0 0 5px 0;
  21480. cursor: pointer;
  21481. }
  21482. .a_add_checkType span+span {
  21483. margin-left: 10px;
  21484. }
  21485. .a_add_checkType .active {
  21486. border-bottom: 2px solid #409eff;
  21487. color: #409eff;
  21488. }
  21489. .a_add_head .a_add_head_input {
  21490. /* width: 540px; */
  21491. width: 100%;
  21492. }
  21493. .a_add_head .a_add_head_div {
  21494. display: flex;
  21495. align-items: center;
  21496. justify-content: space-between;
  21497. }
  21498. .a_add_body {
  21499. display: flex;
  21500. /* align-items: center; */
  21501. align-items: flex-end;
  21502. }
  21503. .a_add_input {
  21504. display: flex;
  21505. align-items: center;
  21506. flex-wrap: wrap;
  21507. }
  21508. .a_add_input_choice {
  21509. flex-direction: column;
  21510. margin-right: 10px;
  21511. }
  21512. .a_add_input_choice>>>.el-radio {
  21513. display: flex;
  21514. align-items: center;
  21515. flex-direction: row-reverse;
  21516. margin: 30px 0 0 0;
  21517. position: relative;
  21518. }
  21519. .a_add_input_choice>>>.el-checkbox {
  21520. display: flex;
  21521. align-items: center;
  21522. flex-direction: row-reverse;
  21523. margin: 30px 0 0 0;
  21524. position: relative;
  21525. }
  21526. .width100 {
  21527. width: 100%;
  21528. }
  21529. .a_add_input .a_add_persent {
  21530. width: 100%;
  21531. }
  21532. .a_add_persent_div {
  21533. width: 100%;
  21534. display: flex;
  21535. align-items: center;
  21536. }
  21537. .a_add_persent_div span {
  21538. margin: 5px 0;
  21539. }
  21540. .a_add_persent_div span:nth-child(1) {
  21541. width: 30%;
  21542. }
  21543. .a_add_persent_div span:nth-child(2) {
  21544. width: 7%;
  21545. }
  21546. .a_add_persent_div span:nth-child(3) {
  21547. width: 40%;
  21548. }
  21549. .a_add_body_div {
  21550. display: flex;
  21551. align-items: center;
  21552. justify-content: center;
  21553. /* flex-direction: column; */
  21554. position: absolute;
  21555. right: -20px;
  21556. transform: translateX(100%);
  21557. }
  21558. .a_add_body_div>>>.el-button--primary {
  21559. background: #466b99;
  21560. border: none;
  21561. }
  21562. .all_choose {
  21563. display: flex;
  21564. flex-direction: row;
  21565. align-items: flex-start;
  21566. width: 100%;
  21567. }
  21568. .all_choose+.all_choose {
  21569. /* margin-top: 10px */
  21570. }
  21571. .all_choose>span {
  21572. min-width: fit-content;
  21573. display: block;
  21574. white-space: nowrap;
  21575. overflow: hidden;
  21576. text-overflow: ellipsis;
  21577. margin-right: 20px;
  21578. font-weight: bold;
  21579. font-size: 14px;
  21580. }
  21581. .all_choose>>>.el-checkbox-group {
  21582. display: flex;
  21583. flex-direction: row;
  21584. width: 100%;
  21585. flex-wrap: wrap;
  21586. align-content: center;
  21587. justify-content: flex-start;
  21588. align-items: center;
  21589. margin-top: 3px;
  21590. }
  21591. .all_choose>.el-checkbox-group>>>.el-checkbox {
  21592. margin-bottom: 10px;
  21593. display: flex;
  21594. flex-direction: row;
  21595. align-items: center;
  21596. margin-right: 10px;
  21597. }
  21598. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  21599. min-width: 80px;
  21600. overflow: hidden;
  21601. width: 80px;
  21602. text-overflow: ellipsis;
  21603. white-space: nowrap;
  21604. }
  21605. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  21606. width: auto;
  21607. }
  21608. .choose>div:nth-child(3)>span {
  21609. /* letter-spacing: 0 !important; */
  21610. }
  21611. .choose {
  21612. display: flex;
  21613. flex-direction: column;
  21614. flex-wrap: nowrap;
  21615. height: 100%;
  21616. justify-content: space-evenly;
  21617. align-items: flex-start;
  21618. }
  21619. .both {
  21620. display: flex;
  21621. flex-direction: row;
  21622. flex-wrap: wrap;
  21623. width: 100%;
  21624. align-items: center;
  21625. justify-content: flex-start;
  21626. margin: 15px 0;
  21627. }
  21628. .notice>>>.el-dialog {
  21629. width: 500px !important;
  21630. text-align: center;
  21631. }
  21632. .notice>>>.el-button {
  21633. margin-top: 20px;
  21634. }
  21635. .whiteBg {
  21636. /* background: #fff; */
  21637. border-radius: 10px;
  21638. }
  21639. .wb_j_box {
  21640. display: flex;
  21641. width: 100%;
  21642. padding: 0 20px 0;
  21643. box-sizing: border-box;
  21644. }
  21645. .wb_j_box_content {
  21646. width: calc(100% - 55% - 100px);
  21647. display: flex;
  21648. align-items: center;
  21649. }
  21650. .wb_j_box_p_box {
  21651. max-width: calc(100% - 200px);
  21652. word-break: break-all;
  21653. overflow: hidden;
  21654. margin: 0 0 0 10px;
  21655. font-size: 14px;
  21656. color: #6e6e6e;
  21657. z-index: 999;
  21658. }
  21659. .chooseWho {
  21660. display: flex;
  21661. width: 410px;
  21662. flex-direction: row;
  21663. flex-wrap: nowrap;
  21664. justify-content: space-between;
  21665. padding-bottom: 10px;
  21666. }
  21667. .chooseWho>div {
  21668. cursor: pointer;
  21669. padding-bottom: 10px;
  21670. font-weight: bold;
  21671. }
  21672. .isChooseActive {
  21673. color: #3e88f4;
  21674. border-bottom: 2px solid #2f80f3;
  21675. }
  21676. .toolSort {
  21677. display: flex;
  21678. flex-direction: row;
  21679. flex-wrap: wrap;
  21680. justify-content: flex-start;
  21681. align-items: flex-start;
  21682. }
  21683. .toolSort>div {
  21684. margin-right: 10px;
  21685. }
  21686. .tools {
  21687. width: 100%;
  21688. display: flex;
  21689. flex-direction: column;
  21690. flex-wrap: nowrap;
  21691. align-items: flex-start;
  21692. }
  21693. .leftTools,
  21694. .rightTools {
  21695. width: 50%;
  21696. }
  21697. .leftTools+.leftTools {
  21698. border-top: 1px solid #dbdbdb;
  21699. padding-top: 30px;
  21700. }
  21701. .rightTools {
  21702. display: flex;
  21703. flex-direction: row;
  21704. flex-wrap: nowrap;
  21705. justify-content: space-around;
  21706. }
  21707. .firstToolList {
  21708. display: flex;
  21709. flex-direction: column;
  21710. flex-wrap: nowrap;
  21711. align-items: center;
  21712. }
  21713. .iconList {
  21714. display: flex;
  21715. flex-direction: row;
  21716. flex-wrap: wrap;
  21717. justify-content: flex-start;
  21718. align-items: center;
  21719. margin: 20px 0 5px 0;
  21720. width: 240px;
  21721. min-width: 240px;
  21722. }
  21723. .iconTool {
  21724. display: flex;
  21725. flex-direction: column;
  21726. flex-wrap: nowrap;
  21727. align-items: center;
  21728. justify-content: flex-start;
  21729. margin: 15px 10px;
  21730. }
  21731. .toolIcon {
  21732. width: 50px;
  21733. }
  21734. .taskBorder {
  21735. /* border: 1px solid #CAD1DC; */
  21736. border-radius: 10px;
  21737. margin-top: 10px;
  21738. min-height: 670px;
  21739. position: relative;
  21740. background: #fff;
  21741. padding: 20px;
  21742. overflow: hidden;
  21743. box-sizing: border-box;
  21744. }
  21745. .smallTaskBorder {
  21746. height: 405px;
  21747. min-height: 405px !important;
  21748. overflow: hidden;
  21749. }
  21750. /* .taskBorder>div {
  21751. padding: 30px 30px 10px;
  21752. } */
  21753. .addTaskBorder {
  21754. /* border: 2px solid #5E9AFC; */
  21755. border-radius: 8px;
  21756. margin-top: 10px;
  21757. cursor: pointer;
  21758. /* height: 50px;
  21759. line-height: 50px; */
  21760. background: #fff;
  21761. padding: 15px 0;
  21762. display: flex;
  21763. align-items: center;
  21764. justify-content: center;
  21765. }
  21766. /* .addTaskBorder>div {
  21767. margin: 0 auto;
  21768. display: flex;
  21769. align-items: center;
  21770. justify-content: center;
  21771. }
  21772. .addTaskBorder>div>img {
  21773. width: 20px;
  21774. }
  21775. .addTaskBorder>div>span {
  21776. font-size: 16px;
  21777. margin-left: 10px;
  21778. color: #5E9AFC;
  21779. } */
  21780. .funBlock {
  21781. display: flex;
  21782. padding: 15px 0;
  21783. flex-direction: row;
  21784. justify-content: center;
  21785. align-items: center;
  21786. position: absolute;
  21787. right: 0;
  21788. bottom: 0;
  21789. background: #fff;
  21790. width: 100%;
  21791. height: 60px;
  21792. z-index: 9;
  21793. }
  21794. .fold {
  21795. display: flex;
  21796. margin: 0 20px;
  21797. flex-direction: row;
  21798. align-items: center;
  21799. cursor: pointer;
  21800. color: #2b7bff;
  21801. }
  21802. .arrow {
  21803. margin-right: 8px;
  21804. width: 16px;
  21805. height: 16px;
  21806. min-width: 16px;
  21807. min-height: 16px;
  21808. background-size: 100% 100%;
  21809. display: block;
  21810. background-image: url(../../../assets/icon/new/u_up.png);
  21811. /* border-left: 7px solid transparent;
  21812. border-bottom: 7px solid #717C8D;
  21813. border-top: 0px solid transparent;
  21814. border-right: 7px solid transparent; */
  21815. /* box-sizing: border-box; */
  21816. transition: all 0.3s;
  21817. }
  21818. .arrowZ {
  21819. transform: rotate(180deg);
  21820. }
  21821. .addToolFun {
  21822. display: flex;
  21823. width: 150px;
  21824. flex-direction: row;
  21825. align-items: center;
  21826. justify-content: center;
  21827. border: 2px dashed #cad1dc;
  21828. border-radius: 5px;
  21829. height: 50px;
  21830. margin: 35px auto 0;
  21831. cursor: pointer;
  21832. }
  21833. .addToolFun2 {
  21834. display: flex;
  21835. width: 150px;
  21836. border: 2px dashed #cad1dc;
  21837. flex-direction: row;
  21838. align-items: center;
  21839. justify-content: center;
  21840. border-radius: 5px;
  21841. height: 50px;
  21842. margin: 0 auto 0;
  21843. cursor: pointer;
  21844. }
  21845. .addToolFun2>div,
  21846. .addToolFun>div {
  21847. display: flex;
  21848. line-height: 50px;
  21849. }
  21850. .addToolImg {
  21851. width: 20px;
  21852. height: 20px;
  21853. margin-right: 10px;
  21854. }
  21855. .addToolsDia>>>.el-dialog__body {
  21856. padding: 20px;
  21857. }
  21858. .addToolsDia>>>.el-dialog__body>.toolChoose {
  21859. padding: 0;
  21860. }
  21861. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  21862. padding: 0;
  21863. border-bottom: none;
  21864. margin-bottom: 0;
  21865. }
  21866. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  21867. width: 100%;
  21868. }
  21869. .lineCss>>>.el-form-item__label {
  21870. width: auto !important;
  21871. }
  21872. .lineCss>>>.el-form-item__content {
  21873. margin-left: 50px !important;
  21874. }
  21875. .newSteps {
  21876. display: flex;
  21877. width: 100% !important;
  21878. /* height: 80px; */
  21879. cursor: pointer;
  21880. margin: 10px 0;
  21881. border-radius: 10px;
  21882. flex-direction: row;
  21883. align-content: center;
  21884. justify-content: center;
  21885. align-items: center;
  21886. margin: 0 !important;
  21887. }
  21888. /* 评价样式 */
  21889. .elist_css {
  21890. padding-bottom: 75px !important;
  21891. }
  21892. .elist_title {
  21893. margin-bottom: 10px;
  21894. }
  21895. .elist_input {
  21896. width: 100%;
  21897. }
  21898. .elist_input_box {
  21899. display: flex;
  21900. align-items: center;
  21901. flex-wrap: wrap;
  21902. }
  21903. .elist_input_box+.elist_input_box {
  21904. margin-top: 30px;
  21905. }
  21906. .elist_input .elist_input_box input {
  21907. font: inherit;
  21908. color: currentColor;
  21909. width: 100%;
  21910. /* max-width: calc(100% - 385px); */
  21911. max-width: calc(100% - 150px);
  21912. padding: 8px 14px;
  21913. display: block;
  21914. min-width: 0;
  21915. outline: none;
  21916. border: 1px solid rgba(0, 0, 0, 0.23);
  21917. border-radius: 4px;
  21918. box-sizing: border-box;
  21919. background: #fff;
  21920. margin: 0 20px 0 0;
  21921. }
  21922. .elist_input .elist_input_box span {
  21923. height: 36px;
  21924. line-height: 36px;
  21925. color: rgb(82, 82, 82);
  21926. min-width: 80px;
  21927. }
  21928. .elist_input .elist_input_box .remove {
  21929. height: 20px;
  21930. width: 20px;
  21931. min-height: 20px;
  21932. min-width: 20px;
  21933. background-size: 100% 100%;
  21934. background-position: unset;
  21935. margin-left: 5px;
  21936. }
  21937. .elist_input_box>>>.el-rate {
  21938. display: flex;
  21939. height: 36px;
  21940. align-items: center;
  21941. }
  21942. .elist_input_box .elist_inptu_text {
  21943. width: 100%;
  21944. display: flex;
  21945. align-items: center;
  21946. margin-top: 10px;
  21947. }
  21948. .elist_input_box .elist_inptu_text input {
  21949. /* width: 500px; */
  21950. width: 100%;
  21951. max-width: unset;
  21952. }
  21953. .elist_input_box>>>.el-rate__icon {
  21954. font-size: 24px;
  21955. }
  21956. .elist_btn {
  21957. margin-top: 10px;
  21958. }
  21959. .lineTitle {
  21960. /* margin-top: 15px; */
  21961. width: 110px;
  21962. font-size: 16px;
  21963. display: flex;
  21964. align-items: center;
  21965. line-height: 20px;
  21966. }
  21967. .lineTitle::before {
  21968. content: "";
  21969. display: block;
  21970. width: 3px;
  21971. height: 20px;
  21972. background: #0061ff;
  21973. border-radius: 3px;
  21974. margin: 0 5px 0 0;
  21975. }
  21976. .clineTitle::before {
  21977. content: "";
  21978. display: block;
  21979. min-width: 10px;
  21980. width: 10px;
  21981. height: 10px;
  21982. background: #0061ff;
  21983. border-radius: 50%;
  21984. margin: 0 5px 0 0;
  21985. }
  21986. .courseTop {
  21987. display: flex;
  21988. flex-direction: row;
  21989. justify-content: space-between;
  21990. align-items: center;
  21991. width: calc(100% - 40px);
  21992. margin: 0 auto;
  21993. padding: 10px 0;
  21994. }
  21995. .stepsNav {
  21996. display: flex;
  21997. flex-direction: row;
  21998. justify-content: flex-start;
  21999. align-items: center;
  22000. }
  22001. .stepsWord {
  22002. font-size: 18px;
  22003. color: #fff;
  22004. font-weight: bold;
  22005. margin-left: auto;
  22006. background: rgb(15, 126, 255);
  22007. border-radius: 5px;
  22008. padding: 3px 25px;
  22009. box-sizing: border-box;
  22010. }
  22011. .stepBox {
  22012. width: calc(100% - 40px);
  22013. height: calc(100% - 50px);
  22014. overflow: hidden;
  22015. border-radius: 5px;
  22016. margin: 0 auto;
  22017. }
  22018. .rightBox {
  22019. width: calc(100%);
  22020. background: #f0f2f5;
  22021. /* border-radius: 10px; */
  22022. overflow: auto;
  22023. height: calc(100% - 150px);
  22024. margin: 0 auto;
  22025. position: relative;
  22026. box-sizing: border-box;
  22027. }
  22028. .e_add_top {
  22029. display: flex;
  22030. justify-content: space-between;
  22031. background: #fff;
  22032. position: absolute;
  22033. right: 20px;
  22034. height: 50px;
  22035. align-items: center;
  22036. }
  22037. .e_add_title2 {
  22038. display: flex;
  22039. align-items: center;
  22040. }
  22041. .e_add_title2 span {
  22042. width: 40px;
  22043. }
  22044. .e_add_title {
  22045. display: flex;
  22046. align-items: center;
  22047. color: #b8b8b8;
  22048. font-size: 18px;
  22049. position: relative;
  22050. height: 40px;
  22051. }
  22052. .e_add_title span {
  22053. margin-right: 10px;
  22054. }
  22055. .e_add_title .el_input {
  22056. width: 300px;
  22057. }
  22058. .e_add_title>>>.el-input__inner {
  22059. width: 400px;
  22060. }
  22061. .e_add_btn {}
  22062. .e_add_content {
  22063. display: flex;
  22064. width: 100%;
  22065. }
  22066. .e_add_list {
  22067. background: #fff;
  22068. height: 500px;
  22069. width: 210px;
  22070. position: relative;
  22071. margin: 15px 5px 0 0;
  22072. flex-shrink: 0;
  22073. display: flex;
  22074. flex-direction: column;
  22075. }
  22076. .e_add_list_title {
  22077. font-size: 20px;
  22078. width: 100%;
  22079. box-sizing: border-box;
  22080. padding: 15px 40px;
  22081. text-align: center;
  22082. border-bottom: 1px solid #eaeaea;
  22083. position: relative;
  22084. display: flex;
  22085. align-items: center;
  22086. justify-content: center;
  22087. height: 57px;
  22088. background: #f6f6f6;
  22089. }
  22090. .e_add_list_title span {
  22091. overflow: hidden;
  22092. white-space: nowrap;
  22093. text-overflow: ellipsis;
  22094. }
  22095. .e_add_list_title img {
  22096. position: absolute;
  22097. right: 15px;
  22098. width: 25px;
  22099. cursor: pointer;
  22100. top: 50%;
  22101. transform: translateY(-50%);
  22102. }
  22103. .e_add_list_body {
  22104. height: calc(100% - 187px);
  22105. overflow: auto;
  22106. }
  22107. .e_add_list_child {
  22108. width: 100%;
  22109. display: flex;
  22110. align-items: center;
  22111. justify-content: center;
  22112. position: relative;
  22113. box-sizing: border-box;
  22114. padding: 15px 40px;
  22115. text-align: center;
  22116. }
  22117. .e_add_list_child span {
  22118. overflow: hidden;
  22119. white-space: nowrap;
  22120. text-overflow: ellipsis;
  22121. cursor: pointer;
  22122. }
  22123. .e_add_list_child img {
  22124. position: absolute;
  22125. right: 10px;
  22126. width: 21px;
  22127. cursor: pointer;
  22128. top: 50%;
  22129. transform: translateY(-50%);
  22130. }
  22131. .e_add_list_child+.e_add_list_child {
  22132. border-top: 1px solid #eaeaea;
  22133. }
  22134. .e_add_list_child .active {
  22135. color: #409eff;
  22136. }
  22137. .e_add_list_btn {
  22138. position: absolute;
  22139. bottom: 0;
  22140. height: 50px;
  22141. background: rgb(120, 120, 254);
  22142. width: 100%;
  22143. color: #fff;
  22144. font-size: 16px;
  22145. text-align: center;
  22146. line-height: 50px;
  22147. cursor: pointer;
  22148. }
  22149. .e_add_list_detail {
  22150. position: absolute;
  22151. bottom: 0;
  22152. height: 130px;
  22153. background: rgb(120, 120, 254);
  22154. width: 100%;
  22155. color: #fff;
  22156. font-size: 16px;
  22157. display: flex;
  22158. align-items: center;
  22159. justify-content: center;
  22160. }
  22161. .e_add_list_detail textarea {
  22162. height: 90%;
  22163. width: 95%;
  22164. border: none;
  22165. resize: none;
  22166. outline: none;
  22167. padding: 5px;
  22168. box-sizing: border-box;
  22169. }
  22170. .e_add_list_pbox {
  22171. width: 100%;
  22172. }
  22173. .e_add_list_pbox_title {
  22174. height: 50px;
  22175. background: #fff;
  22176. display: flex;
  22177. align-items: center;
  22178. width: 100%;
  22179. box-sizing: border-box;
  22180. padding: 0 20px;
  22181. flex-direction: row;
  22182. flex-wrap: wrap;
  22183. }
  22184. .type_title {
  22185. font-size: 18px;
  22186. font-weight: 700;
  22187. }
  22188. .type_content {
  22189. font-size: 16px;
  22190. margin-left: 30px;
  22191. }
  22192. .type_content span+span {
  22193. margin-left: 20px;
  22194. }
  22195. .type_content span {
  22196. cursor: pointer;
  22197. padding-bottom: 5px;
  22198. box-sizing: border-box;
  22199. }
  22200. .type_content .active {
  22201. color: #409eff;
  22202. border-bottom: 2px solid #409eff;
  22203. }
  22204. .e_add_list_pbox_content {
  22205. height: calc(100% - 50px);
  22206. display: flex;
  22207. align-items: center;
  22208. width: 100%;
  22209. background: #fff;
  22210. }
  22211. .mbCss {
  22212. width: 100%;
  22213. display: flex;
  22214. flex-direction: row;
  22215. flex-wrap: nowrap;
  22216. align-content: center;
  22217. align-items: flex-start;
  22218. justify-content: flex-start;
  22219. }
  22220. .pjCss {
  22221. /* width: 42%; */
  22222. width: calc(100% - 55%);
  22223. display: flex;
  22224. flex-direction: column;
  22225. flex-wrap: nowrap;
  22226. align-items: flex-start;
  22227. }
  22228. .e_box {
  22229. /* display: flex; */
  22230. flex-wrap: wrap;
  22231. max-height: 500px;
  22232. align-items: flex-start;
  22233. overflow: auto;
  22234. width: 100%;
  22235. }
  22236. .e_card {
  22237. border: 1px solid #ccc;
  22238. background: #fff;
  22239. margin-right: 20px;
  22240. width: 270px;
  22241. display: flex;
  22242. flex-direction: column;
  22243. align-items: center;
  22244. border-radius: 5px;
  22245. margin-top: 10px;
  22246. text-align: center;
  22247. }
  22248. .e_card_picture {
  22249. margin: 10px 0;
  22250. }
  22251. .e_card_picture>img {
  22252. width: 50px;
  22253. }
  22254. .e_card_name {
  22255. width: 100%;
  22256. padding: 0 10px;
  22257. box-sizing: border-box;
  22258. margin-bottom: 10px;
  22259. overflow: hidden;
  22260. text-overflow: ellipsis;
  22261. white-space: nowrap;
  22262. }
  22263. .e_card_time {
  22264. width: 100%;
  22265. padding: 0 10px;
  22266. box-sizing: border-box;
  22267. font-size: 15px;
  22268. color: #c3c3c3;
  22269. margin-bottom: 10px;
  22270. }
  22271. .e_card_btn {
  22272. height: 40px;
  22273. display: flex;
  22274. align-items: center;
  22275. width: 100%;
  22276. background: rgb(244, 244, 244);
  22277. }
  22278. .e_card_btn:hover {
  22279. background: rgb(221 221 221);
  22280. }
  22281. .e_card_btn span {
  22282. flex: 1 1 auto;
  22283. text-align: center;
  22284. cursor: pointer;
  22285. }
  22286. .addEva {
  22287. border: 1px solid #ccc;
  22288. background: #fff;
  22289. margin-right: 20px;
  22290. width: 270px;
  22291. height: 149px;
  22292. display: flex;
  22293. flex-direction: column;
  22294. align-items: center;
  22295. border-radius: 5px;
  22296. margin-top: 10px;
  22297. text-align: center;
  22298. cursor: pointer;
  22299. justify-content: center;
  22300. }
  22301. .addEva>img {
  22302. width: 50px;
  22303. object-fit: cover;
  22304. }
  22305. .uploadFm {
  22306. border: 1px dashed #ccc;
  22307. width: 100%;
  22308. height: 140px;
  22309. position: relative;
  22310. cursor: pointer;
  22311. display: flex;
  22312. flex-direction: column;
  22313. justify-content: center;
  22314. align-items: center;
  22315. font-size: 14px;
  22316. color: #6e6e6e;
  22317. position: relative;
  22318. }
  22319. .cover_p {
  22320. width: 100% !important;
  22321. height: 100%;
  22322. object-fit: cover;
  22323. }
  22324. .uploadFm2:hover .cover_mask {
  22325. display: flex !important;
  22326. }
  22327. .cover_mask {
  22328. display: none;
  22329. width: 100%;
  22330. height: 100%;
  22331. position: absolute;
  22332. background: #00000054;
  22333. align-items: center;
  22334. justify-content: center;
  22335. flex-direction: column;
  22336. }
  22337. .cover_mask>img {
  22338. width: 30px;
  22339. }
  22340. .cover_mask>span {
  22341. color: #fff;
  22342. font-size: 12px;
  22343. }
  22344. .uploadFm>img {
  22345. width: 50px;
  22346. }
  22347. .fileCss {
  22348. width: 100%;
  22349. display: flex;
  22350. flex-direction: row;
  22351. flex-wrap: nowrap;
  22352. justify-content: space-around;
  22353. align-items: center;
  22354. padding-top: 15px;
  22355. }
  22356. .fileCss>div {
  22357. display: flex;
  22358. flex-direction: column;
  22359. align-items: center;
  22360. }
  22361. .fileCss .spanName {
  22362. margin-top: 10px;
  22363. }
  22364. .sysPicBox {
  22365. display: flex;
  22366. flex-direction: row;
  22367. flex-wrap: wrap;
  22368. align-content: flex-start;
  22369. height: 435px;
  22370. overflow: auto;
  22371. position: relative;
  22372. }
  22373. .picNone {
  22374. position: absolute;
  22375. left: 50%;
  22376. top: 45%;
  22377. transform: translate(-50%, -50%);
  22378. width: fit-content;
  22379. color: #9c9c9c;
  22380. }
  22381. .sysPic {
  22382. width: 200px;
  22383. height: 115px;
  22384. margin: 0 20px 20px 0;
  22385. cursor: pointer;
  22386. }
  22387. .sysPic>img,
  22388. .isSysPic>img,
  22389. .deletePic>img {
  22390. width: 100%;
  22391. height: 100%;
  22392. object-fit: cover;
  22393. }
  22394. .isSysPic {
  22395. width: 200px;
  22396. height: 115px;
  22397. position: relative;
  22398. }
  22399. .deletePic {
  22400. width: 20px;
  22401. height: 20px;
  22402. position: absolute;
  22403. top: 0;
  22404. right: 0;
  22405. cursor: pointer;
  22406. }
  22407. .select_box1 {
  22408. height: 100%;
  22409. }
  22410. .select_box1_img {
  22411. background: #fff;
  22412. border-radius: 5px;
  22413. padding: 15px;
  22414. box-sizing: border-box;
  22415. margin-bottom: 20px;
  22416. }
  22417. .select_box1_title {
  22418. padding: 0 0 15px 0;
  22419. border-bottom: 1px solid #eee;
  22420. margin-bottom: 15px;
  22421. }
  22422. .select_box1_title span:nth-child(1) {
  22423. font-size: 16px;
  22424. margin-right: 20px;
  22425. color: #000;
  22426. }
  22427. .select_box1_title span:nth-child(2) {
  22428. font-size: 14px;
  22429. color: rgb(112, 112, 112);
  22430. }
  22431. .select_box1_add_img {}
  22432. .select_box1_select {
  22433. background: #fff;
  22434. border-radius: 5px;
  22435. padding: 15px;
  22436. box-sizing: border-box;
  22437. height: calc(100% - 200px);
  22438. overflow: auto;
  22439. }
  22440. .select_box2 {
  22441. height: 100%;
  22442. }
  22443. .select_box2_title {
  22444. background: #fff;
  22445. border-radius: 5px;
  22446. padding: 5px 10px;
  22447. box-sizing: border-box;
  22448. margin-bottom: 10px;
  22449. }
  22450. .select_box2_box {
  22451. display: flex;
  22452. height: calc(100% - 30px);
  22453. }
  22454. .select_box2_img {
  22455. width: calc(100% - 310px);
  22456. height: 100%;
  22457. overflow: auto;
  22458. background: #fff;
  22459. border-radius: 5px;
  22460. }
  22461. .select_box2_img img {
  22462. width: 100%;
  22463. }
  22464. .select_box2_answer {
  22465. background: #fff;
  22466. margin-left: 10px;
  22467. border-radius: 5px;
  22468. width: 300px;
  22469. overflow: auto;
  22470. height: 100%;
  22471. display: flex;
  22472. flex-direction: column;
  22473. align-items: center;
  22474. padding-top: 10px;
  22475. box-sizing: border-box;
  22476. }
  22477. .select_box2_answer_box {
  22478. margin: 0 0 10px 0;
  22479. width: 85%;
  22480. }
  22481. .rate_textarea {
  22482. font: inherit;
  22483. color: currentColor;
  22484. width: 100%;
  22485. padding: 8px 14px;
  22486. display: block;
  22487. min-width: 0;
  22488. outline: none;
  22489. border: 1px solid rgba(0, 0, 0, 0.23);
  22490. border-radius: 4px;
  22491. box-sizing: border-box;
  22492. background: #fff;
  22493. margin: 0 20px 0 0;
  22494. resize: none;
  22495. }
  22496. .select_answer_title {
  22497. text-align: left;
  22498. width: 85%;
  22499. margin-bottom: 10px;
  22500. font-size: 18px;
  22501. color: #8e8e8e;
  22502. }
  22503. .mask {
  22504. background-color: rgb(0 0 0 / 30%);
  22505. /* position: fixed; */
  22506. position: absolute;
  22507. top: 0;
  22508. left: 0;
  22509. width: 100%;
  22510. height: 100%;
  22511. z-index: 90;
  22512. display: flex;
  22513. align-items: center;
  22514. justify-content: center;
  22515. }
  22516. .progressBox {
  22517. width: 300px;
  22518. height: 150px;
  22519. background: #fff;
  22520. border-radius: 10px;
  22521. box-shadow: 0 0 6px 1px #bfbfbf;
  22522. display: flex;
  22523. align-items: center;
  22524. justify-content: center;
  22525. flex-direction: column;
  22526. position: relative;
  22527. color: #6c6c6c;
  22528. }
  22529. .progressBox>>>.el-progress-bar__outer {
  22530. background-color: #d1dfff !important;
  22531. }
  22532. .progressBox .lbox {
  22533. height: 50px;
  22534. font-size: 19px;
  22535. display: flex;
  22536. align-items: center;
  22537. color: #747474;
  22538. }
  22539. .progressBox .lbox img {
  22540. width: 40px;
  22541. margin-right: 20px;
  22542. }
  22543. .closeCss {
  22544. position: absolute;
  22545. top: 8px;
  22546. right: 8px;
  22547. cursor: pointer;
  22548. width: 20px;
  22549. height: 20px;
  22550. }
  22551. .closeCss>img {
  22552. width: 100%;
  22553. height: 100%;
  22554. }
  22555. .updateTips::before {
  22556. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  22557. font-size: 14px;
  22558. margin-left: 20px;
  22559. font-weight: 400;
  22560. color: #ff3a3a;
  22561. margin-bottom: 10px;
  22562. display: block;
  22563. }
  22564. .updateMask {
  22565. width: 100%;
  22566. z-index: 3;
  22567. top: 0;
  22568. position: absolute;
  22569. /* background-color: rgba(0,0,0,.3); */
  22570. }
  22571. .t_j_box {
  22572. display: flex;
  22573. }
  22574. .t_j_box span:nth-child(1) {
  22575. width: 15%;
  22576. overflow: hidden;
  22577. margin-right: 10px;
  22578. text-overflow: ellipsis;
  22579. white-space: nowrap;
  22580. }
  22581. .t_j_box span:nth-child(2) {
  22582. width: 30%;
  22583. overflow: hidden;
  22584. text-overflow: ellipsis;
  22585. margin-right: 10px;
  22586. }
  22587. .t_j_box span:nth-child(3) {
  22588. max-width: calc(55% - 20px);
  22589. overflow: hidden;
  22590. text-overflow: ellipsis;
  22591. }
  22592. .sentenBox {
  22593. background: #fff;
  22594. height: 600px;
  22595. overflow: auto;
  22596. background-image: url("../../../assets/icon/conSentences/csBg.png");
  22597. background-position: 102%;
  22598. background-repeat: no-repeat;
  22599. background-size: 60%;
  22600. }
  22601. .sentenBox>.sentenContent {
  22602. padding-bottom: 10px;
  22603. width: 97%;
  22604. margin: 0 auto;
  22605. }
  22606. .sentenBox>.sentenContent+.sentenContent {
  22607. border-top: 1px solid #cbcbcb;
  22608. }
  22609. .addSen {
  22610. background: #409efe;
  22611. width: 90px;
  22612. color: #fff;
  22613. height: 35px;
  22614. text-align: center;
  22615. line-height: 35px;
  22616. border-radius: 5px;
  22617. float: right;
  22618. margin: 10px 20px 0 0;
  22619. cursor: pointer;
  22620. }
  22621. .sentenTop {
  22622. display: flex;
  22623. flex-direction: row;
  22624. flex-wrap: nowrap;
  22625. align-items: center;
  22626. }
  22627. .sentenTop::before {
  22628. content: attr(index);
  22629. background: #3681fc;
  22630. border-radius: 50%;
  22631. color: #fff;
  22632. width: 25px;
  22633. height: 25px;
  22634. min-width: 25px;
  22635. min-height: 25px;
  22636. text-align: center;
  22637. line-height: 25px;
  22638. margin-right: 5px;
  22639. }
  22640. .sentenTop>div:nth-child(2) {
  22641. width: 300px;
  22642. margin: 0 15px;
  22643. }
  22644. .sentenTop>div:nth-child(3) {
  22645. background: #409efe;
  22646. color: #fff;
  22647. width: 65px;
  22648. height: 35px;
  22649. text-align: center;
  22650. line-height: 35px;
  22651. border-radius: 5px;
  22652. cursor: pointer;
  22653. }
  22654. .cardList {
  22655. padding: 30px 0 20px 0;
  22656. display: flex;
  22657. flex-direction: row;
  22658. flex-wrap: wrap;
  22659. align-items: center;
  22660. box-sizing: border-box;
  22661. border-bottom: 1px solid #f4f4f4;
  22662. width: 98%;
  22663. margin: 0 auto;
  22664. }
  22665. .rightCardList {
  22666. display: flex;
  22667. flex-wrap: wrap;
  22668. }
  22669. .cardBox {
  22670. display: flex;
  22671. flex-direction: row;
  22672. flex-wrap: wrap;
  22673. align-items: center;
  22674. align-content: center;
  22675. }
  22676. .isCard,
  22677. .isCard1 {
  22678. width: auto;
  22679. padding: 0 20px;
  22680. height: 65px;
  22681. text-align: center;
  22682. line-height: 65px;
  22683. font-size: 14px;
  22684. cursor: pointer;
  22685. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  22686. background-size: 100% 100%;
  22687. position: relative;
  22688. z-index: 99;
  22689. }
  22690. .isCard1 {
  22691. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  22692. }
  22693. .isCard:hover .deleteWord {
  22694. display: block;
  22695. }
  22696. .isCard>div:nth-child(1),
  22697. .isCard1>div:nth-child(1) {
  22698. white-space: nowrap;
  22699. overflow: hidden;
  22700. text-overflow: ellipsis;
  22701. width: 100%;
  22702. margin: 0 auto;
  22703. }
  22704. .card {
  22705. width: 140px;
  22706. height: 65px;
  22707. }
  22708. .card>img {
  22709. width: 100%;
  22710. height: 100%;
  22711. }
  22712. .rightCardBox {
  22713. width: 98%;
  22714. margin: 10px auto 0;
  22715. }
  22716. .rightCardBox>div:nth-child(1) {
  22717. margin-bottom: 10px;
  22718. }
  22719. .cardCss {
  22720. display: flex;
  22721. flex-direction: column;
  22722. flex-wrap: nowrap;
  22723. align-items: center;
  22724. border-bottom: 3px solid #b4c3d3;
  22725. padding: 0 0 5px 0;
  22726. /* margin-right: 10px; */
  22727. }
  22728. .cardCss>div:nth-child(2) {
  22729. background: #5b7b9d;
  22730. color: #fff;
  22731. width: 20px;
  22732. height: 20px;
  22733. border-radius: 50%;
  22734. text-align: center;
  22735. line-height: 20px;
  22736. }
  22737. .sentenTopBox {
  22738. display: flex;
  22739. flex-direction: row;
  22740. flex-wrap: nowrap;
  22741. align-items: center;
  22742. justify-content: space-between;
  22743. padding: 55px 0 0 20px;
  22744. box-sizing: border-box;
  22745. width: 85%;
  22746. }
  22747. .rb_c_ai_box,
  22748. .stepsBottom {
  22749. width: 100%;
  22750. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  22751. /* background: #f7f7f7; */
  22752. border-radius: 10px;
  22753. overflow: hidden;
  22754. /* height: 100%; */
  22755. height: calc(100% - 55px);
  22756. }
  22757. .navTop {
  22758. background: #53749b;
  22759. color: #fff;
  22760. height: 40px;
  22761. line-height: 40px;
  22762. padding-left: 15px;
  22763. font-size: 18px;
  22764. }
  22765. .navBottom {
  22766. /* background: #6b91b7; */
  22767. height: 100%;
  22768. overflow: auto;
  22769. padding: 10px 0;
  22770. }
  22771. .navStage {
  22772. display: flex;
  22773. flex-direction: row;
  22774. flex-wrap: nowrap;
  22775. align-items: center;
  22776. padding: 10px 10px 10px 0;
  22777. cursor: pointer;
  22778. background: #ffffff;
  22779. width: 95%;
  22780. margin: 5px auto 5px;
  22781. box-sizing: border-box;
  22782. border-radius: 5px;
  22783. flex-wrap: wrap;
  22784. position: relative;
  22785. }
  22786. .navStage:hover>.chapter_upload_drag {
  22787. display: block;
  22788. }
  22789. .navTask:hover>.chapter_upload_drag {
  22790. display: block;
  22791. }
  22792. .chapter_upload:hover>.chapter_upload_drag {
  22793. display: block;
  22794. }
  22795. .navStage::before {
  22796. content: "";
  22797. display: block;
  22798. width: 16px;
  22799. height: 16px;
  22800. background-image: url(../../../assets/icon/new/icon_stage.png);
  22801. background-size: 100%;
  22802. margin-left: 25px;
  22803. }
  22804. .navStage .chapter_unit_open {
  22805. content: "";
  22806. display: block;
  22807. width: 16px;
  22808. height: 16px;
  22809. background-image: url(../../../assets/icon/new/down.png);
  22810. transform: rotate(-90deg);
  22811. background-size: 100%;
  22812. margin-left: 10px;
  22813. transition: all 0.5s;
  22814. }
  22815. .isNavStageOpen .chapter_unit_open {
  22816. transform: rotate(0deg);
  22817. }
  22818. .isNavStage {
  22819. background: #0061ff;
  22820. }
  22821. .isNavStage::before {
  22822. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  22823. }
  22824. .isNavStage .chapter_unit_open {
  22825. background-image: url(../../../assets/icon/new/downC.png);
  22826. }
  22827. .isNavStage .nt_taskName {
  22828. font-weight: bold !important;
  22829. color: #ffffff !important;
  22830. }
  22831. .isNavStage .nt_taskTitle {
  22832. font-weight: bold !important;
  22833. color: #fff !important;
  22834. }
  22835. .navStage .nt_taskBox {
  22836. width: calc(100% - 68px);
  22837. padding: 0 0 0 5px;
  22838. box-sizing: border-box;
  22839. box-sizing: border-box;
  22840. display: flex;
  22841. flex-direction: row;
  22842. flex-wrap: nowrap;
  22843. align-items: baseline;
  22844. }
  22845. .navStage .nt_taskTitle {
  22846. color: #060e17;
  22847. line-height: 25px;
  22848. font-size: 16px;
  22849. }
  22850. .navStage .nt_taskName {
  22851. max-width: calc(100% - 82px);
  22852. white-space: nowrap;
  22853. overflow: hidden;
  22854. text-overflow: ellipsis;
  22855. font-size: 16px;
  22856. color: #060e17;
  22857. }
  22858. .navTask {
  22859. display: flex;
  22860. flex-direction: row;
  22861. flex-wrap: nowrap;
  22862. align-items: center;
  22863. padding: 10px 10px 10px 0;
  22864. cursor: pointer;
  22865. background: #ffffff;
  22866. width: 95%;
  22867. margin: 5px auto 5px;
  22868. box-sizing: border-box;
  22869. border-radius: 5px;
  22870. flex-wrap: wrap;
  22871. position: relative;
  22872. }
  22873. .navTask .chapter_upload_open {
  22874. content: "";
  22875. display: block;
  22876. width: 16px;
  22877. height: 16px;
  22878. background-image: url(../../../assets/icon/new/icon_arrow.png);
  22879. background-size: 100%;
  22880. margin-left: 23px;
  22881. }
  22882. .noImage .chapter_upload_open {
  22883. display: none;
  22884. background-image: unset !important;
  22885. }
  22886. .isNavOpen .chapter_upload_open {
  22887. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  22888. transform: rotate(90deg);
  22889. }
  22890. .isNavTask .chapter_upload_open {
  22891. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  22892. transform: rotate(-90deg);
  22893. }
  22894. .isNavTask.isNavOpen .chapter_upload_open {
  22895. transform: rotate(0deg);
  22896. }
  22897. .dragOverTop {
  22898. border-top: 2px solid #0061ff !important;
  22899. border-radius: 0 !important;
  22900. margin-top: 10px;
  22901. }
  22902. .dragOverBottom {
  22903. border-bottom: 2px solid #0061ff !important;
  22904. border-radius: 0 !important;
  22905. margin-top: 10px;
  22906. }
  22907. .dragOverTop2 {
  22908. border-top: 2px solid #0061ff !important;
  22909. border-radius: 0 !important;
  22910. }
  22911. .dragOverBottom2 {
  22912. border-bottom: 2px solid #0061ff !important;
  22913. border-radius: 0 !important;
  22914. }
  22915. .isNavTask {
  22916. /* background: #3681FC; */
  22917. background: #eef3fb;
  22918. }
  22919. .isNavTask>.chapter_upload_drag {
  22920. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  22921. }
  22922. .isNavTask .nt_taskName {
  22923. /* color: #fff !important; */
  22924. font-weight: bold !important;
  22925. color: #0061ff !important;
  22926. }
  22927. .isNavTask .nt_taskTitle {
  22928. /* color: #AECCFE !important; */
  22929. font-weight: bold !important;
  22930. color: #0061ff !important;
  22931. }
  22932. .navTask .nt_taskBox {
  22933. width: calc(100% - 40px);
  22934. padding: 0 0 0 5px;
  22935. box-sizing: border-box;
  22936. box-sizing: border-box;
  22937. display: flex;
  22938. flex-direction: row;
  22939. flex-wrap: nowrap;
  22940. align-items: baseline;
  22941. }
  22942. .navTask .nt_taskTitle {
  22943. /* color: #717C8D; */
  22944. color: #060e17;
  22945. line-height: 25px;
  22946. font-size: 16px;
  22947. /* min-width: 66px; */
  22948. }
  22949. .navTask .nt_taskName {
  22950. /* color: #fff; */
  22951. /* max-width: 130px; */
  22952. /* width: 100%; */
  22953. max-width: calc(100% - 66px);
  22954. font-size: 16px;
  22955. color: #060e17;
  22956. /* color: #0E1E33; */
  22957. }
  22958. .navTask .nt_taskName span {
  22959. width: 100%;
  22960. white-space: nowrap;
  22961. overflow: hidden;
  22962. text-overflow: ellipsis;
  22963. display: block;
  22964. }
  22965. .gjBox {
  22966. width: calc(100% - 25px);
  22967. padding: 0 0 0 0;
  22968. box-sizing: border-box;
  22969. border-left: 1px solid #cad1dc;
  22970. margin-left: 25px;
  22971. }
  22972. .gjBox>div {
  22973. display: flex;
  22974. align-items: center;
  22975. }
  22976. .gjBox>div::before {
  22977. content: "";
  22978. height: 1px;
  22979. width: 10px;
  22980. background: #cad1dc;
  22981. display: block;
  22982. margin-right: 5px;
  22983. }
  22984. .gjCss {
  22985. display: flex;
  22986. flex-direction: row;
  22987. flex-wrap: nowrap;
  22988. align-items: center;
  22989. padding: 15px 0;
  22990. box-sizing: border-box;
  22991. font-size: 14px;
  22992. cursor: pointer;
  22993. }
  22994. .isGjCss {
  22995. color: #0061ff;
  22996. }
  22997. .groupBox {}
  22998. .groupContent+.groupContent {
  22999. margin-top: 30px;
  23000. }
  23001. .groupTitle {
  23002. font-size: 24px;
  23003. color: rgb(80, 80, 80);
  23004. margin-bottom: 20px;
  23005. }
  23006. .groupName {
  23007. display: flex;
  23008. align-items: center;
  23009. }
  23010. .groupn {
  23011. font-size: 15px;
  23012. margin-right: 10px;
  23013. }
  23014. .groupName+.groupName {
  23015. margin-top: 15px;
  23016. }
  23017. .groupBtn {
  23018. margin-left: 10px;
  23019. }
  23020. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  23021. text-align: left;
  23022. }
  23023. .radioBox>div {
  23024. margin: 10px 0 0 10px;
  23025. }
  23026. .radioBox>>>.el-radio__input,
  23027. .radioBox>>>.el-checkbox__inner {
  23028. margin-left: 10px;
  23029. }
  23030. .radioBox>>>.el-radio__label,
  23031. .radioBox>>>.el-checkbox__label {
  23032. display: flex;
  23033. align-items: center;
  23034. }
  23035. .inImg {
  23036. width: 50px;
  23037. }
  23038. .inImg>img {
  23039. width: 100%;
  23040. height: 100%;
  23041. object-fit: cover;
  23042. }
  23043. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  23044. height: auto;
  23045. padding: 10px;
  23046. margin: 0;
  23047. }
  23048. .upCss>>>.el-upload-list {
  23049. width: 100%;
  23050. }
  23051. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  23052. width: 100%;
  23053. height: 120px;
  23054. object-fit: contain;
  23055. background: unset;
  23056. margin-left: 0;
  23057. }
  23058. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  23059. display: none;
  23060. }
  23061. .tcMember+.tcMember::before {
  23062. content: "、";
  23063. }
  23064. .xzUpImg {
  23065. width: 25px;
  23066. height: 25px;
  23067. min-width: 25px;
  23068. min-height: 25px;
  23069. cursor: pointer;
  23070. margin: 0 10px;
  23071. }
  23072. .xzUpImg>img {
  23073. width: 100%;
  23074. height: 100%;
  23075. }
  23076. .closeCss {
  23077. position: absolute;
  23078. top: 8px;
  23079. right: 8px;
  23080. cursor: pointer;
  23081. width: 20px;
  23082. height: 20px;
  23083. }
  23084. .closeCss>img {
  23085. width: 100%;
  23086. height: 100%;
  23087. }
  23088. .moveBtn {
  23089. display: flex;
  23090. flex-direction: row;
  23091. flex-wrap: nowrap;
  23092. align-items: center;
  23093. width: 55px;
  23094. }
  23095. .timuUpImg {
  23096. display: flex;
  23097. flex-direction: row;
  23098. align-items: center;
  23099. width: 100%;
  23100. margin-right: 10px;
  23101. }
  23102. .timuUpImg>div:nth-child(1) {
  23103. margin-right: 10px;
  23104. display: flex;
  23105. align-items: center;
  23106. width: 100%;
  23107. }
  23108. .timuImgBox {
  23109. margin: 10px 0;
  23110. display: flex;
  23111. flex-direction: column;
  23112. flex-wrap: wrap;
  23113. align-items: flex-start;
  23114. }
  23115. .timuImg {
  23116. width: 100px;
  23117. margin: 5px 0;
  23118. cursor: pointer;
  23119. position: relative;
  23120. }
  23121. .timuImg:hover .deleteWord {
  23122. display: block;
  23123. }
  23124. .deleteWord {
  23125. width: 25px;
  23126. height: 25px;
  23127. position: absolute;
  23128. right: -5px;
  23129. top: -5px;
  23130. cursor: pointer;
  23131. display: none;
  23132. }
  23133. .timuImg>img,
  23134. .deleteWord>img {
  23135. width: 100%;
  23136. height: 100%;
  23137. object-fit: cover;
  23138. }
  23139. .e_add_delete {
  23140. cursor: pointer;
  23141. margin-left: 10px;
  23142. }
  23143. .pType_box {
  23144. margin-top: 30px;
  23145. align-items: flex-end;
  23146. }
  23147. .noneBox {
  23148. height: 200px;
  23149. width: 100%;
  23150. display: flex;
  23151. align-items: center;
  23152. justify-content: center;
  23153. flex-direction: column;
  23154. /* margin-top: 150px; */
  23155. }
  23156. .noneBox>img {
  23157. width: 95px;
  23158. }
  23159. .noneBox>span {
  23160. margin-top: 10px;
  23161. color: #717c8d;
  23162. }
  23163. .rb_c_box {
  23164. width: 100%;
  23165. height: 100%;
  23166. display: flex;
  23167. /* padding: 20px; */
  23168. box-sizing: border-box;
  23169. justify-content: space-between;
  23170. }
  23171. .rb_c_box_left {
  23172. height: 100%;
  23173. background: #fff;
  23174. width: 270px;
  23175. min-width: 270px;
  23176. border-radius: 8px;
  23177. margin-right: 10px;
  23178. }
  23179. .rb_c_box_right {
  23180. height: 100%;
  23181. width: calc(100%);
  23182. overflow: hidden;
  23183. }
  23184. .rb_c_box_btn {
  23185. display: flex;
  23186. justify-content: flex-start;
  23187. height: 50px;
  23188. align-items: center;
  23189. }
  23190. .rb_c_box_right>.basic_box {
  23191. /* background: #fff; */
  23192. border-radius: 0;
  23193. height: calc(100% - 0px);
  23194. overflow: auto;
  23195. padding: 0;
  23196. }
  23197. .textarea_css {
  23198. display: block;
  23199. resize: none;
  23200. padding: 10px 15px;
  23201. line-height: 1.5;
  23202. box-sizing: border-box;
  23203. width: 100%;
  23204. font-size: 14px;
  23205. color: #606266;
  23206. background-color: #fff;
  23207. background-image: none;
  23208. border: 1px solid #dcdfe6;
  23209. border-radius: 4px;
  23210. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  23211. outline: none;
  23212. overflow: hidden;
  23213. height: 46px;
  23214. font-family: "Microsoft YaHei";
  23215. }
  23216. .textarea_css::-webkit-input-placeholder {
  23217. color: #c0c4cc;
  23218. }
  23219. .textarea_css:focus {
  23220. border-color: #409eff;
  23221. outline: 0;
  23222. }
  23223. .addEditor>>>.text {
  23224. height: auto;
  23225. min-height: 100px;
  23226. }
  23227. .addEditor>>>.w-e-text-container {
  23228. min-height: 100px;
  23229. }
  23230. .moveBtn2 {
  23231. flex-direction: column;
  23232. width: fit-content;
  23233. margin: 0 10px 0 10px;
  23234. }
  23235. .moveBtn2 .chapter_upload_down,
  23236. .moveBtn2 .chapter_upload_up {
  23237. width: 16px;
  23238. height: 16px;
  23239. }
  23240. .moveBtn2 .chapter_upload_up::after,
  23241. .moveBtn2 .chapter_upload_down::after {
  23242. width: 10px;
  23243. height: 10px;
  23244. }
  23245. .fullStyle>>>.el-dialog__body {
  23246. height: calc(100% - 125px) !important;
  23247. box-sizing: border-box;
  23248. }
  23249. .fullStyle1>>>.el-dialog__body {
  23250. height: auto !important;
  23251. }
  23252. .fullStyle>>>.el-dialog {
  23253. width: 100% !important;
  23254. max-width: 100% !important;
  23255. height: 100% !important;
  23256. margin: 0 !important;
  23257. }
  23258. .fullStyle {
  23259. width: 100% !important;
  23260. max-width: 100% !important;
  23261. height: 100% !important;
  23262. margin: 0 auto !important;
  23263. }
  23264. .wb_j_box_btn {
  23265. width: calc(100% - 30px);
  23266. display: flex;
  23267. height: 40px;
  23268. border: 1.5px solid #cad1dc;
  23269. border-radius: 4px;
  23270. box-sizing: border-box;
  23271. align-items: center;
  23272. font-size: 14px;
  23273. cursor: pointer;
  23274. overflow: hidden;
  23275. }
  23276. .wb_j_box_btn:hover {
  23277. border: 1.5px solid #0061ff;
  23278. }
  23279. .wb_j_box_title {
  23280. background: #f0f4fa;
  23281. height: 100%;
  23282. line-height: 40px;
  23283. width: 90px;
  23284. text-align: center;
  23285. color: #060e17;
  23286. border-right: 1.5px solid #cad1dc;
  23287. box-sizing: border-box;
  23288. }
  23289. .wb_j_box_btn_c {
  23290. width: calc(100% - 90px);
  23291. padding: 0 35px 0 10px;
  23292. box-sizing: border-box;
  23293. position: relative;
  23294. }
  23295. .wb_j_box_span {
  23296. width: 100%;
  23297. overflow: hidden;
  23298. white-space: nowrap;
  23299. text-overflow: ellipsis;
  23300. word-wrap: break-word;
  23301. color: #717c8d;
  23302. }
  23303. .wb_j_box_arrow {
  23304. content: "";
  23305. width: 14px;
  23306. height: 14px;
  23307. background: url(../../../assets/icon/new/u_arrow.png);
  23308. background-size: 100% 100%;
  23309. position: absolute;
  23310. right: 12px;
  23311. top: 50%;
  23312. transform: translateY(-50%);
  23313. }
  23314. .check_classBox {
  23315. height: 400px;
  23316. display: flex;
  23317. border-top: 1.5px solid #e7ebf1;
  23318. border-bottom: 1.5px solid #e7ebf1;
  23319. }
  23320. .check_class_right {
  23321. width: 130px;
  23322. border-right: 1px solid #e7ebf1;
  23323. display: flex;
  23324. align-items: center;
  23325. flex-direction: column;
  23326. height: 100%;
  23327. overflow: auto;
  23328. padding: 15px 0;
  23329. box-sizing: border-box;
  23330. }
  23331. .check_class {
  23332. width: 85%;
  23333. border-radius: 5px;
  23334. height: 30px;
  23335. min-height: 30px;
  23336. line-height: 30px;
  23337. text-align: center;
  23338. padding: 0 10px;
  23339. box-sizing: border-box;
  23340. cursor: pointer;
  23341. white-space: nowrap;
  23342. overflow: hidden;
  23343. text-overflow: ellipsis;
  23344. }
  23345. .check_class.activeX {
  23346. background: #e0eafb;
  23347. color: #3681fc;
  23348. font-weight: 700;
  23349. }
  23350. .check_class+.check_class {
  23351. margin-top: 15px;
  23352. }
  23353. .check_class_left {
  23354. background: #fafafa;
  23355. width: calc(100% - 130px);
  23356. padding: 15px;
  23357. box-sizing: border-box;
  23358. }
  23359. .check_class_all_box {
  23360. display: flex;
  23361. margin-bottom: 10px;
  23362. }
  23363. .all_check {
  23364. display: flex;
  23365. align-items: center;
  23366. padding: 2px 0 0;
  23367. margin-left: 10px;
  23368. }
  23369. .all_check>>>.el-checkbox__label {
  23370. line-height: 18px;
  23371. }
  23372. .check_class_left_title {
  23373. font-size: 16px;
  23374. font-weight: 700;
  23375. }
  23376. .check_class_item {
  23377. display: flex;
  23378. flex-wrap: wrap;
  23379. height: calc(100% - 45px);
  23380. overflow: auto;
  23381. justify-content: flex-start;
  23382. align-items: flex-start;
  23383. align-content: flex-start;
  23384. }
  23385. .class_item:first-child {
  23386. /* margin: 0 15px 15px 67px; */
  23387. }
  23388. .class_item {
  23389. margin: 0 15px 15px 0;
  23390. }
  23391. .class_item:hover>>>.el-checkbox__label {
  23392. color: #409eff;
  23393. }
  23394. .class_item>>>.el-checkbox__label {
  23395. color: #0e1e33;
  23396. }
  23397. .class_item:hover>>>.el-checkbox__inner {
  23398. border-color: #409eff;
  23399. }
  23400. .class_item>>>.el-checkbox,
  23401. .class_item>>>.el-checkbox__input {
  23402. display: flex;
  23403. align-items: center;
  23404. }
  23405. .taskTitle {
  23406. font-size: 20px;
  23407. font-weight: bold;
  23408. margin-bottom: 35px;
  23409. }
  23410. .taskTitle:after {
  23411. content: "";
  23412. width: 100%;
  23413. display: block;
  23414. height: 1px;
  23415. background: #cad1dc;
  23416. position: absolute;
  23417. left: 0;
  23418. margin: 15px 0 0;
  23419. }
  23420. .eva_btn_box {
  23421. margin: 20px 0px 0 0;
  23422. display: flex;
  23423. flex-direction: row;
  23424. flex-wrap: nowrap;
  23425. align-items: center;
  23426. justify-content: space-between;
  23427. width: 100%;
  23428. }
  23429. .eva_btn_left_box {
  23430. display: flex;
  23431. flex-direction: row;
  23432. flex-wrap: nowrap;
  23433. align-items: center;
  23434. }
  23435. .addTypeChoose {
  23436. display: flex;
  23437. flex-direction: row;
  23438. flex-wrap: nowrap;
  23439. align-items: center;
  23440. margin: 15px 0;
  23441. }
  23442. .addTypeBox {
  23443. display: flex;
  23444. flex-direction: column;
  23445. flex-wrap: nowrap;
  23446. align-items: center;
  23447. }
  23448. .addTypeChoose {
  23449. display: flex;
  23450. flex-direction: row;
  23451. flex-wrap: nowrap;
  23452. align-items: center;
  23453. margin: 15px 0;
  23454. }
  23455. .buchong_box {
  23456. background: #E0EAFB66;
  23457. width: calc(100% - 20px);
  23458. min-height: 50px;
  23459. display: flex;
  23460. align-items: center;
  23461. justify-content: center;
  23462. margin: 0 auto;
  23463. }
  23464. .outline {
  23465. width: calc(100% - 40px);
  23466. margin: 0 auto;
  23467. }
  23468. .task_outline {
  23469. width: calc(100% - 40px);
  23470. margin: 0 auto;
  23471. }
  23472. .outline_box+.outline_box {
  23473. margin: 30px 0 0px;
  23474. }
  23475. .outline_task {
  23476. display: flex;
  23477. align-items: center;
  23478. margin-bottom: 10px;
  23479. }
  23480. .outline_btn{
  23481. display: flex;
  23482. align-items: center;
  23483. min-width: fit-content;
  23484. margin-left: 10px;
  23485. }
  23486. .outline_task .title {
  23487. font-size: 18px;
  23488. font-weight: bold;
  23489. min-width: 80px;
  23490. }
  23491. .op_task_box,
  23492. .op_tool_box,
  23493. .outline_detail {
  23494. position: relative;
  23495. }
  23496. .op_task_box:hover .op_box,
  23497. .op_tool_box:hover .op_box,
  23498. .outline_detail:hover .op_box {
  23499. display: flex
  23500. }
  23501. .op_box {
  23502. position: absolute;
  23503. bottom: 10px;
  23504. display: none;
  23505. align-items: center;
  23506. justify-content: space-between;
  23507. width: calc(100% - 20px);
  23508. left: 50%;
  23509. transform: translateX(-50%);
  23510. }
  23511. .op_box .op_remark {
  23512. color: #8E8E8E;
  23513. font-size: 14px;
  23514. }
  23515. .rb_c_nav {
  23516. width: calc(100% - 20px);
  23517. margin: 15px auto 0;
  23518. font-size: 18px;
  23519. }
  23520. .rb_c_nav span {
  23521. cursor: pointer;
  23522. }
  23523. .rb_c_nav span+span {
  23524. margin-left: 10px;
  23525. }
  23526. .rb_c_nav span.active {
  23527. color: #0061FF
  23528. }
  23529. .text_panel>>>.text {
  23530. height: 400px;
  23531. }
  23532. .markBox{
  23533. padding: 20px 14px;
  23534. line-height: 29px;
  23535. font-size: 16px;
  23536. background: #f4f4f4;
  23537. border-radius: 5px;
  23538. }
  23539. .info_box_t{
  23540. display: flex;
  23541. align-items: center;
  23542. }
  23543. .info_box_t + .info_box_t{
  23544. margin-top: 10px;
  23545. }
  23546. .info_box_t_box{
  23547. display: flex;
  23548. align-items: center;
  23549. }
  23550. .info_box_t_box + .info_box_t_box{
  23551. margin-left: 10px;
  23552. }
  23553. .info_box_t_box > span{
  23554. width: fit-content
  23555. }
  23556. .info_box_t_box > input{
  23557. width: 150px !important;
  23558. margin: 0 5px 0 0;
  23559. }
  23560. .mode_box{
  23561. display: flex;
  23562. align-items: center;
  23563. }
  23564. .mode_box > span{
  23565. padding: 0px 5px;
  23566. cursor: pointer;
  23567. }
  23568. .mode_box > span.active{
  23569. color: #409eff;
  23570. }
  23571. .chapter_upload_check {
  23572. width: 15px;
  23573. height: 15px;
  23574. cursor: pointer;
  23575. background-image: url('../../../assets/icon/check.png');
  23576. background-size: 100% 100%;
  23577. }
  23578. .chapter_upload_check.checked{
  23579. background-image: url('../../../assets/icon/checked.png');
  23580. }
  23581. .ruleBtn {
  23582. height: 36px;
  23583. line-height: 36px;
  23584. cursor: pointer;
  23585. color: #0061FF;
  23586. }
  23587. </style>