护理单元首页完事

This commit is contained in:
Teng 2025-12-26 10:03:50 +08:00
parent 5a7134a3c5
commit 9556186dff
6 changed files with 218 additions and 32 deletions

View File

@ -40,7 +40,7 @@
60
</view>
</view>
</view>
<view class="card-bottom">
<image class="bottom-img" src="/static/index/card/doctor.png" />
@ -64,7 +64,7 @@
70
</view>
</view>
</view>
<view class="card-bottom">
<image class="bottom-img" src="/static/index/card/work.png" />
@ -82,9 +82,11 @@
</view>
<view class="right-container-tem">
<image class="right-container-tem-img" src="/static/index/newindex/wendu/0.png" />
<text class="right-container-tem-text">{{ (uni.getStorageSync('NUall').humidDeviceList && uni.getStorageSync('NUall').humidDeviceList[0])? uni.getStorageSync('NUall').humidDeviceList[0].temperature: '-' }}°C</text>
<text
class="right-container-tem-text">{{ (uni.getStorageSync('NUall').humidDeviceList && uni.getStorageSync('NUall').humidDeviceList[0])? uni.getStorageSync('NUall').humidDeviceList[0].temperature: '-' }}°C</text>
<image class="right-container-tem-img" src="/static/index/newindex/wendu/1.png" />
<text class="right-container-tem-text">{{ (uni.getStorageSync('NUall').humidDeviceList && uni.getStorageSync('NUall').humidDeviceList[0])? uni.getStorageSync('NUall').humidDeviceList[0].humidity: '-' }}%</text>
<text
class="right-container-tem-text">{{ (uni.getStorageSync('NUall').humidDeviceList && uni.getStorageSync('NUall').humidDeviceList[0])? uni.getStorageSync('NUall').humidDeviceList[0].humidity: '-' }}%</text>
</view>
</view>
</view>
@ -113,7 +115,7 @@
一级压疮防护
</view>
</view>
<view style="display: flex;align-items: center;margin-top: 20rpx;">
<!-- <view style="display: flex;align-items: center;margin-top: 20rpx;">
<image class="down-img" :src="`/static/index/newindex/states/left.png`" />
<view v-for="(item,index) in downStates" :key="index" class="states-father">
<image class="icon-img" :src="item.url" />
@ -123,7 +125,7 @@
</view>
<image class="down-img" :src="`/static/index/newindex/states/right.png`" />
</view>
</view> -->
<view style="display: flex;margin-top: 40rpx;">
<view style="width: 240rpx;height: 90rpx;margin-right: 40rpx;">
<view class="start-button">
@ -175,7 +177,29 @@
</view>
<view class="index-content-right" :style="transition?{opacity: `1`}:{opacity: `0`}">
<view class="right-top">
<view class="top-title">
护理单元
</view>
<view class="top-heng"></view>
<scroll-view class="top-list" scroll-y>
<view class="list-view" :style="menutarget===index?{borderColor:`#8DD6FF`}:{}"
v-for="(item,index) in filteredMenu(0)" :key="index" @click="clickmenu(index)">
<image class="list-img" :src="`/static/index/newindex/leftmenu/NU${item.elderInfo?.name?`blue`:`white`}.png`" />
<view class="">
<view class="first-line">
<view style="font-size: 1.2vw;">
护理单元01
</view>
<view class="first-line-second">
{{ item.elderInfo?.name?`入住`:`空闲` }}
</view>
</view>
<view class="second-line">
NUID2506000001
</view>
</view>
</view>
</scroll-view>
</view>
<view class="right-bottom">
<view class="bottom-title">
@ -183,12 +207,28 @@
<view class="blue-button">
长者标签
</view>
</view>
<image class="big-older" src="/static/index/newindex/leftmenu/older.png" />
<view class="name-weight">
{{ uni.getStorageSync('NUall').elderInfo?.name }}
</view>
<view class="message-view">
{{ uni.getStorageSync('NUall').elderInfo?.sex }}
<view class="message-shu"></view>
<view style="font-weight: 600;">
{{ calcAge(uni.getStorageSync('NUall').elderInfo?.dateOfBirth) }}
</view>
<view class="message-shu"></view>
<image class="message-img" :src="`/static/index/newindex/leftmenu/time.png`" />
{{ uni.getStorageSync('NUall').elderInfo?.startTime }}
</view>
<view class="message-bottom">
<view class="bottom-tags" v-for="(item,index) in tagarray" :key="index">
{{ item }}
</view>
</view>
</view>
</view>
@ -196,7 +236,7 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
import { queryPadPageList } from '@/pages/watch/api/lunpan.js'
const props = defineProps({
isShow: {
@ -205,8 +245,25 @@
},
});
const leftMenuArray = ref([]);
const menutarget = ref(0)
const clickmenu = (index : number) => {
menutarget.value = index
let data = filteredMenu(0)[index]
uni.setStorageSync('nuId', data.nuId);
uni.setStorageSync('nuName', data.nuName);
uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null);
uni.setStorageSync('NUall', data);
}
const tagarray = ["市医保", "半失能", "正常计费"]
function calcAge(dateOfBirth : string) {
const birthYear = parseInt(dateOfBirth.slice(0, 4), 10);
const currentYear = new Date().getFullYear();
return currentYear - birthYear;
}
const typeNow = ref(-1);
const photoplay = ref(false)
const downArray = ref()
@ -312,7 +369,7 @@
// console.log("????",transition.value)
setTimeout(() => {
transition.value = true;
// console.log("",uni.getStorageSync('NUall'))
console.log("看看", uni.getStorageSync('NUall'))
}, 50)
} else {
transition.value = false;
@ -340,7 +397,7 @@
const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
const week = weekDays[now.getDay()];
weekDay.value = week;
// //
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
@ -354,24 +411,104 @@
//
setInterval(updateTime, 1000);
photoplay.value = true;
getmenu()
})
const filteredMenu = (index : number) => {
return leftMenuArray.value.filter(item => Number(item.areaFlag) - 1 == index);
}
const getmenu = () => {
queryPadPageList().then((res => {
leftMenuArray.value = res.result.records;
leftMenuArray.value.forEach((element:any,index:number)=>{
if(element.nuId===uni.getStorageSync('NUall').nuId){
menutarget.value = index
}
})
}))
}
const lanjie = ref(false);
</script>
<style scoped lang="less">
.index-content-right{
.index-content-right {
width: 19.5vw;
margin-left: 2vw;
height: 100%;
transition: opacity 1s ease;
.right-top{
.right-top {
margin-top: 8vh;
width: 100%;
height: 50vh;
background-color: #fff;
border-radius: 4vh;
.top-title {
width: 100%;
height: 7vh;
display: flex;
align-items: center;
margin-left: 2vw;
font-size: 1.4vw;
font-weight: 600;
}
.top-heng {
width: 90%;
margin-left: 5%;
height: 0.05vw;
background-color: #DCDCDC;
}
.top-list {
width: 100%;
height: 41vh;
.list-view {
width: 90%;
margin-left: 5%;
height: 8vh;
border: 2rpx solid transparent;
border-radius: 7vw;
margin-bottom: 0.6vh;
display: flex;
align-items: center;
.list-img {
width: 4vw;
height: 4vw;
margin-left: 0.5vw;
margin-right: 0.5vw;
}
.first-line {
display: flex;
.first-line-second {
background-color: #E5E5E5;
color: #555555;
width: 3.2vw;
height: 1.5vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.9vw;
border-radius: 0.5vw;
margin-left: 0.5vw;
}
}
.second-line {
color: #999999;
margin-top: 0.2vw;
font-size: 1vw;
}
}
}
}
.right-bottom{
.right-bottom {
margin-top: 2vh;
width: 100%;
height: 38vh;
@ -381,27 +518,31 @@
display: flex;
flex-direction: column;
align-items: center;
.bottom-title{
.bottom-title {
width: 100%;
padding: 0 8%;
display: flex;
justify-content: space-between;
.bottom-carmera{
.bottom-carmera {
margin-top: 0.5vw;
width: 3vw;
height: 3vw;
}
}
.big-older{
.big-older {
margin-top: 0.5vw;
width: 10vw;
height: 10vw;
width: 9vw;
height: 9vw;
border: 1rpx solid #DCDCDC;
border-radius: 50%;
}
}
}
.index-content-other {
width: 65vw;
height: 100%;
@ -718,20 +859,22 @@
padding: 1.6vw;
position: relative;
margin-right: 1.5vw;
.card-bottom{
.card-bottom {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3vw;
display: flex;
.bottom-img{
.bottom-img {
width: 1.6vw;
height: 1.6vw;
margin-left: 1.8vw;
}
.bottom-font{
.bottom-font {
color: #555555;
font-size: 1.4vw;
margin-left: 0.5vw;
@ -791,7 +934,8 @@
}
}
}
.title-time{
.title-time {
position: absolute;
right: 0;
top: 0;
@ -802,18 +946,21 @@
display: flex;
flex-direction: column;
align-items: center;
.time-title{
.time-title {
font-weight: 600;
font-size: 3vw;
margin-top: 0.4vw;
}
.time-date{
.time-date {
margin-top: 0.2vw;
font-size: 1.3vw;
color: #222222;
}
}
.blue-button{
.blue-button {
margin-top: 0.5vw;
width: 7vw;
height: 2.5vw;
@ -825,9 +972,48 @@
color: #fff;
font-size: 28rpx;
}
.name-weight{
.name-weight {
font-size: 2vw;
font-weight: 600;
margin: 0.2vw 0;
}
.message-view {
display: flex;
.message-shu {
width: 3rpx;
height: 1.5vw;
background-color: #bcc1c7;
margin: 0 0.4vw;
margin-top: 0.1vw;
}
.message-img {
width: 1.5vw;
height: 1.5vw;
margin-top: 0.1vw;
}
}
.message-bottom {
margin-top: 0.5vh;
width: 100%;
height: 4vh;
display: flex;
justify-content: center;
.bottom-tags {
background-color: #E7F1FF;
color: #0084FA;
height: 100%;
display: flex;
align-items: center;
padding: 0 0.6vw;
border-radius: 0.8vw;
font-size: 1.2vw;
margin: 0 0.2vw;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -574,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/camera.nvue"]]);
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/camera.nvue"]]);
export {
camera as default
};

View File

@ -577,7 +577,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/fullcamera.nvue"]]);
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/fullcamera.nvue"]]);
export {
fullcamera as default
};