@@ -15,13 +15,10 @@ | |||||
<div class="right"> | <div class="right"> | ||||
<div class="list"> | <div class="list"> | ||||
<div class="item" v-for="(item, index) in legend.list" :key="index"> | <div class="item" v-for="(item, index) in legend.list" :key="index"> | ||||
<div | |||||
class="shape" | |||||
:style="{ | |||||
backgroundColor: item.color, | |||||
borderRadius: '50%' | |||||
}" | |||||
></div> | |||||
<div class="shape" :style="{ | |||||
backgroundColor: item.color, | |||||
borderRadius: '50%' | |||||
}"></div> | |||||
<div class="text"> | <div class="text"> | ||||
<span>{{ item.name }}</span> | <span>{{ item.name }}</span> | ||||
</div> | </div> | ||||
@@ -70,7 +67,7 @@ export default { | |||||
}, | }, | ||||
options: { | options: { | ||||
type: Object, | type: Object, | ||||
default: () => {} | |||||
default: () => { } | |||||
}, | }, | ||||
border: { | border: { | ||||
type: Boolean, | type: Boolean, | ||||
@@ -90,7 +87,7 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
computed: {}, | computed: {}, | ||||
created() {}, | |||||
created() { }, | |||||
mounted() { | mounted() { | ||||
this.initEchart(); | this.initEchart(); | ||||
}, | }, | ||||
@@ -125,9 +122,11 @@ export default { | |||||
height: 100%; | height: 100%; | ||||
width: 100%; | width: 100%; | ||||
margin: 20px 0; | margin: 20px 0; | ||||
.echart-con { | .echart-con { | ||||
position: relative; | position: relative; | ||||
padding: 20px 0; | padding: 20px 0; | ||||
.title-out { | .title-out { | ||||
font-size: 36px; | font-size: 36px; | ||||
font-weight: bold; | font-weight: bold; | ||||
@@ -140,31 +139,38 @@ export default { | |||||
border-radius: 30px; | border-radius: 30px; | ||||
padding: 20px; | padding: 20px; | ||||
overflow: hidden; | overflow: hidden; | ||||
.legend { | .legend { | ||||
flex: 1; | flex: 1; | ||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
align-items: flex-start; | align-items: flex-start; | ||||
padding: 16px 0; | padding: 16px 0; | ||||
.left { | .left { | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
.right { | .right { | ||||
.list { | .list { | ||||
display: grid; | display: grid; | ||||
grid-template-columns: repeat(2, auto); | grid-template-columns: repeat(2, auto); | ||||
grid-auto-flow: dense; /* 允许元素在网格中填充空隙 */ | |||||
grid-auto-flow: dense; | |||||
/* 允许元素在网格中填充空隙 */ | |||||
grid-gap: 5px; | grid-gap: 5px; | ||||
white-space: wrap; | white-space: wrap; | ||||
.item { | .item { | ||||
display: flex; | display: flex; | ||||
justify-content: flex-start; | justify-content: flex-start; | ||||
align-items: center; | align-items: center; | ||||
.shape { | .shape { | ||||
height: 14px; | height: 14px; | ||||
width: 14px; | width: 14px; | ||||
margin-right: 10px; | margin-right: 10px; | ||||
} | } | ||||
.text { | .text { | ||||
font-size: 20px; | font-size: 20px; | ||||
} | } | ||||
@@ -172,11 +178,11 @@ export default { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.echart { | .echart { | ||||
height: 100%; | height: 100%; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
</style> | |||||
}</style> |
@@ -42,7 +42,10 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.getPersonInfo(); | |||||
this.$nextTick(() => { | |||||
this.getPersonInfo(); | |||||
}) | |||||
}, | }, | ||||
methods: { | methods: { | ||||
onClickLeft(value) { | onClickLeft(value) { | ||||
@@ -60,7 +63,7 @@ export default { | |||||
const data = res.data.data; | const data = res.data.data; | ||||
if (data) { | if (data) { | ||||
this.currentPerson = { ...data }; | this.currentPerson = { ...data }; | ||||
console.log('this.currentPerson', this.currentPerson); | |||||
this.$store.commit('uid', data.physicUid) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -75,6 +78,7 @@ export default { | |||||
height: 100px; | height: 100px; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
.left-img { | .left-img { | ||||
height: 70px; | height: 70px; | ||||
width: 70px; | width: 70px; | ||||
@@ -325,6 +325,12 @@ export const constantRouterMap = [ | |||||
name: 'personList', | name: 'personList', | ||||
component: () => import('@/views/myself/personList'), | component: () => import('@/views/myself/personList'), | ||||
meta: { title: '用户列表', keepAlive: false } | meta: { title: '用户列表', keepAlive: false } | ||||
}, | |||||
{ | |||||
path: '/reportList', | |||||
name: 'reportList', | |||||
component: () => import('@/views/insight/reportList'), | |||||
meta: { title: '周报列表', keepAlive: false } | |||||
} | } | ||||
] | ] | ||||
} | } | ||||
@@ -51,7 +51,8 @@ export default new Vuex.Store({ | |||||
deviceVersion: '', //设备版本号 | deviceVersion: '', //设备版本号 | ||||
ssjlToken: '', //b端接口token | ssjlToken: '', //b端接口token | ||||
tabClick: '', //心理监测点击tab | tabClick: '', //心理监测点击tab | ||||
personId: '' //设备列表的personId | |||||
personId: '', //设备列表的personId | |||||
uid: '' //心理相关用户的uid | |||||
}, | }, | ||||
mutations: { | mutations: { | ||||
authToken(state, token) { | authToken(state, token) { | ||||
@@ -183,6 +184,10 @@ export default new Vuex.Store({ | |||||
personId(state, personId) { | personId(state, personId) { | ||||
state.personId = personId; | state.personId = personId; | ||||
window.localStorage[prefix + 'personId'] = personId; | window.localStorage[prefix + 'personId'] = personId; | ||||
}, | |||||
uid(state, uid) { | |||||
state.uid = uid; | |||||
window.localStorage[prefix + 'uid'] = uid; | |||||
} | } | ||||
}, | }, | ||||
getters: { | getters: { | ||||
@@ -330,6 +335,10 @@ export default new Vuex.Store({ | |||||
personId: state => { | personId: state => { | ||||
if (state.personId != '') return state.personId; | if (state.personId != '') return state.personId; | ||||
return window.localStorage[prefix + 'personId'] == null ? '' : window.localStorage[prefix + 'personId']; | return window.localStorage[prefix + 'personId'] == null ? '' : window.localStorage[prefix + 'personId']; | ||||
}, | |||||
uid: state => { | |||||
if (state.uid != '') return state.uid; | |||||
return window.localStorage[prefix + 'uid'] == null ? '' : window.localStorage[prefix + 'uid']; | |||||
} | } | ||||
}, | }, | ||||
actions: {}, | actions: {}, | ||||
@@ -22,26 +22,15 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="periodNav"> | <div class="periodNav"> | ||||
<div | |||||
class="periodItem minPeriodItem" | |||||
:class="{ active: emotionActive == index }" | |||||
v-for="(item, index) in psyList" | |||||
:key="index" | |||||
@click="onEmotionClick(item, index)" | |||||
> | |||||
<div class="periodItem minPeriodItem" :class="{ active: emotionActive == index }" v-for="(item, index) in psyList" | |||||
:key="index" @click="onEmotionClick(item, index)"> | |||||
<span>{{ item.name }}</span> | <span>{{ item.name }}</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="echart-container"> | <div class="echart-container"> | ||||
<div class="echart"> | <div class="echart"> | ||||
<EchartBox | |||||
echartId="emotionChart" | |||||
:outTitle="emoLegend.outTitle" | |||||
height="200" | |||||
width="200" | |||||
:legend="emoLegend" | |||||
:options="defaultOptions" | |||||
></EchartBox> | |||||
<EchartBox echartId="emotionChart" :outTitle="emoLegend.outTitle" height="200" width="200" :legend="emoLegend" | |||||
:options="defaultOptions"></EchartBox> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="grid"> | <div class="grid"> | ||||
@@ -61,23 +50,21 @@ | |||||
</div> | </div> | ||||
<div class="periodNav"> | <div class="periodNav"> | ||||
<div | |||||
class="periodItem minPeriodItem" | |||||
:class="{ active: signActive == index }" | |||||
v-for="(item, index) in signList" | |||||
:key="index" | |||||
@click="onSignClick(index)" | |||||
> | |||||
<div class="periodItem minPeriodItem" :class="{ active: signActive == index }" v-for="(item, index) in signList" | |||||
:key="index" @click="onSignClick(index)"> | |||||
<span>{{ item.name }}</span> | <span>{{ item.name }}</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<!-- bmi显示/输入 --> | |||||
<div class="bmi" v-show="signActive == 2"> | |||||
<!-- bmi显示/输入 TODO待接口--> | |||||
<!-- <div class="bmi" v-show="signActive == 2"> | |||||
<p>身高:<span>170</span>cm</p> | <p>身高:<span>170</span>cm</p> | ||||
<p>体重:<span>60</span>kg</p> | <p>体重:<span>60</span>kg</p> | ||||
<p>BMI:<span>24.5</span></p> | <p>BMI:<span>24.5</span></p> | ||||
<p>{{ bmi.result }}</p> | <p>{{ bmi.result }}</p> | ||||
<van-button size="mini">更新</van-button> | <van-button size="mini">更新</van-button> | ||||
</div> --> | |||||
<div class="title-out"> | |||||
<span>{{ signsChartTitle }}</span> | |||||
</div> | </div> | ||||
<div class="ChatBox" :class="{ hiddenChart: signActive == 2 }"> | <div class="ChatBox" :class="{ hiddenChart: signActive == 2 }"> | ||||
<div class="legendBox minLegendBox"> | <div class="legendBox minLegendBox"> | ||||
@@ -87,16 +74,12 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="Chat signChart" id="signChart"></div> | <div class="Chat signChart" id="signChart"></div> | ||||
</div> | </div> | ||||
<div class="grid"> | <div class="grid"> | ||||
<div | |||||
class="gridItem" | |||||
v-show="signActive != 2" | |||||
:style="`background:${item.color};`" | |||||
v-for="(item, index) in signDaysList" | |||||
:key="index" | |||||
> | |||||
<div class="gridItem" v-show="signActive != 2" :style="`background:${item.color};`" | |||||
v-for="(item, index) in signDaysList" :key="index"> | |||||
<div class="time"> | <div class="time"> | ||||
<span class="number">{{ item.day }}</span> | <span class="number">{{ item.day }}</span> | ||||
<span>天</span> | <span>天</span> | ||||
@@ -167,6 +150,7 @@ import { /* EmotionModel, */ PsyBaseUrl } from '@/config/models'; | |||||
import axios from 'axios'; | import axios from 'axios'; | ||||
import EchartBox from '@/components/EchartBox'; | import EchartBox from '@/components/EchartBox'; | ||||
import APIHealthUser from '@/api/health-user'; | import APIHealthUser from '@/api/health-user'; | ||||
import APIAlarm from '@/api/core'; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
DateSwitch, | DateSwitch, | ||||
@@ -283,7 +267,7 @@ export default { | |||||
maxDate: new Date(this.$dayjs().hour(0).minute(0).second(0).format()), | maxDate: new Date(this.$dayjs().hour(0).minute(0).second(0).format()), | ||||
// 默认日历日期时间 | // 默认日历日期时间 | ||||
defaultDate: new Date(this.$dayjs().hour(0).minute(0).second(0).format()), | defaultDate: new Date(this.$dayjs().hour(0).minute(0).second(0).format()), | ||||
uid: '2024010809384143241', | |||||
// 7天和30天最大数据列表 | // 7天和30天最大数据列表 | ||||
weekAndMonData: [], | weekAndMonData: [], | ||||
weekList: [], | weekList: [], | ||||
@@ -300,8 +284,10 @@ export default { | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getAuth(); | |||||
this.emoName = this.psyList[this.emotionActive].name; | this.emoName = this.psyList[this.emotionActive].name; | ||||
this.initEchartText(); | this.initEchartText(); | ||||
/* this.getPsychologiclData('', '2023-11-21', '2023-12-21'); */ | /* this.getPsychologiclData('', '2023-11-21', '2023-12-21'); */ | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
@@ -318,8 +304,10 @@ export default { | |||||
start: this.$dayjs(startAndEndDate.start).format('YYYY-MM-DD'), | start: this.$dayjs(startAndEndDate.start).format('YYYY-MM-DD'), | ||||
end: this.$dayjs(startAndEndDate.end).format('YYYY-MM-DD') | end: this.$dayjs(startAndEndDate.end).format('YYYY-MM-DD') | ||||
}; | }; | ||||
this.$nextTick(() => { | |||||
this.updateDate(date); | |||||
}); | |||||
this.updateDate(date); | |||||
}, | }, | ||||
emotionActive(val) { | emotionActive(val) { | ||||
console.log(val); | console.log(val); | ||||
@@ -336,6 +324,12 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
computed: { | computed: { | ||||
uid() { | |||||
return this.$store.getters.uid | |||||
}, | |||||
signsChartTitle() { | |||||
return `${this.signList[this.signActive].name}数据图` | |||||
}, | |||||
degreeMap() { | degreeMap() { | ||||
let map = new Map(); | let map = new Map(); | ||||
this.degreeList.forEach(item => { | this.degreeList.forEach(item => { | ||||
@@ -517,6 +511,23 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
// 获取b端token | |||||
getAuth() { | |||||
let manufactorId = '5bf13062-a41e-4d00-ba14-1101aad12650'; | |||||
return new Promise((resove, reject) => { | |||||
APIAlarm.getAuth({ manufactorId: manufactorId }) | |||||
.then(res => { | |||||
let data = res.data; | |||||
if (data.code === 0) { | |||||
this.$store.commit('ssjlToken', res.data.data); | |||||
resove(true); | |||||
} | |||||
}) | |||||
.catch(() => { | |||||
reject(false); | |||||
}); | |||||
}); | |||||
}, | |||||
initEchartText() { | initEchartText() { | ||||
this.result = `无${this.emoName}倾向`; | this.result = `无${this.emoName}倾向`; | ||||
this.defaultSeries = [ | this.defaultSeries = [ | ||||
@@ -850,7 +861,8 @@ export default { | |||||
this.date = value; | this.date = value; | ||||
console.log('this.date', this.date); | console.log('this.date', this.date); | ||||
this.getPsychologiclData('', value.start, value.end); | this.getPsychologiclData('', value.start, value.end); | ||||
this.getReportData('', value.start, value.end); | |||||
this.initData(); | |||||
//this.getReportData('', value.start, value.end); | |||||
}, | }, | ||||
formateDate(time) { | formateDate(time) { | ||||
let year = time.getFullYear(); | let year = time.getFullYear(); | ||||
@@ -899,8 +911,11 @@ export default { | |||||
}, | }, | ||||
getMonthStaEnd(value) { | getMonthStaEnd(value) { | ||||
const dateObj = {}; | const dateObj = {}; | ||||
console.log("时间值", value); | |||||
const start = startOfMonth(value); | const start = startOfMonth(value); | ||||
const end = endOfMonth(value); | const end = endOfMonth(value); | ||||
console.log("时间值start", start); | |||||
console.log("时间值end", end); | |||||
dateObj.start = format(start, 'yyyy-MM-dd'); | dateObj.start = format(start, 'yyyy-MM-dd'); | ||||
dateObj.end = format(end, 'yyyy-MM-dd'); | dateObj.end = format(end, 'yyyy-MM-dd'); | ||||
this.monthDate = { ...dateObj }; | this.monthDate = { ...dateObj }; | ||||
@@ -1002,7 +1017,7 @@ export default { | |||||
data.forEach(item => { | data.forEach(item => { | ||||
xdata.push(item.time); | xdata.push(item.time); | ||||
fill.push({ | fill.push({ | ||||
value: max - item.value, | |||||
value: max - item.value || '--', | |||||
label: { | label: { | ||||
show: false | show: false | ||||
}, | }, | ||||
@@ -1011,7 +1026,7 @@ export default { | |||||
} | } | ||||
}); | }); | ||||
ydata.push({ | ydata.push({ | ||||
value: item.value, | |||||
value: item.value || '--', | |||||
label: { | label: { | ||||
show: true | show: true | ||||
}, | }, | ||||
@@ -1022,7 +1037,7 @@ export default { | |||||
}); | }); | ||||
option.xAxis.data = xdata; | option.xAxis.data = xdata; | ||||
option.series[0].data = ydata; | option.series[0].data = ydata; | ||||
option.series[1].data = fill; | |||||
/* option.series[1].data = fill; */ | |||||
}, | }, | ||||
formateEmotionColor(value) { | formateEmotionColor(value) { | ||||
if (value > 75) { | if (value > 75) { | ||||
@@ -1048,7 +1063,7 @@ export default { | |||||
data.forEach(item => { | data.forEach(item => { | ||||
xdata.push(item.date); | xdata.push(item.date); | ||||
fill.push({ | fill.push({ | ||||
value: max - item.value, | |||||
value: max - item.value || '--', | |||||
label: { | label: { | ||||
show: false | show: false | ||||
}, | }, | ||||
@@ -1058,7 +1073,7 @@ export default { | |||||
} | } | ||||
}); | }); | ||||
ydata.push({ | ydata.push({ | ||||
value: item.value, | |||||
value: item.value || '--', | |||||
label: { | label: { | ||||
show: false | show: false | ||||
}, | }, | ||||
@@ -1070,13 +1085,13 @@ export default { | |||||
}); | }); | ||||
option.xAxis.data = xdata; | option.xAxis.data = xdata; | ||||
option.series[0].data = ydata; | option.series[0].data = ydata; | ||||
option.series[1].data = fill; | |||||
/* option.series[1].data = fill; */ | |||||
// 规定最小值 | // 规定最小值 | ||||
option.yAxis.min = 40; | option.yAxis.min = 40; | ||||
// 规定最大值 | // 规定最大值 | ||||
option.yAxis.max = 150; | option.yAxis.max = 150; | ||||
//设置高压标线 | //设置高压标线 | ||||
option.series[1].markLine = { | |||||
option.series[0].markLine = { | |||||
data: [ | data: [ | ||||
{ | { | ||||
symbol: 'pin', | symbol: 'pin', | ||||
@@ -1108,13 +1123,13 @@ export default { | |||||
let max = 0; | let max = 0; | ||||
data.forEach(item => { | data.forEach(item => { | ||||
if (item.value > max) { | if (item.value > max) { | ||||
max = item.value; | |||||
max = item.value || '--'; | |||||
} | } | ||||
}); | }); | ||||
data.forEach(item => { | data.forEach(item => { | ||||
xdata.push(item.date); | xdata.push(item.date); | ||||
fill.push({ | fill.push({ | ||||
value: max - item.value, | |||||
value: max - item.value || '--', | |||||
label: { | label: { | ||||
show: false | show: false | ||||
}, | }, | ||||
@@ -1136,11 +1151,29 @@ export default { | |||||
}); | }); | ||||
option.xAxis.data = xdata; | option.xAxis.data = xdata; | ||||
option.series[0].data = ydata; | option.series[0].data = ydata; | ||||
option.series[1].data = fill; | |||||
option.series[0].markLine = { | |||||
data: [ | |||||
{ | |||||
type: "average", | |||||
name: "体温", | |||||
yAxis: 37.2, | |||||
label: { | |||||
fontSize: 14, | |||||
position: "end", | |||||
}, | |||||
lineStyle: { | |||||
type: "dashed", | |||||
width: 2, | |||||
color: "red", | |||||
}, | |||||
}, | |||||
], | |||||
} | |||||
/* option.series[1].data = fill; */ | |||||
// 规定最小值 | // 规定最小值 | ||||
option.yAxis.min = 35; | |||||
option.yAxis.min = 34.5; | |||||
// 规定最大值 | // 规定最大值 | ||||
option.yAxis.max = max; | |||||
option.yAxis.max = 42.5; | |||||
}, | }, | ||||
formateTemperatureColor(value) { | formateTemperatureColor(value) { | ||||
if (value > 38) { | if (value > 38) { | ||||
@@ -1197,7 +1230,7 @@ export default { | |||||
show: true, | show: true, | ||||
borderWidth: 0, | borderWidth: 0, | ||||
top: '10%', | top: '10%', | ||||
left: '10%', | |||||
left: '15%', | |||||
right: '10%', | right: '10%', | ||||
bottom: '20%' | bottom: '20%' | ||||
}, | }, | ||||
@@ -1290,7 +1323,7 @@ export default { | |||||
color: '#189b3b' | color: '#189b3b' | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
/* { | |||||
type: 'bar', | type: 'bar', | ||||
barMaxWidth: 15, | barMaxWidth: 15, | ||||
stack: 'value', | stack: 'value', | ||||
@@ -1300,7 +1333,7 @@ export default { | |||||
borderRadius: [12, 12, 0, 0], | borderRadius: [12, 12, 0, 0], | ||||
show: false | show: false | ||||
} | } | ||||
} | |||||
} */ | |||||
] | ] | ||||
}; | }; | ||||
@@ -1328,7 +1361,7 @@ export default { | |||||
this.emoName = item.name; | this.emoName = item.name; | ||||
this.emoType = item.type; | this.emoType = item.type; | ||||
if (this.active == 1) { | if (this.active == 1) { | ||||
this.getMonthStaEnd(this.date); | |||||
/* this.getMonthStaEnd(this.date); */ | |||||
this.getPsychologiclData('', this.monthDate.start, this.monthDate.end); | this.getPsychologiclData('', this.monthDate.start, this.monthDate.end); | ||||
} else { | } else { | ||||
this.getPsychologiclData('', this.date.start, this.date.end); | this.getPsychologiclData('', this.date.start, this.date.end); | ||||
@@ -1341,9 +1374,9 @@ export default { | |||||
}, | }, | ||||
onRouterTo(name) { | onRouterTo(name) { | ||||
this.$router.push({ | this.$router.push({ | ||||
name: name === 'emo' ? 'report' : 'monthReport', | |||||
name: name === 'emo' ? 'reportList' : 'monthReport', | |||||
query: { | query: { | ||||
name: name | |||||
type: this.emoType | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
@@ -1420,6 +1453,7 @@ export default { | |||||
display: flex; | display: flex; | ||||
justify-content: space-around; | justify-content: space-around; | ||||
align-items: center; | align-items: center; | ||||
.periodItem { | .periodItem { | ||||
width: 48%; | width: 48%; | ||||
font-size: 28px; | font-size: 28px; | ||||
@@ -1428,16 +1462,19 @@ export default { | |||||
padding: 12px; | padding: 12px; | ||||
border-radius: 30px; | border-radius: 30px; | ||||
background: #e6e6e6; | background: #e6e6e6; | ||||
&.active { | &.active { | ||||
color: white; | color: white; | ||||
background: #179b3b; | background: #179b3b; | ||||
} | } | ||||
} | } | ||||
.minPeriodItem { | .minPeriodItem { | ||||
width: 32%; | width: 32%; | ||||
padding: 8px; | padding: 8px; | ||||
} | } | ||||
} | } | ||||
.periodSwitch { | .periodSwitch { | ||||
display: flex; | display: flex; | ||||
width: 100%; | width: 100%; | ||||
@@ -1451,10 +1488,12 @@ export default { | |||||
justify-self: center; | justify-self: center; | ||||
color: gray; | color: gray; | ||||
} | } | ||||
.arrow { | .arrow { | ||||
font-size: 45px; | font-size: 45px; | ||||
} | } | ||||
} | } | ||||
.bmi { | .bmi { | ||||
display: flex; | display: flex; | ||||
justify-content: flex-start; | justify-content: flex-start; | ||||
@@ -1467,6 +1506,7 @@ export default { | |||||
padding: 0 5px; | padding: 0 5px; | ||||
font-size: 28px; | font-size: 28px; | ||||
} | } | ||||
.van-button { | .van-button { | ||||
padding: 5px 10px; | padding: 5px 10px; | ||||
margin-left: 50px; | margin-left: 50px; | ||||
@@ -1476,6 +1516,7 @@ export default { | |||||
background-color: $green; | background-color: $green; | ||||
} | } | ||||
} | } | ||||
.label { | .label { | ||||
font-size: 36px; | font-size: 36px; | ||||
font-weight: bold; | font-weight: bold; | ||||
@@ -1483,27 +1524,38 @@ export default { | |||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
align-items: center; | align-items: center; | ||||
.right { | .right { | ||||
font-size: 30px; | font-size: 30px; | ||||
} | } | ||||
} | } | ||||
.title-out { | |||||
font-size: 36px; | |||||
font-weight: bold; | |||||
padding: 60px 20px 20px 20px; | |||||
} | |||||
.echart-container { | .echart-container { | ||||
flex: 1; | flex: 1; | ||||
position: relative; | position: relative; | ||||
min-height: 600px; | min-height: 600px; | ||||
background-color: #fff; | background-color: #fff; | ||||
padding: 0 20px; | |||||
padding: 0 10px; | |||||
} | } | ||||
.ChatBox { | .ChatBox { | ||||
overflow: hidden; | overflow: hidden; | ||||
width: calc(100vw - 60px); | width: calc(100vw - 60px); | ||||
height: 650px; | height: 650px; | ||||
border: 2px solid #cdf348; | border: 2px solid #cdf348; | ||||
border-radius: 70px; | |||||
margin-top: 30px; | |||||
border-radius: 30px; | |||||
/* margin-top: 30px; */ | |||||
h4 { | h4 { | ||||
padding: 40px 0 10px 60px; | padding: 40px 0 10px 60px; | ||||
} | } | ||||
.legendBox { | .legendBox { | ||||
width: 100%; | width: 100%; | ||||
height: 100px; | height: 100px; | ||||
@@ -1529,10 +1581,12 @@ export default { | |||||
margin-right: 0; | margin-right: 0; | ||||
} | } | ||||
} | } | ||||
.not { | .not { | ||||
.number { | .number { | ||||
color: #179b3b; | color: #179b3b; | ||||
} | } | ||||
&::before { | &::before { | ||||
content: ''; | content: ''; | ||||
position: absolute; | position: absolute; | ||||
@@ -1546,10 +1600,12 @@ export default { | |||||
margin: auto; | margin: auto; | ||||
} | } | ||||
} | } | ||||
.mild { | .mild { | ||||
.number { | .number { | ||||
color: #2ea7e0; | color: #2ea7e0; | ||||
} | } | ||||
&::before { | &::before { | ||||
content: ''; | content: ''; | ||||
position: absolute; | position: absolute; | ||||
@@ -1563,10 +1619,12 @@ export default { | |||||
margin: auto; | margin: auto; | ||||
} | } | ||||
} | } | ||||
.moderate { | .moderate { | ||||
.number { | .number { | ||||
color: #8dc21f; | color: #8dc21f; | ||||
} | } | ||||
&::before { | &::before { | ||||
content: ''; | content: ''; | ||||
position: absolute; | position: absolute; | ||||
@@ -1580,10 +1638,12 @@ export default { | |||||
margin: auto; | margin: auto; | ||||
} | } | ||||
} | } | ||||
.severe { | .severe { | ||||
.number { | .number { | ||||
color: #ff5f8b; | color: #ff5f8b; | ||||
} | } | ||||
&::before { | &::before { | ||||
content: ''; | content: ''; | ||||
position: absolute; | position: absolute; | ||||
@@ -1599,6 +1659,7 @@ export default { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.minLegendBox { | .minLegendBox { | ||||
.legend { | .legend { | ||||
.legendItem { | .legendItem { | ||||
@@ -1608,16 +1669,19 @@ export default { | |||||
&:nth-child(2n) { | &:nth-child(2n) { | ||||
margin-right: 50px; | margin-right: 50px; | ||||
} | } | ||||
&:last-child { | &:last-child { | ||||
margin-right: 0; | margin-right: 0; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.Chat { | .Chat { | ||||
width: calc(100vw - 60px); | width: calc(100vw - 60px); | ||||
height: 500px; | height: 500px; | ||||
} | } | ||||
.result { | .result { | ||||
height: 140px; | height: 140px; | ||||
padding: 0 30px; | padding: 0 30px; | ||||
@@ -1626,18 +1690,24 @@ export default { | |||||
justify-content: center; | justify-content: center; | ||||
align-items: flex-start; | align-items: flex-start; | ||||
flex-direction: column; | flex-direction: column; | ||||
.wrapBox { | .wrapBox { | ||||
padding: 10px 180px 10px 60px; | |||||
padding: 10px 120px 10px 60px; | |||||
width: 100%; | width: 100%; | ||||
background-color: #e6e6e6; | background-color: #e6e6e6; | ||||
border-radius: 70px; | |||||
border-radius: 30px; | |||||
} | } | ||||
.text { | .text { | ||||
display: flex; | display: flex; | ||||
justify-content: space-between; | |||||
justify-content: flex-start; | |||||
align-items: center; | align-items: center; | ||||
.right { | .right { | ||||
@include center(); | @include center(); | ||||
padding-left: px2rem(20); | |||||
img { | img { | ||||
height: 30px; | height: 30px; | ||||
width: 30px; | width: 30px; | ||||
@@ -1648,9 +1718,11 @@ export default { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.minChartBox { | .minChartBox { | ||||
height: 760px; | height: 760px; | ||||
} | } | ||||
.hiddenChart { | .hiddenChart { | ||||
width: 0; | width: 0; | ||||
height: 0; | height: 0; | ||||
@@ -1680,6 +1752,7 @@ export default { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.minItem { | .minItem { | ||||
width: calc((100vw - 60px) * 0.32); | width: calc((100vw - 60px) * 0.32); | ||||
height: calc((100vw - 60px) * 0.32); | height: calc((100vw - 60px) * 0.32); | ||||
@@ -0,0 +1,282 @@ | |||||
<!-- --> | |||||
<template> | |||||
<div class="report-con"> | |||||
<van-nav-bar title="周报列表" @click-left="onNavBack" left-text="返回" left-arrow> | |||||
</van-nav-bar> | |||||
<div class="main"> | |||||
<div class="report"> | |||||
<div class="content"> | |||||
<div class="list" v-if="weekList.length > 0"> | |||||
<div class="item" v-for="(item, index) in weekList" :key="index" | |||||
@click="onClickItem(item.recordId)"> | |||||
<div class="left"> | |||||
<img :src="weekImg" alt /> | |||||
<div class="middle"> | |||||
<div class="title"> | |||||
<span>周报</span> | |||||
<p>{{ item.name }}</p> | |||||
</div> | |||||
<div class="overall"> | |||||
<div class="left"> | |||||
<span>总评</span> | |||||
<p :style="{ color: calcResultColor(item.summaryLevel) }"> | |||||
{{ item.summary }} | |||||
</p> | |||||
</div> | |||||
</div> | |||||
<!-- <div class="trend"> | |||||
<p>( <span>无抑郁倾向</span><span>5%</span>,<span>轻度抑郁倾向</span> <span>5%</span> )</p> | |||||
</div>--> | |||||
</div> | |||||
</div> | |||||
<div class="right"> | |||||
<img :src="moreImg" alt /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="list no-data" v-else> | |||||
<img :src="noDataImg" alt /> | |||||
<p>连续佩戴两周产生对比数据</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import axios from 'axios'; | |||||
import ToastService from '@/services/toast-service'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
weekImg: require('@/assets/today/icons/week_report.png'), | |||||
moreImg: require('@/assets/today/icons/more.png'), | |||||
noDataImg: require('@/assets/today/images/no_data_01.png'), | |||||
weekList: [] | |||||
} | |||||
}, | |||||
computed: { | |||||
uid() { | |||||
return this.$store.getters.uid | |||||
} | |||||
}, | |||||
created() { | |||||
}, | |||||
mounted() { | |||||
this.$nextTick(() => { | |||||
this.getWeekResult(); | |||||
}) | |||||
}, | |||||
methods: { | |||||
getWeekResult() { | |||||
ToastService.loading({ | |||||
message: '数据加载中' | |||||
}); | |||||
let baseUrl = | |||||
process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | |||||
let reqUrl = `${baseUrl}/api/Data/GetWeekResult`; | |||||
let reqParams = { | |||||
uid: this.uid, | |||||
type: this.$route.query.type | |||||
}; | |||||
axios | |||||
.get(reqUrl, { | |||||
params: { ...reqParams } | |||||
/* headers: { 'AccessToken': this.$store.getters.ssjlToken } */ | |||||
}) | |||||
.then(res => { | |||||
console.log('res', res); | |||||
const data = res.data.response; | |||||
this.weekList = data | |||||
.map(item => { | |||||
return { | |||||
name: item.Name.replace('周报', '').replace(/-/g, '.').replace(/~/g, '-'), | |||||
recordId: item.RecordId, | |||||
summary: item.Summary, | |||||
summaryLevel: item.SummaryLevel, | |||||
type: this.emoType | |||||
}; | |||||
}) | |||||
.reverse(); | |||||
ToastService.success({ | |||||
message: '数据加载完成' | |||||
}); | |||||
}); | |||||
}, | |||||
onNavBack() { | |||||
this.$router.push({ | |||||
name: 'Insight' | |||||
}) | |||||
}, | |||||
onClickItem(recordId) { | |||||
this.$router.push({ | |||||
name: 'report', | |||||
query: { | |||||
recordId: recordId, | |||||
name: this.currentEmoName, | |||||
isShowLeft: true, | |||||
uid: this.uid, | |||||
type: this.$route.query.type | |||||
} | |||||
}); | |||||
}, | |||||
// 计算结果采用哪种颜色 | |||||
calcResultColor(value, isCallBackClass) { | |||||
let color = ''; | |||||
let className = ''; | |||||
switch (Number(value)) { | |||||
case 0: | |||||
color = '#179b3b'; | |||||
className = 'none'; | |||||
break; | |||||
case 1: | |||||
color = '#8dc21f'; | |||||
className = 'mid'; | |||||
break; | |||||
case 2: | |||||
color = '#2ea7e0'; | |||||
className = 'severe'; | |||||
break; | |||||
case 3: | |||||
color = '#ff5f8b'; | |||||
className = 'severe'; | |||||
break; | |||||
} | |||||
return isCallBackClass ? className : color; | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
/* @import url(); 引入css类 */ | |||||
.report-con { | |||||
height: 100vh; | |||||
overflow: hidden; | |||||
.main { | |||||
position: relative; | |||||
height: calc(100vh - 100px); | |||||
overflow: scroll; | |||||
.report { | |||||
position: relative; | |||||
height: 100%; | |||||
overflow: scroll; | |||||
background-color: #f5f5f5; | |||||
.content { | |||||
position: relative; | |||||
.list { | |||||
position: relative; | |||||
.item { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: flex-end; | |||||
padding: 68px 30px; | |||||
background-color: #fff; | |||||
margin-bottom: 22px; | |||||
.left { | |||||
display: flex; | |||||
justify-content: flex-start; | |||||
align-items: flex-start; | |||||
img { | |||||
height: 50px; | |||||
width: 50px; | |||||
} | |||||
.middle { | |||||
.title, | |||||
.overall, | |||||
.trend { | |||||
display: flex; | |||||
justify-content: flex-start; | |||||
align-items: center; | |||||
padding-left: 26px; | |||||
span, | |||||
p { | |||||
font-size: 36px; | |||||
font-family: Source Han Sans CN; | |||||
font-weight: 400; | |||||
color: #8d8d8d; | |||||
line-height: 60px; | |||||
} | |||||
} | |||||
.title { | |||||
span { | |||||
padding-right: 40px; | |||||
} | |||||
p { | |||||
color: #282828; | |||||
} | |||||
} | |||||
.overall { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
.left { | |||||
p { | |||||
padding-left: 40px; | |||||
font-weight: bold; | |||||
} | |||||
} | |||||
.right { | |||||
img { | |||||
height: 30px; | |||||
width: 18px; | |||||
} | |||||
} | |||||
} | |||||
.trend { | |||||
align-items: flex-start; | |||||
text-align: left; | |||||
} | |||||
} | |||||
} | |||||
.right { | |||||
img { | |||||
width: 18px; | |||||
height: 30px; | |||||
} | |||||
} | |||||
} | |||||
&.no-data { | |||||
height: calc(100vh - 200px); | |||||
width: 100%; | |||||
@include center(); | |||||
flex-direction: column; | |||||
img { | |||||
height: 220px; | |||||
width: 350px; | |||||
} | |||||
p { | |||||
color: #999; | |||||
font-size: 32px; | |||||
padding: 40px 0 130px 0; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -3,16 +3,12 @@ | |||||
<div class="today"> | <div class="today"> | ||||
<div class="devicesSwitch" v-if="false"> | <div class="devicesSwitch" v-if="false"> | ||||
<!-- <i :class="[{on: isClear},'news']" @click="newsClick" v-show="true"></i> --> | <!-- <i :class="[{on: isClear},'news']" @click="newsClick" v-show="true"></i> --> | ||||
<div | |||||
:class="[ | |||||
'imgArea', | |||||
{ | |||||
cut: currentPerson.deviceStatus ? currentPerson.deviceStatus.online != 0 : false | |||||
} | |||||
]" | |||||
@click="imgAreaClick" | |||||
v-show="personList !== null && personList.length" | |||||
> | |||||
<div :class="[ | |||||
'imgArea', | |||||
{ | |||||
cut: currentPerson.deviceStatus ? currentPerson.deviceStatus.online != 0 : false | |||||
} | |||||
]" @click="imgAreaClick" v-show="personList !== null && personList.length"> | |||||
<img :src="currentPerson.avatar" /> | <img :src="currentPerson.avatar" /> | ||||
<span style="font-weight: bolder" v-show="currentPerson && currentPerson.nickName">{{ | <span style="font-weight: bolder" v-show="currentPerson && currentPerson.nickName">{{ | ||||
currentPerson.nickName | currentPerson.nickName | ||||
@@ -21,23 +17,17 @@ | |||||
</div> | </div> | ||||
<!-- 点击宝贝切换出现 --> | <!-- 点击宝贝切换出现 --> | ||||
<div :class="[{ active: conAreaShow }, 'conArea']" v-if="personList !== null"> | <div :class="[{ active: conAreaShow }, 'conArea']" v-if="personList !== null"> | ||||
<div | |||||
class="list" | |||||
v-for="(item, index) in personList" | |||||
:key="`list_index_${index}`" | |||||
@click="imageListClick(item, index)" | |||||
> | |||||
<div | |||||
:class="[ | |||||
{ active: item.id == $store.getters.personId }, | |||||
'imgA', | |||||
{ | |||||
online: { | |||||
online: item.deviceStatus ? item.deviceStatus.online && item.deviceStatus.online == 1 : 'false' | |||||
} | |||||
<div class="list" v-for="(item, index) in personList" :key="`list_index_${index}`" | |||||
@click="imageListClick(item, index)"> | |||||
<div :class="[ | |||||
{ active: item.id == $store.getters.personId }, | |||||
'imgA', | |||||
{ | |||||
online: { | |||||
online: item.deviceStatus ? item.deviceStatus.online && item.deviceStatus.online == 1 : 'false' | |||||
} | } | ||||
]" | |||||
> | |||||
} | |||||
]"> | |||||
<img :src="item.avatar" /> | <img :src="item.avatar" /> | ||||
</div> | </div> | ||||
<div :class="['Myname', { active: item.id == $store.getters.personId }]"> | <div :class="['Myname', { active: item.id == $store.getters.personId }]"> | ||||
@@ -53,12 +43,9 @@ | |||||
<p>暂无设备信息</p> | <p>暂无设备信息</p> | ||||
</div> --> | </div> --> | ||||
<!-- 今日状态 --> | <!-- 今日状态 --> | ||||
<div | |||||
@click="conAreaShow = false" | |||||
:style="{ | |||||
paddingBottom: isShowBind ? '40px' : 0 | |||||
}" | |||||
> | |||||
<div @click="conAreaShow = false" :style="{ | |||||
paddingBottom: isShowBind ? '40px' : 0 | |||||
}"> | |||||
<div class="today-status"> | <div class="today-status"> | ||||
<img class="img" :src="calcTodayStatus(todayLevel, 'img')" /> | <img class="img" :src="calcTodayStatus(todayLevel, 'img')" /> | ||||
<!-- <img | <!-- <img | ||||
@@ -69,11 +56,8 @@ | |||||
<div class="status"> | <div class="status"> | ||||
<p>状态{{ calcTodayStatus(todayLevel, 'text') }}</p> | <p>状态{{ calcTodayStatus(todayLevel, 'text') }}</p> | ||||
<ul> | <ul> | ||||
<li | |||||
v-for="(item, index) in statusList" | |||||
:key="index" | |||||
:class="[item.className, { active: item.active }]" | |||||
></li> | |||||
<li v-for="(item, index) in statusList" :key="index" :class="[item.className, { active: item.active }]"> | |||||
</li> | |||||
<!-- <li :class="['toobad', { active: false }]"></li> | <!-- <li :class="['toobad', { active: false }]"></li> | ||||
<li :class="['ordinary', { active: todayStatus }]"></li> | <li :class="['ordinary', { active: todayStatus }]"></li> | ||||
<li :class="['sameas', { active: false }]"></li> | <li :class="['sameas', { active: false }]"></li> | ||||
@@ -118,12 +102,8 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<ul> | <ul> | ||||
<li | |||||
v-for="(item, index) in psyDataList.length > 0 ? psyDataList : 3" | |||||
:key="index" | |||||
:style="{ backgroundColor: item.bgColor }" | |||||
@click="onRouterTo('emotionDetails', item.class)" | |||||
> | |||||
<li v-for="(item, index) in psyDataList.length > 0 ? psyDataList : 3" :key="index" | |||||
:style="{ backgroundColor: item.bgColor }" @click="onRouterTo('emotionDetails', item.class)"> | |||||
<h4>{{ item.value || '--' }}</h4> | <h4>{{ item.value || '--' }}</h4> | ||||
<p>{{ item.name || '--' }}</p> | <p>{{ item.name || '--' }}</p> | ||||
<span>{{ item.result || '暂无数据' }}</span> | <span>{{ item.result || '暂无数据' }}</span> | ||||
@@ -133,30 +113,13 @@ | |||||
</div> | </div> | ||||
<!-- 日历 --> | <!-- 日历 --> | ||||
<van-dialog | |||||
class="calenddar-dialog" | |||||
v-model="calendarDialogShow" | |||||
:show-confirm-button="false" | |||||
:show-cancle-button="false" | |||||
:close-on-click-overlay="true" | |||||
ref="calenddarDialog" | |||||
> | |||||
<van-dialog class="calenddar-dialog" v-model="calendarDialogShow" :show-confirm-button="false" | |||||
:show-cancle-button="false" :close-on-click-overlay="true" ref="calenddarDialog"> | |||||
<template #default> | <template #default> | ||||
<div class="calendar" ref="calendarCon"> | <div class="calendar" ref="calendarCon"> | ||||
<van-calendar | |||||
v-model="calendarDialogShow" | |||||
:min-date="minDate" | |||||
:max-date="maxDate" | |||||
:default-date="defaultDate" | |||||
:round="false" | |||||
:poppable="false" | |||||
color="#179b3b" | |||||
:show-confirm="false" | |||||
:show-title="true" | |||||
:show-subtitle="false" | |||||
:formatter="formatterDay" | |||||
@select="onSelect" | |||||
/> | |||||
<van-calendar v-model="calendarDialogShow" :min-date="minDate" :max-date="maxDate" | |||||
:default-date="defaultDate" :round="false" :poppable="false" color="#179b3b" :show-confirm="false" | |||||
:show-title="true" :show-subtitle="false" :formatter="formatterDay" @select="onSelect" /> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
</van-dialog> | </van-dialog> | ||||
@@ -170,12 +133,8 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<ul> | <ul> | ||||
<li | |||||
v-for="(item, index) in signDataList.length > 0 ? signDataList : 3" | |||||
:key="index" | |||||
:style="{ backgroundColor: item.bgColor }" | |||||
@click="onRouterTo('signsDetails', item.class)" | |||||
> | |||||
<li v-for="(item, index) in signDataList.length > 0 ? signDataList : 3" :key="index" | |||||
:style="{ backgroundColor: item.bgColor }" @click="onRouterTo('signsDetails', item.class)"> | |||||
<h4>{{ item.value || '--' }}</h4> | <h4>{{ item.value || '--' }}</h4> | ||||
<p>{{ item.name || '暂无数据' }}</p> | <p>{{ item.name || '暂无数据' }}</p> | ||||
<time>{{ item.time || '--' }}</time> | <time>{{ item.time || '--' }}</time> | ||||
@@ -184,8 +143,7 @@ | |||||
<div class="tip"> | <div class="tip"> | ||||
<img class="img" src="@/assets/today/icons/2_25.png" /> | <img class="img" src="@/assets/today/icons/2_25.png" /> | ||||
<p> | <p> | ||||
<span>温馨提示:</span | |||||
>检测数据仅供参考,<span>不可做医疗诊断和治疗依据</span>,在运动、工作等场景会影响健康检测。 | |||||
<span>温馨提示:</span>检测数据仅供参考,<span>不可做医疗诊断和治疗依据</span>,在运动、工作等场景会影响健康检测。 | |||||
</p> | </p> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -255,7 +213,7 @@ | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | |||||
<script> | |||||
import APIAlarm from '@/api/core'; | import APIAlarm from '@/api/core'; | ||||
import APIPsy from '@/api/psychological'; | import APIPsy from '@/api/psychological'; | ||||
import APIHealthUser from '@/api/health-user'; | import APIHealthUser from '@/api/health-user'; | ||||
@@ -360,10 +318,14 @@ export default { | |||||
return this.$route.query.isBinding || false; | return this.$route.query.isBinding || false; | ||||
} | } | ||||
}, | }, | ||||
created() {}, | |||||
async mounted() { | |||||
this.getPersonList(); | |||||
this.getAuth(); | |||||
created() { | |||||
this.$nextTick(() => { | |||||
this.getPersonList(); | |||||
this.getAuth(); | |||||
}) | |||||
}, | |||||
mounted() { | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getPersonList() { | getPersonList() { | ||||
@@ -2,20 +2,24 @@ | |||||
<!-- 周/月报 --> | <!-- 周/月报 --> | ||||
<div class="report"> | <div class="report"> | ||||
<NavBar title="周报" @on-click-left="onNavBack" right-text="历史"> </NavBar> | <NavBar title="周报" @on-click-left="onNavBack" right-text="历史"> </NavBar> | ||||
<div class="periodSwitch"> | |||||
<div class="arrow arrowLeft"> | |||||
<van-icon name="arrow-left" :color="isPreClick ? '' : '#e6e6e6'" @click="dateClick"></van-icon> | |||||
</div> | |||||
<div class="timearea">{{ currentRecord.name }}</div> | |||||
<div class="arrow arrowRight"> | |||||
<van-icon name="arrow" :color="isAddClick ? '' : '#e6e6e6'" @click="dateClick('add')"></van-icon> | |||||
</div> | |||||
</div> | |||||
<div class="main"> | <div class="main"> | ||||
<div class="periodNav"> | |||||
<div | |||||
class="periodItem minPeriodItem" | |||||
:class="{ active: signActive == index }" | |||||
v-for="(item, index) in signList" | |||||
:key="index" | |||||
@click="onSignClick(index)" | |||||
> | |||||
<!-- <div class="periodNav"> | |||||
<div class="periodItem minPeriodItem" :class="{ active: signActive == index }" v-for="(item, index) in signList" | |||||
:key="index" @click="onSignClick(index)"> | |||||
<span>{{ item.name }}</span> | <span>{{ item.name }}</span> | ||||
</div> | </div> | ||||
</div> | |||||
</div> --> | |||||
<!-- 总评 --> | <!-- 总评 --> | ||||
<div class="overall-rating"> | <div class="overall-rating"> | ||||
<div class="con"> | <div class="con"> | ||||
<p class="space-between"> | <p class="space-between"> | ||||
@@ -62,8 +66,8 @@ | |||||
<img :src="calcImg(item.percentage, item.lastPercentage)" alt="" /> | <img :src="calcImg(item.percentage, item.lastPercentage)" alt="" /> | ||||
<span :style="{ color: calcImg(item.percentage, item.lastPercentage, true) != 0 ? item.color : '' }">{{ | <span :style="{ color: calcImg(item.percentage, item.lastPercentage, true) != 0 ? item.color : '' }">{{ | ||||
calcImg(item.percentage, item.lastPercentage, true) | calcImg(item.percentage, item.lastPercentage, true) | ||||
? Math.abs(calcImg(item.percentage, item.lastPercentage, true)) + '%' | |||||
: '持平' | |||||
? Math.abs(calcImg(item.percentage, item.lastPercentage, true)) + '%' | |||||
: '持平' | |||||
}}</span> | }}</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -72,12 +76,8 @@ | |||||
</div> | </div> | ||||
<div class="statistics"> | <div class="statistics"> | ||||
<div class="list"> | <div class="list"> | ||||
<div | |||||
class="item" | |||||
v-for="(item, index) in statisticsList" | |||||
:key="index" | |||||
:style="{ backgroundColor: item.bgColor }" | |||||
> | |||||
<div class="item" v-for="(item, index) in statisticsList" :key="index" | |||||
:style="{ backgroundColor: item.bgColor }"> | |||||
<div class="top"> | <div class="top"> | ||||
<span>{{ item.label || '--' }}</span> | <span>{{ item.label || '--' }}</span> | ||||
</div> | </div> | ||||
@@ -97,15 +97,9 @@ | |||||
<!-- <div class="chart-title"> | <!-- <div class="chart-title"> | ||||
<p>24小时{{ emoName }}时间分布图</p> | <p>24小时{{ emoName }}时间分布图</p> | ||||
</div> --> | </div> --> | ||||
<div class="scatter"> | |||||
<EchartBox | |||||
echartId="scatterCharts" | |||||
outTitle="24小时抑郁时间分布图" | |||||
:border="false" | |||||
height="200" | |||||
width="200" | |||||
:options="scatterOptions" | |||||
> | |||||
<div class="scatter" v-show="false"> | |||||
<EchartBox echartId="scatterCharts" outTitle="24小时抑郁时间分布图" :border="false" height="200" width="200" | |||||
:options="scatterOptions"> | |||||
<template #custom-bot> | <template #custom-bot> | ||||
<div class="custom-bot"> | <div class="custom-bot"> | ||||
<div class="list"> | <div class="list"> | ||||
@@ -124,7 +118,7 @@ | |||||
<!-- 数据图-柱形图 --> | <!-- 数据图-柱形图 --> | ||||
<div class="bar-chart"> | <div class="bar-chart"> | ||||
<div class="echart"> | <div class="echart"> | ||||
<EchartBox echartId="charts" height="200" width="200" :legend="emoLegend" :options="emoOptions"></EchartBox> | |||||
<EchartBox echartId="charts" height="200" width="200" :legend="emoLegend" :options="defaultOptions"></EchartBox> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="line"></div> | <div class="line"></div> | ||||
@@ -132,13 +126,7 @@ | |||||
<div class="advice"> | <div class="advice"> | ||||
<div class="content"> | <div class="content"> | ||||
<p class="title">健康建议</p> | <p class="title">健康建议</p> | ||||
<!-- <p>{{ weekResult.Advice || '--' }}</p> --> | |||||
<p> | |||||
健康建议抑郁是一种负性情绪,是人们遇到具体生活事件后,出现 | |||||
的一种不愉快、烦闷压抑的内心体验。情绪受挫折的影响是很正常 | |||||
的反应,不要任由情绪跟着负面想法走,让自己陷入抑郁之中。与 | |||||
人沟通,有助于排解不良情绪;把注意力放到当下真正需要关注的 事情中来,积极应对困难,有助于改善现状。 | |||||
</p> | |||||
<p>{{ weekResult.Advice || '--' }}</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<!-- 概览 --> | <!-- 概览 --> | ||||
@@ -147,12 +135,8 @@ | |||||
<div class="title"> | <div class="title"> | ||||
<span class="title-text">{{ surveyTitle }}</span> | <span class="title-text">{{ surveyTitle }}</span> | ||||
<div class="mood-list"> | <div class="mood-list"> | ||||
<div | |||||
class="item" | |||||
v-for="(item, index) in emotionList" | |||||
:key="index" | |||||
:style="{ backgroundColor: item.color }" | |||||
> | |||||
<div class="item" v-for="(item, index) in emotionList" :key="index" | |||||
:style="{ backgroundColor: item.color }"> | |||||
<p> | <p> | ||||
<span class="day">{{ item.days }}</span> | <span class="day">{{ item.days }}</span> | ||||
<span class="day-text">天</span> | <span class="day-text">天</span> | ||||
@@ -310,16 +294,28 @@ export default { | |||||
signGrid: [], | signGrid: [], | ||||
chartsScatter: null, | chartsScatter: null, | ||||
timeList: ['0', '6', '12', '18', '24'], | timeList: ['0', '6', '12', '18', '24'], | ||||
emotionDataNew: [] | |||||
emotionDataNew: [], | |||||
count: 0, | |||||
isPreClick: true, | |||||
isAddClick: true, | |||||
clickFlag: true, //左右日期按钮是否给予点击 | |||||
weekList: [], | |||||
currentRecord: {}, | |||||
maxCount: '' | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.initEchartText(); | this.initEchartText(); | ||||
this.createList(); | |||||
this.loadParams(); | |||||
//this.createList(); | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.loadParams(); | |||||
this.initEchart(); | |||||
this.$nextTick(() => { | |||||
this.initEchart(); | |||||
this.getWeekResult(); | |||||
}) | |||||
}, | }, | ||||
watch: { | watch: { | ||||
// 监听数据发生变化 初始化各项图表 | // 监听数据发生变化 初始化各项图表 | ||||
@@ -343,6 +339,9 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
computed: { | computed: { | ||||
uid() { | |||||
return this.$store.getters.uid | |||||
}, | |||||
emoOptions() { | emoOptions() { | ||||
return { | return { | ||||
grid: { | grid: { | ||||
@@ -405,86 +404,13 @@ export default { | |||||
time: { | time: { | ||||
useUTC: false | useUTC: false | ||||
}, | }, | ||||
title: { | |||||
/* text: this.echartsTitle, */ | |||||
left: 1, | |||||
right: 25, | |||||
bottom: 20, | |||||
top: '3%', | |||||
textStyle: { | |||||
fontSize: 18, | |||||
fontWeight: 'bold' | |||||
} | |||||
}, | |||||
legend: { | |||||
width: '65%', | |||||
orient: 'horizontal', | |||||
right: 'right', | |||||
top: '3%', | |||||
bottom: '1%', | |||||
itemHeight: 12, | |||||
itemWidth: 12, | |||||
itemGap: 10, | |||||
align: 'left', | |||||
selectedMode: false, | |||||
data: [ | |||||
{ | |||||
name: `轻度${this.emoName}倾向`, | |||||
icon: 'rect', | |||||
itemStyle: { | |||||
color: '#8dc21f' | |||||
}, | |||||
textStyle: { | |||||
fontSize: 12 | |||||
} | |||||
}, | |||||
{ | |||||
name: `中度${this.emoName}倾向`, | |||||
itemStyle: { | |||||
color: '#2ea7e0' | |||||
}, | |||||
icon: 'rect', | |||||
textStyle: { | |||||
fontSize: 12 | |||||
} | |||||
}, | |||||
{ | |||||
name: `重度${this.emoName}倾向`, | |||||
itemStyle: { | |||||
color: '#ff5f8b' | |||||
}, | |||||
icon: 'rect', | |||||
textStyle: { | |||||
fontSize: 12 | |||||
} | |||||
}, | |||||
{ | |||||
name: `无${this.emoName}倾向`, | |||||
icon: 'rect', | |||||
itemStyle: { | |||||
color: '#179b3b' | |||||
}, | |||||
textStyle: { | |||||
fontSize: 12 | |||||
} | |||||
} | |||||
], | |||||
formatter: function (name) { | |||||
// 自定义显示内容 | |||||
if (name.length > 6) { | |||||
return name.substring(0, 6) + '\n' + name.substring(6); | |||||
} else { | |||||
return name; | |||||
} | |||||
} | |||||
}, | |||||
grid: { | grid: { | ||||
show: true, | show: true, | ||||
borderWidth: 1, | |||||
top: '20%', | |||||
borderWidth: 0, | |||||
top: '3%', | |||||
left: '1%', | left: '1%', | ||||
right: '5%', | |||||
bottom: '5%', | |||||
right: '3%', | |||||
bottom: '15%', | |||||
containLabel: true | containLabel: true | ||||
}, | }, | ||||
xAxis: { | xAxis: { | ||||
@@ -515,11 +441,11 @@ export default { | |||||
data: this.xAxisData | data: this.xAxisData | ||||
}, | }, | ||||
dataZoom: [ | dataZoom: [ | ||||
{ | |||||
type: 'inside', | |||||
start: 0, | |||||
end: 100 | |||||
}, | |||||
/* { | |||||
type: "inside", | |||||
start: 0, | |||||
end: 100, | |||||
}, */ | |||||
{ | { | ||||
start: 0, | start: 0, | ||||
end: 100, | end: 100, | ||||
@@ -527,9 +453,9 @@ export default { | |||||
color: '#FFF', | color: '#FFF', | ||||
fontSize: 14 | fontSize: 14 | ||||
}, | }, | ||||
show: false, | |||||
height: 25, | |||||
bottom: '3%', | |||||
show: true, | |||||
height: 20, | |||||
bottom: 4, | |||||
handleStyle: { | handleStyle: { | ||||
borderWidth: 1, | borderWidth: 1, | ||||
borderCap: 'square' | borderCap: 'square' | ||||
@@ -543,7 +469,7 @@ export default { | |||||
align: 'center' | align: 'center' | ||||
}, | }, | ||||
formatter: function (params) { | formatter: function (params) { | ||||
return params[0].marker + params[0].name + '--' + params[0].value + '</br>'; | |||||
return params[0].marker + params[0].name + '</br>' + params[0].value; | |||||
} | } | ||||
}, | }, | ||||
yAxis: { | yAxis: { | ||||
@@ -556,16 +482,16 @@ export default { | |||||
nameTextStyle: { | nameTextStyle: { | ||||
fontSize: 13 | fontSize: 13 | ||||
}, | }, | ||||
alignTicks: true, | |||||
alignTicks: false, | |||||
axisTick: { | axisTick: { | ||||
show: true | |||||
show: false | |||||
}, | }, | ||||
axisLabel: { | axisLabel: { | ||||
show: true, | show: true, | ||||
fontSize: 13 | fontSize: 13 | ||||
}, | }, | ||||
splitLine: { | splitLine: { | ||||
show: true, | |||||
show: false, | |||||
lineStyle: { | lineStyle: { | ||||
color: '#ddd', | color: '#ddd', | ||||
width: 1 | width: 1 | ||||
@@ -577,9 +503,19 @@ export default { | |||||
name: `无${this.emoName}倾向`, | name: `无${this.emoName}倾向`, | ||||
type: 'line', | type: 'line', | ||||
padding: 5, | padding: 5, | ||||
smooth: true, | |||||
data: this.emotionData, | data: this.emotionData, | ||||
symbol: 'circle', | symbol: 'circle', | ||||
symbolSize: 8 | |||||
symbolSize: 10, | |||||
itemStyle: { | |||||
color: '#fff', | |||||
borderWidth: 2 | |||||
}, | |||||
lineStyle: { | |||||
width: 6, | |||||
type: 'solid', | |||||
color: '#189b3b' | |||||
} | |||||
}, | }, | ||||
{ | { | ||||
name: `轻度${this.emoName}倾向`, | name: `轻度${this.emoName}倾向`, | ||||
@@ -881,13 +817,13 @@ export default { | |||||
} | } | ||||
return title; | return title; | ||||
}, | }, | ||||
getWeekResultDetail() { | |||||
getWeekResultDetail(recordId) { | |||||
this.$toast.loading('数据加载中'); | this.$toast.loading('数据加载中'); | ||||
let baseUrl = | let baseUrl = | ||||
process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | ||||
let reqUrl = `${baseUrl}/api/Data/GetWeekResultDetail`; | let reqUrl = `${baseUrl}/api/Data/GetWeekResultDetail`; | ||||
let reqParams = { | let reqParams = { | ||||
recordId: /* this.params.recordId */ '1728096156447281486' | |||||
recordId: recordId || this.params.recordId | |||||
}; | }; | ||||
axios | axios | ||||
.get(reqUrl, { | .get(reqUrl, { | ||||
@@ -898,8 +834,8 @@ export default { | |||||
const data = res.data.response; | const data = res.data.response; | ||||
let chartData = data.ChartData | let chartData = data.ChartData | ||||
? JSON.parse(data.ChartData).filter(item => { | ? JSON.parse(data.ChartData).filter(item => { | ||||
return item.Key; | |||||
}) | |||||
return item.Key; | |||||
}) | |||||
: []; | : []; | ||||
if (data) { | if (data) { | ||||
this.monitoringCount = data.Total; | this.monitoringCount = data.Total; | ||||
@@ -1051,7 +987,7 @@ export default { | |||||
{ | { | ||||
name: '平均值', | name: '平均值', | ||||
type: 'scatter', | type: 'scatter', | ||||
symbolSize: 8, | |||||
symbolSize: 14, | |||||
data: this.emotionData | data: this.emotionData | ||||
}, | }, | ||||
{ | { | ||||
@@ -1059,15 +995,15 @@ export default { | |||||
type: 'custom', | type: 'custom', | ||||
data: this.weekAndMonData, | data: this.weekAndMonData, | ||||
renderItem: function (params, api) { | renderItem: function (params, api) { | ||||
var categoryIndex = api.value(0); | |||||
var end = api.coord([categoryIndex, api.value(1)]); | |||||
var start = api.coord([categoryIndex, api.value(2)]); | |||||
var width = 8; | |||||
var rectShape = that.$echarts.graphic.clipRectByRect( | |||||
let categoryIndex = api.value(0); | |||||
let end = api.coord([categoryIndex, api.value(1)]); | |||||
let start = api.coord([categoryIndex, api.value(2)]); | |||||
let width = 16; | |||||
let rectShape = that.$echarts.graphic.clipRectByRect( | |||||
{ | { | ||||
x: start[0] - width / 2, | x: start[0] - width / 2, | ||||
y: start[1], | y: start[1], | ||||
width: 8, | |||||
width: 16, | |||||
height: end[1] - start[1] | height: end[1] - start[1] | ||||
}, | }, | ||||
{ | { | ||||
@@ -1099,25 +1035,25 @@ export default { | |||||
{ | { | ||||
name: `轻度${this.emoName}倾向`, | name: `轻度${this.emoName}倾向`, | ||||
type: 'scatter', | type: 'scatter', | ||||
symbolSize: 8, | |||||
symbolSize: 12, | |||||
data: '' | data: '' | ||||
}, | }, | ||||
{ | { | ||||
name: `中度${this.emoName}倾向`, | name: `中度${this.emoName}倾向`, | ||||
type: 'scatter', | type: 'scatter', | ||||
symbolSize: 8, | |||||
symbolSize: 12, | |||||
data: '' | data: '' | ||||
}, | }, | ||||
{ | { | ||||
name: `重度${this.emoName}倾向`, | name: `重度${this.emoName}倾向`, | ||||
type: 'scatter', | type: 'scatter', | ||||
symbolSize: 8, | |||||
symbolSize: 12, | |||||
data: '' | data: '' | ||||
}, | }, | ||||
{ | { | ||||
name: `无${this.emoName}倾向`, | name: `无${this.emoName}倾向`, | ||||
type: 'scatter', | type: 'scatter', | ||||
symbolSize: 8, | |||||
symbolSize: 12, | |||||
data: '' | data: '' | ||||
} | } | ||||
]; | ]; | ||||
@@ -1125,27 +1061,25 @@ export default { | |||||
this.defaultOptions.tooltip = { | this.defaultOptions.tooltip = { | ||||
trigger: 'axis', | trigger: 'axis', | ||||
formatter: function (params) { | formatter: function (params) { | ||||
if (params) { | |||||
return ( | |||||
params[0].marker + | |||||
'平均值:' + | |||||
params[0].name + | |||||
'--' + | |||||
params[0].value + | |||||
'</br>' + | |||||
params[1].marker + | |||||
'最大值:' + | |||||
params[1].name + | |||||
'--' + | |||||
params[1].value[2] + | |||||
'</br>' + | |||||
params[1].marker + | |||||
'最小值:' + | |||||
params[1].name + | |||||
'--' + | |||||
params[1].value[1] | |||||
); | |||||
} | |||||
return ( | |||||
params[0].marker + | |||||
'平均值:' + | |||||
params[0].name + | |||||
'--' + | |||||
params[0].value + | |||||
'</br>' + | |||||
params[1].marker + | |||||
'最大值:' + | |||||
params[1].name + | |||||
'--' + | |||||
params[1].value[2] + | |||||
'</br>' + | |||||
params[1].marker + | |||||
'最小值:' + | |||||
params[1].name + | |||||
'--' + | |||||
params[1].value[1] | |||||
); | |||||
} | } | ||||
}; | }; | ||||
this.defaultOptions.series = this.weekAndMonthSeries; | this.defaultOptions.series = this.weekAndMonthSeries; | ||||
@@ -1174,7 +1108,10 @@ export default { | |||||
}, | }, | ||||
onNavBack() { | onNavBack() { | ||||
this.$router.push({ | this.$router.push({ | ||||
name: 'Insight' | |||||
name: 'reportList', | |||||
query: { | |||||
type: this.$route.query.type | |||||
} | |||||
}); | }); | ||||
}, | }, | ||||
// 计算字体显示的颜色 | // 计算字体显示的颜色 | ||||
@@ -1236,7 +1173,85 @@ export default { | |||||
}, | }, | ||||
onSignClick(index) { | onSignClick(index) { | ||||
this.signActive = index; | this.signActive = index; | ||||
} | |||||
}, | |||||
dateClick(type) { | |||||
if (type == 'add') { | |||||
if (this.count <= 0) { | |||||
return; | |||||
} | |||||
this.count--; | |||||
this.isPreClick = true; | |||||
let recordId = this.weekList.filter(item => { | |||||
return item.count === this.count; | |||||
})[0].recordId; | |||||
this.currentRecord = this.weekList.filter(item => { | |||||
return item.count === this.count; | |||||
})[0] | |||||
this.getWeekResultDetail(recordId); | |||||
if (this.count <= 0) { | |||||
this.isAddClick = false; | |||||
} | |||||
console.log("右,当前的count", this.count); | |||||
} else { | |||||
// 上一个 | |||||
if (this.count >= this.maxCount) { | |||||
return; | |||||
} | |||||
this.count++; | |||||
this.isAddClick = true; | |||||
let recordId = this.weekList.filter(item => { | |||||
return item.count === this.count; | |||||
})[0].recordId; | |||||
this.currentRecord = this.weekList.filter(item => { | |||||
return item.count === this.count; | |||||
})[0] | |||||
this.getWeekResultDetail(recordId); | |||||
console.log("recordId", recordId); | |||||
if (this.count >= this.maxCount) { | |||||
this.isPreClick = false; | |||||
} | |||||
console.log("左,当前的count", this.count); | |||||
} | |||||
}, | |||||
getWeekResult() { | |||||
let baseUrl = | |||||
process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | |||||
let reqUrl = `${baseUrl}/api/Data/GetWeekResult`; | |||||
let reqParams = { | |||||
uid: this.uid, | |||||
type: this.$route.query.type | |||||
}; | |||||
axios | |||||
.get(reqUrl, { | |||||
params: { ...reqParams } | |||||
/* headers: { 'AccessToken': this.$store.getters.ssjlToken } */ | |||||
}) | |||||
.then(res => { | |||||
console.log('res', res); | |||||
const data = res.data.response; | |||||
this.weekList = data.reverse() | |||||
.map((item, index) => { | |||||
return { | |||||
name: item.Name.replace('周报', '').replace(/-/g, '.').replace(/~/g, '-'), | |||||
recordId: item.RecordId, | |||||
summary: item.Summary, | |||||
summaryLevel: item.SummaryLevel, | |||||
count: index | |||||
}; | |||||
}) | |||||
this.currentRecord = this.weekList.filter(item => { | |||||
return item.recordId == this.$route.query.recordId | |||||
})[0]; | |||||
this.count = this.weekList.filter(item => { | |||||
return item.recordId == this.$route.query.recordId | |||||
})[0].count; | |||||
this.maxCount = data.length - 1; | |||||
this.isAddClick = this.maxCount - this.count < this.maxCount; | |||||
this.isPreClick = this.maxCount - this.count > 0; | |||||
console.log("weekList", this.weekList, this.count); | |||||
}); | |||||
}, | |||||
} | } | ||||
}; | }; | ||||
</script> | </script> | ||||
@@ -5,16 +5,40 @@ | |||||
background-color: #f5f5f5; | background-color: #f5f5f5; | ||||
font-family: Source Han Sans CN; | font-family: Source Han Sans CN; | ||||
.periodSwitch { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
padding: 20px 40px; | |||||
padding-bottom: 10px; | |||||
padding-top: 100px; | |||||
left: 0; | |||||
.timearea { | |||||
font-size: 28px; | |||||
justify-self: center; | |||||
color: gray; | |||||
} | |||||
.arrow { | |||||
font-size: 45px; | |||||
} | |||||
} | |||||
.main { | .main { | ||||
height: calc(100vh - 200px); | |||||
height: calc(100vh - 150px); | |||||
overflow: scroll; | overflow: scroll; | ||||
background-color: #fff; | background-color: #fff; | ||||
padding: 0 20px; | padding: 0 20px; | ||||
padding-top: 100px; | |||||
/* padding-top: 100px; */ | |||||
.periodNav { | .periodNav { | ||||
display: flex; | display: flex; | ||||
justify-content: space-around; | justify-content: space-around; | ||||
align-items: center; | align-items: center; | ||||
.periodItem { | .periodItem { | ||||
width: 48%; | width: 48%; | ||||
font-size: 28px; | font-size: 28px; | ||||
@@ -23,16 +47,19 @@ | |||||
padding: 12px; | padding: 12px; | ||||
border-radius: 30px; | border-radius: 30px; | ||||
background: #e6e6e6; | background: #e6e6e6; | ||||
&.active { | &.active { | ||||
color: white; | color: white; | ||||
background: #179b3b; | background: #179b3b; | ||||
} | } | ||||
} | } | ||||
.minPeriodItem { | .minPeriodItem { | ||||
width: 32%; | width: 32%; | ||||
padding: 8px; | padding: 8px; | ||||
} | } | ||||
} | } | ||||
.line { | .line { | ||||
height: 22px; | height: 22px; | ||||
background-color: $lineGray; | background-color: $lineGray; | ||||
@@ -41,6 +68,7 @@ | |||||
.overall-rating { | .overall-rating { | ||||
padding: 46px 15px; | padding: 46px 15px; | ||||
margin-bottom: 18px; | margin-bottom: 18px; | ||||
.con { | .con { | ||||
padding: 34px 20px; | padding: 34px 20px; | ||||
display: flex; | display: flex; | ||||
@@ -153,6 +181,7 @@ | |||||
display: flex; | display: flex; | ||||
justify-content: center; | justify-content: center; | ||||
flex-direction: column; | flex-direction: column; | ||||
.item { | .item { | ||||
width: 100%; | width: 100%; | ||||
display: flex; | display: flex; | ||||
@@ -160,6 +189,7 @@ | |||||
align-items: center; | align-items: center; | ||||
font-size: 24px; | font-size: 24px; | ||||
padding: 18px 0; | padding: 18px 0; | ||||
.item-left { | .item-left { | ||||
display: flex; | display: flex; | ||||
justify-content: flex-start; | justify-content: flex-start; | ||||
@@ -184,13 +214,16 @@ | |||||
.item-right { | .item-right { | ||||
@include center(); | @include center(); | ||||
span { | span { | ||||
font-size: 24px; | font-size: 24px; | ||||
} | } | ||||
} | } | ||||
.status { | .status { | ||||
padding: 0 10px; | padding: 0 10px; | ||||
@include center(); | @include center(); | ||||
img { | img { | ||||
height: 30px; | height: 30px; | ||||
width: 18px; | width: 18px; | ||||
@@ -205,6 +238,7 @@ | |||||
.statistics { | .statistics { | ||||
position: relative; | position: relative; | ||||
padding: 10px 28px 10px 28px; | padding: 10px 28px 10px 28px; | ||||
.list { | .list { | ||||
flex: 1; | flex: 1; | ||||
width: 100%; | width: 100%; | ||||
@@ -224,6 +258,7 @@ | |||||
border: 1px solid $border_color; | border: 1px solid $border_color; | ||||
border-radius: 30px; | border-radius: 30px; | ||||
color: #fff; | color: #fff; | ||||
.top { | .top { | ||||
font-size: 24px; | font-size: 24px; | ||||
} | } | ||||
@@ -238,25 +273,30 @@ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.chart-title { | .chart-title { | ||||
padding: 30px; | padding: 30px; | ||||
font-size: 36px; | font-size: 36px; | ||||
font-weight: bold; | font-weight: bold; | ||||
color: #282828; | color: #282828; | ||||
} | } | ||||
.bar-chart { | .bar-chart { | ||||
position: relative; | position: relative; | ||||
height: 600px; | height: 600px; | ||||
background-color: #fff; | background-color: #fff; | ||||
padding: 0 10px; | padding: 0 10px; | ||||
.echart { | .echart { | ||||
height: 600px; | height: 600px; | ||||
padding: 0 10px; | padding: 0 10px; | ||||
} | } | ||||
} | } | ||||
.scatter { | .scatter { | ||||
border: none; | border: none; | ||||
height: 600px; | height: 600px; | ||||
.custom-bot { | .custom-bot { | ||||
.list { | .list { | ||||
height: 40px; | height: 40px; | ||||
@@ -268,8 +308,10 @@ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
.advice { | .advice { | ||||
padding: 52px 20px 60px 20px; | padding: 52px 20px 60px 20px; | ||||
.content { | .content { | ||||
background: #f2f6ff; | background: #f2f6ff; | ||||
border-radius: 20px; | border-radius: 20px; | ||||
@@ -281,6 +323,7 @@ | |||||
color: #707070; | color: #707070; | ||||
line-height: 46px; | line-height: 46px; | ||||
} | } | ||||
.title { | .title { | ||||
font-size: 26px; | font-size: 26px; | ||||
font-weight: bold; | font-weight: bold; | ||||
@@ -322,10 +365,12 @@ | |||||
color: #fff; | color: #fff; | ||||
border: 1px solid #cdf348; | border: 1px solid #cdf348; | ||||
border-radius: 40px; | border-radius: 40px; | ||||
p { | p { | ||||
font-size: 28px; | font-size: 28px; | ||||
padding: 0; | padding: 0; | ||||
@include center(); | @include center(); | ||||
.day { | .day { | ||||
/* padding: 5px; */ | /* padding: 5px; */ | ||||
font-size: 56px; | font-size: 56px; | ||||
@@ -335,6 +380,7 @@ | |||||
font-size: 24px; | font-size: 24px; | ||||
padding: 0 10px; | padding: 0 10px; | ||||
} | } | ||||
img { | img { | ||||
height: 30px; | height: 30px; | ||||
width: 18px; | width: 18px; | ||||
@@ -345,12 +391,14 @@ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
&.no-data { | &.no-data { | ||||
@include center(); | @include center(); | ||||
flex-direction: column; | flex-direction: column; | ||||
p { | p { | ||||
font-size: 32px; | font-size: 32px; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
} |