Преглед на файлове

update

- 心理监测首页
    - 增加 页面路由参数 date
master
JinxChen преди 1 година
родител
ревизия
3db4b4c389
променени са 4 файла, в които са добавени 39 реда и са изтрити 8 реда
  1. +7
    -1
      README.md
  2. +1
    -1
      src/config/models.js
  3. +9
    -3
      src/views/health/psychological-main/index.vue
  4. +22
    -3
      src/views/health/psychological/index.vue

+ 7
- 1
README.md Целия файл

@@ -534,4 +534,10 @@ update
- 心理监测详情
- 增加 7天 和 30天数据查看功能
- 优化 页面样式内容
- 增加 返回到随手精灵逻辑
- 增加 返回到随手精灵逻辑

## v1.0.67
`2023.6.26`
update
- 心理监测首页
- 增加 页面路由参数 date

+ 1
- 1
src/config/models.js Целия файл

@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
export const VERSION_MODEL = '1.0.66F'; //版本号
export const VERSION_MODEL = '1.0.67F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',


+ 9
- 3
src/views/health/psychological-main/index.vue Целия файл

@@ -52,6 +52,8 @@ export default {
{ value: 75, name: '疲劳', class: 'tiredness', result: '中度疲劳', time: '17:52', img: require('@/assets/img/moderate.png') }, */
],
uid: '',
routeDate: '',
params: {}

}
},
@@ -72,6 +74,8 @@ export default {
let params = this.$route.query;
if (params) {
this.uid = params.uid;
this.routeDate = params.date;
this.params = params;
}
},
getHomeData() {
@@ -80,7 +84,7 @@ export default {
let reqUrl = `https://dbmq.rzliot.com/heart/api/Data/GetHomeData`;
let reqParams = {
uid: this.uid,
date: this.$dayjs(new Date()).format('YYYY-MM-DD')
date: this.routeDate || this.$dayjs(new Date()).format('YYYY-MM-DD')
};
axios.get(reqUrl, {
params: { ...reqParams },
@@ -101,11 +105,13 @@ export default {

},
onClick(item) {
this.$router.push({
this.$router.replace({
name: 'psychological',
query: {
name: item.class,
uid: this.uid
uid: this.uid,
date: this.routeDate,
...this.params
}
})
},


+ 22
- 3
src/views/health/psychological/index.vue Целия файл

@@ -313,7 +313,9 @@ export default {
selectDate: '',
uid: '',
advice: '',
surveyTitle: '' || '本周概览'
surveyTitle: '' || '本周概览',
routeDate: '',
params: {}
};
},
computed: {
@@ -635,6 +637,18 @@ export default {
this.emoName = EmotionModel[params.name].name;
this.emoType = EmotionModel[params.name].type;
this.uid = params.uid;
this.routeDate = params.date;
this.params = params;
if(params.date) {
this.dateList[0].text = this.$dayjs(params.date).format("YYYY-MM-DD") === this.$dayjs(new Date()).format("YYYY-MM-DD") ? '今天' : this.$dayjs(params.date).format("MM-DD");
this.defaultDate = new Date(
this.$dayjs(params.date)
.hour(0)
.minute(0)
.second(0)
.format()
);
}
console.log("当前情绪是", EmotionModel[params.name].name);
}
},
@@ -676,7 +690,7 @@ export default {
let reqDate =
date
? this.$dayjs(date).format("YYYY-MM-DD")
: this.$dayjs(this.defaultDate).format("YYYY-MM-DD") /* "2023-05-23" */;
: this.routeDate || this.$dayjs(this.defaultDate).format("YYYY-MM-DD") /* "2023-05-23" */;
let reqParams = {
uid: this.uid,
startDate: startDate || reqDate,
@@ -986,7 +1000,12 @@ export default {
},
// 返回
onNavBack() {
this.$router.go(-1);
this.$router.replace({
name: 'psychologicalMain',
query: {
...this.params
}
});
},
// 点击日期选择
onTabClick(value, index) {


Loading…
Отказ
Запис