Browse Source

feat: 客服异常预警 - 预警提示语显示逻辑

zhengxy 1 year ago
parent
commit
6da4ff95e5
1 changed files with 12 additions and 3 deletions
  1. 12 3
      project/src/components/customerAlerts/index.vue

+ 12 - 3
project/src/components/customerAlerts/index.vue

@@ -1,12 +1,12 @@
1 1
 <template>
2 2
   <div v-loading="loading" class="customerAlerts-wrap">
3
-    <div class="self-hint">
3
+    <div v-if="tips.isShow && tips.msg" class="self-hint" style="margin-bottom:10px;">
4 4
       <i class="el-icon-message-solid" />
5 5
       <div>
6
-        <p>客服绑定投放账号近1小时内消耗金额小于300元时不予预警</p>
6
+        <p>{{ tips.msg }}</p>
7 7
       </div>
8 8
     </div>
9
-    <div style="margin-top:10px;" class="screenBox">
9
+    <div class="screenBox">
10 10
       <el-button type="primary" size="mini" @click="onClickCreateWarnBtn">新建预警</el-button>
11 11
     </div>
12 12
     <el-table :height="height" :data="list" tooltip-effect="dark" style="width: 100%;margin-top:10px">
@@ -109,6 +109,11 @@ export default {
109 109
 
110 110
       warnDialogVisible: false, // 控制是否显示“新建预警”、“编辑预警”弹框
111 111
       currentWarnConfId: '', // 当前预警规则id
112
+
113
+      tips: { // 控制是否显示提示语
114
+        isShow: false,
115
+        msg: '',
116
+      },
112 117
     }
113 118
   },
114 119
   created () {
@@ -131,6 +136,10 @@ export default {
131 136
           this.list = res.rst.data;
132 137
           this.pagination.total = res.rst.pageInfo.total;
133 138
           this.pagination.pages = res.rst.pageInfo.pages;
139
+          if (res.rst.extra) {
140
+            this.tips.isShow = res.rst.extra.notice == 1 ? true : false
141
+            this.tips.msg = res.rst.extra.message || ''
142
+          }
134 143
         } else if (res.errno != 4002) {
135 144
           this.$message.warning(res.err)
136 145
           this.list = [];