浏览代码

no message

xiaoxin 2 年之前
父节点
当前提交
fc07552a3b
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      src/components/school/schoolLeft.vue

+ 7 - 7
src/components/school/schoolLeft.vue

@@ -91,7 +91,7 @@ const YData = ref<any>([]);
 // 其他数据
 // 其他数据
 const YData2 = ref<any>([]);
 const YData2 = ref<any>([]);
 // 访客类型数组
 // 访客类型数组
-const typeList = ref<any>([]);
+// const typeList = ref<any>([]);
 
 
 onMounted(() => {
 onMounted(() => {
   // 获取办学规模信息
   // 获取办学规模信息
@@ -138,9 +138,9 @@ const getSchoolVisitor = async () => {
   // console.log(res);
   // console.log(res);
   if ((res as any).code == 200) {
   if ((res as any).code == 200) {
     // 获取访客类型数组
     // 获取访客类型数组
-    res.data[0].tjs.forEach((ele: any) => {
-      typeList.value.push(ele.name);
-    });
+    // res.data[0].tjs.forEach((ele: any) => {
+    //   typeList.value.push(ele.name);
+    // });
 
 
     res.data.forEach((ele: any) => {
     res.data.forEach((ele: any) => {
       // 获取X轴时间数据
       // 获取X轴时间数据
@@ -226,7 +226,7 @@ const initLineChart = () => {
       },
       },
     },
     },
     legend: {
     legend: {
-      data: typeList.value,
+      data: ["家长", "其他"],
       left: "60%",
       left: "60%",
       top: 18,
       top: 18,
       textStyle: {
       textStyle: {
@@ -278,7 +278,7 @@ const initLineChart = () => {
     ],
     ],
     series: [
     series: [
       {
       {
-        name: typeList.value[0],
+        name: "家长",
         type: "line",
         type: "line",
         smooth: true,
         smooth: true,
         showSymbol: false,
         showSymbol: false,
@@ -297,7 +297,7 @@ const initLineChart = () => {
         data: YData.value.reverse(),
         data: YData.value.reverse(),
       },
       },
       {
       {
-        name: typeList.value[1],
+        name: "其他",
         type: "line",
         type: "line",
         smooth: true,
         smooth: true,
         showSymbol: false,
         showSymbol: false,