index.vue 849 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div v-hasPermi="['team:earlyWarning:isShow']">
  3. <el-badge :value="total" class="item">
  4. <svg-icon icon-class="bell" @click="goTo" />
  5. </el-badge>
  6. </div>
  7. </template>
  8. <script>
  9. import {
  10. WaitRepaymentTotal
  11. } from '@/api/team/teamMr'
  12. export default {
  13. name: 'RuoYiBell',
  14. data() {
  15. return {
  16. total: 0,// 预警待办数
  17. }
  18. },
  19. created() {
  20. this.getNumTotal();
  21. },
  22. methods: {
  23. getNumTotal() {
  24. WaitRepaymentTotal(this.queryParams).then(response => {
  25. this.total = response.data.total
  26. }).catch(()=>{
  27. })
  28. },
  29. goTo() {
  30. this.$router.push('/team/earlyWarning');
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="css" scoped>
  36. ::v-deep .el-badge__content.is-fixed {
  37. position: absolute;
  38. top: 10px;
  39. right: 15px;
  40. }
  41. </style>