ソースを参照

1、修改明细报表

zhoux 2 年 前
コミット
4dc9ab4798
1 ファイル変更8 行追加1 行削除
  1. 8 1
      src/view/report/detail-report/index.vue

+ 8 - 1
src/view/report/detail-report/index.vue

@@ -123,7 +123,14 @@ export default {
             this.excute(this.$service[it.valueFormat.service],
               this.$service[it.valueFormat.service][it.valueFormat.method], {}).then(res => {
               if (res.code === this.$config.SUCCESS_CODE) {
-                it.valueFormat.data = res.data
+                let data = []
+                if (res.data && res.data.list) {
+                  data = [...res.data.list]
+                }
+                if (data.length === 0 && res.data && Array.isArray(res.data)) {
+                  data = [...res.data]
+                }
+                it.valueFormat.data = data
               }
             })
           }