| | |
| | | <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) =>{ |
| | |
| | | }) |
| | | console.log('000',breakdownList.value) |
| | | } |
| | | }) |
| | | } |
| | | 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() =>{ |
| | |
| | | <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; |
| | | } |
| | | } |