|
@@ -210,7 +210,7 @@
|
|
|
this.getTree();
|
|
this.getTree();
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- this.getStatistics();
|
|
|
|
|
|
|
+ // this.getStatistics();
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.calculateTopNavHeight();
|
|
this.calculateTopNavHeight();
|
|
|
});
|
|
});
|
|
@@ -258,6 +258,31 @@
|
|
|
this.getStatistics();
|
|
this.getStatistics();
|
|
|
}, 12000);
|
|
}, 12000);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ getBrages() {
|
|
|
|
|
+ qualityTodoByPda().then((res) => {
|
|
|
|
|
+ console.log(2)
|
|
|
|
|
+ this.qmsList.forEach((item) => {
|
|
|
|
|
+ if (item.name == "质检工单") item.badge = res.workOrderNum;
|
|
|
|
|
+ if (item.name == "我的质检工单")
|
|
|
|
|
+ item.badge = res.myWorkOrderNum;
|
|
|
|
|
+ if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
|
|
|
|
|
+ if (item.name == "我的受托单")
|
|
|
|
|
+ item.badge = res.myRequestEntrustNum;
|
|
|
|
|
+ });
|
|
|
|
|
+ // this.qmsList = f.children;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ statistics()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.workOrder = res;
|
|
|
|
|
+ this.operationsList.forEach((item) => {
|
|
|
|
|
+ if (item.name == "保养工单") item.badge = res.maintenanceNum;
|
|
|
|
|
+ if (item.name == "巡点检工单") item.badge = res.patrolInspection;
|
|
|
|
|
+ if (item.name == "维修工单") item.badge = res.repairsNum;
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getTree() {
|
|
getTree() {
|
|
|
let _list = uni.getStorageSync("treeList");
|
|
let _list = uni.getStorageSync("treeList");
|
|
@@ -273,18 +298,18 @@
|
|
|
if (f.path == "productionManage") {
|
|
if (f.path == "productionManage") {
|
|
|
this.productionList = f.children;
|
|
this.productionList = f.children;
|
|
|
} else if (f.path == "operationsList") {
|
|
} else if (f.path == "operationsList") {
|
|
|
- const promise = statistics().then((res) => {
|
|
|
|
|
- console.log(3)
|
|
|
|
|
- this.workOrder = res;
|
|
|
|
|
- f.children.forEach((item) => {
|
|
|
|
|
- if (item.name == "保养工单") item.badge = res.maintenanceNum;
|
|
|
|
|
- if (item.name == "巡点检工单")
|
|
|
|
|
- item.badge = res.patrolInspection;
|
|
|
|
|
- if (item.name == "维修工单") item.badge = res.repairsNum;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // const promise = statistics().then((res) => {
|
|
|
|
|
+ // console.log(3)
|
|
|
|
|
+ // this.workOrder = res;
|
|
|
|
|
+ // f.children.forEach((item) => {
|
|
|
|
|
+ // if (item.name == "保养工单") item.badge = res.maintenanceNum;
|
|
|
|
|
+ // if (item.name == "巡点检工单")
|
|
|
|
|
+ // item.badge = res.patrolInspection;
|
|
|
|
|
+ // if (item.name == "维修工单") item.badge = res.repairsNum;
|
|
|
|
|
+ // });
|
|
|
this.operationsList = f.children;
|
|
this.operationsList = f.children;
|
|
|
- });
|
|
|
|
|
- asyncPromises.push(promise);
|
|
|
|
|
|
|
+ // });
|
|
|
|
|
+ // asyncPromises.push(promise);
|
|
|
} else if (f.path == "warehouseManagement") {
|
|
} else if (f.path == "warehouseManagement") {
|
|
|
this.warehousingList = f.children;
|
|
this.warehousingList = f.children;
|
|
|
} else if (f.path == "saleManageList") {
|
|
} else if (f.path == "saleManageList") {
|
|
@@ -303,19 +328,19 @@
|
|
|
} else if (f.path == "purchasingManage") {
|
|
} else if (f.path == "purchasingManage") {
|
|
|
this.purchaseManageList = f.children;
|
|
this.purchaseManageList = f.children;
|
|
|
} else if (f.path == "qualityManage") {
|
|
} else if (f.path == "qualityManage") {
|
|
|
- const promise = qualityTodoByPda().then((res) => {
|
|
|
|
|
- console.log(2)
|
|
|
|
|
- f.children.forEach((item) => {
|
|
|
|
|
- if (item.name == "质检工单") item.badge = res.workOrderNum;
|
|
|
|
|
- if (item.name == "我的质检工单")
|
|
|
|
|
- item.badge = res.myWorkOrderNum;
|
|
|
|
|
- if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
|
|
|
|
|
- if (item.name == "我的受托单")
|
|
|
|
|
- item.badge = res.myRequestEntrustNum;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // const promise = qualityTodoByPda().then((res) => {
|
|
|
|
|
+ // console.log(2)
|
|
|
|
|
+ // f.children.forEach((item) => {
|
|
|
|
|
+ // if (item.name == "质检工单") item.badge = res.workOrderNum;
|
|
|
|
|
+ // if (item.name == "我的质检工单")
|
|
|
|
|
+ // item.badge = res.myWorkOrderNum;
|
|
|
|
|
+ // if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
|
|
|
|
|
+ // if (item.name == "我的受托单")
|
|
|
|
|
+ // item.badge = res.myRequestEntrustNum;
|
|
|
|
|
+ // });
|
|
|
this.qmsList = f.children;
|
|
this.qmsList = f.children;
|
|
|
- });
|
|
|
|
|
- asyncPromises.push(promise);
|
|
|
|
|
|
|
+ // });
|
|
|
|
|
+ // asyncPromises.push(promise);
|
|
|
} else if (f.path == "productionControlManagement") {
|
|
} else if (f.path == "productionControlManagement") {
|
|
|
this.pcsList = f.children;
|
|
this.pcsList = f.children;
|
|
|
} else if (f.path == "dispatchManage") {
|
|
} else if (f.path == "dispatchManage") {
|
|
@@ -328,14 +353,16 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 等待所有异步数据加载完成后再生成导航
|
|
// 等待所有异步数据加载完成后再生成导航
|
|
|
- if (asyncPromises.length > 0) {
|
|
|
|
|
- Promise.all(asyncPromises).then(() => {
|
|
|
|
|
- console.log(1)
|
|
|
|
|
- this.buildNavList();
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- this.buildNavList();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (asyncPromises.length > 0) {
|
|
|
|
|
+ // // Promise.all(asyncPromises).then(() => {
|
|
|
|
|
+ // console.log(1)
|
|
|
|
|
+ // this.buildNavList();
|
|
|
|
|
+ // // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ this.buildNavList();
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.getBrages();
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
// 构建导航列表
|
|
// 构建导航列表
|
|
|
buildNavList() {
|
|
buildNavList() {
|
|
@@ -389,6 +416,8 @@
|
|
|
this.moduleNavList = Object.entries(navMap)
|
|
this.moduleNavList = Object.entries(navMap)
|
|
|
.filter(([key]) => this[key]?.length > 0)
|
|
.filter(([key]) => this[key]?.length > 0)
|
|
|
.map(([, value]) => value);
|
|
.map(([, value]) => value);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
// 点击导航跳转 - 使用动态获取的顶部高度进行精确定位
|
|
// 点击导航跳转 - 使用动态获取的顶部高度进行精确定位
|
|
|
goToModule(item, index) {
|
|
goToModule(item, index) {
|