|
@@ -43,13 +43,13 @@ export default {
|
|
|
dataExponentList:[],
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- oid(newL){
|
|
|
- console.log(newL);
|
|
|
+ // watch:{
|
|
|
+ // oid(newL){
|
|
|
+ // console.log(newL);
|
|
|
|
|
|
- this.getTeaBaseData()
|
|
|
- }
|
|
|
- },
|
|
|
+ // this.getTeaBaseData()
|
|
|
+ // }
|
|
|
+ // },
|
|
|
methods: {
|
|
|
async getTeaBaseData() {
|
|
|
this.loading = true;
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
top[0].value = res.data[0][0].num
|
|
|
top[1].value = res.data[1][0].num
|
|
|
top[2].value = res.data[2][0].num
|
|
|
-
|
|
|
+
|
|
|
if (res.data[2][0].num == 0 && res.data[3][0].num == 0) {
|
|
|
top[3].value = '0%';
|
|
|
}else{
|
|
@@ -83,6 +83,17 @@ export default {
|
|
|
|
|
|
|
|
|
this.dataExponentList = top
|
|
|
+ // console.log('res.data[4][0].lab',res.data[4][0]);
|
|
|
+
|
|
|
+ // console.log('res.data[4][0].lab',res.data[4][0].lab);
|
|
|
+
|
|
|
+ res.data[4] = Array.from({ length: res.data[4][0].lab * 1}, (_, i) => {
|
|
|
+ const lab = String(i + 1).padStart(2, '0'); // 生成lab为01到最新日期
|
|
|
+ const existingEntry = res.data[4].find(entry => entry.lab === lab);
|
|
|
+ return existingEntry ? existingEntry : { lab, num: 0 };
|
|
|
+ });
|
|
|
+
|
|
|
+ // console.log('res.data[4]',res.data[4]);
|
|
|
|
|
|
this.alldata = res.data.slice(4)
|
|
|
|
|
@@ -96,7 +107,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log('getTeaBaseData',this.oid);
|
|
|
+ // console.log('getTeaBaseData',this.oid);
|
|
|
// if (!this.oid) {
|
|
|
this.getTeaBaseData()
|
|
|
// }
|