Commit b11c6f9a authored by xinzhedeai's avatar xinzhedeai

整改图片显示

parent ec25d8b5
......@@ -62,14 +62,14 @@
<span>隐患审核</span>
</p>
</div>
<div class="item">
<!-- <div class="item">
<p class="bgImg" @click="nav('dw-list')">
<span>危险作业备案</span>
</p>
<p class="bgImg" @click="nav('notice-list')">
<span>通知公告</span>
</p>
</div>
</div> -->
</div>
</div>
</body>
......
......@@ -47,7 +47,7 @@ var userInfo = {
}
}
var token ="Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI2NmYxMGZlZWU1MTc0OTMxOTdiZjE0ZTk3ODhmZDBmYiIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.t8LqWVN2NzmbkGv5jf5Nkpla3ndkP8lkMBNvVT16VDEBtEwZXIalk-fjLTZAX8VZ3dspMgWvSHBRQsXYtjJULw";
var token ="Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiJhY2QyN2QzYmQ3YWY0OTY2YTU0Zjg1N2ZhMTFhN2M0MCIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.AMQx1ywGtp49yUTuO25p6ERTP7uGM90TQQafsQaRXeRZ2yZ8LzZoTv4g28MoLG3miFmYd9sv4ubKUT6b2Fcx1g";
localStorage.setItem('Authorization', token)
localStorage.setItem('appCounty', userInfo.user.county)
......
......@@ -25,9 +25,25 @@ axios.interceptors.request.use(config => {
axios.interceptors.response.use((res) => {
// 成功的响应数据 服务器的相关的数据返回来之后,响应拦截器能够检测到,可以做一些事
let response = res.data
console.log('res.statusCode', res)
if(response.statusCode >= 300||response.status >= 300){
// alert('系统发生错误')
vant.Dialog.alert({
title: '信息提示',
message: response.message,
})
return
}
vant.Toast.clear()
return res;
}, (error) => {
console.log('res.statusCode error', error)
vant.Dialog.alert({
title: '信息提示',
message: '网络错误',
})
// 响应失败的时候的回调函数
return Promise.reject(new Error(error))
})
......@@ -57,6 +73,7 @@ var http = {
})
.then(res => {
let response = res.data
debugger
console.log('res.statusCode', response)
if(response.statusCode >= 300||response.status >= 300){
// alert('系统发生错误')
......@@ -146,16 +163,6 @@ var http = {
'Authorization': localStorage.getItem('Authorization')
},
}).then(res => {
let response = res.data
console.log('res.statusCode', response)
if(response.statusCode >= 300||response.status >= 300){
// alert('系统发生错误')
vant.Dialog.alert({
title: '信息提示',
message: response.message,
})
return
}
resolve(res.data)
})
.catch(err => {
......
......@@ -79,7 +79,7 @@
</van-popup>
</van-cell-group>
<van-cell-group>
<van-field v-model="form.hdDesc" :disabled="!editAble" label="隐患描述" placeholder="" />
<van-field v-model="form.comment" :disabled="!editAble" label="隐患描述" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-field v-model="form.basis" :disabled="!editAble" label="检查依据" placeholder="" />
......
......@@ -122,13 +122,13 @@ window.addEventListener("load", function() {
})
},
submit() {
if (!this.form.hdInspectDate) {
vant.Dialog.alert({
message: '检查日期不能为空',
})
return
}
this.form.hdInspectDate = this.form.hdInspectDate.replace(' 00:00:00', '') + ' 00:00:00'
if (!this.form.curSelectSecType) {
vant.Dialog.alert({
message: '请选择安全类别',
......@@ -153,7 +153,7 @@ window.addEventListener("load", function() {
})
return;
}
if (!this.form.hdDesc) {
if (!this.form.comment) {
vant.Dialog.alert({
message: '请填写隐患描述',
})
......@@ -208,9 +208,7 @@ window.addEventListener("load", function() {
})
// }, 0)
if(!this.form.hdId){ // 添加时则
location.reload()
}
history.back()
})
},
formatDate(date, type) {
......
......@@ -42,7 +42,7 @@
<van-field v-model="form.hdName" :disabled="!editAble" label="发现问题" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-field v-model="form.hdDesc" :disabled="!editAble" label="隐患描述" placeholder="" />
<van-field v-model="form.comment" :disabled="!editAble" label="隐患描述" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-cell>隐患照片:
......@@ -59,7 +59,7 @@
<van-cell>整改后照片:
<div style="width: 2.5rem;">
<van-image width="100" height="100"
:src="'data:image/jpg;base64,' + form.hdRectificationPic" />
:src="form.hdRectificationPic" />
</div>
</van-cell>
</van-cell-group>
......@@ -71,9 +71,9 @@
<van-field v-model="form.verifyStatusString" label="审核状态" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-field v-model="form.hdAcceptancePerson" label="审核人员" placeholder="" />
<van-field v-model="form.reviewer" label="审核人员" placeholder="" />
</van-cell-group>
<van-cell-group>
<van-cell-group v-if="form.verifyStatus===2">
<van-field v-model="form.refuseReason" type="textarea" label="整改未过审原因" autosize
placeholder="" />
</van-cell-group>
......
......@@ -8,28 +8,29 @@ window.addEventListener("load", function() {
data() {
return {
form: {
enterpriseSubmitsTheRectificationDate: '',//2024-03-08 00:00:00',
// 检查人员
hdInspectExpert: '',//'发发发',
// 发现问题
hdName: '',//'测试问题',
comment: '',//'隐患描述',
// 检查依据
basis: '',//'测试依据',
// 隐患整改建议
verifyStatus: '',
// 隐患整改日期
hdRectificationDate: '',//'2024-03-08',
// 隐患整改图片
hdRectificationPic: '',
hdPic: '',
// 审核人
hdAcceptancePerson: "刘德华",
recEvaluation: '24年02月22日 审核未通过;24年02月22日 审核未通过',
reviewer: "",
recEvaluation: '',
verifyStatusString: '', // 审核状态
},
// 企业id
companyId: localStorage.getItem('companyId'),
editAble: true,
// companyId: localStorage.getItem('companyId'),
editAble: false,
}
},
mounted() {
......@@ -37,19 +38,32 @@ window.addEventListener("load", function() {
},
methods: {
// 整改后照片
transferUrl(hdRectificationPic) {
console.log(hdRectificationPic);
if (hdRectificationPic) {
return (
axios.defaults.baseURL +
"/hd_rectification_pic_to_verify/" +
hdRectificationPic.split("\\hd_rectification_pic_to_verify\\")[1]
);
} else {
return null;
}
},
detail(){
var hdId = gemhoUtil.getParameter('hdId')
var id = gemhoUtil.getParameter('id')
http.get('/api/hiddenDangerToVerify', {
page: 0, // 每次请求增加下一页
size: 1,
county: localStorage.getItem('appCounty'),
hd_id: hdId,
id,
// enName: this.companyName,
sort: 'verify_status,asc',
}).then((res) => {
this.loading = false; // 加载状态结束
this.form = res.content[0]
this.form.hdRectificationPic = this.transferUrl(this.form.hdRectificationPic)
})
},
},
......
......@@ -113,18 +113,22 @@ window.addEventListener("load", function() {
})
},
detail(item) {
gemhoUtil.navigatePage('./yh-verify-detail.html?companyId=' + gemhoUtil.getParameter('companyId') +
'&hdId=' + item.hdId + '&type=detail')
gemhoUtil.navigatePage('./yh-verify-detail.html?id=' + item.id + '&type=detail')
},
getList() {
http.get('/api/hiddenDangerToVerify', {
var reqParam = {
page: this.page++, // 每次请求增加下一页
size: this.size,
county: localStorage.getItem('appCounty'),
verifyState: this.curVerifyStatusVal,
enName: this.companyName,
sort: 'verify_status,asc',
}).then((res) => {
}
if(this.curVerifyStatusVal){
reqParam.verifyState = this.curVerifyStatusVal
}
if(this.companyName){
reqParam.enName = this.companyName
}
http.get('/api/hiddenDangerToVerify', reqParam).then((res) => {
this.loading = false; // 加载状态结束
this.list.push(...res.content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment