1 line
8.3 KiB
JavaScript
1 line
8.3 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2125],{2125:function(t,e,r){r.r(e),r.d(e,{default:function(){return N}});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,chartMsg:t.historyList}})],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=r(381),m=r.n(u),c={mixins:[l.Z],name:"ProcessMonitoringChart",props:{chartMsg:{type:Array,default:()=>[]},beilv:{type:Number,default:1}},mounted(){this.$nextTick((()=>{this.initChart()}))},watch:{chartMsg:function(){this.initChart()}},beforeDestroy(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{initChart(){const t=[],e=[];for(let a=0;a<this.chartMsg.length;a++){let r=m()(this.chartMsg[a].createTime).format("yyyy-MM-DD HH:mm:ss");t.push(r),e.push(this.chartMsg[a].value)}null!==this.chart&&""!==this.chart&&void 0!==this.chart&&this.chart.dispose();var r=document.getElementById("processMonitoring");this.chart=n.S1(r);var i={color:["#5B8FF9"],tooltip:{trigger:"axis",textStyle:{color:"#fff"},backgroundColor:"rgba(150, 150, 150, 1)",borderColor:"rgba(150, 150, 150, 1)"},xAxis:{type:"category",data:t},yAxis:{type:"value"},series:[{data:e,type:"line"}]};this.chart.setOption(i,!0)}}},h=c,p=r(1001),d=(0,p.Z)(h,s,o,!1,null,null,null),f=d.exports,g=r(1942),y=r(5591),b=r(475);const C=[{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 v={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:C,tableData:[],tableH:(0,b.NC)(340),total:0,historyList:[]}},components:{processMonitoringChart:f},mounted(){this.beilv=document.getElementById("container").offsetWidth/1920,window.addEventListener("resize",(()=>{this.tableH=(0,b.NC)(340),this.beilv=document.getElementById("container").offsetWidth/1920,console.log(
|