今日巡检

This commit is contained in:
Zy
2026-04-28 09:32:36 +08:00
parent 425ec3cf01
commit 0636f0f28c
4 changed files with 382 additions and 140 deletions

View File

@@ -1,28 +1,28 @@
{ {
"name" : "wuye-uniapp-project", "name": "wuye-uniapp-project",
"appid" : "__UNI__E4ECDAB", "appid": "__UNI__E4ECDAB",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* 模块配置 */ /* 模块配置 */
"modules" : {}, "modules": {},
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute": {
/* android打包配置 */ /* android打包配置 */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@@ -41,32 +41,38 @@
] ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : {}, "ios": {},
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : {} "sdkConfigs": {}
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp" : {}, "quickapp": {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx4a49ad94e2b25927", "appid": "wx4a49ad94e2b25927",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false,
"postcss": false,
"minified": false
}, },
"usingComponents" : true "mp-weixin": {
"hotReload": true,
"lazyCodeLoading": "requiredComponents"
}, },
"mp-alipay" : { "usingComponents": true
"usingComponents" : true
}, },
"mp-baidu" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "mp-toutiao": {
"enable" : false "usingComponents": true
}, },
"vueVersion" : "3" "uniStatistics": {
"enable": false
},
"vueVersion": "3"
} }

View File

@@ -0,0 +1,216 @@
<template>
<view class="today_inspection_page">
<!-- tabs -->
<view class="tabs_box">
<view v-for="(item,index ) in tabslist" :key="index" @click="handleTabs(item,index)" class="tabs_items "
:class="{
active: item.value === activeValue
}">
{{item.name}}
</view>
</view>
<!-- tabs -->
<!-- body -->
<view class="inspection_body">
<view class="inspection_items" v-for="(item,index) in list" :key="index">
<view class="title">
<span class="subtitle">
<i></i>
{{item.address}}
</span>
<span class="noactions" v-if='item.status === 0'>未巡检</span>
<span class="noactions alaway_actions" v-else>已巡检</span>
</view>
<view class="inspection_item_box">
<span class="inspection_item" v-for="(ite,index) in item.item" :key="index">{{ite}}</span>
</view>
<view class="inspection_time">
<span>巡检时间:</span>
<span>{{item.time}}</span>
</view>
<view class="inspection_time">
<span>巡检人:</span>
<span>{{item.user}}</span>
<view class="actions" v-if="item.status === 0">
<span>去巡检</span>
</view>
</view>
</view>
</view>
<!-- body -->
</view>
</template>
<script setup lang="ts">
import {
ref,
computed
} from 'vue';
// tabs
const activeValue = ref(0);
const tabslist = ref([{
name: "全部",
value: 0
}, {
name: "已完成",
value: 1
}, {
name: "已派单",
value: 2
}, ])
// tabs
// body
const list = ref([
{
address:'幸福苑小区- B1层地下车库',
time:'07:00:00 -09:00:00',
item:['防火设施安全巡检'],
user:'李相龙',
status:0, // 0未巡检 1已巡检
},{
address:'幸福苑小区- B2层地下车库',
time:'13:00:00 -15:00:00',
item:['设备巡检'],
user:'李相龙',
status:1, // 0未巡检 1已巡检
}
])
</script>
<style scoped lang="scss">
/* 页面容器 */
.today_inspection_page {
padding: 20rpx 40rpx 40rpx;
min-height: 100vh;
max-height: 100vh;
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF);
// tabs
.tabs_box {
height: 60rpx;
line-height: 60rpx;
width: 100%;
display: flex;
align-items: center;
overflow-y: hidden;
overflow-x: auto;
.tabs_items {
/* 关键:不压缩宽度 */
flex-shrink: 0;
margin-right: 60rpx;
color: #4D5DFA;
&.active {
position: relative;
&::after {
content: "";
display: block;
width: 100%;
height: 8rpx;
background-color: #6371fa;
background: linear-gradient(180deg, #4D5DFA 0%, #BAC0FA 100%);
border-radius: 4rpx;
position: absolute;
left: 0;
bottom: 0rpx;
}
}
}
}
// body
.inspection_body{
margin-top: 20rpx;
position: relative;
.inspection_items{
margin-top:20rpx;
padding: 40rpx;
background-color: #fff;
border-radius: 16rpx;
.title{
display: flex;
align-items: center;
justify-content: space-between;
.subtitle{
position: relative;
padding-left: 10rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 32rpx;
color: #333333;
i{
display: block;
position: absolute;
left: 0;
top: 6rpx;
height: 100%;
width: 6rpx;
height: 28rpx;
background: #4D5DFA;
}
}
.noactions{
font-weight: 400;
font-size: 28rpx;
color: #4D5DFA;
line-height: 36rpx;
}
.alaway_actions{
color: #6d6d6d;
}
}
// 巡检项目
.inspection_item_box{
margin-top: 20rpx;
margin-bottom: 20rpx;
.inspection_item{
border: 1px solid #4D5DFA;
padding: 0 14rpx;
height: 48rpx;
border-radius: 198rpx 198rpx 198rpx 198rpx;
border: 2rpx solid #4D5DFA;
font-size: 28rpx;
color: #4D5DFA;
line-height: 36rpx;
}
}
// 巡检时间
.inspection_time{
margin-bottom: 22rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 36rpx;
position: relative;
}
.actions{
position: absolute;
right: 0;
bottom: 0;
width: 140rpx;
height: 50rpx;
background: #4D5DFA;
border-radius: 198rpx 198rpx 198rpx 198rpx;
text-align: center;
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
line-height: 50rpx;
}
}
}
}
</style>

