Browse Source

月报2.0改造(2.4)

洪海涛 4 năm trước cách đây
mục cha
commit
de4b41e60f

+ 3 - 1
src/store/modules/monthlyReport/edit/index.js

@@ -846,7 +846,7 @@ export default {
     // 重新拉取数据
     async refreshReport(
       { commit, state },
-      { domKey, title, subReportId, callback }
+      { domKey, title, subReportId, callback, errorback }
     ) {
       const tabPageData = _.cloneDeep(state.tabPageData)
       // console.log('refreshReport', domKey, title)
@@ -979,6 +979,8 @@ export default {
         if (res.code === 200) {
           callback && callback()
         }
+      } else {
+        errorback && errorback()
       }
     },
     // 根据月报版本,调整页面执行逻辑

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/OnlineQuestion.vue

@@ -5,7 +5,7 @@
       <span v-if="isShowItem(item.copywriter)">{{ item.copywriter === '已完成' ? '线上故障改进项:已完成' : item.copywriter }}<span :class="{ red: isShowColor(item.copywriter, item.label) }"><span class="fontWeight">{{ item.label }}</span>
         <span v-if="isShow(item.copywriter)" class="fontWeight">%</span></span><span
         v-if="item.copywriter !== '全量回滚率' && item.copywriter !== '逾期率' && item.copywriter !== '故障率'">个</span>
-        <span v-if="index < subTitle.length - 1">{{ item.copywriter.search(/发布次数|未定级故障/) > -1 ? ';' : isComma(item.copywriter) }}</span>
+        <span v-if="index < subTitle.length - 1">{{ item.copywriter.search(/发布次数|故障/) > -1 ? ';' : isComma(item.copywriter) }}</span>
         <span v-if="index === subTitle.length - 1">。</span>
       </span>
     </span>

+ 5 - 0
src/views/monthlyReport/childrenPage/editReport/components/Refresh.vue

@@ -94,6 +94,11 @@ export default {
           this.$message.success(`${title}已重新拉取,并覆盖本地数据!`)
           this.animateClass = ''
           this.$forceUpdate()
+        },
+        errorback: () => {
+          this.$message.error(`${title}已重新拉取失败!`)
+          this.animateClass = ''
+          this.$forceUpdate()
         }
       })
     },