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.
ocr-web/dist/js/chunk-7da2a23c.58789a72.js

1 line
2.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7da2a23c"],{"0147":function(t,e,a){"use strict";a("f1f1")},d4e4:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},o=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{width:"100%",height:"100%"}},[a("div",{staticClass:"chart"},[a("div",{staticClass:"bar",staticStyle:{width:"100%",height:"100%"},attrs:{id:"ComparisonTrend"}})])])}],n=a("ca00"),r=a("0fea"),s={name:"index",props:{queryData:{type:Object,default:function(){return{}}},time:{type:Object}},watch:{chartInfo:function(t,e){t&&t.resize()},time:{handler:function(t){this.getHourCompareList()},immediate:!1,deep:!0}},data:function(){return{chartInfo:null,queryParam:{},option:{legend:{show:!0,data:["今日","昨日"],bottom:12},grid:{top:"30",bottom:"40",left:"40",right:"40",containLabel:!0},xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[{name:"今日",data:[],type:"line",itemStyle:{color:"#96daf9"},label:{show:!0,position:"top"}},{name:"昨日",data:[],type:"line",itemStyle:{color:"#99f20d"},label:{show:!0,position:"top"}}]},urlApi:{hourCompare:"/smb/index/hourCompare"},dataSource:{columns:[],dataList:[{title:"今天"},{title:"昨天"}]}}},created:function(){var t=this;this.initData(),window.addEventListener("resize",Object(n["m"])((function(){t.chartInfo.resize()}))),this.handleQuery()},methods:{initData:function(){var t=this;this.$nextTick((function(){var e=document.getElementById("ComparisonTrend");t.chartInfo=t.echarts.init(e),t.chartInfo.setOption(t.option)}))},getHourCompareList:function(){var t=this,e={hour:this.time?this.time.format("HH"):"",platformType:this.queryData.platform||"",userId:this.queryData.userid||"",orgCode:this.queryData.orgTree||"",post:this.queryData.position||""};Object(r["i"])(this.urlApi.hourCompare,e).then((function(e){if(e.success){var a=e.result,i=a.datas,o=a.days;t.option.series[0].data=i.today,t.option.series[1].data=i.yesterday,t.option.xAxis.data=o,t.initData(),t.dataSource.columns=[{dataIndex:"title",title:""}],o.forEach((function(e,a){var i={dataIndex:"date"+a,title:e+"时"};t.dataSource.columns.push(i)})),i.today.forEach((function(e,a){t.dataSource.dataList[0]["date"+a]=e})),i.yesterday.forEach((function(e,a){t.dataSource.dataList[1]["date"+a]=e}))}}))},handleQuery:function(){this.getHourCompareList()}}},c=s,d=(a("0147"),a("2877")),u=Object(d["a"])(c,i,o,!1,null,"8e90227c",null);e["default"]=u.exports},f1f1:function(t,e,a){}}]);