洪海涛 4 жил өмнө
parent
commit
daa1ae347c

+ 1 - 1
src/store/modules/monthlyReport/utils/index.js

@@ -182,7 +182,7 @@ export function analyticFeedbackToObj(obj) {
   newObj.analyticContents.forEach((elm) => {
     _.isArray(elm.improvementItems) &&
     elm.improvementItems.forEach((item) => {
-      if (item.personInCharge.search(/\[|\]/g) > -1) {
+      if (item.personInCharge && item.personInCharge.search(/\[|\]/g) > -1) {
         item.personInCharge = item.personInCharge ? strToArr(item.personInCharge) : []
       }
       // peopleLists = Array.from(new Set([...peopleLists, ...item.personInCharge]))

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

@@ -35,6 +35,7 @@ export default {
     return {
       index: '',
       subIndex: '',
+      parentIndex: '',
       ruleForm: {
         holdReason: ''
       },
@@ -46,9 +47,10 @@ export default {
     }
   },
   methods: {
-    open(index, subIndex, holdReason) {
+    open(index, subIndex, holdReason, parentIndex) {
       this.index = index
       this.subIndex = subIndex
+      this.parentIndex = parentIndex
       this.ruleForm.holdReason = holdReason
       this.$refs.normalDialog.visible = true
     },
@@ -60,6 +62,7 @@ export default {
           this.$emit('upData', {
             index: this.index,
             subIndex: this.subIndex,
+            parentIndex: this.parentIndex,
             holdReason: this.ruleForm.holdReason
           })
           this.$refs.normalDialog.visible = false

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

@@ -105,7 +105,7 @@
                       <span
                         v-if=" !subItem.personInCharge || subItem.personInCharge.indexOf(username) > -1 "
                         class="Hold"
-                        @click.stop="setHold(index, subIndex, subItem)"
+                        @click.stop="setHold(index, subIndex, subItem,parentIndex)"
                       >{{ subItem.isHold ? '解除Hold' : 'Hold' }}</span
                       >
                     </span>
@@ -158,7 +158,7 @@ export default {
     }
   },
   methods: {
-    setHold(index, subIndex, subItem) {
+    setHold(index, subIndex, subItem, parentIndex) {
       subItem.isProgressEdit = false
       // console.log(this.analyticFeedback)
       if (subItem.isHold) {
@@ -166,16 +166,16 @@ export default {
         this.$forceUpdate()
         return
       }
-      this.$refs.Hold.open(index, subIndex, subItem.holdReason)
+      this.$refs.Hold.open(index, subIndex, subItem.holdReason, parentIndex)
     },
-    upHold({ index, subIndex, holdReason }) {
-      // console.log({ index, subIndex, holdReason })
-      this.analyticFeedback.analyticContents[index].improvementItems[
+    upHold({ index, subIndex, holdReason, parentIndex }) {
+      console.log({ index, subIndex, holdReason, analyticFeedbackList: this.analyticFeedbackList })
+      this.analyticFeedbackList[parentIndex].analyticContents[index].improvementItems[
         subIndex
       ].isHold = true
       if (holdReason) {
         window.log({ c: 'report_view', d: 'report_view_Feeback_hold' })
-        this.analyticFeedback.analyticContents[index].improvementItems[
+        this.analyticFeedbackList[parentIndex].analyticContents[index].improvementItems[
           subIndex
         ].holdReason = holdReason
       }

+ 12 - 7
src/views/monthlyReport/index.vue

@@ -22,13 +22,18 @@
     <div v-loading="contentLoading" class="content-wrapper">
       <div class="content-reportName">
         {{ reportName }}
-        <el-button v-if="tagData.status === 20" type="text" @click="jump('report_home_Publication', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })">月报发布</el-button>
-        <el-button v-if="tagData.status === 30" type="text" @click="jump('report_home_viewReport', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })"> 查看完整报告</el-button>
-        <!--    @click="downloadMonthlyReportFn"    -->
-        <!-- <a target="blank" :href="`${projectManagementUrl}/monthlyReport/downloadMonthlyReport?id=${reportValue}&refrash=true`" :download="`${reportName}.pdf`" style="margin-left: 10px;display: inline-block"><svg-icon icon-class="monthlyReport下载" class="icon" /></a> -->
-        <a v-show="isShowPdfPushDow() && tagData.status === 20" style="margin-left: 10px;display: inline-block" @click="downloadFile(true)"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>
-        <a v-show="isShowPdfDow()" target="blank" style="margin-left: 10px;display: inline-block" @click="downloadFile"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>
-        <el-button v-if="tagData.status === 0" type="text" @click="sendConfirm(reportData)"> 发送确认</el-button>
+        <div class="content-reportName-btn-wrapper">
+          <span v-if="tagData.status === 20" type="text" @click="jump('report_home_Publication', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })">月报发布</span>
+          <span v-if="tagData.status === 30" type="text" @click="jump('report_home_viewReport', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })"><i class="el-icon-document" />&nbsp;&nbsp;查看完整报告</span>
+          <!--    @click="downloadMonthlyReportFn"    -->
+          <!-- <a target="blank" :href="`${projectManagementUrl}/monthlyReport/downloadMonthlyReport?id=${reportValue}&refrash=true`" :download="`${reportName}.pdf`" style="margin-left: 10px;display: inline-block"><svg-icon icon-class="monthlyReport下载" class="icon" /></a> -->
+          <span v-show="isShowPdfPushDow() && tagData.status === 20" style="margin-left: 10px;display: inline-block" @click="downloadFile(true)"><svg-icon icon-class="monthlyReport下载" class="icon" />&nbsp;&nbsp;下载报告</span>
+<!--          <a v-show="isShowPdfPushDow() && tagData.status === 20" style="margin-left: 10px;display: inline-block" @click="downloadFile(true)"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>-->
+          <span v-show="isShowPdfDow()" style="margin-left: 10px;display: inline-block" @click="downloadFile(true)"><svg-icon icon-class="monthlyReport下载" class="icon" />&nbsp;&nbsp;下载报告</span>
+<!--          <a v-show="isShowPdfDow()" target="blank" style="margin-left: 10px;display: inline-block" @click="downloadFile"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>-->
+          <span v-if="tagData.status === 0" type="text" @click="sendConfirm(reportData)">发送确认</span>
+        </div>
+
       </div>
       <div v-show="tagData.status === 30" class="report-bottom">
         <span v-if="tagData.analysisList"><i class="el-icon-warning report-icon-warning" /> 本月质量月报<b>{{ tagData.analysisList }}</b>有您负责的重点问题需要分析反馈,请点击<b>{{ tagData.analysisList }}</b>的"查看更多"按钮进入填写!</span>

+ 15 - 0
src/views/monthlyReport/style.less

@@ -25,6 +25,21 @@
     font-weight: 600;
     color: #333333;
     line-height: 39px;
+    position: relative;
+    .content-reportName-btn-wrapper {
+      position: absolute;
+      right: 0;
+      top: 0;
+      font-size: 14px;
+      font-weight: 400;
+      span{
+        margin-left: 10px;
+        &:hover{
+          color: #409EFF;
+          cursor: pointer;
+        }
+      }
+    }
   }
 }
 .report-create-margin {