tft-fe/dist/js/4362.ce505f09.js

1 line
8.6 KiB
JavaScript
Raw Permalink Normal View History

2023-06-30 14:01:06 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4362],{4362:function(t,e,n){n.r(e),n.d(e,{default:function(){return h}});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-box"},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:4}},[e("div",{staticClass:"left-box"},[e("el-tree",{attrs:{data:t.treeData,"node-key":"id",props:t.defaultTime,"default-expand-all":""},on:{"node-click":t.clickDevice}})],1)]),e("el-col",{attrs:{span:20}},[e("div",{staticClass:"right-box"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("div",{staticStyle:{clear:"both"}},[e("span",[t._v("报警总时长为"+t._s(t.totalTime)+"分钟")])]),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:function(e){return t.getList()}}})],1)])],1)],1)},a=[],i=n(475),o=n(5591),u=n(147),l=n(381),s=n.n(l);const m=[{prop:"line",label:"产线"},{prop:"unit",label:"单元"},{prop:"equipmentName",label:"设备名称",minWidth:120},{prop:"alarmCode",label:"报警代码",minWidth:120},{prop:"alarmContent",label:"报警内容",minWidth:150},{prop:"startTime",filter:i.g6,label:"报警开始时间",minWidth:160},{prop:"endTime",filter:i.g6,label:"报警结束时间",minWidth:160},{prop:"maintainTime",label:"报警持续时间/秒",width:150}];var c={name:"HistoryAlarm",data(){return{treeData:[],defaultTime:{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:"结束时间",param:"timeVal",defaultSelect:[],width:350},{type:"input",label:"报警代码",placeholder:"报警代码",param:"alarmCode"},{type:"button",btnName:"查询",name:"search",color:"primary"}],tableProps:m,tableData:[],tableH:(0,i.NC)(340),total:0,listQuery:{current:1,size:20},totalTime:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(340)})),this.getTree(),this.formConfig[0].defaultSelect=[s()().format("yyyy-MM-DD")+"T00:00:00",s()().format("yyyy-MM-DD")+"T23:59:59"],this.listQuery.startTime=s()().format("yyyy-MM-DD")+"T00:00:00",this.listQuery.endTime=s()().format("yyyy-MM-DD")+"T23:59:59",this.getList()},methods:{getTree(){(0,o.SI)().then((t=>{this.treeData=t.data}))},getList(){(0,u.Uw)({...this.listQuery}).then((t=>{0===t.code&&(this.total=t.data.total,this.tableData=t.data.records,this.totalTime=t.data.records.length>0?t.data.records[0].totalTime:0)}))},buttonClick(t){this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.alarmCode=t.alarmCode,this.listQuery.equipmentName="",this.getList()},clickDevice(t){console.log(t),t.children||(this.formConfig[0].defaultSelect=[],this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.alarmCode="",this.listQuery.equipmentName=t.name,this.listQuery.current=1,this.getList())}}},d=c,p=n(1001),f=(0,p.Z)(d,r,a,!1,null,"81f66dc2",null),h=f.exports},5591:function(t,e,n){n.d(e,{FH:function(){return u},Hp:function(){return s},JQ:function(){return o},SI:function(){return i},Vx:function(){return m},WQ:function(){return p},b6:function(){return c},iv:function(){return a},jL:function(){return l},m:function(){return d}});var r=n(8859);function a(){return(0,r.Z)({url:"/common/getList",method:"post"})}function i(){return(0,r.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,r.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function l(t){return(0,r.Z)({url:"/common/getFpyD