(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["fan"],{4197:function(t,e,n){"use strict";var a=n("a4a6"),r=n.n(a);r.a},a4a6:function(t,e,n){},f76d:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dashboard_box",staticStyle:{width:"1180px",margin:"auto"}},[n("table",{staticClass:"table"},[t._m(0),n("tbody",{attrs:{id:"tableContent"}},t._l(t.fanList,(function(e){return n("tr",[n("td",[t._v(t._s(e.name))]),n("td",[t._v(t._s(e.speed))]),n("td",[n("select",{directives:[{name:"model",rawName:"v-model",value:e.mode,expression:"item.mode"}],staticClass:"form-control",on:{change:function(n){var a=Array.prototype.filter.call(n.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(e,"mode",n.target.multiple?a:a[0])}}},[n("option",{attrs:{value:"0"}},[t._v("自动")]),n("option",{attrs:{value:"1"}},[t._v("手动")])])]),n("td",[n("InputNumber",{attrs:{max:100,min:0,step:5,"controls-outside":""},model:{value:e.level,callback:function(n){t.$set(e,"level",n)},expression:"item.level"}})],1),n("td",[n("Button",{attrs:{type:"primary"},on:{click:function(n){return t.set(e)}}},[t._v("设置")])],1)])})),0)])])},r=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("thead",[n("tr",[n("th",[t._v("名称")]),n("th",[t._v("速度(RPM)")]),n("th",{staticStyle:{width:"200px"}},[t._v("模式")]),n("th",{staticStyle:{width:"200px"}},[t._v("转速设置（%）")]),n("th",{staticStyle:{width:"120px"}},[t._v("操作")])])])}],s=n("1da1"),o=(n("96cf"),n("365c")),i={name:"fan",data:function(){return{fanList:[]}},created:function(){this.getAllFanInfo()},methods:{set:function(t){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.mode){n.next=3;break}return e.$Message.error("自动模式下不能操作，请改为手动模式！"),n.abrupt("return");case 3:return n.next=5,o["a"].Get("/action/setFanInfo",t);case 5:a=n.sent,console.log(a),200==a.code&&e.$Message.success("设置成功！"),e.getAllFanInfo();case 9:case"end":return n.stop()}}),n)})))()},getAllFanInfo:function(){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].Get("/action/getAllFanInfo",{});case 2:n=e.sent,200==n.code&&(t.fanList=n.data);case 4:case"end":return e.stop()}}),e)})))()}}},c=i,u=(n("4197"),n("2877")),l=Object(u["a"])(c,a,r,!1,null,"1e12b299",null);e["default"]=l.exports}}]);