You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 line
5.9 KiB

  1. "use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[9881],{9881:function(t,e,a){a.r(e),a.d(e,{default:function(){return y}});var r=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",{attrs:{data:t.treeData,props:t.defaultProps,"node-key":"id","default-expand-all":"","highlight-current":!0},on:{"node-click":t.clickDevice}})],1)]),e("el-col",{attrs:{span:20}},[e("div",{staticClass:"right-top"},[e("div",{staticClass:"top-search1"},[e("el-radio-group",{on:{change:t.typeChange},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"},["历史数据"===t.type?e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}):t._e()],1)]),e("div",{staticClass:"right-bottom"},[e("div",{staticClass:"title-box"},[e("span",{staticClass:"title"},[t._v(t._s(t.type))])]),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}}),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.getReal}})],1)])],1)},i=[],n=a(475),o=a(5591),l=a(1942),s=a(381),u=a.n(s);const p=[{prop:"paramName",label:"工艺参数",showOverflowtooltip:!0},{prop:"variableName",label:"变量名称",showOverflowtooltip:!0},{prop:"eqName",label:"所属设备",width:150},{prop:"unitName",label:"所属单元",width:150},{prop:"alarmTime",label:"报警时间",filter:n.g6,width:180},{prop:"alarmValue",label:"报警值",width:100},{prop:"alarmType",label:"报警类型",width:100,filter:(0,n.fW)("alarmTypeVoList")},{prop:"alarmLimit",label:"报警限值",width:150}],d=[{type:"edit",btnName:"编辑"}];var c={name:"AbnormalAlert",data(){return{treeData:[],type:"实时数据",defaultProps:{children:"children",label:"name"},formConfig:[{type:"datePicker",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:"button",btnName:"查询",name:"search",color:"primary"}],tableProps:p,tableData:[],tableBtn:d,tableH:(0,n.NC)(340),total:0,listQuery:{current:1,size:20,equipmentId:null,proLineId:null,unitId:null,endTime:null,startTime:null},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,n.NC)(340)})),this.formConfig[0].defaultSelect=[u()().format("yyyy-MM-DD")+"T00:00:00",u()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=u()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=u()().format("yyyy-MM-DD")+"T23:59:59",this.getTree(),this.getReal()},methods:{getTree(){(0,o.SI)().then((t=>{this.treeData=t.data}))},getReal(){(0,l.QC)({...this.listQuery}).then((t=>{0===t.code&&(this.tableData=t.data.records,this.total=t.data.total)}))},getHis(){(0,l.$p)({...this.listQuery}).then((t=>{0===t.code&&(this.tableData=t.data.records,this.total=t.data.total)}))},clickDevice(t){t.parent?t.parent&&!t.isAllowDrag?(this.listQuery.proLineId=null,this.listQuery.unitId=t.id,this.listQuery.equipmentId=null):t.parent&&t.isAllowDrag&&(this.listQuery.proLineId=null,this.listQuery.unitId=null,this.listQuery.equipmentId=t.id):(this.listQuery.proLineId=t.id,this.listQuery.unitId=null,this.listQuery.equipmentId=null),"实时数据"===this.type?this.getReal():this.getHis()},typeChange(t){console.log(t),"实时数据"===t?(this.tableData=[],this.total=0,this.getReal()):"历史数据"===t&&(this.tableData=[],this.total=0)},buttonClick(t){console.log(t),"search"===t.btnName&&(t.timeStr?(this.listQuery.startTime=t.timeStr[0],this.listQuery.endTime=t.timeStr[1],this.getHis()):this.$message.error("请先选择时间范围"))}}},m=c,h=a(1001),f=(0,h.Z)(m,r,i,!1,null,"706c4fb9",null),y=f.exports},5591:function(t,e,a){a.d(e,{FH:function(){return l},Hp:function(){return s},JQ:function(){return o},SI:function(){return n},WQ:function(){return d},b6:function(){return u},iv:function(){return i},m:function(){return p}});var r=a(8859);function i(){return(0,r.Z)({url:"/common/getList",method:"post"})}function n(){return(0,r.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,r.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function l(t){return(0,r.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function s(t){return(0,r.Z)({url:"/common/getAlarmData",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/common/getProductData",method:"post",data:t})}function p(t){return(0,r.Z)({url:"/common/getMaterialData",method:"post",data:t})}const d="/api/common/attachment/uploadFileFormData"},1942:function(t,e,a){a.d(e,{$p:function(){return s},AO:function(){return p},F6:function(){return o},FK:function(){return u},KF:function(){return n},QC:function(){return l},Tt:function(){return i},db:function(){return d}});var r=a(8859);function i(t){return(0,r.Z)({url:"/process/processMonitor/paramList",method:"post",data:t})}function n(t){return(0,r.Z)({url:"/process/processMonitor/pageReal",method:"post",data:t})}function o(t){return(0,r.Z)({url:"/process/processMonitor/history",method:"post",data:t})}function l(t){return(0,r.Z)({url:"/process/alram/pageReal",method:"post",data:t})}function s(t){return(0,r.Z)({url:"/process/alram/pageHis",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/process/paramSet/page",method:"post",data:t})}function p(t){return(0,r.Z)({url:"/process/paramSet/get",method:"post",data:t})}function d(t){return(0,r.Z)({url:"/process/paramSet/update",method:"post",data:t})}}}]);