tft-fe/dist/js/2125.7a8694df.js
2023-06-30 14:01:06 +08:00

1 line
8.5 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(this.beilv)})),this.getTree(),this.getRealList()},methods:{getRealList(){(0,g.KF)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&(this.tableData=t.data.records,this.total=t.data.total)}))},getHistoryList(){return this.listQuery.startTime&&this.listQuery.endTime?this.listQuery.equipmentId?this.listQuery.paramName?void(0,g.F6)({startTime:this.listQuery.startTime,endTime:this.listQuery.endTime,equipmentId:this.listQuery.equipmentId,paramName:this.listQuery.paramName}).then((t=>{0===t.code&&(this.historyList=t.data)})):(this.$message.error("工艺参数不能为空"),!1):(this.$message.error("设备名称不能为空"),!1):(this.$message.error("时间范围不能为空"),!1)},getTree(){(0,y.SI)().then((t=>{this.formConfig[1].selectOptions=t.data}))},buttonClick(t){"实时数据"===this.type?(this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.equipmentId=t.equipmentId?t.equipmentId[2]:"",this.listQuery.paramName=t.paramName?t.paramName:"",this.getRealList()):(this.listQuery.startTime=t.timeStr?t.timeStr[0]:"",this.listQuery.endTime=t.timeStr?t.timeStr[1]:"",this.listQuery.equipmentId=t.equipmentId?t.equipmentId[2]:"",this.listQuery.paramName=t.paramName?t.paramName:"",this.getHistoryList())},changeType(t){this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.equipmentId="",this.listQuery.paramName="",this.formConfig[2].selectOptions=[],"历史数据"===t?(this.formConfig[0].type="datePicker",this.formConfig[0].label="时间范围",this.formConfig[0].defaultSelect=[],this.formConfig[1].defaultSelect=[],this.formConfig[2].defaultSelect=""):(this.formConfig[0].type="",this.formConfig[0].label="",this.formConfig[0].defaultSelect=[],this.formConfig[1].defaultSelect=[],this.formConfig[2].defaultSelect="",this.getRealList())},cascaderSelect(t){console.log(t),3===t.value.length?(console.log("333333333333333"),this.listQuery.equipmentId=t.value[2],(0,g.Tt)({current:1,size:1e3,equipmentId:this.listQuery.equipmentId}).then((t=>{console.log(t);let e={...this.$refs.searchBarForm.formInline};this.$refs.searchBarForm.resetForm(),this.formConfig[0].defaultSelect=e.timeStr,this.formConfig[1].defaultSelect=JSON.parse(JSON.stringify(e.equipmentId)),this.formConfig[2].defaultSelect="",this.formConfig[2].selectOptions=t.data}))):(console.log("清空"),this.formConfig[1].defaultSelect="",this.$refs.searchBarForm.resetForm(),this.formConfig[2].selectOptions=[])},tableRowClassName({row:t}){return t.overLimit?"danger-row":""}}},Q=v,S=(0,p.Z)(Q,i,a,!1,null,"756f88ed",null),N=S.exports},5591:function(t,e,r){r.d(e,{FH:function(){return n},Hp:function(){return u},JQ:function(){return o},SI:function(){return s},Vx:function(){return m},WQ:function(){return p},b6:function(){return c},iv:function(){return a},jL:function(){return l},m:function(){return h}});var i=r(8859);function a(){return(0,i.Z)({url:"/common/getList",method:"post"})}function s(){return(0,i.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,i.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function n(t){return(0,i.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function l(t){return(0,i.Z)({url:"/common/getFpyData",method:"post",data:t})}function u(t){return(0,i.Z)({url:"/common/getAlarmData",method:"post",data:t})}function m(t){return(0,i.Z)({url:"/common/getCapacityData",method:"post",data:t})}function c(t){return(0,i.Z)({url:"/common/getProductData",method:"post",data:t})}function h(t){return(0,i.Z)({url:"/common/getMaterialData",method:"post",data:t})}const p="/api/common/attachment/uploadFileFormData"},1942:function(t,e,r){r.d(e,{$p:function(){return l},AO:function(){return m},F6:function(){return o},FK:function(){return u},KF:function(){return s},QC:function(){return n},Tt:function(){return a},db:function(){return c}});var i=r(8859);function a(t){return(0,i.Z)({url:"/process/processMonitor/paramList",method:"post",data:t})}function s(t){return(0,i.Z)({url:"/process/processMonitor/pageReal",method:"post",data:t})}function o(t){return(0,i.Z)({url:"/process/processMonitor/historyList",method:"post",data:t})}function n(t){return(0,i.Z)({url:"/process/alram/pageReal",method:"post",data:t})}function l(t){return(0,i.Z)({url:"/process/alram/pageHis",method:"post",data:t})}function u(t){return(0,i.Z)({url:"/process/paramSet/page",method:"post",data:t})}function m(t){return(0,i.Z)({url:"/process/paramSet/get",method:"post",data:t})}function c(t){return(0,i.Z)({url:"/process/paramSet/update",method:"post",data:t})}}}]);