guoxiaohuan 4 years ago
parent
commit
6a7b4cffd4
2 changed files with 16 additions and 2 deletions
  1. 14 1
      src/components/Legend/src/legend.vue
  2. 2 1
      src/components/viewLengend.vue

+ 14 - 1
src/components/Legend/src/legend.vue

@@ -316,6 +316,7 @@ export default {
         queryView(flag) {
             let postParams = {}
             let data = {
+                categoryId: this.$cookie.get('categoryId'),
                 graphId: this.$cookie.get('graphId'),
                 projectId: this.$store.state.plazaId,
                 flag: flag
@@ -358,9 +359,21 @@ export default {
         },
         // 编辑数量
         queryEdit(val) {
+            let arr = []
+            if (val.length > 0) {
+                val.forEach(el => {
+                    let obj = {
+                        CategoryId: el.GraphCategoryId,
+                        GraphId: this.$cookie.get('graphId'),
+                        GraphElementId: el.GraphElementId,
+                        Num: el.Num
+                    }
+                    arr.push(obj)
+                })
+            }
             let params = {
                 postParams: {
-                    Content: val
+                    Content: arr
                 }
             }
             updateStatis(params).then(res => {

+ 2 - 1
src/components/viewLengend.vue

@@ -42,7 +42,8 @@
                 <el-table-column prop='Num' label='数量'>
                     <template slot-scope='{row}'>
                         <span v-if='row.Num || row.Num==0'>{{row.Num}}</span>
-                        <span v-else>--</span>
+                        <span v-else-if='row.Num==null'></span>
+                        <span v-else>{{'--'}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop='Unit' label='单位' width='70'>