Merge branch 'master' of http://gitea.bugtc.com/zhouyanli/property-manager-side
# Conflicts: # wuye-manager-uniapp/pages/index/index.vue
This commit is contained in:
@@ -17,6 +17,8 @@ export const getLoginBySms = (data) =>{
|
|||||||
export const getResetPassword = (data) =>{
|
export const getResetPassword = (data) =>{
|
||||||
return post('/api/butler/auth/forgetPassword',data)
|
return post('/api/butler/auth/forgetPassword',data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ======首页=====
|
// ======首页=====
|
||||||
// 获取小区列表
|
// 获取小区列表
|
||||||
export const getVillageList = (data) =>{
|
export const getVillageList = (data) =>{
|
||||||
@@ -38,6 +40,12 @@ export const getTodayInspection = () =>{
|
|||||||
export const getNewNoticeData = () =>{
|
export const getNewNoticeData = () =>{
|
||||||
return get('/manage/notice/new')
|
return get('/manage/notice/new')
|
||||||
}
|
}
|
||||||
|
// 获取bannar图
|
||||||
|
export const getBannarList = () =>{
|
||||||
|
return get('/api/manage/banner/list')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ============通知列表===========
|
// ============通知列表===========
|
||||||
export const getNoticeList = (data) =>{
|
export const getNoticeList = (data) =>{
|
||||||
@@ -58,7 +66,7 @@ export const addRepairList = (data) =>{
|
|||||||
}
|
}
|
||||||
// 上传图片
|
// 上传图片
|
||||||
export const uploadFile = (filePath) => {
|
export const uploadFile = (filePath) => {
|
||||||
return upload(filePath,' /resource/oss/upload');
|
return upload(filePath,'/resource/oss/upload');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询一键开门
|
// 查询一键开门
|
||||||
@@ -75,6 +83,10 @@ export const switchOpenDoor = (data) =>{
|
|||||||
export const getSettingInfo = () =>{
|
export const getSettingInfo = () =>{
|
||||||
return get('/api/setting/info')
|
return get('/api/setting/info')
|
||||||
}
|
}
|
||||||
|
// 上报记录
|
||||||
|
export const getMyOrderList = (data) =>{
|
||||||
|
return get('/manage/repair/order/myorderlist',data)
|
||||||
|
}
|
||||||
// =====设置=======
|
// =====设置=======
|
||||||
// 修改密码
|
// 修改密码
|
||||||
export const changePassword = (data) =>{
|
export const changePassword = (data) =>{
|
||||||
|
|||||||
@@ -100,14 +100,14 @@ onLoad((options) => {
|
|||||||
repairId.value = options.projectId
|
repairId.value = options.projectId
|
||||||
}
|
}
|
||||||
|
|
||||||
// ✅ 监听返回选择的项目
|
// 监听返回选择的项目
|
||||||
uni.$on('selectRepairProject', (data) => {
|
uni.$on('selectRepairProject', (data) => {
|
||||||
repairProject.value = `${data.category}-${data.project}`
|
repairProject.value = `${data.category}-${data.project}`
|
||||||
repairId.value = data.projectId
|
repairId.value = data.projectId
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// ✅ 页面卸载时移除监听(必须加)
|
// 页面卸载时移除监听
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
uni.$off('selectRepairProject')
|
uni.$off('selectRepairProject')
|
||||||
})
|
})
|
||||||
@@ -155,8 +155,8 @@ const uploadImages = async () => {
|
|||||||
uploadedUrls.push(res.url || '')
|
uploadedUrls.push(res.url || '')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:e.msg || '图片上传失败',
|
title:err.msg || '图片上传失败',
|
||||||
icon:'error'
|
icon:'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,18 +42,10 @@ import { onLoad } from '@dcloudio/uni-app'
|
|||||||
import {getRepairOrder} from '../../api/api.js'
|
import {getRepairOrder} from '../../api/api.js'
|
||||||
|
|
||||||
// 分类列表
|
// 分类列表
|
||||||
const categoryList = ref([
|
const categoryList = ref([])
|
||||||
// { id: 1, name: '基础设施' },
|
|
||||||
// { id: 2, name: '电子设施' }
|
|
||||||
])
|
|
||||||
|
|
||||||
// 所有项目数据
|
// 所有项目数据
|
||||||
const projectList = ref([
|
const projectList = ref([])
|
||||||
// { id: 101, categoryId: 1, name: '路灯' },
|
|
||||||
// { id: 102, categoryId: 1, name: '楼层指示灯' },
|
|
||||||
// { id: 103, categoryId: 2, name: '应急出口灯' },
|
|
||||||
// { id: 104, categoryId: 1, name: '草坪灯' }
|
|
||||||
])
|
|
||||||
|
|
||||||
// 选中的分类
|
// 选中的分类
|
||||||
const activeCategory = ref(1)
|
const activeCategory = ref(1)
|
||||||
@@ -91,7 +83,7 @@ const fetchProjectList = async () => {
|
|||||||
activeCategory.value = categoryList.value[0]?.id || 1
|
activeCategory.value = categoryList.value[0]?.id || 1
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
uni.showToast({ title: '获取项目列表失败', icon: 'none' })
|
uni.showToast({ title: e.msg ||'获取项目列表失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
||||||
<image
|
<image
|
||||||
src="https://wuyeadmin.bugtc.com/images/login/phone.png"
|
src="https://wuyeadmin.bugtc.com/images/login/phone.png"
|
||||||
mode=""
|
mode="aspectFit"
|
||||||
style="height: 100%; width: 100%"
|
style="height: 100%; width: 100%"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<image
|
<image
|
||||||
src="https://wuyeadmin.bugtc.com/images/login/code.png"
|
src="https://wuyeadmin.bugtc.com/images/login/code.png"
|
||||||
mode=""
|
mode="aspectFit"
|
||||||
style="height: 100%; width: 100%"
|
style="height: 100%; width: 100%"
|
||||||
>
|
>
|
||||||
</image>
|
</image>
|
||||||
@@ -269,7 +269,6 @@ onUnmounted(() => {
|
|||||||
/* 页面容器 */
|
/* 页面容器 */
|
||||||
.login-page {
|
.login-page {
|
||||||
padding: 80rpx 40rpx 40rpx;
|
padding: 80rpx 40rpx 40rpx;
|
||||||
/* background-color: #f8f9fa; */
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: repeating-linear-gradient(to bottom, #e2f0ff, #f6faff);
|
background: repeating-linear-gradient(to bottom, #e2f0ff, #f6faff);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="news-card" v-for="item in noticeList" :key="item.id">
|
<view class="news-card" v-for="item in noticeList" :key="item.id">
|
||||||
<view class="news-header">
|
<view class="news-header">
|
||||||
<text class="news-title">{{ item.item || '暂无标题' }}</text>
|
<text class="news-title">{{ item.item || '暂无标题' }}</text>
|
||||||
<view class="unread-dot" v-if="item.isCheck === '0' "></view>
|
<view class="unread-dot" v-if="item.isCheckStr === '未读' "></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="news-meta">
|
<view class="news-meta">
|
||||||
@@ -45,7 +45,7 @@ const noticeList = ref([])
|
|||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const pageNum = ref(1) // 当前页
|
const pageNum = ref(1) // 当前页
|
||||||
const pageSize = ref(5) // 每页条数
|
const pageSize = ref(10) // 每页条数
|
||||||
const total = ref(0) // 总条数
|
const total = ref(0) // 总条数
|
||||||
const loading = ref(false) // 加载状态
|
const loading = ref(false) // 加载状态
|
||||||
const noMore = ref(false) // 是否没有更多
|
const noMore = ref(false) // 是否没有更多
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 页面主容器 -->
|
<!-- 页面主容器 -->
|
||||||
<view class="door-open-page">
|
<view class="door-open-page">
|
||||||
<view class="status_bar"></view>
|
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||||
<!-- 顶部标题栏 -->
|
<!-- 顶部标题栏 -->
|
||||||
<view class="top-bar">
|
<view class="top-bar">
|
||||||
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
|
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 确认开门按钮 -->
|
<!-- 确认开门按钮 -->
|
||||||
<button class="confirm-btn" @click="openDoor" :disabled="selectedDoor === -1">确认开门</button>
|
<button class="confirm-btn" @click="openDoor" :disabled="selectedDoor === -1">确认开门 </button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,6 +59,7 @@ import { getOpenDoorList, switchOpenDoor } from '../../api/api.js'
|
|||||||
// 响应式数据:选中的门索引、开门成功提示
|
// 响应式数据:选中的门索引、开门成功提示
|
||||||
const selectedDoor = ref(-1) // -1表示未选中
|
const selectedDoor = ref(-1) // -1表示未选中
|
||||||
const showSuccess = ref(false)
|
const showSuccess = ref(false)
|
||||||
|
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||||
|
|
||||||
// 门列表数据
|
// 门列表数据
|
||||||
const doorList = ref([])
|
const doorList = ref([])
|
||||||
@@ -130,8 +131,10 @@ const openDoor = () => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.status_bar {
|
.status_bar {
|
||||||
height: 32px;
|
/* height: 32px; */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
/* height: var(--status-bar-height); */
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
/* 顶部标题 */
|
/* 顶部标题 */
|
||||||
.top-bar {
|
.top-bar {
|
||||||
|
|||||||
@@ -41,56 +41,68 @@
|
|||||||
scroll-y
|
scroll-y
|
||||||
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
|
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
|
||||||
>
|
>
|
||||||
<!-- 空状态 -->
|
|
||||||
<view v-if="filteredRecords.length === 0" class="empty-state">
|
|
||||||
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
|
|
||||||
<text class="empty-text">暂无上报记录</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 记录卡片 -->
|
<!-- 记录卡片 -->
|
||||||
<view
|
<view
|
||||||
v-for="record in filteredRecords"
|
v-for="record in reportRecords"
|
||||||
:key="record.id"
|
:key="record.id"
|
||||||
class="record-card"
|
class="record-card"
|
||||||
>
|
>
|
||||||
<!-- 标题 + 状态标签 -->
|
<!-- 标题 + 状态标签 -->
|
||||||
<view class="card-header">
|
<view class="card-header">
|
||||||
<text class="card-title">{{ record.title }}</text>
|
<text class="card-title">{{ record.item }}</text>
|
||||||
<view class="status-tag" :class="record.status">
|
<view class="status-tag" :class="getStatusClass(record.problemStatus)">
|
||||||
{{ getStatusText(record.status) }}
|
{{ getStatusText(record.problemStatus) }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 类型标签 -->
|
<!-- 类型标签 -->
|
||||||
<view class="tag-group">
|
<view class="tag-group">
|
||||||
<view class="tag-item">{{ record.reportType }}</view>
|
<view class="tag-item">{{ record.projectTypeStr || '无 ' }}</view>
|
||||||
<view class="tag-item">{{ record.category }}</view>
|
<view class="tag-item">{{ record.maintenanceItemName || '无'}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<view class="card-content">
|
<view class="card-content">
|
||||||
{{ record.content }}
|
{{ record.problem }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部信息 -->
|
<!-- 底部信息 -->
|
||||||
<view class="card-footer">
|
<view class="card-footer">
|
||||||
<text class="create-time">{{ record.createTime }}</text>
|
<text class="create-time">{{ record.createTime }}</text>
|
||||||
<text v-if="record.repairman" class="repairman">维修师傅:{{ record.repairman }}</text>
|
<text v-if="record.repairName" class="repairman">维修师傅:{{ record.repairName }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 加载提示 + 没有更多数据 -->
|
||||||
|
<view class="load-more" v-if="reportRecords.length > 0">
|
||||||
|
<text v-if="loading">加载中...</text>
|
||||||
|
<text v-else-if="noMore">没有更多数据了</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 空数据 -->
|
||||||
|
<view class="empty" v-if="reportRecords.length === 0 && !loading">
|
||||||
|
暂无上报记录
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue'
|
import { ref } from 'vue'
|
||||||
import {onReady} from "@dcloudio/uni-app"
|
import {onReady, onReachBottom, onPullDownRefresh,onShow} from "@dcloudio/uni-app"
|
||||||
|
import {getMyOrderList} from '../../api/api.js'
|
||||||
|
|
||||||
// 导航栏/标签高度(适配不同设备)
|
// 导航栏/标签高度(适配不同设备)
|
||||||
const navHeight = ref(44)
|
const navHeight = ref(44)
|
||||||
const statusTabHeight = ref(88)
|
const statusTabHeight = ref(88)
|
||||||
const typeTabHeight = ref(88)
|
const typeTabHeight = ref(88)
|
||||||
|
// 分页
|
||||||
|
const pageNum = ref(1) // 当前页
|
||||||
|
const pageSize = ref(5) // 每页条数
|
||||||
|
const total = ref(0) // 总条数
|
||||||
|
const loading = ref(false) // 加载状态
|
||||||
|
const noMore = ref(false) // 是否没有更多
|
||||||
// 筛选状态
|
// 筛选状态
|
||||||
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
|
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
|
||||||
const activeType = ref('all') // 全部/公共报修/个人报修
|
const activeType = ref('all') // 全部/公共报修/个人报修
|
||||||
@@ -98,71 +110,95 @@ const activeType = ref('all') // 全部/公共报修/个人报修
|
|||||||
// 状态筛选选项
|
// 状态筛选选项
|
||||||
const statusTabs = ref([
|
const statusTabs = ref([
|
||||||
{ label: '全部', value: 'all' },
|
{ label: '全部', value: 'all' },
|
||||||
{ label: '待分配', value: 'pending' },
|
// { label: '待分配', value: 'pending' },
|
||||||
{ label: '待解决', value: 'processing' },
|
{ label: '待解决', value: '1' },
|
||||||
{ label: '已完成', value: 'completed' }
|
{ label: '已完成', value: '2' }
|
||||||
])
|
])
|
||||||
|
|
||||||
// 类型筛选选项
|
// 类型筛选选项
|
||||||
const typeTabs = ref([
|
const typeTabs = ref([
|
||||||
{ label: '全部', value: 'all' },
|
{ label: '全部', value: 'all' },
|
||||||
{ label: '公共报修', value: 'public' },
|
{ label: '公共报修', value: '0' },
|
||||||
{ label: '个人报修', value: 'private' }
|
{ label: '个人报修', value: '1' }
|
||||||
])
|
])
|
||||||
|
|
||||||
// 模拟上报记录数据(实际项目替换为接口请求)
|
// 上报记录数据
|
||||||
const reportRecords = ref([
|
const reportRecords = ref([])
|
||||||
{
|
|
||||||
id: 1,
|
// 获取列表数据
|
||||||
title: '标题巴拉巴拉巴拉',
|
const getReportList = (isRefresh = false) => {
|
||||||
status: 'pending', // pending/processing/completed
|
// 防止重复请求
|
||||||
reportType: '公共报修',
|
if (loading.value || noMore.value) return
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
loading.value = true
|
||||||
createTime: '2026-08-01 10:05:46',
|
const params = {
|
||||||
repairman: ''
|
pageSize: pageSize.value,
|
||||||
},
|
pageNum: pageNum.value
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: '标题巴拉巴拉巴拉',
|
|
||||||
status: 'processing',
|
|
||||||
reportType: '公共报修',
|
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
|
||||||
createTime: '2026-08-01 10:05:46',
|
|
||||||
repairman: '张三'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: '标题巴拉巴拉巴拉',
|
|
||||||
status: 'completed',
|
|
||||||
reportType: '公共报修',
|
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
|
||||||
createTime: '2026-08-01 10:05:46',
|
|
||||||
repairman: '张三'
|
|
||||||
}
|
}
|
||||||
])
|
if (activeType.value !== 'all') {
|
||||||
|
params.itemType = activeType.value
|
||||||
|
}
|
||||||
|
if (activeStatus.value !== 'all') {
|
||||||
|
params.problemStatus = activeStatus.value
|
||||||
|
}
|
||||||
|
getMyOrderList(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
total.value = res.total || 0
|
||||||
|
const data = res.rows || []
|
||||||
|
|
||||||
// 筛选后的记录
|
// 第一页:覆盖,分页:追加
|
||||||
const filteredRecords = computed(() => {
|
if (pageNum.value === 1) {
|
||||||
return reportRecords.value.filter(record => {
|
reportRecords.value = data
|
||||||
// 状态筛选
|
} else {
|
||||||
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
|
reportRecords.value = [...reportRecords.value, ...data]
|
||||||
// 类型筛选
|
}
|
||||||
const typeMatch = activeType.value === 'all' || record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
|
|
||||||
return statusMatch && typeMatch
|
// 判断是否还有更多
|
||||||
|
noMore.value = reportRecords.value.length >= total.value
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
uni.showToast({ title: '加载失败', icon: 'none' })
|
||||||
|
}).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
if (isRefresh) {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 上拉加载更多
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (noMore.value || loading.value) return
|
||||||
|
pageNum.value++
|
||||||
|
getReportList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 切换状态(全部/待分配/待解决/已完成)筛选
|
// 下拉刷新
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
pageNum.value = 1
|
||||||
|
noMore.value = false
|
||||||
|
getReportList(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 筛选/分页重置后重新拉数据
|
||||||
|
const reloadList = () => {
|
||||||
|
pageNum.value = 1
|
||||||
|
noMore.value = false
|
||||||
|
reportRecords.value = []
|
||||||
|
getReportList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换状态(全部/待解决/已完成)筛选
|
||||||
const switchStatus = (value) => {
|
const switchStatus = (value) => {
|
||||||
|
if (activeStatus.value === value) return
|
||||||
activeStatus.value = value
|
activeStatus.value = value
|
||||||
|
reloadList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 切换类型(公共/个人)筛选
|
// 切换类型(公共/个人)筛选
|
||||||
const switchType = (value) => {
|
const switchType = (value) => {
|
||||||
|
if (activeType.value === value) return
|
||||||
activeType.value = value
|
activeType.value = value
|
||||||
|
reloadList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 返回上一页
|
// 返回上一页
|
||||||
@@ -175,12 +211,25 @@ const navBack = () => {
|
|||||||
// 获取状态文本
|
// 获取状态文本
|
||||||
const getStatusText = (status) => {
|
const getStatusText = (status) => {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
pending: '待分配',
|
// "pending": '已分配',
|
||||||
processing: '待解决',
|
"1": '待解决',
|
||||||
completed: '已完成'
|
'2': '已完成'
|
||||||
}
|
}
|
||||||
return statusMap[status] || ''
|
return statusMap[status] || ''
|
||||||
}
|
}
|
||||||
|
// 获取状态标签样式类名
|
||||||
|
const getStatusClass = (status) => {
|
||||||
|
const classMap = {
|
||||||
|
'1': 'processing',
|
||||||
|
'2': 'completed'
|
||||||
|
}
|
||||||
|
return classMap[status] || ''
|
||||||
|
}
|
||||||
|
onShow(() => {
|
||||||
|
pageNum.value = 1
|
||||||
|
noMore.value = false
|
||||||
|
getReportList()
|
||||||
|
})
|
||||||
|
|
||||||
// 页面渲染完成后适配高度
|
// 页面渲染完成后适配高度
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
@@ -278,22 +327,6 @@ onReady(() => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 空状态 */
|
|
||||||
.empty-state {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 100rpx 0;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-text {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #999;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 记录卡片 */
|
/* 记录卡片 */
|
||||||
.record-card {
|
.record-card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -373,4 +406,17 @@ onReady(() => {
|
|||||||
.repairman {
|
.repairman {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
.load-more {
|
||||||
|
text-align: center;
|
||||||
|
padding: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty {
|
||||||
|
text-align: center;
|
||||||
|
padding: 100rpx 0;
|
||||||
|
color: #999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -39,17 +39,28 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { logout } from '../../api/api.js'
|
import { logout, getSettingInfo } from '../../api/api.js'
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const phoneNumber = ref('') // 绑定手机号
|
const phoneNumber = ref('') // 绑定手机号
|
||||||
const passwordNumber = ref('')
|
const passwordNumber = ref('')
|
||||||
|
|
||||||
|
// 获取用户信息中的手机号
|
||||||
|
const fetchUserInfo = () => {
|
||||||
|
getSettingInfo().then(res => {
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
phoneNumber.value = res.data.phonenumber || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 页面显示时读取最新数据(从修改页返回也会触发)
|
// 页面显示时读取最新数据(从修改页返回也会触发)
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
const userInfo = uni.getStorageSync('tempChangePwdParams')
|
const userInfo = uni.getStorageSync('tempChangePwdParams')
|
||||||
if (userInfo.phoneNumber) {
|
if (userInfo && userInfo.phoneNumber) {
|
||||||
phoneNumber.value = userInfo.phoneNumber
|
phoneNumber.value = userInfo.phoneNumber
|
||||||
|
} else {
|
||||||
|
fetchUserInfo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,9 @@
|
|||||||
"path": "reportingRecord",
|
"path": "reportingRecord",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "上报记录",
|
"navigationBarTitleText": "上报记录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"onReachBottomDistance": 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="guide-page">
|
<view class="guide-page">
|
||||||
<view class="status_bar"></view>
|
<view class="status-bar"></view>
|
||||||
<!-- 引导内容滑动容器 -->
|
<!-- 引导内容滑动容器 -->
|
||||||
<swiper
|
<swiper
|
||||||
class="guide-swiper"
|
class="guide-swiper"
|
||||||
@@ -8,47 +8,50 @@
|
|||||||
@change="handleSwiperChange"
|
@change="handleSwiperChange"
|
||||||
:disable-scroll="false"
|
:disable-scroll="false"
|
||||||
:indicator-dots="false"
|
:indicator-dots="false"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
>
|
>
|
||||||
<!-- 便捷服务 -->
|
<!-- 便捷服务 -->
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="guide-item">
|
<view class="guide-item">
|
||||||
<view class="guide-img">
|
<view class="guide-img">
|
||||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide1.png" style="width: 100%;height: 100%;"></image>
|
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide1.png" mode="aspectFit" class="img-content"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 200rpx;width: 100%;"></view>
|
<view class="guide-text">
|
||||||
<view class="guide-title">精准服务</view>
|
<view class="guide-title">精准服务</view>
|
||||||
<view class="guide-subtitle">需求深度洞察,资源优化配置</view>
|
<view class="guide-subtitle">需求深度洞察,资源优化配置</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
|
|
||||||
<!-- 高效管理 -->
|
<!-- 高效管理 -->
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="guide-item">
|
<view class="guide-item">
|
||||||
<view class="guide-img">
|
<view class="guide-img">
|
||||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide2.png" style="width: 100%;height: 100%;"></image>
|
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide2.png" mode="aspectFit" class="img-content"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 200rpx;width: 100%;"></view>
|
<view class="guide-text">
|
||||||
<view class="guide-title">高效沟通</view>
|
<view class="guide-title">高效沟通</view>
|
||||||
<view class="guide-subtitle">反馈即时响应,流程无缝衔接</view>
|
<view class="guide-subtitle">反馈即时响应,流程无缝衔接</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
|
|
||||||
<!--安全保障 -->
|
<!--安全保障 -->
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="guide-item">
|
<view class="guide-item">
|
||||||
<view class="guide-img">
|
<view class="guide-img">
|
||||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide3.png" style="width: 100%;height: 100%;"></image>
|
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide3.png" mode="aspectFit" class="img-content"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 200rpx;width: 100%;"></view>
|
<view class="guide-text">
|
||||||
<view class="guide-title">智能管理</view>
|
<view class="guide-title">智能管理</view>
|
||||||
<view class="guide-subtitle">数据驱动决策,风险提前预警</view>
|
<view class="guide-subtitle">数据驱动决策,风险提前预警</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
<!-- 进度点 -->
|
<!-- 进度点 -->
|
||||||
<view class="progress-dots">
|
<view class="progress-dots">
|
||||||
<view class="dot" :class="{ active: currentStep === 0 }"></view>
|
<view class="dot" :class="{ active: currentStep === 0 }"></view>
|
||||||
<view class="dot" :class="{ active: currentStep === 1 }"></view>
|
<view class="dot" :class="{ active: currentStep === 1 }"></view>
|
||||||
<view class="dot" :class="{ active: currentStep === 2 }"></view>
|
<view class="dot" :class="{ active: currentStep === 2 }"></view>
|
||||||
@@ -91,9 +94,9 @@ const handleBtnClick = () => {
|
|||||||
// 1. 记录引导已完成
|
// 1. 记录引导已完成
|
||||||
uni.setStorageSync('hasShowGuide', true);
|
uni.setStorageSync('hasShowGuide', true);
|
||||||
// 2. 跳转首页
|
// 2. 跳转首页
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pageSubPack/loginSub/pwd-login"
|
url: "/pageSubPack/loginSub/pwd-login"
|
||||||
})
|
})
|
||||||
// uni.switchTab({
|
// uni.switchTab({
|
||||||
// url: '/pages/index/index'
|
// url: '/pages/index/index'
|
||||||
// });
|
// });
|
||||||
@@ -106,40 +109,61 @@ const handleBtnClick = () => {
|
|||||||
.guide-page {
|
.guide-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
/* background-color: #f8f9ff; */
|
|
||||||
background: linear-gradient(to bottom, #E2F0FF, #F6FAFF);
|
background: linear-gradient(to bottom, #E2F0FF, #F6FAFF);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
padding: 120rpx 40rpx 80rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.status_bar {
|
|
||||||
height: 140px;
|
/* 状态栏 - 自适应设备状态栏高度 */
|
||||||
width: 100%;
|
.status-bar {
|
||||||
}
|
height: var(--status-bar-height);
|
||||||
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* 滑动容器 */
|
/* 滑动容器 */
|
||||||
.guide-swiper {
|
.guide-swiper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单个引导项 */
|
/* 单个引导项 - 全屏自适应 */
|
||||||
.guide-item {
|
.guide-item {
|
||||||
width: 360px;
|
width: 100%;
|
||||||
height: 480px;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding: 0 60rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 图片区域 - 自适应 */
|
||||||
.guide-img {
|
.guide-img {
|
||||||
width: 77%;
|
width: 80%;
|
||||||
height: 50%;
|
max-width: 600rpx;
|
||||||
margin-bottom: 80rpx;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-height: 50vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 文字区域 */
|
||||||
|
.guide-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 引导标题 */
|
/* 引导标题 */
|
||||||
@@ -161,7 +185,8 @@ const handleBtnClick = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 40rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单个进度点 */
|
/* 单个进度点 */
|
||||||
@@ -171,6 +196,7 @@ const handleBtnClick = () => {
|
|||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
margin: 0 8rpx;
|
margin: 0 8rpx;
|
||||||
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 激活的进度点 */
|
/* 激活的进度点 */
|
||||||
@@ -182,6 +208,9 @@ const handleBtnClick = () => {
|
|||||||
/* 按钮容器 */
|
/* 按钮容器 */
|
||||||
.guide-btn-wrap {
|
.guide-btn-wrap {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
max-width: 600rpx;
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 引导按钮 */
|
/* 引导按钮 */
|
||||||
@@ -210,7 +239,7 @@ const handleBtnClick = () => {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 按钮禁用态 */
|
/* 按钮禁用态(可选) */
|
||||||
.guide-btn:disabled {
|
.guide-btn:disabled {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="content-class">
|
<view class="content-class">
|
||||||
<view class="nar-top">
|
<view class="nar-top">
|
||||||
<!-- 这里是状态栏占位 -->
|
<!-- 这里是状态栏占位 -->
|
||||||
<view class="status_bar"></view>
|
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||||
<!-- 导航栏 -->
|
<!-- 导航栏 -->
|
||||||
<view class="nav-bar">
|
<view class="nav-bar">
|
||||||
<text class="nav-title">首页</text>
|
<text class="nav-title">首页</text>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<swiper class="swiper-box" :current="current" autoplay>
|
<swiper class="swiper-box" :current="current" autoplay>
|
||||||
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<image :src="item.img" style="width: 100%; height: 100%"></image>
|
<image :src="item.url" style="width: 100%; height: 100%"></image>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<!-- 巡检数据统计区 -->
|
<!-- 巡检数据统计区 -->
|
||||||
<view class="statistics-wrap">
|
<view class="statistics-wrap">
|
||||||
<view class="statistics-item" @click="goToInspectionRecord">
|
<view class="statistics-item" @click="goToInspectionRecord">
|
||||||
<text class="num">{{ totalTasks }}</text>
|
<text class="num">{{ allCount }}</text>
|
||||||
<text class="label">全部巡检</text>
|
<text class="label">全部巡检</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="statistics-item" @click="goToDaysInspection">
|
<view class="statistics-item" @click="goToDaysInspection">
|
||||||
@@ -153,16 +153,18 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||||
import { getCurrentVillage, getTodayInspection, getNewNoticeData } from '../../api/api.js'
|
import { getCurrentVillage,getTodayInspection,getNewNoticeData,getBannarList} from '../../api/api.js'
|
||||||
|
|
||||||
|
|
||||||
// 列表数据状态
|
// 列表数据状态
|
||||||
const current = ref(0)
|
const current = ref(0)
|
||||||
const currentCommunity = ref('请选择小区')
|
const currentCommunity = ref('请选择小区')
|
||||||
const bannerList = ref([{ img: 'https://wuyeadmin.bugtc.com/images/imgs/banner1.png' }])
|
const bannerList = ref([])
|
||||||
const noticeText = ref('暂无公告')
|
const noticeText = ref('暂无公告')
|
||||||
const totalTasks = ref(0) // 全部巡检
|
const allCount = ref(0) // 全部巡检
|
||||||
const pendingCount = ref(0) //待巡检
|
const pendingCount = ref(0) //待巡检
|
||||||
const InspectedCount = ref(0) //已巡检
|
const InspectedCount = ref(0) //已巡检
|
||||||
|
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||||
|
|
||||||
// =======方法=======
|
// =======方法=======
|
||||||
// 跳转小区
|
// 跳转小区
|
||||||
@@ -240,19 +242,17 @@ const currentVillageData = () => {
|
|||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
// 获取今日巡检数据
|
// 获取今日巡检数据
|
||||||
const getInspectionData = () => {
|
const getInspectionData = () =>{
|
||||||
getTodayInspection()
|
getTodayInspection().then(res =>{
|
||||||
.then(res => {
|
if(res.code === 200){
|
||||||
if (res.code === 200) {
|
if(res.data){
|
||||||
if (res.data) {
|
allCount.value = res.data.totalTasks
|
||||||
totalTasks.value = res.data.totalTasks
|
pendingCount.value = res.data.unfinishedTasks
|
||||||
pendingCount.value = res.data.unfinishedTasks
|
InspectedCount.value = res.data.completedTasks
|
||||||
InspectedCount.value = res.data.completedTasks
|
}else{
|
||||||
} else {
|
allCount.value = 0
|
||||||
totalTasks.value = 0
|
pendingCount.value = 0
|
||||||
pendingCount.value = 0
|
InspectedCount.value = 0
|
||||||
InspectedCount.value = 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@@ -271,6 +271,16 @@ const getNoticeData = () => {
|
|||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
// 获取bannar图
|
||||||
|
function getbannarData(){
|
||||||
|
getBannarList().then(res => {
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
bannerList.value = res.data
|
||||||
|
}else{
|
||||||
|
bannerList.value = []
|
||||||
|
}
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
|
||||||
// 接收选择小区返回的参数
|
// 接收选择小区返回的参数
|
||||||
const slelctHomeData = data => {
|
const slelctHomeData = data => {
|
||||||
@@ -285,6 +295,7 @@ onLoad(() => {
|
|||||||
// 优先调用接口获取当前小区,失败时再读缓存
|
// 优先调用接口获取当前小区,失败时再读缓存
|
||||||
currentVillageData()
|
currentVillageData()
|
||||||
getInspectionData()
|
getInspectionData()
|
||||||
|
getbannarData()
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
@@ -311,8 +322,8 @@ const clickItem = index => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status_bar {
|
.status_bar {
|
||||||
height: 46px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏 */
|
/* 导航栏 */
|
||||||
@@ -323,7 +334,7 @@ const clickItem = index => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-title {
|
.nav-title {
|
||||||
font-size: 14px;
|
font-size: 32rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="contentStyle" style="">
|
<view class="contentStyle" style="">
|
||||||
<view class="status-bar"></view>
|
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||||
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false"> </uni-nav-bar>
|
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false"> </uni-nav-bar>
|
||||||
<scroll-view class="page" scroll-y>
|
<scroll-view class="page" scroll-y>
|
||||||
<view class="topBox">
|
<view class="topBox">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<image :src="avatar" class="img" />
|
<image :src="avatar" class="img" />
|
||||||
<span
|
<span style="padding: 5rpx 5rpx; display: flex; flex-direction: column; line-height: 60rpx">
|
||||||
style="padding: 5rpx 5rpx; display: flex; flex-direction: column; line-height: 60rpx"
|
|
||||||
>
|
|
||||||
<span style="font-size: 36rpx; font-weight: 600">
|
<span style="font-size: 36rpx; font-weight: 600">
|
||||||
{{ loginName }}
|
{{ loginName }}
|
||||||
</span>
|
</span>
|
||||||
@@ -21,20 +19,10 @@
|
|||||||
<view class="contentBox">
|
<view class="contentBox">
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<view class="list-container">
|
<view class="list-container">
|
||||||
<view
|
<view class="list-item" v-for="(item, index) in list" :key="index" @click="onItemClick(item)">
|
||||||
class="list-item"
|
|
||||||
v-for="(item, index) in list"
|
|
||||||
:key="index"
|
|
||||||
@click="onItemClick(item)"
|
|
||||||
>
|
|
||||||
<image :src="item.icon" class="item-icon" />
|
<image :src="item.icon" class="item-icon" />
|
||||||
<view class="item-content">
|
<view class="item-content">
|
||||||
<text class="item-title">{{ item.title }}</text>
|
<text class="item-title">{{ item.title }}</text>
|
||||||
<span class="item-desc" v-if="item.desc"
|
|
||||||
><span style="align-self: flex-end; font-size: 24rpx; vertical-align: baseline">{{
|
|
||||||
item.desc
|
|
||||||
}}</span></span
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-arrow"></view>
|
<view class="item-arrow"></view>
|
||||||
<!-- <image src="https://wuyeadmin.bugtc.com/images/propertyImgs/arrow-right.png" class="arrow-icon" /> -->
|
<!-- <image src="https://wuyeadmin.bugtc.com/images/propertyImgs/arrow-right.png" class="arrow-icon" /> -->
|
||||||
@@ -46,193 +34,203 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import {
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
ref
|
||||||
import { getSettingInfo } from '../../api/api.js'
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
getSettingInfo
|
||||||
|
} from '../../api/api.js'
|
||||||
|
|
||||||
const list = ref([
|
const list = ref([{
|
||||||
{
|
icon: 'https://wuyeadmin.bugtc.com/images/imgs/shangbao.png',
|
||||||
icon: 'https://wuyeadmin.bugtc.com/images/imgs/shangbao.png',
|
title: '上报记录'
|
||||||
title: '上报记录'
|
},
|
||||||
},
|
{
|
||||||
{
|
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
|
||||||
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
|
title: '巡检记录'
|
||||||
title: '巡检记录'
|
},
|
||||||
// desc: "您可以在这里添加家人、朋友、租客~"
|
{
|
||||||
},
|
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
|
||||||
{
|
title: '仪表换新'
|
||||||
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
|
},
|
||||||
title: '仪表换新'
|
{
|
||||||
// desc: "您可以在这里添加家人、朋友、租客~"
|
icon: 'https://wuyeadmin.bugtc.com/images/propertyImgs/setting.png',
|
||||||
},
|
title: '设置'
|
||||||
{
|
|
||||||
icon: 'https://wuyeadmin.bugtc.com/images/propertyImgs/setting.png',
|
|
||||||
title: '设置'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const loginName = ref('')
|
|
||||||
const phoneNum = ref('')
|
|
||||||
const avatar = ref('')
|
|
||||||
|
|
||||||
// 获取管家信息
|
|
||||||
const fetchUserInfo = () => {
|
|
||||||
getSettingInfo().then(res => {
|
|
||||||
if (res.code === 200 && res.data) {
|
|
||||||
loginName.value = res.data.nickName || ''
|
|
||||||
phoneNum.value = res.data.phonenumber || ''
|
|
||||||
avatar.value = res.data.avatar
|
|
||||||
}
|
}
|
||||||
}).catch(err =>{
|
])
|
||||||
uni.showToast({
|
const loginName = ref('')
|
||||||
title:err.msg || '获取失败',
|
const phoneNum = ref('')
|
||||||
icon: 'error'
|
const avatar = ref('')
|
||||||
})
|
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onShow(() => {
|
// 获取管家信息
|
||||||
fetchUserInfo()
|
const fetchUserInfo = () => {
|
||||||
})
|
getSettingInfo().then(res => {
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
// --方法----
|
loginName.value = res.data.nickName || ''
|
||||||
const goToDetail = () => {
|
phoneNum.value = res.data.phonenumber || ''
|
||||||
uni.navigateTo({
|
avatar.value = res.data.avatar
|
||||||
url: '/pageSubPack/notice-list/noticeListDetails'
|
}
|
||||||
})
|
}).catch(err => {
|
||||||
}
|
uni.showToast({
|
||||||
// 返回
|
title: err.msg || '获取失败',
|
||||||
const onItemClick = item => {
|
icon: 'none'
|
||||||
if (item.title == '上报记录') {
|
})
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageSubPack/report-record/report-record'
|
|
||||||
})
|
|
||||||
} else if (item.title == '巡检记录') {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageSubPack/inspection/inspection_record'
|
|
||||||
})
|
|
||||||
} else if (item.title == '仪表换新') {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageSubPack/instrument/replacement_record'
|
|
||||||
})
|
|
||||||
} else if (item.title == '设置') {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pageSubPack/setting/setting'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
onShow(() => {
|
||||||
|
fetchUserInfo()
|
||||||
|
})
|
||||||
|
|
||||||
|
// --方法----
|
||||||
|
const goToDetail = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageSubPack/notice-list/noticeListDetails'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 返回
|
||||||
|
const onItemClick = item => {
|
||||||
|
if (item.title == '上报记录') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageSubPack/report-record/report-record'
|
||||||
|
})
|
||||||
|
} else if (item.title == '巡检记录') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageSubPack/inspection/inspection_record'
|
||||||
|
})
|
||||||
|
} else if (item.title == '仪表换新') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageSubPack/instrument/replacement_record'
|
||||||
|
})
|
||||||
|
} else if (item.title == '设置') {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pageSubPack/setting/setting'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.contentStyle {
|
.contentStyle {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||||
}
|
|
||||||
|
|
||||||
.topBox {
|
|
||||||
width: 100%;
|
|
||||||
padding: 20rpx 0px;
|
|
||||||
position: relative;
|
|
||||||
// background-color: #1A75FF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleBox {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 36rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.settingImg {
|
.topBox {
|
||||||
width: 48rpx;
|
width: 100%;
|
||||||
height: 48rpx;
|
padding: 20rpx 0px;
|
||||||
top: 16rpx;
|
position: relative;
|
||||||
right: 0px;
|
// background-color: #1A75FF;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.img {
|
.titleBox {
|
||||||
width: 60px;
|
width: 100%;
|
||||||
height: 60px;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
position: relative;
|
||||||
bottom: 30rpx;
|
|
||||||
left: 30rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contentBox {
|
.title {
|
||||||
position: relative;
|
font-size: 36rpx;
|
||||||
}
|
line-height: 80rpx;
|
||||||
.status-bar {
|
text-align: center;
|
||||||
width: 100vw;
|
font-weight: 500;
|
||||||
height: 46px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.list-item {
|
.settingImg {
|
||||||
display: flex;
|
width: 48rpx;
|
||||||
align-items: center;
|
height: 48rpx;
|
||||||
/* background: #fff; */
|
top: 16rpx;
|
||||||
padding: 20rpx 6rpx;
|
right: 0px;
|
||||||
border-radius: 8rpx;
|
}
|
||||||
/* border-bottom:2rpx solid #f2f2f2; */
|
}
|
||||||
/* margin-bottom: 10rpx; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-icon {
|
.img {
|
||||||
width: 84rpx;
|
width: 60px;
|
||||||
height: 84rpx;
|
height: 60px;
|
||||||
/* margin-right: 20rpx; */
|
margin-right: 10rpx;
|
||||||
}
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.item-content {
|
.name {
|
||||||
flex: 1;
|
bottom: 30rpx;
|
||||||
display: flex;
|
left: 30rpx;
|
||||||
flex-direction: row;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-title {
|
.contentBox {
|
||||||
font-size: 32rpx;
|
position: relative;
|
||||||
/* color: #333; */
|
}
|
||||||
font-weight: 400;
|
|
||||||
margin: 10rpx 20rpx;
|
|
||||||
/* margin-bottom: 6rpx; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-desc {
|
.status-bar {
|
||||||
font-size: 24rpx;
|
width: 100vw;
|
||||||
color: #b5b5b5;
|
// height: 46px;
|
||||||
white-space: nowrap;
|
height: var(--status-bar-height);
|
||||||
/* 强制不换行 */
|
flex-shrink: 0;
|
||||||
overflow: hidden;
|
}
|
||||||
/* 超出隐藏 */
|
::v-deep .uni-nav-bar-text{
|
||||||
text-overflow: ellipsis;
|
font-size: 32rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-arrow {
|
.list-item {
|
||||||
width: 16rpx;
|
display: flex;
|
||||||
height: 16rpx;
|
align-items: center;
|
||||||
border-right: 3rpx solid #999999;
|
/* background: #fff; */
|
||||||
border-bottom: 3rpx solid #999999;
|
padding: 20rpx 6rpx;
|
||||||
transform: rotate(-45deg);
|
border-radius: 8rpx;
|
||||||
margin-right: 10rpx;
|
/* border-bottom:2rpx solid #f2f2f2; */
|
||||||
}
|
/* margin-bottom: 10rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
.page {
|
.item-icon {
|
||||||
flex: 1;
|
width: 84rpx;
|
||||||
overflow-y: auto;
|
height: 84rpx;
|
||||||
padding: 0px 40rpx;
|
/* margin-right: 20rpx; */
|
||||||
box-sizing: border-box;
|
}
|
||||||
}
|
|
||||||
|
.item-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
/* color: #333; */
|
||||||
|
font-weight: 400;
|
||||||
|
margin: 10rpx 20rpx;
|
||||||
|
/* margin-bottom: 6rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #b5b5b5;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 强制不换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-arrow {
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
border-right: 3rpx solid #999999;
|
||||||
|
border-bottom: 3rpx solid #999999;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 0px 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 289 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 290 B |
Reference in New Issue
Block a user