1 行
5.1 KiB
JavaScript
1 行
5.1 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[5323],{5323:function(t,e,a){a.r(e),a.d(e,{default:function(){return x}});var s=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:14}},[e("div",{staticClass:"middle-box"},[e("el-row",[e("el-col",{staticClass:"middle-top"},[e("div",[e("div",{staticClass:"choose-box"},[e("el-radio-group",{attrs:{size:"small"},model:{value:t.selectDimension,callback:function(e){t.selectDimension=e},expression:"selectDimension"}},[e("el-radio-button",{attrs:{label:"year"}},[t._v("年")]),e("el-radio-button",{attrs:{label:"month"}},[t._v("月")]),e("el-radio-button",{attrs:{label:"week"}},[t._v("周")])],1)],1),e("div",{staticClass:"search-box"},[e("span",[t._v("发生时间 ")]),e("el-date-picker",{attrs:{type:"date",placeholder:"请选择",size:"small"},model:{value:t.chooseDate,callback:function(e){t.chooseDate=e},expression:"chooseDate"}}),e("el-button",{staticStyle:{"margin-left":"24px"},attrs:{type:"primary",size:"small"}},[t._v("查询")])],1)])])],1),e("el-row",[e("el-col",{staticClass:"middle-bottom"},[e("span",{staticClass:"title"},[t._v("xxxx设备 故障信息")]),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"page-width":50,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}})],1)],1)],1)]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"right-box"},[e("el-row",[e("el-col",{staticClass:"right-top"},[e("contrast-chart1",{attrs:{id:"chart1"}})],1)],1),e("el-row",[e("el-col",{staticClass:"right-bottom"},[e("contrast-chart2",{attrs:{id:"chart2"}})],1)],1)],1)])],1)],1)},l=[],o=a(5591),r=a(475),i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"box"},[e("span",{staticClass:"title"},[t._v("xxx设备MTBR对比")]),e("div",{staticStyle:{width:"100%"},style:{height:t.chartHeight+"px"},attrs:{id:t.id}}),t._m(0)])},n=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"bottom-tip"},[e("div",{staticClass:"l-box"},[e("p",{staticClass:"num1"},[t._v("78%")]),e("span",{staticClass:"month1"},[t._v("本月")])]),e("div",{staticClass:"r-box"},[e("p",{staticClass:"num2"},[t._v("78%")]),e("span",{staticClass:"month2"},[t._v("上月")])])])}],c=a(7171),u=a(5468),d={name:"ContrastChart",mixins:[u.Z],props:{id:{type:String,default:""}},data(){return{chartDom:"",chart:"",chartHeight:.5*(0,r.NC)(500)}},mounted(){this.chartDom=document.getElementById(this.id),this.chart=c.S1(this.chartDom),this.getChart(),window.addEventListener("resize",(()=>{this.chartHeight=.5*(0,r.NC)(500)}))},methods:{getChart(){var t=80,e=20,a=60,s=40,l={color:["#84E9DC","#fff","#E7E9F0","#E7E9F0"],tooltip:{show:!1},legend:{show:!1},series:[{namr:"lastMonth",type:"pie",zlevel:2,radius:["45%","60%"],center:["50%","45%"],avoidLabelOverlap:!1,silent:!0,tooltip:{show:!1},emphasis:{scale:!1},label:{show:!1},data:[{value:a,name:"已完成 "+a},{value:s,name:"未完成 "+s}]},{name:"thisMonth",type:"pie",radius:["60%","75%"],center:["50%","45%"],clockwise:!0,avoidLabelOverlap:!1,emphasis:{scale:!1},silent:!1,label:{show:!1},data:[{value:t,name:"已完成 "+t,itemStyle:{color:"#288aff"}},{value:e,name:"未完成 "+e}]}]};this.chart.setOption(l,!0)}}},h=d,m=a(1001),p=(0,m.Z)(h,i,n,!1,null,"334c85ea",null),b=p.exports;const v=[{prop:"startState",label:"前状态"},{prop:"endState",label:"后状态"},{prop:"occurrenceTime",label:"发生时间"},{prop:"ChangeTime",label:"变化时间"}];var f={name:"mtbrfPage",components:{contrastChart1:b,contrastChart2:b},data(){return{treeData:[],defaultTime:{children:"children",label:"name"},listQuery:{current:1,size:500},chooseDate:"",tableProps:v,tableData:[],tableH:(0,r.NC)(350),selectDimension:"year"}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,r.NC)(350)})),this.getTree(),this.getList()},methods:{getTree(){(0,o.SI)().then((t=>{this.treeData=t.data}))},clickDevice(t){console.log(t),t.children||console.log(t.children)},getList(){let t=[];for(let e=0;e<30;e++){let a={};a.startState=e+"2112",t.push(a)}this.tableData=t}}},C=f,g=(0,m.Z)(C,s,l,!1,null,"42d5076f",null),x=g.exports},5591:function(t,e,a){a.d(e,{FH:function(){return i},Hp:function(){return n},JQ:function(){return r},SI:function(){return o},WQ:function(){return d},b6:function(){return c},iv:function(){return l},m:function(){return u}});var s=a(8859);function l(){return(0,s.Z)({url:"/common/getList",method:"post"})}function o(){return(0,s.Z)({url:"/common/getTreeData",method:"post"})}function r(t){return(0,s.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function i(t){return(0,s.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function n(t){return(0,s.Z)({url:"/common/getAlarmData",method:"post",data:t})}function c(t){return(0,s.Z)({url:"/common/getProductData",method:"post",data:t})}function u(t){return(0,s.Z)({url:"/common/getMaterialData",method:"post",data:t})}const d="/api/common/attachment/uploadFileFormData"}}]); |