|
|
@ -1729,7 +1729,7 @@ export default {
|
|
|
|
indexMethod(index) {
|
|
|
|
indexMethod(index) {
|
|
|
|
return index + 1;
|
|
|
|
return index + 1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//计算时间 结束维修时间-开始维修时间
|
|
|
|
//计算时间 结束维修时间-开始维修时间 转化为小时
|
|
|
|
listeningTime() {
|
|
|
|
listeningTime() {
|
|
|
|
if (this.form.workEndTime != null && this.form.workStartTime != null) {
|
|
|
|
if (this.form.workEndTime != null && this.form.workStartTime != null) {
|
|
|
|
var time1 = moment(this.form.workStartTime);
|
|
|
|
var time1 = moment(this.form.workStartTime);
|
|
|
@ -1738,26 +1738,14 @@ export default {
|
|
|
|
let { _data } = duration;
|
|
|
|
let { _data } = duration;
|
|
|
|
console.log("打印维修时间", _data);
|
|
|
|
console.log("打印维修时间", _data);
|
|
|
|
//拼接
|
|
|
|
//拼接
|
|
|
|
this.form.workCostTime =
|
|
|
|
this.form.workCostTime = (_data.days*24 + _data.hours + (_data.minutes/60) + (_data.seconds/3600)).toFixed(1)+ "小时" ;
|
|
|
|
_data.years +
|
|
|
|
|
|
|
|
"年" +
|
|
|
|
|
|
|
|
_data.months +
|
|
|
|
|
|
|
|
"月" +
|
|
|
|
|
|
|
|
_data.days +
|
|
|
|
|
|
|
|
"日" +
|
|
|
|
|
|
|
|
_data.hours +
|
|
|
|
|
|
|
|
"小时" +
|
|
|
|
|
|
|
|
_data.minutes +
|
|
|
|
|
|
|
|
"分" +
|
|
|
|
|
|
|
|
_data.seconds +
|
|
|
|
|
|
|
|
"秒";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//计算时间 结束停机时间-开始停机时间
|
|
|
|
//计算时间 结束维修时间-开始维修时间
|
|
|
|
// listeningDownTime() {
|
|
|
|
// listeningTime() {
|
|
|
|
// if (this.form.actualDownEndTime != null && this.form.actualDownStartTime != null) {
|
|
|
|
// if (this.form.workEndTime != null && this.form.workStartTime != null) {
|
|
|
|
// var time1 = moment(this.form.actualDownStartTime);
|
|
|
|
// var time1 = moment(this.form.workStartTime);
|
|
|
|
// var time2 = moment(this.form.actualDownEndTime);
|
|
|
|
// var time2 = moment(this.form.workEndTime);
|
|
|
|
// let duration = moment.duration(time2.diff(time1));
|
|
|
|
// let duration = moment.duration(time2.diff(time1));
|
|
|
|
// let { _data } = duration;
|
|
|
|
// let { _data } = duration;
|
|
|
|
// console.log("打印维修时间", _data);
|
|
|
|
// console.log("打印维修时间", _data);
|
|
|
|