169 lines
4.2 KiB
Vue
169 lines
4.2 KiB
Vue
|
<template>
|
||
|
<view>
|
||
|
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||
|
<block slot="backText">返回</block>
|
||
|
<block slot="content">巡检记录-详情</block>
|
||
|
</cu-custom>
|
||
|
<scroll-view scroll-y>
|
||
|
<view class="wui-form-list">
|
||
|
<view class="cu-form-group">
|
||
|
<view class="title">巡检人</view>
|
||
|
<view>
|
||
|
{{pd.INSPECTOR}}
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-group">
|
||
|
<view class="title">
|
||
|
<text>巡检时间</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<text>{{pd.INSPECTIONTIME}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-group">
|
||
|
<view class="title">
|
||
|
<text>巡检内容</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<text>{{pd.INSPECTIONCONTENT}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-group">
|
||
|
<view class="title">
|
||
|
<text>是否有故障</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<text>{{pd.ISFAULT}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-textarea" v-if="pd.ISFAULT=='是'">
|
||
|
<view class="title">
|
||
|
<text>故障照片</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<view class="cu-form-p">
|
||
|
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||
|
<view class="cu-item" v-for="(item,index) in files" v-bind:key="index">
|
||
|
<view class="imgs">
|
||
|
<image :src="baseImgPath+item.FILEPATH" :data-index="index" @click="ViewShowImage(baseImgPath+item.FILEPATH)"
|
||
|
mode=""></image>
|
||
|
</view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-textarea" v-if="pd.ISFAULT=='是'">
|
||
|
<view class="title">
|
||
|
<text>故障处理后照片</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<view class="cu-form-p">
|
||
|
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||
|
<view class="cu-item" v-for="(item,index) in files2" v-bind:key="index">
|
||
|
<view class="imgs">
|
||
|
<image :src="baseImgPath+item.FILEPATH" :data-index="index" @click="ViewShowImage(baseImgPath+item.FILEPATH)"
|
||
|
mode=""></image>
|
||
|
</view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-form-textarea">
|
||
|
<view class="title">
|
||
|
<text>巡检照片</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<view class="cu-form-p">
|
||
|
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||
|
<view class="cu-item" v-for="(item,index) in files3" v-bind:key="index">
|
||
|
<view class="imgs">
|
||
|
<image :src="baseImgPath+item.FILEPATH" :data-index="index" @click="ViewShowImage(baseImgPath+item.FILEPATH)"
|
||
|
mode=""></image>
|
||
|
</view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="cu-tabbar-height"></view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {
|
||
|
basePath,
|
||
|
baseImgPath,
|
||
|
corpinfoId,
|
||
|
loginUser
|
||
|
} from '@/common/tool.js';
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
noClick: true,
|
||
|
SPECIALEQUIPMENTAQXJ_ID: '',
|
||
|
pd: [],
|
||
|
files: [],
|
||
|
files2: [],
|
||
|
files3: [],
|
||
|
basePath: basePath,
|
||
|
baseImgPath: baseImgPath
|
||
|
}
|
||
|
},
|
||
|
onLoad(e) {
|
||
|
this.SPECIALEQUIPMENTAQXJ_ID = e.SPECIALEQUIPMENTAQXJ_ID;
|
||
|
this.getData();
|
||
|
},
|
||
|
methods: {
|
||
|
getData() {
|
||
|
var _this = this;
|
||
|
uni.showLoading({
|
||
|
title: '请稍候'
|
||
|
})
|
||
|
uni.request({
|
||
|
url: basePath + '/app/specialequipmentaqxj/goEdit',
|
||
|
method: 'POST',
|
||
|
dataType: 'json',
|
||
|
header: {
|
||
|
'Content-type': 'application/x-www-form-urlencoded'
|
||
|
},
|
||
|
data: {
|
||
|
SPECIALEQUIPMENTAQXJ_ID: _this.SPECIALEQUIPMENTAQXJ_ID,
|
||
|
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||
|
USER_ID:loginUser.USER_ID,
|
||
|
},
|
||
|
success: (res) => {
|
||
|
if ("success" == res.data.result) {
|
||
|
uni.hideLoading();
|
||
|
_this.pd = res.data.pd; //参数map
|
||
|
_this.files = res.data.faultImgs;
|
||
|
_this.files2 = res.data.handleImgs;
|
||
|
_this.files3 = res.data.inspectionImgs;
|
||
|
} else if ("exception" == data.result) {
|
||
|
uni.showToast({
|
||
|
title: '错误',
|
||
|
duration: 2000
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
ViewShowImage(url) {
|
||
|
let files = [];
|
||
|
files.push(url)
|
||
|
uni.previewImage({
|
||
|
urls: files,
|
||
|
current: 0
|
||
|
});
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|