合并
This commit is contained in:
@ -108,14 +108,14 @@ const currentProject = computed(() => userStore.selectedProject);
|
||||
|
||||
//获取施工人员信息
|
||||
const getConstructionUserData = async () => {
|
||||
const res = await getConstructionUserList({ projectId: currentProject.value.id });
|
||||
const res = await getConstructionUserList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
constructionUserData.value = res.data;
|
||||
};
|
||||
|
||||
//查询大屏机械列表
|
||||
const getMachineryData = async () => {
|
||||
const res = await getMachineryrList({ projectId: currentProject.value.id });
|
||||
const res = await getMachineryrList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
machineryOption.value = res.data;
|
||||
initMachinerycharts();
|
||||
@ -123,7 +123,7 @@ const getMachineryData = async () => {
|
||||
|
||||
//查询大屏材料信息
|
||||
const getOrderData = async () => {
|
||||
const res = await getMaterialsList({ projectId: currentProject.value.id });
|
||||
const res = await getMaterialsList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
orderOption.value = res.data;
|
||||
initOrderChart();
|
||||
|
||||
@ -206,21 +206,21 @@ const classOptions = {
|
||||
|
||||
//获取质量信息
|
||||
const getQualityData = async () => {
|
||||
const res = await getQualityList({ projectId: currentProject.value.id });
|
||||
const res = await getQualityList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
qualityData.value = res.data;
|
||||
};
|
||||
|
||||
//获取大屏项目新闻列表
|
||||
const getProjectNewsData = async () => {
|
||||
const res = await getprojectNewsList({ projectId: currentProject.value.id });
|
||||
const res = await getprojectNewsList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
projectNewsData.value = res.data;
|
||||
};
|
||||
|
||||
//查询大屏安全信息
|
||||
const getsafetyInspectionData = async () => {
|
||||
const res = await getsafetyInspectionList({ projectId: currentProject.value.id });
|
||||
const res = await getsafetyInspectionList({ projectId: currentProject.value?.id });
|
||||
if (res.code !== 200) return;
|
||||
safetyInspectionData.value = res.data;
|
||||
};
|
||||
|
||||
@ -80,12 +80,12 @@ const goHome = () => {
|
||||
};
|
||||
//获取天气
|
||||
const getweatherData = async () => {
|
||||
const res = await getweatherList(currentProject.value.id);
|
||||
const res = await getweatherList(currentProject.value?.id);
|
||||
weatherData.value = res.data;
|
||||
};
|
||||
//获取生产天数
|
||||
const getProductionDays = async () => {
|
||||
const res = await getSafetyDay(currentProject.value.id);
|
||||
const res = await getSafetyDay(currentProject.value?.id);
|
||||
safetyDay.value = res.data.safetyDay.toLocaleString();
|
||||
};
|
||||
//获取白天或夜晚
|
||||
|
||||
Reference in New Issue
Block a user