|
@@ -289,6 +289,7 @@ $(document).ready(() => {
|
|
|
sum () {
|
|
|
const result = [];
|
|
|
const sum = { name: '合计', positive_tp: 0, negative_tp: 0 };
|
|
|
+ const other = { name: '未分类', positive_tp: 0, negative_tp: 0 };
|
|
|
for (const d of this.displayData) {
|
|
|
if (d.b_type) {
|
|
|
let type = result.find(x => { return d.b_type === x.name; });
|
|
@@ -301,6 +302,13 @@ $(document).ready(() => {
|
|
|
} else {
|
|
|
type.negative_tp = ZhCalc.add(type.negative_tp, d.tp);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ other.show = true;
|
|
|
+ if (d.tp >= 0) {
|
|
|
+ other.positive_tp = ZhCalc.add(other.positive_tp, d.tp);
|
|
|
+ } else {
|
|
|
+ other.negative_tp = ZhCalc.add(other.negative_tp, d.tp);
|
|
|
+ }
|
|
|
}
|
|
|
if (d.tp >= 0) {
|
|
|
sum.positive_tp = ZhCalc.add(sum.positive_tp, d.tp);
|
|
@@ -308,6 +316,7 @@ $(document).ready(() => {
|
|
|
sum.negative_tp = ZhCalc.add(sum.negative_tp, d.tp);
|
|
|
}
|
|
|
}
|
|
|
+ if (other.show) result.push(other);
|
|
|
result.push(sum);
|
|
|
result.forEach(x => { x.tp = ZhCalc.add(x.positive_tp, x.negative_tp); });
|
|
|
return result;
|