From eefb42c3f6af3114bdec5c54f09b3b140d3bbe3a Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Tue, 2 Dec 2025 09:12:53 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E5=9B=BE=E5=83=8F=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/readingChart/index.vue | 108 +++++++++---------
.../customize/QuestionTableFormItem.vue | 2 +-
2 files changed, 56 insertions(+), 54 deletions(-)
diff --git a/src/components/readingChart/index.vue b/src/components/readingChart/index.vue
index c061e946..4d51866d 100644
--- a/src/components/readingChart/index.vue
+++ b/src/components/readingChart/index.vue
@@ -86,7 +86,8 @@ export default {
res.Result.ChartDataList.forEach((item) => {
let arr = []
item.Value.forEach((d, index) => {
- arr.push([LatestScanDateList[index], d])
+ // arr.push([LatestScanDateList[index], d])
+ arr.push(d)
})
obj.series.push({
name: item.Name,
@@ -94,43 +95,43 @@ export default {
type: 'line'
})
});
- if (Array.isArray(res.Result.LatestScanDateList) && res.Result.LatestScanDateList.length >= 2) {
- let hours = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'hours');
- let days = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'days');
- let months = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'months');
- console.log(hours, 'hours')
- console.log(days, 'days')
- console.log(months, 'months')
- if (hours < 24) {
- obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (days >= 1 && days <= 7) {
- obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'days').format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (days > 7 && days < 30) {
- obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (months >= 1 && months <= 3) {
- obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).add(4, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (months > 3 && months <= 6) {
- obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (months > 6 && months <= 12) {
- obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[0]).add(13, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
- }
- if (months > 12) {
- obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
- obj.max = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).add(1, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
- }
- }
- console.log(obj)
+ // if (Array.isArray(res.Result.LatestScanDateList) && res.Result.LatestScanDateList.length >= 2) {
+ // let hours = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'hours');
+ // let days = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'days');
+ // let months = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'months');
+ // console.log(hours, 'hours')
+ // console.log(days, 'days')
+ // console.log(months, 'months')
+ // if (hours < 24) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (days >= 1 && days <= 7) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'days').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (days > 7 && days < 30) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (months >= 1 && months <= 3) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).add(4, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (months > 3 && months <= 6) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (months > 6 && months <= 12) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[0]).add(13, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // if (months > 12) {
+ // obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+ // obj.max = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).add(1, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+ // }
+ // }
+ // console.log(obj)
this.initChart(obj)
}
} catch (err) {
@@ -155,18 +156,19 @@ export default {
},
tooltip: {
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;
- }
+ // 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,
+ // type: 'time',
+ // data: obj.xAxisData,
+ data: obj.visitName,
axisLine: { // 设置 x 轴线颜色
lineStyle: {
color: '#fff',
@@ -177,11 +179,11 @@ export default {
color: '#fff'
}
},
- splitLine: {
- show: false // 隐藏网格线
- },
- min: obj.min,
- max: obj.max
+ // splitLine: {
+ // show: false // 隐藏网格线
+ // },
+ // min: obj.min,
+ // max: obj.max
},
yAxis: {
name: obj.unit,
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue
index 68d5b022..c2685030 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue
@@ -75,7 +75,7 @@
-