徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10 lines
4.4 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/BaseCalendar"],{1843:function(t,e,n){"use strict";var a=n("b1fb"),i=n.n(a);i.a},"2bd1":function(t,e,n){"use strict";n.r(e);var a=n("782d"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"782d":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{calendarDays:[],SignData:[],nowYear:0,nowMonth:0,today:parseInt((new Date).getDate()),toMonth:parseInt((new Date).getMonth()+1),toYear:parseInt((new Date).getFullYear()),weeksTxt:{ch:["日","一","二","三","四","五","六"],en:["Sun","Mon","Tues","Wed","Thur","Fri","Sat"]}}},props:{isReplenishSign:{type:Boolean,default:!1},isFullCalendar:{type:Boolean,default:!1},yearMonth:{type:String,default:(new Date).getFullYear()+"-"+(new Date).getMonth()+1},dataSource:{type:Array,default:function(){return[]}},langType:{type:String,default:"ch"}},created:function(){/en|ch/g.test(this.langType)||(this.langType="ch");var t=this.yearMonth.split("-");this.buildCalendar(t[0],t[1]),this.onSignDataChange(this.dataSource)},watch:{dataSource:"onSignDataChange"},methods:{clickSign:function(e,n){var a="签到";if(0==n){if(!this.isReplenishSign)return;a="补签"}t.showToast({title:e+"号"+a+"成功",icon:"success",position:"bottom"}),this.$emit("clickChange",this.nowYear+"-"+this.nowMonth+"-"+e)},buildCalendar:function(t,e){this.nowYear=t,this.nowMonth=e,this.calculateEmptyGrids(t,e),this.calculateDays(t,e),this.isFullCalendar&&this.fullCell()},onSignDataChange:function(t){this.SignData=t,this.matchSign()},matchSign:function(){for(var t=this.SignData,e=this.calendarDays,n=0;n<t.length;n++)for(var a=new Date(this.toIOSDate(t[n])).getTime(),i=0;i<e.length;i++)a==new Date(this.toIOSDate(e[i].fullDate)).getTime()&&(e[i].isSign=!0);this.calendarDays=e},calculateEmptyGrids:function(t,e){this.calendarDays=[];var n=this.getFirstDayOfWeek(t,e);if(n>0)for(var a=0;a<n;a++)this.calendarDays.push({date:null,fullDate:null,isBeforeToday:!0,isSign:!1,isThisMonth:!1})},calculateDays:function(t,e){for(var n=this.getMonthDayLength(t,e),a=new Date(this.toYear+"/"+this.toMonth+"/"+this.today),i=1;i<=n;i++){var o=t+"-"+e+"-"+i,s=new Date(this.toIOSDate(o))<a;this.calendarDays.push({date:i,fullDate:o,isBeforeToday:s,isSign:!1,isThisMonth:!0})}},changeMonth:function(t){var e=parseInt(this.nowYear),n=parseInt(this.nowMonth),a=this.getOperateMonthDate(e,n,t);this.buildCalendar(a.year,a.month),this.$emit("dateChange",this.nowYear+"-"+this.nowMonth)},getMonthDayLength:function(t,e){return new Date(t,e,0).getDate()},getFirstDayOfWeek:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new Date(Date.UTC(t,e-1,n)).getDay()},toIOSDate:function(t){return t?t.replace(/-/g,"/"):t},fullCell:function(){for(var t=this.getMonthDayLength(this.nowYear,this.nowMonth),e=this.getFirstDayOfWeek(this.nowYear,this.nowMonth),n=6-this.getFirstDayOfWeek(this.nowYear,this.nowMonth,t),a=this.getOperateMonthDate(this.nowYear,this.nowMonth,-1),i=this.getMonthDayLength(a.year,a.month),o=0;o<e;o++){var s=i-e+o+1;this.calendarDays[o].date=s,this.calendarDays[o].fullDate=a.year+"-"+a.month+"-"+s}for(var r=this.getOperateMonthDate(this.nowYear,this.nowMonth,1),h=1;h<=n;h++)this.calendarDays.push({date:h,fullDate:r.year+"-"+r.month+"-"+h,isBeforeToday:!1,isSign:!1,isThisMonth:!1})},getOperateMonthDate:function(t,e,n){var a=parseInt(e)+parseInt(n),i=parseInt(t);return a>12?(a=1,i++):a<1&&(a=12,i--),{month:a,year:i}}}};e.default=n}).call(this,n("df3c")["default"])},b1fb:function(t,e,n){},be0e:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement;this._self._c},i=[]},e3ff:function(t,e,n){"use strict";n.r(e);var a=n("be0e"),i=n("2bd1");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("1843");var s=n("828b"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"5455e9c5",null,!1,a["a"],void 0);e["default"]=r.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/BaseCalendar-create-component',
{
'components/BaseCalendar-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("e3ff"))
})
},
[['components/BaseCalendar-create-component']]
]);