|
|
@ -108,6 +108,10 @@ export default { |
|
|
|
console.log("取消删除"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
calcHours(start, end) { |
|
|
|
if (!start || !end) return "-"; |
|
|
|
return dayjs(end).diff(dayjs(start), "hour"); |
|
|
|
}, |
|
|
|
getTreeData() { |
|
|
|
getAreasData().then((items) => { |
|
|
|
// console.log("getAreasData", items.data); |
|
|
@ -541,14 +545,16 @@ export default { |
|
|
|
label="巡查开始时间/结束时间" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.startDate }}/{{ scope.row.endDate }}</span> |
|
|
|
<span |
|
|
|
>{{ scope.row.startDate || "-" }}/{{ |
|
|
|
scope.row.endDate || "-" |
|
|
|
}}</span |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="巡查时长/小时"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ |
|
|
|
dayjs(scope.row.endDate).diff(dayjs(scope.row.startDate), "hours") |
|
|
|
}}</span> |
|
|
|
<span>{{ calcHours(scope.row.startDate, scope.row.endDate) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|