crm_second_opening_mini/pages/index/newSche/selectTimeRange/selectTimeRange.js

1 line
3.1 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/newSche/selectTimeRange/selectTimeRange"],{"18fe":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{date:["日","一","二","三","四","五","六"],todayIndex:0,dateArr:[],todayData:0,year:0,month:0,day:0,isToday:0,isTodayWeek:!1,start:0,end:0,dataquan:!0,time:""}},onLoad:function(){},created:function(){this.getDataInfo()},mounted:function(){},methods:{getDataInfo:function(){var t=new Date,e=t.getFullYear(),a=(t.getMonth()+1+"").padStart(2,0),n=(t.getDate()+"").padStart(2,0);this.dateInit(),this.year=e,this.month=a,this.day=t.getDate(),this.isToday=e+"/"+a+"/"+n,this.todayData=e+"/"+a+"/"+n,this.time="".concat(e,"年").concat(a,"月")},everyDay:function(t,e){!0===this.dataquan&&(0!=this.start&&0!=this.end&&(this.start=0,this.end=0),0==this.start&&0==this.end?this.start=e:e<this.start?(this.end=this.start,this.start=e):e>this.start&&(this.end=e)),this.isToday=t},dateInit:function(t,e){var a,n=[],i=t?new Date(t,e):new Date,s=t||i.getFullYear(),r=0,o=e||i.getMonth(),h=o+1>11?1:o+1,d=new Date(s+"/"+(o+1)+"/1").getDay(),c=new Date(s,h,0).getDate(),u={},f=0;o+1>11&&(r=s+1,c=new Date(r,h,0).getDate()),a=d+c;for(var l=0;l<a;l++)l>=d?(f=l-d+1,u={isToday:s+"/"+(o+1+"").padStart(2,0)+"/"+(f+"").padStart(2,0),nowdate:s+"/"+(o+1+"").padStart(2,0)+"/"+(f+"").padStart(2,0),dateNum:f}):u={},n[l]=u;this.dateArr=n;var m=new Date,y=m.getFullYear(),p=m.getMonth()+1,v=m.getDay(),g=t||y,D=e>=0?e+1:p;y==g&&p==D?(this.isTodayWeek=!0,this.todayIndex=v):(this.isTodayWeek=!1,this.todayIndex=-1)},prev:function(){this.year=parseInt(this.month)-1==0?this.year-1:this.year,this.month=parseInt(this.month)-1==0?12:parseInt(this.month)-1;var t=this.year,e=this.month-1;this.time="".concat(t,"年").concat((this.month+"").padStart(2,0),"月"),this.dateInit(t,e)},next:function(){this.year=parseInt(this.month)+1>12?this.year+1:this.year,this.month=parseInt(this.month)+1>12?1:parseInt(this.month)+1;var t=this.year,e=this.month-1;this.time="".concat(t,"年").concat((this.month+"").padStart(2,0),"月"),this.dateInit(t,e)}}};e.default=n},"2b80":function(t,e,a){"use strict";a.r(e);var n=a("18fe"),i=a.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},"2c08":function(t,e,a){"use strict";(function(t,e){var n=a("4ea4");a("8886");n(a("66fd"));var i=n(a("f009"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},"677e":function(t,e,a){},de2a:function(t,e,a){"use strict";var n=a("677e"),i=a.n(n);i.a},e623:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},i=[]},f009:function(t,e,a){"use strict";a.r(e);var n=a("e623"),i=a("2b80");for(var s in i)["default"].indexOf(s)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(s);a("de2a");var r=a("f0c5"),o=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"4c6e39ee",null,!1,n["a"],void 0);e["default"]=o.exports}},[["2c08","common/runtime","common/vendor"]]]);