product-right.js 198 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410
  1. exports.ids = [27,13,24,26,33,34,35,36,38,39,40,41,43,44,45];
  2. exports.modules = {
  3. /***/ 147:
  4. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5. "use strict";
  6. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return on; });
  7. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return off; });
  8. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return once; });
  9. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasClass; });
  10. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
  11. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return removeClass; });
  12. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getStyle; });
  13. /* unused harmony export setStyle */
  14. /* unused harmony export isScroll */
  15. /* unused harmony export getScrollContainer */
  16. /* unused harmony export isInContainer */
  17. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
  18. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
  19. /* istanbul ignore next */
  20. const isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
  21. const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
  22. const MOZ_HACK_REGEXP = /^moz([A-Z])/;
  23. const ieVersion = isServer ? 0 : Number(document.documentMode);
  24. /* istanbul ignore next */
  25. const trim = function(string) {
  26. return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
  27. };
  28. /* istanbul ignore next */
  29. const camelCase = function(name) {
  30. return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
  31. return offset ? letter.toUpperCase() : letter;
  32. }).replace(MOZ_HACK_REGEXP, 'Moz$1');
  33. };
  34. /* istanbul ignore next */
  35. const on = (function() {
  36. if (!isServer && document.addEventListener) {
  37. return function(element, event, handler) {
  38. if (element && event && handler) {
  39. element.addEventListener(event, handler, false);
  40. }
  41. };
  42. } else {
  43. return function(element, event, handler) {
  44. if (element && event && handler) {
  45. element.attachEvent('on' + event, handler);
  46. }
  47. };
  48. }
  49. })();
  50. /* istanbul ignore next */
  51. const off = (function() {
  52. if (!isServer && document.removeEventListener) {
  53. return function(element, event, handler) {
  54. if (element && event) {
  55. element.removeEventListener(event, handler, false);
  56. }
  57. };
  58. } else {
  59. return function(element, event, handler) {
  60. if (element && event) {
  61. element.detachEvent('on' + event, handler);
  62. }
  63. };
  64. }
  65. })();
  66. /* istanbul ignore next */
  67. const once = function(el, event, fn) {
  68. var listener = function() {
  69. if (fn) {
  70. fn.apply(this, arguments);
  71. }
  72. off(el, event, listener);
  73. };
  74. on(el, event, listener);
  75. };
  76. /* istanbul ignore next */
  77. function hasClass(el, cls) {
  78. if (!el || !cls) return false;
  79. if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
  80. if (el.classList) {
  81. return el.classList.contains(cls);
  82. } else {
  83. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  84. }
  85. };
  86. /* istanbul ignore next */
  87. function addClass(el, cls) {
  88. if (!el) return;
  89. var curClass = el.className;
  90. var classes = (cls || '').split(' ');
  91. for (var i = 0, j = classes.length; i < j; i++) {
  92. var clsName = classes[i];
  93. if (!clsName) continue;
  94. if (el.classList) {
  95. el.classList.add(clsName);
  96. } else if (!hasClass(el, clsName)) {
  97. curClass += ' ' + clsName;
  98. }
  99. }
  100. if (!el.classList) {
  101. el.setAttribute('class', curClass);
  102. }
  103. };
  104. /* istanbul ignore next */
  105. function removeClass(el, cls) {
  106. if (!el || !cls) return;
  107. var classes = cls.split(' ');
  108. var curClass = ' ' + el.className + ' ';
  109. for (var i = 0, j = classes.length; i < j; i++) {
  110. var clsName = classes[i];
  111. if (!clsName) continue;
  112. if (el.classList) {
  113. el.classList.remove(clsName);
  114. } else if (hasClass(el, clsName)) {
  115. curClass = curClass.replace(' ' + clsName + ' ', ' ');
  116. }
  117. }
  118. if (!el.classList) {
  119. el.setAttribute('class', trim(curClass));
  120. }
  121. };
  122. /* istanbul ignore next */
  123. const getStyle = ieVersion < 9 ? function(element, styleName) {
  124. if (isServer) return;
  125. if (!element || !styleName) return null;
  126. styleName = camelCase(styleName);
  127. if (styleName === 'float') {
  128. styleName = 'styleFloat';
  129. }
  130. try {
  131. switch (styleName) {
  132. case 'opacity':
  133. try {
  134. return element.filters.item('alpha').opacity / 100;
  135. } catch (e) {
  136. return 1.0;
  137. }
  138. default:
  139. return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
  140. }
  141. } catch (e) {
  142. return element.style[styleName];
  143. }
  144. } : function(element, styleName) {
  145. if (isServer) return;
  146. if (!element || !styleName) return null;
  147. styleName = camelCase(styleName);
  148. if (styleName === 'float') {
  149. styleName = 'cssFloat';
  150. }
  151. try {
  152. var computed = document.defaultView.getComputedStyle(element, '');
  153. return element.style[styleName] || computed ? computed[styleName] : null;
  154. } catch (e) {
  155. return element.style[styleName];
  156. }
  157. };
  158. /* istanbul ignore next */
  159. function setStyle(element, styleName, value) {
  160. if (!element || !styleName) return;
  161. if (typeof styleName === 'object') {
  162. for (var prop in styleName) {
  163. if (styleName.hasOwnProperty(prop)) {
  164. setStyle(element, prop, styleName[prop]);
  165. }
  166. }
  167. } else {
  168. styleName = camelCase(styleName);
  169. if (styleName === 'opacity' && ieVersion < 9) {
  170. element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
  171. } else {
  172. element.style[styleName] = value;
  173. }
  174. }
  175. };
  176. const isScroll = (el, vertical) => {
  177. if (isServer) return;
  178. const determinedDirection = vertical !== null && vertical !== undefined;
  179. const overflow = determinedDirection
  180. ? vertical
  181. ? getStyle(el, 'overflow-y')
  182. : getStyle(el, 'overflow-x')
  183. : getStyle(el, 'overflow');
  184. return overflow.match(/(scroll|auto|overlay)/);
  185. };
  186. const getScrollContainer = (el, vertical) => {
  187. if (isServer) return;
  188. let parent = el;
  189. while (parent) {
  190. if ([window, document, document.documentElement].includes(parent)) {
  191. return window;
  192. }
  193. if (isScroll(parent, vertical)) {
  194. return parent;
  195. }
  196. parent = parent.parentNode;
  197. }
  198. return parent;
  199. };
  200. const isInContainer = (el, container) => {
  201. if (isServer || !el || !container) return false;
  202. const elRect = el.getBoundingClientRect();
  203. let containerRect;
  204. if ([window, document, document.documentElement, null, undefined].includes(container)) {
  205. containerRect = {
  206. top: 0,
  207. right: window.innerWidth,
  208. bottom: window.innerHeight,
  209. left: 0
  210. };
  211. } else {
  212. containerRect = container.getBoundingClientRect();
  213. }
  214. return elRect.top < containerRect.bottom &&
  215. elRect.bottom > containerRect.top &&
  216. elRect.right > containerRect.left &&
  217. elRect.left < containerRect.right;
  218. };
  219. /***/ }),
  220. /***/ 148:
  221. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  222. "use strict";
  223. // EXPORTS
  224. __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isFirefox; });
  225. __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ kebabCase; });
  226. __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ rafThrottle; });
  227. __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ isMac; });
  228. // UNUSED EXPORTS: noop, hasOwn, toObject, getValueByPath, getPropByPath, generateId, valueEquals, escapeRegexpString, arrayFindIndex, arrayFind, coerceTruthyValueToArray, isIE, isEdge, autoprefixer, capitalize, looseEqual, arrayEquals, isEqual, isEmpty, objToArray
  229. // EXTERNAL MODULE: external "vue"
  230. var external_vue_ = __webpack_require__(0);
  231. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  232. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js
  233. function isString(obj) {
  234. return Object.prototype.toString.call(obj) === '[object String]';
  235. }
  236. function isObject(obj) {
  237. return Object.prototype.toString.call(obj) === '[object Object]';
  238. }
  239. function isHtmlElement(node) {
  240. return node && node.nodeType === Node.ELEMENT_NODE;
  241. }
  242. /**
  243. * - Inspired:
  244. * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
  245. */
  246. let isFunction = (functionToCheck) => {
  247. var getType = {};
  248. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  249. };
  250. if ( true && typeof Int8Array !== 'object' && (external_vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
  251. isFunction = function(obj) {
  252. return typeof obj === 'function' || false;
  253. };
  254. }
  255. const isUndefined = (val)=> {
  256. return val === void 0;
  257. };
  258. const isDefined = (val) => {
  259. return val !== undefined && val !== null;
  260. };
  261. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js
  262. const util_hasOwnProperty = Object.prototype.hasOwnProperty;
  263. function noop() {};
  264. function hasOwn(obj, key) {
  265. return util_hasOwnProperty.call(obj, key);
  266. };
  267. function extend(to, _from) {
  268. for (let key in _from) {
  269. to[key] = _from[key];
  270. }
  271. return to;
  272. };
  273. function toObject(arr) {
  274. var res = {};
  275. for (let i = 0; i < arr.length; i++) {
  276. if (arr[i]) {
  277. extend(res, arr[i]);
  278. }
  279. }
  280. return res;
  281. };
  282. const getValueByPath = function(object, prop) {
  283. prop = prop || '';
  284. const paths = prop.split('.');
  285. let current = object;
  286. let result = null;
  287. for (let i = 0, j = paths.length; i < j; i++) {
  288. const path = paths[i];
  289. if (!current) break;
  290. if (i === j - 1) {
  291. result = current[path];
  292. break;
  293. }
  294. current = current[path];
  295. }
  296. return result;
  297. };
  298. function getPropByPath(obj, path, strict) {
  299. let tempObj = obj;
  300. path = path.replace(/\[(\w+)\]/g, '.$1');
  301. path = path.replace(/^\./, '');
  302. let keyArr = path.split('.');
  303. let i = 0;
  304. for (let len = keyArr.length; i < len - 1; ++i) {
  305. if (!tempObj && !strict) break;
  306. let key = keyArr[i];
  307. if (key in tempObj) {
  308. tempObj = tempObj[key];
  309. } else {
  310. if (strict) {
  311. throw new Error('please transfer a valid prop path to form item!');
  312. }
  313. break;
  314. }
  315. }
  316. return {
  317. o: tempObj,
  318. k: keyArr[i],
  319. v: tempObj ? tempObj[keyArr[i]] : null
  320. };
  321. };
  322. const generateId = function() {
  323. return Math.floor(Math.random() * 10000);
  324. };
  325. const valueEquals = (a, b) => {
  326. // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
  327. if (a === b) return true;
  328. if (!(a instanceof Array)) return false;
  329. if (!(b instanceof Array)) return false;
  330. if (a.length !== b.length) return false;
  331. for (let i = 0; i !== a.length; ++i) {
  332. if (a[i] !== b[i]) return false;
  333. }
  334. return true;
  335. };
  336. const escapeRegexpString = (value = '') => String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
  337. // TODO: use native Array.find, Array.findIndex when IE support is dropped
  338. const arrayFindIndex = function(arr, pred) {
  339. for (let i = 0; i !== arr.length; ++i) {
  340. if (pred(arr[i])) {
  341. return i;
  342. }
  343. }
  344. return -1;
  345. };
  346. const arrayFind = function(arr, pred) {
  347. const idx = arrayFindIndex(arr, pred);
  348. return idx !== -1 ? arr[idx] : undefined;
  349. };
  350. // coerce truthy value to array
  351. const coerceTruthyValueToArray = function(val) {
  352. if (Array.isArray(val)) {
  353. return val;
  354. } else if (val) {
  355. return [val];
  356. } else {
  357. return [];
  358. }
  359. };
  360. const isIE = function() {
  361. return !external_vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
  362. };
  363. const isEdge = function() {
  364. return !external_vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
  365. };
  366. const isFirefox = function() {
  367. return !external_vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
  368. };
  369. const autoprefixer = function(style) {
  370. if (typeof style !== 'object') return style;
  371. const rules = ['transform', 'transition', 'animation'];
  372. const prefixes = ['ms-', 'webkit-'];
  373. rules.forEach(rule => {
  374. const value = style[rule];
  375. if (rule && value) {
  376. prefixes.forEach(prefix => {
  377. style[prefix + rule] = value;
  378. });
  379. }
  380. });
  381. return style;
  382. };
  383. const kebabCase = function(str) {
  384. const hyphenateRE = /([^-])([A-Z])/g;
  385. return str
  386. .replace(hyphenateRE, '$1-$2')
  387. .replace(hyphenateRE, '$1-$2')
  388. .toLowerCase();
  389. };
  390. const capitalize = function(str) {
  391. if (!isString(str)) return str;
  392. return str.charAt(0).toUpperCase() + str.slice(1);
  393. };
  394. const looseEqual = function(a, b) {
  395. const isObjectA = isObject(a);
  396. const isObjectB = isObject(b);
  397. if (isObjectA && isObjectB) {
  398. return JSON.stringify(a) === JSON.stringify(b);
  399. } else if (!isObjectA && !isObjectB) {
  400. return String(a) === String(b);
  401. } else {
  402. return false;
  403. }
  404. };
  405. const arrayEquals = function(arrayA, arrayB) {
  406. arrayA = arrayA || [];
  407. arrayB = arrayB || [];
  408. if (arrayA.length !== arrayB.length) {
  409. return false;
  410. }
  411. for (let i = 0; i < arrayA.length; i++) {
  412. if (!looseEqual(arrayA[i], arrayB[i])) {
  413. return false;
  414. }
  415. }
  416. return true;
  417. };
  418. const isEqual = function(value1, value2) {
  419. if (Array.isArray(value1) && Array.isArray(value2)) {
  420. return arrayEquals(value1, value2);
  421. }
  422. return looseEqual(value1, value2);
  423. };
  424. const isEmpty = function(val) {
  425. // null or undefined
  426. if (val == null) return true;
  427. if (typeof val === 'boolean') return false;
  428. if (typeof val === 'number') return !val;
  429. if (val instanceof Error) return val.message === '';
  430. switch (Object.prototype.toString.call(val)) {
  431. // String or Array
  432. case '[object String]':
  433. case '[object Array]':
  434. return !val.length;
  435. // Map or Set or File
  436. case '[object File]':
  437. case '[object Map]':
  438. case '[object Set]': {
  439. return !val.size;
  440. }
  441. // Plain Object
  442. case '[object Object]': {
  443. return !Object.keys(val).length;
  444. }
  445. }
  446. return false;
  447. };
  448. function rafThrottle(fn) {
  449. let locked = false;
  450. return function(...args) {
  451. if (locked) return;
  452. locked = true;
  453. window.requestAnimationFrame(_ => {
  454. fn.apply(this, args);
  455. locked = false;
  456. });
  457. };
  458. }
  459. function objToArray(obj) {
  460. if (Array.isArray(obj)) {
  461. return obj;
  462. }
  463. return isEmpty(obj) ? [] : [obj];
  464. }
  465. const isMac = function() {
  466. return !external_vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
  467. };
  468. /***/ }),
  469. /***/ 149:
  470. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  471. "use strict";
  472. /* harmony default export */ __webpack_exports__["a"] = (function(target) {
  473. for (let i = 1, j = arguments.length; i < j; i++) {
  474. let source = arguments[i] || {};
  475. for (let prop in source) {
  476. if (source.hasOwnProperty(prop)) {
  477. let value = source[prop];
  478. if (value !== undefined) {
  479. target[prop] = value;
  480. }
  481. }
  482. }
  483. }
  484. return target;
  485. });;
  486. /***/ }),
  487. /***/ 155:
  488. /***/ (function(module, exports) {
  489. // Exports
  490. module.exports = {
  491. };
  492. /***/ }),
  493. /***/ 157:
  494. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  495. "use strict";
  496. // ESM COMPAT FLAG
  497. __webpack_require__.r(__webpack_exports__);
  498. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Tinymce/index.vue?vue&type=template&id=a9d38a5e&scoped=true
  499. var render = function render() {
  500. var _vm = this,
  501. _c = _vm._self._c;
  502. return _c('div', {
  503. staticClass: "tinymce-container",
  504. class: {
  505. fullscreen: _vm.fullscreen
  506. },
  507. style: {
  508. width: _vm.containerWidth
  509. }
  510. }, [_vm._ssrNode("<textarea" + _vm._ssrAttr("id", _vm.tinymceId) + " class=\"tinymce-textarea\" data-v-a9d38a5e></textarea>")]);
  511. };
  512. var staticRenderFns = [];
  513. // CONCATENATED MODULE: ./components/Tinymce/index.vue?vue&type=template&id=a9d38a5e&scoped=true
  514. // EXTERNAL MODULE: ./components/Tinymce/plugins.js
  515. var plugins = __webpack_require__(162);
  516. // EXTERNAL MODULE: ./components/Tinymce/toolbar.js
  517. var toolbar = __webpack_require__(163);
  518. // EXTERNAL MODULE: ./components/Tinymce/dynamicLoadScript.js
  519. var dynamicLoadScript = __webpack_require__(164);
  520. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Tinymce/index.vue?vue&type=script&lang=js
  521. /**
  522. * docs:
  523. * https://panjiachen.github.io/vue-element-admin-site/feature/component/rich-editor.html#tinymce
  524. */
  525. // import editorImage from './components/EditorImage'
  526. // why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one
  527. const tinymceCDN = '//cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js';
  528. /* harmony default export */ var Tinymcevue_type_script_lang_js = ({
  529. name: 'Tinymce',
  530. // components: { editorImage },
  531. props: {
  532. id: {
  533. type: String,
  534. default: function () {
  535. return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '');
  536. }
  537. },
  538. value: {
  539. type: String,
  540. default: ''
  541. },
  542. toolbar: {
  543. type: Array,
  544. required: false,
  545. default() {
  546. return [];
  547. }
  548. },
  549. menubar: {
  550. type: String,
  551. default: 'file edit insert view format table'
  552. },
  553. height: {
  554. type: [Number, String],
  555. required: false,
  556. default: 360
  557. },
  558. width: {
  559. type: [Number, String],
  560. required: false,
  561. default: 'auto'
  562. }
  563. },
  564. data() {
  565. return {
  566. hasChange: false,
  567. hasInit: false,
  568. tinymceId: this.id,
  569. fullscreen: false,
  570. languageTypeList: {
  571. 'en': 'en',
  572. 'zh': 'zh_CN',
  573. 'es': 'es_MX',
  574. 'ja': 'ja'
  575. }
  576. };
  577. },
  578. computed: {
  579. language() {
  580. return this.languageTypeList[this.$store.getters.language];
  581. },
  582. containerWidth() {
  583. const width = this.width;
  584. if (/^[\d]+(\.[\d]+)?$/.test(width)) {
  585. // matches `100`, `'100'`
  586. return `${width}px`;
  587. }
  588. return width;
  589. }
  590. },
  591. watch: {
  592. value(val) {
  593. if (!this.hasChange && this.hasInit) {
  594. this.$nextTick(() => window.tinymce.get(this.tinymceId).setContent(val || ''));
  595. }
  596. },
  597. language() {
  598. this.destroyTinymce();
  599. this.$nextTick(() => this.initTinymce());
  600. }
  601. },
  602. mounted() {
  603. this.init();
  604. },
  605. activated() {
  606. if (window.tinymce) {
  607. this.initTinymce();
  608. }
  609. },
  610. deactivated() {
  611. this.destroyTinymce();
  612. },
  613. destroyed() {
  614. this.destroyTinymce();
  615. },
  616. methods: {
  617. init() {
  618. // dynamic load tinymce from cdn
  619. Object(dynamicLoadScript["default"])(tinymceCDN, err => {
  620. if (err) {
  621. this.$message.error(err.message);
  622. return;
  623. }
  624. this.initTinymce();
  625. });
  626. },
  627. initTinymce() {
  628. const _this = this;
  629. window.tinymce.init({
  630. language: this.language,
  631. selector: `#${this.tinymceId}`,
  632. height: this.height,
  633. body_class: 'panel-body ',
  634. object_resizing: false,
  635. toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar["default"],
  636. menubar: this.menubar,
  637. plugins: plugins["default"],
  638. end_container_on_empty_block: true,
  639. powerpaste_word_import: 'clean',
  640. code_dialog_height: 450,
  641. code_dialog_width: 1000,
  642. advlist_bullet_styles: 'square',
  643. advlist_number_styles: 'default',
  644. imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],
  645. default_link_target: '_blank',
  646. link_title: false,
  647. nonbreaking_force_tab: true,
  648. // inserting nonbreaking space &nbsp; need Nonbreaking Space Plugin
  649. init_instance_callback: editor => {
  650. if (_this.value) {
  651. editor.setContent(_this.value);
  652. }
  653. _this.hasInit = true;
  654. editor.on('NodeChange Change KeyUp SetContent', () => {
  655. this.hasChange = true;
  656. this.$emit('input', editor.getContent());
  657. });
  658. },
  659. setup(editor) {
  660. editor.on('FullscreenStateChanged', e => {
  661. _this.fullscreen = e.state;
  662. });
  663. },
  664. // it will try to keep these URLs intact
  665. // https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/
  666. // https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
  667. convert_urls: false
  668. // 整合七牛上传
  669. // images_dataimg_filter(img) {
  670. // setTimeout(() => {
  671. // const $image = $(img);
  672. // $image.removeAttr('width');
  673. // $image.removeAttr('height');
  674. // if ($image[0].height && $image[0].width) {
  675. // $image.attr('data-wscntype', 'image');
  676. // $image.attr('data-wscnh', $image[0].height);
  677. // $image.attr('data-wscnw', $image[0].width);
  678. // $image.addClass('wscnph');
  679. // }
  680. // }, 0);
  681. // return img
  682. // },
  683. // images_upload_handler(blobInfo, success, failure, progress) {
  684. // progress(0);
  685. // const token = _this.$store.getters.token;
  686. // getToken(token).then(response => {
  687. // const url = response.data.qiniu_url;
  688. // const formData = new FormData();
  689. // formData.append('token', response.data.qiniu_token);
  690. // formData.append('key', response.data.qiniu_key);
  691. // formData.append('file', blobInfo.blob(), url);
  692. // upload(formData).then(() => {
  693. // success(url);
  694. // progress(100);
  695. // })
  696. // }).catch(err => {
  697. // failure('出现未知问题,刷新页面,或者联系程序员')
  698. // console.log(err);
  699. // });
  700. // },
  701. });
  702. },
  703. destroyTinymce() {
  704. const tinymce = window.tinymce.get(this.tinymceId);
  705. if (this.fullscreen) {
  706. tinymce.execCommand('mceFullScreen');
  707. }
  708. if (tinymce) {
  709. tinymce.destroy();
  710. }
  711. },
  712. setContent(value) {
  713. window.tinymce.get(this.tinymceId).setContent(value);
  714. },
  715. getContent() {
  716. window.tinymce.get(this.tinymceId).getContent();
  717. },
  718. imageSuccessCBK(arr) {
  719. arr.forEach(v => window.tinymce.get(this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`));
  720. }
  721. }
  722. });
  723. // CONCATENATED MODULE: ./components/Tinymce/index.vue?vue&type=script&lang=js
  724. /* harmony default export */ var components_Tinymcevue_type_script_lang_js = (Tinymcevue_type_script_lang_js);
  725. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  726. var componentNormalizer = __webpack_require__(2);
  727. // CONCATENATED MODULE: ./components/Tinymce/index.vue
  728. function injectStyles (context) {
  729. var style0 = __webpack_require__(176)
  730. if (style0.__inject__) style0.__inject__(context)
  731. }
  732. /* normalize component */
  733. var component = Object(componentNormalizer["a" /* default */])(
  734. components_Tinymcevue_type_script_lang_js,
  735. render,
  736. staticRenderFns,
  737. false,
  738. injectStyles,
  739. "a9d38a5e",
  740. "2f101c14"
  741. )
  742. /* harmony default export */ var Tinymce = __webpack_exports__["default"] = (component.exports);
  743. /***/ }),
  744. /***/ 159:
  745. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  746. "use strict";
  747. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=44a7b0fb
  748. var render = function render() {
  749. var _vm = this,
  750. _c = _vm._self._c;
  751. return _c('transition', {
  752. attrs: {
  753. "name": "viewer-fade"
  754. }
  755. }, [_c('div', {
  756. ref: "el-image-viewer__wrapper",
  757. staticClass: "el-image-viewer__wrapper",
  758. style: {
  759. 'z-index': _vm.viewerZIndex
  760. },
  761. attrs: {
  762. "tabindex": "-1"
  763. }
  764. }, [_c('div', {
  765. staticClass: "el-image-viewer__mask",
  766. on: {
  767. "click": function ($event) {
  768. if ($event.target !== $event.currentTarget) return null;
  769. return _vm.handleMaskClick.apply(null, arguments);
  770. }
  771. }
  772. }), _vm._v(" "), _c('span', {
  773. staticClass: "el-image-viewer__btn el-image-viewer__close",
  774. on: {
  775. "click": _vm.hide
  776. }
  777. }, [_c('i', {
  778. staticClass: "el-icon-close"
  779. })]), _vm._v(" "), !_vm.isSingle ? [_c('span', {
  780. staticClass: "el-image-viewer__btn el-image-viewer__prev",
  781. class: {
  782. 'is-disabled': !_vm.infinite && _vm.isFirst
  783. },
  784. on: {
  785. "click": _vm.prev
  786. }
  787. }, [_c('i', {
  788. staticClass: "el-icon-arrow-left"
  789. })]), _vm._v(" "), _c('span', {
  790. staticClass: "el-image-viewer__btn el-image-viewer__next",
  791. class: {
  792. 'is-disabled': !_vm.infinite && _vm.isLast
  793. },
  794. on: {
  795. "click": _vm.next
  796. }
  797. }, [_c('i', {
  798. staticClass: "el-icon-arrow-right"
  799. })])] : _vm._e(), _vm._v(" "), _c('div', {
  800. staticClass: "el-image-viewer__btn el-image-viewer__actions"
  801. }, [_c('div', {
  802. staticClass: "el-image-viewer__actions__inner"
  803. }, [_c('i', {
  804. staticClass: "el-icon-zoom-out",
  805. on: {
  806. "click": function ($event) {
  807. return _vm.handleActions('zoomOut');
  808. }
  809. }
  810. }), _vm._v(" "), _c('i', {
  811. staticClass: "el-icon-zoom-in",
  812. on: {
  813. "click": function ($event) {
  814. return _vm.handleActions('zoomIn');
  815. }
  816. }
  817. }), _vm._v(" "), _c('i', {
  818. staticClass: "el-image-viewer__actions__divider"
  819. }), _vm._v(" "), _c('i', {
  820. class: _vm.mode.icon,
  821. on: {
  822. "click": _vm.toggleMode
  823. }
  824. }), _vm._v(" "), _c('i', {
  825. staticClass: "el-image-viewer__actions__divider"
  826. }), _vm._v(" "), _c('i', {
  827. staticClass: "el-icon-refresh-left",
  828. on: {
  829. "click": function ($event) {
  830. return _vm.handleActions('anticlocelise');
  831. }
  832. }
  833. }), _vm._v(" "), _c('i', {
  834. staticClass: "el-icon-refresh-right",
  835. on: {
  836. "click": function ($event) {
  837. return _vm.handleActions('clocelise');
  838. }
  839. }
  840. })])]), _vm._v(" "), _c('div', {
  841. staticClass: "el-image-viewer__canvas"
  842. }, _vm._l(_vm.urlList, function (url, i) {
  843. return i === _vm.index ? _c('img', {
  844. key: url,
  845. ref: "img",
  846. refInFor: true,
  847. staticClass: "el-image-viewer__img",
  848. style: _vm.imgStyle,
  849. attrs: {
  850. "src": _vm.currentImg
  851. },
  852. on: {
  853. "load": _vm.handleImgLoad,
  854. "error": _vm.handleImgError,
  855. "mousedown": _vm.handleMouseDown
  856. }
  857. }) : _vm._e();
  858. }), 0)], 2)]);
  859. };
  860. var staticRenderFns = [];
  861. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=44a7b0fb
  862. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/dom.js
  863. var utils_dom = __webpack_require__(147);
  864. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/util.js + 1 modules
  865. var util = __webpack_require__(148);
  866. // EXTERNAL MODULE: external "vue"
  867. var external_vue_ = __webpack_require__(0);
  868. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  869. // EXTERNAL MODULE: ./node_modules/element-ui/src/utils/merge.js
  870. var merge = __webpack_require__(149);
  871. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/popup-manager.js
  872. let hasModal = false;
  873. let hasInitZIndex = false;
  874. let popup_manager_zIndex;
  875. const getModal = function() {
  876. if (external_vue_default.a.prototype.$isServer) return;
  877. let modalDom = PopupManager.modalDom;
  878. if (modalDom) {
  879. hasModal = true;
  880. } else {
  881. hasModal = false;
  882. modalDom = document.createElement('div');
  883. PopupManager.modalDom = modalDom;
  884. modalDom.addEventListener('touchmove', function(event) {
  885. event.preventDefault();
  886. event.stopPropagation();
  887. });
  888. modalDom.addEventListener('click', function() {
  889. PopupManager.doOnModalClick && PopupManager.doOnModalClick();
  890. });
  891. }
  892. return modalDom;
  893. };
  894. const instances = {};
  895. const PopupManager = {
  896. modalFade: true,
  897. getInstance: function(id) {
  898. return instances[id];
  899. },
  900. register: function(id, instance) {
  901. if (id && instance) {
  902. instances[id] = instance;
  903. }
  904. },
  905. deregister: function(id) {
  906. if (id) {
  907. instances[id] = null;
  908. delete instances[id];
  909. }
  910. },
  911. nextZIndex: function() {
  912. return PopupManager.zIndex++;
  913. },
  914. modalStack: [],
  915. doOnModalClick: function() {
  916. const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  917. if (!topItem) return;
  918. const instance = PopupManager.getInstance(topItem.id);
  919. if (instance && instance.closeOnClickModal) {
  920. instance.close();
  921. }
  922. },
  923. openModal: function(id, zIndex, dom, modalClass, modalFade) {
  924. if (external_vue_default.a.prototype.$isServer) return;
  925. if (!id || zIndex === undefined) return;
  926. this.modalFade = modalFade;
  927. const modalStack = this.modalStack;
  928. for (let i = 0, j = modalStack.length; i < j; i++) {
  929. const item = modalStack[i];
  930. if (item.id === id) {
  931. return;
  932. }
  933. }
  934. const modalDom = getModal();
  935. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
  936. if (this.modalFade && !hasModal) {
  937. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
  938. }
  939. if (modalClass) {
  940. let classArr = modalClass.trim().split(/\s+/);
  941. classArr.forEach(item => Object(utils_dom["a" /* addClass */])(modalDom, item));
  942. }
  943. setTimeout(() => {
  944. Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-enter');
  945. }, 200);
  946. if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
  947. dom.parentNode.appendChild(modalDom);
  948. } else {
  949. document.body.appendChild(modalDom);
  950. }
  951. if (zIndex) {
  952. modalDom.style.zIndex = zIndex;
  953. }
  954. modalDom.tabIndex = 0;
  955. modalDom.style.display = '';
  956. this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
  957. },
  958. closeModal: function(id) {
  959. const modalStack = this.modalStack;
  960. const modalDom = getModal();
  961. if (modalStack.length > 0) {
  962. const topItem = modalStack[modalStack.length - 1];
  963. if (topItem.id === id) {
  964. if (topItem.modalClass) {
  965. let classArr = topItem.modalClass.trim().split(/\s+/);
  966. classArr.forEach(item => Object(utils_dom["g" /* removeClass */])(modalDom, item));
  967. }
  968. modalStack.pop();
  969. if (modalStack.length > 0) {
  970. modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
  971. }
  972. } else {
  973. for (let i = modalStack.length - 1; i >= 0; i--) {
  974. if (modalStack[i].id === id) {
  975. modalStack.splice(i, 1);
  976. break;
  977. }
  978. }
  979. }
  980. }
  981. if (modalStack.length === 0) {
  982. if (this.modalFade) {
  983. Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
  984. }
  985. setTimeout(() => {
  986. if (modalStack.length === 0) {
  987. if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
  988. modalDom.style.display = 'none';
  989. PopupManager.modalDom = undefined;
  990. }
  991. Object(utils_dom["g" /* removeClass */])(modalDom, 'v-modal-leave');
  992. }, 200);
  993. }
  994. }
  995. };
  996. Object.defineProperty(PopupManager, 'zIndex', {
  997. configurable: true,
  998. get() {
  999. if (!hasInitZIndex) {
  1000. popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
  1001. hasInitZIndex = true;
  1002. }
  1003. return popup_manager_zIndex;
  1004. },
  1005. set(value) {
  1006. popup_manager_zIndex = value;
  1007. }
  1008. });
  1009. const getTopPopup = function() {
  1010. if (external_vue_default.a.prototype.$isServer) return;
  1011. if (PopupManager.modalStack.length > 0) {
  1012. const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  1013. if (!topPopup) return;
  1014. const instance = PopupManager.getInstance(topPopup.id);
  1015. return instance;
  1016. }
  1017. };
  1018. if (!external_vue_default.a.prototype.$isServer) {
  1019. // handle `esc` key when the popup is shown
  1020. window.addEventListener('keydown', function(event) {
  1021. if (event.keyCode === 27) {
  1022. const topPopup = getTopPopup();
  1023. if (topPopup && topPopup.closeOnPressEscape) {
  1024. topPopup.handleClose
  1025. ? topPopup.handleClose()
  1026. : (topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close());
  1027. }
  1028. }
  1029. });
  1030. }
  1031. /* harmony default export */ var popup_manager = (PopupManager);
  1032. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/scrollbar-width.js
  1033. let scrollBarWidth;
  1034. /* harmony default export */ var scrollbar_width = (function() {
  1035. if (external_vue_default.a.prototype.$isServer) return 0;
  1036. if (scrollBarWidth !== undefined) return scrollBarWidth;
  1037. const outer = document.createElement('div');
  1038. outer.className = 'el-scrollbar__wrap';
  1039. outer.style.visibility = 'hidden';
  1040. outer.style.width = '100px';
  1041. outer.style.position = 'absolute';
  1042. outer.style.top = '-9999px';
  1043. document.body.appendChild(outer);
  1044. const widthNoScroll = outer.offsetWidth;
  1045. outer.style.overflow = 'scroll';
  1046. const inner = document.createElement('div');
  1047. inner.style.width = '100%';
  1048. outer.appendChild(inner);
  1049. const widthWithScroll = inner.offsetWidth;
  1050. outer.parentNode.removeChild(outer);
  1051. scrollBarWidth = widthNoScroll - widthWithScroll;
  1052. return scrollBarWidth;
  1053. });;
  1054. // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/index.js
  1055. let idSeed = 1;
  1056. let popup_scrollBarWidth;
  1057. /* harmony default export */ var popup = ({
  1058. props: {
  1059. visible: {
  1060. type: Boolean,
  1061. default: false
  1062. },
  1063. openDelay: {},
  1064. closeDelay: {},
  1065. zIndex: {},
  1066. modal: {
  1067. type: Boolean,
  1068. default: false
  1069. },
  1070. modalFade: {
  1071. type: Boolean,
  1072. default: true
  1073. },
  1074. modalClass: {},
  1075. modalAppendToBody: {
  1076. type: Boolean,
  1077. default: false
  1078. },
  1079. lockScroll: {
  1080. type: Boolean,
  1081. default: true
  1082. },
  1083. closeOnPressEscape: {
  1084. type: Boolean,
  1085. default: false
  1086. },
  1087. closeOnClickModal: {
  1088. type: Boolean,
  1089. default: false
  1090. }
  1091. },
  1092. beforeMount() {
  1093. this._popupId = 'popup-' + idSeed++;
  1094. popup_manager.register(this._popupId, this);
  1095. },
  1096. beforeDestroy() {
  1097. popup_manager.deregister(this._popupId);
  1098. popup_manager.closeModal(this._popupId);
  1099. this.restoreBodyStyle();
  1100. },
  1101. data() {
  1102. return {
  1103. opened: false,
  1104. bodyPaddingRight: null,
  1105. computedBodyPaddingRight: 0,
  1106. withoutHiddenClass: true,
  1107. rendered: false
  1108. };
  1109. },
  1110. watch: {
  1111. visible(val) {
  1112. if (val) {
  1113. if (this._opening) return;
  1114. if (!this.rendered) {
  1115. this.rendered = true;
  1116. external_vue_default.a.nextTick(() => {
  1117. this.open();
  1118. });
  1119. } else {
  1120. this.open();
  1121. }
  1122. } else {
  1123. this.close();
  1124. }
  1125. }
  1126. },
  1127. methods: {
  1128. open(options) {
  1129. if (!this.rendered) {
  1130. this.rendered = true;
  1131. }
  1132. const props = Object(merge["a" /* default */])({}, this.$props || this, options);
  1133. if (this._closeTimer) {
  1134. clearTimeout(this._closeTimer);
  1135. this._closeTimer = null;
  1136. }
  1137. clearTimeout(this._openTimer);
  1138. const openDelay = Number(props.openDelay);
  1139. if (openDelay > 0) {
  1140. this._openTimer = setTimeout(() => {
  1141. this._openTimer = null;
  1142. this.doOpen(props);
  1143. }, openDelay);
  1144. } else {
  1145. this.doOpen(props);
  1146. }
  1147. },
  1148. doOpen(props) {
  1149. if (this.$isServer) return;
  1150. if (this.willOpen && !this.willOpen()) return;
  1151. if (this.opened) return;
  1152. this._opening = true;
  1153. const dom = this.$el;
  1154. const modal = props.modal;
  1155. const zIndex = props.zIndex;
  1156. if (zIndex) {
  1157. popup_manager.zIndex = zIndex;
  1158. }
  1159. if (modal) {
  1160. if (this._closing) {
  1161. popup_manager.closeModal(this._popupId);
  1162. this._closing = false;
  1163. }
  1164. popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
  1165. if (props.lockScroll) {
  1166. this.withoutHiddenClass = !Object(utils_dom["c" /* hasClass */])(document.body, 'el-popup-parent--hidden');
  1167. if (this.withoutHiddenClass) {
  1168. this.bodyPaddingRight = document.body.style.paddingRight;
  1169. this.computedBodyPaddingRight = parseInt(Object(utils_dom["b" /* getStyle */])(document.body, 'paddingRight'), 10);
  1170. }
  1171. popup_scrollBarWidth = scrollbar_width();
  1172. let bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  1173. let bodyOverflowY = Object(utils_dom["b" /* getStyle */])(document.body, 'overflowY');
  1174. if (popup_scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
  1175. document.body.style.paddingRight = this.computedBodyPaddingRight + popup_scrollBarWidth + 'px';
  1176. }
  1177. Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
  1178. }
  1179. }
  1180. if (getComputedStyle(dom).position === 'static') {
  1181. dom.style.position = 'absolute';
  1182. }
  1183. dom.style.zIndex = popup_manager.nextZIndex();
  1184. this.opened = true;
  1185. this.onOpen && this.onOpen();
  1186. this.doAfterOpen();
  1187. },
  1188. doAfterOpen() {
  1189. this._opening = false;
  1190. },
  1191. close() {
  1192. if (this.willClose && !this.willClose()) return;
  1193. if (this._openTimer !== null) {
  1194. clearTimeout(this._openTimer);
  1195. this._openTimer = null;
  1196. }
  1197. clearTimeout(this._closeTimer);
  1198. const closeDelay = Number(this.closeDelay);
  1199. if (closeDelay > 0) {
  1200. this._closeTimer = setTimeout(() => {
  1201. this._closeTimer = null;
  1202. this.doClose();
  1203. }, closeDelay);
  1204. } else {
  1205. this.doClose();
  1206. }
  1207. },
  1208. doClose() {
  1209. this._closing = true;
  1210. this.onClose && this.onClose();
  1211. if (this.lockScroll) {
  1212. setTimeout(this.restoreBodyStyle, 200);
  1213. }
  1214. this.opened = false;
  1215. this.doAfterClose();
  1216. },
  1217. doAfterClose() {
  1218. popup_manager.closeModal(this._popupId);
  1219. this._closing = false;
  1220. },
  1221. restoreBodyStyle() {
  1222. if (this.modal && this.withoutHiddenClass) {
  1223. document.body.style.paddingRight = this.bodyPaddingRight;
  1224. Object(utils_dom["g" /* removeClass */])(document.body, 'el-popup-parent--hidden');
  1225. }
  1226. this.withoutHiddenClass = true;
  1227. }
  1228. }
  1229. });
  1230. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js
  1231. const Mode = {
  1232. CONTAIN: {
  1233. name: 'contain',
  1234. icon: 'el-icon-full-screen'
  1235. },
  1236. ORIGINAL: {
  1237. name: 'original',
  1238. icon: 'el-icon-c-scale-to-original'
  1239. }
  1240. };
  1241. const mousewheelEventName = Object(util["a" /* isFirefox */])() ? 'DOMMouseScroll' : 'mousewheel';
  1242. /* harmony default export */ var image_viewervue_type_script_lang_js = ({
  1243. name: 'elImageViewer',
  1244. props: {
  1245. urlList: {
  1246. type: Array,
  1247. default: () => []
  1248. },
  1249. zIndex: {
  1250. type: Number,
  1251. default: 2000
  1252. },
  1253. onSwitch: {
  1254. type: Function,
  1255. default: () => {}
  1256. },
  1257. onClose: {
  1258. type: Function,
  1259. default: () => {}
  1260. },
  1261. initialIndex: {
  1262. type: Number,
  1263. default: 0
  1264. },
  1265. appendToBody: {
  1266. type: Boolean,
  1267. default: true
  1268. },
  1269. maskClosable: {
  1270. type: Boolean,
  1271. default: true
  1272. }
  1273. },
  1274. data() {
  1275. return {
  1276. index: this.initialIndex,
  1277. isShow: false,
  1278. infinite: true,
  1279. loading: false,
  1280. mode: Mode.CONTAIN,
  1281. transform: {
  1282. scale: 1,
  1283. deg: 0,
  1284. offsetX: 0,
  1285. offsetY: 0,
  1286. enableTransition: false
  1287. }
  1288. };
  1289. },
  1290. computed: {
  1291. isSingle() {
  1292. return this.urlList.length <= 1;
  1293. },
  1294. isFirst() {
  1295. return this.index === 0;
  1296. },
  1297. isLast() {
  1298. return this.index === this.urlList.length - 1;
  1299. },
  1300. currentImg() {
  1301. return this.urlList[this.index];
  1302. },
  1303. imgStyle() {
  1304. const {
  1305. scale,
  1306. deg,
  1307. offsetX,
  1308. offsetY,
  1309. enableTransition
  1310. } = this.transform;
  1311. const style = {
  1312. transform: `scale(${scale}) rotate(${deg}deg)`,
  1313. transition: enableTransition ? 'transform .3s' : '',
  1314. 'margin-left': `${offsetX}px`,
  1315. 'margin-top': `${offsetY}px`
  1316. };
  1317. if (this.mode === Mode.CONTAIN) {
  1318. style.maxWidth = style.maxHeight = '100%';
  1319. }
  1320. return style;
  1321. },
  1322. viewerZIndex() {
  1323. const nextZIndex = popup_manager.nextZIndex();
  1324. return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
  1325. }
  1326. },
  1327. watch: {
  1328. index: {
  1329. handler: function (val) {
  1330. this.reset();
  1331. this.onSwitch(val);
  1332. }
  1333. },
  1334. currentImg(val) {
  1335. this.$nextTick(_ => {
  1336. const $img = this.$refs.img[0];
  1337. if (!$img.complete) {
  1338. this.loading = true;
  1339. }
  1340. });
  1341. }
  1342. },
  1343. methods: {
  1344. hide() {
  1345. this.deviceSupportUninstall();
  1346. this.onClose();
  1347. },
  1348. deviceSupportInstall() {
  1349. this._keyDownHandler = e => {
  1350. e.stopPropagation();
  1351. const keyCode = e.keyCode;
  1352. switch (keyCode) {
  1353. // ESC
  1354. case 27:
  1355. this.hide();
  1356. break;
  1357. // SPACE
  1358. case 32:
  1359. this.toggleMode();
  1360. break;
  1361. // LEFT_ARROW
  1362. case 37:
  1363. this.prev();
  1364. break;
  1365. // UP_ARROW
  1366. case 38:
  1367. this.handleActions('zoomIn');
  1368. break;
  1369. // RIGHT_ARROW
  1370. case 39:
  1371. this.next();
  1372. break;
  1373. // DOWN_ARROW
  1374. case 40:
  1375. this.handleActions('zoomOut');
  1376. break;
  1377. }
  1378. };
  1379. this._mouseWheelHandler = Object(util["d" /* rafThrottle */])(e => {
  1380. const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
  1381. if (delta > 0) {
  1382. this.handleActions('zoomIn', {
  1383. zoomRate: 0.015,
  1384. enableTransition: false
  1385. });
  1386. } else {
  1387. this.handleActions('zoomOut', {
  1388. zoomRate: 0.015,
  1389. enableTransition: false
  1390. });
  1391. }
  1392. });
  1393. Object(utils_dom["e" /* on */])(document, 'keydown', this._keyDownHandler);
  1394. Object(utils_dom["e" /* on */])(document, mousewheelEventName, this._mouseWheelHandler);
  1395. },
  1396. deviceSupportUninstall() {
  1397. Object(utils_dom["d" /* off */])(document, 'keydown', this._keyDownHandler);
  1398. Object(utils_dom["d" /* off */])(document, mousewheelEventName, this._mouseWheelHandler);
  1399. this._keyDownHandler = null;
  1400. this._mouseWheelHandler = null;
  1401. },
  1402. handleImgLoad(e) {
  1403. this.loading = false;
  1404. },
  1405. handleImgError(e) {
  1406. this.loading = false;
  1407. e.target.alt = '加载失败';
  1408. },
  1409. handleMouseDown(e) {
  1410. if (this.loading || e.button !== 0) return;
  1411. const {
  1412. offsetX,
  1413. offsetY
  1414. } = this.transform;
  1415. const startX = e.pageX;
  1416. const startY = e.pageY;
  1417. this._dragHandler = Object(util["d" /* rafThrottle */])(ev => {
  1418. this.transform.offsetX = offsetX + ev.pageX - startX;
  1419. this.transform.offsetY = offsetY + ev.pageY - startY;
  1420. });
  1421. Object(utils_dom["e" /* on */])(document, 'mousemove', this._dragHandler);
  1422. Object(utils_dom["e" /* on */])(document, 'mouseup', ev => {
  1423. Object(utils_dom["d" /* off */])(document, 'mousemove', this._dragHandler);
  1424. });
  1425. e.preventDefault();
  1426. },
  1427. handleMaskClick() {
  1428. if (this.maskClosable) {
  1429. this.hide();
  1430. }
  1431. },
  1432. reset() {
  1433. this.transform = {
  1434. scale: 1,
  1435. deg: 0,
  1436. offsetX: 0,
  1437. offsetY: 0,
  1438. enableTransition: false
  1439. };
  1440. },
  1441. toggleMode() {
  1442. if (this.loading) return;
  1443. const modeNames = Object.keys(Mode);
  1444. const modeValues = Object.values(Mode);
  1445. const index = modeValues.indexOf(this.mode);
  1446. const nextIndex = (index + 1) % modeNames.length;
  1447. this.mode = Mode[modeNames[nextIndex]];
  1448. this.reset();
  1449. },
  1450. prev() {
  1451. if (this.isFirst && !this.infinite) return;
  1452. const len = this.urlList.length;
  1453. this.index = (this.index - 1 + len) % len;
  1454. },
  1455. next() {
  1456. if (this.isLast && !this.infinite) return;
  1457. const len = this.urlList.length;
  1458. this.index = (this.index + 1) % len;
  1459. },
  1460. handleActions(action, options = {}) {
  1461. if (this.loading) return;
  1462. const {
  1463. zoomRate,
  1464. rotateDeg,
  1465. enableTransition
  1466. } = {
  1467. zoomRate: 0.2,
  1468. rotateDeg: 90,
  1469. enableTransition: true,
  1470. ...options
  1471. };
  1472. const {
  1473. transform
  1474. } = this;
  1475. switch (action) {
  1476. case 'zoomOut':
  1477. if (transform.scale > 0.2) {
  1478. transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
  1479. }
  1480. break;
  1481. case 'zoomIn':
  1482. transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
  1483. break;
  1484. case 'clocelise':
  1485. transform.deg += rotateDeg;
  1486. break;
  1487. case 'anticlocelise':
  1488. transform.deg -= rotateDeg;
  1489. break;
  1490. }
  1491. transform.enableTransition = enableTransition;
  1492. }
  1493. },
  1494. mounted() {
  1495. this.deviceSupportInstall();
  1496. if (this.appendToBody) {
  1497. document.body.appendChild(this.$el);
  1498. }
  1499. // add tabindex then wrapper can be focusable via Javascript
  1500. // focus wrapper so arrow key can't cause inner scroll behavior underneath
  1501. this.$refs['el-image-viewer__wrapper'].focus();
  1502. },
  1503. destroyed() {
  1504. // if appendToBody is true, remove DOM node after destroy
  1505. if (this.appendToBody && this.$el && this.$el.parentNode) {
  1506. this.$el.parentNode.removeChild(this.$el);
  1507. }
  1508. }
  1509. });
  1510. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js
  1511. /* harmony default export */ var src_image_viewervue_type_script_lang_js = (image_viewervue_type_script_lang_js);
  1512. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1513. var componentNormalizer = __webpack_require__(2);
  1514. // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue
  1515. /* normalize component */
  1516. var component = Object(componentNormalizer["a" /* default */])(
  1517. src_image_viewervue_type_script_lang_js,
  1518. render,
  1519. staticRenderFns,
  1520. false,
  1521. null,
  1522. null,
  1523. "17d24eb5"
  1524. )
  1525. /* harmony default export */ var image_viewer = __webpack_exports__["a"] = (component.exports);
  1526. /***/ }),
  1527. /***/ 162:
  1528. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1529. "use strict";
  1530. __webpack_require__.r(__webpack_exports__);
  1531. // Any plugins you want to use has to be imported
  1532. // Detail plugins list see https://www.tinymce.com/docs/plugins/
  1533. // Custom builds see https://www.tinymce.com/download/custom-builds/
  1534. const plugins = ['advlist autolink autosave code colorpicker colorpicker contextmenu directionality fullscreen hr insertdatetime link lists nonbreaking noneditable paste preview print save spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount'];
  1535. //anchor codesample emoticons pagebreak searchreplace image imagetools media
  1536. /* harmony default export */ __webpack_exports__["default"] = (plugins);
  1537. /***/ }),
  1538. /***/ 163:
  1539. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1540. "use strict";
  1541. __webpack_require__.r(__webpack_exports__);
  1542. // Here is a list of the toolbar
  1543. // Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
  1544. const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen'];
  1545. /* harmony default export */ __webpack_exports__["default"] = (toolbar);
  1546. /***/ }),
  1547. /***/ 164:
  1548. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1549. "use strict";
  1550. __webpack_require__.r(__webpack_exports__);
  1551. let callbacks = [];
  1552. function loadedTinymce() {
  1553. // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2144
  1554. // check is successfully downloaded script
  1555. return window.tinymce;
  1556. }
  1557. const dynamicLoadScript = (src, callback) => {
  1558. const existingScript = document.getElementById(src);
  1559. const cb = callback || function () {};
  1560. if (!existingScript) {
  1561. const script = document.createElement('script');
  1562. script.src = src; // src url for the third-party library being loaded.
  1563. script.id = src;
  1564. document.body.appendChild(script);
  1565. callbacks.push(cb);
  1566. const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd;
  1567. onEnd(script);
  1568. }
  1569. if (existingScript && cb) {
  1570. if (loadedTinymce()) {
  1571. cb(null, existingScript);
  1572. } else {
  1573. callbacks.push(cb);
  1574. }
  1575. }
  1576. function stdOnEnd(script) {
  1577. script.onload = function () {
  1578. // this.onload = null here is necessary
  1579. // because even IE9 works not like others
  1580. this.onerror = this.onload = null;
  1581. for (const cb of callbacks) {
  1582. cb(null, script);
  1583. }
  1584. callbacks = null;
  1585. };
  1586. script.onerror = function () {
  1587. this.onerror = this.onload = null;
  1588. cb(new Error('Failed to load ' + src), script);
  1589. };
  1590. }
  1591. function ieOnEnd(script) {
  1592. script.onreadystatechange = function () {
  1593. if (this.readyState !== 'complete' && this.readyState !== 'loaded') return;
  1594. this.onreadystatechange = null;
  1595. for (const cb of callbacks) {
  1596. cb(null, script); // there is no way to catch loading errors in IE8
  1597. }
  1598. callbacks = null;
  1599. };
  1600. }
  1601. };
  1602. /* harmony default export */ __webpack_exports__["default"] = (dynamicLoadScript);
  1603. /***/ }),
  1604. /***/ 172:
  1605. /***/ (function(module, exports) {
  1606. // Exports
  1607. module.exports = {
  1608. };
  1609. /***/ }),
  1610. /***/ 173:
  1611. /***/ (function(module, exports) {
  1612. // Exports
  1613. module.exports = {
  1614. };
  1615. /***/ }),
  1616. /***/ 174:
  1617. /***/ (function(module, exports) {
  1618. // Exports
  1619. module.exports = {
  1620. };
  1621. /***/ }),
  1622. /***/ 175:
  1623. /***/ (function(module, exports) {
  1624. // Exports
  1625. module.exports = {
  1626. };
  1627. /***/ }),
  1628. /***/ 176:
  1629. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1630. "use strict";
  1631. __webpack_require__.r(__webpack_exports__);
  1632. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a9d38a5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(155);
  1633. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a9d38a5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a9d38a5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1634. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a9d38a5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_a9d38a5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1635. /***/ }),
  1636. /***/ 177:
  1637. /***/ (function(module, exports) {
  1638. // Exports
  1639. module.exports = {
  1640. };
  1641. /***/ }),
  1642. /***/ 185:
  1643. /***/ (function(module, exports) {
  1644. // Exports
  1645. module.exports = {
  1646. };
  1647. /***/ }),
  1648. /***/ 186:
  1649. /***/ (function(module, exports) {
  1650. // Exports
  1651. module.exports = {
  1652. };
  1653. /***/ }),
  1654. /***/ 187:
  1655. /***/ (function(module, exports) {
  1656. // Exports
  1657. module.exports = {
  1658. };
  1659. /***/ }),
  1660. /***/ 189:
  1661. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1662. "use strict";
  1663. // ESM COMPAT FLAG
  1664. __webpack_require__.r(__webpack_exports__);
  1665. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
  1666. var render = function render() {
  1667. var _vm = this,
  1668. _c = _vm._self._c;
  1669. return _c('div', {
  1670. staticClass: "tabs",
  1671. style: {
  1672. marginTop: _vm.marginTop + 'px',
  1673. marginBottom: _vm.marginBottom + 'px',
  1674. fontSize: _vm.fontSize + 'px'
  1675. }
  1676. }, [_vm._ssrNode(Array.isArray(_vm.tabList) ? "<ul" + _vm._ssrClass(null, _vm.borderType) + " data-v-8a32da06>" + _vm._ssrList(_vm.tabList, function (item, i) {
  1677. return !item.hasOwnProperty('isShow') || item.isShow ? "<li" + _vm._ssrClass(null, {
  1678. active: i === _vm.currTab
  1679. }) + _vm._ssrStyle(null, {
  1680. minWidth: _vm.liWidth + 'px',
  1681. height: _vm.liHeight + 'px',
  1682. lineHeight: _vm.liHeight + 'px',
  1683. marginRight: _vm.marginRight + 'px'
  1684. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item.name)) + "</div></li>" : "<!---->";
  1685. }) + _vm._ssrList(_vm.comRemaining, function (item) {
  1686. return "<li class=\"unclickable\"" + _vm._ssrStyle(null, {
  1687. minWidth: _vm.liWidth + 'px',
  1688. lineHeight: _vm.liHeight + 'px',
  1689. marginRight: _vm.marginRight + 'px'
  1690. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(item)) + "</div></li>";
  1691. }) + "</ul>" : "<ul data-v-8a32da06>" + _vm._ssrList(Object.keys(_vm.tabList), function (val, i) {
  1692. return "<li" + _vm._ssrClass(null, {
  1693. active: i === _vm.currTab
  1694. }) + _vm._ssrStyle(null, {
  1695. minWidth: _vm.liWidth + 'px',
  1696. marginRight: _vm.marginRight + 'px'
  1697. }, null) + " data-v-8a32da06><div data-v-8a32da06>" + _vm._ssrEscape(_vm._s(val)) + "</div></li>";
  1698. }) + "</ul>")]);
  1699. };
  1700. var staticRenderFns = [];
  1701. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=template&id=8a32da06&scoped=true
  1702. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/TabNav.vue?vue&type=script&lang=js
  1703. /* harmony default export */ var TabNavvue_type_script_lang_js = ({
  1704. props: {
  1705. // color: {
  1706. // type: String,
  1707. // },
  1708. borderType: {
  1709. type: String,
  1710. default: 'noBorder'
  1711. },
  1712. fontSize: {
  1713. type: Number,
  1714. default: 14
  1715. },
  1716. marginTop: {
  1717. type: Number,
  1718. default: 0
  1719. },
  1720. marginBottom: {
  1721. type: Number,
  1722. default: 10
  1723. },
  1724. liWidth: {
  1725. type: Number,
  1726. default: 0
  1727. },
  1728. liHeight: {
  1729. type: Number,
  1730. default: 28
  1731. },
  1732. marginRight: {
  1733. type: Number,
  1734. default: 0
  1735. },
  1736. currTab: {
  1737. type: [Number, String],
  1738. default: 0
  1739. },
  1740. tabList: {
  1741. type: [Array, Object],
  1742. default: () => {
  1743. return [];
  1744. }
  1745. },
  1746. allPrintTab: {
  1747. type: [Array, Object],
  1748. default: () => {
  1749. return [];
  1750. }
  1751. }
  1752. },
  1753. data() {
  1754. return {
  1755. textColor: 'red'
  1756. };
  1757. },
  1758. computed: {
  1759. comRemaining() {
  1760. const mapTabList = this.tabList.map(i => i.name);
  1761. return this.allPrintTab.filter(element => !mapTabList.includes(element));
  1762. }
  1763. },
  1764. methods: {
  1765. selTab(i) {
  1766. this.$emit('update:currTab', i);
  1767. this.$emit('handle');
  1768. }
  1769. }
  1770. });
  1771. // CONCATENATED MODULE: ./components/TabNav.vue?vue&type=script&lang=js
  1772. /* harmony default export */ var components_TabNavvue_type_script_lang_js = (TabNavvue_type_script_lang_js);
  1773. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  1774. var componentNormalizer = __webpack_require__(2);
  1775. // CONCATENATED MODULE: ./components/TabNav.vue
  1776. function injectStyles (context) {
  1777. var style0 = __webpack_require__(196)
  1778. if (style0.__inject__) style0.__inject__(context)
  1779. }
  1780. /* normalize component */
  1781. var component = Object(componentNormalizer["a" /* default */])(
  1782. components_TabNavvue_type_script_lang_js,
  1783. render,
  1784. staticRenderFns,
  1785. false,
  1786. injectStyles,
  1787. "8a32da06",
  1788. "1ce05afc"
  1789. )
  1790. /* harmony default export */ var TabNav = __webpack_exports__["default"] = (component.exports);
  1791. /***/ }),
  1792. /***/ 193:
  1793. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1794. "use strict";
  1795. __webpack_require__.r(__webpack_exports__);
  1796. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
  1797. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1798. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewPriceTable_vue_vue_type_style_index_0_id_8da20436_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1799. /***/ }),
  1800. /***/ 194:
  1801. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1802. "use strict";
  1803. __webpack_require__.r(__webpack_exports__);
  1804. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
  1805. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1806. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TotalTable_vue_vue_type_style_index_0_id_8afd0988_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1807. /***/ }),
  1808. /***/ 195:
  1809. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1810. "use strict";
  1811. __webpack_require__.r(__webpack_exports__);
  1812. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(174);
  1813. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1814. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_UnitTable_vue_vue_type_style_index_0_id_931e8840_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1815. /***/ }),
  1816. /***/ 196:
  1817. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1818. "use strict";
  1819. __webpack_require__.r(__webpack_exports__);
  1820. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(175);
  1821. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1822. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TabNav_vue_vue_type_style_index_0_id_8a32da06_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1823. /***/ }),
  1824. /***/ 197:
  1825. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1826. "use strict";
  1827. __webpack_require__.r(__webpack_exports__);
  1828. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormDialog_vue_vue_type_style_index_0_id_2aff96f1_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
  1829. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormDialog_vue_vue_type_style_index_0_id_2aff96f1_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormDialog_vue_vue_type_style_index_0_id_2aff96f1_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  1830. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormDialog_vue_vue_type_style_index_0_id_2aff96f1_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FormDialog_vue_vue_type_style_index_0_id_2aff96f1_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  1831. /***/ }),
  1832. /***/ 202:
  1833. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1834. "use strict";
  1835. // ESM COMPAT FLAG
  1836. __webpack_require__.r(__webpack_exports__);
  1837. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
  1838. var render = function render() {
  1839. var _vm = this,
  1840. _c = _vm._self._c;
  1841. return _c('div', {
  1842. staticClass: "wrap",
  1843. style: {
  1844. marginBottom: _vm.marginBottom + 'px'
  1845. }
  1846. }, [_vm._ssrNode((_vm.tableType != 'Addon' ? "<p class=\"tb-title\" data-v-8da20436>" + _vm._s(_vm.comTitle) + "</p>" : "<!---->") + " "), _vm._ssrNode("<div" + _vm._ssrClass(null, _vm.getTableContainerClass) + " data-v-8da20436>", "</div>", [_c('el-table', {
  1847. ref: "elTable",
  1848. staticStyle: {
  1849. "width": "100%"
  1850. },
  1851. attrs: {
  1852. "show-header": _vm.tableType != 'Addon',
  1853. "data": _vm.comTableData,
  1854. "header-cell-style": {
  1855. backgroundColor: '#fff',
  1856. fontWeight: 'normal',
  1857. fontSize: '14px',
  1858. fontFamily: 'Proxima Nova',
  1859. color: '#000',
  1860. '--comDisplayCss': _vm.comDisplayCss
  1861. },
  1862. "row-key": "id",
  1863. "span-method": _vm.arraySpanMethod,
  1864. "row-class-name": _vm.tableRowClassName
  1865. },
  1866. on: {
  1867. "selection-change": _vm.handleSelectionChange,
  1868. "select": _vm.dialogCheck
  1869. }
  1870. }, [_vm.tableType != 'Comparison' ? _c('el-table-column', {
  1871. attrs: {
  1872. "type": "selection",
  1873. "width": "50",
  1874. "align": "center",
  1875. "reserve-selection": true,
  1876. "selectable": _vm.handleSelectable
  1877. }
  1878. }) : _vm._e(), _vm._v(" "), _vm._l(_vm.tableColumns, function (item) {
  1879. return [item.type ? _c('el-table-column', {
  1880. key: item.prop,
  1881. attrs: {
  1882. "align": item.align ? item.align : 'left',
  1883. "prop": item.prop,
  1884. "label": item.label,
  1885. "formatter": item.formatter,
  1886. "width": item.width,
  1887. "sortable": item.sortable
  1888. },
  1889. scopedSlots: _vm._u([{
  1890. key: "default",
  1891. fn: function ({
  1892. row
  1893. }) {
  1894. return [item.type == 'radioInput' ? [_c('div', {
  1895. staticClass: "flex between"
  1896. }, [_c('span', [_vm._v(_vm._s(row.decName))]), _vm._v(" "), _c('el-input', {
  1897. staticClass: "edit-input",
  1898. attrs: {
  1899. "min": "0",
  1900. "max": row.max_num,
  1901. "type": "number",
  1902. "size": "small"
  1903. },
  1904. on: {
  1905. "input": function ($event) {
  1906. return _vm.getNumber($event, row, row.max_num);
  1907. }
  1908. },
  1909. model: {
  1910. value: row.num,
  1911. callback: function ($$v) {
  1912. _vm.$set(row, "num", $$v);
  1913. },
  1914. expression: "row.num"
  1915. }
  1916. })], 1)] : _c('div', [row.filter_boolean ? [_c('div', {
  1917. staticClass: "triangle"
  1918. }), _vm._v(" "), _c('div', {
  1919. staticClass: "text"
  1920. }, [_vm._v("Eco")])] : _vm._e(), _vm._v("\n " + _vm._s(row[item.prop]) + "\n "), _vm.tableType == 'Undecorated' ? _c('el-popover', {
  1921. attrs: {
  1922. "placement": "top-start",
  1923. "trigger": "hover"
  1924. }
  1925. }, [_c('i', {
  1926. staticClass: "el-icon-warning",
  1927. attrs: {
  1928. "slot": "reference"
  1929. },
  1930. slot: "reference"
  1931. }), _vm._v(" "), _c('p', {
  1932. staticClass: "popover-text"
  1933. }, [_vm._v(_vm._s(_vm.comTitle))])]) : _vm._e()], 2)];
  1934. }
  1935. }], null, true)
  1936. }) : _vm._e(), _vm._v(" "), !item.type ? _c('el-table-column', {
  1937. key: item.prop,
  1938. attrs: {
  1939. "align": item.align ? item.align : 'center',
  1940. "prop": item.prop,
  1941. "label": item.label,
  1942. "formatter": item.formatter,
  1943. "sortable": item.sortable,
  1944. "show-overflow-tooltip": "",
  1945. "width": (798 - _vm.tableColumns[0].width - _vm.tableColumns[0].extraWidth) / (_vm.tableColumns.length - 1)
  1946. },
  1947. scopedSlots: _vm._u([{
  1948. key: "default",
  1949. fn: function ({
  1950. row,
  1951. $index
  1952. }) {
  1953. return [item.prop === 'website_setup' ? _c('div', [$index === 0 && _vm.tableType == 'Decoration' ? _c('div', [row['supplier_setup_id'] < 5 || row['supplier_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['supplier_setup'] ? parseFloat(row['supplier_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['supplier_setup_id'])))])]) : _c('div', [row['website_setup_id'] < 5 || row['website_setup_id'] == 7 ? _c('span', [_vm._v("£ " + _vm._s(row['website_setup'] ? parseFloat(row['website_setup']).toFixed(2) : "0.00"))]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.$_setupPriceFilter(row['website_setup_id'])))])])]) : _vm.judgeProp(row, item.prop, $index) == '111' || _vm.judgeProp(row, item.prop, $index) == '111.00' ? _c('div', [_vm._v("\n -\n ")]) : _vm.judgeProp(row, item.prop, $index) == '999' || _vm.judgeProp(row, item.prop, $index) === '999.00' ? _c('div', [_vm._v("\n POA\n ")]) : _vm.judgeProp(row, item.prop, $index) === '' ? _c('div', [_vm._v("0")]) : _c('div', [_vm.isNumber(_vm.judgeProp(row, item.prop, $index)) && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.judgeProp(row, item.prop, $index)))])])];
  1954. }
  1955. }], null, true)
  1956. }) : _vm._e()];
  1957. })], 2)], 1)], 2);
  1958. };
  1959. var staticRenderFns = [];
  1960. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=template&id=8da20436&scoped=true
  1961. // EXTERNAL MODULE: external "number-precision"
  1962. var external_number_precision_ = __webpack_require__(122);
  1963. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/NewPriceTable.vue?vue&type=script&lang=js
  1964. /* harmony default export */ var NewPriceTablevue_type_script_lang_js = ({
  1965. filters: {
  1966. // Decoration Table:打印价格+附加价格
  1967. multiplyPrice(a1, row, prop) {
  1968. const rep = /^[0-9]+.?[0-9]*$/;
  1969. if (!rep.test(a1)) {
  1970. return a1;
  1971. } else {
  1972. return Object(external_number_precision_["times"])(a1, row.num);
  1973. }
  1974. },
  1975. // Undecorated Table:基础价格+Decoration所选价格(包含附加价格)
  1976. plusPrice(a1, a2) {
  1977. return a2 ? Object(external_number_precision_["plus"])(a1, a2) : a1;
  1978. },
  1979. // Decoration Table:计算差价
  1980. differencePrice(a1, row, prop, selectRow) {
  1981. const rep = /^[0-9]+.?[0-9]*$/;
  1982. if (rep.test(a1)) {
  1983. const temp = prop.split('_');
  1984. const supplier = +row[`supplier_${temp[1]}`];
  1985. const suppliers = Object(external_number_precision_["times"])(row.num - 1, supplier);
  1986. const noIncludePrice = Object(external_number_precision_["plus"])(a1, suppliers);
  1987. const selSupplier = +selectRow[`supplier_${temp[1]}`];
  1988. const selSuppliers = Object(external_number_precision_["times"])(selectRow.num - 1, selSupplier);
  1989. const isIncludePrice = Object(external_number_precision_["plus"])(+selectRow[prop], selSuppliers);
  1990. return noIncludePrice > isIncludePrice ? `+${Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice)}` : Object(external_number_precision_["minus"])(noIncludePrice, isIncludePrice);
  1991. } else {
  1992. return a1;
  1993. }
  1994. }
  1995. },
  1996. props: {
  1997. hasDecAdd: {
  1998. type: Number,
  1999. default: 0
  2000. },
  2001. tableData: {
  2002. type: Array,
  2003. default: () => {
  2004. return [];
  2005. }
  2006. },
  2007. tableColumns: {
  2008. type: Array,
  2009. default: () => {
  2010. return [];
  2011. }
  2012. },
  2013. operateWith: {
  2014. type: String,
  2015. default: '100%'
  2016. },
  2017. isCheckBox: {
  2018. type: Boolean,
  2019. default: false
  2020. },
  2021. tableType: {
  2022. type: String,
  2023. default: 'Undecorated'
  2024. },
  2025. decorationObj: {
  2026. type: Object,
  2027. default: () => {
  2028. return {};
  2029. }
  2030. },
  2031. selectId: {
  2032. type: Number,
  2033. default: null
  2034. },
  2035. selectRow: {
  2036. type: Object,
  2037. default: () => {
  2038. return {};
  2039. }
  2040. },
  2041. multipleSelection: {
  2042. type: Array,
  2043. default: () => {
  2044. return [];
  2045. }
  2046. },
  2047. selectDecoration: {
  2048. type: Object,
  2049. default: () => {
  2050. return {};
  2051. }
  2052. },
  2053. curPrint: {
  2054. type: String,
  2055. default: ''
  2056. },
  2057. curModel: {
  2058. type: String,
  2059. default: ''
  2060. },
  2061. marginBottom: {
  2062. type: Number,
  2063. default: 20
  2064. },
  2065. decorationMultiple: {
  2066. type: Number,
  2067. default: 1
  2068. },
  2069. headerShow: {
  2070. type: Boolean,
  2071. default: true
  2072. }
  2073. },
  2074. data() {
  2075. return {
  2076. setupConfigList: [{
  2077. id: 1,
  2078. name: '/col'
  2079. }, {
  2080. id: 2,
  2081. name: '/desgin'
  2082. }, {
  2083. id: 3,
  2084. name: '/pos'
  2085. }, {
  2086. id: 4,
  2087. name: '/pos desgin'
  2088. }, {
  2089. id: 5,
  2090. name: 'POA'
  2091. }, {
  2092. id: 6,
  2093. name: 'Waived'
  2094. }],
  2095. setupTitleList: ['1st', '2nd', '3rd']
  2096. };
  2097. },
  2098. computed: {
  2099. getTableContainerClass() {
  2100. // 根据tableType的值返回不同的class
  2101. return {
  2102. 'table-container': true,
  2103. 'border-Decoration': this.tableType === 'Decoration' && this.hasDecAdd
  2104. };
  2105. },
  2106. comTitle() {
  2107. if (this.tableType === 'Undecorated') {
  2108. return `Includes ${this.curModel}`;
  2109. } else if (this.tableType === 'Decoration') {
  2110. return `Add-Ons`;
  2111. } else {
  2112. return this.curPrint;
  2113. }
  2114. },
  2115. comDisplayCss() {
  2116. return this.tableType === 'Comparison' ? '1px solid #efefef' : 'none';
  2117. },
  2118. comMultipleSelID() {
  2119. return this.multipleSelection.map(i => i.id);
  2120. },
  2121. comTableData() {
  2122. if (this.tableType === 'Decoration') {
  2123. return this.tableData;
  2124. } else {
  2125. return this.tableData;
  2126. }
  2127. }
  2128. },
  2129. mounted() {
  2130. // 初始勾上默认选择打印项
  2131. if (JSON.stringify(this.selectRow) !== '{}') {
  2132. this.$refs.elTable.toggleRowSelection(this.selectRow);
  2133. }
  2134. },
  2135. methods: {
  2136. judgeProp(row, prop, $index) {
  2137. if ($index === 0 && this.tableType === 'Decoration') {
  2138. const temp = prop.split('_');
  2139. return row[`supplier_${temp[1]}`];
  2140. } else {
  2141. return row[prop];
  2142. }
  2143. },
  2144. $_setupPriceFilter(setupPriceID) {
  2145. const result = this.setupConfigList.filter(item => item.id === setupPriceID);
  2146. return result.length > 0 ? result[0].name : '';
  2147. },
  2148. isNumber(val) {
  2149. const rep = /^[0-9]+.?[0-9]*$/;
  2150. return rep.test(val);
  2151. },
  2152. /* 暂不实现此功能
  2153. //点击table栏时选中按钮
  2154. handleCurrentChange(currentRow, oldCurrentRow) {
  2155. this.$refs.elTable.clearSelection()
  2156. this.$emit('update:selectId', currentRow.id)
  2157. this.addCar(currentRow)
  2158. },
  2159. */
  2160. // table全选
  2161. handleSelectionChange(val) {
  2162. this.$emit('update:multipleSelection', val);
  2163. },
  2164. dialogCheck(selection, row) {
  2165. if (this.isCheckBox) return; // 是多选框返回
  2166. this.$refs.elTable.clearSelection();
  2167. // 初始化
  2168. if (selection.length === 0) {
  2169. this.$emit('update:selectId', null);
  2170. this.$emit('update:selectRow', {});
  2171. return;
  2172. }
  2173. if (row) {
  2174. this.$emit('update:selectId', row.id);
  2175. this.$emit('update:selectRow', row);
  2176. this.$refs.elTable.toggleRowSelection(row, true);
  2177. }
  2178. },
  2179. addCar(currentRow) {
  2180. // 加入购物车需要parentId
  2181. const selrow = Object.assign({}, currentRow);
  2182. selrow.parentId = this.decorationObj.parentId;
  2183. this.$emit('update:selectRow', selrow);
  2184. this.$refs.elTable.toggleRowSelection(currentRow);
  2185. },
  2186. getRowKey(row) {
  2187. return row.id;
  2188. },
  2189. arraySpanMethod({
  2190. row,
  2191. column,
  2192. rowIndex,
  2193. columnIndex
  2194. }) {
  2195. // 隐藏'Decoration'选项框
  2196. if (this.tableType === 'Decoration' && columnIndex === 0) {
  2197. return [0, 1];
  2198. }
  2199. if (this.tableType === 'Decoration' && columnIndex === 1) {
  2200. return [1, 2];
  2201. }
  2202. },
  2203. tableRowClassName({
  2204. row
  2205. }) {
  2206. if (this.tableType === 'Decoration') {
  2207. return this.decorationMultiple ? 'borderNone' : 'hiddenRow';
  2208. }
  2209. return 'fontBold';
  2210. },
  2211. handleSelectable(row, index) {
  2212. // website_setup_id 5为POA,不可选
  2213. return row.website_setup_id !== 5;
  2214. },
  2215. getNumber(e, row, max) {
  2216. if (parseInt(e) > max) {
  2217. row.num = max;
  2218. }
  2219. }
  2220. }
  2221. });
  2222. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue?vue&type=script&lang=js
  2223. /* harmony default export */ var table_NewPriceTablevue_type_script_lang_js = (NewPriceTablevue_type_script_lang_js);
  2224. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2225. var componentNormalizer = __webpack_require__(2);
  2226. // CONCATENATED MODULE: ./components/table/NewPriceTable.vue
  2227. function injectStyles (context) {
  2228. var style0 = __webpack_require__(193)
  2229. if (style0.__inject__) style0.__inject__(context)
  2230. }
  2231. /* normalize component */
  2232. var component = Object(componentNormalizer["a" /* default */])(
  2233. table_NewPriceTablevue_type_script_lang_js,
  2234. render,
  2235. staticRenderFns,
  2236. false,
  2237. injectStyles,
  2238. "8da20436",
  2239. "518290f4"
  2240. )
  2241. /* harmony default export */ var NewPriceTable = __webpack_exports__["default"] = (component.exports);
  2242. /***/ }),
  2243. /***/ 203:
  2244. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2245. "use strict";
  2246. // ESM COMPAT FLAG
  2247. __webpack_require__.r(__webpack_exports__);
  2248. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
  2249. var render = function render() {
  2250. var _vm = this,
  2251. _c = _vm._self._c;
  2252. return _c('div', {
  2253. staticClass: "wrap"
  2254. }, [_vm._ssrNode("<p" + _vm._ssrClass("tb-title", {
  2255. 'left': _vm.tableType
  2256. }) + " data-v-8afd0988><span data-v-8afd0988>" + _vm._ssrEscape(_vm._s(_vm.title)) + "</span> " + (_vm.title == 'Sell Price' && _vm.comLocationNum !== 1 ? "<span" + _vm._ssrStyle(null, {
  2257. width: _vm.comWidth + 'px'
  2258. }, null) + " data-v-8afd0988>Total</span>" : "<!---->") + "</p> "), _c('el-table', {
  2259. ref: "elTable",
  2260. attrs: {
  2261. "border": "",
  2262. "data": _vm.tableData,
  2263. "header-cell-style": {
  2264. backgroundColor: '#fff',
  2265. color: '#606266',
  2266. fontWeight: 500,
  2267. fontSize: '16px'
  2268. },
  2269. "stripe": ""
  2270. }
  2271. }, _vm._l(_vm.tableColumns, function (item, index) {
  2272. return _c('el-table-column', {
  2273. key: `${_vm.curOrder}-${item.prop}`,
  2274. attrs: {
  2275. "align": item.align ? item.align : 'center',
  2276. "prop": item.prop,
  2277. "label": item.label,
  2278. "formatter": item.formatter,
  2279. "sortable": item.sortable
  2280. },
  2281. scopedSlots: _vm._u([{
  2282. key: "header",
  2283. fn: function (scope) {
  2284. return [_vm.title == 'Buy Price' && _vm.comLocationNum === 1 ? _c('div', [_c('el-input', {
  2285. directives: [{
  2286. name: "show",
  2287. rawName: "v-show",
  2288. value: !item.isFirstColumn,
  2289. expression: "!item.isFirstColumn"
  2290. }],
  2291. attrs: {
  2292. "size": "small",
  2293. "type": "number",
  2294. "min": _vm.min
  2295. },
  2296. on: {
  2297. "blur": function ($event) {
  2298. return _vm.getNumber($event, index);
  2299. }
  2300. },
  2301. model: {
  2302. value: item.label,
  2303. callback: function ($$v) {
  2304. _vm.$set(item, "label", $$v);
  2305. },
  2306. expression: "item.label"
  2307. }
  2308. }), _vm._v(" "), _c('span', {
  2309. directives: [{
  2310. name: "show",
  2311. rawName: "v-show",
  2312. value: item.isFirstColumn,
  2313. expression: "item.isFirstColumn"
  2314. }]
  2315. }, [_vm._v(_vm._s(item.label))])], 1) : _c('div', [_c('span', [_vm._v(_vm._s(item.label))])])];
  2316. }
  2317. }, {
  2318. key: "default",
  2319. fn: function (scope) {
  2320. return [_vm.tableType && !item.isFirstColumn ? [_c('span', [_vm._v(_vm._s(_vm._f("differencePrice")(scope.row[item.prop], _vm.curDecoration[item.prop], _vm.indexDecoration[item.prop], _vm.poaConfig)))])] : [(typeof scope.row[item.prop] == 'string' && scope.row[item.prop].includes('.') || typeof scope.row[item.prop] == 'number') && !item.isFirstColumn ? _c('span', [_vm._v("£")]) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(scope.row[item.prop] ? scope.row[item.prop] : '0.00'))])]];
  2321. }
  2322. }], null, true)
  2323. });
  2324. }), 1)], 2);
  2325. };
  2326. var staticRenderFns = [];
  2327. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=template&id=8afd0988&scoped=true
  2328. // EXTERNAL MODULE: external "number-precision"
  2329. var external_number_precision_ = __webpack_require__(122);
  2330. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/TotalTable.vue?vue&type=script&lang=js
  2331. /* harmony default export */ var TotalTablevue_type_script_lang_js = ({
  2332. filters: {
  2333. differencePrice(a, curDecoVal, indexDecoVal, poaConfig) {
  2334. const rep = /^[0-9]+(\.[0-9]*)?$/;
  2335. if (!rep.test(a)) {
  2336. return a || 'Waived';
  2337. }
  2338. if (poaConfig.includes(curDecoVal) || poaConfig.includes(indexDecoVal)) {
  2339. if (curDecoVal === '111' || curDecoVal === '111.00' || indexDecoVal === '111' || indexDecoVal === '111.00') {
  2340. return '-';
  2341. } else if (curDecoVal === '999' || curDecoVal === '999.00' || indexDecoVal === '999' || indexDecoVal === '999.00') {
  2342. return 'POA';
  2343. }
  2344. } else if (curDecoVal === indexDecoVal) {
  2345. return 0;
  2346. } else if (+curDecoVal > +indexDecoVal) {
  2347. return `-£ ${Object(external_number_precision_["minus"])(curDecoVal, indexDecoVal)}`;
  2348. } else if (+curDecoVal < +indexDecoVal) {
  2349. return `+£ ${Object(external_number_precision_["minus"])(indexDecoVal, curDecoVal)}`;
  2350. } else {
  2351. return 'Waived';
  2352. }
  2353. }
  2354. },
  2355. props: {
  2356. tableData: {
  2357. type: Array,
  2358. default: () => []
  2359. },
  2360. tableColumns: {
  2361. type: Array,
  2362. default: () => []
  2363. },
  2364. tableType: {
  2365. type: String,
  2366. default: ''
  2367. },
  2368. curDecoration: {
  2369. type: Object,
  2370. default: () => {}
  2371. },
  2372. indexDecoration: {
  2373. type: Object,
  2374. default: () => {}
  2375. },
  2376. comLocationNum: {
  2377. type: Number,
  2378. default: 1
  2379. },
  2380. curOrder: {
  2381. type: String,
  2382. default: ''
  2383. },
  2384. min: {
  2385. type: String,
  2386. default: ''
  2387. },
  2388. title: {
  2389. type: String,
  2390. default: ''
  2391. }
  2392. },
  2393. data() {
  2394. return {
  2395. poaConfig: ['111', '111.00', '999', '999.00']
  2396. };
  2397. },
  2398. methods: {
  2399. getNumber(e, index) {
  2400. if (parseInt(e.target.value) < this.min) {
  2401. this.$emit('send-idx', index);
  2402. }
  2403. }
  2404. },
  2405. computed: {
  2406. comWidth() {
  2407. return 800 / this.tableColumns.length - 1;
  2408. }
  2409. }
  2410. });
  2411. // CONCATENATED MODULE: ./components/table/TotalTable.vue?vue&type=script&lang=js
  2412. /* harmony default export */ var table_TotalTablevue_type_script_lang_js = (TotalTablevue_type_script_lang_js);
  2413. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2414. var componentNormalizer = __webpack_require__(2);
  2415. // CONCATENATED MODULE: ./components/table/TotalTable.vue
  2416. function injectStyles (context) {
  2417. var style0 = __webpack_require__(194)
  2418. if (style0.__inject__) style0.__inject__(context)
  2419. }
  2420. /* normalize component */
  2421. var component = Object(componentNormalizer["a" /* default */])(
  2422. table_TotalTablevue_type_script_lang_js,
  2423. render,
  2424. staticRenderFns,
  2425. false,
  2426. injectStyles,
  2427. "8afd0988",
  2428. "35501f79"
  2429. )
  2430. /* harmony default export */ var TotalTable = __webpack_exports__["default"] = (component.exports);
  2431. /***/ }),
  2432. /***/ 204:
  2433. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2434. "use strict";
  2435. // ESM COMPAT FLAG
  2436. __webpack_require__.r(__webpack_exports__);
  2437. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  2438. var render = function render() {
  2439. var _vm = this,
  2440. _c = _vm._self._c;
  2441. return _c('div', [_vm._ssrNode("<p class=\"tb-title\" data-v-931e8840>Markup %</p> "), _c('el-table', {
  2442. ref: "elTable",
  2443. style: {
  2444. width: _vm.operateWith
  2445. },
  2446. attrs: {
  2447. "border": "",
  2448. "data": _vm.tableData,
  2449. "highlight-current-row": false,
  2450. "header-cell-style": {
  2451. backgroundColor: '#fff',
  2452. color: '#606266',
  2453. fontWeight: 500,
  2454. fontSize: '16px'
  2455. }
  2456. }
  2457. }, [_vm._l(_vm.tableColumns, function (item) {
  2458. return [item.isText ? _c('el-table-column', {
  2459. key: item.prop,
  2460. attrs: {
  2461. "align": "center",
  2462. "prop": item.prop,
  2463. "label": item.label,
  2464. "formatter": item.formatter,
  2465. "width": item.width,
  2466. "sortable": item.sortable
  2467. }
  2468. }) : _vm._e(), _vm._v(" "), !item.isText ? _c('el-table-column', {
  2469. key: item.prop,
  2470. attrs: {
  2471. "prop": item.prop,
  2472. "label": item.label,
  2473. "formatter": item.formatter,
  2474. "width": item.width,
  2475. "align": item.align ? item.align : 'center',
  2476. "sortable": item.sortable
  2477. },
  2478. scopedSlots: _vm._u([{
  2479. key: "default",
  2480. fn: function ({
  2481. row,
  2482. $index
  2483. }) {
  2484. return [_c('el-input', {
  2485. staticClass: "edit-input",
  2486. attrs: {
  2487. "size": "small",
  2488. "type": "number",
  2489. "min": "0"
  2490. },
  2491. on: {
  2492. "input": function ($event) {
  2493. return _vm.saveUnitData(row, $index);
  2494. }
  2495. },
  2496. model: {
  2497. value: row[item.prop],
  2498. callback: function ($$v) {
  2499. _vm.$set(row, item.prop, $$v);
  2500. },
  2501. expression: "row[item.prop]"
  2502. }
  2503. })];
  2504. }
  2505. }], null, true)
  2506. }) : _vm._e()];
  2507. })], 2)], 2);
  2508. };
  2509. var staticRenderFns = [];
  2510. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=template&id=931e8840&scoped=true
  2511. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/UnitTable.vue?vue&type=script&lang=js
  2512. /* harmony default export */ var UnitTablevue_type_script_lang_js = ({
  2513. props: {
  2514. tableData: {
  2515. type: Array,
  2516. default: []
  2517. },
  2518. tableColumns: {
  2519. type: Array,
  2520. default: []
  2521. },
  2522. operateWith: {
  2523. type: String,
  2524. default: "100%"
  2525. },
  2526. selectionShow: {
  2527. type: Boolean,
  2528. default: false
  2529. },
  2530. handleShow: {
  2531. type: Boolean,
  2532. default: false
  2533. }
  2534. },
  2535. methods: {
  2536. saveUnitData(row, idx) {
  2537. this.tableData[idx] = row;
  2538. localStorage.setItem('unit', JSON.stringify(this.tableData));
  2539. }
  2540. }
  2541. });
  2542. // CONCATENATED MODULE: ./components/table/UnitTable.vue?vue&type=script&lang=js
  2543. /* harmony default export */ var table_UnitTablevue_type_script_lang_js = (UnitTablevue_type_script_lang_js);
  2544. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2545. var componentNormalizer = __webpack_require__(2);
  2546. // CONCATENATED MODULE: ./components/table/UnitTable.vue
  2547. function injectStyles (context) {
  2548. var style0 = __webpack_require__(195)
  2549. if (style0.__inject__) style0.__inject__(context)
  2550. }
  2551. /* normalize component */
  2552. var component = Object(componentNormalizer["a" /* default */])(
  2553. table_UnitTablevue_type_script_lang_js,
  2554. render,
  2555. staticRenderFns,
  2556. false,
  2557. injectStyles,
  2558. "931e8840",
  2559. "01507f2a"
  2560. )
  2561. /* harmony default export */ var UnitTable = __webpack_exports__["default"] = (component.exports);
  2562. /***/ }),
  2563. /***/ 205:
  2564. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2565. "use strict";
  2566. // ESM COMPAT FLAG
  2567. __webpack_require__.r(__webpack_exports__);
  2568. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
  2569. var render = function render() {
  2570. var _vm = this,
  2571. _c = _vm._self._c;
  2572. return _c('div', [_vm._ssrNode("<table border=\"1\" bordercolor=\"#000\" style=\"\\n border-collapse: collapse;\\n font-size: 14px;\\n table-layout: fixed;\\n width: 100%;\\n min-width: 800px;\\n \" data-v-13e7bb30>", "</table>", [_vm._ssrNode("<tbody data-v-13e7bb30>", "</tbody>", [_vm._ssrNode(_vm._ssrList(_vm.mailData, function (items, key, i) {
  2573. return "<tr data-v-13e7bb30><td" + _vm._ssrStyle({
  2574. "padding": "18px 0",
  2575. "width": "40%",
  2576. "text-align": "center",
  2577. "color": "#000"
  2578. }, (i == 1 || i == 10) && _vm.objStyle, null) + " data-v-13e7bb30>" + _vm._ssrEscape("\n " + _vm._s(key) + "\n ") + "</td> <td style=\"padding: 18px 10px\" data-v-13e7bb30>" + (typeof items == 'string' ? "<div data-v-13e7bb30>" + (items.indexOf('@') != -1 || items.indexOf('http') != -1 ? "<a" + _vm._ssrAttr("href", items) + " style=\"color: #6495ed; text-decoration: none\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span></a>" : "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(items)) + "</span>") + "</div>" : _vm.$utils.checkType(items) == 'Object' ? "<div style=\"\\n width: 100%;\\n display: flex;\\n justify-content: space-between;\\n \" data-v-13e7bb30>" + _vm._ssrList(items, function (item, i) {
  2579. return "<div style=\"text-align: left; width: 100%\" data-v-13e7bb30>" + (key == 'QTY' ? "<span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span>" : "<span data-v-13e7bb30>" + _vm._ssrEscape("$" + _vm._s(item)) + "</span>") + "</div>";
  2580. }) + "</div>" : _vm._ssrList(items, function (item, i) {
  2581. return "<div style=\"line-height: 20px\" data-v-13e7bb30><span data-v-13e7bb30>" + _vm._ssrEscape(_vm._s(item)) + "</span></div>";
  2582. })) + "</td></tr>";
  2583. }) + " "), _vm._ssrNode("<tr data-v-13e7bb30>", "</tr>", [_vm._ssrNode("<td colspan=\"2\" style=\"padding: 20px\" data-v-13e7bb30>", "</td>", [_vm._t("default")], 2)])], 2)])]);
  2584. };
  2585. var staticRenderFns = [];
  2586. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=template&id=13e7bb30&scoped=true
  2587. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/MailTable.vue?vue&type=script&lang=js
  2588. /* harmony default export */ var MailTablevue_type_script_lang_js = ({
  2589. props: {
  2590. mailData: {},
  2591. buyData: {}
  2592. },
  2593. data() {
  2594. return {
  2595. objStyle: {
  2596. fontWeight: 'bold',
  2597. backgroundColor: '#efefef'
  2598. }
  2599. };
  2600. }
  2601. });
  2602. // CONCATENATED MODULE: ./components/table/MailTable.vue?vue&type=script&lang=js
  2603. /* harmony default export */ var table_MailTablevue_type_script_lang_js = (MailTablevue_type_script_lang_js);
  2604. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2605. var componentNormalizer = __webpack_require__(2);
  2606. // CONCATENATED MODULE: ./components/table/MailTable.vue
  2607. function injectStyles (context) {
  2608. }
  2609. /* normalize component */
  2610. var component = Object(componentNormalizer["a" /* default */])(
  2611. table_MailTablevue_type_script_lang_js,
  2612. render,
  2613. staticRenderFns,
  2614. false,
  2615. injectStyles,
  2616. "13e7bb30",
  2617. "f622c4d0"
  2618. )
  2619. /* harmony default export */ var MailTable = __webpack_exports__["default"] = (component.exports);
  2620. /***/ }),
  2621. /***/ 206:
  2622. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2623. "use strict";
  2624. // ESM COMPAT FLAG
  2625. __webpack_require__.r(__webpack_exports__);
  2626. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/FormDialog.vue?vue&type=template&id=2aff96f1&scoped=true
  2627. var render = function render() {
  2628. var _vm = this,
  2629. _c = _vm._self._c;
  2630. return _c('el-dialog', {
  2631. attrs: {
  2632. "lock-scroll": false,
  2633. "title": _vm.title,
  2634. "visible": _vm.visible,
  2635. "width": "700px",
  2636. "before-close": _vm.handleClose,
  2637. "top": _vm.top,
  2638. "show-close": false
  2639. },
  2640. on: {
  2641. "update:visible": function ($event) {
  2642. _vm.visible = $event;
  2643. }
  2644. }
  2645. }, [_c('el-form', {
  2646. ref: "ruleForm",
  2647. attrs: {
  2648. "model": _vm.emailForm,
  2649. "rules": _vm.rules
  2650. }
  2651. }, _vm._l(_vm.comEnquiryConfig, function (item) {
  2652. return _c('el-form-item', {
  2653. key: item.prop,
  2654. style: {
  2655. marginBottom: _vm.marginBottom + 'px'
  2656. },
  2657. attrs: {
  2658. "label": item.prop,
  2659. "label-width": _vm.labelWidth,
  2660. "prop": item.prop
  2661. }
  2662. }, [item.type === 'text' ? _c('span', [_vm._v(_vm._s(_vm.emailForm[item.prop]))]) : _vm._e(), _vm._v(" "), item.type === 'input' ? _c('el-input', {
  2663. attrs: {
  2664. "type": item.type,
  2665. "clearable": ""
  2666. },
  2667. model: {
  2668. value: _vm.emailForm[item.prop],
  2669. callback: function ($$v) {
  2670. _vm.$set(_vm.emailForm, item.prop, $$v);
  2671. },
  2672. expression: "emailForm[item.prop]"
  2673. }
  2674. }) : item.type === 'textarea' ? _c('el-input', {
  2675. attrs: {
  2676. "type": "textarea",
  2677. "rows": 5,
  2678. "clearable": ""
  2679. },
  2680. model: {
  2681. value: _vm.emailForm[item.prop],
  2682. callback: function ($$v) {
  2683. _vm.$set(_vm.emailForm, item.prop, $$v);
  2684. },
  2685. expression: "emailForm[item.prop]"
  2686. }
  2687. }) : item.type === 'tinymce' ? _c('tinymce', {
  2688. attrs: {
  2689. "height": 240
  2690. },
  2691. model: {
  2692. value: _vm.emailForm[item.prop],
  2693. callback: function ($$v) {
  2694. _vm.$set(_vm.emailForm, item.prop, $$v);
  2695. },
  2696. expression: "emailForm[item.prop]"
  2697. }
  2698. }) : item.type === 'select' && item.isShow ? _c('el-select', {
  2699. attrs: {
  2700. "clearable": "",
  2701. "filterable": "",
  2702. "placeholder": item.placeholder ? item.placeholder : 'Please select'
  2703. },
  2704. model: {
  2705. value: _vm.emailForm[item.prop],
  2706. callback: function ($$v) {
  2707. _vm.$set(_vm.emailForm, item.prop, $$v);
  2708. },
  2709. expression: "emailForm[item.prop]"
  2710. }
  2711. }, _vm._l(item.selectlist, function (i) {
  2712. return _c('el-option', {
  2713. key: i.id,
  2714. attrs: {
  2715. "label": i.name,
  2716. "value": i.name
  2717. }
  2718. });
  2719. }), 1) : item.type === 'checkbox' ? _c('el-checkbox-group', {
  2720. model: {
  2721. value: _vm.emailForm[item.prop],
  2722. callback: function ($$v) {
  2723. _vm.$set(_vm.emailForm, item.prop, $$v);
  2724. },
  2725. expression: "emailForm[item.prop]"
  2726. }
  2727. }, _vm._l(item.selectlist, function (i, k) {
  2728. return _c('el-checkbox', {
  2729. key: k,
  2730. attrs: {
  2731. "label": k + 1
  2732. }
  2733. }, [_vm._v(_vm._s(i))]);
  2734. }), 1) : _vm._e()], 1);
  2735. }), 1), _vm._v(" "), _c('div', {
  2736. staticClass: "dialog-footer",
  2737. attrs: {
  2738. "slot": "footer"
  2739. },
  2740. slot: "footer"
  2741. }, [_c('el-button', {
  2742. attrs: {
  2743. "type": "primary",
  2744. "loading": _vm.$store.state.product.loading
  2745. },
  2746. on: {
  2747. "click": _vm.handleSend
  2748. }
  2749. }, [_vm._v(_vm._s(_vm.sendbtnCext))]), _vm._v(" "), _c('el-button', {
  2750. attrs: {
  2751. "type": "info",
  2752. "plain": ""
  2753. },
  2754. on: {
  2755. "click": _vm.handleClose
  2756. }
  2757. }, [_vm._v(_vm._s(_vm.cancelbtnCext))])], 1)], 1);
  2758. };
  2759. var staticRenderFns = [];
  2760. // CONCATENATED MODULE: ./components/FormDialog.vue?vue&type=template&id=2aff96f1&scoped=true
  2761. // EXTERNAL MODULE: ./components/Tinymce/index.vue + 4 modules
  2762. var Tinymce = __webpack_require__(157);
  2763. // EXTERNAL MODULE: external "vuex"
  2764. var external_vuex_ = __webpack_require__(6);
  2765. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/FormDialog.vue?vue&type=script&lang=js
  2766. /* harmony default export */ var FormDialogvue_type_script_lang_js = ({
  2767. components: {
  2768. Tinymce: Tinymce["default"]
  2769. },
  2770. props: {
  2771. title: {
  2772. type: String,
  2773. default: 'Send Email'
  2774. },
  2775. sendbtnCext: {
  2776. type: String,
  2777. default: 'Send Enquiry'
  2778. },
  2779. cancelbtnCext: {
  2780. type: String,
  2781. default: 'Cancel'
  2782. },
  2783. top: {
  2784. type: String,
  2785. default: '5vh'
  2786. },
  2787. isSendPdf: {
  2788. type: Boolean,
  2789. default: false
  2790. },
  2791. emailForm: {},
  2792. enquiryConfig: [],
  2793. rules: {},
  2794. labelWidth: {
  2795. type: Number,
  2796. default: 150
  2797. },
  2798. marginBottom: {
  2799. type: Number,
  2800. default: 20
  2801. },
  2802. visible: {
  2803. type: Boolean,
  2804. default: false
  2805. }
  2806. },
  2807. data() {
  2808. return {
  2809. downloading: false
  2810. };
  2811. },
  2812. computed: {
  2813. comEnquiryConfig() {
  2814. return this.enquiryConfig.filter(item => {
  2815. if (!item.hasOwnProperty('isShow') || item.isShow) {
  2816. return item;
  2817. }
  2818. });
  2819. }
  2820. },
  2821. methods: {
  2822. ...Object(external_vuex_["mapMutations"])('product', ['setLoading']),
  2823. handleClose() {
  2824. this.$emit('update:visible', false);
  2825. },
  2826. handleSend() {
  2827. this.$refs.ruleForm.validate(valid => {
  2828. if (valid) {
  2829. this.setLoading(true);
  2830. if (this.isSendPdf) {
  2831. // Bus.$emit("sendPdf");
  2832. this.$emit("handleSend");
  2833. } else {
  2834. this.$emit("handleSend");
  2835. }
  2836. } else {
  2837. return false;
  2838. }
  2839. });
  2840. }
  2841. }
  2842. });
  2843. // CONCATENATED MODULE: ./components/FormDialog.vue?vue&type=script&lang=js
  2844. /* harmony default export */ var components_FormDialogvue_type_script_lang_js = (FormDialogvue_type_script_lang_js);
  2845. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2846. var componentNormalizer = __webpack_require__(2);
  2847. // CONCATENATED MODULE: ./components/FormDialog.vue
  2848. function injectStyles (context) {
  2849. var style0 = __webpack_require__(197)
  2850. if (style0.__inject__) style0.__inject__(context)
  2851. }
  2852. /* normalize component */
  2853. var component = Object(componentNormalizer["a" /* default */])(
  2854. components_FormDialogvue_type_script_lang_js,
  2855. render,
  2856. staticRenderFns,
  2857. false,
  2858. injectStyles,
  2859. "2aff96f1",
  2860. "45dfc6da"
  2861. )
  2862. /* harmony default export */ var FormDialog = __webpack_exports__["default"] = (component.exports);
  2863. /* nuxt-component-imports */
  2864. installComponents(component, {Tinymce: __webpack_require__(157).default})
  2865. /***/ }),
  2866. /***/ 207:
  2867. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2868. "use strict";
  2869. // ESM COMPAT FLAG
  2870. __webpack_require__.r(__webpack_exports__);
  2871. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=template&id=2e991f10
  2872. var render = function render() {
  2873. var _vm = this,
  2874. _c = _vm._self._c;
  2875. return _c('div', {
  2876. ref: "printArea",
  2877. staticStyle: {
  2878. "font-family": "ProximaNova-Regular",
  2879. "background-color": "#fff",
  2880. "padding": "20px",
  2881. "word-break": "break-word",
  2882. "box-sizing": "border-box"
  2883. }
  2884. }, [_vm._ssrNode("<table><tbody><tr><td style=\"margin-right: 14px;\">" + (_vm.isImgSrc ? "<img" + _vm._ssrAttr("src", _vm.comInfo.image) + " width=\"320\" height=\"320\">" : "<img width=\"250\" height=\"250\">") + "</td> <td style=\"vertical-align: top;\"><p style=\"font-weight: bold;font-size: 22px;padding-bottom: 24px;color:#00213B\"><span style=\"margin-right: 5px;\">" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> <span>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span></p> <p style=\"line-height: 20px;color:#00213B;font-size: 14px;\">" + _vm._s(_vm.comInfo.description) + "</p></td></tr></tbody></table> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Specifications</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody><tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.headerColumns, function (item, key) {
  2885. return "<td style=\"padding:10px 0;color:#00213B;width: 25%;font-size: 14px;border:1px solid #EFEFEF\">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2886. }) + "</tr> <tr>" + _vm._ssrList(_vm.headerColumns, function (item, key) {
  2887. return "<td style=\"padding:10px 0 6px;color:#00213B;border:1px solid #EFEFEF\">" + (_vm.specificationsObj[item.prop] ? "<div>" + (item.prop != 'addonArr' ? "<span>" + _vm._ssrEscape(_vm._s(_vm.specificationsObj[item.prop])) + "</span>" : _vm._ssrList(_vm.specificationsObj.addonArr, function (opt, idx) {
  2888. return "<div style=\"padding-bottom:4px;\">" + _vm._ssrEscape(_vm._s(opt)) + "</div>";
  2889. })) + "</div>" : "<span>-</span>") + "</td>";
  2890. }) + "</tr></tbody></table></div> <div><p style=\"font-weight: bold;font-size: 17px;margin: 12px 0 8px;color:#00213B\">Quote</p> <table style=\"width:100%;border-collapse: collapse;font-size: 14px;table-layout: fixed;text-align:center;\"><tbody>" + (_vm.comLocationNum !== 1 ? "<tr style=\"background-color: #F7F8FC;font-weight: bold;\"><td" + _vm._ssrAttr("colspan", _vm.tableColumns.length - 1) + " style=\"padding:10px 0;color:#00213B;border:1px solid #EFEFEF\">Quote</td> <td" + _vm._ssrStyle({
  2891. "padding": "10px 0",
  2892. "color": "#00213B",
  2893. "border": "1px solid #EFEFEF"
  2894. }, {
  2895. width: _vm.comWidth
  2896. }, null) + ">Total</td></tr>" : "<!---->") + " <tr style=\"background-color: #F7F8FC;font-weight: bold;\">" + _vm._ssrList(_vm.tableColumns, function (item, key) {
  2897. return "<td" + _vm._ssrStyle({
  2898. "padding": "10px 0",
  2899. "color": "#00213B",
  2900. "border": "1px solid #EFEFEF"
  2901. }, {
  2902. width: _vm.comWidth
  2903. }, null) + ">" + _vm._ssrEscape(_vm._s(item.label)) + "</td>";
  2904. }) + "</tr> " + _vm._ssrList(_vm.tableData, function (row) {
  2905. return "<tr style=\"padding:10px 0;\">" + _vm._ssrList(_vm.tableColumns, function (column) {
  2906. return "<td" + _vm._ssrStyle({
  2907. "padding": "10px 0",
  2908. "color": "#00213B",
  2909. "border": "1px solid #EFEFEF",
  2910. "white-space": "nowrap"
  2911. }, _vm.getColumnHeaderStyle(column), null) + ">" + _vm._ssrEscape("\n " + _vm._s(row[column.prop].includes('.') ? '£' : '') + " " + _vm._s(row[column.prop] ? row[column.prop] : '0.00') + "\n ") + "</td>";
  2912. }) + "</tr>";
  2913. }) + "</tbody></table></div> " + (_vm.emailForm.Comments ? "<div style=\"color:#00213B\"><p style=\"margin: 20px 0;\">" + _vm._ssrEscape(_vm._s(_vm.emailForm.Comments)) + "</p></div>" : "<!---->"))]);
  2914. };
  2915. var staticRenderFns = [];
  2916. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=template&id=2e991f10
  2917. // EXTERNAL MODULE: external "html2canvas"
  2918. var external_html2canvas_ = __webpack_require__(142);
  2919. var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_);
  2920. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PriceToImg.vue?vue&type=script&lang=js
  2921. /* harmony default export */ var PriceToImgvue_type_script_lang_js = ({
  2922. props: {
  2923. pageData: {
  2924. type: Object,
  2925. default: {}
  2926. },
  2927. specificationsObj: {
  2928. type: Object,
  2929. default: {}
  2930. },
  2931. tableData: {
  2932. type: Array,
  2933. default: []
  2934. },
  2935. tableColumns: {
  2936. type: Array,
  2937. default: []
  2938. },
  2939. comLocationNum: {
  2940. type: Number,
  2941. default: 1
  2942. },
  2943. emailForm: {
  2944. type: Object,
  2945. default: {}
  2946. },
  2947. loading: {
  2948. type: Boolean,
  2949. default: false
  2950. },
  2951. isImgSrc: {
  2952. type: Boolean,
  2953. default: true
  2954. },
  2955. width: {
  2956. type: String,
  2957. default: '100%'
  2958. }
  2959. },
  2960. data() {
  2961. return {
  2962. headerColumns: [{
  2963. label: "LeadTime",
  2964. prop: "time",
  2965. type: "pre" //去掉$符号
  2966. }, {
  2967. label: "Model",
  2968. prop: "model",
  2969. type: "pre" //去掉$符号
  2970. }, {
  2971. label: "Decoration",
  2972. prop: "decoration",
  2973. type: "pre" //去掉$符号
  2974. }, {
  2975. label: "Add On",
  2976. prop: "addonArr",
  2977. type: "pre" //去掉$符号
  2978. }]
  2979. };
  2980. },
  2981. computed: {
  2982. comInfo() {
  2983. var _this$pageData;
  2984. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  2985. },
  2986. comWidth() {
  2987. return 100 / this.tableColumns.length + '%';
  2988. }
  2989. },
  2990. created() {
  2991. if (!this.isImgSrc) {
  2992. this.getBase64Image(this.comInfo.image, 'productImg');
  2993. }
  2994. },
  2995. methods: {
  2996. getColumnHeaderStyle(column) {
  2997. if (column.prop === 'project') {
  2998. return {
  2999. 'font-weight': 'bold'
  3000. };
  3001. }
  3002. return {};
  3003. },
  3004. //Base64生成产品图片,因为跨域
  3005. getBase64Image(url, ref) {
  3006. var that = this;
  3007. var image = new Image();
  3008. image.src = url + '?v=' + Math.random(); // 处理缓存
  3009. image.crossOrigin = '*'; // 支持跨域图片
  3010. image.onload = function () {
  3011. var base64 = that.drawBase64Image(image);
  3012. that.$refs[ref].src = base64;
  3013. };
  3014. },
  3015. drawBase64Image(img) {
  3016. var canvas = document.createElement('canvas');
  3017. canvas.width = img.width;
  3018. canvas.height = img.height;
  3019. var ctx = canvas.getContext('2d');
  3020. ctx.drawImage(img, 0, 0, img.width, img.height);
  3021. var dataURL = canvas.toDataURL('image/png');
  3022. return dataURL;
  3023. },
  3024. htmlToPdf(title) {
  3025. const element = this.$refs.printArea;
  3026. const clientWidth = element.offsetWidth;
  3027. const clientHeight = element.offsetHeight;
  3028. const kh = [clientWidth, clientHeight];
  3029. const opts = {
  3030. scale: 1.5,
  3031. // 缩放比例,提高生成图片清晰度
  3032. useCORS: true,
  3033. // 允许加载跨域的图片
  3034. // allowTaint: true, // 允许图片跨域,和 useCORS 二者不可共同使用
  3035. tainttest: true,
  3036. // 检测每张图片已经加载完成
  3037. logging: true // 日志开关,发布的时候记得改成 false
  3038. };
  3039. external_html2canvas_default()(element, opts).then(canvas => {
  3040. const dataURL = canvas.toDataURL('image/png');
  3041. this.downloadImage(dataURL, kh, title);
  3042. this.$emit('update:loading', false);
  3043. }).catch(() => {
  3044. this.$emit('update:loading', false);
  3045. // Bus.$emit("finishDownload");
  3046. });
  3047. },
  3048. getUrlBase64(url, kh) {
  3049. return new Promise(resolve => {
  3050. let canvas = document.createElement('canvas');
  3051. const ctx = canvas.getContext('2d');
  3052. const img = new Image();
  3053. img.crossOrigin = 'Anonymous'; // 允许跨域
  3054. img.src = url;
  3055. img.onload = () => {
  3056. // eslint-disable-next-line prefer-destructuring
  3057. canvas.height = kh[1];
  3058. // eslint-disable-next-line prefer-destructuring
  3059. canvas.width = kh[0];
  3060. ctx.drawImage(img, 0, 0, kh[0], kh[1]);
  3061. const dataURL = canvas.toDataURL('image/png');
  3062. canvas = null;
  3063. resolve(dataURL);
  3064. };
  3065. });
  3066. },
  3067. downloadImage(imgUrl, kh, title) {
  3068. this.getUrlBase64(imgUrl, kh).then(base64 => {
  3069. const link = document.createElement('a');
  3070. link.href = base64;
  3071. link.download = `${title}.png`;
  3072. link.click();
  3073. });
  3074. }
  3075. }
  3076. });
  3077. // CONCATENATED MODULE: ./components/PriceToImg.vue?vue&type=script&lang=js
  3078. /* harmony default export */ var components_PriceToImgvue_type_script_lang_js = (PriceToImgvue_type_script_lang_js);
  3079. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3080. var componentNormalizer = __webpack_require__(2);
  3081. // CONCATENATED MODULE: ./components/PriceToImg.vue
  3082. /* normalize component */
  3083. var component = Object(componentNormalizer["a" /* default */])(
  3084. components_PriceToImgvue_type_script_lang_js,
  3085. render,
  3086. staticRenderFns,
  3087. false,
  3088. null,
  3089. null,
  3090. "dda7dca6"
  3091. )
  3092. /* harmony default export */ var PriceToImg = __webpack_exports__["default"] = (component.exports);
  3093. /***/ }),
  3094. /***/ 220:
  3095. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3096. "use strict";
  3097. __webpack_require__.r(__webpack_exports__);
  3098. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_33f0dc7e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
  3099. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_33f0dc7e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_33f0dc7e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  3100. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_33f0dc7e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Quote_vue_vue_type_style_index_0_id_33f0dc7e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3101. /***/ }),
  3102. /***/ 221:
  3103. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3104. "use strict";
  3105. __webpack_require__.r(__webpack_exports__);
  3106. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(186);
  3107. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  3108. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_StockTable_vue_vue_type_style_index_0_id_13093327_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3109. /***/ }),
  3110. /***/ 222:
  3111. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3112. "use strict";
  3113. __webpack_require__.r(__webpack_exports__);
  3114. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(187);
  3115. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  3116. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ChangeTable_vue_vue_type_style_index_0_id_4c957f55_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3117. /***/ }),
  3118. /***/ 223:
  3119. /***/ (function(module, exports) {
  3120. // Exports
  3121. module.exports = {
  3122. };
  3123. /***/ }),
  3124. /***/ 226:
  3125. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3126. "use strict";
  3127. // ESM COMPAT FLAG
  3128. __webpack_require__.r(__webpack_exports__);
  3129. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=template&id=33f0dc7e&scoped=true
  3130. var render = function render() {
  3131. var _vm$enquiryConfig$3$s;
  3132. var _vm = this,
  3133. _c = _vm._self._c;
  3134. return _c('div', [_vm.quoteLoadState == 0 ? _c('div', {
  3135. directives: [{
  3136. name: "loading",
  3137. rawName: "v-loading",
  3138. value: true,
  3139. expression: "true"
  3140. }],
  3141. staticClass: "com-loading"
  3142. }) : _vm.quoteLoadState == 1 ? _vm._ssrNode("<div data-v-33f0dc7e>", "</div>", [_c('tab-nav', {
  3143. attrs: {
  3144. "borderType": 'allBorder',
  3145. "liWidth": 100,
  3146. "liHeight": 40,
  3147. "marginRight": 5,
  3148. "currTab": _vm.curWeek,
  3149. "tabList": _vm.priceList
  3150. },
  3151. on: {
  3152. "update:currTab": function ($event) {
  3153. _vm.curWeek = $event;
  3154. },
  3155. "update:curr-tab": function ($event) {
  3156. _vm.curWeek = $event;
  3157. }
  3158. }
  3159. }), _vm._ssrNode(" "), _vm._l(_vm.priceList, function (items, indexs) {
  3160. var _items$basePrice, _items$decoration, _items$basePrice2, _items$basePrice2$ite, _items$basePrice2$ite2, _items$basePrice3, _items$basePrice3$ite, _items$basePrice3$ite2;
  3161. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  3162. display: _vm.curWeek == indexs ? '' : 'none'
  3163. }) + " data-v-33f0dc7e>", "</div>", [_vm._ssrNode("<div data-v-33f0dc7e>", "</div>", [_c('tab-nav', {
  3164. attrs: {
  3165. "borderType": 'incompleteBorder',
  3166. "currTab": items.curPrint,
  3167. "tabList": items.basePrice,
  3168. "allPrintTab": _vm.allPrintTab,
  3169. "marginTop": 0,
  3170. "marginRight": 5,
  3171. "marginBottom": ((_items$basePrice = items.basePrice) === null || _items$basePrice === void 0 ? void 0 : _items$basePrice.length) > 1 ? 7 : 0
  3172. },
  3173. on: {
  3174. "update:currTab": function ($event) {
  3175. return _vm.$set(items, "curPrint", $event);
  3176. },
  3177. "update:curr-tab": function ($event) {
  3178. return _vm.$set(items, "curPrint", $event);
  3179. },
  3180. "handle": function ($event) {
  3181. return _vm.sortBy(items);
  3182. }
  3183. }
  3184. })], 1), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  3185. var _items$decorationOrig;
  3186. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  3187. display: items.curPrint == index ? '' : 'none'
  3188. }) + " data-v-33f0dc7e>", "</div>", [_c('new-price-table', {
  3189. attrs: {
  3190. "tableColumns": [..._vm.undecorated_columns, ...item.part_columns],
  3191. "tableData": item.data,
  3192. "tableType": 'Undecorated',
  3193. "curPrint": item.name,
  3194. "curModel": (_items$decorationOrig = items.decorationOrign[index]) === null || _items$decorationOrig === void 0 ? void 0 : _items$decorationOrig.model,
  3195. "data": items,
  3196. "selectRow": item.selectBaseRow
  3197. },
  3198. on: {
  3199. "update:selectRow": function ($event) {
  3200. return _vm.$set(item, "selectBaseRow", $event);
  3201. },
  3202. "update:select-row": function ($event) {
  3203. return _vm.$set(item, "selectBaseRow", $event);
  3204. }
  3205. }
  3206. })], 1);
  3207. }), _vm._ssrNode(" "), (_items$decoration = items.decoration) !== null && _items$decoration !== void 0 && _items$decoration.length || (_items$basePrice2 = items.basePrice) !== null && _items$basePrice2 !== void 0 && (_items$basePrice2$ite = _items$basePrice2[items.curPrint]) !== null && _items$basePrice2$ite !== void 0 && (_items$basePrice2$ite2 = _items$basePrice2$ite.decoration_addition) !== null && _items$basePrice2$ite2 !== void 0 && _items$basePrice2$ite2.length ? _c('new-price-table', {
  3208. attrs: {
  3209. "tableData": items.decoration,
  3210. "tableColumns": [..._vm.decoration_columns, ..._vm.comCurBaseColumns],
  3211. "tableType": 'Decoration',
  3212. "marginBottom": 0,
  3213. "hasDecAdd": (_items$basePrice3 = items.basePrice) === null || _items$basePrice3 === void 0 ? void 0 : (_items$basePrice3$ite = _items$basePrice3[items.curPrint]) === null || _items$basePrice3$ite === void 0 ? void 0 : (_items$basePrice3$ite2 = _items$basePrice3$ite.decoration_addition) === null || _items$basePrice3$ite2 === void 0 ? void 0 : _items$basePrice3$ite2.length
  3214. }
  3215. }) : _vm._e(), _vm._ssrNode(" "), _vm._l(items.basePrice, function (item, index) {
  3216. return _vm._ssrNode("<div" + _vm._ssrStyle(null, null, {
  3217. display: items.curPrint == index && item.decoration_addition.length ? '' : 'none'
  3218. }) + " data-v-33f0dc7e>", "</div>", [_c('new-price-table', {
  3219. attrs: {
  3220. "tableData": item.decoration_addition,
  3221. "tableColumns": [..._vm.addon_columns, ...item.part_columns],
  3222. "isCheckBox": true,
  3223. "tableType": 'Addon',
  3224. "multipleSelection": items.selectAdditionRow
  3225. },
  3226. on: {
  3227. "update:multipleSelection": function ($event) {
  3228. return _vm.$set(items, "selectAdditionRow", $event);
  3229. },
  3230. "update:multiple-selection": function ($event) {
  3231. return _vm.$set(items, "selectAdditionRow", $event);
  3232. }
  3233. }
  3234. })], 1);
  3235. })], 2);
  3236. })], 2) : _vm._ssrNode("<div class=\"quote-tips\" data-v-33f0dc7e>\n Current item prices are missing, please contact<a href=\"mailto:Info@promocollection.uk\" data-v-33f0dc7e>\n info@promocollection.uk</a></div>"), _vm._ssrNode(" "), _c('no-ssr', [_vm.quoteLoadState == 1 ? _c('div', [_c('form-dialog', {
  3237. attrs: {
  3238. "emailForm": _vm.enquiryForm,
  3239. "enquiryConfig": _vm.enquiryConfig,
  3240. "visible": _vm.enquiryFormVisible,
  3241. "rules": _vm.rules,
  3242. "labelWidth": (_vm$enquiryConfig$3$s = _vm.enquiryConfig[3].selectlist) !== null && _vm$enquiryConfig$3$s !== void 0 && _vm$enquiryConfig$3$s.length ? 140 : 82
  3243. },
  3244. on: {
  3245. "update:visible": function ($event) {
  3246. _vm.enquiryFormVisible = $event;
  3247. },
  3248. "handleSend": _vm.sendPriceMail
  3249. }
  3250. }), _vm._v(" "), _c('mail-table', {
  3251. directives: [{
  3252. name: "show",
  3253. rawName: "v-show",
  3254. value: false,
  3255. expression: "false"
  3256. }],
  3257. ref: "mailtable",
  3258. attrs: {
  3259. "mailData": _vm.mailData
  3260. }
  3261. }, [_c('price-to-img', {
  3262. attrs: {
  3263. "pageData": _vm.pageData,
  3264. "specificationsObj": _vm.specificationsObj,
  3265. "tableData": _vm.comFilterSwitchSellData,
  3266. "tableColumns": _vm.comMergeColumns,
  3267. "comLocationNum": _vm.comLocationNum,
  3268. "emailForm": _vm.commentObj
  3269. }
  3270. })], 1), _vm._v(" "), _c('el-dialog', {
  3271. ref: "dialogRef",
  3272. attrs: {
  3273. "lock-scroll": false,
  3274. "title": "Customer Quote",
  3275. "visible": _vm.priceToImgVisible,
  3276. "custom-class": "price-to-img-dialog"
  3277. },
  3278. on: {
  3279. "update:visible": function ($event) {
  3280. _vm.priceToImgVisible = $event;
  3281. }
  3282. }
  3283. }, [_c('price-to-img', {
  3284. ref: "priceToImgRef",
  3285. attrs: {
  3286. "isImgSrc": false,
  3287. "loading": _vm.pdfLoading,
  3288. "pageData": _vm.pageData,
  3289. "specificationsObj": _vm.specificationsObj,
  3290. "tableData": _vm.comFilterSwitchSellData,
  3291. "tableColumns": _vm.comMergeColumns,
  3292. "comLocationNum": _vm.comLocationNum,
  3293. "emailForm": _vm.commentObj
  3294. },
  3295. on: {
  3296. "update:loading": function ($event) {
  3297. _vm.pdfLoading = $event;
  3298. }
  3299. }
  3300. }), _vm._v(" "), _c('p', {
  3301. staticClass: "tips"
  3302. }, [_vm._v("Change default standard comment:")]), _vm._v(" "), _c('el-input', {
  3303. model: {
  3304. value: _vm.commentObj.Comments,
  3305. callback: function ($$v) {
  3306. _vm.$set(_vm.commentObj, "Comments", $$v);
  3307. },
  3308. expression: "commentObj.Comments"
  3309. }
  3310. }), _vm._v(" "), _c('div', {
  3311. staticClass: "btn-wrap"
  3312. }, [_c('el-button', {
  3313. staticClass: "button-black button-margin",
  3314. attrs: {
  3315. "size": "medium",
  3316. "loading": _vm.pdfLoading
  3317. },
  3318. on: {
  3319. "click": _vm.handleDownloadPdf
  3320. }
  3321. }, [_vm._v("Download")])], 1)], 1), _vm._v(" "), _c('price-to-img', {
  3322. directives: [{
  3323. name: "show",
  3324. rawName: "v-show",
  3325. value: false,
  3326. expression: "false"
  3327. }],
  3328. ref: "pdf",
  3329. attrs: {
  3330. "loading": _vm.pdfLoading,
  3331. "pageData": _vm.pageData,
  3332. "specificationsObj": _vm.specificationsObj,
  3333. "tableData": _vm.comFilterSwitchSellData,
  3334. "tableColumns": _vm.comMergeColumns,
  3335. "comLocationNum": _vm.comLocationNum,
  3336. "emailForm": _vm.commentObj
  3337. },
  3338. on: {
  3339. "update:loading": function ($event) {
  3340. _vm.pdfLoading = $event;
  3341. }
  3342. }
  3343. }), _vm._v(" "), _c('dialog-XX-success', {
  3344. attrs: {
  3345. "visible": _vm.xxContentVisible,
  3346. "imgType": false,
  3347. "content": 'This quantity is below the MOQ for this product'
  3348. },
  3349. on: {
  3350. "update:visible": function ($event) {
  3351. _vm.xxContentVisible = $event;
  3352. }
  3353. }
  3354. })], 1) : _vm._e()])], 2);
  3355. };
  3356. var staticRenderFns = [];
  3357. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=template&id=33f0dc7e&scoped=true
  3358. // EXTERNAL MODULE: external "vuex"
  3359. var external_vuex_ = __webpack_require__(6);
  3360. // EXTERNAL MODULE: external "lodash"
  3361. var external_lodash_ = __webpack_require__(141);
  3362. var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
  3363. // EXTERNAL MODULE: external "number-precision"
  3364. var external_number_precision_ = __webpack_require__(122);
  3365. // EXTERNAL MODULE: ./components/table/NewPriceTable.vue + 4 modules
  3366. var NewPriceTable = __webpack_require__(202);
  3367. // EXTERNAL MODULE: ./components/table/TotalTable.vue + 4 modules
  3368. var TotalTable = __webpack_require__(203);
  3369. // EXTERNAL MODULE: ./components/table/UnitTable.vue + 4 modules
  3370. var UnitTable = __webpack_require__(204);
  3371. // EXTERNAL MODULE: ./components/table/MailTable.vue + 4 modules
  3372. var MailTable = __webpack_require__(205);
  3373. // EXTERNAL MODULE: ./components/DIalogXXSuccess.vue + 4 modules
  3374. var DIalogXXSuccess = __webpack_require__(30);
  3375. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/Quote.vue?vue&type=script&lang=js
  3376. /* harmony default export */ var Quotevue_type_script_lang_js = ({
  3377. components: {
  3378. NewPriceTable: NewPriceTable["default"],
  3379. TotalTable: TotalTable["default"],
  3380. UnitTable: UnitTable["default"],
  3381. MailTable: MailTable["default"],
  3382. 'dialog-XX-success': DIalogXXSuccess["default"]
  3383. },
  3384. props: {
  3385. pageData: {
  3386. type: Object,
  3387. default: () => {
  3388. return {};
  3389. }
  3390. },
  3391. id: {
  3392. type: Number,
  3393. default: null
  3394. }
  3395. },
  3396. data() {
  3397. return {
  3398. quoteLoadState: 0,
  3399. curWeek: 0,
  3400. allPrintTab: [],
  3401. priceList: [],
  3402. initZeroObj: {},
  3403. initSetupObj: {},
  3404. initUnitObj: {},
  3405. initChangeUnitObj: {},
  3406. initFrightObj: {},
  3407. initTotalObj: {},
  3408. xxContentVisible: false,
  3409. setup_switch: false,
  3410. freight_switch: false,
  3411. weight: {},
  3412. undecorated_columns: [{
  3413. label: 'MODEL',
  3414. prop: 'model',
  3415. type: 'text',
  3416. align: 'left',
  3417. width: 150,
  3418. extraWidth: 50,
  3419. // 配合组件 (820-tableColumns[0].width-tableColumns[0].extraWidth)/(tableColumns.length-1)
  3420. isFirstColumn: true // 去掉$符号
  3421. }, {
  3422. label: 'SETUP',
  3423. prop: 'website_setup'
  3424. }],
  3425. decoration_columns: [{
  3426. label: 'PRINT OPTION',
  3427. prop: 'dec_code',
  3428. type: 'radioInput',
  3429. align: 'left',
  3430. width: 150,
  3431. extraWidth: 50
  3432. }, {
  3433. label: 'SETUP',
  3434. prop: 'website_setup'
  3435. }],
  3436. addon_columns: [{
  3437. label: 'Addon',
  3438. prop: 'name',
  3439. type: 'text',
  3440. width: 150,
  3441. extraWidth: 50,
  3442. isFirstColumn: true // 去掉$符号
  3443. }, {
  3444. label: 'Setup',
  3445. prop: 'website_setup'
  3446. }],
  3447. buy_columns: [{
  3448. label: 'QTY',
  3449. prop: 'project',
  3450. isFirstColumn: true // 去掉$符号
  3451. }],
  3452. unit_columns: [{
  3453. label: 'QTY',
  3454. prop: 'total',
  3455. align: 'left',
  3456. isText: true
  3457. }],
  3458. buyData: [{
  3459. project: 'Setup'
  3460. }, {
  3461. project: 'Unit'
  3462. }, {
  3463. project: 'Freight'
  3464. }, {
  3465. project: 'Total'
  3466. }],
  3467. unitData: [{
  3468. total: 'Unit Rate %'
  3469. }, {
  3470. total: 'Setup %'
  3471. }, {
  3472. total: 'Freight %'
  3473. }],
  3474. sellData: [{
  3475. project: 'Postcode',
  3476. summary: '-'
  3477. }, {
  3478. project: 'Setup',
  3479. summary: 0.00
  3480. }, {
  3481. project: 'Unit',
  3482. summary: 0.00
  3483. }, {
  3484. project: 'Freight',
  3485. summary: 0.00
  3486. }, {
  3487. project: 'Total',
  3488. summary: 0.00
  3489. }],
  3490. POA_Config: ['111', '111.00', '999', '999.00'],
  3491. enquiryFormVisible: false,
  3492. enquiryForm: {
  3493. Name: '',
  3494. Email: '',
  3495. Phone: '',
  3496. 'Customer manager': null,
  3497. Comments: ''
  3498. },
  3499. enquiryConfig: [{
  3500. prop: 'Name',
  3501. type: 'input'
  3502. }, {
  3503. prop: 'Email',
  3504. type: 'input'
  3505. }, {
  3506. prop: 'Phone',
  3507. type: 'input'
  3508. }, {
  3509. prop: 'Customer manager',
  3510. type: 'select',
  3511. selectlist: [],
  3512. isShow: true
  3513. }, {
  3514. prop: 'Comments',
  3515. type: 'textarea'
  3516. }],
  3517. rules: {
  3518. Name: [{
  3519. required: true,
  3520. message: 'Please enter',
  3521. trigger: 'blur'
  3522. }],
  3523. Email: [{
  3524. required: true,
  3525. message: 'Please enter the correct format',
  3526. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  3527. trigger: 'blur'
  3528. }],
  3529. Phone: [{
  3530. required: true,
  3531. message: 'Please enter the correct format',
  3532. // pattern: /^1[0-9]{10}$/,
  3533. trigger: 'blur'
  3534. }],
  3535. 'Customer manager': [{
  3536. required: true,
  3537. message: 'Please select',
  3538. trigger: 'change'
  3539. }]
  3540. },
  3541. mailData: {
  3542. Url: ''
  3543. },
  3544. priceToImgVisible: false,
  3545. downloadDialogVisible: false,
  3546. commentObj: {
  3547. 'Email Address': '',
  3548. Comments: ''
  3549. },
  3550. enquiryConfig1: [{
  3551. prop: 'Email Address',
  3552. type: 'input'
  3553. }, {
  3554. prop: 'Comments',
  3555. type: 'input'
  3556. }],
  3557. rules1: {
  3558. 'Email Address': [{
  3559. required: true,
  3560. message: 'Please enter the correct format',
  3561. pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
  3562. trigger: 'blur'
  3563. }]
  3564. },
  3565. specificationsObj: {
  3566. time: null,
  3567. model: null,
  3568. decoration: null,
  3569. addonArr: null
  3570. },
  3571. pdfLoading: false
  3572. };
  3573. },
  3574. computed: {
  3575. ...Object(external_vuex_["mapState"])('config', {
  3576. configInfo: state => state.configInfo
  3577. }),
  3578. userInfo() {
  3579. return this.$store.state.userInfo;
  3580. },
  3581. comCurWeekPrice() {
  3582. return this.priceList[this.curWeek] || {};
  3583. },
  3584. comCurPrint() {
  3585. return this.comCurWeekPrice.curPrint;
  3586. },
  3587. comCurBasePrice() {
  3588. return this.comCurWeekPrice.basePrice[this.comCurPrint];
  3589. },
  3590. comLocationNum() {
  3591. return +this.comCurWeekPrice.basePrice[this.comCurPrint].locationNum;
  3592. },
  3593. comCurBaseColumns() {
  3594. return this.comCurBasePrice.part_columns;
  3595. },
  3596. comCurBaseTotalColumns() {
  3597. const d = this.comCurWeekPrice.basePrice[this.comCurPrint].total_part_columns;
  3598. const n = this.comLocationNum;
  3599. if (n === 1) {
  3600. return d;
  3601. } else {
  3602. const concatAdd = [...d, ...this.comCurWeekPrice.basePrice[this.comCurPrint].remainingAttr].slice(0, n);
  3603. return concatAdd;
  3604. }
  3605. },
  3606. comTotalLabel() {
  3607. // 计算所有元素label的和
  3608. return this.comCurBaseTotalColumns.reduce((sum, item) => sum + Number(item.label), 0);
  3609. },
  3610. comSummaryColumns() {
  3611. return [{
  3612. label: this.comTotalLabel.toString(),
  3613. prop: 'summary'
  3614. }];
  3615. },
  3616. comAttributeList() {
  3617. var _this$comCurBaseTotal;
  3618. const obj = {};
  3619. (_this$comCurBaseTotal = this.comCurBaseTotalColumns) === null || _this$comCurBaseTotal === void 0 ? void 0 : _this$comCurBaseTotal.forEach(item => {
  3620. obj[item.prop] = item.label;
  3621. });
  3622. obj.summary = this.comTotalLabel;
  3623. return obj;
  3624. },
  3625. // 当前已选基础价
  3626. comBasePrice() {
  3627. return this.comCurBasePrice.selectBaseRow;
  3628. },
  3629. // 当前累加打印价
  3630. comDecoPrice() {
  3631. var _this$comCurWeekPrice;
  3632. if (!((_this$comCurWeekPrice = this.comCurWeekPrice.decoration) !== null && _this$comCurWeekPrice !== void 0 && _this$comCurWeekPrice.length)) {
  3633. return [];
  3634. }
  3635. const arr = this.comCurWeekPrice.decoration.map((item, idx) => {
  3636. const obj = {};
  3637. if (+item.num > 0) {
  3638. for (const i in this.initUnitObj) {
  3639. if (idx === 0) {
  3640. // 首个打印价要取附加价计算
  3641. const keyArr = i.split('_');
  3642. const supplier_val = item[`supplier_${keyArr[1]}`];
  3643. if (this.POA_Config.includes(supplier_val)) {
  3644. obj[`${i}`] = supplier_val;
  3645. } else {
  3646. obj[`${i}`] = Object(external_number_precision_["times"])(+supplier_val, item.num);
  3647. }
  3648. } else {
  3649. obj[`${i}`] = this.POA_Config.includes(item[i]) ? item[i] : Object(external_number_precision_["times"])(+item[i], item.num);
  3650. }
  3651. }
  3652. }
  3653. return obj;
  3654. }).filter(obj => Object.keys(obj).length !== 0);
  3655. return arr;
  3656. },
  3657. comBuyData() {
  3658. this.calculateBuyData();
  3659. return this.buyData;
  3660. },
  3661. comNoSumCol() {
  3662. return [...this.buy_columns, ...this.comCurBaseTotalColumns];
  3663. },
  3664. comHasSumCol() {
  3665. return [...this.buy_columns, ...this.comCurBaseTotalColumns, ...this.comSummaryColumns];
  3666. },
  3667. comMergeColumns() {
  3668. return this.comLocationNum == 1 ? this.comNoSumCol : this.comHasSumCol;
  3669. },
  3670. comSellData() {
  3671. if (Object.keys(this.comAttributeList).length !== 0) {
  3672. this.calculateSellData();
  3673. }
  3674. return this.sellData;
  3675. },
  3676. comFilterSwitchSellData() {
  3677. var _this$comSellData;
  3678. return (_this$comSellData = this.comSellData) === null || _this$comSellData === void 0 ? void 0 : _this$comSellData.filter((item, i) => {
  3679. if (i === 1 && this.setup_switch) {
  3680. return false;
  3681. } else if (i === 3 && this.freight_switch) {
  3682. return false;
  3683. } else {
  3684. return item;
  3685. }
  3686. });
  3687. }
  3688. },
  3689. methods: {
  3690. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  3691. getQuote() {
  3692. this.$axios.post('/uk-api/quote/pricequote', {
  3693. id: this.id
  3694. }).then(res => {
  3695. if (localStorage.getItem('unit')) {
  3696. this.unitData = JSON.parse(localStorage.getItem('unit'));
  3697. }
  3698. const {
  3699. attributeList,
  3700. priceList,
  3701. default: defaultID
  3702. } = res.result;
  3703. if (!Object.keys(attributeList).length || !Object.keys(priceList).length) {
  3704. this.quoteLoadState = 2;
  3705. return;
  3706. }
  3707. for (const a in attributeList) {
  3708. // 过滤掉website_qty标签无数量
  3709. if (attributeList[a]) {
  3710. this.initZeroObj[a] = 0;
  3711. } else {
  3712. delete attributeList[a];
  3713. }
  3714. for (const unit of this.unitData) {
  3715. // 如果对象中缺少 attributeList 的 key,则设置为 40
  3716. if (!(a in unit) || unit[a] === '') {
  3717. this.$set(unit, a, 40);
  3718. }
  3719. }
  3720. }
  3721. // 格式化数据,对象改成数组
  3722. for (const keys in priceList) {
  3723. const vals = {};
  3724. const {
  3725. decoration,
  3726. additionlist,
  3727. ...remaining
  3728. } = priceList[keys];
  3729. vals.basePrice = [];
  3730. vals.selectAdditionRow = [];
  3731. vals.curPrint = 0;
  3732. vals.name = this.formatDurationString(keys);
  3733. vals.nameOrigin = keys;
  3734. vals.decorationOrign = [...decoration];
  3735. vals.decorationID = decoration.map(i => i.id);
  3736. vals.decoration = [...decoration].flatMap(item => {
  3737. const result = [];
  3738. if (item.max_color > 0) {
  3739. result.push({
  3740. ...item,
  3741. max_num: item.max_color,
  3742. id: `${item.id}-1`,
  3743. decName: item.max_color_name
  3744. });
  3745. }
  3746. if (item.max_point > 0) {
  3747. result.push({
  3748. ...item,
  3749. max_num: item.max_point,
  3750. id: `${item.id}-2`,
  3751. decName: item.max_point_name
  3752. });
  3753. }
  3754. return result;
  3755. });
  3756. vals.additionlist = additionlist;
  3757. for (const k in remaining) {
  3758. var _remaining$k, _remaining$k2;
  3759. const o = {};
  3760. o.attributeList = this.copyData(attributeList);
  3761. if (((_remaining$k = remaining[k]) === null || _remaining$k === void 0 ? void 0 : _remaining$k.length) > 1) {
  3762. // 检查数组中各元素的 website_qtyN 是否都等于 "-" or "POA",则删除key
  3763. for (const a in attributeList) {
  3764. const is111Poa = remaining[k].every(item => this.POA_Config.includes(item[a]));
  3765. if (is111Poa) {
  3766. delete o.attributeList[a];
  3767. }
  3768. }
  3769. } else if (((_remaining$k2 = remaining[k]) === null || _remaining$k2 === void 0 ? void 0 : _remaining$k2.length) === 1) {
  3770. // 判断 remaining[k][0] 中是否包含 vals.attributeList 的键,并且对应的值都等于 "-" or "POA",则不删除key
  3771. const obj = remaining[k][0];
  3772. const attributeKeys = Object.keys(o.attributeList);
  3773. const areAllKeysInPOAConfig = attributeKeys.every(key => {
  3774. return Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key]);
  3775. });
  3776. if (!areAllKeysInPOAConfig) {
  3777. attributeKeys.forEach(key => {
  3778. if (Object.prototype.hasOwnProperty.call(obj, key) && this.POA_Config.includes(obj[key])) {
  3779. delete o.attributeList[key];
  3780. }
  3781. });
  3782. }
  3783. }
  3784. o.name = k;
  3785. o.data = remaining[k];
  3786. o.locationNum = 1;
  3787. o.part_columns = Object.keys(o.attributeList).map(e => {
  3788. return {
  3789. label: o.attributeList[e].toString(),
  3790. prop: e
  3791. };
  3792. });
  3793. const freightParam = {
  3794. postcode: '',
  3795. freight_type: 1,
  3796. freight: {}
  3797. };
  3798. o.total_part_columns = this.copyData(o.part_columns).map(obj => ({
  3799. ...obj,
  3800. ...freightParam
  3801. }));
  3802. o.remainingAttr = [];
  3803. const firstColumns = {
  3804. ...o.part_columns[0],
  3805. ...freightParam
  3806. };
  3807. for (let i = 1; i < 9; i++) {
  3808. if (!Object.keys(o.attributeList).includes(`website_qty${i}`)) {
  3809. const newColumn = {
  3810. ...firstColumns
  3811. };
  3812. this.$set(newColumn, 'prop', `website_qty${i}`);
  3813. o.remainingAttr.push(newColumn);
  3814. }
  3815. }
  3816. ;
  3817. vals.basePrice.push(o);
  3818. if (!this.allPrintTab.includes(k)) {
  3819. this.allPrintTab.push(k);
  3820. }
  3821. }
  3822. this.priceList.push(vals);
  3823. }
  3824. this.priceList.forEach((options, index) => {
  3825. // 原始数据name没空格,需要映射到
  3826. if (options.nameOrigin === (defaultID === null || defaultID === void 0 ? void 0 : defaultID.name)) {
  3827. this.curWeek = index;
  3828. options.decorationOrign.forEach((opt, idx) => {
  3829. var _defaultID$decoration;
  3830. if (opt.id === (defaultID === null || defaultID === void 0 ? void 0 : (_defaultID$decoration = defaultID.decoration) === null || _defaultID$decoration === void 0 ? void 0 : _defaultID$decoration.id)) {
  3831. this.$set(options, 'curPrint', idx);
  3832. }
  3833. });
  3834. }
  3835. // 所有周期的所有打印,进来页面时默认勾选第一条价格
  3836. options.basePrice.forEach((opt, idx) => {
  3837. var _options$decorationOr, _options$decorationOr2;
  3838. this.$set(opt, 'selectBaseRow', opt.data[0] || {});
  3839. opt.decoration_addition = [...(((_options$decorationOr = options.decorationOrign) === null || _options$decorationOr === void 0 ? void 0 : (_options$decorationOr2 = _options$decorationOr[idx]) === null || _options$decorationOr2 === void 0 ? void 0 : _options$decorationOr2.decoration_addition) || []), ...(options.additionlist || [])];
  3840. });
  3841. options.decoration.forEach(opt => {
  3842. this.$set(opt, 'num', 0);
  3843. });
  3844. });
  3845. this.initSetupObj = Object.assign({}, this.initZeroObj);
  3846. this.initUnitObj = Object.assign({}, this.initZeroObj, {
  3847. website_setup: 0
  3848. });
  3849. this.initFrightObj = Object.assign({}, this.initZeroObj);
  3850. this.buyData = this.buyData.map(item => {
  3851. return {
  3852. ...item,
  3853. ...this.initSetupObj
  3854. };
  3855. });
  3856. this.sellData = this.sellData.map(item => {
  3857. return {
  3858. ...item,
  3859. ...this.initSetupObj
  3860. };
  3861. });
  3862. this.quoteLoadState = 1;
  3863. }).catch(e => {
  3864. console.log('this.quoteLoadState1: ', e);
  3865. this.quoteLoadState = 2;
  3866. });
  3867. },
  3868. formatDurationString(input) {
  3869. // 匹配数字和字符串的正则表达式
  3870. const regex = /(\d+)([a-zA-Z]+)/g;
  3871. const result = input.replace(regex, '$1 $2');
  3872. return result;
  3873. },
  3874. // getWeight() {
  3875. // this.$axios
  3876. // .post('/api/quote/weight', { id: this.id })
  3877. // .then(res => {
  3878. // this.weight = res.result
  3879. // })
  3880. // .catch(() => {})
  3881. // },
  3882. // getFreight(k) {
  3883. // const postcode = this.comCurBaseTotalColumns[k].postcode
  3884. // const type = this.comCurBaseTotalColumns[k].freight_type
  3885. // const init = { basic:0,pickup:0,minimum:0 }
  3886. // if (postcode.length < 3) {
  3887. // this.comCurBaseTotalColumns[k].freight = init
  3888. // return
  3889. // }
  3890. // this.$axios
  3891. // .post('/api/quote/freight', {
  3892. // postcode,
  3893. // type
  3894. // })
  3895. // .then(res => {
  3896. // this.comCurBaseTotalColumns[k].freight = Array.isArray(res.result)?init:res.result
  3897. // })
  3898. // },
  3899. getDebFreight: external_lodash_default.a.debounce(function (k) {
  3900. this.getFreight(k);
  3901. }, 200),
  3902. getNumber(e, row, min) {
  3903. if (parseInt(e.target.value) < min) {
  3904. this.xxContentVisible = true;
  3905. row.label = min;
  3906. } else {
  3907. this.xxContentVisible = false;
  3908. }
  3909. },
  3910. sortBy(items) {
  3911. // items.decoration.sort(this.customSort(items.decorationID))
  3912. // const targetElement = items.decoration.splice(items.curPrint, 1)[0]
  3913. // items.decoration.unshift(targetElement)
  3914. },
  3915. // 按原打印数组的id字段排序
  3916. customSort(decorationID) {
  3917. return (a, b) => {
  3918. return decorationID.indexOf(a.id) - decorationID.indexOf(b.id);
  3919. };
  3920. },
  3921. dividePrice(a) {
  3922. return Object(external_number_precision_["divide"])(+a, 100);
  3923. },
  3924. // openMailDialog() {
  3925. // if (this.$utils.checkLogin()) {
  3926. // this.getUserInfo()
  3927. // const { contacts, email, phone, crm_users_id:crmUsersId } = this.userInfo
  3928. // this.enquiryForm.Name = contacts
  3929. // this.enquiryForm.Email = email
  3930. // this.enquiryForm.Phone = phone
  3931. // if (crmUsersId?.length) {
  3932. // this.enquiryConfig[3].selectlist = crmUsersId
  3933. // if (crmUsersId?.length === 1) {
  3934. // this.enquiryForm['Customer manager'] = crmUsersId[0].name
  3935. // }
  3936. // } else {
  3937. // this.enquiryConfig[3].isShow = false
  3938. // this.$delete(this.enquiryForm, 'Customer manager')
  3939. // }
  3940. // this.enquiryFormVisible = true
  3941. // } else {
  3942. // this.openDialog()
  3943. // }
  3944. // },
  3945. getMailData() {
  3946. this.mailData.Url = window.location.href;
  3947. const {
  3948. Name,
  3949. Email,
  3950. Phone,
  3951. Comments
  3952. } = this.enquiryForm;
  3953. this.mailData['Customer Name'] = Name;
  3954. this.mailData['Customer Email'] = Email;
  3955. this.mailData['Customer Phone'] = Phone;
  3956. this.mailData.Comments = Comments;
  3957. const {
  3958. email,
  3959. level,
  3960. createTime
  3961. } = this.userInfo;
  3962. this.mailData['Member Account'] = email;
  3963. this.mailData['Member Grade'] = level.name;
  3964. this.mailData['Member Registration time'] = createTime;
  3965. this.mailData['Quote time'] = this.$utils.formatTime(new Date());
  3966. },
  3967. // 发送价格邮件 Enquiry按钮
  3968. // async sendPriceMail() {
  3969. // await this.getMailData()
  3970. // await this.getCustomerQuoteData()
  3971. // const {
  3972. // Name,
  3973. // Email,
  3974. // Phone,
  3975. // Comments,
  3976. // 'Customer manager': customerManager,
  3977. // } = this.enquiryForm
  3978. // this.$axios
  3979. // .post('/uk-api/quote/sendenquiry', {
  3980. // content: this.$refs.mailtable.$el.innerHTML,
  3981. // name: Name,
  3982. // email: Email,
  3983. // phone: Phone,
  3984. // customer_manager: customerManager || '',
  3985. // url: this.mailData.Url,
  3986. // product_code: this.pageData.product_code,
  3987. // comments: Comments,
  3988. // member_id: this.userInfo.id,
  3989. // })
  3990. // .then(res => {
  3991. // this.setLoading(false)
  3992. // this.enquiryFormVisible = false
  3993. // this.$confirm('Enquiry Sent', {
  3994. // confirmButtonText: 'OK',
  3995. // showCancelButton: false,
  3996. // type: 'success',
  3997. // center: true,
  3998. // showClose: false,
  3999. // confirmButtonClass: 'com-btnblack',
  4000. // }).then(() => {})
  4001. // })
  4002. // .catch(() => {
  4003. // this.setLoading(false)
  4004. // })
  4005. // },
  4006. // getCustomerQuoteData() {
  4007. // const { name, selectAdditionRow } = this.comCurWeekPrice
  4008. // this.specificationsObj.time = name
  4009. // this.specificationsObj.model = this.comBasePrice.model
  4010. // this.specificationsObj.decoration = this.comCurBasePrice.name
  4011. // if (selectAdditionRow.length) {
  4012. // this.specificationsObj.addonArr = selectAdditionRow.map(
  4013. // item => item.name
  4014. // )
  4015. // } else {
  4016. // this.specificationsObj.addonArr = null
  4017. // }
  4018. // },
  4019. // openDownloadDialog(type) {
  4020. // this.getCustomerQuoteData()
  4021. // type
  4022. // ? (this.downloadDialogVisible = true)
  4023. // : (this.priceToImgVisible = true)
  4024. // },
  4025. handleDownloadPdf() {
  4026. this.pdfLoading = true;
  4027. this.$nextTick(() => {
  4028. this.$refs.priceToImgRef.htmlToPdf(this.pageData.product_code);
  4029. });
  4030. },
  4031. // 发送PDF邮件
  4032. // sendPdfMail() {
  4033. // this.$axios
  4034. // .post('/api/quote/sendpdf', {
  4035. // content: this.$refs.pdf.$el.innerHTML,
  4036. // product_code: this.pageData.product_code,
  4037. // email: this.commentObj['Email Address'],
  4038. // })
  4039. // .then(res => {
  4040. // this.setLoading(false)
  4041. // this.downloadDialogVisible = false
  4042. // this.$confirm('Enquiry Sent', {
  4043. // confirmButtonText: 'OK',
  4044. // showCancelButton: false,
  4045. // type: 'success',
  4046. // center: true,
  4047. // showClose: false,
  4048. // confirmButtonClass: 'com-btnblack',
  4049. // })
  4050. // })
  4051. // .catch(() => {
  4052. // this.setLoading(false)
  4053. // })
  4054. // },
  4055. copyData(data) {
  4056. return JSON.parse(JSON.stringify(data));
  4057. },
  4058. calculateBuyData() {
  4059. const selPriceArr = [];
  4060. if (JSON.stringify(this.comBasePrice) !== '{}') {
  4061. selPriceArr.push(this.comBasePrice);
  4062. }
  4063. selPriceArr.push(...this.comDecoPrice, ...this.comCurWeekPrice.selectAdditionRow);
  4064. if (selPriceArr.length === 0) {
  4065. this.buyData = this.buyData.map(item => ({
  4066. ...item,
  4067. ...this.initZeroObj
  4068. }));
  4069. return;
  4070. }
  4071. // 累加所选,初始数量对应的单价。赋值给this.initUnitObj
  4072. for (const i in this.initUnitObj) {
  4073. const columnSum = this.copyData(selPriceArr).reduce(function (prev, cur) {
  4074. if (cur[i] === '111' || cur[i] === '111.00') {
  4075. return cur[i] = '-';
  4076. } else if (cur[i] === '999' || cur[i] === '999.00') {
  4077. return cur[i] = 'POA';
  4078. } else {
  4079. // 当基础价格是-POA,后续累加价格是正常数字价,依然返回-POA
  4080. if (prev === '-' || prev === 'POA') {
  4081. return prev;
  4082. }
  4083. return Object(external_number_precision_["plus"])(+cur[i], prev).toFixed(2);
  4084. }
  4085. }, 0);
  4086. this.$set(this.initUnitObj, i, columnSum);
  4087. }
  4088. for (const a in this.comAttributeList) {
  4089. // 每次更改选择价格,必须遍历整个comAttributeList
  4090. const tempIdx = this.comCurBaseColumns.findIndex(items => +this.comAttributeList[a] < +items.label);
  4091. if (tempIdx > 0) {
  4092. const key = this.comCurBaseColumns[tempIdx - 1].prop;
  4093. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  4094. } else {
  4095. const length = this.comCurBaseColumns.length;
  4096. const key = this.comCurBaseColumns[length - 1].prop;
  4097. this.$set(this.initChangeUnitObj, a, this.initUnitObj[key]);
  4098. }
  4099. if (this.initChangeUnitObj[a] === 'POA' || this.initChangeUnitObj[a] === '-') {
  4100. this.$set(this.initSetupObj, a, this.initChangeUnitObj[a]);
  4101. this.$set(this.initFrightObj, a, this.initChangeUnitObj[a]);
  4102. } else {
  4103. this.$set(this.initSetupObj, a, this.initUnitObj.website_setup);
  4104. // 计算运费
  4105. // 单独批次数量的总重
  4106. // weight定义是{},后端没数据传回[]
  4107. const unitWLocal = this.weight.unit_w_local ? +this.weight.unit_w_local : 0;
  4108. const totalWeight = Math.ceil(Object(external_number_precision_["times"])(unitWLocal, this.comAttributeList[a]));
  4109. // Road express 1 AAE:AAEFactor 2
  4110. const setupFuel = this.dividePrice(this.configInfo.fuel);
  4111. const setupBagFreight = this.dividePrice(this.configInfo.bag_freight);
  4112. const setupExpressFreight = this.dividePrice(this.configInfo.express_freight);
  4113. const AAEFactor = Object(external_number_precision_["plus"])(1, setupBagFreight, setupFuel);
  4114. const expressFactor = Object(external_number_precision_["plus"])(1, setupExpressFreight, setupFuel);
  4115. let frightCost = 0;
  4116. let freightType;
  4117. let postcode;
  4118. let freight = {};
  4119. const matchIndex = this.comCurBaseTotalColumns.findIndex(item => item.prop === a);
  4120. // 1,所有按第一个运费统计;不为1,则只计算 comCurBaseTotalColumns的[地址数]长度
  4121. if (+this.comLocationNum === 1 || this.comLocationNum >= matchIndex + 1) {
  4122. ({
  4123. freight,
  4124. freight_type: freightType,
  4125. postcode
  4126. } = this.comCurBaseTotalColumns[+this.comLocationNum === 1 ? 0 : matchIndex] || {});
  4127. }
  4128. if (freightType === 1 && postcode >= 3) {
  4129. if (totalWeight > 20) {
  4130. const a1 = Object(external_number_precision_["minus"])(totalWeight, 20);
  4131. const a2 = Object(external_number_precision_["times"])(a1, +freight.basic);
  4132. const a3 = Object(external_number_precision_["plus"])(+freight.pickup, a2);
  4133. frightCost = Object(external_number_precision_["times"])(a3, expressFactor);
  4134. } else {
  4135. frightCost = Object(external_number_precision_["times"])(+freight.pickup, expressFactor);
  4136. }
  4137. } else if (freightType === 2 && postcode >= 3) {
  4138. const a1 = Object(external_number_precision_["divide"])(totalWeight, 5);
  4139. const a2 = Object(external_number_precision_["times"])(+freight.minimum, Math.ceil(a1));
  4140. frightCost = Object(external_number_precision_["times"])(a2, AAEFactor);
  4141. } else {
  4142. frightCost = 0;
  4143. }
  4144. this.$set(this.initFrightObj, a, Math.ceil(frightCost).toFixed(2));
  4145. }
  4146. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  4147. this.$set(this.initTotalObj, a, this.initChangeUnitObj[a]);
  4148. } else {
  4149. const unitQTY = Object(external_number_precision_["times"])(this.initChangeUnitObj[a], this.comAttributeList[a]);
  4150. this.$set(this.initTotalObj, a, Object(external_number_precision_["plus"])(this.initUnitObj.website_setup, unitQTY, this.initFrightObj[a]).toFixed(2));
  4151. }
  4152. if (this.setup_switch) {
  4153. // 业务:Setup价格/对应数量后向上取整
  4154. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  4155. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  4156. } else {
  4157. const num = Math.ceil(this.initSetupObj[a] / this.comAttributeList[a] * 100) / 100;
  4158. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  4159. }
  4160. }
  4161. if (this.freight_switch) {
  4162. if (this.initChangeUnitObj[a] === '-' || this.initChangeUnitObj[a] === 'POA') {
  4163. this.$set(this.initChangeUnitObj, a, this.initChangeUnitObj[a]);
  4164. } else {
  4165. const num = Math.ceil(this.initFrightObj[a] / this.comAttributeList[a] * 100) / 100;
  4166. this.$set(this.initChangeUnitObj, a, Object(external_number_precision_["plus"])(this.initChangeUnitObj[a], num).toFixed(2));
  4167. }
  4168. }
  4169. }
  4170. if (this.setup_switch) {
  4171. this.$set(this.buyData, 0, {
  4172. ...this.buyData[0],
  4173. ...this.initZeroObj,
  4174. ...{
  4175. 'summary': 0.00
  4176. }
  4177. });
  4178. } else {
  4179. this.$set(this.buyData, 0, {
  4180. ...this.buyData[0],
  4181. ...this.initSetupObj
  4182. });
  4183. }
  4184. this.$set(this.buyData, 1, {
  4185. ...this.buyData[1],
  4186. ...this.initChangeUnitObj
  4187. });
  4188. if (this.freight_switch) {
  4189. this.$set(this.buyData, 2, {
  4190. ...this.buyData[2],
  4191. ...this.initZeroObj
  4192. });
  4193. } else {
  4194. this.$set(this.buyData, 2, {
  4195. ...this.buyData[2],
  4196. ...this.initFrightObj
  4197. });
  4198. }
  4199. this.$set(this.buyData, 3, {
  4200. ...this.buyData[3],
  4201. ...this.initTotalObj
  4202. });
  4203. },
  4204. calculateSellData() {
  4205. // 放置comSellData计算和副作用的代码
  4206. const buySetup = this.comBuyData[0];
  4207. const buyUnit = this.comBuyData[1];
  4208. const buyFright = this.comBuyData[2];
  4209. let frightSummary = 0;
  4210. for (const i in this.comAttributeList) {
  4211. if (buyUnit[i] === '-' || buyUnit[i] === 'POA') {
  4212. this.sellData[0][i] = '-';
  4213. this.sellData[1][i] = buyUnit[i];
  4214. this.sellData[2][i] = buyUnit[i];
  4215. this.sellData[3][i] = buyUnit[i];
  4216. this.sellData[4][i] = buyUnit[i];
  4217. } else {
  4218. var _this$comCurBaseTotal2;
  4219. const item = this.comLocationNum === 1 ? this.comCurBaseTotalColumns[0] : this.comCurBaseTotalColumns.find(element => element.prop === i);
  4220. this.sellData[0][i] = item && item.postcode !== '' ? item.postcode : '-';
  4221. // 分别乘以Markup %表格
  4222. const key = (_this$comCurBaseTotal2 = this.comCurBaseTotalColumns[0]) === null || _this$comCurBaseTotal2 === void 0 ? void 0 : _this$comCurBaseTotal2.prop;
  4223. if (this.unitData[1] && this.unitData[1][key]) {
  4224. const a = Object(external_number_precision_["plus"])(this.unitData[1][key] / 100, 1);
  4225. this.sellData[1][i] = Object(external_number_precision_["times"])(buySetup[i], a).toFixed(2);
  4226. } else {
  4227. this.sellData[1][i] = buySetup[i];
  4228. }
  4229. if (this.unitData[0][i]) {
  4230. const a = Object(external_number_precision_["plus"])(this.unitData[0][i] / 100, 1);
  4231. this.sellData[2][i] = Object(external_number_precision_["times"])(buyUnit[i], a).toFixed(2);
  4232. } else {
  4233. this.sellData[2][i] = buyUnit[i];
  4234. }
  4235. if (this.unitData[2] && this.unitData[2][key]) {
  4236. const a = Object(external_number_precision_["plus"])(this.unitData[2][key] / 100, 1);
  4237. this.sellData[3][i] = Object(external_number_precision_["times"])(buyFright[i], a).toFixed(2);
  4238. // freight_switch会使qty的运费=0无法计算,故用了initFrightObj
  4239. const fa = Object(external_number_precision_["times"])(this.initFrightObj[i], a);
  4240. frightSummary = Object(external_number_precision_["plus"])(frightSummary, fa).toFixed(2);
  4241. } else {
  4242. this.sellData[3][i] = buyFright[i];
  4243. frightSummary = Object(external_number_precision_["plus"])(frightSummary, this.initFrightObj[i]).toFixed(2);
  4244. }
  4245. const unitQTY = Object(external_number_precision_["times"])(this.sellData[2][i], this.comAttributeList[i]);
  4246. this.$set(this.sellData[4], i, Object(external_number_precision_["plus"])(this.sellData[1][i], unitQTY, this.sellData[3][i]).toFixed(2));
  4247. }
  4248. }
  4249. // 迭代加了Total列,需要统计qty的运费后才能合计运费
  4250. if (this.sellData[2].summary !== '-' && this.sellData[2].summary !== 'POA') {
  4251. if (this.freight_switch) {
  4252. const num = Math.ceil(frightSummary / this.comAttributeList.summary * 100) / 100;
  4253. this.sellData[2].summary = Object(external_number_precision_["plus"])(this.sellData[2].summary, num).toFixed(2);
  4254. this.sellData[3].summary = 0.00;
  4255. const a = Object(external_number_precision_["times"])(this.sellData[2].summary, this.comAttributeList.summary);
  4256. this.sellData[4].summary = Object(external_number_precision_["plus"])(this.sellData[1].summary, a).toFixed(2);
  4257. } else {
  4258. this.sellData[3].summary = frightSummary;
  4259. this.sellData[4].summary = Object(external_number_precision_["plus"])(frightSummary, this.sellData[4].summary).toFixed(2);
  4260. }
  4261. }
  4262. },
  4263. // 低于最小起订量 把该栏的数值重置到最小起订量
  4264. getChildIdx(idx) {
  4265. var _this$comCurBaseColum;
  4266. this.xxContentVisible = true;
  4267. this.$set(this.comCurBaseTotalColumns[idx - 1], 'label', (_this$comCurBaseColum = this.comCurBaseColumns[0]) === null || _this$comCurBaseColum === void 0 ? void 0 : _this$comCurBaseColum.label);
  4268. },
  4269. setMaxNum(val) {
  4270. if (val > 7) {
  4271. this.comCurBasePrice.locationNum = 7;
  4272. } else if (val < 1) {
  4273. this.comCurBasePrice.locationNum = 1;
  4274. }
  4275. },
  4276. ...Object(external_vuex_["mapMutations"])({
  4277. openDialog: 'openDialog',
  4278. setLoading: 'product/setLoading'
  4279. })
  4280. }
  4281. });
  4282. // CONCATENATED MODULE: ./components/product/Quote.vue?vue&type=script&lang=js
  4283. /* harmony default export */ var product_Quotevue_type_script_lang_js = (Quotevue_type_script_lang_js);
  4284. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4285. var componentNormalizer = __webpack_require__(2);
  4286. // CONCATENATED MODULE: ./components/product/Quote.vue
  4287. function injectStyles (context) {
  4288. var style0 = __webpack_require__(220)
  4289. if (style0.__inject__) style0.__inject__(context)
  4290. }
  4291. /* normalize component */
  4292. var component = Object(componentNormalizer["a" /* default */])(
  4293. product_Quotevue_type_script_lang_js,
  4294. render,
  4295. staticRenderFns,
  4296. false,
  4297. injectStyles,
  4298. "33f0dc7e",
  4299. "3f1d0f1e"
  4300. )
  4301. /* harmony default export */ var Quote = __webpack_exports__["default"] = (component.exports);
  4302. /* nuxt-component-imports */
  4303. installComponents(component, {TabNav: __webpack_require__(189).default,FormDialog: __webpack_require__(206).default,PriceToImg: __webpack_require__(207).default})
  4304. /***/ }),
  4305. /***/ 227:
  4306. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4307. "use strict";
  4308. // ESM COMPAT FLAG
  4309. __webpack_require__.r(__webpack_exports__);
  4310. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
  4311. var render = function render() {
  4312. var _vm = this,
  4313. _c = _vm._self._c;
  4314. return _c('table', [_vm._ssrNode("<tbody data-v-13093327><tr class=\"title\" data-v-13093327><th rowspan=\"2\" data-v-13093327>Model</th> <th rowspan=\"2\" data-v-13093327>Available stock</th> <th colspan=\"2\" data-v-13093327>Next shipment</th></tr> <tr data-v-13093327><th data-v-13093327>Date</th> <th data-v-13093327>QTY</th></tr> " + (_vm.comData.length ? _vm._ssrList(_vm.comData, function (items, key) {
  4315. return "<tr data-v-13093327><td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.sku_model || items.point)) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.available_stock)) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.next_times, 'DD-MM-YYYY', true))) + "</td> <td data-v-13093327>" + _vm._ssrEscape(_vm._s(items.arrival_stock)) + "</td></tr>";
  4316. }) : "<tr data-v-13093327><td rowspan=\"3\" colspan=\"4\" data-v-13093327>No Data</td></tr>") + "</tbody>")]);
  4317. };
  4318. var staticRenderFns = [];
  4319. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=template&id=13093327&scoped=true
  4320. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/StockTable.vue?vue&type=script&lang=js
  4321. /* harmony default export */ var StockTablevue_type_script_lang_js = ({
  4322. props: {
  4323. data: []
  4324. },
  4325. computed: {
  4326. comData() {
  4327. return this.data.filter(item => item.is_show);
  4328. }
  4329. }
  4330. });
  4331. // CONCATENATED MODULE: ./components/table/StockTable.vue?vue&type=script&lang=js
  4332. /* harmony default export */ var table_StockTablevue_type_script_lang_js = (StockTablevue_type_script_lang_js);
  4333. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4334. var componentNormalizer = __webpack_require__(2);
  4335. // CONCATENATED MODULE: ./components/table/StockTable.vue
  4336. function injectStyles (context) {
  4337. var style0 = __webpack_require__(221)
  4338. if (style0.__inject__) style0.__inject__(context)
  4339. }
  4340. /* normalize component */
  4341. var component = Object(componentNormalizer["a" /* default */])(
  4342. table_StockTablevue_type_script_lang_js,
  4343. render,
  4344. staticRenderFns,
  4345. false,
  4346. injectStyles,
  4347. "13093327",
  4348. "0b092fe7"
  4349. )
  4350. /* harmony default export */ var StockTable = __webpack_exports__["default"] = (component.exports);
  4351. /***/ }),
  4352. /***/ 228:
  4353. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4354. "use strict";
  4355. // ESM COMPAT FLAG
  4356. __webpack_require__.r(__webpack_exports__);
  4357. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
  4358. var render = function render() {
  4359. var _vm = this,
  4360. _c = _vm._self._c;
  4361. return _c('div', [_vm.data.length ? _vm._ssrNode("<table data-v-4c957f55>", "</table>", [_vm._ssrNode("<tbody data-v-4c957f55><tr class=\"title\" data-v-4c957f55><th width=\"25%\" data-v-4c957f55>Date</th> <th width=\"25%\" data-v-4c957f55>Change Type</th> <th width=\"50%\" data-v-4c957f55>Details</th></tr> " + _vm._ssrList(_vm.data, function (items, key) {
  4362. return "<tr data-v-4c957f55><td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(_vm.$utils.formatTime(items.update_time))) + "</td> <td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(items.type_name)) + "</td> <td data-v-4c957f55>" + _vm._ssrEscape(_vm._s(items.detail)) + "</td></tr>";
  4363. }) + "</tbody>")], 2) : _vm._ssrNode("<div data-v-4c957f55>", "</div>", [_c('el-empty', {
  4364. attrs: {
  4365. "description": "No Data"
  4366. }
  4367. })], 1)]);
  4368. };
  4369. var staticRenderFns = [];
  4370. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=template&id=4c957f55&scoped=true
  4371. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/table/ChangeTable.vue?vue&type=script&lang=js
  4372. /* harmony default export */ var ChangeTablevue_type_script_lang_js = ({
  4373. props: {
  4374. data: {
  4375. type: Array,
  4376. default: () => []
  4377. }
  4378. }
  4379. });
  4380. // CONCATENATED MODULE: ./components/table/ChangeTable.vue?vue&type=script&lang=js
  4381. /* harmony default export */ var table_ChangeTablevue_type_script_lang_js = (ChangeTablevue_type_script_lang_js);
  4382. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4383. var componentNormalizer = __webpack_require__(2);
  4384. // CONCATENATED MODULE: ./components/table/ChangeTable.vue
  4385. function injectStyles (context) {
  4386. var style0 = __webpack_require__(222)
  4387. if (style0.__inject__) style0.__inject__(context)
  4388. }
  4389. /* normalize component */
  4390. var component = Object(componentNormalizer["a" /* default */])(
  4391. table_ChangeTablevue_type_script_lang_js,
  4392. render,
  4393. staticRenderFns,
  4394. false,
  4395. injectStyles,
  4396. "4c957f55",
  4397. "5f45517f"
  4398. )
  4399. /* harmony default export */ var ChangeTable = __webpack_exports__["default"] = (component.exports);
  4400. /***/ }),
  4401. /***/ 239:
  4402. /***/ (function(module, exports, __webpack_require__) {
  4403. module.exports = __webpack_require__.p + "img/lineart.e4e693b.png";
  4404. /***/ }),
  4405. /***/ 240:
  4406. /***/ (function(module, exports, __webpack_require__) {
  4407. module.exports = __webpack_require__.p + "img/email.0ff3d63.png";
  4408. /***/ }),
  4409. /***/ 241:
  4410. /***/ (function(module, exports, __webpack_require__) {
  4411. module.exports = __webpack_require__.p + "img/product.718b8f1.png";
  4412. /***/ }),
  4413. /***/ 242:
  4414. /***/ (function(module, exports, __webpack_require__) {
  4415. module.exports = __webpack_require__.p + "img/cataloque.c0a544f.png";
  4416. /***/ }),
  4417. /***/ 243:
  4418. /***/ (function(module, exports, __webpack_require__) {
  4419. module.exports = __webpack_require__.p + "img/instruction.bbe58af.png";
  4420. /***/ }),
  4421. /***/ 244:
  4422. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4423. "use strict";
  4424. __webpack_require__.r(__webpack_exports__);
  4425. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
  4426. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  4427. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductRight_vue_vue_type_style_index_0_id_3bc79372_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  4428. /***/ }),
  4429. /***/ 295:
  4430. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4431. "use strict";
  4432. // ESM COMPAT FLAG
  4433. __webpack_require__.r(__webpack_exports__);
  4434. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=template&id=3bc79372&scoped=true
  4435. var render = function render() {
  4436. var _vm$pageData$main$ima, _vm$pageData$main, _vm$pageData$main2, _vm$productImgArr, _vm$pageData$goodsCom;
  4437. var _vm = this,
  4438. _c = _vm._self._c;
  4439. return _c('div', {
  4440. staticClass: "product-right"
  4441. }, [_vm._ssrNode("<div class=\"product-right-top\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div class=\"title\" data-v-3bc79372><span class=\"title-1\" data-v-3bc79372>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_name)) + "</span> <span class=\"title-2\" data-v-3bc79372>" + _vm._ssrEscape(_vm._s(_vm.pageData.product_code)) + "</span> " + _vm._ssrList(_vm.pageData.cycle, function (item) {
  4442. return "<img" + _vm._ssrAttr("src", item.images) + " class=\"title-3\" data-v-3bc79372>";
  4443. }) + " " + _vm._ssrList(_vm.pageData.icon, function (item) {
  4444. return "<img" + _vm._ssrAttr("src", item.url) + " class=\"title-4\" data-v-3bc79372>";
  4445. }) + "</div> "), (_vm$pageData$main$ima = _vm.pageData.main.image_color) !== null && _vm$pageData$main$ima !== void 0 && _vm$pageData$main$ima.length ? _vm._ssrNode("<ul class=\"color\" data-v-3bc79372>", "</ul>", _vm._l(_vm.pageData.main.image_color, function (item, i) {
  4446. var _item$color, _item$color2, _item$color3, _item$color4, _item$color5, _item$color6;
  4447. return _vm._ssrNode("<li data-v-3bc79372>", "</li>", [(_item$color = item.color) !== null && _item$color !== void 0 && _item$color.img ? _vm._ssrNode("<div class=\"color-item\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, _vm.currentPre == _vm.computedIndex(i) ? 'slip' : '') + " data-v-3bc79372>", "</div>", [_c('el-tooltip', {
  4448. attrs: {
  4449. "content": (_item$color2 = item.color) === null || _item$color2 === void 0 ? void 0 : _item$color2.name,
  4450. "placement": "top",
  4451. "effect": "dark"
  4452. }
  4453. }, [_c('img', {
  4454. attrs: {
  4455. "src": (_item$color3 = item.color) !== null && _item$color3 !== void 0 && _item$color3.img && !_vm.$mediaRegExp.test((_item$color4 = item.color) === null || _item$color4 === void 0 ? void 0 : _item$color4.img) ? _vm.$OSS_PREFIX + ((_item$color5 = item.color) === null || _item$color5 === void 0 ? void 0 : _item$color5.img) : (_item$color6 = item.color) === null || _item$color6 === void 0 ? void 0 : _item$color6.img
  4456. }
  4457. })])], 1)]) : _vm._e()]);
  4458. }), 0) : _vm._e(), _vm._ssrNode(" "), _c('tab-nav', {
  4459. attrs: {
  4460. "tabList": _vm.tabList,
  4461. "currTab": _vm.typeTab,
  4462. "marginTop": 15,
  4463. "fontSize": 16,
  4464. "liWidth": 130,
  4465. "liHeight": 40,
  4466. "marginRight": 5,
  4467. "marginBottom": 25
  4468. },
  4469. on: {
  4470. "update:currTab": function ($event) {
  4471. _vm.typeTab = $event;
  4472. },
  4473. "update:curr-tab": function ($event) {
  4474. _vm.typeTab = $event;
  4475. },
  4476. "handle": _vm.clickNav
  4477. }
  4478. })], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"product-right-bottom\" data-v-3bc79372>", "</div>", [_vm._ssrNode("<div class=\"details\"" + _vm._ssrStyle(null, null, {
  4479. display: _vm.typeTab == 0 ? '' : 'none'
  4480. }) + " data-v-3bc79372>", "</div>", [_vm._ssrNode((_vm.pageData.feature_data ? "<div class=\"details-1\" data-v-3bc79372><h3 data-v-3bc79372>Features</h3> <ul data-v-3bc79372>" + _vm._ssrList(_vm.pageData.feature_data, function (i, key) {
  4481. return "<li data-v-3bc79372>" + _vm._ssrEscape(_vm._s(i)) + "</li>";
  4482. }) + "</ul></div>" : "<!---->") + " " + (_vm.comInfo.description ? "<div class=\"details-1\" data-v-3bc79372><h3 data-v-3bc79372>Description</h3> <p data-v-3bc79372>" + _vm._s(_vm.comInfo.description) + "</p></div>" : "<!---->") + " " + (_vm.pageData.pbo ? "<div class=\"details-2\" data-v-3bc79372><h3 data-v-3bc79372>Product Branding Information</h3> <p data-v-3bc79372>" + _vm._s(_vm.pageData.pbo) + "</p></div>" : "<!---->") + " "), _vm._ssrNode("<div class=\"details-3\" data-v-3bc79372>", "</div>", [_vm.comInfo.product_size || _vm.comInfo.product_material || _vm.comInfo.moq || _vm.comInfo.included_packaging || _vm.comInfo.optional_packaging || _vm.comInfo.print_size_area || _vm.comInfo.product_dimensions || _vm.comInfo.additional_info ? _vm._ssrNode("<ul data-v-3bc79372>", "</ul>", [_vm._ssrNode("<li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Product Info</div></li> " + (_vm.comInfo.product_size ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Product Size</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.product_size) + "</div></li>" : "<!---->") + " " + ((_vm$pageData$main = _vm.pageData.main) !== null && _vm$pageData$main !== void 0 && _vm$pageData$main.colors_text ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Colour</div> <div class=\"info\" data-v-3bc79372>" + _vm._s((_vm$pageData$main2 = _vm.pageData.main) === null || _vm$pageData$main2 === void 0 ? void 0 : _vm$pageData$main2.colors_text) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.product_material ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Material</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.product_material) + "</div></li>" : "<!---->") + " " + (_vm.pageData.moq ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>MOQ</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.pageData.moq) + "</div></li>" : "<!---->") + " "), _vm.comInfo.included_packaging ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Included Packaging</div> "), _vm._l(_vm.comIncluded_packaging, function (item, i) {
  4483. return _vm._ssrNode("<div class=\"info blue\" data-v-3bc79372>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  4484. attrs: {
  4485. "to": {
  4486. name: 'product-code',
  4487. params: {
  4488. code: item.trim()
  4489. }
  4490. }
  4491. }
  4492. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comIncluded_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
  4493. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_packaging ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Optional Packaging</div> "), _vm._l(_vm.comOptional_packaging, function (item, i) {
  4494. return _vm._ssrNode("<div class=\"info blue\" data-v-3bc79372>", "</div>", [_vm.isProduct(item.trim()) ? _c('nuxt-link', {
  4495. attrs: {
  4496. "to": {
  4497. name: 'product-code',
  4498. params: {
  4499. code: item.trim()
  4500. }
  4501. }
  4502. }
  4503. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]) : _c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_packaging.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])], 1);
  4504. })], 2) : _vm._e(), _vm._ssrNode(" "), _vm.comInfo.optional_attachments ? _vm._ssrNode("<li data-v-3bc79372>", "</li>", [_vm._ssrNode("<div class=\"point\" data-v-3bc79372>Optional Attachments</div> "), _vm._ssrNode("<div class=\"info\" data-v-3bc79372>", "</div>", _vm._l(_vm.comOptional_attachments, function (item, i) {
  4505. return _c('nuxt-link', {
  4506. key: item,
  4507. attrs: {
  4508. "to": {
  4509. name: 'product-code',
  4510. params: {
  4511. code: item
  4512. }
  4513. }
  4514. }
  4515. }, [_c('span', [_vm._v(_vm._s(item)), i < _vm.comOptional_attachments.length - 1 ? _c('em', [_vm._v(",")]) : _vm._e()])]);
  4516. }), 1)], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.product_dimensions ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Product dimensions</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.product_dimensions) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_info ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Additional Info</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.additional_info) + "</div></li>" : "<!---->"))], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.comInfo.print_position || _vm.comInfo.print_size_area || _vm.comInfo.print_marketing ? "<ul data-v-3bc79372><li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Print Info</div></li> " + (_vm.comInfo.print_position ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Position</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.print_position) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_size_area ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Size Area</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.print_size_area) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.print_marketing ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Print Marketing</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.print_marketing) + "</div></li>" : "<!---->") + "</ul>" : "<!---->") + " " + (_vm.comInfo.data_services || _vm.comInfo.chip_grade || _vm.comInfo.certifications || _vm.comInfo.capacity || _vm.comInfo.warranty || _vm.comInfo.battery_type || _vm.comInfo.additional_description ? "<ul data-v-3bc79372><li data-v-3bc79372><div class=\"title\" data-v-3bc79372>Functional Info</div></li> " + (_vm.comInfo.data_services ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Data Services</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.data_services) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.chip_grade ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Chip Grade</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.chip_grade) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.certifications ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Certifications</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.certifications) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.capacity ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Capacity</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.capacity) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.warranty ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Warranty</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.warranty) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.battery_type ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Battery Type</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.battery_type) + "</div></li>" : "<!---->") + " " + (_vm.comInfo.additional_description ? "<li data-v-3bc79372><div class=\"point\" data-v-3bc79372>Additional Info</div> <div class=\"info\" data-v-3bc79372>" + _vm._s(_vm.comInfo.additional_description) + "</div></li>" : "<!---->") + "</ul>" : "<!---->"))], 2), _vm._ssrNode(" <p class=\"details-1\" data-v-3bc79372>\n Due to differences between production batches, product sizes may vary\n slightly. The above Colours and measurements are approximate, and for\n guidance only.\n </p>")], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"quote\"" + _vm._ssrStyle(null, null, {
  4517. display: _vm.typeTab == 1 ? '' : 'none'
  4518. }) + " data-v-3bc79372>", "</div>", [_c('quote', {
  4519. ref: "quote",
  4520. attrs: {
  4521. "pageData": _vm.pageData,
  4522. "id": _vm.id
  4523. }
  4524. })], 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"stock\"" + _vm._ssrStyle(null, null, {
  4525. display: false ? undefined : 'none'
  4526. }) + " data-v-3bc79372>", "</div>", [_vm.stockData.length > 0 ? _vm._ssrNode("<div data-v-3bc79372>", "</div>", [_c('stock-table', {
  4527. attrs: {
  4528. "data": _vm.stockData
  4529. }
  4530. }), _vm._ssrNode(" <p class=\"quote-tips\" data-v-3bc79372>For quantities over available stock levels, please contact us for pricing and timing</p>")], 2) : _vm._ssrNode("<div class=\"quote-tips\" data-v-3bc79372>\n This product is made offshore, and is available for any quantity equal to, or above the listed MOQ\n </div>")]), _vm._ssrNode(" <div" + _vm._ssrStyle(null, null, {
  4531. display: _vm.typeTab == 3 ? '' : 'none'
  4532. }) + " data-v-3bc79372><h5 data-v-3bc79372>Maketing Resource</h5> <div class=\"resources maketing\" data-v-3bc79372>" + (_vm.comInfo.line_artwork ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(239)) + " data-v-3bc79372>Lineart Download\n </p>" : "<!---->") + " " + (_vm.pageData.edm_url ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(240)) + " data-v-3bc79372>Email Digital Marketing\n </p>" : "<!---->") + " " + ((_vm$productImgArr = _vm.productImgArr) !== null && _vm$productImgArr !== void 0 && _vm$productImgArr.length ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(241)) + " data-v-3bc79372>Product Image\n </p>" : "<!---->") + " " + (_vm.pageData.cataloque_url ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(242)) + " data-v-3bc79372>Catalogue\n </p>" : "<!---->") + " " + (_vm.comInfo.product_instruction ? "<p data-v-3bc79372><img" + _vm._ssrAttr("src", __webpack_require__(243)) + " data-v-3bc79372>Product Instruction\n </p>" : "<!---->") + "</div> " + ((_vm$pageData$goodsCom = _vm.pageData.goodsCompliance) !== null && _vm$pageData$goodsCom !== void 0 && _vm$pageData$goodsCom.length ? "<h5 data-v-3bc79372>Compliance Resource</h5>" : "<!---->") + " <div class=\"resources compliance\" data-v-3bc79372>" + _vm._ssrList(_vm.pageData.goodsCompliance, function (item, i) {
  4533. var _item$filter;
  4534. return "<img" + _vm._ssrAttr("src", (_item$filter = item.filter) === null || _item$filter === void 0 ? void 0 : _item$filter.img) + " data-v-3bc79372>";
  4535. }) + "</div></div>")], 2), _vm._ssrNode(" "), _c('no-ssr', [_vm.showViewer ? _c('ElImageViewer', {
  4536. attrs: {
  4537. "on-close": _vm.closeViewer,
  4538. "url-list": _vm.productImgArr
  4539. }
  4540. }) : _vm._e()], 1)], 2);
  4541. };
  4542. var staticRenderFns = [];
  4543. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=template&id=3bc79372&scoped=true
  4544. // EXTERNAL MODULE: ./components/product/Quote.vue + 4 modules
  4545. var Quote = __webpack_require__(226);
  4546. // EXTERNAL MODULE: ./components/table/StockTable.vue + 4 modules
  4547. var StockTable = __webpack_require__(227);
  4548. // EXTERNAL MODULE: ./components/table/ChangeTable.vue + 4 modules
  4549. var ChangeTable = __webpack_require__(228);
  4550. // EXTERNAL MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue + 7 modules
  4551. var image_viewer = __webpack_require__(159);
  4552. // EXTERNAL MODULE: external "vuex"
  4553. var external_vuex_ = __webpack_require__(6);
  4554. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product/ProductRight.vue?vue&type=script&lang=js
  4555. /*eslint-disable*/
  4556. /* harmony default export */ var ProductRightvue_type_script_lang_js = ({
  4557. components: {
  4558. StockTable: StockTable["default"],
  4559. ChangeTable: ChangeTable["default"],
  4560. Quote: Quote["default"],
  4561. ElImageViewer: image_viewer["a" /* default */]
  4562. },
  4563. props: {
  4564. pageData: {},
  4565. id: Number
  4566. },
  4567. // head(){
  4568. // return {
  4569. // meta: [{ 'http-equiv': "Content-Security-Policy", content: "upgrade-insecure-requests" }]
  4570. // }
  4571. // },
  4572. data() {
  4573. return {
  4574. tabList: [{
  4575. name: 'Details',
  4576. isClick: false,
  4577. isShow: true
  4578. }, {
  4579. name: 'Quick Quote',
  4580. isClick: false,
  4581. isShow: false
  4582. }, {
  4583. name: 'Stock',
  4584. isClick: false,
  4585. isShow: false
  4586. }, {
  4587. name: 'Resources',
  4588. isClick: false,
  4589. isShow: true
  4590. }, {
  4591. name: 'Changes',
  4592. isClick: false,
  4593. isShow: false
  4594. }],
  4595. typeTab: 0,
  4596. stockData: [],
  4597. showViewer: false,
  4598. projectdDialogVisible: false,
  4599. projectObj: {
  4600. decoration_id: ''
  4601. },
  4602. // ticketFormVisible:false,
  4603. ticketForm: {
  4604. 英文品名: this.pageData.product_name,
  4605. SKU: this.pageData.product_code,
  4606. 问题类型: [],
  4607. 反馈详情: ''
  4608. },
  4609. ticketConfig: [{
  4610. prop: '英文品名',
  4611. type: 'text'
  4612. }, {
  4613. prop: 'SKU',
  4614. type: 'text'
  4615. }, {
  4616. prop: '问题类型',
  4617. type: 'checkbox',
  4618. selectlist: ['网页信息', '供应商质量', '样品管理', '产品部管理']
  4619. }, {
  4620. prop: '反馈详情',
  4621. type: 'textarea'
  4622. }],
  4623. rules: {
  4624. '问题类型': [{
  4625. required: true,
  4626. message: 'Please select',
  4627. trigger: 'change'
  4628. }],
  4629. '反馈详情': [{
  4630. required: true,
  4631. message: 'Please enter',
  4632. trigger: 'blur'
  4633. }]
  4634. }
  4635. };
  4636. },
  4637. computed: {
  4638. currentPre() {
  4639. return this.$store.state.product.smImgUlIdx;
  4640. },
  4641. isLogin() {
  4642. var _this$$store$state$us;
  4643. return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
  4644. },
  4645. comInfo() {
  4646. var _this$pageData;
  4647. return (_this$pageData = this.pageData) === null || _this$pageData === void 0 ? void 0 : _this$pageData.main;
  4648. },
  4649. productImgArr() {
  4650. return this.comInfo.mergeImages;
  4651. },
  4652. userInfo() {
  4653. return this.$store.state.userInfo;
  4654. },
  4655. comIncluded_packaging() {
  4656. return this.comInfo.included_packaging.split(',');
  4657. },
  4658. comOptional_packaging() {
  4659. return this.comInfo.optional_packaging.split(',');
  4660. },
  4661. comOptional_attachments() {
  4662. return this.comInfo.optional_attachments.split(',');
  4663. }
  4664. },
  4665. watch: {
  4666. //登陆立即显示Quick Quote和Changes选项
  4667. isLogin: {
  4668. handler(val) {
  4669. if (val) {
  4670. this.tabList[1].isShow = true;
  4671. // this.tabList[4].isShow = true
  4672. }
  4673. },
  4674. immediate: true
  4675. }
  4676. },
  4677. mounted() {},
  4678. methods: {
  4679. ...Object(external_vuex_["mapActions"])(['getUserInfo']),
  4680. ...Object(external_vuex_["mapMutations"])({
  4681. openDialog: 'openDialog',
  4682. setSmImgUlIdx: 'product/setSmImgUlIdx',
  4683. setLoading: 'product/setLoading'
  4684. }),
  4685. // 判断字符串是否符合商品code规律
  4686. isProduct(str) {
  4687. return /^[A-z]{1,4}\d{1,4}[A-z]?$/.test(str);
  4688. },
  4689. computedIndex(i) {
  4690. var _this$pageData$main;
  4691. return (_this$pageData$main = this.pageData.main) !== null && _this$pageData$main !== void 0 && _this$pageData$main.image ? 1 + i : i;
  4692. },
  4693. // 保存一下用户选择的周期、型号、打印服务、addon、packaging, product builder页面要用到
  4694. saveUserSelected() {
  4695. let result = {
  4696. addon: [],
  4697. packaging: [],
  4698. printService: {}
  4699. };
  4700. for (let key in this.allSelData) {
  4701. if (key === 'addon') {
  4702. result.addon = this.allSelData[key].map(item => item.id);
  4703. }
  4704. if (key === 'packaging') {
  4705. result.packaging = this.allSelData[key].map(item => item.id);
  4706. }
  4707. }
  4708. // 周期
  4709. if (this.priceList[this.currTab].cycle_id) {
  4710. result.cycle = this.priceList[this.currTab].cycle_id;
  4711. }
  4712. // 型号
  4713. if (this.priceList[this.currTab].undecoratedSelectId) {
  4714. result.model = this.priceList[this.currTab].undecoratedSelectId;
  4715. }
  4716. // 打印服务
  4717. const printService = this.priceList[this.currTab][2];
  4718. console.log(printService, 'printService');
  4719. if (Array.isArray(printService) && printService.length) {
  4720. printService.forEach(item => {
  4721. if (item.decorationSelectId) {
  4722. const temp = item.decorationList.filter(i => i.id === item.decorationSelectId);
  4723. result.printService[`${item.id}`] = {
  4724. id: item.decorationSelectId,
  4725. num: temp[0].num
  4726. };
  4727. }
  4728. });
  4729. }
  4730. localStorage.setItem(`product-user-select-${this.$route.params.code}`, JSON.stringify(result));
  4731. },
  4732. // getStock() {
  4733. // this.$axios.get('/api/quote/stock_new', { params: {id: this.id} }).then(res => {
  4734. // this.stockData = res.result
  4735. // })
  4736. // },
  4737. openProjectdDialog() {
  4738. if (!isLogin) {
  4739. this.openDialog();
  4740. return;
  4741. }
  4742. this.projectdDialogVisible = true;
  4743. this.projectObj.cycle_id = this.comCurrPriceList.cycle_id;
  4744. this.projectObj.price_unit_id = this.comCurrPriceList.undecoratedSelectId;
  4745. //获取Decoration Method
  4746. this.projectObj.decoration_methods = this.comDecoration.map(item => {
  4747. let temp = {};
  4748. temp.decoration_id = item.id;
  4749. temp.price_unit_id = item.parentId;
  4750. temp.colours_number = item.num;
  4751. return temp;
  4752. });
  4753. this.projectObj.addition_ids = this.allSelData.addon.map(item => {
  4754. return item.id;
  4755. }).join();
  4756. this.projectObj.packaging_addition_ids = this.allSelData.packaging.map(item => {
  4757. return item.id;
  4758. }).join();
  4759. },
  4760. download(url) {
  4761. var urlStr = url.match('[^/]+(?!.*/)')[0];
  4762. const repaceDomainUrl = this.$utils.repaceDomain(url);
  4763. if (url.endsWith(".pdf")) {
  4764. this.$utils.handleFileDownload(repaceDomainUrl, urlStr, false);
  4765. } else {
  4766. this.$utils.downloadBlob(url, urlStr);
  4767. }
  4768. },
  4769. onPreview() {
  4770. this.showViewer = true;
  4771. },
  4772. closeViewer() {
  4773. this.showViewer = false;
  4774. },
  4775. clickNav(i) {
  4776. if (this.typeTab == 1 && !this.tabList[1].isClick) {
  4777. this.checkNav(1);
  4778. } else if (this.typeTab == 2 && !this.tabList[2].isClick) {
  4779. this.checkNav(2);
  4780. }
  4781. },
  4782. checkNav(i) {
  4783. if (this.isLogin) {
  4784. this.getUserInfo();
  4785. if (this.userInfo.audit_status == 1) {
  4786. if (i == 1) {
  4787. this.$refs.quote.getQuote();
  4788. // this.$refs.quote.getWeight()
  4789. this.tabList[1].isClick = true;
  4790. } else if (i == 2) {
  4791. // uk 没有这个
  4792. // this.getStock()
  4793. // this.tabList[2].isClick = true
  4794. }
  4795. } else {
  4796. this.typeTab = 0;
  4797. this.$message({
  4798. message: 'Your account has not been audited',
  4799. type: 'warning'
  4800. });
  4801. }
  4802. } else {
  4803. this.openDialog();
  4804. this.typeTab = 0;
  4805. }
  4806. },
  4807. openLink(url) {
  4808. let a = url.indexOf('http') > -1 ? url : 'http://' + url;
  4809. window.open(a, '_blank');
  4810. }
  4811. // sendTicket() {
  4812. // this.$axios.post('/api/ticket/add', { product_code: this.pageData.product_code,ticket_type: this.ticketForm['问题类型'].join(),content: this.ticketForm['反馈详情'] }).then(res => {
  4813. // this.setLoading(false)
  4814. // this.$notify({
  4815. // title: "success",
  4816. // message: "提交成功",
  4817. // type: "success",
  4818. // duration: 3000,
  4819. // });
  4820. // }).catch(() => {
  4821. // this.setLoading(false)
  4822. // })
  4823. // }
  4824. }
  4825. });
  4826. // CONCATENATED MODULE: ./components/product/ProductRight.vue?vue&type=script&lang=js
  4827. /* harmony default export */ var product_ProductRightvue_type_script_lang_js = (ProductRightvue_type_script_lang_js);
  4828. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  4829. var componentNormalizer = __webpack_require__(2);
  4830. // CONCATENATED MODULE: ./components/product/ProductRight.vue
  4831. function injectStyles (context) {
  4832. var style0 = __webpack_require__(244)
  4833. if (style0.__inject__) style0.__inject__(context)
  4834. }
  4835. /* normalize component */
  4836. var component = Object(componentNormalizer["a" /* default */])(
  4837. product_ProductRightvue_type_script_lang_js,
  4838. render,
  4839. staticRenderFns,
  4840. false,
  4841. injectStyles,
  4842. "3bc79372",
  4843. "3d8ffb3b"
  4844. )
  4845. /* harmony default export */ var ProductRight = __webpack_exports__["default"] = (component.exports);
  4846. /* nuxt-component-imports */
  4847. installComponents(component, {TabNav: __webpack_require__(189).default})
  4848. /***/ })
  4849. };;
  4850. //# sourceMappingURL=product-right.js.map