tft-fe/dist/js/4750.10fe98ea.js

1 line
8.1 KiB
JavaScript
Raw Normal View History

2023-02-23 16:56:28 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4750],{4750:function(t,e,r){r.r(e),r.d(e,{default:function(){return Q}});var i=function(){var t=this,e=t._self._c;return e("div",{ref:"container",staticClass:"processMonitoring",attrs:{id:"container"}},[e("div",{staticClass:"top-box"},[e("div",{staticClass:"top-search1"},[e("el-radio-group",{on:{change:t.changeType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("el-radio-button",{attrs:{label:"实时数据"}},[t._v("实时数据")]),e("el-radio-button",{attrs:{label:"历史数据"}},[t._v("历史数据")])],1)],1),e("div",{staticClass:"top-search2"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick,"cascader-change":t.cascaderSelect}})],1)]),e("div",{staticClass:"bottom-box"},[e("div",{staticClass:"title-box"},[e("span",{staticClass:"title"},[t._v(t._s(t.type))])]),"实时数据"===t.type?e("div",[e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH,"row-class-name":t.tableRowClassName}}),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:t.getRealList}})],1):e("div",[e("process-monitoring-chart",{attrs:{beilv:t.beilv}})],1)])])},a=[],s=function(){var t=this,e=t._self._c;return e("div",{style:{height:700*t.beilv+"px",width:"100%"},attrs:{id:"processMonitoring"}})},o=[],n=r(7171),l=r(5468),u={mixins:[l.Z],name:"ProcessMonitoringChart",props:{chartMsg:{type:Object,default:()=>({chart:""})},beilv:{type:Number,default:1}},watch:{chartMsg:function(){this.initChart()}},beforeDestroy(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{initChart(){null!==this.chart&&""!==this.chart&&void 0!==this.chart&&this.chart.dispose();var t=document.getElementById("processMonitoring");this.chart=n.S1(t);var e={color:["#5B8FF9"],tooltip:{trigger:"axis",textStyle:{color:"#fff"},backgroundColor:"rgba(150, 150, 150, 1)",borderColor:"rgba(150, 150, 150, 1)"},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:{type:"value"},series:[{data:[150,230,224,218,135,147,260],type:"line"}]};this.chart.setOption(e,!0)}}},m=u,c=r(1001),h=(0,c.Z)(m,s,o,!1,null,null,null),p=h.exports,d=r(1942),f=r(5591),g=r(475);const y=[{prop:"paramName",label:"工艺参数",minWidth:150,showOverflowtooltip:!0},{prop:"variableName",label:"变量名称",minWidth:150,showOverflowtooltip:!0},{prop:"eqName",label:"所属设备",minWidth:150},{prop:"unitName",label:"所属单元",minWidth:120},{prop:"value",label:"实时值",minWidth:120}];var b={name:"ProcessMonitoring",data(){return{beilv:1,type:"实时数据",formConfig:[{type:"",label:"",dateType:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-ddTHH:mm:ss",rangeSeparator:"-",startPlaceholder:"开始时间",endPlaceholder:"结束时间",placeholder:"时间范围",param:"timeStr",width:350},{type:"cascader",label:"产线/单元/设备",selectOptions:[],param:"equipmentId",cascaderProps:{checkStrictly:!1,value:"id",label:"name"},onChange:!0,width:250},{type:"select",label:"工艺参数",labelField:"paramName",valueField:"paramName",selectOptions:[],filterable:!0,param:"paramName",defaultSelect:"",width:180},{type:"button",btnName:"查询",name:"search",color:"primary"}],listQuery:{current:1,size:20,equipmentId:"",paramName:"",startTime:"",endTime:""},tableProps:y,tableData:[],tableH:(0,g.NC)(340),total:0,historyList:[]}},components:{processMonitoringChart:p},mounted(){this.beilv=document.getElementById("container").offsetWidth/1920,window.addEventListener("resize",(()=>{this.tableH=(0,g.NC)(340),this.beilv=document.getElementById("container").offsetWidth/1920,console.log(this.beilv)})),this.getTree(),this.getRealList()},methods:{getRealList(){(0,d.KF)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&(this.tableData=t.data.records,this.to