fix:生产检验统计右侧表格无数据以及左边环形图加lebel

This commit is contained in:
shijing 2024-03-22 13:50:01 +08:00
parent 6be565c499
commit cf0cc53df9
1 changed files with 22 additions and 6 deletions

View File

@ -163,6 +163,7 @@
</el-container>
</template>
<script>
const colors = ['rgb(64,158,255)','#FAFAD2','#EEE9BF','#EEDC82','#EED5B7','#EEC591','#EEAD0E','#EE9A00','#EE9572','#F08080'];
import scEcharts from '@/components/scEcharts';
export default {
name: 'chart',
@ -179,6 +180,7 @@ export default {
currentMonth: '',
typeOptions: ['月', '年'],
option1: {
color:colors,
title: {
text: '7车间',
// subtext: '',
@ -191,7 +193,11 @@ export default {
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '60%'],
label: false,
label: {
show: true,
position: 'outside',
formatter: '{b} : {c} ({d}%)',
},
data: [
{ value: 0, name: '合格数' },
{ value: 0, name: '炸纹' },
@ -203,6 +209,7 @@ export default {
}
},
option2: {
color:colors,
title: {
text: '10车间',
// subtext: '',
@ -215,7 +222,11 @@ export default {
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '60%'],
label: false,
label: {
show: true,
position: 'outside',
formatter: '{b} : {c} ({d}%)',
},
data: [
{ value: 0, name: '合格数' },
{ value: 0, name: '条纹' },
@ -228,6 +239,7 @@ export default {
}
},
option3: {
color:colors,
title: {
text: '退火',
// subtext: '',
@ -240,7 +252,11 @@ export default {
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '60%'],
label: false,
label: {
show: true,
position: 'outside',
formatter: '{b} : {c} ({d}%)',
},
data: [
{ value: 0, name: '合格数' },
{ value: 0, name: '椭圆/弯曲' },
@ -292,7 +308,7 @@ export default {
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log('退火车间统计:', res);
if (res2.data2.ds0) {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData8 = data;
} else {
@ -335,7 +351,7 @@ export default {
let exec = that.queryType == '月' ? 'lineMonth' : 'lineYear';
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log('7生产车间统计:', res);
if (res2.data2.ds0) {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData7 = data;
} else {
@ -373,7 +389,7 @@ export default {
let exec = that.queryType == '月' ? 'lineMonth' : 'lineYear';
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log('10生产车间统计:', res);
if (res2.data2.ds0) {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData10 = data;
} else {