This commit is contained in:
王丹 2024-09-20 18:13:41 +08:00
parent 8934eae67f
commit 40c33fada0
5 changed files with 462 additions and 220 deletions

View File

@ -38,7 +38,8 @@
}, { }, {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"navigationBarTitleText": "我的" "navigationBarTitleText": "",
"navigationStyle": "custom"
} }
}, { }, {
"path": "pages/mine/avatar/index", "path": "pages/mine/avatar/index",

View File

@ -241,9 +241,60 @@
<view class="iconfont icon-suoding icon"></view> <view class="iconfont icon-suoding icon"></view>
</view> </view>
</view> </view>
<u-line-progress height="8" :showText="false" :percentage="60" <u-line-progress height="8" :showText="false" :percentage="60" activeColor="#74ffd4"
inactiveColor="#c7c7c7" style="width: 75px;margin-top: 5px;"> inactiveColor="#c7c7c7" style="width: 75px;margin-top: 5px;"
@click="show = true">
</u-line-progress> </u-line-progress>
<view>
<u-popup :show="show" :mode="mode">
<view class="dialog-container">
<view class="dialog-title">
<view>1-2</view>
<view>①开</view>
<view class="close-btn">
<u-icon name="close" color="#333"
size="20"></u-icon>
</view>
</view>
<view class="dialog-body">
<view class="grid">
<view class="grid-time">
<view>-</view>
</view>
<view class="grid-time">
<view class="logs-data-box">
<view class="content" style="height: 100%;">
<view>
<view style="text-align: center;">
52%</view>
<view style="width: 100%;">
<u-slider :value="value"
height="100" blockSize="28"
min="0" max="100"
activeColor="#15d99b"
:step="step"
:showValue="false"
@changing="changing"
@change="change"></u-slider>
</view>
</view>
</view>
</view>
</view>
<view class="grid-time">
<view>+</view>
</view>
</view>
<view class="buttons">
<u-button type="success" size="large"
text="确定"></u-button>
<u-button type="info" size="large"
text="取消"></u-button>
</view>
</view>
</view>
</u-popup>
</view>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<view class="valve"> <view class="valve">
@ -463,7 +514,6 @@
color: white; color: white;
border-radius: 0 0 30px 30px; border-radius: 0 0 30px 30px;
::v-deep.u-search__content, ::v-deep.u-search__content,
::v-deep.u-search__content__input { ::v-deep.u-search__content__input {
background-color: white !important; background-color: white !important;
@ -781,4 +831,115 @@
.battery-level-0 { .battery-level-0 {
width: 0%; width: 0%;
} }
/* 弹出进度条 */
.dialog-container {
min-width: 300px;
.dialog-title {
position: relative;
text-align: center;
height: 34px;
line-height: 34px;
border-bottom: 1px solid #ddd;
&>uni-view {
display: inline-block;
font-weight: bold;
font-size: 16px;
}
&>uni-view:nth-child(2) {
font-size: 14px;
color: #5bc724;
margin-left: 10px;
}
.close-btn {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
}
}
movable-area {
height: 30rpx;
width: 210px;
margin: auto;
border-radius: 5px;
background-color: #D8D8D8;
overflow: hidden;
}
movable-view {
display: flex;
align-items: center;
justify-content: center;
width: 10px;
height: 100%;
background-color: #15d99b;
color: #fff;
text-align: center;
}
::v-deep .uni-slider-handle-wrapper {
height: 30px !important;
}
::v-deep .uni-slider-thumb {
width: 24px !important;
height: 24px !important;
box-shadow: 0 0 0px 4px #74ffd4 !important;
margin-top: -12px !important;
}
::v-deep uni-slider {
margin: 10px 18px 0 18px !important;
}
::v-deep uni-slider .uni-slider-tap-area {
padding: 0 !important;
}
.dialog-body {
.grid {
margin: 20px;
display: grid;
grid-template-columns: 0.5fr 2fr 0.5fr;
.grid-time:first-child,
.grid-time:last-child {
display: grid;
justify-items: end;
align-items: end;
&>uni-view {
width: 35px;
height: 30px;
background-color: #eaecf0;
text-align: center;
font-size: 30px;
line-height: 26px;
color: #564556;
}
}
.grid-time:last-child {
justify-items: left;
}
}
.buttons {
margin: 40px 10px 10px;
display: flex;
justify-content: center;
}
}
}
</style> </style>

View File

@ -1,52 +1,88 @@
<template> <template>
<uni-nav-bar :statusBar="true" :fixed="true" backgroundColor="#39ac4f" :border="false" color="#fff">
<block v-slot:left>
</block>
<view>我的</view>
<block v-slot:right>
<view class="fixed">
<view align="right" class="iconfont icon-xiaoxi icon"></view>
</view>
</block>
</uni-nav-bar>
<view class="mine-container" :style="{height: `${windowHeight}px`}"> <view class="mine-container" :style="{height: `${windowHeight}px`}">
<!--顶部个人信息栏--> <!--顶部个人信息栏-->
<view class="header-section"> <view class="header-section">
<view class="flex padding justify-between"> <view class="flex padding justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view v-if="!avatar" class="cu-avatar xl round bg-white"> <!-- <view v-if="!avatar" class="cu-avatar xl round bg-white">
<view class="iconfont icon-people text-gray icon"></view> <view class="iconfont icon-people text-gray icon"></view>
</view> </view> -->
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"> <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round"
mode="widthFix">
</image> </image>
<view v-if="!name" @click="handleToLogin" class="login-tip"> <!-- <view v-if="!name" @click="handleToLogin" class="login-tip">
点击登录 点击登录
</view> </view> -->
<view v-if="name" @click="handleToInfo" class="user-info"> <view v-if="name" @click="handleToInfo" class="user-info">
<view class="u_title"> <view class="u_title">
用户名{{ name }} <text><text style="font-size: 30rpx;">系统管理员</text>系统管理员</text>
<text>15232658595</text>
<text>浙江及时雨智能灌溉设备有限责任公司</text>
</view> </view>
</view> </view>
</view> </view>
<view @click="handleToInfo" class="flex align-center"> <!-- <view @click="handleToInfo" class="flex align-center">
<text>个人信息</text> <text>个人信息</text>
<view class="iconfont icon-right"></view> <view class="iconfont icon-right"></view>
</view> </view> -->
</view> </view>
</view> </view>
<view class="content-section"> <view class="content-section">
<view class="mine-actions grid col-4 text-center">
<view class="action-item" @click="handleJiaoLiuQun">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-service text-blue icon"></view>
<text class="text">在线客服</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-community text-mauve icon"></view>
<text class="text">反馈社区</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-dianzan text-green icon"></view>
<text class="text">点赞我们</text>
</view>
</view>
<view class="menu-list"> <view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToEditInfo"> <view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-tudidiya menu-icon"></view>
<view>地块管理</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-yonghu menu-icon"></view>
<view>用户管理</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-lvli menu-icon"></view>
<view>灌溉履历</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-caozuo menu-icon"></view>
<view>操作日志</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-weihu menu-icon"></view>
<view>设备维护</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-yunwei menu-icon"></view>
<view>运维</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view class="iconfont icon-v menu-icon"></view>
<view>我的权益</view>
</view>
</view>
<!-- <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
<view class="menu-item-box"> <view class="menu-item-box">
<view class="iconfont icon-user menu-icon"></view> <view class="iconfont icon-user menu-icon"></view>
<view>编辑资料</view> <view>编辑资料</view>
@ -69,17 +105,22 @@
<view class="iconfont icon-setting menu-icon"></view> <view class="iconfont icon-setting menu-icon"></view>
<view>应用设置</view> <view>应用设置</view>
</view> </view>
</view> -->
</view>
<view class="menu-list">
<view class="list-cell list-cell-arrow" style="border-radius: 10px;">
<view class="menu-item-box">
<view class="iconfont icon-shezhi menu-icon"></view>
<view>设置</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- <view> <!-- <view>
<uni-popup ref="popup" type="dialog"> <uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="info" cancelText="关闭" confirmText="退出" <uni-popup-dialog type="info" cancelText="关闭" confirmText="退出" title="通知" content="确定注销并退出系统吗"
title="通知" content="确定注销并退出系统吗" @confirm="dialogConfirm" @close="dialogClose">
@confirm="dialogConfirm"
@close="dialogClose">
</uni-popup-dialog> </uni-popup-dialog>
</uni-popup> </uni-popup>
</view> --> </view> -->
@ -88,7 +129,9 @@
<script setup> <script setup>
import storage from '@/utils/storage' import storage from '@/utils/storage'
import store from '@/store' import store from '@/store'
import { ref } from "vue"; import {
ref
} from "vue";
import config from '@/config.js' import config from '@/config.js'
const name = store.state.user.name; const name = store.state.user.name;
const version = config.appInfo.version; const version = config.appInfo.version;
@ -105,29 +148,35 @@
url: '/pages/mine/info/index' url: '/pages/mine/info/index'
}); });
}; };
function handleToEditInfo() { function handleToEditInfo() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/info/edit' url: '/pages/mine/info/edit'
}); });
}; };
function handleToSetting() { function handleToSetting() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/setting/index' url: '/pages/mine/setting/index'
}); });
}; };
function handleToLogin() { function handleToLogin() {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login' url: '/pages/login'
}); });
}; };
function handleToAvatar() { function handleToAvatar() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/avatar/index' url: '/pages/mine/avatar/index'
}); });
}; };
function handleLogout() { function handleLogout() {
popup.value.open(); popup.value.open();
}; };
function dialogConfirm() { function dialogConfirm() {
//console.log('----------------------------') //console.log('----------------------------')
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
@ -136,19 +185,23 @@
}); });
}) })
}; };
function dialogClose() { function dialogClose() {
//console.log('') //console.log('')
}; };
function handleHelp() { function handleHelp() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/help/index' url: '/pages/mine/help/index'
}); });
}; };
function handleAbout() { function handleAbout() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/about/index' url: '/pages/mine/about/index'
}); });
}; };
function handleJiaoLiuQun() { function handleJiaoLiuQun() {
uni.showToast({ uni.showToast({
title: 'QQ群133713780', title: 'QQ群133713780',
@ -157,6 +210,7 @@
duration: 1000 duration: 1000
}); });
}; };
function handleBuilding() { function handleBuilding() {
uni.showToast({ uni.showToast({
title: '模块建设中~', title: '模块建设中~',
@ -165,44 +219,58 @@
duration: 1000 duration: 1000
}); });
} }
</script> </script>
<style lang="scss"> <style lang="scss">
// nav
::v-deep.uni-navbar__header-container {
align-items: center;
justify-content: center;
page { &>view {
background-color: #f5f6f7; font-size: 34rpx;
}
}
::v-deep.uni-navbar__header-btns-right .icon {
font-size: 44rpx;
margin-left: 10px;
} }
.mine-container { .mine-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
//
.header-section { .header-section {
padding: 15px 15px 45px 15px; padding: 0px 15px 30px 30px;
background-color: #3c96f3; background-color: #39ac4f;
color: white; color: white;
border-radius: 0 0 30px 30px;
.login-tip { // .login-tip {
font-size: 18px; // font-size: 18px;
margin-left: 10px; // margin-left: 10px;
} // }
.cu-avatar { .cu-avatar {
border: 2px solid #eaeaea; border: 2px solid #eaeaea;
.icon { // .icon {
font-size: 40px; // font-size: 40px;
} // }
} }
.user-info { .user-info {
margin-left: 15px; margin-left: 15px;
.u_title { .u_title {
font-size: 18px; font-size: 24rpx;
line-height: 30px; display: flex;
flex-direction: column;
&>text {
margin-bottom: 5px;
}
} }
} }
} }
@ -211,24 +279,28 @@
position: relative; position: relative;
top: -50px; top: -50px;
.mine-actions { .menu-list {
margin: 15px 15px; margin: 10px;
padding: 20px 0px; border-radius: 10px;
border-radius: 8px; box-shadow: 0 1px 9px rgb(209, 209, 209, 0.5);
background-color: white;
.action-item { .list-cell:first-child {
.icon { border-radius: 10px 10px 0 0;
font-size: 28px;
} }
.text { .list-cell:last-child {
display: block; border-radius: 0 0 10px 10px;
font-size: 13px; }
margin: 8px 0px;
.list-cell {
.menu-item-box {
.menu-icon {
color: #39ac4f;
} }
} }
} }
}
} }
} }
</style> </style>

