瀏覽代碼

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

wumingxin 6 月之前
父節點
當前提交
07d57aedf2
共有 2 個文件被更改,包括 4 次插入5 次删除
  1. 2 2
      src/views/componentsDVP/dvpPlan/edit.vue
  2. 2 3
      src/views/componentsDVP/dvpPlan/index.vue

+ 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();
           }