@@ -534,4 +534,10 @@ update | |||
- 心理监测详情 | |||
- 增加 7天 和 30天数据查看功能 | |||
- 优化 页面样式内容 | |||
- 增加 返回到随手精灵逻辑 | |||
- 增加 返回到随手精灵逻辑 | |||
## v1.0.67 | |||
`2023.6.26` | |||
update | |||
- 心理监测首页 | |||
- 增加 页面路由参数 date |
@@ -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/', | |||
@@ -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 | |||
} | |||
}) | |||
}, | |||
@@ -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) { | |||