ソースを参照

首页健康趋势增加按年度查询

wukai 9 ヶ月 前
コミット
2f1c8f5e7d

+ 8 - 4
src/views/index/widget/healthTendency.vue

@@ -24,22 +24,26 @@ import {onMounted} from "vue";
 const today = new Date();
 const yesterday = new Date(today);
 yesterday.setDate(today.getDate() - 1);
-const monthDay = ["月度","每日"]
-const dateType = ref("日")
+const monthDay = ["按年","按月","按日"]
+const dateType = ref("日")
 const dateValue = ref(yesterday)
 const chartSort = ref(null)
 onMounted(()=>{
   changeDate()
 })
 async function changeDate(){
-  if(dateType.value=="月"){
+  if(dateType.value=="月"){
     const d=parseTime(dateValue.value,"{y}-{m}")
     const res = await hlMonthDay("month",d)
     initChart(res.data)
-  }else{
+  }else if(dateType.value=="按日"){
     const d=parseTime(dateValue.value,"{y}-{m}-{d}")
     const res = await hlMonthDay("day",d)
     initChart(res.data)
+  }else{
+    const d=parseTime(dateValue.value,"{y}")
+    const res = await hlMonthDay("year",d)
+    initChart(res.data)
   }
 }
 

+ 9 - 9
src/views/risk/r6/components/indexMapping.vue

@@ -13,15 +13,15 @@
         </el-select>
       </template>
     </el-table-column>
-    <el-table-column label="操作" width="80" align="center">
-      <template #default="{row}">
-        <el-popconfirm title="确认要删除该条信息吗?" @confirm="handleDelete(row)" width="200">
-          <template #reference>
-            <el-button type="danger" link>删除</el-button>
-          </template>
-        </el-popconfirm>
-      </template>
-    </el-table-column>
+<!--    <el-table-column label="操作" width="80" align="center">-->
+<!--      <template #default="{row}">-->
+<!--        <el-popconfirm title="确认要删除该条信息吗?" @confirm="handleDelete(row)" width="200">-->
+<!--          <template #reference>-->
+<!--            <el-button type="danger" link>删除</el-button>-->
+<!--          </template>-->
+<!--        </el-popconfirm>-->
+<!--      </template>-->
+<!--    </el-table-column>-->
   </el-table>
   <el-dialog v-model="visible" title="新增指标" width="400" append-to-body>
     <el-form ref="objRef" :model="form" :rules="rules" label-width="100px" label-suffix=":" size="small">