247 lines
5.9 KiB
Vue
247 lines
5.9 KiB
Vue
<template>
|
|
<view :class="darkFans?`darkbackgroundContainer`:`backgroundContainer`">
|
|
<view class="index-title">
|
|
<view class="index-title-left">
|
|
<image class="index-title-left-img" src="/static/index/customer.png" />
|
|
<view class="index-title-left-font">
|
|
王金福
|
|
</view>
|
|
<view class="index-title-left-wel">
|
|
欢迎
|
|
</view>
|
|
<view class="index-title-left-weight">
|
|
张春凤
|
|
</view>
|
|
<view class="">
|
|
登录护理单元操作台
|
|
</view>
|
|
</view>
|
|
<view class="index-title-right">
|
|
<view class="index-title-right-circle">
|
|
<image class="index-title-right-circle-img" src="/static/index/Warehousing/house.png" />
|
|
</view>
|
|
<view class="index-title-right-font">
|
|
生活用品库
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="index-content">
|
|
<view class="index-content-leftMenus">
|
|
<view v-for="(item,index) in iconList" :key="index" class="blue-circle-pos">
|
|
<view class="blue-circle" v-show="index === menuIndex">
|
|
<image class="blue-circle-size" :src="`/static/index/ray.png`" />
|
|
</view>
|
|
<view class="red-pao" v-if="item.pao" @click="changeMenu(index)">
|
|
{{ item.pao > 99 ? `99+` : item.pao}}
|
|
</view>
|
|
<image class="left-img" :src="index === menuIndex ? item.targetUrl : item.url"
|
|
@click="changeMenu(index)" />
|
|
<view :class="index === menuIndex ? `left-img-font-target` :`left-img-font`" @click="changeMenu(index)">
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref, onMounted, onBeforeUnmount, computed, nextTick } from 'vue';
|
|
import type { Link } from "./index";
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
// 暗黑模式
|
|
const darkFans = ref(false);
|
|
const menuIndex = ref(0);
|
|
// 初始化左侧菜单列表
|
|
const iconList = ref<Link[]>([
|
|
{ url: '/static/index/lefticon/index.png', targetUrl: '/static/index/lefticontarget/blueindex.png', name: '首页',pao:0 },
|
|
{ url: '/static/index/Warehousing/dingdan.png', targetUrl: '/static/index/Warehousing/dingdanblue.png', name: '订单',pao:0 },
|
|
{ url: '/static/index/Warehousing/yujing.png', targetUrl: '/static/index/Warehousing/yujingblue.png', name: '预警',pao:200 },
|
|
{ url: '/static/index/Warehousing/chuku.png', targetUrl: '/static/index/Warehousing/chukublue.png', name: '出库',pao:5 },
|
|
{ url: '/static/index/Warehousing/pandian.png', targetUrl: '/static/index/Warehousing/pandianblue.png', name: '盘点',pao:0 },
|
|
{ url: '/static/index/Warehousing/jiankong.png', targetUrl: '/static/index/Warehousing/jiankongblue.png', name: '监控',pao:0 },
|
|
{ url: '/static/index/lefticon/back.png', targetUrl: '/static/index/lefticontarget/blueback.png', name: '返回',pao:0 }
|
|
]);
|
|
// 变更菜单
|
|
const changeMenu = (index : number) => {
|
|
// if (index === 3) {
|
|
// uni.navigateTo({
|
|
// url: `/pages/somethingmove/index?darkFans=${darkFans.value}`,
|
|
// animationType: 'slide-in-right',
|
|
// animationDuration: 400// 设置动画时长为300毫秒, // 动画持续时间,单位为毫秒
|
|
// });
|
|
// return
|
|
// }
|
|
if (index === 6) {
|
|
uni.navigateBack()
|
|
return
|
|
}
|
|
menuIndex.value = index;
|
|
setTimeout(() => {
|
|
switch (index) {
|
|
case 0:
|
|
|
|
break;
|
|
case 1:
|
|
|
|
break;
|
|
default:
|
|
}
|
|
}, 50)
|
|
};
|
|
// 生命周期钩子
|
|
onLoad(() => {
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.backgroundContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100vh;
|
|
background-image: url('/static/index/lightbgcnew.png');
|
|
background-size: cover;
|
|
background-position: center center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
//暗黑模式
|
|
.darkbackgroundContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100vh;
|
|
background-image: url('/static/index/background.png');
|
|
background-size: cover;
|
|
background-position: center center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.index-title {
|
|
display: flex;
|
|
width: calc(100% - 110rpx);
|
|
height: 130rpx;
|
|
justify-content: space-between;
|
|
// background-color: #fff;
|
|
margin: 20rpx 50rpx 0 60rpx;
|
|
|
|
.index-title-left {
|
|
display: flex;
|
|
height: 100%;
|
|
align-items: center;
|
|
margin-top: 20rpx;
|
|
.index-title-left-img {
|
|
width: 75rpx;
|
|
height: 75rpx;
|
|
|
|
}
|
|
|
|
.index-title-left-font {
|
|
margin-left: 20rpx;
|
|
}
|
|
|
|
.index-title-left-wel {
|
|
margin-left: 40rpx;
|
|
}
|
|
|
|
.index-title-left-weight {
|
|
font-weight: 700;
|
|
margin: 0 10rpx;
|
|
}
|
|
}
|
|
|
|
.index-title-right {
|
|
display: flex;
|
|
height: 100%;
|
|
align-items: center;
|
|
margin-top: 20rpx;
|
|
.index-title-right-circle {
|
|
// margin-top: 20rpx;
|
|
width: 60rpx;
|
|
height: 60rpx;
|
|
border-radius: 50%;
|
|
background-color: rgb(205, 224, 248);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
.index-title-right-circle-img {
|
|
width: 35rpx;
|
|
height: 35rpx;
|
|
}
|
|
}
|
|
|
|
.index-title-right-font {
|
|
// margin-top: 20rpx;
|
|
margin-left: 20rpx;
|
|
font-weight: 700;
|
|
}
|
|
}
|
|
}
|
|
|
|
.index-content {
|
|
width: 100%;
|
|
height: calc(100vh - 150rpx);
|
|
|
|
.index-content-leftMenus {
|
|
height: 100%;
|
|
width: 180rpx;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
|
|
.left-img {
|
|
width: 93rpx;
|
|
height: 93rpx;
|
|
// margin: 50rpx 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.left-img-font {
|
|
margin-top: 10rpx;
|
|
color: #fff;
|
|
}
|
|
|
|
.left-img-font-target {
|
|
margin-top: 10rpx;
|
|
color: #0174D3;
|
|
}
|
|
|
|
.blue-circle-pos {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 200rpx;
|
|
|
|
.blue-circle {
|
|
position: absolute;
|
|
top: -50rpx;
|
|
left: -68rpx;
|
|
|
|
.blue-circle-size {
|
|
width: 170rpx;
|
|
height: 250rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.red-pao{
|
|
position: absolute;
|
|
top: 30rpx;
|
|
// right: 0;
|
|
left: 60rpx;
|
|
padding: 3rpx 10rpx;
|
|
background-color: #FF4C4E;
|
|
color: #fff;
|
|
font-size: 20rpx;
|
|
border-radius: 20rpx;
|
|
z-index: 101;
|
|
}
|
|
</style> |