|
@@ -103,10 +103,10 @@
|
|
|
<div class="mt-5px">
|
|
|
<div class="inline-block align-middle process-state">
|
|
|
<h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
+ <span :style="{width: items.percent}"></span>
|
|
|
</h3>
|
|
|
</div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
+ <span class="ml-10px text-14px inline-block align-middle">{{items.percent}}</span>
|
|
|
</div>
|
|
|
<div class="mt-5px text-center">
|
|
|
<button type="button" class="op-btn" @click="toReview(items)">批阅任务</button>
|
|
@@ -253,7 +253,9 @@ function getListData() {
|
|
|
} else {
|
|
|
listData[i].showSub = false;
|
|
|
}
|
|
|
-
|
|
|
+ for(let j in listData[i].lc) {
|
|
|
+ listData[i].lc[j].percent = getPercentage(JSON.parse(listData[i].lc[j].ykl_lc).processList) + '%'
|
|
|
+ }
|
|
|
}
|
|
|
// console.log(listData,87)
|
|
|
total = Number(res.data.total_rows);
|
|
@@ -262,7 +264,10 @@ function getListData() {
|
|
|
})
|
|
|
}
|
|
|
getListData();
|
|
|
-
|
|
|
+function getPercentage(arr) {
|
|
|
+ const flatOne = arr.flat(1)
|
|
|
+ return parseInt(((flatOne.findLastIndex(l => l.includes(1)) + 1) / flatOne.length * 100))
|
|
|
+}
|
|
|
function filterData() {
|
|
|
cur_page = 1;
|
|
|
getListData();
|