index.vue 317 KB

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