fix: BUG修改
This commit is contained in:
parent
ff138974b0
commit
fdc5a25879
@ -23,10 +23,21 @@
|
|||||||
import Card from "@/components/card.vue";
|
import Card from "@/components/card.vue";
|
||||||
import { reactive, onMounted, ref } from "vue";
|
import { reactive, onMounted, ref } from "vue";
|
||||||
import { getWeatherDataApi } from "@/api/modules/headNoise";
|
import { getWeatherDataApi } from "@/api/modules/headNoise";
|
||||||
|
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
|
const store = GlobalStore();
|
||||||
const weatherList = ref([]);
|
const weatherList = ref([]);
|
||||||
|
//获取项目信息
|
||||||
|
const projectTimeInfo = ref({} as any);
|
||||||
|
const getProjectInfo = async () => {
|
||||||
|
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
|
||||||
|
console.log("获取项目信息", res);
|
||||||
|
projectTimeInfo.value = res.result;
|
||||||
|
loadWeather();
|
||||||
|
};
|
||||||
//获取天气
|
//获取天气
|
||||||
const loadWeather = async () => {
|
const loadWeather = async () => {
|
||||||
const res = await getWeatherDataApi({ cityid: "" });
|
const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode });
|
||||||
let json = JSON.parse(res.result);
|
let json = JSON.parse(res.result);
|
||||||
let list = json;
|
let list = json;
|
||||||
console.log("获取天气", res.result);
|
console.log("获取天气", res.result);
|
||||||
@ -41,7 +52,7 @@ const loadWeather = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadWeather();
|
getProjectInfo();
|
||||||
});
|
});
|
||||||
const weatherIcon = ref([
|
const weatherIcon = ref([
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user