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