fix: BUG修改

This commit is contained in:
kun 2023-10-20 10:55:29 +08:00
parent 17bc7476a7
commit 2b5e556363
2 changed files with 6 additions and 6 deletions

View File

@ -102,7 +102,7 @@ const headerList = reactive([
{ label: "逾期", color: "#fc6f8e" } { label: "逾期", color: "#fc6f8e" }
]); ]);
const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]); const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]);
const projects = reactive([ const projects = ref([
{ {
pName: "抹灰工程1", pName: "抹灰工程1",
startTime: "2023/05/29", startTime: "2023/05/29",
@ -210,7 +210,7 @@ let tooltipsStyle = reactive({
const getDataList = async () => { const getDataList = async () => {
const res = await bigItemAll({}); const res = await bigItemAll({});
console.log(res); console.log(res);
projects = res.result; projects.value = res.result;
}; };
onMounted(() => { onMounted(() => {
getDataList(); getDataList();
@ -377,7 +377,7 @@ const dateList = computed(() => {
p.children && mapDates(p.children); p.children && mapDates(p.children);
}); });
}; };
mapDates(projects); mapDates(projects.value);
dates = dates.map(date => date.slice(0, 7)).sort(); dates = dates.map(date => date.slice(0, 7)).sort();
dates = [...new Set(dates)]; dates = [...new Set(dates)];
console.log("dateList----", dates); console.log("dateList----", dates);

View File

@ -102,7 +102,7 @@ const headerList = reactive([
{ label: "逾期", color: "#fc6f8e" } { label: "逾期", color: "#fc6f8e" }
]); ]);
const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]); const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]);
const projects = reactive([ const projects = ref([
{ {
pName: "抹灰工程1", pName: "抹灰工程1",
startTime: "2023/05/29", startTime: "2023/05/29",
@ -210,7 +210,7 @@ let tooltipsStyle = reactive({
const getDataList = async () => { const getDataList = async () => {
const res = await bigItemAll({}); const res = await bigItemAll({});
console.log(res); console.log(res);
projects = res.result; projects.value = res.result;
}; };
onMounted(() => { onMounted(() => {
getDataList(); getDataList();
@ -377,7 +377,7 @@ const dateList = computed(() => {
p.children && mapDates(p.children); p.children && mapDates(p.children);
}); });
}; };
mapDates(projects); mapDates(projects.value);
dates = dates.map(date => date.slice(0, 7)).sort(); dates = dates.map(date => date.slice(0, 7)).sort();
dates = [...new Set(dates)]; dates = [...new Set(dates)];
console.log("dateList----", dates); console.log("dateList----", dates);