Browse Source

ETA1.0.5 测试bug修复

hbchen 1 year ago
parent
commit
272a811e64

+ 15 - 3
src/views/dataEntry_manage/addChart.vue

@@ -108,9 +108,9 @@
 						横坐标显示范围 
 						<el-tooltip>
 							<div slot="content">
-								<p class="hint-message">配置项用于横坐标显示时间刻度</p>
-								<p class="hint-message">1、若开始日期结束日期,则默认不跨年,允许勾选跨年</p>
-								<p class="hint-message">2、若开始日期结束日期,则跨年,不允许取消勾选</p>
+								<p class="hint-message">配置横坐标显示时间刻度</p>
+								<p class="hint-message">1、若开始日期小于结束日期,则默认不跨年,允许勾选跨年</p>
+								<p class="hint-message">2、若开始日期大于等于结束日期,则跨年,不允许取消勾选</p>
 							</div>
 							<img src="~@/assets/img/icons/question_mark_black.png" style="height: 16px;cursor: pointer;margin-left: 6px;" />
 						</el-tooltip>
@@ -121,9 +121,11 @@
 						type="daterange"
 						value-format="MM-dd"
 						format="MM-dd"
+						popper-class="x-range-picker-date"
 						start-placeholder="开始日期"
 						end-placeholder="结束日期"
 						@change="xAxisRangeChange"
+						:clearable="false"
 						></el-date-picker>
 					<el-checkbox label="跨年" v-model="isSpanYear" :disabled="isSpanYearDisable"
 					style="margin-top: 12px;" @change="changeIsSpanYear"></el-checkbox>
@@ -622,6 +624,12 @@ export default {
 
 					if(this.chartInfo.ChartType === 10 && !this.$refs.SectionScatterOptRef.seriesArr[0].edbs)  return this.$message.warning('请添加系列指标');
 
+					if(this.chartInfo.ChartType === 2){
+						if(this.SeasonExtraConfig.XStartDate || this.SeasonExtraConfig.XEndDate){
+							return this.$message.warning('横坐标显示范围不能为空');
+						}
+					}
+					
 					let db_arr = this.tableData.map(item => ({
 							ChartColor: item.ChartColor,
 							PredictChartColor: item.PredictChartColor,
@@ -1080,4 +1088,8 @@ export default {
 .edb-item-style .el-input__icon {
 	line-height: 27px;
 }
+/*他不要下拉选择框 QAQ */
+.x-range-picker-date {
+	display: none;
+}
 </style>

+ 1 - 0
src/views/dataEntry_manage/components/LegendEditDia.vue

@@ -88,6 +88,7 @@ methods: {
     margin-top: 10px;
     color: #C0C4CC;
     font-size: 14px;
+    font-weight: 100;
   }
 }
 .dia-bot{

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -555,7 +555,7 @@ export default {
             yAxis: 0,
             name: j.Year,
           };
-          const data_array = _.cloneDeep(j.DataList);
+          const data_array = this.calendar_type === '农历'?_.cloneDeep(j.Items):_.cloneDeep(j.DataList);
           data_array &&
             data_array.forEach((item) => {
               serie_item.data.push([item.DataTimestamp, item.Value]);

+ 2 - 2
src/views/dataEntry_manage/databaseComponents/createChart.vue

@@ -521,7 +521,7 @@ export default {
 
 			// 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
 			const chartDataHandle=this.calendar_type === '农历'?
-												chartData.filter((item, index) => index > 0):
+												chartData.List.filter((item, index) => index > 0):
 												chartData
       let seasonYdata = [],
         seasonData = [];
@@ -536,7 +536,7 @@ export default {
             yAxis: 0,
             name: j.Year,
           };
-          const data_array = _.cloneDeep(j.DataList);
+          const data_array = this.calendar_type === '农历'?_.cloneDeep(j.Items):_.cloneDeep(j.DataList);
           data_array &&
             data_array.forEach((item) => {
               serie_item.data.push([item.DataTimestamp, item.Value]);

+ 15 - 3
src/views/dataEntry_manage/editChart.vue

@@ -117,9 +117,9 @@
 						横坐标显示范围 
 						<el-tooltip>
 							<div slot="content">
-								<p class="hint-message">配置项用于横坐标显示时间刻度</p>
-								<p class="hint-message">1、若开始日期结束日期,则默认不跨年,允许勾选跨年</p>
-								<p class="hint-message">2、若开始日期结束日期,则跨年,不允许取消勾选</p>
+								<p class="hint-message">配置横坐标显示时间刻度</p>
+								<p class="hint-message">1、若开始日期小于结束日期,则默认不跨年,允许勾选跨年</p>
+								<p class="hint-message">2、若开始日期大于等于结束日期,则跨年,不允许取消勾选</p>
 							</div>
 							<img src="~@/assets/img/icons/question_mark_black.png" style="height: 16px;cursor: pointer;margin-left: 6px;" />
 						</el-tooltip>
@@ -129,10 +129,12 @@
 						v-model="xAxisRange"
 						type="daterange"
 						value-format="MM-dd"
+						popper-class="x-range-picker-date"
 						format="MM-dd"
 						start-placeholder="开始日期"
 						end-placeholder="结束日期"
 						@change="xAxisRangeChange"
+						:clearable="false"
 					></el-date-picker>
 					<el-checkbox label="跨年" v-model="isSpanYear" :disabled="isSpanYearDisable"
 					style="margin-top: 12px;" @change="changeIsSpanYear"></el-checkbox>
@@ -718,6 +720,11 @@ export default {
 
 					if(this.chartInfo.ChartType === 10 && !this.$refs.SectionScatterOptRef.seriesArr[0].edbs)  return this.$message.warning('请添加系列指标');
 
+					if(this.chartInfo.ChartType === 2){
+						if(this.SeasonExtraConfig.XStartDate || this.SeasonExtraConfig.XEndDate){
+							return this.$message.warning('横坐标显示范围不能为空');
+						}
+					}
 					let db_arr = this.tableData.map(item => ({
 							ChartColor: item.ChartColor,
 							PredictChartColor: item.PredictChartColor,
@@ -1159,4 +1166,9 @@ export default {
 .edb-item-style .el-input__icon {
 	line-height: 27px;
 }
+
+/*他不要下拉选择框 QAQ */
+.x-range-picker-date {
+	display: none;
+}
 </style>