(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-286bedf8"],{"1cf4":function(t,e,a){"use strict";a("d9b7")},"365c":function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return s})),a.d(e,"c",(function(){return r})),a.d(e,"i",(function(){return u})),a.d(e,"h",(function(){return d})),a.d(e,"g",(function(){return o})),a.d(e,"f",(function(){return c})),a.d(e,"a",(function(){return h})),a.d(e,"b",(function(){return m}));var i=a("b775");function n(t){return Object(i["a"])({method:"get",url:"/index/data",params:t})}function s(t){return Object(i["a"])({method:"get",url:"/index/get_crown_data",params:t})}function r(t){return Object(i["a"])({method:"get",url:"/index/get_age_data",params:t})}function u(t){return Object(i["a"])({method:"get",url:"/index/get_province_data",params:t})}function d(t){return Object(i["a"])({method:"get",url:"/index/other_data",params:t})}function o(t){return Object(i["a"])({method:"get",url:"/index/getOtherDataCrowns",params:t})}function c(t){return Object(i["a"])({method:"get",url:"/index/getOtherDataAge",params:t})}function h(t){return Object(i["a"])({url:"/setting/GetUpgradeInfo",method:"get",params:t})}function m(t){return Object(i["a"])({url:"/setting/UpdateUpgradeInfo",method:"get",params:t})}},d5a9:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxNow"},[a("div",{staticClass:"boxNow_item"},[a("div",{staticClass:"label"},[t._v("设为升级状态:")]),t._v(" "),a("el-switch",{attrs:{"active-value":"1","inactive-value":"0","active-text":"是","inactive-text":"否"},on:{change:t.setSwitch},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showDate,expression:"showDate"}],staticClass:"boxNow_item"},[a("div",{staticClass:"label"},[t._v("升级时间区间:")]),t._v(" "),a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm",format:"yyyy-MM-dd HH:mm"},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1),t._v(" "),a("div",{staticClass:"boxNow_item",staticStyle:{margin:"20px 0 0 30px"}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.setTime}},[t._v("确认修改")])],1)])},n=[],s=a("365c"),r={data:function(){return{value:"0",date:[],showDate:!1,start_time:"",end_time:"",data:{}}},created:function(){this.getTime()},methods:{setSwitch:function(){"0"===this.value?(this.showDate=!1,this.date=[]):this.showDate=!0},getTime:function(){var t=this;Object(s["a"])().then((function(e){var a=e.data;t.value=a.status,"0"===t.value?(t.showDate=!1,t.date=[]):(t.showDate=!0,t.start_time=t.format(1e3*a.start_time),t.end_time=t.format(1e3*a.end_time),t.date=[t.start_time,t.end_time])}))},setTime:function(){var t=this;null===this.date||0===this.date.length&&"1"===this.value?this.$message.error("请设置系统升级的时间区间"):("0"===this.value?this.data={status:this.value,start_time:"",end_time:""}:this.data={status:this.value,start_time:new Date(this.date[0]).getTime()/1e3,end_time:new Date(this.date[1]).getTime()/1e3},Object(s["b"])(this.data).then((function(e){200===e.code?(t.getTime(),t.$message.success("设置成功")):t.$message.error("设置失败")})))},add:function(t){return t<10?"0"+t:t},format:function(t){var e=new Date(t);return this.y=e.getFullYear(),this.m=e.getMonth()+1,this.d=e.getDate(),this.h=e.getHours(),this.mm=e.getMinutes(),this.y+"-"+this.add(this.m)+"-"+this.add(this.d)+" "+this.add(this.h)+":"+this.add(this.mm)}}},u=r,d=(a("1cf4"),a("2877")),o=Object(d["a"])(u,i,n,!1,null,"57bf6491",null);e["default"]=o.exports},d9b7:function(t,e,a){}}]);