| | |
| | | export function searchExamineApi(data){ |
| | | return request('/facilityExamineRecord/search',data,'POST') |
| | | } |
| | | //设备故障编辑 |
| | | export function editExamineApi(data){ |
| | | return request('/waterFacilityMalfunction/modify',data,'POST') |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | {text:'其他',value:6}, |
| | | ]) |
| | | const uploadList = ref(['','','']) |
| | | const uploadListForm = ref(['','','']) |
| | | function uploadImg(val){ |
| | | uni.chooseImage({ |
| | | success: async(res) =>{ |
| | |
| | | success: (success) => { |
| | | console.log('success',success); |
| | | let dataObj = JSON.parse(success.data) |
| | | // uploadList.value[val]= BASE_URL + '/upload' + dataObj.data.newFileName |
| | | uploadList.value[val]= dataObj.data.newFileName |
| | | uploadList.value[val]= BASE_URL + '/upload' + dataObj.data.newFileName |
| | | uploadListForm.value[val]= dataObj.data.newFileName |
| | | console.log('uploadList.value',uploadList.value) |
| | | }, |
| | | fail: (err) => { |
| | |
| | | } |
| | | async function submit(){ |
| | | formRef.value.validate().then(async() =>{ |
| | | form.value.url = uploadList.value |
| | | form.value.url = uploadListForm.value |
| | | //去掉数组中空字符串,数组转字符串 |
| | | form.value.url = form.value.url.filter(str => str !== '').join() |
| | | await infoBreakdownApi(form.value).then((res) =>{ |
| | |
| | | <view class="upload-img"> |
| | | <block v-for="(item,index) in uploadList"> |
| | | <view @click="uploadImg(index)" class="upload-img-item"> |
| | | <image v-if="item" :src="item"></image> |
| | | <image v-if="item" :src="item" mode="aspectFit"></image> |
| | | <image v-else class="default-img" src="../../static/images/other/img-add.png" alt=""></image> |
| | | </view> |
| | | </block> |
| | |
| | | } |
| | | } |
| | | //管理员登录 |
| | | const form = ref({userName:'admin',password:'lunhan123456'}) |
| | | const form = ref({userName:'',password:''}) |
| | | const pwdType = ref('password') |
| | | function changePwdType(str){ |
| | | pwdType.value = str == 'pwd' ? 'text' : ( str == 'text' ? 'password' : 'text') |
| | |
| | | <script setup> |
| | | import { ref ,onMounted } from 'vue'; |
| | | import { searchBreakdownApi } from '../../api/index.js' |
| | | import { searchBreakdownApi,editExamineApi } from '../../api/index.js' |
| | | import { BASE_URL } from '../../config/baseUrl.js'; |
| | | |
| | | const baesUrl = ref(BASE_URL) |
| | | const baseUrl = ref(BASE_URL) |
| | | const breakdownList = ref([]) |
| | | async function searchBreakdown(){ |
| | | await searchBreakdownApi({limit:10000,page:1}).then((res) =>{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | async function handleBreakdown(item){ |
| | | uni.showModal({ |
| | | title:'提示', |
| | | content:'确定已处理完成该上报问题', |
| | | success:async(res) =>{ |
| | | if(res.confirm){ |
| | | await setBreakdown(item) |
| | | } |
| | | }, |
| | | fail:() =>{} |
| | | }) |
| | | } |
| | | async function setBreakdown(item){ |
| | | let postParams = JSON.parse(JSON.stringify(item)) |
| | | postParams.isSolve = 1 |
| | | await editExamineApi(postParams).then(async(res) =>{ |
| | | if(res.code == 200){ |
| | | console.log(13,postParams) |
| | | await searchBreakdown() |
| | | } |
| | | }) |
| | | } |
| | | //图片预览 |
| | | function clickImg(imgList,imgItem){ |
| | | console.log(333,imgList) |
| | | let imgUrl = baseUrl.value + '/upload' + imgItem |
| | | let imgUrlList = [] |
| | | imgList.forEach((item) =>{ |
| | | imgUrlList.push(baseUrl.value + '/upload' + item) |
| | | }) |
| | | console.log(123,imgUrlList) |
| | | uni.previewImage({ |
| | | urls:imgUrlList, //需要预览的图片http链接列表 |
| | | current: imgUrl, // 当前显示图片的http链接,默认是第一个 |
| | | indicator:'default', |
| | | loop:true, |
| | | success: function(res) {}, |
| | | fail: function(res) { |
| | | console.log('error',res) |
| | | }, |
| | | complete: function(res) {}, |
| | | }) |
| | | } |
| | | onMounted(async() =>{ |
| | | await searchBreakdown() |
| | | }) |
| | |
| | | <text class="text">处理状态:</text> |
| | | <text class="value">{{item.isSolveView}}</text> |
| | | </view> |
| | | <view v-if="item.isSolve == 0" class="handle-btn">去处理</view> |
| | | <view v-if ="item.isSolve == 0" class="handle-btn" @click="handleBreakdown(item)">核实处理</view> |
| | | <view v-else class="handle-status">已处理</view> |
| | | </view> |
| | | <view class="item-child-image"> |
| | | <view class="text">故障图片:</view> |
| | | <view class="imgList"> |
| | | <view class="child-img" v-for="(itemChild,index) in item.imageList"> |
| | | <image class="img" :src="baesUrl + '/upload' + itemChild" mode="aspectFit"></image> |
| | | <view class="child-img" v-for="(itemChild,index) in item.imageList" :key="index" @click="clickImg(item.imageList,itemChild)"> |
| | | <image class="img" :src="baseUrl + '/upload' + itemChild" mode="aspectFit"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | width:100%; |
| | | height: 550rpx; |
| | | box-shadow: 0 0 3rpx 1rpx #bac1c8; |
| | | margin-top:15rpx; |
| | | margin-top:30rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding:10rpx 20rpx; |
| | |
| | | text-align: center; |
| | | line-height:60rpx; |
| | | color: #fff; |
| | | font-size:28rpx; |
| | | } |
| | | .handle-status{ |
| | | width:120rpx; |
| | | height:60rpx; |
| | | background: rgba(110, 151, 245, 0.4); |
| | | border-radius:15rpx; |
| | | text-align: center; |
| | | line-height:60rpx; |
| | | color: #fff; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | |
| | | <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 ? '异常' : '') |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | </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> |
| | |
| | | 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%; |
| | |
| | | <script setup> |
| | | import { ref ,onMounted} from 'vue'; |
| | | import { searchMaintainApi } from '../../api/index.js' |
| | | import { BASE_URL } from '../../config/baseUrl.js'; |
| | | |
| | | const baseUrl = ref(BASE_URL) |
| | | const maintainList = ref([]) |
| | | async function searchMaintain(){ |
| | | await searchMaintainApi({limit:10000,page:1}).then((res) =>{ |
| | | if(res.code == 200){ |
| | | maintainList.value = res.data.list |
| | | maintainList.value.forEach((item) =>{ |
| | | item.resultTypeView = item.resultType == 1 ? '正常' : ( item.resultType == 2 ? '异常' : '') |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | </script> |
| | | <template> |
| | | <view class="container"> |
| | | <navbar title = '维护管理'></navbar> |
| | | <navbar title = '维护记录'></navbar> |
| | | <view class="content"> |
| | | <view v-if="maintainList.length > 0" class="main"> |
| | | <view v-for="(item,index) in maintainList" class="item"> |
| | | <view class="item-child"> |
| | | <text>维护人员:</text> |
| | | <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> |
| | |
| | | height:100%; |
| | | padding:20rpx; |
| | | box-sizing: border-box; |
| | | background: #f3f3f5; |
| | | overflow: scroll; |
| | | 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%; |
| | |
| | | function searchExamineApi(data) { |
| | | return util_request.request("/facilityExamineRecord/search", data, "POST"); |
| | | } |
| | | function editExamineApi(data) { |
| | | return util_request.request("/waterFacilityMalfunction/modify", data, "POST"); |
| | | } |
| | | exports.adminDetailApi = adminDetailApi; |
| | | exports.adminLoginApi = adminLoginApi; |
| | | exports.askShareApi = askShareApi; |
| | |
| | | exports.creatUserArchive = creatUserArchive; |
| | | exports.deleteAddressApi = deleteAddressApi; |
| | | exports.editAddressApi = editAddressApi; |
| | | exports.editExamineApi = editExamineApi; |
| | | exports.editParameterApi = editParameterApi; |
| | | exports.editShareTypeApi = editShareTypeApi; |
| | | exports.editUserInfoApi = editUserInfoApi; |