|
@@ -35,7 +35,7 @@
|
|
|
<div class="modelTitle marginBottom15">车间产线运转评估</div>
|
|
|
<!-- Echarts仪表盘 -->
|
|
|
<div class="gaugeDiv">
|
|
|
- <gauge-grade :gaugeData="gaugeData" :width="gaudeWidth" :height="gaudeHeight"></gauge-grade>
|
|
|
+ <gauge-grade :gaugeData="gaugeData" :width="gaudeWidth" :height="gaudeHeight" ref="gauge"></gauge-grade>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 车间产线 -->
|
|
@@ -67,13 +67,13 @@
|
|
|
<el-col :span="8">
|
|
|
<div id="percenter2" class="percenter">
|
|
|
<el-progress type="circle" :percentage="percentages[1]" color="#5cb87a" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">舱体类加工单元</span>
|
|
|
+ <span class="pcText">框体类加工单元</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<div id="percenter3" class="percenter">
|
|
|
<el-progress type="circle" :percentage="percentages[2]" color="#6a5acd" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">框体类加工单元</span>
|
|
|
+ <span class="pcText">舱体类加工单元</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -248,11 +248,11 @@
|
|
|
<div class="modelTitle2">设备生产资源</div>
|
|
|
</li>
|
|
|
<li v-for="(item, index) in mashingOneList.data" :key="index">
|
|
|
- <span class="mStatus">运行中</span>
|
|
|
- <!--<span class="mAudit">{{item.productionStatus.text}}</span>-->
|
|
|
+ <span class="mStatus">{{ item.controlStatusCN}}</span>
|
|
|
+ <span class="mAudit">{{item.productionStatusCN}}</span>
|
|
|
<img class="mashingImg" :src="item.pic" v-lazy="item.pic" />
|
|
|
<div class="mashingDiv">
|
|
|
- <!--<div class="mashingCode">{{ item.model }}</div> -->
|
|
|
+ <!--<div class="mashingCode">{{ item.productionStatusCN }}</div>-->
|
|
|
<div class="mashingName">{{ item.name }}</div>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -300,7 +300,7 @@
|
|
|
RUN_MODE: {} //运行模式
|
|
|
},
|
|
|
incomplete: 0,
|
|
|
- gaugeData: {value: randomFloor(40,100)/100, name: '效率'},
|
|
|
+ gaugeData: {value: 0.5, name:"效率"},
|
|
|
gaudeWidth: '100%',
|
|
|
gaudeHeight: '190px',
|
|
|
percentages: [randomFloor(10,100), randomFloor(20,100), randomFloor(30,100)],
|
|
@@ -407,7 +407,7 @@
|
|
|
// DOM加载后,加载
|
|
|
this.$nextTick(()=> {
|
|
|
// 加载数据
|
|
|
- this.initPercentPie()
|
|
|
+ //this.initPercentPie()
|
|
|
})
|
|
|
},
|
|
|
// 销毁
|
|
@@ -494,12 +494,20 @@
|
|
|
areaMgrApi.iconGroupList({resourceStatus:"1",group:0}).then(res => {
|
|
|
//console.log(res)
|
|
|
if (res.status == 200 && res.data.isSuccess) {
|
|
|
- this.mashingOneList = this.filterResource(res.data.data.iconGroupList[0])
|
|
|
- this.mashingTwoList = this.filterResource(res.data.data.iconGroupList[1])
|
|
|
- this.mashingThreeList = this.filterResource(res.data.data.iconGroupList[2])
|
|
|
- //计算产线利用率
|
|
|
- this.mashingOneList.data = this.mashingOneList.data.concat(this.mashingTwoList.data).concat(this.mashingThreeList.data)
|
|
|
+ this.mashingOneList = this.filterResource(res.data.data.iconGroupList[0])
|
|
|
+ this.mashingTwoList = this.filterResource(res.data.data.iconGroupList[1])
|
|
|
+ this.mashingThreeList = this.filterResource(res.data.data.iconGroupList[2])
|
|
|
|
|
|
+ this.initPercentPie([parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),
|
|
|
+ parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)])
|
|
|
+
|
|
|
+ let runLen = this.mashingOneList.runData.length + this.mashingTwoList.runData.length + this.mashingThreeList.runData.length
|
|
|
+ this.mashingOneList.data = this.mashingOneList.data.concat(this.mashingTwoList.data).concat(this.mashingThreeList.data)
|
|
|
+
|
|
|
+ this.gaugeData = {value : parseFloat(runLen/this.mashingOneList.data.length).toFixed(2), name:"效率"}
|
|
|
+ this.$refs.gauge.dispose()
|
|
|
+ this.$refs.gauge.initChart(this.gaugeData)
|
|
|
+
|
|
|
}else{
|
|
|
this.$message({
|
|
|
message: "设备数据查询失败",
|
|
@@ -532,7 +540,7 @@
|
|
|
var option1 = {
|
|
|
value: vals == null ? randomFloor(67,77) : vals[0], //百分比,必填
|
|
|
name:'智能保障系统利用率', //必填
|
|
|
- name2:'未利用率',
|
|
|
+ name2:'保障中心未利用率',
|
|
|
title:'',
|
|
|
backgroundColor: null,
|
|
|
color:['#24a9ea','#DDDDDD'],
|
|
@@ -543,8 +551,8 @@
|
|
|
|
|
|
var option2 = {
|
|
|
value: vals == null ? randomFloor(49,59) : vals[1], //百分比,必填
|
|
|
- name:'舱体类加工利用率', //必填
|
|
|
- name2:'未利用率', //必填
|
|
|
+ name:'框体类加工利用率', //必填
|
|
|
+ name2:'框体未利用率', //必填
|
|
|
title:'',
|
|
|
backgroundColor: null,
|
|
|
color:['#13ce66','#DDDDDD'],
|
|
@@ -555,8 +563,8 @@
|
|
|
|
|
|
var option3 = {
|
|
|
value: vals == null ? randomFloor(49,69) : vals[2], //百分比,必填
|
|
|
- name:'框体类加工利用率', //必填
|
|
|
- name2:'未利用率', //必填
|
|
|
+ name:'舱体类加工利用率', //必填
|
|
|
+ name2:'舱体未利用率', //必填
|
|
|
title:'',
|
|
|
backgroundColor: null,
|
|
|
color:['#6a5acd','#DDDDDD'],
|
|
@@ -583,7 +591,7 @@
|
|
|
if(data.type == 'PUSH_TYPE_DATA_SCREEN'){
|
|
|
this.$nextTick(()=> {
|
|
|
// 数据变更
|
|
|
- this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
|
|
|
+ //this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
|
|
|
this.orderDatas = data.data.zoneMap.zoneData
|
|
|
this.runDatas = data.data.planMap.planData.records
|
|
|
|
|
@@ -597,16 +605,23 @@
|
|
|
}
|
|
|
}
|
|
|
this.weibaoList = []
|
|
|
- this.weibaoList = data.data.repairMap.repairData.records
|
|
|
-
|
|
|
+ this.weibaoList = data.data.repairMap.repairData.records
|
|
|
+
|
|
|
this.mashingOneList = this.filterResource(data.data.groupMap.iconGroupList[0])
|
|
|
this.mashingTwoList = this.filterResource(data.data.groupMap.iconGroupList[1])
|
|
|
this.mashingThreeList = this.filterResource(data.data.groupMap.iconGroupList[2])
|
|
|
|
|
|
+ //计算设备利用率
|
|
|
+ this.initPercentPie([parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),
|
|
|
+ parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)])
|
|
|
+
|
|
|
+ let runLen = this.mashingOneList.runData.length + this.mashingTwoList.runData.length + this.mashingThreeList.runData.length;
|
|
|
this.mashingOneList.data = this.mashingOneList.data.concat(this.mashingTwoList.data).concat(this.mashingThreeList.data)
|
|
|
-
|
|
|
- //this.$ref.runningTime.innerHmtl = ((allDatas[0] + 5/360)/60).toFixed(1)
|
|
|
-
|
|
|
+
|
|
|
+ this.gaugeData = {value : parseFloat(runLen/this.mashingOneList.data.length).toFixed(2), name:"效率"}
|
|
|
+ this.$refs.gauge.dispose()
|
|
|
+ this.$refs.gauge.initChart(this.gaugeData)
|
|
|
+
|
|
|
let datas = data.data.warnMap.warnData.records
|
|
|
let that = this
|
|
|
this.yujingList = datas.map((data)=>{
|
|
@@ -657,11 +672,12 @@
|
|
|
|
|
|
// 过滤设备数据
|
|
|
filterResource(mashingList){
|
|
|
- let arr = mashingList.data.filter((data) => {
|
|
|
+ let arr = mashingList.data.filter((data) => {
|
|
|
return data.name.indexOf("接驳位") <0 && data.name.indexOf("托板") < 0 && data.name.indexOf("上下料站") < 0
|
|
|
- && data.name.indexOf("线边库") <0
|
|
|
+ && data.name.indexOf("线边库") <0 && data.name.indexOf("立库") <0
|
|
|
});
|
|
|
mashingList.data = arr
|
|
|
+ mashingList.runData = arr.filter((data)=> { return data.productionStatusCN=="生产中"});
|
|
|
return mashingList
|
|
|
},
|
|
|
|
|
@@ -711,8 +727,7 @@
|
|
|
// 获取列表数据
|
|
|
getTabList(){
|
|
|
lineBoardAPI.getBigScreenList({}).then(res => {
|
|
|
- res = res.data
|
|
|
- // console.log("神抽狗资源:", res)
|
|
|
+ res = res.data
|
|
|
if(res.isSuccess){
|
|
|
this.tabDownData.list = res.data.list
|
|
|
// 给资源赋值id
|