1 line
5.3 KiB
JavaScript
1 line
5.3 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4545],{4545:function(t,e,r){r.r(e),r.d(e,{default:function(){return h}});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",{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}})],1)])],1)},n=[],i=r(475),o=r(5591),l=r(1942);const s=[{prop:"paramName",label:"工艺参数"},{prop:"variableName",label:"变量名称"},{prop:"eqName",label:"所属设备",width:150},{prop:"unitName",label:"所属单元",width:150},{prop:"alarmTime",label:"报警时间",filter:i.g6,width:180},{prop:"alarmValue",label:"报警值",width:100},{prop:"alarmType",label:"报警类型",width:100},{prop:"alarmLimit",label:"报警限值",width:150}],u=[{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:s,tableData:[],tableBtn:u,tableH:(0,i.NC)(340),total:0,listQuery:{current:1,size:1e3,equipmentId:null,proLineId:null,unitId:null,endTime:null,startTime:null},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(300)})),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)}))},getHis(){(0,l.$p)({...this.listQuery}).then((t=>{0===t.code&&(this.tableData=t.data.records)}))},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.getReal()):"历史数据"===t&&(this.tableData=[],console.log(this.listQuery))},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("请先选择时间范围"))}}},d=c,p=r(1001),m=(0,p.Z)(d,a,n,!1,null,"216944f8",null),h=m.exports},5591:function(t,e,r){r.d(e,{FH:function(){return l},Hp:function(){return s},JQ:function(){return o},SI:function(){return i},WQ:function(){return d},b6:function(){return u},iv:function(){return n},m:function(){return c}});var a=r(8859);function n(){return(0,a.Z)({url:"/common/getList",method:"post"})}function i(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function s(t){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const d="/api/common/attachment/uploadFileFormData"},1942:function(t,e,r){r.d(e,{$p:function(){return s},AO:function(){return c},F6:function(){return o},FK:function(){return u},KF:function(){return i},QC:function(){return l},Tt:function(){return n},db:function(){return d}});var a=r(8859);function n(t){return(0,a.Z)({url:"/process/processMonitor/paramList",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/process/processMonitor/pageReal",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/process/processMonitor/history",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/process/alram/pageReal",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/process/alram/pageHis",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/process/paramSet/page",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/process/paramSet/get",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/process/paramSet/update",method:"post",data:t})}}}]); |