冲突
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<view class="report-record-page">
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 顶部导航栏 -->
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
title="上报记录"
|
||||
backgroundColor="transparent"
|
||||
:border= "false"
|
||||
@clickLeft="navBack"/>
|
||||
backgroundColor="transparent"
|
||||
:border="false"
|
||||
@clickLeft="navBack"
|
||||
/>
|
||||
|
||||
<!-- 状态筛选标签 -->
|
||||
<view class="status-tabs">
|
||||
@@ -41,13 +42,8 @@
|
||||
scroll-y
|
||||
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
|
||||
>
|
||||
|
||||
<!-- 记录卡片 -->
|
||||
<view
|
||||
v-for="record in reportRecords"
|
||||
:key="record.id"
|
||||
class="record-card"
|
||||
>
|
||||
<view v-for="record in reportRecords" :key="record.id" class="record-card">
|
||||
<!-- 标题 + 状态标签 -->
|
||||
<view class="card-header">
|
||||
<text class="card-title">{{ record.item }}</text>
|
||||
@@ -58,8 +54,10 @@
|
||||
|
||||
<!-- 类型标签 -->
|
||||
<view class="tag-group">
|
||||
<view class="tag-item" v-if="record.projectTypeStr">{{ record.projectTypeStr}}</view>
|
||||
<view class="tag-item" v-if="record.maintenanceItemName">{{ record.maintenanceItemName}}</view>
|
||||
<view class="tag-item" v-if="record.projectTypeStr">{{ record.projectTypeStr }}</view>
|
||||
<view class="tag-item" v-if="record.maintenanceItemName">{{
|
||||
record.maintenanceItemName
|
||||
}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容 -->
|
||||
@@ -81,17 +79,15 @@
|
||||
</view>
|
||||
|
||||
<!-- 空数据 -->
|
||||
<view class="empty" v-if="reportRecords.length === 0 && !loading">
|
||||
暂无上报记录
|
||||
</view>
|
||||
<view class="empty" v-if="reportRecords.length === 0 && !loading"> 暂无上报记录 </view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import {onReady, onReachBottom, onPullDownRefresh,onShow} from "@dcloudio/uni-app"
|
||||
import {getMyOrderList} from '../../api/api.js'
|
||||
import { onReady, onReachBottom, onPullDownRefresh, onShow } from '@dcloudio/uni-app'
|
||||
import { getMyOrderList } from '../../api/api.js'
|
||||
|
||||
// 导航栏/标签高度(适配不同设备)
|
||||
const navHeight = ref(44)
|
||||
@@ -99,14 +95,14 @@ const statusTabHeight = ref(88)
|
||||
const typeTabHeight = ref(88)
|
||||
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||
// 分页
|
||||
const pageNum = ref(1) // 当前页
|
||||
const pageSize = ref(5) // 每页条数
|
||||
const total = ref(0) // 总条数
|
||||
const loading = ref(false) // 加载状态
|
||||
const noMore = ref(false) // 是否没有更多
|
||||
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 activeType = ref('all') // 全部/公共报修/个人报修
|
||||
const activeType = ref('all') // 全部/公共报修/个人报修
|
||||
|
||||
// 状态筛选选项
|
||||
const statusTabs = ref([
|
||||
@@ -142,29 +138,32 @@ const getReportList = (isRefresh = false) => {
|
||||
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 || []
|
||||
getMyOrderList(params)
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
total.value = res.total || 0
|
||||
const data = res.rows || []
|
||||
|
||||
// 第一页:覆盖,分页:追加
|
||||
if (pageNum.value === 1) {
|
||||
reportRecords.value = data
|
||||
} else {
|
||||
reportRecords.value = [...reportRecords.value, ...data]
|
||||
// 第一页:覆盖,分页:追加
|
||||
if (pageNum.value === 1) {
|
||||
reportRecords.value = data
|
||||
} else {
|
||||
reportRecords.value = [...reportRecords.value, ...data]
|
||||
}
|
||||
|
||||
// 判断是否还有更多
|
||||
noMore.value = reportRecords.value.length >= total.value
|
||||
}
|
||||
|
||||
// 判断是否还有更多
|
||||
noMore.value = reportRecords.value.length >= total.value
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.showToast({ title: '加载失败', icon: 'none' })
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
if (isRefresh) {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
uni.showToast({ title: '加载失败', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
if (isRefresh) {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上拉加载更多
|
||||
onReachBottom(() => {
|
||||
@@ -189,14 +188,14 @@ const reloadList = () => {
|
||||
}
|
||||
|
||||
// 切换状态(全部/待解决/已完成)筛选
|
||||
const switchStatus = (value) => {
|
||||
const switchStatus = value => {
|
||||
if (activeStatus.value === value) return
|
||||
activeStatus.value = value
|
||||
reloadList()
|
||||
}
|
||||
|
||||
// 切换类型(公共/个人)筛选
|
||||
const switchType = (value) => {
|
||||
const switchType = value => {
|
||||
if (activeType.value === value) return
|
||||
activeType.value = value
|
||||
reloadList()
|
||||
@@ -205,24 +204,24 @@ const switchType = (value) => {
|
||||
// 返回上一页
|
||||
const navBack = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
// 获取状态文本
|
||||
const getStatusText = (status) => {
|
||||
const getStatusText = status => {
|
||||
const statusMap = {
|
||||
// "pending": '已分配',
|
||||
"1": '待解决',
|
||||
'2': '已完成'
|
||||
// "pending": '已分配',
|
||||
1: '待解决',
|
||||
2: '已完成'
|
||||
}
|
||||
return statusMap[status] || ''
|
||||
}
|
||||
// 获取状态标签样式类名
|
||||
const getStatusClass = (status) => {
|
||||
const getStatusClass = status => {
|
||||
const classMap = {
|
||||
'1': 'processing',
|
||||
'2': 'completed'
|
||||
1: 'processing',
|
||||
2: 'completed'
|
||||
}
|
||||
return classMap[status] || ''
|
||||
}
|
||||
@@ -236,7 +235,7 @@ onShow(() => {
|
||||
onReady(() => {
|
||||
// 可根据实际设备调整高度
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
success: res => {
|
||||
if (res.platform === 'ios') {
|
||||
navHeight.value = 44
|
||||
} else {
|
||||
@@ -251,13 +250,13 @@ onReady(() => {
|
||||
.report-record-page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%)
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
.status-bar{
|
||||
width: 100%;
|
||||
.status-bar {
|
||||
width: 100%;
|
||||
/* height: var(--status-bar-height); */
|
||||
flex-shrink: 0;
|
||||
/* height: 46px; */
|
||||
/* height: 46px; */
|
||||
}
|
||||
/* 状态筛选标签 */
|
||||
.status-tabs {
|
||||
@@ -282,7 +281,7 @@ onReady(() => {
|
||||
}
|
||||
|
||||
.status-tab-item.active {
|
||||
color: #4D5DFA;
|
||||
color: #4d5dfa;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -294,7 +293,7 @@ onReady(() => {
|
||||
transform: translateX(-50%);
|
||||
width: 80rpx;
|
||||
height: 8rpx;
|
||||
background: linear-gradient(to bottom, #4D5DFA, #BAC0FA);
|
||||
background: linear-gradient(to bottom, #4d5dfa, #bac0fa);
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
@@ -318,8 +317,8 @@ onReady(() => {
|
||||
}
|
||||
|
||||
.type-tab-item.active {
|
||||
color: #4D5DFA;
|
||||
border: 2rpx solid #4D5DFA;
|
||||
color: #4d5dfa;
|
||||
border: 2rpx solid #4d5dfa;
|
||||
border-radius: 198rpx;
|
||||
/* background-color: #007AFF; */
|
||||
}
|
||||
@@ -363,15 +362,15 @@ onReady(() => {
|
||||
}
|
||||
|
||||
.status-tag.pending {
|
||||
background-color: #E34D59; /* 待分配-红色 */
|
||||
background-color: #e34d59; /* 待分配-红色 */
|
||||
}
|
||||
|
||||
.status-tag.processing {
|
||||
background-color: #09C2BD; /* 待解决-绿色 */
|
||||
background-color: #09c2bd; /* 待解决-绿色 */
|
||||
}
|
||||
|
||||
.status-tag.completed {
|
||||
background-color: #4D5DFA; /* 已完成-蓝色 */
|
||||
background-color: #4d5dfa; /* 已完成-蓝色 */
|
||||
}
|
||||
|
||||
/* 类型标签组 */
|
||||
|
||||
@@ -1,107 +1,120 @@
|
||||
<template>
|
||||
<view class="forget-page">
|
||||
<!-- <view class="status_bar"></view>
|
||||
<view class="forget-page">
|
||||
<!-- <view class="status_bar"></view>
|
||||
<view class="nav-bar">
|
||||
<uni-icons type="left" size="28" color="#333" @click="goBack"></uni-icons>
|
||||
<view class="nav-title">忘记密码</view>
|
||||
</view> -->
|
||||
<!-- 手机号输入框 -->
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" trim="all"
|
||||
placeholder="请输入手机号" :inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle">
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<!-- 验证码输入 + 获取验证码按钮 -->
|
||||
<view class="input-item verify-item">
|
||||
<view class="input-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/code.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||
</view>
|
||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" trim="all"
|
||||
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
||||
</uni-easyinput>
|
||||
<button
|
||||
class="get-verify-btn"
|
||||
:disabled="!canGetVerify || countDown > 0"
|
||||
@click="getVerifyCode"
|
||||
>
|
||||
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||
</button>
|
||||
</view>
|
||||
<!-- 确定 -->
|
||||
<button
|
||||
class="forget-btn"
|
||||
:disabled="!canRegister"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
确定
|
||||
</button>
|
||||
|
||||
</view>
|
||||
<!-- 手机号输入框 -->
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<image
|
||||
src="https://wuyeadmin.bugtc.com/images/login/phone.png"
|
||||
mode=""
|
||||
style="height: 100%; width: 100%"
|
||||
></image>
|
||||
</view>
|
||||
<uni-easyinput
|
||||
class="input-content"
|
||||
type="number"
|
||||
v-model="phoneNumber"
|
||||
trim="all"
|
||||
placeholder="请输入手机号"
|
||||
:inputBorder="false"
|
||||
maxlength="11"
|
||||
:placeholderStyle="placeholderStyle"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<!-- 验证码输入 + 获取验证码按钮 -->
|
||||
<view class="input-item verify-item">
|
||||
<view class="input-icon">
|
||||
<image
|
||||
src="https://wuyeadmin.bugtc.com/images/login/code.png"
|
||||
mode=""
|
||||
style="height: 100%; width: 100%"
|
||||
></image>
|
||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||
</view>
|
||||
<uni-easyinput
|
||||
class="input-content verify-input"
|
||||
type="number"
|
||||
v-model="verifyCode"
|
||||
trim="all"
|
||||
placeholder="请输入验证码"
|
||||
:inputBorder="false"
|
||||
maxlength="6"
|
||||
:placeholderStyle="placeholderStyle"
|
||||
>
|
||||
</uni-easyinput>
|
||||
<button
|
||||
class="get-verify-btn"
|
||||
:disabled="!canGetVerify || countDown > 0"
|
||||
@click="getVerifyCode"
|
||||
>
|
||||
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||
</button>
|
||||
</view>
|
||||
<!-- 确定 -->
|
||||
<button class="forget-btn" :disabled="!canRegister" @click="handleConfirm">确定</button>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, computed, onUnmounted } from 'vue';
|
||||
import {getSendCode,changePhone} from '../../api/api.js'
|
||||
import { ref, computed, onUnmounted } from 'vue'
|
||||
import { getSendCode, changePhone } from '../../api/api.js'
|
||||
|
||||
// ====响应式数据======
|
||||
const phoneNumber = ref('')
|
||||
const verifyCode = ref('')
|
||||
|
||||
const countDown = ref(0)
|
||||
let timer = null;
|
||||
let timer = null
|
||||
const placeholderStyle = ref('font-size:24rpx')
|
||||
|
||||
// ========== 计算属性 ==========
|
||||
// 是否可获取验证码(手机号格式正确)
|
||||
const canGetVerify = computed(() => {
|
||||
const phoneReg = /^1[3-9]\d{9}$/;
|
||||
return phoneReg.test(phoneNumber.value);
|
||||
});
|
||||
const phoneReg = /^1[3-9]\d{9}$/
|
||||
return phoneReg.test(phoneNumber.value)
|
||||
})
|
||||
|
||||
// 获取验证码
|
||||
const getVerifyCode = () => {
|
||||
if (!canGetVerify.value) return;
|
||||
if (!canGetVerify.value) return
|
||||
let params = {
|
||||
phone:phoneNumber.value,
|
||||
scene:'butler_login'
|
||||
phone: phoneNumber.value,
|
||||
scene: 'butler_login'
|
||||
}
|
||||
getSendCode(params).then(res =>{
|
||||
if(res.code === 200){
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
icon: 'success'
|
||||
});
|
||||
// 开始60秒倒计时
|
||||
countDown.value = 60;
|
||||
timer = setInterval(() => {
|
||||
countDown.value--;
|
||||
if (countDown.value <= 0) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '验证码发送失败',
|
||||
icon: 'error'
|
||||
});
|
||||
}
|
||||
getSendCode(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
icon: 'success'
|
||||
})
|
||||
// 开始60秒倒计时
|
||||
countDown.value = 60
|
||||
timer = setInterval(() => {
|
||||
countDown.value--
|
||||
if (countDown.value <= 0) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '验证码发送失败',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
// 是否确认
|
||||
const canRegister = computed(() => {
|
||||
const phoneReg = /^1[3-9]\d{9}$/; // 手机号11位
|
||||
const verifyReg = /^\d{6}$/; // 验证码6位
|
||||
const phoneReg = /^1[3-9]\d{9}$/ // 手机号11位
|
||||
const verifyReg = /^\d{6}$/ // 验证码6位
|
||||
|
||||
return phoneReg.test(phoneNumber.value)
|
||||
&& verifyReg.test(verifyCode.value)
|
||||
});
|
||||
return phoneReg.test(phoneNumber.value) && verifyReg.test(verifyCode.value)
|
||||
})
|
||||
// 确认
|
||||
const handleConfirm = () => {
|
||||
if (!canRegister.value) {
|
||||
@@ -113,41 +126,43 @@ const handleConfirm = () => {
|
||||
changePhone({
|
||||
phone: phoneNumber.value,
|
||||
smsCode: verifyCode.value
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({ title: '修改成功', icon: 'success' })
|
||||
// 把参数存到本地缓存
|
||||
uni.setStorageSync('tempChangePwdParams', {
|
||||
phoneNumber:phoneNumber.value
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 800)
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '修改失败', icon: 'none' })
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.showToast({ title: '请求失败,请重试', icon: 'none' })
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({ title: '修改成功', icon: 'success' })
|
||||
// 把参数存到本地缓存
|
||||
uni.setStorageSync('tempChangePwdParams', {
|
||||
phoneNumber: phoneNumber.value
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 800)
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '修改失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
uni.showToast({ title: '请求失败,请重试', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
// 返回上一页
|
||||
// const goBack = () => {
|
||||
// uni.navigateBack();
|
||||
// };
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.forget-page{
|
||||
padding: 20rpx 40rpx 40rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #f9f9f9;
|
||||
/* background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF ); */
|
||||
.forget-page {
|
||||
padding: 20rpx 40rpx 40rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #f9f9f9;
|
||||
/* background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF ); */
|
||||
}
|
||||
.status_bar{
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
.status_bar {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
}
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
@@ -209,7 +224,7 @@ const handleConfirm = () => {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background-color: #4D5DFA;
|
||||
background-color: #4d5dfa;
|
||||
color: #fff;
|
||||
border-radius: 35rpx;
|
||||
font-size: 28rpx;
|
||||
@@ -222,24 +237,22 @@ const handleConfirm = () => {
|
||||
color: #fff;
|
||||
}
|
||||
/* 按钮 */
|
||||
.forget-btn{
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #4D5DFA;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 40rpx;
|
||||
.forget-btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #4d5dfa;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.forget-btn:disabled{
|
||||
background-color: #99c8ff;
|
||||
color: #fff;
|
||||
.forget-btn:disabled {
|
||||
background-color: #99c8ff;
|
||||
color: #fff;
|
||||
}
|
||||
/* 禁用按钮边框 */
|
||||
.get-verify-btn:after{
|
||||
border-radius: 40px;
|
||||
.get-verify-btn:after {
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -15,12 +15,18 @@
|
||||
<view class="header-container" @click="navigateToPage">
|
||||
<view class="location-area">
|
||||
<view class="location-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/adress.png" style="height: 100%; width: 100%"></image>
|
||||
<image
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/adress.png"
|
||||
style="height: 100%; width: 100%"
|
||||
></image>
|
||||
</view>
|
||||
<view class="community-selector">
|
||||
<text class="community-name">{{ currentCommunity }}</text>
|
||||
<view class="community-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/三角形.png" style="height: 100%; width: 100%"></image>
|
||||
<image
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/三角形.png"
|
||||
style="height: 100%; width: 100%"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -50,8 +56,11 @@
|
||||
<!-- 消息通知栏 -->
|
||||
<view class="noticeClass">
|
||||
<view class="notice-left">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/imgs/notice.png" class="notice-icon"></image>
|
||||
<view class="notice-line"></view>
|
||||
<image
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/notice.png"
|
||||
class="notice-icon"
|
||||
></image>
|
||||
<view class="notice-line"></view>
|
||||
</view>
|
||||
<view class="notice-right" @click="getNoticeMore">
|
||||
<uni-notice-bar
|
||||
@@ -72,15 +81,15 @@
|
||||
<!-- 巡检数据统计区 -->
|
||||
<view class="statistics-wrap">
|
||||
<view class="statistics-item" @click="goToInspectionRecord">
|
||||
<text class="num">{{allCount}}</text>
|
||||
<text class="num">{{ allCount }}</text>
|
||||
<text class="label">全部巡检</text>
|
||||
</view>
|
||||
<view class="statistics-item" @click="goToDaysInspection">
|
||||
<text class="num">{{pendingCount}}</text>
|
||||
<text class="num">{{ pendingCount }}</text>
|
||||
<text class="label">待巡检</text>
|
||||
</view>
|
||||
<view class="statistics-item">
|
||||
<text class="num">{{InspectedCount}}</text>
|
||||
<text class="num">{{ InspectedCount }}</text>
|
||||
<text class="label">已巡检</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,26 +100,46 @@
|
||||
<!-- 第一行功能:故障上报、一键开门、工单大厅、我的工单 -->
|
||||
<view class="function-row">
|
||||
<view class="function-item" @click="goToReport">
|
||||
<image class="item-icon" src="https://wuyeadmin.bugtc.com/images/imgs/fault-report.png" mode="aspectFit"></image>
|
||||
<image
|
||||
class="item-icon"
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/fault-report.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="item-text">故障上报</text>
|
||||
</view>
|
||||
<view class="function-item" @click="goToOneOpenDoor">
|
||||
<image class="item-icon" src="https://wuyeadmin.bugtc.com/images/imgs/open.png" mode="aspectFit"></image>
|
||||
<image
|
||||
class="item-icon"
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/open.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="item-text">一键开门</text>
|
||||
</view>
|
||||
<view class="function-item" @tap="goToTicketHall">
|
||||
<image class="item-icon" src="https://wuyeadmin.bugtc.com/images/imgs/work-order.png" mode="aspectFit"></image>
|
||||
<image
|
||||
class="item-icon"
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/work-order.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="item-text">工单大厅</text>
|
||||
</view>
|
||||
<view class="function-item" @tap="goToMyTicket">
|
||||
<image class="item-icon" src="https://wuyeadmin.bugtc.com/images/imgs/my-work.png" mode="aspectFit"></image>
|
||||
<image
|
||||
class="item-icon"
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/my-work.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="item-text">我的工单</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 第二行 -->
|
||||
<view class="function-row" style="margin-top: 2px">
|
||||
<view class="function-item" @tap="goToComplaint">
|
||||
<image class="item-icon" src="https://wuyeadmin.bugtc.com/images/imgs/complaint.png" mode="aspectFit"></image>
|
||||
<image
|
||||
class="item-icon"
|
||||
src="https://wuyeadmin.bugtc.com/images/imgs/complaint.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="item-text">投诉处理</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -418,7 +447,7 @@ const clickItem = index => {
|
||||
align-items: center;
|
||||
margin-right: 16rpx;
|
||||
|
||||
.notice-icon {
|
||||
.notice-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
@@ -46,15 +46,17 @@ const avatar = ref('')
|
||||
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||
|
||||
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({ title: err.msg || '获取失败', icon: 'none' })
|
||||
})
|
||||
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({ title: err.msg || '获取失败', icon: 'none' })
|
||||
})
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
@@ -63,10 +65,10 @@ onShow(() => {
|
||||
|
||||
const onItemClick = item => {
|
||||
const routes = {
|
||||
'上报记录': '/pageSubPack/report-record/report-record',
|
||||
'巡检记录': '/pageSubPack/inspection/inspection_record',
|
||||
'仪表换新': '/pageSubPack/instrument/replacement_record',
|
||||
'设置': '/pageSubPack/setting/setting'
|
||||
上报记录: '/pageSubPack/report-record/report-record',
|
||||
巡检记录: '/pageSubPack/inspection/inspection_record',
|
||||
仪表换新: '/pageSubPack/instrument/replacement_record',
|
||||
设置: '/pageSubPack/setting/setting'
|
||||
}
|
||||
const url = routes[item.title]
|
||||
if (!url) return
|
||||
|
||||
Reference in New Issue
Block a user