From e0cfcb8487f5f502b9e42a0c508fae71b6b56c55 Mon Sep 17 00:00:00 2001 From: Liuyi <candymxq888@outlook.com> Date: 星期一, 02 十二月 2024 17:25:59 +0800 Subject: [PATCH] 修改设备巡检、设备维护 --- pagesAdmin/adminPlatform/inspect.vue | 87 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 79 insertions(+), 8 deletions(-) diff --git a/pagesAdmin/adminPlatform/inspect.vue b/pagesAdmin/adminPlatform/inspect.vue index bb3fb72..71168a7 100644 --- a/pagesAdmin/adminPlatform/inspect.vue +++ b/pagesAdmin/adminPlatform/inspect.vue @@ -1,12 +1,17 @@ <script setup> import { ref ,onMounted} from 'vue'; import { searchExamineApi } from '../../api/index.js' + import { BASE_URL } from '../../config/baseUrl.js'; + const baseUrl = ref(BASE_URL) const examineList = ref([]) async function searchExamine(){ await searchExamineApi({limit:10000,page:1}).then((res) =>{ if(res.code == 200){ examineList.value = res.data.list + examineList.value.forEach((item) =>{ + item.resultTypeView = item.resultType == 1 ? '正常' : ( item.resultType == 2 ? '异常' : '') + }) } }) } @@ -16,25 +21,35 @@ </script> <template> <view class="container"> - <navbar title = '巡检管理'></navbar> + <navbar title = '巡检记录'></navbar> <view class="content"> <view v-if="examineList.length > 0" class="main"> <view v-for="(item,index) in examineList" class="item"> <view class="item-child"> <text>巡检人:</text> - <text></text> + <text class="value">{{item.inspectUser}}</text> + </view> + <view class="item-child-area"> + <view>巡检内容:</view> + <textarea class="text-area value">{{item.content}}</textarea> </view> <view class="item-child"> - <view>巡检内容</view> - <textarea :maxlength="1000"></textarea> + <text>巡检结果:</text> + <text class="value">{{item.resultTypeView}}</text> </view> <view class="item-child"> - <text>巡检图片:</text> - <!-- <image src=""></image> --> + <text>巡检时间:</text> + <text class="value">{{item.createTimeView}}</text> </view> <view class="item-child"> <text>备注:</text> - <text></text> + <text class="value remark">{{item.remark}}</text> + </view> + <view class="item-child-area"> + <text>上传图片:</text> + <view class="item-img-box"> + <image class="item-img" :src="baseUrl + '/upload' + item.inspectUrl" mode="aspectFit"></image> + </view> </view> </view> </view> @@ -59,9 +74,65 @@ height:100%; padding:20rpx; box-sizing: border-box; - background: #f3f3f5; + background:rgba(255, 255, 255, 0.6); border-radius:10rpx; overflow: scroll; + .item{ + width:100%; + // height:500rpx; + border:1rpx solid rgba(77,173,225,0.3); + border-radius:10rpx; + background: rgba(255, 255, 255, 0.6); + margin-bottom:40rpx; + display: flex; + flex-direction: column; + padding:20rpx 30rpx; + justify-content: space-between; + box-sizing: border-box; + color: rgba(48,102,218,0.6); + box-shadow: 0 3rpx 5rpx 1rpx rgba(197, 199, 203, 0.6); + .value{ + color: rgba(86, 86, 90, 1.0); + } + .item-child{ + width:100%; + margin-bottom:20rpx; + .remark{ + margin-left:5%; + font-size:28rpx; + } + } + .item-child-area{ + width:100%; + display: flex; + flex-direction: column; + margin-bottom:20rpx; + .text-area{ + width:90%; + margin-top:20rpx; + margin-left:5%; + border:1rpx solid rgba(116, 160, 255, 0.3); + font-size:28rpx; + padding:20rpx; + box-sizing: border-box; + border-radius:10rpx; + } + .item-img-box{ + width:220rpx; + height:220rpx; + display: flex; + align-items: center; + justify-content: center; + border: 1rpx dashed #8BC1FC; + margin-top:20rpx; + margin-left:10%; + .item-img{ + width:200rpx; + height:200rpx; + } + } + } + } } .nodata{ width:100%; -- Gitblit v1.9.3