|
|
@@ -93,6 +93,20 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 提示 -->
|
|
|
+ <el-dialog title="提示" :visible.sync="promptModal" width="400px">
|
|
|
+ <div class="prompt-wrap">
|
|
|
+ <div
|
|
|
+ class="prompt-list"
|
|
|
+ v-for="(item, index) in noticeData"
|
|
|
+ :key="index"
|
|
|
+ @click="noticeFn(item)"
|
|
|
+ >
|
|
|
+ <div>{{ item.title }}</div>
|
|
|
+ <div class="prompt-action">{{ item.action }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -250,7 +264,10 @@ export default {
|
|
|
// 访问统计
|
|
|
visitorData: {
|
|
|
list: {}
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 通知
|
|
|
+ promptModal: false,
|
|
|
+ noticeData: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -265,6 +282,10 @@ export default {
|
|
|
if (this.$util.isEmpty(res)) return false;
|
|
|
this.incomeData = res.incomeStat;
|
|
|
this.visitorData = res.visitStat;
|
|
|
+ this.noticeData = res.notice;
|
|
|
+ if (res.notice.length) {
|
|
|
+ this.promptModal = true;
|
|
|
+ }
|
|
|
setTimeout(() => {
|
|
|
this.initChart();
|
|
|
});
|
|
|
@@ -296,6 +317,9 @@ export default {
|
|
|
initChart() {
|
|
|
this.$refs.incomeEchart.initChart();
|
|
|
this.$refs.visitorEchart.initChart();
|
|
|
+ },
|
|
|
+ noticeFn(item) {
|
|
|
+ window.open(item.url);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -483,5 +507,17 @@ export default {
|
|
|
.sales-bottom {
|
|
|
color: green;
|
|
|
}
|
|
|
+ // modal
|
|
|
+ .prompt-wrap {
|
|
|
+ .prompt-list {
|
|
|
+ padding: 10px 0;
|
|
|
+ width: 100%;
|
|
|
+ border-bottom: 1px solid $borderColor;
|
|
|
+ @include disFlex(center, space-between);
|
|
|
+ .prompt-action {
|
|
|
+ color: $mainColor;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|