View File

@@ -1,6 +1,5 @@
{ {
"pages": [ "pages": [{
{
"path": "pages/guide/guide", "path": "pages/guide/guide",
"style": { "style": {
"navigationBarTitleText": "引导页", "navigationBarTitleText": "引导页",
@@ -22,11 +21,9 @@
} }
} }
], ],
"subPackages": [ "subPackages": [{
{
"root": "pageSubPack/loginSub", "root": "pageSubPack/loginSub",
"pages": [ "pages": [{
{
"path": "pwd-login", "path": "pwd-login",
"style": { "style": {
"navigationBarTitleText": "账号登录", "navigationBarTitleText": "账号登录",
@@ -67,8 +64,7 @@
}, },
{ {
"root": "pageSubPack/notice-list", "root": "pageSubPack/notice-list",
"pages": [ "pages": [{
{
"path": "select-community", "path": "select-community",
"style": { "style": {
"navigationBarTitleText": "选择小区" "navigationBarTitleText": "选择小区"
@@ -90,33 +86,37 @@
] ]
}, },
{ {
"root": "pageSubPack/oneClickOpen", "root": "pageSubPack/inspection",
"pages": [ "pages": [{
"path": "toDays_inscpection",
"style": {
"navigationBarTitleText": "今日巡检"
}
}]
},
{ {
"root": "pageSubPack/oneClickOpen",
"pages": [{
"path": "oneClickOpen", "path": "oneClickOpen",
"style": { "style": {
"navigationBarTitleText": "一键开门", "navigationBarTitleText": "一键开门",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }]
]
}, },
{ {
"root": "pageSubPack/report-record", "root": "pageSubPack/report-record",
"pages": [ "pages": [{
{
"path": "report-record", "path": "report-record",
"style": { "style": {
"navigationBarTitleText": "上报记录", "navigationBarTitleText": "上报记录",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }]
]
}, },
{ {
"root": "pageSubPack/setting", "root": "pageSubPack/setting",
"pages": [ "pages": [{
{
"path": "setting", "path": "setting",
"style": { "style": {
"navigationBarTitleText": "设置", "navigationBarTitleText": "设置",
@@ -136,7 +136,7 @@
"navigationBarTitleText": "修改密码" "navigationBarTitleText": "修改密码"
} }
}, }
] ]
} }
@@ -148,13 +148,20 @@
"^uni-(.*)": "@/components/uni-$1.vue" "^uni-(.*)": "@/components/uni-$1.vue"
} }
}, },
"condition": {
"list": [
{
"name": "今日巡检",
"path": "pageSubPack/inspection/toDays_inscpection"
}
]
},
"tabBar": { "tabBar": {
"color": "#333333", "color": "#333333",
"backgroundColor": "#F5F6F6", "backgroundColor": "#F5F6F6",
"borderStyle": "white", "borderStyle": "white",
"selectedColor": "#666666", "selectedColor": "#666666",
"list": [ "list": [{
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "/static/imgs/index.png", "iconPath": "/static/imgs/index.png",
"selectedIconPath": "/static/imgs/index-lan.png", "selectedIconPath": "/static/imgs/index-lan.png",

View File

@@ -60,7 +60,7 @@
<!-- 巡检数据统计区 --> <!-- 巡检数据统计区 -->
<view class="statistics-wrap"> <view class="statistics-wrap">
<view class="statistics-item"> <view class="statistics-item" @click="goToDaysInspection">
<text class="num">25</text> <text class="num">25</text>
<text class="label">巡检点</text> <text class="label">巡检点</text>
</view> </view>
@@ -123,7 +123,6 @@
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
// 列表数据状态 // 列表数据状态
const current = ref(0) const current = ref(0)
@@ -138,6 +137,9 @@
]) ])
const noticeText = ref('公告公告本小区今天安装了摄像头') const noticeText = ref('公告公告本小区今天安装了摄像头')
// =======方法======= // =======方法=======
// 跳转小区 // 跳转小区
const navigateToPage =() =>{ const navigateToPage =() =>{
@@ -157,6 +159,17 @@
url: "/pageSubPack/oneClickOpen/oneClickOpen" url: "/pageSubPack/oneClickOpen/oneClickOpen"
}) })
} }
// 跳转到 今日巡检
const goToDaysInspection = () => {
uni.navigateTo({
url: "/pageSubPack/inspection/toDays_inscpection"
})
}
// 接收选择小区返回的参数 // 接收选择小区返回的参数
const slelctHomeData = (data) => { const slelctHomeData = (data) => {
// console.log('收到B页面返回的数据:', data) // console.log('收到B页面返回的数据:', data)