-
{{ percentage }}%
@@ -194,23 +194,55 @@ import 'animate.css';
export default {
data() {
return {
+ chartPieOption:{
+ backgroundColor: '',
+ tooltip: {
+ trigger: 'item'
+ },
+ legend: {
+ top:'bottom',
+ },
+ series: {
+ name: '完成率',
+ type: 'pie',
+ radius: '50%',
+ itemStyle: {
+ borderRadius: 2
+ },
+ center: ['50%', '45%'],
+ data: [],
+ emphasis: {
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ }
+ }
+ },
+ dept7Data:[
+ { value: 0, name: '炸纹' },
+ { value: 0, name: '条纹' },
+ { value: 0, name: '气泡' },
+ { value: 0, name: '弯曲' },
+ { value: 0, name: '其他' },
+ { value: 0, name: '合格' },
+ ],
+ dept10Data:[
+ { value: 0, name: '椭圆弯曲' },
+ { value: 0, name: '大小头' },
+ { value: 0, name: '偏壁' },
+ { value: 0, name: '结石' },
+ { value: 0, name: '气线' },
+ { value: 0, name: '合格' },
+ ],
blockHeight: null,
taskBoard: {
header: ['名称', '规格', '数量'],
headerBGC: 'rgb(10,63,68)',
// waitTime: 1000,
columnWidth: [1, 1, 1],
- data: [
- ['ZB2-1', '500*30', '30000'],
- ['ZB2-2', '500*30', '40000'],
- ['ZB2-3', '500*30', '50000'],
- ['ZJ2-1', '500*30', '35000'],
- ['ZJ2-2', '500*30', '30000'],
- ['ZJ2-3', '500*30', '100'],
- ['ZT2-1', '500*30', '100'],
- ['ZT2-2', '500*30', '100'],
- ['ZT2-3', '500*30', '100'],
- ],
+ data: [],
index: true,
columnWidth: [50],
align: ['center'],
@@ -251,7 +283,23 @@ export default {
currentObj: {
deptName: ''
},
+ deprName:'10车间',
heightTimer: null,
+ countOk_AVG:0,
+ countOk_dept7:0,
+ countOk_dept10:0,
+ blockTableHeight:0,
+ weekDateList:[],
+ //表一数据
+ saleOutdept6:[0,0,0,0,0,0,0],
+ saleOutAVG:[0,0,0,0,0,0,0],
+ //表二数据
+ countOkAVG:[0,0,0,0,0,0,0],
+ countOkDept7:[0,0,0,0,0,0,0],
+ countOkDept10:[0,0,0,0,0,0,0],
+ //表三数据
+ countRateDept7:[0,0,0,0,0,0,0],
+ countRateDept10:[0,0,0,0,0,0,0],
}
},
mounted() {
@@ -280,21 +328,446 @@ export default {
let weekLast = 7 - week;//最后一天对应的天数
let first = new Date(new Date(cDate.getTime() - (weekFirst * ondDayTime)));//本周周一
let last = new Date(new Date(cDate.getTime() + (weekLast * ondDayTime)));//本周周日
+ let dateArr = [];
+ for(let i=0;i<7;i++){
+ let itemDate = new Date(first.getTime()-i*ondDayTime);
+ let item = itemDate.getFullYear() + '-' + (itemDate.getMonth() + 1) + '-' + itemDate.getDate();
+ dateArr.push(item);
+ }
+ console.log(dateArr)
+ this.weekDateList = dateArr;
this.start_date = first.getFullYear() + '-' + (first.getMonth() + 1) + '-' + first.getDate();
this.end_date = last.getFullYear() + '-' + (last.getMonth() + 1) + '-' + last.getDate();
this.getsaleOut();
+ this.getPlanRate();
+ this.getAVGDayData();
+ this.getMaterialList();
},
methods: {
+ //本周6车间交付数----棒管交付数
getsaleOut() {
let that = this;
let obj = {
- query: { start_date: this.start_date, end_date: this.end_date, dept_name: "6车间" },
+ query: { start_date: that.start_date, end_date: that.end_date},
};
- that.$API.bi.dataset.exec.req('3448456854219546624', obj).then((res) => {
- // console.log(res);
- // debugger;
+ that.$API.bi.dataset.exec.req('saleOutDay', obj).then((res6) => {
+ let list = res6.data2.ds0;
+ let saleOutdept6 = [0,0,0,0,0,0,0];//棒管交付数
+ if(list.length>0){
+ list.forEach(item => {
+ let date = item.年+'-'+item.月+'-'+item.日;
+ let index = this.weekDateList.indexOf(date);
+ saleOutdept6[index] = item.交付数;
+ });
+ }
+ that.saleOutAVG = saleOutAVG;
+ that.getAVGDayData();
});
},
+ //获取AVG的交付数$合格数
+ getAVGDayData(){
+ let that = this;
+ this.$API.wpm.otherlog.list.req({product:'AVG',page:0,handle_date__gte: that.start_date,handle_date__lte: that.end_date}).then(res=>{
+ let list = res;
+ let count_ok = 0,saleOutAVG = [0,0,0,0,0,0,0],countOkAVG= [0,0,0,0,0,0,0];
+ if(list.length>0){
+ list.forEach(item=>{
+ count_ok=count_ok+item.count_ok;
+ let index = this.weekDateList.indexOf(item.handle_date);
+ saleOutAVG[index] = item.count_delivered;
+ countOkAVG[index] = item.count_ok;
+ })
+ that.saleOutAVG = saleOutAVG;
+ that.countOkAVG = countOkAVG;
+ that.countOk_AVG = count_ok;
+ }
+ that.getCountDept7();
+ //左1---本周交付数
+ let chartDom = document.getElementById('line1');
+ chartDom.style.height = this.blockHeight;
+ let myChart = echarts.init(chartDom);
+ let option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'cross',
+ label: {
+ backgroundColor: '#6a7985'
+ }
+ }
+ },
+ legend: {
+ icon: "stack",
+ top: 5,
+ right: 5,
+ data: [
+ {
+ backgroundColor: 'rgb(1,235,239)',
+ name: '预制棒管',
+
+ textStyle: {
+ color: '#fff'
+ },
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgb(250,205,0)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(254,129,0)'
+ }
+ ])
+ }
+ }, {
+ name: 'AVG',
+ textStyle: {
+ color: '#fff'
+ },
+ itemStyle: {
+ // color:'rgb(1,235,239)',
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgb(1,235,239)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(5, 158, 163)'
+ }])
+ },
+ }],
+ },
+ grid: {
+ left: '2%',
+ right: '4%',
+ bottom: '5%',
+ containLabel: true
+ },
+ xAxis:{
+ type: 'category',
+ data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+ nameTextStyle: {
+ color: '#ffffff'
+ },
+ axisLabel: {
+ color: '#ffffff'
+ },
+ },
+ yAxis:{
+ name: "",
+ type: 'value',
+ nameTextStyle: {
+ color: '#ffffff'
+ },
+ axisLabel: {
+ color: '#ffffff'
+ },
+ splitLine: {
+ show: false,
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ type: 'dashed', //y轴分割线类型
+ color: 'rgba(102,102,102,0.9)',
+ width: 1,
+ },
+ },
+ },
+ series: [
+ {
+ name: '预制棒管',
+ type: 'line',
+ stack: 'Total',
+ smooth: true,
+ lineStyle: {
+ width: 1, color: 'rgb(1,235,239)'
+ },
+
+ showSymbol: false,
+ areaStyle: {
+ opacity: 0.8,
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgba(1,235,239)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(5, 158, 163)'
+ }
+ ])
+ },
+ emphasis: {
+ focus: 'series'
+ },
+ data: that.saleOutdept6
+ },
+ {
+ name: 'AVG',
+ type: 'line',
+ stack: 'Total',
+ smooth: true,
+ lineStyle: {
+ width: 1, color: 'rgb(250,205,0)'
+ },
+ showSymbol: false,
+ areaStyle: {
+ opacity: 0.8,
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgb(254,129,0)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(250,205,0)'
+ }
+ ])
+ },
+ emphasis: {
+ focus: 'series'
+ },
+ data: that.saleOutAVG
+ },
+ ]
+ };
+ myChart.setOption(option);
+ })
+ },
+ //7车间合格数&&合格率
+ getCountDept7(){
+ let that = this;
+ let obj = {
+ query: { start_date: that.start_date, end_date: that.end_date,dept_name: "7车间"},
+ };
+ that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => {
+ let list = res.data2.ds0;
+ let countOkDept7 = [0,0,0,0,0,0,0],countRateDept7 = [0,0,0,0,0,0,0];
+ let value0=0,value1=0,value2=0,value3=0,value4=0,value5=0,countOk_dept7=0;
+ if(list.length>0){
+ list.forEach(item => {
+ let date = item.年+'-'+item.月+'-'+item.日;
+ let index = this.weekDateList.indexOf(date);
+ countOkDept7[index] = item.合格数;
+ countRateDept7[index] = item.合格率;
+ countOk_dept7 = countOk_dept7+item.合格数;
+ that.dept7Data[0].value= that.dept7Data[0].value+item.炸纹;
+ that.dept7Data[1].value= that.dept7Data[1].value+item.条纹;
+ that.dept7Data[2].value= that.dept7Data[2].value+item.气泡;
+ that.dept7Data[3].value= that.dept7Data[3].value+item.弯曲;
+ that.dept7Data[4].value= that.dept7Data[4].value+item.其他;
+ that.dept7Data[5].value= that.dept7Data[5].value+item.合格数;
+ });
+ }
+ that.countOkDept7 = countOkDept7;
+ that.countRateDept7 = countRateDept7;
+ that.countOk_dept7 = countOk_dept7;
+ that.getCountDept10();
+ });
+ },
+ //10车间合格数&&合格率
+ getCountDept10(){
+ let that = this;
+ let obj = {
+ query: { start_date: that.start_date, end_date: that.end_date,dept_name: "10车间"},
+ };
+ that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => {
+ console.log('res10',res10);
+ let list = res.data2.ds0;
+ let countOkDept10 = [0,0,0,0,0,0,0],countRateDept10 = [0,0,0,0,0,0,0];
+ let value0=0,value1=0,value2=0,value3=0,value4=0,value5=0,countOk_dept10=0;
+ if(list.length>0){
+ list.forEach(item => {
+ let date = item.年+'-'+item.月+'-'+item.日;
+ let index = this.weekDateList.indexOf(date);
+ countOkDept10[index] = item.合格数;
+ countRateDept10[index] = item.合格率;
+ countOk_dept10 = countOk_dept10+item.合格数;
+ that.dept10Data[0].value= that.dept10Data[0].value+item.弯曲;
+ that.dept10Data[1].value= that.dept10Data[1].value+item.大小头;
+ that.dept10Data[2].value= that.dept10Data[2].value+item.偏壁;
+ that.dept10Data[3].value= that.dept10Data[3].value+item.结石;
+ that.dept10Data[4].value= that.dept10Data[4].value+item.气线;
+ that.dept10Data[5].value= that.dept10Data[5].value+item.合格数;
+ });
+ }
+ that.countOkDept10 = countOkDept10;
+ that.countRateDept10 = countRateDept10;
+ that.countOk_dept10 = countOk_dept10;
+ that.initChart();
+ });
+ },
+ //本周计划完成度
+ getPlanRate(){
+ let that = this;
+ let obj = {
+ query: { start_date: that.start_date, end_date: that.end_date,dept_name: that.deprName},
+ };
+ that.$API.bi.dataset.exec.req('productStatistic', obj).then((res) => {
+ let list = res.data2.ds0;
+ let PlanRate = [0,0,0,0,0,0,0];
+ if(list.length>0){
+ list.forEach(item => {
+ let date = item.年+'-'+item.月+'-'+item.日;
+ let index = this.weekDateList.indexOf(date);
+ PlanRate[index] = Math.round((item.合格数/item.任务数)*100) ;
+ });
+ }
+ //柱状图折线
+ let line3Dom = document.getElementById('line3');
+ line3Dom.style.height = this.blockHeight;
+ let line3Chart = echarts.init(line3Dom);
+ let line3option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'cross',
+ crossStyle: {
+ color: '#999'
+ }
+ }
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ legend: {
+ right: 0,
+ data: ['数量', '合格率'],
+ textStyle: {
+ color: '#fff'
+ }
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+ axisPointer: {
+ type: 'shadow'
+ },
+ nameTextStyle: {
+ color: '#ffffff'
+ },
+ axisLabel: {
+ color: '#ffffff'
+ },
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value',
+ name: '完成度',
+ min: 0,
+ interval: 50,
+ nameTextStyle: {
+ color: '#ffffff',
+ formatter: '{value} %',
+ },
+ axisLabel: {
+ color: '#ffffff'
+ },
+ splitLine: {
+ show: false,
+ },
+ },
+ // {
+ // type: 'value',
+ // name: '完成度',
+ // min: 0,
+ // max: 100,
+ // interval: 20,
+ // axisLabel: {
+ // formatter: '{value} %',
+ // color: '#ffffff'
+ // },
+ // nameTextStyle: {
+ // color: '#ffffff'
+ // },
+ // splitLine: {
+ // show: false,
+ // },
+ // }
+ ],
+ series: [
+ {
+ name: '完成度',
+ type: 'bar',
+ tooltip: {
+ valueFormatter: function (value) {
+ return value;
+ }
+ },
+ barWidth: 15,
+ data:PlanRate,
+ itemStyle: {
+ borderRadius: [5, 5, 0, 0],
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgb(13,176,176)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(246,163,58)'
+ }])
+ },
+ },
+ // {
+ // name: '合格率',
+ // type: 'line',
+ // yAxisIndex: 1,
+ // // 255,120,0
+ // tooltip: {
+ // valueFormatter: function (value) {
+ // return value;
+ // }
+ // },
+ // symbol: 'circle',
+ // symbolSize: 8,
+ // itemStyle: {
+ // // 设置symbol的颜色
+ // color: 'rgb(255,120,0)'
+ // },
+ // lineStyle: {
+ // color: 'rgb(255,120,0)'
+ // },
+ // data: [63, 80, 71, 82, 60, 70, 85],
+ // }
+ ]
+ };
+ line3Chart.setOption(line3option);
+ })
+ },
+ //库存情况
+ getMaterialList() {
+ let that = this;
+ this.$API.mtm.material.list.req({ page: 0, type: 10 }).then(res => {
+ let data = [];
+ if(res.length>0){
+ res.forEach(item => {
+ let arr = [];
+ let colorText='';
+ if(item.count_safe!==null&&item.count_safe'
+ }else{
+ colorText=''+item.count+''
+ }
+ arr[0] = item.full_name;
+ arr[1] = item.specification;//规格
+ // arr[2] = item.model;//型号
+ arr[2] = item.count;
+ data.push(arr)
+ });
+ }
+ that.taskBoard.data = data;
+ console.log('getMaterialList',data)
+ })
+ },
showTime() {
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss');
this.currentWeek = this.$TOOL.dateFormat(new Date(), 'week');
@@ -469,7 +942,7 @@ export default {
loadedPercent = parseInt(evt.loaded * 100 / evt.total);
} else {
var dlCount = evt.loaded / (1024 * 1024);
- loadedPercent = Math.floor(dlCount * 100.0) / 100.0;
+ loadedPercent = Math.round(dlCount * 100.0) / 100.0;
}
that.loadedPercent = loadedPercent;
})
@@ -601,170 +1074,7 @@ export default {
}
},
initChart() {
- //左1
- let chartDom = document.getElementById('line1');
- chartDom.style.height = this.blockHeight;
- let myChart = echarts.init(chartDom);
- let option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- },
- legend: {
- icon: "stack",
- top: 5,
- right: 5,
- data: [
- {
- backgroundColor: 'rgb(1,235,239)',
- name: '预制棒管',
-
- textStyle: {
- color: '#fff'
- },
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(250,205,0)'
- },
- {
- offset: 1,
- color: 'rgb(254,129,0)'
- }
- ])
- }
- }, {
- name: 'AVG',
- textStyle: {
- color: '#fff'
- },
- itemStyle: {
- // color:'rgb(1,235,239)',
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(1,235,239)'
- },
- {
- offset: 1,
- color: 'rgb(5, 158, 163)'
- }])
- },
- }],
-
- },
- toolbox: {
- feature: {
- // saveAsImage: {}
- }
- },
- grid: {
- left: '2%',
- right: '4%',
- bottom: '5%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
- nameTextStyle: {
- color: '#ffffff'
- },
- axisLabel: {
- color: '#ffffff'
- },
- }
- ],
- yAxis: [
- {
- name: "交付数(个)",
- type: 'value',
- nameTextStyle: {
- color: '#ffffff'
- },
- axisLabel: {
- color: '#ffffff'
- },
- splitLine: {
- show: false,
- },
- splitLine: {
- show: false,
- lineStyle: {
- type: 'dashed', //y轴分割线类型
- color: 'rgba(102,102,102,0.9)',
- width: 1,
- },
- },
- }
- ],
- series: [
- {
- name: '预制棒管',
- type: 'line',
- stack: 'Total',
- smooth: true,
- lineStyle: {
- width: 1, color: 'rgb(1,235,239)'
- },
-
- showSymbol: false,
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgba(1,235,239)'
- },
- {
- offset: 1,
- color: 'rgb(5, 158, 163)'
- }
- ])
- },
- emphasis: {
- focus: 'series'
- },
- data: [140, 232, 101, 264, 90, 340, 250]
- },
- {
- name: 'AVG',
- type: 'line',
- stack: 'Total',
- smooth: true,
- lineStyle: {
- width: 1, color: 'rgb(250,205,0)'
- },
- showSymbol: false,
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(254,129,0)'
- },
- {
- offset: 1,
- color: 'rgb(250,205,0)'
- }
- ])
- },
- emphasis: {
- focus: 'series'
- },
- data: [120, 282, 111, 234, 220, 340, 310]
- },
- ]
- };
- myChart.setOption(option);
+ let that = this;
//左边2
let bar1 = document.getElementById('bar1');
bar1.style.height = this.blockHeight;
@@ -843,21 +1153,18 @@ export default {
bottom: '5%',
containLabel: true
},
- xAxis: [
- {
- type: 'category',
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
- nameTextStyle: {
- color: '#ffffff'
- },
- axisLabel: {
- color: '#ffffff'
- },
- }
- ],
- yAxis: [
- {
- name: "合格数(个)",
+ xAxis:{
+ type: 'category',
+ data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+ nameTextStyle: {
+ color: '#ffffff'
+ },
+ axisLabel: {
+ color: '#ffffff'
+ },
+ },
+ yAxis: {
+ name: "",
type: 'value',
nameTextStyle: {
color: '#ffffff'
@@ -868,8 +1175,7 @@ export default {
splitLine: {
show: false
},
- }
- ],
+ },
series: [
{
name: '预制棒',
@@ -891,7 +1197,7 @@ export default {
}])
},
barWidth: 15,
- data: [120, 132, 101, 134, 90, 230, 300]
+ data: that.countOkDept7
},
{
name: '预制管',
@@ -913,7 +1219,7 @@ export default {
}
])
},
- data: [220, 182, 191, 234, 290, 330, 200]
+ data: that.countOkDept10
},
{
name: 'AVG',
@@ -935,7 +1241,7 @@ export default {
}
])
},
- data: [220, 182, 191, 234, 290, 330, 150]
+ data:that.countOkAVG
}
]
};
@@ -994,9 +1300,8 @@ export default {
bottom: '5%',
containLabel: true
},
- xAxis: {
+ xAxis:{
type: 'category',
- boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
nameTextStyle: {
color: '#ffffff'
@@ -1004,7 +1309,6 @@ export default {
axisLabel: {
color: '#ffffff'
},
-
},
yAxis: {
name: '合格率(%)',
@@ -1024,7 +1328,6 @@ export default {
},
},
},
-
series: [
{
name: '预制棒',
@@ -1034,20 +1337,18 @@ export default {
symbol: 'circle',
itemStyle: {
// 设置symbol的颜色
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'orange'
- },
- {
- offset: 1,
- color: 'yellow'
- }])
- }
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'orange'
+ },
+ {
+ offset: 1,
+ color: 'yellow'
+ }])
},
smooth: 0.5, // 设置折线弧度
- data: [75, 60, 80, 78, 66, 71, 81],
+ data: that.countRateDept7,
lineStyle: {
color: {
type: 'linear',
@@ -1072,20 +1373,18 @@ export default {
symbol: 'circle',
itemStyle: {
// 设置symbol的颜色
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(1,235,239)'
- },
- {
- offset: 1,
- color: 'rgb(5, 158, 163)'
- }])
- }
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgb(1,235,239)'
+ },
+ {
+ offset: 1,
+ color: 'rgb(5, 158, 163)'
+ }])
},
smooth: 0.5, // 设置折线弧度
- data: [65, 50, 70, 68, 55, 60, 69],
+ data: that.countRateDept10,
lineStyle: {
color: {
type: 'linear',
@@ -1105,132 +1404,6 @@ export default {
]
};
line2Chart.setOption(line2option);
- //柱状图折线
- let line3Dom = document.getElementById('line3');
- line3Dom.style.height = this.blockHeight;
- let line3Chart = echarts.init(line3Dom);
- let line3option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- legend: {
- right: 0,
- data: ['数量', '合格率'],
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: [
- {
- type: 'category',
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
- axisPointer: {
- type: 'shadow'
- },
- nameTextStyle: {
- color: '#ffffff'
- },
- axisLabel: {
- color: '#ffffff'
- },
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '数量',
- min: 0,
- interval: 50,
- nameTextStyle: {
- color: '#ffffff'
- },
- axisLabel: {
- color: '#ffffff'
- },
- splitLine: {
- show: false,
- },
- },
- {
- type: 'value',
- name: '合格率',
- min: 0,
- max: 100,
- interval: 20,
- axisLabel: {
- formatter: '{value} %',
- color: '#ffffff'
- },
- nameTextStyle: {
- color: '#ffffff'
- },
- splitLine: {
- show: false,
- },
- }
- ],
- series: [
- {
- name: '数量',
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value;
- }
- },
- barWidth: 15,
- data: [220, 250, 280, 290, 250, 300, 210],
- itemStyle: {
- borderRadius: [5, 5, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(13,176,176)'
- },
- {
- offset: 1,
- color: 'rgb(246,163,58)'
- }])
- },
- },
- {
- name: '合格率',
- type: 'line',
- yAxisIndex: 1,
- // 255,120,0
- tooltip: {
- valueFormatter: function (value) {
- return value;
- }
- },
- symbol: 'circle',
- symbolSize: 8,
- itemStyle: {
- // 设置symbol的颜色
- normal: {
- color: 'rgb(255,120,0)'
- }
- },
- lineStyle: {
- color: 'rgb(255,120,0)'
- },
- data: [63, 80, 71, 82, 60, 70, 85],
- }
- ]
- };
- line3Chart.setOption(line3option);
//饼状图
let pieDom = document.getElementById('pie');
pieDom.style.height = this.blockHeight;
@@ -1238,8 +1411,7 @@ export default {
let pieoption = {
color: ['rgb(3,195,198)', 'rgb(155,248,249)', 'rgb(110,181,249)', 'rgb(205,248,248)', 'rgb(248,189,118)'],
legend: {
- bottom: 10,
- // top: 'bottom',
+ bottom: 1,
textStyle: {
color: '#fff'
}
@@ -1307,17 +1479,7 @@ export default {
dx: 0
}
},
-
- data: [
- { value: 250, name: '合格' },
- { value: 8, name: '椭圆弯曲' },
- { value: 0, name: '大小头' },
- { value: 2, name: '偏壁' },
- { value: 6, name: '结石' },
- { value: 6, name: '气线' },
-
-
- ]
+ data:that.dept7Data
}
]
};
diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue
index 78170772..d9d785ce 100644
--- a/src/views/home/widgets/index_photon.vue
+++ b/src/views/home/widgets/index_photon.vue
@@ -413,7 +413,7 @@ export default {
that.$API.bi.dataset.exec.req('lineDay', obj07).then((res07) => {
let list07 = res07.data2.ds0;
if(list07.length>0){
- this.tongbi7 =Math.floor((this.dayPassNum7- list07[0].合格数)/list07[0].合格数*100);
+ this.tongbi7 =Math.round((this.dayPassNum7- list07[0].合格数)/list07[0].合格数*100);
}
});
});
@@ -429,7 +429,7 @@ export default {
console.log('res10',res010);
let list010 = res010.data2.ds0;
if(list010.length>0){
- this.tongbi10 =Math.floor((this.dayPassNum10- list010[0].合格数)/list010[0].合格数*100);
+ this.tongbi10 =Math.round((this.dayPassNum10- list010[0].合格数)/list010[0].合格数*100);
}
});
});
@@ -443,7 +443,7 @@ export default {
that.$API.bi.dataset.exec.req('saleOutDay', obj06).then((res06) => {
let list06 = res06.data2.ds0;
if(list06.length>0){
- this.tongbi06 = Math.floor((this.dayPayNum6- list06[0].交付数)/list06[0].交付数*100);
+ this.tongbi06 = Math.round((this.dayPayNum6- list06[0].交付数)/list06[0].交付数*100);
}
});
});
@@ -473,7 +473,7 @@ export default {
});
rate = sum/list7.length;
}
- this.monthPassRate7 = Math.floor(rate) ;
+ this.monthPassRate7 = Math.round(rate) ;
// console.log('7车间本月合格率:',this.monthPassRate7);
// debugger;
});
@@ -488,7 +488,7 @@ export default {
});
rate = sum/list10.length;
}
- this.monthPassRate10 =Math.floor(rate) ;
+ this.monthPassRate10 =Math.round(rate) ;
// console.log('10车间本月合格率:',this.monthPassRate10);
// debugger;
});
@@ -529,8 +529,8 @@ export default {
count_ok0=count_ok0+item0.count_ok;
count_delivered0 = count_delivered0+item0.count_delivered;
})
- that.AVGOktongbi = Math.floor((count_ok-count_ok0)/count_ok0*100);
- that.AVGDelivertongbi = Math.floor((count_delivered-count_delivered0)/count_delivered0*100);
+ that.AVGOktongbi = Math.round((count_ok-count_ok0)/count_ok0*100);
+ that.AVGDelivertongbi = Math.round((count_delivered-count_delivered0)/count_delivered0*100);
}
})
}
@@ -553,7 +553,7 @@ export default {
});
this.monthPayNumAVG = sum;
if(count_real!=0){
- this.monthRateAVG = Math.floor((count_ok/count_real)*100)
+ this.monthRateAVG = Math.round((count_ok/count_real)*100)
}else{
this.monthRateAVG = 0;
}
@@ -576,7 +576,7 @@ export default {
xAxisData.push(dindex+'日')
for(let j=0;j
- {{ Math.floor(scope.row.count_ok / scope.row.count*100) }}%
+ {{ Math.round(scope.row.count_ok / scope.row.count*100) }}%
0