|
@@ -2,113 +2,222 @@
|
|
|
<div id="up1">
|
|
<div id="up1">
|
|
|
<div class="bg-color-black">
|
|
<div class="bg-color-black">
|
|
|
<div class="d-flex pt-1 pl-2 jc-center">
|
|
<div class="d-flex pt-1 pl-2 jc-center">
|
|
|
- <span class="fs-xxl text mx-2 fw-b">当日车间各工序直通率</span>
|
|
|
|
|
|
|
+ <span class="fs-xxxl text mx-2 fw-b">近7天来料合格率</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="body-box ranking ai-center flex-column">
|
|
|
|
|
- <dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" ref="scroll-ranking-board"/>
|
|
|
|
|
|
|
+ <div class="body-box">
|
|
|
|
|
+ <div class="pt-2 " >
|
|
|
|
|
+ <Bottom1Chart :linedata="linedata" />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-
|
|
|
|
|
|
|
+import Bottom1Chart from "../../components/warehousechart/bottom1Chart";
|
|
|
import {mapState} from "vuex";
|
|
import {mapState} from "vuex";
|
|
|
-
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ Bottom1Chart
|
|
|
|
|
+ },
|
|
|
computed: {
|
|
computed: {
|
|
|
- ...mapState(['factory']),
|
|
|
|
|
|
|
+ //数组写法
|
|
|
|
|
+ ...mapState(['user','factoryoptions','factory']),
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- timing:null,
|
|
|
|
|
- ranking: {
|
|
|
|
|
- data: [],
|
|
|
|
|
- carousel: 'single',
|
|
|
|
|
- rowNum:6,
|
|
|
|
|
- unit: '%',
|
|
|
|
|
- sort:false,
|
|
|
|
|
- mindata:0,
|
|
|
|
|
|
|
+ colorList: {
|
|
|
|
|
+ linearYtoG: {
|
|
|
|
|
+ type: 'linear',
|
|
|
|
|
+ x: 0,
|
|
|
|
|
+ y: 0,
|
|
|
|
|
+ x2: 1,
|
|
|
|
|
+ y2: 1,
|
|
|
|
|
+ colorStops: [
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 0,
|
|
|
|
|
+ color: '#f5b44d'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 1,
|
|
|
|
|
+ color: '#28f8de'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ linearGtoB: {
|
|
|
|
|
+ type: 'linear',
|
|
|
|
|
+ x: 0,
|
|
|
|
|
+ y: 0,
|
|
|
|
|
+ x2: 1,
|
|
|
|
|
+ y2: 0,
|
|
|
|
|
+ colorStops: [
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 0,
|
|
|
|
|
+ color: '#43dfa2'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 1,
|
|
|
|
|
+ color: '#28f8de'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ linearBtoG: {
|
|
|
|
|
+ type: 'linear',
|
|
|
|
|
+ x: 0,
|
|
|
|
|
+ y: 0,
|
|
|
|
|
+ x2: 1,
|
|
|
|
|
+ y2: 0,
|
|
|
|
|
+ colorStops: [
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 0,
|
|
|
|
|
+ color: '#1c98e8'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 1,
|
|
|
|
|
+ color: '#28f8de'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ areaBtoG: {
|
|
|
|
|
+ type: 'linear',
|
|
|
|
|
+ x: 0,
|
|
|
|
|
+ y: 0,
|
|
|
|
|
+ x2: 0,
|
|
|
|
|
+ y2: 1,
|
|
|
|
|
+ colorStops: [
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 0,
|
|
|
|
|
+ color: 'rgba(35,184,210,.2)'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ offset: 1,
|
|
|
|
|
+ color: 'rgba(35,184,210,0)'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
+ linedata :{
|
|
|
|
|
+ series : null,
|
|
|
|
|
+ xAxiss :null,
|
|
|
|
|
+ interval :15,
|
|
|
|
|
+ min:0
|
|
|
|
|
+ },
|
|
|
|
|
+ timing:null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- components: {},
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.refreshdata();
|
|
|
|
|
|
|
+ this.refreshdata()
|
|
|
},
|
|
},
|
|
|
beforeDestroy () {
|
|
beforeDestroy () {
|
|
|
clearInterval(this.timing)
|
|
clearInterval(this.timing)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
refreshdata() {
|
|
refreshdata() {
|
|
|
- this.settestdata(); //获取数据
|
|
|
|
|
|
|
+ this.getdata(); //获取-数据
|
|
|
this.timing = setInterval(() => {
|
|
this.timing = setInterval(() => {
|
|
|
- this.settestdata(); //获取-主题词
|
|
|
|
|
|
|
+ this.getdata(); //获取--数据
|
|
|
}, 10000);
|
|
}, 10000);
|
|
|
},
|
|
},
|
|
|
- async settestdata() {
|
|
|
|
|
- var caller = 'KB!QualityZTRate';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ async getdata() {
|
|
|
|
|
+ var caller = 'KB!WHTMONTHIQCRATE';
|
|
|
|
|
+ var cond = "1=1";
|
|
|
await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
|
|
await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
|
|
|
params: {
|
|
params: {
|
|
|
- condition: "1=1",
|
|
|
|
|
|
|
+ condition: cond
|
|
|
}
|
|
}
|
|
|
}).then((result)=>{
|
|
}).then((result)=>{
|
|
|
let dataList = JSON.parse(result.data.data);
|
|
let dataList = JSON.parse(result.data.data);
|
|
|
- let datas = new Array();
|
|
|
|
|
- let v_mindata = 100;
|
|
|
|
|
- for (let index = 0; index < dataList.length; index++) {
|
|
|
|
|
- const element = dataList[index];
|
|
|
|
|
- datas.push({
|
|
|
|
|
- name:"<span class='fs-md ml-3'>" + element.v_stepname+"<span/>" ,
|
|
|
|
|
- value:element.v_ztrate,//"<span class='fs-md'>" + element.v_ztrate +"<span/>",
|
|
|
|
|
- });
|
|
|
|
|
- if(v_mindata>element.v_ztrate){
|
|
|
|
|
- v_mindata = element.v_ztrate;
|
|
|
|
|
|
|
+ let series = new Array();
|
|
|
|
|
+ let xAxis0 = new Array();
|
|
|
|
|
+ let mindata = 100;
|
|
|
|
|
+
|
|
|
|
|
+ //7天内
|
|
|
|
|
+ let ndata = new Array();
|
|
|
|
|
+ for (let i =6 ;i>=0;i--){
|
|
|
|
|
+ let formattedDate;
|
|
|
|
|
+ if(i == 0){
|
|
|
|
|
+ formattedDate = this.$moment().format('MM/DD');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ formattedDate = this.$moment().subtract(i, 'days').format('MM/DD')
|
|
|
}
|
|
}
|
|
|
|
|
+ xAxis0.push(formattedDate);
|
|
|
|
|
+ //获取分组当天数据
|
|
|
|
|
+ let dataall = dataList;
|
|
|
|
|
+ let data0 = '-';
|
|
|
|
|
+ if(null != dataall) {
|
|
|
|
|
+ let datam = dataall.filter(item => item.v_ymd == formattedDate);
|
|
|
|
|
+ if(datam.length>0){
|
|
|
|
|
+ data0 = datam[0].v_okrate;
|
|
|
|
|
+ if(mindata>data0){
|
|
|
|
|
+ mindata = data0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ndata.push(data0);
|
|
|
}
|
|
}
|
|
|
- //获取最小值
|
|
|
|
|
- if(v_mindata<=100 && v_mindata>10 ){
|
|
|
|
|
- v_mindata = v_mindata - 10;
|
|
|
|
|
- }
|
|
|
|
|
- this.ranking.data = datas;
|
|
|
|
|
- this.ranking.mindata = Math.floor(v_mindata/10)*10;
|
|
|
|
|
- this.ranking = { ...this.ranking };
|
|
|
|
|
|
|
+ series.push({
|
|
|
|
|
+ name: '合格率',
|
|
|
|
|
+ type: 'line',
|
|
|
|
|
+ data: ndata,
|
|
|
|
|
+ symbolSize: 4,
|
|
|
|
|
+ lineStyle: {
|
|
|
|
|
+ normal: {
|
|
|
|
|
+ color: this.colorList.linearBtoG,
|
|
|
|
|
+ width: 4
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ label: {
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ position: 'top',
|
|
|
|
|
+ fontSize:15,
|
|
|
|
|
+ color:'inherit',
|
|
|
|
|
+ fontWeight: "bold"
|
|
|
|
|
+ },
|
|
|
|
|
+ emphasis: {
|
|
|
|
|
+ focus: 'series'
|
|
|
|
|
+ },
|
|
|
|
|
+ areaStyle: {
|
|
|
|
|
+ normal: {
|
|
|
|
|
+ color: this.colorList.areaBtoG
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.linedata.series = series;
|
|
|
|
|
+ this.linedata.xAxiss = xAxis0;
|
|
|
|
|
+ //最小值往下取整10的倍数,然后减20
|
|
|
|
|
+ mindata = Math.floor(mindata/10)*10 - 20;
|
|
|
|
|
+ mindata = mindata<0?0:mindata;
|
|
|
|
|
+ this.linedata.min = mindata;
|
|
|
|
|
+ //分7个数据,6段
|
|
|
|
|
+ this.linedata.interval = Math.ceil((100-mindata)/7);
|
|
|
},(result)=>{
|
|
},(result)=>{
|
|
|
console.error(result)
|
|
console.error(result)
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
|
|
|
+<style lang="scss" class>
|
|
|
|
|
+//$box-height: 520px;
|
|
|
$box-height: 475px;
|
|
$box-height: 475px;
|
|
|
$box-width: 100%;
|
|
$box-width: 100%;
|
|
|
-#up1 {
|
|
|
|
|
|
|
+#bottom2 {
|
|
|
padding: 13px;
|
|
padding: 13px;
|
|
|
height: $box-height;
|
|
height: $box-height;
|
|
|
- // font-size: 32px;
|
|
|
|
|
width: $box-width;
|
|
width: $box-width;
|
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
.bg-color-black {
|
|
.bg-color-black {
|
|
|
height: $box-height - 25px;
|
|
height: $box-height - 25px;
|
|
|
|
|
+ //width: $box-width - 10px;
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
|
- padding: 5px;
|
|
|
|
|
- width: $box-width;
|
|
|
|
|
- .body-box {
|
|
|
|
|
- //margin-bottom: 7px;
|
|
|
|
|
- margin: 0px 20px 7px 20px;
|
|
|
|
|
- .dv-scr-rank-board {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 420px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ padding: 5px ;
|
|
|
|
|
+ }
|
|
|
|
|
+ .body-box {
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
}
|
|
|
- ::v-deep .dv-scroll-ranking-board .ranking-info .rank{width:40px;color: #18a158;font-size: 15px;display: none}
|
|
|
|
|
- ::v-deep .dv-scroll-ranking-board .ranking-info .ranking-value{font-size: 1rem;}
|
|
|
|
|
- ::v-deep .dv-scroll-ranking-board .ranking-column{border-bottom:2px solid rgb(25, 161, 95,.5);margin-top:5px}
|
|
|
|
|
- ::v-deep .dv-scroll-ranking-board .ranking-column .inside-column{position:relative;height:7px;background-color: #19a15f;margin-bottom:2px;border-radius:1px;overflow:hidden}
|
|
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|