|
@@ -35,6 +35,13 @@
|
|
|
import inspectionWork from './inspectionWork';
|
|
import inspectionWork from './inspectionWork';
|
|
|
import productions from './productions';
|
|
import productions from './productions';
|
|
|
import work from './work';
|
|
import work from './work';
|
|
|
|
|
+ import {
|
|
|
|
|
+ getMyPage,
|
|
|
|
|
+ } from '@/api/mes/produceOrder/index.js';
|
|
|
|
|
+ import {
|
|
|
|
|
+ getList
|
|
|
|
|
+ } from '@/api/qms/inspectionWork/index.js';
|
|
|
|
|
+ import { getPlanOrderList } from '@/api/warehouseManagement/inventory';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
patrolInspection,
|
|
patrolInspection,
|
|
@@ -90,26 +97,55 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- setCount() {
|
|
|
|
|
- statistics().then((data) => {
|
|
|
|
|
|
|
+ async setCount() {
|
|
|
|
|
+ const productionsRes = await getMyPage({
|
|
|
|
|
+ queryTermination: 0,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 1,
|
|
|
|
|
+ statusList: [4, 5, 7],
|
|
|
|
|
+ workCenterIds: this.$store.state.user.info.workCenterIds
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ const inspectionWorkRes = await getList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 1,
|
|
|
|
|
+ currentLoginUserId: this.$store.state.user.info.userId,
|
|
|
|
|
+ status: 0,
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ const workRes = await getPlanOrderList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 1,
|
|
|
|
|
+ executorId: this.$store.state.user.info.userId,
|
|
|
|
|
+ status: 0,
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ const eamRes = await statistics()
|
|
|
|
|
+ console.log('productionsRes~~~', productionsRes);
|
|
|
|
|
+ // statistics().then((data) => {
|
|
|
this.tabOptions = this.tabOptions.map((item) => {
|
|
this.tabOptions = this.tabOptions.map((item) => {
|
|
|
console.log(item);
|
|
console.log(item);
|
|
|
switch (item.key) {
|
|
switch (item.key) {
|
|
|
case 'maintenance':
|
|
case 'maintenance':
|
|
|
- return { ...item, count: data.maintenanceNum };
|
|
|
|
|
|
|
+ return { ...item, count: eamRes.maintenanceNum };
|
|
|
case 'patrolInspection':
|
|
case 'patrolInspection':
|
|
|
- return { ...item, count: data.patrolInspection };
|
|
|
|
|
|
|
+ return { ...item, count: eamRes.patrolInspection };
|
|
|
case 'delivery':
|
|
case 'delivery':
|
|
|
- return { ...item, count: data.quantityNum };
|
|
|
|
|
|
|
+ return { ...item, count: eamRes.quantityNum };
|
|
|
case 'repair':
|
|
case 'repair':
|
|
|
- return { ...item, count: data.repairsNum };
|
|
|
|
|
|
|
+ return { ...item, count: eamRes.repairsNum };
|
|
|
|
|
+ case 'productions':
|
|
|
|
|
+ return { ...item, count: productionsRes.count || 0 };
|
|
|
case 'inspectionWork':
|
|
case 'inspectionWork':
|
|
|
- return { ...item, count: data.inspectionWork || 0 };
|
|
|
|
|
|
|
+ return { ...item, count: inspectionWorkRes.count || 0 };
|
|
|
|
|
+ case 'work':
|
|
|
|
|
+ return { ...item, count: workRes.count || 0 };
|
|
|
default:
|
|
default:
|
|
|
return item;
|
|
return item;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
|
|
+ console.log('tabOptions~~~', this.tabOptions);
|
|
|
|
|
+ // });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|