Browse Source

修改 替换条件

test
chenJinxu 7 months ago
parent
commit
f7cd11e345
4 changed files with 10 additions and 9 deletions
  1. +1
    -1
      src/views/health/psychological-main/index.vue
  2. +6
    -3
      src/views/health/psychological/index.vue
  3. +1
    -2
      src/views/health/psychological/report/index.vue
  4. +2
    -3
      src/views/psychological-modeling/index.vue

+ 1
- 1
src/views/health/psychological-main/index.vue View File

@@ -43,7 +43,7 @@
<script>
import axios from "axios";
import { isNotNull } from "@/utils/index";
import { PsyBaseUrl, anxietyText } from "@/config/models";
import { PsyBaseUrl, } from "@/config/models";
import APICore from "@/api/core";
export default {
name: "psychologicalMain",


+ 6
- 3
src/views/health/psychological/index.vue View File

@@ -254,13 +254,12 @@
</template>

<script>
import { EmotionModel, PsyBaseUrl, anxietyText } from "@/config/models";
import { EmotionModel, PsyBaseUrl, } from "@/config/models";
import axios from "axios";
export default {
name: "psychological-monitor",
data() {
return {
anxietyText,
// 日期选择标签
dateList: [
{ name: "today", text: "今天", value: 0 },
@@ -272,7 +271,7 @@ export default {
psyList: [
{ name: "tiredness", text: "疲劳", value: 0 },
{ name: "stress", text: "压力", value: 1 },
{ name: "depression", text: anxietyText, value: 2 },
{ name: "depression", text: this.$replaceAll('抑郁', '抑郁', '焦虑'), value: 2 },
],
// 当前情绪下标
psyCurrent: 0,
@@ -389,6 +388,10 @@ export default {
};
},
computed: {
anxietyText() {
const appTypeList = ['1'];
return appTypeList.indexOf(this.$store.getters.appType) > -1 ? `焦虑` : `抑郁`
},
// 默认折线图配置,echarts 具体配置 见 https://echarts.apache.org/zh/option.html#title
defaultOptions() {
return {


+ 1
- 2
src/views/health/psychological/report/index.vue View File

@@ -152,7 +152,7 @@
</template>

<script>
import { EmotionModel, PsyBaseUrl, anxietyText } from "@/config/models";
import { anxietyText } from "@/config/models";
import { isNotNull } from "@/utils/index";
import axios from "axios";
import APICore from "@/api/core";
@@ -160,7 +160,6 @@ export default {
name: "",
data() {
return {
anxietyText,
pieRightList: [
/* {
text: "无情绪倾向",


+ 2
- 3
src/views/psychological-modeling/index.vue View File

@@ -66,7 +66,6 @@
<script>
import axios from "axios";
import APICore from "@/api/core";
import { anxietyText } from "@/config/models";
export default {
name: "PsychologicalModeling",
data() {
@@ -86,8 +85,8 @@ export default {
},
tips() {
return this.info.isFirstModeling === 1
? `首次佩戴,需完成以下2步,建立情绪模型。完成初始化建模后,将为您计算${anxietyText}、压力、疲劳分值。`
: `由于您长时间未佩戴手表,需重新建模,请连续佩戴不低于2小时,佩戴完成后,将为您计算${anxietyText}、压力、疲劳的分值。`;
? `首次佩戴,需完成以下2步,建立情绪模型。完成初始化建模后,将为您计算${this.$replaceAll('抑郁', '抑郁', '焦虑')}、压力、疲劳分值。`
: `由于您长时间未佩戴手表,需重新建模,请连续佩戴不低于2小时,佩戴完成后,将为您计算${this.$replaceAll('抑郁', '抑郁', '焦虑')}、压力、疲劳的分值。`;
},
},
mounted() {


Loading…
Cancel
Save