fix:禅道205
This commit is contained in:
parent
906f59aa52
commit
98886813e1
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -471,45 +471,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -472,45 +472,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -471,45 +471,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -471,45 +471,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -471,45 +471,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ export default {
|
||||||
//设备
|
//设备
|
||||||
configDataEq:{
|
configDataEq:{
|
||||||
headerBGC:'#0a3f44',
|
headerBGC:'#0a3f44',
|
||||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量'],
|
header:['设备名称','设备编号','设备状态','物料数量'],
|
||||||
headerHeight:40,
|
headerHeight:40,
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
|
|
@ -493,45 +493,22 @@ export default {
|
||||||
getEqState(id) {
|
getEqState(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
that.$API.wpm.ana.equipLastMlog.req({mgroup:id}).then((res) => {
|
||||||
that.hh.bw = res.保温;
|
that.hh.yx += res.运行;
|
||||||
that.hh.lq = res.冷却;
|
that.hh.wyx += res.未运行;
|
||||||
that.hh.yx = res.运行;
|
that.hh.gz += res.故障;
|
||||||
that.hh.wyx = res.未运行;
|
|
||||||
that.hh.gz = res.故障;
|
|
||||||
let nowTime = new Date(res.now).getTime();
|
|
||||||
if(res.rows.length>0){
|
if(res.rows.length>0){
|
||||||
res.rows.forEach((item) => {
|
res.rows.forEach((item) => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.name;
|
arr[0] = item.name;
|
||||||
arr[1] = item.number;
|
arr[1] = item.number;
|
||||||
if(item.mstate=='冷却'){
|
if(item.mstate=='运行'){
|
||||||
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
arr[2] = '<span style="color:rgb(0,163,245)">运行中</span>';
|
||||||
}else if(item.mstate=='未运行'){
|
}else if(item.mstate=='未运行'){
|
||||||
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
arr[2] = '<span style="color:rgb(69,176,118)">未运行</span>';
|
||||||
}else if(item.mstate=='故障'){
|
}else if(item.mstate=='故障'){
|
||||||
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
arr[2] = '<span style="color:rgb(222,60,54)">故障</span>';
|
||||||
}
|
}
|
||||||
let process = null, workTime =0,saveTime=null,sumTime=0;
|
arr[3] = item.t_count_use?item.t_count_use:0;
|
||||||
if(item.reminder_interval_list&&item.reminder_interval_list.length>0){
|
|
||||||
item.reminder_interval_list.forEach(item=>{
|
|
||||||
sumTime += item;
|
|
||||||
})
|
|
||||||
let startTime = new Date(item.work_start_time).getTime();
|
|
||||||
workTime = (nowTime-startTime)/60000;//已工作时间
|
|
||||||
process = Math.round((workTime/sumTime)*100);
|
|
||||||
process = process>100?'100%':process+'%';
|
|
||||||
let bwSaveTime = Math.round(item.reminder_interval_list[0]-workTime);
|
|
||||||
if(bwSaveTime>0){
|
|
||||||
saveTime = bwSaveTime;
|
|
||||||
}else{
|
|
||||||
saveTime = 0;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
process = '';
|
|
||||||
saveTime = '';
|
|
||||||
}
|
|
||||||
arr[3] = process;
|
|
||||||
arr[4] = item.t_count_use?item.t_count_use:0;
|
|
||||||
that.configDataEq.data.push(arr);
|
that.configDataEq.data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue