Browse Source

月报分析反馈改造

洪海涛 4 years ago
parent
commit
e2e8ca4227

+ 6 - 9
src/views/monthlyReport/childrenPage/editReport/components/MrTable/Analysis.vue

@@ -216,12 +216,10 @@ export default {
   },
   methods: {
     open(analyticFeedbackList, index, row, columns) {
-      console.log(this.userNames)
       this.isBg = true
       this.analyticFeedbackList = _.cloneDeep(analyticFeedbackList)
       this.rowIndex = _.cloneDeep(index)
       this.$refs.normalDialog.visible = true
-      console.log(columns)
       row && (this.row = { ...row })
       columns && (this.columns = [...columns])
       this.initAnalysis()
@@ -248,6 +246,7 @@ export default {
     initAnalysis() {
       let peopleKey = ''
       // let peoples = ''
+      const username = localStorage.getItem('username')
       // 找到 责任人 的 headerKey
       this.columns.forEach(clickItem => {
         if (!peopleKey && clickItem.name === '责任人') {
@@ -264,10 +263,10 @@ export default {
           contentItem: ''
         }))
       } else {
-        console.log(254)
         this.options.forEach((elm, elmIndex) => {
-          if (elm.isCommitted && elm.feedbackCharge) {
-            this.isCommittedUser.push(elm.feedbackCharge)
+          // 找到没有提交分析反馈的人员清单
+          if (this.analyticFeedbackList[elmIndex].isCommitted && this.analyticFeedbackList[elmIndex].feedbackCharge) {
+            this.isCommittedUser.push(this.analyticFeedbackList[elmIndex].feedbackCharge)
           }
           if (!this.analyticFeedbackList[elmIndex]) {
             this.analyticFeedbackList[elmIndex] = {
@@ -278,8 +277,8 @@ export default {
           }
         })
       }
-      const username = localStorage.getItem('username')
-      if (this.options.filter(elm => elm === localStorage.getItem('username')).length) {
+
+      if (this.options.filter(elm => elm === username).length && this.isCommittedUser.indexOf(username) < 0) {
         this.feedbackCharge = username
       } else {
         this.feedbackCharge = ''
@@ -289,7 +288,6 @@ export default {
       const analyticFeedbackList = [...this.analyticFeedbackList]
       analyticFeedbackList.forEach(elm => {
         if (elm && elm.feedbackCharge && elm.feedbackCharge === this.feedbackCharge) {
-          console.log(elm, elm.analyticContents)
           if (!elm.analyticContents) {
             elm.analyticContents = []
           } else {
@@ -363,7 +361,6 @@ export default {
       this.$refs.normalDialog.visible = true
     },
     updateModule(key) {
-      // console.log(key)
       const { analyticFeedbackList, rowIndex } = this
       if (key && key === 'Submission') {
         analyticFeedbackList.forEach(elm => {

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

@@ -120,7 +120,7 @@
           </div>
           <div v-else style="padding-bottom: 0px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>
         </div>
-<!--        <div v-else style="padding-bottom: 20px;padding-top: 10px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>-->
+      <!-- <div v-else style="padding-bottom: 20px;padding-top: 10px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>-->
       </div>
       <Hold ref="Hold" @upData="upHold" />
     </div>

+ 0 - 1
src/views/monthlyReport/childrenPage/editReport/components/MrTable/index.vue

@@ -768,7 +768,6 @@ export default {
             return elm && elm.isCommitted && elm.feedbackCharge
           })
         }
-        console.log(isNewCommitteds)
         return isNewCommitteds.length !== options.length
       }
       // 默认所有情况都展示

+ 12 - 9
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -471,15 +471,18 @@ export default {
       window.open(url, '_blank')
     },
     tabClick(tab, event) {
-      this.bodyLoading = true
-      this.$store.dispatch('monthlyReportEdit/tabActiveChange', {
-        ...this.$route.query,
-        id: this.$route.query.reportId,
-        tabsActive: tab.name
-      })
-      setTimeout(() => {
-        this.bodyLoading = false
-      }, 700)
+      event.stopPropagation()
+      if (tab.name !== this.tabsActive) {
+        this.bodyLoading = true
+        this.$store.dispatch('monthlyReportEdit/tabActiveChange', {
+          ...this.$route.query,
+          id: this.$route.query.reportId,
+          tabsActive: tab.name
+        })
+        setTimeout(() => {
+          this.bodyLoading = false
+        }, 700)
+      }
     },
     dialogOpen(key) {
       if (key === 'dialogPublishAll') {