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.

2 lines
49 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(function(e){function t(t){for(var r,n,o=t[0],l=t[1],c=t[2],d=0,p=[];d<o.length;d++)n=o[d],Object.prototype.hasOwnProperty.call(i,n)&&i[n]&&p.push(i[n][0]),i[n]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);u&&u(t);while(p.length)p.shift()();return s.push.apply(s,c||[]),a()}function a(){for(var e,t=0;t<s.length;t++){for(var a=s[t],r=!0,o=1;o<a.length;o++){var l=a[o];0!==i[l]&&(r=!1)}r&&(s.splice(t--,1),e=n(n.s=a[0]))}return e}var r={},i={app:0},s=[];function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var u=l;s.push([0,"chunk-vendors"]),a()})({0:function(e,t,a){e.exports=a("56d7")},"0c86":function(e,t,a){},"0e8b":function(e,t,a){"use strict";a("c5e3")},"16f3":function(e,t,a){"use strict";a("0c86")},"2e08":function(e,t,a){"use strict";a("7ff5")},"356c":function(e,t,a){e.exports=a.p+"img/温度.e6628959.svg"},"43f2":function(e,t,a){e.exports=a.p+"img/logo.07d430c1.jpeg"},"4f8d":function(e,t,a){"use strict";a("5827")},"56d7":function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var r=a("2b0e"),i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},s=[],n=a("2877"),o={},l=Object(n["a"])(o,i,s,!1,null,null,null),c=l.exports,u=a("8c4f"),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-container",{staticClass:"home-container",attrs:{id:"topAnchor",direction:"vertical"}},[a("div",{staticStyle:{height:"45px",width:"100%","background-color":"#f7f8fa"}},[a("div",{staticStyle:{position:"absolute",top:"10px",left:"12%","line-height":"2.5em"}},[e._v("预约热线 000-000-000")]),a("div",{staticStyle:{position:"absolute",top:"10px",right:"5%"}},[a("router-link",{attrs:{to:"login"}},[a("el-button",{staticStyle:{width:"100px"}},[e._v("登陆")])],1)],1)]),a("el-header",{staticStyle:{height:"100px",width:"100% display: flex","justify-content":"space-between","background-color":"#fff"}},[a("div",{staticStyle:{position:"relative"}},[a("h3",{staticClass:"top_title1"},[e._v("控温者 - 数据中心节能平台")])])]),a("div",{staticClass:"carousel"},[[a("el-carousel",{attrs:{interval:4e3,type:"card",height:"450px"}},e._l(e.list,(function(e,t){return a("el-carousel-item",{key:t},[a("img",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.src,alt:""}})])})),1)]],2),a("el-footer",{staticStyle:{color:"#ddd",height:"350px","background-color":"rgb(37, 37, 37)","margin-top":"55px"}},[a("div",{staticClass:"mod_copyright"},[a("div",{staticClass:"copyright"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("h4",[e._v("@版权所有")]),a("div",{staticClass:"footer_text"},[e._v("内蒙古工业大学")]),a("div",{staticClass:"footer_text"},[e._v("内蒙古工业大学人工智能研究小组")])]),a("el-col",{attrs:{span:8}},[a("div",[a("h3",[e._v("联系方式")]),a("div",{staticClass:"footer_text"},[e._v("联系QQ: xxxxxxx")]),a("div",{staticClass:"footer_text"},[e._v("联系邮箱: xxxxx@.com")]),a("div",{staticClass:"footer_text"},[e._v("手机号码:157xxxxxxxx")])])])],1)],1),a("div",{staticStyle:{color:"#7e7e7e","font-size":"12px","text-align":"center"}},[a("p",[e._v("地址:内蒙古工业大学金川校区 邮编xxxxx 电话xxx-xxx-xxxx 传真xxx-xxxxxxxx 蒙公网安备 15082202000131号"),a("br"),e._v("Copyright © 2018.Company name All rights reserved.")])])])]),[a("el-backtop",[a("div",{staticStyle:{"{\n height":"100%",width:"100%","border-radius":"50px","background-color":"#f2f5f6","box-shadow":"0 0 6px rgba(0,0,0, .12)","text-align":"center","line-height":"40px",color:"#1989fa"}},[a("i",{staticClass:"el-icon-caret-top"})])])]],2)},p=[],m={name:"Home",data:function(){return{list:[{src:"https://img2.baidu.com/it/u=903467524,2920385702&fm=26&fmt=auto"},{src:"https://img2.baidu.com/it/u=1514194555,1408855411&fm=26&fmt=auto"},{src:"https://img1.baidu.com/it/u=4264221152,3602489092&fm=26&fmt=auto"},{src:"https://img2.baidu.com/it/u=2673658967,4041565795&fm=26&fmt=auto"},{src:"https://img1.baidu.com/it/u=135466862,2358213243&fm=26&fmt=auto"}],activeIndex:"1"}}},f=m,g=(a("0e8b"),Object(n["a"])(f,d,p,!1,null,"8d338472",null)),h=g.exports,b=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"main-container"},[r("el-card",[r("div",{staticClass:"imgbox"},[r("img",{attrs:{src:a("43f2")}})]),r("el-form",{ref:"loginFormRef",staticClass:"login-form",attrs:{"label-width":"0px",model:e.loginForm,rules:e.loginFormRules}},[r("el-form-item",{attrs:{label:"",prop:"username"}},[r("el-input",{attrs:{"prefix-icon":"iconfont icon-user"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),r("el-form-item",{attrs:{label:"",prop:"password"}},[r("el-input",{attrs:{"prefix-icon":"iconfont icon-3702mima",type:"password"},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}})],1),r("el-form-item",{staticClass:"btns",attrs:{label:""}},[r("el-button",{attrs:{type:"primary"},on:{click:e.login}},[e._v("登陆")]),r("el-button",{attrs:{type:"info"},on:{click:e.resetLoginForm}},[e._v("重置")])],1)],1)],1)],1)},v=[],x=a("1da1"),y=(a("96cf"),a("b0c0"),{name:"Login",data:function(){return{loginForm:{username:"admin",password:"123456"},loginFormRules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:10,message:"长度在3-10个字符之间",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:15,message:"长度在6-15个字符之间",trigger:"blur"}]}}},methods:{resetLoginForm:function(){this.$refs.loginFormRef.resetFields()},login:function(){var e=this;this.$refs.loginFormRef.validate(function(){var t=Object(x["a"])(regeneratorRuntime.mark((function t(a){var r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.$http.post("/login",e.loginForm);case 4:if(r=t.sent,i=r.data,console.log(i),200===i.code){t.next=11;break}return t.abrupt("return",e.$message.error("登陆失败!"));case 11:e.$message.success("登陆成功!"),window.sessionStorage.setItem("token",i.state),window.sessionStorage.setItem("loginTime",i.loginTime),window.sessionStorage.setItem("username",i.name),e.$router.push("/main");case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}}),w=y,_=(a("2e08"),Object(n["a"])(w,b,v,!1,null,"38d5ad8a",null)),C=_.exports,k=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,stripe:""}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"姓名"}}),a("el-table-column",{attrs:{align:"center",prop:"mobile",label:"电话"}}),a("el-table-column",{attrs:{align:"center",prop:"email",label:"电子邮箱"}})],1)},$=[],F={data:function(){return{tableData:[{name:"徐科",mobile:"13789489016",email:"1037148022@qq.com"},{name:"张旭",mobile:"16604731667",email:"1311233155@qq.com"},{name:"崔浩",mobile:"15164880142",email:"1837453473@qq.com"},{name:"郭佳怡",mobile:"13224803150",email:"gjy459gy@163.com"},{name:"王文宇",mobile:"15540189913",email:"1037148022@qq.com"}]}}},S=F,I=(a("f78f"),Object(n["a"])(S,k,$,!1,null,"fe4efdb8",null)),L=I.exports,D=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"container"},[r("el-dialog",{attrs:{title:"调节风扇转速",visible:e.fansDialogVisible,width:"40%"},on:{"update:visible":function(t){e.fansDialogVisible=t}}},[r("h1",[e._v("档位调节")]),r("el-row",[r("el-button",{staticStyle:{width:"80px"},attrs:{type:"info",plain:""},on:{click:function(t){return e.changeFanSpeedByNum(0)}}},[e._v("0档")]),r("el-button",{staticStyle:{width:"80px"},attrs:{plain:""},on:{click:function(t){return e.changeFanSpeedByNum(1)}}},[e._v("1档")]),r("el-button",{staticStyle:{width:"80px"},attrs:{type:"primary",plain:""},on:{click:function(t){return e.changeFanSpeedByNum(2)}}},[e._v("2档")]),r("el-button",{staticStyle:{width:"80px"},attrs:{type:"success",plain:""},on:{click:function(t){return e.changeFanSpeedByNum(3)}}},[e._v("3档")]),r("el-button",{staticStyle:{width:"80px"},attrs:{type:"warning",plain:""},on:{click:function(t){return e.changeFanSpeedByNum(4)}}},[e._v("4档")]),r("el-button",{staticStyle:{width:"80px"},attrs:{type:"danger",plain:""},on:{click:function(t){return e.changeFanSpeedByNum(5)}}},[e._v("5档")])],1),r("h1",[e._v("指定转速")]),r("el-row",[r("el-input",{staticStyle:{width:"80%"},attrs:{placeholder:"请输入0-255之间的风扇转速 "},model:{value:e.chosedSpeed,callback:function(t){e.chosedSpeed=t},expression:"chosedSpeed"}}),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.changeFanSpeedByChosedSpeed()}}},[e._v("提交")])],1)],1),r("div",{staticClass:"topcards"},[r("div",{staticClass:"topcard"},[r("div",{staticClass:"topcard-title"},[e._v(" 服务器数量 ")]),r("div",{staticClass:"topcard-content"},[e._m(0),r("div",{staticClass:"card-icon-font"},[e._v(e._s(e.ipList.length))])])]),r("div",{staticClass:"topcard"},[r("div",{staticClass:"topcard-title"},[e._v(" 服务器温度 ")]),r("div",{staticClass:"topcard-content"},[e._m(1),r("div",{staticClass:"card-icon-font"},[e._v(e._s(e.cardList.temp))])])]),r("div",{staticClass:"topcard"},[r("div",{staticClass:"topcard-title"},[e._v(" 风扇转速 ")]),r("div",{staticClass:"topcard-content"},[e._m(2),r("div",{staticClass:"card-icon-font"},[e._v(e._s(e.cardList.speed))])])]),r("div",{staticClass:"topcard"},[r("div",{staticClass:"topcard-title"},[e._v(" 运行时长 ")]),r("div",{staticClass:"topcard-content"},[e._m(3),r("div",{staticClass:"card-icon-font"},[e._v(e._s(e.cardList.min)+"h")])])])]),r("div",{staticClass:"charts-container"},[e._l(e.ipList,(function(t,i){return r("div",{key:i,staticClass:"chart"},[r("div",{staticClass:"topcard-title"},[r("div",{staticClass:"header-1"},[r("img",{attrs:{src:a("d121"),width:"40px"}}),e._v(" 服务器"+e._s(t.ip))]),r("div",{staticClass:"buttons"},[r("el-button",{staticClass:"detail",attrs:{type:"success",size:"small",icon:"el-icon-data-line"},on:{click:function(a){return e.showDetail(t.ip)}}},[e._v("显示详细信息")]),r("el-button",{staticClass:"auto",attrs:{size:"small",type:"warning",icon:"el-icon-magic-stick"},on:{click:function(a){return e.autoChange(t.ip,i)}}},[e._v(e._s(e.ipList[i].status||"更改模式"))]),r("el-button",{staticClass:"put-button",attrs:{size:"small",type:"primary"},on:{click:function(a){return e.changeFanSpeed(t.ip,i)}}},[e._v("改变风扇转速")])],1)]),r("div",{staticClass:"chart-item"},[r("TempCharts",{attrs:{ip:t.ip}})],1)])})),r("div",{staticClass:"chart",staticStyle:{display:"none"}},[r("div",{staticClass:"topcard-title"},[e._m(4),r("div",{staticClass:"buttons"},[r("el-button",{staticClass:"detail",attrs:{type:"success",size:"small",icon:"el-icon-data-line"},on:{click:function(t){return e.$message.success("此服务器仅供展示,无法显示!")}}},[e._v("显示详细信息")]),r("el-button",{staticClass:"auto",attrs:{size:"small",type:"warning",icon:"el-icon-magic-stick"},on:{click:function(t){return e.$message.success("此服务器仅供展示,无法显示!")}}},[e._v(" 更改模式")]),r("el-button",{staticClass:"put-button",attrs:{size:"small",type:"primary"},on:{click:function(t){return e.$message.success("此服务器仅供展示,无法更改!")}}},[e._v("改变风扇转速")])],1)]),r("div",{staticClass:"chart-item"},[r("TempCharts2")],1)])],2),r("el-dialog",{staticClass:"dialog1",attrs:{title:"服务器"+e.dialog.ip,visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("div",{staticClass:"dialog-container",attrs:{slot:"footer"},slot:"footer"},[r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card1"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-1"}})])],1),r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card2"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-2"}})])],1),r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card3"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-3"}})])],1),r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card4"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-4"}})])],1),r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card5"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-5"}})])],1),r("div",{staticClass:"dialog-chart"},[r("el-card",{staticClass:"dialog-card",attrs:{slot:"footer",id:"card6"},slot:"footer"},[r("div",{staticClass:"card-",attrs:{id:"card-6"}})])],1)])])],1)},R=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"card-icon"},[r("img",{staticClass:"card-icon-img",attrs:{src:a("e60b")}})])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"card-icon"},[r("img",{staticClass:"card-icon-img",attrs:{src:a("356c")}})])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"card-icon"},[r("img",{staticClass:"card-icon-img",attrs:{src:a("e05f")}})])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"card-icon"},[r("img",{staticClass:"card-icon-img",attrs:{src:a("f286")}})])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"header-1"},[r("img",{attrs:{src:a("d121"),width:"40px"}}),e._v(" 服务器1")])}],O=(a("d3b7"),a("159b"),a("e9c4"),a("99af"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%",height:"300px",background:"white"},attrs:{id:e.ip}})}),M=[],j=a("313e"),q={name:"TempCharts",props:["ip"],data:function(){return{tempList:[["2000-06-05",116],["2000-06-06",129],["2000-06-07",135],["2000-06-08",86],["2000-06-09",73],["2000-06-10",85],["2000-06-11",73],["2000-06-12",68],["2000-06-13",92],["2000-06-14",130],["2000-06-15",245],["2000-06-16",139],["2000-06-17",115],["2000-06-18",111],["2000-06-19",309],["2000-06-20",206],["2000-06-21",137],["2000-06-22",128],["2000-06-23",85],["2000-06-24",94],["2000-06-25",71],["2000-06-26",106],["2000-06-27",84],["2000-06-28",93],["2000-06-29",85],["2000-06-30",73],["2000-07-01",83],["2000-07-02",125],["2000-07-03",107],["2000-07-04",82],["2000-07-05",44],["2000-07-06",72],["2000-07-07",106],["2000-07-08",107],["2000-07-09",66],["2000-07-10",91],["2000-07-11",92],["2000-07-12",113],["2000-07-13",107],["2000-07-14",131],["2000-07-15",111],["2000-07-16",64],["2000-07-17",69],["2000-07-18",88],["2000-07-19",77],["2000-07-20",83],["2000-07-21",111],["2000-07-22",57],["2000-07-23",55],["2000-07-24",60]],create_time:[],temp:[],myChart:{},option:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:20,max:120},title:{left:"center",text:"温度监测 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}}}},methods:{initCharts:function(){this.myChart=j["init"](document.getElementById(this.ip)),this.option.xAxis.data=this.create_time,this.option.series.data=this.temp,this.myChart.setOption(this.option)},getTempList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("userFan","userIp=".concat(e.ip));case 2:for(i in a=t.sent,r=a.data,e.tempList=r,e.create_time=[],e.temp=[],e.tempList)e.create_time.push(e.tempList[i].create_time),e.temp.push(e.tempList[i].temp);e.option.xAxis.data=e.create_time,e.option.series.data=e.temp,e.myChart.setOption(e.option);case 11:case"end":return t.stop()}}),t)})))()},changeTemp:function(){}},mounted:function(){this.initCharts()},created:function(){this.getTempList(),setInterval(this.getTempList,2e3)}},P=q,V=Object(n["a"])(P,O,M,!1,null,"1d577c56",null),A=V.exports,E=a("1157"),z=a.n(E),B=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%",height:"300px",background:"white"},attrs:{id:"charts2"}})},U=[],T=(a("d81d"),{name:"TempCharts2",data:function(){return{x:0}},methods:{initCharts:function(){var e=this.x,t=j["init"](document.getElementById("charts2")),a=[["12:06:05",40],["12:06:06",43],["12:06:07",45],["12:06:08",47],["12:06:09",50],["12:06:10",54],["12:06:11",60],["12:06:12",66],["12:06:13",70],["12:06:14",66],["12:06:15",65],["12:06:16",64],["12:06:17",60],["12:06:18",58],["12:06:19",57],["12:06:20",55],["12:06:21",54],["12:06:22",50],["12:06:23",49],["12:06:24",48],["12:06:25",47],["12:06:26",44],["12:06:27",50],["12:06:28",56],["12:06:29",60],["12:06:30",68],["12:07:01",70],["12:07:02",66],["12:07:03",65],["12:07:04",63],["12:07:05",60],["12:07:06",58],["12:07:07",56],["12:07:08",54],["12:07:09",53],["12:07:10",50],["12:07:11",47],["12:07:12",46],["12:07:13",48],["12:07:14",50],["12:07:15",54],["12:07:16",60],["12:07:17",66],["12:07:18",64],["12:07:19",60],["12:07:20",58],["12:07:21",57],["12:07:22",55],["12:07:23",53],["12:07:24",50]],r=a.map((function(e){return e[0]})),i=a.map((function(e){return e[1]})),s={visualMap:{show:!1,type:"continuous",seriesIndex:0,min:30,max:120},title:{left:"center",text:"温度监测"},tooltip:{trigger:"axis"},xAxis:{data:r},yAxis:{},series:{type:"line",showSymbol:!1,data:i}};t.setOption(s),setInterval((function(){e=parseInt(11*Math.random()-5,10),a.shift(),a.push(["12:07:24",40+e]),r=a.map((function(e){return e[0]})),i=a.map((function(e){return e[1]})),s={visualMap:{show:!1,type:"continuous",seriesIndex:0,min:30,max:120},title:{left:"center",text:"温度监测"},tooltip:{trigger:"axis"},xAxis:{data:r},yAxis:{},series:{type:"line",showSymbol:!1,data:i}},t.setOption(s)}),2e3)}},mounted:function(){this.initCharts()}}),N=T,G=Object(n["a"])(N,B,U,!1,null,"07a780e4",null),J=G.exports,Z={name:"MyMenu",data:function(){return{chosedSpeed:"",fansDialogVisible:!1,activeIP:"",frameId:"",dialog:{ip:[],percent:[],temp:[],power:[],date:[],fanspeed:[],Mfree:[],MPercent:[],Mtotal:[],Mused:[]},cardList:{total:0,temp:0,speed:0,min:0},tempList:[],dialogVisible:!1,fanspeed:[],autoColor:[],fanspeedshow:"1800",ipList:[],fanspeed1:"",checkSpeed:{type:"number",min:0,max:266,message:"大小要在0到255",trigger:"blur"},optionFanSpeed:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:0,max:1800},title:{left:"center",text:"风扇转速监测 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}},optionPercent:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:0,max:100},title:{left:"center",text:"CPU占用率监测 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}},optionPower:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:20,max:50},title:{left:"center",text:"CPU功率监测 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}},optionMfree:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:0,max:100},title:{left:"center",text:"内存可用"},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}},optionMPercent:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:20,max:120},title:{left:"center",text:"内存占用百分比 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}},optionMused:{visualMap:{show:!1,type:"continuous",seriesIndex:0,min:20,max:120},title:{left:"center",text:"内存已使用量 "},tooltip:{trigger:"axis"},xAxis:{data:[]},yAxis:{},series:{type:"line",showSymbol:!1,data:[]}}}},methods:{changeFanSpeed:function(e,t){var a=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log(e),a.fansDialogVisible=!0,a.activeIP=e;case 3:case"end":return t.stop()}}),t)})))()},getCard:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("card");case 2:a=t.sent,r=a.data,e.cardList=r;case 5:case"end":return t.stop()}}),t)})))()},getIpList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("/frame/exitIps/".concat(e.frameId));case 2:a=t.sent,r=a.data,r.data.forEach((function(t){e.ipList.push({ip:t.ip})}));case 5:case"end":return t.stop()}}),t)})))()},autoChange:function(e,t){var a=this,r=this;this.$prompt("此操作可能不适配于你的机型,可能导致不可逆的硬件损伤,你可以联系我们适配或者继续使用,继续使用请输入‘我已知悉’","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(i){var s=i.value;"我已知悉"!==s?a.$message({type:"error",message:"请输入我已知悉!"}):z.a.ajax({type:"post",url:"http://110.40.152.26:9016/AI",data:{userIp:e},success:function(e){e=JSON.stringify(e),'"0"'===e?(r.$message.success("更改成功,当前模式:手动模式"),r.ipList[t].status="手动模式",r.$forceUpdate()):'"1"'===e&&(r.$message.success("更改成功,当前模式:智能模式"),r.ipList[t].status="智能模式",r.$forceUpdate())},error:function(e){r.$message.error("更改失败,接口错误")}})})).catch((function(){a.$message({type:"info",message:"取消操作"})})),this.$forceUpdate()},showDetail:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.dialogVisible=!0,t.dialog.ip=e,t.initCharts(),setInterval(t.postChart,2e3);case 4:case"end":return a.stop()}}),a)})))()},postChart:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("realCpuAndMem","ip=".concat(e.dialog.ip));case 2:for(i in a=t.sent,r=a.data,e.tempList=r,e.dialog.date=[],e.dialog.fanspeed=[],e.dialog.percent=[],e.dialog.power=[],e.dialog.Mfree=[],e.dialog.MPercent=[],e.dialog.Mtotal=[],e.dialog.Mused=[],e.tempList.cpu)e.dialog.date.push(e.tempList.cpu[i].create_time),e.dialog.fanspeed.push(e.tempList.cpu[i].fanSpeed),e.dialog.percent.push(e.tempList.cpu[i].percent),e.dialog.power.push(e.tempList.cpu[i].power),e.dialog.Mfree.push(e.tempList.mem[i].free),e.dialog.MPercent.push(e.tempList.mem[i].percent),e.dialog.Mtotal.push(e.tempList.mem[i].total),e.dialog.Mused.push(e.tempList.mem[i].used);e.optionPercent.xAxis.data=e.dialog.date,e.optionPower.xAxis.data=e.dialog.date,e.optionFanSpeed.xAxis.data=e.dialog.date,e.optionPercent.series.data=e.dialog.percent,e.optionPower.series.data=e.dialog.power,e.optionFanSpeed.series.data=e.dialog.fanspeed,e.optionMfree.xAxis.data=e.dialog.date,e.optionMPercent.xAxis.data=e.dialog.date,e.optionMused.xAxis.data=e.dialog.date,e.optionMfree.series.data=e.dialog.Mfree,e.optionMPercent.series.data=e.dialog.MPercent,e.optionMused.series.data=e.dialog.Mused,e.myChartFanSpeed.setOption(e.optionFanSpeed),e.myChartPercent.setOption(e.optionPercent),e.myChartPower.setOption(e.optionPower),e.myChartMfree.setOption(e.optionMfree),e.myChartMPercent.setOption(e.optionMPercent),e.myChartMused.setOption(e.optionMused);case 32:case"end":return t.stop()}}),t)})))()},initCharts:function(){this.myChartFanSpeed=j["init"](document.getElementById("card-1")),this.myChartPercent=j["init"](document.getElementById("card-2")),this.myChartPower=j["init"](document.getElementById("card-3")),this.myChartMfree=j["init"](document.getElementById("card-4")),this.myChartMPercent=j["init"](document.getElementById("card-5")),this.myChartMused=j["init"](document.getElementById("card-6")),this.postChart()},changeFanSpeedByNum:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return console.log({userIp:t.activeIP,speed:e}),a.next=3,t.$http.post("changeSpeed",{userIp:t.activeIP,speed:e});case 3:r=a.sent,i=r.data,console.log(i),200===i.code?t.$message.success("更改成功"):t.$message.error("更改失败");case 7:case"end":return a.stop()}}),a)})))()},changeFanSpeedByChosedSpeed:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log("speed?userIp=".concat(e.activeIP,"&speed=").concat(e.chosedSpeed)),!(e.chosedSpeed<0||e.chosedSpeed>255)&&e.chosedSpeed){t.next=5;break}e.$message.error("更改失败转速要在0-255之内"),t.next=11;break;case 5:return t.next=7,e.$http.post("speed?userIp=".concat(e.activeIP,"&speed=").concat(e.chosedSpeed));case 7:a=t.sent,r=a.data,console.log(r),""===r?e.$message.success("更改成功"):e.$message.error("更改失败");case 11:case"end":return t.stop()}}),t)})))()}},mounted:function(){},created:function(){this.frameId=window.sessionStorage.getItem("activePath"),this.getCard(),setInterval(this.getCard,2e3),this.getIpList()},components:{TempCharts2:J,TempCharts:A}},Q=Z,H=(a("c6f5"),Object(n["a"])(Q,D,R,!1,null,"1ef1a973",null)),K=H.exports,W=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-input",{attrs:{placeholder:"请输入内容",clearable:""},on:{clear:e.getUserList},model:{value:e.queryInfo.query,callback:function(t){e.$set(e.queryInfo,"query",t)},expression:"queryInfo.query"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.getUserList},slot:"append"})],1)],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addDialogVisible=!0}}},[e._v("添加用户")])],1)],1),a("el-table",{attrs:{data:e.userlist,border:"",stripe:""}},[a("el-table-column",{attrs:{type:"index",label:"#"}}),a("el-table-column",{attrs:{label:"姓名",prop:"username"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}}),a("el-table-column",{attrs:{label:"电话",prop:"phone"}}),a("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{on:{change:function(a){return e.userStateChanged(t.row)}},model:{value:t.row.state,callback:function(a){e.$set(t.row,"state",a)},expression:"scope.row.state"}})]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"mini"},on:{click:function(a){return e.showEditDialog(t.row.id)}}}),a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:function(a){return e.removeUserById(t.row.id)}}})]}}])})],1),a("el-pagination",{attrs:{"current-page":e.queryInfo.pagenum,"page-sizes":[6,12,18,24],"page-size":e.queryInfo.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:"添加用户",visible:e.addDialogVisible,width:"50%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.addDialogClosed}},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"用户名",prop:"username"}},[a("el-input",{model:{value:e.addForm.username,callback:function(t){e.$set(e.addForm,"username",t)},expression:"addForm.username"}})],1),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{model:{value:e.addForm.password,callback:function(t){e.$set(e.addForm,"password",t)},expression:"addForm.password"}})],1),a("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[a("el-input",{model:{value:e.addForm.email,callback:function(t){e.$set(e.addForm,"email",t)},expression:"addForm.email"}})],1),a("el-form-item",{attrs:{label:"手机",prop:"phone"}},[a("el-input",{model:{value:e.addForm.phone,callback:function(t){e.$set(e.addForm,"phone",t)},expression:"addForm.phone"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.addUser}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"修改用户",visible:e.editDialogVisible,width:"50%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.editDialogClosed}},[a("span",[e._v("这是一段信息")]),a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.editFormRules,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{attrs:{disabled:""},model:{value:e.editForm.username,callback:function(t){e.$set(e.editForm,"username",t)},expression:"editForm.username"}})],1),a("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[a("el-input",{model:{value:e.editForm.email,callback:function(t){e.$set(e.editForm,"email",t)},expression:"editForm.email"}})],1),a("el-form-item",{attrs:{label:"手机",prop:"phone"}},[a("el-input",{model:{value:e.editForm.phone,callback:function(t){e.$set(e.editForm,"phone",t)},expression:"editForm.phone"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.editUserInfo}},[e._v("确 定")])],1)],1)],1)},X=[],Y=(a("ac1f"),a("00b4"),a("d9e2"),{data:function(){var e=function(e,t,a){var r=/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;if(r.test(t))return a();a(new Error("请输入合法的邮箱"))},t=function(e,t,a){var r=/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;if(r.test(t))return a();a(new Error("请输入合法的手机号"))};return{queryInfo:{query:"",pagenum:1,pagesize:6},userlist:[],total:0,tableData:[{username:"郭佳怡",email:"2561314021@qq.com",phone:"13224803150",state:!0}],addDialogVisible:!1,addForm:{username:"",password:"",email:"",phone:""},addFormRules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:10,message:"用户名的长度在3~10个字符之间",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:15,message:"密码的长度在6~15个字符之间",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"},{validator:e,trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"},{validator:t,trigger:"blur"}]},editDialogVisible:!1,editForm:{},editFormRules:{email:[{required:!0,message:"请输入用户邮箱",trigger:"blur"},{validator:e,trigger:"blur"}],phone:[{required:!0,message:"请输入用户手机",trigger:"blur"},{validator:t,trigger:"blur"}]}}},created:function(){this.getUserList()},methods:{getUserList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("user/query",{pageNum:e.queryInfo.pagenum,pageSize:e.queryInfo.pagesize,query:e.queryInfo.query});case 2:if(a=t.sent,r=a.data,console.log(r),200===r.code){t.next=7;break}return t.abrupt("return",e.$message.error("获取用户列表失败!"));case 7:e.userlist=r.data.userList,e.total=r.data.total;case 9:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){console.log(e),this.queryInfo.pagesize=e,this.getUserList()},handleCurrentChange:function(e){console.log(e),this.queryInfo.pagenum=e,this.getUserList()},userStateChanged:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$http.post("user/update",{id:e.id,username:e.username,password:e.password,state:e.state,email:e.email,phone:e.phone});case 2:if(r=a.sent,i=r.data,200===i.code){a.next=7;break}return e.state=!e.state,a.abrupt("return",t.$message.error("更新用户状态失败!"));case 7:t.$message.success("更新用户状态成功!");case 8:case"end":return a.stop()}}),a)})))()},addDialogClosed:function(){this.$refs.addFormRef.resetFields()},addUser:function(){var e=this;this.$refs.addFormRef.validate(function(){var t=Object(x["a"])(regeneratorRuntime.mark((function t(a){var r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.$http.post("user/add",e.addForm);case 4:r=t.sent,i=r.data,200!==i.code&&e.$message.error("添加用户失败!"),e.$message.success("添加用户成功!"),e.addDialogVisible=!1,e.getUserList();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},showEditDialog:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$http.post("user/get/"+e);case 2:if(r=a.sent,i=r.data,200===i.code){a.next=6;break}return a.abrupt("return",t.$message.error("查询用户信息失败!"));case 6:t.editForm=i.data,t.editDialogVisible=!0;case 8:case"end":return a.stop()}}),a)})))()},editDialogClosed:function(){this.$refs.editFormRef.resetFields()},editUserInfo:function(){var e=this;this.$refs.editFormRef.validate(function(){var t=Object(x["a"])(regeneratorRuntime.mark((function t(a){var r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(a),a){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.$http.post("user/update",{id:e.editForm.id,username:e.editForm.username,password:e.editForm.password,state:e.editForm.state,email:e.editForm.email,phone:e.editForm.phone});case 5:if(r=t.sent,i=r.data,console.log(i),200===i.code){t.next=10;break}return t.abrupt("return",e.$message.error("更新用户信息失败!"));case 10:e.editDialogVisible=!1,e.getUserList(),e.$message.success("更新用户信息成功!");case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},removeUserById:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$confirm("此操作将永久删除该用户, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).catch((function(e){return e}));case 2:if(r=a.sent,"confirm"===r){a.next=5;break}return a.abrupt("return",t.$message.info("已取消删除"));case 5:return a.next=7,t.$http.post("user/del/"+e);case 7:if(i=a.sent,s=i.data,200===s.code){a.next=11;break}return a.abrupt("return",t.$message.error("删除用户失败!"));case 11:t.$message.success("删除用户成功!"),t.getUserList();case 13:case"end":return a.stop()}}),a)})))()}}}),ee=Y,te=(a("4f8d"),Object(n["a"])(ee,W,X,!1,null,null,null)),ae=te.exports,re=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/home"}}},[e._v("首页")]),a("el-breadcrumb-item",[e._v("机组管理")])],1),a("el-card",{staticClass:"box-card"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-input",{attrs:{placeholder:"请输入内容",clearable:""},on:{clear:e.getGroupList},model:{value:e.queryInfo.query,callback:function(t){e.$set(e.queryInfo,"query",t)},expression:"queryInfo.query"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.getGroupList},slot:"append"})],1)],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.AddDialogVisible=!0}}},[e._v("添加")])],1)],1),a("el-table",{attrs:{data:e.GroupList,border:"",stripe:""}},[a("el-table-column",{attrs:{label:"#",type:"index"}}),a("el-table-column",{attrs:{label:"机架ID",prop:"frame_id"}}),a("el-table-column",{attrs:{label:"机架名称",prop:"frame_name"}}),a("el-table-column",{attrs:{label:"所在位置",prop:"frame_local"}}),a("el-table-column",{attrs:{label:"平均温度",prop:"temp"}}),a("el-table-column",{attrs:{label:"操作",width:"380px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"mini"},on:{click:function(a){return e.showEidtDialog(t.row.frame_id)}}},[e._v("修改")]),a("el-button",{attrs:{type:"warning",icon:"el-icon-setting",size:"mini"},on:{click:function(a){return e.showDistributionDialog(t.row.frame_id)}}},[e._v("未分配")]),a("el-button",{staticStyle:{"background-color":"#c471ed"},attrs:{type:"warning",icon:"el-icon-setting",size:"mini"},on:{click:function(a){return e.setipDialog(t.row.frame_id)}}},[e._v("已分配")]),a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:function(a){return e.removeCompanyById(t.row.frame_id)}}},[e._v("删除")])]}}])})],1)],1),a("el-dialog",{attrs:{title:"添加机组",visible:e.AddDialogVisible,width:"50%"},on:{"update:visible":function(t){e.AddDialogVisible=t},close:e.addDialogClosed}},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"机组名称",prop:"frame_name"}},[a("el-input",{model:{value:e.addForm.frame_name,callback:function(t){e.$set(e.addForm,"frame_name",t)},expression:"addForm.frame_name"}})],1),a("el-form-item",{attrs:{label:"所在位置",prop:"frame_local"}},[a("el-input",{staticStyle:{width:"35%"},model:{value:e.addForm.frame_local,callback:function(t){e.$set(e.addForm,"frame_local",t)},expression:"addForm.frame_local"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.AddDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.addframe}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"修改信息",visible:e.editDialogVisible,width:"50%"},on:{"update:visible":function(t){e.editDialogVisible=t},click:e.editDialogClosed}},[a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"机组ID",prop:"frame_id"}},[a("el-input",{attrs:{disabled:""},model:{value:e.editForm.frame_id,callback:function(t){e.$set(e.editForm,"frame_id",t)},expression:"editForm.frame_id"}})],1),a("el-form-item",{attrs:{label:"机组名称",prop:"frame_name"}},[a("el-input",{model:{value:e.editForm.frame_name,callback:function(t){e.$set(e.editForm,"frame_name",t)},expression:"editForm.frame_name"}})],1),a("el-form-item",{attrs:{label:"机组位置",prop:"frame_local"}},[a("el-input",{model:{value:e.editForm.frame_local,callback:function(t){e.$set(e.editForm,"frame_local",t)},expression:"editForm.frame_local"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.editframe}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"未分配主机",visible:e.DistributionDialogVisible,width:"50%"},on:{"update:visible":function(t){e.DistributionDialogVisible=t}}},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.emptyIpsList,"tooltip-effect":"dark",stripe:"",border:""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{staticStyle:{width:"100%"},attrs:{prop:"ip",label:"主机"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.DistributionDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.addIP}},[e._v("确认分配")])],1)],1),a("el-dialog",{attrs:{title:"已分配主机(点击取消分配)",visible:e.setipDialogVisible,width:"50%"},on:{"update:visible":function(t){e.setipDialogVisible=t}}},[a("el-table",{ref:"multipleTable1",staticStyle:{width:"100%"},attrs:{data:e.existList,"tooltip-effect":"dark",stripe:"",border:""},on:{select:e.handleSelection}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{staticStyle:{width:"100%"},attrs:{prop:"ip",label:"主机"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.setipDialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.Unassign}},[e._v("取消分配")])],1)],1)],1)},ie=[],se=(a("caad"),a("2532"),a("a630"),a("3ca3"),{data:function(){return{queryInfo:{query:""},AddDialogVisible:!1,editDialogVisible:!1,DistributionDialogVisible:!1,setipDialogVisible:!1,editForm:{frame_id:"",frame_name:"",frame_local:""},addForm:{frame_name:"",frame_local:""},roleId:"",frameId:"",existList:[],emptyIpsList:[],GroupList:[],rightlist:[],selectList:[],UnassignList:[]}},methods:{getGroupList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("frame/list");case 2:a=t.sent,r=a.data,e.GroupList=r.data,console.log(r);case 6:case"end":return t.stop()}}),t)})))()},addDialogClosed:function(){this.$refs.addFormRef.resetFields()},addframe:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("frame/add",e.addForm);case 2:a=t.sent,r=a.data,200===r.code?e.$message.success("添加成功!"):e.$message.error("添加失败!"),e.getGroupList(),e.AddDialogVisible=!1;case 7:case"end":return t.stop()}}),t)})))()},showDistributionDialog:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$http.get("frame/emptyIps");case 2:r=a.sent,i=r.data,t.emptyIpsList=i.data,t.frameId=e,t.DistributionDialogVisible=!0,console.log(i.data);case 8:case"end":return a.stop()}}),a)})))()},setipDialog:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$http.post("frame/exitIps/".concat(e));case 2:r=a.sent,i=r.data,t.existList=i.data,t.$nextTick((function(){t.existList.forEach((function(e){t.$refs.multipleTable1.toggleRowSelection(e,!0)}))})),t.setipDialogVisible=!0,console.log(i.data);case 8:case"end":return a.stop()}}),a)})))()},showEidtDialog:function(e){this.editDialogVisible=!0,this.editForm.frame_id=e},editframe:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("frame/update",{frame_id:e.editForm.frame_id,frame_name:e.editForm.frame_name,frame_local:e.editForm.frame_local});case 2:a=t.sent,r=a.data,200===r.code?e.$message.success("修改成功"):e.$message.error("修改失败"),e.getGroupList(),e.editDialogVisible=!1;case 7:case"end":return t.stop()}}),t)})))()},editDialogClosed:function(){this.$refs.editFormRef.resetFields()},removeCompanyById:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function a(){var r,i,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$confirm("此操作将永久删除该用户, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).catch((function(e){return e}));case 2:if(r=a.sent,"confirm"===r){a.next=5;break}return a.abrupt("return",t.$message.info("已取消删除"));case 5:return a.next=7,t.$http.post("frame/del/".concat(e));case 7:i=a.sent,s=i.data,200===s.code?t.$message.success("删除成功!"):t.$message.error("删除失败!"),t.getGroupList();case 11:case"end":return a.stop()}}),a)})))()},addIP:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("frame/addIp",{userIpList:e.selectList,frameId:e.frameId});case 2:a=t.sent,r=a.data,200===r.code?e.$message.success("分配成功!"):e.$message.error("分配失败!"),e.DistributionDialogVisible=!1;case 6:case"end":return t.stop()}}),t)})))()},Unassign:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("frame/remove",{userIpList:e.UnassignList});case 2:a=t.sent,r=a.data,200===r.code?e.$message.success("取消成功!"):e.$message.error("取消失败!");case 5:case"end":return t.stop()}}),t)})))()},handleSelectionChange:function(e){for(var t in this.multipleSelection=e,this.selectList=[],e)this.selectList.push(e[t].ip)},handleSelection:function(e,t){if(!e.includes(t)){var a=Array.from(arguments);this.UnassignList.push(a[1].ip),console.log(this.UnassignList)}}},created:function(){this.getGroupList()}}),ne=se,oe=Object(n["a"])(ne,re,ie,!1,null,"8ded42da",null),le=oe.exports,ce=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-container",{staticClass:"home-container"},[a("el-header",[a("div",[e._v(" 温控中心")])]),a("el-container",{staticClass:"home-container"},[a("el-aside",{staticStyle:{background:"#40407a"},attrs:{width:e.isCollapse?"64px":"200px"}},[a("div",{staticClass:"toggle-button",on:{click:e.toggleCollapse}},[e._v("|||")]),a("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{"background-color":"#40407a","text-color":"#aaa69d","active-text-color":"#fff","default-active":e.activePath,"unique-opened":!0,collapse:e.isCollapse,"collapse-transition":!1,router:""}},[a("el-submenu",{attrs:{index:"1"}},[a("template",{slot:"title"},[a("i",{staticClass:"el-icon-location"}),a("span",[e._v("服务器管理")])]),e._l(e.frameList,(function(t){return a("el-menu-item",{key:t.frame_id,attrs:{index:"mainmenu"},on:{click:function(a){e.saveNavState(t.frame_id.toString())}}},[a("i",{staticClass:"el-icon-menu"}),a("span",[e._v(e._s(t.frame_name))])])}))],2),a("el-menu-item",{attrs:{index:"groups"},on:{click:function(t){return e.saveNavState("groups")}}},[a("i",{staticClass:"el-icon-video-camera-solid"}),a("span",[e._v("机组管理")])]),a("el-menu-item",{attrs:{index:"users"},on:{click:function(t){return e.saveNavState("users")}}},[a("i",{staticClass:"el-icon-video-camera-solid"}),a("span",[e._v("用户管理")])]),a("el-menu-item",{attrs:{index:"list"},on:{click:function(t){return e.saveNavState("list")}}},[a("i",{staticClass:"el-icon-video-camera-solid"}),a("span",[e._v("联系我们")])])],1)],1),a("el-main",[a("router-view",{key:e.activePath})],1)],1)],1)},ue=[],de={data:function(){return{isCollapse:!1,activePath:"default",username:"",loginTime:"",frameList:""}},methods:{logout:function(){window.sessionStorage.clear(),this.$router.push("/login")},toggleCollapse:function(){this.isCollapse=!this.isCollapse},saveNavState:function(e){window.sessionStorage.setItem("activePath",e),this.activePath=e},getFrameList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("/frame/list");case 2:a=t.sent,r=a.data,e.frameList=r.data,console.log(r.data);case 6:case"end":return t.stop()}}),t)})))()}},created:function(){this.getFrameList()}},pe=de,me=(a("16f3"),Object(n["a"])(pe,ce,ue,!1,null,"05470a74",null)),fe=me.exports;r["default"].use(u["a"]);var ge=[{path:"/",redirect:"/home"},{path:"/home",component:h},{path:"/login",component:C},{path:"/Main",component:fe,children:[{path:"/list",component:L},{path:"/mainmenu",component:K},{path:"/users",component:ae},{path:"/groups",component:le},{path:"/",redirect:"/groups"}]}],he=new u["a"]({routes:ge}),be=he,ve=a("5c96"),xe=a.n(ve),ye=(a("aede"),a("0fae"),a("bc3a")),we=a.n(ye);we.a.defaults.baseURL="http://110.40.152.26:9016",r["default"].use(xe.a),r["default"].prototype.$http=we.a,new r["default"]({router:be,el:"#app",render:function(e){return e(c)}}).$mount("#app"),r["default"].config.productionTip=!1,r["default"].prototype.$echarts=j},5827:function(e,t,a){},"690c":function(e,t,a){},"7ff5":function(e,t,a){},aede:function(e,t,a){},b3672:function(e,t,a){},c5e3:function(e,t,a){},c6f5:function(e,t,a){"use strict";a("b3672")},d121:function(e,t,a){e.exports=a.p+"img/online.d9251695.svg"},e05f:function(e,t,a){e.exports=a.p+"img/风扇.81d5bdf1.svg"},e60b:function(e,t,a){e.exports=a.p+"img/服务器.95de3a3a.svg"},f286:function(e,t,a){e.exports=a.p+"img/时钟.c19610c0.svg"},f78f:function(e,t,a){"use strict";a("690c")}});
//# sourceMappingURL=app.8a80ad6a.js.map