View File

@ -3,8 +3,8 @@
<uni-list> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" /> <!-- <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" /> -->
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="公司" :rightText="postGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" />
</uni-list> </uni-list>
@ -41,4 +41,5 @@
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
.uni-icons{color: #39ac4f !important;}
</style> </style>

View File

@ -17,22 +17,22 @@
} }
/* 按钮 */ /* 按钮 */
.u-button { .u-button {
width: fit-content !important; width: fit-content !important;
} }
.u-button--square { .u-button--square {
border-radius: 5px !important; border-radius: 5px !important;
} }
.u-button--large {width: 100% !important;
height: 38px !important;
}
.u-button--normal { .u-button--normal {
height: 28px !important; height: 28px !important;
} }
.u-button--small { .u-button--small {
height: 25px !important; height: 25px !important;
} }
.u-button--success { .u-button--success {
background-color: #39ac4f !important; background-color: #39ac4f !important;
border-color: #39ac4f !important; border-color: #39ac4f !important;
@ -118,13 +118,17 @@
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
/* 首页阀门 */ /* 首页阀门列表 */
.control { .control {
padding: 10px; padding: 10px;
} }
.valve{display: flex;
.valve {
display: flex;
align-items: center; align-items: center;
flex-direction: column;} flex-direction: column;
}
.valve>view { .valve>view {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -200,4 +204,7 @@
left: 33%; left: 33%;
} }
.valve .btn-img .text5 .bottom{bottom: 0px;} .valve .btn-img .text5 .bottom {
bottom: 0px;
}