|
@@ -12,7 +12,8 @@
|
|
|
<!– 2D简洁模式 –>
|
|
|
<span @click="boxCardClk('simple')">{{$t("largeScreen.common.data2d")}}</span>-->
|
|
|
<!-- 2D数据模式 -->
|
|
|
- <span class="tabsActive">{{$t("largeScreen.common.data2shu")}}</span>
|
|
|
+<!-- <span class="tabsActive">{{$t("largeScreen.common.data2shu")}}</span>-->
|
|
|
+ <img :src="require(`@/assets/logo/tubiao.png`)" style="height: 100px;width: 150px"/>
|
|
|
</div>
|
|
|
<!-- 全屏 -->
|
|
|
<div class="battonDiv">
|
|
@@ -55,55 +56,19 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <!-- 设备利用率 -->
|
|
|
- <div class="rightDiv marginBottom15">
|
|
|
- <div class="modelTitle marginBottom15">设备利用率</div>
|
|
|
+ <!-- 设备当日产能 -->
|
|
|
+ <div class="rightDiv ">
|
|
|
+ <div class="modelTitle marginBottom15">设备当日产能</div>
|
|
|
<el-row :gutter="15">
|
|
|
-<!-- <el-col :span="8">
|
|
|
- <div id="percenter1" class="percenter">
|
|
|
- <el-progress type="circle" :percentage="percentages[0]" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">智能生产保障系统</span>
|
|
|
- </div>
|
|
|
- <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["智能生产保障系统"] }}分钟</div>
|
|
|
- </el-col>
|
|
|
- <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>
|
|
|
- </div>
|
|
|
- <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["框体类加工单元"] }}分钟</div>
|
|
|
- </el-col>-->
|
|
|
<el-col :span="24">
|
|
|
- <div id="percenter3" class="percenter">
|
|
|
+<!-- <div id="percenter3" class="percenter">
|
|
|
<el-progress type="circle" :percentage="percentages[2]" color="#6a5acd" :stroke-width="10" :width="100"></el-progress>
|
|
|
<span class="pcText">FMS2.0产线</span>
|
|
|
- </div>
|
|
|
- <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["FMS2.0产线"] }}分钟</div>
|
|
|
+ </div>-->
|
|
|
+ <div id="deviceProduct" class="chart" style="width:100%;height: 300px"></div>
|
|
|
+<!-- <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["FMS2.0产线"] }}分钟</div>-->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-<!-- <el-row :gutter="15">
|
|
|
- <el-col :span="8">
|
|
|
- <div id="percenter4" class="percenter" v-show="false">
|
|
|
- <el-progress type="circle" :percentage="percentages[3]" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">保障中心设备数</span>
|
|
|
- </div>
|
|
|
- <div class="timeTxt" v-show="false">{{ this.mashingOneList.runData? this.mashingOneList.runData.length: 0}}</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <div id="percenter5" class="percenter">
|
|
|
- <el-progress type="circle" :percentage="percentages[4]" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">框体类加工设备</span>
|
|
|
- </div>
|
|
|
- <div class="timeTxt">{{ this.mashingTwoList.runData? this.mashingTwoList.runData.length:0 }}</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <div id="percenter6" class="percenter">
|
|
|
- <el-progress type="circle" :percentage="percentages[5]" :stroke-width="10" :width="100"></el-progress>
|
|
|
- <span class="pcText">舱体类加工设备</span>
|
|
|
- </div>
|
|
|
- <div class="timeTxt">{{ this.mashingThreeList.runData? this.mashingThreeList.runData.length: 0}}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>-->
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<!-- 中 -->
|
|
@@ -184,7 +149,7 @@
|
|
|
|
|
|
</div>
|
|
|
<div class="centerDiv">
|
|
|
- <img :src="require(`@/assets/logo/chanxian.jpg`)" style="width: 100%;">
|
|
|
+ <img :src="require(`@/assets/logo/machine.png`)" style="width: 100%;height: 400px;">
|
|
|
</div>
|
|
|
<!-- 生产计划 -->
|
|
|
<!-- <div class="centerDiv">
|
|
@@ -222,7 +187,7 @@
|
|
|
<el-col :span="7">
|
|
|
<!-- 预警信息 -->
|
|
|
<div class="rightDiv marginBottom15">
|
|
|
- <div class="modelTitle marginBottom15">报警信息</div>
|
|
|
+ <div class="modelTitle marginBottom15">FMS产线设备利用率</div>
|
|
|
<!--
|
|
|
<table class="tableBorder" border="0" cellspacing="0" cellpadding="0">
|
|
|
<tr v-for="(item, index) in yujingList" :key="index">
|
|
@@ -230,7 +195,7 @@
|
|
|
<td>{{ item.name2 }}</td>
|
|
|
</tr>
|
|
|
</table> -->
|
|
|
- <vue-seamless-scroll :data="yujingList" class="seamless-warp" :class-option="classOption">
|
|
|
+<!-- <vue-seamless-scroll :data="yujingList" class="seamless-warp" :class-option="classOption">
|
|
|
<ul class="item" style="height:160px;">
|
|
|
<li class="DataList_top" v-for="(item,index) in yujingList" :key="index">
|
|
|
<div class="DataList_col">{{item.itemname}}</div>
|
|
@@ -238,19 +203,19 @@
|
|
|
<div class="clearfix"></div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- </vue-seamless-scroll>
|
|
|
-
|
|
|
+ </vue-seamless-scroll>-->
|
|
|
+ <div id="containerAlarm" class="chart" style="width:100%;height: 200px"></div>
|
|
|
</div>
|
|
|
<!-- 待完成订单 -->
|
|
|
<div class="rightDiv marginBottom15">
|
|
|
<div class="modelTitle marginBottom15">待完成订单</div>
|
|
|
<table class="tableBorder" border="0" cellspacing="0" cellpadding="0" >
|
|
|
<tr>
|
|
|
- <th>订单号</th>
|
|
|
+ <th width="120">订单号</th>
|
|
|
<th width="80" v-show="false">客户</th>
|
|
|
<th width="60">零件数量</th>
|
|
|
<th width="50">已生产</th>
|
|
|
- <th>交付时间</th>
|
|
|
+ <th width="60">交付时间</th>
|
|
|
<th width="120">交付倒计时</th>
|
|
|
</tr>
|
|
|
<tr v-for="(item, index) in diaoduList" :key="index">
|
|
@@ -297,8 +262,9 @@
|
|
|
<li v-for="(item, index) in mashingTwoList.data" :key="index">
|
|
|
<!--<span class="mStatus" :style="{background:item.controlStatus.background}">{{ item.controlStatusCN}}</span>-->
|
|
|
<span class="mAudit" :style="{'background':item.productionStatus.background,'color': item.productionStatus.value=='1'?'#666':'#fff'}" >{{item.productionStatusCN}}</span>
|
|
|
- <img class="mashingImg" :src="item.pic" v-lazy="item.pic" />
|
|
|
- <div class="mashingDiv">
|
|
|
+ <img v-if="item.name.includes('VCN-530CL')" class="mashingImg" :src="require(`@/assets/device/mazak.png`)" v-lazy="require(`@/assets/device/mazak.png`)" />
|
|
|
+ <img v-if="item.name == '装载站'" class="mashingImg" :src="require(`@/assets/device/liaozhan.jpg`)" v-lazy="require(`@/assets/device/liaozhan.jpg`)" />
|
|
|
+ <div class="mashingDiv">
|
|
|
<!--<div class="mashingCode">{{ item.productionStatusCN }}</div>-->
|
|
|
<div class="mashingName">{{ item.name }}</div>
|
|
|
</div>
|
|
@@ -312,6 +278,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+
|
|
|
+import 'echarts-liquidfill'
|
|
|
// Echarts的组件
|
|
|
import * as echarts from 'echarts'
|
|
|
// 引入vuescroll
|
|
@@ -336,7 +304,8 @@
|
|
|
|
|
|
// 加载动态数字组件
|
|
|
import countTo from 'vue-count-to'
|
|
|
-
|
|
|
+ // 【产品加工汇总】-API
|
|
|
+ import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability";
|
|
|
export default {
|
|
|
name: "TwoDatasModel",
|
|
|
directives: { elDragDialog },
|
|
@@ -410,9 +379,9 @@
|
|
|
// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
created() {
|
|
|
// 初始化数据
|
|
|
- initDicts(['RUN_MODE'], this.dicts)
|
|
|
+ initDicts(['RUN_MODE'], this.dicts)
|
|
|
this.initDatas()
|
|
|
- this.getDatas()
|
|
|
+ this.getDatas()
|
|
|
},
|
|
|
watch: {
|
|
|
websocketMsg(curVal, oldVal) {
|
|
@@ -530,11 +499,11 @@
|
|
|
|
|
|
|
|
|
//维保数据
|
|
|
- let repairParams = initQueryParams({})
|
|
|
- //this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
|
|
|
+ let repairParams = initQueryParams({})
|
|
|
+ //this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
|
|
|
//this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
|
|
|
- repairParams.size = 5
|
|
|
- repairApi.page(repairParams).then(res => {
|
|
|
+ repairParams.size = 5
|
|
|
+ repairApi.page(repairParams).then(res => {
|
|
|
//console.log(res)
|
|
|
if (res.status == 200 && res.data.isSuccess) {
|
|
|
this.weibaoList = res.data.data.records
|
|
@@ -546,7 +515,7 @@
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- orderMgrApi.orderStatitcs().then(res=> {
|
|
|
+ orderMgrApi.orderStatitcs().then(res=> {
|
|
|
if (res.status == 200 && res.data.isSuccess) {
|
|
|
//更新执行时间和合格率
|
|
|
this.allDatas = [parseInt(res.data.data.lastHour.rate), parseFloat(res.data.data.tadayRate.rate)>0?parseFloat(res.data.data.tadayRate.rate)>0:100, parseFloat(res.data.data.weekRate.rate)>0?parseFloat(res.data.data.weekRate.rate):100]
|
|
@@ -559,18 +528,22 @@
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- //产线统计时长数据
|
|
|
- areaMgrApi.getTimeSpanList({}).then(res=>{
|
|
|
+ //产线统计时长数据
|
|
|
+ areaMgrApi.getTimeSpanList({}).then(res=>{
|
|
|
if (res.status == 200 && res.data.isSuccess) {
|
|
|
this.timeSpanList = res.data.data
|
|
|
this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
|
|
|
this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"]>0? this.timeSpanList.timeSpanStatistics["框体类加工单元"]: 839
|
|
|
- this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]
|
|
|
+ this.timeSpend = this.timeSpanList.timeSpanStatistics["FMS2.0"]
|
|
|
+ console.log(this.timeSpend + "----");
|
|
|
+ if(this.timeSpend == '0' || this.timeSpend == 0){
|
|
|
+ this.timeSpend = 0
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- //设备资源数据
|
|
|
- areaMgrApi.iconGroupList({resourceStatus:"1",group:0}).then(res => {
|
|
|
+ //设备资源数据
|
|
|
+ areaMgrApi.iconGroupList({resourceStatus:"1",group:0}).then(res => {
|
|
|
//console.log(res)
|
|
|
if (res.status == 200 && res.data.isSuccess) {
|
|
|
this.mashingTwoList = this.filterResource(res.data.data.iconGroupList[0], true)
|
|
@@ -606,6 +579,29 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ //查询设备当日产出
|
|
|
+ productlineAvailabilityApi.deviceResourceSum(1, 5, {})
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data;
|
|
|
+ let tableData = (res.data || []).records;
|
|
|
+ this.totalNum = 0
|
|
|
+ let data = new Map()
|
|
|
+ if(tableData && tableData.length > 0){
|
|
|
+ tableData.forEach(item => {
|
|
|
+ data[item.resourceName] = item.totalNum;
|
|
|
+ this.deviceProductInfo(data);
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.deviceProductInfo(data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ productlineAvailabilityApi.productionLineRate().then((response) => {
|
|
|
+ const value = response.data.data ? Number(response.data.data) : 0;
|
|
|
+
|
|
|
+ this.alarm(value);
|
|
|
+ })
|
|
|
},
|
|
|
initDatas(){
|
|
|
|
|
@@ -741,96 +737,118 @@
|
|
|
// 推送接收到的数据
|
|
|
openMessageTips(data){
|
|
|
// 如果是【数据模式】
|
|
|
- if(this.$route.fullPath.indexOf("/largeScreen/twoDatasModel") > -1){
|
|
|
- console.log("接收websocket的推送信息 == ",data)
|
|
|
- if(data.type == 'PUSH_TYPE_DATA_SCREEN'){
|
|
|
- this.$nextTick(()=> {
|
|
|
- // 数据变更
|
|
|
- //this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
|
|
|
- this.orderDatas = data.data.zoneMap.zoneData
|
|
|
- this.runDatas = data.data.planMap.planData.records.slice(0,5)
|
|
|
-
|
|
|
- //合格率和工时时长信息更新
|
|
|
- this.allDatas = [parseInt(data.data.orderStatistics.lastHour.rate), parseFloat(data.data.orderStatistics.tadayRate.rate)>0?parseFloat(data.data.orderStatistics.tadayRate.rate):100, parseFloat(data.data.orderStatistics.weekRate.rate)>0?parseFloat(data.data.orderStatistics.weekRate.rate):100]
|
|
|
-
|
|
|
- this.timeSpanList.validTimeSpanStatistics = data.data.validTimeSpanStatistics>0? data.data.validTimeSpanStatistics: 568
|
|
|
- this.timeSpanList.timeSpanStatistics = data.data.timeSpanStatistics
|
|
|
- this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
|
|
|
+ if(this.$route.fullPath.indexOf("/largeScreen/twoDatasModel") > -1){
|
|
|
+ console.log("接收websocket的推送信息 == ",data)
|
|
|
+ if(data.type == 'PUSH_TYPE_DATA_SCREEN'){
|
|
|
+ this.$nextTick(()=> {
|
|
|
+ // 数据变更
|
|
|
+ //this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
|
|
|
+ this.orderDatas = data.data.zoneMap.zoneData
|
|
|
+ this.runDatas = data.data.planMap.planData.records.slice(0,5)
|
|
|
+
|
|
|
+ //合格率和工时时长信息更新
|
|
|
+ this.allDatas = [parseInt(data.data.orderStatistics.lastHour.rate), parseFloat(data.data.orderStatistics.tadayRate.rate)>0?parseFloat(data.data.orderStatistics.tadayRate.rate):100, parseFloat(data.data.orderStatistics.weekRate.rate)>0?parseFloat(data.data.orderStatistics.weekRate.rate):100]
|
|
|
+
|
|
|
+ this.timeSpanList.validTimeSpanStatistics = data.data.validTimeSpanStatistics>0? data.data.validTimeSpanStatistics: 568
|
|
|
+ this.timeSpanList.timeSpanStatistics = data.data.timeSpanStatistics
|
|
|
+ this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
|
|
|
this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"]>0? this.timeSpanList.timeSpanStatistics["框体类加工单元"]: 839
|
|
|
- this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]
|
|
|
-
|
|
|
-
|
|
|
- this.diaoduList = data.data.orderMap.orderData.records
|
|
|
- this.incomplete = 0
|
|
|
- for(let i = 0; i < this.diaoduList.length; i++){
|
|
|
- if(this.diaoduList[i].completeNum == null){
|
|
|
- this.incomplete += parseInt(this.diaoduList[i].productNum)
|
|
|
- }else{
|
|
|
- this.incomplete += parseInt(this.diaoduList[i].productNum) - parseInt(this.diaoduList[i].completeNum)
|
|
|
- }
|
|
|
- }
|
|
|
- this.weibaoList = []
|
|
|
- this.weibaoList = data.data.repairMap.repairData.records
|
|
|
-
|
|
|
- this.mashingOneList = this.filterResource(data.data.groupMap.iconGroupList[0], true)
|
|
|
- this.mashingTwoList = this.filterResource(data.data.groupMap.iconGroupList[1], false)
|
|
|
- this.mashingThreeList = this.filterResource(data.data.groupMap.iconGroupList[2], false)
|
|
|
-
|
|
|
- //计算设备利用率
|
|
|
- //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)])
|
|
|
- if(this.timeSpend>0){
|
|
|
- this.initPercentPie([parseInt(100* this.timeSpanList.timeSpanStatistics["智能生产保障系统"]/ this.timeSpend),
|
|
|
+ this.timeSpend = this.timeSpanList.timeSpanStatistics["FMS2.0"]
|
|
|
+ if(this.timeSpend == '0' || this.timeSpend == 0){
|
|
|
+ this.timeSpend = 102;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.diaoduList = data.data.orderMap.orderData.records
|
|
|
+ this.incomplete = 0
|
|
|
+ for(let i = 0; i < this.diaoduList.length; i++){
|
|
|
+ if(this.diaoduList[i].completeNum == null){
|
|
|
+ this.incomplete += parseInt(this.diaoduList[i].productNum)
|
|
|
+ }else{
|
|
|
+ this.incomplete += parseInt(this.diaoduList[i].productNum) - parseInt(this.diaoduList[i].completeNum)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.weibaoList = []
|
|
|
+ this.weibaoList = data.data.repairMap.repairData.records
|
|
|
+
|
|
|
+ this.mashingOneList = this.filterResource(data.data.groupMap.iconGroupList[0], true)
|
|
|
+ this.mashingTwoList = this.filterResource(data.data.groupMap.iconGroupList[1], false)
|
|
|
+ this.mashingThreeList = this.filterResource(data.data.groupMap.iconGroupList[2], false)
|
|
|
+
|
|
|
+ //计算设备利用率
|
|
|
+ //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)])
|
|
|
+ if(this.timeSpend>0){
|
|
|
+ this.initPercentPie([parseInt(100* this.timeSpanList.timeSpanStatistics["智能生产保障系统"]/ this.timeSpend),
|
|
|
parseInt(100 * this.timeSpanList.timeSpanStatistics["框体类加工单元"] / this.timeSpend), parseInt(100 * this.timeSpanList.timeSpanStatistics["舱体类加工单元"] / this.timeSpend),
|
|
|
- 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)
|
|
|
- ])
|
|
|
- }else{
|
|
|
- this.initPercentPie([0,0,0,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)
|
|
|
+ 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)
|
|
|
+ ])
|
|
|
+ }else{
|
|
|
+ this.initPercentPie([0,0,0,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.mashingTwoList.data = this.mashingTwoList.data.concat(this.mashingThreeList.data).concat(this.mashingOneList.data)
|
|
|
+ let runLen = this.mashingOneList.runData.length + this.mashingTwoList.runData.length + this.mashingThreeList.runData.length;
|
|
|
+ this.mashingTwoList.data = this.mashingTwoList.data.concat(this.mashingThreeList.data).concat(this.mashingOneList.data)
|
|
|
|
|
|
- //this.gaugeData = {value : parseFloat(runLen/this.mashingTwoList.data.length).toFixed(2), name:"效率"}
|
|
|
- this.gaugeData = {value:randomFloor(60,75)/100, name:"效率"}
|
|
|
- this.$refs.gauge.dispose()
|
|
|
- this.$refs.gauge.initChart(this.gaugeData)
|
|
|
+ //this.gaugeData = {value : parseFloat(runLen/this.mashingTwoList.data.length).toFixed(2), name:"效率"}
|
|
|
+ this.gaugeData = {value:randomFloor(60,75)/100, 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)=>{
|
|
|
- let msg = data.feedback ? data.feedback : " 响应超时 ";
|
|
|
+ let datas = data.data.warnMap.warnData.records
|
|
|
+ let that = this
|
|
|
+ this.yujingList = datas.map((data)=>{
|
|
|
+ let msg = data.feedback ? data.feedback : " 响应超时 ";
|
|
|
let arr = data.createTime;
|
|
|
let time = arr[0] + "-" + arr[1] + "-" + arr[2] + "\t" + arr[3] + ":" + arr[4];
|
|
|
let itemname = ""
|
|
|
if(data.taskNodeId){
|
|
|
- itemname = "["+ data.resourceName +"] "+data.procedureName+"("+data.instructionName+")" + msg;
|
|
|
+ itemname = "["+ data.resourceName +"] "+data.procedureName+"("+data.instructionName+")" + msg;
|
|
|
}else{
|
|
|
- //itemname = "[监控推送]" + msg;
|
|
|
+ //itemname = "[监控推送]" + msg;
|
|
|
itemname = ""+ msg;
|
|
|
}
|
|
|
- if(data.status == '0'){
|
|
|
-
|
|
|
- setTimeout(function(){
|
|
|
- that.$notify({
|
|
|
- title: '预警提示',
|
|
|
- message: itemname + "\t" + "请管理人员去产线查看",
|
|
|
- type: 'warning',
|
|
|
- position: 'bottom-right',
|
|
|
- duration: 5000,
|
|
|
- customClass:'notifyStyle',
|
|
|
- });
|
|
|
+ if(data.status == '0'){
|
|
|
+ setTimeout(function(){
|
|
|
+ that.$notify({
|
|
|
+ title: '预警提示',
|
|
|
+ message: itemname + "\t" + "请管理人员去产线查看",
|
|
|
+ type: 'warning',
|
|
|
+ position: 'bottom-right',
|
|
|
+ duration: 5000,
|
|
|
+ customClass:'notifyStyle',
|
|
|
+ });
|
|
|
},8000);
|
|
|
}
|
|
|
- return {itemname:itemname , time: time}
|
|
|
+ return {itemname:itemname , time: time}
|
|
|
});
|
|
|
this.yujingList = []
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ //查询设备当日产出
|
|
|
+ productlineAvailabilityApi.deviceResourceSum(1, 5, {})
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data;
|
|
|
+ let tableData = (res.data || []).records;
|
|
|
+ this.totalNum = 0
|
|
|
+ let data = new Map()
|
|
|
+ if(tableData && tableData.length > 0){
|
|
|
+ tableData.forEach(item => {
|
|
|
+ data[item.resourceName] = item.totalNum;
|
|
|
+ this.deviceProductInfo(data);
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.deviceProductInfo(data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ productlineAvailabilityApi.productionLineRate().then((response) => {
|
|
|
+ const value = response.data.data ? Number(response.data.data) : 0;
|
|
|
+
|
|
|
+ this.alarm(value);
|
|
|
+ })
|
|
|
},
|
|
|
// 组件销毁的时候,关闭websocket连接
|
|
|
websocketClose() {
|
|
@@ -850,12 +868,13 @@
|
|
|
|
|
|
// 过滤设备数据
|
|
|
filterResource(mashingList, bool){
|
|
|
+ if(!mashingList || !mashingList.data) return mashingList;
|
|
|
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("三坐标") && data.name.indexOf("打标机") && data.name.indexOf("机器人") < 0
|
|
|
});
|
|
|
mashingList.data = arr
|
|
|
- console.log("mashingList.data:" + JSON.stringify(mashingList.data))
|
|
|
+
|
|
|
if(bool){
|
|
|
mashingList.runData = arr.filter((data)=> { return data.todoTaskcount>0});
|
|
|
}else{
|
|
@@ -922,8 +941,8 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //时间差转换
|
|
|
- formatGap(date) {
|
|
|
+ //时间差转换
|
|
|
+ formatGap(date) {
|
|
|
let staytimeGap = new Date(date).getTime() - new Date().getTime();
|
|
|
if(staytimeGap<0){
|
|
|
staytimeGap = new Date().getTime() - new Date(date).getTime();
|
|
@@ -938,20 +957,305 @@
|
|
|
return [Number(parseFloat(stayDay/30*100).toFixed(2)), stayDay + "天" +stayHour + "小时" + stayMin + "分"]
|
|
|
},
|
|
|
|
|
|
- // 设置进度文本内容
|
|
|
- setItemText(text){
|
|
|
+ // 设置进度文本内容
|
|
|
+ setItemText(text){
|
|
|
return () => {
|
|
|
return this.formatGap(text)[1]
|
|
|
}
|
|
|
},
|
|
|
- expireText(text){
|
|
|
+ expireText(text){
|
|
|
return () => {
|
|
|
return "过期" + this.formatGap(text)[1]
|
|
|
}
|
|
|
},
|
|
|
- setPercentage(text){
|
|
|
+ setPercentage(text){
|
|
|
return this.formatGap(text)[0]>100? 100 : this.formatGap(text)[0]
|
|
|
- }
|
|
|
+ },
|
|
|
+ //水球图
|
|
|
+ alarm(value){
|
|
|
+ value = value == 0 ? 0 : value;
|
|
|
+ this.myChartThree = echarts.init(document.getElementById('containerAlarm'));
|
|
|
+ var option = {
|
|
|
+ title: [
|
|
|
+ {
|
|
|
+ text: value * 100 + '%',
|
|
|
+ top: '40%',
|
|
|
+ left: '46%',
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '40',
|
|
|
+ fontWeight: '300',
|
|
|
+ color: '#fff'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '最外层-虚线',
|
|
|
+ type: 'gauge',
|
|
|
+ radius: '97%',
|
|
|
+ center: ['58%', '50%'],
|
|
|
+ startAngle: 0,
|
|
|
+ endAngle: 360,
|
|
|
+ axisLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ distance: -6,
|
|
|
+ length: 2,
|
|
|
+ lineStyle: {
|
|
|
+ color: '#2AECFF',
|
|
|
+ width: 5,
|
|
|
+ type: [20],
|
|
|
+ dashOffset: 19,
|
|
|
+ opacity: 0.8
|
|
|
+ },
|
|
|
+ splitNumber: 6
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ pointer: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'liquidFill',
|
|
|
+ radius: '85%',
|
|
|
+ z: 5,
|
|
|
+ center: ['58%', '50%'],
|
|
|
+ amplitude: 14,
|
|
|
+ backgroundStyle: {
|
|
|
+ color: '#0d2d42'
|
|
|
+ },
|
|
|
+ color: [
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 1,
|
|
|
+ colorStops: [
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#0061A2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: '#00FFE5'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 1,
|
|
|
+ colorStops: [
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#0061A2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: '#00FFE5'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'linear',
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ x2: 0,
|
|
|
+ y2: 1,
|
|
|
+ colorStops: [
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#0061A2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: '#00FFE5'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ globalCoord: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ data: [
|
|
|
+ value + 0.02,
|
|
|
+ {
|
|
|
+ value: value - 0.01,
|
|
|
+ direction: 'left'
|
|
|
+ },
|
|
|
+ value - 0.01
|
|
|
+ ],
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ formatter: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ outline: {
|
|
|
+ show: true,
|
|
|
+ borderDistance: 0,
|
|
|
+ itemStyle: {
|
|
|
+ borderWidth: 2,
|
|
|
+ borderColor: '#2AECFF'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ this.myChartThree.setOption(option);
|
|
|
+
|
|
|
+ },
|
|
|
+ //设备产能柱状图
|
|
|
+ deviceProductInfo(data){
|
|
|
+ this.myChartFour = echarts.init(document.getElementById('deviceProduct'));
|
|
|
+ let xData = ['VCN-530CL-01', 'VCN-530CL-02', 'VCN-530CL-03', 'VCN-530CL-04', 'VCN-530CL-05'];
|
|
|
+ var yData = [];
|
|
|
+
|
|
|
+ xData.forEach(item=>{
|
|
|
+ yData.push(data[item] ? data[item] : 0);
|
|
|
+ })
|
|
|
+ var option = {
|
|
|
+ grid: {
|
|
|
+ top: '10%',
|
|
|
+ left: '0px',
|
|
|
+ bottom: '0px',
|
|
|
+ right: '0px',
|
|
|
+ containLabel: true,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ },
|
|
|
+ animation: false,
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ type: 'category',
|
|
|
+ data: xData,
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true,
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ textStyle: {
|
|
|
+ color: '#ddd',
|
|
|
+ },
|
|
|
+ margin: 30,
|
|
|
+ },
|
|
|
+ interval: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ show: true,
|
|
|
+ type: 'value',
|
|
|
+
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '上部圆',
|
|
|
+ type: 'pictorialBar',
|
|
|
+ silent: true,
|
|
|
+ symbolSize: [40, 10],
|
|
|
+ symbolOffset: [0, -6],
|
|
|
+ symbolPosition: 'end',
|
|
|
+ z: 12,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ fontSize: 15,
|
|
|
+ fontWeight: 'bold',
|
|
|
+ color: '#5BFCF4',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ color: '#5BFCF4',
|
|
|
+ data: yData,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '底部圆',
|
|
|
+ type: 'pictorialBar',
|
|
|
+ silent: true,
|
|
|
+ symbolSize: [40, 10],
|
|
|
+ symbolOffset: [0, 7],
|
|
|
+ z: 12,
|
|
|
+ color: '#5BFCF4',
|
|
|
+ data: yData,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '内层波浪',
|
|
|
+ type: 'pictorialBar',
|
|
|
+ silent: true,
|
|
|
+ symbolSize: [50, 15],
|
|
|
+ symbolOffset: [0, 12],
|
|
|
+ z: 10,
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ color: 'transparent',
|
|
|
+ borderColor: '#5BFCF4',
|
|
|
+ borderType: 'solid',
|
|
|
+ borderWidth: 8,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data: yData,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '外层波浪',
|
|
|
+ type: 'pictorialBar',
|
|
|
+ silent: true,
|
|
|
+ symbolSize: [70, 20],
|
|
|
+ symbolOffset: [0, 18],
|
|
|
+ z: 10,
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ color: 'transparent',
|
|
|
+ borderColor: 'rgba(91,252,244,0.5)',
|
|
|
+ borderType: 'solid',
|
|
|
+ borderWidth: 5,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data: yData,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '设备数量',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '40',
|
|
|
+ barGap: '10%', // Make series be overlap
|
|
|
+ barCateGoryGap: '10%',
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(210,210,210,0.3)',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: '#5BFCF4',
|
|
|
+ },
|
|
|
+ ]),
|
|
|
+ opacity: 0.8,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data: yData,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+
|
|
|
+ this.myChartFour.setOption(option);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -1012,7 +1316,8 @@
|
|
|
font-weight: bold;
|
|
|
color: #28BDE0;
|
|
|
bottom: 20px;
|
|
|
- left: 0;
|
|
|
+ left: 20px;
|
|
|
+ top: 5px;
|
|
|
span {
|
|
|
cursor: pointer;
|
|
|
margin-right: 20px;
|
|
@@ -1099,7 +1404,9 @@
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.mashingName {
|
|
|
- text-align: left;
|
|
|
+ text-align: center;
|
|
|
+ font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;
|
|
|
+ color: #f5e84d;
|
|
|
}
|
|
|
}
|
|
|
}
|