Эх сурвалжийг харах

月报:团队数据展示异常修复

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

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

@@ -362,6 +362,7 @@ export default {
       // state.tabPageData = {
       //   children: _.cloneDeep(data)
       // }
+      console.log(365, state.tabPageData)
       state.tabPageData = newObj
       state.domKeys = domKeys
       // 页面恢复待编辑状态

+ 2 - 13
src/views/monthlyReport/childrenPage/editReport/components/CascaderInfo.vue

@@ -1,10 +1,10 @@
 <template>
-<div v-if="teamData && teamData.length">
+  <div v-if="teamData && teamData.length">
   <span
     v-for="(item, index) in itemName"
     :key="index"
     style="margin-right: 10px">{{ item }}<span>{{ !(index >= itemName.length - 1) ? ',' : '' }}</span></span>
-</div>
+  </div>
 </template>
 
 <script>
@@ -42,20 +42,9 @@ export default {
   },
   methods: {
     init() {
-      // console.log(this.teamData, 45)
       if (this.teamData && this.teamData.length) {
-        // const [first, second] = this.teamData
-        // // console.log(first, second)
-        // const arr = [...first]
-        // if (arr.length < 2 && second) {
-        //   arr.concat(second[0])
-        // }
         const itemName = []
         this.teamData.forEach((elm) => {
-          // if (_.isArray(elm)) {
-          // const last = elm[elm.length - 1]
-          //   itemName.push(this.find(elm))
-          // }
           itemName.push(this.find(elm))
         })
         // 数组去重

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

@@ -182,7 +182,7 @@
       </el-table-column>
     </el-table>
     <div class="plus-table-data" :style="{ marginBottom: plusTableDataBottom }">
-      <el-button v-if="pageDate.status < 20" type="text" @click.stop="addTableData">
+      <el-button v-if="pageDate && pageDate.status < 20" type="text" @click.stop="addTableData">
         <svg-icon icon-class="data-plus" class="icon" />
         新增
       </el-button>
@@ -256,7 +256,7 @@ export default {
   },
   computed: {
     isExpand() {
-      return this.pageDate.status === 30 && ((this.tabsActive.search(/本月重点问题/) > -1 && this.pageType === 'readAll') || (this.pageType === 'read' && this.title === '本月重点问题'))
+      return this.pageDate && this.pageDate.status && this.pageDate.status === 30 && ((this.tabsActive.search(/本月重点问题/) > -1 && this.pageType === 'readAll') || (this.pageType === 'read' && this.title === '本月重点问题'))
     },
     selectEnum() {
       return this.$store.state.monthlyReportEdit.selectEnum
@@ -389,7 +389,7 @@ export default {
       })
       // if (this.pageDate.status > 10 && this.tabsActive.indexOf('本月重点问题') < 0) {
       // 非编辑状态,并且不是·本月重点问题·,删除操作按钮
-      if (this.pageDate.status > 10 && !this.isExpand) {
+      if (this.pageDate && this.pageDate.status > 10 && !this.isExpand) {
         newColumns.splice(newColumns.length - 1, 1)
       }
       return newColumns
@@ -459,7 +459,7 @@ export default {
      * @returns {boolean}
      */
     isShowButton(row) {
-      if (this.pageType.search(/edit/) > -1 && this.pageDate.status < 20) {
+      if (this.pageType.search(/edit/) > -1 && this.pageDate && this.pageDate.status < 20) {
         return true
       }
       if (row.analyticFeedback && row.analyticFeedback.isCommitted) {

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

@@ -261,7 +261,7 @@ export default {
       )
     }
     // 获取部门数据;只有查看但业务线时,才需要单独获取部门数据
-    if (this.$route.query.pageType === 'read' && this.$route.query.reportId) {
+    if (this.$route.query.pageType === 'readAll' && this.$route.query.reportId) {
       this.$store.dispatch(
         'monthlyReportEdit/setSelectEnum',
         this.$route.query.reportId