index.vue 319 KB

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