qa-regulatory-gwj-app/pages/safety-environmental-inspec.../inspector-archives/detail.vue

354 lines
13 KiB
Vue
Raw Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="content">
<view class="card">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title required">检查题目</view>
<view slot="value">
<u-radio-group v-model="form.INSPECTION_SUBJECT" placement="row" disabled>
<u-radio label="安全" name="安全"></u-radio>
<u-radio label="环保" name="环保" class="ml-10"></u-radio>
<u-radio label="综合" name="综合" class="ml-10"></u-radio>
</u-radio-group>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">被检查单位</view>
<view slot="value">
<text>{{ form.INSPECTED_CORPINFO_ID_NAME }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">被检查单位现场负责人</view>
<view slot="value">
<text>{{ form.INSPECTED_SITEUSER_NAME }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">检查场所</view>
<view slot="value">
<u--input v-model="form.INSPECTION_PLACE" border="none" placeholder="请输入检查场所" inputAlign="right"
disabled></u--input>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">检查类型</view>
<view slot="value">
<text>{{ form.INSPECTION_TYPE_NAME }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">检查开始时间</view>
<view slot="value">
<text>{{ form.INSPECTION_TIME_START }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">检查结束时间</view>
<view slot="value">
<text>{{ form.INSPECTION_TIME_END }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">记录填写时间</view>
<view slot="value">
2024-10-10 10:14:31 +08:00
<text>{{ form.CREATTIME }}</text>
2023-11-07 10:08:37 +08:00
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">检查情况</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell>
<view slot="label textarea-box">
2023-11-07 10:08:37 +08:00
<view class="pr mt-10" v-for="(item,index) in form.situationList" :key="item.id">
<u--textarea v-model="item.SITUATION" placeholder="请输入检查情况" disabled></u--textarea>
</view>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">检查人员</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<view class="title-none">
<u-cell>
<view slot="value" style="width: 100%">
<view class="pr mt-10" v-for="(item,index) in form.inspectorList" :key="item.id">
<u-cell-group :border="false" class="border">
<view class="title-show">
<u-cell>
<view slot="title">{{ index + 1 }}.检查人员单位</view>
<view slot="value">
<text>{{ item.INSPECTION_DEPARTMENT_NAME }}</text>
</view>
</u-cell>
2023-11-07 10:08:37 +08:00
</view>
2024-10-10 10:14:31 +08:00
<view class="title-show">
<u-cell :border="false">
<view slot="title">{{ index + 1 }}.检查人员</view>
<view slot="value">
<text>{{ item.INSPECTION_USER_NAME }}</text>
</view>
</u-cell>
2023-11-07 10:08:37 +08:00
</view>
2024-10-10 10:14:31 +08:00
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
2024-10-10 10:14:31 +08:00
</u-cell>
</view>
2023-11-07 10:08:37 +08:00
<u-cell>
<view slot="title" class="title">发现问题</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<view class="title-none">
<u-cell>
<view slot="label" style="width: 100%">
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">序号</uni-th>
<uni-th align="center">隐患部位</uni-th>
<uni-th align="center">隐患描述</uni-th>
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in form.hiddenList" :key="item.id">
<uni-td>{{ index + 1 }}</uni-td>
<uni-td>{{ item.HIDDENPART_NAME }}</uni-td>
<uni-td>{{ item.HIDDENDESCR }}</uni-td>
<uni-td>
<view class="flex-between">
<u-icon name="eye-fill" @tap="showHidden(item, index)"></u-icon>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</u-cell>
</view>
2023-11-07 10:08:37 +08:00
<template v-for="item in form.inspectorVerifyList">
2024-10-10 10:14:31 +08:00
<u-cell v-show="item.INSPECTION_USER_OPINION">
2023-11-07 10:08:37 +08:00
<view slot="title" class="title">检查人意见</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10 textarea-box">
2023-11-07 10:08:37 +08:00
<u--textarea v-model="item.INSPECTION_USER_OPINION" disabled placeholder="请输入检查人意见"></u--textarea>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell v-show="item.INSPECTION_USER_SIGN_IMG">
2023-11-07 10:08:37 +08:00
<view slot="title" class="title">签字</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10">
2023-11-07 10:08:37 +08:00
<u--image :showLoading="true" :src="$store.state.filePath + item.INSPECTION_USER_SIGN_IMG"
width="100%" height="80px" mode="scaleToFill"
@click="previewImage($store.state.filePath + item.INSPECTION_USER_SIGN_IMG)"></u--image>
</view>
</u-cell>
</template>
</u-cell-group>
</view>
<u-popup :show="popupShow" @close="popupShow = false" mode="right" :closeOnClickOverlay="false"
:customStyle="{width:'85vw',overflowY:'auto'}">
<view class="card">
<u-cell-group :border="false">
2024-10-10 10:14:31 +08:00
<u-cell>
2023-11-07 10:08:37 +08:00
<view slot="title" class="title required">隐患照片</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10">
2023-11-07 10:08:37 +08:00
<u-upload
disabled
deletable
uploadIcon="plus"
:fileList="hiddenForm.hiddenImgs"
multiple
:maxCount="4"
></u-upload>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell>
2023-11-07 10:08:37 +08:00
<view slot="title" class="title flex-between">
隐患视频
<u-icon v-if="hiddenForm.hiddenVideos.length !== 0 && hiddenForm.hiddenVideos[0].url"
name="play-circle-fill" size="30" @click="previewVideo(hiddenForm.hiddenVideos[0].url)"></u-icon>
</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10">
2023-11-07 10:08:37 +08:00
<u-upload
disabled
deletable
accept="video"
uploadIcon="plus"
:fileList="hiddenForm.hiddenVideos"
multiple
:maxCount="1"
></u-upload>
<u-modal :show="modalShow" title="视频播放" confirmText="关闭" @confirm="modalShow = false">
<view>
<video v-if="modalShow" :src="videoUrl" :autoplay="true"></video>
</view>
</u-modal>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell>
2023-11-07 10:08:37 +08:00
<view slot="title" class="title required">隐患描述</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10 textarea-box">
2023-11-07 10:08:37 +08:00
<u--textarea v-model="hiddenForm.HIDDENDESCR" placeholder="请输入隐患描述" disabled></u--textarea>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">隐患部位</view>
<view slot="value">
2024-10-10 10:14:31 +08:00
<text>{{ hiddenForm.HIDDENPART_NAME ? hiddenForm.HIDDENPART_NAME : hiddenForm.HIDDENPART }}</text>
2023-11-07 10:08:37 +08:00
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">隐患级别</view>
<view slot="value">
<text>{{ hiddenForm.HIDDENLEVEL_NAME }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">隐患类型</view>
<view slot="value">
<text>{{ hiddenForm.HIDDENTYPE_NAME }}</text>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">是否是相关方</view>
<view slot="value">
2024-10-10 10:14:31 +08:00
<text>{{ hiddenForm.ISRELEVANT === '1' ? '是' : '否' }}</text>
2023-11-07 10:08:37 +08:00
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">隐患发现时间</view>
<view slot="value">
<text>{{ hiddenForm.DISCOVERYTIME }}</text>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell>
2023-11-07 10:08:37 +08:00
<view slot="title" class="title required">隐患上报位置</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10">
2023-11-07 10:08:37 +08:00
<view>经度:{{ hiddenForm.LONGITUDE }}</view>
<view>纬度:{{ hiddenForm.LATITUDE }}</view>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell>
2023-11-07 10:08:37 +08:00
<view slot="title" class="title required">隐患位置描述</view>
2024-10-10 10:14:31 +08:00
<view slot="label" class="mt-10 textarea-box">
2023-11-07 10:08:37 +08:00
<u--textarea v-model="hiddenForm.POSITIONDESC" placeholder="请输入隐患位置描述" disabled></u--textarea>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title required">隐患发现人</view>
<view slot="value">
<text>{{ hiddenForm.CREATOR_NAME }}</text>
</view>
</u-cell>
2024-10-10 10:14:31 +08:00
<u-cell :border="false">
<view slot="label" class="flex-between">
<u-button type="info" text="取消" @click="popupClose"></u-button>
2023-11-07 10:08:37 +08:00
</view>
</u-cell>
</u-cell-group>
</view>
</u-popup>
</view>
</template>
<script>
import {getSafetyenvironmentalGoEdit} from "../../../api";
export default {
data() {
return {
form: {
INSPECTION_SUBJECT: '',
INSPECTED_DEPARTMENT_NAME: '',
INSPECTED_DEPARTMENT_ID: '',
INSPECTED_SITEUSER_NAME: '',
INSPECTED_SITEUSER_ID: '',
INSPECTION_PLACE: '',
INSPECTION_TYPE_NAME: '',
INSPECTION_TIME_START: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
INSPECTION_TIME_END: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
2024-10-10 10:14:31 +08:00
CREATTIME: '',
2023-11-07 10:08:37 +08:00
situationList: [{id: Math.random(), INSPECTION_SITUATION_ID: '', SITUATION: ''}],
inspectorList: [{
id: Math.random(),
inspectionUserShow: false,
INSPECTION_INSPECTOR_ID: '',
INSPECTION_DEPARTMENT_ID: '',
INSPECTION_DEPARTMENT_NAME: '',
INSPECTION_USER_ID: '',
INSPECTION_USER_NAME: ''
}],
hiddenList: [],
INSPECTION_USER_OPINION: '',
INSPECTION_USER_SIGN_IMG: '',
},
INSPECTION_ID: '',
popupShow: false,
hiddenForm: {
hiddenImgs: [],
hiddenVideos: [],
HIDDENDESCR: '',
HIDDENPART_NAME: '',
HIDDENPART: '',
HIDDENLEVEL_NAME: '',
HIDDENLEVEL: '',
HIDDENTYPE_NAME: '',
HIDDENTYPE: '',
DISCOVERYTIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
LONGITUDE: '',
LATITUDE: '',
CREATOR_NAME: '',
CREATOR: '',
ISRELEVANT: ''
},
modalShow: false,
videoUrl: ''
}
},
onLoad(event) {
this.INSPECTION_ID = event.INSPECTION_ID
if (this.INSPECTION_ID) {
this.fnGetSafetyenvironmentalGoEdit()
}
},
methods: {
async fnGetSafetyenvironmentalGoEdit() {
let resData = await getSafetyenvironmentalGoEdit({INSPECTION_ID: this.INSPECTION_ID})
for (let i = 0; i < resData.pd.hiddenList.length; i++) {
2024-08-29 08:35:29 +08:00
resData.pd.hiddenList[i].id = resData.pd.hiddenList[i].HIDDEN_ID
2023-11-07 10:08:37 +08:00
for (let j = 0; j < resData.pd.hiddenList[i].hiddenImgs.length; j++) {
resData.pd.hiddenList[i].hiddenImgs[j].url = this.$store.state.filePath + resData.pd.hiddenList[i].hiddenImgs[j].FILEPATH
}
for (let j = 0; j < resData.pd.hiddenList[i].hiddenVideos.length; j++) {
resData.pd.hiddenList[i].hiddenVideos[j].url = this.$store.state.filePath + resData.pd.hiddenList[i].hiddenVideos[j].FILEPATH
}
}
this.form = resData.pd
},
showHidden(item) {
this.hiddenForm = item
this.popupShow = true
},
popupClose() {
this.popupShow = false
},
previewImage(current) {
2024-10-10 10:14:31 +08:00
if (false) {
2023-11-07 10:08:37 +08:00
uni.previewImage({
urls: [current],
current
});
}
},
2024-10-10 10:14:31 +08:00
previewVideo(videoUrl) {
2023-11-07 10:08:37 +08:00
this.modalShow = true;
this.videoUrl = videoUrl;
}
},
}
</script>
2024-08-29 08:35:29 +08:00
<style scoped>
.title {
min-width: 170rpx;
}
2024-10-10 10:14:31 +08:00
2024-08-29 08:35:29 +08:00
.textarea-box {
width: 100%;
}
2023-11-07 10:08:37 +08:00
</style>