فهرست منبع

修复编辑图表时切换图表类型不更新页面展示效果问题

jwyu 2 ماه پیش
والد
کامیت
a49f7bddb8
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      src/views/dataEntry_manage/editChart.vue
  2. 3 3
      src/views/dataEntry_manage/mixins/addOreditMixin.js

+ 1 - 1
src/views/dataEntry_manage/editChart.vue

@@ -33,7 +33,7 @@
 					:rules="chartRules"
 				>
 					<el-form-item :label="$t('EtaChartAddPage.label_chart_type')" prop="ChartType">
-						<chartTypeSelect v-model="chartInfo.ChartType" style="width:90%"/>
+						<chartTypeSelect v-model="chartInfo.ChartType" style="width:90%" @change="needWatch=true;"/>
 						<!-- <el-select
 							v-model="chartInfo.ChartType"
 							placeholder="请选择生成样式"

+ 3 - 3
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -171,7 +171,7 @@ export default {
 				this.getThemeList('init')
 
 				//柱形图 截面散点切换到普通图 依赖的指标信息其实只有信息无数据 需清空
-				if([7,10,11].includes(oldval)&&![7,10,11].includes(newval)) {
+				if([7,10,11,14].includes(oldval)&&![7,10,11,14].includes(newval)) {
 					this.tableData = [];
 					this.chartInfo.LeftMax = '';
 					this.chartInfo.LeftMin = '';
@@ -180,7 +180,7 @@ export default {
 					this.chartInfo.MarkersAreas = "";
 				}
 				//从普通图切换到柱形图,截面散点,雷达图 清空MarkersLines
-				if(![7,10,11].includes(oldval)&&[7,10,11].includes(newval)){
+				if(![7,10,11,14].includes(oldval)&&[7,10,11,14].includes(newval)){
 					this.chartInfo.MarkersLines = ""
 					this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(this.chartInfo||{});
 				}
@@ -189,7 +189,7 @@ export default {
 				this.initStatus();
 
 				//共用结构的类型切换可以直接画图
-				if(![7,10,11].includes(newval)) {
+				if(![7,10,11,14].includes(newval)) {
 					//初始化上下限
 					this.setLimitData(this.tableData)
 					//单指标允许切换到季节图需药重新请求数据