tft-fe/dist/js/6389.09106c34.js
2023-02-22 13:59:09 +08:00

1 行
2.9 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6389],{6389:function(t,e,n){n.r(e),n.d(e,{default:function(){return d}});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("设备A")]),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)},r=[],s=n(5591),i=n(8859);function o(t){return(0,i.Z)({url:"/monitor/eqMonitor/get",method:"post",data:t})}var u={name:"DeviceStatus",data(){return{treeData:[],defaultProps:{children:"children",label:"name"},eqMessage:{},equipmentId:"",deviceImg:""}},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(1)}),500)},getMsg(){o({equipmentId:this.equipmentId}).then((t=>{console.log(t),this.eqMessage=t.data,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.getMsg())}}},c=u,l=n(1001),m=(0,l.Z)(c,a,r,!1,null,"28eb19db",null),d=m.exports},5591:function(t,e,n){n.d(e,{FH:function(){return o},Hp:function(){return u},JQ:function(){return i},SI:function(){return s},WQ:function(){return m},b6:function(){return c},iv:function(){return r},m:function(){return l}});var a=n(8859);function r(){return(0,a.Z)({url:"/common/getList",method:"post"})}function s(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function i(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 c(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 m="/api/common/attachment/uploadFileFormData"},6056:function(t,e,n){t.exports=n.p+"img/empty.c5f8511f.png"}}]);