| | |
| | | <div class="static_wrap"> |
| | | <div class="df mb50" > |
| | | <div class="wrap static1"> |
| | | <div class="header" style="text-align: center"> |
| | | <div class="home_title" style="text-align: center;width: 100%">各类型工单占比统计</div> |
| | | </div> |
| | | <div class="echart" style="height: 400px" > |
| | | <div id="circleChart0"></div> |
| | | <div id="circleChart1"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="df mb50" > |
| | | <div class="wrap static1"> |
| | | <div class="header"> |
| | | <div class="home_title">1.SHE事件上报</div> |
| | | </div> |
| | |
| | | getWorkHead () { |
| | | getIndexData({ }).then(res => { |
| | | this.headerData = res || {} |
| | | var cdata = [] |
| | | cdata.push({ name: '跌绊滑事件', value: res.dbhNum || 0 }) |
| | | cdata.push({ name: 'DCA事件', value: res.dcaNum || 0 }) |
| | | cdata.push({ name: 'SHE事件', value: res.sheNum || 0 }) |
| | | this.initEchartCircleDo('circleChart0', '各类型事件工单上报统计', '', cdata) |
| | | var xdata =['SHE事件', '跌绊滑事件','DCA事件'] |
| | | var ydata = [] |
| | | ydata.push({ name: '已解决', stack: 'cateNum', type: 'bar', unit: '项', color: '#f07e6f', data: [0,res.dbhYesNum || 0,res.dcaYesNum || 0]}) |
| | | ydata.push({ name: '未解决', stack: 'cateNum',type: 'bar', unit: '项', color: '#8383ff', data: [res.sheNum || 0,res.dbhNoNum || 0,res.dcaNoNum || 0]}) |
| | | ydata.push({ name: '总单量', type: 'bar', unit: '次', color: '#29aeff', data: [res.sheNum || 0,res.dbhNum || 0,res.dcaNum || 0] }) |
| | | this.initEchartDataDo('各类型事件状态统计', 'circleChart1', xdata, ydata) |
| | | }) |
| | | }, |
| | | updateDate () { |
| | |
| | | ydata.push({ name: 'WTS关闭单量', type: 'bar', unit: '单', color: '#29aeff', data: this.staticData21.map(i => i.wtsTotal) }) |
| | | ydata.push({ name: 'SHE关闭单量', type: 'bar', unit: '单', color: '#e75314', data: this.staticData21.map(i => i.sheTotal) }) |
| | | ydata.push({ name: '未解决单量', type: 'bar', unit: '单', color: '#8383ff', data: this.staticData21.map(i => i.unCloseTotal) }) |
| | | ydata.push({ name: '工单总量', type: 'bar', unit: '单', color: '#30d3de', data: this.staticData21.map(i => i.total) }) |
| | | ydata.push({ name: '工单总量', type: 'line', unit: '单', color: '#30d3de', data: this.staticData21.map(i => i.total) }) |
| | | this.initEchartDataDo('季度统计','echart21', this.staticData21.map(i => i.dateStr), ydata) |
| | | }, |
| | | initEchart3 () { |
| | |
| | | ydata.push({ name: 'WTS关闭单量', type: 'bar', unit: '单', color: 'rgba(217,4,34,0.83)', data: this.staticData31.map(i => i.wtsTotal) }) |
| | | ydata.push({ name: 'SHE关闭单量', type: 'bar', unit: '单', color: '#e75314', data: this.staticData31.map(i => i.sheTotal) }) |
| | | ydata.push({ name: '未解决单量', type: 'bar', unit: '单', color: '#8383ff', data: this.staticData31.map(i => i.unCloseTotal) }) |
| | | ydata.push({ name: '工单总量', type: 'bar', unit: '单', color: '#30d3de', data: this.staticData31.map(i => i.total) }) |
| | | ydata.push({ name: '工单总量', type: 'line', unit: '单', color: '#30d3de', data: this.staticData31.map(i => i.total) }) |
| | | this.initEchartDataDo('季度统计','echart31', this.staticData31.map(i => i.dateStr), ydata) |
| | | }, |
| | | initEchartDataDo (title,id, xdata, ydata) { |
| | |
| | | fontSize: 12, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'bold' |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | } |
| | | }, |
| | | legend:{ |
| | | orient: 'vertical', |
| | |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | |
| | | yAxis: { |
| | | type: 'value', |
| | | name: '', |
| | | min: 0, |
| | | axisLabel: { |
| | | formatter: function (value) { |
| | | return Number.isInteger(value) ? value : '' |
| | | } |
| | | }, |
| | | textStyle:{ |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | |
| | | array.push({ |
| | | data: ydata[i].data, |
| | | name: ydata[i].name, |
| | | stack: ydata[i].stack || '', |
| | | type: ydata[i].type || 'line', |
| | | areaStyle: { |
| | | normal: { |
| | |
| | | } |
| | | |
| | | return array |
| | | }, |
| | | initEchartCircleDo (id, title, subTitle, data) { |
| | | var option = { |
| | | title: { |
| | | text: '', |
| | | subtext: '', |
| | | left: 'center', |
| | | bottom: 'bottom', |
| | | textStyle: { |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | textStyle: { |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | }, |
| | | series: [ |
| | | { |
| | | name: title || '', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: data, |
| | | label: { |
| | | show: true, |
| | | formatter: '{b}:{d}%', |
| | | textStyle: { |
| | | fontSize: 10, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal' |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | }, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | const myChart = echarts.init(document.getElementById(id)) |
| | | myChart.setOption(option) |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public WorkorderIndexNumVO getIndexData(Workorder workorder) { |
| | | WorkorderIndexNumVO model = new WorkorderIndexNumVO(); |
| | | List<WorkOrderDataVO> workOrderDataVOList = new ArrayList<>(); |
| | | //查询今年所有的数据 |
| | | List<Workorder> list = workorderMapper.selectJoinList(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("type,count(id) as num") |
| | |
| | | } |
| | | return model; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: test |
| | | active: dev |
| | | # JSON返回配置 |
| | | jackson: |
| | | # 默认时区 |