|
@@ -34,6 +34,11 @@
|
|
|
<avue-input-number v-model="params.situationCountMax" :min="0" style="width: 100px !important;"></avue-input-number>
|
|
<avue-input-number v-model="params.situationCountMax" :min="0" style="width: 100px !important;"></avue-input-number>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-for="col of redColKey" :slot="col" slot-scope="{ row }">
|
|
|
|
|
+ <span v-if="row.total < 183" style="color: red;" :key="col">{{ row[col] }}</span>
|
|
|
|
|
+ <span v-else style="color: #606266;" :key="col">{{ row[col] }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
|
|
|
|
@@ -57,6 +62,7 @@ import NProgress from 'nprogress';
|
|
|
import 'nprogress/nprogress.css';
|
|
import 'nprogress/nprogress.css';
|
|
|
import {getToken} from "@/util/auth";
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
import {downloadXls} from "@/util/util";
|
|
|
|
|
+import Decimal from "decimal.js";
|
|
|
|
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
export default window.$crudCommon({
|
|
@@ -70,6 +76,8 @@ export default window.$crudCommon({
|
|
|
},
|
|
},
|
|
|
wideTableColumns: [],
|
|
wideTableColumns: [],
|
|
|
printTitle: "",
|
|
printTitle: "",
|
|
|
|
|
+
|
|
|
|
|
+ redColKey: ['7', '8', '9', '10', '11', '12'],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -117,6 +125,13 @@ export default window.$crudCommon({
|
|
|
item[Number(hourItem.workDate.substring(hourItem.workDate.length - 2))] = hourItem.workHours;
|
|
item[Number(hourItem.workDate.substring(hourItem.workDate.length - 2))] = hourItem.workHours;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ let total = new Decimal(0);
|
|
|
|
|
+ for (let i=0; i<12; i++) {
|
|
|
|
|
+ console.log(item[`${i+1}`])
|
|
|
|
|
+ total = total.add(new Decimal(item[`${i+1}`] || 0));
|
|
|
|
|
+ }
|
|
|
|
|
+ item.total = total;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|