瀏覽代碼

修改 替换条件

test
chenJinxu 7 月之前
父節點
當前提交
f7cd11e345
共有 4 個文件被更改,包括 10 次插入9 次删除
  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 查看文件

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


+ 6
- 3
src/views/health/psychological/index.vue 查看文件

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


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


+ 1
- 2
src/views/health/psychological/report/index.vue 查看文件

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


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


+ 2
- 3
src/views/psychological-modeling/index.vue 查看文件

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


Loading…
取消
儲存