8
0
tft-fe/dist/js/2505.38389faf.js

1 zeile
3.2 KiB
JavaScript

2023-06-30 14:01:06 +08:00
"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=[],r=n(5591),o=n(8859);function s(t){return(0,o.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,r.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(){s({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 s},Hp:function(){return m},JQ:function(){return o},SI:function(){return r},Vx:function(){return c},WQ:function(){return p},b6:function(){return d},iv:function(){return i},jL:function(){return u},m:function(){return l}});var a=n(8859);function i(){return(0,a.Z)({url:"/common/getList",method:"post"})}function r(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function s(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/getFpyData",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/common/getCapacityData",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const p="/api/common/attachment/uploadFileFormData"},6056:function(t,e,n){t.exports=n.p+"img/empty.c5f8511f.png"}}]);