index.vue 320 KB

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