feige
2024-06-10 aef876fd5e4f26eead249243b1523ec4cf355340
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
  <div class="app-container">
    <div class="image-container">
      <img class="bottom-image" src="../assets/images/shouye.png" alt="Bottom Image">
      <div class="notification-box" :class="{ 'has-new-message': hasNewMessage }">
        <div class="left-section">消息通知</div>
        <el-button class="right-section " type="text" @click="handleClick">点击进入</el-button>
        <div class="new-message-dot" v-if="hasNewMessage"></div>
      </div>
    </div>
 
  </div>
</template>
 
<script>
 
 
export default {
  name: "App",
  dicts: ['sys_normal_disable'],
  data(){
    return {
      hasNewMessage:false,
    };
  },
  created() {},
  methods:{
    handleClick(){
      this.$router.push('/views/shouye');
    }
  }
};
</script>
 
<style scoped>
.app-container{
   background-color: #FEF7FC;
 }
.image-container {
  position: relative;
  width: 100%;
  height: 100%;
}
.bottom-image {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
 
.notification-box {
  position: absolute;
  top: 760px;
  left: 150px;
  display: flex;
  align-items: center;
  width: 20%;
  height: 8%;
  background-color: rgba(227, 219, 219, 0.51);
  padding: 10px;
  /*color: white;*/
  z-index: 2; /* 设置通知框层级为2,比图片高 */
}
 
.left-section {
  flex-grow: 1;
}
 
.right-section {
  margin-left: 10px;
}
 
.new-message-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: red;
  border-radius: 50%;
}
</style>