Ver código fonte

缺陷修复

洪海涛 4 anos atrás
pai
commit
fd776f9306

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

@@ -297,10 +297,12 @@ export default {
               if (arr[i].domKey === key) {
                 // 添加子项
                 if (isSub) {
+                  // params.domIndexKey = arr[i].children
                   arr[i].children = [...arr[i].children, { ...params }]
                 }
                 // 添加同级
                 if (!isSub) {
+                  // params.domIndexKey = i + 1
                   arr.splice(i + 1, 0, params)
                 }
                 return

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

@@ -1,5 +1,5 @@
 <template>
-  <div @click.stop>
+  <div>
     <div
       v-if="isExpand && analyticFeedback"
       style="padding-top: 10px;"
@@ -21,6 +21,7 @@
       :cell-style="{ 'font-size': '14px', color: 'rgb(102,102,102)' }"
       size="small"
       show-overflow-tooltip="true"
+      @click.stop
     >
       <!-- <el-table-column v-if="index === 0 && tabsActive.indexOf('本月重点问题') > -1
         && pageType !== 'edit' ? 'expand' : ''" label="展开" type="expand"> -->
@@ -205,7 +206,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <div class="plus-table-data" :style="{ marginBottom: plusTableDataBottom }">
+    <div class="plus-table-data" :style="{ marginBottom: plusTableDataBottom }" @click.stop>
       <el-button
         v-if="pageDate && pageDate.status < 20"
         type="text"
@@ -215,9 +216,12 @@
         新增
       </el-button>
     </div>
-    <slot name="fixedText" />
-    <markingIssues ref="markingIssues" />
-    <Analysis ref="Analysis" @upData="upDataAnalysis" />
+    <span @click.stop>
+      <slot name="fixedText" />
+      <markingIssues ref="markingIssues" />
+      <Analysis ref="Analysis" @upData="upDataAnalysis" />
+    </span>
+
   </div>
 </template>
 

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

@@ -19,7 +19,7 @@
         v-html="item.value || '请点此处击添加数据!'"
       />
     </div>
-    <div v-else style="margin-top: 10px" v-html="item.value || '暂无数据!'" />
+    <div v-else style="margin-top: 10px;padding-left: 20px;" v-html="item.value || '暂无数据!'" />
   </div>
 </template>
 

+ 11 - 7
src/views/monthlyReport/childrenPage/editReport/components/anchor.vue

@@ -76,7 +76,7 @@
             class="title"
             :class="{ active: active === item.domKey, hide: !item.isVisible }"
           >
-            <span v-if="isShowItem(item.isVisible) && item.isVisible" v-html="headerIndex(item, index)" /><span v-else style="color: transparent">一、</span>{{
+            <span v-html="headerIndex(item, index)" />{{
               setTitle(item.title)
             }}</span
           >
@@ -100,6 +100,7 @@
 <script>
 // import _ from 'lodash'
 import { toChinesNum } from '@/utils'
+import _ from 'lodash'
 
 export default {
   name: 'Anchor',
@@ -141,11 +142,14 @@ export default {
   },
   methods: {
     headerIndex(item, index) {
-      if (item.type === 'Head1') return ''
-      if (item.depth === 3) {
-        return `<span>${toChinesNum(item.domIndexKey + 1)}、</span>`
+      const indexKey = item.domIndexKey + 1
+      if (!_.isNaN(indexKey) && _.isNumber(indexKey)) {
+        if (item.type === 'Head1') return ''
+        if (item.depth === 3) {
+          return `<span>${toChinesNum(indexKey)}、</span>`
+        }
+        return `${indexKey}、`
       }
-      return `${item.domIndexKey + 1}、`
     },
     mouseMoveItem(event, item) {
       // console.log(event, item, 66)
@@ -229,8 +233,8 @@ export default {
             len++
           }
         })
-      console.log(len)
-      console.log(this.list)
+      // console.log(len)
+      // console.log(this.list)
       return len
     }
   }

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

@@ -88,6 +88,7 @@ export default {
       }
       this.modalClose()
       this.$refs.normalDialog.visible = false
+      this.$store.commit('monthlyReportEdit/SET_INDEX_TITLE')
     },
     modalClose() {
       this.normalAreaName = ''

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

@@ -130,7 +130,7 @@ export default {
       if (item.children && item.children.length) {
         setHiddenAncestor(item.children)
       }
-      this.$store.commit('monthlyReportEdit/SET_INDEX_TITLE')
+      // this.$store.commit('monthlyReportEdit/SET_INDEX_TITLE')
     },
     // 添加同级子项
     addItem(title) {