巡检点上传图片修正

This commit is contained in:
Zy
2026-05-09 17:10:50 +08:00
parent e29e1c1346
commit b29e03ab4d
29 changed files with 2836 additions and 1189 deletions

View File

@@ -0,0 +1,261 @@
<template>
<view class="simple-uploader">
<!-- 图片列表 -->
<view class="image-list">
<!-- 已选图片 -->
<view v-for="(img, index) in innerList" :key="index" class="image-item">
<image :src="img.url || img" class="img" mode="aspectFill" @tap="preview(index)"></image>
<!-- 删除按钮 -->
<view class="delete-btn" @tap.stop="remove(index)">
<uni-icons type="closeempty" size="16" color="#fff"></uni-icons>
</view>
<!-- 上传状态 -->
<view v-if="img.uploading" class="uploading-mask">
<text>上传中...</text>
</view>
</view>
<!-- 添加按钮 -->
<view class="add-btn" @tap="choose">
<uni-icons color="#a6a6a6" type="plusempty" size="25"></uni-icons>
</view>
</view>
</view>
</template>
<script setup>
import { ref, watch } from 'vue'
// ======================
// Props(可配置)
// ======================
const props = defineProps({
// 双向绑定的图片列表
modelValue: {
type: Array,
default: () => []
},
/** 多选 最多上传数量 默认9*/
limit: {
type: Number,
default: 9
},
// 选图来源:album(相册)/ camera(拍照)
sourceType: {
type: Array,
default: () => ['album', 'camera']
},
// 图片大小:original(原图)/ compressed(压缩图)
sizeType: {
type: Array,
default: () => ['compressed']
},
// 后端上传接口地址(必填)
uploadUrl: {
type: String,
default: ''
},
// 后端接收的文件字段名
fileFieldName: {
type: String,
default: 'file'
},
// ✅ 新增:上传时携带的额外参数
extraData: {
type: Object,
default: () => ({})
}
})
// ======================
// Emits
// ======================
const emit = defineEmits(['update:modelValue', 'success', 'fail', 'remove'])
// ======================
// 内部数据
// ======================
const innerList = ref([])
// 监听外部数据变化
watch(
() => props.modelValue,
newVal => {
innerList.value = newVal.map(item => {
if (typeof item === 'string') {
return { url: item }
}
return item
})
},
{ immediate: true, deep: true }
)
// ======================
// 核心方法
// ======================
// 1. 选择图片
function choose() {
uni.chooseImage({
count: props.limit,
sourceType: props.sourceType,
sizeType: props.sizeType,
success: async res => {
const tempPaths = res.tempFilePaths
// 如果没传上传接口,只返回临时路径
if (!props.uploadUrl) {
const newItems = tempPaths.map(path => ({ url: path }))
innerList.value = [...innerList.value, ...newItems]
emit(
'update:modelValue',
innerList.value.map(i => i.url)
)
emit('success', { tempFilePaths: tempPaths })
return
}
// 有上传接口,自动上传
for (const path of tempPaths) {
await uploadSingle(path)
}
},
fail: err => {
console.log('选图失败', err)
emit('fail', err)
}
})
}
// 2. 上传单张图片
async function uploadSingle(filePath) {
// 先添加到列表,标记为上传中
const tempItem = { url: filePath, uploading: true }
innerList.value = [...innerList.value, tempItem]
return new Promise((resolve, reject) => {
uni.uploadFile({
url: props.uploadUrl,
filePath: filePath,
name: props.fileFieldName,
// ✅ 新增:携带额外参数
formData: props.extraData,
success: res => {
try {
const data = JSON.parse(res.data)
// 假设后端返回格式:{ code: 200, url: "https://xxx.com/xxx.png" }
// 如果你的后端返回格式不同,请在这里修改
if (data.code === 200 || data.url) {
const finalUrl = data.url || data.data?.url
// 更新列表,替换为网络 URL
const index = innerList.value.findIndex(item => item.url === filePath)
if (index !== -1) {
innerList.value[index] = { url: finalUrl, uploading: false }
}
emit(
'update:modelValue',
innerList.value.map(i => i.url)
)
emit('success', { url: finalUrl, tempPath: filePath })
resolve(finalUrl)
} else {
throw new Error(data.msg || '上传失败')
}
} catch (e) {
console.error('解析上传结果失败', e)
remove(innerList.value.findIndex(item => item.url === filePath))
emit('fail', e)
reject(e)
}
},
fail: err => {
console.error('上传失败', err)
remove(innerList.value.findIndex(item => item.url === filePath))
emit('fail', err)
reject(err)
}
})
})
}
// 3. 删除图片
function remove(index) {
const removed = innerList.value.splice(index, 1)[0]
emit(
'update:modelValue',
innerList.value.map(i => i.url)
)
emit('remove', { index, url: removed.url })
}
// 4. 预览图片
function preview(index) {
const urls = innerList.value.map(i => i.url)
uni.previewImage({
urls: urls,
current: index
})
}
</script>
<style scoped>
.simple-uploader {
width: 100%;
}
.image-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
}
.image-item {
position: relative;
width: 160rpx;
height: 160rpx;
}
.img {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
.delete-btn {
position: absolute;
top: 0rpx;
right: 0rpx;
width: 32rpx;
height: 32rpx;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
.uploading-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 24rpx;
}
.add-btn {
width: 160rpx;
height: 160rpx;
background-color: #f3f3f3;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@@ -27,7 +27,7 @@
<view class="nav-left" :style="{ width: leftWidth + 'px' }">
<slot name="left">
<view class="back-btn" @click="goBack" v-if="showBack">
<uni-icons type="left" size="20" color="inherit"></uni-icons>
<uni-icons type="left" size="22" color="inherit"></uni-icons>
<text v-if="backText" class="back-text">{{ backText }}</text>
</view>
</slot>
@@ -70,11 +70,12 @@ const props = withDefaults(defineProps<Props>(), {
backText: '',
placeholder: true // 默认开启占位,防止遮挡
})
const emits = defineEmits(['clickLeft'])
// --- 状态 ---
const statusBarHeight = ref(0)
const navBarHeight = ref(44)
const capsuleHeight = ref(0)
const gap = ref(0)
// --- 计算属性 ---
const totalNavHeight = computed(() => statusBarHeight.value + navBarHeight.value)
@@ -108,8 +109,8 @@ const initNavBar = () => {
// #ifdef MP-WEIXIN
const menuInfo = uni.getMenuButtonBoundingClientRect()
if (menuInfo.top && menuInfo.height) {
const gap = menuInfo.top - statusBarHeight.value
navBarHeight.value = (gap > 0 ? gap : 4) * 2 + menuInfo.height
gap.value = menuInfo.top - statusBarHeight.value
navBarHeight.value = (gap.value > 0 ? gap.value : 4) * 2 + menuInfo.height
capsuleHeight.value = menuInfo.height
} else {
navBarHeight.value = 44
@@ -123,7 +124,7 @@ const initNavBar = () => {
}
const goBack = () => {
uni.navigateBack()
emits('clickLeft')
}
</script>
@@ -159,14 +160,14 @@ const goBack = () => {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
box-sizing: border-box;
padding: 0 20rpx;
padding-top: 10rpx;
}
.nav-left,
.nav-right {
display: flex;
align-items: center;
height: 100%;
}
@@ -180,16 +181,20 @@ const goBack = () => {
}
.nav-title {
font-size: 32rpx;
font-weight: 500;
font-size: 25rpx;
font-size: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #000000;
line-height: 40rpx;
text-align: center;
}
.back-btn {
display: flex;
align-items: center;
font-weight: 600;
}
.back-text {

View File

@@ -0,0 +1,176 @@
<template>
<view class="steps-vertical">
<view class="step-item" v-for="(item, index) in steps" :key="index">
<!-- 左侧:圆点 + 竖线 -->
<view class="step-left">
<!-- 圆点 -->
<view class="step-circle" :class="getClass(index)">
<!-- 插槽:自定义圆点 -->
<slot v-if="$slots.circle" name="circle" :index="index" :status="getStatus(index)">
</slot>
<view v-else-if="getStatus(index) === 'finish'">
<uni-icons type="checkmarkempty" size="15" :color="props.color"></uni-icons>
</view>
<text v-else-if="getStatus(index) === 'process'">{{ index + 1 }}</text>
<text v-else-if="getStatus(index) === 'wait'">{{ index + 1 }}</text>
</view>
<!-- 竖线(最后一条不显示) -->
<view
class="step-line"
:class="{ finish: getStatus(index) === 'finish' }"
v-if="index < steps.length - 1"
></view>
</view>
<!-- 右侧:内容区域(支持插槽!) -->
<view class="step-right">
<!-- 默认标题 -->
<view
class="step-title"
:class="{ active: getStatus(index) !== 'wait' }"
v-if="!$slots.item"
>
{{ item.title }}
</view>
<!-- 默认描述 -->
<view class="step-desc" v-if="item.desc && !$slots.item">
{{ item.desc }}
</view>
<!-- 🔥 核心:自定义内容插槽 -->
<slot
name="item"
v-if="$slots.item"
:index="index"
:status="getStatus(index)"
:data="item"
></slot>
</view>
</view>
</view>
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({
// 步骤列表
steps: {
type: Array,
default: () => []
},
// 当前步骤(从 0 开始)
current: {
type: Number,
default: 0
},
// 主题色
color: {
type: String,
default: '#007aff'
}
})
// 获取状态:finish / process / wait
const getStatus = index => {
if (index < props.current) return 'finish'
if (index === props.current) return 'process'
return 'wait'
}
// 样式类
const getClass = index => {
return 'step-circle-' + getStatus(index)
}
</script>
<style scoped lang="scss">
.step-item {
display: flex;
position: relative;
}
/* 左侧 */
.step-left {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 14rpx;
}
/* 圆点 */
.step-circle {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
font-size: 32rpx;
line-height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
z-index: 10;
border: 3rpx solid transparent;
color: #999999;
border-color: #999999;
}
/* 已完成 */
.step-circle-finish {
background: transparent;
color: v-bind('props.color');
border-color: v-bind('props.color');
}
/* 进行中 */
.step-circle-process {
border-color: v-bind('props.color');
color: #fff;
background: v-bind('props.color');
}
/* 待完成 */
.step-circle-wait {
color: #999999;
border-color: #999999;
}
/* 竖线 */
.step-line {
width: 4rpx;
height: 100%;
background: #e5e5e5;
margin-top: 8rpx;
margin-bottom: 8rpx;
}
.step-line.finish {
background: v-bind('props.color');
}
/* 右侧内容 */
.step-right {
flex: 1;
}
.step-title {
font-size: 28rpx;
color: #666;
line-height: 1.4;
}
.step-title.active {
color: #333;
font-weight: 500;
}
.step-desc {
font-size: 24rpx;
color: #999;
margin-top: 8rpx;
line-height: 1.5;
}
</style>

View File

@@ -7,7 +7,7 @@
class="tabs_items"
:class="{
active: item.value === currentActiveValue,
line: showBottomLine
line: showBottomLine && item.value === currentActiveValue
}"
>
{{ item.label }}
@@ -62,7 +62,6 @@ const tabs = computed<TabItem[]>(() => {
// ======================
const currentActiveValue = ref<string | number>(props.activeValue ?? tabs.value[0]?.value ?? '')
console.log(currentActiveValue)
// 事件
const emit = defineEmits<{
update: [value: string | number]
@@ -90,22 +89,21 @@ const handleTabs = (item: TabItem) => {
margin-right: 60rpx;
font-size: 28rpx;
color: #222222;
position: relative;
&.active {
color: #4d5dfa;
position: relative;
}
&.line {
&::after {
content: '';
display: block;
width: 100%;
height: 8rpx;
background: linear-gradient(180deg, #4d5dfa 0%, #bac0fa 100%);
border-radius: 4rpx;
position: absolute;
left: 0;
bottom: 0;
&.line {
&::after {
content: '';
display: block;
width: 100%;
height: 8rpx;
background: linear-gradient(180deg, #4d5dfa 0%, #bac0fa 100%);
border-radius: 4rpx;
position: absolute;
left: 0;
bottom: 0;
}
}
}
}

View File

@@ -50,9 +50,9 @@
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx4a49ad94e2b25927",
"appid": "wx40625124315d2de1",
"usingComponents": true,
"lazyCodeLoading":"requiredComponents"
"lazyCodeLoading": "requiredComponents"
},
"mp-alipay": {
"usingComponents": true

View File

@@ -10,7 +10,7 @@
<view class="detail_list flex flex-1 overflow-auto">
<scroll-view scroll-y="true">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="item" v-for="(item, index) in list" :key="index" @tap="handleComplaint">
<view class="title flex items-center">
<text>{{ item.title }}</text>
<view class="status padding" v-if="item.status === 0"> <text>待处理</text> </view>
@@ -110,6 +110,12 @@ const list = [
time: '2023-08-01 10:05:46'
}
]
function handleComplaint() {
uni.navigateTo({
url: '/pageSubPack/complaint/Details_handle'
})
}
</script>
<style scoped lang="scss">

View File

@@ -66,7 +66,7 @@
<!-- submit -->
<view v-if="info.status === 0" class="action_btn" @tap="handleSelecthouse">
<text>确定派单</text>
<text>处理</text>
</view>
</view>
</view>
@@ -75,7 +75,7 @@
<script setup>
import { ref } from 'vue'
const info = ref({
status: 1, //0待解决 1已完成
status: 0, //0待解决 1已完成
imgs: [
'https://picsum.photos/61',
'https://picsum.photos/61',
@@ -84,6 +84,11 @@ const info = ref({
'https://picsum.photos/61'
]
})
function handleSelecthouse() {
uni.navigateTo({
url: '/pageSubPack/complaint/handle'
})
}
</script>
<style scoped lang="scss">

View File

@@ -35,6 +35,10 @@ function handleClick() {
}
})
}
function handleSelecthouse() {
uni.navigateBack()
}
</script>
<style lang="scss" scoped>

View File

@@ -21,7 +21,12 @@
/>
</view>
<!-- srcoll -->
<scroll-view scroll-y="true" class="flex-1 overflow-auto">
<scroll-view
scroll-y="true"
class="flex-1 overflow-auto"
lower-threshold="60"
@scrolltolower="scrolltolower"
>
<radio-group @change="radioChange">
<label v-for="(item, index) in searchlist" :key="index">
<view
@@ -61,10 +66,8 @@
<script setup>
import { ref, onMounted, getCurrentInstance } from 'vue'
import navBar from '@/components/navbar/navbar.vue'
const Searching = ref(true)
const queryParmas = ref({
value: ''
})
/** 点击时切换到input,并聚焦 */
function handleClick() {
Searching.value = false
@@ -75,64 +78,72 @@ function handleInput() {
Searching.value = true
}
}
function handleSearch() {
console.log('search')
}
function handleSearch() {}
// -----------------------------------------
/* 选择列表 */
const searchlist = ref([
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 1
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 2
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 3
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 4
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 5
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 6
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 7
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 8
const searchlist = ref([])
const queryParmas = ref({
pageNum: 1,
pageSize: 10,
value: ''
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
])
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index
const randomStatus = Math.floor(Math.random() * 3)
return {
name: '张三' + realId,
roleName: '维修人员',
phone: '19578012123',
id: realId
}
})
// 追加数据(正确方式)
searchlist.value = [...searchlist.value, ...arr]
// 判断是否还有更多
hasMore.value = searchlist.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
reportRecords.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
//=======================
const checkoutUserid = ref(null)
const checkoutUserInfo = ref(null)
function radioChange(val) {
checkoutUserid.value = Number(val.detail.value)
const find = searchlist.value.find(item => item.id === Number(val.detail.value))
if (find) {
checkoutUserInfo.value = find
}
}
let eventChannel = null
@@ -145,17 +156,20 @@ onMounted(() => {
})
function handleSelecthouse() {
eventChannel.emit('backData', {
userid: checkoutUserid.value,
username: '张三'
})
// 3. 返回上一页
uni.navigateBack()
if (eventChannel) {
eventChannel.emit('backData', {
userid: checkoutUserid.value,
username: checkoutUserInfo.value.name
})
// 3. 返回上一页
uni.navigateBack()
}
}
</script>
<style scoped lang="scss">
.shareUser {
height: 100vh;
background-color: #f9f9f9;
.shareBody {

View File

@@ -4,10 +4,10 @@
<view class="form-item">
<text class="label">维修项目</text>
<view class="value" @click="goBackSelect">
<view>
<text v-if="!repairProject">请选择项目</text>
{{ repairProject }}
</view>
<view>
<text v-if="!repairProject">请选择项目</text>
{{ repairProject }}
</view>
<uni-icons type="arrowright" size="16"></uni-icons>
</view>
</view>
@@ -16,20 +16,33 @@
<view class="form-item">
<text class="label">标题</text>
<!-- <input type="text" placeholder="请输入问题标题" v-model="form.title" /> -->
<uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false"></uni-easyinput>
<uni-easyinput
v-model="form.title"
placeholder="请输入内容"
:inputBorder="false"
></uni-easyinput>
</view>
<!-- 问题描述 -->
<view class="form-item-wenti">
<text class="label">问题描述</text>
<!-- <textarea placeholder="请输入问题内容" v-model="form.desc" rows="5" ></textarea> -->
<uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea"></uni-easyinput>
<uni-easyinput
v-model="form.desc"
placeholder="请描述你的问题"
type="textarea"
></uni-easyinput>
</view>
<!-- 手机号 -->
<view class="form-item">
<text class="label">手机号</text>
<uni-easyinput type="number" v-model="form.phone" placeholder="请输入手机号" :inputBorder="false"></uni-easyinput>
<uni-easyinput
type="number"
v-model="form.phone"
placeholder="请输入手机号"
:inputBorder="false"
></uni-easyinput>
</view>
<!-- 图片上传 -->
@@ -56,7 +69,7 @@
<script setup>
import { ref } from 'vue'
import{onLoad} from "@dcloudio/uni-app"
import { onLoad } from '@dcloudio/uni-app'
// import { onLoad, uniShowToast, uniNavigateBack, uniChooseImage, uniUploadFile } from '@dcloudio/uni-app'
// 接收上个页面传的维修项目
@@ -71,7 +84,7 @@ const form = ref({
})
// 页面加载时获取传参
onLoad((options) => {
onLoad(options => {
if (options.category && options.project) {
repairProject.value = `${options.category}-${options.project}`
}
@@ -79,9 +92,9 @@ onLoad((options) => {
// 选择项目页
const goBackSelect = () => {
uni.navigateTo({
url:"/pageSubPack/fault-reporting/repairSelect"
})
uni.navigateTo({
url: '/pageSubPack/fault-reporting/repairSelect'
})
}
// 选择图片
@@ -90,7 +103,7 @@ const chooseImage = () => {
count: 3, // 最多选3张
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
success: res => {
// 临时文件路径
const tempFilePaths = res.tempFilePaths
form.value.images = [...form.value.images, ...tempFilePaths]
@@ -111,7 +124,7 @@ const chooseImage = () => {
}
// 删除图片
const deleteImage = (index) => {
const deleteImage = index => {
form.value.images.splice(index, 1)
}
@@ -166,7 +179,7 @@ const submitForm = () => {
display: flex;
margin-bottom: 30rpx;
align-items: flex-start;
border-bottom: 1px solid #eee;
border-bottom: 1px solid #eee;
}
.label {
width: 140rpx;
@@ -184,7 +197,8 @@ const submitForm = () => {
display: flex;
justify-content: space-between;
}
.input, .textarea {
.input,
.textarea {
font-size: 14px;
width: 100%;
padding: 8px 0;
@@ -232,7 +246,7 @@ const submitForm = () => {
}
.submit-btn {
width: 100%;
background: #4D5DFA;
background: #4d5dfa;
color: #fff;
border-radius: 6px;
height: 44px;

View File

@@ -1,75 +1,78 @@
<template>
<view class="page_container inspection_main_box">
<view class="info_box">
<view class="title_box flex items-center justify-between">
<view class="title flex items-center">
<view class="line"> </view>
<text>{{ info.taskName }}</text>
<view class="page_padding">
<view class="flex-1 flex-col flex inspection_main_box">
<view class="info_box">
<view class="title_box flex items-center justify-between">
<view class="title flex items-center">
<view class="line"> </view>
<text>{{ info.taskName }}</text>
</view>
<view class="inspection_status" v-if="info.status === 0"> <text>已巡检</text> </view>
<view class="inspection_status todo" v-else>
<text>未巡检</text>
</view>
</view>
<view class="inspection_status" v-if="info.status === 0"> <text>已巡检</text> </view>
<view class="inspection_status todo" v-else>
<text>未巡检</text>
<view class="info">
<view class="item">
<text>巡检项目:</text>
<text>{{ info.items.join('; ') }}</text>
</view>
<view class="item">
<text>巡检时间:</text>
<text>{{ info.time }}</text>
</view>
<view class="item">
<text>巡检小区:</text>
<text>{{ info.villageName }}</text>
</view>
<view class="item">
<text>巡检路线:</text>
<text>{{ info.planName }}</text>
</view>
<view class="item">
<text>巡检点:</text>
<text>{{ info.point.join('; ') }}</text>
</view>
</view>
</view>
<view class="info">
<view class="item">
<text>巡检项目:</text>
<text>{{ info.items.join('; ') }}</text>
<view class="result_box">
<view class="inspecton_result_title">
<text>巡检结果</text>
</view>
<view class="item">
<text>巡检时间:</text>
<text>{{ info.time }}</text>
<view class="inspection_body" v-for="(item, index) in result" :key="index">
<view class="inspection_items">
<text class="label">巡检点:</text>
<text>{{ item.pointName }}</text>
</view>
<view class="inspection_items">
<text class="label">巡检人:</text>
<text>{{ item.user }}</text>
</view>
<view class="inspection_items">
<text class="label">手机号码:</text>
<text>{{ item.phone }}</text>
</view>
<view class="inspection_items">
<text class="label">巡检时间:</text>
<text>{{ item.time }}</text>
</view>
<view class="inspection_items">
<view class="label">巡检结果:</view>
<view class="desction_value">{{ item.descrtion }}</view>
</view>
<view class="inspection_items">
<view class="label">巡检照片:</view>
<image
lazy-load
class="inspection_photo"
v-for="(ite, ind) in item.photos"
:key="ind"
:src="ite"
mode="scaleToFill"
></image>
</view>
<view class="linedash" v-show="index + 1 !== result.length"> </view>
</view>
<view class="item">
<text>巡检小区:</text>
<text>{{ info.villageName }}</text>
</view>
<view class="item">
<text>巡检路线:</text>
<text>{{ info.planName }}</text>
</view>
<view class="item">
<text>巡检点:</text>
<text>{{ info.point.join('; ') }}</text>
</view>
</view>
</view>
<view class="result_box">
<view class="inspecton_result_title">
<text>巡检结果</text>
</view>
<view class="inspection_body" v-for="(item, index) in result" :key="index">
<view class="inspection_items">
<text class="label">巡检点:</text>
<text>{{ item.pointName }}</text>
</view>
<view class="inspection_items">
<text class="label">巡检人:</text>
<text>{{ item.user }}</text>
</view>
<view class="inspection_items">
<text class="label">手机号码:</text>
<text>{{ item.phone }}</text>
</view>
<view class="inspection_items">
<text class="label">巡检时间:</text>
<text>{{ item.time }}</text>
</view>
<view class="inspection_items">
<view class="label">巡检结果:</view>
<view class="desction_value">{{ item.descrtion }}</view>
</view>
<view class="inspection_items">
<view class="label">巡检照片:</view>
<image
class="inspection_photo"
v-for="(ite, ind) in item.photos"
:key="index"
:src="ite"
mode="scaleToFill"
></image>
</view>
<view class="linedash" v-show="index + 1 !== result.length"> </view>
</view>
</view>
</view>
@@ -131,8 +134,16 @@ const result = ref([
</script>
<style lang="scss" scoped>
.inspection_main_box {
.page_padding {
background: #f9f9f9;
}
.inspection_main_box {
padding: 20rpx 40rpx;
background: #f9f9f9;
flex: 1;
overflow: hidden;
box-sizing: border-box;
.info_box {
padding: 40rpx 30rpx;
border-radius: 16rpx;
@@ -181,6 +192,10 @@ const result = ref([
background-color: #fff;
border-radius: 16rpx;
margin-top: 20rpx;
flex: 1;
box-sizing: border-box;
overflow: hidden;
overflow-y: auto;
.inspecton_result_title {
font-size: 32rpx;
color: #222222;

View File

@@ -1,43 +1,55 @@
<template>
<view class="page_container inspection_record_box">
<TabsComponents :tabslist="tabslist" @update="handleChangeTabs"></TabsComponents>
<view class="record_body">
<!-- v-for -->
<view class="record_item" v-for="(item, index) in list" :key="index">
<view class="time">
<view>{{ item.day }}</view>
</view>
<view class="record_list_box">
<!-- v-for -->
<view class="record_list_item" v-for="(ite, ind) in item.list" :key="ind">
<view class="title flex items-center">
<view class="title_name"> {{ ite.title }} </view>
<view class="title_status" v-if="ite.status === 0"> 已巡检 </view>
<view class="title_status noinspection" v-else> 未巡检 </view>
</view>
<view class="items">
<!-- v-for -->
<view class="item" v-for="(it, inde) in ite.items" :key="inde">
<text>{{ it }}</text>
<!-- 顶部导航栏 -->
<view class="page_padding">
<view class="inspection_record_box flex-1 flex flex-col">
<navBar @clickLeft="navBack" title="巡检记录"></navBar>
<TabsComponents :tabslist="tabslist" @update="handleChangeTabs"></TabsComponents>
<scroll-view
class="record_body record-list"
scroll-y
lower-threshold="60"
@scrolltolower="scrolltolower"
>
<!-- v-for -->
<view class="record_item" v-for="(item, index) in list" :key="index">
<view class="time">
<view>{{ item.day }}</view>
</view>
<view class="record_list_box">
<!-- v-for -->
<view class="record_list_item" v-for="(ite, ind) in item.list" :key="ind">
<view class="title flex items-center">
<view class="title_name"> {{ ite.title }} </view>
<view class="title_status" v-if="ite.status === 0"> 已巡检 </view>
<view class="title_status noinspection" v-else> 未巡检 </view>
</view>
<view class="items">
<!-- v-for -->
<view class="item" v-for="(it, inde) in ite.items" :key="inde">
<text>{{ it }}</text>
</view>
</view>
<view class="time">
<text>巡检时间:</text>
<text>{{ ite.time }}</text>
</view>
<view class="time user">
<text>巡检人:</text>
<text>{{ ite.user }}</text>
</view>
</view>
<view class="time">
<text>巡检时间:</text>
<text>{{ ite.time }}</text>
</view>
<view class="time user">
<text>巡检人:</text>
<text>{{ ite.user }}</text>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script setup lang="ts">
import TabsComponents from '@/components/tabs/tabs.vue'
import navBar from '@/components/navbar/navbar.vue'
import { ref } from 'vue'
const tabslist = [
{
name: '全部',
@@ -52,13 +64,11 @@ const tabslist = [
value: 2
}
]
function handleChangeTabs(val: number) {
console.log('选择了:', val)
}
function handleChangeTabs(val: number) {}
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
const list = [
const list = ref([
{
day: '10月11日',
list: [
@@ -77,87 +87,99 @@ const list = [
user: '湖色'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
},
{
day: '10月12日',
list: [
{
title: '标题2',
status: 1,
items: ['防火设施检查'],
time: '09:00:00-12:00:00',
user: '郧西'
}
]
}
]
])
const queryParmas = ref({
pageNum: 1,
pageSize: 5
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index // ✅ 修复 ID 错误
// ✅ 随机生成 0、1、2
const randomStatus = Math.floor(Math.random() * 2)
return {
day: '10月' + realId + '日',
list: [
{
title: '标题1',
status: randomStatus,
items: ['设备巡检'],
time: '07:00:00-09:00:00',
user: '李兴'
},
{
title: '标题3',
status: randomStatus,
items: ['设备巡检'],
time: '07:00:00-09:00:00',
user: '湖色'
}
]
}
})
// 追加数据(正确方式)
list.value = [...list.value, ...arr]
// 判断是否还有更多
hasMore.value = list.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
list.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
// ---------------------------------------------------------------------
// 返回上一页
const navBack = () => {
uni.navigateBack()
}
</script>
<style lang="scss" scoped>
.inspection_record_box {
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 50.71%);
padding: 20rpx 40rpx;
position: relative;
flex: 1;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
.record_body {
margin-top: 20rpx;
flex: 1;
overflow: hidden;
overflow-y: auto;
box-sizing: border-box;
.record_item {
& > .time {
width: 168rpx;

View File

@@ -1,76 +1,119 @@
<template>
<view class="inspection_upload_box page_container">
<view class="inspection_info_box">
<view class="inspection_title flex flex-between">
<view class="title flex">
<text class="line"></text>
<text>幸福苑小区- B1层地下车库</text>
<view class="page_padding">
<view class="inspection_upload_box flex flex-col">
<view class="inspection_info_box">
<view class="inspection_title flex flex-between">
<view class="title flex">
<text class="line"></text>
<text>幸福苑小区- B1层地下车库</text>
</view>
<view class="status">
<text>未巡检</text>
</view>
</view>
<view class="status">
<text>未巡检</text>
<view class="inspection_item_info_box">
<view class="inspection_item">
<text>巡检项目:</text>
<text>设备巡检</text>
</view>
<view class="inspection_item">
<text>巡检时间:</text>
<text>07:00:00 - 09:00:00</text>
</view>
<view class="inspection_item">
<text>巡检小区:</text>
<text>幸福苑小区</text>
</view>
<view class="inspection_item">
<text>巡检路线:</text>
<text>常规巡检路线1</text>
</view>
<view class="inspection_item">
<text>巡检点:</text>
<text>安全巡检点1;</text>
<text>安全巡检点2;</text>
<text>安全巡检点3;</text>
<text>安全巡检点4;</text>
</view>
</view>
</view>
<view class="inspection_item_info_box">
<view class="inspection_item">
<text>巡检项目:</text>
<text>设备巡检</text>
</view>
<view class="inspection_item">
<text>巡检时间:</text>
<text>07:00:00 - 09:00:00</text>
</view>
<view class="inspection_item">
<text>巡检小区:</text>
<text>幸福苑小区</text>
</view>
<view class="inspection_item">
<text>巡检路线:</text>
<text>常规巡检路线1</text>
</view>
<view class="inspection_item">
<text>巡检点:</text>
<text>安全巡检点1;</text>
<text>安全巡检点2;</text>
<text>安全巡检点3;</text>
<text>安全巡检点4;</text>
</view>
</view>
</view>
<view class="inspection_info_upload_box">
<view class="header"> <text>巡检结果</text> </view>
<view class="info_body" :key="index" v-for="(item, index) in baseFormData">
<view class="info_title" style="margin-bottom: 20rpx"> {{ item.name }} </view>
<uni-forms :modelValue="item" :rules="rules" label-position="left" label-width="150rpx">
<uni-forms-item label="巡检状态" required>
<uni-data-checkbox v-model="item.status" :localdata="statuslist" />
</uni-forms-item>
<uni-forms-item label="巡检描述">
<uni-easyinput
type="textarea"
:input-border="true"
v-model="item.desition"
placeholder="请输入"
></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="巡检时间">
<uni-datetime-picker
type="datetime"
return-type="timestamp"
v-model="item.datetimesingle"
/>
</uni-forms-item>
<uni-forms-item label="巡检照片">
<uni-file-picker v-model="item.files" file-mediatype="image">
<view class="filePicker flex-center">
<uni-icons color="#a6a6a6" type="plusempty" size="25"> </uni-icons>
<view class="inspection_info_upload_box">
<view class="header"> <text>巡检结果</text> </view>
<view class="info_body" :key="index" v-for="(item, index) in baseFormData">
<view class="info_title" style="margin-bottom: 20rpx"> {{ item.name }} </view>
<uni-forms :modelValue="item" :rules="rules" label-position="left" label-width="150">
<uni-forms-item label="巡检状态" required>
<uni-data-checkbox
:disabled="item.complated"
v-model="item.status"
:localdata="statuslist"
/>
</uni-forms-item>
<uni-forms-item label="巡检描述">
<uni-easyinput
type="textarea"
:disabled="item.complated"
:input-border="true"
v-model="item.desition"
placeholder="请输入"
></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="巡检时间">
<uni-datetime-picker
type="datetime"
:disabled="item.complated"
return-type="timestamp"
v-model="item.datetimesingle"
/>
</uni-forms-item>
<!-- <uni-forms-item label="巡检照片">
<uni-file-picker
@delete="deleteFile"
@select="select"
mode="grid"
v-model="item.files"
:auto-upload="false"
:sourceType="['camera']"
file-mediatype="image"
>
<view class="filePicker flex-center">
<uni-icons color="#a6a6a6" type="plusempty" size="25"> </uni-icons>
</view>
</uni-file-picker>
</uni-forms-item> -->
<view class="items_picker_box">
<view class="label"> 巡检照片 </view>
<view class="filePickerbox" v-if="!item.complated">
<filePicker
v-model="item.files"
:sourceType="['camera']"
file-field-name="file"
:extra-data="uploadParams"
@success="onUploadSuccess"
@fail="onUploadFail"
></filePicker>
</view>
</uni-file-picker>
</uni-forms-item>
</uni-forms>
<view class="line" v-if="index + 1 !== baseFormData.length"> </view>
</view>
<view class="submitbox">
<text>提交</text>
<view class="filePickerbox showimagegrid" v-else>
<image
class="img"
mode="scaleToFill"
v-for="(ite, ind) in item.files"
lazy-load
:key="ind"
:src="ite"
@tap="previewImages(item.files, index)"
></image>
</view>
</view>
</uni-forms>
<view class="submitbox" @tap="handleSubmit(item.id)">
<text>提交</text>
</view>
<view class="line" v-if="index + 1 !== baseFormData.length"> </view>
</view>
<!-- <view class="submitbox">
<text>提交</text>
</view> -->
</view>
</view>
</view>
@@ -78,6 +121,7 @@
<script setup>
import { ref } from 'vue'
import filePicker from '@/components/filePicker/filePicker.vue'
const statuslist = [
{
@@ -97,14 +141,16 @@ const info = ref({
id: index + ''
}
let obj = {
id: obj1.id,
id: index,
name: obj1.name,
desition: '', // 描述
datetimesingle: '', // 时间
status: 0, // 状态
status: 0, // 状态 0正常1异常
files: [], // 图片
complated: false, // 巡检点完成检查
fileUrls: '' // 图片
}
baseFormData.value.push(obj)
return obj1
})
@@ -119,15 +165,68 @@ const rules = {
]
}
}
// ----------------------------------------------
const uploadParams = ref({
type: 'repair', // 上传类型:报修
businessId: '123456', // 关联业务ID
userId: '789' // 用户ID
})
// 选择文件
function onUploadSuccess(e) {
console.log('上传成功', e)
}
function onUploadFail(e) {
console.log('上传失败', e)
}
function submit() {
console.log('最终要提交的图片URL', imageList.value)
// 这里调用你的提交接口
}
/** 提交巡检点 检查情况 */
function handleSubmit(id) {
console.log(typeof id, id, baseFormData.value)
const find = baseFormData.value.find(item => item.id === id)
if (find) {
find.complated = true
}
}
/**
* 预览图片
* @param {Array} images - 所有图片的URL数组
* @param {Number} currentIndex - 当前点击的图片索引
*/
function previewImages(images, currentIndex) {
uni.previewImage({
urls: [
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80'
],
current: currentIndex
})
}
</script>
<style scoped lang="scss">
.inspection_upload_box {
background: #f9f9f9;
padding: 20rpx 40rpx;
position: relative;
flex: 1;
overflow: hidden;
box-sizing: border-box;
.inspection_info_box {
background-color: #ffffff;
padding: 20rpx 40rpx;
margin-bottom: 20rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border-radius: 16rpx;
.inspection_title {
margin-bottom: 20rpx;
.title {
@@ -153,6 +252,7 @@ const rules = {
}
.inspection_item_info_box {
width: 100%;
.inspection_item {
margin-bottom: 20rpx;
font-weight: 400;
@@ -163,10 +263,13 @@ const rules = {
}
}
.inspection_info_upload_box {
border-radius: 16rpx 16rpx 16rpx 16rpx;
border-radius: 16rpx;
background-color: #fff;
padding: 30rpx 40rpx;
min-height: 500rpx;
flex: 1;
box-sizing: border-box;
overflow: hidden;
overflow-y: auto;
.header {
font-weight: 500;
font-size: 32rpx;
@@ -184,10 +287,27 @@ const rules = {
width: 100%;
border: 1rpx dashed #ccc;
}
.filePicker {
width: 160rpx;
height: 160rpx;
background: #f3f3f3;
.items_picker_box {
.label {
text-align: left;
font-size: 14px;
color: #606266;
height: 36px;
padding: 0 12px 0 0;
vertical-align: middle;
box-sizing: border-box;
}
.showimagegrid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
width: 100%;
.img {
width: 160rpx;
height: 160rpx;
}
}
}
}
.submitbox {

View File

@@ -1,46 +1,40 @@
<template>
<view class="today_inspection_page">
<!-- tabs -->
<view class="tabs_box">
<view
v-for="(item, index) in tabslist"
:key="index"
@tap="handleTabs(item)"
class="tabs_items"
:class="{
active: item.value === activeValue
}"
>
{{ item.name }}
</view>
</view>
<!-- tabs -->
<view class="page_padding">
<view class="today_inspection_page flex flex-col">
<!-- 状态筛选标签 -->
<TabsComponents :tabslist="tabslist" @update="handleTabs"></TabsComponents>
<!-- body -->
<view class="inspection_body">
<view class="inspection_items" v-for="(item, index) in list" :key="index">
<view class="title">
<text class="subtitle">
<i></i>
{{ item.address }}
</text>
<text class="noactions" v-if="item.status === 0">未巡检</text>
<text class="noactions alaway_actions" v-else>已巡检</text>
</view>
<view class="inspection_item_box">
<text class="inspection_item" v-for="(ite, index) in item.item" :key="index">
{{ ite }}
</text>
</view>
<view class="inspection_time">
<text>巡检时间:</text>
<text>{{ item.time }}</text>
</view>
<view class="inspection_time">
<text>巡检人:</text>
<text>{{ item.user }}</text>
<view class="actions" v-if="item.status === 0" @tap="gotoInspection">
<text>去巡检</text>
<!-- body -->
<view class="inspection_body flex-1">
<view
class="inspection_items"
v-for="(item, index) in list"
:key="index"
@tap="gotoInspection(item)"
>
<view class="title">
<text class="subtitle">
<i></i>
{{ item.address }}
</text>
<text class="noactions" v-if="item.status === 0">未巡检</text>
<text class="noactions alaway_actions" v-else>已巡检</text>
</view>
<view class="inspection_item_box flex">
<text class="inspection_item" v-for="(ite, index) in item.item" :key="index">
{{ ite }}
</text>
</view>
<view class="inspection_time">
<text>巡检时间:</text>
<text>{{ item.time }}</text>
</view>
<view class="inspection_time">
<text>巡检人:</text>
<text>{{ item.user }}</text>
<view class="actions" v-if="item.status === 0">
<text>去巡检</text>
</view>
</view>
</view>
</view>
@@ -51,6 +45,7 @@
<script setup lang="ts">
import { ref, computed } from 'vue'
import TabsComponents from '@/components/tabs/tabs.vue'
// tabs =========================================================
const activeValue = ref(0)
const tabslist = ref([
@@ -59,36 +54,69 @@ const tabslist = ref([
value: 0
},
{
name: '已完成',
name: '未巡检',
value: 1
},
{
name: '已派单',
name: '已巡检',
value: 2
}
])
// 点击事件
const handleTabs = (val: { name: string; value: number }) => {
activeValue.value = val.value
const handleTabs = (val: number) => {
activeValue.value = val
}
// tabs =========================================================
// body =========================================================
/** 跳转到巡检上传页面 */
const gotoInspection = () => {
console.log('upload')
uni.navigateTo({
url: '/pageSubPack/inspection/inspection_upload'
})
// 0未巡检 1已巡检
const gotoInspection = row => {
if (row.status === 0) {
uni.navigateTo({
url: '/pageSubPack/inspection/inspection_upload'
})
} else {
uni.navigateTo({
url: '/pageSubPack/inspection/inspection_main'
})
}
}
// body =========================================================
const list = ref([
{
address: '幸福苑小区- B1层地下车库',
time: '07:00:00 -09:00:00',
item: ['防火设施安全巡检'],
item: [
'防火设施安全巡检',
'防火设施安全巡检',
'防火设施安全巡检',
'防火设施安全巡检',
'防火设施安全巡检'
],
user: '李相龙',
status: 0 // 0未巡检 1已巡检
},
{
address: '幸福苑小区- B2层地下车库',
time: '13:00:00 -15:00:00',
item: ['设备巡检'],
user: '李相龙',
status: 1 // 0未巡检 1已巡检
},
{
address: '幸福苑小区- B2层地下车库',
time: '13:00:00 -15:00:00',
item: ['设备巡检'],
user: '李相龙',
status: 1 // 0未巡检 1已巡检
},
{
address: '幸福苑小区- B2层地下车库',
time: '13:00:00 -15:00:00',
item: ['设备巡检'],
user: '李相龙',
status: 1 // 0未巡检 1已巡检
},
{
address: '幸福苑小区- B2层地下车库',
time: '13:00:00 -15:00:00',
@@ -101,11 +129,16 @@ const list = ref([
<style scoped lang="scss">
/* 页面容器 */
.page_padding {
background: #f9f9f9;
}
.today_inspection_page {
padding: 20rpx 40rpx 40rpx;
min-height: 100vh;
max-height: 100vh;
background: repeating-linear-gradient(180deg, #e2f0ff, #f6faff);
background: #f9f9f9;
padding: 20rpx 40rpx;
flex: 1;
box-sizing: border-box;
overflow: hidden;
// tabs
.tabs_box {
@@ -151,9 +184,8 @@ const list = ref([
.inspection_items {
margin-top: 20rpx;
padding: 40rpx;
background-color: #fff;
border-radius: 16rpx;
background-color: #ffffff;
.title {
display: flex;
align-items: center;
@@ -195,17 +227,20 @@ const list = ref([
.inspection_item_box {
margin-top: 20rpx;
margin-bottom: 20rpx;
flex-wrap: wrap;
.inspection_item {
border: 1px solid #4d5dfa;
margin-bottom: 10rpx;
margin-right: 10rpx;
padding: 0 14rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 198rpx 198rpx 198rpx 198rpx;
border: 2rpx solid #4d5dfa;
font-size: 28rpx;
color: #4d5dfa;
line-height: 36rpx;
}
}

View File

@@ -81,9 +81,7 @@ function handleScan() {
})
}
function handleSubmit() {
console.log(formData.value)
}
function handleSubmit() {}
</script>
<style lang="scss" scoped>

View File

@@ -53,9 +53,8 @@ import { ref, getCurrentInstance, onMounted } from 'vue'
const Searching = ref(true)
const queryParmas = ref({
value: '',
pageNum: 1,
pageSize: 12
pageSize: 10
})
/** 点击时切换到input,并聚焦 */
function handleClick() {
@@ -67,38 +66,69 @@ function handleInput() {
Searching.value = true
}
}
function handleSearch() {
console.log('search')
}
function handleSearch() {}
const checkoutHouseid = ref(null)
const checkoutHouseInfo = ref(null)
/** 选择房屋,返回id*/
function radioChange(res) {
checkoutHouseid.value = Number(res.detail.value)
}
//
const searchlist = ref()
function getlist() {
const allnum = queryParmas.value.pageNum * queryParmas.value.pageSize
if (allnum < 50) {
searchlist.value = Array.from({ length: allnum }).map((_, index) => {
return {
address: 'A栋3单元301',
username: '里番',
id: index + 1
}
})
const find = searchlist.value.find(item => item.id === Number(res.detail.value))
if (find) {
checkoutHouseInfo.value = find
}
}
getlist()
// -0---------------------------------------
const searchlist = ref([])
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index // ✅ 修复 ID 错误
return {
id: realId,
username: '李赫',
address: 'A栋3单元3' + realId
}
})
// 追加数据(正确方式)
searchlist.value = [...searchlist.value, ...arr]
// 判断是否还有更多
hasMore.value = searchlist.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
searchlist.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
// -0---------------------------------------
let eventChannel = null
// 必须在 onMounted 里获取
onMounted(() => {
@@ -109,11 +139,11 @@ onMounted(() => {
})
function handleSelecthouse() {
// 2. 发送数据 (触发 A 页面定义的 'backData' 事件)
console.log(eventChannel)
console.log(checkoutHouseInfo.value)
if (!eventChannel) return
eventChannel.emit('backData', {
Houseid: checkoutHouseid.value,
HouseName: 'A栋3单元301'
HouseName: checkoutHouseInfo.value.address
})
// 3. 返回上一页
uni.navigateBack()

View File

@@ -1,36 +1,41 @@
<template>
<view class="page_container replacement_record_box flex flex-col">
<view class="nav flex items-center">
<view class="line"></view>
<text class="title">仪表换新记录</text>
</view>
<TabsComponents :tabslist="tabslist" @update="handleChangeTabs"></TabsComponents>
<view class="instrument_body flex-1 flex">
<scroll-view scroll-y lower-threshold="160" @scrolltolower="scrolltolower">
<view
class="instrument_items flex items-center flex-between"
v-for="(item, index) in infolist"
:key="index"
>
<view class="flex items-center">
<image src="/static/imgs/home.png" class="icon" mode=""></image>
<view class="instrument_info">
<view class="instrument_title">
<text>{{ item.title }}</text>
</view>
<view class="instrument_time">
<text>换新时间时间:{{ item.time }}</text>
<view class="page_padding">
<view class="replacement_record_box flex-1 flex flex-col">
<view class="nav flex items-center">
<view class="line"></view>
<text class="title">仪表换新记录</text>
</view>
<TabsComponents :tabslist="tabslist" @update="handleChangeTabs"></TabsComponents>
<view class="instrument_body flex-1 flex">
<scroll-view scroll-y lower-threshold="160" @scrolltolower="scrolltolower">
<view
class="instrument_items flex items-center flex-between"
v-for="(item, index) in infolist"
:key="index"
>
<view class="flex items-center">
<image lazy-load src="/static/imgs/home.png" class="icon" mode=""></image>
<view class="instrument_info">
<view class="instrument_title">
<text>{{ item.title }}</text>
</view>
<view class="instrument_time">
<text>换新时间时间:{{ item.time }}</text>
</view>
</view>
</view>
<view class="instrument_type">
<text v-if="item.type === 2">电表</text>
<text v-else>水表</text>
</view>
</view>
<view class="instrument_type">
<text v-if="item.type === 2">电表</text>
<text v-else>水表</text>
</view>
</view>
<!-- 底部加载状态提示 -->
<uni-load-more :status="statusmore"></uni-load-more>
</scroll-view>
<!-- 底部加载状态提示 -->
<uni-load-more :status="statusmore"></uni-load-more>
</scroll-view>
</view>
<view class="action_btn" @tap="handleClick">
<text>新增</text>
</view>
</view>
</view>
</template>
@@ -73,54 +78,74 @@ function handleChangeTabs(val: number) {
getlist()
}
// ---------------------------------------------------------------------
const infolist = ref([])
const queryParmas = ref({
pageNum: 1,
pageSize: 15
pageSize: 10
})
const infolist = ref([])
const total = ref(21)
function scrolltolower() {
if (hasMore.value) {
queryParmas.value.pageNum += 1
getlist()
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
uni.showLoading({
title: '加载中',
mask: true
})
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
const all = queryParmas.value.pageNum * queryParmas.value.pageSize
if (all > 50) {
isLoading.value = false
uni.hideLoading()
hasMore.value = false
return
}
const arr = Array.from({ length: all }).map((_, index) => {
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index // ✅ 修复 ID 错误
// ✅ 随机生成 0、1、2
const randomStatus = Math.floor(Math.random() * 2)
return {
title: 'M2栋3单元18' + index + '室(M2-3-1801)',
title: 'M2栋3单元18' + realId + '室(M2-3-1801)',
time: '2023-08-01 10:05:46',
type: 1 //1水表 2电表
type: randomStatus //1水表 2电表
}
})
hasMore.value = true
nextTick(() => {
infolist.value = [...infolist.value, ...arr]
isLoading.value = false
uni.hideLoading()
})
// 追加数据(正确方式)
infolist.value = [...infolist.value, ...arr]
// 判断是否还有更多
hasMore.value = infolist.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
infolist.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
function handleClick() {
uni.navigateTo({
url: '/pageSubPack/instrument/addreplacement'
})
}
</script>
<style scoped lang="scss">
.replacement_record_box {
background: #f9f9f9;
padding: 20rpx 40rpx;
position: relative;
flex: 1;
overflow: hidden;
box-sizing: border-box;
.nav {
margin-bottom: 40rpx;
font-weight: 550;
@@ -139,7 +164,6 @@ getlist()
overflow: hidden;
margin-top: 20rpx;
box-sizing: border-box;
background-color: #4d5dfa;
.instrument_items {
box-sizing: border-box;
background: #ffffff;
@@ -174,5 +198,18 @@ getlist()
}
}
}
.action_btn {
width: 100%;
height: 80rpx;
background: #4d5dfa;
border-radius: 8rpx;
text-align: center;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
line-height: 80rpx;
margin-top: 20rpx;
}
}
</style>

View File

@@ -1,99 +1,111 @@
<template>
<view class="report-record-page">
<view class="status-bar"></view>
<view class="report-record-page page_padding">
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="back"
title="上报记录"
backgroundColor="transparent"
:border= "false"
@clickLeft="navBack"/>
<navBar @clickLeft="navBack" title="上报记录"></navBar>
<view class="hall_body flex-1 flex flex-col">
<view class="bgaction"> </view>
<!-- 状态筛选标签 -->
<TabsComponents
:tabslist="statusTabs"
:options="{ label: 'label', value: 'value' }"
@update="switchStatus"
></TabsComponents>
<!-- 状态筛选标签 -->
<view class="status-tabs">
<view
v-for="item in statusTabs"
:key="item.value"
class="status-tab-item"
:class="{ active: activeStatus === item.value }"
@tap="switchStatus(item.value)"
>
{{ item.label }}
</view>
</view>
<!-- 类型筛选标签 -->
<view class="type-tabs">
<view
v-for="item in typeTabs"
:key="item.value"
class="type-tab-item"
:class="{ active: activeType === item.value }"
@tap="switchType(item.value)"
>
{{ item.label }}
</view>
</view>
<!-- 上报记录列表 -->
<scroll-view
class="record-list"
scroll-y
: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 class="type-tabs">
<view
v-for="item in typeTabs"
:key="item.value"
class="type-tab-item"
:class="{ active: activeType === item.value }"
@tap="switchType(item.value)"
>
{{ item.label }}
</view>
</view>
<!-- 记录卡片 -->
<view
v-for="record in filteredRecords"
:key="record.id"
class="record-card"
<!-- 上报记录列表 -->
<scroll-view
class="record-list flex-1"
scroll-y
lower-threshold="60"
@scrolltolower="scrolltolower"
>
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
<view class="status-tag" :class="record.status">
{{ getStatusText(record.status) }}
<!-- 空状态 -->
<view v-if="reportRecords.length === 0" class="empty-state">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">暂无上报记录</text>
</view>
<!-- 记录卡片 -->
<view
v-for="(record, index) in reportRecords"
:key="index"
class="record-card"
@tap="handleMain(record.id)"
>
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
<view
class="status-tag"
:class="{
pending: record.repairStatus === 0,
processing: record.repairStatus === 1,
completed: record.repairStatus === 2
}"
>
{{ getStatusText(record.repairStatus) }}
</view>
</view>
<!-- 类型标签 -->
<view class="tag-group">
<view class="tag-item">{{ record.reportType }}</view>
<view class="tag-item">{{ record.category }}</view>
</view>
<!-- 内容 -->
<view class="card-content">
{{ record.content }}
</view>
<!-- 工单图片 -->
<!-- <view class="card-image">
<image
v-for="(item, index) in record.images"
:key="index"
lazy-load
:src="item"
class="images"
mode="scaleToFill"
@tap="handlePrivew(record.images)"
></image>
</view> -->
<!-- 底部信息 -->
<view class="card-footer">
<text class="create-time">{{ record.createTime }}</text>
<text v-if="record.repairStatus !== 0" class="repairman"
>维修师傅:{{ record.repairman }}</text
>
<!-- <view class="share" v-if="record.repairStatus === 0">
<text>分配</text>
</view> -->
</view>
</view>
<!-- 类型标签 -->
<view class="tag-group">
<view class="tag-item">{{ record.reportType }}</view>
<view class="tag-item">{{ record.category }}</view>
</view>
<!-- 内容 -->
<view class="card-content">
{{ record.content }}
</view>
<!-- 底部信息 -->
<view class="card-footer">
<text class="create-time">{{ record.createTime }}</text>
<text v-if="record.repairman" class="repairman">维修师傅:{{ record.repairman }}</text>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue'
import {onReady} from "@dcloudio/uni-app"
// 导航栏/标签高度(适配不同设备)
const navHeight = ref(44)
const statusTabHeight = ref(88)
const typeTabHeight = ref(88)
import { onReady } from '@dcloudio/uni-app'
import TabsComponents from '@/components/tabs/tabs.vue'
import NavBar from '@/components/navbar/navbar.vue'
// 筛选状态
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
const activeType = ref('all') // 全部/公共报修/个人报修
const activeType = ref('all') // 全部/公共报修/个人报修
// 状态筛选选项
const statusTabs = ref([
@@ -111,101 +123,144 @@ const typeTabs = ref([
])
// 模拟上报记录数据(实际项目替换为接口请求)
const reportRecords = ref([
{
id: 1,
title: '标题巴拉巴拉巴拉',
status: 'pending', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: ''
},
{
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: '张三'
}
])
const reportRecords = ref([])
// 筛选后的记录
const filteredRecords = computed(() => {
return reportRecords.value.filter(record => {
// 状态筛选
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
// 类型筛选
const typeMatch = activeType.value === 'all' || record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
return statusMatch && typeMatch
})
const queryParmas = ref({
pageNum: 1,
pageSize: 5,
value: ''
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index
const randomStatus = Math.floor(Math.random() * 3)
return {
id: realId,
title: '标题巴拉巴拉巴拉',
status: 'pending', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三' + realId,
images: [
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93'
],
repairStatus: randomStatus // 0 待分配,1待解决 2已完成
}
})
// 追加数据(正确方式)
reportRecords.value = [...reportRecords.value, ...arr]
// 判断是否还有更多
hasMore.value = reportRecords.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
reportRecords.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
// 0-------------------------------
// 切换状态(全部/待分配/待解决/已完成)筛选
const switchStatus = (value) => {
const switchStatus = value => {
activeStatus.value = value
}
// 切换类型(公共/个人)筛选
const switchType = (value) => {
const switchType = value => {
activeType.value = value
}
const statusMap = ['待分配', '待解决', '已完成']
// 获取状态文本
const getStatusText = status => {
return statusMap[status] || ''
}
// 返回上一页
const navBack = () => {
uni.switchTab({
url:"/pages/my/my"
url: '/pages/my/my'
})
}
// 获取状态文本
const getStatusText = (status) => {
const statusMap = {
pending: '待分配',
processing: '待解决',
completed: '已完成'
}
return statusMap[status] || ''
}
// 页面渲染完成后适配高度
onReady(() => {
// 可根据实际设备调整高度
uni.getSystemInfo({
success: (res) => {
if (res.platform === 'ios') {
navHeight.value = 44
} else {
navHeight.value = 48
}
/* 0 待分配,1待解决 2已完成*/
function handleMain(id) {
const find = reportRecords.value.find(item => item.id === id)
if (find) {
const status = find.repairStatus
if (status === 2) {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
} else {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
}
})
})
}
}
/* 预览图片 */
function handlePrivew(imgs) {
// if (imgs.length > 0) {
// uni.previewImage({
// urls: imgs,
// success(e) {
// console.log(JSON.stringify(e))
// }
// })
// }
}
</script>
<style scoped>
.report-record-page {
.bgaction {
position: absolute;
right: 0;
top: 20%;
width: 100%;
height: 100vh;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%)
height: 100%;
z-index: 0;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25%);
}
.status-bar{
width: 100%;
height: 46px;
.report-record-page {
height: 100vh;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25.71%);
}
.hall_body {
padding: 0 40rpx;
overflow: hidden;
position: relative;
}
/* 状态筛选标签 */
.status-tabs {
@@ -216,66 +271,40 @@ onReady(() => {
align-items: center;
}
.status-tab-item {
/* flex: 1; */
display: flex;
justify-content: flex-start;
margin-right: 60rpx;
text-align: left;
font-size: 32rpx;
color: #666;
height: 100%;
line-height: 88rpx;
position: relative;
}
.status-tab-item.active {
color: #4D5DFA;
font-weight: 500;
}
.status-tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 8rpx;
background: linear-gradient(to bottom, #4D5DFA, #BAC0FA);
border-radius: 6rpx;
}
/* 类型筛选标签 */
.type-tabs {
display: flex;
height: 48rpx;
/* background-color: #fff; */
padding: 20rpx 0rpx;
margin-top: 10rpx;
margin: 20rpx 0;
justify-content: flex-start;
gap: 20rpx;
margin: 0rpx 40rpx;
}
.type-tab-item {
padding: 12rpx 30rpx;
width: 142rpx;
height: 48rpx;
border-radius: 24rpx;
border: 2rpx solid #999999;
font-weight: 400;
font-size: 28rpx;
color: #999;
border: 2rpx solid #999;
border-radius: 198rpx;
color: #999999;
line-height: 48rpx;
text-align: center;
}
.type-tab-item.active {
color: #4D5DFA;
border: 2rpx solid #4D5DFA;
border-radius: 198rpx;
/* background-color: #007AFF; */
color: #4d5dfa;
border: 2rpx solid #4d5dfa;
border-radius: 24rpx;
}
/* 记录列表 */
.record-list {
padding: 20rpx 40rpx;
box-sizing: border-box;
padding-bottom: 40rpx;
overflow: auto;
}
/* 空状态 */
@@ -298,7 +327,7 @@ onReady(() => {
.record-card {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
padding: 34rpx 32rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
@@ -311,54 +340,80 @@ onReady(() => {
}
.card-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-right: 20rpx;
font-weight: 450;
font-size: 32rpx;
color: #222222;
line-height: 40rpx;
}
/* 状态标签 */
.status-tag {
padding: 6rpx 16rpx;
width: 82rpx;
height: 30rpx;
border-radius: 15rpx;
font-weight: 400;
font-size: 20rpx;
border-radius: 12rpx;
color: #fff;
border-radius: 198rpx;
color: #ffffff;
line-height: 30rpx;
text-align: center;
line-height: 30rpx;
}
.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; /* 已完成-蓝色 */
}
/* 类型标签组 */
.tag-group {
display: flex;
gap: 15rpx;
gap: 20rpx;
margin-bottom: 20rpx;
}
.tag-item {
padding: 6rpx 20rpx;
width: 112rpx;
height: 42rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 1rpx solid #999999;
font-weight: 400;
font-size: 24rpx;
color: #666;
border: 1rpx solid #999;
border-radius: 8rpx;
color: #999999;
line-height: 42rpx;
text-align: center;
}
/* 内容 */
.card-content {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 20rpx;
font-weight: 450;
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
letter-spacing: 2rpx;
}
/* 图片 */
.card-image {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
min-width: 186rpx;
min-height: 104rpx;
margin-bottom: 20rpx;
}
.images {
width: 186rpx;
height: 104rpx;
}
/* 底部信息 */
@@ -368,9 +423,21 @@ onReady(() => {
align-items: center;
font-size: 28rpx;
color: #999;
}
.repairman {
color: #999;
font-weight: 400;
font-size: 28rpx;
line-height: 40rpx;
}
.share {
width: 127rpx;
height: 44rpx;
background: #4d5dfa;
border-radius: 22rpx;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
line-height: 44rpx;
text-align: center;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<view class="setting-container">
<view class="status_bar"></view>
<view class="status_bar"></view>
<!-- 顶部导航栏 -->
<view class="nav-bar">
<view class="nav-left" @tap="goBack">
@@ -22,14 +22,16 @@
<!-- 修改密码设置项 -->
<view class="setting-item" @tap="goToModifyPassword">
<view class="item-label">修改密码</view>
<view class="item-value">{{passwordNumber}}</view>
<view class="item-value">{{ passwordNumber }}</view>
<uni-icons type="arrowright" size="20" color="#ccc"></uni-icons>
</view>
</scroll-view>
<!-- 退出登录按钮 -->
<view class="logout-btn-wrap">
<button class="logout-btn" :disabled="!phoneNumber || !passwordNumber" @tap="handleLogout">退出登录</button>
<button class="logout-btn" :disabled="!phoneNumber || !passwordNumber" @tap="handleLogout">
退出登录
</button>
</view>
</view>
</template>
@@ -43,11 +45,11 @@ const phoneNumber = ref('15699991212') // 绑定手机号
const passwordNumber = ref('')
// 页面加载时可从接口获取用户信息
onLoad((option) => {
onLoad(option => {
// console.log('option',option)
passwordNumber.value = option.newPassword
const userInfo = uni.getStorageSync('tempChangePwdParams')
if(userInfo.phoneNumber){
if (userInfo.phoneNumber) {
phoneNumber.value = userInfo.phoneNumber
}
})
@@ -55,7 +57,7 @@ onLoad((option) => {
// 返回上一页
const goBack = () => {
uni.switchTab({
url:"/pages/my/my"
url: '/pages/my/my'
})
}
@@ -80,7 +82,7 @@ const handleLogout = () => {
content: '确定要退出当前账号吗?',
confirmText: '确定',
cancelText: '取消',
success: (res) => {
success: res => {
if (res.confirm) {
confirmLogout() // 确认退出
}
@@ -96,7 +98,7 @@ const confirmLogout = () => {
setTimeout(() => {
uni.hideLoading()
// 清除本地存储的token等信息
uni.clearStorageSync()
uni.clearStorageSync()
// uni.removeStorageSync('token')
// uni.removeStorageSync('userInfo')
// uni.removeStorageSync('tempChangePwdParams')
@@ -123,9 +125,9 @@ const confirmLogout = () => {
display: flex;
flex-direction: column;
}
.status_bar{
width: 100%;
height: 46px;
.status_bar {
width: 100%;
height: 46px;
}
/* 导航栏样式 */
.nav-bar {
@@ -201,7 +203,7 @@ const confirmLogout = () => {
width: 100%;
height: 44px;
line-height: 44px;
background-color: #4D5DFA;
background-color: #4d5dfa;
color: #fff;
border: none;
border-radius: 6px;

View File

@@ -1,8 +1,9 @@
<template>
<view class="report-record-page page_padding">
<!-- 顶部导航栏 -->
<NavBar title="工单大厅"></NavBar>
<view class="hall_body flex-1 flex flex-col">
<navBar @clickLeft="navBack" title="工单大厅"></navBar>
<view class="hall_body flex flex-col">
<view class="bgaction"> </view>
<!-- 状态筛选标签 -->
<TabsComponents
:tabslist="statusTabs"
@@ -24,23 +25,31 @@
</view>
<!-- 上报记录列表 -->
<scroll-view
class="record-list flex-1"
scroll-y
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
>
<scroll-view class="record-list" scroll-y lower-threshold="60" @scrolltolower="scrolltolower">
<!-- 空状态 -->
<view v-if="filteredRecords.length === 0" class="empty-state">
<view v-if="reportRecords.length === 0" class="empty-state">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">暂无上报记录</text>
</view>
<!-- 记录卡片 -->
<view v-for="record in filteredRecords" :key="record.id" class="record-card">
<view
v-for="(record, index) in reportRecords"
:key="index"
class="record-card"
@tap="handleMain(record.id)"
>
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
<view class="status-tag" :class="record.status">
{{ getStatusText(record.status) }}
<view
class="status-tag"
:class="{
pending: record.repairStatus === 0,
processing: record.repairStatus === 1,
completed: record.repairStatus === 2
}"
>
{{ getStatusText(record.repairStatus) }}
</view>
</view>
@@ -55,8 +64,9 @@
{{ record.content }}
</view>
<!-- 工单图片 -->
<view class="card-image">
<view class="card-image" v-if="record.images.length > 0">
<image
lazy-load
v-for="(item, index) in record.images"
:key="index"
:src="item"
@@ -83,26 +93,23 @@
</template>
<script setup>
import { ref, computed } from 'vue'
import { ref, computed, nextTick } from 'vue'
import { onReady } from '@dcloudio/uni-app'
import TabsComponents from '@/components/tabs/tabs.vue'
import NavBar from '@/components/navbar/navbar.vue'
// 导航栏/标签高度(适配不同设备)
const navHeight = ref(44)
const statusTabHeight = ref(88)
const typeTabHeight = ref(88)
// 筛选状态
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
const activeStatus = ref('0') // 全部/待分配/待解决/已完成
const activeType = ref('all') // 全部/公共报修/个人报修
// 状态筛选选项
const statusTabs = ref([
{ label: '全部', value: 'all' },
{ label: '待分配', value: 'pending' },
{ label: '待解决', value: 'processing' },
{ label: '已完成', value: 'completed' }
{ label: '全部', value: 0 },
{ label: '待分配', value: 1 },
{ label: '待解决', value: 2 },
{ label: '已完成', value: 3 }
])
// 类型筛选选项
@@ -113,97 +120,105 @@ const typeTabs = ref([
])
// 模拟上报记录数据(实际项目替换为接口请求)
const reportRecords = ref([
{
id: 1,
title: '标题巴拉巴拉巴拉',
status: 'pending', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '',
images: [
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93'
],
repairStatus: 0 // 0 待分配,1待解决 2已完成
},
{
id: 2,
title: '标题巴拉巴拉巴拉',
status: 'processing',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三',
images: ['https://picsum.photos/93', 'https://picsum.photos/93', 'https://picsum.photos/93'],
repairStatus: 1 // 0 待分配,1待解决 2已完成
},
{
id: 3,
title: '标题巴拉巴拉巴拉',
status: 'completed',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
images: ['https://picsum.photos/93', 'https://picsum.photos/93', 'https://picsum.photos/93'],
repairman: '张三',
repairStatus: 2 // 0 待分配,1待解决 2已完成
}
])
const reportRecords = ref([])
// 筛选后的记录
const filteredRecords = computed(() => {
return reportRecords.value.filter(record => {
// 状态筛选
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
// 类型筛选
const typeMatch =
activeType.value === 'all' ||
record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
return statusMatch && typeMatch
})
const queryParmas = ref({
pageNum: 1,
pageSize: 5
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index // ✅ 修复 ID 错误
// ✅ 随机生成 0、1、2
const randomStatus = Math.floor(Math.random() * 3)
return {
id: realId,
title: '标题巴拉巴拉巴拉' + startId + 1,
status: 'completed',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
images: ['https://picsum.photos/93', 'https://picsum.photos/93', 'https://picsum.photos/93'],
repairman: '张三',
repairStatus: randomStatus // 0 待分配,1待解决 2已完成
}
})
// 追加数据(正确方式)
reportRecords.value = [...reportRecords.value, ...arr]
// 判断是否还有更多
hasMore.value = reportRecords.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
reportRecords.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
// 切换状态(全部/待分配/待解决/已完成)筛选
const switchStatus = value => {
activeStatus.value = value
resetList()
}
// 切换类型(公共/个人)筛选
const switchType = value => {
activeType.value = value
resetList()
}
const statusMap = ['待分配', '待解决', '已完成']
// 获取状态文本
const getStatusText = status => {
const statusMap = {
pending: '待分配',
processing: '待解决',
completed: '已完成'
}
return statusMap[status] || ''
}
// 页面渲染完成后适配高度
onReady(() => {
// 可根据实际设备调整高度
uni.getSystemInfo({
success: res => {
if (res.platform === 'ios') {
navHeight.value = 44
} else {
navHeight.value = 48
}
// 返回上一页
const navBack = () => {
uni.navigateBack()
}
/* 0 待分配,1待解决 2已完成*/
function handleMain(id) {
const find = reportRecords.value.find(item => item.id === id)
if (find) {
const status = find.repairStatus
if (status === 2) {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
} else {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
}
})
})
}
}
/* 预览图片 */
function handlePrivew(imgs) {
@@ -219,18 +234,25 @@ function handlePrivew(imgs) {
</script>
<style scoped>
.report-record-page {
.bgaction {
position: absolute;
right: 0;
top: 20%;
width: 100%;
min-height: 100vh;
max-height: 100vh;
overflow: hidden;
box-sizing: border-box;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 50.71%);
height: 100%;
z-index: 0;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25%);
}
.report-record-page {
height: 100vh;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25.71%);
}
.hall_body {
flex: 1;
padding: 0 40rpx;
overflow: hidden;
position: relative;
}
/* 状态筛选标签 */
.status-tabs {
@@ -241,36 +263,6 @@ function handlePrivew(imgs) {
align-items: center;
}
.status-tab-item {
/* flex: 1; */
display: flex;
justify-content: flex-start;
margin-right: 60rpx;
text-align: left;
font-size: 32rpx;
color: #666;
height: 100%;
line-height: 88rpx;
position: relative;
}
.status-tab-item.active {
color: #4d5dfa;
font-weight: 500;
}
.status-tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 8rpx;
background: linear-gradient(to bottom, #4d5dfa, #bac0fa);
border-radius: 6rpx;
}
/* 类型筛选标签 */
.type-tabs {
display: flex;
@@ -304,6 +296,8 @@ function handlePrivew(imgs) {
.record-list {
box-sizing: border-box;
padding-bottom: 40rpx;
overflow-y: auto;
flex: 1;
}
/* 空状态 */

View File

@@ -1,7 +1,7 @@
<template>
<view class="report-record-page page_padding">
<!-- 顶部导航栏 -->
<NavBar title="我的工单"></NavBar>
<navBar @clickLeft="navBack" title="我的工单"></navBar>
<view class="hall_body flex-1 flex flex-col">
<!-- 状态筛选标签 -->
<TabsComponents
@@ -27,15 +27,21 @@
<scroll-view
class="record-list flex-1"
scroll-y
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
lower-threshold="60"
@scrolltolower="scrolltolower"
>
<!-- 空状态 -->
<view v-if="filteredRecords.length === 0" class="empty-state">
<view v-if="reportRecords.length === 0" class="empty-state">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">暂无上报记录</text>
</view>
<!-- 记录卡片 -->
<view v-for="record in filteredRecords" :key="record.id" class="record-card">
<view
v-for="(record, index) in reportRecords"
@tap="handleComplted(record.id)"
:key="index"
class="record-card"
>
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
@@ -55,24 +61,24 @@
{{ record.content }}
</view>
<!-- 工单图片 -->
<view class="card-image">
<!-- <view class="card-image">
<image
lazy-load
v-for="(item, index) in record.images"
:key="index"
:src="item"
class="images"
mode="scaleToFill"
@tap="handlePrivew(record.images)"
></image>
</view>
</view -->
<!-- 底部信息 -->
<view class="card-footer">
<text class="create-time">{{ record.createTime }}</text>
<text v-if="record.repairStatus === 1" class="repairman"
<text v-if="record.repairStatus === 2" class="repairman"
>维修师傅:{{ record.repairman }}</text
>
<view class="share" v-if="record.repairStatus === 0">
<view class="share" v-if="record.repairStatus === 1">
<text>维修完成</text>
</view>
</view>
@@ -121,7 +127,7 @@ const reportRecords = ref([
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '',
repairman: '张胜',
images: [
'https://picsum.photos/93',
'https://picsum.photos/93',
@@ -129,46 +135,74 @@ const reportRecords = ref([
'https://picsum.photos/93',
'https://picsum.photos/93'
],
repairStatus: 0 // 0 待分配,1待解决 2已完成
},
{
id: 2,
title: '标题巴拉巴拉巴拉',
status: 'processing',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三',
images: ['https://picsum.photos/93', 'https://picsum.photos/93', 'https://picsum.photos/93'],
repairStatus: 1 // 0 待分配,1待解决 2已完成
},
{
id: 3,
title: '标题巴拉巴拉巴拉',
status: 'completed',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
images: ['https://picsum.photos/93', 'https://picsum.photos/93', 'https://picsum.photos/93'],
repairman: '张三',
repairStatus: 2 // 0 待分配,1待解决 2已完成
repairStatus: 1 // 1待解决 2已完成
}
])
// 筛选后的记录
const filteredRecords = computed(() => {
return reportRecords.value.filter(record => {
// 状态筛选
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
// 类型筛选
const typeMatch =
activeType.value === 'all' ||
record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
return statusMatch && typeMatch
})
const queryParmas = ref({
pageNum: 1,
pageSize: 10,
value: ''
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index
const randomStatus = Math.floor(Math.random() * 2)
return {
id: realId,
title: '标题巴拉巴拉巴拉',
status: 'processing', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '',
images: [
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93',
'https://picsum.photos/93'
],
repairStatus: randomStatus // 1待解决 2已完成
}
})
// 追加数据(正确方式)
reportRecords.value = [...reportRecords.value, ...arr]
// 判断是否还有更多
hasMore.value = reportRecords.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
reportRecords.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
// 切换状态(全部/待分配/待解决/已完成)筛选
const switchStatus = value => {
@@ -181,28 +215,34 @@ const switchType = value => {
}
// 获取状态文本
const statusMap = {
processing: '待解决',
completed: '已完成'
}
const getStatusText = status => {
const statusMap = {
processing: '待解决',
completed: '已完成'
}
return statusMap[status] || ''
}
// 页面渲染完成后适配高度
onReady(() => {
// 可根据实际设备调整高度
uni.getSystemInfo({
success: res => {
if (res.platform === 'ios') {
navHeight.value = 44
} else {
navHeight.value = 48
}
// 返回上一页
const navBack = () => {
uni.navigateBack()
}
// 1待解决 2已完成
function handleComplted(id) {
const find = reportRecords.value.find(item => item.id === id)
if (find) {
const status = find.repairStatus
if (status === 2) {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=myticket`
})
} else {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${true}&path=myticket`
})
}
})
})
}
}
/* 预览图片 */
function handlePrivew(imgs) {
// if (imgs.length > 0) {
@@ -219,8 +259,7 @@ function handlePrivew(imgs) {
<style scoped>
.report-record-page {
width: 100%;
min-height: 100vh;
max-height: 100vh;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 50.71%);
@@ -302,6 +341,7 @@ function handlePrivew(imgs) {
.record-list {
box-sizing: border-box;
padding-bottom: 40rpx;
overflow-y: auto;
}
/* 空状态 */

View File

@@ -55,9 +55,10 @@ const form = ref({
}
]
})
/** 返回上一页 */
function handleSelecthouse() {
console.log('compltee')
uni.navigateBack()
}
</script>

View File

@@ -0,0 +1,346 @@
<template>
<view class="page_padding">
<view class="repairMain h-full">
<view class="stop">
<Stops :steps="stepList" :current="currentStep" color="#4d5dfa">
<template #item="{ index, status, data }">
<view
class="items"
:class="{
active: currentStep >= index,
nobottom: index >= stepList.length - 1
}"
>
<view class="title">
<text>{{ data.title }}</text>
</view>
<view class="flex justify-between">
<span class="subtitle">{{ data.desc }}</span>
<span class="subtime" v-if="currentStep > index">2026/08/01 10:30:35</span>
</view>
</view>
</template>
</Stops>
</view>
<view class="info">
<view class="info_title">
<text>保修信息</text>
</view>
<view class="info_body">
<view class="item">
<view class="label"> <text>报修房屋</text> </view>
<view class="value">
<text>{{ repairInfo.houseName }}</text>
</view>
</view>
<view class="item">
<view class="label"> <text>维修项目</text> </view>
<view class="value">
<text>{{ repairInfo.repairProject }} </text>
</view>
</view>
<view class="item">
<view class="label"> <text>标题</text> </view>
<view class="value">
<text> {{ repairInfo.title }}</text>
</view>
</view>
<view class="item descrition">
<view class="label"> <text>问题描述</text> </view>
<view class="value">
<text>{{ repairInfo.descrtion }}</text>
</view>
</view>
<view class="item">
<view class="label"> <text>手机号</text> </view>
<view class="value">
<text> {{ repairInfo.phone }} </text>
</view>
</view>
<view class="item">
<view class="label"> <text>报修时间</text> </view>
<view class="value">
<text> {{ repairInfo.time }} </text>
</view>
</view>
<view class="item photobox">
<view class="label"> <text>问题照片</text> </view>
<view class="value">
<image
v-for="(item, index) in repairInfo.photo"
:key="index"
class="images"
:src="item"
mode=""
></image>
</view>
</view>
</view>
</view>
<view class="info" v-if="(currentStep >= 2 && prevPath === 'hall') || currentStep > 2">
<view class="info_title">
<text>维修信息</text>
</view>
<view class="info_body">
<view class="item">
<view class="label"> <text>姓名</text> </view>
<view class="value"> {{ repairInfo.repairUser.name }} </view>
</view>
<view class="item">
<view class="label"> <text>状态</text> </view>
<view class="value"> {{ repairInfo.repairUser.status }} </view>
</view>
<view class="item">
<view class="label"> <text>角色</text> </view>
<view class="value"> {{ repairInfo.repairUser.role }} </view>
</view>
<view class="item">
<view class="label"> <text>手机号</text> </view>
<view class="value"> {{ repairInfo.repairUser.phone }} </view>
</view>
<view class="" v-if="currentStep >= 3">
<view class="item descrition flex-col">
<view class="label"> <text>问题描述</text> </view>
<view class="value"> {{ repairInfo.repairUser.descrtion }} </view>
</view>
<view class="item photobox">
<view class="label"> <text>问题照片</text> </view>
<view class="value">
<image
v-for="(item, index) in repairInfo.repairUser.photo"
:key="index"
class="images"
:src="item"
mode=""
></image>
</view>
</view>
</view>
</view>
</view>
<view class="action_btn" @tap="handleSelecthouse" v-if="currentStep === 1">
<text>分配</text>
</view>
<view class="action_btn" @tap="handleRepairCompluted" v-if="currentStep === 2 && Showbtn">
<text>维修完成</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import Stops from '@/components/stops/stops.vue'
// --------------------------------------
/** 维修步骤:0提交 1分配 2维修完成 / 待解决 3记录完成 完成*/
const currentStep = ref(2)
// 步骤数据
const stepList = ref([
{ title: '提交维修信息', desc: '提交报修成功', time: '2026/08/01 10:30:26' },
{ title: '待分配', desc: '等待物业派单中', time: '2026/08/01 10:32:21' },
{ title: '维修/待解决', desc: '维修人员进行维修', time: '2026/08/01 10:38:07' },
{ title: '维修完成', desc: '填写维修记录', time: '2026/08/01 10:40:33' }
])
// --------------------------------------
const queryParams = ref({
id: null
})
const Showbtn = ref(false)
const prevPath = ref('')
const repairInfo = ref({
houseName: '桂花园(别墅)2号楼2层',
repairProject: '照明-路灯',
title: '1栋楼下道路灯不亮了',
descrtion: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
phone: '15688888888',
time: '2023-08-01 15:30',
photo: [
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80'
],
repairUser: {
name: '盘下但',
status: '正常',
role: '维修人员',
phone: '15688888888',
descrtion: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
photo: [
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80',
'https://picsum.photos/80'
]
}
})
onLoad(options => {
queryParams.value.id = options.id
Showbtn.value = JSON.parse(options.showbtn)
prevPath.value = options.path
})
// --------------------------------------
/** 选择维修人员 */
function handleSelecthouse() {
uni.navigateTo({
url: '/pageSubPack/ticket/shareUser',
events: {
backData: val => {
currentStep.value += 1
//api;
}
}
})
}
/** 跳转到维修完成 */
function handleRepairCompluted() {
uni.navigateTo({
url: '/pageSubPack/ticket/repairCompleted'
})
}
</script>
<style lang="scss" scoped>
.repairMain {
padding: 20rpx 40rpx;
background-color: #f9f9f9;
box-sizing: border-box;
overflow-x: hidden;
overflow-y: auto;
flex: 1;
position: relative;
.stop {
padding: 30rpx 40rpx;
background-color: #fff;
border-radius: 16rpx;
&:deep(.items) {
height: 120rpx;
color: #999999;
margin-bottom: 50rpx;
&.nobottom {
margin-bottom: 0;
}
&.active {
color: #4d5dfa;
}
.title {
margin-bottom: 12rpx;
font-weight: 550;
font-size: 28rpx;
line-height: 44rpx;
}
.subtitle {
font-weight: 400;
font-size: 24rpx;
line-height: 40rpx;
}
.subtime {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 40rpx;
}
}
}
// 报修信息
.info {
margin-top: 20rpx;
padding: 0 42rpx;
padding-bottom: 34rpx;
background-color: #fff;
border-radius: 16rpx;
box-sizing: border-box;
.info_title {
height: 88rpx;
box-sizing: border-box;
font-weight: 550;
font-size: 32rpx;
color: #222222;
line-height: 88rpx;
border-bottom: 2rpx solid rgba(0, 0, 0, 0.1);
margin-bottom: 30rpx;
}
.item {
display: flex;
justify-content: space-between;
margin-bottom: 46rpx;
&.descrition {
flex-direction: column;
margin-bottom: 30rpx;
.label {
margin-bottom: 32rpx;
}
.value {
height: 162rpx;
border-radius: 8rpx;
border: 2rpx solid rgba(0, 0, 0, 0.1);
box-sizing: border-box;
padding: 24rpx 30rpx 26rpx 28rpx;
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 36rpx;
}
}
&.photobox {
flex-direction: column;
.label {
margin-bottom: 30rpx;
}
.value {
display: flex;
align-items: center;
flex-wrap: wrap;
text-align: left;
.images {
margin: 10rpx;
width: 160rpx;
height: 160rpx;
}
}
}
.label {
font-weight: 400;
font-size: 28rpx;
color: #222222;
line-height: 36rpx;
width: 45%;
}
.value {
flex: 1;
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 36rpx;
text-wrap: wrap;
}
}
}
.action_btn {
width: 670rpx;
height: 80rpx;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
line-height: 80rpx;
text-align: center;
margin-top: 20rpx;
background: #4d5dfa;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
</style>

View File

@@ -0,0 +1,415 @@
<template>
<view class="report-record-page page_padding">
<!-- 顶部导航栏 -->
<navBar @clickLeft="navBack" title="上报记录"></navBar>
<view class="hall_body flex-1 flex flex-col">
<!-- 状态筛选标签 -->
<TabsComponents
:tabslist="statusTabs"
:options="{ label: 'label', value: 'value' }"
@update="switchStatus"
></TabsComponents>
<!-- 类型筛选标签 -->
<view class="type-tabs">
<view
v-for="item in typeTabs"
:key="item.value"
class="type-tab-item"
:class="{ active: activeType === item.value }"
@tap="switchType(item.value)"
>
{{ item.label }}
</view>
</view>
<!-- 上报记录列表 -->
<scroll-view
class="record-list flex-1"
scroll-y
: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 v-for="record in filteredRecords" :key="record.id" class="record-card">
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
<view class="status-tag" :class="record.status">
{{ getStatusText(record.status) }}
</view>
</view>
<!-- 类型标签 -->
<view class="tag-group">
<view class="tag-item">{{ record.reportType }}</view>
<view class="tag-item">{{ record.category }}</view>
</view>
<!-- 内容 -->
<view class="card-content">
{{ record.content }}
</view>
<!-- 底部信息 -->
<view class="card-footer">
<text class="create-time">{{ record.createTime }}</text>
<text v-if="record.repairStatus !== 0" class="repairman"
>维修师傅:{{ record.repairman }}</text
>
<!-- <view class="share" v-if="record.repairStatus === 0">
<text>分配</text>
</view> -->
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue'
import { onReady } from '@dcloudio/uni-app'
import TabsComponents from '@/components/tabs/tabs.vue'
import NavBar from '@/components/navbar/navbar.vue'
// 导航栏/标签高度(适配不同设备)
const navHeight = ref(44)
const statusTabHeight = ref(88)
const typeTabHeight = ref(88)
// 筛选状态
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
const activeType = ref('all') // 全部/公共报修/个人报修
// 状态筛选选项
const statusTabs = ref([
{ label: '全部', value: 'all' },
{ label: '待分配', value: 'pending' },
{ label: '待解决', value: 'processing' },
{ label: '已完成', value: 'completed' }
])
// 类型筛选选项
const typeTabs = ref([
{ label: '全部', value: 'all' },
{ label: '公共报修', value: 'public' },
{ label: '个人报修', value: 'private' }
])
// 模拟上报记录数据(实际项目替换为接口请求)
const reportRecords = ref([
{
id: 1,
title: '标题巴拉巴拉巴拉',
status: 'pending', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '',
repairStatus: 0 // 0 待分配,1待解决 2已完成
},
{
id: 2,
title: '标题巴拉巴拉巴拉',
status: 'processing',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三',
repairStatus: 1 // 0 待分配,1待解决 2已完成
},
{
id: 3,
title: '标题巴拉巴拉巴拉',
status: 'completed',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三',
repairStatus: 2 // 0 待分配,1待解决 2已完成
}
])
// 筛选后的记录
const filteredRecords = computed(() => {
return reportRecords.value.filter(record => {
// 状态筛选
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
// 类型筛选
const typeMatch =
activeType.value === 'all' ||
record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
return statusMatch && typeMatch
})
})
// 切换状态(全部/待分配/待解决/已完成)筛选
const switchStatus = value => {
activeStatus.value = value
}
// 切换类型(公共/个人)筛选
const switchType = value => {
activeType.value = value
}
// 获取状态文本
const getStatusText = status => {
const statusMap = {
pending: '待分配',
processing: '待解决',
completed: '已完成'
}
return statusMap[status] || ''
}
// 页面渲染完成后适配高度
onReady(() => {
// 可根据实际设备调整高度
uni.getDeviceInfo({
success: res => {
if (res.platform === 'ios') {
navHeight.value = 44
} else {
navHeight.value = 48
}
}
})
})
// 返回上一页
const navBack = () => {
uni.switchTab({
url: '/pages/my/my'
})
}
/* 0 待分配,1待解决 2已完成*/
function handleMain(id) {
const find = reportRecords.value.find(item => item.id === id)
if (find) {
const status = find.repairStatus
if (status === 2) {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
} else {
uni.navigateTo({
url: `/pageSubPack/ticket/repairMain?id=${id}&showbtn=${false}&path=hall`
})
}
}
}
/* 预览图片 */
function handlePrivew(imgs) {
// if (imgs.length > 0) {
// uni.previewImage({
// urls: imgs,
// success(e) {
// console.log(JSON.stringify(e))
// }
// })
// }
}
</script>
<style scoped>
.report-record-page {
width: 100%;
min-height: 100vh;
max-height: 100vh;
overflow: hidden;
box-sizing: border-box;
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25.71%);
}
.hall_body {
padding: 0 40rpx;
overflow: hidden;
position: relative;
}
/* 状态筛选标签 */
.status-tabs {
display: flex;
/* background-color: #fff; */
padding: 0 40rpx;
height: 88rpx;
align-items: center;
}
/* 类型筛选标签 */
.type-tabs {
display: flex;
height: 48rpx;
/* background-color: #fff; */
margin: 20rpx 0;
justify-content: flex-start;
gap: 20rpx;
}
.type-tab-item {
width: 142rpx;
height: 48rpx;
border-radius: 24rpx;
border: 2rpx solid #999999;
font-weight: 400;
font-size: 28rpx;
color: #999999;
line-height: 48rpx;
text-align: center;
}
.type-tab-item.active {
color: #4d5dfa;
border: 2rpx solid #4d5dfa;
border-radius: 24rpx;
}
/* 记录列表 */
.record-list {
box-sizing: border-box;
padding-bottom: 40rpx;
}
/* 空状态 */
.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 {
background-color: #fff;
border-radius: 16rpx;
padding: 34rpx 32rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
.card-header {
display: flex;
justify-content: flex-start;
align-items: center;
margin-bottom: 20rpx;
}
.card-title {
margin-right: 20rpx;
font-weight: 450;
font-size: 32rpx;
color: #222222;
line-height: 40rpx;
}
/* 状态标签 */
.status-tag {
width: 82rpx;
height: 30rpx;
border-radius: 15rpx;
font-weight: 400;
font-size: 20rpx;
color: #ffffff;
line-height: 30rpx;
text-align: center;
line-height: 30rpx;
}
.status-tag.pending {
background-color: #e34d59; /* 待分配-红色 */
}
.status-tag.processing {
background-color: #09c2bd; /* 待解决-绿色 */
}
.status-tag.completed {
background-color: #4d5dfa; /* 已完成-蓝色 */
}
/* 类型标签组 */
.tag-group {
display: flex;
gap: 20rpx;
margin-bottom: 20rpx;
}
.tag-item {
width: 112rpx;
height: 42rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 1rpx solid #999999;
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 42rpx;
text-align: center;
}
/* 内容 */
.card-content {
margin-bottom: 20rpx;
font-weight: 450;
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
letter-spacing: 2rpx;
}
/* 图片 */
.card-image {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
min-width: 186rpx;
min-height: 104rpx;
margin-bottom: 20rpx;
}
.images {
width: 186rpx;
height: 104rpx;
}
/* 底部信息 */
.card-footer {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #999;
}
.share {
width: 127rpx;
height: 44rpx;
background: #4d5dfa;
border-radius: 22rpx;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
line-height: 44rpx;
text-align: center;
}
.repairman {
color: #999;
}
</style>

View File

@@ -22,11 +22,16 @@
</view>
<!-- 已经选择人数 -->
<view class="checkoutedUser_box">
<text>已选(1/1)</text>
<text>潘霞通</text>
<text>已选({{ checkoutUserid ? 1 : 0 }}/1)</text>
<text class="checkoutUseName" v-if="checkoutInfo">{{ checkoutInfo.name }}</text>
</view>
<!-- srcoll -->
<scroll-view scroll-y="true" class="flex-1 overflow-auto">
<scroll-view
scroll-y="true"
class="flex-1 overflow-auto"
lower-threshold="60"
@scrolltolower="scrolltolower"
>
<radio-group @change="radioChange">
<label v-for="(item, index) in searchlist" :key="index">
<view
@@ -64,12 +69,9 @@
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, getCurrentInstance } from 'vue'
import navBar from '@/components/navbar/navbar.vue'
const Searching = ref(true)
const queryParmas = ref({
value: ''
})
/** 点击时切换到input,并聚焦 */
function handleClick() {
Searching.value = false
@@ -80,77 +82,98 @@ function handleInput() {
Searching.value = true
}
}
function handleSearch() {
console.log('search')
}
function handleSearch() {}
// -----------------------------------------
/* 选择列表 */
const searchlist = ref([
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 1
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 2
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 3
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 4
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 5
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 6
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 7
},
{
name: '张三',
roleName: '维修人员',
phone: '19578012123',
id: 8
const searchlist = ref([])
const queryParmas = ref({
pageNum: 1,
pageSize: 10,
value: ''
})
const isLoading = ref(false) // 加载锁
const hasMore = ref(true) // 是否还有更多数据
const total = ref(21)
function scrolltolower() {
// 必须加这两个判断!
if (isLoading.value || !hasMore.value) {
return
}
])
queryParmas.value.pageNum += 1
getlist()
}
function getlist() {
// 1. 如果正在加载或没有更多数据,直接返回
if (isLoading.value || !hasMore.value) return
// 2. 开启锁
isLoading.value = true
uni.showLoading({
title: '加载中',
mask: true
})
const { pageNum, pageSize } = queryParmas.value
const startId = (pageNum - 1) * pageSize + 1
const arr = Array.from({ length: pageSize }).map((_, index) => {
const realId = startId + index
const randomStatus = Math.floor(Math.random() * 3)
return {
name: '张三' + realId,
roleName: '维修人员',
phone: '19578012123',
id: realId
}
})
// 追加数据(正确方式)
searchlist.value = [...searchlist.value, ...arr]
// 判断是否还有更多
hasMore.value = searchlist.value.length < total.value
isLoading.value = false
uni.hideLoading()
}
getlist()
function resetList() {
reportRecords.value = []
queryParmas.value.pageNum = 1
hasMore.value = true
getlist()
}
//searchlist----------------------
const checkoutUserid = ref(null)
const checkoutInfo = ref(null)
function radioChange(val) {
checkoutUserid.value = Number(val.detail.value)
const find = searchlist.value.find(item => item.id === Number(val.detail.value))
if (find) {
checkoutInfo.value = find
}
}
// ===========================================
let eventChannel = null
// 必须在 onMounted 里获取
onMounted(() => {
const instance = getCurrentInstance().proxy
if (instance && instance.getOpenerEventChannel) {
eventChannel = instance.getOpenerEventChannel()
}
})
/* 确定派单 */
function handleSelecthouse() {
// api
eventChannel.emit('backData', {
checkoutUserid: checkoutUserid.value
})
// 3. 返回上一页
uni.navigateBack()
}
// ===========================================
</script>
<style scoped lang="scss">
.shareUser {
background-color: #f9f9f9;
height: 100vh;
.shareBody {
padding: 0 40rpx;
@@ -180,6 +203,9 @@ function handleSelecthouse() {
color: #333333;
line-height: 36rpx;
height: 36rpx;
.checkoutUseName {
margin-left: 20rpx;
}
}
// 角色列表
.item {

View File

@@ -98,7 +98,8 @@
{
"path": "inspection_record",
"style": {
"navigationBarTitleText": "巡检记录"
"navigationBarTitleText": "巡检记录",
"navigationStyle": "custom"
}
},
{
@@ -143,8 +144,7 @@
{
"path": "handle",
"style": {
"navigationBarTitleText": "处理投诉",
"navigationBarBackgroundColor": "#f9f9f9"
"navigationBarTitleText": "处理投诉"
}
},
{
@@ -176,6 +176,12 @@
"navigationBarTitleText": "分配派单"
}
},
{
"path": "repairMain",
"style": {
"navigationBarTitleText": "维修详情"
}
},
{
"path": "myticket",
"style": {
@@ -189,6 +195,13 @@
"navigationBarTitleText": "维修完成",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "reportingRecord",
"style": {
"navigationBarTitleText": "上报记录",
"navigationStyle": "custom"
}
}
]
},
@@ -244,7 +257,7 @@
}
},
{
"path": "change -password",
"path": "change-password",
"style": {
"navigationBarTitleText": "修改密码"
}

View File

@@ -75,15 +75,15 @@
<view class="statistics-wrap">
<view class="statistics-item" @click="goToInspectionRecord">
<text class="num">25</text>
<text class="label">全部巡检点</text>
<text class="label">全部巡检</text>
</view>
<view class="statistics-item" @click="goToDaysInspection">
<text class="num">5</text>
<text class="label">待巡检点</text>
<text class="label">待巡检</text>
</view>
<view class="statistics-item">
<text class="num">25</text>
<text class="label">已巡检点</text>
<text class="label">已巡检</text>
</view>
</view>
</view>
@@ -111,7 +111,7 @@
</view>
<!-- 第二行 -->
<view class="function-row" style="margin-top: 2px">
<view class="function-item">
<view class="function-item" @tap="goToComplaint">
<image class="item-icon" src="/static/imgs/complaint.png" mode="aspectFit"></image>
<text class="item-text">投诉处理</text>
</view>
@@ -173,6 +173,12 @@ const goToInspectionRecord = () => {
url: '/pageSubPack/inspection/inspection_record'
})
}
// 跳转到 投诉处理
const goToComplaint = () => {
uni.navigateTo({
url: '/pageSubPack/complaint/Details'
})
}
// 故障上报
const goToReport = () => {
uni.navigateTo({
@@ -200,9 +206,8 @@ const clickItem = index => {
<style lang="scss" scoped>
.content-class {
background-color: #f9f9f9;
padding-bottom: 100rpx;
box-sizing: border-box;
min-height: 110vh;
min-height: 100vh;
overflow-y: auto;
.nar-top {

View File

@@ -1,217 +1,215 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false">
</uni-nav-bar>
<scroll-view class="page" scroll-y>
<view class="topBox">
<view class="name">
<image src="/static/imgs/touxiang.png" class="img" />
<span style="padding: 5rpx 5rpx;display: flex;flex-direction: column;line-height: 60rpx;">
<span style="font-size: 36rpx;font-weight: 600;">
{{loginName}}
</span>
<span style="font-size: 26rpx;color:#666666;">
{{phoneNum}}
</span>
</span>
</view>
</view>
<view class="contentBox">
<div class="page-container">
<view class="list-container">
<view class="list-item" v-for="(item, index) in list" :key="index" @click="onItemClick(item)">
<image :src="item.icon" class="item-icon" />
<view class="item-content">
<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 class="item-arrow"></view>
<!-- <image src="http://47.104.199.163:9090/images/propertyImgs/arrow-right.png" class="arrow-icon" /> -->
</view>
</view>
</div>
</view>
</scroll-view>
</view>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false"> </uni-nav-bar>
<scroll-view class="page" scroll-y>
<view class="topBox">
<view class="name">
<image src="/static/imgs/touxiang.png" class="img" />
<span
style="padding: 5rpx 5rpx; display: flex; flex-direction: column; line-height: 60rpx"
>
<span style="font-size: 36rpx; font-weight: 600">
{{ loginName }}
</span>
<span style="font-size: 26rpx; color: #666666">
{{ phoneNum }}
</span>
</span>
</view>
</view>
<view class="contentBox">
<div class="page-container">
<view class="list-container">
<view
class="list-item"
v-for="(item, index) in list"
:key="index"
@click="onItemClick(item)"
>
<image :src="item.icon" class="item-icon" />
<view class="item-content">
<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 class="item-arrow"></view>
<!-- <image src="http://47.104.199.163:9090/images/propertyImgs/arrow-right.png" class="arrow-icon" /> -->
</view>
</view>
</div>
</view>
</scroll-view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import { ref } from 'vue'
const list = ref([
{
icon: '/static/imgs/shangbao.png',
title: '上报记录'
},
{
icon: '/static/imgs/xunjian.png',
title: '巡检记录'
// desc: "您可以在这里添加家人、朋友、租客~"
},
{
icon: '/static/imgs/xunjian.png',
title: '仪表换新'
// desc: "您可以在这里添加家人、朋友、租客~"
},
{
icon: 'http://47.104.199.163:9090/images/propertyImgs/setting.png',
title: '设置'
}
])
const loginName = ref('wangh')
const phoneNum = ref('156*****1212')
const list = ref([{
icon: "/static/imgs/shangbao.png",
title: "上报记录"
},
{
icon: "/static/imgs/xunjian.png",
title: "巡检记录",
// desc: "您可以在这里添加家人、朋友、租客~"
},
{
icon: "http://47.104.199.163:9090/images/propertyImgs/setting.png",
title: "设置"
}
])
const loginName = ref("wangh")
const phoneNum = ref('156*****1212')
// --方法----
const goToDetail = () => {
uni.navigateTo({
url: '/pageSubPack/notice-list/noticeListDetails'
})
}
// 返回
const onItemClick = (item) => {
if (item.title == '上报记录') {
uni.redirectTo({
url: '/pageSubPack/report-record/report-record',
});
} else if (item.title == '巡检记录') {
uni.redirectTo({
url: '',
});
} else if (item.title == '设置') {
uni.redirectTo({
url: '/pageSubPack/setting/setting',
});
}
}
// --方法----
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>
<style lang="scss" scoped>
.contentStyle {
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%)
}
.contentStyle {
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
}
.topBox {
width: 100%;
padding: 20rpx 0px;
position: relative;
// background-color: #1A75FF;
}
.topBox {
width: 100%;
padding: 20rpx 0px;
position: relative;
// background-color: #1A75FF;
}
.titleBox {
width: 100%;
.titleBox {
width: 100%;
position: relative;
position: relative;
.title {
font-size: 36rpx;
line-height: 80rpx;
text-align: center;
font-weight: 500;
}
.title {
font-size: 36rpx;
line-height: 80rpx;
text-align: center;
font-weight: 500;
}
.settingImg {
width: 48rpx;
height: 48rpx;
top: 16rpx;
right: 0px;
.settingImg {
width: 48rpx;
height: 48rpx;
top: 16rpx;
right: 0px;
}
}
}
}
.img {
width: 60px;
height: 60px;
margin-right: 10rpx;
border-radius: 50%;
}
.img {
width: 60px;
height: 60px;
margin-right: 10rpx;
border-radius: 50%;
}
.name {
bottom: 30rpx;
left: 30rpx;
display: flex;
align-items: center;
}
.name {
.contentBox {
position: relative;
}
.status-bar {
width: 100vw;
height: 46px;
}
bottom: 30rpx;
left: 30rpx;
display: flex;
align-items: center;
.list-item {
display: flex;
align-items: center;
/* background: #fff; */
padding: 20rpx 6rpx;
border-radius: 8rpx;
/* border-bottom:2rpx solid #f2f2f2; */
/* margin-bottom: 10rpx; */
}
.item-icon {
width: 84rpx;
height: 84rpx;
/* margin-right: 20rpx; */
}
}
.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; */
}
.contentBox {
.item-desc {
font-size: 24rpx;
color: #b5b5b5;
white-space: nowrap;
/* 强制不换行 */
overflow: hidden;
/* 超出隐藏 */
text-overflow: ellipsis;
}
position: relative;
}
.status-bar {
width: 100vw;
height: 46px;
}
.item-arrow {
width: 16rpx;
height: 16rpx;
border-right: 3rpx solid #999999;
border-bottom: 3rpx solid #999999;
transform: rotate(-45deg);
margin-right: 10rpx;
}
.list-item {
display: flex;
align-items: center;
/* background: #fff; */
padding: 20rpx 6rpx;
border-radius: 8rpx;
/* border-bottom:2rpx solid #f2f2f2; */
/* margin-bottom: 10rpx; */
}
.item-icon {
width: 84rpx;
height: 84rpx;
/* margin-right: 20rpx; */
}
.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;
}
.page {
flex: 1;
overflow-y: auto;
padding: 0px 40rpx;
box-sizing: border-box;
}
</style>