1 line
3.0 KiB
JavaScript
1 line
3.0 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2505],{2505:function(t,e,n){n.r(e),n.d(e,{default:function(){return l}});var a=function(){var t=this,e=t._self._c;return e("el-row",{staticClass:"main-box",attrs:{gutter:10}},[e("el-col",{attrs:{span:4}},[e("div",{staticClass:"left-box"},[e("el-tree",{ref:"deviceStatusTree",attrs:{data:t.treeData,"node-key":"id",props:t.defaultProps,"default-expand-all":"","highlight-current":""},on:{"node-click":t.clickDevice}})],1)]),e("el-col",{attrs:{span:20}},[e("div",{staticClass:"right-box"},[e("span",{staticClass:"title"},[t._v(t._s(t.equipmentName))]),e("ul",{staticClass:"eq-msg"},[e("li",[t._v("设备模式:"+t._s(t.eqMessage.mode))]),e("li",[t._v("设备状态:"+t._s(t.eqMessage.state))]),e("li",[t._v("设备报警:"+t._s(t.eqMessage.alarmNum))]),e("li",[t._v("剩余维护时间:"+t._s(t.eqMessage.remainMainTime)+"秒")])]),e("div",{staticClass:"img-box"},[t.eqMessage.imgId?e("img",{attrs:{src:t.deviceImg,alt:"设备图片"}}):e("img",{attrs:{src:n(6056),alt:"设备图片"}})])])])],1)},i=[],s=n(5591),r=n(8859);function o(t){return(0,r.Z)({url:"/monitor/eqMonitor/get",method:"post",data:t})}var u={name:"DeviceStatus",data(){return{treeData:[],defaultProps:{children:"children",label:"name"},eqMessage:{},equipmentId:"",deviceImg:"",equipmentName:""}},mounted(){this.getTree()},methods:{getTree(){(0,s.SI)().then((t=>{this.treeData=t.data,this.equipmentId=this.getId(t.data),this.setCurrent(),this.getMsg()}))},getId(t){return t[0].children?this.getId(t[0].children):t[0].id},setCurrent(){let t=this;setTimeout((function(){t.$refs.deviceStatusTree.setCurrentKey(t.equipmentId)}),500)},getMsg(){o({equipmentId:this.equipmentId}).then((t=>{console.log(t),this.eqMessage=t.data,this.equipmentName=t.data.equipmentName,this.deviceImg="http://tft.mes.picaiba.com/api/common/attachment/downloadFile?type=0&attachmentId="+t.data.imgId}))},clickDevice(t){console.log(t),t.children||(this.equipmentId=t.id,this.equipmentName=t.name,this.getMsg())}}},m=u,c=n(1001),d=(0,c.Z)(m,a,i,!1,null,"483dec8e",null),l=d.exports},5591:function(t,e,n){n.d(e,{FH:function(){return o},Hp:function(){return u},JQ:function(){return r},SI:function(){return s},WQ:function(){return d},b6:function(){return m},iv:function(){return i},m:function(){return c}});var a=n(8859);function i(){return(0,a.Z)({url:"/common/getList",method:"post"})}function s(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function r(t){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function u(t){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const d="/api/common/attachment/uploadFileFormData"},6056:function(t,e,n){t.exports=n.p+"img/empty.c5f8511f.png"}}]);
|