Pārlūkot izejas kodu

fix:刷新图表后字段更新还得手写

Karsa 3 mēneši atpakaļ
vecāks
revīzija
80dfe1a5c3

+ 11 - 2
src/views/dataEntry_manage/chartSetting.vue

@@ -1879,8 +1879,17 @@ export default {
 
       const { EdbInfoList } = res.Data;
       
-      //更新表格数据
-      this.tableData = _.cloneDeep(EdbInfoList);
+      this.tableData.forEach((item) => {
+        //只更新数据和显性字段
+        let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
+        item.DataList = edbData.DataList;
+        
+        item.StartDate = edbData.StartDate;
+        item.ModifyTime = edbData.ModifyTime;
+        item.MoveLatestDate = edbData.MoveLatestDate;
+        item.LatestDate = edbData.LatestDate;
+        item.LatestValue = edbData.LatestValue;
+      });
     },
 
     /* 搜索 */

+ 12 - 3
src/views/mychart_manage/components/chartDetailDia.vue

@@ -764,7 +764,7 @@ export default {
     },
 
     /* 曲线图筛选项发生变化时 非配置项 获取新的图表数据 */
-   async getPreviewChartInfo() {
+    async getPreviewChartInfo() {
       let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
       let params = {
         ChartSource:this.chartInfo.Source,
@@ -815,8 +815,17 @@ export default {
       }
       const { EdbInfoList } = res.Data;
 
-      //更新表格数据
-      this.tableData = _.cloneDeep(EdbInfoList);
+      this.tableData.forEach((item) => {
+        //只更新数据和显性字段
+        let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
+        item.DataList = edbData.DataList;
+        
+        item.StartDate = edbData.StartDate;
+        item.ModifyTime = edbData.ModifyTime;
+        item.MoveLatestDate = edbData.MoveLatestDate;
+        item.LatestDate = edbData.LatestDate;
+        item.LatestValue = edbData.LatestValue;
+      });
     },
 
     /* 打开时间段弹窗 */