@@ -914,4 +914,10 @@ update | |||
## v1.0.117 | |||
`2024.3.21` | |||
update | |||
- ‘抑郁’文字 通过页面传过来的参数 改成‘焦虑’,否则不变 | |||
- ‘抑郁’文字 通过页面传过来的参数 改成‘焦虑’,否则不变 | |||
## v1.0.118 | |||
`2024.3.25` | |||
fix | |||
- 修复 心理监测详情中间组件颜色与接口返回的等级颜色不一致的问题 |
@@ -8,7 +8,7 @@ | |||
import store from "@/store"; | |||
// 情绪模型 | |||
const appTypeList = ['1']; | |||
export const VERSION_MODEL = '1.0.117F'; //版本号 | |||
export const VERSION_MODEL = '1.0.118F'; //版本号 | |||
export const IMAGE_URL = { | |||
production: 'http://zfb.ssjlai.com/web/', | |||
test: 'http://zfb.ssjlai.com/web/', | |||
@@ -13,7 +13,7 @@ | |||
<div class="main"> | |||
<div class="list"> | |||
<div v-for="(item, index) in healhtList" :key="index" :class="['item', item.class]" @click="onClick(item)"> | |||
<p class="health-value" :style="{ color: calcColor(item.value) }"> | |||
<p class="health-value" :style="{ color: calcResultColor(item.level) }"> | |||
{{ item.value || "--" }} | |||
</p> | |||
<p class="health-name"> | |||
@@ -236,6 +236,30 @@ export default { | |||
} | |||
return color; | |||
}, | |||
// 计算结果采用哪种颜色 | |||
calcResultColor(value, isCallBackClass) { | |||
let color = ""; | |||
let className = ""; | |||
switch (Number(value)) { | |||
case 0: | |||
color = "#62BD48"; | |||
className = "none"; | |||
break; | |||
case 1: | |||
color = "#ffde00"; | |||
className = "mild"; | |||
break; | |||
case 2: | |||
color = "#ff8a00"; | |||
className = "moderate"; | |||
break; | |||
case 3: | |||
color = "#d70d0d"; | |||
className = "severe"; | |||
break; | |||
} | |||
return isCallBackClass ? className : color; | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -102,7 +102,7 @@ | |||
</div> | |||
<div class="middle"> | |||
<span :style="{ color: calcColor(item.value) }">{{ | |||
<span :style="{ color: calcResultColor(item.level) }">{{ | |||
item.value || "--" | |||
}}</span> | |||
</div> | |||
@@ -926,6 +926,7 @@ export default { | |||
? this.$dayjs(data.MaxDesc).format("HH:mm") | |||
: this.$dayjs(data.MaxDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.MaxLevel | |||
}; | |||
let Min = { | |||
label: "最小值", | |||
@@ -935,6 +936,7 @@ export default { | |||
? this.$dayjs(data.MinDesc).format("HH:mm") | |||
: this.$dayjs(data.MinDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.MinLevel | |||
}; | |||
let Avg = { | |||
label: "平均值", | |||
@@ -944,6 +946,7 @@ export default { | |||
? this.$dayjs(data.AvgDesc).format("HH:mm") | |||
: this.$dayjs(data.AvgDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.AvgLevel | |||
}; | |||
let Current = { | |||
label: "最近值", | |||
@@ -953,6 +956,7 @@ export default { | |||
? this.$dayjs(data.CurrentDesc).format("HH:mm") | |||
: this.$dayjs(data.CurrentDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.CurrentLevel | |||
}; | |||
this.statisticsList.push(Max); | |||
this.statisticsList.push(Min); | |||
@@ -90,7 +90,7 @@ | |||
</div> | |||
<div class="middle"> | |||
<span :style="{ color: calcColor(item.value) }">{{ | |||
<span :style="{ color: calcResultColor(item.level) }">{{ | |||
item.value || "--" | |||
}}</span> | |||
</div> | |||
@@ -681,6 +681,7 @@ export default { | |||
return item.Key; | |||
}) | |||
: []; | |||
console.log("chartData", chartData); | |||
if (data) { | |||
this.monitoringCount = data.Total; | |||
this.pieRightList = []; | |||
@@ -750,6 +751,7 @@ export default { | |||
? this.$dayjs(data.MaxDesc).format("HH:mm") | |||
: this.$dayjs(data.MaxDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.MaxLevel | |||
}; | |||
let Min = { | |||
label: "最小值", | |||
@@ -759,6 +761,7 @@ export default { | |||
? this.$dayjs(data.MinDesc).format("HH:mm") | |||
: this.$dayjs(data.MinDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.MinLevel | |||
}; | |||
let Avg = { | |||
label: "平均值", | |||
@@ -768,6 +771,7 @@ export default { | |||
? this.$dayjs(data.AvgDesc).format("HH:mm") | |||
: this.$dayjs(data.AvgDesc).format("MM/DD HH:mm") | |||
: "", | |||
level: data.AvgLevel | |||
}; | |||
this.statisticsList.push(Max); | |||
this.statisticsList.push(Min); | |||
@@ -805,7 +809,7 @@ export default { | |||
this.emotionList.push(ModerateDay); | |||
this.emotionList.push(SevereDay); | |||
// 图表数据 | |||
this.emotionData = chartData.map((item) => { | |||
this.emotionData = chartData.map(item => { | |||
return { | |||
value: item.Value, | |||
itemStyle: { | |||
@@ -813,6 +817,7 @@ export default { | |||
}, | |||
}; | |||
}); | |||
console.log("emotionData", this.emotionData); | |||
this.weekAndMonData = chartData.map((item, index) => { | |||
return { | |||
value: [index, item.MinValue, item.MaxValue], | |||
@@ -1001,20 +1006,20 @@ export default { | |||
calcResultColor(value, isCallBackClass) { | |||
let color = ""; | |||
let className = ""; | |||
switch (value) { | |||
case ("0", 0): | |||
switch (Number(value)) { | |||
case 0: | |||
color = "#62BD48"; | |||
className = "none"; | |||
break; | |||
case ("1", 1): | |||
case 1: | |||
color = "#ffde00"; | |||
className = "mild"; | |||
break; | |||
case ("2", 2): | |||
case 2: | |||
color = "#ff8a00"; | |||
className = "moderate"; | |||
break; | |||
case ("3", 3): | |||
case 3: | |||
color = "#d70d0d"; | |||
className = "severe"; | |||
break; | |||