tft-fe/dist/js/4344.788bebe9.js

1 line
3.6 KiB
JavaScript
Raw Normal View History

2023-05-04 16:20:00 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[4344],{4344:function(t,e,a){a.r(e),a.d(e,{default:function(){return b}});var r=function(){var t=this,e=t._self._c;return e("div",[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,"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",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("rate-analysis-chart")],1)])],1)],1)},n=[],o=a(5591),i=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:"rateChart"}})])},l=[],s=a(7171),c=a(475),u=a(5468),m={name:"RateAnalysisChart",mixins:[u.Z],data(){return{chartDom:"",chart:"",chartHeight:(0,c.NC)(214)-35}},mounted(){this.chartDom=document.getElementById("rateChart"),this.chart=s.S1(this.chartDom),this.getChart(),window.addEventListener("resize",(()=>{this.chartHeight=(0,c.NC)(214)-35}))},methods:{getChart(){const t=[],e=[],a=[];for(let o=1;o<=31;o++){let e="";e=o+"",t.push(e)}for(let o=1;o<=31;o++){let t="";t=parseInt(23*Math.random()+1),e.push(t)}for(let o=1;o<=31;o++){let t="";t=parseInt(10*Math.random()+90),a.push(t)}const r=["#73A0FA","#F6BE19","#5AD8A6"];var n={color:r,tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{data:["实际运行小时数","理论运行时长","设备利用率"]},xAxis:[{type:"category",data:t,axisPointer:{type:"shadow"}}],yAxis:[{type:"value",name:"理论运行时长",axisLabel:{formatter:"{value} h"}},{type:"value",name:"设备利用率",axisLabel:{formatter:"{value} %"}}],series:[{name:"实际运行小时数",type:"bar",tooltip:{valueFormatter:function(t){return t+" ml"}},data:e},{name:"理论运行时长",type:"line",tooltip:{valueFormatter:function(t){return t+" ml"}},data:e},{name:"设备利用率",type:"line",yAxisIndex:1,tooltip:{valueFormatter:function(t){return t+"%"}},data:a}]};n&&this.chart.setOption(n)}}},h=m,d=a(1001),p=(0,d.Z)(h,i,l,!1,null,null,null),f=p.exports,y={name:"utilizationRateAnalysis",data(){return{treeData:[],defaultTime:{children:"children",label:"name"},chooseMonth:"",formConfig:[{type:"datePicker",label:"月份选择",dateType:"month",format:"yyyy-MM",valueFormat:"yyyy-MM",placeholder:"月份选择",param:"testTime",width:200},{type:"button",btnName:"查询",name:"search",color:"primary"}]}},components:{rateAnalysisChart:f},mounted(){this.getTree()},methods:{getTree(){(0,o.SI)().then((t=>{this.treeData=t.data}))},buttonClick(t){console.log(t)},clickDevice(t){console.log(t),t.children||console.log(t.children)}}},g=y,v=(0,d.Z)(g,r,n,!1,null,"0bb56d3c",null),b=v.exports},5591:function(t,e,a){a.d(e,{FH:function(){return l},Hp:function(){return s},JQ:function(){return i},SI:function(){return o},WQ:function(){return m},b6:function(){return c},iv:function(){return n},m:function(){return u}});var r=a(8859);function n(){return(0,r.Z)({url:"/common/getList",method:"post"})}function o(){return(0,r.Z)({url:"/common/getTreeData",method:"post"})}function i(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 c(t){return(0,r.Z)({url:"/common/getProductData",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/common/getMaterialData",method:"post",data:t})}const m="/api/common/attachment/uploadFileFormData"}}]);