报告调整
This commit is contained in:
parent
fb8bd5e2bb
commit
9308f1e8f5
|
@ -6,6 +6,7 @@
|
|||
v-model="listQuery.belong_dept"
|
||||
placeholder="报送部门"
|
||||
clearable
|
||||
@change="belongDeptChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgData"
|
||||
|
@ -70,6 +71,8 @@
|
|||
<template slot-scope="scope" v-if="scope.row.all">{{ scope.row.all }}</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<h3 style="text-align: center;">{{ fileName }}</h3>
|
||||
<p v-if="fileName!==''" style="text-align: center;">{{ listQuery.task2__year }}年 1—12月质量目标双月报</p>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
|
@ -89,19 +92,19 @@
|
|||
<td v-if="index==1" rowspan="3">报告/证书合格率</td>
|
||||
<td v-if="index==1">已发放报告/证书数量</td>
|
||||
<td v-if="index==2">不准确报告/证书数量</td>
|
||||
<td v-if="index==3">报告/证书合格率</td>
|
||||
<td v-if="index==3">报告/证书合格率(%)</td>
|
||||
<td v-if="index==4" rowspan="3">报告/证书及时率</td>
|
||||
<td v-if="index==4">应发报告/证书数量</td>
|
||||
<td v-if="index==5">实际按时完成报告/证书数量</td>
|
||||
<td v-if="index==6">报告/证书及时率</td>
|
||||
<td v-if="index==6">报告/证书及时率(%)</td>
|
||||
<td v-if="index==7" rowspan="3">能力验证满意率</td>
|
||||
<td v-if="index==7">全部获结果参数数量</td>
|
||||
<td v-if="index==8">满意结果参数数量</td>
|
||||
<td v-if="index==9">报告/能力验证满意率</td>
|
||||
<td v-if="index==9">报告/能力验证满意率(%)</td>
|
||||
<td v-if="index==10" rowspan="3">客户投诉处理满意率</td>
|
||||
<td v-if="index==10">全部已处理投诉数量</td>
|
||||
<td v-if="index==11">获满意结果的投诉数量</td>
|
||||
<td v-if="index==12">报告/客户投诉处理满意率</td>
|
||||
<td v-if="index==12">报告/客户投诉处理满意率(%)</td>
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
|
@ -114,22 +117,22 @@
|
|||
</table>
|
||||
<el-row id="echartsContainer">
|
||||
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee;border-top:0">
|
||||
<div id="bar1" style="width:495px;height:400px;"></div>
|
||||
<div id="bar1" style="width:495px;height:300px;"></div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="chartsWrap" style="border-top:0">
|
||||
<div id="bar2" style="width:495px;height:400px;margin-left: 10px;"></div>
|
||||
<div id="bar2" style="width:495px;height:300px;margin-left: 10px;"></div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee">
|
||||
<div id="lin1" style="width:495px;height:400px;"></div>
|
||||
<div id="lin1" style="width:495px;height:300px;"></div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="chartsWrap">
|
||||
<div id="lin2" style="width:495px;height:400px;margin-left: 10px;"></div>
|
||||
<div id="lin2" style="width:495px;height:300px;margin-left: 10px;"></div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee">
|
||||
<div id="lin3" style="width:495px;height:400px;"></div>
|
||||
<div id="lin3" style="width:495px;height:300px;"></div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="chartsWrap">
|
||||
<div id="lin4" style="width:495px;height:400px;margin-left: 10px;"></div>
|
||||
<div id="lin4" style="width:495px;height:300px;margin-left: 10px;"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
@ -283,6 +286,8 @@
|
|||
all:'21'
|
||||
},
|
||||
],
|
||||
deptName:'',
|
||||
fileName:'',
|
||||
tableData1:[],
|
||||
// tableDatas:[
|
||||
// {type:'重大质量事故',title:'重大质量事故'},
|
||||
|
@ -331,6 +336,13 @@
|
|||
this.optionSet();
|
||||
},
|
||||
methods: {
|
||||
belongDeptChange(a){
|
||||
this.fileName = '';
|
||||
let selectItem = this.orgData.filter(item=>{
|
||||
return item.id==a
|
||||
})
|
||||
this.deptName = selectItem[0].name;
|
||||
},
|
||||
optionSet(){
|
||||
let chartDom1 = document.getElementById('bar1');
|
||||
this.barChart1 = echarts.init(chartDom1);
|
||||
|
@ -344,6 +356,12 @@
|
|||
},
|
||||
data:this.xAxisData
|
||||
},
|
||||
grid: {
|
||||
left: '5%',
|
||||
right: '7%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis:{},
|
||||
series:[
|
||||
{
|
||||
|
@ -359,6 +377,12 @@
|
|||
title:{
|
||||
text:"应发报告/证书数量"
|
||||
},
|
||||
grid: {
|
||||
left: '5%',
|
||||
right: '7%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis:{
|
||||
axisTick: {
|
||||
show: false
|
||||
|
@ -389,7 +413,7 @@
|
|||
grid: {
|
||||
left: '5%',
|
||||
right: '7%',
|
||||
bottom: '10%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
|
@ -435,7 +459,7 @@
|
|||
grid: {
|
||||
left: '7%',
|
||||
right: '5%',
|
||||
bottom: '10%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
|
@ -481,7 +505,7 @@
|
|||
grid: {
|
||||
left: '5%',
|
||||
right: '7%',
|
||||
bottom: '10%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
|
@ -527,7 +551,7 @@
|
|||
grid: {
|
||||
left: '7%',
|
||||
right: '5%',
|
||||
bottom: '10%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
|
@ -561,158 +585,170 @@
|
|||
},
|
||||
handleFilter(){
|
||||
let that = this;
|
||||
that.tableData1 = [];
|
||||
that.tableDatas = [ [],[],[],[],[],[],[],[],[],[],[],[],[]];
|
||||
getTask2Do(that.listQuery).then(res=>{
|
||||
let data = res.data.filter(item=>{
|
||||
return item.task2_.type==20
|
||||
});
|
||||
console.log(data)
|
||||
data.forEach(element => {
|
||||
let obj = element;
|
||||
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
||||
let rate1 = ((element.num_issue-element.num_error)/element.num_issue).toFixed(2)
|
||||
obj.rate1 = Number(rate1)
|
||||
}else{
|
||||
obj.rate1 = ''
|
||||
}
|
||||
if(element.num_expect!==null&&element.num_issue!==null&&element.num_expect!==0){
|
||||
let rate2 = (element.num_issue/element.num_expect).toFixed(2)
|
||||
obj.rate2 = Number(rate2)
|
||||
}
|
||||
else{
|
||||
obj.rate2 = ''
|
||||
}
|
||||
if(element.num_pt!==null&&element.num_pt_10!==null&&element.num_pt!==0){
|
||||
let rate3 = (element.num_pt_10/element.num_pt).toFixed(2)
|
||||
obj.rate3 = Number(rate3)
|
||||
}
|
||||
else{
|
||||
obj.rate3 = ''
|
||||
}
|
||||
if(element.num_complaint!==null&&element.num_complaint_10!==null&&element.num_complaint!==0){
|
||||
let rate4 = (element.num_complaint_10/element.num_complaint).toFixed(2)
|
||||
obj.rate4 = Number(rate4)
|
||||
}
|
||||
else{
|
||||
obj.rate4 = ''
|
||||
}
|
||||
let ind = element.task2_.cycle-1;
|
||||
that.tableData1[ind] = obj;
|
||||
});
|
||||
for (let i = 0; i < that.tableData1.length; i++) {
|
||||
let item = that.tableData1[i];
|
||||
if(item!==undefined){
|
||||
for(let j = 0; j < that.tableDatas.length; j++){
|
||||
that.tableDatas[j][i] =
|
||||
j==0?item.num_acc:
|
||||
j==1?item.num_issue:
|
||||
j==2?item.num_error:
|
||||
j==3?item.rate1:
|
||||
j==4?item.num_expect:
|
||||
j==5?item.num_issue:
|
||||
j==6?item.rate2:
|
||||
j==7?item.num_pt:
|
||||
j==8?item.num_pt_10:
|
||||
j==9?item.rate3:
|
||||
j==10?item.num_complaint:
|
||||
j==11?item.num_complaint_10:
|
||||
item.rate4;
|
||||
if(that.listQuery.belong_dept!==''){
|
||||
if(that.listQuery.task2__year!==''){
|
||||
that.bar1Data = [];
|
||||
that.bar2Data = [];
|
||||
that.line1Data = [];
|
||||
that.line2Data = [];
|
||||
that.line3Data = [];
|
||||
that.line4Data = [];
|
||||
that.fileName = that.deptName;
|
||||
that.tableData1 = [];
|
||||
that.tableDatas = [ [],[],[],[],[],[],[],[],[],[],[],[],[]];
|
||||
getTask2Do(that.listQuery).then(res=>{
|
||||
let data = res.data.filter(item=>{
|
||||
return item.task2_.type==20
|
||||
});
|
||||
console.log(data)
|
||||
data.forEach(element => {
|
||||
let obj = element;
|
||||
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
||||
let rate1 = ((element.num_issue-element.num_error)/element.num_issue).toFixed(4)
|
||||
obj.rate1 = Number(rate1)*100
|
||||
}else{
|
||||
obj.rate1 = ''
|
||||
}
|
||||
if(element.num_expect!==null&&element.num_issue!==null&&element.num_expect!==0){
|
||||
let rate2 = (element.num_issue/element.num_expect).toFixed(4)
|
||||
obj.rate2 = Number(rate2)*100
|
||||
}
|
||||
else{
|
||||
obj.rate2 = ''
|
||||
}
|
||||
if(element.num_pt!==null&&element.num_pt_10!==null&&element.num_pt!==0){
|
||||
let rate3 = (element.num_pt_10/element.num_pt).toFixed(4)
|
||||
obj.rate3 = Number(rate3)*100
|
||||
}
|
||||
else{
|
||||
obj.rate3 = ''
|
||||
}
|
||||
if(element.num_complaint!==null&&element.num_complaint_10!==null&&element.num_complaint!==0){
|
||||
let rate4 = (element.num_complaint_10/element.num_complaint).toFixed(4)
|
||||
obj.rate4 = Number(rate4)*100
|
||||
}
|
||||
else{
|
||||
obj.rate4 = ''
|
||||
}
|
||||
let ind = element.task2_.cycle-1;
|
||||
that.tableData1[ind] = obj;
|
||||
});
|
||||
for (let i = 0; i < that.tableData1.length; i++) {
|
||||
let item = that.tableData1[i];
|
||||
if(item!==undefined){
|
||||
for(let j = 0; j < that.tableDatas.length; j++){
|
||||
that.tableDatas[j][i] =
|
||||
j==0?item.num_acc:
|
||||
j==1?item.num_issue:
|
||||
j==2?item.num_error:
|
||||
j==3?item.rate1:
|
||||
j==4?item.num_expect:
|
||||
j==5?item.num_issue:
|
||||
j==6?item.rate2:
|
||||
j==7?item.num_pt:
|
||||
j==8?item.num_pt_10:
|
||||
j==9?item.rate3:
|
||||
j==10?item.num_complaint:
|
||||
j==11?item.num_complaint_10:
|
||||
item.rate4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// debugger;
|
||||
console.log(that.tableDatas)
|
||||
that.timeStamp++;
|
||||
// debugger;
|
||||
console.log(that.tableDatas)
|
||||
that.timeStamp++;
|
||||
for(let k=0;k<that.tableDatas.length;k++){
|
||||
let num = 0;
|
||||
let num1 = that.tableDatas[k][0]?that.tableDatas[k][0]:0;
|
||||
let num2 = that.tableDatas[k][1]?that.tableDatas[k][1]:0;
|
||||
let num3 = that.tableDatas[k][2]?that.tableDatas[k][2]:0;
|
||||
let num4 = that.tableDatas[k][3]?that.tableDatas[k][3]:0;
|
||||
let num5 = that.tableDatas[k][4]?that.tableDatas[k][4]:0;
|
||||
let num6 = that.tableDatas[k][5]?that.tableDatas[k][5]:0;
|
||||
if(k==3){
|
||||
num = ((that.tableDatas[1][7]-that.tableDatas[2][7])/that.tableDatas[1][7]).toFixed(4)
|
||||
}else if(k==6){
|
||||
num = (that.tableDatas[5][7]/that.tableDatas[4][7]).toFixed(4)
|
||||
}else if(k==9){
|
||||
num =(that.tableDatas[8][7]/that.tableDatas[7][7]).toFixed(4)
|
||||
}else if(k==12){
|
||||
num = (that.tableDatas[11][7]/that.tableDatas[10][7]).toFixed(4)
|
||||
}else{
|
||||
num = Number(num1)+Number(num2)+Number(num3)+Number(num4)+Number(num5)+Number(num6);
|
||||
}
|
||||
if(num!=='NaN'&&num!==NaN){
|
||||
if(k==3||k==6||k==9||k==12){
|
||||
let numbe = Number(num)*100;
|
||||
that.tableDatas[k][7] = numbe;
|
||||
}else{
|
||||
that.tableDatas[k][7] = num;
|
||||
}
|
||||
}else{
|
||||
that.tableDatas[k][7] = ''
|
||||
}
|
||||
}
|
||||
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[1][i]!==undefined){
|
||||
that.bar1Data.push(Number(that.tableDatas[1][i]))
|
||||
}else{
|
||||
that.bar1Data.push(0)
|
||||
}
|
||||
if(that.tableDatas[4][i]!==undefined){
|
||||
that.bar2Data.push(Number(that.tableDatas[4][i]))
|
||||
}else{
|
||||
that.bar2Data.push(0)
|
||||
}
|
||||
if(that.tableDatas[3][i]!==undefined){
|
||||
that.line1Data.push(Number(that.tableDatas[3][i]))
|
||||
}else{
|
||||
that.line1Data.push(0)
|
||||
}
|
||||
if(that.tableDatas[6][i]!==undefined){
|
||||
that.line2Data.push(Number(that.tableDatas[6][i]))
|
||||
}else{
|
||||
that.line2Data.push(0)
|
||||
}
|
||||
if(that.tableDatas[9][i]!==undefined){
|
||||
that.line3Data.push(Number(that.tableDatas[9][i]))
|
||||
}else{
|
||||
that.line3Data.push(0)
|
||||
}
|
||||
if(that.tableDatas[12][i]!==undefined){
|
||||
that.line4Data.push(Number(that.tableDatas[12][i]))
|
||||
}else{
|
||||
that.line4Data.push(0)
|
||||
}
|
||||
}
|
||||
that.bar1Option.series[0].data = that.bar1Data;
|
||||
that.bar2Option.series[0].data = that.bar2Data;
|
||||
that.line1Option.series[0].data = that.line1Data;
|
||||
that.line2Option.series[0].data = that.line2Data;
|
||||
that.line3Option.series[0].data = that.line3Data;
|
||||
that.line4Option.series[0].data = that.line4Data;
|
||||
|
||||
for(let k=0;k<that.tableDatas.length;k++){
|
||||
let num = 0;
|
||||
let num1 = that.tableDatas[k][0]?that.tableDatas[k][0]:0;
|
||||
let num2 = that.tableDatas[k][1]?that.tableDatas[k][1]:0;
|
||||
let num3 = that.tableDatas[k][2]?that.tableDatas[k][2]:0;
|
||||
let num4 = that.tableDatas[k][3]?that.tableDatas[k][3]:0;
|
||||
let num5 = that.tableDatas[k][4]?that.tableDatas[k][4]:0;
|
||||
let num6 = that.tableDatas[k][5]?that.tableDatas[k][5]:0;
|
||||
if(k==3){
|
||||
num = ((that.tableDatas[1][7]-that.tableDatas[2][7])/that.tableDatas[1][7]).toFixed(2)
|
||||
}else if(k==6){
|
||||
num = (that.tableDatas[5][7]/that.tableDatas[4][7]).toFixed(2)
|
||||
}else if(k==9){
|
||||
num =(that.tableDatas[8][7]/that.tableDatas[7][7]).toFixed(2)
|
||||
}else if(k==12){
|
||||
num = (that.tableDatas[11][7]/that.tableDatas[10][7]).toFixed(2)
|
||||
}else{
|
||||
num = Number(num1)+Number(num2)+Number(num3)+Number(num4)+Number(num5)+Number(num6);
|
||||
}
|
||||
if(num!=='NaN'){
|
||||
that.tableDatas[k][7] = Number(num);
|
||||
}else{
|
||||
that.tableDatas[k][7] = ''
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[1][i]!==undefined){
|
||||
that.bar1Data.push(Number(that.tableDatas[1][i]))
|
||||
}else{
|
||||
that.bar1Data.push(0)
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[4][i]!==undefined){
|
||||
that.bar2Data.push(Number(that.tableDatas[4][i]))
|
||||
}else{
|
||||
that.bar2Data.push(0)
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[3][i]!==undefined){
|
||||
that.line1Data.push(Number(that.tableDatas[3][i]))
|
||||
}else{
|
||||
that.line1Data.push(0)
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[6][i]!==undefined){
|
||||
that.line2Data.push(Number(that.tableDatas[6][i]))
|
||||
}else{
|
||||
that.line2Data.push(0)
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[9][i]!==undefined){
|
||||
that.line3Data.push(Number(that.tableDatas[9][i]))
|
||||
}else{
|
||||
that.line3Data.push(0)
|
||||
}
|
||||
}
|
||||
for(let i=0;i<6;i++){
|
||||
if(that.tableDatas[12][i]!==undefined){
|
||||
that.line4Data.push(Number(that.tableDatas[12][i]))
|
||||
}else{
|
||||
that.line4Data.push(0)
|
||||
}
|
||||
}
|
||||
console.log(that.bar2Data)
|
||||
console.log(that.line1Data)
|
||||
console.log(that.line2Data)
|
||||
console.log(that.line3Data)
|
||||
console.log(that.line4Data)
|
||||
that.barChart1.clear();
|
||||
that.barChart1.setOption(that.bar1Option);
|
||||
that.barChart2.clear();
|
||||
that.barChart2.setOption(that.bar2Option);
|
||||
|
||||
that.barChart1.clear();
|
||||
that.barChart1.setOption(this.bar1Option);
|
||||
that.barChart2.clear();
|
||||
that.barChart2.setOption(this.bar2Option);
|
||||
that.lineChart1.clear();
|
||||
that.lineChart1.setOption(that.line1Option);
|
||||
that.lineChart2.clear();
|
||||
that.lineChart2.setOption(that.line2Option);
|
||||
|
||||
that.lineChart1.clear();
|
||||
that.lineChart1.setOption(this.line1Option);
|
||||
that.lineChart2.clear();
|
||||
that.lineChart2.setOption(this.line2Option);
|
||||
|
||||
that.lineChart3.clear();
|
||||
that.lineChart3.setOption(this.line3Option);
|
||||
that.lineChart4.clear();
|
||||
that.lineChart4.setOption(this.line4Option);
|
||||
})
|
||||
that.lineChart3.clear();
|
||||
that.lineChart3.setOption(that.line3Option);
|
||||
that.lineChart4.clear();
|
||||
that.lineChart4.setOption(that.line4Option);
|
||||
})
|
||||
}else{
|
||||
this.$message.warning('请选择时间')
|
||||
}
|
||||
}else{
|
||||
this.$message.warning('请选择部门')
|
||||
}
|
||||
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
|
@ -806,7 +842,7 @@
|
|||
}
|
||||
.chartsWrap{
|
||||
/* margin-top: 30px; */
|
||||
padding-top: 50px;
|
||||
/* padding-top: 50px; */
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue