巡检点上传图片修正

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

@@ -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 {