Przeglądaj źródła

零部件DVP系统编辑页面删除多余代码

wumingxin 6 miesięcy temu
rodzic
commit
07d57aedf2

+ 2 - 2
src/views/componentsDVP/dvpPlan/edit.vue

@@ -788,7 +788,6 @@ export default {
       _that.tableLoading = true;
       _that.formData.dvpId = _that.$store.getters.dvpId;
       _that.formData.testId = _that.$route.query.testId;
-      console.log(_that.formData.testId,'testId')
       _that.formData.pagination = {
         pageSize: _that.pagination.pageSize,
         pageCurrent: _that.pagination.current
@@ -805,7 +804,8 @@ export default {
             }
           });
           _that.pagination.total = res.data.total;
-          if (res.data.data) {
+          if (res.data.data && res.data.data.length > 0) {
+            _that.cpacId = res.data.data[0].cpacId;
             _that.getFndCodeList();
           }
         } else {

+ 2 - 3
src/views/componentsDVP/dvpPlan/index.vue

@@ -507,9 +507,8 @@ export default {
         if (res.flag) {
           _that.tableData = res.data.data || [];
           _that.pagination.total = res.data.total;
-          _that.cpacId = res.data.data[0].cpacId;
-
-          if (res.data.data) {
+          if (res.data.data && res.data.data.length > 0) {
+            _that.cpacId = res.data.data[0].cpacId;
             _that.getFndCodeList();
             _that.getCpacInitData();
           }