Commit d38bdb7b authored by xinzhedeai's avatar xinzhedeai

add:拒绝 接口对接

parent 0b0a83d9
......@@ -236,18 +236,21 @@
<van-action-sheet v-model="jujue.show4modal" title=" ">
<div class="content" style="padding:0.5rem 0.4rem 0.5rem; text-align: center;">
<h5 style="text-align: left;font-size: .3rem;">拒绝原因</h5>
<textarea class="textareaEle" v-model="jujue.refuseContent" name="" id="" cols="24" rows="3"
<textarea class="textareaEle" v-model="jujue.reason" name="" id="" cols="24" rows="3"
style="resize: none;"></textarea>
<h5 style="text-align: left;font-size: .3rem;">上报相关部门</h5>
<van-checkbox-group v-model="jujue.dept">
<div v-for="(item, index) in jujue.deptDict" style="overflow: hidden;">
<h5 style="text-align: left;font-size: .3rem;color: #1081E3;font-weight: 500;">
{{item.name}}</h5>
<van-checkbox :key="subIndex" :name="subItem.deptId" shape="square" v-for="(subItem, subIndex) in item.children">
{{ subItem.deptName }}
</van-checkbox>
</div>
</van-checkbox-group>
<div class="shangbao-wrapper" v-if="jujue.pushFlag">
<h5 style="text-align: left;font-size: .3rem;">上报相关部门</h5>
<van-checkbox-group v-model="jujue.dept">
<div v-for="(item, index) in jujue.deptDict" style="overflow: hidden;">
<h5 style="text-align: left;font-size: .3rem;color: #1081E3;font-weight: 500;">
{{item.name}}</h5>
<van-checkbox :key="subIndex" :name="subItem.deptId" shape="square" v-for="(subItem, subIndex) in item.children">
{{ subItem.deptName }}
</van-checkbox>
</div>
</van-checkbox-group>
</div>
<div class="footer-bar">
<van-button type="info" plain size="small" @click="jujue.show4modal=false">取消</van-button>
......@@ -290,7 +293,8 @@
<div class="bottom_bar"
v-if="flag=='3' && userType == 'wgy'">
<div>
<van-button type="primary" size="small" @click="yuqi.show4shangbao=true">上报行业主管部门</van-button>
<van-button type="primary" size="small" @click="showShangbao">上报行业主管部门</van-button>
<van-button type="info" size="small" @click="yuqi.show4yanqi=true">限期3天整改</van-button>
</div>
</div>
......
......@@ -84,9 +84,10 @@ window.onload = function () {
jujue:{
show4modal :false,
pushFlag: false, // 是否推送(审核拒绝时,如果true,则显示推送弹窗)
refuseContent: '', // 拒绝原因
reason: '', // 拒绝原因
dept:[], // 拒绝部门 请求参数
deptDict:[] // 列表
},
recordList: [],
......@@ -118,9 +119,6 @@ window.onload = function () {
} else if (this.flag === 'ADD') { // 新增,调用模板详情方法
this.getDetail4Template()
}
this.getDept4jujue()
this.getDept4yuqi()
},
watch: {
checkData: {
......@@ -138,6 +136,11 @@ window.onload = function () {
}
},
methods: {
showShangbao(){
this.yuqi.show4shangbao=true;
this.yuqi.dept=[];
this.getDept4yuqi();
},
getDept4yuqi(param) {
http2.post({
serviceId: API_KEY_MAP["no-page"]['id'],
......@@ -191,7 +194,7 @@ window.onload = function () {
}, 0);
var result = JSON.parse(res)
console.log('接口回调数据getDept4jujue', JSON.parse(res))
this.jujue.deptDict4resuse = result.data
this.jujue.deptDict = result.data
}
})
......@@ -389,7 +392,7 @@ window.onload = function () {
this.reviewRecord = result.reviewRecord
// 2025年6月18日 新增返回字段 隐患整改、逾期上报等
this.jujue.pushFlag = true // result.pushFlag
this.jujue.pushFlag = result.pushFlag
this.recordList = result.recordList
this.checkDeptName = result.checkDeptName // 检查单位
......@@ -542,10 +545,11 @@ window.onload = function () {
});
},
validRefuse(auditStatus){
if(this.jujue.pushFlag){
this.jujue.show4modal = true
}else{
this.add4DSH_XQ(auditStatus)
this.jujue.show4modal = true
this.jujue.reason = ''
if(this.jujue.pushFlag){ // 需要上报的时候,清理
this.jujue.dept = []
this.getDept4jujue()
}
},
add4DSH_XQ(auditStatus) { // 隐患详情 审核通过或拒绝
......@@ -557,12 +561,15 @@ window.onload = function () {
let reqParams = {
sign: 8,
"hdId": this.id,
auditStatus
auditStatus,
}
// 2025年6月18日 新增逻辑: 如果是拒绝,且需要上报,则额外添加上报参数
if(this.pushFlag && auditStatus==0){
reqParams.reason = this.reason
if(auditStatus==0){
reqParams.reason = this.jujue.reason
if(this.jujue.pushFlag){
reqParams.reportedIds = this.jujue.dept
}
}
http2.post({
......@@ -580,11 +587,20 @@ window.onload = function () {
}
if (res) {
console.log('添加结果', res)
vant.Toast({
message: '操作成功',
})
// history.back()
gemhoUtil.navigatePage(`${this.pageName}.html${window.location.search}`, '操作完成,跳转中...')
var result = JSON.parse(res)
if(result.code === 200){
vant.Toast({
message: '操作成功',
})
// history.back()
setTimeout(() => {
gemhoUtil.navigatePage(`${this.pageName}.html${window.location.search}`, '操作完成,跳转中...')
}, 1000);
}else{
vant.Toast({
message: '操作失败',
})
}
}
})
},
......
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