362 lines
10 KiB
Vue
362 lines
10 KiB
Vue
<template>
|
||
<view class="content">
|
||
<view class="form-box form-label-width-1">
|
||
<view class="form-title">工程信息</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">工程名称:</view>
|
||
<view class="form-info2">
|
||
{{prjInfo.prjName}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">工作票号:</view>
|
||
<view class="form-info2">
|
||
{{planTicket.ticketNo}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">建设单位:</view>
|
||
<view class="form-info2">
|
||
{{prjInfo.buildUnitStr}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">负责人:</view>
|
||
<view class="form-info2">
|
||
{{prjInfo.projectManagerStr}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">联系方式:</view>
|
||
<view class="form-info2">
|
||
{{prjInfo.managerPhone}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="form-box">
|
||
<view class="form-title">作业计划</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">当日主要施工作业内容:</view>
|
||
<view class="form-info2">
|
||
{{planTicket.workContent}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">当日计划的风险等级:</view>
|
||
<view class="form-info2">
|
||
{{planTicket.riskLevel}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">位置及内容:</view>
|
||
<view class="form-info2">
|
||
{{planTicket.workLocation}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="form-box">
|
||
<view class="form-title">安全检查通知单</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">被查单位:</view>
|
||
<view class="form-info2">
|
||
{{audit.data.constructionCompanyName}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">检查单位:</view>
|
||
<view class="form-info2">
|
||
{{audit.data.orgName}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item ">
|
||
<view class="form-field2">检查形式:</view>
|
||
<view class="form-info2">
|
||
{{audit.data.checkTypeName}}
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
<template v-if="audit.data.problemList.length>0">
|
||
<view class="form-box" v-for="(item,index) in audit.data.problemList">
|
||
<view class="form-item">
|
||
<view class="form-field" style="font-size: 18px;font-weight: bold;color: darkred;">现场问题{{index+1}}</view>
|
||
</view>
|
||
<template v-if="item.isPeccancy===1">
|
||
<view class="form-item">
|
||
<view class="form-field2">违章类型:</view>
|
||
<view class="form-info2">
|
||
{{item.type}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">违章级别:</view>
|
||
<view class="form-info2">
|
||
{{item.level}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">违章内容:</view>
|
||
<view class="form-info2">
|
||
{{item.description}}
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<view class="form-item">
|
||
<view class="form-field2">存在问题:</view>
|
||
<view class="form-info2">
|
||
{{item.problem}}
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">问题图片:</view>
|
||
<view class="form-info2">
|
||
<view class="form-img-box" v-for="it in item.images">
|
||
<img @click="showBigImage(`${baseUrl}${it}`)" :src="`${baseUrl}${it}`" class="form-img" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-field2">是否违章:</view>
|
||
<view class="form-info2">
|
||
{{item.isPeccancy===0?'否':'是'}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<view class="form-box">
|
||
<view class="form-item ">
|
||
<view class="form-field">备注:</view>
|
||
<view class="form-info">
|
||
{{audit.data.description}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="form-box">
|
||
<view class="form-btn-row flex-par">
|
||
<!-- 如果需要整改报告,那么可以肯定有违章,不能退回 -->
|
||
<button style="width: 150px;" type="default" @click="saveAudit('13')">退回</button>
|
||
<!-- 判定无违章,禁用提交按钮 -->
|
||
<button style="width: 150px;" type="primary" @click="saveAudit('11')">提交</button>
|
||
</view>
|
||
</view>
|
||
<view class="form-box">
|
||
<view class="form-title">审核流程</view>
|
||
<view class="audit-box">
|
||
<view style="margin: 10px;" class="flex-par" v-for="item in auditLog.list">
|
||
<view class="audit-right">
|
||
<view class="audit-name">
|
||
{{item.userName}}
|
||
<text :class="item.auditStatus===10?'red-color':'green-color'" class="audit-state">{{item.auditStatusName}}</text>
|
||
</view>
|
||
<view class="audit-time" v-if="item.auditStatus!==10">{{item.auditTime}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 照片预览 -->
|
||
<uni-popup ref="imgDialog" type="dialog">
|
||
<movable-area style="width: 700rpx;height: 700rpx;">
|
||
<movable-view style="width: 700rpx;height: 700rpx;" scale="true" direction="all">
|
||
<image style="width:100%;height:100%;background-color: #eeeeee;" :src="imgSrc"></image>
|
||
</movable-view>
|
||
</movable-area>
|
||
</uni-popup>
|
||
</view>
|
||
|
||
</template>
|
||
|
||
<script setup>
|
||
import { inject, reactive, ref,toRaw,onMounted } from 'vue';
|
||
import { onLoad,onBackPress } from "@dcloudio/uni-app";
|
||
import REQUEST from "/common/request.js";
|
||
import {URL_BASE} from '/common/config.js'
|
||
const imgDialog = ref();
|
||
const imgSrc = ref('');
|
||
const value = ref('test');
|
||
const index = ref(0);
|
||
const baseUrl = URL_BASE;
|
||
const businessId = ref("");
|
||
const isWarn = ref('0');
|
||
const warnObject = ref('2');
|
||
const needHandle = ref(false);
|
||
const type = ref('');
|
||
const audit = reactive({
|
||
data:{
|
||
id:'',
|
||
constructionCompanyId:'',
|
||
constructionCompanyName:'',
|
||
orgId:'',
|
||
orgName:'',
|
||
checkDate:'',
|
||
checkType:'',
|
||
checkTypeName:'',
|
||
projectId:'',
|
||
jobTicketId:'',
|
||
jobPlanId:'',
|
||
description:'',
|
||
auditorDchzhg:null,
|
||
auditorDchzhgName:null,
|
||
rectificationRequire:null,
|
||
punishOption:null,
|
||
disposalObjectType:null,
|
||
isReport:null,
|
||
problemList:[]
|
||
}
|
||
})
|
||
const prjInfo=reactive({
|
||
prjName:'',
|
||
projectManager:'',
|
||
projectManagerStr:'',
|
||
managerPhone:'',
|
||
buildUnit:'',
|
||
buildUnitStr:'',
|
||
constructionProjectDepartment:'',
|
||
constructionProjectDepartmentStr:''
|
||
});
|
||
const planTicket = reactive({
|
||
planId:'',
|
||
workContent:'',
|
||
workLocation:'',
|
||
riskLevel:'',
|
||
ticketNo:'',
|
||
jobTicketId:''
|
||
});
|
||
const auditLog = reactive({
|
||
total:0,
|
||
wfTaskStatus:null,
|
||
list:[]
|
||
});
|
||
|
||
onLoad((option)=>{
|
||
businessId.value = option.businessId;
|
||
type.value = option.type;
|
||
initDatas();
|
||
});
|
||
const showBigImage=(src)=>{
|
||
// console.log("图片地址:",src);
|
||
if(src){
|
||
imgSrc.value = src
|
||
imgDialog.value.open();
|
||
}
|
||
}
|
||
const getPrjInfo = async (prjId)=>{
|
||
let res = await REQUEST.get("/prjInfo/findPrjInfo",{prjId:prjId});
|
||
if(res){
|
||
prjInfo.prjName = res.prjName;
|
||
prjInfo.projectManager = res.projectManager;
|
||
// prjInfo.projectManagerStr = res.projectManagerStr;
|
||
prjInfo.managerPhone = res.managerPhone;
|
||
prjInfo.buildUnit = res.buildUnit;
|
||
prjInfo.buildUnitStr = res.buildUnitStr;
|
||
prjInfo.constructionProjectDepartment = res.constructionProjectDepartment;
|
||
prjInfo.constructionProjectDepartmentStr = res.constructionProjectDepartmentStr;
|
||
}
|
||
}
|
||
|
||
const fillPlan = async(planId)=>{
|
||
let res = await REQUEST.get("/prjInfo/getPlanDetail",{planId:planId});
|
||
if(res){
|
||
planTicket.planId = res.planId;
|
||
planTicket.workContent = res.workContent;
|
||
planTicket.workLocation = res.workLocation;
|
||
planTicket.riskLevel = res.riskLevel;
|
||
planTicket.ticketNo = res.ticketNo;
|
||
planTicket.jobTicketId = res.jobTicketId;
|
||
prjInfo.projectManagerStr = res.projectManagerStr;
|
||
}
|
||
}
|
||
|
||
const initDatas = async()=>{
|
||
let res = await REQUEST.get(`/disposalNotice/detail/${businessId.value}`);
|
||
console.log(res);
|
||
if(res){
|
||
audit.data = res;
|
||
audit.data.id=res.id;
|
||
audit.data.constructionCompanyId=res.constructionCompanyId;
|
||
audit.data.constructionCompanyName=res.constructionCompanyName;
|
||
audit.data.orgId=res.orgId;
|
||
audit.data.orgName=res.orgName;
|
||
audit.data.checkDate=res.checkDate;
|
||
audit.data.checkType=res.checkType;
|
||
audit.data.checkTypeName=res.checkTypeName;
|
||
audit.data.projectId=res.projectId;
|
||
audit.data.jobTicketId = res.jobTicketId;
|
||
audit.data.jobPlanId=res.jobPlanId;
|
||
audit.data.description=res.description;
|
||
audit.data.rectificationRequire = res.rectificationRequire;
|
||
audit.data.punishOption = res.punishOption;
|
||
audit.data.problemList=res.problemList;
|
||
audit.data.auditorDchzhg = res.auditorDchzhg;
|
||
audit.data.auditorDchzhgName = res.auditorDchzhgName;
|
||
audit.data.disposalObjectType = res.disposalObjectType;
|
||
if(audit.data.problemList){
|
||
for(let problem of audit.data.problemList){
|
||
//图片
|
||
let images = problem.files?problem.files.split(","):[];
|
||
problem.images = images;
|
||
}
|
||
}
|
||
|
||
getPrjInfo(audit.data.projectId);
|
||
fillPlan(audit.data.jobPlanId);
|
||
getTaskLogs();
|
||
}
|
||
|
||
}
|
||
|
||
const getTaskLogs = async()=>{
|
||
let res = await REQUEST.get("/securityCheckNotice/audit/log",{businessId:audit.data.id,businessType:2});
|
||
// console.log(res);
|
||
if(res){
|
||
auditLog.total = res.total;
|
||
auditLog.wfTaskStatus = res.wfTaskStatus;
|
||
auditLog.list = res.list;
|
||
}
|
||
|
||
}
|
||
const saveAudit = async(auditType)=>{
|
||
let param = {id:parseInt(audit.data.id),isReport:'0',rectificationRequire:audit.data.rectificationRequire,punishOption:audit.data.punishOption,auditStatus:parseInt(auditType)};
|
||
// console.log(param);
|
||
let res = await REQUEST.post("/disposalNotice/audit",param);
|
||
// console.log(res)
|
||
if(res && parseInt(res)>0){
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '保存成功',
|
||
confirmText: '确定',
|
||
showCancel: false,
|
||
complete: function(res) {
|
||
if(type.value==='daiban'){
|
||
uni.switchTab({
|
||
url:"/pages/tabBar/daiban"
|
||
});
|
||
}else{
|
||
uni.redirectTo({
|
||
url:"/pages/zhenggaitongzhi/guanli/xiangmubuzhenggaitongzhilist?type=examine"
|
||
});
|
||
}
|
||
|
||
}
|
||
})
|
||
}
|
||
}
|
||
onBackPress(()=>{
|
||
// console.log(type.value);
|
||
if(type.value==='daiban'){
|
||
uni.switchTab({
|
||
url:"/pages/tabBar/daiban"
|
||
});
|
||
}else{
|
||
uni.redirectTo({
|
||
url:"/pages/zhenggaitongzhi/guanli/xiangmubuzhenggaitongzhilist?type=examine"
|
||
});
|
||
}
|
||
return true;
|
||
});
|
||
</script>
|
||
|
||
<style>
|
||
|
||
</style> |