QuietShadow преди 3 години
родител
ревизия
7d25b8972c
променени са 1 файла, в които са добавени 14 реда и са изтрити 2 реда
  1. 14 2
      src/views/energyPerformance/components/supplyAnddemand/Project.vue

+ 14 - 2
src/views/energyPerformance/components/supplyAnddemand/Project.vue

@@ -1197,8 +1197,20 @@ export default {
             that.getTableData(1);
         },
         handleCurrentChange (currentRow) {
-            let that = this;
-            that.currentData = currentRow;
+            let that = this;
+            if (currentRow !== null) {
+              that.currentData = currentRow;
+            } else {
+              that.currentData.itemid = '';
+              that.currentData.itemname = '';
+              that.currentData.itemdesc = '';
+              that.currentData.energyid = '';
+              that.currentData.workprocid = '';
+              that.currentData.unitid = unitid;
+              that.currentData.fid = '';
+              that.currentData.isup = '1';
+              that.currentData.mintimegranid = '';
+            }
         },
         but_add () {
             let that = this;