巡检点上传图片修正

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

@@ -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;
}
}