Browse Source

调整页面适应管理端周报明细

test
wzl 6 months ago
parent
commit
941ef1f9f3
2 changed files with 40 additions and 5 deletions
  1. +16
    -0
      src/views/health/psychological/reportDetails/index.scss
  2. +24
    -5
      src/views/health/psychological/reportDetails/index.vue

+ 16
- 0
src/views/health/psychological/reportDetails/index.scss View File

@@ -320,4 +320,20 @@
} }
} }
} }
}

.hideNav{
.report-details{
height: calc(100vh - 44px);
}
}
.hideTab{
.report-details{
height: calc(100vh - 44px);
}
}
.hideNavTab{
.report-details{
height: 100vh;
}
} }

+ 24
- 5
src/views/health/psychological/reportDetails/index.vue View File

@@ -1,12 +1,12 @@
<template> <template>
<div class="psychological-container"> <div class="psychological-container">
<van-nav-bar :title="emoName + '监测'" :border="true" :left-arrow="true" @click-left="onNavBack">
<van-nav-bar :title="emoName + '监测'" :border="true" :left-arrow="true" @click-left="onNavBack" v-if="isShowLeft">
<template #left> <template #left>
<van-icon name="arrow-left" size="24" style="padding: 0" /> <van-icon name="arrow-left" size="24" style="padding: 0" />
<span>返回</span> <span>返回</span>
</template> </template>
</van-nav-bar> </van-nav-bar>
<div class="tab-bar">
<div class="tab-bar" v-if="isshowTab">
<div class="date-tab-con"> <div class="date-tab-con">
<div class="date-tab-list"> <div class="date-tab-list">
<div :class="[ <div :class="[
@@ -191,7 +191,7 @@
</div> </div>
</div> </div>
<!-- 周报菜单 --> <!-- 周报菜单 -->
<div class="main-details" v-show="current == 3">
<div class="main-details" :class="{hideNav:!isShowLeft,hideTab:!isshowTab,hideNavTab:!isShowLeft && !isshowTab}" v-show="current == 3">
<div class="report-details"> <div class="report-details">
<div class="overall-rating"> <div class="overall-rating">
<div class="con"> <div class="con">
@@ -366,6 +366,8 @@ export default {
name: "psychological-monitor", name: "psychological-monitor",
data() { data() {
return { return {
isShowLeft:true,
isshowTab:true,
// 日期选择标签 // 日期选择标签
dateList: [ dateList: [
{ name: "today", text: "今天", value: 0 }, { name: "today", text: "今天", value: 0 },
@@ -974,6 +976,14 @@ export default {
this.routeDate = params.date; this.routeDate = params.date;
this.params = params; this.params = params;
this.currentEmoName = params.name; this.currentEmoName = params.name;

if(params.isShowLeft === 'false'){
this.isShowLeft = false
}
if(params.isshowTab === 'false'){
this.isshowTab = false
}

if (params.date) { if (params.date) {
this.dateList[0].text = this.dateList[0].text =
this.$dayjs(params.date).format("YYYY-MM-DD") === this.$dayjs(params.date).format("YYYY-MM-DD") ===
@@ -1824,7 +1834,16 @@ export default {
} }
return callBackDate; return callBackDate;
}, },
getWeekResultDetail(recordId) {
async getWeekResultDetail(recordId) {
// 优先取传过来的值
if(!recordId){
recordId = this.$route.query.recordId
}
// 没有则自动取
if(!recordId) {
recordId = await this.getWeekResult();
}

this.$toast.loading("数据加载中"); this.$toast.loading("数据加载中");
let baseUrl = let baseUrl =
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production"
@@ -1832,7 +1851,7 @@ export default {
: "https://dbmq.rzliot.com/heart"; : "https://dbmq.rzliot.com/heart";
let reqUrl = `${baseUrl}/api/Data/GetWeekResultDetail`; let reqUrl = `${baseUrl}/api/Data/GetWeekResultDetail`;
let reqParams = { let reqParams = {
recordId: recordId || this.$route.query.recordId,
recordId: recordId,
}; };
axios axios
.get(reqUrl, { .get(reqUrl, {


Loading…
Cancel
Save