Bläddra i källkod

图列位置又调整回去

Karsa 1 år sedan
förälder
incheckning
38e660f35e

+ 4 - 3
src/utils/defaultOptions.js

@@ -81,8 +81,9 @@ export const defaultOpts = {
 	legend: {
 		enabled: true,
 		verticalAlign: 'top',
-		margin:5,
-		width: '90%',
+		margin:12,
+		itemMarginBottom:0,
+		itemMarginTop: 0
 		// layout: 'vertical'
 	},
 	//滚动条
@@ -201,7 +202,7 @@ export const copyOtherOptions = {
 			color: '#444',
 			textOverflow:undefined
 		},
-		itemMarginBottom:5,
+		itemMarginBottom:0,
 		itemDistance: 0,
 		padding: 0,
 		margin: 10

+ 6 - 6
src/views/dataEntry_manage/components/markersSection.vue

@@ -67,7 +67,7 @@
       <div
         class="add-cont"
         v-if="!chartInstruction.text"
-        @click="addChartInductionHandle"
+        @click="addChartInductionHandle('add')"
       >
         <img
           src="~@/assets/img/set_m/add_ico.png"
@@ -155,8 +155,8 @@ export default {
       chartInstruction:{
         text: '',
         isShow: true,
-        color: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color:'#333',
-        fontSize: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize:12
+        color: '',
+        fontSize: ''
       } ,
 
       /* 标识线区弹窗 */
@@ -213,13 +213,13 @@ export default {
       this.updateChartHandle()
     },
 
-    addChartInductionHandle() {
+    addChartInductionHandle(type='') {
       const { text,color,fontSize } = this.chartInstruction;
       this.chartInductionDiaForm = {
         show: true,
         text,
-        color,
-        fontSize
+        color:type==='add'?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color:color,
+        fontSize: type==='add'?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize:fontSize
       }
     },
 

+ 12 - 6
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -505,8 +505,10 @@ export default {
 					text: yTitleText,
 					align: 'high',
 					rotation: 0,
-					y: -15,
-					offset: 0,
+					y: -12,
+					x: 0,
+					textAlign: 'left',
+					reserveSpace: false,
 					style:yTitleStyle
 				},
 				labels: {
@@ -607,8 +609,10 @@ export default {
 							!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
               align: 'high',
               rotation: 0,
-              y: -15,
-              offset: -(12 * this.chartInfo.Unit.length),
+							y: -12,
+							x: 0,
+							textAlign: 'left',
+							reserveSpace: false,
             },
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),
@@ -648,8 +652,10 @@ export default {
 							!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
               align: 'high',
               rotation: 0,
-              y: -15,
-              offset: -(12 * this.chartInfo.Unit.length),
+              y: -12,
+							x: 0,
+							textAlign: 'left',
+							reserveSpace: false,
             },
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),

+ 8 - 0
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -288,6 +288,10 @@ export default {
 				if(res.Ret !== 200) return
 
 				const { EdbInfoList,XEdbIdValue,YDataList,ChartInfo } = res.Data;
+				this.chartInfo = {
+					...this.chartInfo,
+					ChartSource: ChartInfo.ChartSource
+				}
 
 				let xData = XEdbIdValue.map(_ => EdbInfoList.find(edb => edb.EdbInfoId===_).EdbAliasName)
 
@@ -575,6 +579,10 @@ export default {
 				if(res.Ret !== 200) return
 				
 				const { EdbInfoList,DataResp,ChartInfo } = res.Data;
+				this.chartInfo = {
+					...this.chartInfo,
+					ChartSource: ChartInfo.ChartSource
+				}
 
 				this.sectionScatterData = DataResp;
 				this.tableData = EdbInfoList;