index.vue 317 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777
  1. <template>
  2. <div class="course-detail">
  3. <Header></Header>
  4. <section class="section">
  5. <div class="container">
  6. <div class="section__header">
  7. <div class="container">
  8. <el-breadcrumb separator="/">
  9. <el-breadcrumb-item :to="{ path: '/index' }"
  10. >首页</el-breadcrumb-item
  11. >
  12. <el-breadcrumb-item>课程详情</el-breadcrumb-item>
  13. </el-breadcrumb>
  14. </div>
  15. </div>
  16. <div class="section__body">
  17. <div class="container">
  18. <div class="course-info">
  19. <div class="course-info__header clearfix">
  20. <div class="title">
  21. <span>{{ changeName(courseId) }}</span>
  22. <el-button
  23. v-if="courseTotal > 1"
  24. size="mini"
  25. type="primary"
  26. plain
  27. icon="el-icon-sort"
  28. style="margin-left: 14px"
  29. @click="openChangeCourseBoxs"
  30. >切换课程</el-button
  31. >
  32. </div>
  33. <div
  34. class="left-box"
  35. :style="{
  36. backgroundImage: `url(${$tools.splitImgHost(
  37. goodsData.coverUrl,
  38. false
  39. )})`,
  40. }"
  41. >
  42. <div v-show="vid" id="player"></div>
  43. <div v-show="vidzb" id="playerzb"></div>
  44. <div class="recordStyle" v-if="showRecordStatus">
  45. 您上次看到{{
  46. $tools.secondToTime(recordObj.videoCurrentTime)
  47. }},正在自动续播<span
  48. style="
  49. display: inline-block;
  50. width: 50px;
  51. text-align: center;
  52. "
  53. >|</span
  54. >
  55. <span class="btn_sty" @click="backLI">从头播放</span>
  56. </div>
  57. </div>
  58. <div class="right-box">
  59. <div class="right-box__header">
  60. <div class="tabs">
  61. <el-tabs v-model="courseTabIndex" @tab-click="handleClick">
  62. <el-tab-pane
  63. :name="tab.name"
  64. v-for="(tab, index) in menuTab"
  65. :key="index"
  66. >
  67. <div slot="label">
  68. <span class="label">{{ tab.label }}</span>
  69. </div>
  70. <!-- 章节目录 -->
  71. <template v-if="tab.name == '1'">
  72. <div v-if="teacherList && teacherList.length > 0" class="teacherList_name">
  73. <div v-for="(tea, index) in teacherList" :key="index" class="names" :class="{nactive: teaIndex == index}" @click="activeFunc(tea.courseId, index)">
  74. {{tea.aliasName}}
  75. </div>
  76. </div>
  77. <div class="right-box__body">
  78. <div
  79. class="item"
  80. v-for="(menu, index) in menuList"
  81. :key="index"
  82. >
  83. <template v-if="menu.type == 1">
  84. <div
  85. class="item__title"
  86. @click="openModule(menu)"
  87. >
  88. <i
  89. :class="{
  90. 'el-icon-caret-right': !menu.showList,
  91. 'el-icon-caret-bottom': menu.showList,
  92. }"
  93. ></i>
  94. {{ menu.menuName }}
  95. </div>
  96. <div class="item__content">
  97. <div
  98. class="bank-chapter"
  99. v-if="menu.showList"
  100. >
  101. <div
  102. class="bank-chapter__item"
  103. v-for="(
  104. chapter, chapterIndex
  105. ) in menu.list"
  106. :key="chapterIndex"
  107. >
  108. <div
  109. v-if="chapter.type == 1"
  110. class="bank-chapter__item__text"
  111. @click="openChapter(chapter)"
  112. >
  113. <i
  114. :class="{
  115. 'el-icon-caret-right':
  116. !chapter.showList,
  117. 'el-icon-caret-bottom':
  118. chapter.showList,
  119. }"
  120. ></i
  121. >{{ chapter.name }}
  122. </div>
  123. <div
  124. class="bank-section"
  125. v-if="chapter.showList && chapter.type == 1"
  126. >
  127. <div
  128. class="bank-section__item"
  129. :class="{
  130. active: isActive(section),
  131. }"
  132. v-for="(
  133. section, sectionIndex
  134. ) in chapter.list"
  135. :key="sectionIndex"
  136. @click="getResource(section,1)"
  137. >
  138. <template v-if="section.type != 2">
  139. <template>
  140. <div
  141. class="note note--blue"
  142. v-if="
  143. section.sectionType == 1
  144. "
  145. >
  146. 录播
  147. </div>
  148. <div
  149. class="note"
  150. v-if="
  151. section.sectionType == 2
  152. "
  153. >
  154. 直播
  155. </div>
  156. <div
  157. class="note note--yellow"
  158. v-if="
  159. section.sectionType == 3
  160. "
  161. >
  162. 回放
  163. </div>
  164. <div
  165. class="
  166. bank-section__item__text
  167. "
  168. >
  169. {{ section.name }}
  170. <div
  171. style="font-size: 12px"
  172. v-if="
  173. section.liveStartTime >
  174. nowTime
  175. "
  176. >
  177. <span>{{
  178. $tools.timestampToTime(
  179. section.liveStartTime,
  180. (isDay = false)
  181. )
  182. }}</span
  183. >-
  184. <span>{{
  185. $tools.timestampToTime(
  186. section.liveEndTime,
  187. (isDay = false)
  188. )
  189. }}</span>
  190. </div>
  191. </div>
  192. </template>
  193. <template
  194. v-if="section.durationTime > 0"
  195. >
  196. <div class="during">
  197. {{
  198. $tools.secondToDate(
  199. section.durationTime
  200. )
  201. }}
  202. </div>
  203. </template>
  204. <template>
  205. <div
  206. class="btn"
  207. v-if="section.rebuild > 0"
  208. >
  209. 待重修
  210. </div>
  211. <template v-else>
  212. <div
  213. class="btn btn--green"
  214. v-if="section.learning == 1"
  215. >
  216. 已看完
  217. </div>
  218. </template>
  219. </template>
  220. <template
  221. v-if="
  222. section.liveStartTime &&
  223. section.sectionType == 2
  224. "
  225. >
  226. <div
  227. class="
  228. live-btn live-btn--blue
  229. "
  230. v-if="
  231. section.liveStartTime >
  232. nowTime
  233. "
  234. >
  235. 待开播
  236. </div>
  237. <div
  238. class="
  239. live-btn live-btn--yellow
  240. "
  241. v-if="
  242. section.liveStartTime <=
  243. nowTime &&
  244. section.liveEndTime >
  245. nowTime
  246. "
  247. >
  248. 直播中
  249. </div>
  250. <div
  251. class="live-btn"
  252. v-if="
  253. section.liveEndTime <
  254. nowTime
  255. "
  256. >
  257. 已结束
  258. </div>
  259. </template>
  260. <template
  261. v-if="checkSection(section)"
  262. >
  263. <div class="exercises" @click="getResource(section,2)">
  264. 习题
  265. <i class="el-icon-arrow-right icons"></i>
  266. </div>
  267. </template>
  268. </template>
  269. <template v-if="section.type == 2">
  270. <template>
  271. <div
  272. class="test-btn"
  273. v-if="section.doType == 1"
  274. >
  275. 练习
  276. </div>
  277. <div
  278. class="test-btn"
  279. v-if="section.doType != 1"
  280. >
  281. 考试
  282. </div>
  283. </template>
  284. <div
  285. class="bank-section__item__text"
  286. >
  287. {{ section.name }}
  288. </div>
  289. <template>
  290. <div
  291. class="btn"
  292. v-if="section.rebuild > 0"
  293. >
  294. 待重修
  295. </div>
  296. <template v-else>
  297. <div
  298. class="btn btn--green"
  299. v-if="section.learning == 1"
  300. >
  301. 合格
  302. </div>
  303. <div
  304. class="btn btn--red"
  305. v-if="section.learning == 0"
  306. >
  307. 不合格
  308. </div>
  309. <div
  310. class="btn btn--green"
  311. v-if="section.rebuild > 0"
  312. >
  313. 待重测
  314. </div>
  315. </template>
  316. </template>
  317. </template>
  318. </div>
  319. </div>
  320. <div
  321. v-if="chapter.type == 2"
  322. class="bank-section__item"
  323. @click="getResource(chapter,3)"
  324. >
  325. <template>
  326. <template>
  327. <div
  328. class="test-btn"
  329. v-if="chapter.doType == 1"
  330. >
  331. 练习
  332. </div>
  333. <div
  334. class="test-btn"
  335. v-if="chapter.doType != 1"
  336. >
  337. 考试
  338. </div>
  339. </template>
  340. <div
  341. class="bank-section__item__text"
  342. >
  343. {{ chapter.name }}
  344. </div>
  345. <template>
  346. <div
  347. class="btn btn--green"
  348. v-if="chapter.learning == 1"
  349. >
  350. 合格
  351. </div>
  352. <div
  353. class="btn btn--red"
  354. v-if="chapter.learning == 0"
  355. >
  356. 不合格
  357. </div>
  358. </template>
  359. </template>
  360. </div>
  361. </div>
  362. </div>
  363. </div>
  364. </template>
  365. <template v-if="menu.type == 2">
  366. <div class="item__content">
  367. <div class="bank-chapter">
  368. <div class="bank-chapter__item">
  369. <div
  370. class="bank-chapter__item__text"
  371. @click="openChapter(menu)"
  372. >
  373. <i
  374. :class="{
  375. 'el-icon-caret-right':
  376. !menu.showList,
  377. 'el-icon-caret-bottom':
  378. menu.showList,
  379. }"
  380. ></i
  381. >{{ menu.menuName }}
  382. </div>
  383. <div
  384. class="bank-section"
  385. v-if="menu.showList"
  386. >
  387. <div
  388. class="bank-section__item"
  389. :class="{
  390. active: isActive(section),
  391. }"
  392. v-for="(
  393. section, sectionIndex
  394. ) in menu.list"
  395. :key="sectionIndex"
  396. @click="getResource(section,1)"
  397. >
  398. <template v-if="section.type != 2">
  399. <template>
  400. <div
  401. class="note note--blue"
  402. v-if="
  403. section.sectionType == 1
  404. "
  405. >
  406. 录播
  407. </div>
  408. <div
  409. class="note"
  410. v-if="
  411. section.sectionType == 2
  412. "
  413. >
  414. 直播
  415. </div>
  416. <div
  417. class="note note--yellow"
  418. v-if="
  419. section.sectionType == 3
  420. "
  421. >
  422. 回放
  423. </div>
  424. </template>
  425. <div
  426. class="bank-section__item__text"
  427. >
  428. {{ section.name }}
  429. <div
  430. style="font-size: 12px"
  431. v-if="
  432. section.liveStartTime >
  433. nowTime
  434. "
  435. >
  436. <span>{{
  437. $tools.timestampToTime(
  438. section.liveStartTime,
  439. (isDay = false)
  440. )
  441. }}</span
  442. >-
  443. <span>{{
  444. $tools.timestampToTime(
  445. section.liveEndTime,
  446. (isDay = false)
  447. )
  448. }}</span>
  449. </div>
  450. </div>
  451. <template
  452. v-if="section.durationTime > 0"
  453. >
  454. <div class="during">
  455. {{
  456. $tools.secondToDate(
  457. section.durationTime
  458. )
  459. }}
  460. </div>
  461. </template>
  462. <template>
  463. <div
  464. class="btn"
  465. v-if="section.rebuild > 0"
  466. >
  467. 待重修
  468. </div>
  469. <template v-else>
  470. <div
  471. class="btn btn--green"
  472. v-if="section.learning == 1"
  473. >
  474. 已看完
  475. </div>
  476. </template>
  477. </template>
  478. <template
  479. v-if="
  480. section.liveStartTime &&
  481. section.sectionType == 2
  482. "
  483. >
  484. <div
  485. class="
  486. live-btn live-btn--blue
  487. "
  488. v-if="
  489. section.liveStartTime >
  490. nowTime
  491. "
  492. >
  493. 待开播
  494. </div>
  495. <div
  496. class="
  497. live-btn live-btn--yellow
  498. "
  499. v-if="
  500. section.liveStartTime <=
  501. nowTime &&
  502. section.liveEndTime >
  503. nowTime
  504. "
  505. >
  506. 直播中
  507. </div>
  508. <div
  509. class="live-btn"
  510. v-if="
  511. section.liveEndTime <
  512. nowTime
  513. "
  514. >
  515. 已结束
  516. </div>
  517. </template>
  518. <template
  519. v-if="checkSection(section)"
  520. >
  521. <div class="exercises" @click="getResource(section,2)">
  522. 习题
  523. <i class="el-icon-arrow-right icons"></i>
  524. </div>
  525. </template>
  526. </template>
  527. <template v-if="section.type == 2">
  528. <template>
  529. <div
  530. class="test-btn"
  531. v-if="section.doType == 1"
  532. >
  533. 练习
  534. </div>
  535. <div
  536. class="test-btn"
  537. v-if="section.doType != 1"
  538. >
  539. 考试
  540. </div>
  541. </template>
  542. <div
  543. class="bank-section__item__text"
  544. >
  545. {{ section.name }}
  546. </div>
  547. <template>
  548. <div
  549. class="btn"
  550. v-if="section.rebuild > 0"
  551. >
  552. 待重修
  553. </div>
  554. <template v-else>
  555. <div
  556. class="btn btn--green"
  557. v-if="section.learning == 1"
  558. >
  559. 合格
  560. </div>
  561. <div
  562. class="btn btn--red"
  563. v-if="section.learning == 0"
  564. >
  565. 不合格
  566. </div>
  567. <div
  568. class="btn btn--green"
  569. v-if="section.rebuild > 0"
  570. >
  571. 待重测
  572. </div>
  573. </template>
  574. </template>
  575. </template>
  576. </div>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. </template>
  582. <template v-if="menu.type == 3">
  583. <div class="item__content">
  584. <div class="bank-section">
  585. <div
  586. class="bank-section__item"
  587. :class="{
  588. active: isActive(menu),
  589. }"
  590. @click="getResource(menu,1)"
  591. >
  592. <template>
  593. <div
  594. class="note note--blue"
  595. v-if="menu.sectionType == 1"
  596. >
  597. 录播
  598. </div>
  599. <div
  600. class="note"
  601. v-if="menu.sectionType == 2"
  602. >
  603. 直播
  604. </div>
  605. <div
  606. class="note note--yellow"
  607. v-if="menu.sectionType == 3"
  608. >
  609. 回放
  610. </div>
  611. <div class="bank-section__item__text">
  612. {{ menu.name }}
  613. <div
  614. style="font-size: 12px"
  615. v-if="
  616. menu.liveStartTime > nowTime
  617. "
  618. >
  619. <span>{{
  620. $tools.timestampToTime(
  621. menu.liveStartTime,
  622. (isDay = false)
  623. )
  624. }}</span
  625. >-
  626. <span>{{
  627. $tools.timestampToTime(
  628. menu.liveEndTime,
  629. (isDay = false)
  630. )
  631. }}</span>
  632. </div>
  633. </div>
  634. </template>
  635. <template v-if="menu.durationTime > 0">
  636. <div class="during">
  637. {{
  638. $tools.secondToDate(
  639. menu.durationTime
  640. )
  641. }}
  642. </div>
  643. </template>
  644. <template>
  645. <div
  646. class="btn"
  647. v-if="menu.rebuild > 0"
  648. >
  649. 待重修
  650. </div>
  651. <template v-else>
  652. <div
  653. class="btn btn--green"
  654. v-if="menu.learning == 1"
  655. >
  656. 已看完
  657. </div>
  658. </template>
  659. </template>
  660. <template
  661. v-if="
  662. menu.liveStartTime &&
  663. menu.sectionType == 2
  664. "
  665. >
  666. <div
  667. class="live-btn live-btn--blue"
  668. v-if="menu.liveStartTime > nowTime"
  669. >
  670. 待开播
  671. </div>
  672. <div
  673. class="live-btn live-btn--yellow"
  674. v-if="
  675. menu.liveStartTime <= nowTime &&
  676. menu.liveEndTime > nowTime
  677. "
  678. >
  679. 直播中
  680. </div>
  681. <div
  682. class="live-btn"
  683. v-if="menu.liveEndTime < nowTime"
  684. >
  685. 已结束
  686. </div>
  687. </template>
  688. <template
  689. v-if="checkSectionList(menu)"
  690. >
  691. <!-- <div class="btn btn--green"
  692. @click.stop="getResource(menu,2,true)">
  693. 习题
  694. </div> -->
  695. <div class="exercises" @click="getResource(menu,2,true)">
  696. 习题
  697. <i class="el-icon-arrow-right icons"></i>
  698. </div>
  699. </template>
  700. </div>
  701. </div>
  702. </div>
  703. </template>
  704. </div>
  705. </div>
  706. </template>
  707. <!-- 重修目录 -->
  708. <template v-if="tab.name == '2'">
  709. <div class="right-box__body">
  710. <div
  711. class="item"
  712. v-for="(menu, index) in reMenuList"
  713. :key="index"
  714. >
  715. <template v-if="menu.type == 1">
  716. <div
  717. class="item__title"
  718. @click="openModule(menu)"
  719. >
  720. <i
  721. :class="{
  722. 'el-icon-caret-right': !menu.showList,
  723. 'el-icon-caret-bottom': menu.showList,
  724. }"
  725. ></i>
  726. {{ menu.menuName }}
  727. </div>
  728. <div class="item__content">
  729. <div
  730. class="bank-chapter"
  731. v-if="menu.showList"
  732. >
  733. <div
  734. class="bank-chapter__item"
  735. v-for="(
  736. chapter, chapterIndex
  737. ) in menu.list"
  738. :key="chapterIndex"
  739. >
  740. <div
  741. class="bank-chapter__item__text"
  742. @click="openChapter(chapter)"
  743. >
  744. <i
  745. :class="{
  746. 'el-icon-caret-right':
  747. !chapter.showList,
  748. 'el-icon-caret-bottom':
  749. chapter.showList,
  750. }"
  751. ></i
  752. >{{ chapter.name }}
  753. </div>
  754. <div
  755. class="bank-section"
  756. v-if="chapter.showList"
  757. >
  758. <div
  759. class="bank-section__item"
  760. :class="{
  761. active: isActive(section),
  762. }"
  763. v-for="(
  764. section, sectionIndex
  765. ) in chapter.list"
  766. :key="sectionIndex"
  767. @click="getResource(section,1)"
  768. >
  769. <template v-if="section.type != 2">
  770. <template>
  771. <div
  772. class="note note--blue"
  773. v-if="
  774. section.sectionType == 1
  775. "
  776. >
  777. 录播
  778. </div>
  779. <div
  780. class="note"
  781. v-if="
  782. section.sectionType == 2
  783. "
  784. >
  785. 直播
  786. </div>
  787. <div
  788. class="note note--yellow"
  789. v-if="
  790. section.sectionType == 3
  791. "
  792. >
  793. 回放
  794. </div>
  795. <div
  796. class="
  797. bank-section__item__text
  798. "
  799. >
  800. {{ section.name }}
  801. <div
  802. style="font-size: 12px"
  803. v-if="
  804. section.liveStartTime >
  805. nowTime
  806. "
  807. >
  808. <span>{{
  809. $tools.timestampToTime(
  810. section.liveStartTime,
  811. (isDay = false)
  812. )
  813. }}</span
  814. >-
  815. <span>{{
  816. $tools.timestampToTime(
  817. section.liveEndTime,
  818. (isDay = false)
  819. )
  820. }}</span>
  821. </div>
  822. </div>
  823. </template>
  824. <template
  825. v-if="section.durationTime > 0"
  826. >
  827. <div class="during">
  828. {{
  829. $tools.secondToDate(
  830. section.durationTime
  831. )
  832. }}
  833. </div>
  834. </template>
  835. <template>
  836. <div
  837. class="btn"
  838. v-if="section.rebuild > 0"
  839. >
  840. 待重修
  841. </div>
  842. <template v-else>
  843. <div
  844. class="btn btn--green"
  845. v-if="section.learning == 1"
  846. >
  847. 已看完
  848. </div>
  849. </template>
  850. </template>
  851. <template
  852. v-if="
  853. section.liveStartTime &&
  854. section.sectionType == 2
  855. "
  856. >
  857. <div
  858. class="
  859. live-btn live-btn--blue
  860. "
  861. v-if="
  862. section.liveStartTime >
  863. nowTime
  864. "
  865. >
  866. 待开播
  867. </div>
  868. <div
  869. class="
  870. live-btn live-btn--yellow
  871. "
  872. v-if="
  873. section.liveStartTime <=
  874. nowTime &&
  875. section.liveEndTime >
  876. nowTime
  877. "
  878. >
  879. 直播中
  880. </div>
  881. <div
  882. class="live-btn"
  883. v-if="
  884. section.liveEndTime <
  885. nowTime
  886. "
  887. >
  888. 已结束
  889. </div>
  890. </template>
  891. </template>
  892. <template v-if="section.type == 2">
  893. <template>
  894. <div
  895. class="test-btn"
  896. v-if="section.doType == 1"
  897. >
  898. 练习
  899. </div>
  900. <div
  901. class="test-btn"
  902. v-if="section.doType != 1"
  903. >
  904. 考试
  905. </div>
  906. </template>
  907. <div
  908. class="bank-section__item__text"
  909. >
  910. {{ section.name }}
  911. </div>
  912. <template>
  913. <div
  914. class="btn"
  915. v-if="section.rebuild > 0"
  916. >
  917. 待重修
  918. </div>
  919. <template v-else>
  920. <div
  921. class="btn btn--green"
  922. v-if="section.learning == 1"
  923. >
  924. 合格
  925. </div>
  926. <div
  927. class="btn btn--red"
  928. v-if="section.learning == 0"
  929. >
  930. 不合格
  931. </div>
  932. <div
  933. class="btn btn--green"
  934. v-if="section.rebuild > 0"
  935. >
  936. 待重测
  937. </div>
  938. </template>
  939. </template>
  940. </template>
  941. </div>
  942. </div>
  943. </div>
  944. </div>
  945. </div>
  946. </template>
  947. <template v-if="menu.type == 2">
  948. <div class="item__content">
  949. <div class="bank-chapter">
  950. <div class="bank-chapter__item">
  951. <div
  952. class="bank-chapter__item__text"
  953. @click="openChapter(menu)"
  954. >
  955. <i
  956. :class="{
  957. 'el-icon-caret-right':
  958. !menu.showList,
  959. 'el-icon-caret-bottom':
  960. menu.showList,
  961. }"
  962. ></i
  963. >{{ menu.menuName }}
  964. </div>
  965. <div
  966. class="bank-section"
  967. v-if="menu.showList"
  968. >
  969. <div
  970. class="bank-section__item"
  971. :class="{
  972. active: isActive(section),
  973. }"
  974. v-for="(
  975. section, sectionIndex
  976. ) in menu.list"
  977. :key="sectionIndex"
  978. @click="getResource(section,1)"
  979. >
  980. <template v-if="section.type != 2">
  981. <template>
  982. <div
  983. class="note note--blue"
  984. v-if="
  985. section.sectionType == 1
  986. "
  987. >
  988. 录播
  989. </div>
  990. <div
  991. class="note"
  992. v-if="
  993. section.sectionType == 2
  994. "
  995. >
  996. 直播
  997. </div>
  998. <div
  999. class="note note--yellow"
  1000. v-if="
  1001. section.sectionType == 3
  1002. "
  1003. >
  1004. 回放
  1005. </div>
  1006. </template>
  1007. <div
  1008. class="bank-section__item__text"
  1009. >
  1010. {{ section.name }}
  1011. <div
  1012. style="font-size: 12px"
  1013. v-if="
  1014. section.liveStartTime >
  1015. nowTime
  1016. "
  1017. >
  1018. <span>{{
  1019. $tools.timestampToTime(
  1020. section.liveStartTime,
  1021. (isDay = false)
  1022. )
  1023. }}</span
  1024. >-
  1025. <span>{{
  1026. $tools.timestampToTime(
  1027. section.liveEndTime,
  1028. (isDay = false)
  1029. )
  1030. }}</span>
  1031. </div>
  1032. </div>
  1033. <template
  1034. v-if="section.durationTime > 0"
  1035. >
  1036. <div class="during">
  1037. {{
  1038. $tools.secondToDate(
  1039. section.durationTime
  1040. )
  1041. }}
  1042. </div>
  1043. </template>
  1044. <template>
  1045. <div
  1046. class="btn"
  1047. v-if="section.rebuild > 0"
  1048. >
  1049. 待重修
  1050. </div>
  1051. <template v-else>
  1052. <div
  1053. class="btn btn--green"
  1054. v-if="section.learning == 1"
  1055. >
  1056. 已看完
  1057. </div>
  1058. </template>
  1059. </template>
  1060. <template
  1061. v-if="
  1062. section.liveStartTime &&
  1063. section.sectionType == 2
  1064. "
  1065. >
  1066. <div
  1067. class="
  1068. live-btn live-btn--blue
  1069. "
  1070. v-if="
  1071. section.liveStartTime >
  1072. nowTime
  1073. "
  1074. >
  1075. 待开播
  1076. </div>
  1077. <div
  1078. class="
  1079. live-btn live-btn--yellow
  1080. "
  1081. v-if="
  1082. section.liveStartTime <=
  1083. nowTime &&
  1084. section.liveEndTime >
  1085. nowTime
  1086. "
  1087. >
  1088. 直播中
  1089. </div>
  1090. <div
  1091. class="live-btn"
  1092. v-if="
  1093. section.liveEndTime <
  1094. nowTime
  1095. "
  1096. >
  1097. 已结束
  1098. </div>
  1099. </template>
  1100. </template>
  1101. <template v-if="section.type == 2">
  1102. <template>
  1103. <div
  1104. class="test-btn"
  1105. v-if="section.doType == 1"
  1106. >
  1107. 练习
  1108. </div>
  1109. <div
  1110. class="test-btn"
  1111. v-if="section.doType != 1"
  1112. >
  1113. 考试
  1114. </div>
  1115. </template>
  1116. <div
  1117. class="bank-section__item__text"
  1118. >
  1119. {{ section.name }}
  1120. </div>
  1121. <template>
  1122. <div
  1123. class="btn"
  1124. v-if="section.rebuild > 0"
  1125. >
  1126. 待重修
  1127. </div>
  1128. <template v-else>
  1129. <div
  1130. class="btn btn--green"
  1131. v-if="section.learning == 1"
  1132. >
  1133. 合格
  1134. </div>
  1135. <div
  1136. class="btn btn--red"
  1137. v-if="section.learning == 0"
  1138. >
  1139. 不合格
  1140. </div>
  1141. <div
  1142. class="btn btn--green"
  1143. v-if="section.rebuild > 0"
  1144. >
  1145. 待重测
  1146. </div>
  1147. </template>
  1148. </template>
  1149. </template>
  1150. </div>
  1151. </div>
  1152. </div>
  1153. </div>
  1154. </div>
  1155. </template>
  1156. <template v-if="menu.type == 3">
  1157. <div class="item__content">
  1158. <div class="bank-section">
  1159. <div
  1160. class="bank-section__item"
  1161. :class="{
  1162. active: isActive(menu),
  1163. }"
  1164. @click="getResource(menu,1)"
  1165. >
  1166. <template>
  1167. <div
  1168. class="note note--blue"
  1169. v-if="menu.sectionType == 1"
  1170. >
  1171. 录播
  1172. </div>
  1173. <div
  1174. class="note"
  1175. v-if="menu.sectionType == 2"
  1176. >
  1177. 直播
  1178. </div>
  1179. <div
  1180. class="note note--yellow"
  1181. v-if="menu.sectionType == 3"
  1182. >
  1183. 回放
  1184. </div>
  1185. <div class="bank-section__item__text">
  1186. {{ menu.name }}
  1187. <div
  1188. style="font-size: 12px"
  1189. v-if="
  1190. menu.liveStartTime > nowTime
  1191. "
  1192. >
  1193. <span>{{
  1194. $tools.timestampToTime(
  1195. menu.liveStartTime,
  1196. (isDay = false)
  1197. )
  1198. }}</span
  1199. >-
  1200. <span>{{
  1201. $tools.timestampToTime(
  1202. menu.liveEndTime,
  1203. (isDay = false)
  1204. )
  1205. }}</span>
  1206. </div>
  1207. </div>
  1208. </template>
  1209. <template v-if="menu.durationTime > 0">
  1210. <div class="during">
  1211. {{
  1212. $tools.secondToDate(
  1213. menu.durationTime
  1214. )
  1215. }}
  1216. </div>
  1217. </template>
  1218. <template>
  1219. <div
  1220. class="btn"
  1221. v-if="menu.rebuild > 0"
  1222. >
  1223. 待重修
  1224. </div>
  1225. <template v-else>
  1226. <div
  1227. class="btn btn--green"
  1228. v-if="menu.learning == 1"
  1229. >
  1230. 已看完
  1231. </div>
  1232. </template>
  1233. </template>
  1234. <template
  1235. v-if="
  1236. menu.liveStartTime &&
  1237. menu.sectionType == 2
  1238. "
  1239. >
  1240. <div
  1241. class="live-btn live-btn--blue"
  1242. v-if="menu.liveStartTime > nowTime"
  1243. >
  1244. 待开播
  1245. </div>
  1246. <div
  1247. class="live-btn live-btn--yellow"
  1248. v-if="
  1249. menu.liveStartTime <= nowTime &&
  1250. menu.liveEndTime > nowTime
  1251. "
  1252. >
  1253. 直播中
  1254. </div>
  1255. <div
  1256. class="live-btn"
  1257. v-if="menu.liveEndTime < nowTime"
  1258. >
  1259. 已结束
  1260. </div>
  1261. </template>
  1262. </div>
  1263. </div>
  1264. </div>
  1265. </template>
  1266. </div>
  1267. </div>
  1268. </template>
  1269. <template v-if="tab.name == '3'">
  1270. <div class="answer-question">
  1271. <div class="answer-question__header clearfix">
  1272. <div class="textarea-wrap">
  1273. <el-input
  1274. class="textarea"
  1275. resize="none"
  1276. v-model="textarea"
  1277. rows="3"
  1278. type="textarea"
  1279. placeholder="请输入"
  1280. maxlength="1000"
  1281. show-word-limit
  1282. ></el-input>
  1283. </div>
  1284. <el-button
  1285. type="primary"
  1286. class="submit"
  1287. @click="addAnswer"
  1288. >提出疑问</el-button
  1289. >
  1290. </div>
  1291. <div class="answer-question__body">
  1292. <div class="question-list">
  1293. <div
  1294. v-if="answerList.length == 0"
  1295. style="
  1296. text-align: center;
  1297. color: #cccccc;
  1298. margin-top: 14px;
  1299. "
  1300. >
  1301. 暂无记录
  1302. </div>
  1303. <div
  1304. class="question-list__item"
  1305. v-for="(item, index) in answerList"
  1306. :key="index"
  1307. >
  1308. <div class="question-list__item__avatar">
  1309. <img
  1310. v-if="item.assignRealname"
  1311. :src="
  1312. $tools.splitImgHost(item.assignAvatar)
  1313. "
  1314. alt=""
  1315. />
  1316. <img
  1317. v-else
  1318. :src="$tools.splitImgHost(item.avatar)"
  1319. alt=""
  1320. />
  1321. </div>
  1322. <div class="question-list__item__content">
  1323. <div class="nickname">
  1324. {{ item.realname }}
  1325. </div>
  1326. <div class="desc">
  1327. {{ item.answerText }}
  1328. </div>
  1329. <div class="time">
  1330. {{
  1331. $tools.timestampToTime(
  1332. item.createTime,
  1333. false
  1334. )
  1335. }}
  1336. <div
  1337. class="del"
  1338. v-if="item.userId !== userInfo.userId"
  1339. @click="answerBack(item)"
  1340. >
  1341. <el-button type="text"
  1342. >回复</el-button
  1343. >
  1344. </div>
  1345. <div
  1346. class="del"
  1347. style="color: red"
  1348. @click="del(item)"
  1349. v-if="item.userId === userInfo.userId"
  1350. >
  1351. 删除
  1352. </div>
  1353. </div>
  1354. <div
  1355. class="reply-list"
  1356. v-if="
  1357. item.newArraysAnswerList &&
  1358. item.newArraysAnswerList.length
  1359. "
  1360. >
  1361. <div
  1362. class="reply-list__item"
  1363. v-for="(
  1364. items, indexs
  1365. ) in item.newArraysAnswerList"
  1366. :key="indexs"
  1367. >
  1368. <div class="reply-list__item__avatar">
  1369. <img
  1370. :src="
  1371. $tools.splitImgHost(
  1372. items.avatar
  1373. )
  1374. "
  1375. alt=""
  1376. />
  1377. </div>
  1378. <div
  1379. class="reply-list__item__content"
  1380. >
  1381. <div class="nickname">
  1382. {{ items.realname }}
  1383. </div>
  1384. <div class="desc">
  1385. 回复
  1386. <span
  1387. style="
  1388. margin: 0px 4px;
  1389. color: #409eff;
  1390. "
  1391. >@{{
  1392. items.assignRealname
  1393. }}</span
  1394. >
  1395. <span style="color:#ccc;">{{ items.answerText }}</span>
  1396. </div>
  1397. <div class="time">
  1398. {{
  1399. $tools.timestampToTime(
  1400. items.createTime,
  1401. false
  1402. )
  1403. }}
  1404. <div
  1405. class="del"
  1406. style="color: red"
  1407. @click="del(items)"
  1408. v-if="
  1409. items.userId ===
  1410. userInfo.userId
  1411. "
  1412. >
  1413. 删除
  1414. </div>
  1415. <div
  1416. class="reply"
  1417. v-if="
  1418. items.userId !==
  1419. userInfo.userId
  1420. "
  1421. @click="answerBack(items)"
  1422. >
  1423. 回复
  1424. </div>
  1425. </div>
  1426. </div>
  1427. </div>
  1428. </div>
  1429. </div>
  1430. </div>
  1431. </div>
  1432. </div>
  1433. </div>
  1434. </template>
  1435. <template v-if="tab.name == '4'">
  1436. <div class="lecture-notes">
  1437. <div class="lecture-notes__content clearfix">
  1438. <div class="left-boxs">
  1439. <div
  1440. class="textarea clearfix"
  1441. v-if="!(isPlayRebuild > 0) && !vidzb"
  1442. >
  1443. <el-input
  1444. resize="none"
  1445. rows="3"
  1446. v-model="textareaNote"
  1447. type="textarea"
  1448. maxlength="1000"
  1449. show-word-limit
  1450. placeholder="觉得重要的就记下来吧~"
  1451. ></el-input>
  1452. <el-button
  1453. type="primary"
  1454. class="submit"
  1455. @click="noteSubmit"
  1456. >
  1457. 提交笔记
  1458. </el-button>
  1459. </div>
  1460. <div class="note-list">
  1461. <div
  1462. v-if="noteList.length == 0"
  1463. style="
  1464. text-align: center;
  1465. color: #cccccc;
  1466. margin-top: 14px;
  1467. "
  1468. >
  1469. 暂无笔记
  1470. </div>
  1471. <div
  1472. class="note-list__content"
  1473. v-for="(item, index) in noteList"
  1474. :key="index"
  1475. >
  1476. <div
  1477. v-for="(note, index) in item.userNotes"
  1478. :key="index"
  1479. class="user_notes"
  1480. >
  1481. <p class="p1">
  1482. <i
  1483. class="el-icon-video-camera"
  1484. style="margin-right: 8px"
  1485. ></i
  1486. >{{
  1487. $tools.secondToDate(note.noteSecond)
  1488. }}
  1489. <span>{{
  1490. $tools.timestampToTime(
  1491. note.createTime,
  1492. false,
  1493. false
  1494. )
  1495. }}</span>
  1496. </p>
  1497. <p class="p2">{{ note.noteText }}</p>
  1498. </div>
  1499. </div>
  1500. </div>
  1501. <!-- <div class="pagination">
  1502. <el-pagination
  1503. background
  1504. layout="prev, pager, next"
  1505. :total="noteTotal"
  1506. :page-size="noteParams.pageSize"
  1507. >
  1508. </el-pagination>
  1509. </div> -->
  1510. </div>
  1511. </div>
  1512. </div>
  1513. </template>
  1514. <template v-if="tab.name == '5'">
  1515. <div class="lecture-notesjy">
  1516. <div class="listItem">
  1517. <div class="titles">
  1518. {{ courseHandoutsData.handoutsName }}
  1519. </div>
  1520. <div class="btns">
  1521. <div
  1522. class="btn"
  1523. @click="
  1524. previvew(
  1525. $tools.splitImgHost(
  1526. courseHandoutsData.handoutsUrl
  1527. )
  1528. )
  1529. "
  1530. >
  1531. 预览
  1532. </div>
  1533. <div
  1534. v-if="
  1535. courseHandoutsData.canDownload == 1
  1536. ? true
  1537. : false
  1538. "
  1539. class="btn"
  1540. @click="
  1541. printView(
  1542. $tools.splitImgHost(
  1543. courseHandoutsData.handoutsUrl
  1544. )
  1545. )
  1546. "
  1547. >
  1548. 打印
  1549. </div>
  1550. <div
  1551. v-if="
  1552. courseHandoutsData.canDownload == 1
  1553. ? true
  1554. : false
  1555. "
  1556. class="btn"
  1557. @click="
  1558. download(
  1559. $tools.splitImgHost(
  1560. courseHandoutsData.handoutsUrl
  1561. ),
  1562. courseHandoutsData.urlName
  1563. )
  1564. "
  1565. >
  1566. 下载
  1567. </div>
  1568. </div>
  1569. </div>
  1570. <div class="lecture-listFooter" v-if="showPdf">
  1571. <div style="color: #fff">
  1572. {{ courseHandoutsData.urlName }}
  1573. </div>
  1574. <pdf
  1575. class="iframe"
  1576. :src="
  1577. $tools.splitImgHost(
  1578. courseHandoutsData.handoutsUrl
  1579. )
  1580. "
  1581. v-for="i in numPages"
  1582. :key="i"
  1583. :page="i"
  1584. ref="pdf"
  1585. ></pdf>
  1586. <iframe
  1587. id="printIframe"
  1588. :src="
  1589. $tools.splitImgHost(
  1590. courseHandoutsData.handoutsUrl
  1591. )
  1592. "
  1593. frameborder="0"
  1594. style="display: none"
  1595. ></iframe>
  1596. </div>
  1597. </div>
  1598. </template>
  1599. </el-tab-pane>
  1600. </el-tabs>
  1601. </div>
  1602. </div>
  1603. </div>
  1604. </div>
  1605. <div class="course-info__body">
  1606. <el-tabs v-model="activeName">
  1607. <el-tab-pane
  1608. v-for="(item, index) in tabList"
  1609. :key="index"
  1610. :name="item.name"
  1611. :label="item.label"
  1612. >
  1613. <template v-if="item.label == '学员须知'">
  1614. <div class="course-menu clearfix">
  1615. <div class="left-box">
  1616. <div class="left-box__body">
  1617. <div
  1618. class="buy-note"
  1619. v-html="
  1620. goodsData.buyNote &&
  1621. goodsData.buyNote.replace(/\n|\r\n/g, '<br>')
  1622. "
  1623. ></div>
  1624. </div>
  1625. </div>
  1626. <div class="right-box">
  1627. <div class="title">
  1628. 推荐课程
  1629. <a class="more" @click="go('/course-list')"
  1630. >更多></a
  1631. >
  1632. </div>
  1633. <ul class="list">
  1634. <li
  1635. class="course-item"
  1636. v-for="(itemy, index) in compyRecommend(
  1637. recommendList.goodsList
  1638. )"
  1639. :key="index"
  1640. >
  1641. <GoodsItem :item="itemy"></GoodsItem>
  1642. <!-- <div
  1643. class="course-item__img"
  1644. :style="`background-image:url(${$tools.splitImgHost(
  1645. itemy.coverUrl,
  1646. true
  1647. )})`"
  1648. @click="toGoodsDetail(itemy)"
  1649. >
  1650. <div class="note" v-if="itemy.year">
  1651. {{ itemy.year }}
  1652. </div>
  1653. </div>
  1654. <div class="course-item__title">
  1655. {{ itemy.goodsName }}
  1656. </div>
  1657. <div class="course-item__desc">
  1658. <div class="price">
  1659. ¥{{ itemy.standPrice }}
  1660. </div>
  1661. <a
  1662. class="add"
  1663. @click.stop="addCart(true, itemy.goodsId)"
  1664. >加购物车</a
  1665. >
  1666. </div> -->
  1667. </li>
  1668. </ul>
  1669. </div>
  1670. </div>
  1671. </template>
  1672. <template v-if="item.label == '课程答疑'">
  1673. <div class="answer-question">
  1674. <div class="answer-question__header clearfix">
  1675. <div class="textarea-wrap">
  1676. <el-input
  1677. class="textarea"
  1678. v-model="textarea"
  1679. rows="3"
  1680. type="textarea"
  1681. placeholder=""
  1682. ></el-input>
  1683. </div>
  1684. <el-button
  1685. type="primary"
  1686. class="submit"
  1687. @click="addAnswer"
  1688. >提出疑问</el-button
  1689. >
  1690. </div>
  1691. <div class="answer-question__body">
  1692. <div class="question-list">
  1693. <div
  1694. v-if="answerList.length == 0"
  1695. style="text-align: center"
  1696. >
  1697. 暂无记录
  1698. </div>
  1699. <div
  1700. class="question-list__item"
  1701. v-for="(item, index) in answerList"
  1702. :key="index"
  1703. >
  1704. <div class="question-list__item__avatar">
  1705. <img
  1706. v-if="item.assignRealname"
  1707. :src="$tools.splitImgHost(item.assignAvatar)"
  1708. alt=""
  1709. />
  1710. <img
  1711. v-else
  1712. :src="$tools.splitImgHost(item.avatar)"
  1713. alt=""
  1714. />
  1715. </div>
  1716. <div class="question-list__item__content">
  1717. <div class="nickname">
  1718. {{ item.realname }}
  1719. </div>
  1720. <div class="desc">
  1721. {{ item.answerText }}
  1722. </div>
  1723. <div class="time">
  1724. {{
  1725. $tools.timestampToTime(
  1726. item.createTime,
  1727. false
  1728. )
  1729. }}
  1730. <div
  1731. class="del"
  1732. v-if="item.userId !== userInfo.userId"
  1733. @click="answerBack(item)"
  1734. >
  1735. <el-button type="text">回复</el-button>
  1736. </div>
  1737. <div
  1738. class="del"
  1739. @click="del(item)"
  1740. v-if="item.userId === userInfo.userId"
  1741. >
  1742. 删除
  1743. </div>
  1744. </div>
  1745. <div
  1746. class="reply-list"
  1747. v-if="
  1748. item.newArraysAnswerList &&
  1749. item.newArraysAnswerList.length
  1750. "
  1751. >
  1752. <div
  1753. class="reply-list__item"
  1754. v-for="(
  1755. items, indexs
  1756. ) in item.newArraysAnswerList"
  1757. :key="indexs"
  1758. >
  1759. <div class="reply-list__item__avatar">
  1760. <img
  1761. :src="$tools.splitImgHost(items.avatar)"
  1762. alt=""
  1763. />
  1764. </div>
  1765. <div class="reply-list__item__content">
  1766. <div class="nickname">
  1767. {{ items.realname }}
  1768. </div>
  1769. <div class="desc">
  1770. 回复
  1771. <span
  1772. style="
  1773. margin: 0px 4px;
  1774. color: #409eff;
  1775. "
  1776. >@{{ items.assignRealname }}</span
  1777. >
  1778. {{ items.answerText }}
  1779. </div>
  1780. <div class="time">
  1781. {{
  1782. $tools.timestampToTime(
  1783. items.createTime,
  1784. false
  1785. )
  1786. }}
  1787. <div
  1788. class="del"
  1789. @click="del(items)"
  1790. v-if="
  1791. items.userId === userInfo.userId
  1792. "
  1793. >
  1794. 删除
  1795. </div>
  1796. <div
  1797. class="reply"
  1798. v-if="
  1799. items.userId !== userInfo.userId
  1800. "
  1801. @click="answerBack(items)"
  1802. >
  1803. 回复
  1804. </div>
  1805. </div>
  1806. </div>
  1807. </div>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. </div>
  1812. </div>
  1813. </div>
  1814. </template>
  1815. <template v-if="item.label == '笔记讲义'">
  1816. <div class="lecture-notes">
  1817. <div class="lecture-notes__content clearfix">
  1818. <div class="left-box">
  1819. <div
  1820. class="textarea clearfix"
  1821. v-if="!(isPlayRebuild > 0) && !vidzb"
  1822. >
  1823. <el-input
  1824. resize="none"
  1825. rows="3"
  1826. v-model="textareaNote"
  1827. type="textarea"
  1828. placeholder="觉得重要的就记下来吧~"
  1829. ></el-input>
  1830. <el-button
  1831. type="primary"
  1832. class="submit"
  1833. @click="noteSubmit"
  1834. >
  1835. 提交笔记
  1836. </el-button>
  1837. </div>
  1838. <div class="note-list">
  1839. <div
  1840. v-if="noteList.length == 0"
  1841. style="text-align: center"
  1842. >
  1843. 暂无笔记
  1844. </div>
  1845. <div
  1846. class="note-list__content"
  1847. v-for="(item, index) in noteList"
  1848. :key="index"
  1849. >
  1850. <div class="note-list__content__title">
  1851. {{ $tools.timestampToTime(item.dateNote) }}
  1852. </div>
  1853. <div
  1854. class="note-list__item"
  1855. v-for="(note, index) in item.userNotes"
  1856. :key="index"
  1857. >
  1858. <i
  1859. class="el-icon-video-play"
  1860. @click="noteClick(note)"
  1861. ></i>
  1862. <div class="note-list__item__content">
  1863. <div class="title" @click="noteClick(note)">
  1864. {{ $tools.secondToDate(note.noteSecond) }}
  1865. </div>
  1866. <div class="desc">
  1867. {{ note.sectionName }}
  1868. </div>
  1869. <div class="time">{{ note.noteText }}</div>
  1870. </div>
  1871. </div>
  1872. </div>
  1873. </div>
  1874. <div class="pagination">
  1875. <el-pagination
  1876. background
  1877. layout="prev, pager, next"
  1878. :total="noteTotal"
  1879. :page-size="noteParams.pageSize"
  1880. >
  1881. </el-pagination>
  1882. </div>
  1883. </div>
  1884. <div class="right-box" v-if="courseHandoutsData">
  1885. <div class="lecture-list">
  1886. <div class="lecture-list__header">
  1887. 讲义
  1888. <div
  1889. class="slide-btn"
  1890. @click="lectureShow = !lectureShow"
  1891. >
  1892. 收起
  1893. </div>
  1894. </div>
  1895. <div
  1896. class="lecture-list__body"
  1897. v-if="lectureShow"
  1898. >
  1899. <div class="list">
  1900. <div class="list__item">
  1901. <div class="title">
  1902. {{ courseHandoutsData.handoutsName }}
  1903. </div>
  1904. <div class="btns">
  1905. <div
  1906. class="btn"
  1907. @click="
  1908. previvew(
  1909. $tools.splitImgHost(
  1910. courseHandoutsData.handoutsUrl
  1911. )
  1912. )
  1913. "
  1914. >
  1915. 预览
  1916. </div>
  1917. <div
  1918. v-if="
  1919. courseHandoutsData.canDownload == 1
  1920. ? true
  1921. : false
  1922. "
  1923. class="btn"
  1924. @click="
  1925. printView(
  1926. $tools.splitImgHost(
  1927. courseHandoutsData.handoutsUrl
  1928. )
  1929. )
  1930. "
  1931. >
  1932. 打印
  1933. </div>
  1934. <div
  1935. v-if="
  1936. courseHandoutsData.canDownload == 1
  1937. ? true
  1938. : false
  1939. "
  1940. class="btn"
  1941. @click="
  1942. download(
  1943. $tools.splitImgHost(
  1944. courseHandoutsData.handoutsUrl
  1945. ),
  1946. courseHandoutsData.urlName
  1947. )
  1948. "
  1949. >
  1950. 下载
  1951. </div>
  1952. </div>
  1953. </div>
  1954. </div>
  1955. </div>
  1956. </div>
  1957. <div class="lecture-list__footer" v-if="showPdf">
  1958. <div class="lecture-scan">
  1959. <div class="lecture-scan__header">
  1960. {{ courseHandoutsData.urlName }}
  1961. </div>
  1962. <div class="lecture-scan__body">
  1963. <pdf
  1964. class="iframe"
  1965. :src="
  1966. $tools.splitImgHost(
  1967. courseHandoutsData.handoutsUrl
  1968. )
  1969. "
  1970. v-for="i in numPages"
  1971. :key="i"
  1972. :page="i"
  1973. ref="pdf"
  1974. ></pdf>
  1975. <iframe
  1976. id="printIframe"
  1977. :src="
  1978. $tools.splitImgHost(
  1979. courseHandoutsData.handoutsUrl
  1980. )
  1981. "
  1982. frameborder="0"
  1983. style="display: none"
  1984. ></iframe>
  1985. </div>
  1986. </div>
  1987. </div>
  1988. </div>
  1989. </div>
  1990. </div>
  1991. </template>
  1992. </el-tab-pane>
  1993. </el-tabs>
  1994. </div>
  1995. </div>
  1996. </div>
  1997. </div>
  1998. </div>
  1999. </section>
  2000. <el-dialog
  2001. width="800px"
  2002. class="take-photo"
  2003. :visible.sync="takePhotoModal"
  2004. :close-on-click-modal="false"
  2005. :close-on-press-escape="false"
  2006. :show-close="false"
  2007. >
  2008. <div class="take-photo__content">
  2009. <!-- <div class="take-photo__close" @click="takePhotoModal = false">X</div> -->
  2010. <div class="take-photo__header">人脸验证</div>
  2011. <div class="take-photo__body clearfix">
  2012. <div class="left-box">
  2013. <div class="title">重要提示:</div>
  2014. <div class="content">
  2015. <p>1、请保证摄像头正对自己,避免头像偏左或者偏右。</p>
  2016. <p>
  2017. 2、请保证拍照环境光线充足(照片太暗或曝光会降低验证通过率)。
  2018. </p>
  2019. <p>
  2020. 3、请保证整个头像在人脸识别区域内,脸部无遮挡装饰物(佩戴眼镜会降低通过率)。
  2021. </p>
  2022. <p>
  2023. 4、如果下面视频中出现黑屏,摄像头可能被其他进程占用,请关闭其他调用摄像头的程序,重新刷新当前页面重新拍照识别。
  2024. </p>
  2025. </div>
  2026. </div>
  2027. <div class="right-box">
  2028. <img v-show="!isTaking" :src="faceUrl" alt="" />
  2029. <video v-show="isTaking" id="video" :src="stream"></video>
  2030. </div>
  2031. </div>
  2032. <div class="take-photo__footer">
  2033. <el-button
  2034. type="primary"
  2035. v-if="isTaking"
  2036. class="take"
  2037. @click="onPhoto"
  2038. >拍照</el-button
  2039. >
  2040. <el-button
  2041. type="primary"
  2042. v-if="!isTaking"
  2043. class="take"
  2044. :loading="loading"
  2045. @click="reTake"
  2046. >重拍</el-button
  2047. >
  2048. <el-button
  2049. type="primary"
  2050. v-if="!isTaking"
  2051. :loading="loading"
  2052. class="take"
  2053. @click="takeOk"
  2054. >确认</el-button
  2055. >
  2056. </div>
  2057. </div>
  2058. </el-dialog>
  2059. <el-dialog
  2060. width="996px"
  2061. height="600px"
  2062. class="info"
  2063. :visible.sync="showInfoDetailModal"
  2064. :close-on-click-modal="false"
  2065. :close-on-press-escape="false"
  2066. :show-close="false"
  2067. title="资料填写"
  2068. >
  2069. <div class="info__content">
  2070. <el-form
  2071. :model="infoForm"
  2072. ref="infoForm"
  2073. :rules="rules"
  2074. :error-type="errorType"
  2075. >
  2076. <template v-for="(item, index) in listData">
  2077. <el-form-item
  2078. :key="index"
  2079. v-if="item.fieldKey == 'name'"
  2080. :label="item.fieldName"
  2081. :required="item.required"
  2082. label-width="120px"
  2083. :prop="item.required ? item.fieldKey : ''"
  2084. >
  2085. <el-input
  2086. :disabled="disName"
  2087. v-model="infoForm.name"
  2088. :placeholder="`请输入${item.fieldName}`"
  2089. />
  2090. </el-form-item>
  2091. <el-form-item
  2092. :key="index"
  2093. v-if="item.fieldKey == 'idcard'"
  2094. :label="item.fieldName"
  2095. :required="item.required"
  2096. label-width="120px"
  2097. :prop="item.required ? item.fieldKey : ''"
  2098. >
  2099. <el-input
  2100. :disabled="disCard"
  2101. v-model="infoForm.idcard"
  2102. :placeholder="`请输入${item.fieldName}`"
  2103. />
  2104. </el-form-item>
  2105. <el-form-item
  2106. :key="index"
  2107. v-if="item.fieldKey == 'telphone'"
  2108. :label="item.fieldName"
  2109. :required="item.required"
  2110. label-width="120px"
  2111. :prop="item.required ? item.fieldKey : ''"
  2112. >
  2113. <el-input
  2114. :disabled="true"
  2115. v-model="infoForm.telphone"
  2116. :placeholder="`请输入${item.fieldName}`"
  2117. />
  2118. </el-form-item>
  2119. <el-form-item
  2120. :key="index"
  2121. v-if="item.fieldKey == 'school'"
  2122. :label="item.fieldName"
  2123. :required="item.required"
  2124. label-width="120px"
  2125. :prop="item.required ? item.fieldKey : ''"
  2126. >
  2127. <el-input
  2128. v-model="infoForm.school"
  2129. :placeholder="`请输入${item.fieldName}`"
  2130. />
  2131. </el-form-item>
  2132. <el-form-item
  2133. :key="index"
  2134. v-if="item.fieldKey == 'work_unit'"
  2135. :label="item.fieldName"
  2136. :required="item.required"
  2137. label-width="120px"
  2138. :prop="item.required ? item.fieldKey : ''"
  2139. >
  2140. <el-input
  2141. v-model="infoForm.work_unit"
  2142. :placeholder="`请输入${item.fieldName}`"
  2143. />
  2144. </el-form-item>
  2145. <el-form-item
  2146. :key="index"
  2147. v-if="item.fieldKey == 'unit_contact'"
  2148. :label="item.fieldName"
  2149. :required="item.required"
  2150. label-width="120px"
  2151. :prop="item.required ? item.fieldKey : ''"
  2152. >
  2153. <el-input
  2154. v-model="infoForm.unit_contact"
  2155. :placeholder="`请输入${item.fieldName}`"
  2156. />
  2157. </el-form-item>
  2158. <el-form-item
  2159. :key="index"
  2160. v-if="item.fieldKey == 'unit_tel'"
  2161. :label="item.fieldName"
  2162. :required="item.required"
  2163. label-width="120px"
  2164. :prop="item.required ? item.fieldKey : ''"
  2165. >
  2166. <el-input
  2167. v-model="infoForm.unit_tel"
  2168. :placeholder="`请输入${item.fieldName}`"
  2169. />
  2170. </el-form-item>
  2171. <el-form-item
  2172. :key="index"
  2173. v-if="item.fieldKey == 'apply_post'"
  2174. :label="item.fieldName"
  2175. :required="item.required"
  2176. label-width="120px"
  2177. :prop="item.required ? item.fieldKey : ''"
  2178. >
  2179. <el-input
  2180. :disabled="apply_post_disabled"
  2181. v-model="infoForm.apply_post"
  2182. :placeholder="`请输入${item.fieldName}`"
  2183. />
  2184. </el-form-item>
  2185. <el-form-item
  2186. :key="index"
  2187. v-if="item.fieldKey == 'major'"
  2188. :label="item.fieldName"
  2189. :required="item.required"
  2190. label-width="120px"
  2191. :prop="item.required ? item.fieldKey : ''"
  2192. >
  2193. <el-input
  2194. v-model="infoForm.major"
  2195. :placeholder="`请输入${item.fieldName}`"
  2196. />
  2197. </el-form-item>
  2198. <el-form-item
  2199. :key="index"
  2200. v-if="item.inputType == 2"
  2201. :label="item.fieldName"
  2202. label-width="120px"
  2203. :required="item.required"
  2204. :prop="item.required ? item.fieldKey : ''"
  2205. >
  2206. <el-select v-model="infoForm[item.fieldKey]" placeholder="">
  2207. <el-option
  2208. v-for="(option, optionIndex) in getarrays(item.fieldKey)"
  2209. :key="optionIndex"
  2210. :label="option"
  2211. :value="optionIndex + ''"
  2212. ></el-option>
  2213. </el-select>
  2214. </el-form-item>
  2215. <el-form-item
  2216. :key="index"
  2217. v-if="item.inputType == 5"
  2218. :label="item.fieldName"
  2219. label-width="120px"
  2220. :required="item.required"
  2221. :prop="item.required ? item.fieldKey : ''"
  2222. >
  2223. <el-date-picker
  2224. v-model="infoForm[item.fieldKey]"
  2225. align="right"
  2226. type="date"
  2227. placeholder="选择日期"
  2228. >
  2229. </el-date-picker>
  2230. </el-form-item>
  2231. <el-form-item
  2232. :key="index"
  2233. v-if="
  2234. item.inputType == 3 &&
  2235. item.fieldKey !== 'commitment_electr_signature'
  2236. "
  2237. :label="item.fieldName"
  2238. :required="item.required"
  2239. label-width="120px"
  2240. label-position="top"
  2241. :prop="item.required ? item.fieldKey : ''"
  2242. >
  2243. <el-upload
  2244. action=""
  2245. :max-size="2097152"
  2246. accept="image/jpeg, image/jpg, image/png"
  2247. :show-file-list="false"
  2248. list-type="picture"
  2249. :auto-upload="false"
  2250. :ref="
  2251. item.fieldKey === 'recent_photos'
  2252. ? 'recent_photos'
  2253. : item.fieldKey === 'idcard_face_photo'
  2254. ? 'idcard_face_photo'
  2255. : item.fieldKey === 'idcard_national_photo'
  2256. ? 'idcard_national_photo'
  2257. : ''
  2258. "
  2259. :on-change="
  2260. item.fieldKey === 'recent_photos'
  2261. ? changePhotoListHeader1
  2262. : item.fieldKey === 'idcard_face_photo'
  2263. ? changePhotoListHeader2
  2264. : item.fieldKey === 'idcard_national_photo'
  2265. ? changePhotoListHeader3
  2266. : ''
  2267. "
  2268. :file-list="
  2269. item.fieldKey === 'recent_photos'
  2270. ? fileList1
  2271. : item.fieldKey === 'idcard_face_photo'
  2272. ? fileList2
  2273. : item.fieldKey === 'idcard_national_photo'
  2274. ? fileList3
  2275. : ''
  2276. "
  2277. >
  2278. <div class="upload-box">
  2279. <div
  2280. :style="
  2281. item.fieldKey === 'recent_photos'
  2282. ? 'width: 120px; height: 169px;background:url(' +
  2283. require('@/assets/info_1.png') +
  2284. ') no-repeat center;background-size:cover;position:relative;'
  2285. : item.fieldKey === 'idcard_face_photo'
  2286. ? 'width: 120px; height: 82px;background:url(' +
  2287. require('@/assets/info_2.png') +
  2288. ') no-repeat center;background-size:cover;position:relative;'
  2289. : item.fieldKey === 'idcard_national_photo'
  2290. ? 'width: 120px; height: 82px;background:url(' +
  2291. require('@/assets/info_3.png') +
  2292. ') no-repeat center;background-size:cover;position:relative;'
  2293. : ''
  2294. "
  2295. >
  2296. <i
  2297. @click="deleteImg(item)"
  2298. class="el-icon-error"
  2299. v-if="
  2300. item.fieldKey === 'recent_photos'
  2301. ? fileList1[0]
  2302. : item.fieldKey === 'idcard_face_photo'
  2303. ? fileList2[0]
  2304. : item.fieldKey === 'idcard_national_photo'
  2305. ? fileList3[0]
  2306. : ''
  2307. "
  2308. ></i>
  2309. <el-image
  2310. style="width: 100%; height: 100%"
  2311. :src="
  2312. item.fieldKey === 'recent_photos'
  2313. ? $tools.splitImgHost(fileList1[0].url)
  2314. : item.fieldKey === 'idcard_face_photo'
  2315. ? $tools.splitImgHost(fileList2[0].url)
  2316. : item.fieldKey === 'idcard_national_photo'
  2317. ? $tools.splitImgHost(fileList3[0].url)
  2318. : ''
  2319. "
  2320. v-if="
  2321. item.fieldKey === 'recent_photos'
  2322. ? fileList1[0]
  2323. : item.fieldKey === 'idcard_face_photo'
  2324. ? fileList2[0]
  2325. : item.fieldKey === 'idcard_national_photo'
  2326. ? fileList3[0]
  2327. : ''
  2328. "
  2329. :preview-src-list="
  2330. item.fieldKey === 'recent_photos'
  2331. ? [$tools.splitImgHost(fileList1[0].url)]
  2332. : item.fieldKey === 'idcard_face_photo'
  2333. ? [$tools.splitImgHost(fileList2[0].url)]
  2334. : item.fieldKey === 'idcard_national_photo'
  2335. ? [$tools.splitImgHost(fileList3[0].url)]
  2336. : ''
  2337. "
  2338. >
  2339. </el-image>
  2340. </div>
  2341. <div>
  2342. <span
  2343. v-if="item.fieldKey === 'recent_photos'"
  2344. style="color: #999999"
  2345. >竖向白底证件照 文件大小≤2M</span
  2346. >
  2347. <span
  2348. v-if="
  2349. item.fieldKey === 'idcard_face_photo' ||
  2350. item.fieldKey === 'idcard_national_photo'
  2351. "
  2352. style="color: #999999"
  2353. >
  2354. 文件大小≤2M
  2355. </span>
  2356. </div>
  2357. </div>
  2358. <div style="display: inline-block" slot="trigger">
  2359. <el-button type="primary" size="small" round
  2360. >浏览文件</el-button
  2361. >
  2362. </div>
  2363. </el-upload>
  2364. </el-form-item>
  2365. <div
  2366. :key="index"
  2367. v-if="
  2368. item.inputType == 3 &&
  2369. item.fieldKey === 'commitment_electr_signature'
  2370. "
  2371. >
  2372. <el-form-item
  2373. v-if="
  2374. item.inputType == 3 &&
  2375. item.fieldKey === 'commitment_electr_signature'
  2376. "
  2377. label="承诺书"
  2378. :required="item.required"
  2379. label-width="120px"
  2380. label-position="top"
  2381. >
  2382. <div style="line-height: 40px; text-indent: 2em">
  2383. <span>
  2384. 本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
  2385. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  2386. </span>
  2387. <div style="line-height: 40px; text-indent: 2em">
  2388. <span>特此承诺!</span>
  2389. </div>
  2390. </div>
  2391. </el-form-item>
  2392. <el-form-item
  2393. v-if="
  2394. item.inputType == 3 &&
  2395. item.fieldKey === 'commitment_electr_signature'
  2396. "
  2397. label="签名板"
  2398. :required="item.required"
  2399. label-width="120px"
  2400. label-position="top"
  2401. :prop="item.required ? item.fieldKey : ''"
  2402. >
  2403. <div class="dis_stys">
  2404. <span style="color: #999999">请在下方签名区进行签名</span>
  2405. <el-button
  2406. type="primary"
  2407. size="small"
  2408. @click="retDraw"
  2409. mode=""
  2410. >清空</el-button
  2411. >
  2412. </div>
  2413. <div class="handCenter">
  2414. <vue-esign
  2415. v-if="!infoForm[item.fieldKey]"
  2416. ref="esign"
  2417. :width="600"
  2418. :height="300"
  2419. :isCrop="false"
  2420. :lineWidth="5"
  2421. :lineColor="'#333'"
  2422. />
  2423. <div
  2424. v-else
  2425. style="width: 100%; height: 100%; position: relative"
  2426. >
  2427. <img
  2428. style="width: 100%; height: 100%"
  2429. :src="$tools.splitImgHost(infoForm[item.fieldKey])"
  2430. mode=""
  2431. />
  2432. </div>
  2433. </div>
  2434. </el-form-item>
  2435. </div>
  2436. <el-form-item
  2437. :key="index"
  2438. v-if="item.inputType == 4"
  2439. :label="item.fieldName"
  2440. :required="item.required"
  2441. label-width="120px"
  2442. label-position="top"
  2443. :prop="item.required ? item.fieldKey : ''"
  2444. >
  2445. <el-button
  2446. type="primary"
  2447. size="small"
  2448. round
  2449. @click="downloadStamp(item)"
  2450. >下载模板</el-button
  2451. >
  2452. <el-upload
  2453. action=""
  2454. :max-size="2097152"
  2455. accept="image/jpeg, image/jpg, image/png"
  2456. :show-file-list="false"
  2457. list-type="picture"
  2458. :auto-upload="false"
  2459. ref="stamp"
  2460. :on-change="changePhotoListStamp"
  2461. :file-list="fileListStamp"
  2462. >
  2463. <div style="display: inline-block; vertical-align: top">
  2464. <div
  2465. :style="
  2466. 'width: 120px; height: 120px;background:url(' +
  2467. require('@/assets/info_4.png') +
  2468. ') no-repeat center;background-size:cover;position:relative;'
  2469. "
  2470. >
  2471. <el-image
  2472. style="width: 100%; height: 100%"
  2473. :src="$tools.splitImgHost(fileListStamp[0].url)"
  2474. v-if="fileListStamp[0]"
  2475. :preview-src-list="[
  2476. $tools.splitImgHost(fileListStamp[0].url),
  2477. ]"
  2478. >
  2479. </el-image>
  2480. </div>
  2481. <div>
  2482. <span style="color: #999999">文件大小≤2M</span>
  2483. </div>
  2484. </div>
  2485. <div style="display: inline-block" slot="trigger">
  2486. <el-button type="primary" size="small" round
  2487. >浏览文件</el-button
  2488. >
  2489. </div>
  2490. </el-upload>
  2491. </el-form-item>
  2492. </template>
  2493. </el-form>
  2494. </div>
  2495. <span slot="footer" class="dialog-footer">
  2496. <el-button
  2497. @click="
  2498. showInfoDetailModal = false;
  2499. $router.back(-1);
  2500. "
  2501. >取 消</el-button
  2502. >
  2503. <el-button type="primary" :loading="uploading" @click="submit"
  2504. >确 定</el-button
  2505. >
  2506. </span>
  2507. </el-dialog>
  2508. <el-dialog
  2509. width="996px"
  2510. height="600px"
  2511. class="info"
  2512. :visible.sync="showStampDetailModail"
  2513. :close-on-click-modal="false"
  2514. :close-on-press-escape="false"
  2515. :show-close="false"
  2516. title="资料填写"
  2517. >
  2518. <div class="info__content">
  2519. <el-form
  2520. :model="stampForm"
  2521. ref="stampForm"
  2522. :rules="stampRules"
  2523. :error-type="errorType"
  2524. >
  2525. <template v-for="(item, index) in listDataStamp">
  2526. <el-form-item
  2527. :key="index"
  2528. v-if="item.inputType == 4"
  2529. :label="item.fieldName"
  2530. :required="item.required"
  2531. label-width="120px"
  2532. label-position="top"
  2533. :prop="item.required ? item.fieldKey : ''"
  2534. >
  2535. <el-button
  2536. type="primary"
  2537. size="small"
  2538. round
  2539. @click="downloadStamp(item)"
  2540. >下载模板</el-button
  2541. >
  2542. <el-upload
  2543. action=""
  2544. :max-size="2097152"
  2545. accept="image/jpeg, image/jpg, image/png"
  2546. :show-file-list="false"
  2547. list-type="picture"
  2548. :auto-upload="false"
  2549. ref="stamp"
  2550. :on-change="changePhotoListStamp"
  2551. :file-list="fileListStamp"
  2552. >
  2553. <div style="display: inline-block; vertical-align: top">
  2554. <div
  2555. :style="
  2556. 'width: 120px; height: 120px;background:url(' +
  2557. require('@/assets/info_4.png') +
  2558. ') no-repeat center;background-size:cover;position:relative;'
  2559. "
  2560. >
  2561. <el-image
  2562. style="width: 100%; height: 100%"
  2563. :src="$tools.splitImgHost(fileListStamp[0].url)"
  2564. v-if="fileListStamp[0]"
  2565. :preview-src-list="[
  2566. $tools.splitImgHost(fileListStamp[0].url),
  2567. ]"
  2568. >
  2569. </el-image>
  2570. </div>
  2571. <div>
  2572. <span style="color: #999999">文件大小≤2M</span>
  2573. </div>
  2574. </div>
  2575. <div style="display: inline-block" slot="trigger">
  2576. <el-button type="primary" size="small" round
  2577. >浏览文件</el-button
  2578. >
  2579. </div>
  2580. </el-upload>
  2581. </el-form-item>
  2582. </template>
  2583. </el-form>
  2584. </div>
  2585. <span slot="footer" class="dialog-footer">
  2586. <el-button
  2587. @click="
  2588. showStampDetailModail = false;
  2589. $router.back(-1);
  2590. "
  2591. >取 消</el-button
  2592. >
  2593. <el-button type="primary" :loading="uploading" @click="stampSubmit"
  2594. >确 定</el-button
  2595. >
  2596. </span>
  2597. </el-dialog>
  2598. <el-dialog
  2599. width="996px"
  2600. height="600px"
  2601. class="info"
  2602. :visible.sync="showAgreementModal"
  2603. :close-on-click-modal="false"
  2604. :close-on-press-escape="false"
  2605. :show-close="false"
  2606. title="提示"
  2607. >
  2608. <div class="">
  2609. <div>
  2610. 本产品(或服务)提供【{{
  2611. goodsData.goodsName
  2612. }}】课程的在线学习功能,为使用这些功能,我们需要使用您设备上的摄像头,并收集以下个人信息:
  2613. <span v-for="(item, listIndex) in listData" :key="listIndex"
  2614. >{{ item.fieldName }}、</span
  2615. >
  2616. <!-- 姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、有效期、人脸照片(每节课随机拍摄三张)、 -->
  2617. 学习详细记录。
  2618. </div>
  2619. <div>
  2620. 我们会将上述信息提供至广东省建设执业注册管理中心等第三方组织使用,用于继续教育备案等。如果您拒绝,将导致这些功能无法实现,但不影响您使用本产品(或服务)的其他业务功能。
  2621. </div>
  2622. </div>
  2623. <span slot="footer" class="dialog-footer">
  2624. <el-button @click="$router.back(-1)">取 消</el-button>
  2625. <el-button type="primary" @click="showInfoDetailModal = true"
  2626. >同意并继续</el-button
  2627. >
  2628. </span>
  2629. </el-dialog>
  2630. <el-dialog title="切换课程" :visible.sync="dialogVisible" width="800px">
  2631. <div class="topstyle">
  2632. <p>当前课程</p>
  2633. <div class="list_styleHeader">
  2634. <span style="font-weight: bold; font-size: 16px">{{
  2635. getCourseName(courseId)
  2636. }}</span>
  2637. </div>
  2638. </div>
  2639. <div v-for="(courseItem, index) in goodsTeacher" :key="index + 'one'">
  2640. <div class="height_style">
  2641. <div v-for="(item, index) in courseItem.courseList" :key="index + 'two'">
  2642. <div
  2643. v-if="item.show == 1"
  2644. class="list_style"
  2645. :style="
  2646. index % 2 != 1
  2647. ? 'background-color:#F8F8F9;'
  2648. : 'background-color:#fff;'
  2649. "
  2650. @click="activeFunc(item.courseId)"
  2651. >
  2652. <span style="font-weight: bold; font-size: 16px">{{
  2653. item.courseName
  2654. }}</span>
  2655. <!-- <span v-if="courseItem.teaList && courseItem.teaList.length > 0" v-for="(tea, index) in courseItem.teaList" :key="index">
  2656. <el-button type="info" round>{{tea.aliasName}}</el-button>
  2657. </span> -->
  2658. <span v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
  2659. <span v-for="(tea, cindex) in courseItem.teaList" :key="cindex + 'three'" class="names" >
  2660. {{ tea.aliasName }}
  2661. </span>
  2662. </span>
  2663. </div>
  2664. </div>
  2665. </div>
  2666. </div>
  2667. </el-dialog>
  2668. <div id="printTable"></div>
  2669. <!-- <ToolBar></ToolBar> -->
  2670. <Footer></Footer>
  2671. </div>
  2672. </template>
  2673. <script>
  2674. import Footer from "@/components/footer/index";
  2675. import Header from "@/components/header/index";
  2676. import ToolBar from "@/components/toolbar/index";
  2677. import GoodsItem from "@/components/goodsItem/index";
  2678. import { mapGetters, mapMutations, mapActions } from "vuex";
  2679. import * as baseUrls from "@/axios.js";
  2680. import pdf from "vue-pdf";
  2681. import print from "print-js";
  2682. export default {
  2683. name: "CourseDetail",
  2684. components: {
  2685. Footer,
  2686. Header,
  2687. ToolBar,
  2688. pdf,
  2689. GoodsItem,
  2690. },
  2691. data() {
  2692. return {
  2693. dialogVisible: false, //选择课程弹窗
  2694. liveDuration: 0,
  2695. numPages: 0,
  2696. showPdf: false,
  2697. // 总页数
  2698. pdfPages: 10,
  2699. // 当前页数
  2700. pageNum: 1,
  2701. // 加载进度
  2702. loadedRatio: 10,
  2703. // 页面加载完成
  2704. curPageNum: 0,
  2705. // 放大系数 默认百分百
  2706. scale: 100,
  2707. // 旋转角度 ‘90’的倍数才有效
  2708. pageRotate: 0,
  2709. // 单击内部链接时触发 (目前我没有遇到使用场景)
  2710. page: 0,
  2711. bgColor: "#ccc",
  2712. answerTimer: null,
  2713. recordObj: {},
  2714. showAgreementModal: false,
  2715. showInfoDetailModal: false,
  2716. showStampDetailModail: false,
  2717. isTaking: true, //是否正在拍照
  2718. photoConfig: false,
  2719. stream: null,
  2720. photoNum: 0,
  2721. playSectionId: 0,
  2722. photoIndex: 0, //当前位于拍照的区间下标 从0开始
  2723. photoHistoryList: [], //已拍照历史的下标点
  2724. moduleId: 0,
  2725. chapterId: 0,
  2726. menuTab: [],
  2727. lectureShow: true,
  2728. textarea: "",
  2729. textareaNote: "",
  2730. takePhotoModal: false,
  2731. activeName: "1",
  2732. courseId: "",
  2733. courseTabIndex: "1",
  2734. goodsId: "",
  2735. gradeId: "",
  2736. livingTimer: null,
  2737. sectionItem: {},
  2738. gradeDetail: {},
  2739. autoplay: false,
  2740. isAllowSeek: "on",
  2741. playbackRate: false,
  2742. goodsPlayConfig: null,
  2743. playTime: 0, //页面播放时长,不含暂停
  2744. param: {
  2745. pageNum: 1,
  2746. pageSize: 100,
  2747. total: 0,
  2748. },
  2749. postTimer: null, //提交视频观看记录定时器
  2750. lockTimer: null,
  2751. courseList: [],
  2752. businessData: {},
  2753. courseHandoutsData: "",
  2754. // menuList: [],
  2755. goodsData: {},
  2756. tabList: [],
  2757. historyChatMsgList: [],
  2758. vid: "",
  2759. vidzb: "",
  2760. player: "",
  2761. playerzb: "",
  2762. activeId: "", //当前选中ID
  2763. vodPlayerJs: "https://player.polyv.net/script/player.js",
  2764. playerJs:
  2765. "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
  2766. uidzb: "egsxlptzdq",
  2767. menuList: [],
  2768. reMenuList: [],
  2769. answerList: [{ newArraysAnswerList: [] }],
  2770. noteList: [],
  2771. photoList: [],
  2772. noteTotal: 0,
  2773. duration: 0,
  2774. answerTimer: null,
  2775. noteParams: {
  2776. pageNum: 1,
  2777. // pageSize: 4,
  2778. },
  2779. ossAvatarUrl: "", //照片地址
  2780. nowTime: 0,
  2781. faceUrl: "",
  2782. loading: null,
  2783. listData: [],
  2784. listDataStamp: [],
  2785. remark: "",
  2786. remarkStatus: false,
  2787. remarkStamp: "",
  2788. remarkStatusStamp: false,
  2789. errorType: ["message"],
  2790. stampForm: {
  2791. commitment_seal: "",
  2792. },
  2793. infoForm: {
  2794. name: "",
  2795. sex: "",
  2796. idcard: "",
  2797. telphone: "",
  2798. education: "",
  2799. school: "",
  2800. graduation_time: "",
  2801. work_unit: "",
  2802. unit_contact: "",
  2803. unit_tel: "",
  2804. apply_post: "",
  2805. major: "",
  2806. working_years: "",
  2807. recent_photos: "",
  2808. idcard_face_photo: "",
  2809. idcard_national_photo: "",
  2810. commitment_electr_signature: "",
  2811. commitment_seal: "",
  2812. },
  2813. needOpenNew: true,
  2814. recommendList: [],
  2815. rules: {
  2816. name: [
  2817. {
  2818. required: true,
  2819. message: "请输入姓名",
  2820. trigger: ["change", "blur"],
  2821. },
  2822. ],
  2823. sex: [
  2824. {
  2825. required: true,
  2826. message: "请选择性别",
  2827. trigger: "change",
  2828. },
  2829. ],
  2830. idcard: [
  2831. {
  2832. required: true,
  2833. message: "请输入身份证号",
  2834. trigger: ["change", "blur"],
  2835. },
  2836. // {
  2837. // validator: (rule, value, callback) => {
  2838. // let IDRe18 =
  2839. // /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  2840. // let IDre15 =
  2841. // /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
  2842. // if (!IDRe18.test(value) && !IDre15.test(value)) {
  2843. // return callback(new Error("请输入格式正确的身份证号"));
  2844. // } else {
  2845. // return callback();
  2846. // }
  2847. // },
  2848. // message: "请输入格式正确的身份证号",
  2849. // trigger: ["change", "blur"],
  2850. // },
  2851. ],
  2852. telphone: [
  2853. {
  2854. required: true,
  2855. message: "请输入手机号码",
  2856. trigger: ["change", "blur"],
  2857. },
  2858. // {
  2859. // validator: (rule, value, callback) => {
  2860. // var reg_tel =
  2861. // /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  2862. // if (reg_tel.test(value)) {
  2863. // return callback();
  2864. // } else {
  2865. // return callback(new Error("手机号码不正确"));
  2866. // }
  2867. // },
  2868. // trigger: ["change", "blur"],
  2869. // },
  2870. ],
  2871. education: [
  2872. {
  2873. required: true,
  2874. message: "请选择学历",
  2875. trigger: "change",
  2876. },
  2877. ],
  2878. school: [
  2879. {
  2880. required: true,
  2881. message: "请输入毕业院校",
  2882. trigger: ["change", "blur"],
  2883. },
  2884. ],
  2885. graduation_time: [
  2886. {
  2887. required: true,
  2888. message: "请选择毕业时间",
  2889. trigger: "change",
  2890. },
  2891. ],
  2892. work_unit: [
  2893. {
  2894. required: true,
  2895. message: "请输入工作单位",
  2896. trigger: ["change", "blur"],
  2897. },
  2898. ],
  2899. unit_contact: [
  2900. {
  2901. required: true,
  2902. message: "请输入单位联系人",
  2903. trigger: ["change", "blur"],
  2904. },
  2905. ],
  2906. unit_tel: [
  2907. {
  2908. required: true,
  2909. message: "请输入单位联系电话",
  2910. trigger: ["change", "blur"],
  2911. },
  2912. {
  2913. validator: (rule, value, callback) => {
  2914. var reg_tel =
  2915. /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  2916. var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
  2917. var vartest1 = /^([0-9]{3,4})?[0-9]{7,8}$/;
  2918. if (
  2919. reg_tel.test(value) ||
  2920. vartest.test(value) ||
  2921. vartest1.test(value)
  2922. ) {
  2923. return callback();
  2924. } else {
  2925. return callback(new Error("单位联系电话不正确"));
  2926. }
  2927. },
  2928. trigger: ["change", "blur"],
  2929. },
  2930. ],
  2931. apply_post: [
  2932. {
  2933. required: true,
  2934. message: "请输入报名岗位",
  2935. trigger: ["change", "blur"],
  2936. },
  2937. ],
  2938. major: [
  2939. {
  2940. required: true,
  2941. message: "请输入所学专业",
  2942. trigger: ["change", "blur"],
  2943. },
  2944. ],
  2945. working_years: [
  2946. {
  2947. required: true,
  2948. message: "请选择工作年限",
  2949. trigger: "change",
  2950. },
  2951. ],
  2952. recent_photos: [
  2953. {
  2954. required: true,
  2955. message: "请上传证件照",
  2956. trigger: ["change", "blur"],
  2957. },
  2958. ],
  2959. idcard_face_photo: [
  2960. {
  2961. required: true,
  2962. message: "请上传身份证人像面",
  2963. trigger: ["change", "blur"],
  2964. },
  2965. ],
  2966. idcard_national_photo: [
  2967. {
  2968. required: true,
  2969. message: "请上传身份证国徽面",
  2970. trigger: ["change", "blur"],
  2971. },
  2972. ],
  2973. commitment_electr_signature: [
  2974. {
  2975. required: true,
  2976. message: "请签写承诺书电子签",
  2977. trigger: ["change", "blur"],
  2978. },
  2979. ],
  2980. commitment_seal: [
  2981. {
  2982. required: true,
  2983. message: "请上传承诺书盖章",
  2984. trigger: ["change", "blur"],
  2985. },
  2986. ],
  2987. },
  2988. stampRules: {
  2989. commitment_seal: [
  2990. {
  2991. required: true,
  2992. message: "请上传承诺书盖章",
  2993. trigger: ["change", "blur"],
  2994. },
  2995. ],
  2996. },
  2997. fileList1: [], //证件照
  2998. fileList2: [], //人像
  2999. fileList3: [], //国徽
  3000. fileListStamp: [], //印章
  3001. dictObj: null,
  3002. isRequired: false,
  3003. uploading: false,
  3004. veryIdCard: "",
  3005. veryIdName: "",
  3006. isPlayRebuild: false,
  3007. showRecordStatus: false,
  3008. hasStart: false,
  3009. needOpen: true, //是否需要展开第一章节
  3010. menuIndex: [],
  3011. clickLock: false,
  3012. goodsTeacher: [],
  3013. teacherList: [],
  3014. liveLast: null,
  3015. apply_post_disabled: false,
  3016. disName: false, // 姓名是否禁止输入
  3017. disCard: false, // 身份证是否禁止输入
  3018. clickSectionItem: {}, // 点击节的内容
  3019. courseTotal: 0,
  3020. teaIndex: 0,
  3021. sectionExamList:[],//节试卷集合
  3022. sectionExam:[]//节试卷集合
  3023. };
  3024. },
  3025. computed: {
  3026. ...mapGetters(["userInfo"]),
  3027. compyRecommend: function () {
  3028. return function (array) {
  3029. let ary = [];
  3030. if (array) {
  3031. for (let i = 0; i < array.length; i++) {
  3032. if (i >= 5) {
  3033. break;
  3034. } else {
  3035. ary.push(array[i]);
  3036. }
  3037. }
  3038. }
  3039. return ary;
  3040. };
  3041. },
  3042. changeName: function () {
  3043. return function (id) {
  3044. var aryName = "";
  3045. for (let i = 0; i < this.courseList.length; i++) {
  3046. if (this.courseList[i].courseId == id) {
  3047. if (this.courseList[i].subjectName) {
  3048. aryName =
  3049. `【${this.courseList[i].subjectName}】 ` +
  3050. this.courseList[i].courseName;
  3051. } else {
  3052. aryName = this.courseList[i].courseName;
  3053. }
  3054. }
  3055. }
  3056. return aryName;
  3057. };
  3058. },
  3059. getCourseName: function () {
  3060. return function (id) {
  3061. var courseName = "";
  3062. for (let i = 0; i < this.courseList.length; i++) {
  3063. if (this.courseList[i].courseId == id) {
  3064. courseName = this.courseList[i].courseName;
  3065. break;
  3066. }
  3067. }
  3068. return courseName;
  3069. };
  3070. },
  3071. },
  3072. async mounted() {
  3073. this.courseId = +this.$route.query.courseId || "";
  3074. this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  3075. this.goodsId = this.$route.params.goodsId;
  3076. this.orderGoodsId = this.$route.query.orderGoodsId;
  3077. this.gradeId = this.$route.query.gradeId;
  3078. this.sectionItem = this.$route.query;
  3079. console.log('this.sectionItem', this.sectionItem)
  3080. let isOther = this.$route.query.isOther || "";
  3081. if (isOther) {
  3082. const confirmText = [
  3083. "您的学习账号已经开通,请按照步骤操作,进行学习。",
  3084. "1.点击【跳转学习网址】按钮",
  3085. "2.打开学习网址后,选择【个人用户】进行登录",
  3086. "(1)账号:您个人的身份证号码",
  3087. "(2)密码:身份证号码,再加111111",
  3088. ];
  3089. const newDatas = [];
  3090. const h = this.$createElement;
  3091. for (const i in confirmText) {
  3092. newDatas.push(h("p", null, confirmText[i]));
  3093. }
  3094. this.$confirm(h("div", null, newDatas), "温馨提示", {
  3095. beforeClose: (type) => {
  3096. if (type == "confirm") {
  3097. window.open("http://admin.zhujianpeixun.com/", "_blank");
  3098. } else if (type == "cancel") {
  3099. this.$router.back(-1);
  3100. }
  3101. },
  3102. confirmButtonText: "跳转学习网址",
  3103. cancelButtonText: "关闭",
  3104. closeOnClickModal: false,
  3105. closeOnPressEscape: false,
  3106. distinguishCancelAndClose: false,
  3107. showClose: false,
  3108. });
  3109. return;
  3110. }
  3111. if (this.$route.query.rebuild) {
  3112. this.courseTabIndex = "2";
  3113. }
  3114. await this.getGoodsDetail(); //商品详情
  3115. this.dictList();
  3116. // this.userConfirmInfoDetail().then((res) => {
  3117. this.getbaseprofiletplists().then(async (res) => {
  3118. // let allMenuList = await this.studyRecordMenuAllList();
  3119. // let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  3120. // let liveMenu = allMenuList.filter((item) => {
  3121. // //获取直播中的视频
  3122. // if (
  3123. // item.type == 3 &&
  3124. // item.liveStartTime <= nowTime &&
  3125. // item.liveEndTime > nowTime
  3126. // ) {
  3127. // return true;
  3128. // } else {
  3129. // return false;
  3130. // }
  3131. // });
  3132. // let earlyTime = 0;
  3133. // if (liveMenu && liveMenu.length) {
  3134. // earlyTime = liveMenu[0].liveStartTime;
  3135. // }
  3136. await this.courseCourseList();
  3137. if (this.sectionItem.recordingUrl) {
  3138. return;
  3139. let noteSecond = this.$route.query.noteSecond;
  3140. if (noteSecond > 0) {
  3141. let item = {
  3142. sectionId: this.$route.query.sectionId,
  3143. recordingUrl: this.$route.query.recordingUrl,
  3144. noteSecond: noteSecond,
  3145. studyDuration: noteSecond,
  3146. moduleId: this.$route.query.moduleId,
  3147. chapterId: this.$route.query.chapterId,
  3148. };
  3149. this.playSectionId = this.$route.query.sectionId;
  3150. setTimeout(() => {
  3151. this.noteClick(item);
  3152. }, 1000);
  3153. }
  3154. } else {
  3155. // this.studyRecordQueryLiveLast();
  3156. }
  3157. // let noteSecond = this.$route.query.noteSecond;
  3158. // if (noteSecond > 0) {
  3159. // let item = {
  3160. // sectionId: this.$route.query.sectionId,
  3161. // recordingUrl: this.$route.query.recordingUrl,
  3162. // noteSecond: noteSecond,
  3163. // studyDuration: noteSecond,
  3164. // moduleId: this.$route.query.moduleId,
  3165. // chapterId: this.$route.query.chapterId,
  3166. // };
  3167. // this.sectionItem = item;
  3168. // this.playSectionId = this.$route.query.sectionId;
  3169. // setTimeout(() => {
  3170. // this.noteClick(item);
  3171. // }, 1000);
  3172. // }
  3173. });
  3174. // });
  3175. },
  3176. beforeDestroy() {
  3177. clearInterval(this.answerTimer);
  3178. clearInterval(this.postTimer);
  3179. clearInterval(this.livingTimer);
  3180. try {
  3181. this.$msgbox.close();
  3182. } catch (err) {}
  3183. if (this.playSectionId && this.hasStart) {
  3184. this.postStudyRecord();
  3185. }
  3186. // if (this.lockTimer) {
  3187. // clearInterval(this.lockTimer);
  3188. // this.$request
  3189. // .lockDelLock({
  3190. // action: "jxjy",
  3191. // })
  3192. // .then((res) => {});
  3193. // }
  3194. this.clears();
  3195. // clearInterval(this.answerTimer);
  3196. // clearInterval(this.postTimer);
  3197. // clearInterval(this.livingTimer);
  3198. },
  3199. methods: {
  3200. ...mapMutations(["getCartCount"]),
  3201. ...mapActions(["getUserInfo"]),
  3202. openChangeCourseBoxs() {
  3203. this.dialogVisible = true;
  3204. },
  3205. handleClick(tab) {
  3206. if (tab.name == '3') {
  3207. this.getAnswerList() //答疑列表
  3208. }
  3209. },
  3210. /**
  3211. * 确定选中
  3212. */
  3213. activeFunc(item, index) {
  3214. console.log('------', item, index)
  3215. this.teaIndex = index || 0
  3216. this.courseId = item;
  3217. this.courseChange();
  3218. this.dialogVisible = false;
  3219. },
  3220. isLast(item) {
  3221. if (this.liveLast) {
  3222. let sectionASame =
  3223. this.liveLast.sectionId == (item.sectionId || item.menuId);
  3224. let chapterSame = this.liveLast.chapterId == (item.chapterId || 0);
  3225. let moduleSame = this.liveLast.moduleId == (item.moduleId || 0);
  3226. return sectionASame && chapterSame && moduleSame;
  3227. } else {
  3228. return false;
  3229. }
  3230. },
  3231. /**
  3232. * 获取上次观看的直播
  3233. */
  3234. studyRecordGetLastLive() {
  3235. this.$request
  3236. .studyRecordGetLastLive({
  3237. orderGoodsId: this.orderGoodsId,
  3238. courseId: this.courseId,
  3239. })
  3240. .then((res) => {
  3241. this.liveLast = res.data;
  3242. });
  3243. },
  3244. //校验节是否有试卷
  3245. checkSection(item){
  3246. console.log(this.sectionExam,item,'00000000');
  3247. if(this.sectionExam.length == 0){
  3248. return false
  3249. }
  3250. if(this.sectionExam.some((section) => section.sectionId == item.sectionId)){
  3251. return true
  3252. }else{
  3253. return false
  3254. }
  3255. },
  3256. /**
  3257. * 获取观看记录
  3258. */
  3259. studyRecordQueryLiveLast() {
  3260. return new Promise((resolve, reject) => {
  3261. this.$request
  3262. .studyRecordQueryLiveLast({
  3263. orderGoodsId: this.orderGoodsId,
  3264. courseId: this.courseId,
  3265. })
  3266. .then((res) => {
  3267. console.log(res, "couse");
  3268. if (res.data) {
  3269. if (res.data.sectionType == 1) {
  3270. //录播
  3271. this.chapterId = res.data.chapterId;
  3272. this.moduleId = res.data.moduleId;
  3273. this.playSectionId = res.data.sectionId;
  3274. this.vid = res.data.recordingUrl;
  3275. this.sectionItem = res.data;
  3276. console.log('================sectionItem', this.sectionItem)
  3277. this.playVideo(res.data);
  3278. } else if (res.data.sectionType == 2) {
  3279. //直播
  3280. this.studyRecordGetLastLive();
  3281. } else if (res.data.sectionType == 3) {
  3282. //回放
  3283. this.chapterId = res.data.chapterId;
  3284. this.moduleId = res.data.moduleId;
  3285. this.playSectionId = res.data.sectionId;
  3286. this.vid = res.data.recordingUrl;
  3287. this.sectionItem = res.data;
  3288. this.playVideo(res.data);
  3289. }
  3290. if (res.data.sectionId > 0) {
  3291. resolve(true);
  3292. } else {
  3293. resolve(false);
  3294. }
  3295. } else {
  3296. resolve(false);
  3297. }
  3298. });
  3299. });
  3300. },
  3301. /**
  3302. *
  3303. 获取推荐列表
  3304. */
  3305. getRecommend() {
  3306. this.$request
  3307. .appCommonActivityRecommendList({
  3308. businessId: this.goodsData.businessId,
  3309. type: 1,
  3310. })
  3311. .then((res) => {
  3312. if (res.rows.length) {
  3313. this.recommendList = res.rows[0];
  3314. }
  3315. });
  3316. },
  3317. addCart(status, goodsId) {
  3318. this.$request
  3319. .addCart({ goodsId: status ? goodsId : this.goodsId })
  3320. .then((res) => {
  3321. this.getCartCount();
  3322. this.$message({
  3323. message: "加入购物车成功",
  3324. type: "success",
  3325. });
  3326. })
  3327. .catch((err) => {
  3328. if (err.code == 500) {
  3329. this.$message({
  3330. message: err.msg,
  3331. type: "warning",
  3332. });
  3333. }
  3334. });
  3335. },
  3336. toGoodsDetail(item) {
  3337. this.$router.push({
  3338. path: "/course-detail/" + item.goodsId,
  3339. });
  3340. },
  3341. async takeOk() {
  3342. this.loading = true;
  3343. let compareFaceData = await this.faceRecognition();
  3344. if (compareFaceData >= 80) {
  3345. const waitYS = await this.imageInfos();
  3346. this.postCoursePhotoRecord()
  3347. .then((res) => {
  3348. this.photoHistoryList.push(this.photoIndex);
  3349. this.postStudyRecord(); //提交记录
  3350. //恢复播放
  3351. this.$message({
  3352. type: "success",
  3353. message: "拍照成功",
  3354. });
  3355. this.takePhotoModal = false;
  3356. this.isTaking = false;
  3357. this.loading = false;
  3358. var polyvPlayerContext = this.player;
  3359. if (polyvPlayerContext) {
  3360. polyvPlayerContext.j2s_resumeVideo();
  3361. }
  3362. var polyvPlayerContext = this.playerzb;
  3363. if (polyvPlayerContext) {
  3364. polyvPlayerContext.j2s_resumeVideo();
  3365. }
  3366. })
  3367. .catch((err) => {
  3368. this.loading = false;
  3369. console.log(err, "err");
  3370. this.$message({
  3371. type: "warning",
  3372. message: "上传接口报错,请重新拍照上传",
  3373. });
  3374. this.reTake();
  3375. });
  3376. } else {
  3377. this.$message({
  3378. type: "warning",
  3379. message: "人脸匹配不通过,请重新拍照上传",
  3380. });
  3381. setTimeout(() => {
  3382. this.loading = false;
  3383. this.reTake();
  3384. }, 2000);
  3385. return;
  3386. }
  3387. },
  3388. changePhotoListStamp(params, fileList) {
  3389. const file = params.raw;
  3390. const fileType = file.type;
  3391. const isImage = fileType.indexOf("image") != -1;
  3392. const isLt2M = file.size / 1024 / 1024 < 2;
  3393. // 这里常规检验,看项目需求而定
  3394. if (!isImage) {
  3395. this.$message.error("只能上传图片格式png、jpg、gif!");
  3396. return;
  3397. }
  3398. if (!isLt2M) {
  3399. this.$message.error("只能上传图片大小小于2M");
  3400. return;
  3401. }
  3402. if (fileList.length == 1) {
  3403. fileList.splice(0, 1);
  3404. }
  3405. this.$refs.stamp[0].clearFiles();
  3406. this.$upload
  3407. .upload(file, 0)
  3408. .then((res) => {
  3409. this.$set(this.infoForm, "commitment_seal", res);
  3410. this.fileListStamp = [
  3411. {
  3412. name: res,
  3413. url: res,
  3414. },
  3415. ];
  3416. this.$refs.stamp[0].clearFiles();
  3417. console.log(res);
  3418. })
  3419. .catch((err) => {
  3420. this.$refs.stamp[0].clearFiles();
  3421. });
  3422. },
  3423. // 页面加载成功 当前页数
  3424. pageLoaded(e) {
  3425. this.$emit("current", e);
  3426. this.curPageNum = e;
  3427. },
  3428. changePhotoListHeader1(params, fileList) {
  3429. console.log(params);
  3430. const file = params.raw;
  3431. const fileType = file.type;
  3432. const isImage = fileType.indexOf("image") != -1;
  3433. const isLt2M = file.size / 1024 / 1024 < 2;
  3434. // 这里常规检验,看项目需求而定
  3435. if (!isImage) {
  3436. this.$message.error("只能上传图片格式png、jpg、gif!");
  3437. return;
  3438. }
  3439. if (!isLt2M) {
  3440. this.$message.error("只能上传图片大小小于2M");
  3441. return;
  3442. }
  3443. if (fileList.length == 1) {
  3444. fileList.splice(0, 1);
  3445. }
  3446. this.$refs.recent_photos[0].clearFiles();
  3447. this.$upload
  3448. .upload(file, 0)
  3449. .then((res) => {
  3450. this.$set(this.infoForm, "recent_photos", res);
  3451. this.fileList1 = [
  3452. {
  3453. name: res,
  3454. url: res,
  3455. },
  3456. ];
  3457. this.$refs.recent_photos[0].clearFiles();
  3458. console.log(res);
  3459. })
  3460. .catch((err) => {
  3461. this.$refs.recent_photos[0].clearFiles();
  3462. });
  3463. },
  3464. async changePhotoListHeader2(params, fileList) {
  3465. const file = params.raw;
  3466. const fileType = file.type;
  3467. const isImage = fileType.indexOf("image") != -1;
  3468. const isLt2M = file.size / 1024 / 1024 < 2;
  3469. // 这里常规检验,看项目需求而定
  3470. if (!isImage) {
  3471. this.$message.error("只能上传图片格式png、jpg、gif!");
  3472. return;
  3473. }
  3474. if (!isLt2M) {
  3475. this.$message.error("只能上传图片大小小于2M");
  3476. return;
  3477. }
  3478. if (fileList.length == 1) {
  3479. fileList.splice(0, 1);
  3480. }
  3481. let res = await this.faceCertificationIDCardOCR(1, file)
  3482. if (res.code == 500) {
  3483. this.$message.warning("请上传正确清晰的身份证人像面照片");
  3484. return;
  3485. }
  3486. this.$refs.idcard_face_photo[0].clearFiles();
  3487. this.$set(this.infoForm, "idcard_face_photo", res.data.IdImgPath);
  3488. this.fileList2 = [
  3489. {
  3490. name: res.data.IdImgPath,
  3491. url: res.data.IdImgPath,
  3492. },
  3493. ];
  3494. // this.$upload
  3495. // .upload(file, 0)
  3496. // .then((res) => {
  3497. // console.log(res, "res");
  3498. // this.$set(this.infoForm, "idcard_face_photo", res);
  3499. // this.fileList2 = [
  3500. // {
  3501. // name: res,
  3502. // url: res,
  3503. // },
  3504. // ];
  3505. // this.$refs.idcard_face_photo[0].clearFiles();
  3506. // console.log(res);
  3507. // })
  3508. // .catch((err) => {
  3509. // this.$refs.idcard_face_photo[0].clearFiles();
  3510. // });
  3511. },
  3512. async changePhotoListHeader3(params, fileList) {
  3513. const file = params.raw;
  3514. const fileType = file.type;
  3515. const isImage = fileType.indexOf("image") != -1;
  3516. const isLt2M = file.size / 1024 / 1024 < 2;
  3517. // 这里常规检验,看项目需求而定
  3518. if (!isImage) {
  3519. this.$message.error("只能上传图片格式png、jpg、gif!");
  3520. return;
  3521. }
  3522. if (!isLt2M) {
  3523. this.$message.error("只能上传图片大小小于2M");
  3524. return;
  3525. }
  3526. if (fileList.length == 1) {
  3527. fileList.splice(0, 1);
  3528. }
  3529. let res = await this.faceCertificationIDCardOCR(2, file);
  3530. if (res.code == 500) {
  3531. this.$message.warning("请上传正确清晰的身份证国徽面照片");
  3532. return;
  3533. }
  3534. this.$refs.idcard_national_photo[0].clearFiles();
  3535. this.$set(this.infoForm, "idcard_national_photo", res.data.IdImgPath);
  3536. this.fileList3 = [
  3537. {
  3538. name: res.data.IdImgPath,
  3539. url: res.data.IdImgPath,
  3540. },
  3541. ];
  3542. // this.$upload
  3543. // .upload(file, 0)
  3544. // .then((res) => {
  3545. // this.$set(this.infoForm, "idcard_national_photo", res);
  3546. // this.fileList3 = [
  3547. // {
  3548. // name: res,
  3549. // url: res,
  3550. // },
  3551. // ];
  3552. // this.$refs.idcard_national_photo[0].clearFiles();
  3553. // console.log(res);
  3554. // })
  3555. // .catch((err) => {
  3556. // this.$refs.idcard_national_photo[0].clearFiles();
  3557. // });
  3558. },
  3559. faceCertificationIDCardOCR(cardSide, file) {
  3560. return new Promise((resolve) => {
  3561. var reader = new FileReader();
  3562. // 将文件加载进入
  3563. reader.readAsDataURL(file);
  3564. reader.onload = (e) => {
  3565. // 转换完成输出该文件base64编码
  3566. let base64 = e.target.result;
  3567. this.$request
  3568. .faceCertificationIDCardOCR({
  3569. cardSide: cardSide, //1人像 2 国徽
  3570. cardImageBase64: base64,
  3571. gradeId: this.gradeId,
  3572. })
  3573. .then((res) => {
  3574. resolve(res);
  3575. })
  3576. .catch((err) => {
  3577. resolve(err);
  3578. });
  3579. };
  3580. });
  3581. },
  3582. async submit() {
  3583. if (this.uploading) {
  3584. return;
  3585. }
  3586. this.uploading = true;
  3587. var ast = this.listData.some((item) => {
  3588. return item.fieldKey === "commitment_electr_signature";
  3589. });
  3590. if (ast) {
  3591. await this.subCanvas();
  3592. }
  3593. this.resultForm();
  3594. },
  3595. stampSubmit() {
  3596. if (this.uploading) {
  3597. return;
  3598. }
  3599. this.uploading = true;
  3600. this.stampResultForm();
  3601. },
  3602. backLI() {
  3603. this.player.j2s_seekVideo(0);
  3604. this.showRecordStatus = false;
  3605. },
  3606. //验证表单
  3607. stampResultForm() {
  3608. for (let i = 0; i < this.listDataStamp.length; i++) {
  3609. if (
  3610. this.listDataStamp[i].fieldKey === "commitment_seal" &&
  3611. !this.listDataStamp[i].required
  3612. ) {
  3613. this.submitApi();
  3614. return;
  3615. }
  3616. }
  3617. this.$refs.stampForm.validate((valid) => {
  3618. if (valid) {
  3619. this.submitApiStamp();
  3620. } else {
  3621. this.uploading = false;
  3622. }
  3623. });
  3624. },
  3625. async submitApiStamp() {
  3626. var data = JSON.parse(JSON.stringify(this.stampForm));
  3627. if (data["commitment_seal"]) {
  3628. data.commitment_seal = await this.$upload.upload(
  3629. data.commitment_seal,
  3630. 0
  3631. );
  3632. }
  3633. this.optionChanges(data);
  3634. },
  3635. optionChanges(data) {
  3636. var self = this;
  3637. var objs = {};
  3638. for (let k in data) {
  3639. objs[k] = {
  3640. fieldKey: k,
  3641. value: data[k],
  3642. fieldName: (function () {
  3643. for (let i = 0; i < self.listDataStamp.length; i++) {
  3644. if (self.listDataStamp[i].fieldKey == k) {
  3645. return self.listDataStamp[i].fieldName;
  3646. }
  3647. }
  3648. })(),
  3649. status: self.remarkStatusStamp ? 1 : 0,
  3650. };
  3651. }
  3652. var datas = {
  3653. orderGoodsId: this.orderGoodsId,
  3654. goodsId: self.goodsId,
  3655. keyValue: JSON.stringify(objs),
  3656. };
  3657. if (self.remarkStatus) {
  3658. datas.id = self.id;
  3659. self.$request.editbaseprofileStamp(datas).then((res) => {
  3660. this.uploading = false;
  3661. this.getUserInfo();
  3662. this.showStampDetailModail = false;
  3663. this.$message.success("提交成功");
  3664. });
  3665. } else {
  3666. self.$request.addbaseprofileStamp(datas).then((res) => {
  3667. this.uploading = false;
  3668. this.getUserInfo();
  3669. this.showStampDetailModail = false;
  3670. this.$message.success("提交成功");
  3671. });
  3672. }
  3673. },
  3674. resultForm() {
  3675. console.log(1);
  3676. if (this.isRequired) {
  3677. this.submitApi();
  3678. } else {
  3679. console.log(1);
  3680. this.$refs.infoForm.validate((valid) => {
  3681. console.log(1);
  3682. if (valid) {
  3683. this.submitApi();
  3684. } else {
  3685. this.uploading = false;
  3686. }
  3687. });
  3688. // if (int === 1) {
  3689. // this.errorType = ["toast"];
  3690. // } else {
  3691. // this.errorType = ["message"];
  3692. // }
  3693. }
  3694. },
  3695. async submitApi() {
  3696. console.log(this.infoForm, "999");
  3697. var data = JSON.parse(JSON.stringify(this.infoForm));
  3698. if (data["sex"]) {
  3699. data.sex = this.dictObj["sys_user_sex"][Number(data.sex)];
  3700. }
  3701. if (data["education"]) {
  3702. data.education = this.dictObj["edu_level"][Number(data.education)];
  3703. }
  3704. if (data["working_years"]) {
  3705. data.working_years =
  3706. this.dictObj["working_years"][Number(data.working_years)];
  3707. }
  3708. if (data["recent_photos"]) {
  3709. data.recent_photos = await this.$upload.upload(data.recent_photos, 0);
  3710. }
  3711. if (data["idcard_face_photo"]) {
  3712. data.idcard_face_photo = await this.$upload.upload(
  3713. data.idcard_face_photo,
  3714. 0
  3715. );
  3716. }
  3717. if (data["idcard_national_photo"]) {
  3718. data.idcard_national_photo = await this.$upload.upload(
  3719. data.idcard_national_photo,
  3720. 0
  3721. );
  3722. }
  3723. if (data["commitment_electr_signature"]) {
  3724. data.commitment_electr_signature = await this.$upload.upload(
  3725. data.commitment_electr_signature,
  3726. 0
  3727. );
  3728. }
  3729. this.uploadDatas(data);
  3730. },
  3731. async downloadStamp(item) {
  3732. let self = this;
  3733. var ast = this.listData.some((item) => {
  3734. return item.fieldKey === "commitment_electr_signature";
  3735. });
  3736. if (ast) {
  3737. await this.subCanvas();
  3738. }
  3739. let data = JSON.parse(JSON.stringify(this.infoForm));
  3740. if (data["sex"]) {
  3741. data.sex = this.dictObj["sys_user_sex"][Number(data.sex)];
  3742. }
  3743. if (data["education"]) {
  3744. data.education = this.dictObj["edu_level"][Number(data.education)];
  3745. }
  3746. if (data["working_years"]) {
  3747. data.working_years =
  3748. this.dictObj["working_years"][Number(data.working_years)];
  3749. }
  3750. console.log(data, "data");
  3751. if (this.remarkStatus) {
  3752. var arsty = {};
  3753. for (let k in data) {
  3754. for (let j in self.copyData) {
  3755. if (k === j) {
  3756. if (self.copyData[j].value === data[k]) {
  3757. arsty[k] = {
  3758. fieldKey: k,
  3759. value: data[k],
  3760. fieldName: (function () {
  3761. for (let i = 0; i < self.listData.length; i++) {
  3762. if (self.listData[i].fieldKey == k) {
  3763. return self.listData[i].fieldName;
  3764. }
  3765. }
  3766. })(),
  3767. status: 0,
  3768. };
  3769. } else {
  3770. arsty[k] = {
  3771. fieldKey: k,
  3772. value: data[k],
  3773. fieldName: (function () {
  3774. for (let i = 0; i < self.listData.length; i++) {
  3775. if (self.listData[i].fieldKey == k) {
  3776. return self.listData[i].fieldName;
  3777. }
  3778. }
  3779. })(),
  3780. status: 1,
  3781. };
  3782. }
  3783. }
  3784. }
  3785. }
  3786. } else {
  3787. var arsty = {};
  3788. for (let k in data) {
  3789. arsty[k] = {
  3790. fieldKey: k,
  3791. value: data[k],
  3792. fieldName: (function () {
  3793. for (let i = 0; i < self.listData.length; i++) {
  3794. if (self.listData[i].fieldKey == k) {
  3795. return self.listData[i].fieldName;
  3796. }
  3797. }
  3798. })(),
  3799. status: 0,
  3800. };
  3801. }
  3802. }
  3803. console.log(arsty, "arsty");
  3804. this.$request
  3805. .baseProfileStampV2AddWord({
  3806. goodsId: this.goodsId,
  3807. keyValue: JSON.stringify(arsty),
  3808. })
  3809. .then((res) => {
  3810. let url = this.$tools.splitImgHost(res.msg);
  3811. let name = res.msg.substring(res.msg.lastIndexOf("/") + 1);
  3812. let image = new Image();
  3813. // 解决跨域 Canvas 污染问题,
  3814. image.setAttribute("crossorigin", "anonymous");
  3815. image.onload = function () {
  3816. var canvas = document.createElement("canvas");
  3817. canvas.width = image.width;
  3818. canvas.height = image.height;
  3819. var context = canvas.getContext("2d");
  3820. context.drawImage(image, 0, 0, image.width, image.height);
  3821. var base64 = canvas.toDataURL("image/jpg"); //将图片格式转为base64
  3822. var a = document.createElement("a"); // 生成一个a元素
  3823. var event = new MouseEvent("click"); // 创建一个单击事件
  3824. a.download = name; // 设置图片名称
  3825. console.log(base64);
  3826. a.href = base64; // 将生成的URL设置为a.href属性
  3827. a.dispatchEvent(event); // 触发a的单击事件
  3828. };
  3829. image.src = url + "?time=" + Date.now(); //注意,这里是灵魂,否则依旧会产生跨域问题
  3830. });
  3831. },
  3832. convertBase64UrlToBlob(urlData) {
  3833. var localData = urlData; //dataUrl为base64位
  3834. let base = atob(localData.substring(localData.indexOf(",") + 1)); // base是将base64编码解码,去掉data:image/png;base64部分
  3835. let length = base.length;
  3836. let url = new Uint8Array(length);
  3837. while (length--) {
  3838. url[length] = base.charCodeAt(length);
  3839. }
  3840. let file = new File([url], "a.jpg", {
  3841. type: "image/jpg",
  3842. });
  3843. //最后将file,通过ajax请求做为参数传给服务器就可以了
  3844. return file;
  3845. },
  3846. async uploadDatas(data) {
  3847. let self = this;
  3848. if (this.infoForm.recent_photos && this.infoForm.idcard_face_photo) {
  3849. let base = await this.$tools.imageToBase64(
  3850. this.$tools.splitImgHost(this.infoForm.idcard_face_photo)
  3851. );
  3852. console.log(base);
  3853. console.log(this.$tools.splitImgHost(this.infoForm.idcard_face_photo));
  3854. let resData = {};
  3855. try {
  3856. resData = await this.$request.faceCertificationIDCardOCR({
  3857. cardSide: 1, //1人像 2 国徽
  3858. cardImageBase64: base,
  3859. gradeId: this.gradeId,
  3860. });
  3861. } catch (err) {
  3862. self.$message.warning("身份证人像面照片异常,请重新上传");
  3863. self.uploading = false;
  3864. return;
  3865. }
  3866. if (!resData.data) {
  3867. this.$message.warning("身份证人像面照片异常,请重新上传");
  3868. this.uploading = false;
  3869. return;
  3870. }
  3871. this.veryIdCard = resData.data.IdNum;
  3872. this.veryIdName = resData.data.IdName;
  3873. // if (this.infoForm.idcard) {
  3874. // if (this.infoForm.idcard != this.veryIdCard) {
  3875. // this.$message.warning(
  3876. // "输入的身份证号和身份证人像面照片身份证号不匹配"
  3877. // );
  3878. // this.uploading = false;
  3879. // return;
  3880. // }
  3881. // }
  3882. let base64 = await this.$tools.imageToBase64(
  3883. this.$tools.splitImgHost(this.infoForm.recent_photos)
  3884. );
  3885. let newData = {
  3886. urlA: this.infoForm.idcard_face_photo,
  3887. oneInchPhotos: base64,
  3888. };
  3889. this.$request
  3890. .faceCertificationIdCardCompareFace(newData)
  3891. .then((res1) => {
  3892. if (res1.data >= 70) {
  3893. var self = this;
  3894. if (self.remarkStatus) {
  3895. var arsty = {};
  3896. for (let k in data) {
  3897. for (let j in self.copyData) {
  3898. if (k === j) {
  3899. if (self.copyData[j].value === data[k]) {
  3900. arsty[k] = {
  3901. fieldKey: k,
  3902. value: data[k],
  3903. fieldName: (function () {
  3904. for (let i = 0; i < self.listData.length; i++) {
  3905. if (self.listData[i].fieldKey == k) {
  3906. return self.listData[i].fieldName;
  3907. }
  3908. }
  3909. })(),
  3910. status: 0,
  3911. };
  3912. } else {
  3913. arsty[k] = {
  3914. fieldKey: k,
  3915. value: data[k],
  3916. fieldName: (function () {
  3917. for (let i = 0; i < self.listData.length; i++) {
  3918. if (self.listData[i].fieldKey == k) {
  3919. return self.listData[i].fieldName;
  3920. }
  3921. }
  3922. })(),
  3923. status: 1,
  3924. };
  3925. }
  3926. }
  3927. }
  3928. }
  3929. var datas = {
  3930. id: this.id,
  3931. goodsId: this.goodsId,
  3932. orderGoodsId: this.orderGoodsId,
  3933. keyValue: JSON.stringify(arsty),
  3934. };
  3935. this.$request
  3936. .editbaseprofiletp(datas)
  3937. .then((res) => {
  3938. this.uploading = false;
  3939. this.courseCourseList();
  3940. this.getUserInfo();
  3941. this.$message.success("提交成功");
  3942. this.showInfoDetailModal = false;
  3943. this.showAgreementModal = false;
  3944. })
  3945. .catch((err) => {
  3946. this.$message.warning(err.msg);
  3947. this.uploading = false;
  3948. });
  3949. } else {
  3950. var objs = {};
  3951. for (let k in data) {
  3952. objs[k] = {
  3953. fieldKey: k,
  3954. value: data[k],
  3955. fieldName: (function () {
  3956. for (let i = 0; i < self.listData.length; i++) {
  3957. if (self.listData[i].fieldKey == k) {
  3958. return self.listData[i].fieldName;
  3959. }
  3960. }
  3961. })(),
  3962. status: 0,
  3963. };
  3964. }
  3965. var datas = {
  3966. goodsId: this.goodsId,
  3967. profileTpId: this.goodsId,
  3968. orderGoodsId: this.orderGoodsId,
  3969. keyValue: JSON.stringify(objs),
  3970. };
  3971. this.$request
  3972. .addbaseprofiletp(datas)
  3973. .then((res) => {
  3974. this.uploading = false;
  3975. this.courseCourseList();
  3976. this.getUserInfo();
  3977. this.$message.success("提交成功");
  3978. this.showInfoDetailModal = false;
  3979. this.showAgreementModal = false;
  3980. })
  3981. .catch((err) => {
  3982. this.$message.warning(err.msg);
  3983. this.uploading = false;
  3984. });
  3985. }
  3986. } else {
  3987. this.uploading = false;
  3988. this.$message.warning("证件照和身份证人像面照片不匹配");
  3989. }
  3990. })
  3991. .catch((err) => {
  3992. this.uploading = false;
  3993. this.$message.warning(err.msg);
  3994. });
  3995. return;
  3996. }
  3997. if (self.remarkStatus) {
  3998. var arsty = {};
  3999. for (let k in data) {
  4000. for (let j in self.copyData) {
  4001. if (k === j) {
  4002. if (self.copyData[j].value === data[k]) {
  4003. arsty[k] = {
  4004. fieldKey: k,
  4005. value: data[k],
  4006. fieldName: (function () {
  4007. for (let i = 0; i < self.listData.length; i++) {
  4008. if (self.listData[i].fieldKey == k) {
  4009. return self.listData[i].fieldName;
  4010. }
  4011. }
  4012. })(),
  4013. status: 0,
  4014. };
  4015. } else {
  4016. arsty[k] = {
  4017. fieldKey: k,
  4018. value: data[k],
  4019. fieldName: (function () {
  4020. for (let i = 0; i < self.listData.length; i++) {
  4021. if (self.listData[i].fieldKey == k) {
  4022. return self.listData[i].fieldName;
  4023. }
  4024. }
  4025. })(),
  4026. status: 1,
  4027. };
  4028. }
  4029. }
  4030. }
  4031. }
  4032. var datas = {
  4033. id: this.id,
  4034. goodsId: this.goodsId,
  4035. orderGoodsId: this.orderGoodsId,
  4036. keyValue: JSON.stringify(arsty),
  4037. };
  4038. this.$request
  4039. .editbaseprofiletp(datas)
  4040. .then((res) => {
  4041. this.uploading = false;
  4042. this.courseCourseList();
  4043. this.getUserInfo();
  4044. this.$message.success("提交成功");
  4045. this.showInfoDetailModal = false;
  4046. this.showAgreementModal = false;
  4047. })
  4048. .catch((err) => {
  4049. this.$message.warning(err.msg);
  4050. this.uploading = false;
  4051. });
  4052. } else {
  4053. var objs = {};
  4054. for (let k in data) {
  4055. objs[k] = {
  4056. fieldKey: k,
  4057. value: data[k],
  4058. fieldName: (function () {
  4059. for (let i = 0; i < self.listData.length; i++) {
  4060. if (self.listData[i].fieldKey == k) {
  4061. return self.listData[i].fieldName;
  4062. }
  4063. }
  4064. })(),
  4065. status: 0,
  4066. };
  4067. }
  4068. var datas = {
  4069. goodsId: this.goodsId,
  4070. profileTpId: this.goodsId,
  4071. orderGoodsId: this.orderGoodsId,
  4072. keyValue: JSON.stringify(objs),
  4073. };
  4074. this.$request
  4075. .addbaseprofiletp(datas)
  4076. .then((res) => {
  4077. this.uploading = false;
  4078. this.courseCourseList();
  4079. this.getUserInfo();
  4080. this.$message.success("提交成功");
  4081. this.showInfoDetailModal = false;
  4082. this.showAgreementModal = false;
  4083. })
  4084. .catch((err) => {
  4085. this.$message.warning(err.msg);
  4086. this.uploading = false;
  4087. });
  4088. }
  4089. },
  4090. subCanvas() {
  4091. return new Promise((resolve, reject) => {
  4092. var self = this;
  4093. if (self.infoForm.commitment_electr_signature) {
  4094. resolve();
  4095. return;
  4096. }
  4097. this.$refs.esign[0]
  4098. .generate() // 使用生成器调用把签字的图片转换成为base64图片格式
  4099. .then(async (res) => {
  4100. let url = await this.$upload.upload(
  4101. this.convertBase64UrlToBlob(res),
  4102. 0
  4103. );
  4104. this.$set(this.infoForm, "commitment_electr_signature", url);
  4105. resolve();
  4106. })
  4107. .catch((err) => {
  4108. console.log(err, "err");
  4109. // 画布没有签字时会执行这里提示一下
  4110. // this.uploading = false;
  4111. // this.$message({
  4112. // type: "warning",
  4113. // message: "请签名后再生成签字图片",
  4114. // });
  4115. resolve();
  4116. });
  4117. });
  4118. },
  4119. imageInfos() {
  4120. var self = this;
  4121. return new Promise(async (resolve, reject) => {
  4122. const waitUpload = await self.uploadFile(self.faceUrl, 0);
  4123. resolve(waitUpload);
  4124. });
  4125. },
  4126. getarrays(key) {
  4127. if (key === "sex") {
  4128. return this.dictObj["sys_user_sex"];
  4129. }
  4130. if (key === "education") {
  4131. return this.dictObj["edu_level"];
  4132. }
  4133. if (key === "working_years") {
  4134. return this.dictObj["working_years"];
  4135. }
  4136. },
  4137. dictList() {
  4138. this.$request.dictList().then((res) => {
  4139. if (res.code === 200) {
  4140. let newList = {};
  4141. let list = res.data;
  4142. for (let i = 0; i < list.length; i++) {
  4143. let item = list[i];
  4144. if (newList.hasOwnProperty(item.dictType)) {
  4145. newList[item.dictType].push(item.dictLabel);
  4146. } else {
  4147. newList[item.dictType] = [item.dictLabel];
  4148. }
  4149. }
  4150. this.dictObj = newList;
  4151. }
  4152. });
  4153. },
  4154. getbaseprofiletplists() {
  4155. return new Promise((resolve) => {
  4156. let self = this;
  4157. this.$request
  4158. .getbaseprofiletplists({
  4159. goodsId: this.goodsId,
  4160. orderGoodsId: this.orderGoodsId || "",
  4161. })
  4162. .then((res) => {
  4163. if (res.code === 200 && res.rows.length) {
  4164. console.log(1);
  4165. if (res.rows[0].keyValue) {
  4166. console.log(2);
  4167. self.$request
  4168. .getbaseprofiletpId(self.goodsId)
  4169. .then((baseRes) => {
  4170. if (baseRes.code === 200) {
  4171. console.log(3);
  4172. if (baseRes.data) {
  4173. console.log(4);
  4174. self.$request
  4175. .getbaseprofiletpgetInfo({
  4176. goodsId: self.goodsId,
  4177. orderGoodsId: self.orderGoodsId,
  4178. })
  4179. .then((result) => {
  4180. console.log(result, "result");
  4181. if (result.code === 200) {
  4182. if (
  4183. !result.data ||
  4184. (result.data.status === 3 &&
  4185. result.data.changeStatus === 1)
  4186. ) {
  4187. console.log(5);
  4188. if (!result.data) {
  4189. console.log(6);
  4190. self.needProfileModal = true;
  4191. this.$confirm(`请填写资料`, "提示", {
  4192. confirmButtonText: "确定",
  4193. cancelButtonText: "返回",
  4194. closeOnClickModal: false,
  4195. closeOnPressEscape: false,
  4196. distinguishCancelAndClose: false,
  4197. showClose: false,
  4198. })
  4199. .then((_) => {
  4200. this.showAgreementModal = true;
  4201. this.getInfo();
  4202. })
  4203. .catch((_) => {
  4204. this.$router.back(-1);
  4205. });
  4206. } else {
  4207. this.$confirm(
  4208. `资料审核不通过,请前往重新填写`,
  4209. "提示",
  4210. {
  4211. confirmButtonText: "确定",
  4212. cancelButtonText: "返回",
  4213. closeOnClickModal: false,
  4214. closeOnPressEscape: false,
  4215. distinguishCancelAndClose: false,
  4216. showClose: false,
  4217. }
  4218. )
  4219. .then((_) => {
  4220. this.showInfoDetailModal = true;
  4221. this.getInfo();
  4222. })
  4223. .catch((_) => {
  4224. this.$router.back(-1);
  4225. });
  4226. }
  4227. } else if (
  4228. result.data.status === 1 &&
  4229. JSON.parse(res.rows[0].keyValue2)[0]
  4230. ) {
  4231. console.log(8);
  4232. self.$request
  4233. .getbaseprofileStampgetInfo({
  4234. goodsId: self.goodsId,
  4235. orderGoodsId: self.orderGoodsId,
  4236. })
  4237. .then((k) => {
  4238. if (k.code === 200) {
  4239. if (
  4240. !k.data ||
  4241. (k.data.status === 3 &&
  4242. k.data.changeStatus === 1)
  4243. ) {
  4244. if (!k.data) {
  4245. console.log(9);
  4246. this.$confirm(
  4247. `请前往填写盖章资料`,
  4248. "提示",
  4249. {
  4250. confirmButtonText: "确定",
  4251. cancelButtonText: "返回",
  4252. closeOnClickModal: false,
  4253. closeOnPressEscape: false,
  4254. distinguishCancelAndClose: false,
  4255. showClose: false,
  4256. }
  4257. )
  4258. .then((_) => {
  4259. this.showStampDetailModail = true;
  4260. this.getInfoStamp();
  4261. })
  4262. .catch((_) => {
  4263. this.$router.back(-1);
  4264. });
  4265. } else {
  4266. console.log(10);
  4267. self.needProfileModal = true;
  4268. this.$confirm(
  4269. `资料盖章审核不通过,请前往重新填写`,
  4270. "提示",
  4271. {
  4272. confirmButtonText: "确定",
  4273. cancelButtonText: "返回",
  4274. closeOnClickModal: false,
  4275. closeOnPressEscape: false,
  4276. distinguishCancelAndClose: false,
  4277. showClose: false,
  4278. }
  4279. )
  4280. .then((_) => {
  4281. this.showStampDetailModail = true;
  4282. this.getInfoStamp();
  4283. })
  4284. .catch((_) => {
  4285. this.$router.back(-1);
  4286. });
  4287. }
  4288. } else {
  4289. resolve();
  4290. }
  4291. }
  4292. });
  4293. } else {
  4294. resolve();
  4295. }
  4296. }
  4297. });
  4298. } else {
  4299. resolve();
  4300. }
  4301. }
  4302. });
  4303. } else {
  4304. resolve();
  4305. }
  4306. } else {
  4307. resolve();
  4308. }
  4309. });
  4310. if (this.gradeId > 0) {
  4311. //提交完资料返回判断是否已开班
  4312. this.getGradeInfo();
  4313. }
  4314. });
  4315. },
  4316. getInfoStamp() {
  4317. var self = this;
  4318. this.$request.getbaseprofiletpId(this.goodsId).then((res) => {
  4319. var ast = JSON.parse(res.data.keyValue2);
  4320. self.listDataStamp = ast;
  4321. self.$request
  4322. .getbaseprofileStampgetInfo({
  4323. goodsId: self.goodsId,
  4324. orderGoodsId: self.orderGoodsId,
  4325. })
  4326. .then((result) => {
  4327. if (result.data && result.data.status === 3) {
  4328. self.remarkStamp = result.data.text;
  4329. self.remarkStatusStamp = true;
  4330. self.id = result.data.id;
  4331. } else if (
  4332. result.data &&
  4333. (result.data.status === 1 || result.data.status === 2)
  4334. ) {
  4335. // uni.showModal({
  4336. // showCancel: false,
  4337. // content:
  4338. // result.data.status === 1
  4339. // ? "该商品审核资料已通过,不可重复提交资料"
  4340. // : result.data.status === 2
  4341. // ? "该商品审核资料处于待审核状态,不可重复提交资料"
  4342. // : "请联系管理员",
  4343. // success: function (k) {
  4344. // if (k.confirm) {
  4345. // uni.navigateBack();
  4346. // }
  4347. // },
  4348. // });
  4349. }
  4350. })
  4351. .catch((err) => {});
  4352. });
  4353. },
  4354. getGradeInfo() {
  4355. let self = this;
  4356. this.$request.goodsGradeInfo(this.gradeId).then((res) => {
  4357. if (res.code == 200) {
  4358. self.gradeDetail = res.data;
  4359. if (self.needProfileModal) {
  4360. return;
  4361. }
  4362. if (self.gradeDetail.learningStatus == 2) {
  4363. this.$confirm(
  4364. `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
  4365. "提示",
  4366. {
  4367. confirmButtonText: "确定",
  4368. closeOnClickModal: false,
  4369. closeOnPressEscape: false,
  4370. showCancelButton: false,
  4371. distinguishCancelAndClose: false,
  4372. showClose: false,
  4373. }
  4374. )
  4375. .then((_) => {
  4376. this.$router.back(-1);
  4377. })
  4378. .catch((_) => {});
  4379. }
  4380. if (
  4381. self.gradeDetail.learningStatus == 3 &&
  4382. Number(self.gradeDetail.learningTimeStart) >
  4383. Number(new Date() / 1000)
  4384. ) {
  4385. this.$confirm(
  4386. `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
  4387. "提示",
  4388. {
  4389. confirmButtonText: "返回",
  4390. closeOnClickModal: false,
  4391. closeOnPressEscape: false,
  4392. showCancelButton: false,
  4393. distinguishCancelAndClose: false,
  4394. showClose: false,
  4395. }
  4396. )
  4397. .then((_) => {
  4398. this.$router.back(-1);
  4399. })
  4400. .catch((_) => {});
  4401. }
  4402. }
  4403. });
  4404. this.$store.state.allowLoading = true;
  4405. },
  4406. deleteImg(item) {
  4407. if (item.fieldKey == "recent_photos") {
  4408. this.fileList1 = [];
  4409. this.infoForm["recent_photos"] = "";
  4410. } else if (item.fieldKey == "idcard_face_photo") {
  4411. this.fileList2 = [];
  4412. this.infoForm["idcard_face_photo"] = "";
  4413. } else if (item.fieldKey == "idcard_national_photo") {
  4414. this.fileList3 = [];
  4415. this.infoForm["idcard_national_photo"] = "";
  4416. }
  4417. },
  4418. /**
  4419. * getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
  4420. */
  4421. getInfo() {
  4422. var self = this;
  4423. this.$request.getbaseprofiletpId(this.goodsId).then((res) => {
  4424. console.log(res, "res");
  4425. var listData = JSON.parse(res.data.keyValue);
  4426. var ast = JSON.parse(res.data.keyValue2);
  4427. self.listData = [...listData, ...ast];
  4428. console.log(self.listData, "self.listData");
  4429. self.listData.forEach((item) => {
  4430. if (item.fieldKey == "idcard") {
  4431. this.infoForm.idcard = this.userInfo.idCard;
  4432. this.disCard = this.infoForm.idcard ? true : false
  4433. }
  4434. if (item.fieldKey == "telphone") {
  4435. this.infoForm.telphone = this.userInfo.telphone;
  4436. }
  4437. if (item.fieldKey == "name") {
  4438. this.infoForm.name = this.userInfo.realname || "";
  4439. this.disName = this.infoForm.name ? true : false
  4440. }
  4441. });
  4442. self.isRequired = self.listData.every((ims) => {
  4443. return ims.required === false;
  4444. });
  4445. this.$nextTick(() => {
  4446. this.agreementModal = true;
  4447. });
  4448. self.$request
  4449. .getbaseprofiletpgetInfo({
  4450. goodsId: this.goodsId,
  4451. orderGoodsId: this.orderGoodsId,
  4452. })
  4453. .then((result) => {
  4454. if (result.code === 200) {
  4455. if (!result.data) {
  4456. self.$request
  4457. .getbaseprofiletplistProfile({
  4458. pageNum: 1,
  4459. pageSize: 1,
  4460. })
  4461. .then((kit) => {
  4462. if (kit.rows.length) {
  4463. var ajson = JSON.parse(kit.rows[0].keyValue);
  4464. self.listData.forEach((zyitem, zyindex) => {
  4465. for (let k in ajson) {
  4466. if (zyitem.fieldKey == k && ajson[k].value) {
  4467. if (k === "sex") {
  4468. const sexIndex =
  4469. self.dictObj["sys_user_sex"].indexOf(
  4470. ajson[k].value
  4471. ) + "";
  4472. self.$set(self.infoForm, k, sexIndex);
  4473. } else if (k === "education") {
  4474. const sexIndex =
  4475. self.dictObj["edu_level"].indexOf(
  4476. ajson[k].value
  4477. ) + "";
  4478. self.$set(self.infoForm, k, sexIndex);
  4479. } else if (k === "working_years") {
  4480. const sexIndex =
  4481. self.dictObj["working_years"].indexOf(
  4482. ajson[k].value
  4483. ) + "";
  4484. self.$set(self.infoForm, k, sexIndex);
  4485. } else if (k === "recent_photos") {
  4486. self.$set(self.infoForm, k, ajson[k].value);
  4487. if (ajson[k].value) {
  4488. self.fileList1 = [
  4489. {
  4490. url: ajson[k].value,
  4491. },
  4492. ];
  4493. }
  4494. } else if (k === "idcard_face_photo") {
  4495. self.$set(self.infoForm, k, ajson[k].value);
  4496. if (ajson[k].value) {
  4497. self.fileList2 = [
  4498. {
  4499. url: ajson[k].value,
  4500. },
  4501. ];
  4502. }
  4503. } else if (k === "idcard_national_photo") {
  4504. self.$set(self.infoForm, k, ajson[k].value);
  4505. if (ajson[k].value) {
  4506. self.fileList3 = [
  4507. {
  4508. url: ajson[k].value,
  4509. },
  4510. ];
  4511. }
  4512. } else {
  4513. if (k === "name") {
  4514. self.$set(
  4515. self.infoForm,
  4516. k,
  4517. this.$store.state.userInfo.realname
  4518. );
  4519. } else if (k === "idcard") {
  4520. self.$set(
  4521. self.infoForm,
  4522. k,
  4523. this.$store.state.userInfo.idCard
  4524. );
  4525. } else if (k === "telphone") {
  4526. self.$set(
  4527. self.infoForm,
  4528. k,
  4529. this.$store.state.userInfo.telphone
  4530. );
  4531. } else if (k !== "commitment_electr_signature") {
  4532. self.$set(self.infoForm, k, ajson[k].value);
  4533. }
  4534. }
  4535. }
  4536. }
  4537. });
  4538. }
  4539. });
  4540. }
  4541. if (result.data && result.data.status === 3) {
  4542. self.remark = result.data.text;
  4543. self.remarkStatus = true;
  4544. self.id = result.data.id;
  4545. var arrays = JSON.parse(result.data.keyValue);
  4546. self.copyData = JSON.parse(JSON.stringify(arrays));
  4547. for (let k in arrays) {
  4548. if (k === "sex") {
  4549. if (arrays[k].value) {
  4550. const sexIndex =
  4551. self.dictObj["sys_user_sex"].indexOf(arrays[k].value) +
  4552. "";
  4553. self.$set(self.infoForm, k, sexIndex);
  4554. }
  4555. } else if (k === "education") {
  4556. if (arrays[k].value) {
  4557. const sexIndex =
  4558. self.dictObj["edu_level"].indexOf(arrays[k].value) + "";
  4559. self.$set(self.infoForm, k, sexIndex);
  4560. }
  4561. } else if (k === "working_years") {
  4562. if (arrays[k].value) {
  4563. const sexIndex =
  4564. self.dictObj["working_years"].indexOf(arrays[k].value) +
  4565. "";
  4566. self.$set(self.infoForm, k, sexIndex);
  4567. }
  4568. } else if (k === "recent_photos") {
  4569. self.$set(self.infoForm, k, arrays[k].value);
  4570. if (arrays[k].value) {
  4571. self.fileList1 = [{ url: arrays[k].value }];
  4572. }
  4573. } else if (k === "idcard_face_photo") {
  4574. self.$set(self.infoForm, k, arrays[k].value);
  4575. if (arrays[k].value) {
  4576. self.fileList2 = [{ url: arrays[k].value }];
  4577. }
  4578. } else if (k === "idcard_national_photo") {
  4579. self.$set(self.infoForm, k, arrays[k].value);
  4580. if (arrays[k].value) {
  4581. self.fileList3 = [{ url: arrays[k].value }];
  4582. }
  4583. } else if (k === "name") {
  4584. self.$set(
  4585. self.infoForm,
  4586. k,
  4587. this.$store.state.userInfo.realname
  4588. );
  4589. } else if (k === "idcard") {
  4590. self.$set(
  4591. self.infoForm,
  4592. k,
  4593. this.$store.state.userInfo.idCard
  4594. );
  4595. } else if (k === "telphone") {
  4596. self.$set(
  4597. self.infoForm,
  4598. k,
  4599. this.$store.state.userInfo.telphone
  4600. );
  4601. } else {
  4602. self.$set(self.infoForm, k, arrays[k].value);
  4603. }
  4604. }
  4605. } else if (
  4606. result.data &&
  4607. (result.data.status === 1 || result.data.status === 2)
  4608. ) {
  4609. this.$confirm(
  4610. result.data.status === 1
  4611. ? "该商品审核资料已通过,不可重复提交资料"
  4612. : result.data.status === 2
  4613. ? "该商品审核资料处于待审核状态,不可重复提交资料"
  4614. : "请联系管理员",
  4615. "提示",
  4616. {
  4617. confirmButtonText: "返回",
  4618. closeOnClickModal: false,
  4619. closeOnPressEscape: false,
  4620. showCancelButton: false,
  4621. distinguishCancelAndClose: false,
  4622. showClose: false,
  4623. }
  4624. )
  4625. .then((_) => {
  4626. this.$router.back(-1);
  4627. })
  4628. .catch((_) => {});
  4629. }
  4630. }
  4631. });
  4632. });
  4633. },
  4634. returnName(key) {
  4635. if (key === "sex") {
  4636. if (this.infoForm[key]) {
  4637. return this.dictObj["sys_user_sex"][Number(this.infoForm[key])];
  4638. } else {
  4639. return "请选择性别";
  4640. }
  4641. }
  4642. if (key === "education") {
  4643. if (this.infoForm[key]) {
  4644. return this.dictObj["edu_level"][Number(this.infoForm[key])];
  4645. } else {
  4646. return "请选择学历";
  4647. }
  4648. }
  4649. if (key === "working_years") {
  4650. if (this.infoForm[key]) {
  4651. return this.dictObj["working_years"][Number(this.infoForm[key])];
  4652. } else {
  4653. return "请选择工作年限";
  4654. }
  4655. }
  4656. },
  4657. retDraw() {
  4658. this.$set(this.infoForm, "commitment_electr_signature", "");
  4659. this.$nextTick(() => {
  4660. this.$refs.esign[0].reset();
  4661. });
  4662. },
  4663. uploadFile(options, int) {
  4664. var self = this;
  4665. return new Promise((resolve, reject) => {
  4666. var data = {
  4667. imageStatus: int,
  4668. gradeId: this.gradeId,
  4669. orderGoodsId: this.orderGoodsId,
  4670. };
  4671. self.$request
  4672. .getPolicy(data)
  4673. .then((res) => {
  4674. var ossToken = res.data.resultContent;
  4675. if (ossToken.host == null || ossToken.host == undefined) {
  4676. this.$message({
  4677. type: "warning",
  4678. message: "上传路径报错" + JSON.stringify(res.data),
  4679. });
  4680. return;
  4681. }
  4682. let data = this.$tools.convertBase64UrlToBlob(this.faceUrl);
  4683. this.$upload
  4684. .upload(data, 0)
  4685. .then((res) => {
  4686. this.ossAvatarUrl = res;
  4687. resolve(res);
  4688. })
  4689. .catch((err) => {
  4690. this.$message({
  4691. type: "warning",
  4692. message: "上传接口报错,请重新拍照上传",
  4693. });
  4694. this.reTake();
  4695. });
  4696. })
  4697. .catch((err) => {
  4698. this.$message({
  4699. type: "warning",
  4700. message: "签名错误" + JSON.stringify(err),
  4701. });
  4702. return;
  4703. });
  4704. });
  4705. },
  4706. faceRecognition() {
  4707. return new Promise((resolve) => {
  4708. this.$request
  4709. .faceCertificationCompareFace({
  4710. imageA: this.faceUrl,
  4711. orderGoodsId: this.orderGoodsId,
  4712. gradeId: this.gradeId,
  4713. })
  4714. .then((res) => {
  4715. resolve(res.data);
  4716. })
  4717. .catch((err) => {
  4718. this.loading = false;
  4719. this.$message({
  4720. type: "warning",
  4721. message: err.msg,
  4722. });
  4723. });
  4724. });
  4725. },
  4726. /**
  4727. * 点击重拍
  4728. */
  4729. reTake() {
  4730. this.faceUrl = "";
  4731. this.isTaking = true;
  4732. this.getUserMedia({
  4733. video: {
  4734. width: 400,
  4735. height: 300,
  4736. },
  4737. });
  4738. },
  4739. // 点击拍照按钮
  4740. onPhoto() {
  4741. // if (this.isIE) {
  4742. // window.webcam.capture();
  4743. // } else {
  4744. const canvas = document.createElement("canvas");
  4745. canvas.width = 400;
  4746. canvas.height = 300;
  4747. const context = canvas.getContext("2d");
  4748. const video = document.getElementById("video");
  4749. context.drawImage(video, 0, 0, 400, 300);
  4750. this.faceUrl = canvas.toDataURL("image/png");
  4751. this.isTaking = false;
  4752. // }
  4753. },
  4754. getUserMedia(constraints, success, error) {
  4755. if (window.navigator.mediaDevices.getUserMedia) {
  4756. // 最新的标准API
  4757. window.navigator.mediaDevices
  4758. .getUserMedia(constraints)
  4759. .then(success)
  4760. .catch(error);
  4761. } else if (window.navigator.webkitGetUserMedia) {
  4762. // webkit核心浏览器
  4763. window.navigator.webkitGetUserMedia(constraints, success, error);
  4764. } else if (window.navigator.mozGetUserMedia) {
  4765. // firfox浏览器
  4766. window.navigator.mozGetUserMedia(constraints, success, error);
  4767. } else if (window.navigator.getUserMedia) {
  4768. // 旧版API
  4769. window.navigator.getUserMedia(constraints, success, error);
  4770. }
  4771. },
  4772. photographSuccess(stream) {
  4773. // 兼容webkit核心浏览器
  4774. this.isTaking = true;
  4775. this.takePhotoModal = true;
  4776. this.$nextTick(() => {
  4777. const video = document.getElementById("video");
  4778. // 将视频流设置为video元素的源
  4779. console.dir(video);
  4780. video.srcObject = stream;
  4781. this.mediaStreamTrack =
  4782. typeof stream.stop === "function" ? stream : stream.getTracks()[0];
  4783. video.play();
  4784. });
  4785. },
  4786. photographError(err) {
  4787. this.$confirm(
  4788. "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
  4789. "提示",
  4790. {
  4791. showConfirmButton: false,
  4792. closeOnClickModal: false,
  4793. showCancelButton: false,
  4794. closeOnPressEscape: false,
  4795. distinguishCancelAndClose: false,
  4796. showClose: false,
  4797. }
  4798. );
  4799. },
  4800. /**
  4801. * 切换科目
  4802. */
  4803. courseChange() {
  4804. return new Promise((resolve) => {
  4805. this.needOpen = true;
  4806. this.noteParams = {
  4807. pageNum: 1,
  4808. // pageSize: 4,
  4809. };
  4810. this.duration = 0;
  4811. this.playSectionId = 0;
  4812. this.vid = "";
  4813. if (this.player) {
  4814. this.player.destroy();
  4815. }
  4816. this.player = "";
  4817. if (this.playerzb) {
  4818. this.playerzb.destroy();
  4819. }
  4820. this.playerzb = "";
  4821. this.vidzb = "";
  4822. this.historyChatMsgList = [];
  4823. this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  4824. this.courseDetail(); //课程详情
  4825. this.getAnswerList(); //答疑列表
  4826. // this.answerTimer = setInterval(() => {
  4827. // this.getAnswerList();
  4828. // }, 5000);
  4829. this.getMenuList(); //学习目录
  4830. this.getReMenuList(); //获取重修目录
  4831. this.getNoteList(); //获取节笔记
  4832. //更新老师信息
  4833. this.goodsTeacher.forEach((item) => {
  4834. if(item.courseList.some(x => x.courseId == this.courseId)){
  4835. this.teacherList = item.teaList
  4836. }
  4837. })
  4838. console.log(this.teacherList,'this.teacherList');
  4839. resolve();
  4840. });
  4841. },
  4842. polyvLiveHistoryChatMsgList() {
  4843. this.$request
  4844. .polyvLiveHistoryChatMsgList({
  4845. sectionId: this.playSectionId,
  4846. channelId: this.sectionItem.liveUrl,
  4847. })
  4848. .then((res) => {
  4849. this.historyChatMsgList = res.data;
  4850. });
  4851. },
  4852. courseDetail() {
  4853. let self = this;
  4854. this.$request.courseDetail(this.courseId).then((res) => {
  4855. // if (res.data.educationName == "继续教育") {
  4856. // this.$request
  4857. // .lockLockAction({
  4858. // action: "jxjy",
  4859. // })
  4860. // .then((res) => {});
  4861. // this.lockTimer = setInterval(() => {
  4862. // this.$request
  4863. // .lockLockAction({
  4864. // action: "jxjy",
  4865. // })
  4866. // .then((res) => {});
  4867. // }, 10000);
  4868. // }
  4869. self.detail = res.data;
  4870. });
  4871. },
  4872. openModule(menuItem, status = false) {
  4873. //重修目录点击
  4874. console.log(menuItem,'menuItem');
  4875. menuItem.showList = !menuItem.showList;
  4876. if (!menuItem.list.length) {
  4877. if (menuItem.isRebuild) {
  4878. this.getReChapterList(menuItem.id, menuItem.courseId, menuItem);
  4879. } else {
  4880. this.getBuyChapterList(
  4881. menuItem.id,
  4882. menuItem.courseId,
  4883. menuItem,
  4884. status
  4885. );
  4886. }
  4887. }
  4888. },
  4889. getReChapterList(moduleId, courseId, menuItem) {
  4890. this.$request
  4891. .reChapterList({
  4892. moduleId: moduleId,
  4893. gradeId: this.gradeId,
  4894. courseId: courseId,
  4895. rebuild: 1,
  4896. })
  4897. .then((res) => {
  4898. for (let i = 0; i < res.data.length; i++) {
  4899. let item = res.data[i];
  4900. item.id = item.chapterId;
  4901. item.showList = false;
  4902. item.list = [];
  4903. item.parent = menuItem;
  4904. item.isRebuild = 1;
  4905. }
  4906. menuItem.list = res.data;
  4907. });
  4908. },
  4909. getBuyChapterList(moduleId, courseId, menuItem, status) {
  4910. this.$request
  4911. .reChapterList({
  4912. moduleId: moduleId,
  4913. gradeId: this.gradeId,
  4914. courseId: courseId,
  4915. })
  4916. .then((res) => {
  4917. for (let i = 0; i < res.data.length; i++) {
  4918. let item = res.data[i];
  4919. item.id = item.chapterId;
  4920. item.menuType = 2;
  4921. item.showList = false;
  4922. item.list = [];
  4923. item.parent = menuItem;
  4924. }
  4925. menuItem.list = res.data;
  4926. if (status) {
  4927. console.log(this.sectionItem, "this.sectionItem");
  4928. console.log(menuItem.list, "menuItem.list");
  4929. const FindIndexs = menuItem.list.findIndex((item) => {
  4930. return item.chapterId == this.sectionItem.chapterId;
  4931. });
  4932. if (FindIndexs != -1) {
  4933. this.openChapter(menuItem.list[FindIndexs]);
  4934. } else {
  4935. this.$message.warning("章列表定位失败");
  4936. }
  4937. } else {
  4938. if (this.needOpen) {
  4939. // this.needOpen = false;
  4940. this.openChapter(menuItem.list[0]);
  4941. }
  4942. }
  4943. });
  4944. },
  4945. openChapter(chapter) {
  4946. console.log(chapter, "chapter");
  4947. //获取节试卷列表
  4948. this.$request
  4949. .reSectionExamList({
  4950. chapterId: chapter.chapterId || chapter.menuId,
  4951. courseId:this.courseId,
  4952. gradeId:this.gradeId}).then((res) => {
  4953. this.sectionExam = [...this.sectionExam, ...res.data]
  4954. // this.sectionExam = res.data
  4955. })
  4956. chapter.showList = !chapter.showList;
  4957. if (!chapter.list.length) {
  4958. if (chapter.isRebuild) {
  4959. this.getReSectionList(
  4960. chapter.id,
  4961. chapter.courseId,
  4962. chapter.moduleId || 0,
  4963. chapter
  4964. );
  4965. } else {
  4966. this.getBuySectionList(
  4967. chapter.id,
  4968. chapter.courseId,
  4969. chapter.moduleId || 0,
  4970. chapter
  4971. );
  4972. }
  4973. }
  4974. },
  4975. getReSectionList(chapterId, courseId, moduleId, chapter) {
  4976. this.$request
  4977. .reSectionList({
  4978. chapterId: chapterId,
  4979. gradeId: this.gradeId,
  4980. courseId: courseId,
  4981. rebuild: 1,
  4982. moduleId: moduleId,
  4983. })
  4984. .then((res) => {
  4985. let newArr = res.data.filter((item) => {
  4986. return item.type != 2;
  4987. });
  4988. chapter.canLearn = newArr.every((item) => {
  4989. if (item.learning == 1) {
  4990. return true;
  4991. } else {
  4992. return false;
  4993. }
  4994. });
  4995. res.data.forEach((section) => {
  4996. section.parent = chapter;
  4997. });
  4998. chapter.list = res.data;
  4999. });
  5000. },
  5001. getBuySectionList(chapterId, courseId, moduleId = 0, chapter) {
  5002. // /course/sectionList 查询章与节关系列表+章卷同级展示
  5003. this.$request
  5004. .reSectionList({
  5005. chapterId: chapterId,
  5006. gradeId: this.gradeId,
  5007. courseId: courseId,
  5008. moduleId: moduleId,
  5009. })
  5010. .then((res) => {
  5011. let newArr = res.data.filter((item) => {
  5012. return item.type != 2;
  5013. });
  5014. chapter.canLearn = newArr.every((item) => {
  5015. if (item.learning == 1) {
  5016. return true;
  5017. } else {
  5018. return false;
  5019. }
  5020. });
  5021. res.data.forEach((section) => {
  5022. section.parent = chapter;
  5023. });
  5024. chapter.list = res.data;
  5025. if (this.needOpen) {
  5026. this.needOpen = false;
  5027. if (
  5028. chapter.list &&
  5029. !this.sectionItem.recordingUrl &&
  5030. this.sectionItem.sectionType != 2
  5031. ) {
  5032. // this.getResource(chapter.list[0]);
  5033. }
  5034. }
  5035. });
  5036. },
  5037. getGoodsDetail() {
  5038. return new Promise((resolve) => {
  5039. let self = this;
  5040. this.$request.goodsDetail(this.goodsId).then((res) => {
  5041. self.goodsData = res.data;
  5042. self.gradeId = self.goodsData.gradeId;
  5043. if (this.goodsData.categoryName) {
  5044. this.infoForm.apply_post = this.goodsData.categoryName;
  5045. if (this.goodsData.categoryName) {
  5046. this.apply_post_disabled = true;
  5047. }
  5048. if (this.userInfo.companyName) {
  5049. this.infoForm.work_unit = this.userInfo.companyName;
  5050. }
  5051. }
  5052. if (this.goodsData.buyNote) {
  5053. this.tabList = [
  5054. { name: "1", label: "学员须知" },
  5055. // { name: "2", label: "课程答疑" },
  5056. // { name: "3", label: "笔记讲义" },
  5057. ];
  5058. console.log(res, "res111");
  5059. this.getRecommend();
  5060. } else {
  5061. this.tabList = [
  5062. // { name: "1", label: "课程答疑" },
  5063. // { name: "2", label: "笔记讲义" },
  5064. ];
  5065. }
  5066. this.courseBusiness();
  5067. this.courseHandouts();
  5068. if (self.goodsData.goodsPlayConfig) {
  5069. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  5070. if (self.goodsPlayConfig.autoPlay > 0) {
  5071. self.autoplay = true;
  5072. }
  5073. if (self.goodsPlayConfig.drag > 0) {
  5074. self.isAllowSeek = "off";
  5075. }
  5076. if (self.goodsPlayConfig.speed > 0) {
  5077. self.playbackRate = true;
  5078. }
  5079. }
  5080. if (self.goodsData.goodsPhotographConfig) {
  5081. self.goodsPhotographConfig = JSON.parse(
  5082. self.goodsData.goodsPhotographConfig
  5083. );
  5084. if (self.goodsPhotographConfig.photoNum > 0) {
  5085. self.photoNum = self.goodsPhotographConfig.photoNum;
  5086. }
  5087. }
  5088. });
  5089. resolve();
  5090. });
  5091. },
  5092. // 新增用户视频学习日志
  5093. studyLog(moduleId, chapterId, sectionId) {
  5094. this.$axios({
  5095. url: '/user/study/log',
  5096. method: 'post',
  5097. data: {
  5098. goodsId: this.goodsId,
  5099. courseId: this.courseId,
  5100. moduleId: moduleId || 0,
  5101. chapterId: chapterId || 0,
  5102. sectionId: sectionId || 0,
  5103. fromPlat: 2, //来源平台 1小程序 2PC网站
  5104. goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
  5105. orderGoodsId: this.orderGoodsId,
  5106. }
  5107. }).then((res) => {
  5108. console.log('直播的用户学习日志:', res)
  5109. })
  5110. },
  5111. //校验节是否有试卷
  5112. checkSectionList(item){
  5113. console.log(item,'item');
  5114. console.log(this.sectionExamList,'this.sectionExamList');
  5115. if(this.sectionExamList.length == 0){
  5116. return false
  5117. }
  5118. if(this.sectionExamList.some((section) => section.sectionId == item.menuId)){
  5119. return true
  5120. }else{
  5121. return false
  5122. }
  5123. },
  5124. /**
  5125. * 点击节
  5126. */
  5127. async getResource(section,type,flag) {
  5128. //type:1章卷,2节卷,3模考卷
  5129. if(flag){
  5130. //节卷
  5131. let data = this.sectionExamList.filter(x => x.sectionId == section.menuId)
  5132. if(data && data.length > 0){
  5133. section = data[0]
  5134. }
  5135. }else if(type == 2){
  5136. //节卷
  5137. let data = this.sectionExam.filter(x => x.sectionId == section.sectionId)
  5138. if(data && data.length > 0){
  5139. section = data[0]
  5140. }
  5141. }
  5142. this.clickSectionItem = section
  5143. //逻辑
  5144. if (section.sectionType === 2 && section.liveStartTime && section.liveEndTime) {
  5145. if (section.liveStartTime > this.nowTime) {
  5146. this.$message.warning("直播待开播");
  5147. return;
  5148. }
  5149. if (section.liveEndTime < this.nowTime) {
  5150. this.$message.warning("直播已结束");
  5151. return;
  5152. }
  5153. }
  5154. if (section.type == 2) {
  5155. //试卷
  5156. console.log("试卷");
  5157. console.log(section);
  5158. let learnNum = await this.goodsTodayStudySectionNum();
  5159. let hasLearn = await this.gradeCheckGoodsStudy(section.typeId);
  5160. if (this.goodsData.sectionMaxNum > 0) {
  5161. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5162. this.$message({
  5163. type: "warning",
  5164. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5165. });
  5166. return;
  5167. }
  5168. }
  5169. if (this.businessData.goodsLearningOrder == 1) {
  5170. if (section.parent.canLearn) {
  5171. console.log(section.parent,'section.parent')
  5172. let num = await this.bankRecordDoNum(section);
  5173. //有次数限制
  5174. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5175. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5176. this.$router.push({
  5177. path: "/course-exam/" + this.goodsId,
  5178. query: {
  5179. courseId: this.courseId,
  5180. gradeId: this.gradeId,
  5181. moduleId: section.moduleId || 0,
  5182. sectionId: section.sectionId || 0,
  5183. examId: section.typeId,
  5184. type: type,
  5185. chapterId: section.chapterId || 0,
  5186. orderGoodsId: this.orderGoodsId,
  5187. },
  5188. });
  5189. //没有答题次数限制
  5190. } else if (section.answerNum == 0) {
  5191. this.$router.push({
  5192. path: "/course-exam/" + this.goodsId,
  5193. query: {
  5194. courseId: this.courseId,
  5195. gradeId: this.gradeId,
  5196. moduleId: section.moduleId || 0,
  5197. sectionId: section.sectionId || 0,
  5198. examId: section.typeId,
  5199. type: type,
  5200. chapterId: section.chapterId || 0,
  5201. orderGoodsId: this.orderGoodsId,
  5202. },
  5203. });
  5204. } else {
  5205. this.$message({
  5206. type: "warning",
  5207. message: "该试卷只能答题" + section.answerNum + "次",
  5208. });
  5209. return;
  5210. }
  5211. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5212. } else {
  5213. this.$message({
  5214. type: "warning",
  5215. message: "请按顺序学完视频课程再进行练习和测试",
  5216. });
  5217. }
  5218. } else if (
  5219. this.businessData.goodsLearningOrder == 2 &&
  5220. !section.rebuild
  5221. ) {
  5222. let rows = await this.studyRecordMenuAllList();
  5223. let isStop = false;
  5224. let newRows = [];
  5225. for (let i = 0; i < rows.length; i++) {
  5226. let moduleTrue = rows[i].moduleId == section.moduleId;
  5227. let chapterTrue = rows[i].chapterId == section.chapterId;
  5228. if (moduleTrue && chapterTrue) {
  5229. isStop = true;
  5230. if (rows[i].sectionType != 2) {
  5231. //忽略直播
  5232. newRows.push(rows[i]);
  5233. }
  5234. } else {
  5235. if (!isStop) {
  5236. if (rows[i].sectionType != 2) {
  5237. //忽略直播
  5238. newRows.push(rows[i]);
  5239. }
  5240. } else {
  5241. break;
  5242. }
  5243. }
  5244. }
  5245. console.log(newRows);
  5246. let isAllLearn = newRows.every((item) => {
  5247. return item.studyStatus == 1;
  5248. });
  5249. if (isAllLearn) {
  5250. //之前的都学完了
  5251. // if(canLearn) { //视频的上一节学完
  5252. let num = await this.bankRecordDoNum(section.typeId);
  5253. //有次数限制
  5254. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5255. console.log(this.list[index]);
  5256. this.$router.push({
  5257. path: "/course-exam/" + this.goodsId,
  5258. query: {
  5259. courseId: this.courseId,
  5260. gradeId: this.gradeId,
  5261. moduleId: section.moduleId || 0,
  5262. sectionId: section.sectionId || 0,
  5263. examId: section.typeId,
  5264. type: type,
  5265. chapterId: section.chapterId || 0,
  5266. orderGoodsId: this.orderGoodsId,
  5267. },
  5268. });
  5269. //没有答题次数限制
  5270. } else if (section.answerNum == 0) {
  5271. this.$router.push({
  5272. path: "/course-exam/" + this.goodsId,
  5273. query: {
  5274. courseId: this.courseId,
  5275. gradeId: this.gradeId,
  5276. moduleId: section.moduleId || 0,
  5277. sectionId: section.sectionId || 0,
  5278. examId: section.typeId,
  5279. type: type,
  5280. chapterId: section.chapterId || 0,
  5281. orderGoodsId: this.orderGoodsId,
  5282. },
  5283. });
  5284. } else {
  5285. this.$message({
  5286. type: "warning",
  5287. message: "该试卷只能答题" + section.answerNum + "次",
  5288. });
  5289. return;
  5290. }
  5291. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5292. } else {
  5293. this.$message({
  5294. type: "warning",
  5295. message: "请学完视频课程再进行练习和测试",
  5296. });
  5297. }
  5298. } else {
  5299. let num = await this.bankRecordDoNum(section.typeId);
  5300. //有次数限制
  5301. if (section.answerNum - section.doNum > 0 && section.answerNum > 0) {
  5302. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5303. this.$router.push({
  5304. path: "/course-exam/" + this.goodsId,
  5305. query: {
  5306. courseId: this.courseId,
  5307. gradeId: this.gradeId,
  5308. moduleId: section.moduleId || 0,
  5309. sectionId: section.sectionId || 0,
  5310. examId: section.typeId,
  5311. type: type,
  5312. chapterId: section.chapterId || 0,
  5313. orderGoodsId: this.orderGoodsId,
  5314. },
  5315. });
  5316. //没有答题次数限制
  5317. } else if (section.answerNum == 0) {
  5318. this.$router.push({
  5319. path: "/course-exam/" + this.goodsId,
  5320. query: {
  5321. courseId: this.courseId,
  5322. gradeId: this.gradeId,
  5323. moduleId: section.moduleId || 0,
  5324. sectionId: section.sectionId || 0,
  5325. examId: section.typeId,
  5326. type: type,
  5327. chapterId: section.chapterId || 0,
  5328. orderGoodsId: this.orderGoodsId,
  5329. },
  5330. });
  5331. } else {
  5332. this.$message({
  5333. type: "warning",
  5334. message: "该试卷只能答题" + section.answerNum + "次",
  5335. });
  5336. return;
  5337. }
  5338. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5339. }
  5340. return;
  5341. }
  5342. if (section.type != 2) {
  5343. if (this.clickLock) {
  5344. return;
  5345. }
  5346. this.clickLock = true;
  5347. if (
  5348. this.sectionItem.sectionType === 1 && this.playSectionId &&
  5349. (this.playSectionId == section.sectionId ||
  5350. this.playSectionId == section.menuId) &&
  5351. this.moduleId == (section.moduleId || 0) &&
  5352. this.chapterId == (section.chapterId || 0)
  5353. ) {
  5354. //切换为同一频道不作为
  5355. console.log('切换为同一频道不作为')
  5356. this.clickLock = false;
  5357. return;
  5358. }
  5359. if (this.businessData.goodsLearningOrder == 2 && !section.isRebuild) {
  5360. //要按从头到尾顺序学习, 且不是重修课程
  5361. let rows = await this.studyRecordMenuAllList();
  5362. if (!this.hasPreItem(rows, section)) {
  5363. //判断是否有上一节
  5364. let newRows = [];
  5365. for (let i = 0; i < rows.length; i++) {
  5366. let moduleTrue =
  5367. rows[i].moduleId == section.moduleId || rows[i].moduleId == 0;
  5368. let chapterTrue =
  5369. rows[i].chapterId == section.chapterId ||
  5370. rows[i].chapterId == 0;
  5371. let sectionTrue =
  5372. rows[i].sectionId == section.sectionId ||
  5373. rows[i].sectionId == section.menuId;
  5374. if (moduleTrue && chapterTrue && sectionTrue) {
  5375. break;
  5376. } else {
  5377. if (rows[i].sectionType != 2) {
  5378. newRows.push(rows[i]);
  5379. }
  5380. }
  5381. }
  5382. let isAllLearn = newRows.every((item) => {
  5383. return item.studyStatus == 1;
  5384. });
  5385. if (isAllLearn) {
  5386. this.initVideo(section);
  5387. } else {
  5388. this.clickLock = false;
  5389. this.$message({
  5390. type: "warning",
  5391. message: "请按顺序学习视频课程",
  5392. });
  5393. }
  5394. } else {
  5395. console.log(section,"sectionsectionsectionsectionsectionsection")
  5396. //第一章第一节
  5397. this.initVideo(section);
  5398. }
  5399. } else {
  5400. console.log(section,"sectionsection")
  5401. this.initVideo(section);
  5402. }
  5403. }
  5404. },
  5405. bankRecordDoNum(section) {
  5406. return new Promise((resolve) => {
  5407. this.$request
  5408. .bankRecordDoNum({
  5409. goodsId: this.goodsId,
  5410. gradeId: this.gradeId,
  5411. chapterId: section.chapterId,
  5412. courseId: this.courseId,
  5413. moduleId: 0,
  5414. examId: section.typeId,
  5415. })
  5416. .then((res) => {
  5417. resolve(res.data);
  5418. });
  5419. });
  5420. },
  5421. /**
  5422. * 是否有上一章节
  5423. */
  5424. hasPreItem(rows, option) {
  5425. let moduleId = option.moduleId;
  5426. let chapterId = option.chapterId;
  5427. let sectionId = option.sectionId;
  5428. let index = 0;
  5429. for (let i = 0; i < rows.length; i++) {
  5430. if (
  5431. rows[i].moduleId == moduleId &&
  5432. rows[i].chapterId == chapterId &&
  5433. rows[i].sectionId == sectionId
  5434. ) {
  5435. index = i;
  5436. break;
  5437. }
  5438. }
  5439. if (index == 0) {
  5440. return false;
  5441. } else {
  5442. return true;
  5443. }
  5444. },
  5445. async initVideo(option) {
  5446. if (option.sectionType == 1 || option.sectionType == 3) {
  5447. //录播
  5448. let learnNum = await this.goodsTodayStudySectionNum(option);
  5449. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5450. console.log(hasLearn, "hasLearn");
  5451. console.log(learnNum, "learnNum");
  5452. console.log(
  5453. this.goodsData.sectionMaxNum,
  5454. "this.goodsData.sectionMaxNum"
  5455. );
  5456. if (this.goodsData.sectionMaxNum > 0) {
  5457. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5458. this.clickLock = false;
  5459. this.$message({
  5460. type: "warning",
  5461. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5462. });
  5463. return;
  5464. }
  5465. }
  5466. if (!option.recordingUrl) {
  5467. this.clickLock = false;
  5468. this.$message({
  5469. type: "warning",
  5470. message: `暂无播放地址数据`,
  5471. });
  5472. return;
  5473. }
  5474. if (this.playSectionId > 0) {
  5475. //切换视频
  5476. // let oldSectionId = this.playSectionId;
  5477. // uni.$emit("changeSection", oldSectionId);
  5478. }
  5479. this.playVideo(option);
  5480. }
  5481. if (option.sectionType == 2) {
  5482. //直播
  5483. let learnNum = await this.goodsTodayStudySectionNum(option);
  5484. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5485. if (this.goodsData.sectionMaxNum > 0) {
  5486. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5487. this.clickLock = false;
  5488. this.$message({
  5489. type: "warning",
  5490. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5491. });
  5492. return;
  5493. }
  5494. }
  5495. if (!option.liveUrl) {
  5496. this.clickLock = false;
  5497. this.$message({
  5498. type: "warning",
  5499. message: `暂无直播地址数据`,
  5500. });
  5501. }
  5502. let data = await this.studyRecordGetChannelBasicInfo(option.liveUrl);
  5503. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  5504. this.clickLock = false;
  5505. this.$message({
  5506. type: "warning",
  5507. message: `直播已结束`,
  5508. });
  5509. return;
  5510. }
  5511. if (data.watchStatus == "waiting") {
  5512. this.clickLock = false;
  5513. this.$message({
  5514. type: "warning",
  5515. message: `直播未开始`,
  5516. });
  5517. return;
  5518. }
  5519. this.playVideo(option);
  5520. }
  5521. return;
  5522. },
  5523. studyRecordGetChannelBasicInfo(channelId) {
  5524. return new Promise((resolve) => {
  5525. this.$request
  5526. .studyRecordGetChannelBasicInfo({
  5527. channelId,
  5528. })
  5529. .then((res) => {
  5530. console.log(res, "channel");
  5531. resolve(res.data);
  5532. }).catch(err => {
  5533. this.clickLock = false;
  5534. this.$message.error(err.msg)
  5535. })
  5536. });
  5537. },
  5538. /**
  5539. * 判断是否是当前播放的节
  5540. */
  5541. isActive(section) {
  5542. let moduleId = section.moduleId || 0;
  5543. let chapterId = section.chapterId || 0;
  5544. let sectionId = section.sectionId || section.menuId;
  5545. if (
  5546. moduleId == this.moduleId &&
  5547. chapterId == this.chapterId &&
  5548. sectionId == this.playSectionId
  5549. ) {
  5550. return true;
  5551. } else {
  5552. return false;
  5553. }
  5554. },
  5555. async playVideo(option) {
  5556. console.log('asdhsuohfosufgasoug', option)
  5557. if (option.sectionType == 3) {
  5558. console.log('huifang')
  5559. // 回放
  5560. if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
  5561. this.$router.push({
  5562. path: "/living-room/" + option.liveUrl,
  5563. query: {
  5564. goodsId: this.goodsId,
  5565. courseId: this.courseId,
  5566. gradeId: this.gradeId,
  5567. orderGoodsId: this.orderGoodsId,
  5568. sectionId: option.sectionId || option.menuId,
  5569. chapterId: option.chapterId || 0,
  5570. moduleId: option.moduleId || 0,
  5571. sectionType: 3,
  5572. goodsName: option.name,
  5573. vid: option.recordingUrl, // 回放vid
  5574. }
  5575. })
  5576. this.clickSectionItem = {}
  5577. return
  5578. }
  5579. }
  5580. if (option.sectionType == 1) {
  5581. console.log('lubo点击点击点击点击')
  5582. //录播
  5583. //设置播放的节ID
  5584. //提交保存观看历史
  5585. if (this.playSectionId) {
  5586. this.postStudyRecord(0, this.playSectionId);
  5587. }
  5588. this.player &&
  5589. this.player.HTML5.video.removeEventListener(
  5590. "timeupdate",
  5591. this.timeEvent
  5592. );
  5593. //播放视频
  5594. this.showRecordStatus = false; //隐藏播放记录提示
  5595. this.sectionItem = option;
  5596. console.log(option, "option=======>sectionItem");
  5597. this.isPlayRebuild = option.rebuild;
  5598. this.moduleId = option.moduleId || 0;
  5599. this.chapterId = option.chapterId || 0;
  5600. this.playSectionId = option.sectionId || option.menuId;
  5601. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5602. await this.getPhotoLastRecord();
  5603. this.recordObj = await this.getRecordLast();
  5604. this.getNoteList();
  5605. await this.clears();
  5606. this.vid = option.recordingUrl;
  5607. this.historyChatMsgList = [];
  5608. if (option.sectionType == 3) {
  5609. this.polyvLiveHistoryChatMsgList();
  5610. }
  5611. this.loadPlayerScript(this.loadPlayer);
  5612. setTimeout(() => {
  5613. this.clickLock = false;
  5614. }, 3000);
  5615. this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
  5616. // uni.$emit("levelId", this.levelId);
  5617. // uni.$emit("getSection", this.menuItem);
  5618. // uni.$emit("isRebuild", this.isRebuild);
  5619. }
  5620. if (option.sectionType == 2) {
  5621. //直播
  5622. //提交保存观看历史
  5623. if (this.playSectionId) {
  5624. this.postStudyRecord(0, this.playSectionId);
  5625. }
  5626. this.player &&
  5627. this.player.HTML5.video.removeEventListener(
  5628. "timeupdate",
  5629. this.timeEvent
  5630. );
  5631. //播放视频
  5632. this.showRecordStatus = false; //隐藏播放记录提示
  5633. this.sectionItem = option;
  5634. console.log(option, "option");
  5635. this.isPlayRebuild = option.rebuild;
  5636. this.moduleId = option.moduleId || 0;
  5637. this.chapterId = option.chapterId || 0;
  5638. this.playSectionId = option.sectionId || option.menuId;
  5639. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5640. await this.getPhotoLastRecord();
  5641. this.recordObj = await this.getRecordLast();
  5642. this.getNoteList();
  5643. //设置播放的节ID
  5644. await this.clears();
  5645. this.vidzb = option.liveUrl;
  5646. this.$router.push({
  5647. path: "/living-room/" + option.liveUrl,
  5648. query: {
  5649. goodsId: this.goodsId,
  5650. courseId: this.courseId,
  5651. gradeId: this.gradeId,
  5652. orderGoodsId: this.orderGoodsId,
  5653. sectionId: option.sectionId || option.menuId,
  5654. chapterId: option.chapterId || 0,
  5655. moduleId: option.moduleId || 0,
  5656. sectionType: 2,
  5657. },
  5658. });
  5659. // this.loadPlayerScriptzb(this.loadPlayerzb);
  5660. // setTimeout(() => {
  5661. // this.clickLock = false;
  5662. // }, 3000);
  5663. }
  5664. },
  5665. gradeCheckGoodsStudy(option) {
  5666. return new Promise((resolve) => {
  5667. this.$request
  5668. .gradeCheckGoodsStudy({
  5669. goodsId: this.goodsId,
  5670. gradeId: this.gradeId,
  5671. moduleId: option.moduleId || 0,
  5672. chapterId: option.chapterId || 0,
  5673. sectionId: option.sectionId || option.menuId,
  5674. })
  5675. .then((res) => {
  5676. resolve(res.data);
  5677. });
  5678. });
  5679. },
  5680. goodsTodayStudySectionNum(option) {
  5681. return new Promise((resolve) => {
  5682. this.$request
  5683. .goodsTodayStudySectionNum({
  5684. goodsId: this.goodsId,
  5685. gradeId: this.gradeId,
  5686. })
  5687. .then((res) => {
  5688. resolve(res.data);
  5689. });
  5690. });
  5691. },
  5692. studyRecordMenuAllList() {
  5693. return new Promise((resolve) => {
  5694. this.$request
  5695. .studyRecordMenuAllList({
  5696. courseId: this.courseId,
  5697. gradeId: this.gradeId,
  5698. goodsId: this.goodsId,
  5699. })
  5700. .then((res) => {
  5701. resolve(res.data);
  5702. });
  5703. });
  5704. },
  5705. loadPlayerzb() {
  5706. var self = this;
  5707. const polyvLivePlayer = window.polyvLivePlayer;
  5708. this.playerzb = polyvLivePlayer({
  5709. wrap: "#playerzb",
  5710. width: 810,
  5711. height: 455,
  5712. showLine: "off",
  5713. uid: this.uidzb,
  5714. vid: this.vidzb,
  5715. });
  5716. this.playerzb.on("s2j_onStartPlay", () => {
  5717. console.log("s2j_onStartPlay");
  5718. this.hasStart = true;
  5719. this.livingTimer = setInterval(self.timeEventLiving, 1000);
  5720. });
  5721. this.playerzb.on("s2j_onOver", () => {
  5722. console.log("s2j_onOver");
  5723. clearInterval(this.livingTimer);
  5724. this.hasStart = false;
  5725. this.$message({
  5726. type: "success",
  5727. message: "播放完毕",
  5728. });
  5729. this.postStudyRecord(1);
  5730. });
  5731. },
  5732. // 播放视频
  5733. loadPlayer() {
  5734. var self = this;
  5735. const polyvPlayer = window.polyvPlayer;
  5736. console.log(polyvPlayer);
  5737. self.$request.obtainpolyvvideosign(self.vid).then((res) => {
  5738. console.log(res, "res2");
  5739. self.player = polyvPlayer({
  5740. wrap: "#player",
  5741. width: 810,
  5742. showLine: "off",
  5743. height: 455,
  5744. ban_history_time: "on",
  5745. vid: self.vid,
  5746. autoplay: this.autoplay,
  5747. ban_seek: this.isAllowSeek,
  5748. speed: this.playbackRate,
  5749. teaser_show: 1,
  5750. tail_show: 1,
  5751. hideSwitchPlayer: true,
  5752. watchStartTime: this.recordObj.videoCurrentTime,
  5753. ts: res.data.ts,
  5754. sign: res.data.sign,
  5755. // adMatter: [
  5756. // {
  5757. // // 广告参数详细配置
  5758. // location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5759. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5760. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5761. // timesize: 5, //广告时长,单位:秒
  5762. // skipenabled: false, //是否显示跳过按钮
  5763. // },
  5764. // {
  5765. // // 广告参数详细配置
  5766. // location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5767. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5768. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5769. // timesize: 5, //广告时长,单位:秒
  5770. // skipenabled: false, //是否显示跳过按钮
  5771. // },
  5772. // ],
  5773. playsafe: function (vid, next) {
  5774. next();
  5775. },
  5776. });
  5777. this.player.HTML5.video.addEventListener("timeupdate", self.timeEvent);
  5778. this.player.on("s2j_onPlayStart", () => {
  5779. //开始播放每5秒提交一次观看时间
  5780. this.hasStart = true;
  5781. clearInterval(this.postTimer);
  5782. this.postTimer = setInterval(() => {
  5783. this.postStudyRecord(0, this.playSectionId, 5);
  5784. }, 30000);
  5785. if (this.recordObj.videoCurrentTime) {
  5786. this.showRecordStatus = true;
  5787. setTimeout(() => {
  5788. this.showRecordStatus = false;
  5789. }, 5000);
  5790. } else {
  5791. //新视频直接提交一条观看记录
  5792. // this.postStudyRecord(0);
  5793. this.showRecordStatus = false;
  5794. }
  5795. });
  5796. this.player.on("s2j_onVideoPause", () => {
  5797. clearInterval(this.postTimer);
  5798. });
  5799. this.player.on("s2j_onVideoPlay", () => {
  5800. if (this.postTimer) {
  5801. this.postTimer = setInterval(() => {
  5802. this.postStudyRecord(0, this.playSectionId, 5);
  5803. }, 30000);
  5804. }
  5805. });
  5806. this.player.on("s2j_onPlayOver", () => {
  5807. this.hasStart = false;
  5808. clearInterval(this.postTimer);
  5809. this.$message({
  5810. type: "success",
  5811. message: "播放完毕",
  5812. });
  5813. this.postStudyRecord(1);
  5814. });
  5815. });
  5816. },
  5817. timeEventLiving() {
  5818. var polyvPlayerContext = this.playerzb;
  5819. if (polyvPlayerContext) {
  5820. this.liveDuration = this.liveDuration + 1; //每隔1秒
  5821. console.log(this.liveDuration);
  5822. if (this.liveDuration == 2) {
  5823. //直播第2秒拍照
  5824. if (
  5825. this.goodsPhotographConfig &&
  5826. this.goodsPhotographConfig.livephotograph == 1 &&
  5827. this.sectionItem.learning != 1 &&
  5828. this.photoHistoryList.length == 0
  5829. ) {
  5830. //开启直播拍照
  5831. polyvPlayerContext.j2s_pauseVideo();
  5832. this.openPhoto();
  5833. } else {
  5834. this.postStudyRecord();
  5835. }
  5836. }
  5837. }
  5838. },
  5839. timeEvent() {
  5840. let self = this;
  5841. var polyvPlayerContext = this.player;
  5842. if (polyvPlayerContext) {
  5843. this.playTime = polyvPlayerContext.j2s_getCurrentTime(); //播放时刻
  5844. // console.log(this.playTime,789,this.photoHistoryList)
  5845. //判断是否需要拍照
  5846. if (this.photoNum > 0) {
  5847. this.configPhoto();
  5848. let photoTime = 0; //获取拍照秒数
  5849. for (let i = 0; i < this.photoList.length; i++) {
  5850. photoTime = Number(this.photoList[i]); //获取拍照秒数
  5851. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  5852. //3秒区间内才触发拍照,避免拉动滚动条
  5853. if (
  5854. this.photoHistoryList.indexOf(i) < 0 &&
  5855. this.sectionItem.learning != 1
  5856. ) {
  5857. //不存在拍照历史,没有重修过,没有学过,则拍照
  5858. //启动拍照
  5859. //暂停
  5860. polyvPlayerContext.j2s_pauseVideo();
  5861. this.photoIndex = i;
  5862. this.openPhoto();
  5863. } else {
  5864. }
  5865. }
  5866. }
  5867. }
  5868. }
  5869. },
  5870. getPhotoLastRecord() {
  5871. return new Promise((resolve) => {
  5872. let self = this;
  5873. let data = {
  5874. sectionId: parseInt(self.playSectionId),
  5875. goodsId: parseInt(self.goodsId),
  5876. courseId: parseInt(self.courseId),
  5877. gradeId: self.gradeId,
  5878. chapterId: parseInt(self.chapterId),
  5879. moduleId: parseInt(self.moduleId),
  5880. };
  5881. this.$request.getPhotoLastRecord(data).then((res) => {
  5882. //清空历史数据
  5883. self.photoHistoryList = [];
  5884. this.photoIndex = 0;
  5885. self.photoList = [];
  5886. for (let i = 0; i < res.data.length; i++) {
  5887. //-2存储随机拍照数组
  5888. if (res.data[i].photoIndex == -2 && res.data[i].timeInterval) {
  5889. self.photoList = res.data[i].timeInterval.split(",");
  5890. } else {
  5891. self.photoHistoryList.push(res.data[i].photoIndex);
  5892. }
  5893. }
  5894. resolve();
  5895. });
  5896. });
  5897. },
  5898. //拍照
  5899. openPhoto() {
  5900. var polyvPlayerContext = this.player;
  5901. if (polyvPlayerContext) {
  5902. if (this.isFullScreen()) {
  5903. this.exitFullscreen();
  5904. }
  5905. }
  5906. var polyvPlayerContext = this.playerzb;
  5907. if (polyvPlayerContext) {
  5908. if (this.isFullScreen()) {
  5909. this.exitFullscreen();
  5910. }
  5911. }
  5912. this.$nextTick(() => {
  5913. if (
  5914. (window.navigator.mediaDevices &&
  5915. window.navigator.mediaDevices.getUserMedia) ||
  5916. window.navigator.getUserMedia ||
  5917. window.navigator.webkitGetUserMedia ||
  5918. window.navigator.mozGetUserMedia
  5919. ) {
  5920. console.log(this.getUserMedia, "getUserMedia");
  5921. // 调用用户媒体设备, 访问摄像头
  5922. this.getUserMedia(
  5923. {
  5924. video: {
  5925. width: 400,
  5926. height: 300,
  5927. },
  5928. },
  5929. this.photographSuccess,
  5930. this.photographError
  5931. );
  5932. } else {
  5933. this.photographError();
  5934. }
  5935. });
  5936. },
  5937. /**
  5938. * 退出全屏
  5939. */
  5940. exitFullscreen() {
  5941. try {
  5942. var de = document;
  5943. console.log(de);
  5944. if (de.exitFullscreen) {
  5945. de.exitFullscreen();
  5946. } else if (de.mozCancelFullScreen) {
  5947. de.mozCancelFullScreen();
  5948. } else if (de.webkitCancelFullScreen) {
  5949. de.webkitCancelFullScreen();
  5950. }
  5951. } catch (err) {}
  5952. },
  5953. fullele() {
  5954. return (
  5955. document.fullscreenElement ||
  5956. document.webkitFullscreenElement ||
  5957. document.msFullscreenElement ||
  5958. document.mozFullScreenElement ||
  5959. null
  5960. );
  5961. },
  5962. //判断是否全屏
  5963. isFullScreen() {
  5964. return !!(document.webkitIsFullScreen || this.fullele());
  5965. },
  5966. //配置随机拍照时间
  5967. configPhoto() {
  5968. var polyvPlayerContext = this.player;
  5969. let totalVideoTime = polyvPlayerContext.j2s_getDuration();
  5970. let duration = polyvPlayerContext.j2s_getCurrentTime();
  5971. let photoNum = this.photoNum;
  5972. if (!this.photoConfig) {
  5973. this.photoConfig = true;
  5974. //没有历史拍照间隔数据
  5975. if (this.photoList.length == 0) {
  5976. if (totalVideoTime >= 900) {
  5977. //大于15分钟
  5978. if (photoNum == 1) {
  5979. //开头拍1张
  5980. this.photoList.push(1);
  5981. } else if (photoNum == 3) {
  5982. //拍3张
  5983. this.photoList.push(0); //开头拍一张
  5984. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  5985. let centerMinTime = centerTime - 300; //前后5分钟
  5986. let centerMaxTime = centerTime + 300;
  5987. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  5988. this.photoList.push(centerTakeTime); //中间拍一张
  5989. let endMaxTime = totalVideoTime - 60;
  5990. let endMinTime = totalVideoTime - 300;
  5991. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  5992. this.photoList.push(endTakeTime); //最后拍一张
  5993. }
  5994. } else {
  5995. //小于15分钟,只拍前后各一张
  5996. if (photoNum == 1) {
  5997. //开头拍1张
  5998. this.photoList.push(1);
  5999. } else if (photoNum == 3) {
  6000. //拍2张
  6001. if (totalVideoTime <= 300) {
  6002. //小于5分钟
  6003. this.photoList.push(1); //开头拍一张
  6004. let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
  6005. this.photoList.push(endTakeTime);
  6006. } else {
  6007. this.photoList.push(1); //开头拍一张
  6008. let endMaxTime = totalVideoTime - 60;
  6009. let endMinTime = totalVideoTime - 300;
  6010. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  6011. this.photoList.push(endTakeTime); //最后1-5分钟拍一张
  6012. }
  6013. }
  6014. }
  6015. console.log(this.photoList, "随机拍照时间数组11", photoNum);
  6016. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  6017. }
  6018. console.log(this.photoList, "随机拍照时间数组");
  6019. //兼容已有观看历史
  6020. for (let i = 0; i < this.photoList.length - 1; i++) {
  6021. if (
  6022. this.photoList[i] < duration &&
  6023. this.photoList[i + 1] > duration
  6024. ) {
  6025. this.photoIndex = i + 1;
  6026. // console.log("我的修改了photoIndex")
  6027. break;
  6028. }
  6029. if (duration > this.photoList[this.photoList.length - 1]) {
  6030. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  6031. // console.log("我的修改了photoIndex")
  6032. break;
  6033. }
  6034. }
  6035. }
  6036. },
  6037. randomNum(minNum, maxNum) {
  6038. switch (arguments.length) {
  6039. case 1:
  6040. return parseInt(Math.random() * minNum + 1, 10);
  6041. break;
  6042. case 2:
  6043. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  6044. break;
  6045. default:
  6046. return 0;
  6047. break;
  6048. }
  6049. },
  6050. //postTime 只提交随机时间
  6051. postCoursePhotoRecord(postTime = false) {
  6052. return new Promise((resolve, reject) => {
  6053. let currentTime = 0;
  6054. var polyvPlayerContext = this.player;
  6055. if (polyvPlayerContext) {
  6056. currentTime = polyvPlayerContext.j2s_getCurrentTime();
  6057. }
  6058. let self = this;
  6059. let photoIndex = self.photoIndex;
  6060. let data = {
  6061. photo: self.ossAvatarUrl,
  6062. sectionId: parseInt(self.playSectionId),
  6063. goodsId: parseInt(self.goodsId),
  6064. courseId: parseInt(self.courseId),
  6065. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  6066. gradeId: parseInt(self.gradeId),
  6067. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  6068. photoNum: parseInt(self.photoNum),
  6069. chapterId: parseInt(self.chapterId),
  6070. moduleId: parseInt(self.moduleId),
  6071. timeInterval: postTime ? self.photoList.join(",") : "",
  6072. };
  6073. console.log("提交接口", data);
  6074. this.$request
  6075. .coursePhotoRecord(data)
  6076. .then((res) => {
  6077. console.log(res, "res");
  6078. resolve();
  6079. })
  6080. .catch((err) => {
  6081. console.log(err, "err");
  6082. reject();
  6083. });
  6084. });
  6085. },
  6086. /**
  6087. * @param {String} 直播预览
  6088. */
  6089. loadPlayerScriptzb(callback) {
  6090. if (!window.polyvLivePlayer) {
  6091. const myScript = document.createElement("script");
  6092. myScript.setAttribute("src", this.playerJs);
  6093. myScript.onload = callback;
  6094. document.body.appendChild(myScript);
  6095. } else {
  6096. callback();
  6097. }
  6098. },
  6099. loadPlayerScript(callback) {
  6100. if (!window.polyvPlayer) {
  6101. const myScript = document.createElement("script");
  6102. myScript.setAttribute("src", this.vodPlayerJs);
  6103. myScript.onload = callback;
  6104. document.body.appendChild(myScript);
  6105. } else {
  6106. callback();
  6107. }
  6108. },
  6109. clears() {
  6110. return new Promise((resolve, reject) => {
  6111. this.vid = "";
  6112. this.vidzb = "";
  6113. if (this.player) {
  6114. this.player.destroy();
  6115. }
  6116. if (this.playerzb) {
  6117. this.playerzb.destroy();
  6118. }
  6119. resolve();
  6120. });
  6121. },
  6122. /**
  6123. * 提交观看记录
  6124. */
  6125. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  6126. let currentTime = 0;
  6127. let PlayDuration = 0;
  6128. var polyvPlayerContext = this.player;
  6129. if (polyvPlayerContext) {
  6130. currentTime = polyvPlayerContext.j2s_getCurrentTime(); //当前视频播放时刻
  6131. PlayDuration = polyvPlayerContext.j2s_realPlayVideoTime(); //本次看的时长
  6132. }
  6133. if (this.vidzb) {
  6134. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  6135. }
  6136. let self = this;
  6137. console.log(this);
  6138. console.log(PlayDuration, "PlayDuration");
  6139. let data = {
  6140. fromPlat: 2, //来源平台 1小程序 2网站
  6141. photo: self.ossAvatarUrl,
  6142. sectionId: parseInt(this.playSectionId),
  6143. goodsId: parseInt(this.goodsId),
  6144. courseId: parseInt(this.courseId),
  6145. studyDuration: parseInt(PlayDuration > 0 ? PlayDuration : 0),
  6146. gradeId: parseInt(this.gradeId),
  6147. chapterId: parseInt(this.chapterId),
  6148. moduleId: parseInt(this.moduleId),
  6149. videoCurrentTime: parseInt(currentTime > 0 ? currentTime : 0),
  6150. orderGoodsId: parseInt(this.orderGoodsId),
  6151. };
  6152. console.log(data, "data");
  6153. if (status > 0) {
  6154. data.status = status;
  6155. }
  6156. // /study/record 学习记录
  6157. this.$request
  6158. .studyRecord(data)
  6159. .then((res) => {
  6160. if (status > 0) {
  6161. //看完视频刷新父级列表
  6162. let rebuildObj = this.getSameObj(this.sectionItem);
  6163. this.refreshParentList(this.sectionItem, rebuildObj);
  6164. }
  6165. self.ossAvatarUrl = "";
  6166. })
  6167. .catch((err) => {
  6168. console.log(err);
  6169. this.$message({
  6170. type: "warning",
  6171. message: err.msg,
  6172. });
  6173. });
  6174. },
  6175. /**
  6176. * 获取重修列表中是否有相同对象
  6177. */
  6178. getSameObj(metaObj) {
  6179. console.log('看完视频后----', metaObj, this.reMenuList)
  6180. let newObj = false;
  6181. if (this.reMenuList.length) {
  6182. console.log(this.reMenuList, "this.reMenuList");
  6183. this.reMenuList.forEach((menu) => {
  6184. if (menu.type == 3) {
  6185. let isSame = this.contrast(metaObj, menu);
  6186. if (isSame) {
  6187. newObj = isSame;
  6188. }
  6189. } else {
  6190. if (menu.list && menu.list.length) {
  6191. menu.list.forEach((menuItem) => {
  6192. if (menuItem.type == 1) {
  6193. console.log(menuItem, metaObj);
  6194. let isSame = this.contrast(metaObj, menuItem);
  6195. if (isSame) {
  6196. newObj = isSame;
  6197. }
  6198. } else {
  6199. if (menuItem.list && menuItem.list.length) {
  6200. menuItem.list.forEach((menuChild) => {
  6201. if (menuChild.type == 1) {
  6202. let isSame = this.contrast(metaObj, menuChild);
  6203. if (isSame) {
  6204. newObj = isSame;
  6205. }
  6206. }
  6207. });
  6208. }
  6209. }
  6210. });
  6211. }
  6212. }
  6213. });
  6214. return newObj;
  6215. } else {
  6216. return false;
  6217. }
  6218. },
  6219. contrast(obj1, obj2) {
  6220. let moduleId1 = obj1.moduleId || 0;
  6221. let chapterId1 = obj1.chapterId || 0;
  6222. let sectionId1 = obj1.sectionId || obj1.menuId;
  6223. let moduleId2 = obj2.moduleId || 0;
  6224. let chapterId2 = obj2.chapterId || 0;
  6225. let sectionId2 = obj2.sectionId || obj2.menuId;
  6226. //转字符串后对比是否一致
  6227. return moduleId1 == moduleId2 &&
  6228. chapterId1 == chapterId2 &&
  6229. sectionId1 == sectionId2
  6230. ? obj2
  6231. : false;
  6232. },
  6233. /**
  6234. * 刷新父级列表
  6235. */
  6236. refreshParentList(sectionItem, rebuildObj) {
  6237. let self = this;
  6238. if (sectionItem.menuId) {
  6239. //最外层节有menuid
  6240. //普通章节目录
  6241. this.$request
  6242. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6243. .then((res) => {
  6244. for (let i = 0; i < res.rows.length; i++) {
  6245. let item = res.rows[i];
  6246. if (item.type == 3) {
  6247. self.menuList[i].learning = item.learning;
  6248. self.menuList[i].rebuild = item.rebuild;
  6249. }
  6250. }
  6251. });
  6252. if (this.menuTab.length > 1) {
  6253. //有重修目录
  6254. this.$request
  6255. .reMenuList({
  6256. courseId: this.courseId,
  6257. gradeId: this.gradeId,
  6258. rebuild: 1,
  6259. })
  6260. .then((res) => {
  6261. if (res.rows.length > 0) {
  6262. for (let i = 0; i < res.rows.length; i++) {
  6263. let item = res.rows[i];
  6264. item.id = item.menuId;
  6265. item.name = item.menuName;
  6266. item.menuType = item.type;
  6267. item.showList = false;
  6268. item.list = [];
  6269. item.isRebuild = 1;
  6270. }
  6271. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6272. //筛选剩下的选项
  6273. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6274. });
  6275. } else {
  6276. this.menuTab = [
  6277. {
  6278. name: "1",
  6279. label: "章节目录",
  6280. },
  6281. {
  6282. name: "3",
  6283. label: "答疑",
  6284. },
  6285. {
  6286. name: "4",
  6287. label: "笔记",
  6288. },
  6289. {
  6290. name: "5",
  6291. label: "讲义",
  6292. },
  6293. ];
  6294. this.courseTabIndex = "1";
  6295. self.reMenuList = [];
  6296. }
  6297. });
  6298. }
  6299. } else if (!sectionItem.moduleId) {
  6300. //第二层节没有moduleid
  6301. this.$request
  6302. .reSectionList({
  6303. chapterId: sectionItem.chapterId,
  6304. gradeId: this.gradeId,
  6305. courseId: this.courseId,
  6306. moduleId: 0,
  6307. })
  6308. .then((res) => {
  6309. let newArr = res.data.filter((item) => {
  6310. return item.type != 2;
  6311. });
  6312. if (sectionItem.parent) {
  6313. sectionItem.parent.canLearn = newArr.every((item) => {
  6314. if (item.learning == 1) {
  6315. return true;
  6316. } else {
  6317. return false;
  6318. }
  6319. });
  6320. res.data.forEach((section) => {
  6321. section.isRebuild = 1;
  6322. section.parent = sectionItem.parent;
  6323. });
  6324. }
  6325. this.menuList.forEach((menu) => {
  6326. if (menu.menuId == sectionItem.chapterId) {
  6327. menu.list = res.data;
  6328. }
  6329. });
  6330. });
  6331. if (this.menuTab.length > 1 && rebuildObj) {
  6332. this.$request
  6333. .reSectionList({
  6334. chapterId: rebuildObj.chapterId,
  6335. gradeId: this.gradeId,
  6336. courseId: this.courseId,
  6337. moduleId: 0,
  6338. rebuild: 1,
  6339. })
  6340. .then((res) => {
  6341. let newArr = res.data.filter((item) => {
  6342. return item.type != 2;
  6343. });
  6344. if (rebuildObj.parent) {
  6345. rebuildObj.parent.canLearn = newArr.every((item) => {
  6346. if (item.learning == 1) {
  6347. return true;
  6348. } else {
  6349. return false;
  6350. }
  6351. });
  6352. res.data.forEach((section) => {
  6353. section.parent = rebuildObj.parent;
  6354. });
  6355. }
  6356. this.reMenuList.forEach((menu) => {
  6357. if (menu.menuId == rebuildObj.chapterId) {
  6358. menu.list = res.data;
  6359. }
  6360. });
  6361. });
  6362. this.$request
  6363. .reMenuList({
  6364. courseId: this.courseId,
  6365. gradeId: this.gradeId,
  6366. rebuild: 1,
  6367. })
  6368. .then((res) => {
  6369. if (res.rows.length > 0) {
  6370. for (let i = 0; i < res.rows.length; i++) {
  6371. let item = res.rows[i];
  6372. item.id = item.menuId;
  6373. item.name = item.menuName;
  6374. item.menuType = item.type;
  6375. item.showList = false;
  6376. item.list = [];
  6377. item.isRebuild = 1;
  6378. }
  6379. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6380. //筛选剩下的选项
  6381. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6382. });
  6383. } else {
  6384. this.menuTab = [
  6385. {
  6386. name: "1",
  6387. label: "章节目录",
  6388. },
  6389. {
  6390. name: "3",
  6391. label: "答疑",
  6392. },
  6393. {
  6394. name: "4",
  6395. label: "笔记",
  6396. },
  6397. {
  6398. name: "5",
  6399. label: "讲义",
  6400. },
  6401. ];
  6402. this.courseTabIndex = "1";
  6403. self.reMenuList = [];
  6404. }
  6405. });
  6406. }
  6407. } else {
  6408. //第三层节有moduleid和chapterid都有
  6409. console.log('第三层第三层')
  6410. this.$request
  6411. .reSectionList({
  6412. chapterId: sectionItem.chapterId,
  6413. gradeId: this.gradeId,
  6414. courseId: this.courseId,
  6415. moduleId: sectionItem.moduleId,
  6416. })
  6417. .then((res) => {
  6418. let newArr = res.data.filter((item) => {
  6419. return item.type != 2;
  6420. });
  6421. if (sectionItem.parent) {
  6422. sectionItem.parent.canLearn = newArr.every((item) => {
  6423. if (item.learning == 1) {
  6424. return true;
  6425. } else {
  6426. return false;
  6427. }
  6428. });
  6429. res.data.forEach((section) => {
  6430. section.parent = sectionItem.parent;
  6431. });
  6432. }
  6433. this.menuList.forEach((menu) => {
  6434. if (menu.list && menu.list.length) {
  6435. menu.list.forEach((chapter) => {
  6436. if (
  6437. chapter.moduleId == sectionItem.moduleId &&
  6438. chapter.chapterId == sectionItem.chapterId
  6439. ) {
  6440. // chapter.learning = res.data[0].learning
  6441. console.log(res.data, "res.data");
  6442. chapter.list = res.data;
  6443. console.log(chapter.list, "chapter.list");
  6444. }
  6445. });
  6446. }
  6447. });
  6448. console.log('this.menuList', this.menuList)
  6449. });
  6450. if (this.menuTab.length > 1 && rebuildObj) {
  6451. this.$request
  6452. .reSectionList({
  6453. chapterId: rebuildObj.chapterId,
  6454. gradeId: this.gradeId,
  6455. courseId: this.courseId,
  6456. moduleId: rebuildObj.moduleId,
  6457. rebuild: 1,
  6458. })
  6459. .then((res) => {
  6460. let newArr = res.data.filter((item) => {
  6461. return item.type != 2;
  6462. });
  6463. if (sectionItem.parent) {
  6464. rebuildObj.parent.canLearn = newArr.every((item) => {
  6465. if (item.learning == 1) {
  6466. return true;
  6467. } else {
  6468. return false;
  6469. }
  6470. });
  6471. res.data.forEach((section) => {
  6472. section.parent = rebuildObj.parent;
  6473. });
  6474. }
  6475. this.reMenuList.forEach((menu) => {
  6476. if (menu.list && menu.list.length) {
  6477. menu.list.forEach((chapter) => {
  6478. if (
  6479. chapter.moduleId == rebuildObj.moduleId &&
  6480. chapter.chapterId == rebuildObj.chapterId
  6481. ) {
  6482. chapter.learning = res.data[0].learning
  6483. chapter.list = res.data;
  6484. }
  6485. });
  6486. }
  6487. });
  6488. });
  6489. this.$request
  6490. .reMenuList({
  6491. courseId: this.courseId,
  6492. gradeId: this.gradeId,
  6493. rebuild: 1,
  6494. })
  6495. .then((res) => {
  6496. if (res.rows.length > 0) {
  6497. for (let i = 0; i < res.rows.length; i++) {
  6498. let item = res.rows[i];
  6499. item.id = item.menuId;
  6500. item.name = item.menuName;
  6501. item.menuType = item.type;
  6502. item.showList = false;
  6503. item.list = [];
  6504. item.isRebuild = 1;
  6505. }
  6506. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6507. //筛选剩下的选项
  6508. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6509. });
  6510. } else {
  6511. this.menuTab = [
  6512. {
  6513. name: "1",
  6514. label: "章节目录",
  6515. },
  6516. {
  6517. name: "3",
  6518. label: "答疑",
  6519. },
  6520. {
  6521. name: "4",
  6522. label: "笔记",
  6523. },
  6524. {
  6525. name: "5",
  6526. label: "讲义",
  6527. },
  6528. ];
  6529. this.courseTabIndex = "1";
  6530. self.reMenuList = [];
  6531. }
  6532. });
  6533. }
  6534. }
  6535. },
  6536. getRecordLast() {
  6537. let self = this;
  6538. return new Promise((resolve) => {
  6539. let data = {
  6540. gradeId: Number(self.gradeId),
  6541. goodsId: Number(self.goodsId),
  6542. sectionId: Number(self.playSectionId),
  6543. courseId: Number(self.courseId),
  6544. chapterId: parseInt(self.chapterId),
  6545. moduleId: parseInt(self.moduleId),
  6546. };
  6547. self.$request.recordLast(data).then((res) => {
  6548. resolve(res.data);
  6549. });
  6550. });
  6551. },
  6552. /**
  6553. * 获取笔记列表
  6554. */
  6555. getNoteList() {
  6556. let self = this;
  6557. self.noteList = [];
  6558. let data = {
  6559. courseId: this.courseId,
  6560. gradeId: this.gradeId,
  6561. goodsId: this.goodsId,
  6562. // pageNum: this.noteParams.pageNum,
  6563. // pageSize: this.noteParams.pageSize,
  6564. };
  6565. if (this.playSectionId > 0) {
  6566. data.sectionId = this.playSectionId;
  6567. }
  6568. this.$request.noteList(data).then((res) => {
  6569. self.noteList = res.rows;
  6570. self.noteTotal = res.total;
  6571. });
  6572. },
  6573. noteClick(note) {
  6574. if (this.vid) {
  6575. //切换视频
  6576. if (this.vid == note.recordingUrl) {
  6577. var polyvPlayerContext = this.player;
  6578. if (polyvPlayerContext) {
  6579. polyvPlayerContext.j2s_seekVideo(note.noteSecond);
  6580. }
  6581. } else {
  6582. var polyvPlayerContext = this.player;
  6583. if (polyvPlayerContext) {
  6584. polyvPlayerContext.changeVid(note.recordingUrl);
  6585. }
  6586. }
  6587. } else {
  6588. var polyvPlayerContext = this.player;
  6589. console.log(polyvPlayerContext);
  6590. if (polyvPlayerContext) {
  6591. polyvPlayerContext.changeVid(note.recordingUrl);
  6592. } else {
  6593. this.vid = note.recordingUrl;
  6594. console.log(note.recordingUrl);
  6595. this.moduleId = note.moduleId;
  6596. this.chapterId = note.chapterId;
  6597. this.playSectionId = note.sectionId;
  6598. note.sectionType = 3;
  6599. this.loadPlayerScript(this.loadPlayer);
  6600. }
  6601. }
  6602. this.recordObj = { videoCurrentTime: note.noteSecond };
  6603. },
  6604. /**
  6605. * 展开列表
  6606. */
  6607. getMenuList() {
  6608. let self = this;
  6609. // /course/menuList
  6610. this.$request
  6611. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6612. .then(async (res) => {
  6613. console.log('--asfsdgshfduofhdug', res.rows, this.menuList)
  6614. for (let i = 0; i < res.rows.length; i++) {
  6615. let item = res.rows[i];
  6616. item.id = item.menuId;
  6617. item.name = item.menuName;
  6618. item.menuType = item.type;
  6619. item.showList = false;
  6620. item.list = [];
  6621. item.parent = this.menuList;
  6622. }
  6623. self.menuList = res.rows;
  6624. console.log('==============self.menuList===', res.rows, self.menuList)
  6625. if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
  6626. this.needOpenNew = false;
  6627. if (this.sectionItem.sectionType == 1) {
  6628. console.log("录播",this.sectionItem)
  6629. //录播
  6630. this.chapterId = this.sectionItem.chapterId;
  6631. this.moduleId = this.sectionItem.moduleId;
  6632. this.playSectionId = this.sectionItem.sectionId;
  6633. this.vid = this.sectionItem.recordingUrl;
  6634. this.playVideo(this.sectionItem);
  6635. } else if (this.sectionItem.sectionType == 2) {
  6636. console.log("直播")
  6637. this.getResource(this.sectionItem,1)
  6638. //直播
  6639. // this.studyRecordGetLastLive();
  6640. } else if (this.sectionItem.sectionType == 3) {
  6641. //回放
  6642. this.chapterId = this.sectionItem.chapterId;
  6643. this.moduleId = this.sectionItem.moduleId;
  6644. this.playSectionId = this.sectionItem.sectionId;
  6645. this.vid = this.sectionItem.recordingUrl;
  6646. this.playVideo(this.sectionItem);
  6647. }
  6648. for (let i = 0; i < res.rows.length; i++) {
  6649. if (
  6650. res.rows[i].type == 1 &&
  6651. res.rows[i].menuId == this.sectionItem.moduleId
  6652. ) {
  6653. this.menuIndex = [i];
  6654. this.openModule(this.menuList[i], true);
  6655. break;
  6656. } else if (
  6657. res.rows[i].type == 2 &&
  6658. res.rows[i].menuId == this.sectionItem.chapterId &&
  6659. (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)
  6660. ) {
  6661. console.log("噢噢噢");
  6662. this.menuIndex = [i];
  6663. // this.needOpen = false;
  6664. this.openChapter(this.menuList[i]);
  6665. break;
  6666. }
  6667. }
  6668. } else {
  6669. console.log("我走了");
  6670. const changeStatus = await this.studyRecordQueryLiveLast();
  6671. if (changeStatus) {
  6672. for (let i = 0; i < res.rows.length; i++) {
  6673. if (
  6674. res.rows[i].type == 1 &&
  6675. res.rows[i].menuId == this.sectionItem.moduleId
  6676. ) {
  6677. this.menuIndex = [i];
  6678. this.openModule(this.menuList[i], true);
  6679. break;
  6680. } else if (
  6681. res.rows[i].type == 2 &&
  6682. res.rows[i].menuId == this.sectionItem.chapterId &&
  6683. !this.sectionItem.moduleId
  6684. ) {
  6685. this.menuIndex = [i];
  6686. // this.needOpen = false;
  6687. this.openChapter(this.menuList[i]);
  6688. break;
  6689. }
  6690. }
  6691. } else {
  6692. //展开第一个
  6693. if (this.needOpen) {
  6694. for (let i = 0; i < res.rows.length; i++) {
  6695. if (res.rows[i].type == 1) {
  6696. this.menuIndex = [i];
  6697. this.openModule(this.menuList[i]);
  6698. break;
  6699. } else if (res.rows[i].type == 2) {
  6700. this.menuIndex = [i];
  6701. // this.needOpen = false;
  6702. this.openChapter(this.menuList[i]);
  6703. break;
  6704. }
  6705. }
  6706. //第一个是节,直接播放
  6707. if (self.menuList.length) {
  6708. if (
  6709. self.menuList[0].type == 3 &&
  6710. !this.sectionItem.recordingUrl &&
  6711. self.menuList[0].sectionType != 2
  6712. ) {
  6713. // this.getResource(self.menuList[0]);
  6714. }
  6715. }
  6716. }
  6717. }
  6718. }
  6719. });
  6720. //获取节试卷列表
  6721. this.$request
  6722. .reSectionExamList({
  6723. chapterId: 0,
  6724. courseId:this.courseId,
  6725. gradeId:this.gradeId}).then((res) => {
  6726. this.sectionExamList = res.data
  6727. })
  6728. },
  6729. getReMenuList() {
  6730. let self = this;
  6731. this.$request
  6732. .reMenuList({
  6733. courseId: this.courseId,
  6734. rebuild: 1,
  6735. gradeId: this.gradeId,
  6736. })
  6737. .then((res) => {
  6738. for (let i = 0; i < res.rows.length; i++) {
  6739. let item = res.rows[i];
  6740. item.id = item.menuId;
  6741. item.name = item.menuName;
  6742. item.menuType = item.type;
  6743. item.showList = false;
  6744. item.list = [];
  6745. item.parent = this.reMenuList;
  6746. item.isRebuild = 1;
  6747. }
  6748. self.reMenuList = res.rows;
  6749. if (self.reMenuList.length > 0) {
  6750. this.menuTab = [
  6751. {
  6752. name: "1",
  6753. label: "章节目录",
  6754. },
  6755. {
  6756. name: "2",
  6757. label: "重修目录",
  6758. },
  6759. {
  6760. name: "3",
  6761. label: "答疑",
  6762. },
  6763. {
  6764. name: "4",
  6765. label: "笔记",
  6766. },
  6767. {
  6768. name: "5",
  6769. label: "讲义",
  6770. },
  6771. ];
  6772. if (this.courseTabIndex == "2") {
  6773. return;
  6774. }
  6775. this.courseTabIndex = "1";
  6776. } else {
  6777. this.menuTab = [
  6778. {
  6779. name: "1",
  6780. label: "章节目录",
  6781. },
  6782. {
  6783. name: "3",
  6784. label: "答疑",
  6785. },
  6786. {
  6787. name: "4",
  6788. label: "笔记",
  6789. },
  6790. {
  6791. name: "5",
  6792. label: "讲义",
  6793. },
  6794. ];
  6795. this.courseTabIndex = "1";
  6796. }
  6797. });
  6798. },
  6799. /**
  6800. * 获取讲义权限
  6801. */
  6802. courseHandouts() {
  6803. if (this.goodsData.handoutsId) {
  6804. this.$request
  6805. .courseHandouts(this.goodsData.handoutsId)
  6806. .then((res) => {
  6807. this.courseHandoutsData = res.data;
  6808. const loadingTask = pdf.createLoadingTask(
  6809. this.$tools.splitImgHost(this.courseHandoutsData.handoutsUrl)
  6810. );
  6811. loadingTask.promise
  6812. .then((pdf) => {
  6813. this.numPages = pdf.numPages;
  6814. })
  6815. .catch((err) => {});
  6816. })
  6817. .catch((err) => {});
  6818. }
  6819. },
  6820. /**
  6821. * 获取培训项目详情
  6822. */
  6823. courseBusiness() {
  6824. this.$request.courseBusiness(this.goodsData.businessId).then((res) => {
  6825. this.businessData = res.data;
  6826. });
  6827. },
  6828. /**提出答疑 */
  6829. addAnswer() {
  6830. if (!this.textarea) {
  6831. this.$message.warning("请输入疑问内容");
  6832. return;
  6833. }
  6834. let data = {
  6835. courseId: this.courseId,
  6836. goodsId: this.goodsId,
  6837. orderGoodsId: this.orderGoodsId,
  6838. answerText: this.textarea,
  6839. };
  6840. this.$request.addAnswer(data).then((res) => {
  6841. this.textarea = "";
  6842. this.getAnswerList();
  6843. });
  6844. },
  6845. /**回复 */
  6846. answerBack(row) {
  6847. this.$prompt(`${row.realname}:${row.answerText}`, "提示", {
  6848. confirmButtonText: "确定",
  6849. cancelButtonText: "取消",
  6850. inputErrorMessage: "输入不能为空",
  6851. inputValidator: (value) => {
  6852. let str = value.replace(/^ +| +$/g, "");
  6853. // 点击按钮时,对文本框里面的值进行验证
  6854. if (!str) {
  6855. return "输入不能为空";
  6856. }
  6857. },
  6858. })
  6859. .then(({ value }) => {
  6860. let data = {
  6861. assignUserId: row.userId,
  6862. assignAnswerId: row.answerId,
  6863. courseId: this.courseId,
  6864. goodsId: this.goodsId,
  6865. orderGoodsId: this.orderGoodsId,
  6866. answerText: value,
  6867. assignAnswerText: row.assignAnswerText,
  6868. };
  6869. this.$request.addAnswer(data).then((res) => {
  6870. this.getAnswerList();
  6871. });
  6872. })
  6873. .catch(() => {});
  6874. },
  6875. getAnswerList() {
  6876. let self = this;
  6877. // /app/answer/list 查询答疑列表
  6878. this.$request
  6879. .answerList({ courseId: this.courseId, goodsId: this.goodsId })
  6880. .then((res) => {
  6881. let data1 = [];
  6882. let data2 = [];
  6883. let copydata2 = [];
  6884. res.rows.forEach((item) => {
  6885. if (!item.assignAnswerId) {
  6886. data1.push(item);
  6887. } else {
  6888. data2.push(item);
  6889. copydata2.push(item);
  6890. }
  6891. });
  6892. data2.forEach((item, index) => {
  6893. //回复层
  6894. data1.forEach((items) => {
  6895. //提问层
  6896. if (items.answerId === item.assignAnswerId) {
  6897. if (
  6898. items.newArraysAnswerList &&
  6899. items.newArraysAnswerList.length
  6900. ) {
  6901. items.newArraysAnswerList.push(item);
  6902. } else {
  6903. items.newArraysAnswerList = [item];
  6904. }
  6905. let indexInd = copydata2.findIndex((itemsxs) => {
  6906. return itemsxs.answerId === item.answerId;
  6907. });
  6908. if (indexInd !== -1) {
  6909. copydata2.splice(indexInd, 1);
  6910. }
  6911. }
  6912. });
  6913. });
  6914. copydata2.forEach((it) => {
  6915. for (let i = 0; i < data1.length; i++) {
  6916. let STATUS = null;
  6917. if (data1[i].newArraysAnswerList) {
  6918. STATUS = data1[i].newArraysAnswerList.some((items) => {
  6919. return items.answerId === it.assignAnswerId;
  6920. });
  6921. }
  6922. if (STATUS) {
  6923. data1[i].newArraysAnswerList.push(it);
  6924. break;
  6925. }
  6926. }
  6927. });
  6928. self.answerList = data1.reverse();
  6929. console.log(self.answerList, "answerList");
  6930. });
  6931. },
  6932. courseCourseList() {
  6933. return new Promise((resolve) => {
  6934. this.param.goodsId = this.goodsId;
  6935. this.param.gradeId = this.gradeId;
  6936. this.$request.courseCourseList(this.param).then(async (res) => {
  6937. console.log(res, "resresresres");
  6938. //获取商品双师资模板
  6939. this.$request.courseTeacherList({
  6940. goodsId: this.goodsId
  6941. }).then((res1) => {
  6942. console.log(res1,'res1');
  6943. if(res1.data && res1.data.length > 0){
  6944. //课程老师模板
  6945. let teacherTel = res1.data;
  6946. //商品课程
  6947. let courses = res.rows;
  6948. teacherTel.forEach((tea) => {
  6949. let dataList = []
  6950. let teacherList = []
  6951. courses.forEach((item) => {
  6952. if(tea.courseIds.search(item.courseId) > -1){
  6953. dataList.push(item)
  6954. teacherList = tea.courseList
  6955. }
  6956. })
  6957. let result = {
  6958. teaList:teacherList,
  6959. courseList:dataList
  6960. }
  6961. this.goodsTeacher.push(result)
  6962. })
  6963. if(this.goodsTeacher && this.goodsTeacher.length > 0){
  6964. let courseIds = []
  6965. this.goodsTeacher.forEach((item) => {
  6966. item.courseList.forEach((course) => {
  6967. courseIds.push(course.courseId)
  6968. })
  6969. })
  6970. if(courseIds.length > 0){
  6971. courses.forEach((item) => {
  6972. if(!courseIds.includes(item.courseId)){
  6973. let data = {
  6974. teaList:[],
  6975. courseList: []
  6976. }
  6977. data.courseList.push(item)
  6978. this.goodsTeacher.push(data)
  6979. }
  6980. })
  6981. }
  6982. this.goodsTeacher.forEach((item) => {
  6983. if(item.courseList && item.courseList.length > 0){
  6984. item.courseList[0].show = 1
  6985. }
  6986. })
  6987. }
  6988. }else{
  6989. //没有双师资模板
  6990. res.rows.forEach((item) => {
  6991. item.show = 1
  6992. let data = {
  6993. teaList:[],
  6994. courseList: []
  6995. }
  6996. data.courseList.push(item)
  6997. this.goodsTeacher.push(data)
  6998. })
  6999. }
  7000. console.log(this.goodsTeacher,'this.goodsTeacher');
  7001. this.goodsTeacher.forEach((item) => {
  7002. if(item.courseList.some(x => x.courseId == this.courseId)){
  7003. this.teacherList = item.teaList
  7004. }
  7005. })
  7006. console.log(this.teacherList,'this.teacherList');
  7007. })
  7008. this.courseList.push(...res.rows);
  7009. this.courseTotal = res.total
  7010. // console.log('courseTotal::', this.courseTotal)
  7011. if (!this.courseId) {
  7012. this.courseId = this.courseList[0].courseId;
  7013. }
  7014. this.param.total = res.total;
  7015. await this.courseChange();
  7016. resolve();
  7017. });
  7018. });
  7019. },
  7020. download(url, fileName) {
  7021. let xhr = new XMLHttpRequest();
  7022. xhr.open("get", url, true);
  7023. xhr.setRequestHeader("Content-Type", `application/pdf`);
  7024. xhr.responseType = "blob";
  7025. let that = this;
  7026. xhr.onload = function () {
  7027. if (this.status == 200) {
  7028. //接受二进制文件流
  7029. var blob = this.response;
  7030. that.downloadExportFile(blob, fileName);
  7031. }
  7032. };
  7033. xhr.send();
  7034. },
  7035. downloadExportFile(blob, tagFileName) {
  7036. let downloadElement = document.createElement("a");
  7037. let href = "";
  7038. if (typeof blob == "string") {
  7039. downloadElement.target = "_blank";
  7040. } else {
  7041. href = window.URL.createObjectURL(blob); //创建下载的链接
  7042. }
  7043. downloadElement.href = href;
  7044. downloadElement.download = tagFileName;
  7045. //下载后文件名
  7046. document.body.appendChild(downloadElement);
  7047. downloadElement.click(); //点击下载
  7048. document.body.removeChild(downloadElement); //下载完成移除元素
  7049. if (typeof blob != "string") {
  7050. window.URL.revokeObjectURL(href); //释放掉blob对象
  7051. }
  7052. },
  7053. print() {
  7054. document.getElementById("printIframe").contentWindow.print();
  7055. },
  7056. previvew(url) {
  7057. this.showPdf = true;
  7058. },
  7059. noteSubmit() {
  7060. let self = this;
  7061. if (!(this.playSectionId > 0)) {
  7062. this.$message({
  7063. message: "目前无播放视频",
  7064. type: "warning",
  7065. });
  7066. return;
  7067. }
  7068. if (!this.textareaNote) {
  7069. this.$message({
  7070. message: "请输入内容",
  7071. type: "warning",
  7072. });
  7073. return;
  7074. }
  7075. if (!this.gradeId) {
  7076. this.$message({
  7077. message: "暂无班级数据",
  7078. type: "warning",
  7079. });
  7080. return;
  7081. }
  7082. var polyvPlayerContext = this.player;
  7083. let noteDate = this.$tools.getZeroTime();
  7084. let noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  7085. console.log(noteSecond, "noteSecond");
  7086. if (!noteSecond) {
  7087. if (noteSecond == 0) {
  7088. //播放结束
  7089. noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  7090. }
  7091. if (!noteSecond) {
  7092. this.$message({
  7093. message: "视频暂未开始",
  7094. type: "warning",
  7095. });
  7096. return;
  7097. }
  7098. }
  7099. let data = {
  7100. gradeId: this.gradeId,
  7101. goodsId: this.goodsId,
  7102. sectionId: this.playSectionId,
  7103. courseId: this.courseId,
  7104. noteText: this.textareaNote,
  7105. noteDate: noteDate,
  7106. noteSecond: noteSecond,
  7107. moduleId: this.moduleId,
  7108. chapterId: this.chapterId,
  7109. };
  7110. this.$request.postNote(data).then((res) => {
  7111. this.$message({
  7112. message: "发布成功",
  7113. type: "success",
  7114. });
  7115. self.getNoteList();
  7116. this.textareaNote = "";
  7117. });
  7118. },
  7119. del(item) {
  7120. console.log(item);
  7121. let data = { answerId: item.answerId, status: -1 };
  7122. this.$request.delAnswer(data).then((res) => {
  7123. this.$message({
  7124. message: "删除成功",
  7125. type: "success",
  7126. });
  7127. this.getAnswerList();
  7128. });
  7129. },
  7130. /**
  7131. * 打印
  7132. */
  7133. printView(url) {
  7134. console.log("触发打印", url);
  7135. printJS({
  7136. printable: url,
  7137. type: "pdf",
  7138. header: null,
  7139. targetStyles: ["*"],
  7140. style: "@page {margin:0 10mm}",
  7141. });
  7142. // this.print(url);
  7143. },
  7144. // 打印方法
  7145. print(filePath) {
  7146. console.log("执行打印");
  7147. let iframe = document.createElement("iframe");
  7148. iframe.style.border = "0px";
  7149. iframe.style.position = "absolute";
  7150. iframe.style.width = "0px";
  7151. iframe.style.height = "0px";
  7152. iframe.style.right = "0px";
  7153. iframe.style.top = "0px";
  7154. iframe.setAttribute("src", filePath);
  7155. iframe.onload = () => {
  7156. iframe.contentWindow.print();
  7157. // setTimeout(() => {
  7158. // document.body.removeChild(iframe);
  7159. // });
  7160. };
  7161. document.body.append(iframe);
  7162. },
  7163. },
  7164. };
  7165. </script>
  7166. <!-- Add "scoped" attribute to limit CSS to this component only -->
  7167. <style scoped lang="scss">
  7168. .course-detail {
  7169. .section {
  7170. padding-bottom: 30px;
  7171. &__header {
  7172. height: 40px;
  7173. display: flex;
  7174. align-items: center;
  7175. padding: 0 20px;
  7176. }
  7177. &__body {
  7178. .course-info {
  7179. &__header {
  7180. .title {
  7181. height: 40px;
  7182. border-bottom: 1px solid #999;
  7183. // color: #fff;
  7184. .select {
  7185. // width: 100%;
  7186. }
  7187. /deep/ .el-input__icon {
  7188. width: 20px;
  7189. height: 20px;
  7190. border: 1px solid #eee;
  7191. border-radius: 4px;
  7192. margin-top: 10px;
  7193. line-height: 20px;
  7194. }
  7195. /deep/ .el-input__inner {
  7196. // color: #fff;
  7197. font-size: 16px;
  7198. background: none;
  7199. border: 0;
  7200. }
  7201. }
  7202. .left-box {
  7203. width: 810px;
  7204. height: 455px;
  7205. float: left;
  7206. background-size: cover;
  7207. background-position: center center;
  7208. background-repeat: no-repeat;
  7209. position: relative;
  7210. .video {
  7211. width: 100%;
  7212. height: 100%;
  7213. }
  7214. }
  7215. .recordStyle {
  7216. position: absolute;
  7217. bottom: 90px;
  7218. padding: 6px 12px;
  7219. left: 8px;
  7220. background-color: rgba(0, 0, 0, 0.4);
  7221. color: #fff;
  7222. border-radius: 24px;
  7223. user-select: none;
  7224. .btn_sty {
  7225. cursor: pointer;
  7226. }
  7227. }
  7228. .right-box {
  7229. width: 462px;
  7230. height: 455px;
  7231. background: #3f4449;
  7232. border-radius: 0px;
  7233. float: right;
  7234. &__header {
  7235. .tabs {
  7236. /deep/.el-tabs__nav-wrap::after {
  7237. background-color: #999;
  7238. }
  7239. /deep/ .el-tabs__header {
  7240. margin: 0;
  7241. }
  7242. .label {
  7243. color: #fff;
  7244. height: 40px;
  7245. line-height: 40px;
  7246. padding: 0 20px;
  7247. }
  7248. .item {
  7249. &__title {
  7250. padding-left: 12px;
  7251. height: 40px;
  7252. line-height: 40px;
  7253. cursor: pointer;
  7254. font-size: 14px;
  7255. font-family: Microsoft YaHei;
  7256. font-weight: bold;
  7257. color: #fff;
  7258. .el-icon-caret-right,
  7259. .el-icon-caret-bottom {
  7260. color: #999;
  7261. }
  7262. }
  7263. &__content {
  7264. .bank-chapter {
  7265. &__item {
  7266. color: #fff;
  7267. font-size: 14px;
  7268. &__text {
  7269. padding: 8px 8px 8px 24px;
  7270. cursor: pointer;
  7271. flex: 1;
  7272. .el-icon-caret-right,
  7273. .el-icon-caret-bottom {
  7274. color: #999;
  7275. }
  7276. }
  7277. }
  7278. }
  7279. .bank-section {
  7280. &__item {
  7281. user-select: none;
  7282. color: #fff;
  7283. font-size: 14px;
  7284. display: flex;
  7285. align-items: center;
  7286. &.active {
  7287. background: #132b4d;
  7288. font-size: 14px;
  7289. font-family: Microsoft YaHei;
  7290. font-weight: bold;
  7291. color: #3f8dfd;
  7292. }
  7293. &__text {
  7294. flex: 1;
  7295. padding: 8px 8px 8px 12px;
  7296. height: 40px;
  7297. display: flex;
  7298. flex-direction: column;
  7299. justify-content: center;
  7300. cursor: pointer;
  7301. .el-icon-caret-right,
  7302. .el-icon-caret-bottom {
  7303. color: #999;
  7304. }
  7305. }
  7306. .test-btn {
  7307. margin-left: 10px;
  7308. width: 32px;
  7309. height: 20px;
  7310. background: #007aff;
  7311. border-radius: 4px;
  7312. line-height: 18px;
  7313. color: #fff;
  7314. text-align: center;
  7315. }
  7316. .note {
  7317. margin-left: 10px;
  7318. width: 32px;
  7319. height: 20px;
  7320. border: 1px solid #ff3b30;
  7321. border-radius: 4px;
  7322. line-height: 18px;
  7323. color: #ff3b30;
  7324. text-align: center;
  7325. &--yellow {
  7326. border-color: #ff9500;
  7327. color: #ff9500;
  7328. }
  7329. &--blue {
  7330. border-color: #3f8dfd;
  7331. color: #3f8dfd;
  7332. }
  7333. }
  7334. .during {
  7335. color: #999;
  7336. margin-right: 10px;
  7337. }
  7338. .btn {
  7339. margin-right: 12px;
  7340. width: 48px;
  7341. height: 20px;
  7342. border: 1px solid #ff3b30;
  7343. background: #ff3b30;
  7344. border-radius: 4px;
  7345. line-height: 18px;
  7346. color: #fff;
  7347. text-align: center;
  7348. &--green {
  7349. border: 1px solid #34c759;
  7350. background: #34c759;
  7351. }
  7352. }
  7353. .live-btn {
  7354. margin-left: 20px;
  7355. width: 60px;
  7356. height: 20px;
  7357. border-radius: 4px;
  7358. background: #eeeeee;
  7359. line-height: 18px;
  7360. color: #666666;
  7361. text-align: center;
  7362. &--yellow {
  7363. background: #fff7eb;
  7364. color: #ff9500;
  7365. }
  7366. &--blue {
  7367. border-color: #ebf4ff;
  7368. color: #007aff;
  7369. }
  7370. }
  7371. .exercises {
  7372. cursor: pointer;
  7373. font-size: 14px;
  7374. color: #498AFE;
  7375. }
  7376. }
  7377. }
  7378. }
  7379. }
  7380. }
  7381. .title {
  7382. height: 40px;
  7383. border-bottom: 1px solid #999;
  7384. color: #fff;
  7385. .select {
  7386. width: 100%;
  7387. }
  7388. /deep/ .el-input__icon {
  7389. width: 20px;
  7390. height: 20px;
  7391. border: 1px solid #fff;
  7392. border-radius: 4px;
  7393. margin-top: 10px;
  7394. line-height: 20px;
  7395. }
  7396. /deep/ .el-input__inner {
  7397. color: #fff;
  7398. font-size: 16px;
  7399. background: none;
  7400. border: 0;
  7401. }
  7402. }
  7403. }
  7404. &__body {
  7405. height: 374px;
  7406. overflow-y: scroll;
  7407. &::-webkit-scrollbar {
  7408. // width: 6px;
  7409. display: none;
  7410. }
  7411. &::-webkit-scrollbar-track {
  7412. background-color: #060e1a;
  7413. -webkit-border-radius: 2em;
  7414. -moz-border-radius: 2em;
  7415. border-radius: 2em;
  7416. }
  7417. &::-webkit-scrollbar-thumb {
  7418. background-color: #eeeeee;
  7419. -webkit-border-radius: 2em;
  7420. -moz-border-radius: 2em;
  7421. border-radius: 2em;
  7422. }
  7423. }
  7424. }
  7425. }
  7426. &__body {
  7427. /deep/ .el-tabs__item {
  7428. padding: 0 20px !important;
  7429. height: 80px;
  7430. line-height: 80px;
  7431. }
  7432. .course-img {
  7433. width: 100%;
  7434. }
  7435. .course-menu {
  7436. margin-top: 25px;
  7437. .left-box {
  7438. width: 948px;
  7439. float: left;
  7440. &__header {
  7441. padding-right: 50px;
  7442. position: relative;
  7443. .item {
  7444. width: auto;
  7445. margin-right: 24px;
  7446. font-size: 16px;
  7447. font-family: Microsoft YaHei;
  7448. font-weight: 400;
  7449. color: #333333;
  7450. background: #eeeeee;
  7451. border-radius: 8px;
  7452. padding: 12px;
  7453. position: relative;
  7454. &.canlearn {
  7455. background: #3f8dfd;
  7456. color: #fff;
  7457. }
  7458. }
  7459. }
  7460. &__body {
  7461. .buy-note {
  7462. margin-right: 50px;
  7463. }
  7464. .item {
  7465. margin-top: 24px;
  7466. padding: 16px;
  7467. background: #eee;
  7468. border-radius: 10px;
  7469. &__title {
  7470. font-size: 16px;
  7471. font-family: Microsoft YaHei;
  7472. font-weight: bold;
  7473. color: #333333;
  7474. .note {
  7475. display: inline-block;
  7476. margin-left: 20px;
  7477. width: 40px;
  7478. height: 24px;
  7479. border: 1px solid #ff3b30;
  7480. border-radius: 8px;
  7481. line-height: 22px;
  7482. color: #ff3b30;
  7483. text-align: center;
  7484. }
  7485. }
  7486. &__content {
  7487. margin-top: 12px;
  7488. background: #f5f7fa;
  7489. }
  7490. }
  7491. }
  7492. }
  7493. .right-box {
  7494. width: 255px;
  7495. float: right;
  7496. .title {
  7497. font-size: 16px;
  7498. font-family: Microsoft YaHei;
  7499. font-weight: 400;
  7500. color: #333333;
  7501. text-shadow: 0px 6px 6px rgba(85, 158, 255, 0.08);
  7502. position: relative;
  7503. .more {
  7504. font-size: 16px;
  7505. font-family: Microsoft YaHei;
  7506. font-weight: 400;
  7507. color: #999999;
  7508. position: absolute;
  7509. right: 0;
  7510. }
  7511. }
  7512. .list {
  7513. .course-item {
  7514. }
  7515. }
  7516. }
  7517. }
  7518. .answer-question {
  7519. &__header {
  7520. border-bottom: 1px solid #eee;
  7521. .textarea-wrap {
  7522. background: #f9f9f9;
  7523. border: 1px solid #eeeeee;
  7524. border-radius: 8px;
  7525. .textarea {
  7526. height: 100%;
  7527. }
  7528. }
  7529. .submit {
  7530. padding: 10px 20px;
  7531. border-radius: 20px;
  7532. text-align: center;
  7533. font-size: 16px;
  7534. margin: 10px 0;
  7535. float: right;
  7536. }
  7537. }
  7538. &__body {
  7539. .question-list {
  7540. &__item {
  7541. padding: 20px 0;
  7542. display: flex;
  7543. &__avatar {
  7544. width: 40px;
  7545. height: 40px;
  7546. display: table-cell;
  7547. border-radius: 50%;
  7548. text-align: center;
  7549. img {
  7550. display: inline-block;
  7551. vertical-align: middle;
  7552. max-width: 100%;
  7553. max-height: 100%;
  7554. }
  7555. }
  7556. &__content {
  7557. flex: 1;
  7558. border-bottom: 1px solid #ccc;
  7559. margin-left: 10px;
  7560. .nickname {
  7561. font-size: 14px;
  7562. font-family: Microsoft YaHei;
  7563. font-weight: bold;
  7564. color: #fff;
  7565. line-height: 24px;
  7566. }
  7567. .desc {
  7568. font-size: 14px;
  7569. font-family: Microsoft YaHei;
  7570. font-weight: 400;
  7571. color: #666666;
  7572. line-height: 24px;
  7573. }
  7574. .time {
  7575. font-size: 14px;
  7576. font-family: Microsoft YaHei;
  7577. font-weight: 400;
  7578. color: #999999;
  7579. line-height: 24px;
  7580. .replay {
  7581. float: right;
  7582. font-size: 14px;
  7583. font-family: Microsoft YaHei;
  7584. font-weight: 400;
  7585. color: #3f8dfd;
  7586. line-height: 24px;
  7587. margin-right: 20px;
  7588. }
  7589. .del {
  7590. float: right;
  7591. cursor: pointer;
  7592. font-size: 14px;
  7593. font-family: Microsoft YaHei;
  7594. font-weight: 400;
  7595. color: #ff3b30;
  7596. line-height: 24px;
  7597. margin-right: 20px;
  7598. }
  7599. }
  7600. .reply-list {
  7601. margin: 20px 0;
  7602. width: 100%;
  7603. background: #f9f9f9;
  7604. border-radius: 8px;
  7605. padding: 0 0 0 20px;
  7606. &__item {
  7607. padding: 20px 0;
  7608. display: flex;
  7609. border-bottom: 1px solid #ccc;
  7610. &:nth-last-of-type(1) {
  7611. border: 0;
  7612. }
  7613. &__avatar {
  7614. width: 40px;
  7615. height: 40px;
  7616. display: table-cell;
  7617. border-radius: 50%;
  7618. text-align: center;
  7619. img {
  7620. display: inline-block;
  7621. vertical-align: middle;
  7622. max-width: 100%;
  7623. max-height: 100%;
  7624. }
  7625. }
  7626. &__content {
  7627. border-radius: 8px;
  7628. flex: 1;
  7629. margin-left: 10px;
  7630. .nickname {
  7631. font-size: 14px;
  7632. font-family: Microsoft YaHei;
  7633. font-weight: bold;
  7634. color: #fff;
  7635. line-height: 24px;
  7636. }
  7637. .desc {
  7638. font-size: 14px;
  7639. font-family: Microsoft YaHei;
  7640. font-weight: 400;
  7641. color: #666666;
  7642. line-height: 24px;
  7643. }
  7644. .time {
  7645. font-size: 14px;
  7646. font-family: Microsoft YaHei;
  7647. font-weight: 400;
  7648. color: #999999;
  7649. line-height: 24px;
  7650. .reply {
  7651. float: right;
  7652. font-size: 14px;
  7653. font-family: Microsoft YaHei;
  7654. font-weight: 400;
  7655. color: #3f8dfd;
  7656. line-height: 24px;
  7657. margin-right: 20px;
  7658. cursor: pointer;
  7659. user-select: none;
  7660. }
  7661. .del {
  7662. cursor: pointer;
  7663. margin-right: 20px;
  7664. float: right;
  7665. font-size: 14px;
  7666. font-family: Microsoft YaHei;
  7667. font-weight: 400;
  7668. color: #ff3b30;
  7669. line-height: 24px;
  7670. }
  7671. }
  7672. }
  7673. }
  7674. }
  7675. }
  7676. }
  7677. }
  7678. }
  7679. }
  7680. .lecture-notes {
  7681. &__content {
  7682. .left-box {
  7683. float: left;
  7684. width: 462px;
  7685. .textarea {
  7686. border-bottom: 1px solid #eee;
  7687. .submit {
  7688. float: right;
  7689. width: 138px;
  7690. padding: 10px 0;
  7691. margin: 10px 0 25px 0;
  7692. border-radius: 20px;
  7693. text-align: center;
  7694. font-size: 16px;
  7695. }
  7696. }
  7697. .note-list {
  7698. &__content {
  7699. border-bottom: 1px solid #eee;
  7700. &__title {
  7701. width: 216px;
  7702. height: 24px;
  7703. background: #ccc;
  7704. border-radius: 24px;
  7705. font-size: 14px;
  7706. color: #666666;
  7707. text-align: center;
  7708. line-height: 24px;
  7709. margin: 20px 0;
  7710. }
  7711. }
  7712. &__item {
  7713. display: flex;
  7714. padding: 15px;
  7715. .el-icon-video-play {
  7716. cursor: pointer;
  7717. font-size: 20px;
  7718. color: #3f8dfd;
  7719. }
  7720. &__content {
  7721. flex: 1;
  7722. margin-left: 10px;
  7723. .title {
  7724. cursor: pointer;
  7725. font-size: 14px;
  7726. font-family: Microsoft YaHei;
  7727. font-weight: bold;
  7728. color: #3f8dfd;
  7729. line-height: 24px;
  7730. }
  7731. .desc {
  7732. font-size: 14px;
  7733. font-family: Microsoft YaHei;
  7734. font-weight: 400;
  7735. color: #666666;
  7736. line-height: 24px;
  7737. }
  7738. .time {
  7739. font-size: 14px;
  7740. font-family: Microsoft YaHei;
  7741. font-weight: 400;
  7742. color: #999999;
  7743. line-height: 24px;
  7744. }
  7745. }
  7746. }
  7747. }
  7748. .pagination {
  7749. margin-top: 30px;
  7750. text-align: center;
  7751. }
  7752. }
  7753. .right-box {
  7754. width: 786px;
  7755. float: right;
  7756. .lecture-list {
  7757. background: #f5f7fa;
  7758. border-radius: 8px;
  7759. &__header {
  7760. padding: 0 16px;
  7761. height: 40px;
  7762. line-height: 40px;
  7763. font-size: 18px;
  7764. font-family: Microsoft YaHei;
  7765. font-weight: bold;
  7766. color: #333333;
  7767. .slide-btn {
  7768. cursor: pointer;
  7769. float: right;
  7770. font-size: 14px;
  7771. font-family: Microsoft YaHei;
  7772. font-weight: 400;
  7773. color: #999999;
  7774. }
  7775. }
  7776. &__body {
  7777. .list {
  7778. &__item {
  7779. border-top: 1px solid #fff;
  7780. padding: 0 8px 0 16px;
  7781. height: 56px;
  7782. line-height: 55px;
  7783. display: flex;
  7784. align-items: center;
  7785. .title {
  7786. flex: 1;
  7787. font-size: 16px;
  7788. font-family: Microsoft YaHei;
  7789. font-weight: 400;
  7790. color: #333333;
  7791. }
  7792. .btns {
  7793. .btn {
  7794. cursor: pointer;
  7795. display: inline-block;
  7796. vertical-align: middle;
  7797. width: 80px;
  7798. height: 32px;
  7799. background: #ffffff;
  7800. border: 1px solid #3f8dfd;
  7801. border-radius: 16px;
  7802. text-align: center;
  7803. line-height: 30px;
  7804. color: #3f8dfd;
  7805. margin: 0 8px;
  7806. }
  7807. }
  7808. }
  7809. }
  7810. }
  7811. &__footer {
  7812. margin-top: 24px;
  7813. .lecture-scan {
  7814. background: #f5f7fa;
  7815. border-radius: 8px;
  7816. overflow: hidden;
  7817. &__header {
  7818. height: 40px;
  7819. line-height: 40px;
  7820. padding: 0 16px;
  7821. font-size: 16px;
  7822. font-family: Microsoft YaHei;
  7823. font-weight: bold;
  7824. color: #333333;
  7825. }
  7826. &__body {
  7827. height: 800px;
  7828. text-align: center;
  7829. overflow-y: scroll;
  7830. .iframe {
  7831. width: 100%;
  7832. }
  7833. }
  7834. }
  7835. }
  7836. }
  7837. }
  7838. }
  7839. }
  7840. }
  7841. }
  7842. }
  7843. }
  7844. .take-photo {
  7845. /deep/ .el-dialog__header {
  7846. display: none;
  7847. }
  7848. /deep/ .el-dialog__body {
  7849. padding: 0;
  7850. overflow: unset;
  7851. }
  7852. &__close {
  7853. cursor: pointer;
  7854. position: absolute;
  7855. right: 0;
  7856. top: -28px;
  7857. width: 24px;
  7858. height: 24px;
  7859. line-height: 24px;
  7860. text-align: center;
  7861. color: #eee;
  7862. border: 1px solid #eee;
  7863. border-radius: 50%;
  7864. }
  7865. &__header {
  7866. height: 40px;
  7867. border-bottom: 1px solid #eee;
  7868. line-height: 40px;
  7869. font-size: 16px;
  7870. font-family: Microsoft YaHei;
  7871. font-weight: bold;
  7872. color: #333333;
  7873. padding-left: 24px;
  7874. }
  7875. &__body {
  7876. height: 400px;
  7877. padding: 40px 24px;
  7878. .left-box {
  7879. width: 336px;
  7880. float: left;
  7881. .title {
  7882. font-size: 16px;
  7883. font-family: Microsoft YaHei;
  7884. font-weight: bold;
  7885. color: #ff3b30;
  7886. line-height: 24px;
  7887. }
  7888. .content {
  7889. font-size: 14px;
  7890. font-family: Microsoft YaHei;
  7891. font-weight: 400;
  7892. color: #333333;
  7893. line-height: 28px;
  7894. margin-top: 32px;
  7895. }
  7896. }
  7897. .right-box {
  7898. float: right;
  7899. width: 400px;
  7900. height: 300px;
  7901. video {
  7902. width: 100%;
  7903. height: 100%;
  7904. }
  7905. }
  7906. }
  7907. &__footer {
  7908. height: 90px;
  7909. border-top: 1px solid #eee;
  7910. text-align: center;
  7911. .take {
  7912. display: inline-block;
  7913. width: 200px;
  7914. height: 40px;
  7915. padding: 0;
  7916. border-radius: 20px;
  7917. text-align: center;
  7918. line-height: 40px;
  7919. margin: 24px auto;
  7920. }
  7921. }
  7922. }
  7923. .info {
  7924. &__content {
  7925. height: 500px;
  7926. overflow-y: scroll;
  7927. .handCenter {
  7928. width: 600px;
  7929. height: 300px;
  7930. background: #ccc;
  7931. }
  7932. .upload-box {
  7933. display: inline-block;
  7934. vertical-align: top;
  7935. .el-icon-error {
  7936. cursor: pointer;
  7937. z-index: 99;
  7938. position: absolute;
  7939. left: 100%;
  7940. bottom: 100%;
  7941. font-size: 20px;
  7942. color: red;
  7943. }
  7944. }
  7945. }
  7946. }
  7947. .showconfirm {
  7948. &__content {
  7949. .text {
  7950. padding-bottom: 20px;
  7951. color: red;
  7952. }
  7953. }
  7954. }
  7955. }
  7956. .answer-question {
  7957. max-height: 416px;
  7958. overflow-y: auto;
  7959. padding: 16px;
  7960. background: rgb(63, 68, 73);
  7961. &::-webkit-scrollbar {
  7962. display: none;
  7963. }
  7964. &__header {
  7965. border-bottom: 1px solid #555;
  7966. .textarea-wrap {
  7967. // background: #65696D;
  7968. border: 1px solid #555;
  7969. border-radius: 8px;
  7970. .textarea {
  7971. height: 100%;
  7972. &::placeholder {
  7973. color: red;
  7974. }
  7975. }
  7976. }
  7977. .submit {
  7978. padding: 10px 20px;
  7979. border-radius: 2px;
  7980. text-align: center;
  7981. font-size: 16px;
  7982. margin: 10px 0;
  7983. float: right;
  7984. }
  7985. }
  7986. &__body {
  7987. .question-list {
  7988. &__item {
  7989. padding: 20px 0;
  7990. display: flex;
  7991. &__avatar {
  7992. width: 40px;
  7993. height: 40px;
  7994. display: table-cell;
  7995. border-radius: 50%;
  7996. text-align: center;
  7997. overflow: hidden;
  7998. img {
  7999. display: inline-block;
  8000. vertical-align: middle;
  8001. max-width: 100%;
  8002. max-height: 100%;
  8003. }
  8004. }
  8005. &__content {
  8006. flex: 1;
  8007. border-bottom: 1px solid #555555;
  8008. margin-left: 10px;
  8009. .nickname {
  8010. font-size: 14px;
  8011. font-family: Microsoft YaHei;
  8012. font-weight: bold;
  8013. color: #f5f5f5;
  8014. line-height: 24px;
  8015. }
  8016. .desc {
  8017. font-size: 14px;
  8018. font-family: Microsoft YaHei;
  8019. font-weight: 400;
  8020. color: #cccccc;
  8021. line-height: 24px;
  8022. }
  8023. .time {
  8024. font-size: 14px;
  8025. font-family: Microsoft YaHei;
  8026. font-weight: 400;
  8027. color: #999999;
  8028. line-height: 24px;
  8029. .replay {
  8030. float: right;
  8031. font-size: 14px;
  8032. font-family: Microsoft YaHei;
  8033. font-weight: 400;
  8034. color: #3f8dfd;
  8035. line-height: 24px;
  8036. margin-right: 20px;
  8037. }
  8038. .del {
  8039. float: right;
  8040. cursor: pointer;
  8041. font-size: 14px;
  8042. font-family: Microsoft YaHei;
  8043. font-weight: 400;
  8044. color: #fa8c16;
  8045. line-height: 24px;
  8046. margin-right: 20px;
  8047. }
  8048. }
  8049. .reply-list {
  8050. margin: 20px 0;
  8051. width: 100%;
  8052. background-color: #2f3236;
  8053. border-radius: 8px;
  8054. padding: 0 0 0 20px;
  8055. &__item {
  8056. padding: 20px 0;
  8057. display: flex;
  8058. border-bottom: 1px solid #555555;
  8059. &:nth-last-of-type(1) {
  8060. border: 0;
  8061. }
  8062. &__avatar {
  8063. width: 40px;
  8064. height: 40px;
  8065. display: table-cell;
  8066. border-radius: 50%;
  8067. text-align: center;
  8068. border-radius: 50%;
  8069. overflow: hidden;
  8070. img {
  8071. display: inline-block;
  8072. vertical-align: middle;
  8073. max-width: 100%;
  8074. max-height: 100%;
  8075. }
  8076. }
  8077. &__content {
  8078. border-radius: 8px;
  8079. flex: 1;
  8080. margin-left: 10px;
  8081. .nickname {
  8082. font-size: 14px;
  8083. font-family: Microsoft YaHei;
  8084. font-weight: bold;
  8085. color: #f5f5f5;
  8086. line-height: 24px;
  8087. }
  8088. .desc {
  8089. font-size: 14px;
  8090. font-family: Microsoft YaHei;
  8091. font-weight: 400;
  8092. color: #666666;
  8093. line-height: 24px;
  8094. }
  8095. .time {
  8096. font-size: 14px;
  8097. font-family: Microsoft YaHei;
  8098. font-weight: 400;
  8099. color: #999999;
  8100. line-height: 24px;
  8101. .reply {
  8102. float: right;
  8103. font-size: 14px;
  8104. font-family: Microsoft YaHei;
  8105. font-weight: 400;
  8106. color: #3f8dfd;
  8107. line-height: 24px;
  8108. margin-right: 20px;
  8109. cursor: pointer;
  8110. user-select: none;
  8111. }
  8112. .del {
  8113. cursor: pointer;
  8114. margin-right: 20px;
  8115. float: right;
  8116. font-size: 14px;
  8117. font-family: Microsoft YaHei;
  8118. font-weight: 400;
  8119. color: #ff3b30;
  8120. line-height: 24px;
  8121. }
  8122. }
  8123. }
  8124. }
  8125. }
  8126. }
  8127. }
  8128. }
  8129. }
  8130. }
  8131. .lecture-notes {
  8132. &::-webkit-scrollbar {
  8133. display: none;
  8134. }
  8135. max-height: 416px;
  8136. overflow-y: auto;
  8137. padding: 16px;
  8138. background: rgb(63, 68, 73);
  8139. &__content {
  8140. .left-boxs {
  8141. // float: left;
  8142. // width: 462px;
  8143. .textarea {
  8144. border-bottom: 1px solid #555555;
  8145. .submit {
  8146. padding: 10px 20px;
  8147. border-radius: 2px;
  8148. text-align: center;
  8149. font-size: 16px;
  8150. margin: 10px 0;
  8151. float: right;
  8152. }
  8153. }
  8154. .note-list {
  8155. &__content {
  8156. border-bottom: 1px solid #555555;
  8157. &__title {
  8158. width: 216px;
  8159. height: 24px;
  8160. background: #ccc;
  8161. border-radius: 24px;
  8162. font-size: 14px;
  8163. color: #666666;
  8164. text-align: center;
  8165. line-height: 24px;
  8166. margin: 20px 0;
  8167. }
  8168. }
  8169. &__item {
  8170. display: flex;
  8171. padding: 15px;
  8172. .el-icon-video-play {
  8173. cursor: pointer;
  8174. font-size: 20px;
  8175. color: #3f8dfd;
  8176. }
  8177. &__content {
  8178. flex: 1;
  8179. margin-left: 10px;
  8180. .title {
  8181. cursor: pointer;
  8182. font-size: 14px;
  8183. font-family: Microsoft YaHei;
  8184. font-weight: bold;
  8185. color: #3f8dfd;
  8186. line-height: 24px;
  8187. }
  8188. .desc {
  8189. font-size: 14px;
  8190. font-family: Microsoft YaHei;
  8191. font-weight: 400;
  8192. color: #666666;
  8193. line-height: 24px;
  8194. }
  8195. .time {
  8196. font-size: 14px;
  8197. font-family: Microsoft YaHei;
  8198. font-weight: 400;
  8199. color: #999999;
  8200. line-height: 24px;
  8201. }
  8202. }
  8203. }
  8204. }
  8205. .pagination {
  8206. margin-top: 30px;
  8207. text-align: center;
  8208. }
  8209. }
  8210. .right-box {
  8211. width: 786px;
  8212. float: right;
  8213. .lecture-list {
  8214. background: #f5f7fa;
  8215. border-radius: 8px;
  8216. &__header {
  8217. padding: 0 16px;
  8218. height: 40px;
  8219. line-height: 40px;
  8220. font-size: 18px;
  8221. font-family: Microsoft YaHei;
  8222. font-weight: bold;
  8223. color: #333333;
  8224. .slide-btn {
  8225. cursor: pointer;
  8226. float: right;
  8227. font-size: 14px;
  8228. font-family: Microsoft YaHei;
  8229. font-weight: 400;
  8230. color: #999999;
  8231. }
  8232. }
  8233. &__body {
  8234. .list {
  8235. &__item {
  8236. border-top: 1px solid #fff;
  8237. padding: 0 8px 0 16px;
  8238. height: 56px;
  8239. line-height: 55px;
  8240. display: flex;
  8241. align-items: center;
  8242. .title {
  8243. flex: 1;
  8244. font-size: 16px;
  8245. font-family: Microsoft YaHei;
  8246. font-weight: 400;
  8247. color: #333333;
  8248. }
  8249. .btns {
  8250. .btn {
  8251. cursor: pointer;
  8252. display: inline-block;
  8253. vertical-align: middle;
  8254. width: 80px;
  8255. height: 32px;
  8256. background: #ffffff;
  8257. border: 1px solid #3f8dfd;
  8258. border-radius: 16px;
  8259. text-align: center;
  8260. line-height: 30px;
  8261. color: #3f8dfd;
  8262. margin: 0 8px;
  8263. }
  8264. }
  8265. }
  8266. }
  8267. }
  8268. &__footer {
  8269. margin-top: 24px;
  8270. .lecture-scan {
  8271. background: #f5f7fa;
  8272. border-radius: 8px;
  8273. overflow: hidden;
  8274. &__header {
  8275. height: 40px;
  8276. line-height: 40px;
  8277. padding: 0 16px;
  8278. font-size: 16px;
  8279. font-family: Microsoft YaHei;
  8280. font-weight: bold;
  8281. color: #333333;
  8282. }
  8283. &__body {
  8284. height: 800px;
  8285. text-align: center;
  8286. overflow-y: scroll;
  8287. .iframe {
  8288. width: 100%;
  8289. }
  8290. }
  8291. }
  8292. }
  8293. }
  8294. }
  8295. }
  8296. }
  8297. .user_notes {
  8298. border-bottom: 1px solid #555;
  8299. .p1 {
  8300. margin: 8px 0px;
  8301. color: #3f8dfd;
  8302. font-size: 14px;
  8303. span {
  8304. float: right;
  8305. color: #999;
  8306. font-size: 12px;
  8307. }
  8308. }
  8309. .p2 {
  8310. margin-bottom: 8px;
  8311. font-size: 14px;
  8312. color: #ccc;
  8313. }
  8314. }
  8315. /deep/ textarea {
  8316. background: #65696d;
  8317. color: #c7c7c7;
  8318. border-color: transparent;
  8319. }
  8320. /deep/ .el-input__count {
  8321. color: #999;
  8322. background: transparent;
  8323. }
  8324. .lecture-notesjy {
  8325. display: flex;
  8326. flex-direction: column;
  8327. max-height: 416px;
  8328. .listItem {
  8329. padding-bottom: 14px;
  8330. margin-bottom: 10px;
  8331. border-bottom: 1px solid #eee;
  8332. .titles {
  8333. color: #fff;
  8334. font-weight: bold;
  8335. text-align: center;
  8336. padding: 10px;
  8337. }
  8338. .btns {
  8339. display: flex;
  8340. justify-content: space-around;
  8341. align-items: center;
  8342. .btn {
  8343. border-radius: 8px;
  8344. background-color: #fff;
  8345. padding: 6px 16px;
  8346. user-select: none;
  8347. cursor: pointer;
  8348. transition: all 0.2s;
  8349. &:hover {
  8350. background-color: #f2f7ff;
  8351. color: #3f8dfd;
  8352. }
  8353. }
  8354. }
  8355. }
  8356. .lecture-listFooter {
  8357. flex: 1;
  8358. overflow: auto;
  8359. }
  8360. }
  8361. .topstyle {
  8362. border-bottom: 2px solid #eee;
  8363. margin-bottom: 16px;
  8364. p {
  8365. background-color: #f8f8f9;
  8366. font-size: 14px;
  8367. color: #3f8dfd;
  8368. padding: 5px 12px;
  8369. }
  8370. }
  8371. .height_style {
  8372. max-height: 600px;
  8373. overflow-y: auto;
  8374. }
  8375. .list_style {
  8376. height: 62px;
  8377. color: #222;
  8378. line-height: 58px;
  8379. padding: 0px 16px;
  8380. cursor: pointer;
  8381. transition: all 0.2s;
  8382. display: flex;
  8383. &:hover {
  8384. background-color: rgba(63, 141, 253, 0.3) !important;
  8385. }
  8386. }
  8387. .list_styleHeader {
  8388. height: 60px;
  8389. color: #3f8dfd;
  8390. line-height: 58px;
  8391. padding: 0px 16px;
  8392. }
  8393. // 老师名字样式
  8394. .teacher_names {
  8395. display: flex;
  8396. margin-left: 20px;
  8397. .names {
  8398. font-size: 13px;
  8399. color: #666666;
  8400. margin-right: 12px;
  8401. cursor: pointer;
  8402. // background: #F8F8F8;
  8403. border-radius: 4px;
  8404. padding: 3px 6px;
  8405. &.nactive {
  8406. color: #3F8DFD;
  8407. background: #F2F7FF;
  8408. }
  8409. }
  8410. }
  8411. .teacherList_name {
  8412. display: flex;
  8413. margin-left: 20px;
  8414. margin-top: 10px;
  8415. .names {
  8416. font-size: 13px;
  8417. color: #383838;
  8418. margin-right: 8px;
  8419. cursor: pointer;
  8420. background: #818181;
  8421. border-radius: 4px;
  8422. padding: 3px 6px;
  8423. &.nactive {
  8424. background: #CCCCCC;
  8425. }
  8426. }
  8427. }
  8428. </style>