洪海涛 4 년 전
부모
커밋
2858254f9d

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

@@ -130,7 +130,7 @@ size="small"
       is-succes
       :modal="false"
       :show-dialog="false"
-      :title="'确认月报'"
+      :title="'确认分析反馈'"
       width="319px"
       @cancel="dialogConfirmCancel"
       @succes="updateModule('Submission')"
@@ -177,7 +177,7 @@ export default {
       this.$forceUpdate()
     },
     delItem(index) {
-      console.log('删除')
+      // console.log('删除')
       this.analyticFeedback.analyticContents.splice(index, 1)
     },
     addSubItem(index) {
@@ -193,7 +193,7 @@ export default {
       this.$forceUpdate()
     },
     delSubItem(index, subindex) {
-      console.log(index, subindex)
+      // console.log(index, subindex)
       this.analyticFeedback.analyticContents[index].improvementItems.splice(
         subindex,
         1
@@ -205,7 +205,7 @@ export default {
       this.isBg = true
     },
     normalDialogCancel() {
-      console.log(210, '这里隐藏了时间', this.$refs['dialogConfirm'].visible)
+      // console.log(210, '这里隐藏了时间', this.$refs['dialogConfirm'].visible)
       if (!this.$refs['dialogConfirm'].visible) {
         this.isBg = false
       }
@@ -216,9 +216,11 @@ export default {
       this.$refs.normalDialog.visible = true
     },
     updateModule(key) {
+      // console.log(key)
       const { analyticFeedback, rowIndex } = this
       if (key && key === 'Submission') {
         analyticFeedback.isCommitted = true
+        analyticFeedback.feedbackType = 'feedback_commit'
       }
       this.oldBaseData = _.cloneDeep(this.baseData)
       this.$emit('upData', {

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

@@ -127,7 +127,7 @@ export default {
   methods: {
     setHold(index, subIndex, subItem) {
       subItem.isProgressEdit = false
-      console.log(this.analyticFeedback)
+      // console.log(this.analyticFeedback)
       if (subItem.isHold) {
         subItem.isHold = false
         this.$forceUpdate()

+ 17 - 9
src/views/monthlyReport/v2/childrenPage/editReport/components/MrTable/index.vue

@@ -476,13 +476,13 @@ export default {
         })
       }
       if (btnItem.value === '分析反馈') {
-        console.log(293, btnItem, scope)
+        // console.log(293, btnItem, scope)
         this.$refs.Analysis.open(scope.row.analyticFeedback, scope.$index)
       }
     },
     // 另存为
     saveAsRow(command, row, item) {
-      console.log(414)
+      // console.log(414)
       this.$store.commit('monthlyReportEditV2/SAVE_AS', {
         tableHeaders: this.columns,
         tableRows: row,
@@ -491,13 +491,18 @@ export default {
     },
     // 分析反馈问题更新
     upDataAnalysis({ rowIndex, analyticFeedback }) {
+      // console.log({ rowIndex, analyticFeedback })
       if (this.pageType.search(/edit/) < 0) {
-        console.log(rowIndex, analyticFeedback)
+        // console.log(rowIndex, analyticFeedback)
         this.feedbackIndex = rowIndex
         this.tableData[rowIndex].analyticFeedback = _.cloneDeep(
           analyticFeedback
         )
-        this.setAnalyticFeedback()
+        let feedbackType = ''
+        if (analyticFeedback.hasOwnProperty('feedbackType')) {
+          feedbackType = 'feedbackType'
+        }
+        this.setAnalyticFeedback(feedbackType)
       }
     },
     addTableData() {
@@ -576,7 +581,7 @@ export default {
       }
     },
     // 查看页面数据分析
-    setAnalyticFeedback() {
+    setAnalyticFeedback(key = '') {
       if (
         // this.pageType.search(/edit/) < 0 &&
         // this.pageDate.status > 10 &&
@@ -588,13 +593,13 @@ export default {
         const run = (arr) => {
           arr.forEach((elm) => {
             if (elm.domKey === this.domKey) {
-              console.log(elm)
+              // console.log(elm)
               obj = _.cloneDeep(elm)
             }
             if (elm.content.length) {
               elm.content.forEach((item) => {
                 if (item.domKey === this.domKey) {
-                  console.log(elm)
+                  // console.log(elm)
                   obj = _.cloneDeep(elm)
                 }
               })
@@ -617,6 +622,9 @@ export default {
         // console.log(params)
         // 提交数据
         if (obj && obj.content[0].tableRows.length) {
+          if (key && key === 'feedbackType') {
+            params[key] = 'feedback_commit'
+          }
           updateAnalyticFeedback(params).then((res) => {
             if (res.code === 200) {
               this.analyticFeedback = res.data
@@ -698,12 +706,12 @@ export default {
     },
     // 修改链接
     linkEditChange({ rowIndex, addresLink }) {
-      console.log(rowIndex, addresLink)
+      // console.log(rowIndex, addresLink)
       this.tableData[rowIndex].operationTarget = addresLink
     },
     // 页面跳转
     goto(url) {
-      console.log(url)
+      // console.log(url)
       url && window.open(url, '_blank')
     }
   }