diff --git a/src/components/readingChart/index.vue b/src/components/readingChart/index.vue
index 08468337..60619e82 100644
--- a/src/components/readingChart/index.vue
+++ b/src/components/readingChart/index.vue
@@ -64,7 +64,7 @@ export default {
},
async getInfo(data) {
try {
- let { VisitTaskId = null, TrialId = null, QuestionId = null, TableQuestionId = null, RowIndex = null, ReportChartTypeEnum = null } = data
+ let { VisitTaskId = null, TrialId = null, QuestionId = null, QuestionName = null, TableQuestionId = null, RowIndex = null, ReportChartTypeEnum = null } = data
let params = {
VisitTaskId, TrialId, QuestionId, TableQuestionId, RowIndex, ReportChartTypeEnum
}
@@ -72,16 +72,23 @@ export default {
let res = await getReportsChartData(params)
this.loading = false
if (res.IsSuccess) {
+ let LatestScanDateList = res.Result.LatestScanDateList.map(item => item.split(" ")[0])
let obj = {
- xAxisData: res.Result.LatestScanDateList || [],
- series: []
+ title: QuestionName,
+ xAxisData: LatestScanDateList || [],
+ series: [],
+ unit: this.$fd("ValueUnit", res.Result.Unit),
+ visitName: res.Result.VisitTaskNameList
}
- res.Result.ChartDataList.forEach(item => {
+ res.Result.ChartDataList.forEach((item) => {
+ let arr = []
+ item.Value.forEach((d, index) => {
+ arr.push([LatestScanDateList[index], d])
+ })
obj.series.push({
name: item.Name,
- data: item.Value,
+ data: arr,
type: 'line'
-
})
});
this.initChart(obj)
@@ -100,11 +107,25 @@ export default {
this.chart = echarts.init(this.$refs.chartContainer);
// ...图表配置
const option = {
- title: { text: '' },
+ title: {
+ text: obj.title,
+ textStyle: {
+ color: "#fff"
+ }
+ },
tooltip: {
- trigger: 'axis'
+ trigger: 'axis',
+ formatter: function (params) {
+ let index = obj.xAxisData.findIndex(item => item === params[0].value[0])
+ let result = obj.visitName[index] + ' ' + params[0].value[0] + '
'; // 显示类目名(如日期)
+ params.forEach(function (item) {
+ result += item.marker + ' ' + item.seriesName + ': ' + item.value[1] + '
'; // 显示每个系列的图例、系列名和值
+ });
+ return result;
+ }
},
xAxis: {
+ type: 'time',
data: obj.xAxisData,
axisLine: { // 设置 x 轴线颜色
lineStyle: {
@@ -115,9 +136,13 @@ export default {
textStyle: {
color: '#fff'
}
- }
+ },
+ splitLine: {
+ show: false // 隐藏网格线
+ },
},
yAxis: {
+ name: obj.unit,
type: 'value',
axisLabel: {
textStyle: {
@@ -128,7 +153,7 @@ export default {
lineStyle: {
color: '#fff',
}
- }
+ },
},
series: obj.series
};
@@ -164,8 +189,8 @@ export default {
list-style-type: none;
min-height: 300px;
max-height: 80vh;
- overflow: hidden;
- overflow-y: auto;
+ // overflow: hidden;
+ // overflow-y: auto;
box-sizing: border-box;
}
\ No newline at end of file
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
index 59d026c6..e37329fb 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
@@ -399,7 +399,7 @@