|
|
|
@ -224,22 +224,39 @@
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</u-table-column>
|
|
|
|
|
<u-table-column
|
|
|
|
|
label="传图"
|
|
|
|
|
prop="mntnStatus.reportMap.pic"
|
|
|
|
|
width="50"
|
|
|
|
|
class-name="picBg"
|
|
|
|
|
sortable
|
|
|
|
|
:sort-method="picSort"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.mntnStatus.reportMap &&
|
|
|
|
|
scope.row.mntnStatus.reportMap.hasOwnProperty("uploads")
|
|
|
|
|
? Number(scope.row.mntnStatus.reportMap.uploads)
|
|
|
|
|
: 0
|
|
|
|
|
}}
|
|
|
|
|
</template>
|
|
|
|
|
<u-table-column label="传图" key="ct">
|
|
|
|
|
<u-table-column
|
|
|
|
|
label="当天"
|
|
|
|
|
width="50"
|
|
|
|
|
class-name="picBg"
|
|
|
|
|
sortable
|
|
|
|
|
:sort-method="picSort"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.mntnStatus.reportMap &&
|
|
|
|
|
scope.row.mntnStatus.reportMap.hasOwnProperty("uploads")
|
|
|
|
|
? Number(scope.row.mntnStatus.reportMap.uploads)
|
|
|
|
|
: 0
|
|
|
|
|
}}
|
|
|
|
|
</template>
|
|
|
|
|
</u-table-column>
|
|
|
|
|
<u-table-column
|
|
|
|
|
label="历史"
|
|
|
|
|
width="50"
|
|
|
|
|
class-name="picBg"
|
|
|
|
|
sortable
|
|
|
|
|
:sort-method="pichistorySort"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.mntnStatus.reportMap &&
|
|
|
|
|
scope.row.mntnStatus.reportMap.hasOwnProperty("delayedUploads")
|
|
|
|
|
? Number(scope.row.mntnStatus.reportMap.delayedUploads)
|
|
|
|
|
: 0
|
|
|
|
|
}}
|
|
|
|
|
</template>
|
|
|
|
|
</u-table-column>
|
|
|
|
|
</u-table-column>
|
|
|
|
|
<u-table-column
|
|
|
|
|
prop="protocol"
|
|
|
|
@ -1729,8 +1746,25 @@ export default {
|
|
|
|
|
//传图pic排序
|
|
|
|
|
picSort(a, b) {
|
|
|
|
|
// 确保 a 和 b 都有 mntnStatus.reportMap 对象
|
|
|
|
|
const aPic = (a.mntnStatus.reportMap && a.mntnStatus.reportMap.pic) || 0;
|
|
|
|
|
const bPic = (b.mntnStatus.reportMap && b.mntnStatus.reportMap.pic) || 0;
|
|
|
|
|
const aPic =
|
|
|
|
|
(a.mntnStatus.reportMap && a.mntnStatus.reportMap.uploads) || 0;
|
|
|
|
|
const bPic =
|
|
|
|
|
(b.mntnStatus.reportMap && b.mntnStatus.reportMap.uploads) || 0;
|
|
|
|
|
// 将 pic 转换为数字进行比较
|
|
|
|
|
const numA = Number(aPic);
|
|
|
|
|
const numB = Number(bPic);
|
|
|
|
|
// 根据需要进行升序或降序排序
|
|
|
|
|
// 这里假设你想要升序排序(从小到大)
|
|
|
|
|
return numA - numB;
|
|
|
|
|
// 如果你想要降序排序(从大到小),则返回 numB - numA
|
|
|
|
|
},
|
|
|
|
|
//历史传图
|
|
|
|
|
pichistorySort(a, b) {
|
|
|
|
|
// 确保 a 和 b 都有 mntnStatus.reportMap 对象
|
|
|
|
|
const aPic =
|
|
|
|
|
(a.mntnStatus.reportMap && a.mntnStatus.reportMap.delayedUploads) || 0;
|
|
|
|
|
const bPic =
|
|
|
|
|
(b.mntnStatus.reportMap && b.mntnStatus.reportMap.delayedUploads) || 0;
|
|
|
|
|
// 将 pic 转换为数字进行比较
|
|
|
|
|
const numA = Number(aPic);
|
|
|
|
|
const numB = Number(bPic);
|
|
|
|
|