index.vue 310 KB

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