|
@@ -4,13 +4,15 @@
|
|
|
<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
|
|
|
<view class="tip">整改期限{{optionData.checkPlanSetVoList.checkStartTime}}(逾期未完成整改关闭实验室)</view>
|
|
|
<view class="items" v-if="newData.hazardCheckName!=''">
|
|
|
- <view class="items-t" >
|
|
|
+ <view class="items-t">
|
|
|
<view class="items-t-r">{{newData.hazardCheckCode}} {{newData.hazardCheckName}}</view>
|
|
|
</view>
|
|
|
- <view class="items-b" >< {{newData.hazardCheckCode2}}
|
|
|
- {{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}</view>
|
|
|
+ <view class="items-b">< {{newData.hazardCheckCode2}}
|
|
|
+ {{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="items-number" v-if="newData.hazardCheckName!=''">此检查项在当前实验室累计出现<text>{{newData.hazardCheckNum}}</text>次隐患</view>
|
|
|
+ <view class="items-number" v-if="newData.hazardCheckName!=''">
|
|
|
+ 此检查项在当前实验室累计出现<text>{{newData.hazardCheckNum}}</text>次隐患</view>
|
|
|
<view class="list">
|
|
|
<view class="list-li" v-if="newData.hazardCheckName!=''">
|
|
|
<view>检查要点</view>
|
|
@@ -20,33 +22,91 @@
|
|
|
</view>
|
|
|
<view v-if="newData.hazardCheckName!=''" class="hidden-content">{{newData.hazardCheckPoint}}
|
|
|
</view>
|
|
|
- <view class="list-li">
|
|
|
+ <view class="list-li" @click="checkCollapse()">
|
|
|
<view>检查隐患</view>
|
|
|
- <view style="color: #FF8C00;">
|
|
|
- <img src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
+ <view :id="newData.checkFlag?'fontColor-B':'fontColor-A'">
|
|
|
+ {{newData.checkFlag?'符合':'不符合 '}}
|
|
|
+ <img v-if="!newData.checkCollapse" src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
+ <img v-if="newData.checkCollapse" src="@/pages_safetyCheck/images/icon_06_1.png">
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="hidden-content">{{newData.hazardDescribe}}
|
|
|
- </view>
|
|
|
- <view class="photo">
|
|
|
- <img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
|
|
|
- </view>
|
|
|
- <view class="list-li">
|
|
|
- <view>姓名:</view>
|
|
|
- <view>{{newData.createName}}</view>
|
|
|
+ <view v-if="newData.checkCollapse">
|
|
|
+ <view class="hidden-content" v-if="!newData.checkFlag">{{newData.hazardDescribe}}
|
|
|
+ </view>
|
|
|
+ <view class="photo">
|
|
|
+ <img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>姓名:</view>
|
|
|
+ <view>{{newData.checkUserName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>检查时间</view>
|
|
|
+ <view>{{newData.checkTime}}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="list-li">
|
|
|
- <view>检查时间 :</view>
|
|
|
- <view>{{newData.createTime}}</view>
|
|
|
+ <view v-if="pageType==1 || pageType==2" v-for="(item,index) in newData.checkRectifyVoList" :key="index">
|
|
|
+ <view class="list-li" v-if="item.rectifyTime" @click="rectifyCollapse(item)">
|
|
|
+ <view>隐患整改</view>
|
|
|
+ <view :id="item.rectifyResult?'fontColor-B':(item.rectifyResult?'fontColor-C':'')">
|
|
|
+ {{item.rectifyResult?'已整改':(item.rectifyResult?'暂无法整改':'')}}
|
|
|
+ <img v-if="!item.rectifyCollapse" src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
+ <img v-if="item.rectifyCollapse" src="@/pages_safetyCheck/images/icon_06_1.png">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="item.rectifyCollapse && item.rectifyTime">
|
|
|
+ <view class="hidden-content">{{item.rectifyMeasure}}
|
|
|
+ </view>
|
|
|
+ <view class="photo" @click="lockImg(item.rectifyUploadList)">
|
|
|
+ <img v-for="(item2,index2) in item.rectifyUploadList" :src="baseUrl+item2.fileUrl">
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>姓名:</view>
|
|
|
+ <view>{{item.rectifyName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>整改时间</view>
|
|
|
+ <view>{{item.rectifyTime}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="list-li" v-if="item.reviewTime" @click="reviewCollapse(item)">
|
|
|
+ <view>复查验证</view>
|
|
|
+ <view :id="item.examineResult?'fontColor-B':(item.examineResult?'fontColor-C':'')">
|
|
|
+ {{item.examineResult?'复查完毕':(item.examineResult?'退回整改':'')}}
|
|
|
+ <img v-if="!item.reviewCollapse" src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
+ <img v-if="item.reviewCollapse" src="@/pages_safetyCheck/images/icon_06_1.png">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="item.reviewCollapse && item.reviewTime">
|
|
|
+ <view class="hidden-content" >{{item.examineOpinion}}
|
|
|
+ </view>
|
|
|
+ <view class="photo" @click="lockImg(item.examineUploadList)">
|
|
|
+ <img v-for="(item3,index3) in item.examineUploadList" :src="baseUrl+item3.fileUrl">
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>姓名:</view>
|
|
|
+ <view>{{item.reviewName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="list-li">
|
|
|
+ <view>复查时间</view>
|
|
|
+ <view>{{item.reviewTime}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="list-li">
|
|
|
- <view>隐患整改</view>
|
|
|
+ <view v-if="pageType==1">复查验证</view>
|
|
|
+ <view v-if="pageType==2">隐患整改({{fontNum}}/500)</view>
|
|
|
<view>
|
|
|
<img src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
</view>
|
|
|
</view>
|
|
|
- <textarea class="describe" type="text" v-model="form.rectifyDescribe" maxlength="500"
|
|
|
- placeholder="立整立改的请填写相关文字及整改前后照片对比等,不能立整立改的请说明原因并附整改计划、措施等" placeholder-style="font-size:24rpx;color:#999;"></textarea>
|
|
|
+ <textarea v-if="pageType==1" class="describe" type="text" v-model="form.examineOpinion" maxlength="500"
|
|
|
+ placeholder="请填写隐患描述"
|
|
|
+ placeholder-style="font-size:24rpx;color:#999;"></textarea>
|
|
|
+ <textarea v-if="pageType==2" class="describe" type="text" v-model="form.rectifyMeasure" maxlength="500"
|
|
|
+ @input="sumfontnum" placeholder="立整立改的请填写相关文字及整改前后照片对比等,不能立整立改的请说明原因并附整改计划、措施等"
|
|
|
+ placeholder-style="font-size:24rpx;color:#999;"></textarea>
|
|
|
+
|
|
|
<view class="check-for-img-max-box">
|
|
|
<view class="left-title-p"></view>
|
|
|
<view class="right-img-box">
|
|
@@ -73,14 +133,17 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view class="sub-btn">
|
|
|
- <view @click="submitForm(2)">暂无法整改</view>
|
|
|
- <view @click="submitForm(1)">完成整改</view>
|
|
|
+ <view @click="submitForm(2)">{{pageType==1?'退回整改':'暂无法整改'}}</view>
|
|
|
+ <view @click="submitForm(1)">{{pageType==1?'复查完毕':'完成整改'}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ parseTime
|
|
|
+ } from '@/component/public.js'
|
|
|
import {
|
|
|
config
|
|
|
} from '@/api/request/config.js'
|
|
@@ -88,6 +151,7 @@
|
|
|
securityAppCheckPhotoUpdate,
|
|
|
securityAppCheckDangerGetCheckProDetail,
|
|
|
securityAppCheckDangerCheckRectify,
|
|
|
+ securityAppCheckDangerApprove,
|
|
|
} from '@/pages_safetyCheck/api/index.js'
|
|
|
export default {
|
|
|
name: "snapshotDetail",
|
|
@@ -98,18 +162,22 @@
|
|
|
return {
|
|
|
baseUrl: config.base_url,
|
|
|
inspectionItems: 0, //0有检查项 1无检查项
|
|
|
+ pageType:null,
|
|
|
form: {
|
|
|
imgDtoList: [],
|
|
|
- rectifyProjectName:'',
|
|
|
- rectifyProjectUrl:'',
|
|
|
+ rectifyProjectName: '',
|
|
|
+ rectifyProjectUrl: '',
|
|
|
},
|
|
|
newData: {},
|
|
|
- optionData:null,
|
|
|
+ optionData: null,
|
|
|
+ fontNum:0,
|
|
|
+ rectifyId:null,
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
let optionData = JSON.parse(decodeURIComponent(option.infoData));
|
|
|
- console.log(optionData)
|
|
|
+ console.log('整改',optionData)
|
|
|
+ this.$set(this, 'pageType', optionData.pageType);
|
|
|
this.$set(this, 'optionData', optionData);
|
|
|
},
|
|
|
onShow() {
|
|
@@ -120,11 +188,12 @@
|
|
|
},
|
|
|
methods: {
|
|
|
//详情
|
|
|
- async securityAppCheckDangerGetCheckProDetail(){
|
|
|
+ async securityAppCheckDangerGetCheckProDetail() {
|
|
|
+ let self=this;
|
|
|
let obj = {
|
|
|
planId: this.optionData.checkPlanSetVoList.planId,
|
|
|
planSetId: this.optionData.checkPlanSetVoList.planSetId,
|
|
|
- checkCategory: this.optionData.checkCategory,
|
|
|
+ checkCategory: this.optionData.checkCategory,
|
|
|
hazardCheckPro: this.optionData.hazardCheckPro,
|
|
|
subId: this.optionData.subId,
|
|
|
}
|
|
@@ -135,25 +204,53 @@
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: data.data.subName + '(' + data.data.roomNum + ')'
|
|
|
})
|
|
|
+ data.data.checkCollapse=false;
|
|
|
+ data.data.checkTime= parseTime(data.data.checkTime, "{y}-{m}-{d}");
|
|
|
+ if(data.data.checkRectifyVoList[0]){
|
|
|
+ data.data.checkRectifyVoList.forEach(function(item,index){
|
|
|
+ item.rectifyTime= parseTime(item.rectifyTime, "{y}-{m}-{d}");
|
|
|
+ item.reviewTime= parseTime(item.reviewTime, "{y}-{m}-{d}");
|
|
|
+ item.rectifyCollapse=false;
|
|
|
+ item.reviewCollapse=false;
|
|
|
+ if(index==data.data.checkRectifyVoList.length-1){
|
|
|
+ item.rectifyCollapse=true;
|
|
|
+ item.reviewCollapse=true;
|
|
|
+ self.$set(self, 'rectifyId', item.rectifyId);
|
|
|
+ if(self.pageType==1){
|
|
|
+ self.$set(self.form, 'examineOpinion', item.examineOpinion?item.examineOpinion:'');
|
|
|
+ self.$set(self.form, 'imgDtoList', item.examineUploadList?item.examineUploadList:[]);
|
|
|
+
|
|
|
+ }else if(self.pageType==2){
|
|
|
+ self.$set(self.form, 'rectifyMeasure', item.rectifyMeasure?item.rectifyMeasure:'');
|
|
|
+ self.$set(self.form, 'imgDtoList', item.rectifyUploadList?item.rectifyUploadList:[]);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
this.$set(this, 'newData', data.data);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
+ // 限制文本框字数
|
|
|
+ sumfontnum(e) {
|
|
|
+ this.fontNum = e.detail.value.length
|
|
|
+ },
|
|
|
//滚动事件
|
|
|
scrollGet() {},
|
|
|
/******文件上传******/
|
|
|
selectFile() {
|
|
|
let self = this;
|
|
|
wx.chooseMessageFile({
|
|
|
- count: 1,
|
|
|
- type: 'file',
|
|
|
- success (res) {
|
|
|
- console.log(res)
|
|
|
- // tempFilePath可以作为img标签的src属性显示图片
|
|
|
- const tempFilePaths = res.tempFiles[0].path
|
|
|
- self.form.rectifyProjectName=res.tempFiles[0].name
|
|
|
- self.uploadFile(tempFilePaths);
|
|
|
- }
|
|
|
+ count: 1,
|
|
|
+ type: 'file',
|
|
|
+ success(res) {
|
|
|
+ console.log(res)
|
|
|
+ // tempFilePath可以作为img标签的src属性显示图片
|
|
|
+ const tempFilePaths = res.tempFiles[0].path
|
|
|
+ self.form.rectifyProjectName = res.tempFiles[0].name
|
|
|
+ self.uploadFile(tempFilePaths);
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
async uploadFile(tempFilePaths) {
|
|
@@ -176,7 +273,7 @@
|
|
|
let res = JSON.parse(uploadFileRes.data);
|
|
|
console.log(res)
|
|
|
if (res.code == 200) {
|
|
|
- self.form.rectifyProjectUrl=res.data.url;
|
|
|
+ self.form.rectifyProjectUrl = res.data.url;
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
@@ -237,7 +334,7 @@
|
|
|
this.form.imgDtoList.push({
|
|
|
'fileUrl': res.data.url,
|
|
|
'fileName': res.data.name,
|
|
|
- 'fileType':2,
|
|
|
+ 'fileType': 2,
|
|
|
});
|
|
|
console.log(res.data.url)
|
|
|
} else {
|
|
@@ -260,37 +357,76 @@
|
|
|
this.form.imgDtoList.splice(minIndex, 1);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
-
|
|
|
- //整改/暂无法整改
|
|
|
+ //折叠展开
|
|
|
+ checkCollapse(row){
|
|
|
+ this.newData.checkCollapse=!this.newData.checkCollapse
|
|
|
+ },
|
|
|
+ rectifyCollapse(row){
|
|
|
+ row.rectifyCollapse=!row.rectifyCollapse
|
|
|
+ },
|
|
|
+ reviewCollapse(row){
|
|
|
+ row.reviewCollapse=!row.reviewCollapse
|
|
|
+ },
|
|
|
+
|
|
|
+ //提交
|
|
|
async submitForm(status) {
|
|
|
let self = this;
|
|
|
-
|
|
|
- let obj={
|
|
|
- checkCategory:this.optionData.checkCategory,
|
|
|
- dangerId:this.newData.dangerId,
|
|
|
- rectifyMaterialName:'',//待定字段
|
|
|
- rectifyMaterialUrl:'',//待定字段
|
|
|
- rectifyMeasure:this.form.rectifyDescribe,
|
|
|
- rectifyResult:status==1?true:false,//true已整改false暂无法整改
|
|
|
- rectifyUploadList:this.form.imgDtoList,
|
|
|
- }
|
|
|
- console.log(obj)
|
|
|
- const {
|
|
|
- data
|
|
|
- } = await securityAppCheckDangerCheckRectify(obj);
|
|
|
- if (data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: '提交成功',
|
|
|
- icon: "none",
|
|
|
- mask: true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- let infoData=this.optionData;
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
|
|
|
- });
|
|
|
+ if(self.pageType==1){
|
|
|
+ //复查
|
|
|
+ let obj = {
|
|
|
+ rectifyId: this.rectifyId,
|
|
|
+ examineOpinion: this.form.examineOpinion,
|
|
|
+ examineResult: status == 1 ? 1 : 0, //1是通过,0是驳回
|
|
|
+ examineUploadList: this.form.imgDtoList,
|
|
|
+ }
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await securityAppCheckDangerApprove(obj);
|
|
|
+ if (data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ let infoData = this.optionData;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
|
|
|
+ encodeURIComponent(JSON.stringify(infoData))
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ }else if(self.pageType==2){
|
|
|
+ //整改
|
|
|
+ let obj = {
|
|
|
+ checkCategory: this.optionData.checkCategory,
|
|
|
+ dangerId: this.newData.dangerId,
|
|
|
+ rectifyMaterialName: '', //待定字段
|
|
|
+ rectifyMaterialUrl: '', //待定字段
|
|
|
+ rectifyMeasure: this.form.rectifyMeasure,
|
|
|
+ rectifyResult: status == 1 ? true : false, //true已整改false暂无法整改
|
|
|
+ rectifyUploadList: this.form.imgDtoList,
|
|
|
+ }
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await securityAppCheckDangerCheckRectify(obj);
|
|
|
+ if (data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ let infoData = this.optionData;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
|
|
|
+ encodeURIComponent(JSON.stringify(infoData))
|
|
|
+ });
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|
|
@@ -316,6 +452,14 @@
|
|
|
color: #E11608;
|
|
|
}
|
|
|
|
|
|
+ #fontColor-A {
|
|
|
+ color: #FF8C00;
|
|
|
+ }
|
|
|
+
|
|
|
+ #fontColor-B {
|
|
|
+ color: #16B531;
|
|
|
+ }
|
|
|
+
|
|
|
.tip {
|
|
|
width: 750rpx;
|
|
|
height: 80rpx;
|
|
@@ -610,9 +754,9 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .list-li:last-of-type {
|
|
|
+ /* .list-li:last-of-type {
|
|
|
border: none;
|
|
|
- }
|
|
|
+ } */
|
|
|
}
|
|
|
|
|
|
}
|