Переглянути джерело

bug-4215 内审实施进度:展示不符合项条款统计应该按照大章节号统计数量

tianxinyu 1 рік тому
батько
коміт
f7f76252fc
1 змінених файлів з 8 додано та 6 видалено
  1. 8 6
      src/views/system/jbdScan/goods/neishenzhuangtai.vue

+ 8 - 6
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -44,7 +44,7 @@
                             </div>
                             <el-table :data="CNASTableData" :border="true" style="width: 90%;margin: 0 auto;">
                                 <!-- <el-table-column type="index"  width="30" align="center"/> -->
-                                <el-table-column type="index" width="40" :align="center">
+                                <el-table-column type="index" width="40" align="center">
                                     <template slot-scope="scope">
                                         <span>{{ scope.$index+1 }} </span>
                                     </template>
@@ -849,7 +849,9 @@ export default {
         getNoData (arr, type, callBlack) {
             const firstArr = []
             let secondArr = []
+           
             arr.forEach((it) => {
+                const newBianhao = it.tiao_kuan_bian_ha.split('.')[0]
                 if (firstArr.length == 0) {
                     secondArr.push('score')
                     secondArr.push('不符合项')
@@ -858,21 +860,19 @@ export default {
                     secondArr = []
                     secondArr.push(1)
                     secondArr.push(1)
-                    secondArr.push(it.tiao_kuan_bian_ha)
+                    secondArr.push(newBianhao)
                     firstArr.push(secondArr)
                     secondArr = []
                 } else {
                     for (var i in firstArr) {
-                        const a = firstArr[i][2]
-                        const b = it.tiao_kuan_bian_ha
-                        if (firstArr[i][2] == it.tiao_kuan_bian_ha) {
+                        if (firstArr[i][2] == newBianhao) {
                             firstArr[i][0] = firstArr[i][0] + 1
                             firstArr[i][1] = firstArr[i][1] + 1
                             break
                         } else if (i == firstArr.length - 1) {
                             secondArr.push(1)
                             secondArr.push(1)
-                            secondArr.push(it.tiao_kuan_bian_ha)
+                            secondArr.push(newBianhao)
                             firstArr.push(secondArr)
                             secondArr = []
                             break
@@ -880,6 +880,7 @@ export default {
                     }
                 }
             })
+           
             type === 'CMA' ? (this.cmaSuorce = firstArr) : (this.source = firstArr)
             callBlack()
         },
@@ -991,6 +992,7 @@ export default {
                     }
                 })
                 this_.$nextTick(() => {
+                console.log('this_.CNASTableData', this_.CNASTableData, this_.getLoadEchartsTwo)
                     if (this_.CNASTableData.length > 0) {
                         this_.getNoData(this_.CNASTableData, 'CNAS', this_.getLoadEchartsTwo)
                         this_.getPieData(this_.CNASTableData, 'CNAS', this_.getLoadEchartsthree)