日常监督质量目标任务记录导出部门报告数据变动我的报送页面变动
This commit is contained in:
parent
f466bcec47
commit
863f32b196
|
@ -234,15 +234,73 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<!-- 不准确报告 -->
|
<!-- 1\外部监督检查信息 -->
|
||||||
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
|
<el-card >
|
||||||
|
<div class="cardHead">
|
||||||
|
<span class="cardTitle">外部监督检查信息</span>
|
||||||
|
<div>
|
||||||
|
<el-button v-if="oinspectList.length==0" size="mini" type="primary" @click="handleNoNum('oinspect')">无记录</el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="handleImport('oinspect')">导入</el-button>
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('oinspect')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('oinspect','外部监督检查信息')">导出</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="oinspectList"
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
:height="tableHeight"
|
||||||
|
id="oinspect"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
|
<el-table-column label="检查类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ cateOptions[scope.row.cate] }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检查机构" prop="checker"></el-table-column>
|
||||||
|
<el-table-column label="检查日期" prop="date_inspect"></el-table-column>
|
||||||
|
<el-table-column label="检查结果" prop="result"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
width="80px"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['task2do'])"
|
||||||
|
type="primary"
|
||||||
|
@click="handleEdit('oinspect',scope.row)"
|
||||||
|
>编辑</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['task2do'])"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete('oinspect',scope.row)"
|
||||||
|
>删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<saveoin-dialog
|
||||||
|
v-if="dialogOin"
|
||||||
|
ref="saveOinDialog"
|
||||||
|
@success="oinSaveSuccess"
|
||||||
|
@closed="dialogOin = false"
|
||||||
|
>
|
||||||
|
</saveoin-dialog>
|
||||||
|
</el-col>
|
||||||
|
<!-- 2\不准确报告/证书 -->
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">不准确报告</span>
|
<span class="cardTitle">不准确报告/证书</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="rcList.length==0" size="mini" type="primary" @click="handleNoNum('rc')">无记录</el-button>
|
<el-button v-if="rcList.length==0" size="mini" type="primary" @click="handleNoNum('rc')">无记录</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport('rc')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('rc')">导入</el-button>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('rcList','不准确报告/证书')">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -251,6 +309,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
|
id="rcList"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="报告/证书编号" prop="number"></el-table-column>
|
<el-table-column label="报告/证书编号" prop="number"></el-table-column>
|
||||||
|
@ -278,15 +337,16 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 超期报告 -->
|
<!-- 3\超期报告/证书 -->
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">超期报告</span>
|
<span class="cardTitle">超期报告/证书</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="rc2List.length==0" size="mini" type="primary" @click="handleNoNum('rc2')">无记录</el-button>
|
<el-button v-if="rc2List.length==0" size="mini" type="primary" @click="handleNoNum('rc2')">无记录</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport('rc2')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('rc2')">导入</el-button>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc2')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc2')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('rc2','超期报告/证书')">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -295,6 +355,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
|
id="rc2"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="超期报告/证书编号" prop="number"></el-table-column>
|
<el-table-column label="超期报告/证书编号" prop="number"></el-table-column>
|
||||||
|
@ -329,7 +390,7 @@
|
||||||
>
|
>
|
||||||
</saverc-dialog>
|
</saverc-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 能力验证结果 -->
|
<!-- 4\能力验证结果 -->
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
|
@ -338,6 +399,7 @@
|
||||||
<el-button v-if="ptList.length==0" size="mini" type="primary" @click="handleNoNum('pt')">无记录</el-button>
|
<el-button v-if="ptList.length==0" size="mini" type="primary" @click="handleNoNum('pt')">无记录</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport('pt')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('pt')">导入</el-button>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('pt')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('pt')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('ptList','能力验证结果')">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -346,6 +408,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
|
id="ptList"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="能力验证名称" prop="name"></el-table-column>
|
<el-table-column label="能力验证名称" prop="name"></el-table-column>
|
||||||
|
@ -390,15 +453,16 @@
|
||||||
>
|
>
|
||||||
</savept-dialog>
|
</savept-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 客户投诉 -->
|
<!-- 5\客户投诉信息 -->
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">客户投诉</span>
|
<span class="cardTitle">客户投诉信息</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="complaintList.length==0" size="mini" type="primary" @click="handleNoNum('complaint')">无记录</el-button>
|
<el-button v-if="complaintList.length==0" size="mini" type="primary" @click="handleNoNum('complaint')">无记录</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport('complaint')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('complaint')">导入</el-button>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('complaint')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('complaint')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('complaint','客户投诉信息')">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -407,6 +471,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
|
id="complaint"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="投诉人/机构" prop="complainant"></el-table-column>
|
<el-table-column label="投诉人/机构" prop="complainant"></el-table-column>
|
||||||
|
@ -447,15 +512,16 @@
|
||||||
>
|
>
|
||||||
</savecom-dialog>
|
</savecom-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 风险识别 -->
|
<!-- 6\风险识别信息 -->
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">风险识别</span>
|
<span class="cardTitle">风险识别信息</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="riskList.length==0" size="mini" type="primary" @click="handleNoNum('risk')">无记录</el-button>
|
<el-button v-if="riskList.length==0" size="mini" type="primary" @click="handleNoNum('risk')">无记录</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport('risk')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('risk')">导入</el-button>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('risk')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('risk')"></el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="exportTableExcel('risk','风险识别信息')">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -464,6 +530,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
|
id="risk"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="风险事实描述" prop="content"></el-table-column>
|
<el-table-column label="风险事实描述" prop="content"></el-table-column>
|
||||||
|
@ -506,61 +573,7 @@
|
||||||
>
|
>
|
||||||
</saverisk-dialog>
|
</saverisk-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 外部监督检查 -->
|
|
||||||
<el-col :lg="12" :md="24" style="margin-top:10px">
|
|
||||||
<el-card >
|
|
||||||
<div class="cardHead">
|
|
||||||
<span class="cardTitle">外部监督检查</span>
|
|
||||||
<div>
|
|
||||||
<el-button v-if="oinspectList.length==0" size="mini" type="primary" @click="handleNoNum('oinspect')">无记录</el-button>
|
|
||||||
<el-button type="primary" size="mini" @click="handleImport('oinspect')">导入</el-button>
|
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('oinspect')"></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
:data="oinspectList"
|
|
||||||
fit
|
|
||||||
stripe
|
|
||||||
highlight-current-row
|
|
||||||
:height="tableHeight"
|
|
||||||
>
|
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
|
||||||
<el-table-column label="检查类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ cateOptions[scope.row.cate] }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="检查机构" prop="checker"></el-table-column>
|
|
||||||
<el-table-column label="检查日期" prop="date_inspect"></el-table-column>
|
|
||||||
<el-table-column label="检查结果" prop="result"></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
width="80px"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['task2do'])"
|
|
||||||
type="primary"
|
|
||||||
@click="handleEdit('oinspect',scope.row)"
|
|
||||||
>编辑</el-link>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['task2do'])"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDelete('oinspect',scope.row)"
|
|
||||||
>删除</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
<saveoin-dialog
|
|
||||||
v-if="dialogOin"
|
|
||||||
ref="saveOinDialog"
|
|
||||||
@success="oinSaveSuccess"
|
|
||||||
@closed="dialogOin = false"
|
|
||||||
>
|
|
||||||
</saveoin-dialog>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="impDialogVisible"
|
:visible.sync="impDialogVisible"
|
||||||
|
@ -614,7 +627,9 @@
|
||||||
import saveriskDialog from "./risk_form.vue";
|
import saveriskDialog from "./risk_form.vue";
|
||||||
import savecomDialog from "./complaint_form.vue";
|
import savecomDialog from "./complaint_form.vue";
|
||||||
import saveoinDialog from "./oinspect_form.vue";
|
import saveoinDialog from "./oinspect_form.vue";
|
||||||
import user from "@/store/modules/user";
|
import FileSaver from "file-saver";
|
||||||
|
import * as XLSX from "xlsx";
|
||||||
|
import user from "@/store/modules/user";
|
||||||
const defaulttask = {
|
const defaulttask = {
|
||||||
year: "",
|
year: "",
|
||||||
cycle: "",
|
cycle: "",
|
||||||
|
@ -709,7 +724,7 @@ import user from "@/store/modules/user";
|
||||||
10:'市场监管部门检查',
|
10:'市场监管部门检查',
|
||||||
20:'行业主管部门检查',
|
20:'行业主管部门检查',
|
||||||
30:'其他检查'
|
30:'其他检查'
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
@ -720,6 +735,30 @@ import user from "@/store/modules/user";
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
exportTableExcel (id,name) {
|
||||||
|
let filename = name+'.xlsx';
|
||||||
|
var wb = XLSX.utils.table_to_book(document.getElementById(id),{row:true})
|
||||||
|
console.log(wb.Sheets)
|
||||||
|
console.log(wb.Sheets.Sheet1)
|
||||||
|
console.log(wb.Sheets.Sheet1.nrows)
|
||||||
|
console.log(wb.Sheets.Sheet1.ncols)
|
||||||
|
// wb.Sheets.Sheet1['!cols'][0]={hidden:true}
|
||||||
|
// if(id=='ptList'){
|
||||||
|
// wb.Sheets.Sheet1['!cols'][7]={hidden:true}
|
||||||
|
// }else if(id=='complaint'){
|
||||||
|
// wb.Sheets.Sheet1['!cols'][6]={hidden:true}
|
||||||
|
// }else{
|
||||||
|
// wb.Sheets.Sheet1.F1 = {hidden:true}
|
||||||
|
// wb.Sheets.Sheet1['!cols'][5]={hidden:true}
|
||||||
|
// }
|
||||||
|
var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename)
|
||||||
|
} catch (e) { if (typeof console !== 'undefined') console.log(e, wbout)}
|
||||||
|
return wbout
|
||||||
|
},
|
||||||
checkPermission,
|
checkPermission,
|
||||||
getOrgList() {
|
getOrgList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -796,6 +835,14 @@ import user from "@/store/modules/user";
|
||||||
that.subData = [];
|
that.subData = [];
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
let obj = item;
|
let obj = item;
|
||||||
|
let goal_value_a = item.goal_value_a+'';
|
||||||
|
if(item.goal_name=='重大质量事故'){
|
||||||
|
}else{
|
||||||
|
if(goal_value_a.indexOf('.')>-1){}else{
|
||||||
|
goal_value_a = goal_value_a+'.0';
|
||||||
|
obj.goal_value_a = goal_value_a;
|
||||||
|
}
|
||||||
|
}
|
||||||
obj.fileLists = [];
|
obj.fileLists = [];
|
||||||
if(item.goal_file!==null){
|
if(item.goal_file!==null){
|
||||||
let file = {};
|
let file = {};
|
||||||
|
|
|
@ -618,131 +618,139 @@
|
||||||
let data = res.data.filter(item=>{
|
let data = res.data.filter(item=>{
|
||||||
return item.task2_.type==20
|
return item.task2_.type==20
|
||||||
});
|
});
|
||||||
data.forEach(element => {
|
if(data.length>0){
|
||||||
let obj = element;
|
data.forEach(element => {
|
||||||
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
let obj = element;
|
||||||
let rate1 = ((element.num_issue-element.num_error)/element.num_issue).toFixed(4)
|
let sjwc = null;
|
||||||
obj.rate1 = parseFloat(Number(rate1)*100).toFixed(2);
|
if(element.num_expect!==null){
|
||||||
}else{
|
if(element.num_overdue!==null){
|
||||||
obj.rate1 = ''
|
sjwc = element.num_expect-element.num_overdue;
|
||||||
}
|
}else{
|
||||||
if(element.num_expect!==null&&element.num_issue!==null&&element.num_expect!==0){
|
sjwc = element.num_expect;
|
||||||
let rate2 = (element.num_issue/element.num_expect).toFixed(4)
|
}
|
||||||
obj.rate2 = parseFloat(Number(rate2)*100).toFixed(2);
|
|
||||||
}
|
|
||||||
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 = parseFloat(Number(rate3)*100).toFixed(2);
|
|
||||||
}
|
|
||||||
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 = parseFloat(Number(rate4)*100).toFixed(2);
|
|
||||||
}
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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][6]-that.tableDatas[2][6])/that.tableDatas[1][6]).toFixed(4)
|
|
||||||
}else if(k==6){
|
|
||||||
num = (that.tableDatas[5][6]/that.tableDatas[4][6]).toFixed(4)
|
|
||||||
}else if(k==9){
|
|
||||||
num =(that.tableDatas[8][6]/that.tableDatas[7][6]).toFixed(4)
|
|
||||||
}else if(k==12){
|
|
||||||
num = (that.tableDatas[11][6]/that.tableDatas[10][6]).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){
|
|
||||||
console.log(parseFloat((Number(num)*100)))
|
|
||||||
let numbe = parseFloat(Number(num)*100).toFixed(2);;
|
|
||||||
that.tableDatas[k][6] = numbe;
|
|
||||||
}else{
|
}else{
|
||||||
that.tableDatas[k][6] = num;
|
sjwc = null;
|
||||||
|
}
|
||||||
|
obj.sjwc = sjwc ;
|
||||||
|
let rate1= 1, rate2= 1, rate3= 1, rate4= 1;
|
||||||
|
try{
|
||||||
|
rate1 = (element.num_issue-element.num_error)/element.num_issue;
|
||||||
|
}catch{}
|
||||||
|
try{
|
||||||
|
rate2 = sjwc/element.num_expect;
|
||||||
|
}catch{}
|
||||||
|
try{
|
||||||
|
rate3 = element.num_pt_10/element.num_pt;
|
||||||
|
}catch{}
|
||||||
|
try{
|
||||||
|
rate4 = element.num_complaint_10/element.num_complaint;
|
||||||
|
}catch{}
|
||||||
|
console.log(rate1,rate2,rate3,rate4)
|
||||||
|
rate1 = isNaN(rate1)?'':rate1;
|
||||||
|
rate2 = isNaN(rate2)?'':rate2;
|
||||||
|
rate3 = isNaN(rate3)?'':rate3;
|
||||||
|
rate4 = isNaN(rate4)?'':rate4;
|
||||||
|
obj.rate1 = rate1!==''?parseFloat(Number(rate1.toFixed(4))*100).toFixed(2):'';
|
||||||
|
obj.rate2 = rate2!==''?parseFloat(Number(rate2.toFixed(4))*100).toFixed(2):'';
|
||||||
|
obj.rate3 = rate3!==''?parseFloat(Number(rate3.toFixed(4))*100).toFixed(2):'';
|
||||||
|
obj.rate4 = rate4!==''?parseFloat(Number(rate4.toFixed(4))*100).toFixed(2):'';
|
||||||
|
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.sjwc:
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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][6]-that.tableDatas[2][6])/that.tableDatas[1][6]).toFixed(4)
|
||||||
|
}else if(k==6){
|
||||||
|
num = (that.tableDatas[5][6]/that.tableDatas[4][6]).toFixed(4)
|
||||||
|
}else if(k==9){
|
||||||
|
num =(that.tableDatas[8][6]/that.tableDatas[7][6]).toFixed(4)
|
||||||
|
}else if(k==12){
|
||||||
|
num = (that.tableDatas[11][6]/that.tableDatas[10][6]).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){
|
||||||
|
console.log(parseFloat((Number(num)*100)))
|
||||||
|
let numbe = parseFloat(Number(num)*100).toFixed(2);
|
||||||
|
that.tableDatas[k][6] = numbe;
|
||||||
|
}else{
|
||||||
|
that.tableDatas[k][6] = num;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// that.tableDatas[k][6] = parseFloat(100).toFixed(2);
|
||||||
|
that.tableDatas[k][6] = ''
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
that.tableDatas[k][6] = ''
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for(let i=0;i<6;i++){
|
for(let i=0;i<6;i++){
|
||||||
if(that.tableDatas[1][i]!==undefined){
|
if(that.tableDatas[1][i]!==undefined){
|
||||||
that.bar1Data.push(Number(that.tableDatas[1][i]))
|
that.bar1Data.push(Number(that.tableDatas[1][i]))
|
||||||
}else{
|
}else{
|
||||||
that.bar1Data.push(0)
|
that.bar1Data.push(0)
|
||||||
}
|
}
|
||||||
if(that.tableDatas[4][i]!==undefined){
|
if(that.tableDatas[4][i]!==undefined){
|
||||||
that.bar2Data.push(Number(that.tableDatas[4][i]))
|
that.bar2Data.push(Number(that.tableDatas[4][i]))
|
||||||
}else{
|
}else{
|
||||||
that.bar2Data.push(0)
|
that.bar2Data.push(0)
|
||||||
}
|
}
|
||||||
if(that.tableDatas[3][i]!==undefined){
|
if(that.tableDatas[3][i]!==undefined){
|
||||||
that.line1Data.push(Number(that.tableDatas[3][i]))
|
that.line1Data.push(Number(that.tableDatas[3][i]))
|
||||||
}else{
|
}else{
|
||||||
that.line1Data.push(0)
|
that.line1Data.push(0)
|
||||||
}
|
}
|
||||||
if(that.tableDatas[6][i]!==undefined){
|
if(that.tableDatas[6][i]!==undefined){
|
||||||
that.line2Data.push(Number(that.tableDatas[6][i]))
|
that.line2Data.push(Number(that.tableDatas[6][i]))
|
||||||
}else{
|
}else{
|
||||||
that.line2Data.push(0)
|
that.line2Data.push(0)
|
||||||
}
|
}
|
||||||
if(that.tableDatas[9][i]!==undefined){
|
if(that.tableDatas[9][i]!==undefined){
|
||||||
that.line3Data.push(Number(that.tableDatas[9][i]))
|
that.line3Data.push(Number(that.tableDatas[9][i]))
|
||||||
}else{
|
}else{
|
||||||
that.line3Data.push(0)
|
that.line3Data.push(0)
|
||||||
}
|
}
|
||||||
if(that.tableDatas[12][i]!==undefined){
|
if(that.tableDatas[12][i]!==undefined){
|
||||||
that.line4Data.push(Number(that.tableDatas[12][i]))
|
that.line4Data.push(Number(that.tableDatas[12][i]))
|
||||||
}else{
|
}else{
|
||||||
that.line4Data.push(0)
|
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;
|
||||||
}
|
}
|
||||||
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;
|
|
||||||
|
|
||||||
that.barChart1.clear();
|
that.barChart1.clear();
|
||||||
that.barChart1.setOption(that.bar1Option);
|
that.barChart1.setOption(that.bar1Option);
|
||||||
that.barChart2.clear();
|
that.barChart2.clear();
|
||||||
|
|
Loading…
Reference in New Issue