阅片图像修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ba6cb87648
commit
eefb42c3f6
|
|
@ -86,7 +86,8 @@ export default {
|
||||||
res.Result.ChartDataList.forEach((item) => {
|
res.Result.ChartDataList.forEach((item) => {
|
||||||
let arr = []
|
let arr = []
|
||||||
item.Value.forEach((d, index) => {
|
item.Value.forEach((d, index) => {
|
||||||
arr.push([LatestScanDateList[index], d])
|
// arr.push([LatestScanDateList[index], d])
|
||||||
|
arr.push(d)
|
||||||
})
|
})
|
||||||
obj.series.push({
|
obj.series.push({
|
||||||
name: item.Name,
|
name: item.Name,
|
||||||
|
|
@ -94,43 +95,43 @@ export default {
|
||||||
type: 'line'
|
type: 'line'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
if (Array.isArray(res.Result.LatestScanDateList) && res.Result.LatestScanDateList.length >= 2) {
|
// 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 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 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');
|
// let months = moment(res.Result.LatestScanDateList[res.Result.LatestScanDateList.length - 1]).diff(moment(res.Result.LatestScanDateList[0]), 'months');
|
||||||
console.log(hours, 'hours')
|
// console.log(hours, 'hours')
|
||||||
console.log(days, 'days')
|
// console.log(days, 'days')
|
||||||
console.log(months, 'months')
|
// console.log(months, 'months')
|
||||||
if (hours < 24) {
|
// if (hours < 24) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (days >= 1 && days <= 7) {
|
// if (days >= 1 && days <= 7) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'days').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (days > 7 && days < 30) {
|
// if (days > 7 && days < 30) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (months >= 1 && months <= 3) {
|
// if (months >= 1 && months <= 3) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).add(4, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (months > 3 && months <= 6) {
|
// if (months > 3 && months <= 6) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).add(7, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (months > 6 && months <= 12) {
|
// if (months > 6 && months <= 12) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// obj.max = moment(res.Result.LatestScanDateList[0]).add(13, 'months').startOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
}
|
// }
|
||||||
if (months > 12) {
|
// if (months > 12) {
|
||||||
obj.min = moment(res.Result.LatestScanDateList[0]).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
// 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'
|
// 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)
|
// console.log(obj)
|
||||||
this.initChart(obj)
|
this.initChart(obj)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
@ -155,18 +156,19 @@ export default {
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: function (params) {
|
// formatter: function (params) {
|
||||||
let index = obj.xAxisData.findIndex(item => item === params[0].value[0])
|
// let index = obj.xAxisData.findIndex(item => item === params[0].value[0])
|
||||||
let result = obj.visitName[index] + ' ' + params[0].value[0] + '<br>'; // 显示类目名(如日期)
|
// let result = obj.visitName[index] + ' ' + params[0].value[0] + '<br>'; // 显示类目名(如日期)
|
||||||
params.forEach(function (item) {
|
// params.forEach(function (item) {
|
||||||
result += item.marker + ' ' + item.seriesName + ': ' + item.value[1] + '<br>'; // 显示每个系列的图例、系列名和值
|
// result += item.marker + ' ' + item.seriesName + ': ' + item.value[1] + '<br>'; // 显示每个系列的图例、系列名和值
|
||||||
});
|
// });
|
||||||
return result;
|
// return result;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'time',
|
// type: 'time',
|
||||||
data: obj.xAxisData,
|
// data: obj.xAxisData,
|
||||||
|
data: obj.visitName,
|
||||||
axisLine: { // 设置 x 轴线颜色
|
axisLine: { // 设置 x 轴线颜色
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
|
|
@ -177,11 +179,11 @@ export default {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
splitLine: {
|
// splitLine: {
|
||||||
show: false // 隐藏网格线
|
// show: false // 隐藏网格线
|
||||||
},
|
// },
|
||||||
min: obj.min,
|
// min: obj.min,
|
||||||
max: obj.max
|
// max: obj.max
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: obj.unit,
|
name: obj.unit,
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 自动计算 -->
|
<!-- 自动计算 -->
|
||||||
<!-- :precision="2" :step="0.1" :max="10" -->
|
<!-- :precision="2" :step="0.1" :max="10" -->
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;" v-if="question.Type === 'calculation'">
|
||||||
<el-input v-if="question.Type === 'calculation'" v-model="questionForm[question.Id]"
|
<el-input v-if="question.Type === 'calculation'" v-model="questionForm[question.Id]"
|
||||||
oninput="value=value.replace(/^\D*(\d*(?:.\d{0,2})?).*$/g, '$1')" disabled />
|
oninput="value=value.replace(/^\D*(\d*(?:.\d{0,2})?).*$/g, '$1')" disabled />
|
||||||
<svg-icon v-if="question.ShowChartTypeEnum > 0 && taskInfo.IsReadingTaskViewInOrder === 1"
|
<svg-icon v-if="question.ShowChartTypeEnum > 0 && taskInfo.IsReadingTaskViewInOrder === 1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue