<template>
  <span @click="routerBloodSugarClick" v-if="oldButton">血糖</span>
  <el-button @click="routerBloodSugarClick" v-else>血糖</el-button>
</template>

<script setup name='BloodSugar'>
import router from "@/router";

const props = defineProps({
  patNo: String,
  times: Number,
  oldButton: {
    type: Boolean,
    default: true
  }
})

const routerBloodSugarClick = () => {
  router.push({
    name: 'bloodSugarQuery',
    params: {
      patNo: props.patNo,
      times: props.times,
    }
  })
}

</script>

<style scoped lang="scss">

</style>
