Эх сурвалжийг харах

截面组合图引用日期增加固定日期配置

jwyu 2 сар өмнө
parent
commit
951fc07fbb

+ 23 - 2
src/views/dataEntry_manage/components/sectionalCombination/referenceDateSet.vue

@@ -71,7 +71,20 @@
           <el-radio v-model="item.dateType" :label="1" @input="handleSelectSystemDate($event,index)">{{$t('ETableChildren.system_date_rai')}}</el-radio>
           <span>{{ today }}</span>
         </div>
-        <div>
+        <!-- 固定日期 -->
+        <div class="date-type-box">
+          <el-radio v-model="item.dateType" :label="2">{{$t('Chart.option_date_type_fix')}}</el-radio>
+          <el-date-picker
+            v-model="item.staticDate"
+            type="date"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择日期"
+            @change="handleSelectStaticDate(index)"
+            style="width:200px"
+          />
+        </div>
+        <div v-if="item.dateType!==2">
           <dateTrans v-model="item.dateTransfData" />
         </div>
       </div>
@@ -122,11 +135,12 @@ export default {
         } else {
           this.list = [{
             name: '',
-            dateType: 0,//0指标最新日期 1系统日期
+            dateType: 0,//0指标最新日期 1系统日期 2固定日期
             edbType:0,
             selectEdbData: null,
             MoveForward: 0,//期数前移
             dateTransfData: [],//日期变换数据
+            staticDate:'',//固定日期
           }]
         }
       }
@@ -148,6 +162,7 @@ export default {
           selectEdbData: null,
           MoveForward: 0,//期数前移
           dateTransfData: [],//日期变换数据
+          staticDate:'',//固定日期
         }
       ]
     }
@@ -169,6 +184,11 @@ export default {
         this.list[index].name=this.today
       }
     },
+    handleSelectStaticDate(index){
+      if(!this.list[index].name){
+        this.list[index].name=this.list[index].staticDate
+      }
+    },
 
     handleEdbTypeChange(e,index){
       console.log('指标类型变化',e);
@@ -216,6 +236,7 @@ export default {
         selectEdbData: null,
         MoveForward: 0,//期数前移
         dateTransfData: [],//日期变换数据
+        staticDate:'',//固定日期
       })
     }
   },

+ 1 - 0
src/views/dataEntry_manage/components/sectionalCombination/sectionalCombinationOption.vue

@@ -306,6 +306,7 @@ export default {
             }:null,
             MoveForward: item.MoveForward||0,//期数前移
             dateTransfData: item.DateChange||[],//日期变换数据
+            staticDate:item.StaticDate
           }
         })
 

+ 2 - 1
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -908,7 +908,8 @@ export default {
 							FrequencyDay:_item.FrequencyDay,
 							ChangeType:_item.ChangeType
 						}
-					})
+					}),
+					StaticDate:item.staticDate
 				}
 			})
 			params.SeriesList=opt.seriesData.map(item=>{